17 lines
11 KiB
JavaScript
17 lines
11 KiB
JavaScript
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(()=>(()=>{"use strict";var e={737:(e,t)=>{
|
||
|
/*
|
||
|
* HSBasePlugin
|
||
|
* @version: 2.0.3
|
||
|
* @author: HTMLStream
|
||
|
* @license: Licensed under MIT (https://preline.co/docs/license.html)
|
||
|
* Copyright 2023 HTMLStream
|
||
|
*/
|
||
|
Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,o){this.el=e,this.options=t,this.events=o,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var o;e.push({id:(null===(o=null==t?void 0:t.el)||void 0===o?void 0:o.id)||e.length+1,element:t})},e.prototype.fireEvent=function(e,t){if(void 0===t&&(t=null),this.events.hasOwnProperty(e))return this.events[e](t)},e.prototype.on=function(e,t){this.events[e]=t},e}();t.default=o},770:function(e,t,o){
|
||
|
/*
|
||
|
* HSOverlay
|
||
|
* @version: 2.0.3
|
||
|
* @author: HTMLStream
|
||
|
* @license: Licensed under MIT (https://preline.co/docs/license.html)
|
||
|
* Copyright 2023 HTMLStream
|
||
|
*/
|
||
|
var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var l=o(969),s=function(e){function t(t,o,n){var i,s,a=e.call(this,t,o,n)||this,c=t.getAttribute("data-hs-overlay-options"),u=c?JSON.parse(c):{},d=r(r({},u),o);return a.hiddenClass=(null==d?void 0:d.hiddenClass)||"hidden",a.isClosePrev=null===(i=null==d?void 0:d.isClosePrev)||void 0===i||i,a.backdropClasses=null!==(s=null==d?void 0:d.backdropClasses)&&void 0!==s?s:"transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",a.openNextOverlay=!1,a.autoHide=null,a.overlayId=a.el.getAttribute("data-hs-overlay"),a.overlay=document.querySelector(a.overlayId),a.overlay&&(a.isCloseWhenClickInside=(0,l.getClassProperty)(a.overlay,"--close-when-click-inside","false")||"false",a.isTabAccessibilityLimited=(0,l.getClassProperty)(a.overlay,"--tab-accessibility-limited","true")||"true",a.hasAutofocus=(0,l.getClassProperty)(a.overlay,"--has-autofocus","true")||"true",a.hasAbilityToCloseOnBackdropClick=a.overlay.getAttribute("data-hs-overlay-keyboard")||"true"),a.overlay&&a.init(),a}return i(t,e),t.prototype.init=function(){var e=this;this.createCollection(window.$hsOverlayCollection,this),this.el.addEventListener("click",(function(){e.overlay.classList.contains(e.hiddenClass)?e.open():e.close()})),this.overlay.addEventListener("click",(function(t){t.target.id&&"#".concat(t.target.id)===e.overlayId&&"true"===e.isCloseWhenClickInside&&"true"===e.hasAbilityToCloseOnBackdropClick&&e.close()}))},t.prototype.hideAuto=function(){var e=this,t=parseInt((0,l.getClassProperty)(this.overlay,"--auto-hide","0"));t&&(this.autoHide=setTimeout((function(){e.close()}),t))},t.prototype.checkTimer=function(){this.autoHide&&(clearTimeout(this.autoHide),this.autoHide=null)},t.prototype.buildBackdrop=function(){var e=this,t=this.overlay.classList.value.split(" "),o=parseInt(window.getComputedStyle(this.overlay).getPropertyValue("z-index")),n=this.overlay.getAttribute("data-hs-overlay-backdrop-container")||!1,i=document.createElement("div"),r=this.backdropClasses,s="static"!==(0,l.getClassProperty)(this.overlay,"--overlay-backdrop","true"),a="false"===(0,l.getClassProperty)(this.overlay,"--overlay-backdrop","true");i.id="".concat(this.overlay.id,"-backdrop"),"style"in i&&(i.style.zIndex="".concat(o-1));for(var c=0,u=t;c<u.length;c++){var d=u[c];(d.startsWith("hs-overlay-backdrop-open:")||d.includes(":hs-overlay-backdrop-open:"))&&(r+=" ".concat(d))}a||(n&&((i=document.querySelector(n).cloneNode(!0)).classList.remove("hidden"),r="".concat(i.classList.toString()),i.classList.value=""),s&&i.addEventListener("click",(function(){return e.close()}),!0),i.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(i),setTimeout((function(){i.classList.value=r})))},t.prototype.destroyBackdrop=function(){var e=document.querySelector("#".concat(this.overlay.id,"-backdrop"));e&&(this.openNextOverlay&&(e.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(e).transitionDuration.replace(/[^\d.-]/g,"")),"s")),e.classList.add("opacity-0"),(0,l.afterTransition)(e,(function(){e.remove()})))},t.prototype.focusElement=function(){var e=this.overlay.querySelector("[autofocus]");if(!e)return!1;e.focus()},t.prototype.open=function(){var e=this;if(!this.overlay)return!1;var t=window.$hsOverlayCollection.find((function(e){return e.element.overlay===document.quer
|