diff --git a/LICENSE b/LICENSE index 8057c47..2a93c43 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,10 @@ +@Author: Preline Labs Ltd. +@Website: https://preline.co +@License: Preline UI is free for both personal and commercial projects, released under dual license terms "MIT" and "Preline UI Fair Use License", and copyrighted 2024 by Preline Labs Ltd. + MIT License -Copyright (c) 2023 Html Stream +Copyright (c) 2024 Preline Labs Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +23,29 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Preline UI Fair Use License + +1. Usage Restrictions: +- Competing Products: The Software shall not be used to create any product or service that directly competes with Preline UI. A competing product is defined as any software or service that replicates the primary functionalities of Preline UI. +- Misuse and Abuse: The Software shall not be used for any activities that are deemed harmful, abusive, or intended to deceive end-users. This includes, but is not limited to, creating malware, engaging in fraudulent activities, or infringing on the rights of others. + +2. Commercial Derivative Works: +Users are permitted to create and sell derivative works such as templates, themes, and page builders, provided that: +- The derivative works must not be marketed as competing products. +- Proper attribution must be given to the original author, including the name "Preline UI" and a link to the original repository. +- A clear distinction must be made between the original work and the derivative work, ensuring that users understand the source of each. + +3. Distribution and Sublicensing: +Redistribution of the Software in its original or modified form is allowed under the MIT License, with the following additional conditions: +- Redistributions must include this Fair Use License in addition to the MIT License. +- Redistributions must not remove or alter any licensing information or notices. +- Must include clear attribution with a link to the original repository. + +4. Termination: +The author reserves the right to terminate the rights granted under this Fair Use License if the user fails to comply with the terms. Upon termination, the user must cease all use and distribution of the Software, and destroy all copies in their possession. + +5. Enforcement and Compliance: +- Users who believe that the terms of this Fair Use License have been violated are encouraged to report the violation to the author. +- The author reserves the right to take legal action to enforce compliance with this Fair Use License. \ No newline at end of file diff --git a/README.md b/README.md index 30e85b0..f2ef05c 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ For help, discussion about best practices, or any other conversation that would ## License -Preline UI is Open Source project and licensed under [MIT](https://preline.co/docs/license.html). +Preline UI is free for both personal and commercial projects, released under dual license terms [MIT](https://preline.co/docs/license.html) and [Preline UI Fair Use License](https://preline.co/docs/license.html) , and copyrighted 2024 by Preline Labs Ltd. Preline UI Figma is free for both commercial and personal projects, learn more [here](https://preline.co/license.html). @@ -63,4 +63,4 @@ All brand icons are trademarks of their respective owners. The use of these trad Preline UI is built and maintend by [Htmlstream](https://htmlstream.com) team. Over the last decade at Htmlstream, our journey has involved crafting UI Components and Templates. This process has allowed us to understand and explore a range of strategies for developing versatile UI designs that can adapt to a variety of needs. -Share your thoughts about Preline on [Twitter](https://twitter.com/prelineUI) or leave supportive review on [ProductHunt](https://www.producthunt.com/products/preline-ui/reviews). +Share your thoughts about Preline on [Twitter](https://x.com/prelineUI) or leave supportive review on [ProductHunt](https://www.producthunt.com/products/preline-ui/reviews). diff --git a/dist/accordion.d.ts b/dist/accordion.d.ts index 3d43fef..9becfa4 100644 --- a/dist/accordion.d.ts +++ b/dist/accordion.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/accordion.js b/dist/accordion.js index 7a894c3..f288ce1 100644 --- a/dist/accordion.js +++ b/dist/accordion.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={460:function(t,e,n){ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={740:function(t,e,n){ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(e){return e.element.el===t.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px")})),(0,s.afterTransition)(this.content,(function(){t.content.style.display="block",t.content.style.height="",t.fireEvent("open",t.el),(0,s.dispatch)("open.hs.accordion",t.el,t.el)}))},e.prototype.hide=function(){var t=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),(0,s.afterTransition)(this.content,(function(){t.content.style.display="",t.content.style.height="0",t.fireEvent("close",t.el),(0,s.dispatch)("close.hs.accordion",t.el,t.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(c(n(737)).default);window.addEventListener("load",(function(){l.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&l.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=l),e.default=l},737:(t,e)=>{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(t){return t.element.el===e.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px")})),(0,s.afterTransition)(this.content,(function(){e.content.style.display="block",e.content.style.height="",e.fireEvent("open",e.el),(0,s.dispatch)("open.hs.accordion",e.el,e.el)}))},e.prototype.hide=function(){var t,e=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),(0,s.afterTransition)(this.content,(function(){e.content.style.display="",e.content.style.height="0",e.fireEvent("close",e.el),(0,s.dispatch)("close.hs.accordion",e.el,e.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(c(n(961)).default);window.addEventListener("load",(function(){l.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&l.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=l),e.default=l},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),c=i?i.getBoundingClientRect():null,s=window.innerHeight,l=c?r.top-c.top:r.top,a=(i?c.bottom:s)-r.bottom,u=t.clientHeight+o;return"bottom"===n?a>=u:"top"===n?l>=u:l>=u||a>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(460);return n})())); \ No newline at end of file +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),c=i?i.getBoundingClientRect():null,s=window.innerHeight,l=c?r.top-c.top:r.top,a=(i?c.bottom:s)-r.bottom,u=t.clientHeight+o;return"bottom"===n?a>=u:"top"===n?l>=u:l>=u||a>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(740);return n})())); \ No newline at end of file diff --git a/dist/carousel.d.ts b/dist/carousel.d.ts index 000cb99..357f7b8 100644 --- a/dist/carousel.d.ts +++ b/dist/carousel.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; @@ -24,6 +22,7 @@ export interface ICarouselOptions { isAutoPlay?: boolean; speed?: number; isInfiniteLoop?: boolean; + isRTL?: boolean; } export interface ICarousel { options?: ICarouselOptions; @@ -45,6 +44,7 @@ declare class HSCarousel extends HSBasePlugin implements ICaro private readonly loadingClassesAdd; private readonly afterLoadingClassesAdd; private readonly isAutoPlay; + private readonly isRTL; private readonly speed; private readonly isInfiniteLoop; private timer; @@ -60,6 +60,7 @@ declare class HSCarousel extends HSBasePlugin implements ICaro private resetTimer; private detectDirection; recalculateWidth(): void; + private calculateTransform; goToPrev(): void; goToNext(): void; goTo(i: number): void; diff --git a/dist/carousel.js b/dist/carousel.js index 0f6ee78..5c7bb48 100644 --- a/dist/carousel.js +++ b/dist/carousel.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e,s){this.el=t,this.options=e,this.events=s,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var s;t.push({id:(null===(s=null==e?void 0:e.el)||void 0===s?void 0:s.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=s},629:function(t,e,s){ +Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e,s){this.el=t,this.options=e,this.events=s,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var s;t.push({id:(null===(s=null==e?void 0:e.el)||void 0===s?void 0:s.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=s},268:function(t,e,s){ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function s(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(s.prototype=e.prototype,new s)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,s=1,i=arguments.length;s *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return n(e,t),e.prototype.init=function(){var t,e,s=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){s.goToPrev(),s.isAutoPlay&&(s.resetTimer(),s.setTimer())})),this.next&&this.next.addEventListener("click",(function(){s.goToNext(),s.isAutoPlay&&(s.resetTimer(),s.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){s.goTo(e),s.isAutoPlay&&(s.resetTimer(),s.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof s.afterLoadingClassesAdd?s.inner.classList.add(s.afterLoadingClassesAdd):(t=s.inner.classList).add.apply(t,s.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){s.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){s.touchX.end=t.changedTouches[0].screenX,s.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,s){s===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,s){s===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,s=t.end;se&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):this.currentIndex *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return n(e,t),e.prototype.init=function(){var t,e,s=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){s.goToPrev(),s.isAutoPlay&&(s.resetTimer(),s.setTimer())})),this.next&&this.next.addEventListener("click",(function(){s.goToNext(),s.isAutoPlay&&(s.resetTimer(),s.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){s.goTo(e),s.isAutoPlay&&(s.resetTimer(),s.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof s.afterLoadingClassesAdd?s.inner.classList.add(s.afterLoadingClassesAdd):(t=s.inner.classList).add.apply(t,s.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){s.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){s.touchX.end=t.changedTouches[0].screenX,s.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform=this.calculateTransform(),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,s){s===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,s){s===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,s=t.end;se&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.calculateTransform=function(){var t=this.currentIndex*this.sliderWidth;return this.isRTL?"translate(".concat(t,"px, 0px)"):"translate(-".concat(t,"px, 0px)")},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):this.currentIndex { el: E; options?: O; diff --git a/dist/collapse.js b/dist/collapse.js index 5c64b10..1d3ac44 100644 --- a/dist/collapse.js +++ b/dist/collapse.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},652:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},485:function(t,e,n){ /* * HSCollapse - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(969),l=function(t){function e(e,n,o){var i=t.call(this,e,n,o)||this;return i.contentId=i.el.dataset.hsCollapse,i.content=document.querySelector(i.contentId),i.animationInProcess=!1,i.content&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsCollapseCollection,this),this.el.addEventListener("click",(function(){t.content.classList.contains("open")?t.hide():t.show()}))},e.prototype.hideAllMegaMenuItems=function(){this.content.querySelectorAll(".hs-mega-menu-content.block").forEach((function(t){t.classList.remove("block"),t.classList.add("hidden")}))},e.prototype.show=function(){var t=this;if(this.animationInProcess||this.el.classList.contains("open"))return!1;this.animationInProcess=!0,this.el.classList.add("open"),this.content.classList.add("open"),this.content.classList.remove("hidden"),this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px"),t.fireEvent("beforeOpen",t.el),(0,r.dispatch)("beforeOpen.hs.collapse",t.el,t.el)})),(0,r.afterTransition)(this.content,(function(){t.content.style.height="",t.fireEvent("open",t.el),(0,r.dispatch)("open.hs.collapse",t.el,t.el),t.animationInProcess=!1}))},e.prototype.hide=function(){var t=this;if(this.animationInProcess||!this.el.classList.contains("open"))return!1;this.animationInProcess=!0,this.el.classList.remove("open"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),this.content.classList.remove("open"),(0,r.afterTransition)(this.content,(function(){t.content.classList.add("hidden"),t.content.style.height="",t.fireEvent("hide",t.el),(0,r.dispatch)("hide.hs.collapse",t.el,t.el),t.animationInProcess=!1})),this.content.querySelectorAll(".hs-mega-menu-content.block").length&&this.hideAllMegaMenuItems()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsCollapseCollection||(window.$hsCollapseCollection=[]),document.querySelectorAll(".hs-collapse-toggle:not(.--prevent-on-load-init)").forEach((function(t){window.$hsCollapseCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.show=function(t){var e=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.content.classList.contains("hidden")&&e.element.show()},e.hide=function(t){var e=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.content.classList.contains("hidden")&&e.element.hide()},e.on=function(t,e,n){var o=window.$hsCollapseCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSCollapse=l),e.default=l},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var s=e.getBoundingClientRect(),r=i?i.getBoundingClientRect():null,l=window.innerHeight,c=r?s.top-r.top:s.top,a=(i?r.bottom:l)-s.bottom,u=t.clientHeight+o;return"bottom"===n?a>=u:"top"===n?c>=u:c>=u||a>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],s=0;sthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,n),s.exports}(652);return n})())); \ No newline at end of file +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(292),l=function(t){function e(e,n,o){var i=t.call(this,e,n,o)||this;return i.contentId=i.el.dataset.hsCollapse,i.content=document.querySelector(i.contentId),i.animationInProcess=!1,i.content&&i.init(),i}return i(e,t),e.prototype.init=function(){var t,e=this;this.createCollection(window.$hsCollapseCollection,this),(null===(t=null==this?void 0:this.el)||void 0===t?void 0:t.ariaExpanded)&&(this.el.classList.contains("open")?this.el.ariaExpanded="true":this.el.ariaExpanded="false"),this.el.addEventListener("click",(function(){e.content.classList.contains("open")?e.hide():e.show()}))},e.prototype.hideAllMegaMenuItems=function(){this.content.querySelectorAll(".hs-mega-menu-content.block").forEach((function(t){t.classList.remove("block"),t.classList.add("hidden")}))},e.prototype.show=function(){var t,e=this;if(this.animationInProcess||this.el.classList.contains("open"))return!1;this.animationInProcess=!0,this.el.classList.add("open"),(null===(t=null==this?void 0:this.el)||void 0===t?void 0:t.ariaExpanded)&&(this.el.ariaExpanded="true"),this.content.classList.add("open"),this.content.classList.remove("hidden"),this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px"),e.fireEvent("beforeOpen",e.el),(0,r.dispatch)("beforeOpen.hs.collapse",e.el,e.el)})),(0,r.afterTransition)(this.content,(function(){e.content.style.height="",e.fireEvent("open",e.el),(0,r.dispatch)("open.hs.collapse",e.el,e.el),e.animationInProcess=!1}))},e.prototype.hide=function(){var t,e=this;if(this.animationInProcess||!this.el.classList.contains("open"))return!1;this.animationInProcess=!0,this.el.classList.remove("open"),(null===(t=null==this?void 0:this.el)||void 0===t?void 0:t.ariaExpanded)&&(this.el.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),this.content.classList.remove("open"),(0,r.afterTransition)(this.content,(function(){e.content.classList.add("hidden"),e.content.style.height="",e.fireEvent("hide",e.el),(0,r.dispatch)("hide.hs.collapse",e.el,e.el),e.animationInProcess=!1})),this.content.querySelectorAll(".hs-mega-menu-content.block").length&&this.hideAllMegaMenuItems()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsCollapseCollection||(window.$hsCollapseCollection=[]),document.querySelectorAll(".hs-collapse-toggle:not(.--prevent-on-load-init)").forEach((function(t){window.$hsCollapseCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.show=function(t){var e=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.content.classList.contains("hidden")&&e.element.show()},e.hide=function(t){var e=window.$hsCollapseCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.content.classList.contains("hidden")&&e.element.hide()},e.on=function(t,e,n){var o=window.$hsCollapseCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSCollapse=l),e.default=l},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var s=e.getBoundingClientRect(),r=i?i.getBoundingClientRect():null,l=window.innerHeight,a=r?s.top-r.top:s.top,c=(i?r.bottom:l)-s.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],s=0;sthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,n),s.exports}(485);return n})())); \ No newline at end of file diff --git a/dist/combobox.d.ts b/dist/combobox.d.ts index 48b4d9a..c10613f 100644 --- a/dist/combobox.d.ts +++ b/dist/combobox.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/combobox.js b/dist/combobox.js index 8d2ba97..acf6854 100644 --- a/dist/combobox.js +++ b/dist/combobox.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(self,(()=>(()=>{"use strict";var t={190:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(self,(()=>(()=>{"use strict";var t={223:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e,o){this.el=t,this.options=e,this.events=o,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var o;t.push({id:(null===(o=null==e?void 0:e.el)||void 0===o?void 0:o.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=o},23:function(t,e,o){ +Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e,o){this.el=t,this.options=e,this.events=o,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var o;t.push({id:(null===(o=null==e?void 0:e.el)||void 0===o?void 0:o.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=o},809:function(t,e,o){ /* * HSComboBox - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,i=arguments.length;o0&&n[n.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(m=null==k?void 0:k.outputEmptyTemplate)&&void 0!==m?m:'
Nothing found...
',_.outputLoaderTemplate=null!==(f=null==k?void 0:k.outputLoaderTemplate)&&void 0!==f?f:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(b=null==k?void 0:k.groupingType)&&void 0!==b?b:null,_.groupingTitleTemplate=null!==(v=null==k?void 0:k.groupingTitleTemplate)&&void 0!==v?v:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(y=null==k?void 0:k.tabsWrapperTemplate)&&void 0!==y?y:'
',_.preventSelection=null!==(g=null==k?void 0:k.preventSelection)&&void 0!==g&&g,_.preventAutoPosition=null!==(x=null==k?void 0:k.preventAutoPosition)&&void 0!==x&&x,_.isOpenOnFocus=null!==(E=null==k?void 0:k.isOpenOnFocus)&&void 0!==E&&E,_.input=null!==(T=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==T?T:null,_.output=null!==(w=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==w?w:null,_.itemsWrapper=null!==(S=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==S?S:null,_.items=null!==(A=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==A?A:[],_.tabs=[],_.toggle=null!==(C=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==C?C:null,_.toggleClose=null!==(L=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,_.toggleOpen=null!==(I=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==I?I:null,_.outputPlaceholder=null,_.selected=_.value=null!==(O=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==O?O:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return n(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.isOpened=!0,this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t=""),this.setResults(t),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,c.debounce)((function(e){t.setResultAndRender(e.target.value),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){return Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){return e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var o=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return o.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return u(u([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,c.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,o,i,n,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),o=this.apiUrl,this.apiQuery&&this.apiSearchQuery?o+="?".concat(e,"&").concat(t):this.apiQuery?o+="?".concat(t):this.apiSearchQuery&&(o+="?".concat(e)),[4,fetch(o,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return i=s.sent(),this.apiDataPart&&(i=i[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(i),this.groupTabsRender(),this.jsonItemsRender(i)):"default"===this.groupingType?(this.setApiGroups(i),this.groups.forEach((function(t){var e=(0,c.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var o=i.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(o)}))):this.jsonItemsRender(i),this.setResults(this.input.value),[3,5];case 4:return n=s.sent(),console.error(n),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,o){if(e.isItemExists(t))return!1;var i=(0,c.htmlToElement)(e.outputItemTemplate);i.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var o,i;e.textContent=null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"",e.setAttribute("data-hs-combo-box-search-text",null!==(i=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==i?i:"")})),i.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(o){e.setAttribute(o.attr,t[o.valueFrom])}))})),i.setAttribute("tabIndex","".concat(o)),"tabs"!==e.groupingType&&"default"!==e.groupingType||i.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=u(u([],e.items,!0),[i],!1),e.preventSelection||i.addEventListener("click",(function(){e.close(i.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(i))})),e.appendItemsToWrapper(i)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===o.name}))||t.push(o)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,o=[];t.forEach((function(t){var i=t[e.apiGroupField];o.some((function(t){return t.name===i}))||o.push({name:i,title:i})})),this.groups=o},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var o=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),i=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return oi?1:0}))},e.prototype.itemRender=function(t){var e=this,o=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(o),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,c.htmlToElement)(this.tabsWrapperTemplate),o=(0,c.htmlToElement)('
');e.append(o),this.output.insertBefore(e,this.output.firstChild);var i=(0,c.htmlToElement)(this.groupingTitleTemplate);i.setAttribute("data-hs-combo-box-group-title","all"),i.classList.add("--exclude-accessibility","active"),i.innerText="All",this.tabs=u(u([],this.tabs,!0),[i],!1),o.append(i),i.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var i=(0,c.htmlToElement)(t.groupingTitleTemplate);i.setAttribute("data-hs-combo-box-group-title",e.name),i.classList.add("--exclude-accessibility"),i.innerText=e.title,t.tabs=u(u([],t.tabs,!0),[i],!1),o.append(i),i.addEventListener("click",(function(){t.selectedGroup=e.name;var o=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),o.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var o=(0,c.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(o):t.output.append(o);var i=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(i)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t=this;this.toggle.addEventListener("click",(function(){t.isOpened?t.close():t.open(t.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(o){e.isTextExists(o,t)?o.classList.add("selected"):o.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,c.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var o=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===o&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,c.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),!1):(this.animationInProcess=!0,this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,c.afterTransition)(this.output,(function(){e.output.style.display="none",e.setValueAndClear(t),e.animationInProcess=!1})),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,c.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var o=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return o?e?o:o.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var o;return(null===(o=null==e?void 0:e.element)||void 0===o?void 0:o.el)===t}))){var o=t.getAttribute("data-hs-combo-box"),i=o?JSON.parse(o):{};new e(t,i)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var o=t.target;e.closeCurrentlyOpened(o)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,o){e.focus(),o.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.isOpened}))&&d.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var o;void 0===t&&(t=!0);var i=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(i){var n=null!==(o=i.element.itemsWrapper)&&void 0!==o?o:i.element.output;if(!n)return!1;var r,s=e.getPreparedItems(t,n),l=n.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var u=s.findIndex((function(t){return t===l}));u+12&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,o,i,n){void 0===o&&(o="auto"),void 0===i&&(i=10),void 0===n&&(n=null);var r=e.getBoundingClientRect(),s=n?n.getBoundingClientRect():null,l=window.innerHeight,u=s?r.top-s.top:r.top,a=(n?s.bottom:l)-r.bottom,c=t.clientHeight+i;return"bottom"===o?a>=c:"top"===o?u>=c:u>=c||a>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var n=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var o=function o(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,o),r.exports}(23);return o})())); \ No newline at end of file +var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,i=arguments.length;o0&&n[n.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',P.outputEmptyTemplate=null!==(m=null==k?void 0:k.outputEmptyTemplate)&&void 0!==m?m:'
Nothing found...
',P.outputLoaderTemplate=null!==(f=null==k?void 0:k.outputLoaderTemplate)&&void 0!==f?f:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',P.groupingType=null!==(b=null==k?void 0:k.groupingType)&&void 0!==b?b:null,P.groupingTitleTemplate=null!==(v=null==k?void 0:k.groupingTitleTemplate)&&void 0!==v?v:"default"===P.groupingType?'
':'',P.tabsWrapperTemplate=null!==(g=null==k?void 0:k.tabsWrapperTemplate)&&void 0!==g?g:'
',P.preventSelection=null!==(y=null==k?void 0:k.preventSelection)&&void 0!==y&&y,P.preventAutoPosition=null!==(x=null==k?void 0:k.preventAutoPosition)&&void 0!==x&&x,P.isOpenOnFocus=null!==(E=null==k?void 0:k.isOpenOnFocus)&&void 0!==E&&E,P.input=null!==(T=P.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==T?T:null,P.output=null!==(S=P.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==S?S:null,P.itemsWrapper=null!==(w=P.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==w?w:null,P.items=null!==(A=Array.from(P.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==A?A:[],P.tabs=[],P.toggle=null!==(I=P.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==I?I:null,P.toggleClose=null!==(L=P.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,P.toggleOpen=null!==(C=P.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==C?C:null,P.outputPlaceholder=null,P.selected=P.value=null!==(O=P.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==O?O:"",P.isOpened=!1,P.isCurrent=!1,P.animationInProcess=!1,P.selectedGroup="all",P.init(),P}return n(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t="");var e=this.preventVisibility?this.input.value:t;this.setResults(e),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,p.debounce)((function(e){t.setResultAndRender(e.target.value),""!==t.input.value?t.el.classList.add("has-value"):t.el.classList.remove("has-value"),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.output.role="listbox",this.output.tabIndex=-1,this.output.ariaOrientation="vertical",this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){var o,i,n,r=null!==(o=e.getAttribute("data-hs-combo-box-output-item-group-field"))&&void 0!==o?o:null,s=null!==(i=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")))&&void 0!==i?i:null,l=null;return r&&(null===(n=null==s?void 0:s.group)||void 0===n?void 0:n.name)&&(l=t[r]),Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){var o;return(null===(o=null==s?void 0:s.group)||void 0===o?void 0:o.name)&&l?l===s.group.name&&e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]:e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var o=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return o.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,p.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,o,i,n,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),o=this.apiUrl,this.apiQuery&&this.apiSearchQuery?o+="?".concat(e,"&").concat(t):this.apiQuery?o+="?".concat(t):this.apiSearchQuery&&(o+="?".concat(e)),[4,fetch(o,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return i=s.sent(),this.apiDataPart&&(i=i[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(i),this.groupTabsRender(),this.jsonItemsRender(i)):"default"===this.groupingType?(this.setApiGroups(i),this.groups.forEach((function(t){var e=(0,p.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var o=i.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(o)}))):this.jsonItemsRender(i),this.setResults(this.input.value),[3,5];case 4:return n=s.sent(),console.error(n),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,o){var i=(0,p.htmlToElement)(e.outputItemTemplate);i.querySelectorAll("[data-hs-combo-box-output-item-field]").forEach((function(e){var o=t[e.getAttribute("data-hs-combo-box-output-item-field")],i=e.hasAttribute("data-hs-combo-box-output-item-hide-if-empty");e.textContent=null!=o?o:"",!o&&i&&(e.style.display="none")})),i.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var o;e.setAttribute("data-hs-combo-box-search-text",null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"")})),i.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(o){e.setAttribute(o.attr,t[o.valueFrom])}))})),i.setAttribute("tabIndex","".concat(o)),"tabs"!==e.groupingType&&"default"!==e.groupingType||i.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[i],!1),e.preventSelection||i.addEventListener("click",(function(){e.close(i.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(i))})),e.appendItemsToWrapper(i)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===o.name}))||t.push(o)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,o=[];t.forEach((function(t){var i=t[e.apiGroupField];o.some((function(t){return t.name===i}))||o.push({name:i,title:i})})),this.groups=o},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var o=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),i=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return oi?1:0}))},e.prototype.itemRender=function(t){var e=this,o=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(o),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,p.htmlToElement)(this.tabsWrapperTemplate),o=(0,p.htmlToElement)('
');e.append(o),this.output.insertBefore(e,this.output.firstChild);var i=(0,p.htmlToElement)(this.groupingTitleTemplate);i.setAttribute("data-hs-combo-box-group-title","all"),i.classList.add("--exclude-accessibility","active"),i.innerText="All",this.tabs=a(a([],this.tabs,!0),[i],!1),o.append(i),i.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var i=(0,p.htmlToElement)(t.groupingTitleTemplate);i.setAttribute("data-hs-combo-box-group-title",e.name),i.classList.add("--exclude-accessibility"),i.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[i],!1),o.append(i),i.addEventListener("click",(function(){t.selectedGroup=e.name;var o=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),o.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var o=(0,p.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(o):t.output.append(o);var i=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(i)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t,e,o,i,n=this;this.isOpened?((null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="true")):((null===(o=null==this?void 0:this.toggle)||void 0===o?void 0:o.ariaExpanded)&&(this.toggle.ariaExpanded="false"),(null===(i=null==this?void 0:this.input)||void 0===i?void 0:i.ariaExpanded)&&(this.input.ariaExpanded="false")),this.toggle.addEventListener("click",(function(){n.isOpened?n.close():n.open(n.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(o){e.isTextExists(o,t)?o.classList.add("selected"):o.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,p.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var o=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===o&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,p.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){var t,o;(null===(t=null==e?void 0:e.input)||void 0===t?void 0:t.ariaExpanded)&&(e.input.ariaExpanded="true"),(null===(o=null==e?void 0:e.toggle)||void 0===o?void 0:o.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e,o,i=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),!1):(this.animationInProcess=!0,(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="false"),(null===(o=null==this?void 0:this.toggle)||void 0===o?void 0:o.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,p.afterTransition)(this.output,(function(){i.output.style.display="none",i.setValueAndClear(t),i.animationInProcess=!1})),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,p.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var o=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return o?e?o:o.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var o;return(null===(o=null==e?void 0:e.element)||void 0===o?void 0:o.el)===t}))){var o=t.getAttribute("data-hs-combo-box"),i=o?JSON.parse(o):{};new e(t,i)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var o=t.target;e.closeCurrentlyOpened(o)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,o){e.focus(),o.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}))&&d.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var o;void 0===t&&(t=!0);var i=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(i){var n=null!==(o=i.element.itemsWrapper)&&void 0!==o?o:i.element.output;if(!n)return!1;var r,s=e.getPreparedItems(t,n),l=n.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+1e&&(e=o)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,o){return void 0===o&&(o=""),(window.getComputedStyle(t).getPropertyValue(e)||o).replace(" ","")};e.getClassPropertyAlt=function(t,e,o){void 0===o&&(o="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:o};var i=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=i;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,o,i,n){void 0===o&&(o="auto"),void 0===i&&(i=10),void 0===n&&(n=null);var r=e.getBoundingClientRect(),s=n?n.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,u=(n?s.bottom:l)-r.bottom,p=t.clientHeight+i;return"bottom"===o?u>=p:"top"===o?a>=p:a>=p||u>=p};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var n=function(t){return!!t&&("none"===window.getComputedStyle(t).display||n(t.parentElement))};e.isParentOrElementHidden=n;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var n=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var o=function o(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,o),r.exports}(809);return o})())); \ No newline at end of file diff --git a/dist/copy-markup.d.ts b/dist/copy-markup.d.ts index d938e3a..7e5f5fd 100644 --- a/dist/copy-markup.d.ts +++ b/dist/copy-markup.d.ts @@ -1,5 +1,3 @@ - - export interface ICopyMarkupOptions { targetSelector: string; wrapperSelector: string; diff --git a/dist/copy-markup.js b/dist/copy-markup.js index 230f98d..681e6d2 100644 --- a/dist/copy-markup.js +++ b/dist/copy-markup.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},413:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},406:function(t,e,n){ /* * HSCopyMarkup - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,a.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,a.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=l),e.default=l},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,a=window.innerHeight,l=s?r.top-s.top:r.top,u=(i?s.bottom:a)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?l>=c:l>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(413);return n})())); \ No newline at end of file +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,a.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,a.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=l),e.default=l},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,a=window.innerHeight,l=s?r.top-s.top:r.top,u=(i?s.bottom:a)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?l>=c:l>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(406);return n})())); \ No newline at end of file diff --git a/dist/datatable.d.ts b/dist/datatable.d.ts new file mode 100644 index 0000000..4c4a94c --- /dev/null +++ b/dist/datatable.d.ts @@ -0,0 +1,89 @@ +import { Config } from 'datatables.net-dt'; + +export interface IBasePlugin { + el: E; + options?: O; + events?: {}; +} +declare class HSBasePlugin implements IBasePlugin { + el: E; + options: O; + events?: any; + constructor(el: E, options: O, events?: any); + createCollection(collection: any[], element: any): void; + fireEvent(evt: string, payload?: any): any; + on(evt: string, cb: Function): void; +} +export interface ICollectionItem { + id: string | number; + element: T; +} +export interface IDataTablePagingOptions { + pageBtnClasses?: string; +} +export interface IDataTableRowSelectingOptions { + selectAllSelector?: string; + individualSelector?: string; +} +export interface IDataTableOptions extends Config { + rowSelectingOptions?: IDataTableRowSelectingOptions; + pagingOptions?: IDataTablePagingOptions; +} +export interface IDataTable { + options?: IDataTableOptions; +} +declare class HSDataTable extends HSBasePlugin implements IDataTable { + private concatOptions; + private dataTable; + private readonly table; + private readonly search; + private readonly pageEntities; + private readonly paging; + private readonly pagingPrev; + private readonly pagingNext; + private readonly pagingPages; + private readonly info; + private readonly infoFrom; + private readonly infoTo; + private readonly infoLength; + private rowSelectingAll; + private rowSelectingIndividual; + private maxPagesToShow; + private isRowSelecting; + private readonly pageBtnClasses; + constructor(el: HTMLElement, options?: IDataTableOptions, events?: {}); + private init; + private initTable; + private initSearch; + private onSearchInput; + private initPageEntities; + private onEntitiesChange; + private initInfo; + private initInfoFrom; + private initInfoTo; + private initInfoLength; + private updateInfo; + private initPaging; + private hidePagingIfSinglePage; + private initPagingPrev; + private onPrevClick; + private disablePagingArrow; + private initPagingNext; + private onNextClick; + private buildPagingPages; + private updatePaging; + private buildPagingPage; + private onPageClick; + private initRowSelecting; + private triggerChangeEventToRow; + private onSelectAllChange; + private updateSelectAllCheckbox; + static getInstance(target: HTMLElement | string, isInstance?: boolean): HTMLElement | ICollectionItem; + static autoInit(): void; +} + +export { + HSDataTable as default, +}; + +export {}; diff --git a/dist/datatable.js b/dist/datatable.js new file mode 100644 index 0000000..1b44fa2 --- /dev/null +++ b/dist/datatable.js @@ -0,0 +1,17 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ +/* + * HSBasePlugin + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},814:function(t,e,n){ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var i,o=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n1&&(this.buildPagingPage(1),r>2&&this.pagingPages.appendChild((0,s.htmlToElement)('...')));for(var d=r;d<=c;d++)this.buildPagingPage(d);c...')),this.buildPagingPage(a)),this.disablePagingArrow(this.pagingPrev,0===e),this.disablePagingArrow(this.pagingNext,e===n-1),this.hidePagingIfSinglePage()},e.prototype.buildPagingPage=function(t){var e=this,n=this.dataTable.page.info().page,i=(0,s.htmlToElement)('');i.innerText="".concat(t),i.setAttribute("data-page","".concat(t)),this.pageBtnClasses&&(0,s.classToClassList)(this.pageBtnClasses,i),n===t-1&&i.classList.add("active"),i.addEventListener("click",(function(){return e.onPageClick(t)})),this.pagingPages.append(i)},e.prototype.onPageClick=function(t){this.dataTable.page(t-1).draw("page")},e.prototype.initRowSelecting=function(){var t=this;this.rowSelectingAll.addEventListener("change",(function(){return t.onSelectAllChange()}))},e.prototype.triggerChangeEventToRow=function(){var t=this;this.table.querySelectorAll("tbody ".concat(this.rowSelectingIndividual)).forEach((function(e){e.addEventListener("change",(function(){t.updateSelectAllCheckbox()}))}))},e.prototype.onSelectAllChange=function(){var t=this,e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var i=n.querySelector(t.rowSelectingIndividual);i&&(i.checked=e)})),this.updateSelectAllCheckbox()},e.prototype.updateSelectAllCheckbox=function(){var t=this;if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;var e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var i=n.querySelector(t.rowSelectingIndividual);if(i&&!i.checked)return e=!1,!1})),this.rowSelectingAll.checked=e},e.getInstance=function(t,e){var n=window.$hsDataTableCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDataTableCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&c.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=c),e.default=c},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=i(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:n};var i=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=i;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,i,o){void 0===n&&(n="auto"),void 0===i&&(i=10),void 0===o&&(o=null);var a=e.getBoundingClientRect(),l=o?o.getBoundingClientRect():null,r=window.innerHeight,s=l?a.top-l.top:a.top,c=(o?l.bottom:r)-a.bottom,d=t.clientHeight+i;return"bottom"===n?c>=d:"top"===n?s>=d:s>=d||c>=d};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var o=[],a=0;athis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(i){var o=e[i];if(void 0!==o)return o.exports;var a=e[i]={exports:{}};return t[i].call(a.exports,a,a.exports,n),a.exports}(814);return n})())); \ No newline at end of file diff --git a/dist/dropdown.d.ts b/dist/dropdown.d.ts index 15031f6..3f730d4 100644 --- a/dist/dropdown.d.ts +++ b/dist/dropdown.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; @@ -33,11 +31,13 @@ declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementPopper> implements private readonly closers; menu: HTMLElement | null; private eventMode; - private readonly closeMode; + private closeMode; private animationInProcess; constructor(el: IHTMLElementPopper, options?: {}, events?: {}); private init; resizeHandler(): void; + private buildToggle; + private buildMenu; private buildClosers; private onClickHandler; private onMouseEnterHandler; diff --git a/dist/dropdown.js b/dist/dropdown.js index 2c500e9..363c47a 100644 --- a/dist/dropdown.js +++ b/dist/dropdown.js @@ -1,17 +1,17 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={492:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>x,afterRead:()=>g,afterWrite:()=>C,applyStyles:()=>_,arrow:()=>J,auto:()=>a,basePlacements:()=>l,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>O,bottom:()=>r,clippingParents:()=>u,computeStyles:()=>ne,createPopper:()=>_e,createPopperBase:()=>De,createPopperLite:()=>je,detectOverflow:()=>we,end:()=>f,eventListeners:()=>re,flip:()=>ge,hide:()=>xe,left:()=>s,main:()=>E,modifierPhases:()=>L,offset:()=>Oe,placements:()=>v,popper:()=>d,popperGenerator:()=>Te,popperOffsets:()=>Se,preventOverflow:()=>Ce,read:()=>w,reference:()=>h,right:()=>i,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>S});var o="top",r="bottom",i="right",s="left",a="auto",l=[o,r,i,s],c="start",f="end",u="clippingParents",p="viewport",d="popper",h="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+f])}),[]),v=[].concat(l,[a]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+f])}),[]),y="beforeRead",w="read",g="afterRead",b="beforeMain",E="main",x="afterMain",O="beforeWrite",S="write",C="afterWrite",L=[y,w,g,b,E,x,O,S,C];function A(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I(e){return e instanceof P(e).Element||e instanceof Element}function T(e){return e instanceof P(e).HTMLElement||e instanceof HTMLElement}function D(e){return"undefined"!=typeof ShadowRoot&&(e instanceof P(e).ShadowRoot||e instanceof ShadowRoot)}const _={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];T(r)&&A(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});T(o)&&A(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function j(e){return e.split("-")[0]}var M=Math.max,H=Math.min,B=Math.round;function k(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function q(){return!/^((?!chrome|android).)*safari/i.test(k())}function R(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&T(e)&&(r=e.offsetWidth>0&&B(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&B(o.height)/e.offsetHeight||1);var s=(I(e)?P(e):window).visualViewport,a=!q()&&n,l=(o.left+(a&&s?s.offsetLeft:0))/r,c=(o.top+(a&&s?s.offsetTop:0))/i,f=o.width/r,u=o.height/i;return{width:f,height:u,top:c,right:l+f,bottom:c+u,left:l,x:l,y:c}}function W(e){var t=R(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Y(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&D(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function $(e){return P(e).getComputedStyle(e)}function V(e){return["table","td","th"].indexOf(A(e))>=0}function N(e){return((I(e)?e.ownerDocument:e.document)||window.document).documentElement}function K(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(D(e)?e.host:null)||N(e)}function F(e){return T(e)&&"fixed"!==$(e).position?e.offsetParent:null}function U(e){for(var t=P(e),n=F(e);n&&V(n)&&"static"===$(n).position;)n=F(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===$(n).position)?t:n||function(e){var t=/firefox/i.test(k());if(/Trident/i.test(k())&&T(e)&&"fixed"===$(e).position)return null;var n=K(e);for(D(n)&&(n=n.host);T(n)&&["html","body"].indexOf(A(n))<0;){var o=$(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return M(e,H(t,n))}function G(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Z(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,c=e.options,f=n.elements.arrow,u=n.modifiersData.popperOffsets,p=j(n.placement),d=z(p),h=[s,i].indexOf(p)>=0?"height":"width";if(f&&u){var m=function(e,t){return G("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Z(e,l))}(c.padding,n),v=W(f),y="y"===d?o:s,w="y"===d?r:i,g=n.rects.reference[h]+n.rects.reference[d]-u[d]-n.rects.popper[h],b=u[d]-n.rects.reference[d],E=U(f),x=E?"y"===d?E.clientHeight||0:E.clientWidth||0:0,O=g/2-b/2,S=m[y],C=x-v[h]-m[w],L=x/2-v[h]/2+O,A=X(S,L,C),P=d;n.modifiersData[a]=((t={})[P]=A,t.centerOffset=A-L,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&Y(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,a=e.popperRect,l=e.placement,c=e.variation,u=e.offsets,p=e.position,d=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,y=u.x,w=void 0===y?0:y,g=u.y,b=void 0===g?0:g,E="function"==typeof m?m({x:w,y:b}):{x:w,y:b};w=E.x,b=E.y;var x=u.hasOwnProperty("x"),O=u.hasOwnProperty("y"),S=s,C=o,L=window;if(h){var A=U(n),I="clientHeight",T="clientWidth";if(A===P(n)&&"static"!==$(A=N(n)).position&&"absolute"===p&&(I="scrollHeight",T="scrollWidth"),l===o||(l===s||l===i)&&c===f)C=r,b-=(v&&A===L&&L.visualViewport?L.visualViewport.height:A[I])-a.height,b*=d?1:-1;if(l===s||(l===o||l===r)&&c===f)S=i,w-=(v&&A===L&&L.visualViewport?L.visualViewport.width:A[T])-a.width,w*=d?1:-1}var D,_=Object.assign({position:p},h&&ee),j=!0===m?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:B(n*r)/r||0,y:B(o*r)/r||0}}({x:w,y:b},P(n)):{x:w,y:b};return w=j.x,b=j.y,d?Object.assign({},_,((D={})[C]=O?"0":"",D[S]=x?"0":"",D.transform=(L.devicePixelRatio||1)<=1?"translate("+w+"px, "+b+"px)":"translate3d("+w+"px, "+b+"px, 0)",D)):Object.assign({},_,((t={})[C]=O?b+"px":"",t[S]=x?w+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,c={placement:j(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var oe={passive:!0};const re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,s=o.resize,a=void 0===s||s,l=P(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,oe)})),a&&l.addEventListener("resize",n.update,oe),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,oe)})),a&&l.removeEventListener("resize",n.update,oe)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var ae={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function ce(e){var t=P(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fe(e){return R(N(e)).left+ce(e).scrollLeft}function ue(e){var t=$(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function pe(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:T(e)&&ue(e)?e:pe(K(e))}function de(e,t){var n;void 0===t&&(t=[]);var o=pe(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=P(o),s=r?[i].concat(i.visualViewport||[],ue(o)?o:[]):o,a=t.concat(s);return r?a:a.concat(de(K(s)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===p?he(function(e,t){var n=P(e),o=N(e),r=n.visualViewport,i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;var c=q();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a+fe(e),y:l}}(e,n)):I(t)?function(e,t){var n=R(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=N(e),o=ce(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=M(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=M(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-o.scrollLeft+fe(e),l=-o.scrollTop;return"rtl"===$(r||n).direction&&(a+=M(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(N(e)))}function ve(e,t,n,o){var r="clippingParents"===t?function(e){var t=de(K(e)),n=["absolute","fixed"].indexOf($(e).position)>=0&&T(e)?U(e):e;return I(n)?t.filter((function(e){return I(e)&&Y(e,n)&&"body"!==A(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),s=i[0],a=i.reduce((function(t,n){var r=me(e,n,o);return t.top=M(r.top,t.top),t.right=H(r.right,t.right),t.bottom=H(r.bottom,t.bottom),t.left=M(r.left,t.left),t}),me(e,s,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,a=e.element,l=e.placement,u=l?j(l):null,p=l?Q(l):null,d=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2;switch(u){case o:t={x:d,y:n.y-a.height};break;case r:t={x:d,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case s:t={x:n.x-a.width,y:h};break;default:t={x:n.x,y:n.y}}var m=u?z(u):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:t[m]=t[m]-(n[v]/2-a[v]/2);break;case f:t[m]=t[m]+(n[v]/2-a[v]/2)}}return t}function we(e,t){void 0===t&&(t={});var n=t,s=n.placement,a=void 0===s?e.placement:s,c=n.strategy,f=void 0===c?e.strategy:c,m=n.boundary,v=void 0===m?u:m,y=n.rootBoundary,w=void 0===y?p:y,g=n.elementContext,b=void 0===g?d:g,E=n.altBoundary,x=void 0!==E&&E,O=n.padding,S=void 0===O?0:O,C=G("number"!=typeof S?S:Z(S,l)),L=b===d?h:d,A=e.rects.popper,P=e.elements[x?L:b],T=ve(I(P)?P:P.contextElement||N(e.elements.popper),v,w,f),D=R(e.elements.reference),_=ye({reference:D,element:A,strategy:"absolute",placement:a}),j=he(Object.assign({},A,_)),M=b===d?j:D,H={top:T.top-M.top+C.top,bottom:M.bottom-T.bottom+C.bottom,left:T.left-M.left+C.left,right:M.right-T.right+C.right},B=e.modifiersData.offset;if(b===d&&B){var k=B[a];Object.keys(H).forEach((function(e){var t=[i,r].indexOf(e)>=0?1:-1,n=[o,r].indexOf(e)>=0?"y":"x";H[e]+=k[n]*t}))}return H}const ge={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,f=e.name;if(!t.modifiersData[f]._skip){for(var u=n.mainAxis,p=void 0===u||u,d=n.altAxis,h=void 0===d||d,y=n.fallbackPlacements,w=n.padding,g=n.boundary,b=n.rootBoundary,E=n.altBoundary,x=n.flipVariations,O=void 0===x||x,S=n.allowedAutoPlacements,C=t.options.placement,L=j(C),A=y||(L===C||!O?[se(C)]:function(e){if(j(e)===a)return[];var t=se(e);return[le(e),t,le(t)]}(C)),P=[C].concat(A).reduce((function(e,n){return e.concat(j(n)===a?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,f=void 0===c?v:c,u=Q(o),p=u?a?m:m.filter((function(e){return Q(e)===u})):l,d=p.filter((function(e){return f.indexOf(e)>=0}));0===d.length&&(d=p);var h=d.reduce((function(t,n){return t[n]=we(e,{placement:n,boundary:r,rootBoundary:i,padding:s})[j(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:g,rootBoundary:b,padding:w,flipVariations:O,allowedAutoPlacements:S}):n)}),[]),I=t.rects.reference,T=t.rects.popper,D=new Map,_=!0,M=P[0],H=0;H=0,W=R?"width":"height",Y=we(t,{placement:B,boundary:g,rootBoundary:b,altBoundary:E,padding:w}),$=R?q?i:s:q?r:o;I[W]>T[W]&&($=se($));var V=se($),N=[];if(p&&N.push(Y[k]<=0),h&&N.push(Y[$]<=0,Y[V]<=0),N.every((function(e){return e}))){M=B,_=!1;break}D.set(B,N)}if(_)for(var K=function(e){var t=P.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},F=O?3:1;F>0;F--){if("break"===K(F))break}t.placement!==M&&(t.modifiersData[f]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ee(e){return[o,i,r,s].some((function(t){return e[t]>=0}))}const xe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,s=we(t,{elementContext:"reference"}),a=we(t,{altBoundary:!0}),l=be(s,o),c=be(a,r,i),f=Ee(l),u=Ee(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":u})}};const Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,l=void 0===a?[0,0]:a,c=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=j(e),a=[s,o].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=l[0],f=l[1];return c=c||0,f=(f||0)*a,[s,i].indexOf(r)>=0?{x:f,y:c}:{x:c,y:f}}(n,t.rects,l),e}),{}),f=c[t.placement],u=f.x,p=f.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=c}};const Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name,l=n.mainAxis,f=void 0===l||l,u=n.altAxis,p=void 0!==u&&u,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,w=void 0===y||y,g=n.tetherOffset,b=void 0===g?0:g,E=we(t,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),x=j(t.placement),O=Q(t.placement),S=!O,C=z(x),L="x"===C?"y":"x",A=t.modifiersData.popperOffsets,P=t.rects.reference,I=t.rects.popper,T="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,D="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(A){if(f){var k,q="y"===C?o:s,R="y"===C?r:i,Y="y"===C?"height":"width",$=A[C],V=$+E[q],N=$-E[R],K=w?-I[Y]/2:0,F=O===c?P[Y]:I[Y],G=O===c?-I[Y]:-P[Y],Z=t.elements.arrow,J=w&&Z?W(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[q],ne=ee[R],oe=X(0,P[Y],J[Y]),re=S?P[Y]/2-K-oe-te-D.mainAxis:F-oe-te-D.mainAxis,ie=S?-P[Y]/2+K+oe+ne+D.mainAxis:G+oe+ne+D.mainAxis,se=t.elements.arrow&&U(t.elements.arrow),ae=se?"y"===C?se.clientTop||0:se.clientLeft||0:0,le=null!=(k=null==_?void 0:_[C])?k:0,ce=$+ie-le,fe=X(w?H(V,$+re-le-ae):V,$,w?M(N,ce):N);A[C]=fe,B[C]=fe-$}if(p){var ue,pe="x"===C?o:s,de="x"===C?r:i,he=A[L],me="y"===L?"height":"width",ve=he+E[pe],ye=he-E[de],ge=-1!==[o,s].indexOf(x),be=null!=(ue=null==_?void 0:_[L])?ue:0,Ee=ge?ve:he-P[me]-I[me]-be+D.altAxis,xe=ge?he+P[me]+I[me]-be-D.altAxis:ye,Oe=w&&ge?function(e,t,n){var o=X(e,t,n);return o>n?n:o}(Ee,he,xe):X(w?Ee:ve,he,w?xe:ye);A[L]=Oe,B[L]=Oe-he}t.modifiersData[a]=B}},requiresIfExists:["offset"]};function Le(e,t,n){void 0===n&&(n=!1);var o,r,i=T(t),s=T(t)&&function(e){var t=e.getBoundingClientRect(),n=B(t.width)/e.offsetWidth||1,o=B(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=N(t),l=R(e,s,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&(("body"!==A(t)||ue(a))&&(c=(o=t)!==P(o)&&T(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:ce(o)),T(t)?((f=R(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=fe(a))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function Ae(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ie(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(e,t)=>{ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={170:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>E,afterRead:()=>w,afterWrite:()=>C,applyStyles:()=>_,arrow:()=>J,auto:()=>a,basePlacements:()=>l,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>O,bottom:()=>r,clippingParents:()=>f,computeStyles:()=>ne,createPopper:()=>_e,createPopperBase:()=>De,createPopperLite:()=>Me,detectOverflow:()=>ge,end:()=>u,eventListeners:()=>re,flip:()=>we,hide:()=>Ee,left:()=>s,main:()=>x,modifierPhases:()=>L,offset:()=>Oe,placements:()=>v,popper:()=>p,popperGenerator:()=>Te,popperOffsets:()=>Se,preventOverflow:()=>Ce,read:()=>g,reference:()=>h,right:()=>i,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>d,write:()=>S});var o="top",r="bottom",i="right",s="left",a="auto",l=[o,r,i,s],c="start",u="end",f="clippingParents",d="viewport",p="popper",h="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+u])}),[]),v=[].concat(l,[a]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+u])}),[]),y="beforeRead",g="read",w="afterRead",b="beforeMain",x="main",E="afterMain",O="beforeWrite",S="write",C="afterWrite",L=[y,g,w,b,x,E,O,S,C];function A(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I(e){return e instanceof P(e).Element||e instanceof Element}function T(e){return e instanceof P(e).HTMLElement||e instanceof HTMLElement}function D(e){return"undefined"!=typeof ShadowRoot&&(e instanceof P(e).ShadowRoot||e instanceof ShadowRoot)}const _={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];T(r)&&A(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});T(o)&&A(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var j=Math.max,H=Math.min,B=Math.round;function k(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function q(){return!/^((?!chrome|android).)*safari/i.test(k())}function R(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&T(e)&&(r=e.offsetWidth>0&&B(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&B(o.height)/e.offsetHeight||1);var s=(I(e)?P(e):window).visualViewport,a=!q()&&n,l=(o.left+(a&&s?s.offsetLeft:0))/r,c=(o.top+(a&&s?s.offsetTop:0))/i,u=o.width/r,f=o.height/i;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l,x:l,y:c}}function W(e){var t=R(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Y(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&D(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function V(e){return P(e).getComputedStyle(e)}function $(e){return["table","td","th"].indexOf(A(e))>=0}function N(e){return((I(e)?e.ownerDocument:e.document)||window.document).documentElement}function K(e){return"html"===A(e)?e:e.assignedSlot||e.parentNode||(D(e)?e.host:null)||N(e)}function F(e){return T(e)&&"fixed"!==V(e).position?e.offsetParent:null}function U(e){for(var t=P(e),n=F(e);n&&$(n)&&"static"===V(n).position;)n=F(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===V(n).position)?t:n||function(e){var t=/firefox/i.test(k());if(/Trident/i.test(k())&&T(e)&&"fixed"===V(e).position)return null;var n=K(e);for(D(n)&&(n=n.host);T(n)&&["html","body"].indexOf(A(n))<0;){var o=V(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return j(e,H(t,n))}function Z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,c=e.options,u=n.elements.arrow,f=n.modifiersData.popperOffsets,d=M(n.placement),p=z(d),h=[s,i].indexOf(d)>=0?"height":"width";if(u&&f){var m=function(e,t){return Z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,l))}(c.padding,n),v=W(u),y="y"===p?o:s,g="y"===p?r:i,w=n.rects.reference[h]+n.rects.reference[p]-f[p]-n.rects.popper[h],b=f[p]-n.rects.reference[p],x=U(u),E=x?"y"===p?x.clientHeight||0:x.clientWidth||0:0,O=w/2-b/2,S=m[y],C=E-v[h]-m[g],L=E/2-v[h]/2+O,A=X(S,L,C),P=p;n.modifiersData[a]=((t={})[P]=A,t.centerOffset=A-L,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&Y(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,a=e.popperRect,l=e.placement,c=e.variation,f=e.offsets,d=e.position,p=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,y=f.x,g=void 0===y?0:y,w=f.y,b=void 0===w?0:w,x="function"==typeof m?m({x:g,y:b}):{x:g,y:b};g=x.x,b=x.y;var E=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),S=s,C=o,L=window;if(h){var A=U(n),I="clientHeight",T="clientWidth";if(A===P(n)&&"static"!==V(A=N(n)).position&&"absolute"===d&&(I="scrollHeight",T="scrollWidth"),l===o||(l===s||l===i)&&c===u)C=r,b-=(v&&A===L&&L.visualViewport?L.visualViewport.height:A[I])-a.height,b*=p?1:-1;if(l===s||(l===o||l===r)&&c===u)S=i,g-=(v&&A===L&&L.visualViewport?L.visualViewport.width:A[T])-a.width,g*=p?1:-1}var D,_=Object.assign({position:d},h&&ee),M=!0===m?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:B(n*r)/r||0,y:B(o*r)/r||0}}({x:g,y:b},P(n)):{x:g,y:b};return g=M.x,b=M.y,p?Object.assign({},_,((D={})[C]=O?"0":"",D[S]=E?"0":"",D.transform=(L.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",D)):Object.assign({},_,((t={})[C]=O?b+"px":"",t[S]=E?g+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,c={placement:M(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var oe={passive:!0};const re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,s=o.resize,a=void 0===s||s,l=P(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,oe)})),a&&l.addEventListener("resize",n.update,oe),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,oe)})),a&&l.removeEventListener("resize",n.update,oe)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var ae={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function ce(e){var t=P(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ue(e){return R(N(e)).left+ce(e).scrollLeft}function fe(e){var t=V(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function de(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:T(e)&&fe(e)?e:de(K(e))}function pe(e,t){var n;void 0===t&&(t=[]);var o=de(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=P(o),s=r?[i].concat(i.visualViewport||[],fe(o)?o:[]):o,a=t.concat(s);return r?a:a.concat(pe(K(s)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===d?he(function(e,t){var n=P(e),o=N(e),r=n.visualViewport,i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;var c=q();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a+ue(e),y:l}}(e,n)):I(t)?function(e,t){var n=R(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=N(e),o=ce(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=j(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=j(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-o.scrollLeft+ue(e),l=-o.scrollTop;return"rtl"===V(r||n).direction&&(a+=j(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(N(e)))}function ve(e,t,n,o){var r="clippingParents"===t?function(e){var t=pe(K(e)),n=["absolute","fixed"].indexOf(V(e).position)>=0&&T(e)?U(e):e;return I(n)?t.filter((function(e){return I(e)&&Y(e,n)&&"body"!==A(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),s=i[0],a=i.reduce((function(t,n){var r=me(e,n,o);return t.top=j(r.top,t.top),t.right=H(r.right,t.right),t.bottom=H(r.bottom,t.bottom),t.left=j(r.left,t.left),t}),me(e,s,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,a=e.element,l=e.placement,f=l?M(l):null,d=l?Q(l):null,p=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2;switch(f){case o:t={x:p,y:n.y-a.height};break;case r:t={x:p,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case s:t={x:n.x-a.width,y:h};break;default:t={x:n.x,y:n.y}}var m=f?z(f):null;if(null!=m){var v="y"===m?"height":"width";switch(d){case c:t[m]=t[m]-(n[v]/2-a[v]/2);break;case u:t[m]=t[m]+(n[v]/2-a[v]/2)}}return t}function ge(e,t){void 0===t&&(t={});var n=t,s=n.placement,a=void 0===s?e.placement:s,c=n.strategy,u=void 0===c?e.strategy:c,m=n.boundary,v=void 0===m?f:m,y=n.rootBoundary,g=void 0===y?d:y,w=n.elementContext,b=void 0===w?p:w,x=n.altBoundary,E=void 0!==x&&x,O=n.padding,S=void 0===O?0:O,C=Z("number"!=typeof S?S:G(S,l)),L=b===p?h:p,A=e.rects.popper,P=e.elements[E?L:b],T=ve(I(P)?P:P.contextElement||N(e.elements.popper),v,g,u),D=R(e.elements.reference),_=ye({reference:D,element:A,strategy:"absolute",placement:a}),M=he(Object.assign({},A,_)),j=b===p?M:D,H={top:T.top-j.top+C.top,bottom:j.bottom-T.bottom+C.bottom,left:T.left-j.left+C.left,right:j.right-T.right+C.right},B=e.modifiersData.offset;if(b===p&&B){var k=B[a];Object.keys(H).forEach((function(e){var t=[i,r].indexOf(e)>=0?1:-1,n=[o,r].indexOf(e)>=0?"y":"x";H[e]+=k[n]*t}))}return H}const we={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,u=e.name;if(!t.modifiersData[u]._skip){for(var f=n.mainAxis,d=void 0===f||f,p=n.altAxis,h=void 0===p||p,y=n.fallbackPlacements,g=n.padding,w=n.boundary,b=n.rootBoundary,x=n.altBoundary,E=n.flipVariations,O=void 0===E||E,S=n.allowedAutoPlacements,C=t.options.placement,L=M(C),A=y||(L===C||!O?[se(C)]:function(e){if(M(e)===a)return[];var t=se(e);return[le(e),t,le(t)]}(C)),P=[C].concat(A).reduce((function(e,n){return e.concat(M(n)===a?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,f=Q(o),d=f?a?m:m.filter((function(e){return Q(e)===f})):l,p=d.filter((function(e){return u.indexOf(e)>=0}));0===p.length&&(p=d);var h=p.reduce((function(t,n){return t[n]=ge(e,{placement:n,boundary:r,rootBoundary:i,padding:s})[M(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:w,rootBoundary:b,padding:g,flipVariations:O,allowedAutoPlacements:S}):n)}),[]),I=t.rects.reference,T=t.rects.popper,D=new Map,_=!0,j=P[0],H=0;H=0,W=R?"width":"height",Y=ge(t,{placement:B,boundary:w,rootBoundary:b,altBoundary:x,padding:g}),V=R?q?i:s:q?r:o;I[W]>T[W]&&(V=se(V));var $=se(V),N=[];if(d&&N.push(Y[k]<=0),h&&N.push(Y[V]<=0,Y[$]<=0),N.every((function(e){return e}))){j=B,_=!1;break}D.set(B,N)}if(_)for(var K=function(e){var t=P.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},F=O?3:1;F>0;F--){if("break"===K(F))break}t.placement!==j&&(t.modifiersData[u]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[o,i,r,s].some((function(t){return e[t]>=0}))}const Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,s=ge(t,{elementContext:"reference"}),a=ge(t,{altBoundary:!0}),l=be(s,o),c=be(a,r,i),u=xe(l),f=xe(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}};const Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,l=void 0===a?[0,0]:a,c=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=M(e),a=[s,o].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=l[0],u=l[1];return c=c||0,u=(u||0)*a,[s,i].indexOf(r)>=0?{x:u,y:c}:{x:c,y:u}}(n,t.rects,l),e}),{}),u=c[t.placement],f=u.x,d=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=c}};const Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Ce={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name,l=n.mainAxis,u=void 0===l||l,f=n.altAxis,d=void 0!==f&&f,p=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,g=void 0===y||y,w=n.tetherOffset,b=void 0===w?0:w,x=ge(t,{boundary:p,rootBoundary:h,padding:v,altBoundary:m}),E=M(t.placement),O=Q(t.placement),S=!O,C=z(E),L="x"===C?"y":"x",A=t.modifiersData.popperOffsets,P=t.rects.reference,I=t.rects.popper,T="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,D="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(A){if(u){var k,q="y"===C?o:s,R="y"===C?r:i,Y="y"===C?"height":"width",V=A[C],$=V+x[q],N=V-x[R],K=g?-I[Y]/2:0,F=O===c?P[Y]:I[Y],Z=O===c?-I[Y]:-P[Y],G=t.elements.arrow,J=g&&G?W(G):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[q],ne=ee[R],oe=X(0,P[Y],J[Y]),re=S?P[Y]/2-K-oe-te-D.mainAxis:F-oe-te-D.mainAxis,ie=S?-P[Y]/2+K+oe+ne+D.mainAxis:Z+oe+ne+D.mainAxis,se=t.elements.arrow&&U(t.elements.arrow),ae=se?"y"===C?se.clientTop||0:se.clientLeft||0:0,le=null!=(k=null==_?void 0:_[C])?k:0,ce=V+ie-le,ue=X(g?H($,V+re-le-ae):$,V,g?j(N,ce):N);A[C]=ue,B[C]=ue-V}if(d){var fe,de="x"===C?o:s,pe="x"===C?r:i,he=A[L],me="y"===L?"height":"width",ve=he+x[de],ye=he-x[pe],we=-1!==[o,s].indexOf(E),be=null!=(fe=null==_?void 0:_[L])?fe:0,xe=we?ve:he-P[me]-I[me]-be+D.altAxis,Ee=we?he+P[me]+I[me]-be-D.altAxis:ye,Oe=g&&we?function(e,t,n){var o=X(e,t,n);return o>n?n:o}(xe,he,Ee):X(g?xe:ve,he,g?Ee:ye);A[L]=Oe,B[L]=Oe-he}t.modifiersData[a]=B}},requiresIfExists:["offset"]};function Le(e,t,n){void 0===n&&(n=!1);var o,r,i=T(t),s=T(t)&&function(e){var t=e.getBoundingClientRect(),n=B(t.width)/e.offsetWidth||1,o=B(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=N(t),l=R(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==A(t)||fe(a))&&(c=(o=t)!==P(o)&&T(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:ce(o)),T(t)?((u=R(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=ue(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ae(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var Pe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ie(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(e,t)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.el=e,this.options=t,this.events=n,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var n;e.push({id:(null===(n=null==t?void 0:t.el)||void 0===n?void 0:n.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=n},610:function(e,t,n){ +Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.el=e,this.options=t,this.events=n,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var n;e.push({id:(null===(n=null==t?void 0:t.el)||void 0===n?void 0:n.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=n},891:function(e,t,n){ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(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 n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r .hs-dropdown-toggle")||r.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||r.el.children[0],r.closers=Array.from(r.el.querySelectorAll(":scope .hs-dropdown-close"))||null,r.menu=r.el.querySelector(":scope > .hs-dropdown-menu"),r.eventMode=(0,a.getClassProperty)(r.el,"--trigger","click"),r.closeMode=(0,a.getClassProperty)(r.el,"--auto-close","true"),r.animationInProcess=!1,r.toggle&&r.menu&&r.init(),r}return r(t,e),t.prototype.init=function(){var e=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle.addEventListener("click",(function(t){return e.onClickHandler(t)})),this.closers&&this.buildClosers(),(0,a.isIOS)()||(0,a.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return e.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return e.onMouseLeaveHandler()})))},t.prototype.resizeHandler=function(){this.eventMode=(0,a.getClassProperty)(this.el,"--trigger","click")},t.prototype.buildClosers=function(){var e=this;this.closers.forEach((function(t){t.addEventListener("click",(function(){return e.close()}))}))},t.prototype.onClickHandler=function(e){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},t.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},t.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},t.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},t.prototype.absoluteStrategyModifiers=function(){var e=this;return[{name:"applyStyles",fn:function(t){var n=(window.getComputedStyle(e.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(e.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");t.state.elements.popper.style.position=n,t.state.elements.popper.style.transform="adaptive"===o?t.state.styles.popper.transform:null,t.state.elements.popper.style.top=null,t.state.elements.popper.style.bottom=null,t.state.elements.popper.style.left=null,t.state.elements.popper.style.right=null,t.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},t.prototype.open=function(){var e=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var t=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),r=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ",""));"static"!==o&&(this.el._popper=(0,l.createPopper)(this.el,this.menu,{placement:f.POSITIONS[t]||"bottom-start",strategy:o,modifiers:i(i([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,r]}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){e.el.classList.add("open"),e.animationInProcess=!1})),this.fireEvent("open",this.el),(0,a.dispatch)("open.hs.dropdown",this.el,this.el)},t.prototype.close=function(e){var t=this;if(void 0===e&&(e=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;if(this.animationInProcess=!0,e){var n=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,a.afterTransition)(n,(function(){return t.destroyPopper()}))}else this.destroyPopper();this.menu.style.margin=null,this.el.classList.remove("open"),this.fireEvent("close",this.el),(0,a.dispatch)("close.hs.dropdown",this.el,this.el)},t.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},t.getInstance=function(e,t){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));return n?t?n:n.element.el:null},t.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(e){window.$hsDropdownCollection.find((function(t){var n;return(null===(n=null==t?void 0:t.element)||void 0===n?void 0:n.el)===e}))||new t(e)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(e){return t.accessibility(e)})),window.addEventListener("click",(function(e){var n=e.target;t.closeCurrentlyOpened(n)}));var e=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==e&&(e=innerWidth,t.closeCurrentlyOpened(null,!1))}))}},t.open=function(e){var t=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));t&&t.element.menu.classList.contains("hidden")&&t.element.open()},t.close=function(e){var t=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));t&&!t.element.menu.classList.contains("hidden")&&t.element.close()},t.accessibility=function(e){this.history=a.menuSearchHistory;var t=window.$hsDropdownCollection.find((function(e){return e.element.el.classList.contains("open")}));if(t&&(f.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(e.code)||4===e.code.length&&e.code[e.code.length-1].match(/^[A-Z]*$/))&&!e.metaKey&&!t.element.menu.querySelector("input:focus")&&!t.element.menu.querySelector("textarea:focus"))switch(e.code){case"Escape":t.element.menu.querySelector(".hs-select.active")||(e.preventDefault(),this.onEscape(e));break;case"Enter":t.element.menu.querySelector(".hs-select button:focus")||t.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(e);break;case"ArrowUp":e.preventDefault(),this.onArrow();break;case"ArrowDown":e.preventDefault(),this.onArrow(!1);break;case"Home":e.preventDefault(),this.onStartEnd();break;case"End":e.preventDefault(),this.onStartEnd(!1);break;default:e.preventDefault(),this.onFirstLetter(e.key)}},t.onEscape=function(e){var t=e.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(e){return e.element.el===t}))){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===t}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},t.onEnter=function(e){var t=e.target.parentElement;if(window.$hsDropdownCollection.find((function(e){return e.element.el===t}))){e.preventDefault();var n=window.$hsDropdownCollection.find((function(e){return e.element.el===t}));n&&n.element.open()}},t.onArrow=function(e){void 0===e&&(e=!0);var t=window.$hsDropdownCollection.find((function(e){return e.element.el.classList.contains("open")}));if(t){var n=t.element.menu;if(!n)return!1;var o=(e?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(e){return!e.classList.contains("disabled")})),r=n.querySelector("a:focus, button:focus"),i=o.findIndex((function(e){return e===r}));i+12&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,a=window.innerHeight,l=s?i.top-s.top:i.top,c=(r?s.bottom:a)-i.bottom,f=e.clientHeight+o;return"bottom"===n?c>=f:"top"===n?l>=f:l>=f||c>=f};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var o=function(e){return!!e&&("none"===window.getComputedStyle(e).display||o(e.parentElement))};t.isParentOrElementHidden=o;t.debounce=function(e,t){var o;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(610)})())); \ No newline at end of file +var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(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 n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r .hs-dropdown-toggle")||r.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||r.el.children[0],r.closers=Array.from(r.el.querySelectorAll(":scope .hs-dropdown-close"))||null,r.menu=r.el.querySelector(":scope > .hs-dropdown-menu"),r.eventMode=(0,a.getClassProperty)(r.el,"--trigger","click"),r.closeMode=(0,a.getClassProperty)(r.el,"--auto-close","true"),r.animationInProcess=!1,r.toggle&&r.menu&&r.init(),r}return r(t,e),t.prototype.init=function(){var e=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle&&this.buildToggle(),this.menu&&this.buildMenu(),this.closers&&this.buildClosers(),(0,a.isIOS)()||(0,a.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return e.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return e.onMouseLeaveHandler()})))},t.prototype.resizeHandler=function(){this.eventMode=(0,a.getClassProperty)(this.el,"--trigger","click"),this.closeMode=(0,a.getClassProperty)(this.el,"--auto-close","true")},t.prototype.buildToggle=function(){var e,t=this;(null===(e=null==this?void 0:this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.el.classList.contains("open")?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(e){return t.onClickHandler(e)}))},t.prototype.buildMenu=function(){this.menu.role="menu"},t.prototype.buildClosers=function(){var e=this;this.closers.forEach((function(t){t.addEventListener("click",(function(){return e.close()}))}))},t.prototype.onClickHandler=function(e){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},t.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},t.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},t.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},t.prototype.absoluteStrategyModifiers=function(){var e=this;return[{name:"applyStyles",fn:function(t){var n=(window.getComputedStyle(e.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(e.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");t.state.elements.popper.style.position=n,t.state.elements.popper.style.transform="adaptive"===o?t.state.styles.popper.transform:null,t.state.elements.popper.style.top=null,t.state.elements.popper.style.bottom=null,t.state.elements.popper.style.left=null,t.state.elements.popper.style.right=null,t.state.elements.popper.style.margin=0}}]},t.prototype.open=function(){var e=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var t=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),r=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ","")),s=(window.getComputedStyle(this.el).getPropertyValue("--gpu-acceleration")||"true").replace(" ","");"static"!==o&&(this.el._popper=(0,l.createPopper)(this.el,this.menu,{placement:u.POSITIONS[t]||"bottom-start",strategy:o,modifiers:i(i([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,r]}},{name:"computeStyles",options:{adaptive:"fixed"===o,gpuAcceleration:"true"===s}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("open"),e.animationInProcess=!1})),this.fireEvent("open",this.el),(0,a.dispatch)("open.hs.dropdown",this.el,this.el)},t.prototype.close=function(e){var t=this;if(void 0===e&&(e=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;var n;if(this.animationInProcess=!0,e){var o=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,a.afterTransition)(o,(function(){return t.destroyPopper()}))}else this.destroyPopper();t.menu.style.margin=null,(null===(n=null==t?void 0:t.toggle)||void 0===n?void 0:n.ariaExpanded)&&(t.toggle.ariaExpanded="false"),t.el.classList.remove("open"),t.fireEvent("close",t.el),(0,a.dispatch)("close.hs.dropdown",t.el,t.el)},t.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},t.getInstance=function(e,t){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));return n?t?n:n.element.el:null},t.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(e){window.$hsDropdownCollection.find((function(t){var n;return(null===(n=null==t?void 0:t.element)||void 0===n?void 0:n.el)===e}))||new t(e)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(e){return t.accessibility(e)})),window.addEventListener("click",(function(e){var n=e.target;t.closeCurrentlyOpened(n)}));var e=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==e&&(e=innerWidth,t.closeCurrentlyOpened(null,!1))}))}},t.open=function(e){var t=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));t&&t.element.menu.classList.contains("hidden")&&t.element.open()},t.close=function(e){var t=window.$hsDropdownCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));t&&!t.element.menu.classList.contains("hidden")&&t.element.close()},t.accessibility=function(e){this.history=a.menuSearchHistory;var t=window.$hsDropdownCollection.find((function(e){return e.element.el.classList.contains("open")}));if(t&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(e.code)||4===e.code.length&&e.code[e.code.length-1].match(/^[A-Z]*$/))&&!e.metaKey&&!t.element.menu.querySelector("input:focus")&&!t.element.menu.querySelector("textarea:focus"))switch(e.code){case"Escape":t.element.menu.querySelector(".hs-select.active")||(e.preventDefault(),this.onEscape(e));break;case"Enter":t.element.menu.querySelector(".hs-select button:focus")||t.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(e);break;case"ArrowUp":e.preventDefault(),e.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":e.preventDefault(),e.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":e.preventDefault(),e.stopImmediatePropagation(),this.onStartEnd();break;case"End":e.preventDefault(),e.stopImmediatePropagation(),this.onStartEnd(!1);break;default:e.preventDefault(),this.onFirstLetter(e.key)}},t.onEscape=function(e){var t=e.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(e){return e.element.el===t}))){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===t}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},t.onEnter=function(e){var t=e.target.parentElement;if(window.$hsDropdownCollection.find((function(e){return e.element.el===t}))){e.preventDefault();var n=window.$hsDropdownCollection.find((function(e){return e.element.el===t}));n&&n.element.open()}},t.onArrow=function(e){void 0===e&&(e=!0);var t=window.$hsDropdownCollection.find((function(e){return e.element.el.classList.contains("open")}));if(t){var n=t.element.menu;if(!n)return!1;var o=(e?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(e){return!e.classList.contains("disabled")})),r=n.querySelector("a:focus, button:focus"),i=o.findIndex((function(e){return e===r}));i+1t&&(t=n)})),t};t.stringToBoolean=function(e){return"true"===e};t.getClassProperty=function(e,t,n){return void 0===n&&(n=""),(window.getComputedStyle(e).getPropertyValue(t)||n).replace(" ","")};t.getClassPropertyAlt=function(e,t,n){void 0===n&&(n="");var o="";return e.classList.forEach((function(e){e.includes(t)&&(o=e)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(e){return window.getComputedStyle(e).getPropertyValue("z-index")};t.getZIndex=o;t.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,a=window.innerHeight,l=s?i.top-s.top:i.top,c=(r?s.bottom:a)-i.bottom,u=e.clientHeight+o;return"bottom"===n?c>=u:"top"===n?l>=u:l>=u||c>=u};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var r=function(e){return!!e&&("none"===window.getComputedStyle(e).display||r(e.parentElement))};t.isParentOrElementHidden=r;t.debounce=function(e,t){var o;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(891)})())); \ No newline at end of file diff --git a/dist/file-upload.d.ts b/dist/file-upload.d.ts new file mode 100644 index 0000000..32b4d95 --- /dev/null +++ b/dist/file-upload.d.ts @@ -0,0 +1,55 @@ +import { DropzoneOptions } from 'dropzone'; + +export interface IBasePlugin { + el: E; + options?: O; + events?: {}; +} +declare class HSBasePlugin implements IBasePlugin { + el: E; + options: O; + events?: any; + constructor(el: E, options: O, events?: any); + createCollection(collection: any[], element: any): void; + fireEvent(evt: string, payload?: any): any; + on(evt: string, cb: Function): void; +} +export interface ICollectionItem { + id: string | number; + element: T; +} +export interface IFileUploadOptions extends DropzoneOptions { + extensions?: {}; + autoHideTrigger?: boolean; + singleton?: boolean; +} +export interface IFileUpload { + options?: IFileUploadOptions; +} +declare class HSFileUpload extends HSBasePlugin implements IFileUpload { + private concatOptions; + private previewTemplate; + private extensions; + private singleton; + private dropzone; + constructor(el: HTMLElement, options?: IFileUploadOptions, events?: {}); + private init; + private initDropzone; + private onAddFile; + private previewAccepted; + private onRemoveFile; + private onUploadProgress; + private onComplete; + private setIcon; + private createIcon; + private formatFileSize; + private splitFileName; + static getInstance(target: HTMLElement | string, isInstance?: boolean): HTMLElement | ICollectionItem; + static autoInit(): void; +} + +export { + HSFileUpload as default, +}; + +export {}; diff --git a/dist/file-upload.js b/dist/file-upload.js new file mode 100644 index 0000000..64f94ef --- /dev/null +++ b/dist/file-upload.js @@ -0,0 +1,17 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ +/* + * HSBasePlugin + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},234:function(t,e,n){ +/* + * HSFileUpload + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t',l.extensions=_.merge({default:{icon:'',class:"size-5"},xls:{icon:'',class:"size-5"},doc:{icon:'',class:"size-5"},zip:{icon:'',class:"size-5"}},s.extensions),l.singleton=s.singleton,l.concatOptions=r(r({clickable:l.el.querySelector("[data-hs-file-upload-trigger]"),previewsContainer:l.el.querySelector("[data-hs-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:l.previewTemplate,autoHideTrigger:!1},s),n),l.init(),l}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()},e.prototype.initDropzone=function(){var t=this,e=this.el.querySelector("[data-hs-file-upload-clear]"),n=Array.from(this.el.querySelectorAll("[data-hs-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(function(e){return t.onAddFile(e)})),this.dropzone.on("removedfile",(function(){return t.onRemoveFile()})),this.dropzone.on("uploadprogress",(function(e,n){return t.onUploadProgress(e,n)})),this.dropzone.on("complete",(function(e){return t.onComplete(e)})),e&&(e.onclick=function(){t.dropzone.files.length&&t.dropzone.removeAllFiles(!0)}),n.length&&n.forEach((function(e){e.onclick=function(){var e,n;(null===(e=t.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(n=t.concatOptions)||void 0===n?void 0:n.clickable).click()}}))},e.prototype.onAddFile=function(t){var e=this,n=t.previewElement,o=t.previewElement.querySelector("[data-hs-file-upload-reload]");if(!n)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),o&&o.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var o=document.createElement("input");o.type="file",o.click(),o.addEventListener("change",(function(n){var o,i=null===(o=n.target.files)||void 0===o?void 0:o[0];if(i){var r=i;r.status=Dropzone.ADDED,r.accepted=!0,r.previewElement=t.previewElement,r.previewTemplate=t.previewTemplate,r.previewsContainer=t.previewsContainer,e.dropzone.removeFile(t),e.dropzone.addFile(r)}}))})),this.previewAccepted(t)},e.prototype.previewAccepted=function(t){var e=this,n=t.previewElement,o=this.splitFileName(t.name),i=n.querySelector("[data-hs-file-upload-file-name]"),r=n.querySelector("[data-hs-file-upload-file-ext]"),l=n.querySelector("[data-hs-file-upload-file-size]"),a=n.querySelector("[data-hs-file-upload-file-icon]"),s=this.el.querySelector("[data-hs-file-upload-trigger]"),d=n.querySelector("[data-dz-thumbnail]"),p=n.querySelector("[data-hs-file-upload-remove]");i&&(i.textContent=o.name),r&&(r.textContent=o.extension),l&&(l.textContent=this.formatFileSize(t.size)),d&&(t.type.includes("image/")?d.classList.remove("hidden"):this.setIcon(o.extension,a)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(s.style.display="none"),p&&(p.onclick=function(){return e.dropzone.removeFile(t)})},e.prototype.onRemoveFile=function(){var t=this.el.querySelector("[data-hs-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")},e.prototype.onUploadProgress=function(t,e){var n=t.previewElement;if(!n)return!1;var o=n.querySelector("[data-hs-file-upload-progress-bar]"),i=n.querySelector("[data-hs-file-upload-progress-bar-pane]"),r=n.querySelector("[data-hs-file-upload-progress-bar-value]"),l=Math.floor(e);o&&o.setAttribute("aria-valuenow","".concat(l)),i&&(i.style.width="".concat(l,"%")),r&&(r.innerText="".concat(l))},e.prototype.onComplete=function(t){var e=t.previewElement;if(!e)return!1;e.classList.add("complete")},e.prototype.setIcon=function(t,e){var n=this.createIcon(t);e.append(n)},e.prototype.createIcon=function(t){var e,n,o=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,a.htmlToElement)(this.extensions[t].icon):(0,a.htmlToElement)(this.extensions.default.icon);return(0,a.classToClassList)((null===(n=this.extensions[t])||void 0===n?void 0:n.class)?this.extensions[t].class:this.extensions.default.class,o),o},e.prototype.formatFileSize=function(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"},e.prototype.splitFileName=function(t){var e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}},e.getInstance=function(t,e){var n=window.$hsFileUploadCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsFileUploadCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s.default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&d.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=d),e.default=d},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),l=i?i.getBoundingClientRect():null,a=window.innerHeight,s=l?r.top-l.top:r.top,d=(i?l.bottom:a)-r.bottom,p=t.clientHeight+o;return"bottom"===n?d>=p:"top"===n?s>=p:s>=p||d>=p};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(234);return n})())); \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 6385c6f..3fd3f92 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,5 +1,3 @@ - - export interface ICopyMarkupOptions { targetSelector: string; wrapperSelector: string; @@ -81,6 +79,7 @@ export interface ICarouselOptions { isAutoPlay?: boolean; speed?: number; isInfiniteLoop?: boolean; + isRTL?: boolean; } export interface ICarousel { options?: ICarouselOptions; @@ -102,6 +101,7 @@ export declare class HSCarousel extends HSBasePlugin implement private readonly loadingClassesAdd; private readonly afterLoadingClassesAdd; private readonly isAutoPlay; + private readonly isRTL; private readonly speed; private readonly isInfiniteLoop; private timer; @@ -117,6 +117,7 @@ export declare class HSCarousel extends HSBasePlugin implement private resetTimer; private detectDirection; recalculateWidth(): void; + private calculateTransform; goToPrev(): void; goToNext(): void; goTo(i: number): void; @@ -272,11 +273,13 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementPopper> imp private readonly closers; menu: HTMLElement | null; private eventMode; - private readonly closeMode; + private closeMode; private animationInProcess; constructor(el: IHTMLElementPopper, options?: {}, events?: {}); private init; resizeHandler(): void; + private buildToggle; + private buildMenu; private buildClosers; private onClickHandler; private onMouseEnterHandler; @@ -317,6 +320,8 @@ export declare class HSInputNumber extends HSBasePlugin imp private readonly step; constructor(el: HTMLElement, options?: IInputNumberOptions); private init; + private checkIsNumberAndConvert; + private cleanAndExtractNumber; private build; private buildInput; private buildIncrement; @@ -332,6 +337,7 @@ export declare class HSInputNumber extends HSBasePlugin imp } export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; @@ -343,9 +349,11 @@ export interface IOverlay { } export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass; + private readonly emulateScrollbarSpace; private readonly isClosePrev; private readonly backdropClasses; private readonly backdropExtraClasses; + private readonly animationTarget; private openNextOverlay; private autoHide; private readonly overlayId; @@ -364,6 +372,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private buildBackdrop; private destroyBackdrop; private focusElement; + private getScrollbarSize; open(): false | Promise; close(forceClose?: boolean): Promise; static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem; @@ -419,48 +428,6 @@ export declare class HSRemoveElement extends HSBasePlugin private remove; static autoInit(): void; } -export interface ISearchItemTemplate { - type: string; - markup: string; -} -export interface ISearchByJsonOptions { - jsonUrl: string; - minChars?: number; - dropdownTemplate?: string; - dropdownClasses?: string; - dropdownItemTemplate?: string; - dropdownItemTemplatesByType?: ISearchItemTemplate[]; - dropdownItemClasses?: string; - highlightedTextTagName?: string; - highlightedTextClasses?: string; -} -export interface ISearchByJson { - options?: ISearchByJsonOptions; -} -export declare class HSSearchByJson extends HSBasePlugin implements ISearchByJson { - private readonly jsonUrl; - private readonly minChars; - private json; - private result; - private val; - private readonly dropdownTemplate; - private readonly dropdownClasses; - private readonly dropdownItemTemplate; - private readonly dropdownItemTemplatesByType; - private readonly dropdownItemClasses; - private readonly highlightedTextTagName; - private readonly highlightedTextClasses; - private dropdown; - constructor(el: HTMLInputElement, options?: ISearchByJsonOptions); - private init; - private fetchData; - private searchData; - private buildDropdown; - private buildItems; - private itemTemplate; - static getInstance(target: HTMLElement | string): HSSearchByJson; - static autoInit(): void; -} export interface IScrollspy { options?: {}; } @@ -486,6 +453,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } export interface ISelectOptions { @@ -499,8 +468,13 @@ export interface ISelectOptions { wrapperClasses?: string; toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; tagsInputClasses?: string; @@ -547,8 +521,10 @@ export declare class HSSelect extends HSBasePlugin implements IS selectedItems: string[]; private readonly toggleTag; private readonly toggleClasses; + private readonly toggleSeparators; private readonly toggleCountText; private readonly toggleCountTextMinItems; + private readonly toggleCountTextMode; private readonly wrapperClasses; private readonly tagsItemTemplate; private readonly tagsItemClasses; @@ -582,6 +558,7 @@ export declare class HSSelect extends HSBasePlugin implements IS private readonly isAddTagOnEnter; private tagsInputHelper; constructor(el: HTMLElement, options?: ISelectOptions); + setValue(val: string | string[]): void; private init; private build; private buildWrapper; @@ -626,6 +603,7 @@ export declare class HSSelect extends HSBasePlugin implements IS recalculateDirection(): void; static getInstance(target: HTMLElement | string, isInstance?: boolean): HSSelect | ICollectionItem; static autoInit(): void; + static open(target: HTMLElement | string): void; static close(target: HTMLElement | string): void; static closeCurrentlyOpened(evtTarget?: HTMLElement | null): void; static accessibility(evt: KeyboardEvent): void; @@ -894,7 +872,15 @@ export interface IStaticMethods { getClassProperty(el: HTMLElement, prop?: string, val?: string): string; afterTransition(el: HTMLElement, cb: Function): void; autoInit(collection?: string | string[]): void; + cleanCollection(collection?: string | string[]): void; } export declare const HSStaticMethods: IStaticMethods; +declare let HSDataTableModule: any; +declare let HSFileUploadModule: any; + +export { + HSDataTableModule as HSDataTable, + HSFileUploadModule as HSFileUpload, +}; export {}; diff --git a/dist/index.js b/dist/index.js index 53a9e95..25a7640 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,169 +1,177 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={492:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>gt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>v,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>g,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",m=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),v=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),y="beforeRead",g="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[y,g,w,b,C,S,x,I,T];function O(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof L(t).Element||t instanceof Element}function _(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&O(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&O(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,j=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(D())}function M(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&j(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&j(o.height)/t.offsetHeight||1);var s=(A(t)?L(t):window).visualViewport,l=!$()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function H(t){var e=M(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function R(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function W(t){return L(t).getComputedStyle(t)}function V(t){return["table","td","th"].indexOf(O(t))>=0}function F(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||F(t)}function J(t){return _(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=L(t),n=J(t);n&&V(n)&&"static"===W(n).position;)n=J(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===W(t).position)return null;var n=U(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(O(n))<0;){var o=W(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,n){return q(t,N(e,n))}function z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=K(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var m=function(t,e){return z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,n),v=H(u),y="y"===h?o:s,g="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=Y(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=m[y],T=S-v[f]-m[g],E=S/2-v[f]/2+x,O=G(I,E,T),L=h;n.modifiersData[l]=((e={})[L]=O,e.centerOffset=O-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&R(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,v=t.isFixed,y=d.x,g=void 0===y?0:y,w=d.y,b=void 0===w?0:w,C="function"==typeof m?m({x:g,y:b}):{x:g,y:b};g=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var O=Y(n),A="clientHeight",_="clientWidth";if(O===L(n)&&"static"!==W(O=F(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(v&&O===E&&E.visualViewport?E.visualViewport.height:O[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,g-=(v&&O===E&&E.visualViewport?E.visualViewport.width:O[_])-l.width,g*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===m?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:j(n*i)/i||0,y:j(o*i)/i||0}}({x:g,y:b},L(n)):{x:g,y:b};return g=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?g+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return M(F(t)).left+ct(t).scrollLeft}function dt(t){var e=W(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(U(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=L(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(U(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,n){return e===p?ft(function(t,e){var n=L(t),o=F(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=$();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=M(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=F(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===W(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(F(t)))}function vt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(U(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&_(t)?Y(t):t;return A(n)?e.filter((function(t){return A(t)&&R(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=mt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),mt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function yt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?Z(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var m=d?K(d):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:e[m]=e[m]-(n[v]/2-l[v]/2);break;case u:e[m]=e[m]+(n[v]/2-l[v]/2)}}return e}function gt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,m=n.boundary,v=void 0===m?d:m,y=n.rootBoundary,g=void 0===y?p:y,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=z("number"!=typeof I?I:X(I,a)),E=b===h?f:h,O=t.rects.popper,L=t.elements[S?E:b],_=vt(A(L)?L:L.contextElement||F(t.elements.popper),v,g,u),k=M(t.elements.reference),P=yt({reference:k,element:O,strategy:"absolute",placement:l}),B=ft(Object.assign({},O,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},j=t.modifiersData.offset;if(b===h&&j){var D=j[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,y=n.fallbackPlacements,g=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),O=y||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),L=[T].concat(O).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,d=Z(o),p=d?l?m:m.filter((function(t){return Z(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=gt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:g,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=L[0],N=0;N=0,H=M?"width":"height",R=gt(e,{placement:j,boundary:w,rootBoundary:b,altBoundary:C,padding:g}),W=M?$?r:s:$?i:o;A[H]>_[H]&&(W=st(W));var V=st(W),F=[];if(p&&F.push(R[D]<=0),f&&F.push(R[W]<=0,R[V]<=0),F.every((function(t){return t}))){q=j,P=!1;break}k.set(j,F)}if(P)for(var U=function(t){var e=L.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},J=x?3:1;J>0;J--){if("break"===U(J))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=gt(e,{elementContext:"reference"}),l=gt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,g=void 0===y||y,w=n.tetherOffset,b=void 0===w?0:w,C=gt(e,{boundary:h,rootBoundary:f,padding:v,altBoundary:m}),S=B(e.placement),x=Z(e.placement),I=!x,T=K(S),E="x"===T?"y":"x",O=e.modifiersData.popperOffsets,L=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(O){if(u){var D,$="y"===T?o:s,M="y"===T?i:r,R="y"===T?"height":"width",W=O[T],V=W+C[$],F=W-C[M],U=g?-A[R]/2:0,J=x===c?L[R]:A[R],z=x===c?-A[R]:-L[R],X=e.elements.arrow,Q=g&&X?H(X):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[$],nt=tt[M],ot=G(0,L[R],Q[R]),it=I?L[R]/2-U-ot-et-k.mainAxis:J-ot-et-k.mainAxis,rt=I?-L[R]/2+U+ot+nt+k.mainAxis:z+ot+nt+k.mainAxis,st=e.elements.arrow&&Y(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=W+rt-at,ut=G(g?N(V,W+it-at-lt):V,W,g?q(F,ct):F);O[T]=ut,j[T]=ut-W}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=O[E],mt="y"===E?"height":"width",vt=ft+C[pt],yt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?vt:ft-L[mt]-A[mt]-bt+k.altAxis,St=wt?ft+L[mt]+A[mt]-bt-k.altAxis:yt,xt=g&&wt?function(t,e,n){var o=G(t,e,n);return o>n?n:o}(Ct,ft,St):G(g?Ct:vt,ft,g?St:yt);O[E]=xt,j[E]=xt-ft}e.modifiersData[l]=j}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,o=j(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=F(e),a=M(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==O(e)||dt(l))&&(c=(o=e)!==L(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=M(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Ot(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},700:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSSearchByJson=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(413);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(460);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(629);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(652);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(23);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(610);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(371);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(770);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(659);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(139);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(961);Object.defineProperty(e,"HSSearchByJson",{enumerable:!0,get:function(){return o(f).default}});var m=n(591);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(m).default}});var v=n(233);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var y=n(957);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(y).default}});var g=n(983);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var w=n(949);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(w).default}});var b=n(557);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(b).default}});var C=n(87);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(C).default}});var S=n(366);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(S).default}});var x=n(679);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(x).default}});var I=n(313);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(I).default}})},460:function(t,e,n){ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={170:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>g,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>yt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>m,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>y,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>v,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",v=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),m=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),g="beforeRead",y="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[g,y,w,b,C,S,x,I,T];function L(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof O(t).Element||t instanceof Element}function _(t){return t instanceof O(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof O(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&L(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&L(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,H=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(D())}function j(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&H(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&H(o.height)/t.offsetHeight||1);var s=(A(t)?O(t):window).visualViewport,l=!M()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function $(t){var e=j(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function V(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function R(t){return O(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(L(t))>=0}function W(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||W(t)}function U(t){return _(t)&&"fixed"!==R(t).position?t.offsetParent:null}function J(t){for(var e=O(t),n=U(t);n&&F(n)&&"static"===R(n).position;)n=U(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===R(t).position)return null;var n=z(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(L(n))<0;){var o=R(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Z(t,e,n){return q(t,N(e,n))}function K(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=Y(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var v=function(t,e){return K("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,a))}(c.padding,n),m=$(u),g="y"===h?o:s,y="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=J(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=v[g],T=S-m[f]-v[y],E=S/2-m[f]/2+x,L=Z(I,E,T),O=h;n.modifiersData[l]=((e={})[O]=L,e.centerOffset=L-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&V(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,v=t.roundOffsets,m=t.isFixed,g=d.x,y=void 0===g?0:g,w=d.y,b=void 0===w?0:w,C="function"==typeof v?v({x:y,y:b}):{x:y,y:b};y=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var L=J(n),A="clientHeight",_="clientWidth";if(L===O(n)&&"static"!==R(L=W(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(m&&L===E&&E.visualViewport?E.visualViewport.height:L[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,y-=(m&&L===E&&E.visualViewport?E.visualViewport.width:L[_])-l.width,y*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===v?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(o*i)/i||0}}({x:y,y:b},O(n)):{x:y,y:b};return y=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?y+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:X(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=O(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=O(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return j(W(t)).left+ct(t).scrollLeft}function dt(t){var e=R(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(z(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=O(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(z(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,e,n){return e===p?ft(function(t,e){var n=O(t),o=W(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=M();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=j(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=W(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===R(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(W(t)))}function mt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(z(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&_(t)?J(t):t;return A(n)?e.filter((function(t){return A(t)&&V(t,n)&&"body"!==L(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=vt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),vt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function gt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?X(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var v=d?Y(d):null;if(null!=v){var m="y"===v?"height":"width";switch(p){case c:e[v]=e[v]-(n[m]/2-l[m]/2);break;case u:e[v]=e[v]+(n[m]/2-l[m]/2)}}return e}function yt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,v=n.boundary,m=void 0===v?d:v,g=n.rootBoundary,y=void 0===g?p:g,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=K("number"!=typeof I?I:G(I,a)),E=b===h?f:h,L=t.rects.popper,O=t.elements[S?E:b],_=mt(A(O)?O:O.contextElement||W(t.elements.popper),m,y,u),k=j(t.elements.reference),P=gt({reference:k,element:L,strategy:"absolute",placement:l}),B=ft(Object.assign({},L,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},H=t.modifiersData.offset;if(b===h&&H){var D=H[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,g=n.fallbackPlacements,y=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),L=g||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),O=[T].concat(L).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?m:c,d=X(o),p=d?l?v:v.filter((function(t){return X(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=yt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:y,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=O[0],N=0;N=0,$=j?"width":"height",V=yt(e,{placement:H,boundary:w,rootBoundary:b,altBoundary:C,padding:y}),R=j?M?r:s:M?i:o;A[$]>_[$]&&(R=st(R));var F=st(R),W=[];if(p&&W.push(V[D]<=0),f&&W.push(V[R]<=0,V[F]<=0),W.every((function(t){return t}))){q=H,P=!1;break}k.set(H,W)}if(P)for(var z=function(t){var e=O.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},U=x?3:1;U>0;U--){if("break"===z(U))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),l=yt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=m.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,v=n.altBoundary,m=n.padding,g=n.tether,y=void 0===g||g,w=n.tetherOffset,b=void 0===w?0:w,C=yt(e,{boundary:h,rootBoundary:f,padding:m,altBoundary:v}),S=B(e.placement),x=X(e.placement),I=!x,T=Y(S),E="x"===T?"y":"x",L=e.modifiersData.popperOffsets,O=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(L){if(u){var D,M="y"===T?o:s,j="y"===T?i:r,V="y"===T?"height":"width",R=L[T],F=R+C[M],W=R-C[j],z=y?-A[V]/2:0,U=x===c?O[V]:A[V],K=x===c?-A[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[M],nt=tt[j],ot=Z(0,O[V],Q[V]),it=I?O[V]/2-z-ot-et-k.mainAxis:U-ot-et-k.mainAxis,rt=I?-O[V]/2+z+ot+nt+k.mainAxis:K+ot+nt+k.mainAxis,st=e.elements.arrow&&J(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=R+rt-at,ut=Z(y?N(F,R+it-at-lt):F,R,y?q(W,ct):W);L[T]=ut,H[T]=ut-R}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=L[E],vt="y"===E?"height":"width",mt=ft+C[pt],gt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?mt:ft-O[vt]-A[vt]-bt+k.altAxis,St=wt?ft+O[vt]+A[vt]-bt-k.altAxis:gt,xt=y&&wt?function(t,e,n){var o=Z(t,e,n);return o>n?n:o}(Ct,ft,St):Z(y?Ct:mt,ft,y?St:gt);L[E]=xt,H[E]=xt-ft}e.modifiersData[l]=H}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=H(e.width)/t.offsetWidth||1,o=H(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=W(e),a=j(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==L(e)||dt(l))&&(c=(o=e)!==O(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=j(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Lt(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},158:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSFileUpload=e.HSDataTable=e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(406);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(740);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(268);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(485);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(809);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(891);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(332);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(850);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(60);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(911);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(751);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(f).default}});var v=n(442);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var m=n(887);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(m).default}});var g=n(97);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var y=n(166);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(y).default}});var w=n(502);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(w).default}});var b=n(684);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(b).default}});var C=n(100);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(C).default}});var S=n(969);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(S).default}});var x=n(957);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(x).default}}),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery?e.HSDataTable=n(814).default:e.HSDataTable=null,"undefined"!=typeof _&&"undefined"!=typeof Dropzone?e.HSFileUpload=n(234).default:e.HSFileUpload=null},740:function(t,e,n){ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(e){return e.element.el===t.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="block",t.content.style.height="",t.fireEvent("open",t.el),(0,l.dispatch)("open.hs.accordion",t.el,t.el)}))},e.prototype.hide=function(){var t=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="",t.content.style.height="0",t.fireEvent("close",t.el),(0,l.dispatch)("close.hs.accordion",t.el,t.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},737:(t,e)=>{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(t){return t.element.el===e.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="block",e.content.style.height="",e.fireEvent("open",e.el),(0,l.dispatch)("open.hs.accordion",e.el,e.el)}))},e.prototype.hide=function(){var t,e=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="",e.content.style.height="0",e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.accordion",e.el,e.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},629:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},268:function(t,e,n){ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):this.currentIndex *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform=this.calculateTransform(),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.calculateTransform=function(){var t=this.currentIndex*this.sliderWidth;return this.isRTL?"translate(".concat(t,"px, 0px)"):"translate(-".concat(t,"px, 0px)")},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):this.currentIndex0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(m=null==B?void 0:B.outputLoaderTemplate)&&void 0!==m?m:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(v=null==B?void 0:B.groupingType)&&void 0!==v?v:null,_.groupingTitleTemplate=null!==(y=null==B?void 0:B.groupingTitleTemplate)&&void 0!==y?y:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(g=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==g?g:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(O=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==O?O:null,_.toggleOpen=null!==(L=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==L?L:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.isOpened=!0,this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t=""),this.setResults(t),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){return Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){return e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){if(e.isItemExists(t))return!1;var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n,o;e.textContent=null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"",e.setAttribute("data-hs-combo-box-search-text",null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t=this;this.toggle.addEventListener("click",(function(){t.isOpened?t.close():t.open(t.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),!1):(this.animationInProcess=!0,this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){e.output.style.display="none",e.setValueAndClear(t),e.animationInProcess=!1})),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+10&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(v=null==B?void 0:B.outputLoaderTemplate)&&void 0!==v?v:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(m=null==B?void 0:B.groupingType)&&void 0!==m?m:null,_.groupingTitleTemplate=null!==(g=null==B?void 0:B.groupingTitleTemplate)&&void 0!==g?g:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(y=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==y?y:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(L=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,_.toggleOpen=null!==(O=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==O?O:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t="");var e=this.preventVisibility?this.input.value:t;this.setResults(e),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),""!==t.input.value?t.el.classList.add("has-value"):t.el.classList.remove("has-value"),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.output.role="listbox",this.output.tabIndex=-1,this.output.ariaOrientation="vertical",this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){var n,o,i,r=null!==(n=e.getAttribute("data-hs-combo-box-output-item-group-field"))&&void 0!==n?n:null,s=null!==(o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")))&&void 0!==o?o:null,l=null;return r&&(null===(i=null==s?void 0:s.group)||void 0===i?void 0:i.name)&&(l=t[r]),Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){var n;return(null===(n=null==s?void 0:s.group)||void 0===n?void 0:n.name)&&l?l===s.group.name&&e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]:e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-output-item-field]").forEach((function(e){var n=t[e.getAttribute("data-hs-combo-box-output-item-field")],o=e.hasAttribute("data-hs-combo-box-output-item-hide-if-empty");e.textContent=null!=n?n:"",!n&&o&&(e.style.display="none")})),o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n;e.setAttribute("data-hs-combo-box-search-text",null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t,e,n,o,i=this;this.isOpened?((null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="true")):((null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),(null===(o=null==this?void 0:this.input)||void 0===o?void 0:o.ariaExpanded)&&(this.input.ariaExpanded="false")),this.toggle.addEventListener("click",(function(){i.isOpened?i.close():i.open(i.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){var t,n;(null===(t=null==e?void 0:e.input)||void 0===t?void 0:t.ariaExpanded)&&(e.input.ariaExpanded="true"),(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e,n,o=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),!1):(this.animationInProcess=!0,(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="false"),(null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){o.output.style.display="none",o.setValueAndClear(t),o.animationInProcess=!1})),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+1=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},610:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},814:function(t,e,n){ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&(this.buildPagingPage(1),l>2&&this.pagingPages.appendChild((0,a.htmlToElement)('...')));for(var u=l;u<=c;u++)this.buildPagingPage(u);c...')),this.buildPagingPage(r)),this.disablePagingArrow(this.pagingPrev,0===e),this.disablePagingArrow(this.pagingNext,e===n-1),this.hidePagingIfSinglePage()},e.prototype.buildPagingPage=function(t){var e=this,n=this.dataTable.page.info().page,o=(0,a.htmlToElement)('');o.innerText="".concat(t),o.setAttribute("data-page","".concat(t)),this.pageBtnClasses&&(0,a.classToClassList)(this.pageBtnClasses,o),n===t-1&&o.classList.add("active"),o.addEventListener("click",(function(){return e.onPageClick(t)})),this.pagingPages.append(o)},e.prototype.onPageClick=function(t){this.dataTable.page(t-1).draw("page")},e.prototype.initRowSelecting=function(){var t=this;this.rowSelectingAll.addEventListener("change",(function(){return t.onSelectAllChange()}))},e.prototype.triggerChangeEventToRow=function(){var t=this;this.table.querySelectorAll("tbody ".concat(this.rowSelectingIndividual)).forEach((function(e){e.addEventListener("change",(function(){t.updateSelectAllCheckbox()}))}))},e.prototype.onSelectAllChange=function(){var t=this,e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);o&&(o.checked=e)})),this.updateSelectAllCheckbox()},e.prototype.updateSelectAllCheckbox=function(){var t=this;if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;var e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);if(o&&!o.checked)return e=!1,!1})),this.rowSelectingAll.checked=e},e.getInstance=function(t,e){var n=window.$hsDataTableCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDataTableCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(l(n(961)).default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&c.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=c),e.default=c},891:function(t,e,n){ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle&&this.buildToggle(),this.menu&&this.buildMenu(),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click"),this.closeMode=(0,l.getClassProperty)(this.el,"--auto-close","true")},e.prototype.buildToggle=function(){var t,e=this;(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.el.classList.contains("open")?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(t){return e.onClickHandler(t)}))},e.prototype.buildMenu=function(){this.menu.role="menu"},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ","")),s=(window.getComputedStyle(this.el).getPropertyValue("--gpu-acceleration")||"true").replace(" ","");"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}},{name:"computeStyles",options:{adaptive:"fixed"===o,gpuAcceleration:"true"===s}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){var e;(null===(e=null==t?void 0:t.toggle)||void 0===e?void 0:e.ariaExpanded)&&(t.toggle.ariaExpanded="true"),t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;var n;if(this.animationInProcess=!0,t){var o=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(o,(function(){return e.destroyPopper()}))}else this.destroyPopper();e.menu.style.margin=null,(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="false"),e.el.classList.remove("open"),e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.dropdown",e.el,e.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1 .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle.addEventListener("click",(function(e){return t.onClickHandler(e)})),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click")},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ",""));"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;if(this.animationInProcess=!0,t){var n=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(n,(function(){return e.destroyPopper()}))}else this.destroyPopper();this.menu.style.margin=null,this.el.classList.remove("open"),this.fireEvent("close",this.el),(0,l.dispatch)("close.hs.dropdown",this.el,this.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t',s.extensions=_.merge({default:{icon:'',class:"size-5"},xls:{icon:'',class:"size-5"},doc:{icon:'',class:"size-5"},zip:{icon:'',class:"size-5"}},a.extensions),s.singleton=a.singleton,s.concatOptions=r(r({clickable:s.el.querySelector("[data-hs-file-upload-trigger]"),previewsContainer:s.el.querySelector("[data-hs-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:s.previewTemplate,autoHideTrigger:!1},a),n),s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()},e.prototype.initDropzone=function(){var t=this,e=this.el.querySelector("[data-hs-file-upload-clear]"),n=Array.from(this.el.querySelectorAll("[data-hs-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(function(e){return t.onAddFile(e)})),this.dropzone.on("removedfile",(function(){return t.onRemoveFile()})),this.dropzone.on("uploadprogress",(function(e,n){return t.onUploadProgress(e,n)})),this.dropzone.on("complete",(function(e){return t.onComplete(e)})),e&&(e.onclick=function(){t.dropzone.files.length&&t.dropzone.removeAllFiles(!0)}),n.length&&n.forEach((function(e){e.onclick=function(){var e,n;(null===(e=t.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(n=t.concatOptions)||void 0===n?void 0:n.clickable).click()}}))},e.prototype.onAddFile=function(t){var e=this,n=t.previewElement,o=t.previewElement.querySelector("[data-hs-file-upload-reload]");if(!n)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),o&&o.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var o=document.createElement("input");o.type="file",o.click(),o.addEventListener("change",(function(n){var o,i=null===(o=n.target.files)||void 0===o?void 0:o[0];if(i){var r=i;r.status=Dropzone.ADDED,r.accepted=!0,r.previewElement=t.previewElement,r.previewTemplate=t.previewTemplate,r.previewsContainer=t.previewsContainer,e.dropzone.removeFile(t),e.dropzone.addFile(r)}}))})),this.previewAccepted(t)},e.prototype.previewAccepted=function(t){var e=this,n=t.previewElement,o=this.splitFileName(t.name),i=n.querySelector("[data-hs-file-upload-file-name]"),r=n.querySelector("[data-hs-file-upload-file-ext]"),s=n.querySelector("[data-hs-file-upload-file-size]"),l=n.querySelector("[data-hs-file-upload-file-icon]"),a=this.el.querySelector("[data-hs-file-upload-trigger]"),c=n.querySelector("[data-dz-thumbnail]"),u=n.querySelector("[data-hs-file-upload-remove]");i&&(i.textContent=o.name),r&&(r.textContent=o.extension),s&&(s.textContent=this.formatFileSize(t.size)),c&&(t.type.includes("image/")?c.classList.remove("hidden"):this.setIcon(o.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(a.style.display="none"),u&&(u.onclick=function(){return e.dropzone.removeFile(t)})},e.prototype.onRemoveFile=function(){var t=this.el.querySelector("[data-hs-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")},e.prototype.onUploadProgress=function(t,e){var n=t.previewElement;if(!n)return!1;var o=n.querySelector("[data-hs-file-upload-progress-bar]"),i=n.querySelector("[data-hs-file-upload-progress-bar-pane]"),r=n.querySelector("[data-hs-file-upload-progress-bar-value]"),s=Math.floor(e);o&&o.setAttribute("aria-valuenow","".concat(s)),i&&(i.style.width="".concat(s,"%")),r&&(r.innerText="".concat(s))},e.prototype.onComplete=function(t){var e=t.previewElement;if(!e)return!1;e.classList.add("complete")},e.prototype.setIcon=function(t,e){var n=this.createIcon(t);e.append(n)},e.prototype.createIcon=function(t){var e,n,o=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,l.htmlToElement)(this.extensions[t].icon):(0,l.htmlToElement)(this.extensions.default.icon);return(0,l.classToClassList)((null===(n=this.extensions[t])||void 0===n?void 0:n.class)?this.extensions[t].class:this.extensions.default.class,o),o},e.prototype.formatFileSize=function(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"},e.prototype.splitFileName=function(t){var e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}},e.getInstance=function(t,e){var n=window.$hsFileUploadCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsFileUploadCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a.default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&c.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=c),e.default=c},332:function(t,e,n){ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},770:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.checkIsNumberAndConvert=function(){var t=this.input.value.trim(),e=this.cleanAndExtractNumber(t);null!==e?(this.inputValue=e,this.input.value=e.toString()):(this.inputValue=0,this.input.value="0")},e.prototype.cleanAndExtractNumber=function(t){var e=[],n=!1;t.split("").forEach((function(t){t>="0"&&t<="9"?e.push(t):"."!==t||n||(e.push(t),n=!0)}));var o=e.join(""),i=parseFloat(o);return isNaN(i)?null:i},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},850:function(t,e,n){ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.openedBreakpoint})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.openedBreakpoint})).forEach((function(t){c.setOpened(t.element.openedBreakpoint,t)}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},659:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.overlay.classList.contains("opened")})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("opened")})).forEach((function(t){var e=parseInt(window.getComputedStyle(t.element.overlay).getPropertyValue("z-index")),n=document.querySelector("#".concat(t.element.overlay.id,"-backdrop"));if(e===parseInt(window.getComputedStyle(n).getPropertyValue("z-index"))+1)return!1;"style"in n&&(n.style.zIndex="".concat(e-1)),document.body.classList.add("hs-overlay-body-open")}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},60:function(t,e,n){ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},139:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},911:function(t,e,n){ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},961:function(t,e,n){ -/* - * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]",o.dropdownClasses=l.dropdownClasses||"absolute top-full z-[1] w-full bg-white border border-gray-200 rounded-md hidden mt-2",o.dropdownItemTemplate=l.dropdownItemTemplate||"
",o.dropdownItemTemplatesByType=l.dropdownItemTemplatesByType||null,o.dropdownItemClasses=l.dropdownItemClasses||"py-2 px-4 w-full cursor-pointer text-sm hover:bg-gray-300 hover:text-black",o.highlightedTextTagName=l.highlightedTextTagName||"u",o.highlightedTextClasses=l.highlightedTextClasses||"bg-green-200",o.jsonUrl&&o.fetchData().then((function(){return o.init()})),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsSearchByJsonCollection,this),this.buildDropdown(),this.el.addEventListener("input",(0,c.debounce)((function(e){t.val=e.target.value,t.val.length>t.minChars?t.searchData(t.val):t.result=[],t.result.length?t.dropdown.classList.remove("hidden"):t.dropdown.classList.add("hidden"),t.buildItems()})))},e.prototype.fetchData=function(){return s(this,void 0,void 0,(function(){var t=this;return l(this,(function(e){switch(e.label){case 0:return[4,fetch(this.jsonUrl).then((function(t){return t.json()})).then((function(e){return t.json=e}))];case 1:return e.sent(),[2]}}))}))},e.prototype.searchData=function(t){this.result=this.json.filter((function(e){var n=t.toLowerCase(),o=e.title.toLowerCase(),i=e.description.toLowerCase();return o.includes(n)||i.includes(n)}))},e.prototype.buildDropdown=function(){this.dropdown=(0,c.htmlToElement)(this.dropdownTemplate),this.dropdownClasses&&(0,c.classToClassList)(this.dropdownClasses,this.dropdown),this.el.after(this.dropdown)},e.prototype.buildItems=function(){var t=this;this.dropdown.innerHTML="",this.result.forEach((function(e){var n=(0,c.htmlToElement)(''));n.append(t.itemTemplate(e)),t.dropdown.append(n)}))},e.prototype.itemTemplate=function(t){var e=new RegExp(this.val,"gi"),n=t.title.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),o=t.description.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),i=this.dropdownItemTemplatesByType?this.dropdownItemTemplatesByType.find((function(e){return e.type===t.type})):null,r=i?(0,c.htmlToElement)(i.markup):(0,c.htmlToElement)(this.dropdownItemTemplate);this.dropdownItemClasses&&(0,c.classToClassList)(this.dropdownItemClasses,r);var s=r.querySelector("[data-title]");s?s.append((0,c.htmlToElement)("".concat(n,""))):r.append((0,c.htmlToElement)("".concat(n,"")));var l=r.querySelector("[data-description]");if(l)l.append((0,c.htmlToElement)("".concat(o,"")));else if(!i){var a=(0,c.htmlToElement)("
");r.append(a),r.append((0,c.htmlToElement)("".concat(o,"")))}return r},e.getInstance=function(t){var e=window.$hsSearchByJsonCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return e?e.element:null},e.autoInit=function(){window.$hsSearchByJsonCollection||(window.$hsSearchByJsonCollection=[]),document.querySelectorAll("[data-hs-search-by-json]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsSearchByJsonCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a(n(737)).default);window.addEventListener("load",(function(){u.autoInit()})),"undefined"!=typeof window&&(window.HSSearchByJson=u),e.default=u},233:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,i=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),r=parseInt(String(e.getBoundingClientRect().top))-o-i,l=e.offsetHeight;if(r<=0&&r+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},442:function(t,e,n){ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),e=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&e&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),this.toggle.addEventListener("click",(function(){if(o.isDisabled)return!1;o.isOpened?o.close():o.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o){var i=this;void 0===o&&(o="1");var r=null,s=(0,a.htmlToElement)(this.optionTag||"
");if(s.setAttribute("data-value",e),s.setAttribute("data-title-value",t),s.setAttribute("tabIndex",o),s.classList.add("cursor-pointer"),this.optionTemplate&&(r=(0,a.htmlToElement)(this.optionTemplate),s.append(r)),r?r.querySelector("[data-title]").textContent=t||"":s.textContent=t||"",n){if(n.icon){var l=(0,a.htmlToElement)(n.icon);if(l.classList.add("mw-full"),r)r.querySelector("[data-icon]").append(l);else{var c=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,c),c.append(l),s.append(c)}}if(n.description)if(r)r.querySelector("[data-description]").append(n.description);else{var u=(0,a.htmlToElement)("
");u.textContent=n.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,u),s.append(u)}}r&&r.querySelector("[data-icon]")&&!n&&!(null==n?void 0:n.icon)&&r.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&s.classList.add("selected"),s.addEventListener("click",(function(){return i.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,s),this.dropdown&&this.dropdown.append(s)},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n){var o=(0,a.htmlToElement)("");o.setAttribute("value",e),o.setAttribute("data-hs-select-option",JSON.stringify(n)),o.innerText=t,this.el.append(o)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){this.el.value="".concat(this.value);var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,options:n}],!1)},e.prototype.removeSelectOption=function(t){if(!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t}))},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.stringFromValue=function(){var t=this,e=[];return this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems?"".concat(e.length," ").concat(this.toggleCountText):e.join(", ")},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0,Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")})).classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){t.wrapper.classList.add("active"),t.dropdown.classList.add("opened"),t.hasSearch&&!t.preventSearchFocus&&t.search.focus(),t.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){o.dropdown.classList.add("hidden"),o.hasSearch&&(o.search.value="",o.search.dispatchEvent(new Event("input",{bubbles:!0})),o.search.blur()),o.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r),e.buildOption(o,i,r,n),e.buildOriginalOption(o,i,r))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t){!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Tab":t.preventDefault(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},957:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),n=this.toggle.querySelector("[data-icon]"),o=this.toggle.querySelector("[data-title]"),!this.isMultiple&&n&&this.setToggleIcon(),!this.isMultiple&&o&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,o||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),(null===(e=this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(){if(i.isDisabled)return!1;i.isOpened?i.close():i.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.disabled,e.selected,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o,i,r){var l=this;void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===r&&(r="1");var c=null,u=(0,a.htmlToElement)(this.optionTag||"
");if(u.setAttribute("data-value",e),u.setAttribute("data-title-value",t),u.setAttribute("tabIndex",r),u.classList.add("cursor-pointer"),n&&u.classList.add("disabled"),o&&(this.isMultiple?this.value=s(s([],this.value,!0),[e],!1):this.value=e),this.optionTemplate&&(c=(0,a.htmlToElement)(this.optionTemplate),u.append(c)),c?c.querySelector("[data-title]").textContent=t||"":u.textContent=t||"",i){if(i.icon){var d=(0,a.htmlToElement)(i.icon);if(d.classList.add("max-w-full"),c)c.querySelector("[data-icon]").append(d);else{var p=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,p),p.append(d),u.append(p)}}if(i.description)if(c)c.querySelector("[data-description]").append(i.description);else{var h=(0,a.htmlToElement)("
");h.textContent=i.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,h),u.append(h)}}c&&c.querySelector("[data-icon]")&&!i&&!(null==i?void 0:i.icon)&&c.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&u.classList.add("selected"),n||u.addEventListener("click",(function(){return l.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,u),this.dropdown&&this.dropdown.append(u),o&&this.setNewValue()},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n,o,i){var r=(0,a.htmlToElement)("");r.setAttribute("value",e),n&&r.setAttribute("disabled","disabled"),o&&r.setAttribute("selected","selected"),r.setAttribute("data-hs-select-option",JSON.stringify(i)),r.innerText=t,this.el.append(r)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n,o,i){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,disabled:n,selected:o,options:i}],!1)},e.prototype.removeSelectOption=function(t,e){if(void 0===e&&(e=!1),!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t})),console.log(e),this.value=e?this.value.filter((function(e){return e!==t})):t,console.log(this.value)},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():(console.log(),this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder)},e.prototype.stringFromValue=function(){var t=this,e=[],n="";if(this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems)if("nItemsAndCount"===this.toggleCountTextMode){var o=e.slice(0,this.toggleCountTextMinItems-1);n="".concat(o.join(this.toggleSeparators.items)," ").concat(this.toggleSeparators.betweenItemsAndCounter," ").concat(e.length-o.length," ").concat(this.toggleCountText)}else n="".concat(e.length," ").concat(this.toggleCountText);else n=e.join(this.toggleSeparators.items);return n},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0;var e=Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")}));e&&e.classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t,e=this,n=(null===(t=null===window||void 0===window?void 0:window.$hsSelectCollection)||void 0===t?void 0:t.find((function(t){return t.element.isOpened})))||null;if(n&&n.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.wrapper.classList.add("active"),e.dropdown.classList.add("opened"),e.hasSearch&&!e.preventSearchFocus&&e.search.focus(),e.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o,i=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){i.dropdown.classList.add("hidden"),i.hasSearch&&(i.search.value="",i.search.dispatchEvent(new Event("input",{bubbles:!0})),i.search.blur()),i.animationInProcess=!1})),null===(o=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===o||o.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.disabled,s=t.selected,l=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r,s,l),e.buildOption(o,i,r,s,l,n),e.buildOriginalOption(o,i,r,s,l),s&&!e.isMultiple&&e.onSelectOption(i))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t,n){void 0===n&&(n=!1),!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t,n),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t,e.isMultiple)})):n(t,this.isMultiple),this.setNewValue()},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.open=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.isOpened&&e.element.open()},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":t.preventDefault(),t.stopImmediatePropagation(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},887:function(t,e,n){ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,m=e.hasError,v=void 0!==m&&m;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},983:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,v=e.hasError,m=void 0!==v&&v;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),m&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:m,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},97:function(t,e,n){ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},679:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},969:function(t,e,n){ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ /* * HSStaticMethods - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var o=n(969),i=n(362),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(700)})())); \ No newline at end of file +Object.defineProperty(e,"__esModule",{value:!0});var o=n(292),i=n(255),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))},cleanCollection:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.collection;window[e]instanceof Array&&(window[e]=[])})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.collection;t.includes(n)&&window[o]instanceof Array&&(window[o]=[])}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(158)})())); \ No newline at end of file diff --git a/dist/input-number.d.ts b/dist/input-number.d.ts index adaf4e0..94ccba3 100644 --- a/dist/input-number.d.ts +++ b/dist/input-number.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; @@ -32,6 +30,8 @@ declare class HSInputNumber extends HSBasePlugin implements private readonly step; constructor(el: HTMLElement, options?: IInputNumberOptions); private init; + private checkIsNumberAndConvert; + private cleanAndExtractNumber; private build; private buildInput; private buildIncrement; diff --git a/dist/input-number.js b/dist/input-number.js index acfadd2..a50f5fb 100644 --- a/dist/input-number.js +++ b/dist/input-number.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},371:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},332:function(t,e,n){ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var i,r=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__assign||function(){return s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0?a.step:1,i.init(),i}return r(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var i={inputValue:this.inputValue},r=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,s=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var o=this.inputValue+this.step;this.inputValue=o>=r&&o<=s?o:s,this.input.value=this.inputValue.toString();break;case"decrement":var u=this.inputValue-this.step;this.inputValue=u>=r&&u<=s?u:r,this.input.value=this.inputValue.toString();break;default:var l=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=l>=s?s:l<=r?r:l,this.inputValue<=r&&(this.input.value=this.inputValue.toString())}i.inputValue=this.inputValue,this.inputValue===r?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===s?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",i),(0,a.dispatch)("change.hs.inputNumber",this.el,i)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(o(n(737)).default);window.addEventListener("load",(function(){u.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=u),e.default=u},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,i,r){void 0===n&&(n="auto"),void 0===i&&(i=10),void 0===r&&(r=null);var s=e.getBoundingClientRect(),o=r?r.getBoundingClientRect():null,a=window.innerHeight,u=o?s.top-o.top:s.top,l=(r?o.bottom:a)-s.bottom,c=t.clientHeight+i;return"bottom"===n?l>=c:"top"===n?u>=c:u>=c||l>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var r=[],s=0;sthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,n),s.exports}(371);return n})())); \ No newline at end of file +var i,r=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0?u.step:1,i.init(),i}return r(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.checkIsNumberAndConvert=function(){var t=this.input.value.trim(),e=this.cleanAndExtractNumber(t);null!==e?(this.inputValue=e,this.input.value=e.toString()):(this.inputValue=0,this.input.value="0")},e.prototype.cleanAndExtractNumber=function(t){var e=[],n=!1;t.split("").forEach((function(t){t>="0"&&t<="9"?e.push(t):"."!==t||n||(e.push(t),n=!0)}));var i=e.join(""),r=parseFloat(i);return isNaN(r)?null:r},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var i={inputValue:this.inputValue},r=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,o=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=r&&s<=o?s:o,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=r&&a<=o?a:r,this.input.value=this.inputValue.toString();break;default:var l=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=l>=o?o:l<=r?r:l,this.inputValue<=r&&(this.input.value=this.inputValue.toString())}i.inputValue=this.inputValue,this.inputValue===r?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===o?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",i),(0,u.dispatch)("change.hs.inputNumber",this.el,i)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=i(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:n};var i=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=i;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,i,r){void 0===n&&(n="auto"),void 0===i&&(i=10),void 0===r&&(r=null);var o=e.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,u=window.innerHeight,a=s?o.top-s.top:o.top,l=(r?s.bottom:u)-o.bottom,c=t.clientHeight+i;return"bottom"===n?l>=c:"top"===n?a>=c:a>=c||l>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var r=function(t){return!!t&&("none"===window.getComputedStyle(t).display||r(t.parentElement))};e.isParentOrElementHidden=r;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var r=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(332);return n})())); \ No newline at end of file diff --git a/dist/overlay.d.ts b/dist/overlay.d.ts index 94a7746..5290625 100644 --- a/dist/overlay.d.ts +++ b/dist/overlay.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; @@ -20,6 +18,7 @@ export interface ICollectionItem { } export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; @@ -31,9 +30,11 @@ export interface IOverlay { } declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass; + private readonly emulateScrollbarSpace; private readonly isClosePrev; private readonly backdropClasses; private readonly backdropExtraClasses; + private readonly animationTarget; private openNextOverlay; private autoHide; private readonly overlayId; @@ -52,6 +53,7 @@ declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private buildBackdrop; private destroyBackdrop; private focusElement; + private getScrollbarSize; open(): false | Promise; close(forceClose?: boolean): Promise; static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem; diff --git a/dist/overlay.js b/dist/overlay.js index 24938d7..d54fe4f 100644 --- a/dist/overlay.js +++ b/dist/overlay.js @@ -1,17 +1,17 @@ -!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={190:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(e,t)=>{ +!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={223:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(e,t)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -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){ +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},850:function(e,t,o){ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var n,r=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=e?(document.body.classList.add("hs-overlay-body-open"),t.element.overlay.classList.add("opened")):t.element.close(!0)},t.accessibility=function(e){var t,o,n=window.$hsOverlayCollection.filter((function(e){return e.element.overlay.classList.contains("open")})),r=n[n.length-1],i=null===(o=null===(t=null==r?void 0:r.element)||void 0===t?void 0:t.overlay)||void 0===o?void 0:o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),l=[];(null==i?void 0:i.length)&&i.forEach((function(e){(0,a.isParentOrElementHidden)(e)||l.push(e)}));var s=r&&!e.metaKey;if(s&&!r.element.isTabAccessibilityLimited&&"Tab"===e.code)return!1;s&&l.length&&"Tab"===e.code&&(e.preventDefault(),this.onTab(r,l)),s&&"Escape"===e.code&&(e.preventDefault(),this.onEscape(r))},t.onEscape=function(e){e&&e.element.hasAbilityToCloseOnBackdropClick&&e.element.close()},t.onTab=function(e,t){if(!t.length)return!1;var o=e.element.overlay.querySelector(":focus"),n=Array.from(t).indexOf(o);n>-1?t[(n+1)%t.length].focus():t[0].focus()},t.on=function(e,t,o){var n=window.$hsOverlayCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)||e.element.overlay===("string"==typeof t?document.querySelector(t):t)}));n&&(n.element.events[e]=o)},t}(l(o(737)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(e){return e.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(e){return e.element.autoClose})).forEach((function(e){document.body.clientWidth>=e.element.autoClose&&e.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(e){return e.element.openedBreakpoint})))return!1;window.$hsOverlayCollection.filter((function(e){return e.element.openedBreakpoint})).forEach((function(e){c.setOpened(e.element.openedBreakpoint,e)}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),t.default=c},969:function(e,t){var o=this;Object.defineProperty(t,"__esModule",{value:!0}),t.menuSearchHistory=t.classToClassList=t.htmlToElement=t.afterTransition=t.dispatch=t.debounce=t.isFormElement=t.isParentOrElementHidden=t.isEnoughSpace=t.isIpadOS=t.isIOS=t.getClassPropertyAlt=t.getClassProperty=t.stringToBoolean=void 0;t.stringToBoolean=function(e){return"true"===e};t.getClassProperty=function(e,t,o){return void 0===o&&(o=""),(window.getComputedStyle(e).getPropertyValue(t)||o).replace(" ","")};t.getClassPropertyAlt=function(e,t,o){void 0===o&&(o="");var n="";return e.classList.forEach((function(e){e.includes(t)&&(n=e)})),n.match(/:(.*)]/)?n.match(/:(.*)]/)[1]:o};t.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,o,n,r){void 0===o&&(o="auto"),void 0===n&&(n=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),l=r?r.getBoundingClientRect():null,a=window.innerHeight,s=l?i.top-l.top:i.top,c=(r?l.bottom:a)-i.bottom,u=e.clientHeight+n;return"bottom"===o?c>=u:"top"===o?s>=u:s>=u||c>=u};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var n=function(e){return!!e&&("none"===window.getComputedStyle(e).display||n(e.parentElement))};t.isParentOrElementHidden=n;t.debounce=function(e,t){var n;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};var o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(770);return o})())); \ No newline at end of file +var n,r=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)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=e?(document.body.classList.add("hs-overlay-body-open"),t.element.overlay.classList.add("opened")):t.element.close(!0)},t.accessibility=function(e){var t,o,n=window.$hsOverlayCollection.filter((function(e){return e.element.overlay.classList.contains("open")})),r=n[n.length-1],i=null===(o=null===(t=null==r?void 0:r.element)||void 0===t?void 0:t.overlay)||void 0===o?void 0:o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),l=[];(null==i?void 0:i.length)&&i.forEach((function(e){(0,a.isParentOrElementHidden)(e)||l.push(e)}));var s=r&&!e.metaKey;if(s&&!r.element.isTabAccessibilityLimited&&"Tab"===e.code)return!1;s&&l.length&&"Tab"===e.code&&(e.preventDefault(),this.onTab(r,l)),s&&"Escape"===e.code&&(e.preventDefault(),this.onEscape(r))},t.onEscape=function(e){e&&e.element.hasAbilityToCloseOnBackdropClick&&e.element.close()},t.onTab=function(e,t){if(!t.length)return!1;var o=e.element.overlay.querySelector(":focus"),n=Array.from(t).indexOf(o);n>-1?t[(n+1)%t.length].focus():t[0].focus()},t.on=function(e,t,o){var n=window.$hsOverlayCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)||e.element.overlay===("string"==typeof t?document.querySelector(t):t)}));n&&(n.element.events[e]=o)},t}(l(o(961)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(e){return e.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(e){return e.element.autoClose})).forEach((function(e){document.body.clientWidth>=e.element.autoClose&&e.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(e){return e.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(e){return e.element.autoClose})).forEach((function(e){document.body.clientWidth>=e.element.autoClose&&e.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(e){return e.element.overlay.classList.contains("opened")})))return!1;window.$hsOverlayCollection.filter((function(e){return e.element.overlay.classList.contains("opened")})).forEach((function(e){var t=parseInt(window.getComputedStyle(e.element.overlay).getPropertyValue("z-index")),o=document.querySelector("#".concat(e.element.overlay.id,"-backdrop"));if(t===parseInt(window.getComputedStyle(o).getPropertyValue("z-index"))+1)return!1;"style"in o&&(o.style.zIndex="".concat(t-1)),document.body.classList.add("hs-overlay-body-open")}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),t.default=c},292:function(e,t){var o=this;Object.defineProperty(t,"__esModule",{value:!0}),t.menuSearchHistory=t.classToClassList=t.htmlToElement=t.afterTransition=t.dispatch=t.debounce=t.isFormElement=t.isParentOrElementHidden=t.isEnoughSpace=t.isIpadOS=t.isIOS=t.getZIndex=t.getClassPropertyAlt=t.getClassProperty=t.stringToBoolean=void 0,t.getHighestZIndex=function(e){var t=Number.NEGATIVE_INFINITY;return e.forEach((function(e){var o=n(e);"auto"!==o&&(o=parseInt(o,10))>t&&(t=o)})),t};t.stringToBoolean=function(e){return"true"===e};t.getClassProperty=function(e,t,o){return void 0===o&&(o=""),(window.getComputedStyle(e).getPropertyValue(t)||o).replace(" ","")};t.getClassPropertyAlt=function(e,t,o){void 0===o&&(o="");var n="";return e.classList.forEach((function(e){e.includes(t)&&(n=e)})),n.match(/:(.*)]/)?n.match(/:(.*)]/)[1]:o};var n=function(e){return window.getComputedStyle(e).getPropertyValue("z-index")};t.getZIndex=n;t.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,o,n,r){void 0===o&&(o="auto"),void 0===n&&(n=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),l=r?r.getBoundingClientRect():null,a=window.innerHeight,s=l?i.top-l.top:i.top,c=(r?l.bottom:a)-i.bottom,d=e.clientHeight+n;return"bottom"===o?c>=d:"top"===o?s>=d:s>=d||c>=d};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var r=function(e){return!!e&&("none"===window.getComputedStyle(e).display||r(e.parentElement))};t.isParentOrElementHidden=r;t.debounce=function(e,t){var n;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};var o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(850);return o})())); \ No newline at end of file diff --git a/dist/pin-input.d.ts b/dist/pin-input.d.ts index 0add57c..8c574c2 100644 --- a/dist/pin-input.d.ts +++ b/dist/pin-input.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/pin-input.js b/dist/pin-input.js index 1e43c6e..5f96358 100644 --- a/dist/pin-input.js +++ b/dist/pin-input.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},659:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},60:function(t,e,n){ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,u=window.innerHeight,a=s?r.top-s.top:r.top,l=(i?s.bottom:u)-r.bottom,c=t.clientHeight+o;return"bottom"===n?l>=c:"top"===n?a>=c:a>=c||l>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(659);return n})())); \ No newline at end of file +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(u(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),u=i?i.getBoundingClientRect():null,s=window.innerHeight,a=u?r.top-u.top:r.top,l=(i?u.bottom:s)-r.bottom,c=t.clientHeight+o;return"bottom"===n?l>=c:"top"===n?a>=c:a>=c||l>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(60);return n})())); \ No newline at end of file diff --git a/dist/preline.d.ts b/dist/preline.d.ts index 6385c6f..3fd3f92 100644 --- a/dist/preline.d.ts +++ b/dist/preline.d.ts @@ -1,5 +1,3 @@ - - export interface ICopyMarkupOptions { targetSelector: string; wrapperSelector: string; @@ -81,6 +79,7 @@ export interface ICarouselOptions { isAutoPlay?: boolean; speed?: number; isInfiniteLoop?: boolean; + isRTL?: boolean; } export interface ICarousel { options?: ICarouselOptions; @@ -102,6 +101,7 @@ export declare class HSCarousel extends HSBasePlugin implement private readonly loadingClassesAdd; private readonly afterLoadingClassesAdd; private readonly isAutoPlay; + private readonly isRTL; private readonly speed; private readonly isInfiniteLoop; private timer; @@ -117,6 +117,7 @@ export declare class HSCarousel extends HSBasePlugin implement private resetTimer; private detectDirection; recalculateWidth(): void; + private calculateTransform; goToPrev(): void; goToNext(): void; goTo(i: number): void; @@ -272,11 +273,13 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementPopper> imp private readonly closers; menu: HTMLElement | null; private eventMode; - private readonly closeMode; + private closeMode; private animationInProcess; constructor(el: IHTMLElementPopper, options?: {}, events?: {}); private init; resizeHandler(): void; + private buildToggle; + private buildMenu; private buildClosers; private onClickHandler; private onMouseEnterHandler; @@ -317,6 +320,8 @@ export declare class HSInputNumber extends HSBasePlugin imp private readonly step; constructor(el: HTMLElement, options?: IInputNumberOptions); private init; + private checkIsNumberAndConvert; + private cleanAndExtractNumber; private build; private buildInput; private buildIncrement; @@ -332,6 +337,7 @@ export declare class HSInputNumber extends HSBasePlugin imp } export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; @@ -343,9 +349,11 @@ export interface IOverlay { } export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass; + private readonly emulateScrollbarSpace; private readonly isClosePrev; private readonly backdropClasses; private readonly backdropExtraClasses; + private readonly animationTarget; private openNextOverlay; private autoHide; private readonly overlayId; @@ -364,6 +372,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private buildBackdrop; private destroyBackdrop; private focusElement; + private getScrollbarSize; open(): false | Promise; close(forceClose?: boolean): Promise; static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem; @@ -419,48 +428,6 @@ export declare class HSRemoveElement extends HSBasePlugin private remove; static autoInit(): void; } -export interface ISearchItemTemplate { - type: string; - markup: string; -} -export interface ISearchByJsonOptions { - jsonUrl: string; - minChars?: number; - dropdownTemplate?: string; - dropdownClasses?: string; - dropdownItemTemplate?: string; - dropdownItemTemplatesByType?: ISearchItemTemplate[]; - dropdownItemClasses?: string; - highlightedTextTagName?: string; - highlightedTextClasses?: string; -} -export interface ISearchByJson { - options?: ISearchByJsonOptions; -} -export declare class HSSearchByJson extends HSBasePlugin implements ISearchByJson { - private readonly jsonUrl; - private readonly minChars; - private json; - private result; - private val; - private readonly dropdownTemplate; - private readonly dropdownClasses; - private readonly dropdownItemTemplate; - private readonly dropdownItemTemplatesByType; - private readonly dropdownItemClasses; - private readonly highlightedTextTagName; - private readonly highlightedTextClasses; - private dropdown; - constructor(el: HTMLInputElement, options?: ISearchByJsonOptions); - private init; - private fetchData; - private searchData; - private buildDropdown; - private buildItems; - private itemTemplate; - static getInstance(target: HTMLElement | string): HSSearchByJson; - static autoInit(): void; -} export interface IScrollspy { options?: {}; } @@ -486,6 +453,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } export interface ISelectOptions { @@ -499,8 +468,13 @@ export interface ISelectOptions { wrapperClasses?: string; toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; tagsInputClasses?: string; @@ -547,8 +521,10 @@ export declare class HSSelect extends HSBasePlugin implements IS selectedItems: string[]; private readonly toggleTag; private readonly toggleClasses; + private readonly toggleSeparators; private readonly toggleCountText; private readonly toggleCountTextMinItems; + private readonly toggleCountTextMode; private readonly wrapperClasses; private readonly tagsItemTemplate; private readonly tagsItemClasses; @@ -582,6 +558,7 @@ export declare class HSSelect extends HSBasePlugin implements IS private readonly isAddTagOnEnter; private tagsInputHelper; constructor(el: HTMLElement, options?: ISelectOptions); + setValue(val: string | string[]): void; private init; private build; private buildWrapper; @@ -626,6 +603,7 @@ export declare class HSSelect extends HSBasePlugin implements IS recalculateDirection(): void; static getInstance(target: HTMLElement | string, isInstance?: boolean): HSSelect | ICollectionItem; static autoInit(): void; + static open(target: HTMLElement | string): void; static close(target: HTMLElement | string): void; static closeCurrentlyOpened(evtTarget?: HTMLElement | null): void; static accessibility(evt: KeyboardEvent): void; @@ -894,7 +872,15 @@ export interface IStaticMethods { getClassProperty(el: HTMLElement, prop?: string, val?: string): string; afterTransition(el: HTMLElement, cb: Function): void; autoInit(collection?: string | string[]): void; + cleanCollection(collection?: string | string[]): void; } export declare const HSStaticMethods: IStaticMethods; +declare let HSDataTableModule: any; +declare let HSFileUploadModule: any; + +export { + HSDataTableModule as HSDataTable, + HSFileUploadModule as HSFileUpload, +}; export {}; diff --git a/dist/preline.js b/dist/preline.js index 53a9e95..25a7640 100644 --- a/dist/preline.js +++ b/dist/preline.js @@ -1,169 +1,177 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={492:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>gt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>v,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>g,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",m=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),v=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),y="beforeRead",g="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[y,g,w,b,C,S,x,I,T];function O(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof L(t).Element||t instanceof Element}function _(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&O(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&O(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,j=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(D())}function M(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&j(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&j(o.height)/t.offsetHeight||1);var s=(A(t)?L(t):window).visualViewport,l=!$()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function H(t){var e=M(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function R(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function W(t){return L(t).getComputedStyle(t)}function V(t){return["table","td","th"].indexOf(O(t))>=0}function F(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||F(t)}function J(t){return _(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=L(t),n=J(t);n&&V(n)&&"static"===W(n).position;)n=J(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===W(t).position)return null;var n=U(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(O(n))<0;){var o=W(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,n){return q(t,N(e,n))}function z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=K(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var m=function(t,e){return z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,n),v=H(u),y="y"===h?o:s,g="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=Y(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=m[y],T=S-v[f]-m[g],E=S/2-v[f]/2+x,O=G(I,E,T),L=h;n.modifiersData[l]=((e={})[L]=O,e.centerOffset=O-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&R(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,v=t.isFixed,y=d.x,g=void 0===y?0:y,w=d.y,b=void 0===w?0:w,C="function"==typeof m?m({x:g,y:b}):{x:g,y:b};g=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var O=Y(n),A="clientHeight",_="clientWidth";if(O===L(n)&&"static"!==W(O=F(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(v&&O===E&&E.visualViewport?E.visualViewport.height:O[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,g-=(v&&O===E&&E.visualViewport?E.visualViewport.width:O[_])-l.width,g*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===m?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:j(n*i)/i||0,y:j(o*i)/i||0}}({x:g,y:b},L(n)):{x:g,y:b};return g=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?g+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return M(F(t)).left+ct(t).scrollLeft}function dt(t){var e=W(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(U(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=L(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(U(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,n){return e===p?ft(function(t,e){var n=L(t),o=F(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=$();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=M(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=F(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===W(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(F(t)))}function vt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(U(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&_(t)?Y(t):t;return A(n)?e.filter((function(t){return A(t)&&R(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=mt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),mt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function yt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?Z(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var m=d?K(d):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:e[m]=e[m]-(n[v]/2-l[v]/2);break;case u:e[m]=e[m]+(n[v]/2-l[v]/2)}}return e}function gt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,m=n.boundary,v=void 0===m?d:m,y=n.rootBoundary,g=void 0===y?p:y,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=z("number"!=typeof I?I:X(I,a)),E=b===h?f:h,O=t.rects.popper,L=t.elements[S?E:b],_=vt(A(L)?L:L.contextElement||F(t.elements.popper),v,g,u),k=M(t.elements.reference),P=yt({reference:k,element:O,strategy:"absolute",placement:l}),B=ft(Object.assign({},O,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},j=t.modifiersData.offset;if(b===h&&j){var D=j[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,y=n.fallbackPlacements,g=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),O=y||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),L=[T].concat(O).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,d=Z(o),p=d?l?m:m.filter((function(t){return Z(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=gt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:g,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=L[0],N=0;N=0,H=M?"width":"height",R=gt(e,{placement:j,boundary:w,rootBoundary:b,altBoundary:C,padding:g}),W=M?$?r:s:$?i:o;A[H]>_[H]&&(W=st(W));var V=st(W),F=[];if(p&&F.push(R[D]<=0),f&&F.push(R[W]<=0,R[V]<=0),F.every((function(t){return t}))){q=j,P=!1;break}k.set(j,F)}if(P)for(var U=function(t){var e=L.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},J=x?3:1;J>0;J--){if("break"===U(J))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=gt(e,{elementContext:"reference"}),l=gt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,g=void 0===y||y,w=n.tetherOffset,b=void 0===w?0:w,C=gt(e,{boundary:h,rootBoundary:f,padding:v,altBoundary:m}),S=B(e.placement),x=Z(e.placement),I=!x,T=K(S),E="x"===T?"y":"x",O=e.modifiersData.popperOffsets,L=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(O){if(u){var D,$="y"===T?o:s,M="y"===T?i:r,R="y"===T?"height":"width",W=O[T],V=W+C[$],F=W-C[M],U=g?-A[R]/2:0,J=x===c?L[R]:A[R],z=x===c?-A[R]:-L[R],X=e.elements.arrow,Q=g&&X?H(X):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[$],nt=tt[M],ot=G(0,L[R],Q[R]),it=I?L[R]/2-U-ot-et-k.mainAxis:J-ot-et-k.mainAxis,rt=I?-L[R]/2+U+ot+nt+k.mainAxis:z+ot+nt+k.mainAxis,st=e.elements.arrow&&Y(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=W+rt-at,ut=G(g?N(V,W+it-at-lt):V,W,g?q(F,ct):F);O[T]=ut,j[T]=ut-W}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=O[E],mt="y"===E?"height":"width",vt=ft+C[pt],yt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?vt:ft-L[mt]-A[mt]-bt+k.altAxis,St=wt?ft+L[mt]+A[mt]-bt-k.altAxis:yt,xt=g&&wt?function(t,e,n){var o=G(t,e,n);return o>n?n:o}(Ct,ft,St):G(g?Ct:vt,ft,g?St:yt);O[E]=xt,j[E]=xt-ft}e.modifiersData[l]=j}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,o=j(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=F(e),a=M(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==O(e)||dt(l))&&(c=(o=e)!==L(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=M(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Ot(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},700:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSSearchByJson=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(413);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(460);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(629);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(652);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(23);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(610);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(371);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(770);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(659);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(139);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(961);Object.defineProperty(e,"HSSearchByJson",{enumerable:!0,get:function(){return o(f).default}});var m=n(591);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(m).default}});var v=n(233);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var y=n(957);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(y).default}});var g=n(983);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var w=n(949);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(w).default}});var b=n(557);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(b).default}});var C=n(87);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(C).default}});var S=n(366);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(S).default}});var x=n(679);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(x).default}});var I=n(313);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(I).default}})},460:function(t,e,n){ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={170:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>g,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>yt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>m,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>y,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>v,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",v=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),m=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),g="beforeRead",y="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[g,y,w,b,C,S,x,I,T];function L(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof O(t).Element||t instanceof Element}function _(t){return t instanceof O(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof O(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&L(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&L(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,H=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(D())}function j(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&H(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&H(o.height)/t.offsetHeight||1);var s=(A(t)?O(t):window).visualViewport,l=!M()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function $(t){var e=j(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function V(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function R(t){return O(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(L(t))>=0}function W(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||W(t)}function U(t){return _(t)&&"fixed"!==R(t).position?t.offsetParent:null}function J(t){for(var e=O(t),n=U(t);n&&F(n)&&"static"===R(n).position;)n=U(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===R(t).position)return null;var n=z(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(L(n))<0;){var o=R(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Z(t,e,n){return q(t,N(e,n))}function K(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=Y(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var v=function(t,e){return K("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,a))}(c.padding,n),m=$(u),g="y"===h?o:s,y="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=J(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=v[g],T=S-m[f]-v[y],E=S/2-m[f]/2+x,L=Z(I,E,T),O=h;n.modifiersData[l]=((e={})[O]=L,e.centerOffset=L-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&V(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,v=t.roundOffsets,m=t.isFixed,g=d.x,y=void 0===g?0:g,w=d.y,b=void 0===w?0:w,C="function"==typeof v?v({x:y,y:b}):{x:y,y:b};y=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var L=J(n),A="clientHeight",_="clientWidth";if(L===O(n)&&"static"!==R(L=W(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(m&&L===E&&E.visualViewport?E.visualViewport.height:L[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,y-=(m&&L===E&&E.visualViewport?E.visualViewport.width:L[_])-l.width,y*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===v?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(o*i)/i||0}}({x:y,y:b},O(n)):{x:y,y:b};return y=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?y+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:X(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=O(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=O(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return j(W(t)).left+ct(t).scrollLeft}function dt(t){var e=R(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(z(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=O(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(z(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,e,n){return e===p?ft(function(t,e){var n=O(t),o=W(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=M();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=j(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=W(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===R(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(W(t)))}function mt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(z(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&_(t)?J(t):t;return A(n)?e.filter((function(t){return A(t)&&V(t,n)&&"body"!==L(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=vt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),vt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function gt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?X(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var v=d?Y(d):null;if(null!=v){var m="y"===v?"height":"width";switch(p){case c:e[v]=e[v]-(n[m]/2-l[m]/2);break;case u:e[v]=e[v]+(n[m]/2-l[m]/2)}}return e}function yt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,v=n.boundary,m=void 0===v?d:v,g=n.rootBoundary,y=void 0===g?p:g,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=K("number"!=typeof I?I:G(I,a)),E=b===h?f:h,L=t.rects.popper,O=t.elements[S?E:b],_=mt(A(O)?O:O.contextElement||W(t.elements.popper),m,y,u),k=j(t.elements.reference),P=gt({reference:k,element:L,strategy:"absolute",placement:l}),B=ft(Object.assign({},L,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},H=t.modifiersData.offset;if(b===h&&H){var D=H[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,g=n.fallbackPlacements,y=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),L=g||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),O=[T].concat(L).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?m:c,d=X(o),p=d?l?v:v.filter((function(t){return X(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=yt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:y,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=O[0],N=0;N=0,$=j?"width":"height",V=yt(e,{placement:H,boundary:w,rootBoundary:b,altBoundary:C,padding:y}),R=j?M?r:s:M?i:o;A[$]>_[$]&&(R=st(R));var F=st(R),W=[];if(p&&W.push(V[D]<=0),f&&W.push(V[R]<=0,V[F]<=0),W.every((function(t){return t}))){q=H,P=!1;break}k.set(H,W)}if(P)for(var z=function(t){var e=O.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},U=x?3:1;U>0;U--){if("break"===z(U))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),l=yt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=m.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,v=n.altBoundary,m=n.padding,g=n.tether,y=void 0===g||g,w=n.tetherOffset,b=void 0===w?0:w,C=yt(e,{boundary:h,rootBoundary:f,padding:m,altBoundary:v}),S=B(e.placement),x=X(e.placement),I=!x,T=Y(S),E="x"===T?"y":"x",L=e.modifiersData.popperOffsets,O=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(L){if(u){var D,M="y"===T?o:s,j="y"===T?i:r,V="y"===T?"height":"width",R=L[T],F=R+C[M],W=R-C[j],z=y?-A[V]/2:0,U=x===c?O[V]:A[V],K=x===c?-A[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[M],nt=tt[j],ot=Z(0,O[V],Q[V]),it=I?O[V]/2-z-ot-et-k.mainAxis:U-ot-et-k.mainAxis,rt=I?-O[V]/2+z+ot+nt+k.mainAxis:K+ot+nt+k.mainAxis,st=e.elements.arrow&&J(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=R+rt-at,ut=Z(y?N(F,R+it-at-lt):F,R,y?q(W,ct):W);L[T]=ut,H[T]=ut-R}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=L[E],vt="y"===E?"height":"width",mt=ft+C[pt],gt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?mt:ft-O[vt]-A[vt]-bt+k.altAxis,St=wt?ft+O[vt]+A[vt]-bt-k.altAxis:gt,xt=y&&wt?function(t,e,n){var o=Z(t,e,n);return o>n?n:o}(Ct,ft,St):Z(y?Ct:mt,ft,y?St:gt);L[E]=xt,H[E]=xt-ft}e.modifiersData[l]=H}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=H(e.width)/t.offsetWidth||1,o=H(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=W(e),a=j(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==L(e)||dt(l))&&(c=(o=e)!==O(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=j(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Lt(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},158:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSFileUpload=e.HSDataTable=e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(406);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(740);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(268);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(485);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(809);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(891);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(332);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(850);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(60);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(911);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(751);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(f).default}});var v=n(442);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var m=n(887);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(m).default}});var g=n(97);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var y=n(166);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(y).default}});var w=n(502);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(w).default}});var b=n(684);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(b).default}});var C=n(100);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(C).default}});var S=n(969);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(S).default}});var x=n(957);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(x).default}}),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery?e.HSDataTable=n(814).default:e.HSDataTable=null,"undefined"!=typeof _&&"undefined"!=typeof Dropzone?e.HSFileUpload=n(234).default:e.HSFileUpload=null},740:function(t,e,n){ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(e){return e.element.el===t.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="block",t.content.style.height="",t.fireEvent("open",t.el),(0,l.dispatch)("open.hs.accordion",t.el,t.el)}))},e.prototype.hide=function(){var t=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="",t.content.style.height="0",t.fireEvent("close",t.el),(0,l.dispatch)("close.hs.accordion",t.el,t.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},737:(t,e)=>{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(t){return t.element.el===e.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="block",e.content.style.height="",e.fireEvent("open",e.el),(0,l.dispatch)("open.hs.accordion",e.el,e.el)}))},e.prototype.hide=function(){var t,e=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="",e.content.style.height="0",e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.accordion",e.el,e.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},629:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},268:function(t,e,n){ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):this.currentIndex *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform=this.calculateTransform(),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.calculateTransform=function(){var t=this.currentIndex*this.sliderWidth;return this.isRTL?"translate(".concat(t,"px, 0px)"):"translate(-".concat(t,"px, 0px)")},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):this.currentIndex0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(m=null==B?void 0:B.outputLoaderTemplate)&&void 0!==m?m:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(v=null==B?void 0:B.groupingType)&&void 0!==v?v:null,_.groupingTitleTemplate=null!==(y=null==B?void 0:B.groupingTitleTemplate)&&void 0!==y?y:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(g=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==g?g:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(O=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==O?O:null,_.toggleOpen=null!==(L=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==L?L:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.isOpened=!0,this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t=""),this.setResults(t),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){return Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){return e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){if(e.isItemExists(t))return!1;var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n,o;e.textContent=null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"",e.setAttribute("data-hs-combo-box-search-text",null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t=this;this.toggle.addEventListener("click",(function(){t.isOpened?t.close():t.open(t.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),!1):(this.animationInProcess=!0,this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){e.output.style.display="none",e.setValueAndClear(t),e.animationInProcess=!1})),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+10&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(v=null==B?void 0:B.outputLoaderTemplate)&&void 0!==v?v:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(m=null==B?void 0:B.groupingType)&&void 0!==m?m:null,_.groupingTitleTemplate=null!==(g=null==B?void 0:B.groupingTitleTemplate)&&void 0!==g?g:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(y=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==y?y:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(L=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,_.toggleOpen=null!==(O=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==O?O:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t="");var e=this.preventVisibility?this.input.value:t;this.setResults(e),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),""!==t.input.value?t.el.classList.add("has-value"):t.el.classList.remove("has-value"),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.output.role="listbox",this.output.tabIndex=-1,this.output.ariaOrientation="vertical",this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){var n,o,i,r=null!==(n=e.getAttribute("data-hs-combo-box-output-item-group-field"))&&void 0!==n?n:null,s=null!==(o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")))&&void 0!==o?o:null,l=null;return r&&(null===(i=null==s?void 0:s.group)||void 0===i?void 0:i.name)&&(l=t[r]),Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){var n;return(null===(n=null==s?void 0:s.group)||void 0===n?void 0:n.name)&&l?l===s.group.name&&e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]:e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-output-item-field]").forEach((function(e){var n=t[e.getAttribute("data-hs-combo-box-output-item-field")],o=e.hasAttribute("data-hs-combo-box-output-item-hide-if-empty");e.textContent=null!=n?n:"",!n&&o&&(e.style.display="none")})),o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n;e.setAttribute("data-hs-combo-box-search-text",null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t,e,n,o,i=this;this.isOpened?((null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="true")):((null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),(null===(o=null==this?void 0:this.input)||void 0===o?void 0:o.ariaExpanded)&&(this.input.ariaExpanded="false")),this.toggle.addEventListener("click",(function(){i.isOpened?i.close():i.open(i.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){var t,n;(null===(t=null==e?void 0:e.input)||void 0===t?void 0:t.ariaExpanded)&&(e.input.ariaExpanded="true"),(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e,n,o=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),!1):(this.animationInProcess=!0,(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="false"),(null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){o.output.style.display="none",o.setValueAndClear(t),o.animationInProcess=!1})),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+1=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},610:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},814:function(t,e,n){ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&(this.buildPagingPage(1),l>2&&this.pagingPages.appendChild((0,a.htmlToElement)('...')));for(var u=l;u<=c;u++)this.buildPagingPage(u);c...')),this.buildPagingPage(r)),this.disablePagingArrow(this.pagingPrev,0===e),this.disablePagingArrow(this.pagingNext,e===n-1),this.hidePagingIfSinglePage()},e.prototype.buildPagingPage=function(t){var e=this,n=this.dataTable.page.info().page,o=(0,a.htmlToElement)('');o.innerText="".concat(t),o.setAttribute("data-page","".concat(t)),this.pageBtnClasses&&(0,a.classToClassList)(this.pageBtnClasses,o),n===t-1&&o.classList.add("active"),o.addEventListener("click",(function(){return e.onPageClick(t)})),this.pagingPages.append(o)},e.prototype.onPageClick=function(t){this.dataTable.page(t-1).draw("page")},e.prototype.initRowSelecting=function(){var t=this;this.rowSelectingAll.addEventListener("change",(function(){return t.onSelectAllChange()}))},e.prototype.triggerChangeEventToRow=function(){var t=this;this.table.querySelectorAll("tbody ".concat(this.rowSelectingIndividual)).forEach((function(e){e.addEventListener("change",(function(){t.updateSelectAllCheckbox()}))}))},e.prototype.onSelectAllChange=function(){var t=this,e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);o&&(o.checked=e)})),this.updateSelectAllCheckbox()},e.prototype.updateSelectAllCheckbox=function(){var t=this;if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;var e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);if(o&&!o.checked)return e=!1,!1})),this.rowSelectingAll.checked=e},e.getInstance=function(t,e){var n=window.$hsDataTableCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDataTableCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(l(n(961)).default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&c.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=c),e.default=c},891:function(t,e,n){ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle&&this.buildToggle(),this.menu&&this.buildMenu(),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click"),this.closeMode=(0,l.getClassProperty)(this.el,"--auto-close","true")},e.prototype.buildToggle=function(){var t,e=this;(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.el.classList.contains("open")?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(t){return e.onClickHandler(t)}))},e.prototype.buildMenu=function(){this.menu.role="menu"},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ","")),s=(window.getComputedStyle(this.el).getPropertyValue("--gpu-acceleration")||"true").replace(" ","");"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}},{name:"computeStyles",options:{adaptive:"fixed"===o,gpuAcceleration:"true"===s}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){var e;(null===(e=null==t?void 0:t.toggle)||void 0===e?void 0:e.ariaExpanded)&&(t.toggle.ariaExpanded="true"),t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;var n;if(this.animationInProcess=!0,t){var o=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(o,(function(){return e.destroyPopper()}))}else this.destroyPopper();e.menu.style.margin=null,(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="false"),e.el.classList.remove("open"),e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.dropdown",e.el,e.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1 .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle.addEventListener("click",(function(e){return t.onClickHandler(e)})),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click")},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ",""));"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;if(this.animationInProcess=!0,t){var n=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(n,(function(){return e.destroyPopper()}))}else this.destroyPopper();this.menu.style.margin=null,this.el.classList.remove("open"),this.fireEvent("close",this.el),(0,l.dispatch)("close.hs.dropdown",this.el,this.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t',s.extensions=_.merge({default:{icon:'',class:"size-5"},xls:{icon:'',class:"size-5"},doc:{icon:'',class:"size-5"},zip:{icon:'',class:"size-5"}},a.extensions),s.singleton=a.singleton,s.concatOptions=r(r({clickable:s.el.querySelector("[data-hs-file-upload-trigger]"),previewsContainer:s.el.querySelector("[data-hs-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:s.previewTemplate,autoHideTrigger:!1},a),n),s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()},e.prototype.initDropzone=function(){var t=this,e=this.el.querySelector("[data-hs-file-upload-clear]"),n=Array.from(this.el.querySelectorAll("[data-hs-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(function(e){return t.onAddFile(e)})),this.dropzone.on("removedfile",(function(){return t.onRemoveFile()})),this.dropzone.on("uploadprogress",(function(e,n){return t.onUploadProgress(e,n)})),this.dropzone.on("complete",(function(e){return t.onComplete(e)})),e&&(e.onclick=function(){t.dropzone.files.length&&t.dropzone.removeAllFiles(!0)}),n.length&&n.forEach((function(e){e.onclick=function(){var e,n;(null===(e=t.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(n=t.concatOptions)||void 0===n?void 0:n.clickable).click()}}))},e.prototype.onAddFile=function(t){var e=this,n=t.previewElement,o=t.previewElement.querySelector("[data-hs-file-upload-reload]");if(!n)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),o&&o.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var o=document.createElement("input");o.type="file",o.click(),o.addEventListener("change",(function(n){var o,i=null===(o=n.target.files)||void 0===o?void 0:o[0];if(i){var r=i;r.status=Dropzone.ADDED,r.accepted=!0,r.previewElement=t.previewElement,r.previewTemplate=t.previewTemplate,r.previewsContainer=t.previewsContainer,e.dropzone.removeFile(t),e.dropzone.addFile(r)}}))})),this.previewAccepted(t)},e.prototype.previewAccepted=function(t){var e=this,n=t.previewElement,o=this.splitFileName(t.name),i=n.querySelector("[data-hs-file-upload-file-name]"),r=n.querySelector("[data-hs-file-upload-file-ext]"),s=n.querySelector("[data-hs-file-upload-file-size]"),l=n.querySelector("[data-hs-file-upload-file-icon]"),a=this.el.querySelector("[data-hs-file-upload-trigger]"),c=n.querySelector("[data-dz-thumbnail]"),u=n.querySelector("[data-hs-file-upload-remove]");i&&(i.textContent=o.name),r&&(r.textContent=o.extension),s&&(s.textContent=this.formatFileSize(t.size)),c&&(t.type.includes("image/")?c.classList.remove("hidden"):this.setIcon(o.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(a.style.display="none"),u&&(u.onclick=function(){return e.dropzone.removeFile(t)})},e.prototype.onRemoveFile=function(){var t=this.el.querySelector("[data-hs-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")},e.prototype.onUploadProgress=function(t,e){var n=t.previewElement;if(!n)return!1;var o=n.querySelector("[data-hs-file-upload-progress-bar]"),i=n.querySelector("[data-hs-file-upload-progress-bar-pane]"),r=n.querySelector("[data-hs-file-upload-progress-bar-value]"),s=Math.floor(e);o&&o.setAttribute("aria-valuenow","".concat(s)),i&&(i.style.width="".concat(s,"%")),r&&(r.innerText="".concat(s))},e.prototype.onComplete=function(t){var e=t.previewElement;if(!e)return!1;e.classList.add("complete")},e.prototype.setIcon=function(t,e){var n=this.createIcon(t);e.append(n)},e.prototype.createIcon=function(t){var e,n,o=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,l.htmlToElement)(this.extensions[t].icon):(0,l.htmlToElement)(this.extensions.default.icon);return(0,l.classToClassList)((null===(n=this.extensions[t])||void 0===n?void 0:n.class)?this.extensions[t].class:this.extensions.default.class,o),o},e.prototype.formatFileSize=function(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"},e.prototype.splitFileName=function(t){var e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}},e.getInstance=function(t,e){var n=window.$hsFileUploadCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsFileUploadCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a.default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&c.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=c),e.default=c},332:function(t,e,n){ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},770:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.checkIsNumberAndConvert=function(){var t=this.input.value.trim(),e=this.cleanAndExtractNumber(t);null!==e?(this.inputValue=e,this.input.value=e.toString()):(this.inputValue=0,this.input.value="0")},e.prototype.cleanAndExtractNumber=function(t){var e=[],n=!1;t.split("").forEach((function(t){t>="0"&&t<="9"?e.push(t):"."!==t||n||(e.push(t),n=!0)}));var o=e.join(""),i=parseFloat(o);return isNaN(i)?null:i},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},850:function(t,e,n){ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.openedBreakpoint})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.openedBreakpoint})).forEach((function(t){c.setOpened(t.element.openedBreakpoint,t)}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},659:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.overlay.classList.contains("opened")})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("opened")})).forEach((function(t){var e=parseInt(window.getComputedStyle(t.element.overlay).getPropertyValue("z-index")),n=document.querySelector("#".concat(t.element.overlay.id,"-backdrop"));if(e===parseInt(window.getComputedStyle(n).getPropertyValue("z-index"))+1)return!1;"style"in n&&(n.style.zIndex="".concat(e-1)),document.body.classList.add("hs-overlay-body-open")}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},60:function(t,e,n){ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},139:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},911:function(t,e,n){ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},961:function(t,e,n){ -/* - * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]",o.dropdownClasses=l.dropdownClasses||"absolute top-full z-[1] w-full bg-white border border-gray-200 rounded-md hidden mt-2",o.dropdownItemTemplate=l.dropdownItemTemplate||"
",o.dropdownItemTemplatesByType=l.dropdownItemTemplatesByType||null,o.dropdownItemClasses=l.dropdownItemClasses||"py-2 px-4 w-full cursor-pointer text-sm hover:bg-gray-300 hover:text-black",o.highlightedTextTagName=l.highlightedTextTagName||"u",o.highlightedTextClasses=l.highlightedTextClasses||"bg-green-200",o.jsonUrl&&o.fetchData().then((function(){return o.init()})),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsSearchByJsonCollection,this),this.buildDropdown(),this.el.addEventListener("input",(0,c.debounce)((function(e){t.val=e.target.value,t.val.length>t.minChars?t.searchData(t.val):t.result=[],t.result.length?t.dropdown.classList.remove("hidden"):t.dropdown.classList.add("hidden"),t.buildItems()})))},e.prototype.fetchData=function(){return s(this,void 0,void 0,(function(){var t=this;return l(this,(function(e){switch(e.label){case 0:return[4,fetch(this.jsonUrl).then((function(t){return t.json()})).then((function(e){return t.json=e}))];case 1:return e.sent(),[2]}}))}))},e.prototype.searchData=function(t){this.result=this.json.filter((function(e){var n=t.toLowerCase(),o=e.title.toLowerCase(),i=e.description.toLowerCase();return o.includes(n)||i.includes(n)}))},e.prototype.buildDropdown=function(){this.dropdown=(0,c.htmlToElement)(this.dropdownTemplate),this.dropdownClasses&&(0,c.classToClassList)(this.dropdownClasses,this.dropdown),this.el.after(this.dropdown)},e.prototype.buildItems=function(){var t=this;this.dropdown.innerHTML="",this.result.forEach((function(e){var n=(0,c.htmlToElement)(''));n.append(t.itemTemplate(e)),t.dropdown.append(n)}))},e.prototype.itemTemplate=function(t){var e=new RegExp(this.val,"gi"),n=t.title.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),o=t.description.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),i=this.dropdownItemTemplatesByType?this.dropdownItemTemplatesByType.find((function(e){return e.type===t.type})):null,r=i?(0,c.htmlToElement)(i.markup):(0,c.htmlToElement)(this.dropdownItemTemplate);this.dropdownItemClasses&&(0,c.classToClassList)(this.dropdownItemClasses,r);var s=r.querySelector("[data-title]");s?s.append((0,c.htmlToElement)("".concat(n,""))):r.append((0,c.htmlToElement)("".concat(n,"")));var l=r.querySelector("[data-description]");if(l)l.append((0,c.htmlToElement)("".concat(o,"")));else if(!i){var a=(0,c.htmlToElement)("
");r.append(a),r.append((0,c.htmlToElement)("".concat(o,"")))}return r},e.getInstance=function(t){var e=window.$hsSearchByJsonCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return e?e.element:null},e.autoInit=function(){window.$hsSearchByJsonCollection||(window.$hsSearchByJsonCollection=[]),document.querySelectorAll("[data-hs-search-by-json]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsSearchByJsonCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a(n(737)).default);window.addEventListener("load",(function(){u.autoInit()})),"undefined"!=typeof window&&(window.HSSearchByJson=u),e.default=u},233:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,i=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),r=parseInt(String(e.getBoundingClientRect().top))-o-i,l=e.offsetHeight;if(r<=0&&r+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},442:function(t,e,n){ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),e=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&e&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),this.toggle.addEventListener("click",(function(){if(o.isDisabled)return!1;o.isOpened?o.close():o.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o){var i=this;void 0===o&&(o="1");var r=null,s=(0,a.htmlToElement)(this.optionTag||"
");if(s.setAttribute("data-value",e),s.setAttribute("data-title-value",t),s.setAttribute("tabIndex",o),s.classList.add("cursor-pointer"),this.optionTemplate&&(r=(0,a.htmlToElement)(this.optionTemplate),s.append(r)),r?r.querySelector("[data-title]").textContent=t||"":s.textContent=t||"",n){if(n.icon){var l=(0,a.htmlToElement)(n.icon);if(l.classList.add("mw-full"),r)r.querySelector("[data-icon]").append(l);else{var c=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,c),c.append(l),s.append(c)}}if(n.description)if(r)r.querySelector("[data-description]").append(n.description);else{var u=(0,a.htmlToElement)("
");u.textContent=n.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,u),s.append(u)}}r&&r.querySelector("[data-icon]")&&!n&&!(null==n?void 0:n.icon)&&r.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&s.classList.add("selected"),s.addEventListener("click",(function(){return i.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,s),this.dropdown&&this.dropdown.append(s)},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n){var o=(0,a.htmlToElement)("");o.setAttribute("value",e),o.setAttribute("data-hs-select-option",JSON.stringify(n)),o.innerText=t,this.el.append(o)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){this.el.value="".concat(this.value);var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,options:n}],!1)},e.prototype.removeSelectOption=function(t){if(!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t}))},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.stringFromValue=function(){var t=this,e=[];return this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems?"".concat(e.length," ").concat(this.toggleCountText):e.join(", ")},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0,Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")})).classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){t.wrapper.classList.add("active"),t.dropdown.classList.add("opened"),t.hasSearch&&!t.preventSearchFocus&&t.search.focus(),t.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){o.dropdown.classList.add("hidden"),o.hasSearch&&(o.search.value="",o.search.dispatchEvent(new Event("input",{bubbles:!0})),o.search.blur()),o.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r),e.buildOption(o,i,r,n),e.buildOriginalOption(o,i,r))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t){!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Tab":t.preventDefault(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},957:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),n=this.toggle.querySelector("[data-icon]"),o=this.toggle.querySelector("[data-title]"),!this.isMultiple&&n&&this.setToggleIcon(),!this.isMultiple&&o&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,o||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),(null===(e=this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(){if(i.isDisabled)return!1;i.isOpened?i.close():i.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.disabled,e.selected,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o,i,r){var l=this;void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===r&&(r="1");var c=null,u=(0,a.htmlToElement)(this.optionTag||"
");if(u.setAttribute("data-value",e),u.setAttribute("data-title-value",t),u.setAttribute("tabIndex",r),u.classList.add("cursor-pointer"),n&&u.classList.add("disabled"),o&&(this.isMultiple?this.value=s(s([],this.value,!0),[e],!1):this.value=e),this.optionTemplate&&(c=(0,a.htmlToElement)(this.optionTemplate),u.append(c)),c?c.querySelector("[data-title]").textContent=t||"":u.textContent=t||"",i){if(i.icon){var d=(0,a.htmlToElement)(i.icon);if(d.classList.add("max-w-full"),c)c.querySelector("[data-icon]").append(d);else{var p=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,p),p.append(d),u.append(p)}}if(i.description)if(c)c.querySelector("[data-description]").append(i.description);else{var h=(0,a.htmlToElement)("
");h.textContent=i.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,h),u.append(h)}}c&&c.querySelector("[data-icon]")&&!i&&!(null==i?void 0:i.icon)&&c.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&u.classList.add("selected"),n||u.addEventListener("click",(function(){return l.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,u),this.dropdown&&this.dropdown.append(u),o&&this.setNewValue()},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n,o,i){var r=(0,a.htmlToElement)("");r.setAttribute("value",e),n&&r.setAttribute("disabled","disabled"),o&&r.setAttribute("selected","selected"),r.setAttribute("data-hs-select-option",JSON.stringify(i)),r.innerText=t,this.el.append(r)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n,o,i){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,disabled:n,selected:o,options:i}],!1)},e.prototype.removeSelectOption=function(t,e){if(void 0===e&&(e=!1),!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t})),console.log(e),this.value=e?this.value.filter((function(e){return e!==t})):t,console.log(this.value)},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():(console.log(),this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder)},e.prototype.stringFromValue=function(){var t=this,e=[],n="";if(this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems)if("nItemsAndCount"===this.toggleCountTextMode){var o=e.slice(0,this.toggleCountTextMinItems-1);n="".concat(o.join(this.toggleSeparators.items)," ").concat(this.toggleSeparators.betweenItemsAndCounter," ").concat(e.length-o.length," ").concat(this.toggleCountText)}else n="".concat(e.length," ").concat(this.toggleCountText);else n=e.join(this.toggleSeparators.items);return n},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0;var e=Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")}));e&&e.classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t,e=this,n=(null===(t=null===window||void 0===window?void 0:window.$hsSelectCollection)||void 0===t?void 0:t.find((function(t){return t.element.isOpened})))||null;if(n&&n.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.wrapper.classList.add("active"),e.dropdown.classList.add("opened"),e.hasSearch&&!e.preventSearchFocus&&e.search.focus(),e.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o,i=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){i.dropdown.classList.add("hidden"),i.hasSearch&&(i.search.value="",i.search.dispatchEvent(new Event("input",{bubbles:!0})),i.search.blur()),i.animationInProcess=!1})),null===(o=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===o||o.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.disabled,s=t.selected,l=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r,s,l),e.buildOption(o,i,r,s,l,n),e.buildOriginalOption(o,i,r,s,l),s&&!e.isMultiple&&e.onSelectOption(i))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t,n){void 0===n&&(n=!1),!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t,n),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t,e.isMultiple)})):n(t,this.isMultiple),this.setNewValue()},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.open=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.isOpened&&e.element.open()},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":t.preventDefault(),t.stopImmediatePropagation(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},887:function(t,e,n){ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,m=e.hasError,v=void 0!==m&&m;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},983:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,v=e.hasError,m=void 0!==v&&v;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),m&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:m,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},97:function(t,e,n){ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},679:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},969:function(t,e,n){ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ /* * HSStaticMethods - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var o=n(969),i=n(362),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(700)})())); \ No newline at end of file +Object.defineProperty(e,"__esModule",{value:!0});var o=n(292),i=n(255),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))},cleanCollection:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.collection;window[e]instanceof Array&&(window[e]=[])})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.collection;t.includes(n)&&window[o]instanceof Array&&(window[o]=[])}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(158)})())); \ No newline at end of file diff --git a/dist/remove-element.d.ts b/dist/remove-element.d.ts index 33978b6..11c0e38 100644 --- a/dist/remove-element.d.ts +++ b/dist/remove-element.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/remove-element.js b/dist/remove-element.js index 0abd07d..68f2f9f 100644 --- a/dist/remove-element.js +++ b/dist/remove-element.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},139:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},911:function(t,e,n){ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,a=window.innerHeight,l=s?r.top-s.top:r.top,u=(i?s.bottom:a)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?l>=c:l>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(139);return n})())); \ No newline at end of file +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;ne&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),a=i?i.getBoundingClientRect():null,s=window.innerHeight,l=a?r.top-a.top:r.top,u=(i?a.bottom:s)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?l>=c:l>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(911);return n})())); \ No newline at end of file diff --git a/dist/scrollspy.d.ts b/dist/scrollspy.d.ts index c4d2651..bc16dfb 100644 --- a/dist/scrollspy.d.ts +++ b/dist/scrollspy.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/scrollspy.js b/dist/scrollspy.js index 679dcdb..9f3e657 100644 --- a/dist/scrollspy.js +++ b/dist/scrollspy.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},591:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},751:function(t,e,n){ /* * HSScrollspy - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(969),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return r(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,r=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),i=parseInt(String(e.getBoundingClientRect().top))-o-r,l=e.offsetHeight;if(i<=0&&i+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var c=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(c){c.classList.add("active");var a=c.closest("[data-hs-scrollspy-group]");if(a){var u=a.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),r=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,i=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-r-i,c=this.scrollable===document?window:this.scrollable,a=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in c&&c.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return a()})):a()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(i(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=e.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,l=window.innerHeight,c=s?i.top-s.top:i.top,a=(r?s.bottom:l)-i.bottom,u=t.clientHeight+o;return"bottom"===n?a>=u:"top"===n?c>=u:c>=u||a>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}(591);return n})())); \ No newline at end of file +var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return r(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,r=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),i=parseInt(String(e.getBoundingClientRect().top))-o-r,l=e.offsetHeight;if(i<=0&&i+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var c=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(c){c.classList.add("active");var a=c.closest("[data-hs-scrollspy-group]");if(a){var u=a.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),r=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,i=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-r-i,c=this.scrollable===document?window:this.scrollable,a=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in c&&c.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return a()})):a()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(i(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=e.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,l=window.innerHeight,c=s?i.top-s.top:i.top,a=(r?s.bottom:l)-i.bottom,u=t.clientHeight+o;return"bottom"===n?a>=u:"top"===n?c>=u:c>=u||a>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var r=function(t){return!!t&&("none"===window.getComputedStyle(t).display||r(t.parentElement))};e.isParentOrElementHidden=r;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}(751);return n})())); \ No newline at end of file diff --git a/dist/search-by-json.d.ts b/dist/search-by-json.d.ts index 41261eb..bc2e52f 100644 --- a/dist/search-by-json.d.ts +++ b/dist/search-by-json.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/select.d.ts b/dist/select.d.ts index 081db53..35d975f 100644 --- a/dist/select.d.ts +++ b/dist/select.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; @@ -25,6 +23,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } export interface ISelectOptions { @@ -38,8 +38,13 @@ export interface ISelectOptions { wrapperClasses?: string; toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; tagsInputClasses?: string; @@ -86,8 +91,10 @@ declare class HSSelect extends HSBasePlugin implements ISelect { selectedItems: string[]; private readonly toggleTag; private readonly toggleClasses; + private readonly toggleSeparators; private readonly toggleCountText; private readonly toggleCountTextMinItems; + private readonly toggleCountTextMode; private readonly wrapperClasses; private readonly tagsItemTemplate; private readonly tagsItemClasses; @@ -121,6 +128,7 @@ declare class HSSelect extends HSBasePlugin implements ISelect { private readonly isAddTagOnEnter; private tagsInputHelper; constructor(el: HTMLElement, options?: ISelectOptions); + setValue(val: string | string[]): void; private init; private build; private buildWrapper; @@ -165,6 +173,7 @@ declare class HSSelect extends HSBasePlugin implements ISelect { recalculateDirection(): void; static getInstance(target: HTMLElement | string, isInstance?: boolean): HSSelect | ICollectionItem; static autoInit(): void; + static open(target: HTMLElement | string): void; static close(target: HTMLElement | string): void; static closeCurrentlyOpened(evtTarget?: HTMLElement | null): void; static accessibility(evt: KeyboardEvent): void; diff --git a/dist/select.js b/dist/select.js index 44f4b61..639737d 100644 --- a/dist/select.js +++ b/dist/select.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var s in n)("object"==typeof exports?exports:t)[s]=n[s]}}(self,(()=>(()=>{"use strict";var t={190:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(self,(()=>(()=>{"use strict";var t={223:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},233:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,i){this.el=t,this.options=e,this.events=i,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var i;t.push({id:(null===(i=null==e?void 0:e.el)||void 0===i?void 0:i.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=i},442:function(t,e,i){ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var s,i=this&&this.__extends||(s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},s(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,s=arguments.length;n"),e=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&e&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),this.toggle.addEventListener("click",(function(){if(s.isDisabled)return!1;s.isOpened?s.close():s.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var s=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(s),s?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,s,i,o,l,r,d=this,c=this.getItemByValue(t),u=document.createElement("div");if(u.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,u),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),u.append(i)),null===(e=null==c?void 0:c.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==c?void 0:c.options)||void 0===n?void 0:n.icon);(r=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||u.append(r)}i&&i.querySelector("[data-icon]")&&!(null===(s=null==c?void 0:c.options)||void 0===s?void 0:s.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(o=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=c.title||"",i||u.append(o),i?l=i.querySelector("[data-remove]"):((l=document.createElement("span")).textContent="X",u.append(l)),l.addEventListener("click",(function(){d.value=d.value.filter((function(e){return e!==t})),d.selectedItems=d.selectedItems.filter((function(e){return e!==t})),d.value.length||d.reassignTagsInputPlaceholder(d.placeholder),d.unselectMultipleItems(),d.selectMultipleItems(),u.remove()})),this.wrapper.append(u)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:l(l([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,s){var i=this;void 0===s&&(s="1");var o=null,l=(0,a.htmlToElement)(this.optionTag||"
");if(l.setAttribute("data-value",e),l.setAttribute("data-title-value",t),l.setAttribute("tabIndex",s),l.classList.add("cursor-pointer"),this.optionTemplate&&(o=(0,a.htmlToElement)(this.optionTemplate),l.append(o)),o?o.querySelector("[data-title]").textContent=t||"":l.textContent=t||"",n){if(n.icon){var r=(0,a.htmlToElement)(n.icon);if(r.classList.add("mw-full"),o)o.querySelector("[data-icon]").append(r);else{var d=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,d),d.append(r),l.append(d)}}if(n.description)if(o)o.querySelector("[data-description]").append(n.description);else{var c=(0,a.htmlToElement)("
");c.textContent=n.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,c),l.append(c)}}o&&o.querySelector("[data-icon]")&&!n&&!(null==n?void 0:n.icon)&&o.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&l.classList.add("selected"),l.addEventListener("click",(function(){return i.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,l),this.dropdown&&this.dropdown.append(l)},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n){var s=(0,a.htmlToElement)("");s.setAttribute("value",e),s.setAttribute("data-hs-select-option",JSON.stringify(n)),s.innerText=t,this.el.append(s)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,s=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,s)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):l(l([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){this.el.value="".concat(this.value);var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n){this.selectOptions=l(l([],this.selectOptions,!0),[{title:t,val:e,options:n}],!1)},e.prototype.removeSelectOption=function(t){if(!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t}))},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.stringFromValue=function(){var t=this,e=[];return this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems?"".concat(e.length," ").concat(this.toggleCountText):e.join(", ")},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0,Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")})).classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){t.wrapper.classList.add("active"),t.dropdown.classList.add("opened"),t.hasSearch&&!t.preventSearchFocus&&t.search.focus(),t.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,s=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){s.dropdown.classList.add("hidden"),s.hasSearch&&(s.search.value="",s.search.dispatchEvent(new Event("input",{bubbles:!0})),s.search.blur()),s.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),s=function(t){var s=t.title,i=t.val,o=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(s,i,o),e.buildOption(s,i,o,n),e.buildOriginalOption(s,i,o))};Array.isArray(t)?t.forEach((function(t){s(t)})):s(t)},e.prototype.removeOption=function(t){var e=this,n=function(t){!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.recalculateDirection=function(){var t,e,n,s;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(s=this.dropdownDirectionClasses)||void 0===s?void 0:s.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),s=n?JSON.parse(n):{};new e(t,s)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&c.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Tab":t.preventDefault(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var s=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||s[0].classList.add("hs-select-option-highlighted");var o=s.findIndex((function(t){return t===i}));o+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||s[0].classList.add("hs-select-option-highlighted");var o=s.findIndex((function(t){return t===i}));if(!(o+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");s.length&&(s[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),s[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),s=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),s.element.open()}else{(s=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&s.element.onSelectOption(t.target.dataset.value||"")}},e}(d.default);window.addEventListener("load",(function(){u.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=u),e.default=u},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var s="";return t.classList.forEach((function(t){t.includes(e)&&(s=t)})),s.match(/:(.*)]/)?s.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,s,i){void 0===n&&(n="auto"),void 0===s&&(s=10),void 0===i&&(i=null);var o=e.getBoundingClientRect(),l=i?i.getBoundingClientRect():null,r=window.innerHeight,a=l?o.top-l.top:o.top,d=(i?l.bottom:r)-o.bottom,c=t.clientHeight+s;return"bottom"===n?d>=c:"top"===n?a>=c:a>=c||d>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var s=function(t){return!!t&&("none"===window.getComputedStyle(t).display||s(t.parentElement))};e.isParentOrElementHidden=s;e.debounce=function(t,e){var s;return void 0===e&&(e=200),function(){for(var i=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,n),o.exports}(233);return n})())); \ No newline at end of file +var n,s=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i"),i=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&i&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),(null===(e=this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(){if(s.isDisabled)return!1;s.isOpened?s.close():s.open()}))},e.prototype.setToggleIcon=function(){var t,e,i=this.toggle.querySelector("[data-icon]");if(i.innerHTML="",i){var n=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");i.append(n),n?i.classList.remove("hidden"):i.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var i=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=i,this.toggle.append(e)}},e.prototype.buildTags=function(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,i,n,s,o,l,r,d=this,c=this.getItemByValue(t),u=document.createElement("div");if(u.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,u),this.tagsItemTemplate&&(s=(0,a.htmlToElement)(this.tagsItemTemplate),u.append(s)),null===(e=null==c?void 0:c.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(i=null==c?void 0:c.options)||void 0===i?void 0:i.icon);(r=s?s.querySelector("[data-icon]"):document.createElement("span")).append(p),s||u.append(r)}s&&s.querySelector("[data-icon]")&&!(null===(n=null==c?void 0:c.options)||void 0===n?void 0:n.icon)&&s.querySelector("[data-icon]").classList.add("hidden"),(o=s?s.querySelector("[data-title]"):document.createElement("span")).textContent=c.title||"",s||u.append(o),s?l=s.querySelector("[data-remove]"):((l=document.createElement("span")).textContent="X",u.append(l)),l.addEventListener("click",(function(){d.value=d.value.filter((function(e){return e!==t})),d.selectedItems=d.selectedItems.filter((function(e){return e!==t})),d.value.length||d.reassignTagsInputPlaceholder(d.placeholder),d.unselectMultipleItems(),d.selectMultipleItems(),u.remove()})),this.wrapper.append(u)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:l(l([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var i=e.target.value;if(t.selectOptions.find((function(t){return t.val===i})))return!1;t.addSelectOption(i,i),t.buildOption(i,i),t.dropdown.querySelector('[data-value="'.concat(i,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,i){return t.buildOption(e.title,e.val,e.disabled,e.selected,e.options,"".concat(i))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,i,n,s,o){var r=this;void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===o&&(o="1");var d=null,c=(0,a.htmlToElement)(this.optionTag||"
");if(c.setAttribute("data-value",e),c.setAttribute("data-title-value",t),c.setAttribute("tabIndex",o),c.classList.add("cursor-pointer"),i&&c.classList.add("disabled"),n&&(this.isMultiple?this.value=l(l([],this.value,!0),[e],!1):this.value=e),this.optionTemplate&&(d=(0,a.htmlToElement)(this.optionTemplate),c.append(d)),d?d.querySelector("[data-title]").textContent=t||"":c.textContent=t||"",s){if(s.icon){var u=(0,a.htmlToElement)(s.icon);if(u.classList.add("max-w-full"),d)d.querySelector("[data-icon]").append(u);else{var p=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,p),p.append(u),c.append(p)}}if(s.description)if(d)d.querySelector("[data-description]").append(s.description);else{var h=(0,a.htmlToElement)("
");h.textContent=s.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,h),c.append(h)}}d&&d.querySelector("[data-icon]")&&!s&&!(null==s?void 0:s.icon)&&d.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&c.classList.add("selected"),i||c.addEventListener("click",(function(){return r.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,c),this.dropdown&&this.dropdown.append(c),n&&this.setNewValue()},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,i,n,s){var o=(0,a.htmlToElement)("");o.setAttribute("value",e),i&&o.setAttribute("disabled","disabled"),n&&o.setAttribute("selected","selected"),o.setAttribute("data-hs-select-option",JSON.stringify(s)),o.innerText=t,this.el.append(o)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),i=this.tagsInputHelper.offsetWidth+t+e,n=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(i,n)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):l(l([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var i=this.selectedItems.filter((function(t){return!e.value.includes(t)}));i.length&&i.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,i,n,s){this.selectOptions=l(l([],this.selectOptions,!0),[{title:t,val:e,disabled:i,selected:n,options:s}],!1)},e.prototype.removeSelectOption=function(t,e){if(void 0===e&&(e=!1),!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t})),console.log(e),this.value=e?this.value.filter((function(e){return e!==t})):t,console.log(this.value)},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():(console.log(),this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder)},e.prototype.stringFromValue=function(){var t=this,e=[],i="";if(this.selectOptions.forEach((function(i){t.isMultiple?t.value.includes(i.val)&&e.push(i.title):t.value===i.val&&e.push(i.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems)if("nItemsAndCount"===this.toggleCountTextMode){var n=e.slice(0,this.toggleCountTextMinItems-1);i="".concat(n.join(this.toggleSeparators.items)," ").concat(this.toggleSeparators.betweenItemsAndCounter," ").concat(e.length-n.length," ").concat(this.toggleCountText)}else i="".concat(e.length," ").concat(this.toggleCountText);else i=e.join(this.toggleSeparators.items);return i},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0;var e=Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")}));e&&e.classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),i=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),i=!0):e.classList.add("hidden")})),i||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t,e=this,i=(null===(t=null===window||void 0===window?void 0:window.$hsSelectCollection)||void 0===t?void 0:t.find((function(t){return t.element.isOpened})))||null;if(i&&i.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.wrapper.classList.add("active"),e.dropdown.classList.add("opened"),e.hasSearch&&!e.preventSearchFocus&&e.search.focus(),e.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,i,n,s=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(i=this.dropdownDirectionClasses)||void 0===i?void 0:i.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){s.dropdown.classList.add("hidden"),s.hasSearch&&(s.search.value="",s.search.dispatchEvent(new Event("input",{bubbles:!0})),s.search.blur()),s.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,i="".concat(this.selectOptions.length),n=function(t){var n=t.title,s=t.val,o=t.disabled,l=t.selected,r=t.options;!!e.selectOptions.some((function(t){return t.val===s}))||(e.addSelectOption(n,s,o,l,r),e.buildOption(n,s,o,l,r,i),e.buildOriginalOption(n,s,o,l,r),l&&!e.isMultiple&&e.onSelectOption(s))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.removeOption=function(t){var e=this,i=function(t,i){void 0===i&&(i=!1),!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t,i),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){i(t,e.isMultiple)})):i(t,this.isMultiple),this.setNewValue()},e.prototype.recalculateDirection=function(){var t,e,i,n;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(i=this.dropdownDirectionClasses)||void 0===i?void 0:i.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var i=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return i?e?i:i.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t}))){var i=t.getAttribute("data-hs-select"),n=i?JSON.parse(i):{};new e(t,n)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var i=t.target;e.closeCurrentlyOpened(i)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.open=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.isOpened&&e.element.open()},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&c.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":t.preventDefault(),t.stopImmediatePropagation(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var i=e.element.dropdown;if(!i)return!1;var n=(t?Array.from(i.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(i.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),s=i.querySelector(".hs-select-option-highlighted")||i.querySelector(".selected");s||n[0].classList.add("hs-select-option-highlighted");var o=n.findIndex((function(t){return t===s}));o+1 *:not(.hidden)")).reverse():Array.from(i.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),s=i.querySelector(".hs-select-option-highlighted")||i.querySelector(".selected");s||n[0].classList.add("hs-select-option-highlighted");var o=n.findIndex((function(t){return t===s}));if(!(o+1 *:not(.hidden)")):Array.from(i.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),s=i.querySelector(".hs-select-option-highlighted");n.length&&(n[0].focus(),s&&s.classList.remove("hs-select-option-highlighted"),n[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var i=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),n=window.$hsSelectCollection.find((function(t){return t.element.el===e}));i.element.close(),n.element.open()}else{(n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&n.element.onSelectOption(t.target.dataset.value||"")}},e}(d.default);window.addEventListener("load",(function(){u.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=u),e.default=u},292:function(t,e){var i=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var i=n(t);"auto"!==i&&(i=parseInt(i,10))>e&&(e=i)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,i){return void 0===i&&(i=""),(window.getComputedStyle(t).getPropertyValue(e)||i).replace(" ","")};e.getClassPropertyAlt=function(t,e,i){void 0===i&&(i="");var n="";return t.classList.forEach((function(t){t.includes(e)&&(n=t)})),n.match(/:(.*)]/)?n.match(/:(.*)]/)[1]:i};var n=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=n;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,i,n,s){void 0===i&&(i="auto"),void 0===n&&(n=10),void 0===s&&(s=null);var o=e.getBoundingClientRect(),l=s?s.getBoundingClientRect():null,r=window.innerHeight,a=l?o.top-l.top:o.top,d=(s?l.bottom:r)-o.bottom,c=t.clientHeight+n;return"bottom"===i?d>=c:"top"===i?a>=c:a>=c||d>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var s=function(t){return!!t&&("none"===window.getComputedStyle(t).display||s(t.parentElement))};e.isParentOrElementHidden=s;e.debounce=function(t,e){var n;return void 0===e&&(e=200),function(){for(var s=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var i=function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}(442);return i})())); \ No newline at end of file diff --git a/dist/stepper.d.ts b/dist/stepper.d.ts index 2e51e29..cdbe368 100644 --- a/dist/stepper.d.ts +++ b/dist/stepper.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/stepper.js b/dist/stepper.js index e7d991e..bcc7986 100644 --- a/dist/stepper.js +++ b/dist/stepper.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},957:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},887:function(t,e,n){ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var i,s=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,i=t.isDisabled,s=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||i)&&s.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,i=e.isFinal,s=void 0!==i&&i,o=e.isCompleted,r=void 0!==o&&o,l=e.isSkip,a=void 0!==l&&l,p=e.isOptional,c=void 0!==p&&p,d=e.isDisabled,u=void 0!==d&&d,h=e.isProcessed,m=void 0!==h&&h,f=e.hasError,v=void 0!==f&&f;r&&t.classList.add("success"),a&&t.classList.add("skipped"),u&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:s,isCompleted:r,isSkip:a,isOptional:c,isDisabled:u,isProcessed:m,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,i=e.el;n===t.currentIndex?t.setCurrentNavItemActions(i):t.unsetCurrentNavItemActions(i)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,i=e.isFinal,s=void 0!==i&&i,o=e.isCompleted,r=void 0!==o&&o,l=e.isSkip,a=void 0!==l&&l;r&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:s,isCompleted:r,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,i=e.el;n===t.currentIndex?t.setCurrentContentItemActions(i):t.unsetCurrentContentItemActions(i)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),i=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&i&&(this.setSkipItemActions(n),this.setSkipItemActions(i))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),i=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&i&&(this.setCompleteItemActions(n),this.setCompleteItemActions(i))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),i=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var s=this.navItems.find((function(e){return e.index===t.currentIndex}));(s?s.el:null).classList.remove("active"),i.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,i,s){void 0===n&&(n="auto"),void 0===i&&(i=10),void 0===s&&(s=null);var o=e.getBoundingClientRect(),r=s?s.getBoundingClientRect():null,l=window.innerHeight,a=r?o.top-r.top:o.top,p=(s?r.bottom:l)-o.bottom,c=t.clientHeight+i;return"bottom"===n?p>=c:"top"===n?a>=c:a>=c||p>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var s=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(957);return n})())); \ No newline at end of file +var i,s=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,i=t.isDisabled,s=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||i)&&s.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,i=e.isFinal,s=void 0!==i&&i,o=e.isCompleted,r=void 0!==o&&o,l=e.isSkip,a=void 0!==l&&l,p=e.isOptional,c=void 0!==p&&p,d=e.isDisabled,u=void 0!==d&&d,h=e.isProcessed,m=void 0!==h&&h,f=e.hasError,v=void 0!==f&&f;r&&t.classList.add("success"),a&&t.classList.add("skipped"),u&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:s,isCompleted:r,isSkip:a,isOptional:c,isDisabled:u,isProcessed:m,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,i=e.el;n===t.currentIndex?t.setCurrentNavItemActions(i):t.unsetCurrentNavItemActions(i)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,i=e.isFinal,s=void 0!==i&&i,o=e.isCompleted,r=void 0!==o&&o,l=e.isSkip,a=void 0!==l&&l;r&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:s,isCompleted:r,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,i=e.el;n===t.currentIndex?t.setCurrentContentItemActions(i):t.unsetCurrentContentItemActions(i)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),i=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&i&&(this.setSkipItemActions(n),this.setSkipItemActions(i))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),i=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&i&&(this.setCompleteItemActions(n),this.setCompleteItemActions(i))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),i=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var s=this.navItems.find((function(e){return e.index===t.currentIndex}));(s?s.el:null).classList.remove("active"),i.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=i(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var i="";return t.classList.forEach((function(t){t.includes(e)&&(i=t)})),i.match(/:(.*)]/)?i.match(/:(.*)]/)[1]:n};var i=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=i;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,i,s){void 0===n&&(n="auto"),void 0===i&&(i=10),void 0===s&&(s=null);var o=e.getBoundingClientRect(),r=s?s.getBoundingClientRect():null,l=window.innerHeight,a=r?o.top-r.top:o.top,p=(s?r.bottom:l)-o.bottom,c=t.clientHeight+i;return"bottom"===n?p>=c:"top"===n?a>=c:a>=c||p>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var s=function(t){return!!t&&("none"===window.getComputedStyle(t).display||s(t.parentElement))};e.isParentOrElementHidden=s;e.debounce=function(t,e){var i;return void 0===e&&(e=200),function(){for(var s=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(887);return n})())); \ No newline at end of file diff --git a/dist/strong-password.d.ts b/dist/strong-password.d.ts index d73fcdc..1578ac8 100644 --- a/dist/strong-password.d.ts +++ b/dist/strong-password.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/strong-password.js b/dist/strong-password.js index 34e17fc..36c9888 100644 --- a/dist/strong-password.js +++ b/dist/strong-password.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var s in n)("object"==typeof exports?exports:t)[s]=n[s]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var s in n)("object"==typeof exports?exports:t)[s]=n[s]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},983:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},97:function(t,e,n){ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var s,i=this&&this.__extends||(s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},s(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,s=arguments.length;n?@[\\\\\\]^_`{|}~",s.target&&s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,a.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,s=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(s))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},s=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(s+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(s+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(s+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(s+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(s+=1,e.add("min-length")),t.length||(s=0),s===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=s,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),s=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),s.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),s.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,s={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",s),(0,a.dispatch)("change.hs.strongPassword",this.el,s)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,s,i){void 0===n&&(n="auto"),void 0===s&&(s=10),void 0===i&&(i=null);var o=e.getBoundingClientRect(),r=i?i.getBoundingClientRect():null,a=window.innerHeight,l=r?o.top-r.top:o.top,c=(i?r.bottom:a)-o.bottom,u=t.clientHeight+s;return"bottom"===n?c>=u:"top"===n?l>=u:l>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var s=function(t){return!!t&&("none"===window.getComputedStyle(t).display||s(t.parentElement))};e.isParentOrElementHidden=s;e.debounce=function(t,e){var s;return void 0===e&&(e=200),function(){for(var i=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,n),o.exports}(983);return n})())); \ No newline at end of file +var s,i=this&&this.__extends||(s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},s(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,s=arguments.length;n?@[\\\\\\]^_`{|}~",s.target&&s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,a.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,s=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(s))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},s=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(s+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(s+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(s+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(s+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(s+=1,e.add("min-length")),t.length||(s=0),s===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=s,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),s=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),s.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),s.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,s={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",s),(0,a.dispatch)("change.hs.strongPassword",this.el,s)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){ne&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var s="";return t.classList.forEach((function(t){t.includes(e)&&(s=t)})),s.match(/:(.*)]/)?s.match(/:(.*)]/)[1]:n};var s=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=s;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,s,i){void 0===n&&(n="auto"),void 0===s&&(s=10),void 0===i&&(i=null);var o=e.getBoundingClientRect(),r=i?i.getBoundingClientRect():null,a=window.innerHeight,l=r?o.top-r.top:o.top,c=(i?r.bottom:a)-o.bottom,u=t.clientHeight+s;return"bottom"===n?c>=u:"top"===n?l>=u:l>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var s;return void 0===e&&(e=200),function(){for(var i=[],o=0;othis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(s){var i=e[s];if(void 0!==i)return i.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,n),o.exports}(97);return n})())); \ No newline at end of file diff --git a/dist/tabs.d.ts b/dist/tabs.d.ts index ab3aecb..0ce96c9 100644 --- a/dist/tabs.d.ts +++ b/dist/tabs.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/tabs.js b/dist/tabs.js index aac1478..814ae10 100644 --- a/dist/tabs.js +++ b/dist/tabs.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={190:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={223:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},949:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},166:function(t,e,n){ /* * HSTabs - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(969),a=i(n(737)),l=n(190),c=function(t){function e(e,n,o){var r=t.call(this,e,n,o)||this;return r.toggles=r.el.querySelectorAll("[data-hs-tab]"),r.extraToggleId=r.el.getAttribute("hs-data-tab-select"),r.extraToggle=document.querySelector(r.extraToggleId),r.current=Array.from(r.toggles).find((function(t){return t.classList.contains("active")})),r.currentContentId=r.current.getAttribute("data-hs-tab"),r.currentContent=document.querySelector(r.currentContentId),r.prev=null,r.prevContentId=null,r.prevContent=null,r.init(),r}return r(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTabsCollection,this),this.toggles.forEach((function(e){e.addEventListener("click",(function(){return t.open(e)}))})),this.extraToggle&&this.extraToggle.addEventListener("change",(function(e){return t.change(e)}))},e.prototype.open=function(t){this.prev=this.current,this.prevContentId=this.currentContentId,this.prevContent=this.currentContent,this.current=t,this.currentContentId=this.current.getAttribute("data-hs-tab"),this.currentContent=document.querySelector(this.currentContentId),this.prev.classList.remove("active"),this.prevContent.classList.add("hidden"),this.current.classList.add("active"),this.currentContent.classList.remove("hidden"),this.fireEvent("change",{el:t,prev:this.prevContentId,current:this.currentContentId}),(0,s.dispatch)("change.hs.tab",t,{el:t,prev:this.prevContentId,current:this.currentContentId})},e.prototype.change=function(t){var e=document.querySelector('[data-hs-tab="'.concat(t.target.value,'"]'));e&&e.click()},e.getInstance=function(t,e){var n=window.$hsTabsCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTabsCollection||(window.$hsTabsCollection=[]),document.querySelectorAll('[role="tablist"]:not(select):not(.--prevent-on-load-init)').forEach((function(t){window.$hsTabsCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsTabsCollection&&document.addEventListener("keydown",(function(t){return e.accessibility(t)}))},e.open=function(t){var e=window.$hsTabsCollection.find((function(e){return Array.from(e.element.toggles).includes("string"==typeof t?document.querySelector(t):t)})),n=Array.from(e.element.toggles).find((function(e){return e===("string"==typeof t?document.querySelector(t):t)}));n&&!n.classList.contains("active")&&e.element.open(n)},e.accessibility=function(t){var e=document.querySelector("[data-hs-tab]:focus");if(e&&l.TABS_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey){var n=e.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical");switch(t.preventDefault(),t.code){case"true"===n?"ArrowUp":"ArrowLeft":this.onArrow();break;case"true"===n?"ArrowDown":"ArrowRight":this.onArrow(!1);break;case"Home":this.onStartEnd();break;case"End":this.onStartEnd(!1)}}},e.onArrow=function(t){void 0===t&&(t=!0);var e=document.querySelector("[data-hs-tab]:focus").closest('[role="tablist"]'),n=window.$hsTabsCollection.find((function(t){return t.element.el===e}));if(n){var o=t?Array.from(n.element.toggles).reverse():Array.from(n.element.toggles),r=o.find((function(t){return document.activeElement===t})),i=o.findIndex((function(t){return t===r}));o[i=i+12&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=e.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,a=window.innerHeight,l=s?i.top-s.top:i.top,c=(r?s.bottom:a)-i.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?l>=u:l>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}(949);return n})())); \ No newline at end of file +var o,r=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),a=i(n(961)),l=n(223),c=function(t){function e(e,n,o){var r=t.call(this,e,n,o)||this;return r.toggles=r.el.querySelectorAll("[data-hs-tab]"),r.extraToggleId=r.el.getAttribute("data-hs-tab-select"),r.extraToggle=document.querySelector(r.extraToggleId),r.current=Array.from(r.toggles).find((function(t){return t.classList.contains("active")})),r.currentContentId=r.current.getAttribute("data-hs-tab"),r.currentContent=document.querySelector(r.currentContentId),r.prev=null,r.prevContentId=null,r.prevContent=null,r.init(),r}return r(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTabsCollection,this),this.toggles.forEach((function(e){e.addEventListener("click",(function(){return t.open(e)}))})),this.extraToggle&&this.extraToggle.addEventListener("change",(function(e){return t.change(e)}))},e.prototype.open=function(t){var e,n;this.prev=this.current,this.prevContentId=this.currentContentId,this.prevContent=this.currentContent,this.current=t,this.currentContentId=this.current.getAttribute("data-hs-tab"),this.currentContent=document.querySelector(this.currentContentId),(null===(e=null==this?void 0:this.prev)||void 0===e?void 0:e.ariaSelected)&&(this.prev.ariaSelected="false"),this.prev.classList.remove("active"),this.prevContent.classList.add("hidden"),(null===(n=null==this?void 0:this.current)||void 0===n?void 0:n.ariaSelected)&&(this.current.ariaSelected="true"),this.current.classList.add("active"),this.currentContent.classList.remove("hidden"),this.fireEvent("change",{el:t,prev:this.prevContentId,current:this.currentContentId}),(0,s.dispatch)("change.hs.tab",t,{el:t,prev:this.prevContentId,current:this.currentContentId})},e.prototype.change=function(t){var e=document.querySelector('[data-hs-tab="'.concat(t.target.value,'"]'));e&&e.click()},e.getInstance=function(t,e){var n=window.$hsTabsCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTabsCollection||(window.$hsTabsCollection=[]),document.querySelectorAll('[role="tablist"]:not(select):not(.--prevent-on-load-init)').forEach((function(t){window.$hsTabsCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsTabsCollection&&document.addEventListener("keydown",(function(t){return e.accessibility(t)}))},e.open=function(t){var e=window.$hsTabsCollection.find((function(e){return Array.from(e.element.toggles).includes("string"==typeof t?document.querySelector(t):t)})),n=Array.from(e.element.toggles).find((function(e){return e===("string"==typeof t?document.querySelector(t):t)}));n&&!n.classList.contains("active")&&e.element.open(n)},e.accessibility=function(t){var e=document.querySelector("[data-hs-tab]:focus");if(e&&l.TABS_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey){var n=e.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical");switch(t.preventDefault(),t.code){case"true"===n?"ArrowUp":"ArrowLeft":this.onArrow();break;case"true"===n?"ArrowDown":"ArrowRight":this.onArrow(!1);break;case"Home":this.onStartEnd();break;case"End":this.onStartEnd(!1)}}},e.onArrow=function(t){void 0===t&&(t=!0);var e=document.querySelector("[data-hs-tab]:focus").closest('[role="tablist"]'),n=window.$hsTabsCollection.find((function(t){return t.element.el===e}));if(n){var o=t?Array.from(n.element.toggles).reverse():Array.from(n.element.toggles),r=o.find((function(t){return document.activeElement===t})),i=o.findIndex((function(t){return t===r}));o[i=i+1e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=e.getBoundingClientRect(),s=r?r.getBoundingClientRect():null,a=window.innerHeight,l=s?i.top-s.top:i.top,c=(r?s.bottom:a)-i.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?l>=u:l>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var r=function(t){return!!t&&("none"===window.getComputedStyle(t).display||r(t.parentElement))};e.isParentOrElementHidden=r;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}(166);return n})())); \ No newline at end of file diff --git a/dist/theme-switch.d.ts b/dist/theme-switch.d.ts index eb60882..ac5bcd9 100644 --- a/dist/theme-switch.d.ts +++ b/dist/theme-switch.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/theme-switch.js b/dist/theme-switch.js index 9ac7ad7..71308b6 100644 --- a/dist/theme-switch.js +++ b/dist/theme-switch.js @@ -1,9 +1,9 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={737:(e,t)=>{ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={961:(e,t)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.el=e,this.options=t,this.events=n,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var n;e.push({id:(null===(n=null==t?void 0:t.el)||void 0===n?void 0:n.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=n},557:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(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 n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n { el: E; options?: O; diff --git a/dist/toggle-count.js b/dist/toggle-count.js index ca12334..29acead 100644 --- a/dist/toggle-count.js +++ b/dist/toggle-count.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},87:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},684:function(t,e,n){ /* * HSToggleCount - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n { el: E; options?: O; diff --git a/dist/toggle-password.js b/dist/toggle-password.js index 2ee3f4a..fef4038 100644 --- a/dist/toggle-password.js +++ b/dist/toggle-password.js @@ -1,17 +1,17 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={737:(t,e)=>{ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},366:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},100:function(t,e,n){ /* * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,u=(i?s.bottom:l)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?a>=c:a>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(366);return n})())); \ No newline at end of file +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,a.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=l),e.default=l},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,a=window.innerHeight,l=s?r.top-s.top:r.top,u=(i?s.bottom:a)-r.bottom,c=t.clientHeight+o;return"bottom"===n?u>=c:"top"===n?l>=c:l>=c||u>=c};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}(100);return n})())); \ No newline at end of file diff --git a/dist/tooltip.d.ts b/dist/tooltip.d.ts index 1cd0cdf..81d3b22 100644 --- a/dist/tooltip.d.ts +++ b/dist/tooltip.d.ts @@ -1,5 +1,3 @@ - - export interface IBasePlugin { el: E; options?: O; diff --git a/dist/tooltip.js b/dist/tooltip.js index 484040b..d241773 100644 --- a/dist/tooltip.js +++ b/dist/tooltip.js @@ -1,17 +1,17 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={492:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>O,afterRead:()=>b,afterWrite:()=>T,applyStyles:()=>j,arrow:()=>Q,auto:()=>s,basePlacements:()=>f,beforeMain:()=>w,beforeRead:()=>g,beforeWrite:()=>E,bottom:()=>r,clippingParents:()=>u,computeStyles:()=>ne,createPopper:()=>je,createPopperBase:()=>Ie,createPopperLite:()=>Me,detectOverflow:()=>ye,end:()=>l,eventListeners:()=>re,flip:()=>be,hide:()=>Oe,left:()=>a,main:()=>x,modifierPhases:()=>P,offset:()=>Ee,placements:()=>v,popper:()=>d,popperGenerator:()=>Ce,popperOffsets:()=>Se,preventOverflow:()=>Te,read:()=>y,reference:()=>h,right:()=>i,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>S});var o="top",r="bottom",i="right",a="left",s="auto",f=[o,r,i,a],c="start",l="end",u="clippingParents",p="viewport",d="popper",h="reference",m=f.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+l])}),[]),v=[].concat(f,[s]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+l])}),[]),g="beforeRead",y="read",b="afterRead",w="beforeMain",x="main",O="afterMain",E="beforeWrite",S="write",T="afterWrite",P=[g,y,b,w,x,O,E,S,T];function L(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){return e instanceof A(e).Element||e instanceof Element}function C(e){return e instanceof A(e).HTMLElement||e instanceof HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof A(e).ShadowRoot||e instanceof ShadowRoot)}const j={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];C(r)&&L(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});C(o)&&L(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var B=Math.max,D=Math.min,H=Math.round;function k(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function R(){return!/^((?!chrome|android).)*safari/i.test(k())}function W(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&C(e)&&(r=e.offsetWidth>0&&H(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&H(o.height)/e.offsetHeight||1);var a=(_(e)?A(e):window).visualViewport,s=!R()&&n,f=(o.left+(s&&a?a.offsetLeft:0))/r,c=(o.top+(s&&a?a.offsetTop:0))/i,l=o.width/r,u=o.height/i;return{width:l,height:u,top:c,right:f+l,bottom:c+u,left:f,x:f,y:c}}function Y(e){var t=W(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function q(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function V(e){return A(e).getComputedStyle(e)}function N(e){return["table","td","th"].indexOf(L(e))>=0}function K(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function U(e){return"html"===L(e)?e:e.assignedSlot||e.parentNode||(I(e)?e.host:null)||K(e)}function $(e){return C(e)&&"fixed"!==V(e).position?e.offsetParent:null}function F(e){for(var t=A(e),n=$(e);n&&N(n)&&"static"===V(n).position;)n=$(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===V(n).position)?t:n||function(e){var t=/firefox/i.test(k());if(/Trident/i.test(k())&&C(e)&&"fixed"===V(e).position)return null;var n=U(e);for(I(n)&&(n=n.host);C(n)&&["html","body"].indexOf(L(n))<0;){var o=V(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function X(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function z(e,t,n){return B(e,D(t,n))}function G(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,c=e.options,l=n.elements.arrow,u=n.modifiersData.popperOffsets,p=M(n.placement),d=X(p),h=[a,i].indexOf(p)>=0?"height":"width";if(l&&u){var m=function(e,t){return G("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,f))}(c.padding,n),v=Y(l),g="y"===d?o:a,y="y"===d?r:i,b=n.rects.reference[h]+n.rects.reference[d]-u[d]-n.rects.popper[h],w=u[d]-n.rects.reference[d],x=F(l),O=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,E=b/2-w/2,S=m[g],T=O-v[h]-m[y],P=O/2-v[h]/2+E,L=z(S,P,T),A=d;n.modifiersData[s]=((t={})[A]=L,t.centerOffset=L-P,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&q(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,s=e.popperRect,f=e.placement,c=e.variation,u=e.offsets,p=e.position,d=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,g=u.x,y=void 0===g?0:g,b=u.y,w=void 0===b?0:b,x="function"==typeof m?m({x:y,y:w}):{x:y,y:w};y=x.x,w=x.y;var O=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),S=a,T=o,P=window;if(h){var L=F(n),_="clientHeight",C="clientWidth";if(L===A(n)&&"static"!==V(L=K(n)).position&&"absolute"===p&&(_="scrollHeight",C="scrollWidth"),f===o||(f===a||f===i)&&c===l)T=r,w-=(v&&L===P&&P.visualViewport?P.visualViewport.height:L[_])-s.height,w*=d?1:-1;if(f===a||(f===o||f===r)&&c===l)S=i,y-=(v&&L===P&&P.visualViewport?P.visualViewport.width:L[C])-s.width,y*=d?1:-1}var I,j=Object.assign({position:p},h&&ee),M=!0===m?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:H(n*r)/r||0,y:H(o*r)/r||0}}({x:y,y:w},A(n)):{x:y,y:w};return y=M.x,w=M.y,d?Object.assign({},j,((I={})[T]=E?"0":"",I[S]=O?"0":"",I.transform=(P.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",I)):Object.assign({},j,((t={})[T]=E?w+"px":"",t[S]=O?y+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:M(t.placement),variation:Z(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var oe={passive:!0};const re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,f=A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,oe)})),s&&f.addEventListener("resize",n.update,oe),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,oe)})),s&&f.removeEventListener("resize",n.update,oe)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e){var t=A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return W(K(e)).left+ce(e).scrollLeft}function ue(e){var t=V(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function pe(e){return["html","body","#document"].indexOf(L(e))>=0?e.ownerDocument.body:C(e)&&ue(e)?e:pe(U(e))}function de(e,t){var n;void 0===t&&(t=[]);var o=pe(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=A(o),a=r?[i].concat(i.visualViewport||[],ue(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(de(U(a)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===p?he(function(e,t){var n=A(e),o=K(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,f=0;if(r){i=r.width,a=r.height;var c=R();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:i,height:a,x:s+le(e),y:f}}(e,n)):_(t)?function(e,t){var n=W(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=K(e),o=ce(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=B(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=B(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+le(e),f=-o.scrollTop;return"rtl"===V(r||n).direction&&(s+=B(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}(K(e)))}function ve(e,t,n,o){var r="clippingParents"===t?function(e){var t=de(U(e)),n=["absolute","fixed"].indexOf(V(e).position)>=0&&C(e)?F(e):e;return _(n)?t.filter((function(e){return _(e)&&q(e,n)&&"body"!==L(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce((function(t,n){var r=me(e,n,o);return t.top=B(r.top,t.top),t.right=D(r.right,t.right),t.bottom=D(r.bottom,t.bottom),t.left=B(r.left,t.left),t}),me(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ge(e){var t,n=e.reference,s=e.element,f=e.placement,u=f?M(f):null,p=f?Z(f):null,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2;switch(u){case o:t={x:d,y:n.y-s.height};break;case r:t={x:d,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case a:t={x:n.x-s.width,y:h};break;default:t={x:n.x,y:n.y}}var m=u?X(u):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:t[m]=t[m]-(n[v]/2-s[v]/2);break;case l:t[m]=t[m]+(n[v]/2-s[v]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,a=n.placement,s=void 0===a?e.placement:a,c=n.strategy,l=void 0===c?e.strategy:c,m=n.boundary,v=void 0===m?u:m,g=n.rootBoundary,y=void 0===g?p:g,b=n.elementContext,w=void 0===b?d:b,x=n.altBoundary,O=void 0!==x&&x,E=n.padding,S=void 0===E?0:E,T=G("number"!=typeof S?S:J(S,f)),P=w===d?h:d,L=e.rects.popper,A=e.elements[O?P:w],C=ve(_(A)?A:A.contextElement||K(e.elements.popper),v,y,l),I=W(e.elements.reference),j=ge({reference:I,element:L,strategy:"absolute",placement:s}),M=he(Object.assign({},L,j)),B=w===d?M:I,D={top:C.top-B.top+T.top,bottom:B.bottom-C.bottom+T.bottom,left:C.left-B.left+T.left,right:B.right-C.right+T.right},H=e.modifiersData.offset;if(w===d&&H){var k=H[s];Object.keys(D).forEach((function(e){var t=[i,r].indexOf(e)>=0?1:-1,n=[o,r].indexOf(e)>=0?"y":"x";D[e]+=k[n]*t}))}return D}const be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var u=n.mainAxis,p=void 0===u||u,d=n.altAxis,h=void 0===d||d,g=n.fallbackPlacements,y=n.padding,b=n.boundary,w=n.rootBoundary,x=n.altBoundary,O=n.flipVariations,E=void 0===O||O,S=n.allowedAutoPlacements,T=t.options.placement,P=M(T),L=g||(P===T||!E?[ae(T)]:function(e){if(M(e)===s)return[];var t=ae(e);return[fe(e),t,fe(t)]}(T)),A=[T].concat(L).reduce((function(e,n){return e.concat(M(n)===s?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?v:c,u=Z(o),p=u?s?m:m.filter((function(e){return Z(e)===u})):f,d=p.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=p);var h=d.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[M(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:b,rootBoundary:w,padding:y,flipVariations:E,allowedAutoPlacements:S}):n)}),[]),_=t.rects.reference,C=t.rects.popper,I=new Map,j=!0,B=A[0],D=0;D=0,Y=W?"width":"height",q=ye(t,{placement:H,boundary:b,rootBoundary:w,altBoundary:x,padding:y}),V=W?R?i:a:R?r:o;_[Y]>C[Y]&&(V=ae(V));var N=ae(V),K=[];if(p&&K.push(q[k]<=0),h&&K.push(q[V]<=0,q[N]<=0),K.every((function(e){return e}))){B=H,j=!1;break}I.set(H,K)}if(j)for(var U=function(e){var t=A.find((function(t){var n=I.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},$=E?3:1;$>0;$--){if("break"===U($))break}t.placement!==B&&(t.modifiersData[l]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[o,i,r,a].some((function(t){return e[t]>=0}))}const Oe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=ye(t,{elementContext:"reference"}),s=ye(t,{altBoundary:!0}),f=we(a,o),c=we(s,r,i),l=xe(f),u=xe(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":u})}};const Ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,s=n.offset,f=void 0===s?[0,0]:s,c=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=M(e),s=[a,o].indexOf(r)>=0?-1:1,f="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=f[0],l=f[1];return c=c||0,l=(l||0)*s,[a,i].indexOf(r)>=0?{x:l,y:c}:{x:c,y:l}}(n,t.rects,f),e}),{}),l=c[t.placement],u=l.x,p=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=c}};const Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ge({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Te={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,f=n.mainAxis,l=void 0===f||f,u=n.altAxis,p=void 0!==u&&u,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,g=n.tether,y=void 0===g||g,b=n.tetherOffset,w=void 0===b?0:b,x=ye(t,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),O=M(t.placement),E=Z(t.placement),S=!E,T=X(O),P="x"===T?"y":"x",L=t.modifiersData.popperOffsets,A=t.rects.reference,_=t.rects.popper,C="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,I="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(L){if(l){var k,R="y"===T?o:a,W="y"===T?r:i,q="y"===T?"height":"width",V=L[T],N=V+x[R],K=V-x[W],U=y?-_[q]/2:0,$=E===c?A[q]:_[q],G=E===c?-_[q]:-A[q],J=t.elements.arrow,Q=y&&J?Y(J):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[R],ne=ee[W],oe=z(0,A[q],Q[q]),re=S?A[q]/2-U-oe-te-I.mainAxis:$-oe-te-I.mainAxis,ie=S?-A[q]/2+U+oe+ne+I.mainAxis:G+oe+ne+I.mainAxis,ae=t.elements.arrow&&F(t.elements.arrow),se=ae?"y"===T?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(k=null==j?void 0:j[T])?k:0,ce=V+ie-fe,le=z(y?D(N,V+re-fe-se):N,V,y?B(K,ce):K);L[T]=le,H[T]=le-V}if(p){var ue,pe="x"===T?o:a,de="x"===T?r:i,he=L[P],me="y"===P?"height":"width",ve=he+x[pe],ge=he-x[de],be=-1!==[o,a].indexOf(O),we=null!=(ue=null==j?void 0:j[P])?ue:0,xe=be?ve:he-A[me]-_[me]-we+I.altAxis,Oe=be?he+A[me]+_[me]-we-I.altAxis:ge,Ee=y&&be?function(e,t,n){var o=z(e,t,n);return o>n?n:o}(xe,he,Oe):z(y?xe:ve,he,y?Oe:ge);L[P]=Ee,H[P]=Ee-he}t.modifiersData[s]=H}},requiresIfExists:["offset"]};function Pe(e,t,n){void 0===n&&(n=!1);var o,r,i=C(t),a=C(t)&&function(e){var t=e.getBoundingClientRect(),n=H(t.width)/e.offsetWidth||1,o=H(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),s=K(t),f=W(e,a,n),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==L(t)||ue(s))&&(c=(o=t)!==A(o)&&C(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:ce(o)),C(t)?((l=W(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=le(s))),{x:f.left+c.scrollLeft-l.x,y:f.top+c.scrollTop-l.y,width:f.width,height:f.height}}function Le(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var Ae={placement:"bottom",modifiers:[],strategy:"absolute"};function _e(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},737:(e,t)=>{ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={170:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>O,afterRead:()=>b,afterWrite:()=>T,applyStyles:()=>j,arrow:()=>J,auto:()=>s,basePlacements:()=>f,beforeMain:()=>w,beforeRead:()=>g,beforeWrite:()=>E,bottom:()=>r,clippingParents:()=>u,computeStyles:()=>ne,createPopper:()=>je,createPopperBase:()=>Ce,createPopperLite:()=>Me,detectOverflow:()=>ye,end:()=>l,eventListeners:()=>re,flip:()=>be,hide:()=>Oe,left:()=>a,main:()=>x,modifierPhases:()=>P,offset:()=>Ee,placements:()=>v,popper:()=>d,popperGenerator:()=>_e,popperOffsets:()=>Se,preventOverflow:()=>Te,read:()=>y,reference:()=>h,right:()=>i,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>S});var o="top",r="bottom",i="right",a="left",s="auto",f=[o,r,i,a],c="start",l="end",u="clippingParents",p="viewport",d="popper",h="reference",m=f.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+l])}),[]),v=[].concat(f,[s]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+l])}),[]),g="beforeRead",y="read",b="afterRead",w="beforeMain",x="main",O="afterMain",E="beforeWrite",S="write",T="afterWrite",P=[g,y,b,w,x,O,E,S,T];function I(e){return e?(e.nodeName||"").toLowerCase():null}function L(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function A(e){return e instanceof L(e).Element||e instanceof Element}function _(e){return e instanceof L(e).HTMLElement||e instanceof HTMLElement}function C(e){return"undefined"!=typeof ShadowRoot&&(e instanceof L(e).ShadowRoot||e instanceof ShadowRoot)}const j={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];_(r)&&I(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});_(o)&&I(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function M(e){return e.split("-")[0]}var B=Math.max,D=Math.min,H=Math.round;function k(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function R(){return!/^((?!chrome|android).)*safari/i.test(k())}function Y(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&_(e)&&(r=e.offsetWidth>0&&H(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&H(o.height)/e.offsetHeight||1);var a=(A(e)?L(e):window).visualViewport,s=!R()&&n,f=(o.left+(s&&a?a.offsetLeft:0))/r,c=(o.top+(s&&a?a.offsetTop:0))/i,l=o.width/r,u=o.height/i;return{width:l,height:u,top:c,right:f+l,bottom:c+u,left:f,x:f,y:c}}function W(e){var t=Y(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&C(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return L(e).getComputedStyle(e)}function V(e){return["table","td","th"].indexOf(I(e))>=0}function K(e){return((A(e)?e.ownerDocument:e.document)||window.document).documentElement}function F(e){return"html"===I(e)?e:e.assignedSlot||e.parentNode||(C(e)?e.host:null)||K(e)}function U(e){return _(e)&&"fixed"!==q(e).position?e.offsetParent:null}function $(e){for(var t=L(e),n=U(e);n&&V(n)&&"static"===q(n).position;)n=U(n);return n&&("html"===I(n)||"body"===I(n)&&"static"===q(n).position)?t:n||function(e){var t=/firefox/i.test(k());if(/Trident/i.test(k())&&_(e)&&"fixed"===q(e).position)return null;var n=F(e);for(C(n)&&(n=n.host);_(n)&&["html","body"].indexOf(I(n))<0;){var o=q(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e,t,n){return B(e,D(t,n))}function Z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,c=e.options,l=n.elements.arrow,u=n.modifiersData.popperOffsets,p=M(n.placement),d=z(p),h=[a,i].indexOf(p)>=0?"height":"width";if(l&&u){var m=function(e,t){return Z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,f))}(c.padding,n),v=W(l),g="y"===d?o:a,y="y"===d?r:i,b=n.rects.reference[h]+n.rects.reference[d]-u[d]-n.rects.popper[h],w=u[d]-n.rects.reference[d],x=$(l),O=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,E=b/2-w/2,S=m[g],T=O-v[h]-m[y],P=O/2-v[h]/2+E,I=X(S,P,T),L=d;n.modifiersData[s]=((t={})[L]=I,t.centerOffset=I-P,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&N(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,s=e.popperRect,f=e.placement,c=e.variation,u=e.offsets,p=e.position,d=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,g=u.x,y=void 0===g?0:g,b=u.y,w=void 0===b?0:b,x="function"==typeof m?m({x:y,y:w}):{x:y,y:w};y=x.x,w=x.y;var O=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),S=a,T=o,P=window;if(h){var I=$(n),A="clientHeight",_="clientWidth";if(I===L(n)&&"static"!==q(I=K(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),f===o||(f===a||f===i)&&c===l)T=r,w-=(v&&I===P&&P.visualViewport?P.visualViewport.height:I[A])-s.height,w*=d?1:-1;if(f===a||(f===o||f===r)&&c===l)S=i,y-=(v&&I===P&&P.visualViewport?P.visualViewport.width:I[_])-s.width,y*=d?1:-1}var C,j=Object.assign({position:p},h&&ee),M=!0===m?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:H(n*r)/r||0,y:H(o*r)/r||0}}({x:y,y:w},L(n)):{x:y,y:w};return y=M.x,w=M.y,d?Object.assign({},j,((C={})[T]=E?"0":"",C[S]=O?"0":"",C.transform=(P.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",C)):Object.assign({},j,((t={})[T]=E?w+"px":"",t[S]=O?y+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:M(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var oe={passive:!0};const re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,f=L(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,oe)})),s&&f.addEventListener("resize",n.update,oe),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,oe)})),s&&f.removeEventListener("resize",n.update,oe)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e){var t=L(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return Y(K(e)).left+ce(e).scrollLeft}function ue(e){var t=q(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function pe(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:_(e)&&ue(e)?e:pe(F(e))}function de(e,t){var n;void 0===t&&(t=[]);var o=pe(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=L(o),a=r?[i].concat(i.visualViewport||[],ue(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(de(F(a)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===p?he(function(e,t){var n=L(e),o=K(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,f=0;if(r){i=r.width,a=r.height;var c=R();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:i,height:a,x:s+le(e),y:f}}(e,n)):A(t)?function(e,t){var n=Y(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=K(e),o=ce(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=B(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=B(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+le(e),f=-o.scrollTop;return"rtl"===q(r||n).direction&&(s+=B(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}(K(e)))}function ve(e,t,n,o){var r="clippingParents"===t?function(e){var t=de(F(e)),n=["absolute","fixed"].indexOf(q(e).position)>=0&&_(e)?$(e):e;return A(n)?t.filter((function(e){return A(e)&&N(e,n)&&"body"!==I(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce((function(t,n){var r=me(e,n,o);return t.top=B(r.top,t.top),t.right=D(r.right,t.right),t.bottom=D(r.bottom,t.bottom),t.left=B(r.left,t.left),t}),me(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ge(e){var t,n=e.reference,s=e.element,f=e.placement,u=f?M(f):null,p=f?Q(f):null,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2;switch(u){case o:t={x:d,y:n.y-s.height};break;case r:t={x:d,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case a:t={x:n.x-s.width,y:h};break;default:t={x:n.x,y:n.y}}var m=u?z(u):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:t[m]=t[m]-(n[v]/2-s[v]/2);break;case l:t[m]=t[m]+(n[v]/2-s[v]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,a=n.placement,s=void 0===a?e.placement:a,c=n.strategy,l=void 0===c?e.strategy:c,m=n.boundary,v=void 0===m?u:m,g=n.rootBoundary,y=void 0===g?p:g,b=n.elementContext,w=void 0===b?d:b,x=n.altBoundary,O=void 0!==x&&x,E=n.padding,S=void 0===E?0:E,T=Z("number"!=typeof S?S:G(S,f)),P=w===d?h:d,I=e.rects.popper,L=e.elements[O?P:w],_=ve(A(L)?L:L.contextElement||K(e.elements.popper),v,y,l),C=Y(e.elements.reference),j=ge({reference:C,element:I,strategy:"absolute",placement:s}),M=he(Object.assign({},I,j)),B=w===d?M:C,D={top:_.top-B.top+T.top,bottom:B.bottom-_.bottom+T.bottom,left:_.left-B.left+T.left,right:B.right-_.right+T.right},H=e.modifiersData.offset;if(w===d&&H){var k=H[s];Object.keys(D).forEach((function(e){var t=[i,r].indexOf(e)>=0?1:-1,n=[o,r].indexOf(e)>=0?"y":"x";D[e]+=k[n]*t}))}return D}const be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var u=n.mainAxis,p=void 0===u||u,d=n.altAxis,h=void 0===d||d,g=n.fallbackPlacements,y=n.padding,b=n.boundary,w=n.rootBoundary,x=n.altBoundary,O=n.flipVariations,E=void 0===O||O,S=n.allowedAutoPlacements,T=t.options.placement,P=M(T),I=g||(P===T||!E?[ae(T)]:function(e){if(M(e)===s)return[];var t=ae(e);return[fe(e),t,fe(t)]}(T)),L=[T].concat(I).reduce((function(e,n){return e.concat(M(n)===s?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?v:c,u=Q(o),p=u?s?m:m.filter((function(e){return Q(e)===u})):f,d=p.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=p);var h=d.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[M(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:b,rootBoundary:w,padding:y,flipVariations:E,allowedAutoPlacements:S}):n)}),[]),A=t.rects.reference,_=t.rects.popper,C=new Map,j=!0,B=L[0],D=0;D=0,W=Y?"width":"height",N=ye(t,{placement:H,boundary:b,rootBoundary:w,altBoundary:x,padding:y}),q=Y?R?i:a:R?r:o;A[W]>_[W]&&(q=ae(q));var V=ae(q),K=[];if(p&&K.push(N[k]<=0),h&&K.push(N[q]<=0,N[V]<=0),K.every((function(e){return e}))){B=H,j=!1;break}C.set(H,K)}if(j)for(var F=function(e){var t=L.find((function(t){var n=C.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},U=E?3:1;U>0;U--){if("break"===F(U))break}t.placement!==B&&(t.modifiersData[l]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[o,i,r,a].some((function(t){return e[t]>=0}))}const Oe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=ye(t,{elementContext:"reference"}),s=ye(t,{altBoundary:!0}),f=we(a,o),c=we(s,r,i),l=xe(f),u=xe(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":u})}};const Ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,s=n.offset,f=void 0===s?[0,0]:s,c=v.reduce((function(e,n){return e[n]=function(e,t,n){var r=M(e),s=[a,o].indexOf(r)>=0?-1:1,f="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=f[0],l=f[1];return c=c||0,l=(l||0)*s,[a,i].indexOf(r)>=0?{x:l,y:c}:{x:c,y:l}}(n,t.rects,f),e}),{}),l=c[t.placement],u=l.x,p=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=c}};const Se={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ge({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Te={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,f=n.mainAxis,l=void 0===f||f,u=n.altAxis,p=void 0!==u&&u,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,g=n.tether,y=void 0===g||g,b=n.tetherOffset,w=void 0===b?0:b,x=ye(t,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),O=M(t.placement),E=Q(t.placement),S=!E,T=z(O),P="x"===T?"y":"x",I=t.modifiersData.popperOffsets,L=t.rects.reference,A=t.rects.popper,_="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,C="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(I){if(l){var k,R="y"===T?o:a,Y="y"===T?r:i,N="y"===T?"height":"width",q=I[T],V=q+x[R],K=q-x[Y],F=y?-A[N]/2:0,U=E===c?L[N]:A[N],Z=E===c?-A[N]:-L[N],G=t.elements.arrow,J=y&&G?W(G):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[R],ne=ee[Y],oe=X(0,L[N],J[N]),re=S?L[N]/2-F-oe-te-C.mainAxis:U-oe-te-C.mainAxis,ie=S?-L[N]/2+F+oe+ne+C.mainAxis:Z+oe+ne+C.mainAxis,ae=t.elements.arrow&&$(t.elements.arrow),se=ae?"y"===T?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(k=null==j?void 0:j[T])?k:0,ce=q+ie-fe,le=X(y?D(V,q+re-fe-se):V,q,y?B(K,ce):K);I[T]=le,H[T]=le-q}if(p){var ue,pe="x"===T?o:a,de="x"===T?r:i,he=I[P],me="y"===P?"height":"width",ve=he+x[pe],ge=he-x[de],be=-1!==[o,a].indexOf(O),we=null!=(ue=null==j?void 0:j[P])?ue:0,xe=be?ve:he-L[me]-A[me]-we+C.altAxis,Oe=be?he+L[me]+A[me]-we-C.altAxis:ge,Ee=y&&be?function(e,t,n){var o=X(e,t,n);return o>n?n:o}(xe,he,Oe):X(y?xe:ve,he,y?Oe:ge);I[P]=Ee,H[P]=Ee-he}t.modifiersData[s]=H}},requiresIfExists:["offset"]};function Pe(e,t,n){void 0===n&&(n=!1);var o,r,i=_(t),a=_(t)&&function(e){var t=e.getBoundingClientRect(),n=H(t.width)/e.offsetWidth||1,o=H(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),s=K(t),f=Y(e,a,n),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==I(t)||ue(s))&&(c=(o=t)!==L(o)&&_(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:ce(o)),_(t)?((l=Y(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=le(s))),{x:f.left+c.scrollLeft-l.x,y:f.top+c.scrollTop-l.y,width:f.width,height:f.height}}function Ie(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var Le={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.BREAKPOINTS=t.COMBO_BOX_ACCESSIBILITY_KEY_SET=t.SELECT_ACCESSIBILITY_KEY_SET=t.TABS_ACCESSIBILITY_KEY_SET=t.OVERLAY_ACCESSIBILITY_KEY_SET=t.DROPDOWN_ACCESSIBILITY_KEY_SET=t.POSITIONS=void 0,t.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},t.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],t.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],t.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],t.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],t.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],t.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},961:(e,t)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.el=e,this.options=t,this.events=n,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var n;e.push({id:(null===(n=null==t?void 0:t.el)||void 0===n?void 0:n.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=n},679:function(e,t,n){ +Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.el=e,this.options=t,this.events=n,this.el=e,this.options=t,this.events={}}return e.prototype.createCollection=function(e,t){var n;e.push({id:(null===(n=null==t?void 0:t.el)||void 0===n?void 0:n.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=n},969:function(e,t,n){ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(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 n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n2&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():null,s=window.innerHeight,f=a?i.top-a.top:i.top,c=(r?a.bottom:s)-i.bottom,l=e.clientHeight+o;return"bottom"===n?c>=l:"top"===n?f>=l:f>=l||c>=l};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var o=function(e){return!!e&&("none"===window.getComputedStyle(e).display||o(e.parentElement))};t.isParentOrElementHidden=o;t.debounce=function(e,t){var o;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(679)})())); \ No newline at end of file +var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(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 n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;nt&&(t=n)})),t};t.stringToBoolean=function(e){return"true"===e};t.getClassProperty=function(e,t,n){return void 0===n&&(n=""),(window.getComputedStyle(e).getPropertyValue(t)||n).replace(" ","")};t.getClassPropertyAlt=function(e,t,n){void 0===n&&(n="");var o="";return e.classList.forEach((function(e){e.includes(t)&&(o=e)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(e){return window.getComputedStyle(e).getPropertyValue("z-index")};t.getZIndex=o;t.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};t.isEnoughSpace=function(e,t,n,o,r){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===r&&(r=null);var i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():null,s=window.innerHeight,f=a?i.top-a.top:i.top,c=(r?a.bottom:s)-i.bottom,l=e.clientHeight+o;return"bottom"===n?c>=l:"top"===n?f>=l:f>=l||c>=l};t.isFormElement=function(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement};var r=function(e){return!!e&&("none"===window.getComputedStyle(e).display||r(e.parentElement))};t.isParentOrElementHidden=r;t.debounce=function(e,t){var o;return void 0===t&&(t=200),function(){for(var r=[],i=0;ithis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(969)})())); \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 3e38c8d..3fd3f92 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,3 @@ - - export interface ICopyMarkupOptions { targetSelector: string; wrapperSelector: string; @@ -119,6 +117,7 @@ export declare class HSCarousel extends HSBasePlugin implement private resetTimer; private detectDirection; recalculateWidth(): void; + private calculateTransform; goToPrev(): void; goToNext(): void; goTo(i: number): void; @@ -274,11 +273,13 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementPopper> imp private readonly closers; menu: HTMLElement | null; private eventMode; - private readonly closeMode; + private closeMode; private animationInProcess; constructor(el: IHTMLElementPopper, options?: {}, events?: {}); private init; resizeHandler(): void; + private buildToggle; + private buildMenu; private buildClosers; private onClickHandler; private onMouseEnterHandler; @@ -319,6 +320,8 @@ export declare class HSInputNumber extends HSBasePlugin imp private readonly step; constructor(el: HTMLElement, options?: IInputNumberOptions); private init; + private checkIsNumberAndConvert; + private cleanAndExtractNumber; private build; private buildInput; private buildIncrement; @@ -334,6 +337,7 @@ export declare class HSInputNumber extends HSBasePlugin imp } export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; @@ -345,9 +349,11 @@ export interface IOverlay { } export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass; + private readonly emulateScrollbarSpace; private readonly isClosePrev; private readonly backdropClasses; private readonly backdropExtraClasses; + private readonly animationTarget; private openNextOverlay; private autoHide; private readonly overlayId; @@ -366,6 +372,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private buildBackdrop; private destroyBackdrop; private focusElement; + private getScrollbarSize; open(): false | Promise; close(forceClose?: boolean): Promise; static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem; @@ -421,48 +428,6 @@ export declare class HSRemoveElement extends HSBasePlugin private remove; static autoInit(): void; } -export interface ISearchItemTemplate { - type: string; - markup: string; -} -export interface ISearchByJsonOptions { - jsonUrl: string; - minChars?: number; - dropdownTemplate?: string; - dropdownClasses?: string; - dropdownItemTemplate?: string; - dropdownItemTemplatesByType?: ISearchItemTemplate[]; - dropdownItemClasses?: string; - highlightedTextTagName?: string; - highlightedTextClasses?: string; -} -export interface ISearchByJson { - options?: ISearchByJsonOptions; -} -export declare class HSSearchByJson extends HSBasePlugin implements ISearchByJson { - private readonly jsonUrl; - private readonly minChars; - private json; - private result; - private val; - private readonly dropdownTemplate; - private readonly dropdownClasses; - private readonly dropdownItemTemplate; - private readonly dropdownItemTemplatesByType; - private readonly dropdownItemClasses; - private readonly highlightedTextTagName; - private readonly highlightedTextClasses; - private dropdown; - constructor(el: HTMLInputElement, options?: ISearchByJsonOptions); - private init; - private fetchData; - private searchData; - private buildDropdown; - private buildItems; - private itemTemplate; - static getInstance(target: HTMLElement | string): HSSearchByJson; - static autoInit(): void; -} export interface IScrollspy { options?: {}; } @@ -488,6 +453,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } export interface ISelectOptions { @@ -501,8 +468,13 @@ export interface ISelectOptions { wrapperClasses?: string; toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; tagsInputClasses?: string; @@ -549,8 +521,10 @@ export declare class HSSelect extends HSBasePlugin implements IS selectedItems: string[]; private readonly toggleTag; private readonly toggleClasses; + private readonly toggleSeparators; private readonly toggleCountText; private readonly toggleCountTextMinItems; + private readonly toggleCountTextMode; private readonly wrapperClasses; private readonly tagsItemTemplate; private readonly tagsItemClasses; @@ -584,6 +558,7 @@ export declare class HSSelect extends HSBasePlugin implements IS private readonly isAddTagOnEnter; private tagsInputHelper; constructor(el: HTMLElement, options?: ISelectOptions); + setValue(val: string | string[]): void; private init; private build; private buildWrapper; @@ -628,6 +603,7 @@ export declare class HSSelect extends HSBasePlugin implements IS recalculateDirection(): void; static getInstance(target: HTMLElement | string, isInstance?: boolean): HSSelect | ICollectionItem; static autoInit(): void; + static open(target: HTMLElement | string): void; static close(target: HTMLElement | string): void; static closeCurrentlyOpened(evtTarget?: HTMLElement | null): void; static accessibility(evt: KeyboardEvent): void; @@ -896,7 +872,15 @@ export interface IStaticMethods { getClassProperty(el: HTMLElement, prop?: string, val?: string): string; afterTransition(el: HTMLElement, cb: Function): void; autoInit(collection?: string | string[]): void; + cleanCollection(collection?: string | string[]): void; } export declare const HSStaticMethods: IStaticMethods; +declare let HSDataTableModule: any; +declare let HSFileUploadModule: any; + +export { + HSDataTableModule as HSDataTable, + HSFileUploadModule as HSFileUpload, +}; export {}; diff --git a/index.js b/index.js index 53a9e95..25a7640 100644 --- a/index.js +++ b/index.js @@ -1,169 +1,177 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={492:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>gt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>v,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>g,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",m=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),v=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),y="beforeRead",g="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[y,g,w,b,C,S,x,I,T];function O(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof L(t).Element||t instanceof Element}function _(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&O(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&O(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,j=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(D())}function M(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&j(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&j(o.height)/t.offsetHeight||1);var s=(A(t)?L(t):window).visualViewport,l=!$()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function H(t){var e=M(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function R(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function W(t){return L(t).getComputedStyle(t)}function V(t){return["table","td","th"].indexOf(O(t))>=0}function F(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||F(t)}function J(t){return _(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=L(t),n=J(t);n&&V(n)&&"static"===W(n).position;)n=J(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===W(t).position)return null;var n=U(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(O(n))<0;){var o=W(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,n){return q(t,N(e,n))}function z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=K(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var m=function(t,e){return z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,n),v=H(u),y="y"===h?o:s,g="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=Y(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=m[y],T=S-v[f]-m[g],E=S/2-v[f]/2+x,O=G(I,E,T),L=h;n.modifiersData[l]=((e={})[L]=O,e.centerOffset=O-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&R(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,v=t.isFixed,y=d.x,g=void 0===y?0:y,w=d.y,b=void 0===w?0:w,C="function"==typeof m?m({x:g,y:b}):{x:g,y:b};g=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var O=Y(n),A="clientHeight",_="clientWidth";if(O===L(n)&&"static"!==W(O=F(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(v&&O===E&&E.visualViewport?E.visualViewport.height:O[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,g-=(v&&O===E&&E.visualViewport?E.visualViewport.width:O[_])-l.width,g*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===m?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:j(n*i)/i||0,y:j(o*i)/i||0}}({x:g,y:b},L(n)):{x:g,y:b};return g=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?g+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return M(F(t)).left+ct(t).scrollLeft}function dt(t){var e=W(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(U(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=L(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(U(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,n){return e===p?ft(function(t,e){var n=L(t),o=F(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=$();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=M(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=F(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===W(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(F(t)))}function vt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(U(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&_(t)?Y(t):t;return A(n)?e.filter((function(t){return A(t)&&R(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=mt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),mt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function yt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?Z(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var m=d?K(d):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:e[m]=e[m]-(n[v]/2-l[v]/2);break;case u:e[m]=e[m]+(n[v]/2-l[v]/2)}}return e}function gt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,m=n.boundary,v=void 0===m?d:m,y=n.rootBoundary,g=void 0===y?p:y,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=z("number"!=typeof I?I:X(I,a)),E=b===h?f:h,O=t.rects.popper,L=t.elements[S?E:b],_=vt(A(L)?L:L.contextElement||F(t.elements.popper),v,g,u),k=M(t.elements.reference),P=yt({reference:k,element:O,strategy:"absolute",placement:l}),B=ft(Object.assign({},O,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},j=t.modifiersData.offset;if(b===h&&j){var D=j[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,y=n.fallbackPlacements,g=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),O=y||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),L=[T].concat(O).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,d=Z(o),p=d?l?m:m.filter((function(t){return Z(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=gt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:g,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=L[0],N=0;N=0,H=M?"width":"height",R=gt(e,{placement:j,boundary:w,rootBoundary:b,altBoundary:C,padding:g}),W=M?$?r:s:$?i:o;A[H]>_[H]&&(W=st(W));var V=st(W),F=[];if(p&&F.push(R[D]<=0),f&&F.push(R[W]<=0,R[V]<=0),F.every((function(t){return t}))){q=j,P=!1;break}k.set(j,F)}if(P)for(var U=function(t){var e=L.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},J=x?3:1;J>0;J--){if("break"===U(J))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=gt(e,{elementContext:"reference"}),l=gt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,g=void 0===y||y,w=n.tetherOffset,b=void 0===w?0:w,C=gt(e,{boundary:h,rootBoundary:f,padding:v,altBoundary:m}),S=B(e.placement),x=Z(e.placement),I=!x,T=K(S),E="x"===T?"y":"x",O=e.modifiersData.popperOffsets,L=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(O){if(u){var D,$="y"===T?o:s,M="y"===T?i:r,R="y"===T?"height":"width",W=O[T],V=W+C[$],F=W-C[M],U=g?-A[R]/2:0,J=x===c?L[R]:A[R],z=x===c?-A[R]:-L[R],X=e.elements.arrow,Q=g&&X?H(X):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[$],nt=tt[M],ot=G(0,L[R],Q[R]),it=I?L[R]/2-U-ot-et-k.mainAxis:J-ot-et-k.mainAxis,rt=I?-L[R]/2+U+ot+nt+k.mainAxis:z+ot+nt+k.mainAxis,st=e.elements.arrow&&Y(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=W+rt-at,ut=G(g?N(V,W+it-at-lt):V,W,g?q(F,ct):F);O[T]=ut,j[T]=ut-W}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=O[E],mt="y"===E?"height":"width",vt=ft+C[pt],yt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?vt:ft-L[mt]-A[mt]-bt+k.altAxis,St=wt?ft+L[mt]+A[mt]-bt-k.altAxis:yt,xt=g&&wt?function(t,e,n){var o=G(t,e,n);return o>n?n:o}(Ct,ft,St):G(g?Ct:vt,ft,g?St:yt);O[E]=xt,j[E]=xt-ft}e.modifiersData[l]=j}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,o=j(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=F(e),a=M(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==O(e)||dt(l))&&(c=(o=e)!==L(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=M(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Ot(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},700:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSSearchByJson=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(413);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(460);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(629);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(652);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(23);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(610);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(371);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(770);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(659);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(139);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(961);Object.defineProperty(e,"HSSearchByJson",{enumerable:!0,get:function(){return o(f).default}});var m=n(591);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(m).default}});var v=n(233);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var y=n(957);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(y).default}});var g=n(983);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var w=n(949);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(w).default}});var b=n(557);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(b).default}});var C=n(87);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(C).default}});var S=n(366);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(S).default}});var x=n(679);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(x).default}});var I=n(313);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(I).default}})},460:function(t,e,n){ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={170:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>g,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>yt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>m,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>y,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>v,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",v=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),m=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),g="beforeRead",y="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[g,y,w,b,C,S,x,I,T];function L(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof O(t).Element||t instanceof Element}function _(t){return t instanceof O(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof O(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&L(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&L(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,H=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(D())}function j(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&H(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&H(o.height)/t.offsetHeight||1);var s=(A(t)?O(t):window).visualViewport,l=!M()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function $(t){var e=j(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function V(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function R(t){return O(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(L(t))>=0}function W(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||W(t)}function U(t){return _(t)&&"fixed"!==R(t).position?t.offsetParent:null}function J(t){for(var e=O(t),n=U(t);n&&F(n)&&"static"===R(n).position;)n=U(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===R(t).position)return null;var n=z(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(L(n))<0;){var o=R(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Z(t,e,n){return q(t,N(e,n))}function K(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=Y(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var v=function(t,e){return K("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,a))}(c.padding,n),m=$(u),g="y"===h?o:s,y="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=J(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=v[g],T=S-m[f]-v[y],E=S/2-m[f]/2+x,L=Z(I,E,T),O=h;n.modifiersData[l]=((e={})[O]=L,e.centerOffset=L-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&V(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,v=t.roundOffsets,m=t.isFixed,g=d.x,y=void 0===g?0:g,w=d.y,b=void 0===w?0:w,C="function"==typeof v?v({x:y,y:b}):{x:y,y:b};y=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var L=J(n),A="clientHeight",_="clientWidth";if(L===O(n)&&"static"!==R(L=W(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(m&&L===E&&E.visualViewport?E.visualViewport.height:L[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,y-=(m&&L===E&&E.visualViewport?E.visualViewport.width:L[_])-l.width,y*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===v?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(o*i)/i||0}}({x:y,y:b},O(n)):{x:y,y:b};return y=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?y+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:X(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=O(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=O(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return j(W(t)).left+ct(t).scrollLeft}function dt(t){var e=R(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(z(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=O(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(z(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,e,n){return e===p?ft(function(t,e){var n=O(t),o=W(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=M();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=j(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=W(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===R(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(W(t)))}function mt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(z(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&_(t)?J(t):t;return A(n)?e.filter((function(t){return A(t)&&V(t,n)&&"body"!==L(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=vt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),vt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function gt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?X(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var v=d?Y(d):null;if(null!=v){var m="y"===v?"height":"width";switch(p){case c:e[v]=e[v]-(n[m]/2-l[m]/2);break;case u:e[v]=e[v]+(n[m]/2-l[m]/2)}}return e}function yt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,v=n.boundary,m=void 0===v?d:v,g=n.rootBoundary,y=void 0===g?p:g,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=K("number"!=typeof I?I:G(I,a)),E=b===h?f:h,L=t.rects.popper,O=t.elements[S?E:b],_=mt(A(O)?O:O.contextElement||W(t.elements.popper),m,y,u),k=j(t.elements.reference),P=gt({reference:k,element:L,strategy:"absolute",placement:l}),B=ft(Object.assign({},L,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},H=t.modifiersData.offset;if(b===h&&H){var D=H[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,g=n.fallbackPlacements,y=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),L=g||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),O=[T].concat(L).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?m:c,d=X(o),p=d?l?v:v.filter((function(t){return X(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=yt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:y,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=O[0],N=0;N=0,$=j?"width":"height",V=yt(e,{placement:H,boundary:w,rootBoundary:b,altBoundary:C,padding:y}),R=j?M?r:s:M?i:o;A[$]>_[$]&&(R=st(R));var F=st(R),W=[];if(p&&W.push(V[D]<=0),f&&W.push(V[R]<=0,V[F]<=0),W.every((function(t){return t}))){q=H,P=!1;break}k.set(H,W)}if(P)for(var z=function(t){var e=O.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},U=x?3:1;U>0;U--){if("break"===z(U))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),l=yt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=m.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,v=n.altBoundary,m=n.padding,g=n.tether,y=void 0===g||g,w=n.tetherOffset,b=void 0===w?0:w,C=yt(e,{boundary:h,rootBoundary:f,padding:m,altBoundary:v}),S=B(e.placement),x=X(e.placement),I=!x,T=Y(S),E="x"===T?"y":"x",L=e.modifiersData.popperOffsets,O=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(L){if(u){var D,M="y"===T?o:s,j="y"===T?i:r,V="y"===T?"height":"width",R=L[T],F=R+C[M],W=R-C[j],z=y?-A[V]/2:0,U=x===c?O[V]:A[V],K=x===c?-A[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[M],nt=tt[j],ot=Z(0,O[V],Q[V]),it=I?O[V]/2-z-ot-et-k.mainAxis:U-ot-et-k.mainAxis,rt=I?-O[V]/2+z+ot+nt+k.mainAxis:K+ot+nt+k.mainAxis,st=e.elements.arrow&&J(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=R+rt-at,ut=Z(y?N(F,R+it-at-lt):F,R,y?q(W,ct):W);L[T]=ut,H[T]=ut-R}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=L[E],vt="y"===E?"height":"width",mt=ft+C[pt],gt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?mt:ft-O[vt]-A[vt]-bt+k.altAxis,St=wt?ft+O[vt]+A[vt]-bt-k.altAxis:gt,xt=y&&wt?function(t,e,n){var o=Z(t,e,n);return o>n?n:o}(Ct,ft,St):Z(y?Ct:mt,ft,y?St:gt);L[E]=xt,H[E]=xt-ft}e.modifiersData[l]=H}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=H(e.width)/t.offsetWidth||1,o=H(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=W(e),a=j(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==L(e)||dt(l))&&(c=(o=e)!==O(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=j(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Lt(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},158:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSFileUpload=e.HSDataTable=e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(406);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(740);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(268);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(485);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(809);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(891);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(332);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(850);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(60);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(911);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(751);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(f).default}});var v=n(442);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var m=n(887);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(m).default}});var g=n(97);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var y=n(166);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(y).default}});var w=n(502);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(w).default}});var b=n(684);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(b).default}});var C=n(100);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(C).default}});var S=n(969);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(S).default}});var x=n(957);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(x).default}}),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery?e.HSDataTable=n(814).default:e.HSDataTable=null,"undefined"!=typeof _&&"undefined"!=typeof Dropzone?e.HSFileUpload=n(234).default:e.HSFileUpload=null},740:function(t,e,n){ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(e){return e.element.el===t.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="block",t.content.style.height="",t.fireEvent("open",t.el),(0,l.dispatch)("open.hs.accordion",t.el,t.el)}))},e.prototype.hide=function(){var t=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="",t.content.style.height="0",t.fireEvent("close",t.el),(0,l.dispatch)("close.hs.accordion",t.el,t.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},737:(t,e)=>{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(t){return t.element.el===e.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="block",e.content.style.height="",e.fireEvent("open",e.el),(0,l.dispatch)("open.hs.accordion",e.el,e.el)}))},e.prototype.hide=function(){var t,e=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="",e.content.style.height="0",e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.accordion",e.el,e.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},629:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},268:function(t,e,n){ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):this.currentIndex *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform=this.calculateTransform(),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.calculateTransform=function(){var t=this.currentIndex*this.sliderWidth;return this.isRTL?"translate(".concat(t,"px, 0px)"):"translate(-".concat(t,"px, 0px)")},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):this.currentIndex0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(m=null==B?void 0:B.outputLoaderTemplate)&&void 0!==m?m:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(v=null==B?void 0:B.groupingType)&&void 0!==v?v:null,_.groupingTitleTemplate=null!==(y=null==B?void 0:B.groupingTitleTemplate)&&void 0!==y?y:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(g=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==g?g:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(O=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==O?O:null,_.toggleOpen=null!==(L=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==L?L:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.isOpened=!0,this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t=""),this.setResults(t),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){return Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){return e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){if(e.isItemExists(t))return!1;var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n,o;e.textContent=null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"",e.setAttribute("data-hs-combo-box-search-text",null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t=this;this.toggle.addEventListener("click",(function(){t.isOpened?t.close():t.open(t.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),!1):(this.animationInProcess=!0,this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){e.output.style.display="none",e.setValueAndClear(t),e.animationInProcess=!1})),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+10&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(v=null==B?void 0:B.outputLoaderTemplate)&&void 0!==v?v:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(m=null==B?void 0:B.groupingType)&&void 0!==m?m:null,_.groupingTitleTemplate=null!==(g=null==B?void 0:B.groupingTitleTemplate)&&void 0!==g?g:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(y=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==y?y:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(L=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,_.toggleOpen=null!==(O=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==O?O:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t="");var e=this.preventVisibility?this.input.value:t;this.setResults(e),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),""!==t.input.value?t.el.classList.add("has-value"):t.el.classList.remove("has-value"),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.output.role="listbox",this.output.tabIndex=-1,this.output.ariaOrientation="vertical",this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){var n,o,i,r=null!==(n=e.getAttribute("data-hs-combo-box-output-item-group-field"))&&void 0!==n?n:null,s=null!==(o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")))&&void 0!==o?o:null,l=null;return r&&(null===(i=null==s?void 0:s.group)||void 0===i?void 0:i.name)&&(l=t[r]),Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){var n;return(null===(n=null==s?void 0:s.group)||void 0===n?void 0:n.name)&&l?l===s.group.name&&e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]:e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-output-item-field]").forEach((function(e){var n=t[e.getAttribute("data-hs-combo-box-output-item-field")],o=e.hasAttribute("data-hs-combo-box-output-item-hide-if-empty");e.textContent=null!=n?n:"",!n&&o&&(e.style.display="none")})),o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n;e.setAttribute("data-hs-combo-box-search-text",null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t,e,n,o,i=this;this.isOpened?((null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="true")):((null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),(null===(o=null==this?void 0:this.input)||void 0===o?void 0:o.ariaExpanded)&&(this.input.ariaExpanded="false")),this.toggle.addEventListener("click",(function(){i.isOpened?i.close():i.open(i.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){var t,n;(null===(t=null==e?void 0:e.input)||void 0===t?void 0:t.ariaExpanded)&&(e.input.ariaExpanded="true"),(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e,n,o=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),!1):(this.animationInProcess=!0,(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="false"),(null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){o.output.style.display="none",o.setValueAndClear(t),o.animationInProcess=!1})),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+1=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},610:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},814:function(t,e,n){ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&(this.buildPagingPage(1),l>2&&this.pagingPages.appendChild((0,a.htmlToElement)('...')));for(var u=l;u<=c;u++)this.buildPagingPage(u);c...')),this.buildPagingPage(r)),this.disablePagingArrow(this.pagingPrev,0===e),this.disablePagingArrow(this.pagingNext,e===n-1),this.hidePagingIfSinglePage()},e.prototype.buildPagingPage=function(t){var e=this,n=this.dataTable.page.info().page,o=(0,a.htmlToElement)('');o.innerText="".concat(t),o.setAttribute("data-page","".concat(t)),this.pageBtnClasses&&(0,a.classToClassList)(this.pageBtnClasses,o),n===t-1&&o.classList.add("active"),o.addEventListener("click",(function(){return e.onPageClick(t)})),this.pagingPages.append(o)},e.prototype.onPageClick=function(t){this.dataTable.page(t-1).draw("page")},e.prototype.initRowSelecting=function(){var t=this;this.rowSelectingAll.addEventListener("change",(function(){return t.onSelectAllChange()}))},e.prototype.triggerChangeEventToRow=function(){var t=this;this.table.querySelectorAll("tbody ".concat(this.rowSelectingIndividual)).forEach((function(e){e.addEventListener("change",(function(){t.updateSelectAllCheckbox()}))}))},e.prototype.onSelectAllChange=function(){var t=this,e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);o&&(o.checked=e)})),this.updateSelectAllCheckbox()},e.prototype.updateSelectAllCheckbox=function(){var t=this;if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;var e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);if(o&&!o.checked)return e=!1,!1})),this.rowSelectingAll.checked=e},e.getInstance=function(t,e){var n=window.$hsDataTableCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDataTableCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(l(n(961)).default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&c.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=c),e.default=c},891:function(t,e,n){ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle&&this.buildToggle(),this.menu&&this.buildMenu(),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click"),this.closeMode=(0,l.getClassProperty)(this.el,"--auto-close","true")},e.prototype.buildToggle=function(){var t,e=this;(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.el.classList.contains("open")?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(t){return e.onClickHandler(t)}))},e.prototype.buildMenu=function(){this.menu.role="menu"},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ","")),s=(window.getComputedStyle(this.el).getPropertyValue("--gpu-acceleration")||"true").replace(" ","");"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}},{name:"computeStyles",options:{adaptive:"fixed"===o,gpuAcceleration:"true"===s}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){var e;(null===(e=null==t?void 0:t.toggle)||void 0===e?void 0:e.ariaExpanded)&&(t.toggle.ariaExpanded="true"),t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;var n;if(this.animationInProcess=!0,t){var o=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(o,(function(){return e.destroyPopper()}))}else this.destroyPopper();e.menu.style.margin=null,(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="false"),e.el.classList.remove("open"),e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.dropdown",e.el,e.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1 .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle.addEventListener("click",(function(e){return t.onClickHandler(e)})),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click")},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ",""));"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;if(this.animationInProcess=!0,t){var n=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(n,(function(){return e.destroyPopper()}))}else this.destroyPopper();this.menu.style.margin=null,this.el.classList.remove("open"),this.fireEvent("close",this.el),(0,l.dispatch)("close.hs.dropdown",this.el,this.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t',s.extensions=_.merge({default:{icon:'',class:"size-5"},xls:{icon:'',class:"size-5"},doc:{icon:'',class:"size-5"},zip:{icon:'',class:"size-5"}},a.extensions),s.singleton=a.singleton,s.concatOptions=r(r({clickable:s.el.querySelector("[data-hs-file-upload-trigger]"),previewsContainer:s.el.querySelector("[data-hs-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:s.previewTemplate,autoHideTrigger:!1},a),n),s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()},e.prototype.initDropzone=function(){var t=this,e=this.el.querySelector("[data-hs-file-upload-clear]"),n=Array.from(this.el.querySelectorAll("[data-hs-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(function(e){return t.onAddFile(e)})),this.dropzone.on("removedfile",(function(){return t.onRemoveFile()})),this.dropzone.on("uploadprogress",(function(e,n){return t.onUploadProgress(e,n)})),this.dropzone.on("complete",(function(e){return t.onComplete(e)})),e&&(e.onclick=function(){t.dropzone.files.length&&t.dropzone.removeAllFiles(!0)}),n.length&&n.forEach((function(e){e.onclick=function(){var e,n;(null===(e=t.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(n=t.concatOptions)||void 0===n?void 0:n.clickable).click()}}))},e.prototype.onAddFile=function(t){var e=this,n=t.previewElement,o=t.previewElement.querySelector("[data-hs-file-upload-reload]");if(!n)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),o&&o.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var o=document.createElement("input");o.type="file",o.click(),o.addEventListener("change",(function(n){var o,i=null===(o=n.target.files)||void 0===o?void 0:o[0];if(i){var r=i;r.status=Dropzone.ADDED,r.accepted=!0,r.previewElement=t.previewElement,r.previewTemplate=t.previewTemplate,r.previewsContainer=t.previewsContainer,e.dropzone.removeFile(t),e.dropzone.addFile(r)}}))})),this.previewAccepted(t)},e.prototype.previewAccepted=function(t){var e=this,n=t.previewElement,o=this.splitFileName(t.name),i=n.querySelector("[data-hs-file-upload-file-name]"),r=n.querySelector("[data-hs-file-upload-file-ext]"),s=n.querySelector("[data-hs-file-upload-file-size]"),l=n.querySelector("[data-hs-file-upload-file-icon]"),a=this.el.querySelector("[data-hs-file-upload-trigger]"),c=n.querySelector("[data-dz-thumbnail]"),u=n.querySelector("[data-hs-file-upload-remove]");i&&(i.textContent=o.name),r&&(r.textContent=o.extension),s&&(s.textContent=this.formatFileSize(t.size)),c&&(t.type.includes("image/")?c.classList.remove("hidden"):this.setIcon(o.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(a.style.display="none"),u&&(u.onclick=function(){return e.dropzone.removeFile(t)})},e.prototype.onRemoveFile=function(){var t=this.el.querySelector("[data-hs-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")},e.prototype.onUploadProgress=function(t,e){var n=t.previewElement;if(!n)return!1;var o=n.querySelector("[data-hs-file-upload-progress-bar]"),i=n.querySelector("[data-hs-file-upload-progress-bar-pane]"),r=n.querySelector("[data-hs-file-upload-progress-bar-value]"),s=Math.floor(e);o&&o.setAttribute("aria-valuenow","".concat(s)),i&&(i.style.width="".concat(s,"%")),r&&(r.innerText="".concat(s))},e.prototype.onComplete=function(t){var e=t.previewElement;if(!e)return!1;e.classList.add("complete")},e.prototype.setIcon=function(t,e){var n=this.createIcon(t);e.append(n)},e.prototype.createIcon=function(t){var e,n,o=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,l.htmlToElement)(this.extensions[t].icon):(0,l.htmlToElement)(this.extensions.default.icon);return(0,l.classToClassList)((null===(n=this.extensions[t])||void 0===n?void 0:n.class)?this.extensions[t].class:this.extensions.default.class,o),o},e.prototype.formatFileSize=function(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"},e.prototype.splitFileName=function(t){var e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}},e.getInstance=function(t,e){var n=window.$hsFileUploadCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsFileUploadCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a.default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&c.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=c),e.default=c},332:function(t,e,n){ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},770:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.checkIsNumberAndConvert=function(){var t=this.input.value.trim(),e=this.cleanAndExtractNumber(t);null!==e?(this.inputValue=e,this.input.value=e.toString()):(this.inputValue=0,this.input.value="0")},e.prototype.cleanAndExtractNumber=function(t){var e=[],n=!1;t.split("").forEach((function(t){t>="0"&&t<="9"?e.push(t):"."!==t||n||(e.push(t),n=!0)}));var o=e.join(""),i=parseFloat(o);return isNaN(i)?null:i},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},850:function(t,e,n){ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.openedBreakpoint})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.openedBreakpoint})).forEach((function(t){c.setOpened(t.element.openedBreakpoint,t)}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},659:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.overlay.classList.contains("opened")})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("opened")})).forEach((function(t){var e=parseInt(window.getComputedStyle(t.element.overlay).getPropertyValue("z-index")),n=document.querySelector("#".concat(t.element.overlay.id,"-backdrop"));if(e===parseInt(window.getComputedStyle(n).getPropertyValue("z-index"))+1)return!1;"style"in n&&(n.style.zIndex="".concat(e-1)),document.body.classList.add("hs-overlay-body-open")}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},60:function(t,e,n){ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},139:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},911:function(t,e,n){ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},961:function(t,e,n){ -/* - * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]",o.dropdownClasses=l.dropdownClasses||"absolute top-full z-[1] w-full bg-white border border-gray-200 rounded-md hidden mt-2",o.dropdownItemTemplate=l.dropdownItemTemplate||"
",o.dropdownItemTemplatesByType=l.dropdownItemTemplatesByType||null,o.dropdownItemClasses=l.dropdownItemClasses||"py-2 px-4 w-full cursor-pointer text-sm hover:bg-gray-300 hover:text-black",o.highlightedTextTagName=l.highlightedTextTagName||"u",o.highlightedTextClasses=l.highlightedTextClasses||"bg-green-200",o.jsonUrl&&o.fetchData().then((function(){return o.init()})),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsSearchByJsonCollection,this),this.buildDropdown(),this.el.addEventListener("input",(0,c.debounce)((function(e){t.val=e.target.value,t.val.length>t.minChars?t.searchData(t.val):t.result=[],t.result.length?t.dropdown.classList.remove("hidden"):t.dropdown.classList.add("hidden"),t.buildItems()})))},e.prototype.fetchData=function(){return s(this,void 0,void 0,(function(){var t=this;return l(this,(function(e){switch(e.label){case 0:return[4,fetch(this.jsonUrl).then((function(t){return t.json()})).then((function(e){return t.json=e}))];case 1:return e.sent(),[2]}}))}))},e.prototype.searchData=function(t){this.result=this.json.filter((function(e){var n=t.toLowerCase(),o=e.title.toLowerCase(),i=e.description.toLowerCase();return o.includes(n)||i.includes(n)}))},e.prototype.buildDropdown=function(){this.dropdown=(0,c.htmlToElement)(this.dropdownTemplate),this.dropdownClasses&&(0,c.classToClassList)(this.dropdownClasses,this.dropdown),this.el.after(this.dropdown)},e.prototype.buildItems=function(){var t=this;this.dropdown.innerHTML="",this.result.forEach((function(e){var n=(0,c.htmlToElement)(''));n.append(t.itemTemplate(e)),t.dropdown.append(n)}))},e.prototype.itemTemplate=function(t){var e=new RegExp(this.val,"gi"),n=t.title.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),o=t.description.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),i=this.dropdownItemTemplatesByType?this.dropdownItemTemplatesByType.find((function(e){return e.type===t.type})):null,r=i?(0,c.htmlToElement)(i.markup):(0,c.htmlToElement)(this.dropdownItemTemplate);this.dropdownItemClasses&&(0,c.classToClassList)(this.dropdownItemClasses,r);var s=r.querySelector("[data-title]");s?s.append((0,c.htmlToElement)("".concat(n,""))):r.append((0,c.htmlToElement)("".concat(n,"")));var l=r.querySelector("[data-description]");if(l)l.append((0,c.htmlToElement)("".concat(o,"")));else if(!i){var a=(0,c.htmlToElement)("
");r.append(a),r.append((0,c.htmlToElement)("".concat(o,"")))}return r},e.getInstance=function(t){var e=window.$hsSearchByJsonCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return e?e.element:null},e.autoInit=function(){window.$hsSearchByJsonCollection||(window.$hsSearchByJsonCollection=[]),document.querySelectorAll("[data-hs-search-by-json]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsSearchByJsonCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a(n(737)).default);window.addEventListener("load",(function(){u.autoInit()})),"undefined"!=typeof window&&(window.HSSearchByJson=u),e.default=u},233:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,i=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),r=parseInt(String(e.getBoundingClientRect().top))-o-i,l=e.offsetHeight;if(r<=0&&r+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},442:function(t,e,n){ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),e=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&e&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),this.toggle.addEventListener("click",(function(){if(o.isDisabled)return!1;o.isOpened?o.close():o.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o){var i=this;void 0===o&&(o="1");var r=null,s=(0,a.htmlToElement)(this.optionTag||"
");if(s.setAttribute("data-value",e),s.setAttribute("data-title-value",t),s.setAttribute("tabIndex",o),s.classList.add("cursor-pointer"),this.optionTemplate&&(r=(0,a.htmlToElement)(this.optionTemplate),s.append(r)),r?r.querySelector("[data-title]").textContent=t||"":s.textContent=t||"",n){if(n.icon){var l=(0,a.htmlToElement)(n.icon);if(l.classList.add("mw-full"),r)r.querySelector("[data-icon]").append(l);else{var c=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,c),c.append(l),s.append(c)}}if(n.description)if(r)r.querySelector("[data-description]").append(n.description);else{var u=(0,a.htmlToElement)("
");u.textContent=n.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,u),s.append(u)}}r&&r.querySelector("[data-icon]")&&!n&&!(null==n?void 0:n.icon)&&r.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&s.classList.add("selected"),s.addEventListener("click",(function(){return i.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,s),this.dropdown&&this.dropdown.append(s)},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n){var o=(0,a.htmlToElement)("");o.setAttribute("value",e),o.setAttribute("data-hs-select-option",JSON.stringify(n)),o.innerText=t,this.el.append(o)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){this.el.value="".concat(this.value);var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,options:n}],!1)},e.prototype.removeSelectOption=function(t){if(!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t}))},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.stringFromValue=function(){var t=this,e=[];return this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems?"".concat(e.length," ").concat(this.toggleCountText):e.join(", ")},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0,Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")})).classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){t.wrapper.classList.add("active"),t.dropdown.classList.add("opened"),t.hasSearch&&!t.preventSearchFocus&&t.search.focus(),t.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){o.dropdown.classList.add("hidden"),o.hasSearch&&(o.search.value="",o.search.dispatchEvent(new Event("input",{bubbles:!0})),o.search.blur()),o.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r),e.buildOption(o,i,r,n),e.buildOriginalOption(o,i,r))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t){!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Tab":t.preventDefault(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},957:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),n=this.toggle.querySelector("[data-icon]"),o=this.toggle.querySelector("[data-title]"),!this.isMultiple&&n&&this.setToggleIcon(),!this.isMultiple&&o&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,o||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),(null===(e=this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(){if(i.isDisabled)return!1;i.isOpened?i.close():i.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.disabled,e.selected,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o,i,r){var l=this;void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===r&&(r="1");var c=null,u=(0,a.htmlToElement)(this.optionTag||"
");if(u.setAttribute("data-value",e),u.setAttribute("data-title-value",t),u.setAttribute("tabIndex",r),u.classList.add("cursor-pointer"),n&&u.classList.add("disabled"),o&&(this.isMultiple?this.value=s(s([],this.value,!0),[e],!1):this.value=e),this.optionTemplate&&(c=(0,a.htmlToElement)(this.optionTemplate),u.append(c)),c?c.querySelector("[data-title]").textContent=t||"":u.textContent=t||"",i){if(i.icon){var d=(0,a.htmlToElement)(i.icon);if(d.classList.add("max-w-full"),c)c.querySelector("[data-icon]").append(d);else{var p=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,p),p.append(d),u.append(p)}}if(i.description)if(c)c.querySelector("[data-description]").append(i.description);else{var h=(0,a.htmlToElement)("
");h.textContent=i.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,h),u.append(h)}}c&&c.querySelector("[data-icon]")&&!i&&!(null==i?void 0:i.icon)&&c.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&u.classList.add("selected"),n||u.addEventListener("click",(function(){return l.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,u),this.dropdown&&this.dropdown.append(u),o&&this.setNewValue()},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n,o,i){var r=(0,a.htmlToElement)("");r.setAttribute("value",e),n&&r.setAttribute("disabled","disabled"),o&&r.setAttribute("selected","selected"),r.setAttribute("data-hs-select-option",JSON.stringify(i)),r.innerText=t,this.el.append(r)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n,o,i){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,disabled:n,selected:o,options:i}],!1)},e.prototype.removeSelectOption=function(t,e){if(void 0===e&&(e=!1),!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t})),console.log(e),this.value=e?this.value.filter((function(e){return e!==t})):t,console.log(this.value)},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():(console.log(),this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder)},e.prototype.stringFromValue=function(){var t=this,e=[],n="";if(this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems)if("nItemsAndCount"===this.toggleCountTextMode){var o=e.slice(0,this.toggleCountTextMinItems-1);n="".concat(o.join(this.toggleSeparators.items)," ").concat(this.toggleSeparators.betweenItemsAndCounter," ").concat(e.length-o.length," ").concat(this.toggleCountText)}else n="".concat(e.length," ").concat(this.toggleCountText);else n=e.join(this.toggleSeparators.items);return n},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0;var e=Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")}));e&&e.classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t,e=this,n=(null===(t=null===window||void 0===window?void 0:window.$hsSelectCollection)||void 0===t?void 0:t.find((function(t){return t.element.isOpened})))||null;if(n&&n.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.wrapper.classList.add("active"),e.dropdown.classList.add("opened"),e.hasSearch&&!e.preventSearchFocus&&e.search.focus(),e.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o,i=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){i.dropdown.classList.add("hidden"),i.hasSearch&&(i.search.value="",i.search.dispatchEvent(new Event("input",{bubbles:!0})),i.search.blur()),i.animationInProcess=!1})),null===(o=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===o||o.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.disabled,s=t.selected,l=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r,s,l),e.buildOption(o,i,r,s,l,n),e.buildOriginalOption(o,i,r,s,l),s&&!e.isMultiple&&e.onSelectOption(i))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t,n){void 0===n&&(n=!1),!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t,n),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t,e.isMultiple)})):n(t,this.isMultiple),this.setNewValue()},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.open=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.isOpened&&e.element.open()},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":t.preventDefault(),t.stopImmediatePropagation(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},887:function(t,e,n){ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,m=e.hasError,v=void 0!==m&&m;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},983:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,v=e.hasError,m=void 0!==v&&v;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),m&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:m,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},97:function(t,e,n){ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},679:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},969:function(t,e,n){ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ /* * HSStaticMethods - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var o=n(969),i=n(362),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(700)})())); \ No newline at end of file +Object.defineProperty(e,"__esModule",{value:!0});var o=n(292),i=n(255),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))},cleanCollection:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.collection;window[e]instanceof Array&&(window[e]=[])})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.collection;t.includes(n)&&window[o]instanceof Array&&(window[o]=[])}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(158)})())); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a80dae5..25a433e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "preline", "version": "2.1.0", - "lockfileVersion": 3, + "lockfileVersion": 2, "requires": true, "packages": { "": { @@ -9,16 +9,11 @@ "version": "2.1.0", "license": "MIT", "dependencies": { - "@popperjs/core": "^2.11.2", - "datatables.net-dt": "^2.0.5", - "dropzone": "^6.0.0-beta.2", - "jquery": "^3.7.1", - "lodash": "^4.17.21" + "@popperjs/core": "^2.11.2" }, "devDependencies": { "@types/datatables.net": "^1.12.0", "@types/dropzone": "^5.7.8", - "@types/lodash": "^4.17.1", "dts-bundle-generator": "^9.0.0", "prettier": "^3.0.0", "source-map-loader": "^4.0.1", @@ -38,45 +33,45 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -86,9 +81,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -104,11 +99,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@swc/helpers": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.2.14.tgz", - "integrity": "sha512-wpCQMhf5p5GhNg2MmGKXzUNwxe7zRiCsmqYsamez2beP7mKPCSiu+BjZcdN95yYSzO857kr0VfQewmGpS77nqA==" - }, "node_modules/@types/datatables.net": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/@types/datatables.net/-/datatables.net-1.12.0.tgz", @@ -129,9 +119,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.44.9", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.9.tgz", - "integrity": "sha512-6yBxcvwnnYoYT1Uk2d+jvIfsuP4mb2EdIxFnrPABj5a/838qe5bGkNLFOiipX4ULQ7XVQvTxOh7jO+BTAiqsEw==", + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", "dev": true, "peer": true, "dependencies": { @@ -172,16 +162,10 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "node_modules/@types/lodash": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.1.tgz", - "integrity": "sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q==", - "dev": true - }, "node_modules/@types/node": { - "version": "20.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", - "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -194,9 +178,9 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "peer": true, "dependencies": { @@ -219,9 +203,9 @@ "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true, "peer": true }, @@ -245,16 +229,16 @@ "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -285,30 +269,30 @@ "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -316,26 +300,26 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -344,13 +328,13 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -412,17 +396,10 @@ "dev": true, "peer": true }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "deprecated": "Use your platform's native atob() and btoa() methods instead", - "dev": true - }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -491,21 +468,21 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -523,8 +500,8 @@ ], "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -542,9 +519,9 @@ "dev": true }, "node_modules/caniuse-lite": { - "version": "1.0.30001570", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz", - "integrity": "sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw==", + "version": "1.0.30001621", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", + "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", "dev": true, "funding": [ { @@ -673,35 +650,18 @@ } }, "node_modules/datatables.net": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-2.0.5.tgz", - "integrity": "sha512-Eu7z0ErFyr44hopfLQ7kyIWRdfqH2zFG93aHcnGKGrt/ICWXUsLrjUwghuN5b1pktnKzXCFYsl6Ad9WypiSNeA==", - "dependencies": { - "jquery": ">=1.7" - } - }, - "node_modules/datatables.net-dt": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/datatables.net-dt/-/datatables.net-dt-2.0.5.tgz", - "integrity": "sha512-YVlBgz2rg5iWCp1wvtgknfgeoyuf+7YL5cR7avP0B10E6af+sIcCzcoMiP0g6wvnoyCVhlyah8alw2wNuRrBeA==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-2.0.7.tgz", + "integrity": "sha512-cyW+HZwkMzb4bLrao/SS9/i64ZHiw5nYhXl+OwuOPgddG+R9O11iOEke8wYsdiyOQmjv2mE6xkEmRMZwHZc8zw==", + "dev": true, "dependencies": { - "datatables.net": "2.0.5", "jquery": ">=1.7" } }, - "node_modules/dropzone": { - "version": "6.0.0-beta.2", - "resolved": "https://registry.npmjs.org/dropzone/-/dropzone-6.0.0-beta.2.tgz", - "integrity": "sha512-k44yLuFFhRk53M8zP71FaaNzJYIzr99SKmpbO/oZKNslDjNXQsBTdfLs+iONd0U0L94zzlFzRnFdqbLcs7h9fQ==", - "dependencies": { - "@swc/helpers": "^0.2.13", - "just-extend": "^5.0.0" - } - }, "node_modules/dts-bundle-generator": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-9.0.0.tgz", - "integrity": "sha512-4XPDOb+F1fkPrvqFL4hnNW2Edc3uiFxQDsK8gUMP8/45+QkA+dSOH0ZWZCKXEjA3ITVbPGV1li8oP8JE4Z/Y0g==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-9.5.1.tgz", + "integrity": "sha512-DxpJOb2FNnEyOzMkG11sxO2dmxPjthoVWxfKqWYJ/bI/rT1rvTMktF5EKjAYrRZu6Z6t3NhOUZ0sZ5ZXevOfbA==", "dev": true, "dependencies": { "typescript": ">=5.0.2", @@ -715,9 +675,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.613", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.613.tgz", - "integrity": "sha512-r4x5+FowKG6q+/Wj0W9nidx7QO31BJwmR2uEo+Qh3YLGQ8SbBAFuDFpTxzly/I2gsbrFwBuIjrMp423L3O5U3w==", + "version": "1.4.782", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz", + "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==", "dev": true, "peer": true }, @@ -728,9 +688,9 @@ "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", + "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -741,9 +701,9 @@ } }, "node_modules/envinfo": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.0.tgz", - "integrity": "sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -753,16 +713,16 @@ } }, "node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", "dev": true, "peer": true }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -847,9 +807,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -921,9 +881,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -1046,7 +1006,8 @@ "node_modules/jquery": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -1061,11 +1022,6 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/just-extend": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-5.1.1.tgz", - "integrity": "sha512-b+z6yF1d4EOyDgylzQo5IminlUmzSeqR1hs/bzjBNjuGras4FXq/6TrzjxfN0j+TmI0ltJzTNlqXUMCniciwKQ==" - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -1097,23 +1053,6 @@ "node": ">=8" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -1121,12 +1060,12 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -1231,9 +1170,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true, "peer": true }, @@ -1262,9 +1201,9 @@ } }, "node_modules/prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", - "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -1398,13 +1337,10 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -1413,9 +1349,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -1464,21 +1400,20 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-loader": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", - "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.2.tgz", + "integrity": "sha512-oYwAqCuL0OZhBoSgmdrLa7mv9MjommVMiQIWgcztf+eS4+8BfcUee6nenFnDhKOhzAVnk5gpZdfnz1iiBv+5sg==", "dev": true, "dependencies": { - "abab": "^2.0.6", "iconv-lite": "^0.6.3", "source-map-js": "^1.0.2" }, @@ -1566,9 +1501,9 @@ } }, "node_modules/terser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz", - "integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", + "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -1584,16 +1519,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -1659,9 +1594,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -1678,9 +1613,9 @@ "dev": true }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "funding": [ { @@ -1698,8 +1633,8 @@ ], "peer": true, "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -1718,9 +1653,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "peer": true, "dependencies": { @@ -1732,35 +1667,35 @@ } }, "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.16.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -1904,12 +1839,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -1937,5 +1866,1357 @@ "node": ">=12" } } + }, + "dependencies": { + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" + }, + "@types/datatables.net": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@types/datatables.net/-/datatables.net-1.12.0.tgz", + "integrity": "sha512-HjvusoHf/XKdNI/pDP/qVDclUVOKF/PI4R/AlVeUdz3Z00+A4Dyu9N5hIXGk3cK36sy1A072UffYZ+1wwW0zWg==", + "dev": true, + "requires": { + "datatables.net": "*" + } + }, + "@types/dropzone": { + "version": "5.7.8", + "resolved": "https://registry.npmjs.org/@types/dropzone/-/dropzone-5.7.8.tgz", + "integrity": "sha512-+L0/KRMuB8cIiCe5AfF448nGMpY+gHiSakqsqT3plEIfgqSV+gcVs1AkngM9zZG8hi6lgMxy4iYEuGXXmqjYvg==", + "dev": true, + "requires": { + "@types/jquery": "*" + } + }, + "@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "peer": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "peer": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "peer": true + }, + "@types/jquery": { + "version": "3.5.30", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz", + "integrity": "sha512-nbWKkkyb919DOUxjmRVk8vwtDb0/k8FKncmUKFi+NY+QXqWltooxTrswvz4LspQwxvLdvzBN1TImr6cw3aQx2A==", + "dev": true, + "requires": { + "@types/sizzle": "*" + } + }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "@types/node": { + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } + }, + "@types/sizzle": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", + "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "peer": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "peer": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true, + "peer": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "requires": {} + }, + "@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "requires": {} + }, + "@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "requires": {} + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "peer": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "peer": true + }, + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "peer": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, + "browserslist": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "dev": true, + "peer": true, + "requires": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001621", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", + "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", + "dev": true, + "peer": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "peer": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "datatables.net": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-2.0.7.tgz", + "integrity": "sha512-cyW+HZwkMzb4bLrao/SS9/i64ZHiw5nYhXl+OwuOPgddG+R9O11iOEke8wYsdiyOQmjv2mE6xkEmRMZwHZc8zw==", + "dev": true, + "requires": { + "jquery": ">=1.7" + } + }, + "dts-bundle-generator": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/dts-bundle-generator/-/dts-bundle-generator-9.5.1.tgz", + "integrity": "sha512-DxpJOb2FNnEyOzMkG11sxO2dmxPjthoVWxfKqWYJ/bI/rT1rvTMktF5EKjAYrRZu6Z6t3NhOUZ0sZ5ZXevOfbA==", + "dev": true, + "requires": { + "typescript": ">=5.0.2", + "yargs": "^17.6.0" + } + }, + "electron-to-chromium": { + "version": "1.4.782", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz", + "integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==", + "dev": true, + "peer": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", + "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "envinfo": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", + "dev": true + }, + "es-module-lexer": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", + "dev": true, + "peer": true + }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "peer": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "peer": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true + }, + "is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "peer": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "peer": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "peer": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "peer": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true + }, + "node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true, + "peer": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true, + "peer": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true + }, + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true + }, + "serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true + }, + "source-map-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.2.tgz", + "integrity": "sha512-oYwAqCuL0OZhBoSgmdrLa7mv9MjommVMiQIWgcztf+eS4+8BfcUee6nenFnDhKOhzAVnk5gpZdfnz1iiBv+5sg==", + "dev": true, + "requires": { + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, + "terser": { + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz", + "integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + } + }, + "terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "ts-loader": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", + "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "dependencies": { + "source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true + } + } + }, + "typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "peer": true, + "requires": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "watchpack": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "dev": true, + "peer": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "dev": true, + "peer": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.16.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + } + }, + "webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "peer": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } } } diff --git a/package.json b/package.json index ef0de21..fd60038 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "preline", - "version": "2.1.0", + "version": "2.4.0", "description": "Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.", "main": "index.js", "module": "./src/index.ts", @@ -34,8 +34,8 @@ "tailwind css remix", "tailwind css laravel" ], - "author": "HtmlStream", - "license": "MIT", + "author": "Preline Labs Ltd.", + "license": "Licensed under MIT and Preline UI Fair Use License", "publishConfig": { "access": "public" }, @@ -45,6 +45,8 @@ "generate-dts": "dts-bundle-generator --config dts-config.js" }, "devDependencies": { + "@types/datatables.net": "^1.12.0", + "@types/dropzone": "^5.7.8", "dts-bundle-generator": "^9.0.0", "prettier": "^3.0.0", "source-map-loader": "^4.0.1", @@ -56,4 +58,4 @@ "dependencies": { "@popperjs/core": "^2.11.2" } -} +} \ No newline at end of file diff --git a/plugin.js b/plugin.js index e0c78f2..22c6273 100644 --- a/plugin.js +++ b/plugin.js @@ -1,10 +1,10 @@ /* * Plugin - * @version: 2.1.0 - * @author: HTMLStream - * @requires: tailwindcss ^3.1.2 - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @requires: tailwindcss ^3.4.1 + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ const plugin = require('tailwindcss/plugin'); @@ -20,7 +20,7 @@ module.exports = plugin(function ({ addVariant, e }) { }, ({ modifySelectors, separator }) => { modifySelectors(({ className }) => { - return `.hs-dropdown.open .hs-dropdown-toggle .${e( + return `.hs-dropdown.open > .hs-dropdown-toggle .${e( `hs-dropdown-open${separator}${className}`, )}`; }); @@ -474,6 +474,19 @@ module.exports = plugin(function ({ addVariant, e }) { }, ]); + addVariant('hs-combo-box-has-value', [ + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.has-value .${e(`hs-combo-box-has-value${separator}${className}`)}`; + }); + }, + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.has-value.${e(`hs-combo-box-has-value${separator}${className}`)}`; + }); + }, + ]); + addVariant('hs-combo-box-selected', [ ({ modifySelectors, separator }) => { modifySelectors(({ className }) => { @@ -537,6 +550,33 @@ module.exports = plugin(function ({ addVariant, e }) { }, ]); + // Datatables.net + addVariant('hs-datatable-ordering-asc', [ + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.dt-ordering-asc .${e(`hs-datatable-ordering-asc${separator}${className}`)}`; + }); + }, + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.dt-ordering-asc.${e(`hs-datatable-ordering-asc${separator}${className}`)}`; + }); + }, + ]); + + addVariant('hs-datatable-ordering-desc', [ + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.dt-ordering-desc .${e(`hs-datatable-ordering-desc${separator}${className}`)}`; + }); + }, + ({ modifySelectors, separator }) => { + modifySelectors(({ className }) => { + return `.dt-ordering-desc.${e(`hs-datatable-ordering-desc${separator}${className}`)}`; + }); + }, + ]); + // Modes addVariant('hs-default-mode-active', ({ modifySelectors, separator }) => { modifySelectors(({ className }) => { diff --git a/preline.d.ts b/preline.d.ts index 3e38c8d..3fd3f92 100644 --- a/preline.d.ts +++ b/preline.d.ts @@ -1,5 +1,3 @@ - - export interface ICopyMarkupOptions { targetSelector: string; wrapperSelector: string; @@ -119,6 +117,7 @@ export declare class HSCarousel extends HSBasePlugin implement private resetTimer; private detectDirection; recalculateWidth(): void; + private calculateTransform; goToPrev(): void; goToNext(): void; goTo(i: number): void; @@ -274,11 +273,13 @@ export declare class HSDropdown extends HSBasePlugin<{}, IHTMLElementPopper> imp private readonly closers; menu: HTMLElement | null; private eventMode; - private readonly closeMode; + private closeMode; private animationInProcess; constructor(el: IHTMLElementPopper, options?: {}, events?: {}); private init; resizeHandler(): void; + private buildToggle; + private buildMenu; private buildClosers; private onClickHandler; private onMouseEnterHandler; @@ -319,6 +320,8 @@ export declare class HSInputNumber extends HSBasePlugin imp private readonly step; constructor(el: HTMLElement, options?: IInputNumberOptions); private init; + private checkIsNumberAndConvert; + private cleanAndExtractNumber; private build; private buildInput; private buildIncrement; @@ -334,6 +337,7 @@ export declare class HSInputNumber extends HSBasePlugin imp } export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; @@ -345,9 +349,11 @@ export interface IOverlay { } export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass; + private readonly emulateScrollbarSpace; private readonly isClosePrev; private readonly backdropClasses; private readonly backdropExtraClasses; + private readonly animationTarget; private openNextOverlay; private autoHide; private readonly overlayId; @@ -366,6 +372,7 @@ export declare class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private buildBackdrop; private destroyBackdrop; private focusElement; + private getScrollbarSize; open(): false | Promise; close(forceClose?: boolean): Promise; static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem; @@ -421,48 +428,6 @@ export declare class HSRemoveElement extends HSBasePlugin private remove; static autoInit(): void; } -export interface ISearchItemTemplate { - type: string; - markup: string; -} -export interface ISearchByJsonOptions { - jsonUrl: string; - minChars?: number; - dropdownTemplate?: string; - dropdownClasses?: string; - dropdownItemTemplate?: string; - dropdownItemTemplatesByType?: ISearchItemTemplate[]; - dropdownItemClasses?: string; - highlightedTextTagName?: string; - highlightedTextClasses?: string; -} -export interface ISearchByJson { - options?: ISearchByJsonOptions; -} -export declare class HSSearchByJson extends HSBasePlugin implements ISearchByJson { - private readonly jsonUrl; - private readonly minChars; - private json; - private result; - private val; - private readonly dropdownTemplate; - private readonly dropdownClasses; - private readonly dropdownItemTemplate; - private readonly dropdownItemTemplatesByType; - private readonly dropdownItemClasses; - private readonly highlightedTextTagName; - private readonly highlightedTextClasses; - private dropdown; - constructor(el: HTMLInputElement, options?: ISearchByJsonOptions); - private init; - private fetchData; - private searchData; - private buildDropdown; - private buildItems; - private itemTemplate; - static getInstance(target: HTMLElement | string): HSSearchByJson; - static autoInit(): void; -} export interface IScrollspy { options?: {}; } @@ -488,6 +453,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } export interface ISelectOptions { @@ -501,8 +468,13 @@ export interface ISelectOptions { wrapperClasses?: string; toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; tagsInputClasses?: string; @@ -549,8 +521,10 @@ export declare class HSSelect extends HSBasePlugin implements IS selectedItems: string[]; private readonly toggleTag; private readonly toggleClasses; + private readonly toggleSeparators; private readonly toggleCountText; private readonly toggleCountTextMinItems; + private readonly toggleCountTextMode; private readonly wrapperClasses; private readonly tagsItemTemplate; private readonly tagsItemClasses; @@ -584,6 +558,7 @@ export declare class HSSelect extends HSBasePlugin implements IS private readonly isAddTagOnEnter; private tagsInputHelper; constructor(el: HTMLElement, options?: ISelectOptions); + setValue(val: string | string[]): void; private init; private build; private buildWrapper; @@ -628,6 +603,7 @@ export declare class HSSelect extends HSBasePlugin implements IS recalculateDirection(): void; static getInstance(target: HTMLElement | string, isInstance?: boolean): HSSelect | ICollectionItem; static autoInit(): void; + static open(target: HTMLElement | string): void; static close(target: HTMLElement | string): void; static closeCurrentlyOpened(evtTarget?: HTMLElement | null): void; static accessibility(evt: KeyboardEvent): void; @@ -896,7 +872,15 @@ export interface IStaticMethods { getClassProperty(el: HTMLElement, prop?: string, val?: string): string; afterTransition(el: HTMLElement, cb: Function): void; autoInit(collection?: string | string[]): void; + cleanCollection(collection?: string | string[]): void; } export declare const HSStaticMethods: IStaticMethods; +declare let HSDataTableModule: any; +declare let HSFileUploadModule: any; + +export { + HSDataTableModule as HSDataTable, + HSFileUploadModule as HSFileUpload, +}; export {}; diff --git a/preline.js b/preline.js index 53a9e95..25a7640 100644 --- a/preline.js +++ b/preline.js @@ -1,169 +1,177 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={492:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>y,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>gt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>v,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>g,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>m,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",m=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),v=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),y="beforeRead",g="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[y,g,w,b,C,S,x,I,T];function O(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof L(t).Element||t instanceof Element}function _(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&O(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&O(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,j=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(D())}function M(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&j(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&j(o.height)/t.offsetHeight||1);var s=(A(t)?L(t):window).visualViewport,l=!$()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function H(t){var e=M(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function R(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function W(t){return L(t).getComputedStyle(t)}function V(t){return["table","td","th"].indexOf(O(t))>=0}function F(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||F(t)}function J(t){return _(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=L(t),n=J(t);n&&V(n)&&"static"===W(n).position;)n=J(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===W(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===W(t).position)return null;var n=U(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(O(n))<0;){var o=W(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,n){return q(t,N(e,n))}function z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=K(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var m=function(t,e){return z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,a))}(c.padding,n),v=H(u),y="y"===h?o:s,g="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=Y(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=m[y],T=S-v[f]-m[g],E=S/2-v[f]/2+x,O=G(I,E,T),L=h;n.modifiersData[l]=((e={})[L]=O,e.centerOffset=O-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&R(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,v=t.isFixed,y=d.x,g=void 0===y?0:y,w=d.y,b=void 0===w?0:w,C="function"==typeof m?m({x:g,y:b}):{x:g,y:b};g=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var O=Y(n),A="clientHeight",_="clientWidth";if(O===L(n)&&"static"!==W(O=F(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(v&&O===E&&E.visualViewport?E.visualViewport.height:O[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,g-=(v&&O===E&&E.visualViewport?E.visualViewport.width:O[_])-l.width,g*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===m?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:j(n*i)/i||0,y:j(o*i)/i||0}}({x:g,y:b},L(n)):{x:g,y:b};return g=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?g+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return M(F(t)).left+ct(t).scrollLeft}function dt(t){var e=W(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(U(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=L(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(U(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,n){return e===p?ft(function(t,e){var n=L(t),o=F(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=$();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=M(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=F(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===W(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(F(t)))}function vt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(U(t)),n=["absolute","fixed"].indexOf(W(t).position)>=0&&_(t)?Y(t):t;return A(n)?e.filter((function(t){return A(t)&&R(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=mt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),mt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function yt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?Z(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var m=d?K(d):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case c:e[m]=e[m]-(n[v]/2-l[v]/2);break;case u:e[m]=e[m]+(n[v]/2-l[v]/2)}}return e}function gt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,m=n.boundary,v=void 0===m?d:m,y=n.rootBoundary,g=void 0===y?p:y,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=z("number"!=typeof I?I:X(I,a)),E=b===h?f:h,O=t.rects.popper,L=t.elements[S?E:b],_=vt(A(L)?L:L.contextElement||F(t.elements.popper),v,g,u),k=M(t.elements.reference),P=yt({reference:k,element:O,strategy:"absolute",placement:l}),B=ft(Object.assign({},O,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},j=t.modifiersData.offset;if(b===h&&j){var D=j[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,y=n.fallbackPlacements,g=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),O=y||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),L=[T].concat(O).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,d=Z(o),p=d?l?m:m.filter((function(t){return Z(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=gt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:g,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=L[0],N=0;N=0,H=M?"width":"height",R=gt(e,{placement:j,boundary:w,rootBoundary:b,altBoundary:C,padding:g}),W=M?$?r:s:$?i:o;A[H]>_[H]&&(W=st(W));var V=st(W),F=[];if(p&&F.push(R[D]<=0),f&&F.push(R[W]<=0,R[V]<=0),F.every((function(t){return t}))){q=j,P=!1;break}k.set(j,F)}if(P)for(var U=function(t){var e=L.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},J=x?3:1;J>0;J--){if("break"===U(J))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=gt(e,{elementContext:"reference"}),l=gt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,g=void 0===y||y,w=n.tetherOffset,b=void 0===w?0:w,C=gt(e,{boundary:h,rootBoundary:f,padding:v,altBoundary:m}),S=B(e.placement),x=Z(e.placement),I=!x,T=K(S),E="x"===T?"y":"x",O=e.modifiersData.popperOffsets,L=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(O){if(u){var D,$="y"===T?o:s,M="y"===T?i:r,R="y"===T?"height":"width",W=O[T],V=W+C[$],F=W-C[M],U=g?-A[R]/2:0,J=x===c?L[R]:A[R],z=x===c?-A[R]:-L[R],X=e.elements.arrow,Q=g&&X?H(X):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[$],nt=tt[M],ot=G(0,L[R],Q[R]),it=I?L[R]/2-U-ot-et-k.mainAxis:J-ot-et-k.mainAxis,rt=I?-L[R]/2+U+ot+nt+k.mainAxis:z+ot+nt+k.mainAxis,st=e.elements.arrow&&Y(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=W+rt-at,ut=G(g?N(V,W+it-at-lt):V,W,g?q(F,ct):F);O[T]=ut,j[T]=ut-W}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=O[E],mt="y"===E?"height":"width",vt=ft+C[pt],yt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?vt:ft-L[mt]-A[mt]-bt+k.altAxis,St=wt?ft+L[mt]+A[mt]-bt-k.altAxis:yt,xt=g&&wt?function(t,e,n){var o=G(t,e,n);return o>n?n:o}(Ct,ft,St):G(g?Ct:vt,ft,g?St:yt);O[E]=xt,j[E]=xt-ft}e.modifiersData[l]=j}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,o=j(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=F(e),a=M(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==O(e)||dt(l))&&(c=(o=e)!==L(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=M(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Ot(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},700:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSSearchByJson=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(413);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(460);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(629);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(652);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(23);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(610);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(371);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(770);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(659);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(139);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(961);Object.defineProperty(e,"HSSearchByJson",{enumerable:!0,get:function(){return o(f).default}});var m=n(591);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(m).default}});var v=n(233);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var y=n(957);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(y).default}});var g=n(983);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var w=n(949);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(w).default}});var b=n(557);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(b).default}});var C=n(87);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(C).default}});var S=n(366);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(S).default}});var x=n(679);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(x).default}});var I=n(313);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(I).default}})},460:function(t,e,n){ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={170:(t,e,n)=>{n.r(e),n.d(e,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>T,applyStyles:()=>P,arrow:()=>Q,auto:()=>l,basePlacements:()=>a,beforeMain:()=>b,beforeRead:()=>g,beforeWrite:()=>x,bottom:()=>i,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Pt,createPopperBase:()=>kt,createPopperLite:()=>Bt,detectOverflow:()=>yt,end:()=>u,eventListeners:()=>it,flip:()=>wt,hide:()=>St,left:()=>s,main:()=>C,modifierPhases:()=>E,offset:()=>xt,placements:()=>m,popper:()=>h,popperGenerator:()=>_t,popperOffsets:()=>It,preventOverflow:()=>Tt,read:()=>y,reference:()=>f,right:()=>r,start:()=>c,top:()=>o,variationPlacements:()=>v,viewport:()=>p,write:()=>I});var o="top",i="bottom",r="right",s="left",l="auto",a=[o,i,r,s],c="start",u="end",d="clippingParents",p="viewport",h="popper",f="reference",v=a.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),m=[].concat(a,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),g="beforeRead",y="read",w="afterRead",b="beforeMain",C="main",S="afterMain",x="beforeWrite",I="write",T="afterWrite",E=[g,y,w,b,C,S,x,I,T];function L(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function A(t){return t instanceof O(t).Element||t instanceof Element}function _(t){return t instanceof O(t).HTMLElement||t instanceof HTMLElement}function k(t){return"undefined"!=typeof ShadowRoot&&(t instanceof O(t).ShadowRoot||t instanceof ShadowRoot)}const P={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];_(i)&&L(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(t){var e=o[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var o=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(o)&&L(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function B(t){return t.split("-")[0]}var q=Math.max,N=Math.min,H=Math.round;function D(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(D())}function j(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var o=t.getBoundingClientRect(),i=1,r=1;e&&_(t)&&(i=t.offsetWidth>0&&H(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&H(o.height)/t.offsetHeight||1);var s=(A(t)?O(t):window).visualViewport,l=!M()&&n,a=(o.left+(l&&s?s.offsetLeft:0))/i,c=(o.top+(l&&s?s.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:c,right:a+u,bottom:c+d,left:a,x:a,y:c}}function $(t){var e=j(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function V(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&k(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function R(t){return O(t).getComputedStyle(t)}function F(t){return["table","td","th"].indexOf(L(t))>=0}function W(t){return((A(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(k(t)?t.host:null)||W(t)}function U(t){return _(t)&&"fixed"!==R(t).position?t.offsetParent:null}function J(t){for(var e=O(t),n=U(t);n&&F(n)&&"static"===R(n).position;)n=U(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(D());if(/Trident/i.test(D())&&_(t)&&"fixed"===R(t).position)return null;var n=z(t);for(k(n)&&(n=n.host);_(n)&&["html","body"].indexOf(L(n))<0;){var o=R(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Z(t,e,n){return q(t,N(e,n))}function K(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,l=t.name,c=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,p=B(n.placement),h=Y(p),f=[s,r].indexOf(p)>=0?"height":"width";if(u&&d){var v=function(t,e){return K("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:G(t,a))}(c.padding,n),m=$(u),g="y"===h?o:s,y="y"===h?i:r,w=n.rects.reference[f]+n.rects.reference[h]-d[h]-n.rects.popper[f],b=d[h]-n.rects.reference[h],C=J(u),S=C?"y"===h?C.clientHeight||0:C.clientWidth||0:0,x=w/2-b/2,I=v[g],T=S-m[f]-v[y],E=S/2-m[f]/2+x,L=Z(I,E,T),O=h;n.modifiersData[l]=((e={})[O]=L,e.centerOffset=L-E,e)}},effect:function(t){var e=t.state,n=t.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=e.elements.popper.querySelector(o)))&&V(e.elements.popper,o)&&(e.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(t){return t.split("-")[1]}var tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function et(t){var e,n=t.popper,l=t.popperRect,a=t.placement,c=t.variation,d=t.offsets,p=t.position,h=t.gpuAcceleration,f=t.adaptive,v=t.roundOffsets,m=t.isFixed,g=d.x,y=void 0===g?0:g,w=d.y,b=void 0===w?0:w,C="function"==typeof v?v({x:y,y:b}):{x:y,y:b};y=C.x,b=C.y;var S=d.hasOwnProperty("x"),x=d.hasOwnProperty("y"),I=s,T=o,E=window;if(f){var L=J(n),A="clientHeight",_="clientWidth";if(L===O(n)&&"static"!==R(L=W(n)).position&&"absolute"===p&&(A="scrollHeight",_="scrollWidth"),a===o||(a===s||a===r)&&c===u)T=i,b-=(m&&L===E&&E.visualViewport?E.visualViewport.height:L[A])-l.height,b*=h?1:-1;if(a===s||(a===o||a===i)&&c===u)I=r,y-=(m&&L===E&&E.visualViewport?E.visualViewport.width:L[_])-l.width,y*=h?1:-1}var k,P=Object.assign({position:p},f&&tt),B=!0===v?function(t,e){var n=t.x,o=t.y,i=e.devicePixelRatio||1;return{x:H(n*i)/i||0,y:H(o*i)/i||0}}({x:y,y:b},O(n)):{x:y,y:b};return y=B.x,b=B.y,h?Object.assign({},P,((k={})[T]=x?"0":"",k[I]=S?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",k)):Object.assign({},P,((e={})[T]=x?b+"px":"",e[I]=S?y+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,s=void 0===r||r,l=n.roundOffsets,a=void 0===l||l,c={placement:B(e.placement),variation:X(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,et(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,et(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ot={passive:!0};const it={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,s=o.resize,l=void 0===s||s,a=O(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,ot)})),l&&a.addEventListener("resize",n.update,ot),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ot)})),l&&a.removeEventListener("resize",n.update,ot)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function st(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=O(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return j(W(t)).left+ct(t).scrollLeft}function dt(t){var e=R(t),n=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function pt(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:_(t)&&dt(t)?t:pt(z(t))}function ht(t,e){var n;void 0===e&&(e=[]);var o=pt(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=O(o),s=i?[r].concat(r.visualViewport||[],dt(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(ht(z(s)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vt(t,e,n){return e===p?ft(function(t,e){var n=O(t),o=W(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;var c=M();(c||!c&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l+ut(t),y:a}}(t,n)):A(e)?function(t,e){var n=j(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=W(t),o=ct(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+ut(t),a=-o.scrollTop;return"rtl"===R(i||n).direction&&(l+=q(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(W(t)))}function mt(t,e,n,o){var i="clippingParents"===e?function(t){var e=ht(z(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&_(t)?J(t):t;return A(n)?e.filter((function(t){return A(t)&&V(t,n)&&"body"!==L(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r[0],l=r.reduce((function(e,n){var i=vt(t,n,o);return e.top=q(i.top,e.top),e.right=N(i.right,e.right),e.bottom=N(i.bottom,e.bottom),e.left=q(i.left,e.left),e}),vt(t,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function gt(t){var e,n=t.reference,l=t.element,a=t.placement,d=a?B(a):null,p=a?X(a):null,h=n.x+n.width/2-l.width/2,f=n.y+n.height/2-l.height/2;switch(d){case o:e={x:h,y:n.y-l.height};break;case i:e={x:h,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:f};break;case s:e={x:n.x-l.width,y:f};break;default:e={x:n.x,y:n.y}}var v=d?Y(d):null;if(null!=v){var m="y"===v?"height":"width";switch(p){case c:e[v]=e[v]-(n[m]/2-l[m]/2);break;case u:e[v]=e[v]+(n[m]/2-l[m]/2)}}return e}function yt(t,e){void 0===e&&(e={});var n=e,s=n.placement,l=void 0===s?t.placement:s,c=n.strategy,u=void 0===c?t.strategy:c,v=n.boundary,m=void 0===v?d:v,g=n.rootBoundary,y=void 0===g?p:g,w=n.elementContext,b=void 0===w?h:w,C=n.altBoundary,S=void 0!==C&&C,x=n.padding,I=void 0===x?0:x,T=K("number"!=typeof I?I:G(I,a)),E=b===h?f:h,L=t.rects.popper,O=t.elements[S?E:b],_=mt(A(O)?O:O.contextElement||W(t.elements.popper),m,y,u),k=j(t.elements.reference),P=gt({reference:k,element:L,strategy:"absolute",placement:l}),B=ft(Object.assign({},L,P)),q=b===h?B:k,N={top:_.top-q.top+T.top,bottom:q.bottom-_.bottom+T.bottom,left:_.left-q.left+T.left,right:q.right-_.right+T.right},H=t.modifiersData.offset;if(b===h&&H){var D=H[l];Object.keys(N).forEach((function(t){var e=[r,i].indexOf(t)>=0?1:-1,n=[o,i].indexOf(t)>=0?"y":"x";N[t]+=D[n]*e}))}return N}const wt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,u=t.name;if(!e.modifiersData[u]._skip){for(var d=n.mainAxis,p=void 0===d||d,h=n.altAxis,f=void 0===h||h,g=n.fallbackPlacements,y=n.padding,w=n.boundary,b=n.rootBoundary,C=n.altBoundary,S=n.flipVariations,x=void 0===S||S,I=n.allowedAutoPlacements,T=e.options.placement,E=B(T),L=g||(E===T||!x?[st(T)]:function(t){if(B(t)===l)return[];var e=st(t);return[at(t),e,at(e)]}(T)),O=[T].concat(L).reduce((function(t,n){return t.concat(B(n)===l?function(t,e){void 0===e&&(e={});var n=e,o=n.placement,i=n.boundary,r=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?m:c,d=X(o),p=d?l?v:v.filter((function(t){return X(t)===d})):a,h=p.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=p);var f=h.reduce((function(e,n){return e[n]=yt(t,{placement:n,boundary:i,rootBoundary:r,padding:s})[B(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:n,boundary:w,rootBoundary:b,padding:y,flipVariations:x,allowedAutoPlacements:I}):n)}),[]),A=e.rects.reference,_=e.rects.popper,k=new Map,P=!0,q=O[0],N=0;N=0,$=j?"width":"height",V=yt(e,{placement:H,boundary:w,rootBoundary:b,altBoundary:C,padding:y}),R=j?M?r:s:M?i:o;A[$]>_[$]&&(R=st(R));var F=st(R),W=[];if(p&&W.push(V[D]<=0),f&&W.push(V[R]<=0,V[F]<=0),W.every((function(t){return t}))){q=H,P=!1;break}k.set(H,W)}if(P)for(var z=function(t){var e=O.find((function(e){var n=k.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return q=e,"break"},U=x?3:1;U>0;U--){if("break"===z(U))break}e.placement!==q&&(e.modifiersData[u]._skip=!0,e.placement=q,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ct(t){return[o,r,i,s].some((function(e){return t[e]>=0}))}const St={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,s=yt(e,{elementContext:"reference"}),l=yt(e,{altBoundary:!0}),a=bt(s,o),c=bt(l,i,r),u=Ct(a),d=Ct(c);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.offset,a=void 0===l?[0,0]:l,c=m.reduce((function(t,n){return t[n]=function(t,e,n){var i=B(t),l=[s,o].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=a[0],u=a[1];return c=c||0,u=(u||0)*l,[s,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,a),t}),{}),u=c[e.placement],d=u.x,p=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=p),e.modifiersData[i]=c}};const It={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const Tt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,l=t.name,a=n.mainAxis,u=void 0===a||a,d=n.altAxis,p=void 0!==d&&d,h=n.boundary,f=n.rootBoundary,v=n.altBoundary,m=n.padding,g=n.tether,y=void 0===g||g,w=n.tetherOffset,b=void 0===w?0:w,C=yt(e,{boundary:h,rootBoundary:f,padding:m,altBoundary:v}),S=B(e.placement),x=X(e.placement),I=!x,T=Y(S),E="x"===T?"y":"x",L=e.modifiersData.popperOffsets,O=e.rects.reference,A=e.rects.popper,_="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,k="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(L){if(u){var D,M="y"===T?o:s,j="y"===T?i:r,V="y"===T?"height":"width",R=L[T],F=R+C[M],W=R-C[j],z=y?-A[V]/2:0,U=x===c?O[V]:A[V],K=x===c?-A[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[M],nt=tt[j],ot=Z(0,O[V],Q[V]),it=I?O[V]/2-z-ot-et-k.mainAxis:U-ot-et-k.mainAxis,rt=I?-O[V]/2+z+ot+nt+k.mainAxis:K+ot+nt+k.mainAxis,st=e.elements.arrow&&J(e.elements.arrow),lt=st?"y"===T?st.clientTop||0:st.clientLeft||0:0,at=null!=(D=null==P?void 0:P[T])?D:0,ct=R+rt-at,ut=Z(y?N(F,R+it-at-lt):F,R,y?q(W,ct):W);L[T]=ut,H[T]=ut-R}if(p){var dt,pt="x"===T?o:s,ht="x"===T?i:r,ft=L[E],vt="y"===E?"height":"width",mt=ft+C[pt],gt=ft-C[ht],wt=-1!==[o,s].indexOf(S),bt=null!=(dt=null==P?void 0:P[E])?dt:0,Ct=wt?mt:ft-O[vt]-A[vt]-bt+k.altAxis,St=wt?ft+O[vt]+A[vt]-bt-k.altAxis:gt,xt=y&&wt?function(t,e,n){var o=Z(t,e,n);return o>n?n:o}(Ct,ft,St):Z(y?Ct:mt,ft,y?St:gt);L[E]=xt,H[E]=xt-ft}e.modifiersData[l]=H}},requiresIfExists:["offset"]};function Et(t,e,n){void 0===n&&(n=!1);var o,i,r=_(e),s=_(e)&&function(t){var e=t.getBoundingClientRect(),n=H(e.width)/t.offsetWidth||1,o=H(e.height)/t.offsetHeight||1;return 1!==n||1!==o}(e),l=W(e),a=j(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==L(e)||dt(l))&&(c=(o=e)!==O(o)&&_(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:ct(o)),_(e)?((u=j(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):l&&(u.x=ut(l))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Lt(t){var e=new Map,n=new Set,o=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var o=e.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),o}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function At(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.BREAKPOINTS=e.COMBO_BOX_ACCESSIBILITY_KEY_SET=e.SELECT_ACCESSIBILITY_KEY_SET=e.TABS_ACCESSIBILITY_KEY_SET=e.OVERLAY_ACCESSIBILITY_KEY_SET=e.DROPDOWN_ACCESSIBILITY_KEY_SET=e.POSITIONS=void 0,e.POSITIONS={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},e.DROPDOWN_ACCESSIBILITY_KEY_SET=["Escape","ArrowUp","ArrowDown","Home","End","Enter"],e.OVERLAY_ACCESSIBILITY_KEY_SET=["Escape","Tab"],e.TABS_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],e.SELECT_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Tab"],e.COMBO_BOX_ACCESSIBILITY_KEY_SET=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],e.BREAKPOINTS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},158:function(t,e,n){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.HSFileUpload=e.HSDataTable=e.HSStaticMethods=e.HSTooltip=e.HSTogglePassword=e.HSToggleCount=e.HSThemeSwitch=e.HSTabs=e.HSStrongPassword=e.HSStepper=e.HSSelect=e.HSScrollspy=e.HSRemoveElement=e.HSPinInput=e.HSOverlay=e.HSInputNumber=e.HSDropdown=e.HSComboBox=e.HSCollapse=e.HSCarousel=e.HSAccordion=e.HSCopyMarkup=void 0;var i=n(406);Object.defineProperty(e,"HSCopyMarkup",{enumerable:!0,get:function(){return o(i).default}});var r=n(740);Object.defineProperty(e,"HSAccordion",{enumerable:!0,get:function(){return o(r).default}});var s=n(268);Object.defineProperty(e,"HSCarousel",{enumerable:!0,get:function(){return o(s).default}});var l=n(485);Object.defineProperty(e,"HSCollapse",{enumerable:!0,get:function(){return o(l).default}});var a=n(809);Object.defineProperty(e,"HSComboBox",{enumerable:!0,get:function(){return o(a).default}});var c=n(891);Object.defineProperty(e,"HSDropdown",{enumerable:!0,get:function(){return o(c).default}});var u=n(332);Object.defineProperty(e,"HSInputNumber",{enumerable:!0,get:function(){return o(u).default}});var d=n(850);Object.defineProperty(e,"HSOverlay",{enumerable:!0,get:function(){return o(d).default}});var p=n(60);Object.defineProperty(e,"HSPinInput",{enumerable:!0,get:function(){return o(p).default}});var h=n(911);Object.defineProperty(e,"HSRemoveElement",{enumerable:!0,get:function(){return o(h).default}});var f=n(751);Object.defineProperty(e,"HSScrollspy",{enumerable:!0,get:function(){return o(f).default}});var v=n(442);Object.defineProperty(e,"HSSelect",{enumerable:!0,get:function(){return o(v).default}});var m=n(887);Object.defineProperty(e,"HSStepper",{enumerable:!0,get:function(){return o(m).default}});var g=n(97);Object.defineProperty(e,"HSStrongPassword",{enumerable:!0,get:function(){return o(g).default}});var y=n(166);Object.defineProperty(e,"HSTabs",{enumerable:!0,get:function(){return o(y).default}});var w=n(502);Object.defineProperty(e,"HSThemeSwitch",{enumerable:!0,get:function(){return o(w).default}});var b=n(684);Object.defineProperty(e,"HSToggleCount",{enumerable:!0,get:function(){return o(b).default}});var C=n(100);Object.defineProperty(e,"HSTogglePassword",{enumerable:!0,get:function(){return o(C).default}});var S=n(969);Object.defineProperty(e,"HSTooltip",{enumerable:!0,get:function(){return o(S).default}});var x=n(957);Object.defineProperty(e,"HSStaticMethods",{enumerable:!0,get:function(){return o(x).default}}),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery?e.HSDataTable=n(814).default:e.HSDataTable=null,"undefined"!=typeof _&&"undefined"!=typeof Dropzone?e.HSFileUpload=n(234).default:e.HSFileUpload=null},740:function(t,e,n){ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(e){return e.element.el===t.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){t.content.style.height="".concat(t.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="block",t.content.style.height="",t.fireEvent("open",t.el),(0,l.dispatch)("open.hs.accordion",t.el,t.el)}))},e.prototype.hide=function(){var t=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){t.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){t.content.style.display="",t.content.style.height="0",t.fireEvent("close",t.el),(0,l.dispatch)("close.hs.accordion",t.el,t.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},737:(t,e)=>{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n .hs-accordion.active")&&this.group.querySelector(":scope > .hs-accordion.active")!==this.el&&window.$hsAccordionCollection.find((function(t){return t.element.el===e.group.querySelector(":scope > .hs-accordion.active")})).element.hide();if(this.el.classList.contains("active"))return!1;this.el.classList.add("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),this.content.style.display="block",this.content.style.height="0",setTimeout((function(){e.content.style.height="".concat(e.content.scrollHeight,"px")})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="block",e.content.style.height="",e.fireEvent("open",e.el),(0,l.dispatch)("open.hs.accordion",e.el,e.el)}))},e.prototype.hide=function(){var t,e=this;if(!this.el.classList.contains("active"))return!1;this.el.classList.remove("active"),(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.content.style.height="".concat(this.content.scrollHeight,"px"),setTimeout((function(){e.content.style.height="0"})),(0,l.afterTransition)(this.content,(function(){e.content.style.display="",e.content.style.height="0",e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.accordion",e.el,e.el)}))},e.getInstance=function(t,e){var n=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.show=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"!==e.element.content.style.display&&e.element.show()},e.hide=function(t){var e=window.$hsAccordionCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&"block"===e.element.content.style.display&&e.element.hide()},e.autoInit=function(){window.$hsAccordionCollection||(window.$hsAccordionCollection=[]),document.querySelectorAll(".hs-accordion:not(.--prevent-on-load-init)").forEach((function(t){window.$hsAccordionCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e.treeView=function(){var t=this;if(!document.querySelectorAll(".hs-accordion-treeview-root").length)return!1;this.selectable=[],document.querySelectorAll(".hs-accordion-treeview-root").forEach((function(e){var n=null==e?void 0:e.getAttribute("data-hs-accordion-options"),o=n?JSON.parse(n):{};t.selectable.push({el:e,options:r({},o)})})),this.selectable.length&&this.selectable.forEach((function(e){e.el.querySelectorAll(".hs-accordion-selectable").forEach((function(n){n.addEventListener("click",(function(o){o.stopPropagation(),t.toggleSelected(e,n)}))}))}))},e.toggleSelected=function(t,e){e.classList.contains("selected")?e.classList.remove("selected"):(t.el.querySelectorAll(".hs-accordion-selectable").forEach((function(t){return t.classList.remove("selected")})),e.classList.add("selected"))},e.on=function(t,e,n){var o=window.$hsAccordionCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit(),document.querySelectorAll(".hs-accordion-treeview-root").length&&a.treeView()})),"undefined"!=typeof window&&(window.HSAccordion=a),e.default=a},961:(t,e)=>{ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},629:function(t,e,n){ +Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,n){this.el=t,this.options=e,this.events=n,this.el=t,this.options=e,this.events={}}return t.prototype.createCollection=function(t,e){var n;t.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||t.length+1,element:e})},t.prototype.fireEvent=function(t,e){if(void 0===e&&(e=null),this.events.hasOwnProperty(t))return this.events[t](e)},t.prototype.on=function(t,e){this.events[t]=e},t}();e.default=n},268:function(t,e,n){ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform="translate(-".concat(this.currentIndex*this.sliderWidth,"px, 0px)"),this.addCurrentClass()):this.currentIndex *")||null,l.sliderWidth=l.inner.parentElement.clientWidth,l.touchX={start:0,end:0},l.init(),l}return i(e,t),e.prototype.init=function(){var t,e,n=this;this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):(t=this.inner.classList).remove.apply(t,this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):(e=this.inner.classList).add.apply(e,this.loadingClassesAdd))),this.prev&&this.prev.addEventListener("click",(function(){n.goToPrev(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.next&&this.next.addEventListener("click",(function(){n.goToNext(),n.isAutoPlay&&(n.resetTimer(),n.setTimer())})),this.dots&&this.dots.forEach((function(t,e){return t.addEventListener("click",(function(){n.goTo(e),n.isAutoPlay&&(n.resetTimer(),n.setTimer())}))})),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),this.inner&&this.afterLoadingClassesAdd&&setTimeout((function(){var t;"string"==typeof n.afterLoadingClassesAdd?n.inner.classList.add(n.afterLoadingClassesAdd):(t=n.inner.classList).add.apply(t,n.afterLoadingClassesAdd)})),this.el.classList.add("init"),this.el.addEventListener("touchstart",(function(t){n.touchX.start=t.changedTouches[0].screenX})),this.el.addEventListener("touchend",(function(t){n.touchX.end=t.changedTouches[0].screenX,n.detectDirection()})),this.observeResize()},e.prototype.observeResize=function(){var t=this;new ResizeObserver((function(){return t.recalculateWidth()})).observe(document.querySelector("body"))},e.prototype.calculateWidth=function(){var t=this;this.inner.style.width="".concat(this.sliderWidth*this.slides.length,"px"),this.inner.style.transform=this.calculateTransform(),this.slides.forEach((function(e){e.style.width="".concat(t.sliderWidth,"px")}))},e.prototype.addCurrentClass=function(){var t=this;this.slides.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")})),this.dots&&this.dots.forEach((function(e,n){n===t.currentIndex?e.classList.add("active"):e.classList.remove("active")}))},e.prototype.addDisabledClass=function(){if(!this.prev||!this.next)return!1;0===this.currentIndex?(this.next.classList.remove("disabled"),this.prev.classList.add("disabled")):this.currentIndex===this.slides.length-1?(this.prev.classList.remove("disabled"),this.next.classList.add("disabled")):(this.prev.classList.remove("disabled"),this.next.classList.remove("disabled"))},e.prototype.autoPlay=function(){this.setTimer()},e.prototype.setTimer=function(){var t=this;this.timer=setInterval((function(){t.currentIndex===t.slides.length-1?t.goTo(0):t.goToNext()}),this.speed)},e.prototype.resetTimer=function(){clearInterval(this.timer)},e.prototype.detectDirection=function(){var t=this.touchX,e=t.start,n=t.end;ne&&this.goToPrev()},e.prototype.recalculateWidth=function(){this.sliderWidth=this.inner.parentElement.clientWidth,this.calculateWidth()},e.prototype.calculateTransform=function(){var t=this.currentIndex*this.sliderWidth;return this.isRTL?"translate(".concat(t,"px, 0px)"):"translate(-".concat(t,"px, 0px)")},e.prototype.goToPrev=function(){0===this.currentIndex&&this.isInfiniteLoop?(this.currentIndex=this.slides.length-1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):0!==this.currentIndex&&(this.currentIndex-=1,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass(),this.addDisabledClass())},e.prototype.goToNext=function(){this.currentIndex===this.slides.length-1&&this.isInfiniteLoop?(this.currentIndex=0,this.inner.style.transform=this.calculateTransform(),this.addCurrentClass()):this.currentIndex0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(m=null==B?void 0:B.outputLoaderTemplate)&&void 0!==m?m:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(v=null==B?void 0:B.groupingType)&&void 0!==v?v:null,_.groupingTitleTemplate=null!==(y=null==B?void 0:B.groupingTitleTemplate)&&void 0!==y?y:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(g=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==g?g:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(O=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==O?O:null,_.toggleOpen=null!==(L=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==L?L:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.isOpened=!0,this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t=""),this.setResults(t),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){return Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){return e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){if(e.isItemExists(t))return!1;var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n,o;e.textContent=null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"",e.setAttribute("data-hs-combo-box-search-text",null!==(o=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==o?o:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t=this;this.toggle.addEventListener("click",(function(){t.isOpened?t.close():t.open(t.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),!1):(this.animationInProcess=!0,this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){e.output.style.display="none",e.setValueAndClear(t),e.animationInProcess=!1})),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+10&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t',_.outputEmptyTemplate=null!==(f=null==B?void 0:B.outputEmptyTemplate)&&void 0!==f?f:'
Nothing found...
',_.outputLoaderTemplate=null!==(v=null==B?void 0:B.outputLoaderTemplate)&&void 0!==v?v:'
\n\t\t\t\t
\n\t\t\t\t\tLoading...\n\t\t\t\t
\n\t\t\t
',_.groupingType=null!==(m=null==B?void 0:B.groupingType)&&void 0!==m?m:null,_.groupingTitleTemplate=null!==(g=null==B?void 0:B.groupingTitleTemplate)&&void 0!==g?g:"default"===_.groupingType?'
':'',_.tabsWrapperTemplate=null!==(y=null==B?void 0:B.tabsWrapperTemplate)&&void 0!==y?y:'
',_.preventSelection=null!==(w=null==B?void 0:B.preventSelection)&&void 0!==w&&w,_.preventAutoPosition=null!==(b=null==B?void 0:B.preventAutoPosition)&&void 0!==b&&b,_.isOpenOnFocus=null!==(C=null==B?void 0:B.isOpenOnFocus)&&void 0!==C&&C,_.input=null!==(S=_.el.querySelector("[data-hs-combo-box-input]"))&&void 0!==S?S:null,_.output=null!==(x=_.el.querySelector("[data-hs-combo-box-output]"))&&void 0!==x?x:null,_.itemsWrapper=null!==(I=_.el.querySelector("[data-hs-combo-box-output-items-wrapper]"))&&void 0!==I?I:null,_.items=null!==(T=Array.from(_.el.querySelectorAll("[data-hs-combo-box-output-item]")))&&void 0!==T?T:[],_.tabs=[],_.toggle=null!==(E=_.el.querySelector("[data-hs-combo-box-toggle]"))&&void 0!==E?E:null,_.toggleClose=null!==(L=_.el.querySelector("[data-hs-combo-box-close]"))&&void 0!==L?L:null,_.toggleOpen=null!==(O=_.el.querySelector("[data-hs-combo-box-open]"))&&void 0!==O?O:null,_.outputPlaceholder=null,_.selected=_.value=null!==(A=_.el.querySelector("[data-hs-combo-box-input]").value)&&void 0!==A?A:"",_.isOpened=!1,_.isCurrent=!1,_.animationInProcess=!1,_.selectedGroup="all",_.init(),_}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsComboBoxCollection,this),this.build()},e.prototype.build=function(){this.buildInput(),this.groupingType&&this.setGroups(),this.buildItems(),this.preventVisibility&&(this.preventAutoPosition||this.recalculateDirection()),this.toggle&&this.buildToggle(),this.toggleClose&&this.buildToggleClose(),this.toggleOpen&&this.buildToggleOpen()},e.prototype.setResultAndRender=function(t){void 0===t&&(t="");var e=this.preventVisibility?this.input.value:t;this.setResults(e),this.apiSearchQuery&&this.itemsFromJson()},e.prototype.buildInput=function(){var t=this;this.isOpenOnFocus&&this.input.addEventListener("focus",(function(){t.isOpened||(t.setResultAndRender(),t.open())})),this.input.addEventListener("input",(0,u.debounce)((function(e){t.setResultAndRender(e.target.value),""!==t.input.value?t.el.classList.add("has-value"):t.el.classList.remove("has-value"),t.isOpened||t.open()})))},e.prototype.buildItems=function(){this.output.role="listbox",this.output.tabIndex=-1,this.output.ariaOrientation="vertical",this.apiUrl?this.itemsFromJson():(this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="",this.itemsFromHtml())},e.prototype.setResults=function(t){this.value=t,this.resultItems(),this.hasVisibleItems()?this.destroyOutputPlaceholder():this.buildOutputPlaceholder()},e.prototype.isItemExists=function(t){return this.items.some((function(e){var n,o,i,r=null!==(n=e.getAttribute("data-hs-combo-box-output-item-group-field"))&&void 0!==n?n:null,s=null!==(o=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")))&&void 0!==o?o:null,l=null;return r&&(null===(i=null==s?void 0:s.group)||void 0===i?void 0:i.name)&&(l=t[r]),Array.from(e.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(e){var n;return(null===(n=null==s?void 0:s.group)||void 0===n?void 0:n.name)&&l?l===s.group.name&&e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]:e.getAttribute("data-hs-combo-box-search-text")===t[e.getAttribute("data-hs-combo-box-output-item-field")]}))}))},e.prototype.isTextExists=function(t,e){var n=e.map((function(t){return t.toLowerCase()}));return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return n.includes(t.getAttribute("data-hs-combo-box-search-text").toLowerCase())}))},e.prototype.isTextExistsAny=function(t,e){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).some((function(t){return t.getAttribute("data-hs-combo-box-search-text").toLowerCase().includes(e.toLowerCase())}))},e.prototype.valuesBySelector=function(t){return Array.from(t.querySelectorAll("[data-hs-combo-box-search-text]")).reduce((function(t,e){return a(a([],t,!0),[e.getAttribute("data-hs-combo-box-search-text")],!1)}),[])},e.prototype.buildOutputLoader=function(){if(this.outputLoader)return!1;this.outputLoader=(0,u.htmlToElement)(this.outputLoaderTemplate),this.items.length||this.outputPlaceholder?(this.outputLoader.style.position="absolute",this.outputLoader.style.top="0",this.outputLoader.style.bottom="0",this.outputLoader.style.left="0",this.outputLoader.style.right="0",this.outputLoader.style.zIndex="2"):(this.outputLoader.style.position="",this.outputLoader.style.top="",this.outputLoader.style.bottom="",this.outputLoader.style.left="",this.outputLoader.style.right="",this.outputLoader.style.zIndex="",this.outputLoader.style.height="30px"),this.output.append(this.outputLoader)},e.prototype.destroyOutputLoader=function(){this.outputLoader&&this.outputLoader.remove(),this.outputLoader=null},e.prototype.itemsFromJson=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return l(this,(function(s){switch(s.label){case 0:this.buildOutputLoader(),s.label=1;case 1:return s.trys.push([1,4,,5]),t="".concat(this.apiQuery),e="".concat(this.apiSearchQuery,"=").concat(this.value.toLowerCase()),n=this.apiUrl,this.apiQuery&&this.apiSearchQuery?n+="?".concat(e,"&").concat(t):this.apiQuery?n+="?".concat(t):this.apiSearchQuery&&(n+="?".concat(e)),[4,fetch(n,this.apiHeaders)];case 2:return[4,s.sent().json()];case 3:return o=s.sent(),this.apiDataPart&&(o=o[this.apiDataPart]),this.apiSearchQuery&&(this.items=[]),this.itemsWrapper?this.itemsWrapper.innerHTML="":this.output.innerHTML="","tabs"===this.groupingType?(this.setApiGroups(o),this.groupTabsRender(),this.jsonItemsRender(o)):"default"===this.groupingType?(this.setApiGroups(o),this.groups.forEach((function(t){var e=(0,u.htmlToElement)(r.groupingTitleTemplate);e.setAttribute("data-hs-combo-box-group-title",t.name),e.classList.add("--exclude-accessibility"),e.innerText=t.title;var n=o.filter((function(e){return e[r.apiGroupField]===t.name}));r.itemsWrapper?r.itemsWrapper.append(e):r.output.append(e),r.jsonItemsRender(n)}))):this.jsonItemsRender(o),this.setResults(this.input.value),[3,5];case 4:return i=s.sent(),console.error(i),[3,5];case 5:return this.destroyOutputLoader(),[2]}}))}))},e.prototype.jsonItemsRender=function(t){var e=this;t.forEach((function(t,n){var o=(0,u.htmlToElement)(e.outputItemTemplate);o.querySelectorAll("[data-hs-combo-box-output-item-field]").forEach((function(e){var n=t[e.getAttribute("data-hs-combo-box-output-item-field")],o=e.hasAttribute("data-hs-combo-box-output-item-hide-if-empty");e.textContent=null!=n?n:"",!n&&o&&(e.style.display="none")})),o.querySelectorAll("[data-hs-combo-box-search-text]").forEach((function(e){var n;e.setAttribute("data-hs-combo-box-search-text",null!==(n=t[e.getAttribute("data-hs-combo-box-output-item-field")])&&void 0!==n?n:"")})),o.querySelectorAll("[data-hs-combo-box-output-item-attr]").forEach((function(e){JSON.parse(e.getAttribute("data-hs-combo-box-output-item-attr")).forEach((function(n){e.setAttribute(n.attr,t[n.valueFrom])}))})),o.setAttribute("tabIndex","".concat(n)),"tabs"!==e.groupingType&&"default"!==e.groupingType||o.setAttribute("data-hs-combo-box-output-item",'{"group": {"name": "'.concat(t[e.apiGroupField],'", "title": "').concat(t[e.apiGroupField],'"}}')),e.items=a(a([],e.items,!0),[o],!1),e.preventSelection||o.addEventListener("click",(function(){e.close(o.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text")),e.setSelectedByValue(e.valuesBySelector(o))})),e.appendItemsToWrapper(o)}))},e.prototype.setGroups=function(){var t=[];this.items.forEach((function(e){var n=JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group;t.some((function(t){return(null==t?void 0:t.name)===n.name}))||t.push(n)})),this.groups=t},e.prototype.setCurrent=function(){window.$hsComboBoxCollection.length&&(window.$hsComboBoxCollection.map((function(t){return t.element.isCurrent=!1})),this.isCurrent=!0)},e.prototype.setApiGroups=function(t){var e=this,n=[];t.forEach((function(t){var o=t[e.apiGroupField];n.some((function(t){return t.name===o}))||n.push({name:o,title:o})})),this.groups=n},e.prototype.sortItems=function(){return this.items.sort((function(t,e){var n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),o=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");return no?1:0}))},e.prototype.itemRender=function(t){var e=this,n=t.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text");this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t),this.preventSelection||t.addEventListener("click",(function(){e.close(n),e.setSelectedByValue(e.valuesBySelector(t))}))},e.prototype.plainRender=function(t){var e=this;t.forEach((function(t){e.itemRender(t)}))},e.prototype.groupTabsRender=function(){var t=this,e=(0,u.htmlToElement)(this.tabsWrapperTemplate),n=(0,u.htmlToElement)('
');e.append(n),this.output.insertBefore(e,this.output.firstChild);var o=(0,u.htmlToElement)(this.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title","all"),o.classList.add("--exclude-accessibility","active"),o.innerText="All",this.tabs=a(a([],this.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup="all";var e=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),e.classList.add("active"),t.setItemsVisibility()})),this.groups.forEach((function(e){var o=(0,u.htmlToElement)(t.groupingTitleTemplate);o.setAttribute("data-hs-combo-box-group-title",e.name),o.classList.add("--exclude-accessibility"),o.innerText=e.title,t.tabs=a(a([],t.tabs,!0),[o],!1),n.append(o),o.addEventListener("click",(function(){t.selectedGroup=e.name;var n=t.tabs.find((function(e){return e.getAttribute("data-hs-combo-box-group-title")===t.selectedGroup}));t.tabs.forEach((function(t){return t.classList.remove("active")})),n.classList.add("active"),t.setItemsVisibility()}))}))},e.prototype.groupDefaultRender=function(){var t=this;this.groups.forEach((function(e){var n=(0,u.htmlToElement)(t.groupingTitleTemplate);n.setAttribute("data-hs-combo-box-group-title",e.name),n.classList.add("--exclude-accessibility"),n.innerText=e.title,t.itemsWrapper?t.itemsWrapper.append(n):t.output.append(n);var o=t.sortItems().filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===e.name}));t.plainRender(o)}))},e.prototype.itemsFromHtml=function(){if("default"===this.groupingType)this.groupDefaultRender();else if("tabs"===this.groupingType){var t=this.sortItems();this.groupTabsRender(),this.plainRender(t)}else{t=this.sortItems();this.plainRender(t)}this.setResults(this.input.value)},e.prototype.buildToggle=function(){var t,e,n,o,i=this;this.isOpened?((null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="true"),(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="true")):((null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),(null===(o=null==this?void 0:this.input)||void 0===o?void 0:o.ariaExpanded)&&(this.input.ariaExpanded="false")),this.toggle.addEventListener("click",(function(){i.isOpened?i.close():i.open(i.toggle.getAttribute("data-hs-combo-box-toggle"))}))},e.prototype.buildToggleClose=function(){var t=this;this.toggleClose.addEventListener("click",(function(){return t.close()}))},e.prototype.buildToggleOpen=function(){var t=this;this.toggleOpen.addEventListener("click",(function(){return t.open()}))},e.prototype.setSelectedByValue=function(t){var e=this;this.items.forEach((function(n){e.isTextExists(n,t)?n.classList.add("selected"):n.classList.remove("selected")}))},e.prototype.setValue=function(t){this.selected=t,this.value=t,this.input.value=t,this.fireEvent("select",this.el),(0,u.dispatch)("select.hs.combobox",this.el,this.value)},e.prototype.setItemsVisibility=function(){var t=this;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&this.items.forEach((function(t){t.style.display="none"}));var e="tabs"===this.groupingType?"all"===this.selectedGroup?this.items:this.items.filter((function(e){return JSON.parse(e.getAttribute("data-hs-combo-box-output-item")).group.name===t.selectedGroup})):this.items;"tabs"===this.groupingType&&"all"!==this.selectedGroup&&e.forEach((function(t){t.style.display="block"})),e.forEach((function(e){t.isTextExistsAny(e,t.value)?e.style.display="block":e.style.display="none"})),"default"===this.groupingType&&this.output.querySelectorAll("[data-hs-combo-box-group-title]").forEach((function(e){var n=e.getAttribute("data-hs-combo-box-group-title");t.items.filter((function(t){return JSON.parse(t.getAttribute("data-hs-combo-box-output-item")).group.name===n&&"block"===t.style.display})).length?e.style.display="block":e.style.display="none"}))},e.prototype.hasVisibleItems=function(){return!!this.items.length&&this.items.some((function(t){return"block"===t.style.display}))},e.prototype.appendItemsToWrapper=function(t){this.itemsWrapper?this.itemsWrapper.append(t):this.output.append(t)},e.prototype.buildOutputPlaceholder=function(){this.outputPlaceholder||(this.outputPlaceholder=(0,u.htmlToElement)(this.outputEmptyTemplate)),this.appendItemsToWrapper(this.outputPlaceholder)},e.prototype.destroyOutputPlaceholder=function(){this.outputPlaceholder&&this.outputPlaceholder.remove(),this.outputPlaceholder=null},e.prototype.resultItems=function(){if(!this.items.length)return!1;this.setItemsVisibility(),this.setSelectedByValue([this.selected])},e.prototype.setValueAndOpen=function(t){this.value=t,this.items.length&&this.setItemsVisibility()},e.prototype.open=function(t){var e=this;return!this.animationInProcess&&(void 0!==t&&this.setValueAndOpen(t),!this.preventVisibility&&(this.animationInProcess=!0,this.output.style.display="block",this.preventAutoPosition||this.recalculateDirection(),setTimeout((function(){var t,n;(null===(t=null==e?void 0:e.input)||void 0===t?void 0:t.ariaExpanded)&&(e.input.ariaExpanded="true"),(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.el.classList.add("active"),e.animationInProcess=!1})),void(this.isOpened=!0)))},e.prototype.setValueAndClear=function(t){t?this.setValue(t):this.setValue(this.selected),this.outputPlaceholder&&this.destroyOutputPlaceholder()},e.prototype.close=function(t){var e,n,o=this;return!this.animationInProcess&&(this.preventVisibility?(this.setValueAndClear(t),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),!1):(this.animationInProcess=!0,(null===(e=null==this?void 0:this.input)||void 0===e?void 0:e.ariaExpanded)&&(this.input.ariaExpanded="false"),(null===(n=null==this?void 0:this.toggle)||void 0===n?void 0:n.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.el.classList.remove("active"),this.preventAutoPosition||(this.output.classList.remove("bottom-full","top-full"),this.output.style.marginTop="",this.output.style.marginBottom=""),(0,u.afterTransition)(this.output,(function(){o.output.style.display="none",o.setValueAndClear(t),o.animationInProcess=!1})),""!==this.input.value?this.el.classList.add("has-value"):this.el.classList.remove("has-value"),void(this.isOpened=!1)))},e.prototype.recalculateDirection=function(){(0,u.isEnoughSpace)(this.output,this.input,"bottom",this.gap,this.viewport)?(this.output.classList.remove("bottom-full"),this.output.style.marginBottom="",this.output.classList.add("top-full"),this.output.style.marginTop="".concat(this.gap,"px")):(this.output.classList.remove("top-full"),this.output.style.marginTop="",this.output.classList.add("bottom-full"),this.output.style.marginBottom="".concat(this.gap,"px"))},e.getInstance=function(t,e){var n=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsComboBoxCollection||(window.$hsComboBoxCollection=[]),document.querySelectorAll("[data-hs-combo-box]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsComboBoxCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-combo-box"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsComboBoxCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsComboBoxCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest("[data-hs-combo-box].active")){var e=window.$hsComboBoxCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.getPreparedItems=function(t,e){return void 0===t&&(t=!1),e?(t?Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display})).reverse():Array.from(e.querySelectorAll(":scope > *:not(.--exclude-accessibility)")).filter((function(t){return"none"!==t.style.display}))).filter((function(t){return!t.classList.contains("disabled")})):null},e.setHighlighted=function(t,e,n){e.focus(),n.value=e.querySelector("[data-hs-combo-box-value]").getAttribute("data-hs-combo-box-search-text"),t&&t.classList.remove("hs-combo-box-output-item-highlighted"),e.classList.add("hs-combo-box-output-item-highlighted")},e.accessibility=function(t){if(window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}))&&p.COMBO_BOX_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsComboBoxCollection.find((function(t){return!t.element.preventVisibility&&t.element.isOpened}));t&&(t.element.close(),t.element.input.blur())},e.onArrow=function(t){var n;void 0===t&&(t=!0);var o=window.$hsComboBoxCollection.find((function(t){return t.element.preventVisibility?t.element.isCurrent:t.element.isOpened}));if(o){var i=null!==(n=o.element.itemsWrapper)&&void 0!==n?n:o.element.output;if(!i)return!1;var r,s=e.getPreparedItems(t,i),l=i.querySelector(".hs-combo-box-output-item-highlighted");l||s[0].classList.add("hs-combo-box-output-item-highlighted");var a=s.findIndex((function(t){return t===l}));a+1=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},610:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");var t=this.target.cloneNode(!0);this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,l.dispatch)("copy.hs.copyMarkup",t,t)},e.prototype.addPredefinedItems=function(){var t=this;Array.from(this.wrapper.children).filter((function(t){return!t.classList.contains("[--ignore-for-count]")})).forEach((function(e){t.addToItems(e)}))},e.prototype.setTarget=function(){var t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);t.removeAttribute("id"),this.target=t},e.prototype.setWrapper=function(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector},e.prototype.addToItems=function(t){var e=this,n=t.querySelector("[data-hs-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),n&&n.addEventListener("click",(function(){return e.delete(t)})),this.items.push(t)},e.prototype.delete=function(t){var e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,l.dispatch)("delete.hs.copyMarkup",t,t)},e.getInstance=function(t,e){var n=window.$hsCopyMarkupCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),document.querySelectorAll("[data-hs-copy-markup]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsCopyMarkupCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-copy-markup"),o=n?JSON.parse(n):{};new e(t,o)}}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=a),e.default=a},814:function(t,e,n){ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&(this.buildPagingPage(1),l>2&&this.pagingPages.appendChild((0,a.htmlToElement)('...')));for(var u=l;u<=c;u++)this.buildPagingPage(u);c...')),this.buildPagingPage(r)),this.disablePagingArrow(this.pagingPrev,0===e),this.disablePagingArrow(this.pagingNext,e===n-1),this.hidePagingIfSinglePage()},e.prototype.buildPagingPage=function(t){var e=this,n=this.dataTable.page.info().page,o=(0,a.htmlToElement)('');o.innerText="".concat(t),o.setAttribute("data-page","".concat(t)),this.pageBtnClasses&&(0,a.classToClassList)(this.pageBtnClasses,o),n===t-1&&o.classList.add("active"),o.addEventListener("click",(function(){return e.onPageClick(t)})),this.pagingPages.append(o)},e.prototype.onPageClick=function(t){this.dataTable.page(t-1).draw("page")},e.prototype.initRowSelecting=function(){var t=this;this.rowSelectingAll.addEventListener("change",(function(){return t.onSelectAllChange()}))},e.prototype.triggerChangeEventToRow=function(){var t=this;this.table.querySelectorAll("tbody ".concat(this.rowSelectingIndividual)).forEach((function(e){e.addEventListener("change",(function(){t.updateSelectAllCheckbox()}))}))},e.prototype.onSelectAllChange=function(){var t=this,e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);o&&(o.checked=e)})),this.updateSelectAllCheckbox()},e.prototype.updateSelectAllCheckbox=function(){var t=this;if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;var e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((function(n){var o=n.querySelector(t.rowSelectingIndividual);if(o&&!o.checked)return e=!1,!1})),this.rowSelectingAll.checked=e},e.getInstance=function(t,e){var n=window.$hsDataTableCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDataTableCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(l(n(961)).default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&c.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=c),e.default=c},891:function(t,e,n){ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle&&this.buildToggle(),this.menu&&this.buildMenu(),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click"),this.closeMode=(0,l.getClassProperty)(this.el,"--auto-close","true")},e.prototype.buildToggle=function(){var t,e=this;(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.el.classList.contains("open")?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(t){return e.onClickHandler(t)}))},e.prototype.buildMenu=function(){this.menu.role="menu"},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ","")),s=(window.getComputedStyle(this.el).getPropertyValue("--gpu-acceleration")||"true").replace(" ","");"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}},{name:"computeStyles",options:{adaptive:"fixed"===o,gpuAcceleration:"true"===s}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){var e;(null===(e=null==t?void 0:t.toggle)||void 0===e?void 0:e.ariaExpanded)&&(t.toggle.ariaExpanded="true"),t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;var n;if(this.animationInProcess=!0,t){var o=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(o,(function(){return e.destroyPopper()}))}else this.destroyPopper();e.menu.style.margin=null,(null===(n=null==e?void 0:e.toggle)||void 0===n?void 0:n.ariaExpanded)&&(e.toggle.ariaExpanded="false"),e.el.classList.remove("open"),e.fireEvent("close",e.el),(0,l.dispatch)("close.hs.dropdown",e.el,e.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1 .hs-dropdown-toggle")||i.el.querySelector(":scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle")||i.el.children[0],i.closers=Array.from(i.el.querySelectorAll(":scope .hs-dropdown-close"))||null,i.menu=i.el.querySelector(":scope > .hs-dropdown-menu"),i.eventMode=(0,l.getClassProperty)(i.el,"--trigger","click"),i.closeMode=(0,l.getClassProperty)(i.el,"--auto-close","true"),i.animationInProcess=!1,i.toggle&&i.menu&&i.init(),i}return i(e,t),e.prototype.init=function(){var t=this;if(this.createCollection(window.$hsDropdownCollection,this),this.toggle.disabled)return!1;this.toggle.addEventListener("click",(function(e){return t.onClickHandler(e)})),this.closers&&this.buildClosers(),(0,l.isIOS)()||(0,l.isIpadOS)()||(this.el.addEventListener("mouseenter",(function(){return t.onMouseEnterHandler()})),this.el.addEventListener("mouseleave",(function(){return t.onMouseLeaveHandler()})))},e.prototype.resizeHandler=function(){this.eventMode=(0,l.getClassProperty)(this.el,"--trigger","click")},e.prototype.buildClosers=function(){var t=this;this.closers.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))},e.prototype.onClickHandler=function(t){this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")?this.close():this.open()},e.prototype.onMouseEnterHandler=function(){if("hover"!==this.eventMode)return!1;this.el._popper&&this.forceClearState(),!this.el.classList.contains("open")&&this.menu.classList.contains("hidden")&&this.open()},e.prototype.onMouseLeaveHandler=function(){if("hover"!==this.eventMode)return!1;this.el.classList.contains("open")&&!this.menu.classList.contains("hidden")&&this.close()},e.prototype.destroyPopper=function(){this.menu.classList.remove("block"),this.menu.classList.add("hidden"),this.menu.style.inset=null,this.menu.style.position=null,this.el&&this.el._popper&&this.el._popper.destroy(),this.animationInProcess=!1},e.prototype.absoluteStrategyModifiers=function(){var t=this;return[{name:"applyStyles",fn:function(e){var n=(window.getComputedStyle(t.el).getPropertyValue("--strategy")||"absolute").replace(" ",""),o=(window.getComputedStyle(t.el).getPropertyValue("--adaptive")||"adaptive").replace(" ","");e.state.elements.popper.style.position=n,e.state.elements.popper.style.transform="adaptive"===o?e.state.styles.popper.transform:null,e.state.elements.popper.style.top=null,e.state.elements.popper.style.bottom=null,e.state.elements.popper.style.left=null,e.state.elements.popper.style.right=null,e.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},e.prototype.open=function(){var t=this;if(this.el.classList.contains("open"))return!1;if(this.animationInProcess)return!1;this.animationInProcess=!0;var e=(window.getComputedStyle(this.el).getPropertyValue("--placement")||"").replace(" ",""),n=(window.getComputedStyle(this.el).getPropertyValue("--flip")||"true").replace(" ",""),o=(window.getComputedStyle(this.el).getPropertyValue("--strategy")||"fixed").replace(" ",""),i=parseInt((window.getComputedStyle(this.el).getPropertyValue("--offset")||"10").replace(" ",""));"static"!==o&&(this.el._popper=(0,a.createPopper)(this.el,this.menu,{placement:u.POSITIONS[e]||"bottom-start",strategy:o,modifiers:r(r([],"fixed"!==o?this.absoluteStrategyModifiers():[],!0),[{name:"flip",enabled:"true"===n},{name:"offset",options:{offset:[0,i]}}],!1)})),this.menu.style.margin=null,this.menu.classList.remove("hidden"),this.menu.classList.add("block"),setTimeout((function(){t.el.classList.add("open"),t.animationInProcess=!1})),this.fireEvent("open",this.el),(0,l.dispatch)("open.hs.dropdown",this.el,this.el)},e.prototype.close=function(t){var e=this;if(void 0===t&&(t=!0),this.animationInProcess||!this.el.classList.contains("open"))return!1;if(this.animationInProcess=!0,t){var n=this.el.querySelector("[data-hs-dropdown-transition]")||this.menu;(0,l.afterTransition)(n,(function(){return e.destroyPopper()}))}else this.destroyPopper();this.menu.style.margin=null,this.el.classList.remove("open"),this.fireEvent("close",this.el),(0,l.dispatch)("close.hs.dropdown",this.el,this.el)},e.prototype.forceClearState=function(){this.destroyPopper(),this.menu.style.margin=null,this.el.classList.remove("open")},e.getInstance=function(t,e){var n=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){if(window.$hsDropdownCollection||(window.$hsDropdownCollection=[]),document.querySelectorAll(".hs-dropdown:not(.--prevent-on-load-init)").forEach((function(t){window.$hsDropdownCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)})),window.$hsDropdownCollection){document.addEventListener("keydown",(function(t){return e.accessibility(t)})),window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)}));var t=window.innerWidth;window.addEventListener("resize",(function(){window.innerWidth!==t&&(t=innerWidth,e.closeCurrentlyOpened(null,!1))}))}},e.open=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.menu.classList.contains("hidden")&&e.element.open()},e.close=function(t){var e=window.$hsDropdownCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.menu.classList.contains("hidden")&&e.element.close()},e.accessibility=function(t){this.history=l.menuSearchHistory;var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e&&(u.DROPDOWN_ACCESSIBILITY_KEY_SET.includes(t.code)||4===t.code.length&&t.code[t.code.length-1].match(/^[A-Z]*$/))&&!t.metaKey&&!e.element.menu.querySelector("input:focus")&&!e.element.menu.querySelector("textarea:focus"))switch(t.code){case"Escape":e.element.menu.querySelector(".hs-select.active")||(t.preventDefault(),this.onEscape(t));break;case"Enter":e.element.menu.querySelector(".hs-select button:focus")||e.element.menu.querySelector(".hs-collapse-toggle:focus")||this.onEnter(t);break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;default:t.preventDefault(),this.onFirstLetter(t.key)}},e.onEscape=function(t){var e=t.target.closest(".hs-dropdown.open");if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&(n.element.close(),n.element.toggle.focus())}else this.closeCurrentlyOpened()},e.onEnter=function(t){var e=t.target.parentElement;if(window.$hsDropdownCollection.find((function(t){return t.element.el===e}))){t.preventDefault();var n=window.$hsDropdownCollection.find((function(t){return t.element.el===e}));n&&n.element.open()}},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsDropdownCollection.find((function(t){return t.element.el.classList.contains("open")}));if(e){var n=e.element.menu;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])")).reverse():Array.from(n.querySelectorAll("a:not([hidden]), .hs-dropdown > button:not([hidden])"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector("a:focus, button:focus"),r=o.findIndex((function(t){return t===i}));r+1\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t

\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t0%\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t',s.extensions=_.merge({default:{icon:'',class:"size-5"},xls:{icon:'',class:"size-5"},doc:{icon:'',class:"size-5"},zip:{icon:'',class:"size-5"}},a.extensions),s.singleton=a.singleton,s.concatOptions=r(r({clickable:s.el.querySelector("[data-hs-file-upload-trigger]"),previewsContainer:s.el.querySelector("[data-hs-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:s.previewTemplate,autoHideTrigger:!1},a),n),s.init(),s}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()},e.prototype.initDropzone=function(){var t=this,e=this.el.querySelector("[data-hs-file-upload-clear]"),n=Array.from(this.el.querySelectorAll("[data-hs-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(function(e){return t.onAddFile(e)})),this.dropzone.on("removedfile",(function(){return t.onRemoveFile()})),this.dropzone.on("uploadprogress",(function(e,n){return t.onUploadProgress(e,n)})),this.dropzone.on("complete",(function(e){return t.onComplete(e)})),e&&(e.onclick=function(){t.dropzone.files.length&&t.dropzone.removeAllFiles(!0)}),n.length&&n.forEach((function(e){e.onclick=function(){var e,n;(null===(e=t.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(n=t.concatOptions)||void 0===n?void 0:n.clickable).click()}}))},e.prototype.onAddFile=function(t){var e=this,n=t.previewElement,o=t.previewElement.querySelector("[data-hs-file-upload-reload]");if(!n)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),o&&o.addEventListener("click",(function(n){n.preventDefault(),n.stopPropagation();var o=document.createElement("input");o.type="file",o.click(),o.addEventListener("change",(function(n){var o,i=null===(o=n.target.files)||void 0===o?void 0:o[0];if(i){var r=i;r.status=Dropzone.ADDED,r.accepted=!0,r.previewElement=t.previewElement,r.previewTemplate=t.previewTemplate,r.previewsContainer=t.previewsContainer,e.dropzone.removeFile(t),e.dropzone.addFile(r)}}))})),this.previewAccepted(t)},e.prototype.previewAccepted=function(t){var e=this,n=t.previewElement,o=this.splitFileName(t.name),i=n.querySelector("[data-hs-file-upload-file-name]"),r=n.querySelector("[data-hs-file-upload-file-ext]"),s=n.querySelector("[data-hs-file-upload-file-size]"),l=n.querySelector("[data-hs-file-upload-file-icon]"),a=this.el.querySelector("[data-hs-file-upload-trigger]"),c=n.querySelector("[data-dz-thumbnail]"),u=n.querySelector("[data-hs-file-upload-remove]");i&&(i.textContent=o.name),r&&(r.textContent=o.extension),s&&(s.textContent=this.formatFileSize(t.size)),c&&(t.type.includes("image/")?c.classList.remove("hidden"):this.setIcon(o.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(a.style.display="none"),u&&(u.onclick=function(){return e.dropzone.removeFile(t)})},e.prototype.onRemoveFile=function(){var t=this.el.querySelector("[data-hs-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")},e.prototype.onUploadProgress=function(t,e){var n=t.previewElement;if(!n)return!1;var o=n.querySelector("[data-hs-file-upload-progress-bar]"),i=n.querySelector("[data-hs-file-upload-progress-bar-pane]"),r=n.querySelector("[data-hs-file-upload-progress-bar-value]"),s=Math.floor(e);o&&o.setAttribute("aria-valuenow","".concat(s)),i&&(i.style.width="".concat(s,"%")),r&&(r.innerText="".concat(s))},e.prototype.onComplete=function(t){var e=t.previewElement;if(!e)return!1;e.classList.add("complete")},e.prototype.setIcon=function(t,e){var n=this.createIcon(t);e.append(n)},e.prototype.createIcon=function(t){var e,n,o=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,l.htmlToElement)(this.extensions[t].icon):(0,l.htmlToElement)(this.extensions.default.icon);return(0,l.classToClassList)((null===(n=this.extensions[t])||void 0===n?void 0:n.class)?this.extensions[t].class:this.extensions.default.class,o),o},e.prototype.formatFileSize=function(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"},e.prototype.splitFileName=function(t){var e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}},e.getInstance=function(t,e){var n=window.$hsFileUploadCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsFileUploadCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a.default);window.addEventListener("load",(function(){document.querySelectorAll("[data-hs-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&c.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=c),e.default=c},332:function(t,e,n){ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},770:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0?l.step:1,o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsInputNumberCollection,this),this.input&&this.increment&&this.build()},e.prototype.checkIsNumberAndConvert=function(){var t=this.input.value.trim(),e=this.cleanAndExtractNumber(t);null!==e?(this.inputValue=e,this.input.value=e.toString()):(this.inputValue=0,this.input.value="0")},e.prototype.cleanAndExtractNumber=function(t){var e=[],n=!1;t.split("").forEach((function(t){t>="0"&&t<="9"?e.push(t):"."!==t||n||(e.push(t),n=!0)}));var o=e.join(""),i=parseFloat(o);return isNaN(i)?null:i},e.prototype.build=function(){this.input&&this.buildInput(),this.increment&&this.buildIncrement(),this.decrement&&this.buildDecrement(),this.inputValue<=0&&0===this.minInputValue&&(this.inputValue=0,this.input.value="0"),(this.inputValue<=0||this.minInputValue<0)&&this.changeValue(),this.input.hasAttribute("disabled")&&this.disableButtons()},e.prototype.buildInput=function(){var t=this;this.input.addEventListener("input",(function(){return t.changeValue()}))},e.prototype.buildIncrement=function(){var t=this;this.increment.addEventListener("click",(function(){t.changeValue("increment")}))},e.prototype.buildDecrement=function(){var t=this;this.decrement.addEventListener("click",(function(){t.changeValue("decrement")}))},e.prototype.changeValue=function(t){var e,n;void 0===t&&(t="none");var o={inputValue:this.inputValue},i=null!==(e=this.minInputValue)&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=null!==(n=this.maxInputValue)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;switch(this.inputValue=isNaN(this.inputValue)?0:this.inputValue,t){case"increment":var s=this.inputValue+this.step;this.inputValue=s>=i&&s<=r?s:r,this.input.value=this.inputValue.toString();break;case"decrement":var a=this.inputValue-this.step;this.inputValue=a>=i&&a<=r?a:i,this.input.value=this.inputValue.toString();break;default:var c=isNaN(parseInt(this.input.value))?0:parseInt(this.input.value);this.inputValue=c>=r?r:c<=i?i:c,this.inputValue<=i&&(this.input.value=this.inputValue.toString())}o.inputValue=this.inputValue,this.inputValue===i?(this.el.classList.add("disabled"),this.decrement&&this.disableButtons("decrement")):(this.el.classList.remove("disabled"),this.decrement&&this.enableButtons("decrement")),this.inputValue===r?(this.el.classList.add("disabled"),this.increment&&this.disableButtons("increment")):(this.el.classList.remove("disabled"),this.increment&&this.enableButtons("increment")),this.fireEvent("change",o),(0,l.dispatch)("change.hs.inputNumber",this.el,o)},e.prototype.disableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.setAttribute("disabled","disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.setAttribute("disabled","disabled"))},e.prototype.enableButtons=function(t){void 0===t&&(t="all"),"all"===t?("BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"),"BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled")):"increment"===t?"BUTTON"!==this.increment.tagName&&"INPUT"!==this.increment.tagName||this.increment.removeAttribute("disabled"):"decrement"===t&&("BUTTON"!==this.decrement.tagName&&"INPUT"!==this.decrement.tagName||this.decrement.removeAttribute("disabled"))},e.getInstance=function(t,e){var n=window.$hsInputNumberCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsInputNumberCollection||(window.$hsInputNumberCollection=[]),document.querySelectorAll("[data-hs-input-number]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsInputNumberCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSInputNumber=a),e.default=a},850:function(t,e,n){ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(737)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.openedBreakpoint})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.openedBreakpoint})).forEach((function(t){c.setOpened(t.element.openedBreakpoint,t)}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},659:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=t?(document.body.classList.add("hs-overlay-body-open"),e.element.overlay.classList.add("opened")):e.element.close(!0)},e.accessibility=function(t){var e,n,o=window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("open")})),i=o[o.length-1],r=null===(n=null===(e=null==i?void 0:i.element)||void 0===e?void 0:e.overlay)||void 0===n?void 0:n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[];(null==r?void 0:r.length)&&r.forEach((function(t){(0,l.isParentOrElementHidden)(t)||s.push(t)}));var a=i&&!t.metaKey;if(a&&!i.element.isTabAccessibilityLimited&&"Tab"===t.code)return!1;a&&s.length&&"Tab"===t.code&&(t.preventDefault(),this.onTab(i,s)),a&&"Escape"===t.code&&(t.preventDefault(),this.onEscape(i))},e.onEscape=function(t){t&&t.element.hasAbilityToCloseOnBackdropClick&&t.element.close()},e.onTab=function(t,e){if(!e.length)return!1;var n=t.element.overlay.querySelector(":focus"),o=Array.from(e).indexOf(n);o>-1?e[(o+1)%e.length].focus():e[0].focus()},e.on=function(t,e,n){var o=window.$hsOverlayCollection.find((function(t){return t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.overlay===("string"==typeof e?document.querySelector(e):e)}));o&&(o.element.events[t]=n)},e}(s(n(961)).default);window.addEventListener("load",(function(){c.autoInit()})),window.addEventListener("resize",(function(){!function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.autoClose})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.autoClose})).forEach((function(t){document.body.clientWidth>=t.element.autoClose&&t.element.close(!0)}))}(),function(){if(!window.$hsOverlayCollection.length||!window.$hsOverlayCollection.find((function(t){return t.element.overlay.classList.contains("opened")})))return!1;window.$hsOverlayCollection.filter((function(t){return t.element.overlay.classList.contains("opened")})).forEach((function(t){var e=parseInt(window.getComputedStyle(t.element.overlay).getPropertyValue("z-index")),n=document.querySelector("#".concat(t.element.overlay.id,"-backdrop"));if(e===parseInt(window.getComputedStyle(n).getPropertyValue("z-index"))+1)return!1;"style"in n&&(n.style.zIndex="".concat(e-1)),document.body.classList.add("hs-overlay-body-open")}))}()})),"undefined"!=typeof window&&(window.HSOverlay=c),e.default=c},60:function(t,e,n){ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},139:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&this.items[e-1].focus()},e.prototype.onKeydown=function(t,e){"Backspace"===t.key&&e>0&&(""===this.items[e].value?(this.items[e-1].value="",this.items[e-1].focus()):this.items[e].value=""),this.setCurrentValue(),this.toggleCompleted()},e.prototype.onFocusIn=function(t){this.items[t].setAttribute("placeholder","")},e.prototype.onFocusOut=function(t){this.items[t].setAttribute("placeholder",this.placeholders[t])},e.prototype.onPaste=function(t){var e=this;t.preventDefault(),this.items.forEach((function(n){document.activeElement===n&&e.autoFillAll(t.clipboardData.getData("text"))}))},e.getInstance=function(t,e){var n=window.$hsPinInputCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsPinInputCollection||(window.$hsPinInputCollection=[]),document.querySelectorAll("[data-hs-pin-input]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsPinInputCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSPinInput=a),e.default=a},911:function(t,e,n){ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(737)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},961:function(t,e,n){ -/* - * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==l[0]&&2!==l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]",o.dropdownClasses=l.dropdownClasses||"absolute top-full z-[1] w-full bg-white border border-gray-200 rounded-md hidden mt-2",o.dropdownItemTemplate=l.dropdownItemTemplate||"
",o.dropdownItemTemplatesByType=l.dropdownItemTemplatesByType||null,o.dropdownItemClasses=l.dropdownItemClasses||"py-2 px-4 w-full cursor-pointer text-sm hover:bg-gray-300 hover:text-black",o.highlightedTextTagName=l.highlightedTextTagName||"u",o.highlightedTextClasses=l.highlightedTextClasses||"bg-green-200",o.jsonUrl&&o.fetchData().then((function(){return o.init()})),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsSearchByJsonCollection,this),this.buildDropdown(),this.el.addEventListener("input",(0,c.debounce)((function(e){t.val=e.target.value,t.val.length>t.minChars?t.searchData(t.val):t.result=[],t.result.length?t.dropdown.classList.remove("hidden"):t.dropdown.classList.add("hidden"),t.buildItems()})))},e.prototype.fetchData=function(){return s(this,void 0,void 0,(function(){var t=this;return l(this,(function(e){switch(e.label){case 0:return[4,fetch(this.jsonUrl).then((function(t){return t.json()})).then((function(e){return t.json=e}))];case 1:return e.sent(),[2]}}))}))},e.prototype.searchData=function(t){this.result=this.json.filter((function(e){var n=t.toLowerCase(),o=e.title.toLowerCase(),i=e.description.toLowerCase();return o.includes(n)||i.includes(n)}))},e.prototype.buildDropdown=function(){this.dropdown=(0,c.htmlToElement)(this.dropdownTemplate),this.dropdownClasses&&(0,c.classToClassList)(this.dropdownClasses,this.dropdown),this.el.after(this.dropdown)},e.prototype.buildItems=function(){var t=this;this.dropdown.innerHTML="",this.result.forEach((function(e){var n=(0,c.htmlToElement)(''));n.append(t.itemTemplate(e)),t.dropdown.append(n)}))},e.prototype.itemTemplate=function(t){var e=new RegExp(this.val,"gi"),n=t.title.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),o=t.description.replace(e,"<".concat(this.highlightedTextTagName,' class="inline-block ').concat(this.highlightedTextClasses,'">').concat(this.val,"")),i=this.dropdownItemTemplatesByType?this.dropdownItemTemplatesByType.find((function(e){return e.type===t.type})):null,r=i?(0,c.htmlToElement)(i.markup):(0,c.htmlToElement)(this.dropdownItemTemplate);this.dropdownItemClasses&&(0,c.classToClassList)(this.dropdownItemClasses,r);var s=r.querySelector("[data-title]");s?s.append((0,c.htmlToElement)("".concat(n,""))):r.append((0,c.htmlToElement)("".concat(n,"")));var l=r.querySelector("[data-description]");if(l)l.append((0,c.htmlToElement)("".concat(o,"")));else if(!i){var a=(0,c.htmlToElement)("
");r.append(a),r.append((0,c.htmlToElement)("".concat(o,"")))}return r},e.getInstance=function(t){var e=window.$hsSearchByJsonCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return e?e.element:null},e.autoInit=function(){window.$hsSearchByJsonCollection||(window.$hsSearchByJsonCollection=[]),document.querySelectorAll("[data-hs-search-by-json]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsSearchByJsonCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(a(n(737)).default);window.addEventListener("load",(function(){u.autoInit()})),"undefined"!=typeof window&&(window.HSSearchByJson=u),e.default=u},233:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),l=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this;return o.activeSection=null,o.contentId=o.el.getAttribute("data-hs-scrollspy"),o.content=document.querySelector(o.contentId),o.links=o.el.querySelectorAll("[href]"),o.sections=[],o.scrollableId=o.el.getAttribute("data-hs-scrollspy-scrollable-parent"),o.scrollable=o.scrollableId?document.querySelector(o.scrollableId):document,o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((function(e){t.sections.push(t.scrollable.querySelector(e.getAttribute("href")))})),Array.from(this.sections).forEach((function(e){if(!e.getAttribute("id"))return!1;t.scrollable.addEventListener("scroll",(function(n){return t.update(n,e)}))})),this.links.forEach((function(e){e.addEventListener("click",(function(n){if(n.preventDefault(),"javascript:;"===e.getAttribute("href"))return!1;t.scrollTo(e)}))}))},e.prototype.update=function(t,e){var n=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.getClassProperty)(e,"--scrollspy-offset"))||n,i=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),r=parseInt(String(e.getBoundingClientRect().top))-o-i,l=e.offsetHeight;if(r<=0&&r+l>0){if(this.activeSection===e)return!1;this.links.forEach((function(t){t.classList.remove("active")}));var a=this.el.querySelector('[href="#'.concat(e.getAttribute("id"),'"]'));if(a){a.classList.add("active");var c=a.closest("[data-hs-scrollspy-group]");if(c){var u=c.querySelector("[href]");u&&u.classList.add("active")}}this.activeSection=e}},e.prototype.scrollTo=function(t){var e=t.getAttribute("href"),n=document.querySelector(e),o=parseInt((0,s.getClassProperty)(this.el,"--scrollspy-offset","0")),i=parseInt((0,s.getClassProperty)(n,"--scrollspy-offset"))||o,r=this.scrollable===document?0:this.scrollable.offsetTop,l=n.offsetTop-i-r,a=this.scrollable===document?window:this.scrollable,c=function(){window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:l,left:0,behavior:"smooth"})},u=this.fireEvent("beforeScroll",this.el);(0,s.dispatch)("beforeScroll.hs.scrollspy",this.el,this.el),u instanceof Promise?u.then((function(){return c()})):c()},e.getInstance=function(t,e){void 0===e&&(e=!1);var n=window.$hsScrollspyCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element.el:null},e.autoInit=function(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),document.querySelectorAll("[data-hs-scrollspy]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsScrollspyCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(r(n(961)).default);window.addEventListener("load",(function(){l.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=l),e.default=l},442:function(t,e,n){ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),e=this.toggle.querySelector("[data-icon]"),n=this.toggle.querySelector("[data-title]"),!this.isMultiple&&e&&this.setToggleIcon(),!this.isMultiple&&n&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,n||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),this.toggle.addEventListener("click",(function(){if(o.isDisabled)return!1;o.isOpened?o.close():o.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o){var i=this;void 0===o&&(o="1");var r=null,s=(0,a.htmlToElement)(this.optionTag||"
");if(s.setAttribute("data-value",e),s.setAttribute("data-title-value",t),s.setAttribute("tabIndex",o),s.classList.add("cursor-pointer"),this.optionTemplate&&(r=(0,a.htmlToElement)(this.optionTemplate),s.append(r)),r?r.querySelector("[data-title]").textContent=t||"":s.textContent=t||"",n){if(n.icon){var l=(0,a.htmlToElement)(n.icon);if(l.classList.add("mw-full"),r)r.querySelector("[data-icon]").append(l);else{var c=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,c),c.append(l),s.append(c)}}if(n.description)if(r)r.querySelector("[data-description]").append(n.description);else{var u=(0,a.htmlToElement)("
");u.textContent=n.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,u),s.append(u)}}r&&r.querySelector("[data-icon]")&&!n&&!(null==n?void 0:n.icon)&&r.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&s.classList.add("selected"),s.addEventListener("click",(function(){return i.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,s),this.dropdown&&this.dropdown.append(s)},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n){var o=(0,a.htmlToElement)("");o.setAttribute("value",e),o.setAttribute("data-hs-select-option",JSON.stringify(n)),o.innerText=t,this.el.append(o)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){this.el.value="".concat(this.value);var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,options:n}],!1)},e.prototype.removeSelectOption=function(t){if(!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t}))},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.stringFromValue=function(){var t=this,e=[];return this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems?"".concat(e.length," ").concat(this.toggleCountText):e.join(", ")},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0,Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")})).classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){t.wrapper.classList.add("active"),t.dropdown.classList.add("opened"),t.hasSearch&&!t.preventSearchFocus&&t.search.focus(),t.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){o.dropdown.classList.add("hidden"),o.hasSearch&&(o.search.value="",o.search.dispatchEvent(new Event("input",{bubbles:!0})),o.search.blur()),o.animationInProcess=!1})),null===(n=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===n||n.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r),e.buildOption(o,i,r,n),e.buildOriginalOption(o,i,r))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t){!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t)})):n(t)},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),this.onArrow();break;case"ArrowDown":t.preventDefault(),this.onArrow(!1);break;case"Tab":t.preventDefault(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),this.onStartEnd();break;case"End":t.preventDefault(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},957:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"),n=this.toggle.querySelector("[data-icon]"),o=this.toggle.querySelector("[data-title]"),!this.isMultiple&&n&&this.setToggleIcon(),!this.isMultiple&&o&&this.setToggleTitle(),this.isMultiple?this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder:this.toggleTextWrapper.innerHTML=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder,o||this.toggle.append(this.toggleTextWrapper),this.toggleClasses&&(0,a.classToClassList)(this.toggleClasses,this.toggle),this.isDisabled&&this.toggle.classList.add("disabled"),this.wrapper&&this.wrapper.append(this.toggle),(null===(e=this.toggle)||void 0===e?void 0:e.ariaExpanded)&&(this.isOpened?this.toggle.ariaExpanded="true":this.toggle.ariaExpanded="false"),this.toggle.addEventListener("click",(function(){if(i.isDisabled)return!1;i.isOpened?i.close():i.open()}))},e.prototype.setToggleIcon=function(){var t,e,n=this.toggle.querySelector("[data-icon]");if(n.innerHTML="",n){var o=(0,a.htmlToElement)((null===(e=null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.options)||void 0===e?void 0:e.icon)||"");n.append(o),o?n.classList.remove("hidden"):n.classList.add("hidden")}},e.prototype.setToggleTitle=function(){var t,e=this.toggle.querySelector("[data-title]");if(e.classList.add("truncate"),e.innerHTML="",e){var n=(null===(t=this.getItemByValue(this.value))||void 0===t?void 0:t.title)||this.placeholder;e.innerHTML=n,this.toggle.append(e)}},e.prototype.buildTags=function(){this.isDisabled&&this.wrapper.classList.add("disabled"),this.buildTagsInput(),this.setTagsItems()},e.prototype.reassignTagsInputPlaceholder=function(t){this.tagsInput.placeholder=t,this.tagsInputHelper.innerHTML=t,this.calculateInputWidth()},e.prototype.buildTagsItem=function(t){var e,n,o,i,r,s,l,c=this,u=this.getItemByValue(t),d=document.createElement("div");if(d.setAttribute("data-tag-value",t),this.tagsItemClasses&&(0,a.classToClassList)(this.tagsItemClasses,d),this.tagsItemTemplate&&(i=(0,a.htmlToElement)(this.tagsItemTemplate),d.append(i)),null===(e=null==u?void 0:u.options)||void 0===e?void 0:e.icon){var p=(0,a.htmlToElement)(null===(n=null==u?void 0:u.options)||void 0===n?void 0:n.icon);(l=i?i.querySelector("[data-icon]"):document.createElement("span")).append(p),i||d.append(l)}i&&i.querySelector("[data-icon]")&&!(null===(o=null==u?void 0:u.options)||void 0===o?void 0:o.icon)&&i.querySelector("[data-icon]").classList.add("hidden"),(r=i?i.querySelector("[data-title]"):document.createElement("span")).textContent=u.title||"",i||d.append(r),i?s=i.querySelector("[data-remove]"):((s=document.createElement("span")).textContent="X",d.append(s)),s.addEventListener("click",(function(){c.value=c.value.filter((function(e){return e!==t})),c.selectedItems=c.selectedItems.filter((function(e){return e!==t})),c.value.length||c.reassignTagsInputPlaceholder(c.placeholder),c.unselectMultipleItems(),c.selectMultipleItems(),d.remove()})),this.wrapper.append(d)},e.prototype.getItemByValue=function(t){return this.selectOptions.find((function(e){return e.val===t}))},e.prototype.setTagsItems=function(){var t=this;this.value&&this.value.forEach((function(e){t.selectedItems.includes(e)||t.buildTagsItem(e),t.selectedItems=t.selectedItems.includes(e)?t.selectedItems:s(s([],t.selectedItems,!0),[e],!1)}))},e.prototype.buildTagsInput=function(){var t=this;this.tagsInput=document.createElement("input"),this.tagsInputClasses&&(0,a.classToClassList)(this.tagsInputClasses,this.tagsInput),this.tagsInput.addEventListener("focus",(function(){return t.open()})),this.tagsInput.addEventListener("input",(function(){return t.calculateInputWidth()})),this.tagsInput.addEventListener("input",(0,a.debounce)((function(e){return t.searchOptions(e.target.value)}))),this.tagsInput.addEventListener("keydown",(function(e){if("Enter"===e.key&&t.isAddTagOnEnter){var n=e.target.value;if(t.selectOptions.find((function(t){return t.val===n})))return!1;t.addSelectOption(n,n),t.buildOption(n,n),t.dropdown.querySelector('[data-value="'.concat(n,'"]')).click(),t.resetTagsInputField()}})),this.wrapper.append(this.tagsInput),setTimeout((function(){t.adjustInputWidth(),t.reassignTagsInputPlaceholder(t.value.length?"":t.placeholder)}))},e.prototype.buildDropdown=function(){var t=this;this.dropdown=(0,a.htmlToElement)(this.dropdownTag||"
"),this.dropdown.setAttribute("data-hs-select-dropdown",""),this.dropdown.classList.add("absolute","top-full"),this.dropdown.role="listbox",this.dropdown.tabIndex=-1,this.dropdown.ariaOrientation="vertical",this.isOpened||this.dropdown.classList.add("hidden"),this.dropdownClasses&&(0,a.classToClassList)(this.dropdownClasses,this.dropdown),this.wrapper&&this.wrapper.append(this.dropdown),this.dropdown&&this.hasSearch&&this.buildSearch(),this.selectOptions&&this.selectOptions.forEach((function(e,n){return t.buildOption(e.title,e.val,e.disabled,e.selected,e.options,"".concat(n))}))},e.prototype.buildSearch=function(){var t,e=this;this.searchWrapper=(0,a.htmlToElement)(this.searchWrapperTemplate||"
"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector("[data-input]"),this.search=(0,a.htmlToElement)(''),this.search.placeholder=this.searchPlaceholder,this.searchClasses&&(0,a.classToClassList)(this.searchClasses,this.search),this.search.addEventListener("input",(0,a.debounce)((function(t){return e.searchOptions(t.target.value)}))),t?t.append(this.search):this.searchWrapper.append(this.search),this.dropdown.append(this.searchWrapper)},e.prototype.buildOption=function(t,e,n,o,i,r){var l=this;void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===r&&(r="1");var c=null,u=(0,a.htmlToElement)(this.optionTag||"
");if(u.setAttribute("data-value",e),u.setAttribute("data-title-value",t),u.setAttribute("tabIndex",r),u.classList.add("cursor-pointer"),n&&u.classList.add("disabled"),o&&(this.isMultiple?this.value=s(s([],this.value,!0),[e],!1):this.value=e),this.optionTemplate&&(c=(0,a.htmlToElement)(this.optionTemplate),u.append(c)),c?c.querySelector("[data-title]").textContent=t||"":u.textContent=t||"",i){if(i.icon){var d=(0,a.htmlToElement)(i.icon);if(d.classList.add("max-w-full"),c)c.querySelector("[data-icon]").append(d);else{var p=(0,a.htmlToElement)("
");this.iconClasses&&(0,a.classToClassList)(this.iconClasses,p),p.append(d),u.append(p)}}if(i.description)if(c)c.querySelector("[data-description]").append(i.description);else{var h=(0,a.htmlToElement)("
");h.textContent=i.description,this.descriptionClasses&&(0,a.classToClassList)(this.descriptionClasses,h),u.append(h)}}c&&c.querySelector("[data-icon]")&&!i&&!(null==i?void 0:i.icon)&&c.querySelector("[data-icon]").classList.add("hidden"),this.value&&(this.isMultiple?this.value.includes(e):this.value===e)&&u.classList.add("selected"),n||u.addEventListener("click",(function(){return l.onSelectOption(e)})),this.optionClasses&&(0,a.classToClassList)(this.optionClasses,u),this.dropdown&&this.dropdown.append(u),o&&this.setNewValue()},e.prototype.destroyOption=function(t){var e=this.dropdown.querySelector('[data-value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildOriginalOption=function(t,e,n,o,i){var r=(0,a.htmlToElement)("");r.setAttribute("value",e),n&&r.setAttribute("disabled","disabled"),o&&r.setAttribute("selected","selected"),r.setAttribute("data-hs-select-option",JSON.stringify(i)),r.innerText=t,this.el.append(r)},e.prototype.destroyOriginalOption=function(t){var e=this.el.querySelector('[value="'.concat(t,'"]'));if(!e)return!1;e.remove()},e.prototype.buildTagsInputHelper=function(){this.tagsInputHelper=document.createElement("span"),this.tagsInputHelper.style.fontSize=window.getComputedStyle(this.tagsInput).fontSize,this.tagsInputHelper.style.fontFamily=window.getComputedStyle(this.tagsInput).fontFamily,this.tagsInputHelper.style.fontWeight=window.getComputedStyle(this.tagsInput).fontWeight,this.tagsInputHelper.style.letterSpacing=window.getComputedStyle(this.tagsInput).letterSpacing,this.tagsInputHelper.style.visibility="hidden",this.tagsInputHelper.style.whiteSpace="pre",this.tagsInputHelper.style.position="absolute",this.wrapper.appendChild(this.tagsInputHelper)},e.prototype.calculateInputWidth=function(){this.tagsInputHelper.textContent=this.tagsInput.value||this.tagsInput.placeholder;var t=parseInt(window.getComputedStyle(this.tagsInput).paddingLeft)+parseInt(window.getComputedStyle(this.tagsInput).paddingRight),e=parseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth)+parseInt(window.getComputedStyle(this.tagsInput).borderRightWidth),n=this.tagsInputHelper.offsetWidth+t+e,o=this.wrapper.offsetWidth-(parseInt(window.getComputedStyle(this.wrapper).paddingLeft)+parseInt(window.getComputedStyle(this.wrapper).paddingRight));this.tagsInput.style.width="".concat(Math.min(n,o)+2,"px")},e.prototype.adjustInputWidth=function(){this.buildTagsInputHelper(),this.calculateInputWidth()},e.prototype.onSelectOption=function(t){var e=this;if(this.clearSelections(),this.isMultiple?(this.value=this.value.includes(t)?Array.from(this.value).filter((function(e){return e!==t})):s(s([],Array.from(this.value),!0),[t],!1),this.selectMultipleItems(),this.setNewValue()):(this.value=t,this.selectSingleItem(),this.setNewValue()),this.fireEvent("change",this.value),(0,a.dispatch)("change.hs.select",this.el,this.value),"tags"===this.mode){var n=this.selectedItems.filter((function(t){return!e.value.includes(t)}));n.length&&n.forEach((function(t){e.selectedItems=e.selectedItems.filter((function(e){return e!==t})),e.wrapper.querySelector('[data-tag-value="'.concat(t,'"]')).remove()})),this.resetTagsInputField()}this.isMultiple||(this.toggle.querySelector("[data-icon]")&&this.setToggleIcon(),this.toggle.querySelector("[data-title]")&&this.setToggleTitle(),this.close()),this.value.length||"tags"!==this.mode||this.reassignTagsInputPlaceholder(this.placeholder),this.isOpened&&"tags"===this.mode&&this.tagsInput&&this.tagsInput.focus(),this.triggerChangeEventForNativeSelect()},e.prototype.triggerChangeEventForNativeSelect=function(){var t=new Event("change",{bubbles:!0});this.el.dispatchEvent(t)},e.prototype.addSelectOption=function(t,e,n,o,i){this.selectOptions=s(s([],this.selectOptions,!0),[{title:t,val:e,disabled:n,selected:o,options:i}],!1)},e.prototype.removeSelectOption=function(t,e){if(void 0===e&&(e=!1),!!!this.selectOptions.some((function(e){return e.val===t})))return!1;this.selectOptions=this.selectOptions.filter((function(e){return e.val!==t})),console.log(e),this.value=e?this.value.filter((function(e){return e!==t})):t,console.log(this.value)},e.prototype.resetTagsInputField=function(){this.tagsInput.value="",this.reassignTagsInputPlaceholder(""),this.searchOptions("")},e.prototype.clearSelections=function(){Array.from(this.dropdown.children).forEach((function(t){t.classList.contains("selected")&&t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){t.selected&&(t.selected=!1)}))},e.prototype.setNewValue=function(){"tags"===this.mode?this.setTagsItems():(console.log(),this.value.length?this.toggleTextWrapper.innerHTML=this.stringFromValue():this.toggleTextWrapper.innerHTML=this.placeholder)},e.prototype.stringFromValue=function(){var t=this,e=[],n="";if(this.selectOptions.forEach((function(n){t.isMultiple?t.value.includes(n.val)&&e.push(n.title):t.value===n.val&&e.push(n.title)})),this.toggleCountText&&""!==this.toggleCountText&&e.length>=this.toggleCountTextMinItems)if("nItemsAndCount"===this.toggleCountTextMode){var o=e.slice(0,this.toggleCountTextMinItems-1);n="".concat(o.join(this.toggleSeparators.items)," ").concat(this.toggleSeparators.betweenItemsAndCounter," ").concat(e.length-o.length," ").concat(this.toggleCountText)}else n="".concat(e.length," ").concat(this.toggleCountText);else n=e.join(this.toggleSeparators.items);return n},e.prototype.selectSingleItem=function(){var t=this;Array.from(this.el.children).find((function(e){return t.value===e.value})).selected=!0;var e=Array.from(this.dropdown.children).find((function(e){return t.value===e.getAttribute("data-value")}));e&&e.classList.add("selected")},e.prototype.selectMultipleItems=function(){var t=this;Array.from(this.dropdown.children).filter((function(e){return t.value.includes(e.getAttribute("data-value"))})).forEach((function(t){return t.classList.add("selected")})),Array.from(this.el.children).filter((function(e){return t.value.includes(e.value)})).forEach((function(t){return t.selected=!0}))},e.prototype.unselectMultipleItems=function(){Array.from(this.dropdown.children).forEach((function(t){return t.classList.remove("selected")})),Array.from(this.el.children).forEach((function(t){return t.selected=!1}))},e.prototype.searchOptions=function(t){this.searchNoResult&&(this.searchNoResult.remove(),this.searchNoResult=null),this.searchNoResult=(0,a.htmlToElement)(""),this.searchNoResult.innerText=this.searchNoResultText,(0,a.classToClassList)(this.searchNoResultClasses,this.searchNoResult);var e=this.dropdown.querySelectorAll("[data-value]"),n=!1;e.forEach((function(e){e.getAttribute("data-title-value").toLocaleLowerCase().includes(t.toLocaleLowerCase())?(e.classList.remove("hidden"),n=!0):e.classList.add("hidden")})),n||this.dropdown.append(this.searchNoResult)},e.prototype.eraseToggleIcon=function(){var t=this.toggle.querySelector("[data-icon]");t&&(t.innerHTML=null,t.classList.add("hidden"))},e.prototype.eraseToggleTitle=function(){var t=this.toggle.querySelector("[data-title]");t?t.innerHTML=this.placeholder:this.toggleTextWrapper.innerHTML=this.placeholder},e.prototype.destroy=function(){var t=this.el.parentElement.parentElement;this.el.classList.remove("hidden"),this.el.style.display="",t.prepend(this.el),t.querySelector(".hs-select").remove(),this.wrapper=null},e.prototype.open=function(){var t,e=this,n=(null===(t=null===window||void 0===window?void 0:window.$hsSelectCollection)||void 0===t?void 0:t.find((function(t){return t.element.isOpened})))||null;if(n&&n.element.close(),this.animationInProcess)return!1;this.animationInProcess=!0,this.dropdown.classList.remove("hidden"),this.recalculateDirection(),setTimeout((function(){var t;(null===(t=null==e?void 0:e.toggle)||void 0===t?void 0:t.ariaExpanded)&&(e.toggle.ariaExpanded="true"),e.wrapper.classList.add("active"),e.dropdown.classList.add("opened"),e.hasSearch&&!e.preventSearchFocus&&e.search.focus(),e.animationInProcess=!1})),this.isOpened=!0},e.prototype.close=function(){var t,e,n,o,i=this;if(this.animationInProcess)return!1;this.animationInProcess=!0,(null===(t=null==this?void 0:this.toggle)||void 0===t?void 0:t.ariaExpanded)&&(this.toggle.ariaExpanded="false"),this.wrapper.classList.remove("active"),this.dropdown.classList.remove("opened","bottom-full","top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.style.marginBottom="",(0,a.afterTransition)(this.dropdown,(function(){i.dropdown.classList.add("hidden"),i.hasSearch&&(i.search.value="",i.search.dispatchEvent(new Event("input",{bubbles:!0})),i.search.blur()),i.animationInProcess=!1})),null===(o=this.dropdown.querySelector(".hs-select-option-highlighted"))||void 0===o||o.classList.remove("hs-select-option-highlighted"),this.isOpened=!1},e.prototype.addOption=function(t){var e=this,n="".concat(this.selectOptions.length),o=function(t){var o=t.title,i=t.val,r=t.disabled,s=t.selected,l=t.options;!!e.selectOptions.some((function(t){return t.val===i}))||(e.addSelectOption(o,i,r,s,l),e.buildOption(o,i,r,s,l,n),e.buildOriginalOption(o,i,r,s,l),s&&!e.isMultiple&&e.onSelectOption(i))};Array.isArray(t)?t.forEach((function(t){o(t)})):o(t)},e.prototype.removeOption=function(t){var e=this,n=function(t,n){void 0===n&&(n=!1),!!e.selectOptions.some((function(e){return e.val===t}))&&(e.removeSelectOption(t,n),e.destroyOption(t),e.destroyOriginalOption(t),e.value===t&&(e.value=null,e.eraseToggleTitle(),e.eraseToggleIcon()))};Array.isArray(t)?t.forEach((function(t){n(t,e.isMultiple)})):n(t,this.isMultiple),this.setNewValue()},e.prototype.recalculateDirection=function(){var t,e,n,o;(0,a.isEnoughSpace)(this.dropdown,this.toggle||this.tagsInput,"bottom",this.dropdownSpace,this.viewport)?(this.dropdown.classList.remove("bottom-full"),(null===(t=this.dropdownDirectionClasses)||void 0===t?void 0:t.bottom)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="",this.dropdown.classList.add("top-full"),(null===(e=this.dropdownDirectionClasses)||void 0===e?void 0:e.top)&&this.dropdown.classList.add(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="".concat(this.dropdownSpace,"px")):(this.dropdown.classList.remove("top-full"),(null===(n=this.dropdownDirectionClasses)||void 0===n?void 0:n.top)&&this.dropdown.classList.remove(this.dropdownDirectionClasses.top),this.dropdown.style.marginTop="",this.dropdown.classList.add("bottom-full"),(null===(o=this.dropdownDirectionClasses)||void 0===o?void 0:o.bottom)&&this.dropdown.classList.add(this.dropdownDirectionClasses.bottom),this.dropdown.style.marginBottom="".concat(this.dropdownSpace,"px"))},e.getInstance=function(t,e){var n=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsSelectCollection||(window.$hsSelectCollection=[]),document.querySelectorAll("[data-hs-select]:not(.--prevent-on-load-init)").forEach((function(t){if(!window.$hsSelectCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))){var n=t.getAttribute("data-hs-select"),o=n?JSON.parse(n):{};new e(t,o)}})),window.$hsSelectCollection&&(window.addEventListener("click",(function(t){var n=t.target;e.closeCurrentlyOpened(n)})),document.addEventListener("keydown",(function(t){return e.accessibility(t)})))},e.open=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&!e.element.isOpened&&e.element.open()},e.close=function(t){var e=window.$hsSelectCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));e&&e.element.isOpened&&e.element.close()},e.closeCurrentlyOpened=function(t){if(void 0===t&&(t=null),!t.closest(".hs-select.active")){var e=window.$hsSelectCollection.filter((function(t){return t.element.isOpened}))||null;e&&e.forEach((function(t){t.element.close()}))}},e.accessibility=function(t){if(window.$hsSelectCollection.find((function(t){return t.element.isOpened}))&&u.SELECT_ACCESSIBILITY_KEY_SET.includes(t.code)&&!t.metaKey)switch(t.code){case"Escape":t.preventDefault(),this.onEscape();break;case"ArrowUp":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow();break;case"ArrowDown":t.preventDefault(),t.stopImmediatePropagation(),this.onArrow(!1);break;case"Tab":t.preventDefault(),t.stopImmediatePropagation(),this.onTab(t.shiftKey);break;case"Home":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd();break;case"End":t.preventDefault(),t.stopImmediatePropagation(),this.onStartEnd(!1);break;case"Enter":t.preventDefault(),this.onEnter(t)}},e.onEscape=function(){var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.close()},e.onArrow=function(t){void 0===t&&(t=!0);var e=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));if(e){var n=e.element.dropdown;if(!n)return!1;var o=(t?Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));r+1 *:not(.hidden)")).reverse():Array.from(n.querySelectorAll(":scope > *:not(.hidden)"))).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted")||n.querySelector(".selected");i||o[0].classList.add("hs-select-option-highlighted");var r=o.findIndex((function(t){return t===i}));if(!(r+1 *:not(.hidden)")):Array.from(n.querySelectorAll(":scope > *:not(.hidden)")).reverse()).filter((function(t){return!t.classList.contains("disabled")})),i=n.querySelector(".hs-select-option-highlighted");o.length&&(o[0].focus(),i&&i.classList.remove("hs-select-option-highlighted"),o[0].classList.add("hs-select-option-highlighted"))}},e.onEnter=function(t){var e=t.target.previousSibling;if(window.$hsSelectCollection.find((function(t){return t.element.el===e}))){var n=window.$hsSelectCollection.find((function(t){return t.element.isOpened})),o=window.$hsSelectCollection.find((function(t){return t.element.el===e}));n.element.close(),o.element.open()}else{(o=window.$hsSelectCollection.find((function(t){return t.element.isOpened})))&&o.element.onSelectOption(t.target.dataset.value||"")}},e}(c.default);window.addEventListener("load",(function(){d.autoInit()})),document.addEventListener("scroll",(function(){if(!window.$hsSelectCollection)return!1;var t=window.$hsSelectCollection.find((function(t){return t.element.isOpened}));t&&t.element.recalculateDirection()})),"undefined"!=typeof window&&(window.HSSelect=d),e.default=d},887:function(t,e,n){ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,m=e.hasError,v=void 0!==m&&m;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),v&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:v,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},983:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;nt.totalSteps&&(t.totalSteps=n)}))},e.prototype.buildNav=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-nav-item]").forEach((function(e){return t.addNavItem(e)})),this.navItems.forEach((function(e){return t.buildNavItem(e)}))},e.prototype.buildNavItem=function(t){var e=this,n=t.index,o=t.isDisabled,i=t.el;n===this.currentIndex&&this.setCurrentNavItem(),("linear"!==this.mode||o)&&i.addEventListener("click",(function(){return e.handleNavItemClick(t)}))},e.prototype.addNavItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-nav-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l,c=e.isOptional,u=void 0!==c&&c,d=e.isDisabled,p=void 0!==d&&d,h=e.isProcessed,f=void 0!==h&&h,v=e.hasError,m=void 0!==v&&v;s&&t.classList.add("success"),a&&t.classList.add("skipped"),p&&("BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")),m&&t.classList.add("error"),this.navItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,isOptional:u,isDisabled:p,isProcessed:f,hasError:m,el:t})},e.prototype.setCurrentNavItem=function(){var t=this;this.navItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentNavItemActions(o):t.unsetCurrentNavItemActions(o)}))},e.prototype.setCurrentNavItemActions=function(t){t.classList.add("active"),this.fireEvent("active",this.currentIndex),(0,l.dispatch)("active.hs.stepper",this.el,this.currentIndex)},e.prototype.getNavItem=function(t){return void 0===t&&(t=this.currentIndex),this.navItems.find((function(e){return e.index===t}))},e.prototype.setProcessedNavItemActions=function(t){t.isProcessed=!0,t.el.classList.add("processed")},e.prototype.setErrorNavItemActions=function(t){t.hasError=!0,t.el.classList.add("error")},e.prototype.unsetCurrentNavItemActions=function(t){t.classList.remove("active")},e.prototype.handleNavItemClick=function(t){var e=t.index;this.currentIndex=e,this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep()},e.prototype.buildContent=function(){var t=this;this.el.querySelectorAll("[data-hs-stepper-content-item]").forEach((function(e){return t.addContentItem(e)})),this.navItems.forEach((function(e){return t.buildContentItem(e)}))},e.prototype.buildContentItem=function(t){t.index===this.currentIndex&&this.setCurrentContentItem()},e.prototype.addContentItem=function(t){var e=JSON.parse(t.getAttribute("data-hs-stepper-content-item")),n=e.index,o=e.isFinal,i=void 0!==o&&o,r=e.isCompleted,s=void 0!==r&&r,l=e.isSkip,a=void 0!==l&&l;s&&t.classList.add("success"),a&&t.classList.add("skipped"),this.contentItems.push({index:n,isFinal:i,isCompleted:s,isSkip:a,el:t})},e.prototype.setCurrentContentItem=function(){var t=this;if(this.isCompleted){var e=this.contentItems.find((function(t){return t.isFinal})),n=this.contentItems.filter((function(t){return!t.isFinal}));return e.el.style.display="",n.forEach((function(t){return t.el.style.display="none"})),!1}this.contentItems.forEach((function(e){var n=e.index,o=e.el;n===t.currentIndex?t.setCurrentContentItemActions(o):t.unsetCurrentContentItemActions(o)}))},e.prototype.hideAllContentItems=function(){this.contentItems.forEach((function(t){return t.el.style.display="none"}))},e.prototype.setCurrentContentItemActions=function(t){t.style.display=""},e.prototype.unsetCurrentContentItemActions=function(t){t.style.display="none"},e.prototype.disableAll=function(){var t=this.getNavItem(this.currentIndex);t.hasError=!1,t.isCompleted=!1,t.isDisabled=!1,t.el.classList.remove("error","success"),this.disableButtons()},e.prototype.disableNavItemActions=function(t){t.isDisabled=!0,t.el.classList.add("disabled")},e.prototype.enableNavItemActions=function(t){t.isDisabled=!1,t.el.classList.remove("disabled")},e.prototype.buildButtons=function(){this.backBtn=this.el.querySelector("[data-hs-stepper-back-btn]"),this.nextBtn=this.el.querySelector("[data-hs-stepper-next-btn]"),this.skipBtn=this.el.querySelector("[data-hs-stepper-skip-btn]"),this.completeStepBtn=this.el.querySelector("[data-hs-stepper-complete-step-btn]"),this.finishBtn=this.el.querySelector("[data-hs-stepper-finish-btn]"),this.resetBtn=this.el.querySelector("[data-hs-stepper-reset-btn]"),this.buildBackButton(),this.buildNextButton(),this.buildSkipButton(),this.buildCompleteStepButton(),this.buildFinishButton(),this.buildResetButton()},e.prototype.buildBackButton=function(){var t=this;this.backBtn&&(this.checkForTheFirstStep(),this.backBtn.addEventListener("click",(function(){if(t.handleBackButtonClick(),"linear"===t.mode){var e=t.navItems.find((function(e){return e.index===t.currentIndex})),n=t.contentItems.find((function(e){return e.index===t.currentIndex}));if(!e||!n)return;e.isCompleted&&(e.isCompleted=!1,e.isSkip=!1,e.el.classList.remove("success","skipped")),n.isCompleted&&(n.isCompleted=!1,n.isSkip=!1,n.el.classList.remove("success","skipped")),"linear"===t.mode&&t.currentIndex!==t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display=""),t.completeStepBtn&&(t.completeStepBtn.style.display="")),t.showSkipButton(),t.showFinishButton(),t.showCompleteStepButton()}})))},e.prototype.handleBackButtonClick=function(){1!==this.currentIndex&&("linear"===this.mode&&this.removeOptionalClasses(),this.currentIndex--,"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.fireEvent("back",this.currentIndex),(0,l.dispatch)("back.hs.stepper",this.el,this.currentIndex))},e.prototype.checkForTheFirstStep=function(){1===this.currentIndex?this.setToDisabled(this.backBtn):this.setToNonDisabled(this.backBtn)},e.prototype.setToDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.setAttribute("disabled","disabled"),t.classList.add("disabled")},e.prototype.setToNonDisabled=function(t){"BUTTON"!==t.tagName&&"INPUT"!==t.tagName||t.removeAttribute("disabled"),t.classList.remove("disabled")},e.prototype.buildNextButton=function(){var t=this;this.nextBtn&&this.nextBtn.addEventListener("click",(function(){var e;if(t.fireEvent("beforeNext",t.currentIndex),(0,l.dispatch)("beforeNext.hs.stepper",t.el,t.currentIndex),null===(e=t.getNavItem(t.currentIndex))||void 0===e?void 0:e.isProcessed)return t.disableAll(),!1;t.goToNext()}))},e.prototype.unsetProcessedNavItemActions=function(t){t.isProcessed=!1,t.el.classList.remove("processed")},e.prototype.handleNextButtonClick=function(t){if(void 0===t&&(t=!0),t)this.currentIndex===this.totalSteps?this.currentIndex=1:this.currentIndex++;else{var e=this.getUncompletedSteps();if(1===e.length){var n=e[0].index;this.currentIndex=n}else{if(this.currentIndex===this.totalSteps)return;this.currentIndex++}}"linear"===this.mode&&this.removeOptionalClasses(),this.setCurrentNavItem(),this.setCurrentContentItem(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton(),this.showFinishButton(),this.showCompleteStepButton(),this.fireEvent("next",this.currentIndex),(0,l.dispatch)("next.hs.stepper",this.el,this.currentIndex)},e.prototype.removeOptionalClasses=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=this.contentItems.find((function(e){return e.index===t.currentIndex}));e.isSkip=!1,e.hasError=!1,e.isDisabled=!1,n.isSkip=!1,e.el.classList.remove("skipped","success","error"),n.el.classList.remove("skipped","success","error")},e.prototype.buildSkipButton=function(){var t=this;this.skipBtn&&(this.showSkipButton(),this.skipBtn.addEventListener("click",(function(){t.handleSkipButtonClick(),"linear"===t.mode&&t.currentIndex===t.totalSteps&&(t.nextBtn&&(t.nextBtn.style.display="none"),t.completeStepBtn&&(t.completeStepBtn.style.display="none"),t.finishBtn&&(t.finishBtn.style.display=""))})))},e.prototype.setSkipItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setSkipItemActions(n),this.setSkipItemActions(o))},e.prototype.setSkipItemActions=function(t){t.isSkip=!0,t.el.classList.add("skipped")},e.prototype.showSkipButton=function(){var t=this;if(this.skipBtn){var e=this.navItems.find((function(e){return e.index===t.currentIndex})).isOptional;this.skipBtn.style.display=e?"":"none"}},e.prototype.handleSkipButtonClick=function(){this.setSkipItem(),this.handleNextButtonClick(),this.fireEvent("skip",this.currentIndex),(0,l.dispatch)("skip.hs.stepper",this.el,this.currentIndex)},e.prototype.buildCompleteStepButton=function(){var t=this;this.completeStepBtn&&(this.completeStepBtnDefaultText=this.completeStepBtn.innerText,this.completeStepBtn.addEventListener("click",(function(){return t.handleCompleteStepButtonClick()})))},e.prototype.changeTextAndDisableCompleteButtonIfStepCompleted=function(){var t=this,e=this.navItems.find((function(e){return e.index===t.currentIndex})),n=JSON.parse(this.completeStepBtn.getAttribute("data-hs-stepper-complete-step-btn")).completedText;e&&(e.isCompleted?(this.completeStepBtn.innerText=n||this.completeStepBtnDefaultText,this.completeStepBtn.setAttribute("disabled","disabled"),this.completeStepBtn.classList.add("disabled")):(this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")))},e.prototype.setCompleteItem=function(t){var e=this,n=this.navItems.find((function(n){return n.index===(t||e.currentIndex)})),o=this.contentItems.find((function(n){return n.index===(t||e.currentIndex)}));n&&o&&(this.setCompleteItemActions(n),this.setCompleteItemActions(o))},e.prototype.setCompleteItemActions=function(t){t.isCompleted=!0,t.el.classList.add("success")},e.prototype.showCompleteStepButton=function(){this.completeStepBtn&&(1===this.getUncompletedSteps().length?this.completeStepBtn.style.display="none":this.completeStepBtn.style.display="")},e.prototype.handleCompleteStepButtonClick=function(){this.setCompleteItem(),this.fireEvent("complete",this.currentIndex),(0,l.dispatch)("complete.hs.stepper",this.el,this.currentIndex),this.handleNextButtonClick(!1),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.completeStepBtn&&this.changeTextAndDisableCompleteButtonIfStepCompleted(),this.showSkipButton()},e.prototype.buildFinishButton=function(){var t=this;this.finishBtn&&(this.isCompleted&&this.setCompleted(),this.finishBtn.addEventListener("click",(function(){return t.handleFinishButtonClick()})))},e.prototype.setCompleted=function(){this.el.classList.add("completed")},e.prototype.unsetCompleted=function(){this.el.classList.remove("completed")},e.prototype.showFinishButton=function(){this.finishBtn&&(1===this.getUncompletedSteps().length?this.finishBtn.style.display="":this.finishBtn.style.display="none")},e.prototype.handleFinishButtonClick=function(){var t=this,e=this.getUncompletedSteps(),n=this.getUncompletedSteps(!0),o=this.contentItems.find((function(t){return t.isFinal})).el;e.length&&e.forEach((function(e){var n=e.index;return t.setCompleteItem(n)})),this.currentIndex=this.totalSteps,this.setCurrentNavItem(),this.hideAllContentItems();var i=this.navItems.find((function(e){return e.index===t.currentIndex}));(i?i.el:null).classList.remove("active"),o.style.display="block",this.backBtn&&(this.backBtn.style.display="none"),this.nextBtn&&(this.nextBtn.style.display="none"),this.skipBtn&&(this.skipBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"),this.finishBtn&&(this.finishBtn.style.display="none"),this.resetBtn&&(this.resetBtn.style.display=""),n.length<=1&&(this.isCompleted=!0,this.setCompleted()),this.fireEvent("finish",this.currentIndex),(0,l.dispatch)("finish.hs.stepper",this.el,this.currentIndex)},e.prototype.buildResetButton=function(){var t=this;this.resetBtn&&this.resetBtn.addEventListener("click",(function(){return t.handleResetButtonClick()}))},e.prototype.handleResetButtonClick=function(){var t=this;this.backBtn&&(this.backBtn.style.display=""),this.nextBtn&&(this.nextBtn.style.display=""),this.completeStepBtn&&(this.completeStepBtn.style.display="",this.completeStepBtn.innerText=this.completeStepBtnDefaultText,this.completeStepBtn.removeAttribute("disabled"),this.completeStepBtn.classList.remove("disabled")),this.resetBtn&&(this.resetBtn.style.display="none"),this.navItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentNavItemActions(n),n.classList.remove("success","skipped")})),this.contentItems.forEach((function(e){var n=e.el;e.isSkip=!1,e.isCompleted=!1,t.unsetCurrentContentItemActions(n),n.classList.remove("success","skipped")})),this.currentIndex=1,this.setCurrentNavItem(),this.setCurrentContentItem(),this.showFinishButton(),this.showCompleteStepButton(),this.checkForTheFirstStep(),this.unsetCompleted(),this.isCompleted=!1,this.fireEvent("reset",this.currentIndex),(0,l.dispatch)("reset.hs.stepper",this.el,this.currentIndex)},e.prototype.setProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.setProcessedNavItemActions(e)},e.prototype.unsetProcessedNavItem=function(t){var e=this.getNavItem(t);e&&this.unsetProcessedNavItemActions(e)},e.prototype.goToNext=function(){"linear"===this.mode&&this.setCompleteItem(),this.handleNextButtonClick("linear"!==this.mode),"linear"===this.mode&&this.currentIndex===this.totalSteps&&(this.nextBtn&&(this.nextBtn.style.display="none"),this.completeStepBtn&&(this.completeStepBtn.style.display="none"))},e.prototype.disableButtons=function(){this.backBtn&&this.setToDisabled(this.backBtn),this.nextBtn&&this.setToDisabled(this.nextBtn)},e.prototype.enableButtons=function(){this.backBtn&&this.setToNonDisabled(this.backBtn),this.nextBtn&&this.setToNonDisabled(this.nextBtn)},e.prototype.setErrorNavItem=function(t){var e=this.getNavItem(t);e&&this.setErrorNavItemActions(e)},e.getInstance=function(t,e){var n=window.$hsStepperCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsStepperCollection||(window.$hsStepperCollection=[]),document.querySelectorAll("[data-hs-stepper]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsStepperCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSStepper=a),e.default=a},97:function(t,e,n){ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n?@[\\\\\\]^_`{|}~",o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){this.createCollection(window.$hsStrongPasswordCollection,this),this.availableChecks.length&&this.build()},e.prototype.build=function(){var t=this;this.buildStrips(),this.hints&&this.buildHints(),this.setStrength(this.target.value),this.target.addEventListener("input",(function(e){t.setStrength(e.target.value)}))},e.prototype.buildStrips=function(){if(this.el.innerHTML="",this.stripClasses)for(var t=0;t");(0,l.classToClassList)(this.stripClasses,e),this.el.append(e)}},e.prototype.buildHints=function(){var t=this;this.weakness=this.hints.querySelector("[data-hs-strong-password-hints-weakness-text]")||null,this.rules=Array.from(this.hints.querySelectorAll("[data-hs-strong-password-hints-rule-text]"))||null,this.rules.forEach((function(e){var n,o=e.getAttribute("data-hs-strong-password-hints-rule-text");(null===(n=t.checksExclude)||void 0===n?void 0:n.includes(o))&&e.remove()})),this.weakness&&this.buildWeakness(),this.rules&&this.buildRules(),"popover"===this.mode&&(this.target.addEventListener("focus",(function(){t.isOpened=!0,t.hints.classList.remove("hidden"),t.hints.classList.add("block"),t.recalculateDirection()})),this.target.addEventListener("blur",(function(){t.isOpened=!1,t.hints.classList.remove("block","bottom-full","top-full"),t.hints.classList.add("hidden"),t.hints.style.marginTop="",t.hints.style.marginBottom=""})))},e.prototype.buildWeakness=function(){var t=this;this.checkStrength(this.target.value),this.setWeaknessText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setWeaknessText()}))}))},e.prototype.buildRules=function(){var t=this;this.setRulesText(),this.target.addEventListener("input",(function(){return setTimeout((function(){return t.setRulesText()}))}))},e.prototype.setWeaknessText=function(){var t=this.weakness.getAttribute("data-hs-strong-password-hints-weakness-text"),e=JSON.parse(t);this.weakness.textContent=e[this.strength]},e.prototype.setRulesText=function(){var t=this;this.rules.forEach((function(e){var n=e.getAttribute("data-hs-strong-password-hints-rule-text");t.checkIfPassed(e,t.passedRules.has(n))}))},e.prototype.togglePopover=function(){var t=this.el.querySelector(".popover");t&&t.classList.toggle("show")},e.prototype.checkStrength=function(t){var e=new Set,n={lowercase:/[a-z]+/,uppercase:/[A-Z]+/,numbers:/[0-9]+/,"special-characters":new RegExp("[".concat(this.specialCharactersSet,"]"))},o=0;return this.availableChecks.includes("lowercase")&&t.match(n.lowercase)&&(o+=1,e.add("lowercase")),this.availableChecks.includes("uppercase")&&t.match(n.uppercase)&&(o+=1,e.add("uppercase")),this.availableChecks.includes("numbers")&&t.match(n.numbers)&&(o+=1,e.add("numbers")),this.availableChecks.includes("special-characters")&&t.match(n["special-characters"])&&(o+=1,e.add("special-characters")),this.availableChecks.includes("min-length")&&t.length>=this.minLength&&(o+=1,e.add("min-length")),t.length||(o=0),o===this.availableChecks.length?this.el.classList.add("accepted"):this.el.classList.remove("accepted"),this.strength=o,this.passedRules=e,{strength:this.strength,rules:this.passedRules}},e.prototype.checkIfPassed=function(t,e){void 0===e&&(e=!1);var n=t.querySelector("[data-check]"),o=t.querySelector("[data-uncheck]");e?(t.classList.add("active"),n.classList.remove("hidden"),o.classList.add("hidden")):(t.classList.remove("active"),n.classList.add("hidden"),o.classList.remove("hidden"))},e.prototype.setStrength=function(t){var e=this.checkStrength(t),n=e.strength,o={strength:n,rules:e.rules};this.hideStrips(n),this.fireEvent("change",o),(0,l.dispatch)("change.hs.strongPassword",this.el,o)},e.prototype.hideStrips=function(t){Array.from(this.el.children).forEach((function(e,n){n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(737)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},679:function(t,e,n){ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1&&!!o.el.closest("[data-hs-toggle-password-group]"),o.target&&o.init(),o}return i(e,t),e.prototype.init=function(){var t=this;this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.el.addEventListener(this.eventType,(function(){t.isShown?t.hide():t.show(),t.fireEvent("toggle",t.target),(0,l.dispatch)("toggle.hs.toggle-select",t.el,t.target)}))},e.prototype.getMultipleToggles=function(){var t=this.el.closest("[data-hs-toggle-password-group]").querySelectorAll("[data-hs-toggle-password]"),n=[];return t.forEach((function(t){n.push(e.getInstance(t))})),n},e.prototype.show=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!0)})),this.el.closest("[data-hs-toggle-password-group]").classList.add("active")):(this.isShown=!0,this.el.classList.add("active"));this.target.forEach((function(t){t.type="text"}))},e.prototype.hide=function(){this.isMultiple?(this.getMultipleToggles().forEach((function(t){return!!t&&(t.isShown=!1)})),this.el.closest("[data-hs-toggle-password-group]").classList.remove("active")):(this.isShown=!1,this.el.classList.remove("active"));this.target.forEach((function(t){t.type="password"}))},e.getInstance=function(t,e){var n=window.$hsTogglePasswordCollection.find((function(e){return e.element.el===("string"==typeof t?document.querySelector(t):t)}));return n?e?n:n.element:null},e.autoInit=function(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),document.querySelectorAll("[data-hs-toggle-password]:not(.--prevent-on-load-init)").forEach((function(t){window.$hsTogglePasswordCollection.find((function(e){var n;return(null===(n=null==e?void 0:e.element)||void 0===n?void 0:n.el)===t}))||new e(t)}))},e}(s(n(961)).default);window.addEventListener("load",(function(){a.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=a),e.default=a},969:function(t,e,n){ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ +var o,i=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{ /* * HSStaticMethods - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ -Object.defineProperty(e,"__esModule",{value:!0});var o=n(969),i=n(362),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},969:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0;e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var o=function(t){return!!t&&("none"===window.getComputedStyle(t).display||o(t.parentElement))};e.isParentOrElementHidden=o;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(700)})())); \ No newline at end of file +Object.defineProperty(e,"__esModule",{value:!0});var o=n(292),i=n(255),r={getClassProperty:o.getClassProperty,afterTransition:o.afterTransition,autoInit:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.fn;null==e||e.autoInit()})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.fn;t.includes(n)&&(null==o||o.autoInit())}))},cleanCollection:function(t){void 0===t&&(t="all"),"all"===t?i.COLLECTIONS.forEach((function(t){var e=t.collection;window[e]instanceof Array&&(window[e]=[])})):i.COLLECTIONS.forEach((function(e){var n=e.key,o=e.collection;t.includes(n)&&window[o]instanceof Array&&(window[o]=[])}))}};"undefined"!=typeof window&&(window.HSStaticMethods=r),e.default=r},292:function(t,e){var n=this;Object.defineProperty(e,"__esModule",{value:!0}),e.menuSearchHistory=e.classToClassList=e.htmlToElement=e.afterTransition=e.dispatch=e.debounce=e.isFormElement=e.isParentOrElementHidden=e.isEnoughSpace=e.isIpadOS=e.isIOS=e.getZIndex=e.getClassPropertyAlt=e.getClassProperty=e.stringToBoolean=void 0,e.getHighestZIndex=function(t){var e=Number.NEGATIVE_INFINITY;return t.forEach((function(t){var n=o(t);"auto"!==n&&(n=parseInt(n,10))>e&&(e=n)})),e};e.stringToBoolean=function(t){return"true"===t};e.getClassProperty=function(t,e,n){return void 0===n&&(n=""),(window.getComputedStyle(t).getPropertyValue(e)||n).replace(" ","")};e.getClassPropertyAlt=function(t,e,n){void 0===n&&(n="");var o="";return t.classList.forEach((function(t){t.includes(e)&&(o=t)})),o.match(/:(.*)]/)?o.match(/:(.*)]/)[1]:n};var o=function(t){return window.getComputedStyle(t).getPropertyValue("z-index")};e.getZIndex=o;e.isIOS=function(){return!!/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isIpadOS=function(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)};e.isEnoughSpace=function(t,e,n,o,i){void 0===n&&(n="auto"),void 0===o&&(o=10),void 0===i&&(i=null);var r=e.getBoundingClientRect(),s=i?i.getBoundingClientRect():null,l=window.innerHeight,a=s?r.top-s.top:r.top,c=(i?s.bottom:l)-r.bottom,u=t.clientHeight+o;return"bottom"===n?c>=u:"top"===n?a>=u:a>=u||c>=u};e.isFormElement=function(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement};var i=function(t){return!!t&&("none"===window.getComputedStyle(t).display||i(t.parentElement))};e.isParentOrElementHidden=i;e.debounce=function(t,e){var o;return void 0===e&&(e=200),function(){for(var i=[],r=0;rthis.historyIndex},clearHistory:function(){this.historyIndex=-1}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}return n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(158)})())); \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 6c73d7e..1fa00f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,10 @@ +declare var _: any; +declare var DataTable: any; +declare var Dropzone: any; + +let HSDataTableModule; +let HSFileUploadModule; + export { default as HSCopyMarkup } from './plugins/copy-markup'; export { default as HSAccordion } from './plugins/accordion'; export { default as HSCarousel } from './plugins/carousel'; @@ -8,7 +15,6 @@ export { default as HSInputNumber } from './plugins/input-number'; export { default as HSOverlay } from './plugins/overlay'; export { default as HSPinInput } from './plugins/pin-input'; export { default as HSRemoveElement } from './plugins/remove-element'; -export { default as HSSearchByJson } from './plugins/search-by-json'; export { default as HSScrollspy } from './plugins/scrollspy'; export { default as HSSelect } from './plugins/select'; export { default as HSStepper } from './plugins/stepper'; @@ -19,3 +25,13 @@ export { default as HSToggleCount } from './plugins/toggle-count'; export { default as HSTogglePassword } from './plugins/toggle-password'; export { default as HSTooltip } from './plugins/tooltip'; export { default as HSStaticMethods } from './static'; + +if (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined') + HSDataTableModule = require('./plugins/datatable').default; +else HSDataTableModule = null; +export { HSDataTableModule as HSDataTable }; + +if (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined') + HSFileUploadModule = require('./plugins/file-upload').default; +else HSFileUploadModule = null; +export { HSFileUploadModule as HSFileUpload }; \ No newline at end of file diff --git a/src/plugins/accordion/index.ts b/src/plugins/accordion/index.ts index 3054a39..ea63c49 100644 --- a/src/plugins/accordion/index.ts +++ b/src/plugins/accordion/index.ts @@ -1,9 +1,9 @@ /* * HSAccordion - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch, afterTransition } from '../../utils'; @@ -75,6 +75,7 @@ class HSAccordion if (this.el.classList.contains('active')) return false; this.el.classList.add('active'); + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true'; this.content.style.display = 'block'; this.content.style.height = '0'; @@ -95,6 +96,7 @@ class HSAccordion if (!this.el.classList.contains('active')) return false; this.el.classList.remove('active'); + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false'; this.content.style.height = `${this.content.scrollHeight}px`; setTimeout(() => { diff --git a/src/plugins/base-plugin/index.ts b/src/plugins/base-plugin/index.ts index 2866d0b..fc18dcb 100644 --- a/src/plugins/base-plugin/index.ts +++ b/src/plugins/base-plugin/index.ts @@ -1,9 +1,9 @@ /* * HSBasePlugin - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { IBasePlugin } from './interfaces'; diff --git a/src/plugins/carousel/index.ts b/src/plugins/carousel/index.ts index 97354c2..6becd64 100644 --- a/src/plugins/carousel/index.ts +++ b/src/plugins/carousel/index.ts @@ -1,9 +1,9 @@ /* * HSCarousel - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { ICarousel, ICarouselOptions } from './interfaces'; @@ -62,13 +62,13 @@ class HSCarousel extends HSBasePlugin implements ICarousel { typeof concatOptions.isAutoPlay !== 'undefined' ? concatOptions.isAutoPlay : false; - this.isRTL = - typeof concatOptions.isRTL !== 'undefined' ? concatOptions.isRTL : false; this.speed = concatOptions.speed || 4000; this.isInfiniteLoop = typeof concatOptions.isInfiniteLoop !== 'undefined' ? concatOptions.isInfiniteLoop : true; + this.isRTL = + typeof concatOptions.isRTL !== 'undefined' ? concatOptions.isRTL : false; this.inner = this.el.querySelector('.hs-carousel-body') || null; this.slides = this.el.querySelectorAll('.hs-carousel-slide') || []; this.prev = this.el.querySelector('.hs-carousel-prev') || null; @@ -243,6 +243,7 @@ class HSCarousel extends HSBasePlugin implements ICarousel { ? `translate(${value}px, 0px)` : `translate(-${value}px, 0px)`; } + public goToPrev() { if (this.currentIndex === 0 && this.isInfiniteLoop) { this.currentIndex = this.slides.length - 1; diff --git a/src/plugins/collapse/index.ts b/src/plugins/collapse/index.ts index c329fd2..479f152 100644 --- a/src/plugins/collapse/index.ts +++ b/src/plugins/collapse/index.ts @@ -1,9 +1,9 @@ /* * HSCollapse - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch, afterTransition } from '../../utils'; @@ -31,6 +31,11 @@ class HSCollapse extends HSBasePlugin<{}> implements ICollapse { private init() { this.createCollection(window.$hsCollapseCollection, this); + if (this?.el?.ariaExpanded) { + if (this.el.classList.contains('open')) this.el.ariaExpanded = 'true'; + else this.el.ariaExpanded = 'false'; + } + this.el.addEventListener('click', () => { if (this.content.classList.contains('open')) { this.hide(); @@ -57,6 +62,7 @@ class HSCollapse extends HSBasePlugin<{}> implements ICollapse { this.animationInProcess = true; this.el.classList.add('open'); + if (this?.el?.ariaExpanded) this.el.ariaExpanded = 'true'; this.content.classList.add('open'); this.content.classList.remove('hidden'); @@ -85,6 +91,7 @@ class HSCollapse extends HSBasePlugin<{}> implements ICollapse { this.animationInProcess = true; this.el.classList.remove('open'); + if (this?.el?.ariaExpanded) this.el.ariaExpanded = 'false'; this.content.style.height = `${this.content.scrollHeight}px`; setTimeout(() => { diff --git a/src/plugins/combobox/index.ts b/src/plugins/combobox/index.ts index 33b1cdc..4b6aa12 100644 --- a/src/plugins/combobox/index.ts +++ b/src/plugins/combobox/index.ts @@ -1,9 +1,9 @@ /* * HSComboBox - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { @@ -91,7 +91,7 @@ class HSComboBox extends HSBasePlugin implements IComboBox {
@@ -157,7 +157,8 @@ class HSComboBox extends HSBasePlugin implements IComboBox { if (this.groupingType) this.setGroups(); this.buildItems(); if (this.preventVisibility) { - this.isOpened = true; + // TODO:: test the plugin while the line below is commented. + // this.isOpened = true; if (!this.preventAutoPosition) this.recalculateDirection(); } @@ -167,7 +168,10 @@ class HSComboBox extends HSBasePlugin implements IComboBox { } private setResultAndRender(value = '') { - this.setResults(value); + // TODO:: test the plugin with below code added. + let _value = this.preventVisibility ? this.input.value : value; + + this.setResults(_value); if (this.apiSearchQuery) this.itemsFromJson(); } @@ -186,12 +190,18 @@ class HSComboBox extends HSBasePlugin implements IComboBox { 'input', debounce((evt: InputEvent) => { this.setResultAndRender((evt.target as HTMLInputElement).value); + if (this.input.value !== '') this.el.classList.add('has-value'); + else this.el.classList.remove('has-value'); if (!this.isOpened) this.open(); }), ); } private buildItems() { + this.output.role = 'listbox'; + this.output.tabIndex = -1; + this.output.ariaOrientation = 'vertical'; + if (this.apiUrl) this.itemsFromJson(); else { if (this.itemsWrapper) this.itemsWrapper.innerHTML = ''; @@ -210,13 +220,29 @@ class HSComboBox extends HSBasePlugin implements IComboBox { } private isItemExists(obj: never): boolean { - return this.items.some((el: HTMLElement) => - Array.from(el.querySelectorAll('[data-hs-combo-box-search-text]')).some( - (elI: HTMLElement) => - elI.getAttribute('data-hs-combo-box-search-text') === - obj[elI.getAttribute('data-hs-combo-box-output-item-field')], - ), - ); + return this.items.some((el: HTMLElement) => { + const groupField = + el.getAttribute('data-hs-combo-box-output-item-group-field') ?? null; + const params = + JSON.parse(el.getAttribute('data-hs-combo-box-output-item')) ?? null; + let group = null; + + if (groupField && params?.group?.name) group = obj[groupField]; + + return Array.from( + el.querySelectorAll('[data-hs-combo-box-search-text]'), + ).some((elI: HTMLElement) => { + const equality = + params?.group?.name && group + ? group === params.group.name && + elI.getAttribute('data-hs-combo-box-search-text') === + obj[elI.getAttribute('data-hs-combo-box-output-item-field')] + : elI.getAttribute('data-hs-combo-box-search-text') === + obj[elI.getAttribute('data-hs-combo-box-output-item-field')]; + + return equality; + }); + }); } private isTextExists(el: HTMLElement, val: string[]): boolean { @@ -347,14 +373,25 @@ class HSComboBox extends HSBasePlugin implements IComboBox { private jsonItemsRender(items: any) { items.forEach((item: never, index: number) => { - if (this.isItemExists(item)) return false; + // TODO:: test without checking below + // if (this.isItemExists(item)) return false; const newItem = htmlToElement(this.outputItemTemplate); + newItem + .querySelectorAll('[data-hs-combo-box-output-item-field]') + .forEach((el) => { + const value = + item[el.getAttribute('data-hs-combo-box-output-item-field')]; + const hideIfEmpty = el.hasAttribute( + 'data-hs-combo-box-output-item-hide-if-empty', + ); + + el.textContent = value ?? ''; + if (!value && hideIfEmpty) (el as HTMLElement).style.display = 'none'; + }); newItem .querySelectorAll('[data-hs-combo-box-search-text]') .forEach((el) => { - el.textContent = - item[el.getAttribute('data-hs-combo-box-output-item-field')] ?? ''; el.setAttribute( 'data-hs-combo-box-search-text', item[el.getAttribute('data-hs-combo-box-output-item-field')] ?? '', @@ -574,6 +611,14 @@ class HSComboBox extends HSBasePlugin implements IComboBox { } private buildToggle() { + if (this.isOpened) { + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true'; + if (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true'; + } else { + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false'; + if (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false'; + } + this.toggle.addEventListener('click', () => { if (this.isOpened) this.close(); else this.open(this.toggle.getAttribute('data-hs-combo-box-toggle')); @@ -712,6 +757,8 @@ class HSComboBox extends HSBasePlugin implements IComboBox { if (!this.preventAutoPosition) this.recalculateDirection(); setTimeout(() => { + if (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true'; + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true'; this.el.classList.add('active'); this.animationInProcess = false; @@ -733,11 +780,16 @@ class HSComboBox extends HSBasePlugin implements IComboBox { if (this.preventVisibility) { this.setValueAndClear(val); + if (this.input.value !== '') this.el.classList.add('has-value'); + else this.el.classList.remove('has-value'); + return false; } this.animationInProcess = true; + if (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false'; + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false'; this.el.classList.remove('active'); if (!this.preventAutoPosition) { this.output.classList.remove('bottom-full', 'top-full'); @@ -753,6 +805,9 @@ class HSComboBox extends HSBasePlugin implements IComboBox { this.animationInProcess = false; }); + if (this.input.value !== '') this.el.classList.add('has-value'); + else this.el.classList.remove('has-value'); + this.isOpened = false; } @@ -889,8 +944,8 @@ class HSComboBox extends HSBasePlugin implements IComboBox { } static accessibility(evt: KeyboardEvent) { - const target = window.$hsComboBoxCollection.find( - (el) => el.element.isOpened, + const target = window.$hsComboBoxCollection.find((el) => + el.element.preventVisibility ? el.element.isCurrent : el.element.isOpened, ); if ( @@ -905,18 +960,22 @@ class HSComboBox extends HSBasePlugin implements IComboBox { break; case 'ArrowUp': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(); break; case 'ArrowDown': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(false); break; case 'Home': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(); break; case 'End': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(false); break; case 'Enter': diff --git a/src/plugins/copy-markup/index.ts b/src/plugins/copy-markup/index.ts index 7379199..f62dbd4 100644 --- a/src/plugins/copy-markup/index.ts +++ b/src/plugins/copy-markup/index.ts @@ -1,9 +1,9 @@ /* * HSCopyMarkup - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch } from '../../utils'; diff --git a/src/plugins/datatable/index.ts b/src/plugins/datatable/index.ts new file mode 100644 index 0000000..8f703d5 --- /dev/null +++ b/src/plugins/datatable/index.ts @@ -0,0 +1,464 @@ +/* + * HSDataTable + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ + +import { Api } from 'datatables.net'; + +import { debounce, htmlToElement, classToClassList } from '../../utils'; + +import { IDataTableOptions, IDataTable } from './interfaces'; + +import HSBasePlugin from '../base-plugin'; +import { ICollectionItem } from '../../interfaces'; + +declare var DataTable: any; + +interface IColumnDef { + targets: number; + orderable: boolean; +} + +class HSDataTable + extends HSBasePlugin + implements IDataTable +{ + private concatOptions: IDataTableOptions; + + private dataTable: Api; + + private readonly table: HTMLTableElement; + + private readonly search: HTMLElement | null; + + private readonly pageEntities: HTMLSelectElement | HTMLInputElement | null; + + private readonly paging: HTMLElement | null; + private readonly pagingPrev: HTMLElement | null; + private readonly pagingNext: HTMLElement | null; + private readonly pagingPages: HTMLElement | null; + + private readonly info: HTMLElement | null; + private readonly infoFrom: HTMLElement | null; + private readonly infoTo: HTMLElement | null; + private readonly infoLength: HTMLElement | null; + + private rowSelectingAll: HTMLElement | null; + private rowSelectingIndividual: string | null; + + private maxPagesToShow: number; + private isRowSelecting: boolean; + private readonly pageBtnClasses: string | null; + + constructor(el: HTMLElement, options?: IDataTableOptions, events?: {}) { + super(el, options, events); + + this.el = typeof el === 'string' ? document.querySelector(el) : el; + + // Exclude columns from ordering + const columnDefs: IColumnDef[] = []; + Array.from(this.el.querySelectorAll('thead th, thead td')).forEach( + (th: HTMLElement, ind: number) => { + if (th.classList.contains('--exclude-from-ordering')) + columnDefs.push({ + targets: ind, + orderable: false, + }); + }, + ); + + const data = this.el.getAttribute('data-hs-datatable'); + const dataOptions: IDataTableOptions = data ? JSON.parse(data) : {}; + + this.concatOptions = { + searching: true, + lengthChange: false, + order: [], + columnDefs: [...columnDefs], + ...dataOptions, + ...options, + }; + + this.table = this.el.querySelector('table'); + + this.search = this.el.querySelector('[data-hs-datatable-search]') ?? null; + + this.pageEntities = + this.el.querySelector('[data-hs-datatable-page-entities]') ?? null; + + this.paging = this.el.querySelector('[data-hs-datatable-paging]') ?? null; + this.pagingPrev = + this.el.querySelector('[data-hs-datatable-paging-prev]') ?? null; + this.pagingNext = + this.el.querySelector('[data-hs-datatable-paging-next]') ?? null; + this.pagingPages = + this.el.querySelector('[data-hs-datatable-paging-pages]') ?? null; + + this.info = this.el.querySelector('[data-hs-datatable-info]') ?? null; + this.infoFrom = + this.el.querySelector('[data-hs-datatable-info-from]') ?? null; + this.infoTo = this.el.querySelector('[data-hs-datatable-info-to]') ?? null; + this.infoLength = + this.el.querySelector('[data-hs-datatable-info-length]') ?? null; + + if (this.concatOptions?.rowSelectingOptions) + this.rowSelectingAll = + (this.concatOptions?.rowSelectingOptions?.selectAllSelector + ? document.querySelector( + this.concatOptions?.rowSelectingOptions?.selectAllSelector, + ) + : document.querySelector('[data-hs-datatable-row-selecting-all]')) ?? + null; + if (this.concatOptions?.rowSelectingOptions) + this.rowSelectingIndividual = + this.concatOptions?.rowSelectingOptions?.individualSelector ?? + '[data-hs-datatable-row-selecting-individual]' ?? + null; + + if (this.pageEntities) + this.concatOptions.pageLength = parseInt(this.pageEntities.value); + + this.maxPagesToShow = 3; + this.isRowSelecting = !!this.concatOptions?.rowSelectingOptions; + this.pageBtnClasses = + this.concatOptions?.pagingOptions?.pageBtnClasses ?? null; + + this.init(); + } + + private init() { + this.createCollection(window.$hsDataTableCollection, this); + + this.initTable(); + + if (this.search) this.initSearch(); + + if (this.pageEntities) this.initPageEntities(); + + if (this.paging) this.initPaging(); + if (this.pagingPrev) this.initPagingPrev(); + if (this.pagingNext) this.initPagingNext(); + if (this.pagingPages) this.buildPagingPages(); + + if (this.info) this.initInfo(); + + if (this.isRowSelecting) this.initRowSelecting(); + } + + private initTable() { + this.dataTable = new DataTable(this.table, this.concatOptions); + + if (this.isRowSelecting) this.triggerChangeEventToRow(); + + this.dataTable.on('draw', () => { + if (this.isRowSelecting) this.updateSelectAllCheckbox(); + if (this.isRowSelecting) this.triggerChangeEventToRow(); + this.updateInfo(); + this.updatePaging(); + }); + } + + // Search + private initSearch() { + this.search.addEventListener( + 'input', + debounce((evt: InputEvent) => + this.onSearchInput((evt.target as HTMLInputElement).value), + ), + ); + } + + private onSearchInput(val: string) { + this.dataTable.search(val).draw(); + } + + // Page entities + private initPageEntities() { + this.pageEntities.addEventListener('change', (evt: Event) => + this.onEntitiesChange(parseInt((evt.target as HTMLSelectElement).value)), + ); + } + + private onEntitiesChange(entities: number) { + this.dataTable.page.len(entities).draw(); + } + + // Info + private initInfo() { + if (this.infoFrom) this.initInfoFrom(); + if (this.infoTo) this.initInfoTo(); + if (this.infoLength) this.initInfoLength(); + } + + private initInfoFrom() { + const { start } = this.dataTable.page.info(); + + this.infoFrom.innerText = `${start + 1}`; + } + + private initInfoTo() { + const { end } = this.dataTable.page.info(); + + this.infoTo.innerText = `${end}`; + } + + private initInfoLength() { + const { recordsTotal } = this.dataTable.page.info(); + + this.infoLength.innerText = `${recordsTotal}`; + } + + private updateInfo() { + this.initInfo(); + } + + // Paging + private initPaging() { + this.hidePagingIfSinglePage(); + } + + private hidePagingIfSinglePage() { + const { pages } = this.dataTable.page.info(); + + if (pages < 2) { + this.paging.classList.add('hidden'); + this.paging.style.display = 'none'; + } else { + this.paging.classList.remove('hidden'); + this.paging.style.display = ''; + } + } + + private initPagingPrev() { + this.pagingPrev.addEventListener('click', () => { + this.onPrevClick(); + }); + } + + private onPrevClick() { + this.dataTable.page('previous').draw('page'); + } + + private disablePagingArrow(el: HTMLElement, statement: boolean) { + if (statement) { + el.classList.add('disabled'); + el.setAttribute('disabled', 'disabled'); + } else { + el.classList.remove('disabled'); + el.removeAttribute('disabled'); + } + } + + private initPagingNext() { + this.pagingNext.addEventListener('click', () => { + this.onNextClick(); + }); + } + + private onNextClick() { + this.dataTable.page('next').draw('page'); + } + + private buildPagingPages() { + this.updatePaging(); + } + + private updatePaging() { + const { page, pages, length } = this.dataTable.page.info(); + const totalRecords = this.dataTable.rows({ search: 'applied' }).count(); + const totalPages = Math.ceil(totalRecords / length); + const currentPage = page + 1; + + let startPage = Math.max( + 1, + currentPage - Math.floor(this.maxPagesToShow / 2), + ); + let endPage = Math.min(totalPages, startPage + (this.maxPagesToShow - 1)); + + if (endPage - startPage + 1 < this.maxPagesToShow) { + startPage = Math.max(1, endPage - this.maxPagesToShow + 1); + } + + this.pagingPages.innerHTML = ''; + + if (startPage > 1) { + this.buildPagingPage(1); + + if (startPage > 2) { + this.pagingPages.appendChild( + htmlToElement(`...`), + ); + } + } + + for (let i = startPage; i <= endPage; i++) { + this.buildPagingPage(i); + } + + if (endPage < totalPages) { + if (endPage < totalPages - 1) { + this.pagingPages.appendChild( + htmlToElement(`...`), + ); + } + + this.buildPagingPage(totalPages); + } + + this.disablePagingArrow(this.pagingPrev, page === 0); + this.disablePagingArrow(this.pagingNext, page === pages - 1); + this.hidePagingIfSinglePage(); + } + + private buildPagingPage(counter: number) { + const { page } = this.dataTable.page.info(); + const pageEl = htmlToElement(``); + pageEl.innerText = `${counter}`; + pageEl.setAttribute('data-page', `${counter}`); + if (this.pageBtnClasses) classToClassList(this.pageBtnClasses, pageEl); + if (page === counter - 1) pageEl.classList.add('active'); + + pageEl.addEventListener('click', () => this.onPageClick(counter)); + + this.pagingPages.append(pageEl); + } + + private onPageClick(counter: number) { + this.dataTable.page(counter - 1).draw('page'); + } + + // Select row + private initRowSelecting() { + this.rowSelectingAll.addEventListener('change', () => + this.onSelectAllChange(), + ); + } + + private triggerChangeEventToRow() { + this.table + .querySelectorAll(`tbody ${this.rowSelectingIndividual}`) + .forEach((el) => { + el.addEventListener('change', () => { + this.updateSelectAllCheckbox(); + }); + }); + } + + private onSelectAllChange() { + let isChecked = (this.rowSelectingAll as HTMLInputElement).checked; + const visibleRows = Array.from( + this.dataTable.rows({ page: 'current', search: 'applied' }).nodes(), + ); + + visibleRows.forEach((el) => { + const checkbox = el.querySelector(this.rowSelectingIndividual); + + if (checkbox) checkbox.checked = isChecked; + }); + + this.updateSelectAllCheckbox(); + } + + private updateSelectAllCheckbox() { + const searchRelatedItems = this.dataTable + .rows({ search: 'applied' }) + .count(); + + if (!searchRelatedItems) { + (this.rowSelectingAll as HTMLInputElement).checked = false; + + return false; + } + + let isChecked = true; + const visibleRows = Array.from( + this.dataTable + .rows({ + page: 'current', + search: 'applied', + }) + .nodes(), + ); + + visibleRows.forEach((el) => { + const checkbox = el.querySelector(this.rowSelectingIndividual); + + if (checkbox && !checkbox.checked) { + isChecked = false; + + return false; + } + }); + + (this.rowSelectingAll as HTMLInputElement).checked = isChecked; + } + + // Static methods + static getInstance(target: HTMLElement | string, isInstance?: boolean) { + const elInCollection = window.$hsDataTableCollection.find( + (el) => + el.element.el === + (typeof target === 'string' ? document.querySelector(target) : target), + ); + + return elInCollection + ? isInstance + ? elInCollection + : elInCollection.element.el + : null; + } + + static autoInit() { + if (!window.$hsDataTableCollection) window.$hsDataTableCollection = []; + + document + .querySelectorAll('[data-hs-datatable]:not(.--prevent-on-load-init)') + .forEach((el: HTMLElement) => { + if ( + !window.$hsDataTableCollection.find( + (elC) => (elC?.element?.el as HTMLElement) === el, + ) + ) + new HSDataTable(el); + }); + } +} + +declare global { + interface Window { + HSDataTable: Function; + $hsDataTableCollection: ICollectionItem[]; + } +} + +window.addEventListener('load', () => { + if ( + document.querySelectorAll( + '[data-hs-datatable]:not(.--prevent-on-load-init)', + ).length + ) { + if (typeof jQuery === 'undefined') + console.error( + 'HSDataTable: jQuery is not available, please add it to the page.', + ); + if (typeof DataTable === 'undefined') + console.error( + 'HSDataTable: DataTable is not available, please add it to the page.', + ); + } + + if (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined') + HSDataTable.autoInit(); + + // Uncomment for debug + // console.log('Datatable collection:', window.$hsDataTableCollection); +}); + +if (typeof window !== 'undefined') { + window.HSDataTable = HSDataTable; +} + +export default HSDataTable; diff --git a/src/plugins/datatable/interfaces.ts b/src/plugins/datatable/interfaces.ts new file mode 100644 index 0000000..e368af6 --- /dev/null +++ b/src/plugins/datatable/interfaces.ts @@ -0,0 +1,18 @@ +import { Config } from 'datatables.net-dt'; + +interface IDataTablePagingOptions { + pageBtnClasses?: string; +} + +interface IDataTableRowSelectingOptions { + selectAllSelector?: string; + individualSelector?: string; +} +export interface IDataTableOptions extends Config { + rowSelectingOptions?: IDataTableRowSelectingOptions; + pagingOptions?: IDataTablePagingOptions; +} + +export interface IDataTable { + options?: IDataTableOptions; +} \ No newline at end of file diff --git a/src/plugins/datatable/types.ts b/src/plugins/datatable/types.ts new file mode 100644 index 0000000..37ba73a --- /dev/null +++ b/src/plugins/datatable/types.ts @@ -0,0 +1 @@ +// no types diff --git a/src/plugins/dropdown/index.ts b/src/plugins/dropdown/index.ts index 26d2010..b911b82 100644 --- a/src/plugins/dropdown/index.ts +++ b/src/plugins/dropdown/index.ts @@ -1,9 +1,9 @@ /* * HSDropdown - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { @@ -34,7 +34,7 @@ class HSDropdown private readonly closers: HTMLElement[] | null; public menu: HTMLElement | null; private eventMode: string; - private readonly closeMode: string; + private closeMode: string; private animationInProcess: boolean; constructor(el: IHTMLElementPopper, options?: {}, events?: {}) { @@ -60,8 +60,9 @@ class HSDropdown this.createCollection(window.$hsDropdownCollection, this); if ((this.toggle as HTMLButtonElement).disabled) return false; - this.toggle.addEventListener('click', (evt) => this.onClickHandler(evt)); + if (this.toggle) this.buildToggle(); + if (this.menu) this.buildMenu(); if (this.closers) this.buildClosers(); if (!isIOS() && !isIpadOS()) { @@ -72,6 +73,20 @@ class HSDropdown resizeHandler() { this.eventMode = getClassProperty(this.el, '--trigger', 'click'); + this.closeMode = getClassProperty(this.el, '--auto-close', 'true'); + } + + private buildToggle() { + if (this?.toggle?.ariaExpanded) { + if (this.el.classList.contains('open')) this.toggle.ariaExpanded = 'true'; + else this.toggle.ariaExpanded = 'false'; + } + + this.toggle.addEventListener('click', (evt) => this.onClickHandler(evt)); + } + + private buildMenu() { + this.menu.role = 'menu'; } private buildClosers() { @@ -151,12 +166,6 @@ class HSDropdown data.state.elements.popper.style.margin = 0; }, }, - { - name: 'computeStyles', - options: { - adaptive: false, - }, - }, ]; } @@ -182,6 +191,10 @@ class HSDropdown window.getComputedStyle(this.el).getPropertyValue('--offset') || '10' ).replace(' ', ''), ); + const gpuAcceleration = ( + window.getComputedStyle(this.el).getPropertyValue('--gpu-acceleration') || + 'true' + ).replace(' ', ''); if (strategy !== ('static' as PositioningStrategy)) { this.el._popper = createPopper(this.el, this.menu, { @@ -199,6 +212,13 @@ class HSDropdown offset: [0, offset], }, }, + { + name: 'computeStyles', + options: { + adaptive: strategy !== 'fixed' ? false : true, + gpuAcceleration: gpuAcceleration === 'true' ? true : false, + }, + }, ], }); } @@ -209,6 +229,7 @@ class HSDropdown this.menu.classList.add('block'); setTimeout(() => { + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true'; this.el.classList.add('open'); this.animationInProcess = false; @@ -222,6 +243,16 @@ class HSDropdown if (this.animationInProcess || !this.el.classList.contains('open')) return false; + const clearAfterClose = () => { + this.menu.style.margin = null; + + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false'; + this.el.classList.remove('open'); + + this.fireEvent('close', this.el); + dispatch('close.hs.dropdown', this.el, this.el); + }; + this.animationInProcess = true; if (isAnimated) { @@ -231,12 +262,7 @@ class HSDropdown afterTransition(el, () => this.destroyPopper()); } else this.destroyPopper(); - this.menu.style.margin = null; - - this.el.classList.remove('open'); - - this.fireEvent('close', this.el); - dispatch('close.hs.dropdown', this.el, this.el); + clearAfterClose(); } public forceClearState() { @@ -328,9 +354,10 @@ class HSDropdown static accessibility(evt: KeyboardEvent) { this.history = menuSearchHistory; - const target: ICollectionItem | null = window.$hsDropdownCollection.find((el) => - el.element.el.classList.contains('open'), - ); + const target: ICollectionItem | null = + window.$hsDropdownCollection.find((el) => + el.element.el.classList.contains('open'), + ); if ( target && @@ -358,18 +385,22 @@ class HSDropdown break; case 'ArrowUp': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(); break; case 'ArrowDown': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(false); break; case 'Home': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(); break; case 'End': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(false); break; default: diff --git a/src/plugins/file-upload/index.ts b/src/plugins/file-upload/index.ts new file mode 100644 index 0000000..9ccee9a --- /dev/null +++ b/src/plugins/file-upload/index.ts @@ -0,0 +1,387 @@ +/* + * HSFileUpload + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. + */ + +import { DropzoneFile } from 'dropzone'; + +import { htmlToElement, classToClassList } from '../../utils'; + +import { IFileUploadOptions, IFileUpload } from './interfaces'; + +import HSBasePlugin from '../base-plugin'; +import { ICollectionItem } from '../../interfaces'; + +declare var _: any; +declare var Dropzone: any; + +if (typeof Dropzone !== 'undefined') Dropzone.autoDiscover = false; + +class HSFileUpload + extends HSBasePlugin + implements IFileUpload +{ + private concatOptions: IFileUploadOptions; + private previewTemplate: string; + private extensions: any = {}; + private singleton: boolean; + + private dropzone: Dropzone | null; + + constructor(el: HTMLElement, options?: IFileUploadOptions, events?: {}) { + super(el, options, events); + + this.el = typeof el === 'string' ? document.querySelector(el) : el; + + const data = this.el.getAttribute('data-hs-file-upload'); + const dataOptions: IFileUploadOptions = data ? JSON.parse(data) : {}; + + this.previewTemplate = + this.el.querySelector('[data-hs-file-upload-preview]')?.innerHTML || + `
+
+
+ +
+

+ . +

+

+
+
+
+ +
+
+
+
+
+
+
+ + 0% + +
+
+
`; + this.extensions = _.merge( + { + default: { + icon: '', + class: 'size-5', + }, + xls: { + icon: '', + class: 'size-5', + }, + doc: { + icon: '', + class: 'size-5', + }, + zip: { + icon: '', + class: 'size-5', + }, + }, + dataOptions.extensions, + ); + this.singleton = dataOptions.singleton; + + this.concatOptions = { + clickable: this.el.querySelector( + '[data-hs-file-upload-trigger]', + ) as HTMLElement, + previewsContainer: this.el.querySelector( + '[data-hs-file-upload-previews]', + ) as HTMLElement, + addRemoveLinks: false, + previewTemplate: this.previewTemplate, + autoHideTrigger: false, + ...dataOptions, + ...options, + }; + + this.init(); + } + + private init() { + this.createCollection(window.$hsFileUploadCollection, this); + + this.initDropzone(); + } + + private initDropzone() { + const clear = this.el.querySelector( + '[data-hs-file-upload-clear]', + ) as HTMLButtonElement; + const pseudoTriggers = Array.from( + this.el.querySelectorAll('[data-hs-file-upload-pseudo-trigger]'), + ) as HTMLButtonElement[]; + this.dropzone = new Dropzone(this.el, this.concatOptions); + + this.dropzone.on('addedfile', (file: DropzoneFile) => this.onAddFile(file)); + this.dropzone.on('removedfile', () => this.onRemoveFile()); + this.dropzone.on('uploadprogress', (file: DropzoneFile, progress: number) => + this.onUploadProgress(file, progress), + ); + this.dropzone.on('complete', (file: DropzoneFile) => this.onComplete(file)); + + if (clear) + clear.onclick = () => { + if (this.dropzone.files.length) this.dropzone.removeAllFiles(true); + }; + + if (pseudoTriggers.length) + pseudoTriggers.forEach((el) => { + el.onclick = () => { + if (this.concatOptions?.clickable) + (this.concatOptions?.clickable as HTMLButtonElement).click(); + }; + }); + } + + private onAddFile(file: DropzoneFile) { + const { previewElement } = file; + const reloadButton = file.previewElement.querySelector( + '[data-hs-file-upload-reload]', + ); + + if (!previewElement) return false; + + if (this.singleton && this.dropzone.files.length > 1) + this.dropzone.removeFile(this.dropzone.files[0]); + + if (reloadButton) { + reloadButton.addEventListener('click', (evt: MouseEvent) => { + evt.preventDefault(); + evt.stopPropagation(); + + const tempFileInput = document.createElement('input'); + tempFileInput.type = 'file'; + + tempFileInput.click(); + + tempFileInput.addEventListener('change', (event: Event) => { + const input = event.target as HTMLInputElement; + const newFile = input.files?.[0]; + + if (newFile) { + const dzNewFile = newFile as Dropzone.DropzoneFile; + dzNewFile.status = Dropzone.ADDED; + dzNewFile.accepted = true; + dzNewFile.previewElement = file.previewElement; + dzNewFile.previewTemplate = file.previewTemplate; + dzNewFile.previewsContainer = file.previewsContainer; + + this.dropzone.removeFile(file); + this.dropzone.addFile(dzNewFile); + } + }); + }); + } + + this.previewAccepted(file); + } + + private previewAccepted(file: DropzoneFile) { + const { previewElement } = file; + const fileInfo = this.splitFileName(file.name); + + const fileName = previewElement.querySelector( + '[data-hs-file-upload-file-name]', + ); + const fileExt = previewElement.querySelector( + '[data-hs-file-upload-file-ext]', + ); + const fileSize = previewElement.querySelector( + '[data-hs-file-upload-file-size]', + ); + const fileIcon = previewElement.querySelector( + '[data-hs-file-upload-file-icon]', + ) as HTMLElement; + const trigger = this.el.querySelector( + '[data-hs-file-upload-trigger]', + ) as HTMLElement; + const preview = previewElement.querySelector( + '[data-dz-thumbnail]', + ) as HTMLElement; + const remove = previewElement.querySelector( + '[data-hs-file-upload-remove]', + ) as HTMLButtonElement; + + if (fileName) fileName.textContent = fileInfo.name; + if (fileExt) fileExt.textContent = fileInfo.extension; + if (fileSize) fileSize.textContent = this.formatFileSize(file.size); + + if (preview) { + if (file.type.includes('image/')) preview.classList.remove('hidden'); + else this.setIcon(fileInfo.extension, fileIcon); + } + + if (this.dropzone.files.length > 0 && this.concatOptions.autoHideTrigger) + trigger.style.display = 'none'; + + if (remove) remove.onclick = () => this.dropzone.removeFile(file); + } + + private onRemoveFile() { + const trigger = this.el.querySelector( + '[data-hs-file-upload-trigger]', + ) as HTMLElement; + + if (this.dropzone.files.length === 0 && this.concatOptions.autoHideTrigger) + trigger.style.display = ''; + } + + private onUploadProgress(file: DropzoneFile, progress: number) { + const { previewElement } = file; + + if (!previewElement) return false; + + const progressBar = previewElement.querySelector( + '[data-hs-file-upload-progress-bar]', + ); + const progressBarPane = previewElement.querySelector( + '[data-hs-file-upload-progress-bar-pane]', + ) as HTMLElement; + const progressBarValue = previewElement.querySelector( + '[data-hs-file-upload-progress-bar-value]', + ) as HTMLElement; + + const currentProgress = Math.floor(progress); + + if (progressBar) + progressBar.setAttribute('aria-valuenow', `${currentProgress}`); + if (progressBarPane) progressBarPane.style.width = `${currentProgress}%`; + if (progressBarValue) progressBarValue.innerText = `${currentProgress}`; + } + + private onComplete(file: DropzoneFile) { + const { previewElement } = file; + + if (!previewElement) return false; + + previewElement.classList.add('complete'); + } + + private setIcon(ext: string, file: HTMLElement) { + const icon = this.createIcon(ext); + + file.append(icon); + } + + private createIcon(ext: string) { + const icon = this.extensions[ext]?.icon + ? htmlToElement(this.extensions[ext].icon) + : htmlToElement(this.extensions.default.icon); + + classToClassList( + this.extensions[ext]?.class + ? this.extensions[ext].class + : this.extensions.default.class, + icon, + ); + + return icon; + } + + private formatFileSize(size: number) { + if (size < 1024) { + return size.toFixed(2) + ' B'; + } else if (size < 1024 * 1024) { + return (size / 1024).toFixed(2) + ' KB'; + } else if (size < 1024 * 1024 * 1024) { + return (size / (1024 * 1024)).toFixed(2) + ' MB'; + } else if (size < 1024 * 1024 * 1024 * 1024) { + return (size / (1024 * 1024 * 1024)).toFixed(2) + ' GB'; + } else { + return (size / (1024 * 1024 * 1024 * 1024)).toFixed(2) + ' TB'; + } + } + + private splitFileName(file: string): { + name: string; + extension: string; + } { + let dotIndex = file.lastIndexOf('.'); + + if (dotIndex == -1) return { name: file, extension: '' }; + + return { + name: file.substring(0, dotIndex), + extension: file.substring(dotIndex + 1), + }; + } + + // Static methods + static getInstance(target: HTMLElement | string, isInstance?: boolean) { + const elInCollection = window.$hsFileUploadCollection.find( + (el) => + el.element.el === + (typeof target === 'string' ? document.querySelector(target) : target), + ); + + return elInCollection + ? isInstance + ? elInCollection + : elInCollection.element.el + : null; + } + + static autoInit() { + if (!window.$hsFileUploadCollection) window.$hsFileUploadCollection = []; + + document + .querySelectorAll('[data-hs-file-upload]:not(.--prevent-on-load-init)') + .forEach((el: HTMLElement) => { + if ( + !window.$hsFileUploadCollection.find( + (elC) => (elC?.element?.el as HTMLElement) === el, + ) + ) + new HSFileUpload(el); + }); + } +} + +declare global { + interface Window { + HSFileUpload: Function; + $hsFileUploadCollection: ICollectionItem[]; + } +} + +window.addEventListener('load', () => { + if ( + document.querySelectorAll( + '[data-hs-file-upload]:not(.--prevent-on-load-init)', + ).length + ) { + if (typeof _ === 'undefined') + console.error( + 'HSFileUpload: Lodash is not available, please add it to the page.', + ); + if (typeof Dropzone === 'undefined') + console.error( + 'HSFileUpload: Dropzone is not available, please add it to the page.', + ); + } + + if (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined') { + HSFileUpload.autoInit(); + } + + // Uncomment for debug + // console.log('File upload collection:', window.$hsFileUploadCollection); +}); + +if (typeof window !== 'undefined') { + window.HSFileUpload = HSFileUpload; +} + +export default HSFileUpload; diff --git a/src/plugins/file-upload/interfaces.ts b/src/plugins/file-upload/interfaces.ts new file mode 100644 index 0000000..936943f --- /dev/null +++ b/src/plugins/file-upload/interfaces.ts @@ -0,0 +1,11 @@ +import { DropzoneOptions } from 'dropzone'; + +export interface IFileUploadOptions extends DropzoneOptions { + extensions?: {}; + autoHideTrigger?: boolean; + singleton?: boolean; +} + +export interface IFileUpload { + options?: IFileUploadOptions; +} \ No newline at end of file diff --git a/src/plugins/file-upload/types.ts b/src/plugins/file-upload/types.ts new file mode 100644 index 0000000..37ba73a --- /dev/null +++ b/src/plugins/file-upload/types.ts @@ -0,0 +1 @@ +// no types diff --git a/src/plugins/input-number/index.ts b/src/plugins/input-number/index.ts index 39c0e96..e9d1167 100644 --- a/src/plugins/input-number/index.ts +++ b/src/plugins/input-number/index.ts @@ -1,9 +1,9 @@ /* * HSInputNumber - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch } from '../../utils'; @@ -33,11 +33,7 @@ class HSInputNumber this.decrement = this.el.querySelector('[data-hs-input-number-decrement]') || null; - if (this.input) { - this.inputValue = !isNaN(parseInt(this.input.value)) - ? parseInt(this.input.value) - : 0; - } + if (this.input) this.checkIsNumberAndConvert(); const data = this.el.dataset.hsInputNumber; const dataOptions: IInputNumberOptions = data @@ -64,6 +60,37 @@ class HSInputNumber if (this.input && this.increment) this.build(); } + private checkIsNumberAndConvert() { + const value = this.input.value.trim(); + const cleanedValue = this.cleanAndExtractNumber(value); + + if (cleanedValue !== null) { + this.inputValue = cleanedValue; + this.input.value = cleanedValue.toString(); + } else { + this.inputValue = 0; + this.input.value = '0'; + } + } + + private cleanAndExtractNumber(value: string): number | null { + const cleanedArray: string[] = []; + let decimalFound = false; + + value.split('').forEach((char) => { + if (char >= '0' && char <= '9') cleanedArray.push(char); + else if (char === '.' && !decimalFound) { + cleanedArray.push(char); + decimalFound = true; + } + }); + + const cleanedValue = cleanedArray.join(''); + const number = parseFloat(cleanedValue); + + return isNaN(number) ? null : number; + } + private build() { if (this.input) this.buildInput(); if (this.increment) this.buildIncrement(); diff --git a/src/plugins/overlay/index.ts b/src/plugins/overlay/index.ts index 926b7ba..645c877 100644 --- a/src/plugins/overlay/index.ts +++ b/src/plugins/overlay/index.ts @@ -1,9 +1,9 @@ /* * HSOverlay - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { @@ -22,9 +22,11 @@ import HSBasePlugin from '../base-plugin'; class HSOverlay extends HSBasePlugin<{}> implements IOverlay { private readonly hiddenClass: string | null; + private readonly emulateScrollbarSpace: boolean; private readonly isClosePrev: boolean; private readonly backdropClasses: string | null; private readonly backdropExtraClasses: string | null; + private readonly animationTarget: HTMLElement | null; private openNextOverlay: boolean; private autoHide: ReturnType | null; @@ -50,6 +52,7 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { }; this.hiddenClass = concatOptions?.hiddenClass || 'hidden'; + this.emulateScrollbarSpace = concatOptions?.emulateScrollbarSpace || false; this.isClosePrev = concatOptions?.isClosePrev ?? true; this.backdropClasses = concatOptions?.backdropClasses ?? @@ -96,6 +99,10 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { : BREAKPOINTS[openedBreakpoint]) || null; } + this.animationTarget = + this?.overlay?.querySelector('.hs-overlay-animation-target') || + this.overlay; + if (this.overlay) this.init(); } @@ -111,6 +118,12 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { ); } + if (this?.el?.ariaExpanded) { + if (this.overlay.classList.contains('opened')) + this.el.ariaExpanded = 'true'; + else this.el.ariaExpanded = 'false'; + } + this.el.addEventListener('click', () => { if (this.overlay.classList.contains('opened')) this.close(); else this.open(); @@ -233,6 +246,20 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { else input.focus(); } + private getScrollbarSize() { + let div = document.createElement('div'); + div.style.overflow = 'scroll'; + div.style.width = '100px'; + div.style.height = '100px'; + document.body.appendChild(div); + + let scrollbarSize = div.offsetWidth - div.clientWidth; + + document.body.removeChild(div); + + return scrollbarSize; + } + // Public methods public open() { if (!this.overlay) return false; @@ -243,7 +270,9 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { Array.from(openedOverlays).includes(el.element.overlay) && !el.element.isLayoutAffect, ); - + const toggles = document.querySelectorAll( + `[data-hs-overlay="#${this.overlay.id}"]`, + ); const disabledScroll = getClassProperty(this.overlay, '--body-scroll', 'false') !== 'true'; @@ -259,12 +288,17 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { if (disabledScroll) { document.body.style.overflow = 'hidden'; + if (this.emulateScrollbarSpace) + document.body.style.paddingRight = `${this.getScrollbarSize()}px`; } this.buildBackdrop(); this.checkTimer(); this.hideAuto(); + toggles.forEach((toggle) => { + if (toggle.ariaExpanded) toggle.ariaExpanded = 'true'; + }); this.overlay.classList.remove(this.hiddenClass); this.overlay.setAttribute('aria-overlay', 'true'); this.overlay.setAttribute('tabindex', '-1'); @@ -289,7 +323,13 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { const closeFn = (cb: Function) => { if (this.overlay.classList.contains('open')) return false; + const toggles = document.querySelectorAll( + `[data-hs-overlay="#${this.overlay.id}"]`, + ); + toggles.forEach((toggle) => { + if (toggle.ariaExpanded) toggle.ariaExpanded = 'false'; + }); this.overlay.classList.add(this.hiddenClass); this.destroyBackdrop(); @@ -297,8 +337,10 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { this.fireEvent('close', this.el); dispatch('close.hs.overlay', this.el, this.el); - if (!document.querySelector('.hs-overlay.opened')) + if (!document.querySelector('.hs-overlay.opened')) { document.body.style.overflow = ''; + if (this.emulateScrollbarSpace) document.body.style.paddingRight = ''; + } cb(this.overlay); }; @@ -311,10 +353,7 @@ class HSOverlay extends HSBasePlugin<{}> implements IOverlay { this.overlay.removeAttribute('tabindex'); if (forceClose) closeFn(resolve); - else - afterTransition(this.overlay, () => { - closeFn(resolve); - }); + else afterTransition(this.animationTarget, () => closeFn(resolve)); }); } @@ -513,16 +552,49 @@ const autoCloseResizeFn = () => { const setOpenedResizeFn = () => { if ( !window.$hsOverlayCollection.length || - !window.$hsOverlayCollection.find((el) => el.element.openedBreakpoint) + !window.$hsOverlayCollection.find((el) => el.element.autoClose) ) return false; const overlays = window.$hsOverlayCollection.filter( - (el) => el.element.openedBreakpoint, + (el) => el.element.autoClose, ); overlays.forEach((overlay) => { - HSOverlay.setOpened(overlay.element.openedBreakpoint, overlay); + if (document.body.clientWidth >= overlay.element.autoClose) + overlay.element.close(true); + }); +}; + +const setBackdropZIndexResizeFn = () => { + if ( + !window.$hsOverlayCollection.length || + !window.$hsOverlayCollection.find((el) => + el.element.overlay.classList.contains('opened'), + ) + ) + return false; + + const overlays = window.$hsOverlayCollection.filter((el) => + el.element.overlay.classList.contains('opened'), + ); + + overlays.forEach((overlay) => { + const overlayZIndex = parseInt( + window + .getComputedStyle(overlay.element.overlay) + .getPropertyValue('z-index'), + ); + const backdrop: HTMLElement = document.querySelector( + `#${overlay.element.overlay.id}-backdrop`, + ); + const backdropZIndex = parseInt( + window.getComputedStyle(backdrop).getPropertyValue('z-index'), + ); + if (overlayZIndex === backdropZIndex + 1) return false; + + if ('style' in backdrop) backdrop.style.zIndex = `${overlayZIndex - 1}`; + document.body.classList.add('hs-overlay-body-open'); }); }; @@ -536,6 +608,7 @@ window.addEventListener('load', () => { window.addEventListener('resize', () => { autoCloseResizeFn(); setOpenedResizeFn(); + setBackdropZIndexResizeFn(); }); if (typeof window !== 'undefined') { diff --git a/src/plugins/overlay/interfaces.ts b/src/plugins/overlay/interfaces.ts index 4ad39e2..d9c58a8 100644 --- a/src/plugins/overlay/interfaces.ts +++ b/src/plugins/overlay/interfaces.ts @@ -1,5 +1,6 @@ export interface IOverlayOptions { hiddenClass?: string | null; + emulateScrollbarSpace?: boolean; isClosePrev?: boolean; backdropClasses?: string | null; backdropExtraClasses?: string | null; diff --git a/src/plugins/pin-input/index.ts b/src/plugins/pin-input/index.ts index 136d69b..8eb4413 100644 --- a/src/plugins/pin-input/index.ts +++ b/src/plugins/pin-input/index.ts @@ -1,9 +1,9 @@ /* * HSPinInput - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch } from '../../utils'; diff --git a/src/plugins/remove-element/index.ts b/src/plugins/remove-element/index.ts index 2f34cb4..67f9ad8 100644 --- a/src/plugins/remove-element/index.ts +++ b/src/plugins/remove-element/index.ts @@ -1,9 +1,9 @@ /* * HSRemoveElement - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { afterTransition } from '../../utils'; diff --git a/src/plugins/scrollspy/index.ts b/src/plugins/scrollspy/index.ts index a93e801..9b52706 100644 --- a/src/plugins/scrollspy/index.ts +++ b/src/plugins/scrollspy/index.ts @@ -1,9 +1,9 @@ /* * HSScrollspy - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { getClassProperty, dispatch } from '../../utils'; @@ -29,7 +29,6 @@ class HSScrollspy extends HSBasePlugin<{}> implements IScrollspy { this.contentId = this.el.getAttribute('data-hs-scrollspy'); this.content = document.querySelector(this.contentId); this.links = this.el.querySelectorAll('[href]'); - // this.sections = this.content.children; this.sections = []; this.scrollableId = this.el.getAttribute( 'data-hs-scrollspy-scrollable-parent', diff --git a/src/plugins/search-by-json/index.ts b/src/plugins/search-by-json/index.ts index 3cfaaf9..bdac9f8 100644 --- a/src/plugins/search-by-json/index.ts +++ b/src/plugins/search-by-json/index.ts @@ -1,9 +1,9 @@ /* * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { debounce, htmlToElement, classToClassList } from '../../utils'; diff --git a/src/plugins/select/index.ts b/src/plugins/select/index.ts index c0af3eb..9555796 100644 --- a/src/plugins/select/index.ts +++ b/src/plugins/select/index.ts @@ -1,9 +1,9 @@ /* * HSSelect - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { @@ -42,8 +42,13 @@ class HSSelect extends HSBasePlugin implements ISelect { private readonly toggleTag: string | null; private readonly toggleClasses: string | null; + private readonly toggleSeparators: { + items?: string; + betweenItemsAndCounter?: string; + } | null; private readonly toggleCountText: string | null; private readonly toggleCountTextMinItems: number | null; + private readonly toggleCountTextMode: string | null; private readonly wrapperClasses: string | null; private readonly tagsItemTemplate: string | null; private readonly tagsItemClasses: string | null; @@ -93,6 +98,10 @@ class HSSelect extends HSBasePlugin implements ISelect { ...dataOptions, ...options, }; + const defaultToggleSeparators = { + items: ', ', + betweenItemsAndCounter: 'and', + }; this.value = concatOptions?.value || (this.el as HTMLSelectElement).value || null; @@ -111,8 +120,15 @@ class HSSelect extends HSBasePlugin implements ISelect { this.wrapperClasses = concatOptions?.wrapperClasses || null; this.toggleTag = concatOptions?.toggleTag || null; this.toggleClasses = concatOptions?.toggleClasses || null; + this.toggleSeparators = + { + ...defaultToggleSeparators, + ...concatOptions?.toggleSeparators, + } ?? defaultToggleSeparators; this.toggleCountText = concatOptions?.toggleCountText || null; this.toggleCountTextMinItems = concatOptions?.toggleCountTextMinItems || 1; + this.toggleCountTextMode = + concatOptions?.toggleCountTextMode || 'countAfterLimit'; this.tagsItemTemplate = concatOptions?.tagsItemTemplate || null; this.tagsItemClasses = concatOptions?.tagsItemClasses || null; this.tagsInputClasses = concatOptions?.tagsInputClasses || null; @@ -149,6 +165,27 @@ class HSSelect extends HSBasePlugin implements ISelect { this.init(); } + public setValue(val: string | string[]) { + this.value = val; + + this.clearSelections(); + + if (Array.isArray(val)) { + this.toggleTextWrapper.innerHTML = this.value.length + ? this.stringFromValue() + : this.placeholder; + this.unselectMultipleItems(); + this.selectMultipleItems(); + } else { + this.setToggleTitle(); + + if (this.toggle.querySelector('[data-icon]')) this.setToggleIcon(); + if (this.toggle.querySelector('[data-title]')) this.setToggleTitle(); + + this.selectSingleItem(); + } + } + private init() { this.createCollection(window.$hsSelectCollection, this); @@ -169,6 +206,7 @@ class HSSelect extends HSBasePlugin implements ISelect { { title: el.textContent, val: el.value, + disabled: el.disabled, options: data !== 'undefined' ? JSON.parse(data) : null, }, ]; @@ -176,14 +214,14 @@ class HSSelect extends HSBasePlugin implements ISelect { } if (this.isMultiple) { - const selectedOptions = Array.from( - (this.el as HTMLSelectElement).options, - ).filter((el) => el.selected); + const selectedOptions = Array.from(this.el.children).filter( + (el: HTMLOptionElement) => el.selected, + ); if (selectedOptions) { const values: string[] = []; - selectedOptions.forEach((el) => { + selectedOptions.forEach((el: HTMLOptionElement) => { values.push(el.value); }); @@ -254,6 +292,11 @@ class HSSelect extends HSBasePlugin implements ISelect { if (this.isDisabled) this.toggle.classList.add('disabled'); if (this.wrapper) this.wrapper.append(this.toggle); + if (this.toggle?.ariaExpanded) { + if (this.isOpened) this.toggle.ariaExpanded = 'true'; + else this.toggle.ariaExpanded = 'false'; + } + this.toggle.addEventListener('click', () => { if (this.isDisabled) return false; @@ -292,6 +335,7 @@ class HSSelect extends HSBasePlugin implements ISelect { } private buildTags() { + if (this.isDisabled) this.wrapper.classList.add('disabled'); this.buildTagsInput(); this.setTagsItems(); } @@ -433,6 +477,10 @@ class HSSelect extends HSBasePlugin implements ISelect { this.dropdown.setAttribute('data-hs-select-dropdown', ''); this.dropdown.classList.add('absolute', 'top-full'); + this.dropdown.role = 'listbox'; + this.dropdown.tabIndex = -1; + this.dropdown.ariaOrientation = 'vertical'; + if (!this.isOpened) this.dropdown.classList.add('hidden'); if (this.dropdownClasses) @@ -441,7 +489,14 @@ class HSSelect extends HSBasePlugin implements ISelect { if (this.dropdown && this.hasSearch) this.buildSearch(); if (this.selectOptions) this.selectOptions.forEach((props: ISingleOption, i) => - this.buildOption(props.title, props.val, props.options, `${i}`), + this.buildOption( + props.title, + props.val, + props.disabled, + props.selected, + props.options, + `${i}`, + ), ); } @@ -474,6 +529,8 @@ class HSSelect extends HSBasePlugin implements ISelect { private buildOption( title: string, val: string, + disabled: boolean = false, + selected: boolean = false, options?: ISingleOptionOptions, index: string = '1', ) { @@ -487,6 +544,12 @@ class HSSelect extends HSBasePlugin implements ISelect { option.setAttribute('data-title-value', title); option.setAttribute('tabIndex', index); option.classList.add('cursor-pointer'); + if (disabled) option.classList.add('disabled'); + if (selected) { + // @ts-ignore + if (this.isMultiple) this.value = [...this.value, val]; + else this.value = val; + } if (this.optionTemplate) { template = htmlToElement(this.optionTemplate); @@ -501,7 +564,7 @@ class HSSelect extends HSBasePlugin implements ISelect { if (options) { if (options.icon) { const img = htmlToElement(options.icon); - img.classList.add('mw-full'); + img.classList.add('max-w-full'); if (template) { iconWrapper = template.querySelector('[data-icon]'); @@ -536,16 +599,19 @@ class HSSelect extends HSBasePlugin implements ISelect { ) { template.querySelector('[data-icon]').classList.add('hidden'); } + if ( this.value && (this.isMultiple ? this.value.includes(val) : this.value === val) ) option.classList.add('selected'); - option.addEventListener('click', () => this.onSelectOption(val)); + if (!disabled) + option.addEventListener('click', () => this.onSelectOption(val)); if (this.optionClasses) classToClassList(this.optionClasses, option); if (this.dropdown) this.dropdown.append(option); + if (selected) this.setNewValue(); } private destroyOption(val: string) { @@ -559,10 +625,14 @@ class HSSelect extends HSBasePlugin implements ISelect { private buildOriginalOption( title: string, val: string, + disabled?: boolean, + selected?: boolean, options?: ISingleOptionOptions, ) { const option = htmlToElement(''); option.setAttribute('value', val); + if (disabled) option.setAttribute('disabled', 'disabled'); + if (selected) option.setAttribute('selected', 'selected'); option.setAttribute('data-hs-select-option', JSON.stringify(options)); option.innerText = title; @@ -676,7 +746,8 @@ class HSSelect extends HSBasePlugin implements ISelect { } private triggerChangeEventForNativeSelect() { - (this.el as HTMLSelectElement).value = `${this.value}`; + // TODO:: test for bugs after comment the line below + // (this.el as HTMLSelectElement).value = `${this.value}`; const selectChangeEvent = new Event('change', { bubbles: true }); (this.el as HTMLSelectElement).dispatchEvent(selectChangeEvent); } @@ -684,6 +755,8 @@ class HSSelect extends HSBasePlugin implements ISelect { private addSelectOption( title: string, val: string, + disabled?: boolean, + selected?: boolean, options?: ISingleOptionOptions, ) { this.selectOptions = [ @@ -691,12 +764,14 @@ class HSSelect extends HSBasePlugin implements ISelect { { title, val, + disabled, + selected, options, }, ]; } - private removeSelectOption(val: string) { + private removeSelectOption(val: string, isArray = false) { const hasOption = !!this.selectOptions.some( (el: ISingleOption) => el.val === val, ); @@ -706,6 +781,14 @@ class HSSelect extends HSBasePlugin implements ISelect { this.selectOptions = this.selectOptions.filter( (el: ISingleOption) => el.val !== val, ); + + console.log(isArray); + + this.value = isArray + ? (this.value as string[]).filter((item: string) => item !== val) + : val; + + console.log(this.value); } private resetTagsInputField() { @@ -729,6 +812,8 @@ class HSSelect extends HSBasePlugin implements ISelect { if (this.mode === 'tags') { this.setTagsItems(); } else { + console.log(); + if (this.value.length) this.toggleTextWrapper.innerHTML = this.stringFromValue(); else this.toggleTextWrapper.innerHTML = this.placeholder; @@ -737,6 +822,7 @@ class HSSelect extends HSBasePlugin implements ISelect { private stringFromValue() { const value: string[] = []; + let title = ''; this.selectOptions.forEach((el: ISingleOption) => { if (this.isMultiple) { @@ -746,11 +832,23 @@ class HSSelect extends HSBasePlugin implements ISelect { } }); - return this.toggleCountText && + if ( + this.toggleCountText && this.toggleCountText !== '' && value.length >= this.toggleCountTextMinItems - ? `${value.length} ${this.toggleCountText}` - : value.join(', '); + ) { + if (this.toggleCountTextMode === 'nItemsAndCount') { + const nItems = value.slice(0, this.toggleCountTextMinItems - 1); + + title = `${nItems.join(this.toggleSeparators.items)} ${this.toggleSeparators.betweenItemsAndCounter} ${value.length - nItems.length} ${this.toggleCountText}`; + } else { + title = `${value.length} ${this.toggleCountText}`; + } + } else { + title = value.join(this.toggleSeparators.items); + } + + return title; } private selectSingleItem() { @@ -763,7 +861,8 @@ class HSSelect extends HSBasePlugin implements ISelect { (el) => this.value === (el as HTMLOptionElement).getAttribute('data-value'), ); - selectedItem.classList.add('selected'); + + if (selectedItem) selectedItem.classList.add('selected'); } private selectMultipleItems() { @@ -842,6 +941,10 @@ class HSSelect extends HSBasePlugin implements ISelect { } public open() { + const currentlyOpened = + window?.$hsSelectCollection?.find((el) => el.element.isOpened) || null; + + if (currentlyOpened) currentlyOpened.element.close(); if (this.animationInProcess) return false; this.animationInProcess = true; @@ -851,6 +954,7 @@ class HSSelect extends HSBasePlugin implements ISelect { this.recalculateDirection(); setTimeout(() => { + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true'; this.wrapper.classList.add('active'); this.dropdown.classList.add('opened'); if (this.hasSearch && !this.preventSearchFocus) this.search.focus(); @@ -866,6 +970,7 @@ class HSSelect extends HSBasePlugin implements ISelect { this.animationInProcess = true; + if (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false'; this.wrapper.classList.remove('active'); this.dropdown.classList.remove('opened', 'bottom-full', 'top-full'); if (this.dropdownDirectionClasses?.bottom) @@ -895,15 +1000,17 @@ class HSSelect extends HSBasePlugin implements ISelect { public addOption(items: ISingleOption | ISingleOption[]) { let i = `${this.selectOptions.length}`; const addOption = (option: ISingleOption) => { - const { title, val, options } = option; + const { title, val, disabled, selected, options } = option; const hasOption = !!this.selectOptions.some( (el: ISingleOption) => el.val === val, ); if (!hasOption) { - this.addSelectOption(title, val, options); - this.buildOption(title, val, options, i); - this.buildOriginalOption(title, val, options); + this.addSelectOption(title, val, disabled, selected, options); + this.buildOption(title, val, disabled, selected, options, i); + this.buildOriginalOption(title, val, disabled, selected, options); + + if (selected && !this.isMultiple) this.onSelectOption(val); } }; @@ -917,13 +1024,13 @@ class HSSelect extends HSBasePlugin implements ISelect { } public removeOption(values: string | string[]) { - const removeOption = (val: string) => { + const removeOption = (val: string, isArray = false) => { const hasOption = !!this.selectOptions.some( (el: ISingleOption) => el.val === val, ); if (hasOption) { - this.removeSelectOption(val); + this.removeSelectOption(val, isArray); this.destroyOption(val); this.destroyOriginalOption(val); @@ -938,11 +1045,13 @@ class HSSelect extends HSBasePlugin implements ISelect { if (Array.isArray(values)) { values.forEach((val) => { - removeOption(val); + removeOption(val, this.isMultiple); }); } else { - removeOption(values); + removeOption(values, this.isMultiple); } + + this.setNewValue(); } public recalculateDirection() { @@ -1021,6 +1130,17 @@ class HSSelect extends HSBasePlugin implements ISelect { } } + static open(target: HTMLElement | string) { + const elInCollection = window.$hsSelectCollection.find( + (el) => + el.element.el === + (typeof target === 'string' ? document.querySelector(target) : target), + ); + + if (elInCollection && !elInCollection.element.isOpened) + elInCollection.element.open(); + } + static close(target: HTMLElement | string) { const elInCollection = window.$hsSelectCollection.find( (el) => @@ -1062,22 +1182,27 @@ class HSSelect extends HSBasePlugin implements ISelect { break; case 'ArrowUp': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(); break; case 'ArrowDown': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onArrow(false); break; case 'Tab': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onTab(evt.shiftKey); break; case 'Home': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(); break; case 'End': evt.preventDefault(); + evt.stopImmediatePropagation(); this.onStartEnd(false); break; case 'Enter': @@ -1112,7 +1237,9 @@ class HSSelect extends HSBasePlugin implements ISelect { const options = preparedOptions.filter( (el: any) => !el.classList.contains('disabled'), ); - const current = dropdown.querySelector('.hs-select-option-highlighted'); + const current = + dropdown.querySelector('.hs-select-option-highlighted') || + dropdown.querySelector('.selected'); if (!current) options[0].classList.add('hs-select-option-highlighted'); let currentInd = options.findIndex((el: any) => el === current); @@ -1142,7 +1269,9 @@ class HSSelect extends HSBasePlugin implements ISelect { const options = preparedOptions.filter( (el: any) => !el.classList.contains('disabled'), ); - const current = dropdown.querySelector('.hs-select-option-highlighted'); + const current = + dropdown.querySelector('.hs-select-option-highlighted') || + dropdown.querySelector('.selected'); if (!current) options[0].classList.add('hs-select-option-highlighted'); let currentInd = options.findIndex((el: any) => el === current); diff --git a/src/plugins/select/interfaces.ts b/src/plugins/select/interfaces.ts index b96cef6..9aebc9f 100644 --- a/src/plugins/select/interfaces.ts +++ b/src/plugins/select/interfaces.ts @@ -6,6 +6,8 @@ export interface ISingleOptionOptions { export interface ISingleOption { title: string; val: string; + disabled?: boolean; + selected?: boolean; options?: ISingleOptionOptions | null; } @@ -23,8 +25,13 @@ export interface ISelectOptions { toggleTag?: string; toggleClasses?: string; + toggleSeparators?: { + items?: string; + betweenItemsAndCounter?: string; + }; toggleCountText?: string; toggleCountTextMinItems?: number; + toggleCountTextMode?: string; tagsItemTemplate?: string; tagsItemClasses?: string; diff --git a/src/plugins/stepper/index.ts b/src/plugins/stepper/index.ts index f41bc5c..c5c3e03 100644 --- a/src/plugins/stepper/index.ts +++ b/src/plugins/stepper/index.ts @@ -1,9 +1,9 @@ /* * HSStepper - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch } from '../../utils'; diff --git a/src/plugins/strong-password/index.ts b/src/plugins/strong-password/index.ts index 57558af..48b2840 100644 --- a/src/plugins/strong-password/index.ts +++ b/src/plugins/strong-password/index.ts @@ -1,9 +1,9 @@ /* * HSStrongPassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { diff --git a/src/plugins/tabs/index.ts b/src/plugins/tabs/index.ts index 02b23b6..d45bf22 100644 --- a/src/plugins/tabs/index.ts +++ b/src/plugins/tabs/index.ts @@ -1,9 +1,9 @@ /* * HSTabs - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { dispatch } from '../../utils'; @@ -30,7 +30,7 @@ class HSTabs extends HSBasePlugin<{}> implements ITabs { super(el, options, events); this.toggles = this.el.querySelectorAll('[data-hs-tab]'); - this.extraToggleId = this.el.getAttribute('hs-data-tab-select'); + this.extraToggleId = this.el.getAttribute('data-hs-tab-select'); this.extraToggle = document.querySelector(this.extraToggleId); this.current = Array.from(this.toggles).find((el) => el.classList.contains('active'), @@ -65,9 +65,11 @@ class HSTabs extends HSBasePlugin<{}> implements ITabs { this.currentContentId = this.current.getAttribute('data-hs-tab'); this.currentContent = document.querySelector(this.currentContentId); + if (this?.prev?.ariaSelected) this.prev.ariaSelected = 'false'; this.prev.classList.remove('active'); this.prevContent.classList.add('hidden'); + if (this?.current?.ariaSelected) this.current.ariaSelected = 'true'; this.current.classList.add('active'); this.currentContent.classList.remove('hidden'); diff --git a/src/plugins/theme-switch/index.ts b/src/plugins/theme-switch/index.ts index 53dc63d..e025a28 100644 --- a/src/plugins/theme-switch/index.ts +++ b/src/plugins/theme-switch/index.ts @@ -1,9 +1,9 @@ /* * HSThemeSwitch - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { IThemeSwitchOptions, IThemeSwitch } from './interfaces'; diff --git a/src/plugins/toggle-count/index.ts b/src/plugins/toggle-count/index.ts index 3656672..d52760f 100644 --- a/src/plugins/toggle-count/index.ts +++ b/src/plugins/toggle-count/index.ts @@ -1,9 +1,9 @@ /* * HSToggleCount - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { IToggleCountOptions, IToggleCount } from './interfaces'; diff --git a/src/plugins/toggle-password/index.ts b/src/plugins/toggle-password/index.ts index af4ede0..73b361a 100644 --- a/src/plugins/toggle-password/index.ts +++ b/src/plugins/toggle-password/index.ts @@ -1,9 +1,9 @@ /* * HSTogglePassword - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { isFormElement, dispatch } from '../../utils'; diff --git a/src/plugins/tooltip/index.ts b/src/plugins/tooltip/index.ts index 0f59b7e..f348892 100644 --- a/src/plugins/tooltip/index.ts +++ b/src/plugins/tooltip/index.ts @@ -1,9 +1,9 @@ /* * HSTooltip - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { createPopper, PositioningStrategy, Instance } from '@popperjs/core'; diff --git a/src/spa/index.ts b/src/spa/index.ts index a2bbce7..8d0fd54 100644 --- a/src/spa/index.ts +++ b/src/spa/index.ts @@ -5,7 +5,9 @@ import HSAccordion from '../plugins/accordion'; import HSCarousel from '../plugins/carousel'; import HSCollapse from '../plugins/collapse'; import HSComboBox from '../plugins/combobox'; +import HSDataTable from '../plugins/datatable'; import HSDropdown from '../plugins/dropdown'; +import HSFileUpload from '../plugins/file-upload'; import HSInputNumber from '../plugins/input-number'; import HSOverlay from '../plugins/overlay'; import HSPinInput from '../plugins/pin-input'; @@ -15,27 +17,63 @@ import HSSelect from '../plugins/select'; import HSStepper from '../plugins/stepper'; import HSStrongPassword from '../plugins/strong-password'; import HSTabs from '../plugins/tabs'; +import HSThemeSwitch from '../plugins/theme-switch'; import HSToggleCount from '../plugins/toggle-count'; import HSTogglePassword from '../plugins/toggle-password'; import HSTooltip from '../plugins/tooltip'; export const COLLECTIONS: ISpaCollectionItem[] = [ - { key: 'copy-markup', fn: HSCopyMarkup }, - { key: 'accordion', fn: HSAccordion }, - { key: 'carousel', fn: HSCarousel }, - { key: 'collapse', fn: HSCollapse }, - { key: 'combobox', fn: HSComboBox }, - { key: 'dropdown', fn: HSDropdown }, - { key: 'input-number', fn: HSInputNumber }, - { key: 'overlay', fn: HSOverlay }, - { key: 'pin-input', fn: HSPinInput }, - { key: 'remove-element', fn: HSRemoveElement }, - { key: 'scrollspy', fn: HSScrollspy }, - { key: 'select', fn: HSSelect }, - { key: 'stepper', fn: HSStepper }, - { key: 'strong-password', fn: HSStrongPassword }, - { key: 'tabs', fn: HSTabs }, - { key: 'toggle-count', fn: HSToggleCount }, - { key: 'toggle-password', fn: HSTogglePassword }, - { key: 'tooltip', fn: HSTooltip }, + { + key: 'copy-markup', + fn: HSCopyMarkup, + collection: '$hsCopyMarkupCollection', + }, + { key: 'accordion', fn: HSAccordion, collection: '$hsAccordionCollection' }, + { key: 'carousel', fn: HSCarousel, collection: '$hsCarouselCollection' }, + { key: 'collapse', fn: HSCollapse, collection: '$hsCollapseCollection' }, + { key: 'combobox', fn: HSComboBox, collection: '$hsComboBoxCollection' }, + { key: 'datatable', fn: HSDataTable, collection: '$hsDataTableCollection' }, + { key: 'dropdown', fn: HSDropdown, collection: '$hsDropdownCollection' }, + { + key: 'file-upload', + fn: HSFileUpload, + collection: '$hsFileUploadCollection', + }, + { + key: 'input-number', + fn: HSInputNumber, + collection: '$hsInputNumberCollection', + }, + { key: 'overlay', fn: HSOverlay, collection: '$hsOverlayCollection' }, + { key: 'pin-input', fn: HSPinInput, collection: '$hsPinInputCollection' }, + { + key: 'remove-element', + fn: HSRemoveElement, + collection: '$hsRemoveElementCollection', + }, + { key: 'scrollspy', fn: HSScrollspy, collection: '$hsScrollspyCollection' }, + { key: 'select', fn: HSSelect, collection: '$hsSelectCollection' }, + { key: 'stepper', fn: HSStepper, collection: '$hsStepperCollection' }, + { + key: 'strong-password', + fn: HSStrongPassword, + collection: '$hsStrongPasswordCollection', + }, + { key: 'tabs', fn: HSTabs, collection: '$hsTabsCollection' }, + { + key: 'theme-switch', + fn: HSThemeSwitch, + collection: '$hsThemeSwitchCollection', + }, + { + key: 'toggle-count', + fn: HSToggleCount, + collection: '$hsToggleCountCollection', + }, + { + key: 'toggle-password', + fn: HSTogglePassword, + collection: '$hsTogglePasswordCollection', + }, + { key: 'tooltip', fn: HSTooltip, collection: '$hsTooltipCollection' }, ]; diff --git a/src/spa/interfaces.ts b/src/spa/interfaces.ts index 407199b..4168453 100644 --- a/src/spa/interfaces.ts +++ b/src/spa/interfaces.ts @@ -3,4 +3,5 @@ export interface ISpaCollectionItem { fn: { autoInit: () => void; }; + collection: string; } diff --git a/src/static/index.ts b/src/static/index.ts index 5e4471c..d457891 100644 --- a/src/static/index.ts +++ b/src/static/index.ts @@ -1,18 +1,61 @@ /* * HSStaticMethods - * @version: 2.1.0 - * @author: HTMLStream - * @license: Licensed under MIT (https://preline.co/docs/license.html) - * Copyright 2023 HTMLStream + * @version: 2.4.0 + * @author: Preline Labs Ltd. + * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) + * Copyright 2024 Preline Labs Ltd. */ import { getClassProperty, afterTransition } from '../utils'; import { COLLECTIONS } from '../spa'; import { IStaticMethods } from './interfaces'; +import { ICollectionItem } from '../interfaces'; +import type HSCopyMarkup from '../plugins/copy-markup'; +import type HSAccordion from '../plugins/accordion'; +import type HSCarousel from '../plugins/carousel'; +import type HSCollapse from '../plugins/collapse'; +import type HSComboBox from '../plugins/combobox'; +import type HSDataTable from '../plugins/datatable'; +import type HSDropdown from '../plugins/dropdown'; +import type HSFileUpload from '../plugins/file-upload'; +import type HSInputNumber from '../plugins/input-number'; +import type HSOverlay from '../plugins/overlay'; +import type HSPinInput from '../plugins/pin-input'; +import type HSRemoveElement from '../plugins/remove-element'; +import type HSScrollspy from '../plugins/scrollspy'; +import type HSSelect from '../plugins/select'; +import type HSStepper from '../plugins/stepper'; +import type HSStrongPassword from '../plugins/strong-password'; +import type HSTabs from '../plugins/tabs'; +import type HSThemeSwitch from '../plugins/theme-switch'; +import type HSToggleCount from '../plugins/toggle-count'; +import type HSTogglePassword from '../plugins/toggle-password'; +import type HSTooltip from '../plugins/tooltip'; declare global { interface Window { HSStaticMethods: IStaticMethods; + $hsCopyMarkupCollection: ICollectionItem[]; + $hsAccordionCollection: ICollectionItem[]; + $hsCarouselCollection: ICollectionItem[]; + $hsCollapseCollection: ICollectionItem[]; + $hsComboBoxCollection: ICollectionItem[]; + $hsDataTableCollection: ICollectionItem[]; + $hsDropdownCollection: ICollectionItem[]; + $hsFileUploadCollection: ICollectionItem[]; + $hsInputNumberCollection: { id: number; element: HSInputNumber }[]; + $hsOverlayCollection: ICollectionItem[]; + $hsPinInputCollection: ICollectionItem[]; + $hsRemoveElementCollection: ICollectionItem[]; + $hsScrollspyCollection: ICollectionItem[]; + $hsSelectCollection: ICollectionItem[]; + $hsStepperCollection: ICollectionItem[]; + $hsStrongPasswordCollection: ICollectionItem[]; + $hsTabsCollection: ICollectionItem[]; + $hsThemeSwitchCollection: ICollectionItem[]; + $hsToggleCountCollection: ICollectionItem[]; + $hsTogglePasswordCollection: ICollectionItem[]; + $hsTooltipCollection: ICollectionItem[]; } } @@ -30,6 +73,24 @@ const HSStaticMethods: IStaticMethods = { }); } }, + cleanCollection(name: string | string[] = 'all') { + if (name === 'all') { + COLLECTIONS.forEach(({ collection }) => { + if ((window as any)[collection] instanceof Array) { + (window as any)[collection] = []; + } + }); + } else { + COLLECTIONS.forEach(({ key, collection }) => { + if ( + name.includes(key) && + (window as any)[collection] instanceof Array + ) { + (window as any)[collection] = []; + } + }); + } + }, }; if (typeof window !== 'undefined') { diff --git a/src/static/interfaces.ts b/src/static/interfaces.ts index 97a7f48..fcbfa83 100644 --- a/src/static/interfaces.ts +++ b/src/static/interfaces.ts @@ -2,4 +2,5 @@ export interface IStaticMethods { getClassProperty(el: HTMLElement, prop?: string, val?: string): string; afterTransition(el: HTMLElement, cb: Function): void; autoInit(collection?: string | string[]): void; -} \ No newline at end of file + cleanCollection(collection?: string | string[]): void; +} diff --git a/src/utils/index.ts b/src/utils/index.ts index 9083950..d5e0abe 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -25,23 +25,28 @@ const getClassPropertyAlt = ( return targetClass.match(/:(.*)]/) ? targetClass.match(/:(.*)]/)[1] : val; }; -// const getClassPropertyAlt = ( -// el: HTMLElement, -// prop: string, -// val: string = '', -// ): string => { -// let targetClass = ''; +const getZIndex = (el: HTMLElement) => { + const computedStyle = window.getComputedStyle(el); + const zIndex = computedStyle.getPropertyValue('z-index'); -// el.classList.forEach((className) => { -// if (className.includes(prop)) { -// targetClass = className; -// } -// }); + return zIndex; +}; + +function getHighestZIndex(arr: HTMLElement[]) { + let highestZIndex = Number.NEGATIVE_INFINITY; + + arr.forEach((el) => { + let zIndex: string | number = getZIndex(el); -// const match = targetClass.match(/:(.*)/); + if (zIndex !== 'auto') { + zIndex = parseInt(zIndex, 10); + + if (zIndex > highestZIndex) highestZIndex = zIndex; + } + }); -// return match ? match[1] : val; -// }; + return highestZIndex; +} const isIOS = () => { if (/iPad|iPhone|iPod/.test(navigator.platform)) { @@ -186,6 +191,8 @@ export { stringToBoolean, getClassProperty, getClassPropertyAlt, + getZIndex, + getHighestZIndex, isIOS, isIpadOS, isEnoughSpace, diff --git a/templates/admin/index.html b/templates/admin/index.html new file mode 100644 index 0000000..4eb29c3 --- /dev/null +++ b/templates/admin/index.html @@ -0,0 +1,1895 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Tailwind CSS Admin Template | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ + + + + +
    +
  1. + Application Layout + + + +
  2. +
  3. + Dashboard +
  4. +
+ +
+
+ + + + + + + +
+
+ +
+ +
+
+
+

+ Total users +

+
+
+ + + + + + +
+
+
+ +
+

+ 72,540 +

+ + + + + + + 1.7% + + +
+
+
+ + + +
+
+
+

+ Sessions +

+
+ +
+

+ 29.4% +

+
+
+
+ + + +
+
+
+

+ Avg. Click Rate +

+
+ +
+

+ 56.8% +

+ + + + + + + 1.7% + + +
+
+
+ + + +
+
+
+

+ Pageviews +

+
+ +
+

+ 92,913 +

+
+
+
+ +
+ + +
+ +
+ +
+
+

+ Income +

+

+ $126,238.49 +

+
+ +
+ + + + + + 25% + +
+
+ + +
+
+ + + +
+ +
+
+

+ Visitors +

+

+ 80.3k +

+
+ +
+ + + + + + 2% + +
+
+ + +
+
+ +
+ + +
+
+
+
+ +
+
+

+ Users +

+

+ Add users, edit and more. +

+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + Name + +
+
+
+ + Position + +
+
+
+ + Status + +
+
+
+ + Portfolio + +
+
+
+ + Created + +
+
+
+ +
+
+
+
+ Avatar +
+ Christina Bersh + christina@site.com +
+
+
+
+
+ Director + Human resources +
+
+
+ + + + + Active + +
+
+
+
+ 1/5 +
+
+
+
+
+
+
+ 28 Dec, 12:12 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ David Harrison + david@site.com +
+
+
+
+
+ Seller + Branding products +
+
+
+ + + + + Warning + +
+
+
+
+ 3/5 +
+
+
+
+
+
+
+ 20 Dec, 09:27 +
+
+ +
+
+ +
+
+
+
+ + A + +
+ Anne Richard + anne@site.com +
+
+
+
+
+ Designer + IT department +
+
+
+ + + + + Active + +
+
+
+
+ 5/5 +
+
+
+
+
+
+
+ 18 Dec, 15:20 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Samia Kartoon + samia@site.com +
+
+
+
+
+ Executive director + Marketing +
+
+
+ + + + + Active + +
+
+
+
+ 0/5 +
+
+
+
+
+
+
+ 18 Dec, 15:20 +
+
+ +
+
+ +
+
+
+
+ + D + +
+ David Harrison + david@site.com +
+
+
+
+
+ Developer + Mobile app +
+
+
+ + + + + Danger + +
+
+
+
+ 3/5 +
+
+
+
+
+
+
+ 15 Dec, 14:41 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Brian Halligan + brian@site.com +
+
+
+
+
+ Accountant + Finance +
+
+
+ + + + + Active + +
+
+
+
+ 2/5 +
+
+
+
+
+
+
+ 11 Dec, 18:51 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Andy Clerk + andy@site.com +
+
+
+
+
+ Director + Human resources +
+
+
+ + + + + Active + +
+
+
+
+ 1/5 +
+
+
+
+
+
+
+ 28 Dec, 12:12 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Bart Simpson + Bart@site.com +
+
+
+
+
+ Seller + Branding products +
+
+
+ + + + + Warning + +
+
+
+
+ 3/5 +
+
+
+
+
+
+
+ 20 Dec, 09:27 +
+
+ +
+
+ +
+
+
+
+ + C + +
+ Camila Welters + cwelt@site.com +
+
+
+
+
+ Designer + IT department +
+
+
+ + + + + Active + +
+
+
+
+ 5/5 +
+
+
+
+
+
+
+ 18 Dec, 15:20 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Oliver Schevich + oliver@site.com +
+
+
+
+
+ Seller + Branding products +
+
+
+ + + + + Warning + +
+
+
+
+ 3/5 +
+
+
+
+
+
+
+ 20 Dec, 09:27 +
+
+ +
+
+ +
+
+
+
+ + I + +
+ Inna Ivy + invy@site.com +
+
+
+
+
+ Designer + IT department +
+
+
+ + + + + Active + +
+
+
+
+ 5/5 +
+
+
+
+
+
+
+ 18 Dec, 15:20 +
+
+ +
+
+ +
+
+
+
+ Avatar +
+ Jessica Williams + myhairisred@site.com +
+
+
+
+
+ Executive director + Marketing +
+
+
+ + + + + Active + +
+
+
+
+ 0/5 +
+
+
+
+
+
+
+ 18 Dec, 15:20 +
+
+ +
+ + + +
+
+

+ 12 results +

+
+ +
+
+ + + +
+
+
+ +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/agency/index.html b/templates/agency/index.html index b5ce55d..ef65e58 100644 --- a/templates/agency/index.html +++ b/templates/agency/index.html @@ -44,7 +44,7 @@ else if (isLightOrAuto && !html.classList.contains('light')) html.classList.add('light'); - + diff --git a/templates/ai-prompt/ai-chat.html b/templates/ai-prompt/ai-chat.html new file mode 100644 index 0000000..877268f --- /dev/null +++ b/templates/ai-prompt/ai-chat.html @@ -0,0 +1,1332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Chat Application AI Prompt using Tailwind CSS | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + + + + +

+ Welcome to Preline AI +

+

+ Your AI-powered copilot for the web +

+
+ + +
    + +
  • + + + + + + + + +
    +

    + How can we help? +

    +
    +

    + You can ask questions like: +

    +
      +
    • + What's Preline UI? +
    • + +
    • + How many Starter Pages & Examples are there? +
    • + +
    • + Is there a PRO version? +
    • +
    +
    +
    + +
  • + + + +
  • +
    + +
    +

    + what's preline ui? +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework. +

    +
    +

    + Here're some links to get started +

    + +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + what's preline ui figma? +

    +
    + +
    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI Figma is the largest free design system for Figma, crafted with Tailwind CSS styles and Preline UI components with extra top-notch additions. +

    +
    +

    + With the features like: +

    +
      +
    • + 12-column Grid System +
    • + +
    • + Easily find UI elements +
    • + +
    • + Variants and Properties +
    • + +
    • + Tailwind CSS Color styles +
    • + +
    • + Auto layout and constraints +
    • +
    +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + create a table example with preline using avatars, badges and progress bars +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Hold on a sec... +

    +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + Name + +
    +
    +
    + + Status + +
    +
    +
    + + Portfolio + +
    +
    +
    + + Created + +
    +
    +
    +
    + Avatar +
    + Christina Bersh + christina@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 1/5 +
    +
    +
    +
    +
    +
    +
    + 28 Dec, 12:12 +
    +
    +
    +
    + Avatar +
    + David Harrison + david@site.com +
    +
    +
    +
    +
    + + + + + Warning + +
    +
    +
    +
    + 3/5 +
    +
    +
    +
    +
    +
    +
    + 20 Dec, 09:27 +
    +
    +
    +
    + + A + +
    + Anne Richard + anne@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 5/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + Avatar +
    + Samia Kartoon + samia@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 0/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + show me the code +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Of course! +

    +
    + + +
    <table class="min-w-full divide-y divide-gray-200 dark:divide-neutral-700"> <thead class="bg-gray-50 dark:bg-neutral-800"> ...
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + quiz me about tailwindcss +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Sure! +

    +
    + + +
    + + + +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + generate 3-dimensional abstract images +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Here you go... +

    +
    + + +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    + +
    +

    + what's tailwindcss? +

    +
    + +
    + + + AZ + +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Tailwind CSS is an open source CSS framework. The main feature of this library is that, unlike other CSS frameworks like Bootstrap, it does not provide a series of predefined classes for elements such as buttons or tables. +

    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + +
    +
    +
  • + + + +
  • +
    + +
    +

    + 2 files uploaded +

    +
    + + +
      +
    • +
      + + resume_web_ui_developer.csv + + +
      +
    • +
    • +
      + + coverletter_web_ui_developer.pdf + + +
      +
    • +
    +
    + + + AZ + +
  • + +
+
+ +
+ +
+
+ + + +
+ + +
+ + + +
+
+ +
+ + + + + + + +
+ + + +
+ + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/templates/ai-prompt/ai-classic.html b/templates/ai-prompt/ai-classic.html new file mode 100644 index 0000000..fe16cec --- /dev/null +++ b/templates/ai-prompt/ai-classic.html @@ -0,0 +1,1334 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Classic Application AI Prompt using Tailwind CSS | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + + + + +

+ Welcome to Preline AI +

+

+ Your AI-powered copilot for the web +

+
+ + +
    + +
  • + + + + + + + +
    +

    + How can we help? +

    +
    +

    + You can ask questions like: +

    +
      +
    • + What's Preline UI? +
    • + +
    • + How many Starter Pages & Examples are there? +
    • + +
    • + Is there a PRO version? +
    • +
    +
    +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's preline ui? +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework. +

    +
    +

    + Here're some links to get started +

    + +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's preline ui figma? +

    +
    + +
    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI Figma is the largest free design system for Figma, crafted with Tailwind CSS styles and Preline UI components with extra top-notch additions. +

    +
    +

    + With the features like: +

    +
      +
    • + 12-column Grid System +
    • + +
    • + Easily find UI elements +
    • + +
    • + Variants and Properties +
    • + +
    • + Tailwind CSS Color styles +
    • + +
    • + Auto layout and constraints +
    • +
    +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + create a table example with preline using avatars, badges and progress bars +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Hold on a sec... +

    +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + Name + +
    +
    +
    + + Status + +
    +
    +
    + + Portfolio + +
    +
    +
    + + Created + +
    +
    +
    +
    + Avatar +
    + Christina Bersh + christina@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 1/5 +
    +
    +
    +
    +
    +
    +
    + 28 Dec, 12:12 +
    +
    +
    +
    + Avatar +
    + David Harrison + david@site.com +
    +
    +
    +
    +
    + + + + + Warning + +
    +
    +
    +
    + 3/5 +
    +
    +
    +
    +
    +
    +
    + 20 Dec, 09:27 +
    +
    +
    +
    + + A + +
    + Anne Richard + anne@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 5/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + Avatar +
    + Samia Kartoon + samia@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 0/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + show me the code +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Of course! +

    +
    + + +
    <table class="min-w-full divide-y divide-gray-200 dark:divide-neutral-700"> <thead class="bg-gray-50 dark:bg-neutral-800"> ...
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + quiz me about tailwindcss +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Sure! +

    +
    + + +
    + + + +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + generate 3-dimensional abstract images +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Here you go... +

    +
    + + +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's tailwindcss? +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Tailwind CSS is an open source CSS framework. The main feature of this library is that, unlike other CSS frameworks like Bootstrap, it does not provide a series of predefined classes for elements such as buttons or tables. +

    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    +
    +
    + + +
    +
    +
    +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + 2 files uploaded +

    + +
      +
    • +
      + + resume_web_ui_developer.csv + + +
      +
    • +
    • +
      + + coverletter_web_ui_developer.pdf + + +
      +
    • +
    +
    +
    +
    +
  • + +
+
+ +
+ +
+
+ + + +
+ + +
+ + + +
+
+ +
+ + + + + + + +
+ + + +
+ + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/templates/ai-prompt/ai-welcome-page.html b/templates/ai-prompt/ai-welcome-page.html new file mode 100644 index 0000000..b241c3c --- /dev/null +++ b/templates/ai-prompt/ai-welcome-page.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Welcome Page Application AI Prompt using Tailwind CSS | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + +

+ Welcome to Preline AI +

+

+ Your AI-powered copilot for the web +

+
+ + +
+
+ +
+ + +
+
+
+ +
+ +
+

© 2024 Preline Labs.

+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/templates/ai-prompt/ai-with-sidebar.html b/templates/ai-prompt/ai-with-sidebar.html new file mode 100644 index 0000000..b9165ee --- /dev/null +++ b/templates/ai-prompt/ai-with-sidebar.html @@ -0,0 +1,1409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Sidebar Application AI Prompt using Tailwind CSS | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+

+ Welcome to Preline AI +

+

+ Your AI-powered copilot for the web +

+
+ + +
    + +
  • + + + + + + + +
    +

    + How can we help? +

    +
    +

    + You can ask questions like: +

    +
      +
    • + What's Preline UI? +
    • + +
    • + How many Starter Pages & Examples are there? +
    • + +
    • + Is there a PRO version? +
    • +
    +
    +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's preline ui? +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework. +

    +
    +

    + Here're some links to get started +

    + +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's preline ui figma? +

    +
    + +
    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Preline UI Figma is the largest free design system for Figma, crafted with Tailwind CSS styles and Preline UI components with extra top-notch additions. +

    +
    +

    + With the features like: +

    +
      +
    • + 12-column Grid System +
    • + +
    • + Easily find UI elements +
    • + +
    • + Variants and Properties +
    • + +
    • + Tailwind CSS Color styles +
    • + +
    • + Auto layout and constraints +
    • +
    +
    +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + create a table example with preline using avatars, badges and progress bars +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Hold on a sec... +

    +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + Name + +
    +
    +
    + + Status + +
    +
    +
    + + Portfolio + +
    +
    +
    + + Created + +
    +
    +
    +
    + Avatar +
    + Christina Bersh + christina@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 1/5 +
    +
    +
    +
    +
    +
    +
    + 28 Dec, 12:12 +
    +
    +
    +
    + Avatar +
    + David Harrison + david@site.com +
    +
    +
    +
    +
    + + + + + Warning + +
    +
    +
    +
    + 3/5 +
    +
    +
    +
    +
    +
    +
    + 20 Dec, 09:27 +
    +
    +
    +
    + + A + +
    + Anne Richard + anne@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 5/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + Avatar +
    + Samia Kartoon + samia@site.com +
    +
    +
    +
    +
    + + + + + Active + +
    +
    +
    +
    + 0/5 +
    +
    +
    +
    +
    +
    +
    + 18 Dec, 15:20 +
    +
    +
    +
    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + show me the code +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Of course! +

    +
    + + +
    <table class="min-w-full divide-y divide-gray-200 dark:divide-neutral-700"> <thead class="bg-gray-50 dark:bg-neutral-800"> ...
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + quiz me about tailwindcss +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Sure! +

    +
    + + +
    + + + +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + generate 3-dimensional abstract images +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Here you go... +

    +
    + + +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + Deep Learning +
    +
    + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + what's tailwindcss? +

    +
    +
    +
    +
  • + + + +
  • + + + + + + + +
    + +
    +

    + Tailwind CSS is an open source CSS framework. The main feature of this library is that, unlike other CSS frameworks like Bootstrap, it does not provide a series of predefined classes for elements such as buttons or tables. +

    + +
    + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +
    + +
    +
  • + + + +
  • +
    +
    +
    +
    + + +
    +
    +
    +
    +
  • + + + +
  • +
    +
    + + AZ + + +
    +

    + 2 files uploaded +

    + +
      +
    • +
      + + resume_web_ui_developer.csv + + +
      +
    • +
    • +
      + + coverletter_web_ui_developer.pdf + + +
      +
    • +
    +
    +
    +
    +
  • + +
+
+ + +
+
+ + + +
+ + +
+ + + +
+
+ +
+ + + + + + + +
+ + + +
+ + + + + + + +
+ +
+
+ +
+ +
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/templates/creative-agency/index.html b/templates/creative-agency/index.html index 451e254..3b1ff72 100644 --- a/templates/creative-agency/index.html +++ b/templates/creative-agency/index.html @@ -44,7 +44,7 @@ else if (isLightOrAuto && !html.classList.contains('light')) html.classList.add('light'); - + diff --git a/templates/personal/index.html b/templates/personal/index.html new file mode 100644 index 0000000..cd1e0c5 --- /dev/null +++ b/templates/personal/index.html @@ -0,0 +1,889 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Personal Tailwind CSS Template | Preline UI, crafted with Tailwind CSS + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+ +
+
+ Avatar +
+ +
+

+ Eliana Garcia +

+

+ Graphic Designer, Web designer/developer +

+
+
+ + + +
+

+ I am a seasoned graphic designer with over 14 years of experience in creating visually appealing and user-centric designs. My expertise spans across UI design, design systems, and custom illustrations, helping clients bring their digital visions to life. +

+ +

+ Currently, I work remotely for Notion, where I design template UIs, convert them into HTML and CSS, and provide comprehensive support to our users. I am passionate about crafting elegant and functional designs that enhance user experiences. +

+ + +
+ + + + + + + +
+

+ Testimonials +

+ + +
+
+ +
+ I'm absolutely floored by the level of care and attention to detail Eliana has put into this project and for one can guarantee that we will be a return customer. + +
+
+ Avatar +
+
Josh Grazioso
+
+
+
+
+ +
+ +
+ +
+ To say that hiring Eliana has been life-changing is an understatement. My business has tripled and I got my life back. + +
+
+ Avatar +
+
Nicole Grazioso
+
+
+
+
+ +
+
+ +
+ + + +
+

+ Skills +

+ + +
+
+
+ Design Tools: +
+
+
    +
  • + + + + + + + + Figma +
  • +
  • + + + + Sketch +
  • +
+
+
+ +
+
+ Development: +
+
+
    +
  • + + + + + + + HTML +
  • +
  • + + + + + + + CSS +
  • +
  • + + + + Tailwind CSS +
  • +
  • + + + + + React +
  • +
  • + + + + + Vue +
  • +
+
+
+ +
+
+ Collaboration: +
+
+
    +
  • + + + + + Notion +
  • +
  • + + + + + Mailchimp +
  • +
  • + + + + + + + Slack +
  • +
+
+
+ +
+
+ Design Expertise: +
+
+
    +
  • + UI/UX Design +
  • +
  • + Design Systems +
  • +
  • + Custom Illustrations +
  • +
  • + Responsive Design +
  • +
+
+
+ +
+
+ Soft Skills: +
+
+
    +
  • + Strong communication +
  • +
  • + Problem-solving +
  • +
  • + Attention to detail +
  • +
  • + Time management +
  • +
+
+
+
+ +
+ + + +
+

+ Work experience +

+ + +
+ +
+ +
+
+ + + + +
+
+ + + +
+

+ 2023 - Present +

+ +

+ Web Designer & Web Developer +

+ +

+ The company has high expectations and using OKRs there is a mutual understanding of expectations and performance. +

+ +
    +
  • + Designed template UIs and design systems in Figma. +
  • +
  • + Converted UIs into responsive HTML and CSS with a mobile-first approach. +
  • +
  • + Created custom illustrations and item description banners. +
  • +
  • + Provided detailed documentation and customer support on GitHub. +
  • +
  • + Engaged with users to address setup inquiries, bug issues, and feedback. +
  • +
+
+ +
+ + + +
+ +
+
+ + + + + + + + + + + + +
+
+ + + +
+

+ 2021 - 2023 +

+ +

+ Senior Software Engineer at Mailchimp +

+ +

+ This is an excellent company and they reward their employees. It's becoming a big company but it's still private, so the culture is as good as it gets at 1,000+ employees if you ask me. Managers are still adapting to the growth I think, but everyone has to. Great place to work. +

+ + +
+ +
+ + + +
+ +
+
+ + + + + + +
+
+ + + +
+

+ 2011 - 2021 +

+ +

+ Junior Software Engineer at Slack +

+ +

+ Work in Slack is one of the beautiful experience I can do in my entire life. There are a lot of interesting thing to learn and manager respect your time and your personality. +

+
+ +
+ + + +
+ +
+
+ + + + + + +
+
+ + + +
+

+ 2010 - 2011 +

+ +

+ Freelance Graphic Designer +

+ +
    +
  • + Worked with a diverse range of clients, delivering tailored design solutions. +
  • +
  • + Developed and maintained strong client relationships through effective communication and project management. +
  • +
  • + Utilized tools such as Notion for project tracking, Mailchimp for email marketing designs, Slack for team collaboration, and GitHub for version control and project sharing. +
  • +
+
+ +
+ +
+ +
+ + + +
+

+ Education +

+ + +
+
+ + + + + + + + + + + + + + + + + + +

+ 2012 - 2013 +

+ +

+ Master's degree in Computer Software Engineering +

+ +

+ The University of Manchester +

+
+ +
+ + + + + + + + +

+ 2009 - 2012 +

+ +

+ Bachelor's degree in Computer Software Engineering +

+ +

+ Harvard University +

+
+
+ +
+ + + +
+

+ Articles +

+ + +
    +
  • +

    + 2024 +

    +
    + The complete guide to OKRs +
    +

    + How to make objectives and key results work for your company. +

    +

    + + Continue reading + +

    +
  • + +
  • +

    + 2024 +

    +
    + Enhancement in Customer Engagement +
    +

    + With the aim of optimizing customer interactions and boosting brand loyalty, the team at Preline leveraged Mailchimp's powerful tools and expertise to deliver exceptional results. +

    +

    + + Continue reading + +

    +
  • + +
  • +

    + 2023 +

    +
    + How Google Assistant now helps you record stories for kids +
    +

    + Google is constantly updating its consumer AI, Google Assistant, with new features. +

    +

    + + Continue reading + +

    +
  • +
+ +
+ + + +
+

+ Subscribe +

+ + +
+
+
+ +
+ + + + +
+ +
+ + Join + + + + + +
+

+ No spam, unsubscribe at any time. +

+
+ +
+ +
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 741a426..708fe43 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,9 @@ module.exports = { collapse: './src/plugins/collapse/index.ts', combobox: './src/plugins/combobox/index.ts', 'copy-markup': './src/plugins/copy-markup/index.ts', + datatable: './src/plugins/datatable/index.ts', dropdown: './src/plugins/dropdown/index.ts', + 'file-upload': './src/plugins/file-upload/index.ts', 'input-number': './src/plugins/input-number/index.ts', overlay: './src/plugins/overlay/index.ts', 'pin-input': './src/plugins/pin-input/index.ts', @@ -41,6 +43,9 @@ module.exports = { }, externals: { jquery: 'jQuery', + lodash: '_', + 'datatable.net-dt': 'DataTable', + dropzone: 'Dropzone', }, optimization: { minimize: true, @@ -49,5 +54,5 @@ module.exports = { extractComments: false, }), ], - } + }, };