{"version":3,"file":"index.js","sources":["../../../node_modules/vanilla-lazyload/dist/lazyload.esm.js","../../../node_modules/preline/src/utils/index.ts","../../../node_modules/preline/src/plugins/base-plugin/index.ts","../../../node_modules/preline/src/plugins/copy-markup/index.ts","../../../node_modules/preline/src/plugins/accordion/index.ts","../../../node_modules/preline/src/plugins/carousel/index.ts","../../../node_modules/preline/src/plugins/collapse/index.ts","../../../node_modules/preline/src/constants.ts","../../../node_modules/preline/src/plugins/combobox/index.ts","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/preline/src/plugins/dropdown/index.ts","../../../node_modules/preline/src/plugins/input-number/index.ts","../../../node_modules/preline/src/plugins/overlay/index.ts","../../../node_modules/preline/src/plugins/pin-input/index.ts","../../../node_modules/preline/src/plugins/remove-element/index.ts","../../../node_modules/preline/src/plugins/scrollspy/index.ts","../../../node_modules/preline/src/plugins/select/index.ts","../../../node_modules/preline/src/plugins/stepper/index.ts","../../../node_modules/preline/src/plugins/strong-password/index.ts","../../../node_modules/preline/src/plugins/tabs/index.ts","../../../node_modules/preline/src/plugins/theme-switch/index.ts","../../../node_modules/preline/src/plugins/toggle-count/index.ts","../../../node_modules/preline/src/plugins/toggle-password/index.ts","../../../node_modules/preline/src/plugins/tooltip/index.ts","../../../node_modules/preline/src/plugins/datatable/index.ts","../../../node_modules/preline/src/plugins/file-upload/index.ts","../../../node_modules/preline/src/spa/index.ts","../../../node_modules/preline/src/static/index.ts","../../../node_modules/preline/src/index.ts","../../../node_modules/@preline/select/index.js","../../../src/ts/FormDataWithToken.ts","../../../src/ts/formatters.ts","../../../src/ts/SearchRates.ts","../../../src/ts/SimpleValidate.ts","../../../src/ts/handle-trade-values.ts","../../../src/ts/handle-mobile-nav.ts","../../../src/ts/handle-scroll-spy.ts","../../../src/ts/handle-scroll-to.ts","../../../src/ts/handle-show-hide-car-make-model.ts","../../../src/ts/handle-show-more.ts","../../../node_modules/swiper/shared/ssr-window.esm.mjs","../../../node_modules/swiper/shared/utils.mjs","../../../node_modules/swiper/shared/swiper-core.mjs","../../../node_modules/swiper/shared/create-element-if-not-defined.mjs","../../../node_modules/swiper/modules/navigation.mjs","../../../node_modules/swiper/shared/classes-to-selector.mjs","../../../node_modules/swiper/modules/pagination.mjs","../../../node_modules/swiper/modules/thumbs.mjs","../../../src/ts/Cars4SalePage.ts","../../../src/ts/handle-toggle-car-favourite.ts","../../../src/ts/handle-submit-loan.ts","../../../src/ts/handle-detail-swipers.ts","../../../src/ts/handle-filters.ts","../../../src/ts/standard-lead-submission.ts","../../../src/ts/InputMask.ts","../../../src/ts/RangeSlider.ts","../../../src/ts/toggle.ts","../../../src/ts/SimpleWizard.ts","../../../src/ts/SimpleModal.ts","../../../src/ts/sync-text.ts","../../../src/ts/check-credit.ts","../../../src/js/htmx.min.js","../../../src/main.ts"],"sourcesContent":["const runningOnBrowser = typeof window !== \"undefined\";\n\nconst isBot =\n (runningOnBrowser && !(\"onscroll\" in window)) ||\n (typeof navigator !== \"undefined\" && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent));\n\nconst supportsIntersectionObserver = runningOnBrowser && \"IntersectionObserver\" in window;\n\nconst supportsClassList = runningOnBrowser && \"classList\" in document.createElement(\"p\");\n\nconst isHiDpi = runningOnBrowser && window.devicePixelRatio > 1;\n\nconst defaultSettings = {\n elements_selector: \".lazy\",\n container: isBot || runningOnBrowser ? document : null,\n threshold: 300,\n thresholds: null,\n data_src: \"src\",\n data_srcset: \"srcset\",\n data_sizes: \"sizes\",\n data_bg: \"bg\",\n data_bg_hidpi: \"bg-hidpi\",\n data_bg_multi: \"bg-multi\",\n data_bg_multi_hidpi: \"bg-multi-hidpi\",\n data_bg_set: \"bg-set\",\n data_poster: \"poster\",\n class_applied: \"applied\",\n class_loading: \"loading\",\n class_loaded: \"loaded\",\n class_error: \"error\",\n class_entered: \"entered\",\n class_exited: \"exited\",\n unobserve_completed: true,\n unobserve_entered: false,\n cancel_on_exit: true,\n callback_enter: null,\n callback_exit: null,\n callback_applied: null,\n callback_loading: null,\n callback_loaded: null,\n callback_error: null,\n callback_finish: null,\n callback_cancel: null,\n use_native: false,\n restore_on_error: false\n};\n\nconst getExtendedSettings = (customSettings) => {\n return Object.assign({}, defaultSettings, customSettings);\n};\n\n/* Creates instance and notifies it through the window element */\nconst createInstance = function(classObj, options) {\n let event;\n const eventString = \"LazyLoad::Initialized\";\n const instance = new classObj(options);\n try {\n // Works in modern browsers\n event = new CustomEvent(eventString, { detail: { instance } });\n } catch (err) {\n // Works in Internet Explorer (all versions)\n event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventString, false, false, { instance });\n }\n window.dispatchEvent(event);\n};\n\n/* Auto initialization of one or more instances of LazyLoad, depending on the\n options passed in (plain object or an array) */\nconst autoInitialize = (classObj, options) => {\n if (!options) {\n return;\n }\n if (!options.length) {\n // Plain object\n createInstance(classObj, options);\n } else {\n // Array of objects\n for (let i = 0, optionsItem; (optionsItem = options[i]); i += 1) {\n createInstance(classObj, optionsItem);\n }\n }\n};\n\nconst SRC = \"src\";\nconst SRCSET = \"srcset\";\nconst SIZES = \"sizes\";\nconst POSTER = \"poster\";\nconst ORIGINALS = \"llOriginalAttrs\";\nconst DATA = \"data\";\n\nconst statusLoading = \"loading\";\nconst statusLoaded = \"loaded\";\nconst statusApplied = \"applied\";\nconst statusEntered = \"entered\";\nconst statusError = \"error\";\nconst statusNative = \"native\";\n\nconst dataPrefix = \"data-\";\nconst statusDataName = \"ll-status\";\n\nconst getData = (element, attribute) => {\n return element.getAttribute(dataPrefix + attribute);\n};\n\nconst setData = (element, attribute, value) => {\n const attrName = dataPrefix + attribute;\n if (value === null) {\n element.removeAttribute(attrName);\n return;\n }\n element.setAttribute(attrName, value);\n};\n\nconst getStatus = (element) => getData(element, statusDataName);\nconst setStatus = (element, status) => setData(element, statusDataName, status);\nconst resetStatus = (element) => setStatus(element, null);\n\nconst hasEmptyStatus = (element) => getStatus(element) === null;\nconst hasStatusLoading = (element) => getStatus(element) === statusLoading;\nconst hasStatusError = (element) => getStatus(element) === statusError;\nconst hasStatusNative = (element) => getStatus(element) === statusNative;\n\nconst statusesAfterLoading = [statusLoading, statusLoaded, statusApplied, statusError];\nconst hadStartedLoading = (element) => statusesAfterLoading.indexOf(getStatus(element)) >= 0;\n\nconst safeCallback = (callback, arg1, arg2, arg3) => {\n if (!callback || typeof callback !== 'function') {\n return;\n } \n if (arg3 !== undefined) {\n callback(arg1, arg2, arg3);\n return;\n }\n if (arg2 !== undefined) {\n callback(arg1, arg2);\n return;\n }\n callback(arg1);\n};\n\nconst addClass = (element, className) => {\n if (supportsClassList) {\n element.classList.add(className);\n return;\n }\n element.className += (element.className ? \" \" : \"\") + className;\n};\n\nconst removeClass = (element, className) => {\n if (supportsClassList) {\n element.classList.remove(className);\n return;\n }\n element.className = element.className.replace(new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), \" \").replace(/^\\s+/, \"\").replace(/\\s+$/, \"\");\n};\n\nconst addTempImage = (element) => {\n element.llTempImage = document.createElement(\"IMG\");\n};\n\nconst deleteTempImage = (element) => {\n delete element.llTempImage;\n};\n\nconst getTempImage = (element) => element.llTempImage;\n\nconst unobserve = (element, instance) => {\n if (!instance) return;\n const observer = instance._observer;\n if (!observer) return;\n observer.unobserve(element);\n};\n\nconst resetObserver = (observer) => {\n observer.disconnect();\n};\n\nconst unobserveEntered = (element, settings, instance) => {\n if (settings.unobserve_entered) unobserve(element, instance);\n};\n\nconst updateLoadingCount = (instance, delta) => {\n if (!instance) return;\n instance.loadingCount += delta;\n};\n\nconst decreaseToLoadCount = (instance) => {\n if (!instance) return;\n instance.toLoadCount -= 1;\n};\n\nconst setToLoadCount = (instance, value) => {\n if (!instance) return;\n instance.toLoadCount = value;\n};\n\nconst isSomethingLoading = (instance) => instance.loadingCount > 0;\n\nconst haveElementsToLoad = (instance) => instance.toLoadCount > 0;\n\nconst getSourceTags = (parentTag) => {\n let sourceTags = [];\n for (let i = 0, childTag; (childTag = parentTag.children[i]); i += 1) {\n if (childTag.tagName === \"SOURCE\") {\n sourceTags.push(childTag);\n }\n }\n return sourceTags;\n};\n\nconst forEachPictureSource = (element, fn) => {\n const parent = element.parentNode;\n if (!parent || parent.tagName !== \"PICTURE\") {\n return;\n }\n let sourceTags = getSourceTags(parent);\n sourceTags.forEach(fn);\n};\n\nconst forEachVideoSource = (element, fn) => {\n let sourceTags = getSourceTags(element);\n sourceTags.forEach(fn);\n};\n\nconst attrsSrc = [SRC];\nconst attrsSrcPoster = [SRC, POSTER];\nconst attrsSrcSrcsetSizes = [SRC, SRCSET, SIZES];\nconst attrsData = [DATA];\n\nconst hasOriginalAttrs = (element) => !!element[ORIGINALS];\nconst getOriginalAttrs = (element) => element[ORIGINALS];\nconst deleteOriginalAttrs = (element) => delete element[ORIGINALS];\n\n// ## SAVE ##\n\nconst setOriginalsObject = (element, attributes) => {\n if (hasOriginalAttrs(element)) {\n return;\n }\n const originals = {};\n attributes.forEach((attribute) => {\n originals[attribute] = element.getAttribute(attribute);\n });\n element[ORIGINALS] = originals;\n};\n\nconst saveOriginalBackgroundStyle = (element) => {\n if (hasOriginalAttrs(element)) {\n return;\n }\n element[ORIGINALS] = { backgroundImage: element.style.backgroundImage };\n};\n\n// ## RESTORE ##\n\nconst setOrResetAttribute = (element, attrName, value) => {\n if (!value) {\n element.removeAttribute(attrName);\n return;\n }\n element.setAttribute(attrName, value);\n};\n\nconst restoreOriginalAttrs = (element, attributes) => {\n if (!hasOriginalAttrs(element)) {\n return;\n }\n const originals = getOriginalAttrs(element);\n attributes.forEach((attribute) => {\n setOrResetAttribute(element, attribute, originals[attribute]);\n });\n};\n\nconst restoreOriginalBgImage = (element) => {\n if (!hasOriginalAttrs(element)) {\n return;\n }\n const originals = getOriginalAttrs(element);\n element.style.backgroundImage = originals.backgroundImage;\n};\n\nconst manageApplied = (element, settings, instance) => {\n addClass(element, settings.class_applied);\n setStatus(element, statusApplied);\n // Instance is not provided when loading is called from static class\n if (!instance) return;\n if (settings.unobserve_completed) {\n // Unobserve now because we can't do it on load\n unobserve(element, settings);\n }\n safeCallback(settings.callback_applied, element, instance);\n};\n\nconst manageLoading = (element, settings, instance) => {\n addClass(element, settings.class_loading);\n setStatus(element, statusLoading);\n // Instance is not provided when loading is called from static class\n if (!instance) return;\n updateLoadingCount(instance, +1);\n safeCallback(settings.callback_loading, element, instance);\n};\n\nconst setAttributeIfValue = (element, attrName, value) => {\n if (!value) {\n return;\n }\n element.setAttribute(attrName, value);\n};\n\nconst setImageAttributes = (element, settings) => {\n setAttributeIfValue(element, SIZES, getData(element, settings.data_sizes));\n setAttributeIfValue(element, SRCSET, getData(element, settings.data_srcset));\n setAttributeIfValue(element, SRC, getData(element, settings.data_src));\n};\n\nconst setSourcesImg = (imgEl, settings) => {\n forEachPictureSource(imgEl, (sourceTag) => {\n setOriginalsObject(sourceTag, attrsSrcSrcsetSizes);\n setImageAttributes(sourceTag, settings);\n });\n setOriginalsObject(imgEl, attrsSrcSrcsetSizes);\n setImageAttributes(imgEl, settings);\n};\n\nconst setSourcesIframe = (iframe, settings) => {\n setOriginalsObject(iframe, attrsSrc);\n setAttributeIfValue(iframe, SRC, getData(iframe, settings.data_src));\n};\n\nconst setSourcesVideo = (videoEl, settings) => {\n forEachVideoSource(videoEl, (sourceEl) => {\n setOriginalsObject(sourceEl, attrsSrc);\n setAttributeIfValue(sourceEl, SRC, getData(sourceEl, settings.data_src));\n });\n setOriginalsObject(videoEl, attrsSrcPoster);\n\n setAttributeIfValue(videoEl, POSTER, getData(videoEl, settings.data_poster));\n setAttributeIfValue(videoEl, SRC, getData(videoEl, settings.data_src));\n videoEl.load();\n};\n\nconst setSourcesObject = (object, settings) => {\n setOriginalsObject(object, attrsData);\n setAttributeIfValue(object, DATA, getData(object, settings.data_src));\n};\n\nconst setBackground = (element, settings, instance) => {\n const bg1xValue = getData(element, settings.data_bg);\n const bgHiDpiValue = getData(element, settings.data_bg_hidpi);\n const bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;\n if (!bgDataValue) return;\n element.style.backgroundImage = `url(\"${bgDataValue}\")`;\n getTempImage(element).setAttribute(SRC, bgDataValue);\n manageLoading(element, settings, instance);\n};\n\n// NOTE: THE TEMP IMAGE TRICK CANNOT BE DONE WITH data-multi-bg\n// BECAUSE INSIDE ITS VALUES MUST BE WRAPPED WITH URL() AND ONE OF THEM\n// COULD BE A GRADIENT BACKGROUND IMAGE\nconst setMultiBackground = (element, settings, instance) => {\n const bg1xValue = getData(element, settings.data_bg_multi);\n const bgHiDpiValue = getData(element, settings.data_bg_multi_hidpi);\n const bgDataValue = isHiDpi && bgHiDpiValue ? bgHiDpiValue : bg1xValue;\n if (!bgDataValue) {\n return;\n }\n element.style.backgroundImage = bgDataValue;\n manageApplied(element, settings, instance);\n};\n\nconst setImgsetBackground = (element, settings, instance) => {\n const bgImgSetDataValue = getData(element, settings.data_bg_set);\n if (!bgImgSetDataValue) {\n return;\n }\n const imgSetValues = bgImgSetDataValue.split(\"|\");\n let bgImageValues = imgSetValues.map((value) => `image-set(${value})`);\n element.style.backgroundImage = bgImageValues.join();\n // Temporary fix for Chromeium with the -webkit- prefix\n if (element.style.backgroundImage === \"\") {\n bgImageValues = imgSetValues.map((value) => `-webkit-image-set(${value})`);\n element.style.backgroundImage = bgImageValues.join();\n }\n manageApplied(element, settings, instance);\n};\n\nconst setSourcesFunctions = {\n IMG: setSourcesImg,\n IFRAME: setSourcesIframe,\n VIDEO: setSourcesVideo,\n OBJECT: setSourcesObject\n};\n\nconst setSourcesNative = (element, settings) => {\n const setSourcesFunction = setSourcesFunctions[element.tagName];\n if (!setSourcesFunction) {\n return;\n }\n setSourcesFunction(element, settings);\n};\n\nconst setSources = (element, settings, instance) => {\n const setSourcesFunction = setSourcesFunctions[element.tagName];\n if (!setSourcesFunction) {\n return;\n }\n setSourcesFunction(element, settings);\n manageLoading(element, settings, instance);\n};\n\nconst elementsWithLoadEvent = [\"IMG\", \"IFRAME\", \"VIDEO\", \"OBJECT\"];\nconst hasLoadEvent = (element) => elementsWithLoadEvent.indexOf(element.tagName) > -1;\n\nconst checkFinish = (settings, instance) => {\n if (instance && !isSomethingLoading(instance) && !haveElementsToLoad(instance)) {\n safeCallback(settings.callback_finish, instance);\n }\n};\n\nconst addEventListener = (element, eventName, handler) => {\n element.addEventListener(eventName, handler);\n element.llEvLisnrs[eventName] = handler;\n};\n\nconst removeEventListener = (element, eventName, handler) => {\n element.removeEventListener(eventName, handler);\n};\n\nconst hasEventListeners = (element) => {\n return !!element.llEvLisnrs;\n};\n\nconst addEventListeners = (element, loadHandler, errorHandler) => {\n if (!hasEventListeners(element)) element.llEvLisnrs = {};\n const loadEventName = element.tagName === \"VIDEO\" ? \"loadeddata\" : \"load\";\n addEventListener(element, loadEventName, loadHandler);\n addEventListener(element, \"error\", errorHandler);\n};\n\nconst removeEventListeners = (element) => {\n if (!hasEventListeners(element)) {\n return;\n }\n const eventListeners = element.llEvLisnrs;\n for (let eventName in eventListeners) {\n const handler = eventListeners[eventName];\n removeEventListener(element, eventName, handler);\n }\n delete element.llEvLisnrs;\n};\n\nconst doneHandler = (element, settings, instance) => {\n deleteTempImage(element);\n updateLoadingCount(instance, -1);\n decreaseToLoadCount(instance);\n removeClass(element, settings.class_loading);\n if (settings.unobserve_completed) {\n unobserve(element, instance);\n }\n};\n\nconst loadHandler = (event, element, settings, instance) => {\n const goingNative = hasStatusNative(element);\n doneHandler(element, settings, instance);\n addClass(element, settings.class_loaded);\n setStatus(element, statusLoaded);\n safeCallback(settings.callback_loaded, element, instance);\n if (!goingNative) checkFinish(settings, instance);\n};\n\nconst errorHandler = (event, element, settings, instance) => {\n const goingNative = hasStatusNative(element);\n doneHandler(element, settings, instance);\n addClass(element, settings.class_error);\n setStatus(element, statusError);\n safeCallback(settings.callback_error, element, instance);\n if (settings.restore_on_error) restoreOriginalAttrs(element, attrsSrcSrcsetSizes);\n if (!goingNative) checkFinish(settings, instance);\n};\n\nconst addOneShotEventListeners = (element, settings, instance) => {\n const elementToListenTo = getTempImage(element) || element;\n if (hasEventListeners(elementToListenTo)) {\n // This happens when loading is retried twice\n return;\n }\n const _loadHandler = (event) => {\n loadHandler(event, element, settings, instance);\n removeEventListeners(elementToListenTo);\n };\n const _errorHandler = (event) => {\n errorHandler(event, element, settings, instance);\n removeEventListeners(elementToListenTo);\n };\n addEventListeners(elementToListenTo, _loadHandler, _errorHandler);\n};\n\nconst loadBackground = (element, settings, instance) => {\n addTempImage(element);\n addOneShotEventListeners(element, settings, instance);\n saveOriginalBackgroundStyle(element);\n setBackground(element, settings, instance);\n setMultiBackground(element, settings, instance);\n setImgsetBackground(element, settings, instance);\n};\n\nconst loadRegular = (element, settings, instance) => {\n addOneShotEventListeners(element, settings, instance);\n setSources(element, settings, instance);\n};\n\nconst load = (element, settings, instance) => {\n if (hasLoadEvent(element)) {\n loadRegular(element, settings, instance);\n } else {\n loadBackground(element, settings, instance);\n }\n};\n\nconst loadNative = (element, settings, instance) => {\n element.setAttribute(\"loading\", \"lazy\");\n addOneShotEventListeners(element, settings, instance);\n setSourcesNative(element, settings);\n setStatus(element, statusNative);\n};\n\nconst removeImageAttributes = (element) => {\n element.removeAttribute(SRC);\n element.removeAttribute(SRCSET);\n element.removeAttribute(SIZES);\n};\n\nconst resetSourcesImg = (element) => {\n forEachPictureSource(element, (sourceTag) => {\n removeImageAttributes(sourceTag);\n });\n removeImageAttributes(element);\n};\n\nconst restoreImg = (imgEl) => {\n forEachPictureSource(imgEl, (sourceEl) => {\n restoreOriginalAttrs(sourceEl, attrsSrcSrcsetSizes);\n });\n restoreOriginalAttrs(imgEl, attrsSrcSrcsetSizes);\n};\n\nconst restoreVideo = (videoEl) => {\n forEachVideoSource(videoEl, (sourceEl) => {\n restoreOriginalAttrs(sourceEl, attrsSrc);\n });\n restoreOriginalAttrs(videoEl, attrsSrcPoster);\n videoEl.load();\n};\n\nconst restoreIframe = (iframeEl) => {\n restoreOriginalAttrs(iframeEl, attrsSrc);\n};\n\nconst restoreObject = (objectEl) => {\n restoreOriginalAttrs(objectEl, attrsData);\n};\n\nconst restoreFunctions = {\n IMG: restoreImg,\n IFRAME: restoreIframe,\n VIDEO: restoreVideo,\n OBJECT: restoreObject\n};\n\nconst restoreAttributes = (element) => {\n const restoreFunction = restoreFunctions[element.tagName];\n if (!restoreFunction) {\n restoreOriginalBgImage(element);\n return;\n }\n restoreFunction(element);\n};\n\nconst resetClasses = (element, settings) => {\n if (hasEmptyStatus(element) || hasStatusNative(element)) {\n return;\n }\n removeClass(element, settings.class_entered);\n removeClass(element, settings.class_exited);\n removeClass(element, settings.class_applied);\n removeClass(element, settings.class_loading);\n removeClass(element, settings.class_loaded);\n removeClass(element, settings.class_error);\n};\n\nconst restore = (element, settings) => {\n restoreAttributes(element);\n resetClasses(element, settings);\n resetStatus(element);\n deleteOriginalAttrs(element);\n};\n\nconst cancelLoading = (element, entry, settings, instance) => {\n if (!settings.cancel_on_exit) return;\n if (!hasStatusLoading(element)) return;\n if (element.tagName !== \"IMG\") return; //Works only on images\n removeEventListeners(element);\n resetSourcesImg(element);\n restoreImg(element);\n removeClass(element, settings.class_loading);\n updateLoadingCount(instance, -1);\n resetStatus(element);\n safeCallback(settings.callback_cancel, element, entry, instance);\n};\n\nconst onEnter = (element, entry, settings, instance) => {\n const dontLoad = hadStartedLoading(element); /* Save status\n before setting it, to prevent loading it again. Fixes #526. */\n setStatus(element, statusEntered);\n addClass(element, settings.class_entered);\n removeClass(element, settings.class_exited);\n unobserveEntered(element, settings, instance);\n safeCallback(settings.callback_enter, element, entry, instance);\n if (dontLoad) return;\n load(element, settings, instance);\n};\n\nconst onExit = (element, entry, settings, instance) => {\n if (hasEmptyStatus(element)) return; //Ignore the first pass, at landing\n addClass(element, settings.class_exited);\n cancelLoading(element, entry, settings, instance);\n safeCallback(settings.callback_exit, element, entry, instance);\n};\n\nconst tagsWithNativeLazy = [\"IMG\", \"IFRAME\", \"VIDEO\"];\n\nconst shouldUseNative = (settings) =>\n settings.use_native && \"loading\" in HTMLImageElement.prototype;\n\nconst loadAllNative = (elements, settings, instance) => {\n elements.forEach((element) => {\n if (tagsWithNativeLazy.indexOf(element.tagName) === -1) {\n return;\n }\n loadNative(element, settings, instance);\n });\n setToLoadCount(instance, 0);\n};\n\nconst isIntersecting = (entry) => entry.isIntersecting || entry.intersectionRatio > 0;\n\nconst getObserverSettings = (settings) => ({\n root: settings.container === document ? null : settings.container,\n rootMargin: settings.thresholds || settings.threshold + \"px\"\n});\n\nconst intersectionHandler = (entries, settings, instance) => {\n entries.forEach((entry) =>\n isIntersecting(entry)\n ? onEnter(entry.target, entry, settings, instance)\n : onExit(entry.target, entry, settings, instance)\n );\n};\n\nconst observeElements = (observer, elements) => {\n elements.forEach((element) => {\n observer.observe(element);\n });\n};\n\nconst updateObserver = (observer, elementsToObserve) => {\n resetObserver(observer);\n observeElements(observer, elementsToObserve);\n};\n\nconst setObserver = (settings, instance) => {\n if (!supportsIntersectionObserver || shouldUseNative(settings)) {\n return;\n }\n instance._observer = new IntersectionObserver((entries) => {\n intersectionHandler(entries, settings, instance);\n }, getObserverSettings(settings));\n};\n\nconst toArray = (nodeSet) => Array.prototype.slice.call(nodeSet);\n\nconst queryElements = (settings) =>\n settings.container.querySelectorAll(settings.elements_selector);\n\nconst excludeManagedElements = (elements) => toArray(elements).filter(hasEmptyStatus);\n\nconst hasError = (element) => hasStatusError(element);\nconst filterErrorElements = (elements) => toArray(elements).filter(hasError);\n\nconst getElementsToLoad = (elements, settings) =>\n excludeManagedElements(elements || queryElements(settings));\n\nconst retryLazyLoad = (settings, instance) => {\n const errorElements = filterErrorElements(queryElements(settings));\n errorElements.forEach((element) => {\n removeClass(element, settings.class_error);\n resetStatus(element);\n });\n instance.update();\n};\n\nconst setOnlineCheck = (settings, instance) => {\n if (!runningOnBrowser) {\n return;\n }\n instance._onlineHandler = () => {\n retryLazyLoad(settings, instance);\n };\n window.addEventListener(\"online\", instance._onlineHandler);\n};\n\nconst resetOnlineCheck = (instance) => {\n if (!runningOnBrowser) {\n return;\n }\n window.removeEventListener(\"online\", instance._onlineHandler);\n};\n\nconst LazyLoad = function(customSettings, elements) {\n const settings = getExtendedSettings(customSettings);\n this._settings = settings;\n this.loadingCount = 0;\n setObserver(settings, this);\n setOnlineCheck(settings, this);\n this.update(elements);\n};\n\nLazyLoad.prototype = {\n update: function(givenNodeset) {\n const settings = this._settings;\n const elementsToLoad = getElementsToLoad(givenNodeset, settings);\n setToLoadCount(this, elementsToLoad.length);\n\n if (isBot || !supportsIntersectionObserver) {\n this.loadAll(elementsToLoad);\n return;\n }\n if (shouldUseNative(settings)) {\n loadAllNative(elementsToLoad, settings, this);\n return;\n }\n\n updateObserver(this._observer, elementsToLoad);\n },\n\n destroy: function() {\n // Observer\n if (this._observer) {\n this._observer.disconnect();\n }\n // Clean handlers\n resetOnlineCheck(this);\n // Clean custom attributes on elements\n queryElements(this._settings).forEach((element) => {\n deleteOriginalAttrs(element);\n });\n // Delete all internal props\n delete this._observer;\n delete this._settings;\n delete this._onlineHandler;\n delete this.loadingCount;\n delete this.toLoadCount;\n },\n\n loadAll: function(elements) {\n const settings = this._settings;\n const elementsToLoad = getElementsToLoad(elements, settings);\n elementsToLoad.forEach((element) => {\n unobserve(element, this);\n load(element, settings, this);\n });\n },\n\n restoreAll: function() {\n const settings = this._settings;\n queryElements(settings).forEach((element) => {\n restore(element, settings);\n });\n }\n};\n\nLazyLoad.load = (element, customSettings) => {\n const settings = getExtendedSettings(customSettings);\n load(element, settings);\n};\n\nLazyLoad.resetStatus = (element) => {\n resetStatus(element);\n};\n\n// Automatic instances creation if required (useful for async script loading)\nif (runningOnBrowser) {\n autoInitialize(LazyLoad, window.lazyLoadOptions);\n}\n\nexport { LazyLoad as default };\n","const stringToBoolean = (string: string): boolean => {\n\treturn string === 'true' ? true : false;\n};\n\nconst getClassProperty = (el: HTMLElement, prop: string, val = '') => {\n\treturn (window.getComputedStyle(el).getPropertyValue(prop) || val).replace(\n\t\t' ',\n\t\t'',\n\t);\n};\n\nconst getClassPropertyAlt = (\n\tel: HTMLElement,\n\tprop?: string,\n\tval: string = '',\n) => {\n\tlet targetClass = '';\n\n\tel.classList.forEach((c) => {\n\t\tif (c.includes(prop)) {\n\t\t\ttargetClass = c;\n\t\t}\n\t});\n\n\treturn targetClass.match(/:(.*)]/) ? targetClass.match(/:(.*)]/)[1] : val;\n};\n\nconst getZIndex = (el: HTMLElement) => {\n\tconst computedStyle = window.getComputedStyle(el);\n\tconst zIndex = computedStyle.getPropertyValue('z-index');\n\n\treturn zIndex;\n};\n\nfunction getHighestZIndex(arr: HTMLElement[]) {\n\tlet highestZIndex = Number.NEGATIVE_INFINITY;\n\n\tarr.forEach((el) => {\n\t\tlet zIndex: string | number = getZIndex(el);\n\n\t\tif (zIndex !== 'auto') {\n\t\t\tzIndex = parseInt(zIndex, 10);\n\n\t\t\tif (zIndex > highestZIndex) highestZIndex = zIndex;\n\t\t}\n\t});\n\n\treturn highestZIndex;\n}\n\nconst isIOS = () => {\n\tif (/iPad|iPhone|iPod/.test(navigator.platform)) {\n\t\treturn true;\n\t} else {\n\t\treturn (\n\t\t\tnavigator.maxTouchPoints &&\n\t\t\tnavigator.maxTouchPoints > 2 &&\n\t\t\t/MacIntel/.test(navigator.platform)\n\t\t);\n\t}\n};\n\nconst isIpadOS = () => {\n\treturn (\n\t\tnavigator.maxTouchPoints &&\n\t\tnavigator.maxTouchPoints > 2 &&\n\t\t/MacIntel/.test(navigator.platform)\n\t);\n};\n\nconst isEnoughSpace = (\n\tel: HTMLElement,\n\ttoggle: HTMLElement,\n\tpreferredPosition: 'top' | 'bottom' | 'auto' = 'auto',\n\tspace = 10,\n\twrapper: HTMLElement | null = null,\n) => {\n\tconst referenceRect = toggle.getBoundingClientRect();\n\tconst wrapperRect = wrapper ? wrapper.getBoundingClientRect() : null;\n\tconst viewportHeight = window.innerHeight;\n\tconst spaceAbove = wrapperRect\n\t\t? referenceRect.top - wrapperRect.top\n\t\t: referenceRect.top;\n\tconst spaceBelow =\n\t\t(wrapper ? wrapperRect.bottom : viewportHeight) - referenceRect.bottom;\n\tconst minimumSpaceRequired = el.clientHeight + space;\n\n\tif (preferredPosition === 'bottom') {\n\t\treturn spaceBelow >= minimumSpaceRequired;\n\t} else if (preferredPosition === 'top') {\n\t\treturn spaceAbove >= minimumSpaceRequired;\n\t} else {\n\t\treturn (\n\t\t\tspaceAbove >= minimumSpaceRequired || spaceBelow >= minimumSpaceRequired\n\t\t);\n\t}\n};\n\nconst isFormElement = (target: HTMLElement) => {\n\treturn (\n\t\ttarget instanceof HTMLInputElement ||\n\t\ttarget instanceof HTMLTextAreaElement ||\n\t\ttarget instanceof HTMLSelectElement\n\t);\n};\n\nconst isParentOrElementHidden = (element: any): any => {\n\tif (!element) return false;\n\n\tconst computedStyle = window.getComputedStyle(element);\n\n\tif (computedStyle.display === 'none') return true;\n\n\treturn isParentOrElementHidden(element.parentElement);\n};\n\nconst debounce = (func: Function, timeout = 200) => {\n\tlet timer: any;\n\n\treturn (...args: any[]) => {\n\t\tclearTimeout(timer);\n\n\t\ttimer = setTimeout(() => {\n\t\t\tfunc.apply(this, args);\n\t\t}, timeout);\n\t};\n};\n\nconst dispatch = (evt: string, element: any, payload: any = null) => {\n\tconst event = new CustomEvent(evt, {\n\t\tdetail: { payload },\n\t\tbubbles: true,\n\t\tcancelable: true,\n\t\tcomposed: false,\n\t});\n\n\telement.dispatchEvent(event);\n};\n\nconst afterTransition = (el: HTMLElement, callback: Function) => {\n\tconst handleEvent = () => {\n\t\tcallback();\n\n\t\tel.removeEventListener('transitionend', handleEvent, true);\n\t};\n\n\tconst computedStyle = window.getComputedStyle(el);\n\tconst transitionDuration = computedStyle.getPropertyValue(\n\t\t'transition-duration',\n\t);\n\tconst transitionProperty = computedStyle.getPropertyValue(\n\t\t'transition-property',\n\t);\n\tconst hasTransition =\n\t\ttransitionProperty !== 'none' && parseFloat(transitionDuration) > 0;\n\n\tif (hasTransition) el.addEventListener('transitionend', handleEvent, true);\n\telse callback();\n};\n\nconst htmlToElement = (html: string): HTMLElement => {\n\tconst template = document.createElement('template');\n\thtml = html.trim();\n\ttemplate.innerHTML = html;\n\n\treturn template.content.firstChild as HTMLElement;\n};\n\nconst classToClassList = (\n\tclasses: string,\n\ttarget: HTMLElement,\n\tsplitter = ' ',\n\taction: 'add' | 'remove' = 'add',\n) => {\n\tconst classesToArray = classes.split(splitter);\n\tclassesToArray.forEach((cl) =>\n\t\taction === 'add' ? target.classList.add(cl) : target.classList.remove(cl),\n\t);\n};\n\nconst menuSearchHistory = {\n\thistoryIndex: -1,\n\n\taddHistory(index: number) {\n\t\tthis.historyIndex = index;\n\t},\n\n\texistsInHistory(index: number) {\n\t\treturn index > this.historyIndex;\n\t},\n\n\tclearHistory() {\n\t\tthis.historyIndex = -1;\n\t},\n};\n\nexport {\n\tstringToBoolean,\n\tgetClassProperty,\n\tgetClassPropertyAlt,\n\tgetZIndex,\n\tgetHighestZIndex,\n\tisIOS,\n\tisIpadOS,\n\tisEnoughSpace,\n\tisParentOrElementHidden,\n\tisFormElement,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tclassToClassList,\n\tmenuSearchHistory,\n};\n","/*\n * HSBasePlugin\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { IBasePlugin } from './interfaces';\n\nexport default class HSBasePlugin<O, E = HTMLElement>\n\timplements IBasePlugin<O, E>\n{\n\tconstructor(\n\t\tpublic el: E,\n\t\tpublic options: O,\n\t\tpublic events?: any,\n\t) {\n\t\tthis.el = el;\n\t\tthis.options = options;\n\t\tthis.events = {};\n\t}\n\n\tpublic createCollection(collection: any[], element: any) {\n\t\tcollection.push({\n\t\t\tid: element?.el?.id || collection.length + 1,\n\t\t\telement,\n\t\t});\n\t}\n\n\tpublic fireEvent(evt: string, payload: any = null) {\n\t\tif (this.events.hasOwnProperty(evt)) return this.events[evt](payload);\n\t}\n\n\tpublic on(evt: string, cb: Function) {\n\t\tthis.events[evt] = cb;\n\t}\n}\n","/*\n * HSCopyMarkup\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { ICopyMarkupOptions, ICopyMarkup } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSCopyMarkup\n\textends HSBasePlugin<ICopyMarkupOptions>\n\timplements ICopyMarkup\n{\n\tprivate readonly targetSelector: string | null;\n\tprivate readonly wrapperSelector: string | null;\n\tprivate readonly limit: number | null;\n\n\tprivate target: HTMLElement | null;\n\tprivate wrapper: HTMLElement | null;\n\tprivate items: HTMLElement[] | null;\n\n\tconstructor(el: HTMLElement, options?: ICopyMarkupOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-copy-markup');\n\t\tconst dataOptions: ICopyMarkupOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.targetSelector = concatOptions?.targetSelector || null;\n\t\tthis.wrapperSelector = concatOptions?.wrapperSelector || null;\n\t\tthis.limit = concatOptions?.limit || null;\n\t\tthis.items = [];\n\n\t\tif (this.targetSelector) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCopyMarkupCollection, this);\n\n\t\tthis.setTarget();\n\t\tthis.setWrapper();\n\t\tthis.addPredefinedItems();\n\t\tthis.el.addEventListener('click', () => this.copy());\n\t}\n\n\tprivate copy() {\n\t\tif (this.limit && this.items.length >= this.limit) return false;\n\n\t\tif (this.el.hasAttribute('disabled')) this.el.setAttribute('disabled', '');\n\n\t\tconst copiedElement = this.target.cloneNode(true) as HTMLElement;\n\n\t\tthis.addToItems(copiedElement);\n\n\t\tif (this.limit && this.items.length >= this.limit)\n\t\t\tthis.el.setAttribute('disabled', 'disabled');\n\n\t\tthis.fireEvent('copy', copiedElement);\n\t\tdispatch('copy.hs.copyMarkup', copiedElement, copiedElement);\n\t}\n\n\tprivate addPredefinedItems() {\n\t\tArray.from(this.wrapper.children)\n\t\t\t.filter(\n\t\t\t\t(el: HTMLElement) => !el.classList.contains('[--ignore-for-count]'),\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tthis.addToItems(el);\n\t\t\t});\n\t}\n\n\tprivate setTarget() {\n\t\tconst target: HTMLElement =\n\t\t\ttypeof this.targetSelector === 'string'\n\t\t\t\t? (document\n\t\t\t\t\t\t.querySelector(this.targetSelector)\n\t\t\t\t\t\t.cloneNode(true) as HTMLElement)\n\t\t\t\t: ((this.targetSelector as HTMLElement).cloneNode(true) as HTMLElement);\n\n\t\ttarget.removeAttribute('id');\n\n\t\tthis.target = target;\n\t}\n\n\tprivate setWrapper() {\n\t\tthis.wrapper =\n\t\t\ttypeof this.wrapperSelector === 'string'\n\t\t\t\t? document.querySelector(this.wrapperSelector)\n\t\t\t\t: this.wrapperSelector;\n\t}\n\n\tprivate addToItems(item: HTMLElement) {\n\t\tconst deleteItemButton = item.querySelector(\n\t\t\t'[data-hs-copy-markup-delete-item]',\n\t\t);\n\n\t\tif (this.wrapper) this.wrapper.append(item);\n\t\telse this.el.before(item);\n\n\t\tif (deleteItemButton)\n\t\t\tdeleteItemButton.addEventListener('click', () => this.delete(item));\n\n\t\tthis.items.push(item);\n\t}\n\n\t// Public methods\n\tpublic delete(target: HTMLElement) {\n\t\tconst index = this.items.indexOf(target);\n\n\t\tif (index !== -1) this.items.splice(index, 1);\n\n\t\ttarget.remove();\n\n\t\tthis.fireEvent('delete', target);\n\t\tdispatch('delete.hs.copyMarkup', target, target);\n\t}\n\n\t// Static method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsCopyMarkupCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCopyMarkupCollection) window.$hsCopyMarkupCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-copy-markup]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCopyMarkupCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-copy-markup');\n\t\t\t\t\tconst options: ICopyMarkupOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSCopyMarkup(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCopyMarkup: Function;\n\t\t$hsCopyMarkupCollection: ICollectionItem<HSCopyMarkup>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCopyMarkup.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Copy markup collection:', window.$hsCopyMarkupCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCopyMarkup = HSCopyMarkup;\n}\n\nexport default HSCopyMarkup;\n","/*\n * HSAccordion\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch, afterTransition } from '../../utils';\n\nimport {\n\tIAccordionOptions,\n\tIAccordion,\n\tIAccordionTreeView,\n\tIAccordionTreeViewStaticOptions,\n} from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSAccordion\n\textends HSBasePlugin<IAccordionOptions>\n\timplements IAccordion\n{\n\tprivate readonly toggle: HTMLElement | null;\n\tpublic content: HTMLElement | null;\n\tprivate readonly group: HTMLElement | null;\n\tprivate readonly isAlwaysOpened: boolean;\n\n\tstatic selectable: IAccordionTreeView[];\n\n\tconstructor(el: HTMLElement, options?: IAccordionOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggle = this.el.querySelector('.hs-accordion-toggle') || null;\n\t\tthis.content = this.el.querySelector('.hs-accordion-content') || null;\n\t\tthis.group = this.el.closest('.hs-accordion-group') || null;\n\t\tthis.isAlwaysOpened =\n\t\t\tthis.group.hasAttribute('data-hs-accordion-always-open') || false;\n\n\t\tif (this.toggle && this.content) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsAccordionCollection, this);\n\n\t\tthis.toggle.addEventListener('click', (evt: Event) => {\n\t\t\tevt.stopPropagation();\n\n\t\t\tif (this.el.classList.contains('active')) {\n\t\t\t\tthis.hide();\n\t\t\t} else {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tif (\n\t\t\tthis.group &&\n\t\t\t!this.isAlwaysOpened &&\n\t\t\tthis.group.querySelector(':scope > .hs-accordion.active') &&\n\t\t\tthis.group.querySelector(':scope > .hs-accordion.active') !== this.el\n\t\t) {\n\t\t\tconst currentlyOpened = window.$hsAccordionCollection.find(\n\t\t\t\t(el) =>\n\t\t\t\t\tel.element.el ===\n\t\t\t\t\tthis.group.querySelector(':scope > .hs-accordion.active'),\n\t\t\t);\n\n\t\t\tcurrentlyOpened.element.hide();\n\t\t}\n\n\t\tif (this.el.classList.contains('active')) return false;\n\n\t\tthis.el.classList.add('active');\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\n\t\tthis.content.style.display = 'block';\n\t\tthis.content.style.height = '0';\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\t\t});\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.style.display = 'block';\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.accordion', this.el, this.el);\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (!this.el.classList.contains('active')) return false;\n\n\t\tthis.el.classList.remove('active');\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\n\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = '0';\n\t\t});\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.style.display = '';\n\t\t\tthis.content.style.height = '0';\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.accordion', this.el, this.el);\n\t\t});\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsAccordionCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic show(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsAccordionCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\telInCollection.element.content.style.display !== 'block'\n\t\t)\n\t\t\telInCollection.element.show();\n\t}\n\n\tstatic hide(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsAccordionCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\telInCollection.element.content.style.display === 'block'\n\t\t)\n\t\t\telInCollection.element.hide();\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsAccordionCollection) window.$hsAccordionCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-accordion:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsAccordionCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSAccordion(el);\n\t\t\t});\n\t}\n\n\tstatic treeView() {\n\t\tif (!document.querySelectorAll('.hs-accordion-treeview-root').length)\n\t\t\treturn false;\n\n\t\tthis.selectable = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-accordion-treeview-root')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tconst data = el?.getAttribute('data-hs-accordion-options');\n\t\t\t\tconst options: IAccordionTreeViewStaticOptions = data\n\t\t\t\t\t? JSON.parse(data)\n\t\t\t\t\t: {};\n\n\t\t\t\tthis.selectable.push({\n\t\t\t\t\tel,\n\t\t\t\t\toptions: { ...options },\n\t\t\t\t});\n\t\t\t});\n\n\t\tif (this.selectable.length)\n\t\t\tthis.selectable.forEach((item) => {\n\t\t\t\tconst { el } = item;\n\n\t\t\t\tel.querySelectorAll('.hs-accordion-selectable').forEach(\n\t\t\t\t\t(_el: HTMLElement) => {\n\t\t\t\t\t\t_el.addEventListener('click', (evt: Event) => {\n\t\t\t\t\t\t\tevt.stopPropagation();\n\n\t\t\t\t\t\t\tthis.toggleSelected(item, _el);\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t}\n\n\tstatic toggleSelected(root: IAccordionTreeView, item: HTMLElement) {\n\t\tif (item.classList.contains('selected')) item.classList.remove('selected');\n\t\telse {\n\t\t\troot.el\n\t\t\t\t.querySelectorAll('.hs-accordion-selectable')\n\t\t\t\t.forEach((el: HTMLElement) => el.classList.remove('selected'));\n\t\t\titem.classList.add('selected');\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsAccordionCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSAccordion: Function;\n\t\t$hsAccordionCollection: ICollectionItem<HSAccordion>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSAccordion.autoInit();\n\n\tif (document.querySelectorAll('.hs-accordion-treeview-root').length)\n\t\tHSAccordion.treeView();\n\n\t// Uncomment for debug\n\t// console.log('Accordion collection:', window.$hsAccordionCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSAccordion = HSAccordion;\n}\n\nexport default HSAccordion;\n","/*\n * HSCarousel\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { ICarousel, ICarouselOptions } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSCarousel extends HSBasePlugin<ICarouselOptions> implements ICarousel {\n\tprivate readonly inner: HTMLElement | null;\n\tprivate readonly slides: NodeListOf<HTMLElement> | undefined[];\n\tprivate readonly prev: HTMLElement | null;\n\tprivate readonly next: HTMLElement | null;\n\tprivate readonly dots: NodeListOf<HTMLElement> | null;\n\tprivate sliderWidth: number;\n\tprivate currentIndex: number;\n\tprivate readonly loadingClasses: string | string[];\n\tprivate readonly loadingClassesRemove: string | string[];\n\tprivate readonly loadingClassesAdd: string | string[];\n\tprivate readonly afterLoadingClassesAdd: string | string[];\n\tprivate readonly isAutoPlay: boolean;\n\tprivate readonly isRTL: boolean;\n\tprivate readonly speed: number;\n\tprivate readonly isInfiniteLoop: boolean;\n\tprivate timer: any;\n\n\t// Touch events' help variables\n\tprivate readonly touchX: {\n\t\tstart: number;\n\t\tend: number;\n\t};\n\n\tconstructor(el: HTMLElement, options?: ICarouselOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-carousel');\n\t\tconst dataOptions: ICarouselOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.currentIndex = concatOptions.currentIndex || 0;\n\t\tthis.loadingClasses = concatOptions.loadingClasses\n\t\t\t? `${concatOptions.loadingClasses}`.split(',')\n\t\t\t: null;\n\t\tthis.loadingClassesRemove = this.loadingClasses?.[0]\n\t\t\t? this.loadingClasses[0].split(' ')\n\t\t\t: 'opacity-0';\n\t\tthis.loadingClassesAdd = this.loadingClasses?.[1]\n\t\t\t? this.loadingClasses[1].split(' ')\n\t\t\t: '';\n\t\tthis.afterLoadingClassesAdd = this.loadingClasses?.[2]\n\t\t\t? this.loadingClasses[2].split(' ')\n\t\t\t: '';\n\t\tthis.isAutoPlay =\n\t\t\ttypeof concatOptions.isAutoPlay !== 'undefined'\n\t\t\t\t? concatOptions.isAutoPlay\n\t\t\t\t: false;\n\t\tthis.speed = concatOptions.speed || 4000;\n\t\tthis.isInfiniteLoop =\n\t\t\ttypeof concatOptions.isInfiniteLoop !== 'undefined'\n\t\t\t\t? concatOptions.isInfiniteLoop\n\t\t\t\t: true;\n\t\tthis.isRTL =\n\t\t\ttypeof concatOptions.isRTL !== 'undefined' ? concatOptions.isRTL : false;\n\t\tthis.inner = this.el.querySelector('.hs-carousel-body') || null;\n\t\tthis.slides = this.el.querySelectorAll('.hs-carousel-slide') || [];\n\t\tthis.prev = this.el.querySelector('.hs-carousel-prev') || null;\n\t\tthis.next = this.el.querySelector('.hs-carousel-next') || null;\n\t\tthis.dots = this.el.querySelectorAll('.hs-carousel-pagination > *') || null;\n\t\tthis.sliderWidth = this.inner.parentElement.clientWidth;\n\n\t\t// Touch events' help variables\n\t\tthis.touchX = {\n\t\t\tstart: 0,\n\t\t\tend: 0,\n\t\t};\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCarouselCollection, this);\n\n\t\tif (this.inner) {\n\t\t\tthis.calculateWidth();\n\t\t\tif (this.loadingClassesRemove) {\n\t\t\t\tif (typeof this.loadingClassesRemove === 'string')\n\t\t\t\t\tthis.inner.classList.remove(this.loadingClassesRemove);\n\t\t\t\telse this.inner.classList.remove(...this.loadingClassesRemove);\n\t\t\t}\n\t\t\tif (this.loadingClassesAdd) {\n\t\t\t\tif (typeof this.loadingClassesAdd === 'string')\n\t\t\t\t\tthis.inner.classList.add(this.loadingClassesAdd);\n\t\t\t\telse this.inner.classList.add(...this.loadingClassesAdd);\n\t\t\t}\n\t\t}\n\t\tif (this.prev)\n\t\t\tthis.prev.addEventListener('click', () => {\n\t\t\t\tthis.goToPrev();\n\t\t\t\tif (this.isAutoPlay) {\n\t\t\t\t\tthis.resetTimer();\n\t\t\t\t\tthis.setTimer();\n\t\t\t\t}\n\t\t\t});\n\t\tif (this.next)\n\t\t\tthis.next.addEventListener('click', () => {\n\t\t\t\tthis.goToNext();\n\t\t\t\tif (this.isAutoPlay) {\n\t\t\t\t\tthis.resetTimer();\n\t\t\t\t\tthis.setTimer();\n\t\t\t\t}\n\t\t\t});\n\t\tif (this.dots) {\n\t\t\tthis.dots.forEach((el, i) =>\n\t\t\t\tel.addEventListener('click', () => {\n\t\t\t\t\tthis.goTo(i);\n\t\t\t\t\tif (this.isAutoPlay) {\n\t\t\t\t\t\tthis.resetTimer();\n\t\t\t\t\t\tthis.setTimer();\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tif (this.slides.length) {\n\t\t\tthis.addCurrentClass();\n\t\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t\t\tif (this.isAutoPlay) this.autoPlay();\n\t\t}\n\t\tif (this.inner && this.afterLoadingClassesAdd) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (typeof this.afterLoadingClassesAdd === 'string')\n\t\t\t\t\tthis.inner.classList.add(this.afterLoadingClassesAdd);\n\t\t\t\telse this.inner.classList.add(...this.afterLoadingClassesAdd);\n\t\t\t});\n\t\t}\n\n\t\tthis.el.classList.add('init');\n\n\t\tthis.el.addEventListener('touchstart', (evt) => {\n\t\t\tthis.touchX.start = evt.changedTouches[0].screenX;\n\t\t});\n\n\t\tthis.el.addEventListener('touchend', (evt) => {\n\t\t\tthis.touchX.end = evt.changedTouches[0].screenX;\n\n\t\t\tthis.detectDirection();\n\t\t});\n\n\t\tthis.observeResize();\n\t}\n\n\tprivate observeResize() {\n\t\tconst resizeObserver = new ResizeObserver(() => this.recalculateWidth());\n\n\t\tresizeObserver.observe(document.querySelector('body'));\n\t}\n\n\tprivate calculateWidth() {\n\t\t// Set slider width\n\t\tthis.inner.style.width = `${this.sliderWidth * this.slides.length}px`;\n\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\t// Set width to each slide\n\t\tthis.slides.forEach((el) => {\n\t\t\tel.style.width = `${this.sliderWidth}px`;\n\t\t});\n\t}\n\n\tprivate addCurrentClass() {\n\t\tthis.slides.forEach((el, i) => {\n\t\t\tif (i === this.currentIndex) {\n\t\t\t\tel.classList.add('active');\n\t\t\t} else {\n\t\t\t\tel.classList.remove('active');\n\t\t\t}\n\t\t});\n\n\t\tif (this.dots) {\n\t\t\tthis.dots.forEach((el, i) => {\n\t\t\t\tif (i === this.currentIndex) {\n\t\t\t\t\tel.classList.add('active');\n\t\t\t\t} else {\n\t\t\t\t\tel.classList.remove('active');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate addDisabledClass() {\n\t\tif (!this.prev || !this.next) return false;\n\n\t\tif (this.currentIndex === 0) {\n\t\t\tthis.next.classList.remove('disabled');\n\t\t\tthis.prev.classList.add('disabled');\n\t\t} else if (this.currentIndex === this.slides.length - 1) {\n\t\t\tthis.prev.classList.remove('disabled');\n\t\t\tthis.next.classList.add('disabled');\n\t\t} else {\n\t\t\tthis.prev.classList.remove('disabled');\n\t\t\tthis.next.classList.remove('disabled');\n\t\t}\n\t}\n\n\tprivate autoPlay() {\n\t\tthis.setTimer();\n\t}\n\n\tprivate setTimer() {\n\t\tthis.timer = setInterval(() => {\n\t\t\tif (this.currentIndex === this.slides.length - 1) this.goTo(0);\n\t\t\telse this.goToNext();\n\t\t}, this.speed);\n\t}\n\n\tprivate resetTimer() {\n\t\tclearInterval(this.timer);\n\t}\n\n\tprivate detectDirection() {\n\t\tconst { start, end } = this.touchX;\n\n\t\tif (end < start) this.goToNext();\n\t\tif (end > start) this.goToPrev();\n\t}\n\n\t// Public methods\n\tpublic recalculateWidth() {\n\t\tthis.sliderWidth = this.inner.parentElement.clientWidth;\n\n\t\tthis.calculateWidth();\n\t}\n\n\tprivate calculateTransform(): string {\n\t\tlet value = this.currentIndex * this.sliderWidth;\n\t\treturn this.isRTL\n\t\t\t? `translate(${value}px, 0px)`\n\t\t\t: `translate(-${value}px, 0px)`;\n\t}\n\n\tpublic goToPrev() {\n\t\tif (this.currentIndex === 0 && this.isInfiniteLoop) {\n\t\t\tthis.currentIndex = this.slides.length - 1;\n\t\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\t\tthis.addCurrentClass();\n\t\t} else if (this.currentIndex !== 0) {\n\t\t\tthis.currentIndex -= 1;\n\t\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\t\tthis.addCurrentClass();\n\t\t\tthis.addDisabledClass();\n\t\t}\n\t}\n\n\tpublic goToNext() {\n\t\tif (this.currentIndex === this.slides.length - 1 && this.isInfiniteLoop) {\n\t\t\tthis.currentIndex = 0;\n\t\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\t\tthis.addCurrentClass();\n\t\t} else if (this.currentIndex < this.slides.length - 1) {\n\t\t\tthis.currentIndex += 1;\n\t\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\t\tthis.addCurrentClass();\n\t\t\tthis.addDisabledClass();\n\t\t}\n\t}\n\n\tpublic goTo(i: number) {\n\t\tthis.currentIndex = i;\n\t\tthis.inner.style.transform = this.calculateTransform();\n\n\t\tthis.addCurrentClass();\n\t\tif (!this.isInfiniteLoop) this.addDisabledClass();\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsCarouselCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCarouselCollection) window.$hsCarouselCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-carousel]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCarouselCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSCarousel(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCarousel: Function;\n\t\t$hsCarouselCollection: ICollectionItem<HSCarousel>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCarousel.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Carousel collection:', window.$hsCarouselCollection);\n});\n\nwindow.addEventListener('resize', () => {\n\tif (!window.$hsCarouselCollection) return false;\n\n\twindow.$hsCarouselCollection.forEach((el) => {\n\t\tel.element.recalculateWidth();\n\t});\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCarousel = HSCarousel;\n}\n\nexport default HSCarousel;\n","/*\n * HSCollapse\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch, afterTransition } from '../../utils';\n\nimport { ICollapse } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSCollapse extends HSBasePlugin<{}> implements ICollapse {\n\tprivate readonly contentId: string | null;\n\tpublic content: HTMLElement | null;\n\tprivate animationInProcess: boolean;\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.contentId = this.el.dataset.hsCollapse;\n\t\tthis.content = document.querySelector(this.contentId);\n\t\tthis.animationInProcess = false;\n\n\t\tif (this.content) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsCollapseCollection, this);\n\n\t\tif (this?.el?.ariaExpanded) {\n\t\t\tif (this.el.classList.contains('open')) this.el.ariaExpanded = 'true';\n\t\t\telse this.el.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.el.addEventListener('click', () => {\n\t\t\tif (this.content.classList.contains('open')) {\n\t\t\t\tthis.hide();\n\t\t\t} else {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate hideAllMegaMenuItems() {\n\t\tthis.content\n\t\t\t.querySelectorAll('.hs-mega-menu-content.block')\n\t\t\t.forEach((el) => {\n\t\t\t\tel.classList.remove('block');\n\t\t\t\tel.classList.add('hidden');\n\t\t\t});\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tif (this.animationInProcess || this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.el.classList.add('open');\n\t\tif (this?.el?.ariaExpanded) this.el.ariaExpanded = 'true';\n\t\tthis.content.classList.add('open');\n\t\tthis.content.classList.remove('hidden');\n\n\t\tthis.content.style.height = '0';\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\n\t\t\tthis.fireEvent('beforeOpen', this.el);\n\t\t\tdispatch('beforeOpen.hs.collapse', this.el, this.el);\n\t\t});\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.collapse', this.el, this.el);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (this.animationInProcess || !this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.el.classList.remove('open');\n\t\tif (this?.el?.ariaExpanded) this.el.ariaExpanded = 'false';\n\n\t\tthis.content.style.height = `${this.content.scrollHeight}px`;\n\t\tsetTimeout(() => {\n\t\t\tthis.content.style.height = '0';\n\t\t});\n\n\t\tthis.content.classList.remove('open');\n\n\t\tafterTransition(this.content, () => {\n\t\t\tthis.content.classList.add('hidden');\n\t\t\tthis.content.style.height = '';\n\n\t\t\tthis.fireEvent('hide', this.el);\n\t\t\tdispatch('hide.hs.collapse', this.el, this.el);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tif (this.content.querySelectorAll('.hs-mega-menu-content.block').length) {\n\t\t\tthis.hideAllMegaMenuItems();\n\t\t}\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement, isInstance = false) {\n\t\tconst elInCollection = window.$hsCollapseCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsCollapseCollection) window.$hsCollapseCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-collapse-toggle:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsCollapseCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSCollapse(el);\n\t\t\t});\n\t}\n\n\tstatic show(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsCollapseCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\telInCollection.element.content.classList.contains('hidden')\n\t\t)\n\t\t\telInCollection.element.show();\n\t}\n\n\tstatic hide(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsCollapseCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\t!elInCollection.element.content.classList.contains('hidden')\n\t\t)\n\t\t\telInCollection.element.hide();\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsCollapseCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSCollapse: Function;\n\t\t$hsCollapseCollection: ICollectionItem<HSCollapse>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSCollapse.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Collapse collection:', window.$hsCollapseCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSCollapse = HSCollapse;\n}\n\nexport default HSCollapse;\n","export const POSITIONS: any = {\n\tauto: 'auto',\n\t'auto-start': 'auto-start',\n\t'auto-end': 'auto-end',\n\ttop: 'top',\n\t'top-left': 'top-start',\n\t'top-right': 'top-end',\n\tbottom: 'bottom',\n\t'bottom-left': 'bottom-start',\n\t'bottom-right': 'bottom-end',\n\tright: 'right',\n\t'right-start': 'right-start',\n\t'right-end': 'right-end',\n\tleft: 'left',\n\t'left-start': 'left-start',\n\t'left-end': 'left-end',\n};\n\nexport const DROPDOWN_ACCESSIBILITY_KEY_SET = [\n\t'Escape',\n\t'ArrowUp',\n\t'ArrowDown',\n\t'Home',\n\t'End',\n\t'Enter',\n];\n\nexport const OVERLAY_ACCESSIBILITY_KEY_SET = ['Escape', 'Tab'];\n\nexport const TABS_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n];\n\nexport const SELECT_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n\t'Escape',\n\t'Enter',\n\t'Tab',\n];\n\nexport const COMBO_BOX_ACCESSIBILITY_KEY_SET = [\n\t'ArrowUp',\n\t'ArrowLeft',\n\t'ArrowDown',\n\t'ArrowRight',\n\t'Home',\n\t'End',\n\t'Escape',\n\t'Enter',\n];\n\nexport const BREAKPOINTS: any = {\n\tsm: 640,\n\tmd: 768,\n\tlg: 1024,\n\txl: 1280,\n\t'2xl': 1536,\n};\n","/*\n * HSComboBox\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tisParentOrElementHidden,\n} from '../../utils';\n\nimport { IComboBox, IComboBoxOptions, IComboBoxItemAttr } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { COMBO_BOX_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSComboBox extends HSBasePlugin<IComboBoxOptions> implements IComboBox {\n\tgap: number;\n\tviewport: string | HTMLElement | null;\n\tpreventVisibility: boolean;\n\tapiUrl: string | null;\n\tapiDataPart: string | null;\n\tapiQuery: string | null;\n\tapiSearchQuery: string | null;\n\tapiHeaders: {};\n\tapiGroupField: string | null;\n\toutputItemTemplate: string | null;\n\toutputEmptyTemplate: string | null;\n\toutputLoaderTemplate: string | null;\n\tgroupingType: 'default' | 'tabs' | null;\n\tgroupingTitleTemplate: string | null;\n\ttabsWrapperTemplate: string | null;\n\tpreventSelection: boolean;\n\tpreventAutoPosition: boolean;\n\tisOpenOnFocus: boolean;\n\n\tprivate readonly input: HTMLInputElement | null;\n\tprivate readonly output: HTMLElement | null;\n\tprivate readonly itemsWrapper: HTMLElement | null;\n\tprivate items: HTMLElement[] | [];\n\tprivate tabs: HTMLElement[] | [];\n\tprivate readonly toggle: HTMLElement | null;\n\tprivate readonly toggleClose: HTMLElement | null;\n\tprivate readonly toggleOpen: HTMLElement | null;\n\tprivate outputPlaceholder: HTMLElement | null;\n\tprivate outputLoader: HTMLElement | null;\n\n\tprivate value: string | null;\n\tprivate selected: string | null;\n\tprivate groups: any[] | null;\n\tprivate selectedGroup: string | null;\n\n\tisOpened: boolean;\n\tisCurrent: boolean;\n\tprivate animationInProcess: boolean;\n\n\tconstructor(el: HTMLElement, options?: IComboBoxOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\t// Data parameters\n\t\tconst data = el.getAttribute('data-hs-combo-box');\n\t\tconst dataOptions: IComboBoxOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.gap = 5;\n\t\tthis.viewport =\n\t\t\t(typeof concatOptions?.viewport === 'string'\n\t\t\t\t? (document.querySelector(concatOptions?.viewport) as HTMLElement)\n\t\t\t\t: concatOptions?.viewport) ?? null;\n\t\tthis.preventVisibility = concatOptions?.preventVisibility ?? false;\n\t\tthis.apiUrl = concatOptions?.apiUrl ?? null;\n\t\tthis.apiDataPart = concatOptions?.apiDataPart ?? null;\n\t\tthis.apiQuery = concatOptions?.apiQuery ?? null;\n\t\tthis.apiSearchQuery = concatOptions?.apiSearchQuery ?? null;\n\t\tthis.apiHeaders = concatOptions?.apiHeaders ?? {};\n\t\tthis.apiGroupField = concatOptions?.apiGroupField ?? null;\n\t\tthis.outputItemTemplate =\n\t\t\tconcatOptions?.outputItemTemplate ??\n\t\t\t`<div class=\"cursor-pointer py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800\" data-hs-combo-box-output-item>\n\t\t\t\t<div class=\"flex justify-between items-center w-full\">\n\t\t\t\t\t<span data-hs-combo-box-search-text></span>\n\t\t\t\t\t<span class=\"hidden hs-combo-box-selected:block\">\n\t\t\t\t\t\t<svg class=\"shrink-0 size-3.5 text-blue-600 dark:text-blue-500\" xmlns=\"http:.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\tthis.outputEmptyTemplate =\n\t\t\tconcatOptions?.outputEmptyTemplate ??\n\t\t\t`<div class=\"py-2 px-4 w-full text-sm text-gray-800 rounded-lg dark:bg-neutral-900 dark:text-neutral-200\">Nothing found...</div>`;\n\t\tthis.outputLoaderTemplate =\n\t\t\tconcatOptions?.outputLoaderTemplate ??\n\t\t\t`<div class=\"flex justify-center items-center py-2 px-4 text-sm text-gray-800 rounded-lg bg-white dark:bg-neutral-900 dark:text-neutral-200\">\n\t\t\t\t<div class=\"animate-spin inline-block size-6 border-[3px] border-current border-t-transparent text-blue-600 rounded-full dark:text-blue-500\" role=\"status\" aria-label=\"loading\">\n\t\t\t\t\t<span class=\"sr-only\">Loading...</span>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\tthis.groupingType = concatOptions?.groupingType ?? null;\n\t\tthis.groupingTitleTemplate =\n\t\t\tconcatOptions?.groupingTitleTemplate ??\n\t\t\t(this.groupingType === 'default'\n\t\t\t\t? `<div class=\"block mb-1 text-xs font-semibold uppercase text-blue-600 dark:text-blue-500\"></div>`\n\t\t\t\t: `<button type=\"button\" class=\"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold whitespace-nowrap rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none\"></button>`);\n\t\tthis.tabsWrapperTemplate =\n\t\t\tconcatOptions?.tabsWrapperTemplate ??\n\t\t\t`<div class=\"overflow-x-auto p-4\"></div>`;\n\t\tthis.preventSelection = concatOptions?.preventSelection ?? false;\n\t\tthis.preventAutoPosition = concatOptions?.preventAutoPosition ?? false;\n\t\tthis.isOpenOnFocus = concatOptions?.isOpenOnFocus ?? false;\n\n\t\t// Internal parameters\n\t\tthis.input = this.el.querySelector('[data-hs-combo-box-input]') ?? null;\n\t\tthis.output = this.el.querySelector('[data-hs-combo-box-output]') ?? null;\n\t\tthis.itemsWrapper =\n\t\t\tthis.el.querySelector('[data-hs-combo-box-output-items-wrapper]') ?? null;\n\t\tthis.items =\n\t\t\tArray.from(this.el.querySelectorAll('[data-hs-combo-box-output-item]')) ??\n\t\t\t[];\n\t\tthis.tabs = [];\n\t\tthis.toggle = this.el.querySelector('[data-hs-combo-box-toggle]') ?? null;\n\t\tthis.toggleClose =\n\t\t\tthis.el.querySelector('[data-hs-combo-box-close]') ?? null;\n\t\tthis.toggleOpen = this.el.querySelector('[data-hs-combo-box-open]') ?? null;\n\t\tthis.outputPlaceholder = null;\n\n\t\tthis.selected = this.value =\n\t\t\t(this.el.querySelector('[data-hs-combo-box-input]') as HTMLInputElement)\n\t\t\t\t.value ?? '';\n\t\tthis.isOpened = false;\n\t\tthis.isCurrent = false;\n\t\tthis.animationInProcess = false;\n\t\tthis.selectedGroup = 'all';\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsComboBoxCollection, this);\n\n\t\tthis.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildInput();\n\t\tif (this.groupingType) this.setGroups();\n\t\tthis.buildItems();\n\t\tif (this.preventVisibility) {\n\t\t\t// TODO:: test the plugin while the line below is commented.\n\t\t\t// this.isOpened = true;\n\n\t\t\tif (!this.preventAutoPosition) this.recalculateDirection();\n\t\t}\n\t\tif (this.toggle) this.buildToggle();\n\t\tif (this.toggleClose) this.buildToggleClose();\n\t\tif (this.toggleOpen) this.buildToggleOpen();\n\t}\n\n\tprivate setResultAndRender(value = '') {\n\t\t// TODO:: test the plugin with below code added.\n\t\tlet _value = this.preventVisibility ? this.input.value : value;\n\n\t\tthis.setResults(_value);\n\n\t\tif (this.apiSearchQuery) this.itemsFromJson();\n\t}\n\n\tprivate buildInput() {\n\t\tif (this.isOpenOnFocus) {\n\t\t\tthis.input.addEventListener('focus', () => {\n\t\t\t\tif (!this.isOpened) {\n\t\t\t\t\tthis.setResultAndRender();\n\t\t\t\t\tthis.open();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.input.addEventListener(\n\t\t\t'input',\n\t\t\tdebounce((evt: InputEvent) => {\n\t\t\t\tthis.setResultAndRender((evt.target as HTMLInputElement).value);\n\t\t\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\t\t\telse this.el.classList.remove('has-value');\n\t\t\t\tif (!this.isOpened) this.open();\n\t\t\t}),\n\t\t);\n\t}\n\n\tprivate buildItems() {\n\t\tthis.output.role = 'listbox';\n\t\tthis.output.tabIndex = -1;\n\t\tthis.output.ariaOrientation = 'vertical';\n\n\t\tif (this.apiUrl) this.itemsFromJson();\n\t\telse {\n\t\t\tif (this.itemsWrapper) this.itemsWrapper.innerHTML = '';\n\t\t\telse this.output.innerHTML = '';\n\t\t\tthis.itemsFromHtml();\n\t\t}\n\t}\n\n\tprivate setResults(val: string) {\n\t\tthis.value = val;\n\n\t\tthis.resultItems();\n\n\t\tif (this.hasVisibleItems()) this.destroyOutputPlaceholder();\n\t\telse this.buildOutputPlaceholder();\n\t}\n\n\tprivate isItemExists(obj: never): boolean {\n\t\treturn this.items.some((el: HTMLElement) => {\n\t\t\tconst groupField =\n\t\t\t\tel.getAttribute('data-hs-combo-box-output-item-group-field') ?? null;\n\t\t\tconst params =\n\t\t\t\tJSON.parse(el.getAttribute('data-hs-combo-box-output-item')) ?? null;\n\t\t\tlet group = null;\n\n\t\t\tif (groupField && params?.group?.name) group = obj[groupField];\n\n\t\t\treturn Array.from(\n\t\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t\t).some((elI: HTMLElement) => {\n\t\t\t\tconst equality =\n\t\t\t\t\tparams?.group?.name && group\n\t\t\t\t\t\t? group === params.group.name &&\n\t\t\t\t\t\t\telI.getAttribute('data-hs-combo-box-search-text') ===\n\t\t\t\t\t\t\t\tobj[elI.getAttribute('data-hs-combo-box-output-item-field')]\n\t\t\t\t\t\t: elI.getAttribute('data-hs-combo-box-search-text') ===\n\t\t\t\t\t\t\tobj[elI.getAttribute('data-hs-combo-box-output-item-field')];\n\n\t\t\t\treturn equality;\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate isTextExists(el: HTMLElement, val: string[]): boolean {\n\t\tconst lowerCased = val.map((v) => v.toLowerCase());\n\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).some((elI: HTMLElement) =>\n\t\t\tlowerCased.includes(\n\t\t\t\telI.getAttribute('data-hs-combo-box-search-text').toLowerCase(),\n\t\t\t),\n\t\t);\n\t}\n\n\tprivate isTextExistsAny(el: HTMLElement, val: string): boolean {\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).some((elI: HTMLElement) =>\n\t\t\telI\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text')\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(val.toLowerCase()),\n\t\t);\n\t}\n\n\tprivate valuesBySelector(el: HTMLElement) {\n\t\treturn Array.from(\n\t\t\tel.querySelectorAll('[data-hs-combo-box-search-text]'),\n\t\t).reduce(\n\t\t\t(acc: any, cur: HTMLElement) => [\n\t\t\t\t...acc,\n\t\t\t\tcur.getAttribute('data-hs-combo-box-search-text'),\n\t\t\t],\n\t\t\t[],\n\t\t);\n\t}\n\n\tprivate buildOutputLoader() {\n\t\tif (this.outputLoader) return false;\n\n\t\tthis.outputLoader = htmlToElement(this.outputLoaderTemplate);\n\t\tif (this.items.length || this.outputPlaceholder) {\n\t\t\tthis.outputLoader.style.position = 'absolute';\n\t\t\tthis.outputLoader.style.top = '0';\n\t\t\tthis.outputLoader.style.bottom = '0';\n\t\t\tthis.outputLoader.style.left = '0';\n\t\t\tthis.outputLoader.style.right = '0';\n\t\t\tthis.outputLoader.style.zIndex = '2';\n\t\t} else {\n\t\t\tthis.outputLoader.style.position = '';\n\t\t\tthis.outputLoader.style.top = '';\n\t\t\tthis.outputLoader.style.bottom = '';\n\t\t\tthis.outputLoader.style.left = '';\n\t\t\tthis.outputLoader.style.right = '';\n\t\t\tthis.outputLoader.style.zIndex = '';\n\t\t\tthis.outputLoader.style.height = '30px';\n\t\t}\n\n\t\tthis.output.append(this.outputLoader);\n\t}\n\n\tprivate destroyOutputLoader() {\n\t\tif (this.outputLoader) this.outputLoader.remove();\n\n\t\tthis.outputLoader = null;\n\t}\n\n\tprivate async itemsFromJson() {\n\t\tthis.buildOutputLoader();\n\n\t\ttry {\n\t\t\tconst query = `${this.apiQuery}`;\n\t\t\tconst searchQuery = `${this.apiSearchQuery}=${this.value.toLowerCase()}`;\n\t\t\tlet url = this.apiUrl;\n\t\t\tif (this.apiQuery && this.apiSearchQuery) {\n\t\t\t\turl += `?${searchQuery}&${query}`;\n\t\t\t} else if (this.apiQuery) {\n\t\t\t\turl += `?${query}`;\n\t\t\t} else if (this.apiSearchQuery) {\n\t\t\t\turl += `?${searchQuery}`;\n\t\t\t}\n\t\t\tconst res = await fetch(url, this.apiHeaders);\n\t\t\tlet items = await res.json();\n\t\t\tif (this.apiDataPart) {\n\t\t\t\titems = items[this.apiDataPart];\n\t\t\t}\n\t\t\tif (this.apiSearchQuery) {\n\t\t\t\tthis.items = [];\n\t\t\t}\n\t\t\tif (this.itemsWrapper) {\n\t\t\t\tthis.itemsWrapper.innerHTML = '';\n\t\t\t} else {\n\t\t\t\tthis.output.innerHTML = '';\n\t\t\t}\n\n\t\t\tif (this.groupingType === 'tabs') {\n\t\t\t\tthis.setApiGroups(items);\n\t\t\t\tthis.groupTabsRender();\n\t\t\t\tthis.jsonItemsRender(items);\n\t\t\t} else if (this.groupingType === 'default') {\n\t\t\t\tthis.setApiGroups(items);\n\n\t\t\t\tthis.groups.forEach((el) => {\n\t\t\t\t\tconst title = htmlToElement(this.groupingTitleTemplate);\n\t\t\t\t\ttitle.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\t\t\ttitle.classList.add('--exclude-accessibility');\n\t\t\t\t\ttitle.innerText = el.title;\n\t\t\t\t\tconst newItems = items.filter(\n\t\t\t\t\t\t(i: any) => i[this.apiGroupField] === el.name,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (this.itemsWrapper) this.itemsWrapper.append(title);\n\t\t\t\t\telse this.output.append(title);\n\n\t\t\t\t\tthis.jsonItemsRender(newItems);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.jsonItemsRender(items);\n\t\t\t}\n\n\t\t\tthis.setResults(this.input.value);\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t}\n\n\t\tthis.destroyOutputLoader();\n\t}\n\n\tprivate jsonItemsRender(items: any) {\n\t\titems.forEach((item: never, index: number) => {\n\t\t\t// TODO:: test without checking below\n\t\t\t// if (this.isItemExists(item)) return false;\n\n\t\t\tconst newItem = htmlToElement(this.outputItemTemplate);\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-output-item-field]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tconst value =\n\t\t\t\t\t\titem[el.getAttribute('data-hs-combo-box-output-item-field')];\n\t\t\t\t\tconst hideIfEmpty = el.hasAttribute(\n\t\t\t\t\t\t'data-hs-combo-box-output-item-hide-if-empty',\n\t\t\t\t\t);\n\n\t\t\t\t\tel.textContent = value ?? '';\n\t\t\t\t\tif (!value && hideIfEmpty) (el as HTMLElement).style.display = 'none';\n\t\t\t\t});\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-search-text]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tel.setAttribute(\n\t\t\t\t\t\t'data-hs-combo-box-search-text',\n\t\t\t\t\t\titem[el.getAttribute('data-hs-combo-box-output-item-field')] ?? '',\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\tnewItem\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-output-item-attr]')\n\t\t\t\t.forEach((el) => {\n\t\t\t\t\tconst attributes = JSON.parse(\n\t\t\t\t\t\tel.getAttribute('data-hs-combo-box-output-item-attr'),\n\t\t\t\t\t);\n\n\t\t\t\t\tattributes.forEach((attr: IComboBoxItemAttr) => {\n\t\t\t\t\t\tel.setAttribute(attr.attr, item[attr.valueFrom]);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\tnewItem.setAttribute('tabIndex', `${index}`);\n\t\t\tif (this.groupingType === 'tabs' || this.groupingType === 'default') {\n\t\t\t\tnewItem.setAttribute(\n\t\t\t\t\t'data-hs-combo-box-output-item',\n\t\t\t\t\t`{\"group\": {\"name\": \"${item[this.apiGroupField]}\", \"title\": \"${\n\t\t\t\t\t\titem[this.apiGroupField]\n\t\t\t\t\t}\"}}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.items = [...this.items, newItem];\n\n\t\t\tif (!this.preventSelection) {\n\t\t\t\t(newItem as HTMLElement).addEventListener('click', () => {\n\t\t\t\t\tthis.close(\n\t\t\t\t\t\t(newItem as HTMLElement)\n\t\t\t\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t\t\t\t.getAttribute('data-hs-combo-box-search-text'),\n\t\t\t\t\t);\n\n\t\t\t\t\tthis.setSelectedByValue(this.valuesBySelector(newItem));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.appendItemsToWrapper(newItem);\n\t\t});\n\t}\n\n\tprivate setGroups() {\n\t\tconst groups: any[] = [];\n\n\t\tthis.items.forEach((item: HTMLElement) => {\n\t\t\tconst { group } = JSON.parse(\n\t\t\t\titem.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t);\n\n\t\t\tif (!groups.some((el) => el?.name === group.name)) {\n\t\t\t\tgroups.push(group);\n\t\t\t}\n\t\t});\n\n\t\tthis.groups = groups;\n\t}\n\n\tpublic setCurrent() {\n\t\tif (window.$hsComboBoxCollection.length) {\n\t\t\twindow.$hsComboBoxCollection.map((el) => (el.element.isCurrent = false));\n\n\t\t\tthis.isCurrent = true;\n\t\t}\n\t}\n\n\tprivate setApiGroups(items: any) {\n\t\tconst groups: any[] = [];\n\n\t\titems.forEach((item: any) => {\n\t\t\tconst group = item[this.apiGroupField];\n\n\t\t\tif (!groups.some((el) => el.name === group)) {\n\t\t\t\tgroups.push({\n\t\t\t\t\tname: group,\n\t\t\t\t\ttitle: group,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tthis.groups = groups;\n\t}\n\n\tprivate sortItems() {\n\t\tconst compareFn = (i1: HTMLElement, i2: HTMLElement) => {\n\t\t\tconst a = i1\n\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\t\t\tconst b = i2\n\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\n\t\t\tif (a < b) {\n\t\t\t\treturn -1;\n\t\t\t} else if (a > b) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\n\t\treturn this.items.sort(compareFn);\n\t}\n\n\tprivate itemRender(item: HTMLElement) {\n\t\tconst val = item\n\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\n\t\tif (this.itemsWrapper) this.itemsWrapper.append(item);\n\t\telse this.output.append(item);\n\n\t\tif (!this.preventSelection) {\n\t\t\titem.addEventListener('click', () => {\n\t\t\t\tthis.close(val);\n\t\t\t\tthis.setSelectedByValue(this.valuesBySelector(item));\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate plainRender(items: HTMLElement[]) {\n\t\titems.forEach((item: HTMLElement) => {\n\t\t\tthis.itemRender(item);\n\t\t});\n\t}\n\n\tprivate groupTabsRender() {\n\t\tconst tabsScroll = htmlToElement(this.tabsWrapperTemplate);\n\t\tconst tabsWrapper = htmlToElement(\n\t\t\t`<div class=\"flex flex-nowrap gap-x-2\"></div>`,\n\t\t);\n\n\t\ttabsScroll.append(tabsWrapper);\n\t\tthis.output.insertBefore(tabsScroll, this.output.firstChild);\n\n\t\tconst tabDef = htmlToElement(this.groupingTitleTemplate);\n\t\ttabDef.setAttribute('data-hs-combo-box-group-title', 'all');\n\t\ttabDef.classList.add('--exclude-accessibility', 'active');\n\t\ttabDef.innerText = 'All';\n\t\tthis.tabs = [...this.tabs, tabDef];\n\t\ttabsWrapper.append(tabDef);\n\t\ttabDef.addEventListener('click', () => {\n\t\t\tthis.selectedGroup = 'all';\n\t\t\tconst selectedTab = this.tabs.find(\n\t\t\t\t(elI: HTMLElement) =>\n\t\t\t\t\telI.getAttribute('data-hs-combo-box-group-title') ===\n\t\t\t\t\tthis.selectedGroup,\n\t\t\t);\n\n\t\t\tthis.tabs.forEach((el: HTMLElement) => el.classList.remove('active'));\n\t\t\tselectedTab.classList.add('active');\n\t\t\tthis.setItemsVisibility();\n\t\t});\n\n\t\tthis.groups.forEach((el) => {\n\t\t\tconst tab = htmlToElement(this.groupingTitleTemplate);\n\t\t\ttab.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\ttab.classList.add('--exclude-accessibility');\n\t\t\ttab.innerText = el.title;\n\n\t\t\tthis.tabs = [...this.tabs, tab];\n\t\t\ttabsWrapper.append(tab);\n\n\t\t\ttab.addEventListener('click', () => {\n\t\t\t\tthis.selectedGroup = el.name;\n\t\t\t\tconst selectedTab = this.tabs.find(\n\t\t\t\t\t(elI: HTMLElement) =>\n\t\t\t\t\t\telI.getAttribute('data-hs-combo-box-group-title') ===\n\t\t\t\t\t\tthis.selectedGroup,\n\t\t\t\t);\n\n\t\t\t\tthis.tabs.forEach((el: HTMLElement) => el.classList.remove('active'));\n\t\t\t\tselectedTab.classList.add('active');\n\t\t\t\tthis.setItemsVisibility();\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate groupDefaultRender() {\n\t\tthis.groups.forEach((el) => {\n\t\t\tconst title = htmlToElement(this.groupingTitleTemplate);\n\t\t\ttitle.setAttribute('data-hs-combo-box-group-title', el.name);\n\t\t\ttitle.classList.add('--exclude-accessibility');\n\t\t\ttitle.innerText = el.title;\n\n\t\t\tif (this.itemsWrapper) this.itemsWrapper.append(title);\n\t\t\telse this.output.append(title);\n\n\t\t\tconst items = this.sortItems().filter((f) => {\n\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t);\n\n\t\t\t\treturn group.name === el.name;\n\t\t\t});\n\n\t\t\tthis.plainRender(items);\n\t\t});\n\t}\n\n\tprivate itemsFromHtml() {\n\t\tif (this.groupingType === 'default') {\n\t\t\tthis.groupDefaultRender();\n\t\t} else if (this.groupingType === 'tabs') {\n\t\t\tconst items = this.sortItems();\n\n\t\t\tthis.groupTabsRender();\n\t\t\tthis.plainRender(items);\n\t\t} else {\n\t\t\tconst items = this.sortItems();\n\n\t\t\tthis.plainRender(items);\n\t\t}\n\t\tthis.setResults(this.input.value);\n\t}\n\n\tprivate buildToggle() {\n\t\tif (this.isOpened) {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true';\n\t\t} else {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.toggle.addEventListener('click', () => {\n\t\t\tif (this.isOpened) this.close();\n\t\t\telse this.open(this.toggle.getAttribute('data-hs-combo-box-toggle'));\n\t\t});\n\t}\n\n\tprivate buildToggleClose() {\n\t\tthis.toggleClose.addEventListener('click', () => this.close());\n\t}\n\n\tprivate buildToggleOpen() {\n\t\tthis.toggleOpen.addEventListener('click', () => this.open());\n\t}\n\n\tprivate setSelectedByValue(val: string[]) {\n\t\tthis.items.forEach((el) => {\n\t\t\tif (this.isTextExists(el, val))\n\t\t\t\t(el as HTMLElement).classList.add('selected');\n\t\t\telse (el as HTMLElement).classList.remove('selected');\n\t\t});\n\t}\n\n\tprivate setValue(val: string) {\n\t\tthis.selected = val;\n\t\tthis.value = val;\n\t\tthis.input.value = val;\n\n\t\tthis.fireEvent('select', this.el);\n\t\tdispatch('select.hs.combobox', this.el, this.value);\n\t}\n\n\tprivate setItemsVisibility() {\n\t\tif (this.groupingType === 'tabs' && this.selectedGroup !== 'all') {\n\t\t\tthis.items.forEach((item) => {\n\t\t\t\t(item as HTMLElement).style.display = 'none';\n\t\t\t});\n\t\t}\n\n\t\tconst items =\n\t\t\tthis.groupingType === 'tabs'\n\t\t\t\t? this.selectedGroup === 'all'\n\t\t\t\t\t? this.items\n\t\t\t\t\t: this.items.filter((f: HTMLElement) => {\n\t\t\t\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\treturn group.name === this.selectedGroup;\n\t\t\t\t\t\t})\n\t\t\t\t: this.items;\n\n\t\tif (this.groupingType === 'tabs' && this.selectedGroup !== 'all') {\n\t\t\titems.forEach((item) => {\n\t\t\t\t(item as HTMLElement).style.display = 'block';\n\t\t\t});\n\t\t}\n\n\t\titems.forEach((item) => {\n\t\t\tif (!this.isTextExistsAny(item, this.value))\n\t\t\t\t(item as HTMLElement).style.display = 'none';\n\t\t\telse (item as HTMLElement).style.display = 'block';\n\t\t});\n\n\t\tif (this.groupingType === 'default') {\n\t\t\tthis.output\n\t\t\t\t.querySelectorAll('[data-hs-combo-box-group-title]')\n\t\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\t\tconst g = el.getAttribute('data-hs-combo-box-group-title');\n\t\t\t\t\tconst items = this.items.filter((f: HTMLElement) => {\n\t\t\t\t\t\tconst { group } = JSON.parse(\n\t\t\t\t\t\t\tf.getAttribute('data-hs-combo-box-output-item'),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn group.name === g && f.style.display === 'block';\n\t\t\t\t\t});\n\n\t\t\t\t\tif (items.length) el.style.display = 'block';\n\t\t\t\t\telse el.style.display = 'none';\n\t\t\t\t});\n\t\t}\n\t}\n\n\tprivate hasVisibleItems() {\n\t\treturn this.items.length\n\t\t\t? this.items.some((el: HTMLElement) => el.style.display === 'block')\n\t\t\t: false;\n\t}\n\n\tprivate appendItemsToWrapper(item: HTMLElement) {\n\t\tif (this.itemsWrapper) {\n\t\t\tthis.itemsWrapper.append(item);\n\t\t} else {\n\t\t\tthis.output.append(item);\n\t\t}\n\t}\n\n\tprivate buildOutputPlaceholder() {\n\t\tif (!this.outputPlaceholder)\n\t\t\tthis.outputPlaceholder = htmlToElement(this.outputEmptyTemplate);\n\n\t\tthis.appendItemsToWrapper(this.outputPlaceholder);\n\t}\n\n\tprivate destroyOutputPlaceholder() {\n\t\tif (this.outputPlaceholder) this.outputPlaceholder.remove();\n\n\t\tthis.outputPlaceholder = null;\n\t}\n\n\tprivate resultItems() {\n\t\tif (!this.items.length) return false;\n\n\t\tthis.setItemsVisibility();\n\t\tthis.setSelectedByValue([this.selected]);\n\t}\n\n\t// Public methods\n\tprivate setValueAndOpen(val: string) {\n\t\tthis.value = val;\n\n\t\tif (this.items.length) {\n\t\t\tthis.setItemsVisibility();\n\t\t}\n\t}\n\n\tpublic open(val?: string) {\n\t\tif (this.animationInProcess) return false;\n\n\t\tif (typeof val !== 'undefined') this.setValueAndOpen(val);\n\n\t\tif (this.preventVisibility) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.output.style.display = 'block';\n\t\tif (!this.preventAutoPosition) this.recalculateDirection();\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'true';\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.el.classList.add('active');\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.isOpened = true;\n\t}\n\n\tprivate setValueAndClear(val: string | null) {\n\t\tif (val) this.setValue(val);\n\t\telse this.setValue(this.selected);\n\n\t\tif (this.outputPlaceholder) this.destroyOutputPlaceholder();\n\t}\n\n\tpublic close(val?: string | null) {\n\t\tif (this.animationInProcess) return false;\n\n\t\tif (this.preventVisibility) {\n\t\t\tthis.setValueAndClear(val);\n\n\t\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\t\telse this.el.classList.remove('has-value');\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (this?.input?.ariaExpanded) this.input.ariaExpanded = 'false';\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\tthis.el.classList.remove('active');\n\t\tif (!this.preventAutoPosition) {\n\t\t\tthis.output.classList.remove('bottom-full', 'top-full');\n\t\t\tthis.output.style.marginTop = '';\n\t\t\tthis.output.style.marginBottom = '';\n\t\t}\n\n\t\tafterTransition(this.output, () => {\n\t\t\tthis.output.style.display = 'none';\n\n\t\t\tthis.setValueAndClear(val);\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tif (this.input.value !== '') this.el.classList.add('has-value');\n\t\telse this.el.classList.remove('has-value');\n\n\t\tthis.isOpened = false;\n\t}\n\n\tpublic recalculateDirection() {\n\t\tif (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.output,\n\t\t\t\tthis.input,\n\t\t\t\t'bottom',\n\t\t\t\tthis.gap,\n\t\t\t\tthis.viewport as HTMLElement,\n\t\t\t)\n\t\t) {\n\t\t\tthis.output.classList.remove('bottom-full');\n\t\t\tthis.output.style.marginBottom = '';\n\t\t\tthis.output.classList.add('top-full');\n\t\t\tthis.output.style.marginTop = `${this.gap}px`;\n\t\t} else {\n\t\t\tthis.output.classList.remove('top-full');\n\t\t\tthis.output.style.marginTop = '';\n\t\t\tthis.output.classList.add('bottom-full');\n\t\t\tthis.output.style.marginBottom = `${this.gap}px`;\n\t\t}\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsComboBoxCollection) window.$hsComboBoxCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-combo-box]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsComboBoxCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-combo-box');\n\t\t\t\t\tconst options: IComboBoxOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSComboBox(el, options);\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (window.$hsComboBoxCollection) {\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSComboBox.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSComboBox.accessibility(evt),\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic close(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection && elInCollection.element.isOpened) {\n\t\t\telInCollection.element.close();\n\t\t}\n\t}\n\n\tstatic closeCurrentlyOpened(evtTarget: HTMLElement | null = null) {\n\t\tif (!evtTarget.closest('[data-hs-combo-box].active')) {\n\t\t\tconst currentlyOpened =\n\t\t\t\twindow.$hsComboBoxCollection.filter((el) => el.element.isOpened) ||\n\t\t\t\tnull;\n\n\t\t\tif (currentlyOpened) {\n\t\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\t\tel.element.close();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t// Accessibility methods\n\tprivate static getPreparedItems(\n\t\tisReversed = false,\n\t\toutput: HTMLElement | null,\n\t): Element[] | null {\n\t\tif (!output) return null;\n\n\t\tconst preparedItems = isReversed\n\t\t\t? Array.from(\n\t\t\t\t\toutput.querySelectorAll(':scope > *:not(.--exclude-accessibility)'),\n\t\t\t\t)\n\t\t\t\t\t.filter((el) => (el as HTMLElement).style.display !== 'none')\n\t\t\t\t\t.reverse()\n\t\t\t: Array.from(\n\t\t\t\t\toutput.querySelectorAll(':scope > *:not(.--exclude-accessibility)'),\n\t\t\t\t).filter((el) => (el as HTMLElement).style.display !== 'none');\n\t\tconst items = preparedItems.filter(\n\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t);\n\n\t\treturn items;\n\t}\n\n\tprivate static setHighlighted(\n\t\tprev: Element,\n\t\tcurrent: HTMLElement,\n\t\tinput: HTMLInputElement,\n\t): void {\n\t\tcurrent.focus();\n\n\t\tinput.value = current\n\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t.getAttribute('data-hs-combo-box-search-text');\n\n\t\tif (prev) prev.classList.remove('hs-combo-box-output-item-highlighted');\n\t\tcurrent.classList.add('hs-combo-box-output-item-highlighted');\n\t}\n\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tCOMBO_BOX_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEscape();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape() {\n\t\tconst target = window.$hsComboBoxCollection.find(\n\t\t\t(el) => !el.element.preventVisibility && el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\ttarget.element.close();\n\t\t\ttarget.element.input.blur();\n\t\t}\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst output = target.element.itemsWrapper ?? target.element.output;\n\n\t\t\tif (!output) return false;\n\n\t\t\tconst items = HSComboBox.getPreparedItems(isArrowUp, output) as Element[];\n\t\t\tconst current = output.querySelector(\n\t\t\t\t'.hs-combo-box-output-item-highlighted',\n\t\t\t);\n\t\t\tlet currentItem = null;\n\t\t\tif (!current)\n\t\t\t\titems[0].classList.add('hs-combo-box-output-item-highlighted');\n\t\t\tlet currentInd = items.findIndex((el: any) => el === current);\n\t\t\tif (currentInd + 1 < items.length) currentInd++;\n\t\t\tcurrentItem = items[currentInd] as HTMLButtonElement;\n\n\t\t\tHSComboBox.setHighlighted(current, currentItem, target.element.input);\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsComboBoxCollection.find((el) =>\n\t\t\tel.element.preventVisibility ? el.element.isCurrent : el.element.isOpened,\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst output = target.element.itemsWrapper ?? target.element.output;\n\n\t\t\tif (!output) return false;\n\n\t\t\tconst items = HSComboBox.getPreparedItems(isStart, output) as Element[];\n\t\t\tconst current = output.querySelector(\n\t\t\t\t'.hs-combo-box-output-item-highlighted',\n\t\t\t);\n\n\t\t\tif (items.length)\n\t\t\t\tHSComboBox.setHighlighted(\n\t\t\t\t\tcurrent,\n\t\t\t\t\titems[0] as HTMLButtonElement,\n\t\t\t\t\ttarget.element.input,\n\t\t\t\t);\n\t\t}\n\t}\n\n\tstatic onEnter(evt: Event) {\n\t\tconst target = evt.target;\n\t\tconst opened = window.$hsComboBoxCollection.find(\n\t\t\t(el) =>\n\t\t\t\t!isParentOrElementHidden(el.element.el) &&\n\t\t\t\t(evt.target as HTMLElement).closest('[data-hs-combo-box]') ===\n\t\t\t\t\tel.element.el,\n\t\t);\n\n\t\tconst link: HTMLAnchorElement = opened.element.el.querySelector(\n\t\t\t'.hs-combo-box-output-item-highlighted a',\n\t\t);\n\n\t\tif ((target as HTMLElement).hasAttribute('data-hs-combo-box-input')) {\n\t\t\topened.element.close();\n\t\t\t(target as HTMLInputElement).blur();\n\t\t} else {\n\t\t\tif (!opened.element.preventSelection) {\n\t\t\t\topened.element.setSelectedByValue(\n\t\t\t\t\topened.element.valuesBySelector(evt.target as HTMLElement),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (opened.element.preventSelection && link) {\n\t\t\t\twindow.location.assign(link.getAttribute('href'));\n\t\t\t}\n\t\t\topened.element.close(\n\t\t\t\t!opened.element.preventSelection\n\t\t\t\t\t? (evt.target as HTMLElement)\n\t\t\t\t\t\t\t.querySelector('[data-hs-combo-box-value]')\n\t\t\t\t\t\t\t.getAttribute('data-hs-combo-box-search-text')\n\t\t\t\t\t: null,\n\t\t\t);\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSComboBox: Function;\n\t\t$hsComboBoxCollection: ICollectionItem<HSComboBox>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSComboBox.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('ComboBox collection:', window.$hsComboBoxCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsComboBoxCollection) return false;\n\n\tconst target = window.$hsComboBoxCollection.find((el) => el.element.isOpened);\n\n\tif (target && !target.element.preventAutoPosition)\n\t\ttarget.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSComboBox = HSComboBox;\n}\n\nexport default HSComboBox;\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/*\n * HSDropdown\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tgetClassProperty,\n\tgetClassPropertyAlt,\n\tisIOS,\n\tisIpadOS,\n\tdispatch,\n\tafterTransition,\n\tmenuSearchHistory,\n} from '../../utils';\nimport { IMenuSearchHistory } from '../../utils/interfaces';\n\nimport { createPopper, PositioningStrategy } from '@popperjs/core';\n\nimport { IDropdown, IHTMLElementPopper } from './interfaces';\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { POSITIONS, DROPDOWN_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSDropdown\n\textends HSBasePlugin<{}, IHTMLElementPopper>\n\timplements IDropdown\n{\n\tprivate static history: IMenuSearchHistory;\n\tprivate readonly toggle: HTMLElement | null;\n\tprivate readonly closers: HTMLElement[] | null;\n\tpublic menu: HTMLElement | null;\n\tprivate eventMode: string;\n\tprivate closeMode: string;\n\tprivate animationInProcess: boolean;\n\n\tconstructor(el: IHTMLElementPopper, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggle =\n\t\t\tthis.el.querySelector(':scope > .hs-dropdown-toggle') ||\n\t\t\tthis.el.querySelector(\n\t\t\t\t':scope > .hs-dropdown-toggle-wrapper > .hs-dropdown-toggle',\n\t\t\t) ||\n\t\t\t(this.el.children[0] as HTMLElement);\n\t\tthis.closers =\n\t\t\tArray.from(this.el.querySelectorAll(':scope .hs-dropdown-close')) || null;\n\t\tthis.menu = this.el.querySelector(':scope > .hs-dropdown-menu');\n\t\tthis.eventMode = getClassProperty(this.el, '--trigger', 'click');\n\t\tthis.closeMode = getClassProperty(this.el, '--auto-close', 'true');\n\t\tthis.animationInProcess = false;\n\n\t\tif (this.toggle && this.menu) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsDropdownCollection, this);\n\n\t\tif ((this.toggle as HTMLButtonElement).disabled) return false;\n\n\t\tif (this.toggle) this.buildToggle();\n\t\tif (this.menu) this.buildMenu();\n\t\tif (this.closers) this.buildClosers();\n\n\t\tif (!isIOS() && !isIpadOS()) {\n\t\t\tthis.el.addEventListener('mouseenter', () => this.onMouseEnterHandler());\n\t\t\tthis.el.addEventListener('mouseleave', () => this.onMouseLeaveHandler());\n\t\t}\n\t}\n\n\tresizeHandler() {\n\t\tthis.eventMode = getClassProperty(this.el, '--trigger', 'click');\n\t\tthis.closeMode = getClassProperty(this.el, '--auto-close', 'true');\n\t}\n\n\tprivate buildToggle() {\n\t\tif (this?.toggle?.ariaExpanded) {\n\t\t\tif (this.el.classList.contains('open')) this.toggle.ariaExpanded = 'true';\n\t\t\telse this.toggle.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.toggle.addEventListener('click', (evt) => this.onClickHandler(evt));\n\t}\n\n\tprivate buildMenu() {\n\t\tthis.menu.role = 'menu';\n\t}\n\n\tprivate buildClosers() {\n\t\tthis.closers.forEach((el: HTMLButtonElement) => {\n\t\t\tel.addEventListener('click', () => this.close());\n\t\t});\n\t}\n\n\tprivate onClickHandler(evt: Event) {\n\t\tif (\n\t\t\tthis.el.classList.contains('open') &&\n\t\t\t!this.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tprivate onMouseEnterHandler() {\n\t\tif (this.eventMode !== 'hover') return false;\n\n\t\tif (this.el._popper) this.forceClearState();\n\n\t\tif (\n\t\t\t!this.el.classList.contains('open') &&\n\t\t\tthis.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tprivate onMouseLeaveHandler() {\n\t\tif (this.eventMode !== 'hover') return false;\n\n\t\tif (\n\t\t\tthis.el.classList.contains('open') &&\n\t\t\t!this.menu.classList.contains('hidden')\n\t\t) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprivate destroyPopper() {\n\t\tthis.menu.classList.remove('block');\n\t\tthis.menu.classList.add('hidden');\n\n\t\tthis.menu.style.inset = null;\n\t\tthis.menu.style.position = null;\n\n\t\tif (this.el && this.el._popper) this.el._popper.destroy();\n\n\t\tthis.animationInProcess = false;\n\t}\n\n\tprivate absoluteStrategyModifiers() {\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'applyStyles',\n\t\t\t\tfn: (data: any) => {\n\t\t\t\t\tconst strategy = (\n\t\t\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--strategy') ||\n\t\t\t\t\t\t'absolute'\n\t\t\t\t\t).replace(' ', '');\n\t\t\t\t\tconst adaptive = (\n\t\t\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--adaptive') ||\n\t\t\t\t\t\t'adaptive'\n\t\t\t\t\t).replace(' ', '');\n\n\t\t\t\t\tdata.state.elements.popper.style.position = strategy;\n\t\t\t\t\tdata.state.elements.popper.style.transform =\n\t\t\t\t\t\tadaptive === 'adaptive' ? data.state.styles.popper.transform : null;\n\t\t\t\t\tdata.state.elements.popper.style.top = null;\n\t\t\t\t\tdata.state.elements.popper.style.bottom = null;\n\t\t\t\t\tdata.state.elements.popper.style.left = null;\n\t\t\t\t\tdata.state.elements.popper.style.right = null;\n\t\t\t\t\tdata.state.elements.popper.style.margin = 0;\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}\n\n\t// Public methods\n\tpublic open() {\n\t\tif (this.el.classList.contains('open')) return false;\n\n\t\tif (this.animationInProcess) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tconst placement = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--placement') || ''\n\t\t).replace(' ', '');\n\t\tconst flip = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--flip') || 'true'\n\t\t).replace(' ', '');\n\t\tconst strategy = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--strategy') || 'fixed'\n\t\t).replace(' ', '') as PositioningStrategy;\n\t\tconst offset = parseInt(\n\t\t\t(\n\t\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--offset') || '10'\n\t\t\t).replace(' ', ''),\n\t\t);\n\t\tconst gpuAcceleration = (\n\t\t\twindow.getComputedStyle(this.el).getPropertyValue('--gpu-acceleration') ||\n\t\t\t'true'\n\t\t).replace(' ', '');\n\n\t\tif (strategy !== ('static' as PositioningStrategy)) {\n\t\t\tthis.el._popper = createPopper(this.el, this.menu, {\n\t\t\t\tplacement: POSITIONS[placement] || 'bottom-start',\n\t\t\t\tstrategy: strategy,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...(strategy !== 'fixed' ? this.absoluteStrategyModifiers() : []),\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'flip',\n\t\t\t\t\t\tenabled: flip === 'true',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'offset',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\toffset: [0, offset],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'computeStyles',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tadaptive: strategy !== 'fixed' ? false : true,\n\t\t\t\t\t\t\tgpuAcceleration: gpuAcceleration === 'true' ? true : false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\tthis.menu.style.margin = null;\n\n\t\tthis.menu.classList.remove('hidden');\n\t\tthis.menu.classList.add('block');\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.el.classList.add('open');\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.fireEvent('open', this.el);\n\t\tdispatch('open.hs.dropdown', this.el, this.el);\n\t}\n\n\tpublic close(isAnimated = true) {\n\t\tif (this.animationInProcess || !this.el.classList.contains('open'))\n\t\t\treturn false;\n\n\t\tconst clearAfterClose = () => {\n\t\t\tthis.menu.style.margin = null;\n\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\t\tthis.el.classList.remove('open');\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.dropdown', this.el, this.el);\n\t\t};\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (isAnimated) {\n\t\t\tconst el: HTMLElement =\n\t\t\t\tthis.el.querySelector('[data-hs-dropdown-transition]') || this.menu;\n\n\t\t\tafterTransition(el, () => this.destroyPopper());\n\t\t} else this.destroyPopper();\n\n\t\tclearAfterClose();\n\t}\n\n\tpublic forceClearState() {\n\t\tthis.destroyPopper();\n\t\tthis.menu.style.margin = null;\n\t\tthis.el.classList.remove('open');\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsDropdownCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsDropdownCollection) window.$hsDropdownCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('.hs-dropdown:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: IHTMLElementPopper) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsDropdownCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSDropdown(el);\n\t\t\t});\n\n\t\tif (window.$hsDropdownCollection) {\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSDropdown.accessibility(evt),\n\t\t\t);\n\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSDropdown.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tlet prevWidth = window.innerWidth;\n\t\t\twindow.addEventListener('resize', () => {\n\t\t\t\tif (window.innerWidth !== prevWidth) {\n\t\t\t\t\tprevWidth = innerWidth;\n\t\t\t\t\tHSDropdown.closeCurrentlyOpened(null, false);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic open(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsDropdownCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\telInCollection.element.menu.classList.contains('hidden')\n\t\t)\n\t\t\telInCollection.element.open();\n\t}\n\n\tstatic close(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsDropdownCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\t!elInCollection.element.menu.classList.contains('hidden')\n\t\t) {\n\t\t\telInCollection.element.close();\n\t\t}\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tthis.history = menuSearchHistory;\n\n\t\tconst target: ICollectionItem<HSDropdown> | null =\n\t\t\twindow.$hsDropdownCollection.find((el) =>\n\t\t\t\tel.element.el.classList.contains('open'),\n\t\t\t);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\t(DROPDOWN_ACCESSIBILITY_KEY_SET.includes(evt.code) ||\n\t\t\t\t(evt.code.length === 4 &&\n\t\t\t\t\tevt.code[evt.code.length - 1].match(/^[A-Z]*$/))) &&\n\t\t\t!evt.metaKey &&\n\t\t\t!target.element.menu.querySelector('input:focus') &&\n\t\t\t!target.element.menu.querySelector('textarea:focus')\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tif (!target.element.menu.querySelector('.hs-select.active')) {\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t\tthis.onEscape(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif (\n\t\t\t\t\t\t!target.element.menu.querySelector('.hs-select button:focus') &&\n\t\t\t\t\t\t!target.element.menu.querySelector('.hs-collapse-toggle:focus')\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onFirstLetter(evt.key);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape(evt: KeyboardEvent) {\n\t\tconst dropdown = (evt.target as HTMLElement).closest('.hs-dropdown.open');\n\n\t\tif (window.$hsDropdownCollection.find((el) => el.element.el === dropdown)) {\n\t\t\tconst target = window.$hsDropdownCollection.find(\n\t\t\t\t(el) => el.element.el === dropdown,\n\t\t\t);\n\n\t\t\tif (target) {\n\t\t\t\ttarget.element.close();\n\t\t\t\ttarget.element.toggle.focus();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.closeCurrentlyOpened();\n\t\t}\n\t}\n\n\tstatic onEnter(evt: KeyboardEvent) {\n\t\tconst dropdown = (evt.target as HTMLElement).parentElement;\n\n\t\tif (window.$hsDropdownCollection.find((el) => el.element.el === dropdown)) {\n\t\t\tevt.preventDefault();\n\n\t\t\tconst target = window.$hsDropdownCollection.find(\n\t\t\t\t(el) => el.element.el === dropdown,\n\t\t\t);\n\n\t\t\tif (target) target.element.open();\n\t\t}\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst preparedLinks = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t\t'a:not([hidden]), .hs-dropdown > button:not([hidden])',\n\t\t\t\t\t\t),\n\t\t\t\t\t).reverse()\n\t\t\t\t: Array.from(\n\t\t\t\t\t\tmenu.querySelectorAll(\n\t\t\t\t\t\t\t'a:not([hidden]), .hs-dropdown > button:not([hidden])',\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\n\t\t\tconst links = preparedLinks.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current = menu.querySelector('a:focus, button:focus');\n\t\t\tlet currentInd = links.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < links.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t}\n\n\t\t\t(links[currentInd] as HTMLButtonElement | HTMLAnchorElement).focus();\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst preparedLinks = isStart\n\t\t\t\t? Array.from(menu.querySelectorAll('a'))\n\t\t\t\t: Array.from(menu.querySelectorAll('a')).reverse();\n\t\t\tconst links = preparedLinks.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\n\t\t\tif (links.length) {\n\t\t\t\tlinks[0].focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onFirstLetter(code: string) {\n\t\tconst target = window.$hsDropdownCollection.find((el) =>\n\t\t\tel.element.el.classList.contains('open'),\n\t\t);\n\n\t\tif (target) {\n\t\t\tconst menu = target.element.menu;\n\n\t\t\tif (!menu) return false;\n\n\t\t\tconst links = Array.from(menu.querySelectorAll('a'));\n\t\t\tconst getCurrentInd = () =>\n\t\t\t\tlinks.findIndex(\n\t\t\t\t\t(el, i) =>\n\t\t\t\t\t\tel.innerText.toLowerCase().charAt(0) === code.toLowerCase() &&\n\t\t\t\t\t\tthis.history.existsInHistory(i),\n\t\t\t\t);\n\t\t\tlet currentInd = getCurrentInd();\n\n\t\t\tif (currentInd === -1) {\n\t\t\t\tthis.history.clearHistory();\n\t\t\t\tcurrentInd = getCurrentInd();\n\t\t\t}\n\n\t\t\tif (currentInd !== -1) {\n\t\t\t\tlinks[currentInd].focus();\n\t\t\t\tthis.history.addHistory(currentInd);\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic closeCurrentlyOpened(\n\t\tevtTarget: HTMLElement | null = null,\n\t\tisAnimated = true,\n\t) {\n\t\tconst parent =\n\t\t\tevtTarget &&\n\t\t\tevtTarget.closest('.hs-dropdown') &&\n\t\t\tevtTarget.closest('.hs-dropdown').parentElement.closest('.hs-dropdown')\n\t\t\t\t? evtTarget\n\t\t\t\t\t\t.closest('.hs-dropdown')\n\t\t\t\t\t\t.parentElement.closest('.hs-dropdown')\n\t\t\t\t: null;\n\t\tlet currentlyOpened = parent\n\t\t\t? window.$hsDropdownCollection.filter(\n\t\t\t\t\t(el) =>\n\t\t\t\t\t\tel.element.el.classList.contains('open') &&\n\t\t\t\t\t\tel.element.menu\n\t\t\t\t\t\t\t.closest('.hs-dropdown')\n\t\t\t\t\t\t\t.parentElement.closest('.hs-dropdown') === parent,\n\t\t\t\t)\n\t\t\t: window.$hsDropdownCollection.filter((el) =>\n\t\t\t\t\tel.element.el.classList.contains('open'),\n\t\t\t\t);\n\n\t\tif (\n\t\t\tevtTarget &&\n\t\t\tevtTarget.closest('.hs-dropdown') &&\n\t\t\tgetClassPropertyAlt(evtTarget.closest('.hs-dropdown'), '--auto-close') ===\n\t\t\t\t'inside'\n\t\t) {\n\t\t\tcurrentlyOpened = currentlyOpened.filter(\n\t\t\t\t(el) => el.element.el !== evtTarget.closest('.hs-dropdown'),\n\t\t\t);\n\t\t}\n\n\t\tif (currentlyOpened) {\n\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\tif (\n\t\t\t\t\tel.element.closeMode === 'false' ||\n\t\t\t\t\tel.element.closeMode === 'outside'\n\t\t\t\t)\n\t\t\t\t\treturn false;\n\n\t\t\t\tel.element.close(isAnimated);\n\t\t\t});\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsDropdownCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSDropdown: Function;\n\t\t$hsDropdownCollection: ICollectionItem<HSDropdown>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSDropdown.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Dropdown collection:', window.$hsDropdownCollection);\n});\n\nwindow.addEventListener('resize', () => {\n\tif (!window.$hsDropdownCollection) window.$hsDropdownCollection = [];\n\n\twindow.$hsDropdownCollection.forEach((el) => el.element.resizeHandler());\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSDropdown = HSDropdown;\n}\n\nexport default HSDropdown;\n","/*\n * HSInputNumber\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IInputNumberOptions, IInputNumber } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\n\nclass HSInputNumber\n\textends HSBasePlugin<IInputNumberOptions>\n\timplements IInputNumber\n{\n\tprivate readonly input: HTMLInputElement | null;\n\tprivate readonly increment: HTMLElement | null;\n\tprivate readonly decrement: HTMLElement | null;\n\tprivate inputValue: number | null;\n\tprivate readonly minInputValue: number | null;\n\tprivate readonly maxInputValue: number | null;\n\tprivate readonly step: number;\n\n\tconstructor(el: HTMLElement, options?: IInputNumberOptions) {\n\t\tsuper(el, options);\n\n\t\tthis.input = this.el.querySelector('[data-hs-input-number-input]') || null;\n\t\tthis.increment =\n\t\t\tthis.el.querySelector('[data-hs-input-number-increment]') || null;\n\t\tthis.decrement =\n\t\t\tthis.el.querySelector('[data-hs-input-number-decrement]') || null;\n\n\t\tif (this.input) this.checkIsNumberAndConvert();\n\n\t\tconst data = this.el.dataset.hsInputNumber;\n\t\tconst dataOptions: IInputNumberOptions = data\n\t\t\t? JSON.parse(data)\n\t\t\t: { step: 1 };\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.minInputValue = 'min' in concatOptions ? concatOptions.min : 0;\n\t\tthis.maxInputValue = 'max' in concatOptions ? concatOptions.max : null;\n\t\tthis.step =\n\t\t\t'step' in concatOptions && concatOptions.step > 0\n\t\t\t\t? concatOptions.step\n\t\t\t\t: 1;\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsInputNumberCollection, this);\n\n\t\tif (this.input && this.increment) this.build();\n\t}\n\n\tprivate checkIsNumberAndConvert() {\n\t\tconst value = this.input.value.trim();\n\t\tconst cleanedValue = this.cleanAndExtractNumber(value);\n\n\t\tif (cleanedValue !== null) {\n\t\t\tthis.inputValue = cleanedValue;\n\t\t\tthis.input.value = cleanedValue.toString();\n\t\t} else {\n\t\t\tthis.inputValue = 0;\n\t\t\tthis.input.value = '0';\n\t\t}\n\t}\n\n\tprivate cleanAndExtractNumber(value: string): number | null {\n\t\tconst cleanedArray: string[] = [];\n\t\tlet decimalFound = false;\n\n\t\tvalue.split('').forEach((char) => {\n\t\t\tif (char >= '0' && char <= '9') cleanedArray.push(char);\n\t\t\telse if (char === '.' && !decimalFound) {\n\t\t\t\tcleanedArray.push(char);\n\t\t\t\tdecimalFound = true;\n\t\t\t}\n\t\t});\n\n\t\tconst cleanedValue = cleanedArray.join('');\n\t\tconst number = parseFloat(cleanedValue);\n\n\t\treturn isNaN(number) ? null : number;\n\t}\n\n\tprivate build() {\n\t\tif (this.input) this.buildInput();\n\t\tif (this.increment) this.buildIncrement();\n\t\tif (this.decrement) this.buildDecrement();\n\n\t\tif (this.inputValue <= 0 && this.minInputValue === 0) {\n\t\t\tthis.inputValue = 0;\n\t\t\tthis.input.value = '0';\n\t\t}\n\n\t\tif (this.inputValue <= 0 || this.minInputValue < 0) this.changeValue();\n\n\t\tif (this.input.hasAttribute('disabled')) this.disableButtons();\n\t}\n\n\tprivate buildInput() {\n\t\tthis.input.addEventListener('input', () => this.changeValue());\n\t}\n\n\tprivate buildIncrement() {\n\t\tthis.increment.addEventListener('click', () => {\n\t\t\tthis.changeValue('increment');\n\t\t});\n\t}\n\n\tprivate buildDecrement() {\n\t\tthis.decrement.addEventListener('click', () => {\n\t\t\tthis.changeValue('decrement');\n\t\t});\n\t}\n\n\tprivate changeValue(event = 'none') {\n\t\tconst payload = { inputValue: this.inputValue };\n\t\tconst minInputValue = this.minInputValue ?? Number.MIN_SAFE_INTEGER;\n\t\tconst maxInputValue = this.maxInputValue ?? Number.MAX_SAFE_INTEGER;\n\n\t\tthis.inputValue = isNaN(this.inputValue) ? 0 : this.inputValue;\n\n\t\tswitch (event) {\n\t\t\tcase 'increment':\n\t\t\t\tconst incrementedResult = this.inputValue + this.step;\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tincrementedResult >= minInputValue &&\n\t\t\t\t\tincrementedResult <= maxInputValue\n\t\t\t\t\t\t? incrementedResult\n\t\t\t\t\t\t: maxInputValue;\n\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t\tcase 'decrement':\n\t\t\t\tconst decrementedResult = this.inputValue - this.step;\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tdecrementedResult >= minInputValue &&\n\t\t\t\t\tdecrementedResult <= maxInputValue\n\t\t\t\t\t\t? decrementedResult\n\t\t\t\t\t\t: minInputValue;\n\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconst defaultResult = isNaN(parseInt(this.input.value))\n\t\t\t\t\t? 0\n\t\t\t\t\t: parseInt(this.input.value);\n\t\t\t\tthis.inputValue =\n\t\t\t\t\tdefaultResult >= maxInputValue\n\t\t\t\t\t\t? maxInputValue\n\t\t\t\t\t\t: defaultResult <= minInputValue\n\t\t\t\t\t\t\t? minInputValue\n\t\t\t\t\t\t\t: defaultResult;\n\t\t\t\tif (this.inputValue <= minInputValue)\n\t\t\t\t\tthis.input.value = this.inputValue.toString();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tpayload.inputValue = this.inputValue;\n\n\t\tif (this.inputValue === minInputValue) {\n\t\t\tthis.el.classList.add('disabled');\n\t\t\tif (this.decrement) this.disableButtons('decrement');\n\t\t} else {\n\t\t\tthis.el.classList.remove('disabled');\n\t\t\tif (this.decrement) this.enableButtons('decrement');\n\t\t}\n\t\tif (this.inputValue === maxInputValue) {\n\t\t\tthis.el.classList.add('disabled');\n\t\t\tif (this.increment) this.disableButtons('increment');\n\t\t} else {\n\t\t\tthis.el.classList.remove('disabled');\n\t\t\tif (this.increment) this.enableButtons('increment');\n\t\t}\n\n\t\tthis.fireEvent('change', payload);\n\t\tdispatch('change.hs.inputNumber', this.el, payload);\n\t}\n\n\tprivate disableButtons(mode = 'all') {\n\t\tif (mode === 'all') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.setAttribute('disabled', 'disabled');\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.setAttribute('disabled', 'disabled');\n\t\t} else if (mode === 'increment') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.setAttribute('disabled', 'disabled');\n\t\t} else if (mode === 'decrement') {\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.setAttribute('disabled', 'disabled');\n\t\t}\n\t}\n\n\tprivate enableButtons(mode = 'all') {\n\t\tif (mode === 'all') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.removeAttribute('disabled');\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.removeAttribute('disabled');\n\t\t} else if (mode === 'increment') {\n\t\t\tif (\n\t\t\t\tthis.increment.tagName === 'BUTTON' ||\n\t\t\t\tthis.increment.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.increment.removeAttribute('disabled');\n\t\t} else if (mode === 'decrement') {\n\t\t\tif (\n\t\t\t\tthis.decrement.tagName === 'BUTTON' ||\n\t\t\t\tthis.decrement.tagName === 'INPUT'\n\t\t\t)\n\t\t\t\tthis.decrement.removeAttribute('disabled');\n\t\t}\n\t}\n\n\t// Global method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsInputNumberCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsInputNumberCollection) window.$hsInputNumberCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-input-number]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsInputNumberCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSInputNumber(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSInputNumber: Function;\n\t\t$hsInputNumberCollection: {\n\t\t\tid: number;\n\t\t\telement: HSInputNumber;\n\t\t}[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSInputNumber.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Input number collection:', window.$hsInputNumberCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSInputNumber = HSInputNumber;\n}\n\nexport default HSInputNumber;\n","/*\n * HSOverlay\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tstringToBoolean,\n\tgetClassProperty,\n\tisParentOrElementHidden,\n\tdispatch,\n\tafterTransition,\n} from '../../utils';\n\nimport { IOverlayOptions, IOverlay } from './interfaces';\nimport { ICollectionItem } from '../../interfaces';\nimport { BREAKPOINTS } from '../../constants';\n\nimport HSBasePlugin from '../base-plugin';\n\nclass HSOverlay extends HSBasePlugin<{}> implements IOverlay {\n\tprivate readonly hiddenClass: string | null;\n\tprivate readonly emulateScrollbarSpace: boolean;\n\tprivate readonly isClosePrev: boolean;\n\tprivate readonly backdropClasses: string | null;\n\tprivate readonly backdropExtraClasses: string | null;\n\tprivate readonly animationTarget: HTMLElement | null;\n\n\tprivate openNextOverlay: boolean;\n\tprivate autoHide: ReturnType<typeof setTimeout> | null;\n\tprivate readonly overlayId: string | null;\n\n\tpublic overlay: HTMLElement | null;\n\tpublic isCloseWhenClickInside: boolean;\n\tpublic isTabAccessibilityLimited: boolean;\n\tpublic isLayoutAffect: boolean;\n\tpublic hasAutofocus: boolean;\n\tpublic hasAbilityToCloseOnBackdropClick: boolean;\n\tpublic openedBreakpoint: number | null;\n\tpublic autoClose: number | null;\n\n\tconstructor(el: HTMLElement, options?: IOverlayOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tconst data = el.getAttribute('data-hs-overlay-options');\n\t\tconst dataOptions: IOverlayOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.hiddenClass = concatOptions?.hiddenClass || 'hidden';\n\t\tthis.emulateScrollbarSpace = concatOptions?.emulateScrollbarSpace || false;\n\t\tthis.isClosePrev = concatOptions?.isClosePrev ?? true;\n\t\tthis.backdropClasses =\n\t\t\tconcatOptions?.backdropClasses ??\n\t\t\t'hs-overlay-backdrop transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900';\n\t\tthis.backdropExtraClasses = concatOptions?.backdropExtraClasses ?? '';\n\n\t\tthis.openNextOverlay = false;\n\t\tthis.autoHide = null;\n\t\tthis.overlayId = this.el.getAttribute('data-hs-overlay');\n\t\tthis.overlay = document.querySelector(this.overlayId);\n\t\tif (this.overlay) {\n\t\t\tthis.isCloseWhenClickInside = stringToBoolean(\n\t\t\t\tgetClassProperty(this.overlay, '--close-when-click-inside', 'false') ||\n\t\t\t\t\t'false',\n\t\t\t);\n\t\t\tthis.isTabAccessibilityLimited = stringToBoolean(\n\t\t\t\tgetClassProperty(this.overlay, '--tab-accessibility-limited', 'true') ||\n\t\t\t\t\t'true',\n\t\t\t);\n\t\t\tthis.isLayoutAffect = stringToBoolean(\n\t\t\t\tgetClassProperty(this.overlay, '--is-layout-affect', 'false') ||\n\t\t\t\t\t'false',\n\t\t\t);\n\t\t\tthis.hasAutofocus = stringToBoolean(\n\t\t\t\tgetClassProperty(this.overlay, '--has-autofocus', 'true') || 'true',\n\t\t\t);\n\t\t\tthis.hasAbilityToCloseOnBackdropClick = stringToBoolean(\n\t\t\t\tthis.overlay.getAttribute('data-hs-overlay-keyboard') || 'true',\n\t\t\t);\n\n\t\t\tconst autoCloseBreakpoint = getClassProperty(\n\t\t\t\tthis.overlay,\n\t\t\t\t'--auto-close',\n\t\t\t);\n\t\t\tthis.autoClose =\n\t\t\t\t!isNaN(+autoCloseBreakpoint) && isFinite(+autoCloseBreakpoint)\n\t\t\t\t\t? +autoCloseBreakpoint\n\t\t\t\t\t: BREAKPOINTS[autoCloseBreakpoint] || null;\n\n\t\t\tconst openedBreakpoint = getClassProperty(this.overlay, '--opened');\n\t\t\tthis.openedBreakpoint =\n\t\t\t\t(!isNaN(+openedBreakpoint) && isFinite(+openedBreakpoint)\n\t\t\t\t\t? +openedBreakpoint\n\t\t\t\t\t: BREAKPOINTS[openedBreakpoint]) || null;\n\t\t}\n\n\t\tthis.animationTarget =\n\t\t\tthis?.overlay?.querySelector('.hs-overlay-animation-target') ||\n\t\t\tthis.overlay;\n\n\t\tif (this.overlay) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsOverlayCollection, this);\n\n\t\tif (this.isLayoutAffect && this.openedBreakpoint) {\n\t\t\tconst instance = HSOverlay.getInstance(this.el, true);\n\n\t\t\tHSOverlay.setOpened(\n\t\t\t\tthis.openedBreakpoint,\n\t\t\t\tinstance as ICollectionItem<HSOverlay>,\n\t\t\t);\n\t\t}\n\n\t\tif (this?.el?.ariaExpanded) {\n\t\t\tif (this.overlay.classList.contains('opened'))\n\t\t\t\tthis.el.ariaExpanded = 'true';\n\t\t\telse this.el.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.el.addEventListener('click', () => {\n\t\t\tif (this.overlay.classList.contains('opened')) this.close();\n\t\t\telse this.open();\n\t\t});\n\n\t\tthis.overlay.addEventListener('click', (evt) => {\n\t\t\tif (\n\t\t\t\t(evt.target as HTMLElement).id &&\n\t\t\t\t`#${(evt.target as HTMLElement).id}` === this.overlayId &&\n\t\t\t\tthis.isCloseWhenClickInside &&\n\t\t\t\tthis.hasAbilityToCloseOnBackdropClick\n\t\t\t) {\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate hideAuto() {\n\t\tconst time = parseInt(getClassProperty(this.overlay, '--auto-hide', '0'));\n\n\t\tif (time) {\n\t\t\tthis.autoHide = setTimeout(() => {\n\t\t\t\tthis.close();\n\t\t\t}, time);\n\t\t}\n\t}\n\n\tprivate checkTimer() {\n\t\tif (this.autoHide) {\n\t\t\tclearTimeout(this.autoHide);\n\n\t\t\tthis.autoHide = null;\n\t\t}\n\t}\n\n\tprivate buildBackdrop() {\n\t\tconst overlayClasses = this.overlay.classList.value.split(' ');\n\t\tconst overlayZIndex = parseInt(\n\t\t\twindow.getComputedStyle(this.overlay).getPropertyValue('z-index'),\n\t\t);\n\t\tconst backdropId =\n\t\t\tthis.overlay.getAttribute('data-hs-overlay-backdrop-container') || false;\n\t\tlet backdrop: HTMLElement | Node = document.createElement('div');\n\t\tlet backdropClasses = `${this.backdropClasses} ${this.backdropExtraClasses}`;\n\t\tconst closeOnBackdrop =\n\t\t\tgetClassProperty(this.overlay, '--overlay-backdrop', 'true') !== 'static';\n\t\tconst disableBackdrop =\n\t\t\tgetClassProperty(this.overlay, '--overlay-backdrop', 'true') === 'false';\n\n\t\t(backdrop as HTMLElement).id = `${this.overlay.id}-backdrop`;\n\t\tif ('style' in backdrop) backdrop.style.zIndex = `${overlayZIndex - 1}`;\n\n\t\tfor (const value of overlayClasses) {\n\t\t\tif (\n\t\t\t\tvalue.startsWith('hs-overlay-backdrop-open:') ||\n\t\t\t\tvalue.includes(':hs-overlay-backdrop-open:')\n\t\t\t) {\n\t\t\t\tbackdropClasses += ` ${value}`;\n\t\t\t}\n\t\t}\n\n\t\tif (disableBackdrop) return;\n\n\t\tif (backdropId) {\n\t\t\tbackdrop = document.querySelector(backdropId).cloneNode(true);\n\t\t\t(backdrop as HTMLElement).classList.remove('hidden');\n\n\t\t\tbackdropClasses = `${(backdrop as HTMLElement).classList.toString()}`;\n\t\t\t(backdrop as HTMLElement).classList.value = '';\n\t\t}\n\n\t\tif (closeOnBackdrop) {\n\t\t\t(backdrop as HTMLElement).addEventListener(\n\t\t\t\t'click',\n\t\t\t\t() => this.close(),\n\t\t\t\ttrue,\n\t\t\t);\n\t\t}\n\n\t\t(backdrop as HTMLElement).setAttribute(\n\t\t\t'data-hs-overlay-backdrop-template',\n\t\t\t'',\n\t\t);\n\n\t\tdocument.body.appendChild(backdrop);\n\n\t\tsetTimeout(() => {\n\t\t\t(backdrop as HTMLElement).classList.value = backdropClasses;\n\t\t});\n\t}\n\n\tprivate destroyBackdrop() {\n\t\tconst backdrop: HTMLElement = document.querySelector(\n\t\t\t`#${this.overlay.id}-backdrop`,\n\t\t);\n\n\t\tif (!backdrop) return;\n\n\t\tif (this.openNextOverlay) {\n\t\t\tbackdrop.style.transitionDuration = `${\n\t\t\t\tparseFloat(\n\t\t\t\t\twindow\n\t\t\t\t\t\t.getComputedStyle(backdrop)\n\t\t\t\t\t\t.transitionDuration.replace(/[^\\d.-]/g, ''),\n\t\t\t\t) * 1.8\n\t\t\t}s`;\n\t\t}\n\n\t\tbackdrop.classList.add('opacity-0');\n\n\t\tafterTransition(backdrop, () => {\n\t\t\tbackdrop.remove();\n\t\t});\n\t}\n\n\tprivate focusElement() {\n\t\tconst input: HTMLInputElement = this.overlay.querySelector('[autofocus]');\n\n\t\tif (!input) return false;\n\t\telse input.focus();\n\t}\n\n\tprivate getScrollbarSize() {\n\t\tlet div = document.createElement('div');\n\t\tdiv.style.overflow = 'scroll';\n\t\tdiv.style.width = '100px';\n\t\tdiv.style.height = '100px';\n\t\tdocument.body.appendChild(div);\n\n\t\tlet scrollbarSize = div.offsetWidth - div.clientWidth;\n\n\t\tdocument.body.removeChild(div);\n\n\t\treturn scrollbarSize;\n\t}\n\n\t// Public methods\n\tpublic open() {\n\t\tif (!this.overlay) return false;\n\n\t\tconst openedOverlays = document.querySelectorAll('.hs-overlay.open');\n\t\tconst currentlyOpened = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tArray.from(openedOverlays).includes(el.element.overlay) &&\n\t\t\t\t!el.element.isLayoutAffect,\n\t\t);\n\t\tconst toggles = document.querySelectorAll(\n\t\t\t`[data-hs-overlay=\"#${this.overlay.id}\"]`,\n\t\t);\n\t\tconst disabledScroll =\n\t\t\tgetClassProperty(this.overlay, '--body-scroll', 'false') !== 'true';\n\n\t\tif (this.isClosePrev && currentlyOpened) {\n\t\t\tthis.openNextOverlay = true;\n\n\t\t\treturn currentlyOpened.element.close().then(() => {\n\t\t\t\tthis.open();\n\n\t\t\t\tthis.openNextOverlay = false;\n\t\t\t});\n\t\t}\n\n\t\tif (disabledScroll) {\n\t\t\tdocument.body.style.overflow = 'hidden';\n\t\t\tif (this.emulateScrollbarSpace)\n\t\t\t\tdocument.body.style.paddingRight = `${this.getScrollbarSize()}px`;\n\t\t}\n\n\t\tthis.buildBackdrop();\n\t\tthis.checkTimer();\n\t\tthis.hideAuto();\n\n\t\ttoggles.forEach((toggle) => {\n\t\t\tif (toggle.ariaExpanded) toggle.ariaExpanded = 'true';\n\t\t});\n\t\tthis.overlay.classList.remove(this.hiddenClass);\n\t\tthis.overlay.setAttribute('aria-overlay', 'true');\n\t\tthis.overlay.setAttribute('tabindex', '-1');\n\n\t\tsetTimeout(() => {\n\t\t\tif (this.overlay.classList.contains('opened')) return false;\n\n\t\t\tthis.overlay.classList.add('open', 'opened');\n\t\t\tif (this.isLayoutAffect)\n\t\t\t\tdocument.body.classList.add('hs-overlay-body-open');\n\n\t\t\tthis.fireEvent('open', this.el);\n\t\t\tdispatch('open.hs.overlay', this.el, this.el);\n\n\t\t\tif (this.hasAutofocus) this.focusElement();\n\t\t}, 50);\n\t}\n\n\tpublic close(forceClose = false) {\n\t\tif (this.isLayoutAffect)\n\t\t\tdocument.body.classList.remove('hs-overlay-body-open');\n\n\t\tconst closeFn = (cb: Function) => {\n\t\t\tif (this.overlay.classList.contains('open')) return false;\n\t\t\tconst toggles = document.querySelectorAll(\n\t\t\t\t`[data-hs-overlay=\"#${this.overlay.id}\"]`,\n\t\t\t);\n\n\t\t\ttoggles.forEach((toggle) => {\n\t\t\t\tif (toggle.ariaExpanded) toggle.ariaExpanded = 'false';\n\t\t\t});\n\t\t\tthis.overlay.classList.add(this.hiddenClass);\n\n\t\t\tthis.destroyBackdrop();\n\n\t\t\tthis.fireEvent('close', this.el);\n\t\t\tdispatch('close.hs.overlay', this.el, this.el);\n\n\t\t\tif (!document.querySelector('.hs-overlay.opened')) {\n\t\t\t\tdocument.body.style.overflow = '';\n\t\t\t\tif (this.emulateScrollbarSpace) document.body.style.paddingRight = '';\n\t\t\t}\n\n\t\t\tcb(this.overlay);\n\t\t};\n\n\t\treturn new Promise((resolve) => {\n\t\t\tif (!this.overlay) return false;\n\n\t\t\tthis.overlay.classList.remove('open', 'opened');\n\t\t\tthis.overlay.removeAttribute('aria-overlay');\n\t\t\tthis.overlay.removeAttribute('tabindex');\n\n\t\t\tif (forceClose) closeFn(resolve);\n\t\t\telse afterTransition(this.animationTarget, () => closeFn(resolve));\n\t\t});\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target) ||\n\t\t\t\tel.element.overlay ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsOverlayCollection) window.$hsOverlayCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-overlay]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsOverlayCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSOverlay(el);\n\t\t\t});\n\n\t\tif (window.$hsOverlayCollection) {\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSOverlay.accessibility(evt),\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic open(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target) ||\n\t\t\t\tel.element.overlay ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\telInCollection.element.overlay.classList.contains(\n\t\t\t\telInCollection.element.hiddenClass,\n\t\t\t)\n\t\t)\n\t\t\telInCollection.element.open();\n\t}\n\n\tstatic close(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target) ||\n\t\t\t\tel.element.overlay ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target),\n\t\t);\n\n\t\tif (\n\t\t\telInCollection &&\n\t\t\t!elInCollection.element.overlay.classList.contains(\n\t\t\t\telInCollection.element.hiddenClass,\n\t\t\t)\n\t\t)\n\t\t\telInCollection.element.close();\n\t}\n\n\tstatic setOpened(breakpoint: number, el: ICollectionItem<HSOverlay>) {\n\t\tif (document.body.clientWidth >= breakpoint) {\n\t\t\tdocument.body.classList.add('hs-overlay-body-open');\n\t\t\tel.element.overlay.classList.add('opened');\n\t\t} else el.element.close(true);\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst targets = window.$hsOverlayCollection.filter((el) =>\n\t\t\tel.element.overlay.classList.contains('open'),\n\t\t);\n\t\tconst target = targets[targets.length - 1];\n\t\tconst focusableElements = target?.element?.overlay?.querySelectorAll(\n\t\t\t'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n\t\t);\n\t\tconst notHiddenFocusableElements: HTMLElement[] = [];\n\t\tif (focusableElements?.length)\n\t\t\tfocusableElements.forEach((el: HTMLElement) => {\n\t\t\t\tif (!isParentOrElementHidden(el)) notHiddenFocusableElements.push(el);\n\t\t\t});\n\t\tconst basicCheck = target && !evt.metaKey;\n\n\t\tif (\n\t\t\tbasicCheck &&\n\t\t\t!target.element.isTabAccessibilityLimited &&\n\t\t\tevt.code === 'Tab'\n\t\t)\n\t\t\treturn false;\n\n\t\tif (basicCheck && notHiddenFocusableElements.length && evt.code === 'Tab') {\n\t\t\tevt.preventDefault();\n\t\t\tthis.onTab(target, notHiddenFocusableElements);\n\t\t}\n\t\tif (basicCheck && evt.code === 'Escape') {\n\t\t\tevt.preventDefault();\n\t\t\tthis.onEscape(target);\n\t\t}\n\t}\n\n\tstatic onEscape(target: ICollectionItem<HSOverlay>) {\n\t\tif (target && target.element.hasAbilityToCloseOnBackdropClick)\n\t\t\ttarget.element.close();\n\t}\n\n\tstatic onTab(\n\t\ttarget: ICollectionItem<HSOverlay>,\n\t\tfocusableElements: HTMLElement[],\n\t) {\n\t\tif (!focusableElements.length) return false;\n\n\t\tconst focused = target.element.overlay.querySelector(':focus');\n\t\tconst focusedIndex = Array.from(focusableElements).indexOf(\n\t\t\tfocused as HTMLElement,\n\t\t);\n\n\t\tif (focusedIndex > -1) {\n\t\t\tconst nextIndex = (focusedIndex + 1) % focusableElements.length;\n\t\t\t(focusableElements[nextIndex] as HTMLElement).focus();\n\t\t} else {\n\t\t\t(focusableElements[0] as HTMLElement).focus();\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsOverlayCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target) ||\n\t\t\t\tel.element.overlay ===\n\t\t\t\t\t(typeof target === 'string'\n\t\t\t\t\t\t? document.querySelector(target)\n\t\t\t\t\t\t: target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSOverlay: Function;\n\t\t$hsOverlayCollection: ICollectionItem<HSOverlay>[];\n\t}\n}\n\nconst autoCloseResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.autoClose)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter(\n\t\t(el) => el.element.autoClose,\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tif (document.body.clientWidth >= overlay.element.autoClose)\n\t\t\toverlay.element.close(true);\n\t});\n};\n\nconst setOpenedResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) => el.element.autoClose)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter(\n\t\t(el) => el.element.autoClose,\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tif (document.body.clientWidth >= overlay.element.autoClose)\n\t\t\toverlay.element.close(true);\n\t});\n};\n\nconst setBackdropZIndexResizeFn = () => {\n\tif (\n\t\t!window.$hsOverlayCollection.length ||\n\t\t!window.$hsOverlayCollection.find((el) =>\n\t\t\tel.element.overlay.classList.contains('opened'),\n\t\t)\n\t)\n\t\treturn false;\n\n\tconst overlays = window.$hsOverlayCollection.filter((el) =>\n\t\tel.element.overlay.classList.contains('opened'),\n\t);\n\n\toverlays.forEach((overlay) => {\n\t\tconst overlayZIndex = parseInt(\n\t\t\twindow\n\t\t\t\t.getComputedStyle(overlay.element.overlay)\n\t\t\t\t.getPropertyValue('z-index'),\n\t\t);\n\t\tconst backdrop: HTMLElement = document.querySelector(\n\t\t\t`#${overlay.element.overlay.id}-backdrop`,\n\t\t);\n\t\tconst backdropZIndex = parseInt(\n\t\t\twindow.getComputedStyle(backdrop).getPropertyValue('z-index'),\n\t\t);\n\t\tif (overlayZIndex === backdropZIndex + 1) return false;\n\n\t\tif ('style' in backdrop) backdrop.style.zIndex = `${overlayZIndex - 1}`;\n\t\tdocument.body.classList.add('hs-overlay-body-open');\n\t});\n};\n\nwindow.addEventListener('load', () => {\n\tHSOverlay.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Overlay collection:', window.$hsOverlayCollection);\n});\n\nwindow.addEventListener('resize', () => {\n\tautoCloseResizeFn();\n\tsetOpenedResizeFn();\n\tsetBackdropZIndexResizeFn();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSOverlay = HSOverlay;\n}\n\nexport default HSOverlay;\n","/*\n * HSPinInput\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IPinInputOptions, IPinInput } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSPinInput extends HSBasePlugin<IPinInputOptions> implements IPinInput {\n\tprivate items: NodeListOf<HTMLElement> | null;\n\tprivate currentItem: HTMLInputElement | null;\n\tprivate currentValue: string[] | null;\n\tprivate readonly placeholders: string[] | null;\n\tprivate readonly availableCharsRE: RegExp | null;\n\n\tconstructor(el: HTMLElement, options?: IPinInputOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-pin-input');\n\t\tconst dataOptions: IPinInputOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.items = this.el.querySelectorAll('[data-hs-pin-input-item]');\n\t\tthis.currentItem = null;\n\t\tthis.currentValue = new Array(this.items.length).fill('');\n\t\tthis.placeholders = [];\n\t\tthis.availableCharsRE = new RegExp(\n\t\t\tconcatOptions?.availableCharsRE || '^[a-zA-Z0-9]+$',\n\t\t); // '^[0-9]+$'\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsPinInputCollection, this);\n\n\t\tif (this.items.length) this.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildInputItems();\n\t}\n\n\tprivate buildInputItems() {\n\t\tthis.items.forEach((el, index) => {\n\t\t\tthis.placeholders.push(el.getAttribute('placeholder') || '');\n\n\t\t\tif (el.hasAttribute('autofocus')) this.onFocusIn(index);\n\n\t\t\tel.addEventListener('input', (evt) => this.onInput(evt, index));\n\t\t\tel.addEventListener('paste', (evt) => this.onPaste(evt));\n\t\t\tel.addEventListener('keydown', (evt) => this.onKeydown(evt, index));\n\t\t\tel.addEventListener('focusin', () => this.onFocusIn(index));\n\t\t\tel.addEventListener('focusout', () => this.onFocusOut(index));\n\t\t});\n\t}\n\n\tprivate checkIfNumber(value: string) {\n\t\treturn value.match(this.availableCharsRE);\n\t}\n\n\tprivate autoFillAll(text: string) {\n\t\tArray.from(text).forEach((n, i) => {\n\t\t\tif (!this?.items[i]) return false;\n\n\t\t\t(this.items[i] as HTMLInputElement).value = n;\n\n\t\t\tthis.items[i].dispatchEvent(new Event('input', { bubbles: true }));\n\t\t});\n\t}\n\n\tprivate setCurrentValue() {\n\t\tthis.currentValue = Array.from(this.items).map(\n\t\t\t(el) => (el as HTMLInputElement).value,\n\t\t);\n\t}\n\n\tprivate toggleCompleted() {\n\t\tif (!this.currentValue.includes('')) this.el.classList.add('active');\n\t\telse this.el.classList.remove('active');\n\t}\n\n\tprivate onInput(evt: Event, index: number) {\n\t\tconst originalValue = (evt.target as HTMLInputElement).value;\n\t\tthis.currentItem = evt.target as HTMLInputElement;\n\t\tthis.currentItem.value = '';\n\t\tthis.currentItem.value = originalValue[originalValue.length - 1];\n\n\t\tif (!this.checkIfNumber(this.currentItem.value)) {\n\t\t\tthis.currentItem.value = this.currentValue[index] || '';\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.setCurrentValue();\n\n\t\tif (this.currentItem.value) {\n\t\t\tif (index < this.items.length - 1) this.items[index + 1].focus();\n\t\t\tif (!this.currentValue.includes('')) {\n\t\t\t\tconst payload = { currentValue: this.currentValue };\n\n\t\t\t\tthis.fireEvent('completed', payload);\n\t\t\t\tdispatch('completed.hs.pinInput', this.el, payload);\n\t\t\t}\n\n\t\t\tthis.toggleCompleted();\n\t\t} else {\n\t\t\tif (index > 0) this.items[index - 1].focus();\n\t\t}\n\t}\n\n\tprivate onKeydown(evt: KeyboardEvent, index: number) {\n\t\tif (evt.key === 'Backspace' && index > 0) {\n\t\t\tif ((this.items[index] as HTMLInputElement).value === '') {\n\t\t\t\t(this.items[index - 1] as HTMLInputElement).value = '';\n\t\t\t\t(this.items[index - 1] as HTMLInputElement).focus();\n\t\t\t} else {\n\t\t\t\t(this.items[index] as HTMLInputElement).value = '';\n\t\t\t}\n\t\t}\n\n\t\tthis.setCurrentValue();\n\t\tthis.toggleCompleted();\n\t}\n\n\tprivate onFocusIn(index: number) {\n\t\tthis.items[index].setAttribute('placeholder', '');\n\t}\n\n\tprivate onFocusOut(index: number) {\n\t\tthis.items[index].setAttribute('placeholder', this.placeholders[index]);\n\t}\n\n\tprivate onPaste(evt: ClipboardEvent) {\n\t\tevt.preventDefault();\n\n\t\tthis.items.forEach((el) => {\n\t\t\tif (document.activeElement === el)\n\t\t\t\tthis.autoFillAll(evt.clipboardData.getData('text'));\n\t\t});\n\t}\n\n\t// Static method\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsPinInputCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsPinInputCollection) window.$hsPinInputCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-pin-input]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsPinInputCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSPinInput(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSPinInput: Function;\n\t\t$hsPinInputCollection: ICollectionItem<HSPinInput>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSPinInput.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('PIN input collection:', window.$hsPinInputCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSPinInput = HSPinInput;\n}\n\nexport default HSPinInput;\n","/*\n * HSRemoveElement\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { afterTransition } from '../../utils';\n\nimport { IRemoveElementOptions, IRemoveElement } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSRemoveElement\n\textends HSBasePlugin<IRemoveElementOptions>\n\timplements IRemoveElement\n{\n\tprivate readonly removeTargetId: string | null;\n\tprivate readonly removeTarget: HTMLElement | null;\n\tprivate readonly removeTargetAnimationClass: string;\n\n\tconstructor(el: HTMLElement, options?: IRemoveElementOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-remove-element-options');\n\t\tconst dataOptions: IRemoveElementOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.removeTargetId = this.el.getAttribute('data-hs-remove-element');\n\t\tthis.removeTarget = document.querySelector(this.removeTargetId);\n\t\tthis.removeTargetAnimationClass =\n\t\t\tconcatOptions?.removeTargetAnimationClass || 'hs-removing';\n\n\t\tif (this.removeTarget) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsRemoveElementCollection, this);\n\n\t\tthis.el.addEventListener('click', () => this.remove());\n\t}\n\n\tprivate remove() {\n\t\tif (!this.removeTarget) return false;\n\n\t\tthis.removeTarget.classList.add(this.removeTargetAnimationClass);\n\n\t\tafterTransition(this.removeTarget, () => {\n\t\t\tthis.removeTarget.remove();\n\t\t});\n\t}\n\n\t// Static method\n\tstatic autoInit() {\n\t\tif (!window.$hsRemoveElementCollection)\n\t\t\twindow.$hsRemoveElementCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-remove-element]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsRemoveElementCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSRemoveElement(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSRemoveElement: Function;\n\t\t$hsRemoveElementCollection: ICollectionItem<HSRemoveElement>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSRemoveElement.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Remove element collection:', window.$hsRemoveElementCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSRemoveElement = HSRemoveElement;\n}\n\nexport default HSRemoveElement;\n","/*\n * HSScrollspy\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { getClassProperty, dispatch } from '../../utils';\n\nimport { IScrollspy } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSScrollspy extends HSBasePlugin<{}> implements IScrollspy {\n\tprivate activeSection: HTMLElement | null;\n\tprivate readonly contentId: string | null;\n\tprivate readonly content: HTMLElement | null;\n\tprivate readonly links: NodeListOf<HTMLAnchorElement> | null;\n\tprivate readonly sections: HTMLElement[] | null;\n\tprivate readonly scrollableId: string | null;\n\tprivate readonly scrollable: HTMLElement | Document;\n\n\tconstructor(el: HTMLElement, options = {}) {\n\t\tsuper(el, options);\n\n\t\tthis.activeSection = null;\n\t\tthis.contentId = this.el.getAttribute('data-hs-scrollspy');\n\t\tthis.content = document.querySelector(this.contentId);\n\t\tthis.links = this.el.querySelectorAll('[href]');\n\t\tthis.sections = [];\n\t\tthis.scrollableId = this.el.getAttribute(\n\t\t\t'data-hs-scrollspy-scrollable-parent',\n\t\t);\n\t\tthis.scrollable = this.scrollableId\n\t\t\t? (document.querySelector(this.scrollableId) as HTMLElement)\n\t\t\t: (document as Document);\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsScrollspyCollection, this);\n\n\t\tthis.links.forEach((el) => {\n\t\t\tthis.sections.push(\n\t\t\t\tthis.scrollable.querySelector(el.getAttribute('href')),\n\t\t\t);\n\t\t});\n\n\t\tArray.from(this.sections).forEach((section: HTMLElement) => {\n\t\t\tif (!section.getAttribute('id')) return false;\n\n\t\t\tthis.scrollable.addEventListener('scroll', (evt) =>\n\t\t\t\tthis.update(evt, section),\n\t\t\t);\n\t\t});\n\n\t\tthis.links.forEach((el) => {\n\t\t\tel.addEventListener('click', (evt) => {\n\t\t\t\tevt.preventDefault();\n\n\t\t\t\tif (el.getAttribute('href') === 'javascript:;') return false;\n\n\t\t\t\tthis.scrollTo(el);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate update(evt: Event, section: HTMLElement) {\n\t\tconst globalOffset = parseInt(\n\t\t\tgetClassProperty(this.el, '--scrollspy-offset', '0'),\n\t\t);\n\t\tconst userOffset =\n\t\t\tparseInt(getClassProperty(section, '--scrollspy-offset')) || globalOffset;\n\t\tconst scrollableParentOffset =\n\t\t\tevt.target === document\n\t\t\t\t? 0\n\t\t\t\t: parseInt(\n\t\t\t\t\t\tString((evt.target as HTMLElement).getBoundingClientRect().top),\n\t\t\t\t\t);\n\t\tconst topOffset =\n\t\t\tparseInt(String(section.getBoundingClientRect().top)) -\n\t\t\tuserOffset -\n\t\t\tscrollableParentOffset;\n\t\tconst height = section.offsetHeight;\n\n\t\tif (topOffset <= 0 && topOffset + height > 0) {\n\t\t\tif (this.activeSection === section) return false;\n\n\t\t\tthis.links.forEach((el) => {\n\t\t\t\tel.classList.remove('active');\n\t\t\t});\n\n\t\t\tconst current = this.el.querySelector(\n\t\t\t\t`[href=\"#${section.getAttribute('id')}\"]`,\n\t\t\t);\n\n\t\t\tif (current) {\n\t\t\t\tcurrent.classList.add('active');\n\n\t\t\t\tconst group = current.closest('[data-hs-scrollspy-group]');\n\n\t\t\t\tif (group) {\n\t\t\t\t\tconst parentLink = group.querySelector('[href]');\n\n\t\t\t\t\tif (parentLink) parentLink.classList.add('active');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.activeSection = section;\n\t\t}\n\t}\n\n\tprivate scrollTo(link: HTMLAnchorElement) {\n\t\tconst targetId = link.getAttribute('href');\n\t\tconst target: HTMLElement = document.querySelector(targetId);\n\t\tconst globalOffset = parseInt(\n\t\t\tgetClassProperty(this.el, '--scrollspy-offset', '0'),\n\t\t);\n\t\tconst userOffset =\n\t\t\tparseInt(getClassProperty(target, '--scrollspy-offset')) || globalOffset;\n\t\tconst scrollableParentOffset =\n\t\t\tthis.scrollable === document\n\t\t\t\t? 0\n\t\t\t\t: (this.scrollable as HTMLElement).offsetTop;\n\t\tconst topOffset = target.offsetTop - userOffset - scrollableParentOffset;\n\t\tconst view = this.scrollable === document ? window : this.scrollable;\n\t\tconst scrollFn = () => {\n\t\t\twindow.history.replaceState(null, null, link.getAttribute('href'));\n\n\t\t\tif ('scrollTo' in view) {\n\t\t\t\tview.scrollTo({\n\t\t\t\t\ttop: topOffset,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst beforeScroll = this.fireEvent('beforeScroll', this.el);\n\t\tdispatch('beforeScroll.hs.scrollspy', this.el, this.el);\n\n\t\tif (beforeScroll instanceof Promise) beforeScroll.then(() => scrollFn());\n\t\telse scrollFn();\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement, isInstance = false) {\n\t\tconst elInCollection = window.$hsScrollspyCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsScrollspyCollection) window.$hsScrollspyCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-scrollspy]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsScrollspyCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSScrollspy(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSScrollspy: Function;\n\t\t$hsScrollspyCollection: ICollectionItem<HSScrollspy>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSScrollspy.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Scrollspy collection:', window.$hsScrollspyCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSScrollspy = HSScrollspy;\n}\n\nexport default HSScrollspy;\n","/*\n * HSSelect\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdebounce,\n\tdispatch,\n\tafterTransition,\n\thtmlToElement,\n\tclassToClassList,\n} from '../../utils';\n\nimport {\n\tISelect,\n\tISelectOptions,\n\tISingleOption,\n\tISingleOptionOptions,\n} from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { SELECT_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSSelect extends HSBasePlugin<ISelectOptions> implements ISelect {\n\tvalue: string | string[] | null;\n\tprivate readonly placeholder: string | null;\n\tprivate readonly hasSearch: boolean;\n\tprivate readonly preventSearchFocus: boolean;\n\tprivate readonly mode: string | null;\n\tprivate readonly viewport: HTMLElement | null;\n\n\tisOpened: boolean | null;\n\tisMultiple: boolean | null;\n\tisDisabled: boolean | null;\n\tselectedItems: string[];\n\n\tprivate readonly toggleTag: string | null;\n\tprivate readonly toggleClasses: string | null;\n\tprivate readonly toggleSeparators: {\n\t\titems?: string;\n\t\tbetweenItemsAndCounter?: string;\n\t} | null;\n\tprivate readonly toggleCountText: string | null;\n\tprivate readonly toggleCountTextMinItems: number | null;\n\tprivate readonly toggleCountTextMode: string | null;\n\tprivate readonly wrapperClasses: string | null;\n\tprivate readonly tagsItemTemplate: string | null;\n\tprivate readonly tagsItemClasses: string | null;\n\tprivate readonly tagsInputClasses: string | null;\n\tprivate readonly dropdownTag: string | null;\n\tprivate readonly dropdownClasses: string | null;\n\tprivate readonly dropdownDirectionClasses: {\n\t\ttop?: string;\n\t\tbottom?: string;\n\t} | null;\n\tpublic dropdownSpace: number | null;\n\tprivate readonly searchWrapperTemplate: string | null;\n\tprivate readonly searchPlaceholder: string | null;\n\tprivate readonly searchClasses: string | null;\n\tprivate readonly searchWrapperClasses: string | null;\n\tprivate readonly searchNoResultText: string | null;\n\tprivate readonly searchNoResultClasses: string | null;\n\tprivate readonly optionTag: string | null;\n\tprivate readonly optionTemplate: string | null;\n\tprivate readonly optionClasses: string | null;\n\tprivate readonly descriptionClasses: string | null;\n\tprivate readonly iconClasses: string | null;\n\n\tprivate animationInProcess: boolean;\n\n\tprivate wrapper: HTMLElement | null;\n\tprivate toggle: HTMLElement | null;\n\tprivate toggleTextWrapper: HTMLElement | null;\n\tprivate tagsInput: HTMLElement | null;\n\tprivate dropdown: HTMLElement | null;\n\tprivate searchWrapper: HTMLElement | null;\n\tprivate search: HTMLInputElement | null;\n\tprivate searchNoResult: HTMLElement | null;\n\tprivate selectOptions: ISingleOption[] | [];\n\tprivate extraMarkup: string | string[] | null;\n\n\tprivate readonly isAddTagOnEnter: boolean;\n\n\tprivate tagsInputHelper: HTMLElement | null;\n\n\tconstructor(el: HTMLElement, options?: ISelectOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-select');\n\t\tconst dataOptions: ISelectOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\t\tconst defaultToggleSeparators = {\n\t\t\titems: ', ',\n\t\t\tbetweenItemsAndCounter: 'and',\n\t\t};\n\n\t\tthis.value =\n\t\t\tconcatOptions?.value || (this.el as HTMLSelectElement).value || null;\n\t\tthis.placeholder = concatOptions?.placeholder || 'Select...';\n\t\tthis.hasSearch = concatOptions?.hasSearch || false;\n\t\tthis.preventSearchFocus = concatOptions?.preventSearchFocus || false;\n\t\tthis.mode = concatOptions?.mode || 'default';\n\t\tthis.viewport =\n\t\t\ttypeof concatOptions?.viewport !== 'undefined'\n\t\t\t\t? document.querySelector(concatOptions?.viewport)\n\t\t\t\t: null;\n\t\tthis.isOpened = Boolean(concatOptions?.isOpened) || false;\n\t\tthis.isMultiple = this.el.hasAttribute('multiple') || false;\n\t\tthis.isDisabled = this.el.hasAttribute('disabled') || false;\n\t\tthis.selectedItems = [];\n\t\tthis.wrapperClasses = concatOptions?.wrapperClasses || null;\n\t\tthis.toggleTag = concatOptions?.toggleTag || null;\n\t\tthis.toggleClasses = concatOptions?.toggleClasses || null;\n\t\tthis.toggleSeparators =\n\t\t\t{\n\t\t\t\t...defaultToggleSeparators,\n\t\t\t\t...concatOptions?.toggleSeparators,\n\t\t\t} ?? defaultToggleSeparators;\n\t\tthis.toggleCountText = concatOptions?.toggleCountText || null;\n\t\tthis.toggleCountTextMinItems = concatOptions?.toggleCountTextMinItems || 1;\n\t\tthis.toggleCountTextMode =\n\t\t\tconcatOptions?.toggleCountTextMode || 'countAfterLimit';\n\t\tthis.tagsItemTemplate = concatOptions?.tagsItemTemplate || null;\n\t\tthis.tagsItemClasses = concatOptions?.tagsItemClasses || null;\n\t\tthis.tagsInputClasses = concatOptions?.tagsInputClasses || null;\n\t\tthis.dropdownTag = concatOptions?.dropdownTag || null;\n\t\tthis.dropdownClasses = concatOptions?.dropdownClasses || null;\n\t\tthis.dropdownDirectionClasses =\n\t\t\tconcatOptions?.dropdownDirectionClasses || null;\n\t\tthis.dropdownSpace = concatOptions?.dropdownSpace || 10;\n\t\tthis.searchWrapperTemplate = concatOptions?.searchWrapperTemplate || null;\n\t\tthis.searchWrapperClasses =\n\t\t\tconcatOptions?.searchWrapperClasses || 'bg-white p-2 sticky top-0';\n\t\tthis.searchClasses =\n\t\t\tconcatOptions?.searchClasses ||\n\t\t\t'block w-[calc(100%-2rem)] text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 py-2 px-3 my-2 mx-4';\n\t\tthis.searchPlaceholder = concatOptions?.searchPlaceholder || 'Search...';\n\t\tthis.searchNoResultText =\n\t\t\tconcatOptions?.searchNoResultText || 'No results found';\n\t\tthis.searchNoResultClasses =\n\t\t\tconcatOptions?.searchNoResultClasses ||\n\t\t\t'px-4 text-sm text-gray-800 dark:text-neutral-200';\n\t\tthis.optionTemplate = concatOptions?.optionTemplate || null;\n\t\tthis.optionTag = concatOptions?.optionTag || null;\n\t\tthis.optionClasses = concatOptions?.optionClasses || null;\n\t\tthis.extraMarkup = concatOptions?.extraMarkup || null;\n\t\tthis.descriptionClasses = concatOptions?.descriptionClasses || null;\n\t\tthis.iconClasses = concatOptions?.iconClasses || null;\n\t\tthis.isAddTagOnEnter = concatOptions?.isAddTagOnEnter ?? true;\n\n\t\tthis.animationInProcess = false;\n\t\tthis.selectOptions = [];\n\n\t\tthis.tagsInputHelper = null;\n\n\t\tthis.init();\n\t}\n\n\tpublic setValue(val: string | string[]) {\n\t\tthis.value = val;\n\n\t\tthis.clearSelections();\n\n\t\tif (Array.isArray(val)) {\n\t\t\tthis.toggleTextWrapper.innerHTML = this.value.length\n\t\t\t\t? this.stringFromValue()\n\t\t\t\t: this.placeholder;\n\t\t\tthis.unselectMultipleItems();\n\t\t\tthis.selectMultipleItems();\n\t\t} else {\n\t\t\tthis.setToggleTitle();\n\n\t\t\tif (this.toggle.querySelector('[data-icon]')) this.setToggleIcon();\n\t\t\tif (this.toggle.querySelector('[data-title]')) this.setToggleTitle();\n\n\t\t\tthis.selectSingleItem();\n\t\t}\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsSelectCollection, this);\n\n\t\tthis.build();\n\t}\n\n\tprivate build() {\n\t\tthis.el.style.display = 'none';\n\n\t\tif (this.el.children) {\n\t\t\tArray.from(this.el.children)\n\t\t\t\t.filter((el: HTMLOptionElement) => el.value && el.value !== '')\n\t\t\t\t.forEach((el: HTMLOptionElement) => {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-select-option');\n\n\t\t\t\t\tthis.selectOptions = [\n\t\t\t\t\t\t...this.selectOptions,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: el.textContent,\n\t\t\t\t\t\t\tval: el.value,\n\t\t\t\t\t\t\tdisabled: el.disabled,\n\t\t\t\t\t\t\toptions: data !== 'undefined' ? JSON.parse(data) : null,\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t});\n\t\t}\n\n\t\tif (this.isMultiple) {\n\t\t\tconst selectedOptions = Array.from(this.el.children).filter(\n\t\t\t\t(el: HTMLOptionElement) => el.selected,\n\t\t\t);\n\n\t\t\tif (selectedOptions) {\n\t\t\t\tconst values: string[] = [];\n\n\t\t\t\tselectedOptions.forEach((el: HTMLOptionElement) => {\n\t\t\t\t\tvalues.push(el.value);\n\t\t\t\t});\n\n\t\t\t\tthis.value = values;\n\t\t\t}\n\t\t}\n\n\t\tthis.buildWrapper();\n\t\tif (this.mode === 'tags') this.buildTags();\n\t\telse this.buildToggle();\n\t\tthis.buildDropdown();\n\t\tif (this.extraMarkup) this.buildExtraMarkup();\n\t}\n\n\tprivate buildWrapper() {\n\t\tthis.wrapper = document.createElement('div');\n\t\tthis.wrapper.classList.add('hs-select', 'relative');\n\n\t\tif (this.mode === 'tags') {\n\t\t\tthis.wrapper.addEventListener('click', (evt) => {\n\t\t\t\tif (\n\t\t\t\t\t!(evt.target as HTMLElement).closest('[data-hs-select-dropdown]') &&\n\t\t\t\t\t!(evt.target as HTMLElement).closest('[data-tag-value]')\n\t\t\t\t) {\n\t\t\t\t\tthis.tagsInput.focus();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.wrapperClasses)\n\t\t\tclassToClassList(this.wrapperClasses, this.wrapper);\n\n\t\tthis.el.before(this.wrapper);\n\n\t\tthis.wrapper.append(this.el);\n\t}\n\n\tprivate buildExtraMarkup() {\n\t\tconst appendMarkup = (markup: string) => {\n\t\t\tthis.wrapper.append(htmlToElement(markup));\n\t\t};\n\n\t\tif (Array.isArray(this.extraMarkup))\n\t\t\tthis.extraMarkup.forEach((el) => appendMarkup(el));\n\t\telse appendMarkup(this.extraMarkup);\n\t}\n\n\tprivate buildToggle() {\n\t\tlet icon, title;\n\t\tthis.toggleTextWrapper = document.createElement('span');\n\t\tthis.toggleTextWrapper.classList.add('truncate');\n\t\tthis.toggle = htmlToElement(this.toggleTag || '<div></div>');\n\t\ticon = this.toggle.querySelector('[data-icon]');\n\t\ttitle = this.toggle.querySelector('[data-title]');\n\n\t\tif (!this.isMultiple && icon) this.setToggleIcon();\n\t\tif (!this.isMultiple && title) this.setToggleTitle();\n\t\tif (this.isMultiple) {\n\t\t\tthis.toggleTextWrapper.innerHTML = this.value.length\n\t\t\t\t? this.stringFromValue()\n\t\t\t\t: this.placeholder;\n\t\t} else {\n\t\t\tthis.toggleTextWrapper.innerHTML =\n\t\t\t\tthis.getItemByValue(this.value as string)?.title || this.placeholder;\n\t\t}\n\t\tif (!title) this.toggle.append(this.toggleTextWrapper);\n\t\tif (this.toggleClasses) classToClassList(this.toggleClasses, this.toggle);\n\t\tif (this.isDisabled) this.toggle.classList.add('disabled');\n\t\tif (this.wrapper) this.wrapper.append(this.toggle);\n\n\t\tif (this.toggle?.ariaExpanded) {\n\t\t\tif (this.isOpened) this.toggle.ariaExpanded = 'true';\n\t\t\telse this.toggle.ariaExpanded = 'false';\n\t\t}\n\n\t\tthis.toggle.addEventListener('click', () => {\n\t\t\tif (this.isDisabled) return false;\n\n\t\t\tif (this.isOpened) this.close();\n\t\t\telse this.open();\n\t\t});\n\t}\n\n\tprivate setToggleIcon() {\n\t\tconst icon = this.toggle.querySelector('[data-icon]');\n\t\ticon.innerHTML = '';\n\n\t\tif (icon) {\n\t\t\tconst img = htmlToElement(\n\t\t\t\tthis.getItemByValue(this.value as string)?.options?.icon || '',\n\t\t\t);\n\t\t\ticon.append(img);\n\n\t\t\tif (!img) icon.classList.add('hidden');\n\t\t\telse icon.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate setToggleTitle() {\n\t\tconst title = this.toggle.querySelector('[data-title]');\n\t\ttitle.classList.add('truncate');\n\t\ttitle.innerHTML = '';\n\n\t\tif (title) {\n\t\t\tconst titleText =\n\t\t\t\tthis.getItemByValue(this.value as string)?.title || this.placeholder;\n\t\t\ttitle.innerHTML = titleText;\n\n\t\t\tthis.toggle.append(title);\n\t\t}\n\t}\n\n\tprivate buildTags() {\n\t\tif (this.isDisabled) this.wrapper.classList.add('disabled');\n\t\tthis.buildTagsInput();\n\t\tthis.setTagsItems();\n\t}\n\n\tprivate reassignTagsInputPlaceholder(placeholder: string) {\n\t\t(this.tagsInput as HTMLInputElement).placeholder = placeholder;\n\t\tthis.tagsInputHelper.innerHTML = placeholder;\n\t\tthis.calculateInputWidth();\n\t}\n\n\tprivate buildTagsItem(val: string) {\n\t\tconst item = this.getItemByValue(val);\n\n\t\tlet template, title, remove, icon: null | HTMLElement;\n\n\t\tconst newItem = document.createElement('div');\n\t\tnewItem.setAttribute('data-tag-value', val);\n\t\tif (this.tagsItemClasses) classToClassList(this.tagsItemClasses, newItem);\n\n\t\tif (this.tagsItemTemplate) {\n\t\t\ttemplate = htmlToElement(this.tagsItemTemplate);\n\n\t\t\tnewItem.append(template);\n\t\t}\n\n\t\t// Icon\n\t\tif (item?.options?.icon) {\n\t\t\tconst img = htmlToElement(item?.options?.icon);\n\t\t\ticon = template\n\t\t\t\t? template.querySelector('[data-icon]')\n\t\t\t\t: document.createElement('span');\n\n\t\t\ticon.append(img);\n\n\t\t\tif (!template) newItem.append(icon);\n\t\t}\n\t\tif (\n\t\t\ttemplate &&\n\t\t\ttemplate.querySelector('[data-icon]') &&\n\t\t\t!item?.options?.icon\n\t\t) {\n\t\t\ttemplate.querySelector('[data-icon]').classList.add('hidden');\n\t\t}\n\n\t\t// Title\n\t\ttitle = template\n\t\t\t? template.querySelector('[data-title]')\n\t\t\t: document.createElement('span');\n\t\ttitle.textContent = item.title || '';\n\n\t\tif (!template) newItem.append(title);\n\n\t\t// Remove\n\t\tif (template) {\n\t\t\tremove = template.querySelector('[data-remove]');\n\t\t} else {\n\t\t\tremove = document.createElement('span');\n\t\t\tremove.textContent = 'X';\n\n\t\t\tnewItem.append(remove);\n\t\t}\n\n\t\tremove.addEventListener('click', () => {\n\t\t\tthis.value = (this.value as string[]).filter((el) => el !== val);\n\t\t\tthis.selectedItems = this.selectedItems.filter((el) => el !== val);\n\n\t\t\tif (!this.value.length)\n\t\t\t\tthis.reassignTagsInputPlaceholder(this.placeholder);\n\n\t\t\tthis.unselectMultipleItems();\n\t\t\tthis.selectMultipleItems();\n\n\t\t\tnewItem.remove();\n\t\t});\n\n\t\tthis.wrapper.append(newItem);\n\t}\n\n\tprivate getItemByValue(val: string) {\n\t\treturn this.selectOptions.find((el: ISingleOption) => el.val === val);\n\t}\n\n\tprivate setTagsItems() {\n\t\tif (this.value) {\n\t\t\t(this.value as string[]).forEach((val) => {\n\t\t\t\tif (!this.selectedItems.includes(val)) this.buildTagsItem(val);\n\n\t\t\t\tthis.selectedItems = !this.selectedItems.includes(val)\n\t\t\t\t\t? [...this.selectedItems, val]\n\t\t\t\t\t: this.selectedItems;\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate buildTagsInput() {\n\t\tthis.tagsInput = document.createElement('input');\n\n\t\tif (this.tagsInputClasses)\n\t\t\tclassToClassList(this.tagsInputClasses, this.tagsInput);\n\n\t\tthis.tagsInput.addEventListener('focus', () => this.open());\n\t\tthis.tagsInput.addEventListener('input', () => this.calculateInputWidth());\n\t\tthis.tagsInput.addEventListener(\n\t\t\t'input',\n\t\t\tdebounce((evt: InputEvent) =>\n\t\t\t\tthis.searchOptions((evt.target as HTMLInputElement).value),\n\t\t\t),\n\t\t);\n\t\tthis.tagsInput.addEventListener('keydown', (evt) => {\n\t\t\tif (evt.key === 'Enter' && this.isAddTagOnEnter) {\n\t\t\t\tconst val = (evt.target as HTMLInputElement).value;\n\n\t\t\t\tif (this.selectOptions.find((el: ISingleOption) => el.val === val))\n\t\t\t\t\treturn false;\n\n\t\t\t\tthis.addSelectOption(val, val);\n\t\t\t\tthis.buildOption(val, val);\n\t\t\t\t(\n\t\t\t\t\tthis.dropdown.querySelector(`[data-value=\"${val}\"]`) as HTMLElement\n\t\t\t\t).click();\n\n\t\t\t\tthis.resetTagsInputField();\n\t\t\t\t// this.close();\n\t\t\t}\n\t\t});\n\n\t\tthis.wrapper.append(this.tagsInput);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.adjustInputWidth();\n\t\t\tthis.reassignTagsInputPlaceholder(\n\t\t\t\tthis.value.length ? '' : this.placeholder,\n\t\t\t);\n\t\t});\n\t}\n\n\tprivate buildDropdown() {\n\t\tthis.dropdown = htmlToElement(this.dropdownTag || '<div></div>');\n\t\tthis.dropdown.setAttribute('data-hs-select-dropdown', '');\n\n\t\tthis.dropdown.classList.add('absolute', 'top-full');\n\t\tthis.dropdown.role = 'listbox';\n\t\tthis.dropdown.tabIndex = -1;\n\t\tthis.dropdown.ariaOrientation = 'vertical';\n\n\t\tif (!this.isOpened) this.dropdown.classList.add('hidden');\n\n\t\tif (this.dropdownClasses)\n\t\t\tclassToClassList(this.dropdownClasses, this.dropdown);\n\t\tif (this.wrapper) this.wrapper.append(this.dropdown);\n\t\tif (this.dropdown && this.hasSearch) this.buildSearch();\n\t\tif (this.selectOptions)\n\t\t\tthis.selectOptions.forEach((props: ISingleOption, i) =>\n\t\t\t\tthis.buildOption(\n\t\t\t\t\tprops.title,\n\t\t\t\t\tprops.val,\n\t\t\t\t\tprops.disabled,\n\t\t\t\t\tprops.selected,\n\t\t\t\t\tprops.options,\n\t\t\t\t\t`${i}`,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\tprivate buildSearch() {\n\t\tlet input;\n\t\tthis.searchWrapper = htmlToElement(\n\t\t\tthis.searchWrapperTemplate || '<div></div>',\n\t\t);\n\t\tif (this.searchWrapperClasses)\n\t\t\tclassToClassList(this.searchWrapperClasses, this.searchWrapper);\n\t\tinput = this.searchWrapper.querySelector('[data-input]');\n\n\t\tthis.search = htmlToElement('<input type=\"text\" />') as HTMLInputElement;\n\t\tthis.search.placeholder = this.searchPlaceholder;\n\t\tif (this.searchClasses) classToClassList(this.searchClasses, this.search);\n\n\t\tthis.search.addEventListener(\n\t\t\t'input',\n\t\t\tdebounce((evt: InputEvent) =>\n\t\t\t\tthis.searchOptions((evt.target as HTMLInputElement).value),\n\t\t\t),\n\t\t);\n\n\t\tif (input) input.append(this.search);\n\t\telse this.searchWrapper.append(this.search);\n\n\t\tthis.dropdown.append(this.searchWrapper);\n\t}\n\n\tprivate buildOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled: boolean = false,\n\t\tselected: boolean = false,\n\t\toptions?: ISingleOptionOptions,\n\t\tindex: string = '1',\n\t) {\n\t\tlet template: HTMLElement | null = null;\n\t\tlet titleWrapper: HTMLElement | null = null;\n\t\tlet iconWrapper: HTMLElement | null = null;\n\t\tlet descriptionWrapper: HTMLElement | null = null;\n\n\t\tconst option = htmlToElement(this.optionTag || '<div></div>');\n\t\toption.setAttribute('data-value', val);\n\t\toption.setAttribute('data-title-value', title);\n\t\toption.setAttribute('tabIndex', index);\n\t\toption.classList.add('cursor-pointer');\n\t\tif (disabled) option.classList.add('disabled');\n\t\tif (selected) {\n\t\t\t// @ts-ignore\n\t\t\tif (this.isMultiple) this.value = [...this.value, val];\n\t\t\telse this.value = val;\n\t\t}\n\t\tif (this.optionTemplate) {\n\t\t\ttemplate = htmlToElement(this.optionTemplate);\n\n\t\t\toption.append(template);\n\t\t}\n\t\tif (template) {\n\t\t\ttitleWrapper = template.querySelector('[data-title]');\n\t\t\ttitleWrapper.textContent = title || '';\n\t\t} else {\n\t\t\toption.textContent = title || '';\n\t\t}\n\t\tif (options) {\n\t\t\tif (options.icon) {\n\t\t\t\tconst img = htmlToElement(options.icon);\n\t\t\t\timg.classList.add('max-w-full');\n\n\t\t\t\tif (template) {\n\t\t\t\t\ticonWrapper = template.querySelector('[data-icon]');\n\t\t\t\t\ticonWrapper.append(img);\n\t\t\t\t} else {\n\t\t\t\t\tconst icon = htmlToElement('<div></div>');\n\t\t\t\t\tif (this.iconClasses) classToClassList(this.iconClasses, icon);\n\n\t\t\t\t\ticon.append(img);\n\t\t\t\t\toption.append(icon);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.description) {\n\t\t\t\tif (template) {\n\t\t\t\t\tdescriptionWrapper = template.querySelector('[data-description]');\n\t\t\t\t\tdescriptionWrapper.append(options.description);\n\t\t\t\t} else {\n\t\t\t\t\tconst description = htmlToElement('<div></div>');\n\t\t\t\t\tdescription.textContent = options.description;\n\t\t\t\t\tif (this.descriptionClasses)\n\t\t\t\t\t\tclassToClassList(this.descriptionClasses, description);\n\n\t\t\t\t\toption.append(description);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\ttemplate &&\n\t\t\ttemplate.querySelector('[data-icon]') &&\n\t\t\t!options &&\n\t\t\t!options?.icon\n\t\t) {\n\t\t\ttemplate.querySelector('[data-icon]').classList.add('hidden');\n\t\t}\n\n\t\tif (\n\t\t\tthis.value &&\n\t\t\t(this.isMultiple ? this.value.includes(val) : this.value === val)\n\t\t)\n\t\t\toption.classList.add('selected');\n\n\t\tif (!disabled)\n\t\t\toption.addEventListener('click', () => this.onSelectOption(val));\n\n\t\tif (this.optionClasses) classToClassList(this.optionClasses, option);\n\t\tif (this.dropdown) this.dropdown.append(option);\n\t\tif (selected) this.setNewValue();\n\t}\n\n\tprivate destroyOption(val: string) {\n\t\tconst option = this.dropdown.querySelector(`[data-value=\"${val}\"]`);\n\n\t\tif (!option) return false;\n\n\t\toption.remove();\n\t}\n\n\tprivate buildOriginalOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled?: boolean,\n\t\tselected?: boolean,\n\t\toptions?: ISingleOptionOptions,\n\t) {\n\t\tconst option = htmlToElement('<option></option>');\n\t\toption.setAttribute('value', val);\n\t\tif (disabled) option.setAttribute('disabled', 'disabled');\n\t\tif (selected) option.setAttribute('selected', 'selected');\n\t\toption.setAttribute('data-hs-select-option', JSON.stringify(options));\n\t\toption.innerText = title;\n\n\t\tthis.el.append(option);\n\t}\n\n\tprivate destroyOriginalOption(val: string) {\n\t\tconst option = this.el.querySelector(`[value=\"${val}\"]`);\n\n\t\tif (!option) return false;\n\n\t\toption.remove();\n\t}\n\n\tprivate buildTagsInputHelper() {\n\t\tthis.tagsInputHelper = document.createElement('span');\n\t\tthis.tagsInputHelper.style.fontSize = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontSize;\n\t\tthis.tagsInputHelper.style.fontFamily = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontFamily;\n\t\tthis.tagsInputHelper.style.fontWeight = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).fontWeight;\n\t\tthis.tagsInputHelper.style.letterSpacing = window.getComputedStyle(\n\t\t\tthis.tagsInput,\n\t\t).letterSpacing;\n\t\tthis.tagsInputHelper.style.visibility = 'hidden';\n\t\tthis.tagsInputHelper.style.whiteSpace = 'pre';\n\t\tthis.tagsInputHelper.style.position = 'absolute';\n\n\t\tthis.wrapper.appendChild(this.tagsInputHelper);\n\t}\n\n\tprivate calculateInputWidth() {\n\t\tthis.tagsInputHelper.textContent =\n\t\t\t(this.tagsInput as HTMLInputElement).value ||\n\t\t\t(this.tagsInput as HTMLInputElement).placeholder;\n\n\t\tconst inputPadding =\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).paddingLeft) +\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).paddingRight);\n\t\tconst inputBorder =\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).borderLeftWidth) +\n\t\t\tparseInt(window.getComputedStyle(this.tagsInput).borderRightWidth);\n\t\tconst newWidth =\n\t\t\tthis.tagsInputHelper.offsetWidth + inputPadding + inputBorder;\n\t\tconst maxWidth =\n\t\t\tthis.wrapper.offsetWidth -\n\t\t\t(parseInt(window.getComputedStyle(this.wrapper).paddingLeft) +\n\t\t\t\tparseInt(window.getComputedStyle(this.wrapper).paddingRight));\n\n\t\t(this.tagsInput as HTMLInputElement).style.width = `${\n\t\t\tMath.min(newWidth, maxWidth) + 2\n\t\t}px`;\n\t}\n\n\tprivate adjustInputWidth() {\n\t\tthis.buildTagsInputHelper();\n\t\tthis.calculateInputWidth();\n\t}\n\n\tprivate onSelectOption(val: string) {\n\t\tthis.clearSelections();\n\n\t\tif (this.isMultiple) {\n\t\t\tthis.value = this.value.includes(val)\n\t\t\t\t? Array.from(this.value).filter((el) => el !== val)\n\t\t\t\t: [...Array.from(this.value), val];\n\n\t\t\tthis.selectMultipleItems();\n\t\t\tthis.setNewValue();\n\t\t} else {\n\t\t\tthis.value = val;\n\n\t\t\tthis.selectSingleItem();\n\t\t\tthis.setNewValue();\n\t\t}\n\n\t\tthis.fireEvent('change', this.value);\n\t\tdispatch('change.hs.select', this.el, this.value);\n\n\t\tif (this.mode === 'tags') {\n\t\t\tconst intersection = this.selectedItems.filter(\n\t\t\t\t(x) => !(this.value as string[]).includes(x),\n\t\t\t);\n\t\t\tif (intersection.length) {\n\t\t\t\tintersection.forEach((el) => {\n\t\t\t\t\tthis.selectedItems = this.selectedItems.filter((elI) => elI !== el);\n\t\t\t\t\tthis.wrapper.querySelector(`[data-tag-value=\"${el}\"]`).remove();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.resetTagsInputField();\n\t\t}\n\n\t\tif (!this.isMultiple) {\n\t\t\tif (this.toggle.querySelector('[data-icon]')) this.setToggleIcon();\n\t\t\tif (this.toggle.querySelector('[data-title]')) this.setToggleTitle();\n\t\t\tthis.close();\n\t\t}\n\n\t\tif (!this.value.length && this.mode === 'tags')\n\t\t\tthis.reassignTagsInputPlaceholder(this.placeholder);\n\n\t\tif (this.isOpened && this.mode === 'tags' && this.tagsInput)\n\t\t\tthis.tagsInput.focus();\n\n\t\tthis.triggerChangeEventForNativeSelect();\n\t}\n\n\tprivate triggerChangeEventForNativeSelect() {\n\t\t// TODO:: test for bugs after comment the line below\n\t\t// (this.el as HTMLSelectElement).value = `${this.value}`;\n\t\tconst selectChangeEvent = new Event('change', { bubbles: true });\n\t\t(this.el as HTMLSelectElement).dispatchEvent(selectChangeEvent);\n\t}\n\n\tprivate addSelectOption(\n\t\ttitle: string,\n\t\tval: string,\n\t\tdisabled?: boolean,\n\t\tselected?: boolean,\n\t\toptions?: ISingleOptionOptions,\n\t) {\n\t\tthis.selectOptions = [\n\t\t\t...this.selectOptions,\n\t\t\t{\n\t\t\t\ttitle,\n\t\t\t\tval,\n\t\t\t\tdisabled,\n\t\t\t\tselected,\n\t\t\t\toptions,\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate removeSelectOption(val: string, isArray = false) {\n\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t(el: ISingleOption) => el.val === val,\n\t\t);\n\n\t\tif (!hasOption) return false;\n\n\t\tthis.selectOptions = this.selectOptions.filter(\n\t\t\t(el: ISingleOption) => el.val !== val,\n\t\t);\n\n\t\tconsole.log(isArray);\n\n\t\tthis.value = isArray\n\t\t\t? (this.value as string[]).filter((item: string) => item !== val)\n\t\t\t: val;\n\n\t\tconsole.log(this.value);\n\t}\n\n\tprivate resetTagsInputField() {\n\t\t(this.tagsInput as HTMLInputElement).value = '';\n\n\t\tthis.reassignTagsInputPlaceholder('');\n\t\tthis.searchOptions('');\n\t}\n\n\tprivate clearSelections() {\n\t\tArray.from(this.dropdown.children).forEach((el) => {\n\t\t\tif (el.classList.contains('selected')) el.classList.remove('selected');\n\t\t});\n\t\tArray.from(this.el.children).forEach((el) => {\n\t\t\tif ((el as HTMLOptionElement).selected)\n\t\t\t\t(el as HTMLOptionElement).selected = false;\n\t\t});\n\t}\n\n\tprivate setNewValue() {\n\t\tif (this.mode === 'tags') {\n\t\t\tthis.setTagsItems();\n\t\t} else {\n\t\t\tconsole.log();\n\n\t\t\tif (this.value.length)\n\t\t\t\tthis.toggleTextWrapper.innerHTML = this.stringFromValue();\n\t\t\telse this.toggleTextWrapper.innerHTML = this.placeholder;\n\t\t}\n\t}\n\n\tprivate stringFromValue() {\n\t\tconst value: string[] = [];\n\t\tlet title = '';\n\n\t\tthis.selectOptions.forEach((el: ISingleOption) => {\n\t\t\tif (this.isMultiple) {\n\t\t\t\tif (this.value.includes(el.val)) value.push(el.title);\n\t\t\t} else {\n\t\t\t\tif (this.value === el.val) value.push(el.title);\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tthis.toggleCountText &&\n\t\t\tthis.toggleCountText !== '' &&\n\t\t\tvalue.length >= this.toggleCountTextMinItems\n\t\t) {\n\t\t\tif (this.toggleCountTextMode === 'nItemsAndCount') {\n\t\t\t\tconst nItems = value.slice(0, this.toggleCountTextMinItems - 1);\n\n\t\t\t\ttitle = `${nItems.join(this.toggleSeparators.items)} ${this.toggleSeparators.betweenItemsAndCounter} ${value.length - nItems.length} ${this.toggleCountText}`;\n\t\t\t} else {\n\t\t\t\ttitle = `${value.length} ${this.toggleCountText}`;\n\t\t\t}\n\t\t} else {\n\t\t\ttitle = value.join(this.toggleSeparators.items);\n\t\t}\n\n\t\treturn title;\n\t}\n\n\tprivate selectSingleItem() {\n\t\tconst selectedOption = Array.from(this.el.children).find(\n\t\t\t(el) => this.value === (el as HTMLOptionElement).value,\n\t\t);\n\t\t(selectedOption as HTMLOptionElement).selected = true;\n\n\t\tconst selectedItem = Array.from(this.dropdown.children).find(\n\t\t\t(el) =>\n\t\t\t\tthis.value === (el as HTMLOptionElement).getAttribute('data-value'),\n\t\t);\n\n\t\tif (selectedItem) selectedItem.classList.add('selected');\n\t}\n\n\tprivate selectMultipleItems() {\n\t\tArray.from(this.dropdown.children)\n\t\t\t.filter((el) => this.value.includes(el.getAttribute('data-value')))\n\t\t\t.forEach((el) => el.classList.add('selected'));\n\n\t\tArray.from(this.el.children)\n\t\t\t.filter((el) => this.value.includes((el as HTMLOptionElement).value))\n\t\t\t.forEach((el) => ((el as HTMLOptionElement).selected = true));\n\t}\n\n\tprivate unselectMultipleItems() {\n\t\tArray.from(this.dropdown.children).forEach((el) =>\n\t\t\tel.classList.remove('selected'),\n\t\t);\n\t\tArray.from(this.el.children).forEach(\n\t\t\t(el) => ((el as HTMLOptionElement).selected = false),\n\t\t);\n\t}\n\n\tprivate searchOptions(val: string) {\n\t\tif (this.searchNoResult) {\n\t\t\tthis.searchNoResult.remove();\n\t\t\tthis.searchNoResult = null;\n\t\t}\n\t\tthis.searchNoResult = htmlToElement('<span></span>');\n\t\tthis.searchNoResult.innerText = this.searchNoResultText;\n\t\tclassToClassList(this.searchNoResultClasses, this.searchNoResult);\n\n\t\tconst options = this.dropdown.querySelectorAll('[data-value]');\n\t\tlet hasItems = false;\n\n\t\toptions.forEach((el) => {\n\t\t\tconst optionVal = el.getAttribute('data-title-value').toLocaleLowerCase();\n\n\t\t\tif (!optionVal.includes(val.toLocaleLowerCase()))\n\t\t\t\tel.classList.add('hidden');\n\t\t\telse {\n\t\t\t\tel.classList.remove('hidden');\n\t\t\t\thasItems = true;\n\t\t\t}\n\t\t});\n\n\t\tif (!hasItems) this.dropdown.append(this.searchNoResult);\n\t}\n\n\tprivate eraseToggleIcon() {\n\t\tconst icon = this.toggle.querySelector('[data-icon]');\n\n\t\tif (icon) {\n\t\t\ticon.innerHTML = null;\n\t\t\ticon.classList.add('hidden');\n\t\t}\n\t}\n\n\tprivate eraseToggleTitle() {\n\t\tconst title = this.toggle.querySelector('[data-title]');\n\n\t\tif (title) {\n\t\t\ttitle.innerHTML = this.placeholder;\n\t\t} else {\n\t\t\tthis.toggleTextWrapper.innerHTML = this.placeholder;\n\t\t}\n\t}\n\n\t// Public methods\n\tpublic destroy() {\n\t\tconst parent = this.el.parentElement.parentElement;\n\n\t\tthis.el.classList.remove('hidden');\n\t\tthis.el.style.display = '';\n\t\tparent.prepend(this.el);\n\t\tparent.querySelector('.hs-select').remove();\n\t\tthis.wrapper = null;\n\t}\n\n\tpublic open() {\n\t\tconst currentlyOpened =\n\t\t\twindow?.$hsSelectCollection?.find((el) => el.element.isOpened) || null;\n\n\t\tif (currentlyOpened) currentlyOpened.element.close();\n\t\tif (this.animationInProcess) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tthis.dropdown.classList.remove('hidden');\n\n\t\tthis.recalculateDirection();\n\n\t\tsetTimeout(() => {\n\t\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'true';\n\t\t\tthis.wrapper.classList.add('active');\n\t\t\tthis.dropdown.classList.add('opened');\n\t\t\tif (this.hasSearch && !this.preventSearchFocus) this.search.focus();\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.isOpened = true;\n\t}\n\n\tpublic close() {\n\t\tif (this.animationInProcess) return false;\n\n\t\tthis.animationInProcess = true;\n\n\t\tif (this?.toggle?.ariaExpanded) this.toggle.ariaExpanded = 'false';\n\t\tthis.wrapper.classList.remove('active');\n\t\tthis.dropdown.classList.remove('opened', 'bottom-full', 'top-full');\n\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.bottom);\n\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.top);\n\t\tthis.dropdown.style.marginTop = '';\n\t\tthis.dropdown.style.marginBottom = '';\n\n\t\tafterTransition(this.dropdown, () => {\n\t\t\tthis.dropdown.classList.add('hidden');\n\t\t\tif (this.hasSearch) {\n\t\t\t\tthis.search.value = '';\n\t\t\t\tthis.search.dispatchEvent(new Event('input', { bubbles: true }));\n\t\t\t\tthis.search.blur();\n\t\t\t}\n\n\t\t\tthis.animationInProcess = false;\n\t\t});\n\n\t\tthis.dropdown\n\t\t\t.querySelector('.hs-select-option-highlighted')\n\t\t\t?.classList.remove('hs-select-option-highlighted');\n\t\tthis.isOpened = false;\n\t}\n\n\tpublic addOption(items: ISingleOption | ISingleOption[]) {\n\t\tlet i = `${this.selectOptions.length}`;\n\t\tconst addOption = (option: ISingleOption) => {\n\t\t\tconst { title, val, disabled, selected, options } = option;\n\t\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t\t(el: ISingleOption) => el.val === val,\n\t\t\t);\n\n\t\t\tif (!hasOption) {\n\t\t\t\tthis.addSelectOption(title, val, disabled, selected, options);\n\t\t\t\tthis.buildOption(title, val, disabled, selected, options, i);\n\t\t\t\tthis.buildOriginalOption(title, val, disabled, selected, options);\n\n\t\t\t\tif (selected && !this.isMultiple) this.onSelectOption(val);\n\t\t\t}\n\t\t};\n\n\t\tif (Array.isArray(items)) {\n\t\t\titems.forEach((option) => {\n\t\t\t\taddOption(option);\n\t\t\t});\n\t\t} else {\n\t\t\taddOption(items);\n\t\t}\n\t}\n\n\tpublic removeOption(values: string | string[]) {\n\t\tconst removeOption = (val: string, isArray = false) => {\n\t\t\tconst hasOption = !!this.selectOptions.some(\n\t\t\t\t(el: ISingleOption) => el.val === val,\n\t\t\t);\n\n\t\t\tif (hasOption) {\n\t\t\t\tthis.removeSelectOption(val, isArray);\n\t\t\t\tthis.destroyOption(val);\n\t\t\t\tthis.destroyOriginalOption(val);\n\n\t\t\t\tif (this.value === val) {\n\t\t\t\t\tthis.value = null;\n\n\t\t\t\t\tthis.eraseToggleTitle();\n\t\t\t\t\tthis.eraseToggleIcon();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (Array.isArray(values)) {\n\t\t\tvalues.forEach((val) => {\n\t\t\t\tremoveOption(val, this.isMultiple);\n\t\t\t});\n\t\t} else {\n\t\t\tremoveOption(values, this.isMultiple);\n\t\t}\n\n\t\tthis.setNewValue();\n\t}\n\n\tpublic recalculateDirection() {\n\t\tif (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.dropdown,\n\t\t\t\tthis.toggle || this.tagsInput,\n\t\t\t\t'bottom',\n\t\t\t\tthis.dropdownSpace,\n\t\t\t\tthis.viewport,\n\t\t\t)\n\t\t) {\n\t\t\tthis.dropdown.classList.remove('bottom-full');\n\t\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.bottom);\n\t\t\tthis.dropdown.style.marginBottom = '';\n\t\t\tthis.dropdown.classList.add('top-full');\n\t\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\t\tthis.dropdown.classList.add(this.dropdownDirectionClasses.top);\n\t\t\tthis.dropdown.style.marginTop = `${this.dropdownSpace}px`;\n\t\t} else {\n\t\t\tthis.dropdown.classList.remove('top-full');\n\t\t\tif (this.dropdownDirectionClasses?.top)\n\t\t\t\tthis.dropdown.classList.remove(this.dropdownDirectionClasses.top);\n\t\t\tthis.dropdown.style.marginTop = '';\n\t\t\tthis.dropdown.classList.add('bottom-full');\n\t\t\tif (this.dropdownDirectionClasses?.bottom)\n\t\t\t\tthis.dropdown.classList.add(this.dropdownDirectionClasses.bottom);\n\t\t\tthis.dropdown.style.marginBottom = `${this.dropdownSpace}px`;\n\t\t}\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsSelectCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsSelectCollection) window.$hsSelectCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-select]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsSelectCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-select');\n\t\t\t\t\tconst options: ISelectOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSSelect(el, options);\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (window.$hsSelectCollection) {\n\t\t\twindow.addEventListener('click', (evt) => {\n\t\t\t\tconst evtTarget = evt.target;\n\n\t\t\t\tHSSelect.closeCurrentlyOpened(evtTarget as HTMLElement);\n\t\t\t});\n\n\t\t\tdocument.addEventListener('keydown', (evt) =>\n\t\t\t\tHSSelect.accessibility(evt),\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic open(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsSelectCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection && !elInCollection.element.isOpened)\n\t\t\telInCollection.element.open();\n\t}\n\n\tstatic close(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsSelectCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection && elInCollection.element.isOpened) {\n\t\t\telInCollection.element.close();\n\t\t}\n\t}\n\n\tstatic closeCurrentlyOpened(evtTarget: HTMLElement | null = null) {\n\t\tif (!evtTarget.closest('.hs-select.active')) {\n\t\t\tconst currentlyOpened =\n\t\t\t\twindow.$hsSelectCollection.filter((el) => el.element.isOpened) || null;\n\n\t\t\tif (currentlyOpened) {\n\t\t\t\tcurrentlyOpened.forEach((el) => {\n\t\t\t\t\tel.element.close();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tSELECT_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEscape();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Tab':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onTab(evt.shiftKey);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tthis.onEnter(evt);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEscape() {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) target.element.close();\n\t}\n\n\tstatic onArrow(isArrowUp = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t\t).reverse()\n\t\t\t\t: Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'));\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current =\n\t\t\t\tdropdown.querySelector('.hs-select-option-highlighted') ||\n\t\t\t\tdropdown.querySelector('.selected');\n\t\t\tif (!current) options[0].classList.add('hs-select-option-highlighted');\n\t\t\tlet currentInd = options.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < options.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t}\n\n\t\t\t(options[currentInd] as HTMLButtonElement).focus();\n\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\toptions[currentInd].classList.add('hs-select-option-highlighted');\n\t\t}\n\t}\n\n\tstatic onTab(isArrowUp = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isArrowUp\n\t\t\t\t? Array.from(\n\t\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t\t).reverse()\n\t\t\t\t: Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'));\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current =\n\t\t\t\tdropdown.querySelector('.hs-select-option-highlighted') ||\n\t\t\t\tdropdown.querySelector('.selected');\n\t\t\tif (!current) options[0].classList.add('hs-select-option-highlighted');\n\t\t\tlet currentInd = options.findIndex((el: any) => el === current);\n\n\t\t\tif (currentInd + 1 < options.length) {\n\t\t\t\tcurrentInd++;\n\t\t\t} else {\n\t\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\t\ttarget.element.close();\n\t\t\t\ttarget.element.toggle.focus();\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t(options[currentInd] as HTMLButtonElement).focus();\n\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\toptions[currentInd].classList.add('hs-select-option-highlighted');\n\t\t}\n\t}\n\n\tstatic onStartEnd(isStart = true) {\n\t\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\t\tif (target) {\n\t\t\tconst dropdown = target.element.dropdown;\n\n\t\t\tif (!dropdown) return false;\n\n\t\t\tconst preparedOptions = isStart\n\t\t\t\t? Array.from(dropdown.querySelectorAll(':scope > *:not(.hidden)'))\n\t\t\t\t: Array.from(\n\t\t\t\t\t\tdropdown.querySelectorAll(':scope > *:not(.hidden)'),\n\t\t\t\t\t).reverse();\n\t\t\tconst options = preparedOptions.filter(\n\t\t\t\t(el: any) => !el.classList.contains('disabled'),\n\t\t\t);\n\t\t\tconst current = dropdown.querySelector('.hs-select-option-highlighted');\n\n\t\t\tif (options.length) {\n\t\t\t\t(options[0] as HTMLButtonElement).focus();\n\t\t\t\tif (current) current.classList.remove('hs-select-option-highlighted');\n\t\t\t\toptions[0].classList.add('hs-select-option-highlighted');\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onEnter(evt: Event) {\n\t\tconst select = (evt.target as HTMLElement).previousSibling;\n\n\t\tif (window.$hsSelectCollection.find((el) => el.element.el === select)) {\n\t\t\tconst opened = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.isOpened,\n\t\t\t);\n\t\t\tconst target = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.el === select,\n\t\t\t);\n\n\t\t\topened.element.close();\n\t\t\ttarget.element.open();\n\t\t} else {\n\t\t\tconst target = window.$hsSelectCollection.find(\n\t\t\t\t(el) => el.element.isOpened,\n\t\t\t);\n\n\t\t\tif (target)\n\t\t\t\ttarget.element.onSelectOption(\n\t\t\t\t\t(evt.target as HTMLElement).dataset.value || '',\n\t\t\t\t);\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSSelect: Function;\n\t\t$hsSelectCollection: ICollectionItem<HSSelect>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSSelect.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Select collection:', window.$hsSelectCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsSelectCollection) return false;\n\n\tconst target = window.$hsSelectCollection.find((el) => el.element.isOpened);\n\n\tif (target) target.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSSelect = HSSelect;\n}\n\nexport default HSSelect;\n","/*\n * HSStepper\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { IStepperOptions, IStepper, IStepperItem } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSStepper extends HSBasePlugin<{}> implements IStepper {\n\tprivate currentIndex: number | null;\n\tprivate readonly mode: string | null;\n\tprivate isCompleted: boolean | null;\n\n\tprivate totalSteps: number | null;\n\n\tprivate navItems: IStepperItem[] | null;\n\tprivate contentItems: IStepperItem[] | null;\n\tprivate backBtn: HTMLElement | null;\n\tprivate nextBtn: HTMLElement | null;\n\tprivate skipBtn: HTMLElement | null;\n\tprivate completeStepBtn: HTMLElement | null;\n\tprivate completeStepBtnDefaultText: string | null;\n\tprivate finishBtn: HTMLElement | null;\n\tprivate resetBtn: HTMLElement | null;\n\n\tconstructor(el: HTMLElement, options?: IStepperOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-stepper');\n\t\tconst dataOptions: IStepperOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.currentIndex = concatOptions?.currentIndex || 1;\n\t\tthis.mode = concatOptions?.mode || 'linear';\n\t\tthis.isCompleted =\n\t\t\ttypeof concatOptions?.isCompleted !== 'undefined'\n\t\t\t\t? concatOptions?.isCompleted\n\t\t\t\t: false;\n\n\t\tthis.totalSteps = 1;\n\n\t\tthis.navItems = [];\n\t\tthis.contentItems = [];\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsStepperCollection, this);\n\n\t\tthis.buildNav();\n\t\tthis.buildContent();\n\t\tthis.buildButtons();\n\t\tthis.setTotalSteps();\n\t}\n\n\tprivate getUncompletedSteps(inIncludedSkipped: boolean = false) {\n\t\treturn this.navItems.filter(({ isCompleted, isSkip }) =>\n\t\t\tinIncludedSkipped ? !isCompleted || isSkip : !isCompleted && !isSkip,\n\t\t);\n\t}\n\n\tprivate setTotalSteps() {\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { index } = item;\n\n\t\t\tif (index > this.totalSteps) this.totalSteps = index;\n\t\t});\n\t}\n\n\t// Nav\n\tprivate buildNav() {\n\t\tthis.el\n\t\t\t.querySelectorAll('[data-hs-stepper-nav-item]')\n\t\t\t.forEach((el) => this.addNavItem(el as HTMLElement));\n\n\t\tthis.navItems.forEach((item) => this.buildNavItem(item));\n\t}\n\n\tprivate buildNavItem(item: IStepperItem) {\n\t\tconst { index, isDisabled, el } = item;\n\n\t\tif (index === this.currentIndex) this.setCurrentNavItem();\n\n\t\tif (this.mode !== 'linear' || isDisabled) {\n\t\t\tel.addEventListener('click', () => this.handleNavItemClick(item));\n\t\t}\n\t}\n\n\tprivate addNavItem(el: HTMLElement) {\n\t\tconst {\n\t\t\tindex,\n\t\t\tisFinal = false,\n\t\t\tisCompleted = false,\n\t\t\tisSkip = false,\n\t\t\tisOptional = false,\n\t\t\tisDisabled = false,\n\t\t\tisProcessed = false,\n\t\t\thasError = false,\n\t\t} = JSON.parse(el.getAttribute('data-hs-stepper-nav-item'));\n\n\t\tif (isCompleted) el.classList.add('success');\n\t\tif (isSkip) el.classList.add('skipped');\n\t\tif (isDisabled) {\n\t\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\t\tel.setAttribute('disabled', 'disabled');\n\n\t\t\tel.classList.add('disabled');\n\t\t}\n\t\tif (hasError) el.classList.add('error');\n\n\t\tthis.navItems.push({\n\t\t\tindex,\n\t\t\tisFinal,\n\t\t\tisCompleted,\n\t\t\tisSkip,\n\t\t\tisOptional,\n\t\t\tisDisabled,\n\t\t\tisProcessed,\n\t\t\thasError,\n\t\t\tel: el as HTMLElement,\n\t\t});\n\t}\n\n\tprivate setCurrentNavItem() {\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { index, el } = item;\n\n\t\t\tif (index === this.currentIndex) this.setCurrentNavItemActions(el);\n\t\t\telse this.unsetCurrentNavItemActions(el);\n\t\t});\n\t}\n\n\tprivate setCurrentNavItemActions(el: HTMLElement) {\n\t\tel.classList.add('active');\n\n\t\tthis.fireEvent('active', this.currentIndex);\n\t\tdispatch('active.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate getNavItem(n = this.currentIndex) {\n\t\treturn this.navItems.find(({ index }) => index === n);\n\t}\n\n\tprivate setProcessedNavItemActions(item: IStepperItem) {\n\t\titem.isProcessed = true;\n\n\t\titem.el.classList.add('processed');\n\t}\n\n\tprivate setErrorNavItemActions(item: IStepperItem) {\n\t\titem.hasError = true;\n\n\t\titem.el.classList.add('error');\n\t}\n\n\tprivate unsetCurrentNavItemActions(el: HTMLElement) {\n\t\tel.classList.remove('active');\n\t}\n\n\tprivate handleNavItemClick(item: IStepperItem) {\n\t\tconst { index } = item;\n\n\t\tthis.currentIndex = index;\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t}\n\n\t// Content\n\tprivate buildContent() {\n\t\tthis.el\n\t\t\t.querySelectorAll('[data-hs-stepper-content-item]')\n\t\t\t.forEach((el) => this.addContentItem(el as HTMLElement));\n\n\t\tthis.navItems.forEach((item) => this.buildContentItem(item));\n\t}\n\n\tprivate buildContentItem(item: IStepperItem) {\n\t\tconst { index } = item;\n\n\t\tif (index === this.currentIndex) this.setCurrentContentItem();\n\t}\n\n\tprivate addContentItem(el: HTMLElement) {\n\t\tconst {\n\t\t\tindex,\n\t\t\tisFinal = false,\n\t\t\tisCompleted = false,\n\t\t\tisSkip = false,\n\t\t} = JSON.parse(el.getAttribute('data-hs-stepper-content-item'));\n\n\t\tif (isCompleted) el.classList.add('success');\n\t\tif (isSkip) el.classList.add('skipped');\n\n\t\tthis.contentItems.push({\n\t\t\tindex,\n\t\t\tisFinal,\n\t\t\tisCompleted,\n\t\t\tisSkip,\n\t\t\tel: el as HTMLElement,\n\t\t});\n\t}\n\n\tprivate setCurrentContentItem() {\n\t\tif (this.isCompleted) {\n\t\t\tconst finalContentItem = this.contentItems.find(({ isFinal }) => isFinal);\n\t\t\tconst otherContentItems = this.contentItems.filter(\n\t\t\t\t({ isFinal }) => !isFinal,\n\t\t\t);\n\t\t\tfinalContentItem.el.style.display = '';\n\t\t\totherContentItems.forEach(({ el }) => (el.style.display = 'none'));\n\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.contentItems.forEach((item) => {\n\t\t\tconst { index, el } = item;\n\n\t\t\tif (index === this.currentIndex) this.setCurrentContentItemActions(el);\n\t\t\telse this.unsetCurrentContentItemActions(el);\n\t\t});\n\t}\n\n\tprivate hideAllContentItems() {\n\t\tthis.contentItems.forEach(({ el }) => (el.style.display = 'none'));\n\t}\n\n\tprivate setCurrentContentItemActions(el: HTMLElement) {\n\t\tel.style.display = '';\n\t}\n\n\tprivate unsetCurrentContentItemActions(el: HTMLElement) {\n\t\tel.style.display = 'none';\n\t}\n\n\tprivate disableAll() {\n\t\tconst currentNavItem = this.getNavItem(this.currentIndex);\n\t\tcurrentNavItem.hasError = false;\n\t\tcurrentNavItem.isCompleted = false;\n\t\tcurrentNavItem.isDisabled = false;\n\t\tcurrentNavItem.el.classList.remove('error', 'success');\n\n\t\tthis.disableButtons();\n\t}\n\n\tprivate disableNavItemActions(item: IStepperItem) {\n\t\titem.isDisabled = true;\n\t\titem.el.classList.add('disabled');\n\t}\n\n\tprivate enableNavItemActions(item: IStepperItem) {\n\t\titem.isDisabled = false;\n\t\titem.el.classList.remove('disabled');\n\t}\n\n\t// Buttons\n\tprivate buildButtons() {\n\t\tthis.backBtn = this.el.querySelector('[data-hs-stepper-back-btn]');\n\t\tthis.nextBtn = this.el.querySelector('[data-hs-stepper-next-btn]');\n\t\tthis.skipBtn = this.el.querySelector('[data-hs-stepper-skip-btn]');\n\t\tthis.completeStepBtn = this.el.querySelector(\n\t\t\t'[data-hs-stepper-complete-step-btn]',\n\t\t);\n\t\tthis.finishBtn = this.el.querySelector('[data-hs-stepper-finish-btn]');\n\t\tthis.resetBtn = this.el.querySelector('[data-hs-stepper-reset-btn]');\n\n\t\tthis.buildBackButton();\n\t\tthis.buildNextButton();\n\t\tthis.buildSkipButton();\n\t\tthis.buildCompleteStepButton();\n\t\tthis.buildFinishButton();\n\t\tthis.buildResetButton();\n\t}\n\n\t// back\n\tprivate buildBackButton() {\n\t\tif (!this.backBtn) return;\n\n\t\tthis.checkForTheFirstStep();\n\n\t\tthis.backBtn.addEventListener('click', () => {\n\t\t\tthis.handleBackButtonClick();\n\n\t\t\tif (this.mode === 'linear') {\n\t\t\t\tconst currentNavItem = this.navItems.find(\n\t\t\t\t\t({ index }) => index === this.currentIndex,\n\t\t\t\t);\n\t\t\t\tconst currentContentItem = this.contentItems.find(\n\t\t\t\t\t({ index }) => index === this.currentIndex,\n\t\t\t\t);\n\n\t\t\t\tif (!currentNavItem || !currentContentItem) return;\n\n\t\t\t\tif (currentNavItem.isCompleted) {\n\t\t\t\t\tcurrentNavItem.isCompleted = false;\n\t\t\t\t\tcurrentNavItem.isSkip = false;\n\n\t\t\t\t\tcurrentNavItem.el.classList.remove('success', 'skipped');\n\t\t\t\t}\n\n\t\t\t\tif (currentContentItem.isCompleted) {\n\t\t\t\t\tcurrentContentItem.isCompleted = false;\n\t\t\t\t\tcurrentContentItem.isSkip = false;\n\n\t\t\t\t\tcurrentContentItem.el.classList.remove('success', 'skipped');\n\t\t\t\t}\n\n\t\t\t\tif (this.mode === 'linear' && this.currentIndex !== this.totalSteps) {\n\t\t\t\t\tif (this.nextBtn) this.nextBtn.style.display = '';\n\t\t\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = '';\n\t\t\t\t}\n\n\t\t\t\tthis.showSkipButton();\n\t\t\t\tthis.showFinishButton();\n\t\t\t\tthis.showCompleteStepButton();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate handleBackButtonClick() {\n\t\tif (this.currentIndex === 1) return;\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.currentIndex--;\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\n\t\tthis.fireEvent('back', this.currentIndex);\n\t\tdispatch('back.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate checkForTheFirstStep() {\n\t\tif (this.currentIndex === 1) {\n\t\t\tthis.setToDisabled(this.backBtn);\n\t\t} else {\n\t\t\tthis.setToNonDisabled(this.backBtn);\n\t\t}\n\t}\n\n\tprivate setToDisabled(el: HTMLElement) {\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.setAttribute('disabled', 'disabled');\n\n\t\tel.classList.add('disabled');\n\t}\n\n\tprivate setToNonDisabled(el: HTMLElement) {\n\t\tif (el.tagName === 'BUTTON' || el.tagName === 'INPUT')\n\t\t\tel.removeAttribute('disabled');\n\n\t\tel.classList.remove('disabled');\n\t}\n\n\t// next\n\tprivate buildNextButton() {\n\t\tif (!this.nextBtn) return;\n\n\t\tthis.nextBtn.addEventListener('click', () => {\n\t\t\tthis.fireEvent('beforeNext', this.currentIndex);\n\t\t\tdispatch('beforeNext.hs.stepper', this.el, this.currentIndex);\n\n\t\t\tif (this.getNavItem(this.currentIndex)?.isProcessed) {\n\t\t\t\tthis.disableAll();\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.goToNext();\n\t\t});\n\t}\n\n\tprivate unsetProcessedNavItemActions(item: IStepperItem) {\n\t\titem.isProcessed = false;\n\n\t\titem.el.classList.remove('processed');\n\t}\n\n\tprivate handleNextButtonClick(infinite = true) {\n\t\tif (infinite) {\n\t\t\tif (this.currentIndex === this.totalSteps) this.currentIndex = 1;\n\t\t\telse this.currentIndex++;\n\t\t} else {\n\t\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\t\tif (nonCompletedSteps.length === 1) {\n\t\t\t\tconst { index } = nonCompletedSteps[0];\n\n\t\t\t\tthis.currentIndex = index;\n\t\t\t} else {\n\t\t\t\tif (this.currentIndex === this.totalSteps) return;\n\n\t\t\t\tthis.currentIndex++;\n\t\t\t}\n\t\t}\n\n\t\tif (this.mode === 'linear') {\n\t\t\tthis.removeOptionalClasses();\n\t\t}\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\n\t\tthis.showSkipButton();\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\n\t\tthis.fireEvent('next', this.currentIndex);\n\t\tdispatch('next.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\tprivate removeOptionalClasses() {\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst currentContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\n\t\tcurrentNavItem.isSkip = false;\n\t\tcurrentNavItem.hasError = false;\n\t\tcurrentNavItem.isDisabled = false;\n\t\tcurrentContentItem.isSkip = false;\n\n\t\tcurrentNavItem.el.classList.remove('skipped', 'success', 'error');\n\t\tcurrentContentItem.el.classList.remove('skipped', 'success', 'error');\n\t}\n\n\t// skip\n\tprivate buildSkipButton() {\n\t\tif (!this.skipBtn) return;\n\n\t\tthis.showSkipButton();\n\n\t\tthis.skipBtn.addEventListener('click', () => {\n\t\t\tthis.handleSkipButtonClick();\n\n\t\t\tif (this.mode === 'linear' && this.currentIndex === this.totalSteps) {\n\t\t\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\t\t\tif (this.finishBtn) this.finishBtn.style.display = '';\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate setSkipItem(n?: number) {\n\t\tconst targetNavItem = this.navItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\t\tconst targetContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\n\t\tif (!targetNavItem || !targetContentItem) return;\n\n\t\tthis.setSkipItemActions(targetNavItem);\n\t\tthis.setSkipItemActions(targetContentItem);\n\t}\n\n\tprivate setSkipItemActions(item: IStepperItem) {\n\t\titem.isSkip = true;\n\n\t\titem.el.classList.add('skipped');\n\t}\n\n\tprivate showSkipButton() {\n\t\tif (!this.skipBtn) return;\n\n\t\tconst { isOptional } = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\n\t\tif (isOptional) this.skipBtn.style.display = '';\n\t\telse this.skipBtn.style.display = 'none';\n\t}\n\n\tprivate handleSkipButtonClick() {\n\t\tthis.setSkipItem();\n\t\tthis.handleNextButtonClick();\n\n\t\tthis.fireEvent('skip', this.currentIndex);\n\t\tdispatch('skip.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// complete\n\tprivate buildCompleteStepButton() {\n\t\tif (!this.completeStepBtn) return;\n\n\t\tthis.completeStepBtnDefaultText = this.completeStepBtn.innerText;\n\n\t\tthis.completeStepBtn.addEventListener('click', () =>\n\t\t\tthis.handleCompleteStepButtonClick(),\n\t\t);\n\t}\n\n\tprivate changeTextAndDisableCompleteButtonIfStepCompleted() {\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst { completedText } = JSON.parse(\n\t\t\tthis.completeStepBtn.getAttribute('data-hs-stepper-complete-step-btn'),\n\t\t);\n\n\t\tif (!currentNavItem) return;\n\n\t\tif (currentNavItem.isCompleted) {\n\t\t\tthis.completeStepBtn.innerText =\n\t\t\t\tcompletedText || this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.setAttribute('disabled', 'disabled');\n\t\t\tthis.completeStepBtn.classList.add('disabled');\n\t\t} else {\n\t\t\tthis.completeStepBtn.innerText = this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.removeAttribute('disabled');\n\t\t\tthis.completeStepBtn.classList.remove('disabled');\n\t\t}\n\t}\n\n\tprivate setCompleteItem(n?: number) {\n\t\tconst targetNavItem = this.navItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\t\tconst targetContentItem = this.contentItems.find(\n\t\t\t({ index }) => index === (n || this.currentIndex),\n\t\t);\n\n\t\tif (!targetNavItem || !targetContentItem) return;\n\n\t\tthis.setCompleteItemActions(targetNavItem);\n\t\tthis.setCompleteItemActions(targetContentItem);\n\t}\n\n\tprivate setCompleteItemActions(item: IStepperItem) {\n\t\titem.isCompleted = true;\n\n\t\titem.el.classList.add('success');\n\t}\n\n\tprivate showCompleteStepButton() {\n\t\tif (!this.completeStepBtn) return;\n\n\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\tif (nonCompletedSteps.length === 1)\n\t\t\tthis.completeStepBtn.style.display = 'none';\n\t\telse this.completeStepBtn.style.display = '';\n\t}\n\n\tprivate handleCompleteStepButtonClick() {\n\t\tthis.setCompleteItem();\n\n\t\tthis.fireEvent('complete', this.currentIndex);\n\t\tdispatch('complete.hs.stepper', this.el, this.currentIndex);\n\n\t\tthis.handleNextButtonClick(false);\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\t\tthis.checkForTheFirstStep();\n\t\tif (this.completeStepBtn)\n\t\t\tthis.changeTextAndDisableCompleteButtonIfStepCompleted();\n\t\tthis.showSkipButton();\n\t}\n\n\t// finish\n\tprivate buildFinishButton() {\n\t\tif (!this.finishBtn) return;\n\n\t\tif (this.isCompleted) {\n\t\t\tthis.setCompleted();\n\t\t}\n\n\t\tthis.finishBtn.addEventListener('click', () =>\n\t\t\tthis.handleFinishButtonClick(),\n\t\t);\n\t}\n\n\tprivate setCompleted() {\n\t\tthis.el.classList.add('completed');\n\t}\n\n\tprivate unsetCompleted() {\n\t\tthis.el.classList.remove('completed');\n\t}\n\n\tprivate showFinishButton() {\n\t\tif (!this.finishBtn) return;\n\n\t\tconst nonCompletedSteps = this.getUncompletedSteps();\n\n\t\tif (nonCompletedSteps.length === 1) this.finishBtn.style.display = '';\n\t\telse this.finishBtn.style.display = 'none';\n\t}\n\n\tprivate handleFinishButtonClick() {\n\t\tconst uncompletedSteps = this.getUncompletedSteps();\n\t\tconst uncompletedOrSkipSteps = this.getUncompletedSteps(true);\n\t\tconst { el } = this.contentItems.find(({ isFinal }) => isFinal);\n\n\t\tif (uncompletedSteps.length)\n\t\t\tuncompletedSteps.forEach(({ index }) => this.setCompleteItem(index));\n\n\t\tthis.currentIndex = this.totalSteps;\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.hideAllContentItems();\n\n\t\tconst currentNavItem = this.navItems.find(\n\t\t\t({ index }) => index === this.currentIndex,\n\t\t);\n\t\tconst currentNavItemEl = currentNavItem ? currentNavItem.el : null;\n\n\t\tcurrentNavItemEl.classList.remove('active');\n\n\t\tel.style.display = 'block';\n\t\tif (this.backBtn) this.backBtn.style.display = 'none';\n\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\tif (this.skipBtn) this.skipBtn.style.display = 'none';\n\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\tif (this.finishBtn) this.finishBtn.style.display = 'none';\n\t\tif (this.resetBtn) this.resetBtn.style.display = '';\n\n\t\tif (uncompletedOrSkipSteps.length <= 1) {\n\t\t\tthis.isCompleted = true;\n\t\t\tthis.setCompleted();\n\t\t}\n\n\t\tthis.fireEvent('finish', this.currentIndex);\n\t\tdispatch('finish.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// reset\n\tprivate buildResetButton() {\n\t\tif (!this.resetBtn) return;\n\n\t\tthis.resetBtn.addEventListener('click', () =>\n\t\t\tthis.handleResetButtonClick(),\n\t\t);\n\t}\n\n\tprivate handleResetButtonClick() {\n\t\tif (this.backBtn) this.backBtn.style.display = '';\n\t\tif (this.nextBtn) this.nextBtn.style.display = '';\n\t\tif (this.completeStepBtn) {\n\t\t\tthis.completeStepBtn.style.display = '';\n\t\t\tthis.completeStepBtn.innerText = this.completeStepBtnDefaultText;\n\t\t\tthis.completeStepBtn.removeAttribute('disabled');\n\t\t\tthis.completeStepBtn.classList.remove('disabled');\n\t\t}\n\t\tif (this.resetBtn) this.resetBtn.style.display = 'none';\n\n\t\tthis.navItems.forEach((item) => {\n\t\t\tconst { el } = item;\n\t\t\titem.isSkip = false;\n\t\t\titem.isCompleted = false;\n\n\t\t\tthis.unsetCurrentNavItemActions(el);\n\t\t\tel.classList.remove('success', 'skipped');\n\t\t});\n\n\t\tthis.contentItems.forEach((item) => {\n\t\t\tconst { el } = item;\n\t\t\titem.isSkip = false;\n\t\t\titem.isCompleted = false;\n\n\t\t\tthis.unsetCurrentContentItemActions(el);\n\t\t\tel.classList.remove('success', 'skipped');\n\t\t});\n\n\t\tthis.currentIndex = 1;\n\n\t\tthis.setCurrentNavItem();\n\t\tthis.setCurrentContentItem();\n\t\tthis.showFinishButton();\n\t\tthis.showCompleteStepButton();\n\t\tthis.checkForTheFirstStep();\n\n\t\tthis.unsetCompleted();\n\t\tthis.isCompleted = false;\n\n\t\tthis.fireEvent('reset', this.currentIndex);\n\t\tdispatch('reset.hs.stepper', this.el, this.currentIndex);\n\t}\n\n\t// Public methods\n\tpublic setProcessedNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.setProcessedNavItemActions(targetNavItem);\n\t}\n\n\tpublic unsetProcessedNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.unsetProcessedNavItemActions(targetNavItem);\n\t}\n\n\tpublic goToNext() {\n\t\tif (this.mode === 'linear') this.setCompleteItem();\n\n\t\tthis.handleNextButtonClick(this.mode !== 'linear');\n\n\t\tif (this.mode === 'linear' && this.currentIndex === this.totalSteps) {\n\t\t\tif (this.nextBtn) this.nextBtn.style.display = 'none';\n\t\t\tif (this.completeStepBtn) this.completeStepBtn.style.display = 'none';\n\t\t}\n\t}\n\n\tpublic disableButtons() {\n\t\tif (this.backBtn) this.setToDisabled(this.backBtn);\n\t\tif (this.nextBtn) this.setToDisabled(this.nextBtn);\n\t}\n\n\tpublic enableButtons() {\n\t\tif (this.backBtn) this.setToNonDisabled(this.backBtn);\n\t\tif (this.nextBtn) this.setToNonDisabled(this.nextBtn);\n\t}\n\n\tpublic setErrorNavItem(n?: number) {\n\t\tconst targetNavItem = this.getNavItem(n);\n\n\t\tif (!targetNavItem) return;\n\n\t\tthis.setErrorNavItemActions(targetNavItem);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsStepperCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsStepperCollection) window.$hsStepperCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-stepper]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsStepperCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSStepper(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSStepper: Function;\n\t\t$hsStepperCollection: ICollectionItem<HSStepper>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSStepper.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Stepper collection:', window.$hsStepperCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSStepper = HSStepper;\n}\n\nexport default HSStepper;\n","/*\n * HSStrongPassword\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport {\n\tisEnoughSpace,\n\tdispatch,\n\thtmlToElement,\n\tclassToClassList,\n} from '../../utils';\n\nimport { IStrongPasswordOptions, IStrongPassword } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSStrongPassword\n\textends HSBasePlugin<IStrongPasswordOptions>\n\timplements IStrongPassword\n{\n\tprivate readonly target: string | HTMLInputElement | null;\n\tprivate readonly hints: string | HTMLElement | null;\n\tprivate readonly stripClasses: string | null;\n\tprivate readonly minLength: number;\n\tprivate readonly mode: string;\n\tprivate readonly popoverSpace: number;\n\tprivate readonly checksExclude: string[] | null;\n\tprivate readonly specialCharactersSet: string | null;\n\n\tpublic isOpened: boolean = false;\n\tprivate strength: number = 0;\n\tprivate passedRules: Set<string> = new Set<string>();\n\tprivate weakness: HTMLElement | null;\n\tprivate rules: HTMLElement[] | null;\n\tprivate availableChecks: string[] | null;\n\n\tconstructor(el: HTMLElement, options?: IStrongPasswordOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-strong-password');\n\t\tconst dataOptions: IStrongPasswordOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.target = concatOptions?.target\n\t\t\t? typeof concatOptions?.target === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.target) as HTMLInputElement)\n\t\t\t\t: concatOptions.target\n\t\t\t: null;\n\t\tthis.hints = concatOptions?.hints\n\t\t\t? typeof concatOptions?.hints === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.hints) as HTMLElement)\n\t\t\t\t: concatOptions.hints\n\t\t\t: null;\n\t\tthis.stripClasses = concatOptions?.stripClasses || null;\n\t\tthis.minLength = concatOptions?.minLength || 6;\n\t\tthis.mode = concatOptions?.mode || 'default';\n\t\tthis.popoverSpace = concatOptions?.popoverSpace || 10;\n\t\tthis.checksExclude = concatOptions?.checksExclude || [];\n\t\tthis.availableChecks = [\n\t\t\t'lowercase',\n\t\t\t'uppercase',\n\t\t\t'numbers',\n\t\t\t'special-characters',\n\t\t\t'min-length',\n\t\t].filter((el) => !this.checksExclude.includes(el));\n\t\tthis.specialCharactersSet =\n\t\t\tconcatOptions?.specialCharactersSet ||\n\t\t\t'!\"#$%&\\'()*+,-./:;<=>?@[\\\\\\\\\\\\]^_`{|}~';\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsStrongPasswordCollection, this);\n\n\t\tif (this.availableChecks.length) this.build();\n\t}\n\n\tprivate build() {\n\t\tthis.buildStrips();\n\t\tif (this.hints) this.buildHints();\n\n\t\tthis.setStrength((this.target as HTMLInputElement).value);\n\n\t\t(this.target as HTMLInputElement).addEventListener(\n\t\t\t'input',\n\t\t\t(evt: InputEvent) => {\n\t\t\t\tthis.setStrength((evt.target as HTMLInputElement).value);\n\t\t\t},\n\t\t);\n\t}\n\n\tprivate buildStrips() {\n\t\tthis.el.innerHTML = '';\n\n\t\tif (this.stripClasses) {\n\t\t\tfor (let i = 0; i < this.availableChecks.length; i++) {\n\t\t\t\tconst newStrip = htmlToElement('<div></div>');\n\t\t\t\tclassToClassList(this.stripClasses, newStrip);\n\n\t\t\t\tthis.el.append(newStrip);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate buildHints() {\n\t\tthis.weakness =\n\t\t\t(this.hints as HTMLElement).querySelector(\n\t\t\t\t'[data-hs-strong-password-hints-weakness-text]',\n\t\t\t) || null;\n\t\tthis.rules =\n\t\t\tArray.from(\n\t\t\t\t(this.hints as HTMLElement).querySelectorAll(\n\t\t\t\t\t'[data-hs-strong-password-hints-rule-text]',\n\t\t\t\t),\n\t\t\t) || null;\n\n\t\tthis.rules.forEach((rule) => {\n\t\t\tconst ruleValue = rule.getAttribute(\n\t\t\t\t'data-hs-strong-password-hints-rule-text',\n\t\t\t);\n\n\t\t\tif (this.checksExclude?.includes(ruleValue)) rule.remove();\n\t\t});\n\n\t\tif (this.weakness) this.buildWeakness();\n\t\tif (this.rules) this.buildRules();\n\t\tif (this.mode === 'popover') {\n\t\t\t(this.target as HTMLInputElement).addEventListener('focus', () => {\n\t\t\t\tthis.isOpened = true;\n\t\t\t\t(this.hints as HTMLElement).classList.remove('hidden');\n\t\t\t\t(this.hints as HTMLElement).classList.add('block');\n\n\t\t\t\tthis.recalculateDirection();\n\t\t\t});\n\n\t\t\t(this.target as HTMLInputElement).addEventListener('blur', () => {\n\t\t\t\tthis.isOpened = false;\n\t\t\t\t(this.hints as HTMLElement).classList.remove(\n\t\t\t\t\t'block',\n\t\t\t\t\t'bottom-full',\n\t\t\t\t\t'top-full',\n\t\t\t\t);\n\t\t\t\t(this.hints as HTMLElement).classList.add('hidden');\n\t\t\t\t(this.hints as HTMLElement).style.marginTop = '';\n\t\t\t\t(this.hints as HTMLElement).style.marginBottom = '';\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate buildWeakness() {\n\t\tthis.checkStrength((this.target as HTMLInputElement).value);\n\t\tthis.setWeaknessText();\n\n\t\t(this.target as HTMLInputElement).addEventListener('input', () =>\n\t\t\tsetTimeout(() => this.setWeaknessText()),\n\t\t);\n\t}\n\n\tprivate buildRules() {\n\t\tthis.setRulesText();\n\n\t\t(this.target as HTMLInputElement).addEventListener('input', () =>\n\t\t\tsetTimeout(() => this.setRulesText()),\n\t\t);\n\t}\n\n\tprivate setWeaknessText() {\n\t\tconst weaknessText = this.weakness.getAttribute(\n\t\t\t'data-hs-strong-password-hints-weakness-text',\n\t\t);\n\t\tconst weaknessTextToJson = JSON.parse(weaknessText as string);\n\n\t\tthis.weakness.textContent = weaknessTextToJson[this.strength];\n\t}\n\n\tprivate setRulesText() {\n\t\tthis.rules.forEach((rule) => {\n\t\t\tconst ruleValue = rule.getAttribute(\n\t\t\t\t'data-hs-strong-password-hints-rule-text',\n\t\t\t);\n\n\t\t\tthis.checkIfPassed(rule, this.passedRules.has(ruleValue));\n\t\t});\n\t}\n\n\tprivate togglePopover() {\n\t\tconst popover = this.el.querySelector('.popover');\n\n\t\tif (popover) popover.classList.toggle('show');\n\t}\n\n\tprivate checkStrength(val: string): { strength: number; rules: Set<string> } {\n\t\tconst passedRules = new Set<string>();\n\t\tconst regexps = {\n\t\t\tlowercase: /[a-z]+/,\n\t\t\tuppercase: /[A-Z]+/,\n\t\t\tnumbers: /[0-9]+/,\n\t\t\t'special-characters': new RegExp(`[${this.specialCharactersSet}]`),\n\t\t};\n\t\tlet strength = 0;\n\n\t\tif (\n\t\t\tthis.availableChecks.includes('lowercase') &&\n\t\t\tval.match(regexps['lowercase'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('lowercase');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('uppercase') &&\n\t\t\tval.match(regexps['uppercase'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('uppercase');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('numbers') &&\n\t\t\tval.match(regexps['numbers'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('numbers');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('special-characters') &&\n\t\t\tval.match(regexps['special-characters'])\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('special-characters');\n\t\t}\n\t\tif (\n\t\t\tthis.availableChecks.includes('min-length') &&\n\t\t\tval.length >= this.minLength\n\t\t) {\n\t\t\tstrength += 1;\n\t\t\tpassedRules.add('min-length');\n\t\t}\n\t\tif (!val.length) {\n\t\t\tstrength = 0;\n\t\t}\n\n\t\tif (strength === this.availableChecks.length)\n\t\t\tthis.el.classList.add('accepted');\n\t\telse this.el.classList.remove('accepted');\n\n\t\tthis.strength = strength;\n\t\tthis.passedRules = passedRules;\n\n\t\treturn {\n\t\t\tstrength: this.strength,\n\t\t\trules: this.passedRules,\n\t\t};\n\t}\n\n\tprivate checkIfPassed(el: HTMLElement, isRulePassed = false) {\n\t\tconst check = el.querySelector('[data-check]');\n\t\tconst uncheck = el.querySelector('[data-uncheck]');\n\n\t\tif (isRulePassed) {\n\t\t\tel.classList.add('active');\n\t\t\tcheck.classList.remove('hidden');\n\t\t\tuncheck.classList.add('hidden');\n\t\t} else {\n\t\t\tel.classList.remove('active');\n\t\t\tcheck.classList.add('hidden');\n\t\t\tuncheck.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate setStrength(val: string) {\n\t\tconst { strength, rules } = this.checkStrength(val);\n\t\tconst payload = {\n\t\t\tstrength,\n\t\t\trules,\n\t\t};\n\n\t\tthis.hideStrips(strength);\n\n\t\tthis.fireEvent('change', payload);\n\t\tdispatch('change.hs.strongPassword', this.el, payload);\n\t}\n\n\tprivate hideStrips(qty: number) {\n\t\tArray.from(this.el.children).forEach((el: HTMLElement, i: number) => {\n\t\t\tif (i < qty) el.classList.add('passed');\n\t\t\telse el.classList.remove('passed');\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic recalculateDirection() {\n\t\tif (\n\t\t\tisEnoughSpace(\n\t\t\t\tthis.hints as HTMLElement,\n\t\t\t\tthis.target as HTMLInputElement,\n\t\t\t\t'bottom',\n\t\t\t\tthis.popoverSpace,\n\t\t\t)\n\t\t) {\n\t\t\t(this.hints as HTMLElement).classList.remove('bottom-full');\n\t\t\t(this.hints as HTMLElement).classList.add('top-full');\n\t\t\t(this.hints as HTMLElement).style.marginBottom = '';\n\t\t\t(this.hints as HTMLElement).style.marginTop = `${this.popoverSpace}px`;\n\t\t} else {\n\t\t\t(this.hints as HTMLElement).classList.remove('top-full');\n\t\t\t(this.hints as HTMLElement).classList.add('bottom-full');\n\t\t\t(this.hints as HTMLElement).style.marginTop = '';\n\t\t\t(this.hints as HTMLElement).style.marginBottom = `${this.popoverSpace}px`;\n\t\t}\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsStrongPasswordCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection ? elInCollection.element : null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsStrongPasswordCollection)\n\t\t\twindow.$hsStrongPasswordCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-strong-password]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsStrongPasswordCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst data = el.getAttribute('data-hs-strong-password');\n\t\t\t\t\tconst options: IStrongPasswordOptions = data ? JSON.parse(data) : {};\n\n\t\t\t\t\tnew HSStrongPassword(el, options);\n\t\t\t\t}\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSStrongPassword: Function;\n\t\t$hsStrongPasswordCollection: ICollectionItem<HSStrongPassword>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSStrongPassword.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Strong password collection:', window.$hsStrongPasswordCollection);\n});\n\ndocument.addEventListener('scroll', () => {\n\tif (!window.$hsStrongPasswordCollection) return false;\n\n\tconst target = window.$hsStrongPasswordCollection.find(\n\t\t(el) => el.element.isOpened,\n\t);\n\n\tif (target) target.element.recalculateDirection();\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSStrongPassword = HSStrongPassword;\n}\n\nexport default HSStrongPassword;\n","/*\n * HSTabs\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { dispatch } from '../../utils';\n\nimport { ITabs } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { TABS_ACCESSIBILITY_KEY_SET } from '../../constants';\n\nclass HSTabs extends HSBasePlugin<{}> implements ITabs {\n\tpublic toggles: NodeListOf<HTMLElement> | null;\n\tprivate readonly extraToggleId: string | null;\n\tprivate readonly extraToggle: HTMLSelectElement | null;\n\tprivate current: HTMLElement | null;\n\tprivate currentContentId: string | null;\n\tpublic currentContent: HTMLElement | null;\n\tprivate prev: HTMLElement | null;\n\tprivate prevContentId: string | null;\n\tprivate prevContent: HTMLElement | null;\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.toggles = this.el.querySelectorAll('[data-hs-tab]');\n\t\tthis.extraToggleId = this.el.getAttribute('data-hs-tab-select');\n\t\tthis.extraToggle = document.querySelector(this.extraToggleId);\n\t\tthis.current = Array.from(this.toggles).find((el) =>\n\t\t\tel.classList.contains('active'),\n\t\t);\n\t\tthis.currentContentId = this.current.getAttribute('data-hs-tab');\n\t\tthis.currentContent = document.querySelector(this.currentContentId);\n\t\tthis.prev = null;\n\t\tthis.prevContentId = null;\n\t\tthis.prevContent = null;\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTabsCollection, this);\n\n\t\tthis.toggles.forEach((el) => {\n\t\t\tel.addEventListener('click', () => this.open(el));\n\t\t});\n\n\t\tif (this.extraToggle) {\n\t\t\tthis.extraToggle.addEventListener('change', (evt) => this.change(evt));\n\t\t}\n\t}\n\n\tprivate open(el: HTMLElement) {\n\t\tthis.prev = this.current;\n\t\tthis.prevContentId = this.currentContentId;\n\t\tthis.prevContent = this.currentContent;\n\n\t\tthis.current = el;\n\t\tthis.currentContentId = this.current.getAttribute('data-hs-tab');\n\t\tthis.currentContent = document.querySelector(this.currentContentId);\n\n\t\tif (this?.prev?.ariaSelected) this.prev.ariaSelected = 'false';\n\t\tthis.prev.classList.remove('active');\n\t\tthis.prevContent.classList.add('hidden');\n\n\t\tif (this?.current?.ariaSelected) this.current.ariaSelected = 'true';\n\t\tthis.current.classList.add('active');\n\t\tthis.currentContent.classList.remove('hidden');\n\n\t\tthis.fireEvent('change', {\n\t\t\tel,\n\t\t\tprev: this.prevContentId,\n\t\t\tcurrent: this.currentContentId,\n\t\t});\n\t\tdispatch('change.hs.tab', el, {\n\t\t\tel,\n\t\t\tprev: this.prevContentId,\n\t\t\tcurrent: this.currentContentId,\n\t\t});\n\t}\n\n\tprivate change(evt: Event) {\n\t\tconst toggle: HTMLElement = document.querySelector(\n\t\t\t`[data-hs-tab=\"${(evt.target as HTMLSelectElement).value}\"]`,\n\t\t);\n\n\t\tif (toggle) toggle.click();\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTabsCollection) window.$hsTabsCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[role=\"tablist\"]:not(select):not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTabsCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTabs(el);\n\t\t\t});\n\n\t\tif (window.$hsTabsCollection)\n\t\t\tdocument.addEventListener('keydown', (evt) => HSTabs.accessibility(evt));\n\t}\n\n\tstatic open(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsTabsCollection.find((el) =>\n\t\t\tArray.from(el.element.toggles).includes(\n\t\t\t\ttypeof target === 'string' ? document.querySelector(target) : target,\n\t\t\t),\n\t\t);\n\t\tconst targetInCollection = Array.from(elInCollection.element.toggles).find(\n\t\t\t(el) =>\n\t\t\t\tel ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (targetInCollection && !targetInCollection.classList.contains('active'))\n\t\t\telInCollection.element.open(targetInCollection);\n\t}\n\n\t// Accessibility methods\n\tstatic accessibility(evt: KeyboardEvent) {\n\t\tconst target = document.querySelector('[data-hs-tab]:focus');\n\n\t\tif (\n\t\t\ttarget &&\n\t\t\tTABS_ACCESSIBILITY_KEY_SET.includes(evt.code) &&\n\t\t\t!evt.metaKey\n\t\t) {\n\t\t\tconst isVertical = target\n\t\t\t\t.closest('[role=\"tablist\"]')\n\t\t\t\t.getAttribute('data-hs-tabs-vertical');\n\n\t\t\tevt.preventDefault();\n\n\t\t\tswitch (evt.code) {\n\t\t\t\tcase isVertical === 'true' ? 'ArrowUp' : 'ArrowLeft':\n\t\t\t\t\tthis.onArrow();\n\t\t\t\t\tbreak;\n\t\t\t\tcase isVertical === 'true' ? 'ArrowDown' : 'ArrowRight':\n\t\t\t\t\tthis.onArrow(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Home':\n\t\t\t\t\tthis.onStartEnd();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'End':\n\t\t\t\t\tthis.onStartEnd(false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic onArrow(isOpposite = true) {\n\t\tconst target = document\n\t\t\t.querySelector('[data-hs-tab]:focus')\n\t\t\t.closest('[role=\"tablist\"]');\n\t\tconst targetInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) => el.element.el === target,\n\t\t);\n\n\t\tif (targetInCollection) {\n\t\t\tconst toggles = isOpposite\n\t\t\t\t? Array.from(targetInCollection.element.toggles).reverse()\n\t\t\t\t: Array.from(targetInCollection.element.toggles);\n\t\t\tconst focused = toggles.find((el) => document.activeElement === el);\n\t\t\tlet focusedInd = toggles.findIndex((el: any) => el === focused);\n\t\t\tfocusedInd = focusedInd + 1 < toggles.length ? focusedInd + 1 : 0;\n\n\t\t\ttoggles[focusedInd].focus();\n\t\t\ttoggles[focusedInd].click();\n\t\t}\n\t}\n\n\tstatic onStartEnd(isOpposite = true) {\n\t\tconst target = document\n\t\t\t.querySelector('[data-hs-tab]:focus')\n\t\t\t.closest('[role=\"tablist\"]');\n\t\tconst targetInCollection = window.$hsTabsCollection.find(\n\t\t\t(el) => el.element.el === target,\n\t\t);\n\n\t\tif (targetInCollection) {\n\t\t\tconst toggles = isOpposite\n\t\t\t\t? Array.from(targetInCollection.element.toggles)\n\t\t\t\t: Array.from(targetInCollection.element.toggles).reverse();\n\n\t\t\tif (toggles.length) {\n\t\t\t\ttoggles[0].focus();\n\t\t\t\ttoggles[0].click();\n\t\t\t}\n\t\t}\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsTabsCollection.find((el) =>\n\t\t\tArray.from(el.element.toggles).includes(\n\t\t\t\ttypeof target === 'string' ? document.querySelector(target) : target,\n\t\t\t),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTabs: Function;\n\t\t$hsTabsCollection: ICollectionItem<HSTabs>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTabs.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Tabs collection:', window.$hsTabsCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTabs = HSTabs;\n}\n\nexport default HSTabs;\n","/*\n * HSThemeSwitch\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\nimport { IThemeSwitchOptions, IThemeSwitch } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSThemeSwitch\n\textends HSBasePlugin<IThemeSwitchOptions>\n\timplements IThemeSwitch\n{\n\tpublic theme: string;\n\tprivate readonly themeSet: string[];\n\n\tconstructor(el: HTMLElement, options?: IThemeSwitchOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-theme-switch');\n\t\tconst dataOptions: IThemeSwitchOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.theme =\n\t\t\tconcatOptions?.theme || localStorage.getItem('hs_theme') || 'default';\n\t\tthis.themeSet = ['light', 'dark', 'default'];\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsThemeSwitchCollection, this);\n\n\t\tif (this.theme !== 'default') this.setAppearance();\n\t}\n\n\tprivate setResetStyles() {\n\t\tconst style = document.createElement('style');\n\n\t\tstyle.innerText = `*{transition: unset !important;}`;\n\t\tstyle.setAttribute('data-hs-appearance-onload-styles', '');\n\n\t\tdocument.head.appendChild(style);\n\n\t\treturn style;\n\t}\n\n\tprivate addSystemThemeObserver() {\n\t\twindow\n\t\t\t.matchMedia('(prefers-color-scheme: dark)')\n\t\t\t.addEventListener('change', ({ matches }) => {\n\t\t\t\tif (matches) this.setAppearance('dark', false);\n\t\t\t\telse this.setAppearance('default', false);\n\t\t\t});\n\t}\n\n\tprivate removeSystemThemeObserver() {\n\t\twindow.matchMedia('(prefers-color-scheme: dark)').removeEventListener;\n\t}\n\n\t// Public methods\n\tpublic setAppearance(\n\t\ttheme = this.theme,\n\t\tisSaveToLocalStorage = true,\n\t\tisSetDispatchEvent = true,\n\t) {\n\t\tconst html = document.querySelector('html');\n\t\tconst resetStyles = this.setResetStyles();\n\n\t\tif (isSaveToLocalStorage) localStorage.setItem('hs_theme', theme);\n\t\tif (theme === 'auto')\n\t\t\ttheme = window.matchMedia('(prefers-color-scheme: dark)').matches\n\t\t\t\t? 'dark'\n\t\t\t\t: 'default';\n\n\t\thtml.classList.remove('light', 'dark', 'default', 'auto');\n\t\thtml.classList.add(theme);\n\n\t\tsetTimeout(() => resetStyles.remove());\n\n\t\tif (isSetDispatchEvent)\n\t\t\twindow.dispatchEvent(\n\t\t\t\tnew CustomEvent('on-hs-appearance-change', { detail: theme }),\n\t\t\t);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string) {\n\t\tconst elInCollection = window.$hsThemeSwitchCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection ? elInCollection.element : null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsThemeSwitchCollection) window.$hsThemeSwitchCollection = [];\n\n\t\tconst toggleObserveSystemTheme = (el: HSThemeSwitch) => {\n\t\t\tif (localStorage.getItem('hs_theme') === 'auto')\n\t\t\t\tel.addSystemThemeObserver();\n\t\t\telse el.removeSystemThemeObserver();\n\t\t};\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-theme-switch]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsThemeSwitchCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst switchTheme = new HSThemeSwitch(el);\n\t\t\t\t\t(switchTheme.el as HTMLInputElement).checked =\n\t\t\t\t\t\tswitchTheme.theme === 'dark';\n\n\t\t\t\t\ttoggleObserveSystemTheme(switchTheme);\n\n\t\t\t\t\tswitchTheme.el.addEventListener('change', (evt) => {\n\t\t\t\t\t\tconst theme = (evt.target as HTMLInputElement).checked\n\t\t\t\t\t\t\t? 'dark'\n\t\t\t\t\t\t\t: 'default';\n\t\t\t\t\t\tswitchTheme.setAppearance(theme);\n\n\t\t\t\t\t\ttoggleObserveSystemTheme(switchTheme);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-theme-click-value]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tconst theme = el.getAttribute('data-hs-theme-click-value');\n\t\t\t\tconst switchTheme = new HSThemeSwitch(el);\n\n\t\t\t\ttoggleObserveSystemTheme(switchTheme);\n\n\t\t\t\tswitchTheme.el.addEventListener('click', () => {\n\t\t\t\t\tswitchTheme.setAppearance(theme);\n\n\t\t\t\t\ttoggleObserveSystemTheme(switchTheme);\n\t\t\t\t});\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSThemeSwitch: Function;\n\t\t$hsThemeSwitchCollection: ICollectionItem<HSThemeSwitch>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSThemeSwitch.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Theme switch collection:', window.$hsThemeSwitchCollection);\n});\n\nif (window.$hsThemeSwitchCollection) {\n\twindow.addEventListener(\n\t\t'on-hs-appearance-change',\n\t\t(evt: Event & { detail: string }) => {\n\t\t\twindow.$hsThemeSwitchCollection.forEach((el) => {\n\t\t\t\t(el.element.el as HTMLInputElement).checked = evt.detail === 'dark';\n\t\t\t});\n\t\t},\n\t);\n}\n\nif (typeof window !== 'undefined') {\n\twindow.HSThemeSwitch = HSThemeSwitch;\n}\n\nexport default HSThemeSwitch;\n","/*\n * HSToggleCount\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { IToggleCountOptions, IToggleCount } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSToggleCount\n\textends HSBasePlugin<IToggleCountOptions>\n\timplements IToggleCount\n{\n\tprivate readonly target: HTMLInputElement | null;\n\tprivate readonly min: number | null;\n\tprivate readonly max: number | null;\n\tprivate readonly duration: number | null;\n\tprivate isChecked: boolean;\n\n\tconstructor(el: HTMLElement, options?: IToggleCountOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-toggle-count');\n\t\tconst dataOptions: IToggleCountOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.target = concatOptions?.target\n\t\t\t? typeof concatOptions?.target === 'string'\n\t\t\t\t? (document.querySelector(concatOptions.target) as HTMLInputElement)\n\t\t\t\t: concatOptions.target\n\t\t\t: null;\n\t\tthis.min = concatOptions?.min || 0;\n\t\tthis.max = concatOptions?.max || 0;\n\t\tthis.duration = concatOptions?.duration || 700;\n\n\t\tthis.isChecked = (this.target as HTMLInputElement).checked || false;\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsToggleCountCollection, this);\n\n\t\tif (this.isChecked) this.el.innerText = String(this.max);\n\n\t\tthis.target.addEventListener('change', () => {\n\t\t\tthis.isChecked = !this.isChecked;\n\n\t\t\tthis.toggle();\n\t\t});\n\t}\n\n\tprivate toggle() {\n\t\tif (this.isChecked) this.countUp();\n\t\telse this.countDown();\n\t}\n\n\tprivate animate(from: number, to: number) {\n\t\tlet startTimestamp = 0;\n\n\t\tconst step = (timestamp: number) => {\n\t\t\tif (!startTimestamp) startTimestamp = timestamp;\n\t\t\tconst progress = Math.min(\n\t\t\t\t(timestamp - startTimestamp) / this.duration,\n\t\t\t\t1,\n\t\t\t);\n\n\t\t\tthis.el.innerText = String(Math.floor(progress * (to - from) + from));\n\n\t\t\tif (progress < 1) window.requestAnimationFrame(step);\n\t\t};\n\n\t\twindow.requestAnimationFrame(step);\n\t}\n\n\t// Public methods\n\tpublic countUp() {\n\t\tthis.animate(this.min, this.max);\n\t}\n\n\tpublic countDown() {\n\t\tthis.animate(this.max, this.min);\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsToggleCountCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsToggleCountCollection) window.$hsToggleCountCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-toggle-count]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsToggleCountCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSToggleCount(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSToggleCount: Function;\n\t\t$hsToggleCountCollection: ICollectionItem<HSToggleCount>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSToggleCount.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Toggle count collection:', window.$hsToggleCountCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSToggleCount = HSToggleCount;\n}\n\nexport default HSToggleCount;\n","/*\n * HSTogglePassword\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { isFormElement, dispatch } from '../../utils';\n\nimport { ITogglePasswordOptions, ITogglePassword } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nclass HSTogglePassword\n\textends HSBasePlugin<ITogglePasswordOptions>\n\timplements ITogglePassword\n{\n\tprivate readonly target:\n\t\t| string\n\t\t| string[]\n\t\t| HTMLInputElement\n\t\t| HTMLInputElement[]\n\t\t| null;\n\tprivate isShown: boolean;\n\tprivate isMultiple: boolean;\n\tprivate eventType: string;\n\n\tconstructor(el: HTMLElement, options?: ITogglePasswordOptions) {\n\t\tsuper(el, options);\n\n\t\tconst data = el.getAttribute('data-hs-toggle-password');\n\t\tconst dataOptions: ITogglePasswordOptions = data ? JSON.parse(data) : {};\n\t\tconst concatOptions = {\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\t\tconst targets: HTMLInputElement[] = [];\n\t\tif (concatOptions?.target && typeof concatOptions?.target === 'string') {\n\t\t\tconst ids = concatOptions?.target.split(',');\n\t\t\tids.forEach((id) => {\n\t\t\t\ttargets.push(document.querySelector(id) as HTMLInputElement);\n\t\t\t});\n\t\t} else if (\n\t\t\tconcatOptions?.target &&\n\t\t\ttypeof concatOptions?.target === 'object'\n\t\t) {\n\t\t\t(concatOptions.target as string[]).forEach((el) =>\n\t\t\t\ttargets.push(document.querySelector(el)),\n\t\t\t);\n\t\t} else {\n\t\t\t(concatOptions.target as HTMLInputElement[]).forEach((el) =>\n\t\t\t\ttargets.push(el),\n\t\t\t);\n\t\t}\n\n\t\tthis.target = targets;\n\t\tthis.isShown = this.el.hasAttribute('type')\n\t\t\t? (this.el as HTMLInputElement).checked\n\t\t\t: false;\n\t\tthis.eventType = isFormElement(this.el) ? 'change' : 'click';\n\t\tthis.isMultiple =\n\t\t\tthis.target.length > 1 &&\n\t\t\t!!this.el.closest('[data-hs-toggle-password-group]');\n\n\t\tif (this.target) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTogglePasswordCollection, this);\n\n\t\tif (!this.isShown) {\n\t\t\tthis.hide();\n\t\t} else {\n\t\t\tthis.show();\n\t\t}\n\n\t\tthis.el.addEventListener(this.eventType, () => {\n\t\t\tif (this.isShown) {\n\t\t\t\tthis.hide();\n\t\t\t} else {\n\t\t\t\tthis.show();\n\t\t\t}\n\n\t\t\tthis.fireEvent('toggle', this.target);\n\t\t\tdispatch('toggle.hs.toggle-select', this.el, this.target);\n\t\t});\n\t}\n\n\tprivate getMultipleToggles(): HSTogglePassword[] {\n\t\tconst group = this.el.closest('[data-hs-toggle-password-group]');\n\t\tconst toggles = group.querySelectorAll('[data-hs-toggle-password]');\n\t\tconst togglesInCollection: HSTogglePassword[] = [];\n\n\t\ttoggles.forEach((el: HTMLElement) => {\n\t\t\ttogglesInCollection.push(\n\t\t\t\tHSTogglePassword.getInstance(el) as HSTogglePassword,\n\t\t\t);\n\t\t});\n\n\t\treturn togglesInCollection;\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tif (this.isMultiple) {\n\t\t\tconst toggles = this.getMultipleToggles();\n\n\t\t\ttoggles.forEach((el: HSTogglePassword) =>\n\t\t\t\tel ? (el.isShown = true) : false,\n\t\t\t);\n\n\t\t\tthis.el\n\t\t\t\t.closest('[data-hs-toggle-password-group]')\n\t\t\t\t.classList.add('active');\n\t\t} else {\n\t\t\tthis.isShown = true;\n\n\t\t\tthis.el.classList.add('active');\n\t\t}\n\t\t(this.target as HTMLInputElement[]).forEach((el) => {\n\t\t\t(el as HTMLInputElement).type = 'text';\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tif (this.isMultiple) {\n\t\t\tconst toggles = this.getMultipleToggles();\n\n\t\t\ttoggles.forEach((el: HSTogglePassword) =>\n\t\t\t\tel ? (el.isShown = false) : false,\n\t\t\t);\n\n\t\t\tthis.el\n\t\t\t\t.closest('[data-hs-toggle-password-group]')\n\t\t\t\t.classList.remove('active');\n\t\t} else {\n\t\t\tthis.isShown = false;\n\n\t\t\tthis.el.classList.remove('active');\n\t\t}\n\t\t(this.target as HTMLInputElement[]).forEach((el) => {\n\t\t\t(el as HTMLInputElement).type = 'password';\n\t\t});\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsTogglePasswordCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTogglePasswordCollection)\n\t\t\twindow.$hsTogglePasswordCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll(\n\t\t\t\t'[data-hs-toggle-password]:not(.--prevent-on-load-init)',\n\t\t\t)\n\t\t\t.forEach((el: HTMLInputElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsTogglePasswordCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSTogglePassword(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTogglePassword: Function;\n\t\t$hsTogglePasswordCollection: ICollectionItem<HSTogglePassword>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTogglePassword.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Toggle password collection:', window.$hsTogglePasswordCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTogglePassword = HSTogglePassword;\n}\n\nexport default HSTogglePassword;\n","/*\n * HSTooltip\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { createPopper, PositioningStrategy, Instance } from '@popperjs/core';\nimport { getClassProperty, dispatch, afterTransition } from '../../utils';\n\nimport { ITooltip } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\nimport { POSITIONS } from '../../constants';\n\nclass HSTooltip extends HSBasePlugin<{}> implements ITooltip {\n\tprivate readonly toggle: HTMLElement | null;\n\tpublic content: HTMLElement | null;\n\treadonly eventMode: string;\n\tprivate readonly preventPopper: string;\n\tprivate popperInstance: Instance;\n\tprivate readonly placement: string;\n\tprivate readonly strategy: PositioningStrategy;\n\n\tconstructor(el: HTMLElement, options?: {}, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tif (this.el) {\n\t\t\tthis.toggle = this.el.querySelector('.hs-tooltip-toggle') || this.el;\n\t\t\tthis.content = this.el.querySelector('.hs-tooltip-content');\n\t\t\tthis.eventMode = getClassProperty(this.el, '--trigger') || 'hover';\n\t\t\tthis.preventPopper = getClassProperty(\n\t\t\t\tthis.el,\n\t\t\t\t'--prevent-popper',\n\t\t\t\t'false',\n\t\t\t);\n\t\t\tthis.placement = getClassProperty(this.el, '--placement');\n\t\t\tthis.strategy = getClassProperty(\n\t\t\t\tthis.el,\n\t\t\t\t'--strategy',\n\t\t\t) as PositioningStrategy;\n\t\t}\n\n\t\tif (this.el && this.toggle && this.content) this.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsTooltipCollection, this);\n\n\t\tif (this.eventMode === 'click') {\n\t\t\tthis.toggle.addEventListener('click', () => this.click());\n\t\t} else if (this.eventMode === 'focus') {\n\t\t\tthis.toggle.addEventListener('click', () => this.focus());\n\t\t} else if (this.eventMode === 'hover') {\n\t\t\tthis.toggle.addEventListener('mouseenter', () => this.enter());\n\t\t\tthis.toggle.addEventListener('mouseleave', () => this.leave());\n\t\t}\n\n\t\tif (this.preventPopper === 'false') this.buildPopper();\n\t}\n\n\tprivate enter() {\n\t\tthis.show();\n\t}\n\n\tprivate leave() {\n\t\tthis.hide();\n\t}\n\n\tprivate click() {\n\t\tif (this.el.classList.contains('show')) return false;\n\n\t\tthis.show();\n\n\t\tconst handle = () => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.hide();\n\n\t\t\t\tthis.toggle.removeEventListener('click', handle, true);\n\t\t\t\tthis.toggle.removeEventListener('blur', handle, true);\n\t\t\t});\n\t\t};\n\n\t\tthis.toggle.addEventListener('click', handle, true);\n\t\tthis.toggle.addEventListener('blur', handle, true);\n\t}\n\n\tprivate focus() {\n\t\tthis.show();\n\n\t\tconst handle = () => {\n\t\t\tthis.hide();\n\n\t\t\tthis.toggle.removeEventListener('blur', handle, true);\n\t\t};\n\n\t\tthis.toggle.addEventListener('blur', handle, true);\n\t}\n\n\tprivate buildPopper() {\n\t\tthis.popperInstance = createPopper(this.toggle, this.content, {\n\t\t\tplacement: POSITIONS[this.placement] || 'top',\n\t\t\tstrategy: this.strategy || 'fixed',\n\t\t\tmodifiers: [\n\t\t\t\t{\n\t\t\t\t\tname: 'offset',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\toffset: [0, 5],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t});\n\t}\n\n\t// Public methods\n\tpublic show() {\n\t\tthis.content.classList.remove('hidden');\n\n\t\tif (this.preventPopper === 'false') {\n\t\t\tthis.popperInstance.setOptions((options) => ({\n\t\t\t\t...options,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...options.modifiers,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'eventListeners',\n\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}));\n\n\t\t\tthis.popperInstance.update();\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tthis.el.classList.add('show');\n\n\t\t\tthis.fireEvent('show', this.el);\n\t\t\tdispatch('show.hs.tooltip', this.el, this.el);\n\t\t});\n\t}\n\n\tpublic hide() {\n\t\tthis.el.classList.remove('show');\n\n\t\tif (this.preventPopper === 'false') {\n\t\t\tthis.popperInstance.setOptions((options) => ({\n\t\t\t\t...options,\n\t\t\t\tmodifiers: [\n\t\t\t\t\t...options.modifiers,\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'eventListeners',\n\t\t\t\t\t\tenabled: false,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}));\n\t\t}\n\n\t\tthis.fireEvent('hide', this.el);\n\t\tdispatch('hide.hs.tooltip', this.el, this.el);\n\n\t\tafterTransition(this.content, () => {\n\t\t\tif (this.el.classList.contains('show')) return false;\n\n\t\t\tthis.content.classList.add('hidden');\n\t\t});\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance = false) {\n\t\tconst elInCollection = window.$hsTooltipCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsTooltipCollection) window.$hsTooltipCollection = [];\n\n\t\tdocument.querySelectorAll('.hs-tooltip').forEach((el: HTMLElement) => {\n\t\t\tif (\n\t\t\t\t!window.$hsTooltipCollection.find(\n\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t)\n\t\t\t)\n\t\t\t\tnew HSTooltip(el);\n\t\t});\n\t}\n\n\tstatic show(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsTooltipCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) {\n\t\t\tswitch (elInCollection.element.eventMode) {\n\t\t\t\tcase 'click':\n\t\t\t\t\telInCollection.element.click();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'focus':\n\t\t\t\t\telInCollection.element.focus();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\telInCollection.element.enter();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic hide(target: HTMLElement) {\n\t\tconst elInCollection = window.$hsTooltipCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.hide();\n\t}\n\n\t// Backward compatibility\n\tstatic on(evt: string, target: HTMLElement, cb: Function) {\n\t\tconst elInCollection = window.$hsTooltipCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\tif (elInCollection) elInCollection.element.events[evt] = cb;\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSTooltip: Function;\n\t\t$hsTooltipCollection: ICollectionItem<HSTooltip>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tHSTooltip.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Tooltip collection:', window.$hsTooltipCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSTooltip = HSTooltip;\n}\n\nexport default HSTooltip;\n","/*\n * HSDataTable\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { Api } from 'datatables.net';\n\nimport { debounce, htmlToElement, classToClassList } from '../../utils';\n\nimport { IDataTableOptions, IDataTable } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\ndeclare var DataTable: any;\n\ninterface IColumnDef {\n\ttargets: number;\n\torderable: boolean;\n}\n\nclass HSDataTable\n\textends HSBasePlugin<IDataTableOptions>\n\timplements IDataTable\n{\n\tprivate concatOptions: IDataTableOptions;\n\n\tprivate dataTable: Api<any>;\n\n\tprivate readonly table: HTMLTableElement;\n\n\tprivate readonly search: HTMLElement | null;\n\n\tprivate readonly pageEntities: HTMLSelectElement | HTMLInputElement | null;\n\n\tprivate readonly paging: HTMLElement | null;\n\tprivate readonly pagingPrev: HTMLElement | null;\n\tprivate readonly pagingNext: HTMLElement | null;\n\tprivate readonly pagingPages: HTMLElement | null;\n\n\tprivate readonly info: HTMLElement | null;\n\tprivate readonly infoFrom: HTMLElement | null;\n\tprivate readonly infoTo: HTMLElement | null;\n\tprivate readonly infoLength: HTMLElement | null;\n\n\tprivate rowSelectingAll: HTMLElement | null;\n\tprivate rowSelectingIndividual: string | null;\n\n\tprivate maxPagesToShow: number;\n\tprivate isRowSelecting: boolean;\n\tprivate readonly pageBtnClasses: string | null;\n\n\tconstructor(el: HTMLElement, options?: IDataTableOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.el = typeof el === 'string' ? document.querySelector(el) : el;\n\n\t\t// Exclude columns from ordering\n\t\tconst columnDefs: IColumnDef[] = [];\n\t\tArray.from(this.el.querySelectorAll('thead th, thead td')).forEach(\n\t\t\t(th: HTMLElement, ind: number) => {\n\t\t\t\tif (th.classList.contains('--exclude-from-ordering'))\n\t\t\t\t\tcolumnDefs.push({\n\t\t\t\t\t\ttargets: ind,\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t});\n\t\t\t},\n\t\t);\n\n\t\tconst data = this.el.getAttribute('data-hs-datatable');\n\t\tconst dataOptions: IDataTableOptions = data ? JSON.parse(data) : {};\n\n\t\tthis.concatOptions = {\n\t\t\tsearching: true,\n\t\t\tlengthChange: false,\n\t\t\torder: [],\n\t\t\tcolumnDefs: [...columnDefs],\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.table = this.el.querySelector('table');\n\n\t\tthis.search = this.el.querySelector('[data-hs-datatable-search]') ?? null;\n\n\t\tthis.pageEntities =\n\t\t\tthis.el.querySelector('[data-hs-datatable-page-entities]') ?? null;\n\n\t\tthis.paging = this.el.querySelector('[data-hs-datatable-paging]') ?? null;\n\t\tthis.pagingPrev =\n\t\t\tthis.el.querySelector('[data-hs-datatable-paging-prev]') ?? null;\n\t\tthis.pagingNext =\n\t\t\tthis.el.querySelector('[data-hs-datatable-paging-next]') ?? null;\n\t\tthis.pagingPages =\n\t\t\tthis.el.querySelector('[data-hs-datatable-paging-pages]') ?? null;\n\n\t\tthis.info = this.el.querySelector('[data-hs-datatable-info]') ?? null;\n\t\tthis.infoFrom =\n\t\t\tthis.el.querySelector('[data-hs-datatable-info-from]') ?? null;\n\t\tthis.infoTo = this.el.querySelector('[data-hs-datatable-info-to]') ?? null;\n\t\tthis.infoLength =\n\t\t\tthis.el.querySelector('[data-hs-datatable-info-length]') ?? null;\n\n\t\tif (this.concatOptions?.rowSelectingOptions)\n\t\t\tthis.rowSelectingAll =\n\t\t\t\t(this.concatOptions?.rowSelectingOptions?.selectAllSelector\n\t\t\t\t\t? document.querySelector(\n\t\t\t\t\t\t\tthis.concatOptions?.rowSelectingOptions?.selectAllSelector,\n\t\t\t\t\t\t)\n\t\t\t\t\t: document.querySelector('[data-hs-datatable-row-selecting-all]')) ??\n\t\t\t\tnull;\n\t\tif (this.concatOptions?.rowSelectingOptions)\n\t\t\tthis.rowSelectingIndividual =\n\t\t\t\tthis.concatOptions?.rowSelectingOptions?.individualSelector ??\n\t\t\t\t'[data-hs-datatable-row-selecting-individual]' ??\n\t\t\t\tnull;\n\n\t\tif (this.pageEntities)\n\t\t\tthis.concatOptions.pageLength = parseInt(this.pageEntities.value);\n\n\t\tthis.maxPagesToShow = 3;\n\t\tthis.isRowSelecting = !!this.concatOptions?.rowSelectingOptions;\n\t\tthis.pageBtnClasses =\n\t\t\tthis.concatOptions?.pagingOptions?.pageBtnClasses ?? null;\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsDataTableCollection, this);\n\n\t\tthis.initTable();\n\n\t\tif (this.search) this.initSearch();\n\n\t\tif (this.pageEntities) this.initPageEntities();\n\n\t\tif (this.paging) this.initPaging();\n\t\tif (this.pagingPrev) this.initPagingPrev();\n\t\tif (this.pagingNext) this.initPagingNext();\n\t\tif (this.pagingPages) this.buildPagingPages();\n\n\t\tif (this.info) this.initInfo();\n\n\t\tif (this.isRowSelecting) this.initRowSelecting();\n\t}\n\n\tprivate initTable() {\n\t\tthis.dataTable = new DataTable(this.table, this.concatOptions);\n\n\t\tif (this.isRowSelecting) this.triggerChangeEventToRow();\n\n\t\tthis.dataTable.on('draw', () => {\n\t\t\tif (this.isRowSelecting) this.updateSelectAllCheckbox();\n\t\t\tif (this.isRowSelecting) this.triggerChangeEventToRow();\n\t\t\tthis.updateInfo();\n\t\t\tthis.updatePaging();\n\t\t});\n\t}\n\n\t// Search\n\tprivate initSearch() {\n\t\tthis.search.addEventListener(\n\t\t\t'input',\n\t\t\tdebounce((evt: InputEvent) =>\n\t\t\t\tthis.onSearchInput((evt.target as HTMLInputElement).value),\n\t\t\t),\n\t\t);\n\t}\n\n\tprivate onSearchInput(val: string) {\n\t\tthis.dataTable.search(val).draw();\n\t}\n\n\t// Page entities\n\tprivate initPageEntities() {\n\t\tthis.pageEntities.addEventListener('change', (evt: Event) =>\n\t\t\tthis.onEntitiesChange(parseInt((evt.target as HTMLSelectElement).value)),\n\t\t);\n\t}\n\n\tprivate onEntitiesChange(entities: number) {\n\t\tthis.dataTable.page.len(entities).draw();\n\t}\n\n\t// Info\n\tprivate initInfo() {\n\t\tif (this.infoFrom) this.initInfoFrom();\n\t\tif (this.infoTo) this.initInfoTo();\n\t\tif (this.infoLength) this.initInfoLength();\n\t}\n\n\tprivate initInfoFrom() {\n\t\tconst { start } = this.dataTable.page.info();\n\n\t\tthis.infoFrom.innerText = `${start + 1}`;\n\t}\n\n\tprivate initInfoTo() {\n\t\tconst { end } = this.dataTable.page.info();\n\n\t\tthis.infoTo.innerText = `${end}`;\n\t}\n\n\tprivate initInfoLength() {\n\t\tconst { recordsTotal } = this.dataTable.page.info();\n\n\t\tthis.infoLength.innerText = `${recordsTotal}`;\n\t}\n\n\tprivate updateInfo() {\n\t\tthis.initInfo();\n\t}\n\n\t// Paging\n\tprivate initPaging() {\n\t\tthis.hidePagingIfSinglePage();\n\t}\n\n\tprivate hidePagingIfSinglePage() {\n\t\tconst { pages } = this.dataTable.page.info();\n\n\t\tif (pages < 2) {\n\t\t\tthis.paging.classList.add('hidden');\n\t\t\tthis.paging.style.display = 'none';\n\t\t} else {\n\t\t\tthis.paging.classList.remove('hidden');\n\t\t\tthis.paging.style.display = '';\n\t\t}\n\t}\n\n\tprivate initPagingPrev() {\n\t\tthis.pagingPrev.addEventListener('click', () => {\n\t\t\tthis.onPrevClick();\n\t\t});\n\t}\n\n\tprivate onPrevClick() {\n\t\tthis.dataTable.page('previous').draw('page');\n\t}\n\n\tprivate disablePagingArrow(el: HTMLElement, statement: boolean) {\n\t\tif (statement) {\n\t\t\tel.classList.add('disabled');\n\t\t\tel.setAttribute('disabled', 'disabled');\n\t\t} else {\n\t\t\tel.classList.remove('disabled');\n\t\t\tel.removeAttribute('disabled');\n\t\t}\n\t}\n\n\tprivate initPagingNext() {\n\t\tthis.pagingNext.addEventListener('click', () => {\n\t\t\tthis.onNextClick();\n\t\t});\n\t}\n\n\tprivate onNextClick() {\n\t\tthis.dataTable.page('next').draw('page');\n\t}\n\n\tprivate buildPagingPages() {\n\t\tthis.updatePaging();\n\t}\n\n\tprivate updatePaging() {\n\t\tconst { page, pages, length } = this.dataTable.page.info();\n\t\tconst totalRecords = this.dataTable.rows({ search: 'applied' }).count();\n\t\tconst totalPages = Math.ceil(totalRecords / length);\n\t\tconst currentPage = page + 1;\n\n\t\tlet startPage = Math.max(\n\t\t\t1,\n\t\t\tcurrentPage - Math.floor(this.maxPagesToShow / 2),\n\t\t);\n\t\tlet endPage = Math.min(totalPages, startPage + (this.maxPagesToShow - 1));\n\n\t\tif (endPage - startPage + 1 < this.maxPagesToShow) {\n\t\t\tstartPage = Math.max(1, endPage - this.maxPagesToShow + 1);\n\t\t}\n\n\t\tthis.pagingPages.innerHTML = '';\n\n\t\tif (startPage > 1) {\n\t\t\tthis.buildPagingPage(1);\n\n\t\t\tif (startPage > 2) {\n\t\t\t\tthis.pagingPages.appendChild(\n\t\t\t\t\thtmlToElement(`<span class=\"ellipsis\">...</span>`),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = startPage; i <= endPage; i++) {\n\t\t\tthis.buildPagingPage(i);\n\t\t}\n\n\t\tif (endPage < totalPages) {\n\t\t\tif (endPage < totalPages - 1) {\n\t\t\t\tthis.pagingPages.appendChild(\n\t\t\t\t\thtmlToElement(`<span class=\"ellipsis\">...</span>`),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.buildPagingPage(totalPages);\n\t\t}\n\n\t\tthis.disablePagingArrow(this.pagingPrev, page === 0);\n\t\tthis.disablePagingArrow(this.pagingNext, page === pages - 1);\n\t\tthis.hidePagingIfSinglePage();\n\t}\n\n\tprivate buildPagingPage(counter: number) {\n\t\tconst { page } = this.dataTable.page.info();\n\t\tconst pageEl = htmlToElement(`<button type=\"button\"></button>`);\n\t\tpageEl.innerText = `${counter}`;\n\t\tpageEl.setAttribute('data-page', `${counter}`);\n\t\tif (this.pageBtnClasses) classToClassList(this.pageBtnClasses, pageEl);\n\t\tif (page === counter - 1) pageEl.classList.add('active');\n\n\t\tpageEl.addEventListener('click', () => this.onPageClick(counter));\n\n\t\tthis.pagingPages.append(pageEl);\n\t}\n\n\tprivate onPageClick(counter: number) {\n\t\tthis.dataTable.page(counter - 1).draw('page');\n\t}\n\n\t// Select row\n\tprivate initRowSelecting() {\n\t\tthis.rowSelectingAll.addEventListener('change', () =>\n\t\t\tthis.onSelectAllChange(),\n\t\t);\n\t}\n\n\tprivate triggerChangeEventToRow() {\n\t\tthis.table\n\t\t\t.querySelectorAll(`tbody ${this.rowSelectingIndividual}`)\n\t\t\t.forEach((el) => {\n\t\t\t\tel.addEventListener('change', () => {\n\t\t\t\t\tthis.updateSelectAllCheckbox();\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tprivate onSelectAllChange() {\n\t\tlet isChecked = (this.rowSelectingAll as HTMLInputElement).checked;\n\t\tconst visibleRows = Array.from(\n\t\t\tthis.dataTable.rows({ page: 'current', search: 'applied' }).nodes(),\n\t\t);\n\n\t\tvisibleRows.forEach((el) => {\n\t\t\tconst checkbox = el.querySelector(this.rowSelectingIndividual);\n\n\t\t\tif (checkbox) checkbox.checked = isChecked;\n\t\t});\n\n\t\tthis.updateSelectAllCheckbox();\n\t}\n\n\tprivate updateSelectAllCheckbox() {\n\t\tconst searchRelatedItems = this.dataTable\n\t\t\t.rows({ search: 'applied' })\n\t\t\t.count();\n\n\t\tif (!searchRelatedItems) {\n\t\t\t(this.rowSelectingAll as HTMLInputElement).checked = false;\n\n\t\t\treturn false;\n\t\t}\n\n\t\tlet isChecked = true;\n\t\tconst visibleRows = Array.from(\n\t\t\tthis.dataTable\n\t\t\t\t.rows({\n\t\t\t\t\tpage: 'current',\n\t\t\t\t\tsearch: 'applied',\n\t\t\t\t})\n\t\t\t\t.nodes(),\n\t\t);\n\n\t\tvisibleRows.forEach((el) => {\n\t\t\tconst checkbox = el.querySelector(this.rowSelectingIndividual);\n\n\t\t\tif (checkbox && !checkbox.checked) {\n\t\t\t\tisChecked = false;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\t(this.rowSelectingAll as HTMLInputElement).checked = isChecked;\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsDataTableCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsDataTableCollection) window.$hsDataTableCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-datatable]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsDataTableCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSDataTable(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSDataTable: Function;\n\t\t$hsDataTableCollection: ICollectionItem<HSDataTable>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tif (\n\t\tdocument.querySelectorAll(\n\t\t\t'[data-hs-datatable]:not(.--prevent-on-load-init)',\n\t\t).length\n\t) {\n\t\tif (typeof jQuery === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSDataTable: jQuery is not available, please add it to the page.',\n\t\t\t);\n\t\tif (typeof DataTable === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSDataTable: DataTable is not available, please add it to the page.',\n\t\t\t);\n\t}\n\n\tif (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined')\n\t\tHSDataTable.autoInit();\n\n\t// Uncomment for debug\n\t// console.log('Datatable collection:', window.$hsDataTableCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSDataTable = HSDataTable;\n}\n\nexport default HSDataTable;\n","/*\n * HSFileUpload\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { DropzoneFile } from 'dropzone';\n\nimport { htmlToElement, classToClassList } from '../../utils';\n\nimport { IFileUploadOptions, IFileUpload } from './interfaces';\n\nimport HSBasePlugin from '../base-plugin';\nimport { ICollectionItem } from '../../interfaces';\n\ndeclare var _: any;\ndeclare var Dropzone: any;\n\nif (typeof Dropzone !== 'undefined') Dropzone.autoDiscover = false;\n\nclass HSFileUpload\n\textends HSBasePlugin<IFileUploadOptions>\n\timplements IFileUpload\n{\n\tprivate concatOptions: IFileUploadOptions;\n\tprivate previewTemplate: string;\n\tprivate extensions: any = {};\n\tprivate singleton: boolean;\n\n\tprivate dropzone: Dropzone | null;\n\n\tconstructor(el: HTMLElement, options?: IFileUploadOptions, events?: {}) {\n\t\tsuper(el, options, events);\n\n\t\tthis.el = typeof el === 'string' ? document.querySelector(el) : el;\n\n\t\tconst data = this.el.getAttribute('data-hs-file-upload');\n\t\tconst dataOptions: IFileUploadOptions = data ? JSON.parse(data) : {};\n\n\t\tthis.previewTemplate =\n\t\t\tthis.el.querySelector('[data-hs-file-upload-preview]')?.innerHTML ||\n\t\t\t`<div class=\"p-3 bg-white border border-solid border-gray-300 rounded-xl dark:bg-neutral-800 dark:border-neutral-600\">\n\t\t\t<div class=\"mb-2 flex justify-between items-center\">\n\t\t\t\t<div class=\"flex items-center gap-x-3\">\n\t\t\t\t\t<span class=\"size-8 flex justify-center items-center border border-gray-200 text-gray-500 rounded-lg dark:border-neutral-700 dark:text-neutral-500\" data-hs-file-upload-file-icon></span>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p class=\"text-sm font-medium text-gray-800 dark:text-white\">\n\t\t\t\t\t\t\t<span class=\"truncate inline-block max-w-[300px] align-bottom\" data-hs-file-upload-file-name></span>.<span data-hs-file-upload-file-ext></span>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"text-xs text-gray-500 dark:text-neutral-500\" data-hs-file-upload-file-size></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"inline-flex items-center gap-x-2\">\n\t\t\t\t\t<button type=\"button\" class=\"text-gray-500 hover:text-gray-800 dark:text-neutral-500 dark:hover:text-neutral-200\" data-hs-file-upload-remove>\n\t\t\t\t\t\t<svg class=\"shrink-0 size-4\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 6h18\"></path><path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\"></path><path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\"></path><line x1=\"10\" x2=\"10\" y1=\"11\" y2=\"17\"></line><line x1=\"14\" x2=\"14\" y1=\"11\" y2=\"17\"></line></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"flex items-center gap-x-3 whitespace-nowrap\">\n\t\t\t\t<div class=\"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\" data-hs-file-upload-progress-bar>\n\t\t\t\t\t<div class=\"flex flex-col justify-center rounded-full overflow-hidden bg-blue-600 text-xs text-white text-center whitespace-nowrap transition-all duration-500 hs-file-upload-complete:bg-green-600 dark:bg-blue-500\" style=\"width: 0\" data-hs-file-upload-progress-bar-pane></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-10 text-end\">\n\t\t\t\t\t<span class=\"text-sm text-gray-800 dark:text-white\">\n\t\t\t\t\t\t<span data-hs-file-upload-progress-bar-value>0</span>%\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`;\n\t\tthis.extensions = _.merge(\n\t\t\t{\n\t\t\t\tdefault: {\n\t\t\t\t\ticon: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/></svg>',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\txls: {\n\t\t\t\t\ticon: '<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.0243 1.43996H7.08805C6.82501 1.43996 6.57277 1.54445 6.38677 1.73043C6.20077 1.91642 6.09631 2.16868 6.09631 2.43171V6.64796L15.0243 11.856L19.4883 13.7398L23.9523 11.856V6.64796L15.0243 1.43996Z\" fill=\"#21A366\"></path><path d=\"M6.09631 6.64796H15.0243V11.856H6.09631V6.64796Z\" fill=\"#107C41\"></path><path d=\"M22.9605 1.43996H15.0243V6.64796H23.9523V2.43171C23.9523 2.16868 23.8478 1.91642 23.6618 1.73043C23.4758 1.54445 23.2235 1.43996 22.9605 1.43996Z\" fill=\"#33C481\"></path><path d=\"M15.0243 11.856H6.09631V21.2802C6.09631 21.5433 6.20077 21.7955 6.38677 21.9815C6.57277 22.1675 6.82501 22.272 7.08805 22.272H22.9606C23.2236 22.272 23.4759 22.1675 23.6618 21.9815C23.8478 21.7955 23.9523 21.5433 23.9523 21.2802V17.064L15.0243 11.856Z\" fill=\"#185C37\"></path><path d=\"M15.0243 11.856H23.9523V17.064H15.0243V11.856Z\" fill=\"#107C41\"></path><path opacity=\"0.1\" d=\"M12.5446 5.15996H6.09631V19.296H12.5446C12.8073 19.2952 13.0591 19.1904 13.245 19.0046C13.4308 18.8188 13.5355 18.567 13.5363 18.3042V6.1517C13.5355 5.88892 13.4308 5.63712 13.245 5.4513C13.0591 5.26548 12.8073 5.16074 12.5446 5.15996Z\" fill=\"black\"></path><path opacity=\"0.2\" d=\"M11.8006 5.90396H6.09631V20.04H11.8006C12.0633 20.0392 12.3151 19.9344 12.501 19.7486C12.6868 19.5628 12.7915 19.311 12.7923 19.0482V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z\" fill=\"black\"></path><path opacity=\"0.2\" d=\"M11.8006 5.90396H6.09631V18.552H11.8006C12.0633 18.5512 12.3151 18.4464 12.501 18.2606C12.6868 18.0748 12.7915 17.823 12.7923 17.5602V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z\" fill=\"black\"></path><path opacity=\"0.2\" d=\"M11.0566 5.90396H6.09631V18.552H11.0566C11.3193 18.5512 11.5711 18.4464 11.757 18.2606C11.9428 18.0748 12.0475 17.823 12.0483 17.5602V6.8957C12.0475 6.6329 11.9428 6.38114 11.757 6.19532C11.5711 6.0095 11.3193 5.90475 11.0566 5.90396Z\" fill=\"black\"></path><path d=\"M1.13604 5.90396H11.0566C11.3195 5.90396 11.5718 6.00842 11.7578 6.19442C11.9438 6.38042 12.0483 6.63266 12.0483 6.8957V16.8162C12.0483 17.0793 11.9438 17.3315 11.7578 17.5175C11.5718 17.7035 11.3195 17.808 11.0566 17.808H1.13604C0.873012 17.808 0.620754 17.7035 0.434765 17.5175C0.248775 17.3315 0.144287 17.0793 0.144287 16.8162V6.8957C0.144287 6.63266 0.248775 6.38042 0.434765 6.19442C0.620754 6.00842 0.873012 5.90396 1.13604 5.90396Z\" fill=\"#107C41\"></path><path d=\"M2.77283 15.576L5.18041 11.8455L2.9752 8.13596H4.74964L5.95343 10.5071C6.06401 10.7318 6.14015 10.8994 6.18185 11.01H6.19745C6.27683 10.8305 6.35987 10.6559 6.44669 10.4863L7.73309 8.13596H9.36167L7.09991 11.8247L9.41897 15.576H7.68545L6.29489 12.972C6.22943 12.861 6.17387 12.7445 6.12899 12.6238H6.10817C6.06761 12.7419 6.01367 12.855 5.94748 12.9608L4.51676 15.576H2.77283Z\" fill=\"white\"></path></svg>',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\tdoc: {\n\t\t\t\t\ticon: '<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M30.6141 1.91994H9.45071C9.09999 1.91994 8.76367 2.05926 8.51567 2.30725C8.26767 2.55523 8.12839 2.89158 8.12839 3.24228V8.86395L20.0324 12.3359L31.9364 8.86395V3.24228C31.9364 2.89158 31.797 2.55523 31.549 2.30725C31.3011 2.05926 30.9647 1.91994 30.6141 1.91994Z\" fill=\"#41A5EE\"></path><path d=\"M31.9364 8.86395H8.12839V15.8079L20.0324 19.2799L31.9364 15.8079V8.86395Z\" fill=\"#2B7CD3\"></path><path d=\"M31.9364 15.8079H8.12839V22.7519L20.0324 26.2239L31.9364 22.7519V15.8079Z\" fill=\"#185ABD\"></path><path d=\"M31.9364 22.752H8.12839V28.3736C8.12839 28.7244 8.26767 29.0607 8.51567 29.3087C8.76367 29.5567 9.09999 29.696 9.45071 29.696H30.6141C30.9647 29.696 31.3011 29.5567 31.549 29.3087C31.797 29.0607 31.9364 28.7244 31.9364 28.3736V22.752Z\" fill=\"#103F91\"></path><path opacity=\"0.1\" d=\"M16.7261 6.87994H8.12839V25.7279H16.7261C17.0764 25.7269 17.4121 25.5872 17.6599 25.3395C17.9077 25.0917 18.0473 24.756 18.0484 24.4056V8.20226C18.0473 7.8519 17.9077 7.51616 17.6599 7.2684C17.4121 7.02064 17.0764 6.88099 16.7261 6.87994Z\" class=\"fill-black dark:fill-neutral-200\" fill=\"currentColor\"></path><path opacity=\"0.2\" d=\"M15.7341 7.87194H8.12839V26.7199H15.7341C16.0844 26.7189 16.4201 26.5792 16.6679 26.3315C16.9157 26.0837 17.0553 25.748 17.0564 25.3976V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z\" class=\"fill-black dark:fill-neutral-200\" fill=\"currentColor\"></path><path opacity=\"0.2\" d=\"M15.7341 7.87194H8.12839V24.7359H15.7341C16.0844 24.7349 16.4201 24.5952 16.6679 24.3475C16.9157 24.0997 17.0553 23.764 17.0564 23.4136V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z\" class=\"fill-black dark:fill-neutral-200\" fill=\"currentColor\"></path><path opacity=\"0.2\" d=\"M14.7421 7.87194H8.12839V24.7359H14.7421C15.0924 24.7349 15.4281 24.5952 15.6759 24.3475C15.9237 24.0997 16.0633 23.764 16.0644 23.4136V9.19426C16.0633 8.84386 15.9237 8.50818 15.6759 8.26042C15.4281 8.01266 15.0924 7.87299 14.7421 7.87194Z\" class=\"fill-black dark:fill-neutral-200\" fill=\"currentColor\"></path><path d=\"M1.51472 7.87194H14.7421C15.0927 7.87194 15.4291 8.01122 15.6771 8.25922C15.925 8.50722 16.0644 8.84354 16.0644 9.19426V22.4216C16.0644 22.7723 15.925 23.1087 15.6771 23.3567C15.4291 23.6047 15.0927 23.7439 14.7421 23.7439H1.51472C1.16401 23.7439 0.827669 23.6047 0.579687 23.3567C0.3317 23.1087 0.192383 22.7723 0.192383 22.4216V9.19426C0.192383 8.84354 0.3317 8.50722 0.579687 8.25922C0.827669 8.01122 1.16401 7.87194 1.51472 7.87194Z\" fill=\"#185ABD\"></path><path d=\"M12.0468 20.7679H10.2612L8.17801 13.9231L5.99558 20.7679H4.20998L2.22598 10.8479H4.01158L5.40038 17.7919L7.48358 11.0463H8.97161L10.9556 17.7919L12.3444 10.8479H14.0308L12.0468 20.7679Z\" fill=\"white\"></path></svg>',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t\tzip: {\n\t\t\t\t\ticon: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v18\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/><circle cx=\"10\" cy=\"20\" r=\"2\"/><path d=\"M10 7V6\"/><path d=\"M10 12v-1\"/><path d=\"M10 18v-2\"/></svg>',\n\t\t\t\t\tclass: 'size-5',\n\t\t\t\t},\n\t\t\t},\n\t\t\tdataOptions.extensions,\n\t\t);\n\t\tthis.singleton = dataOptions.singleton;\n\n\t\tthis.concatOptions = {\n\t\t\tclickable: this.el.querySelector(\n\t\t\t\t'[data-hs-file-upload-trigger]',\n\t\t\t) as HTMLElement,\n\t\t\tpreviewsContainer: this.el.querySelector(\n\t\t\t\t'[data-hs-file-upload-previews]',\n\t\t\t) as HTMLElement,\n\t\t\taddRemoveLinks: false,\n\t\t\tpreviewTemplate: this.previewTemplate,\n\t\t\tautoHideTrigger: false,\n\t\t\t...dataOptions,\n\t\t\t...options,\n\t\t};\n\n\t\tthis.init();\n\t}\n\n\tprivate init() {\n\t\tthis.createCollection(window.$hsFileUploadCollection, this);\n\n\t\tthis.initDropzone();\n\t}\n\n\tprivate initDropzone() {\n\t\tconst clear = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-clear]',\n\t\t) as HTMLButtonElement;\n\t\tconst pseudoTriggers = Array.from(\n\t\t\tthis.el.querySelectorAll('[data-hs-file-upload-pseudo-trigger]'),\n\t\t) as HTMLButtonElement[];\n\t\tthis.dropzone = new Dropzone(this.el, this.concatOptions);\n\n\t\tthis.dropzone.on('addedfile', (file: DropzoneFile) => this.onAddFile(file));\n\t\tthis.dropzone.on('removedfile', () => this.onRemoveFile());\n\t\tthis.dropzone.on('uploadprogress', (file: DropzoneFile, progress: number) =>\n\t\t\tthis.onUploadProgress(file, progress),\n\t\t);\n\t\tthis.dropzone.on('complete', (file: DropzoneFile) => this.onComplete(file));\n\n\t\tif (clear)\n\t\t\tclear.onclick = () => {\n\t\t\t\tif (this.dropzone.files.length) this.dropzone.removeAllFiles(true);\n\t\t\t};\n\n\t\tif (pseudoTriggers.length)\n\t\t\tpseudoTriggers.forEach((el) => {\n\t\t\t\tel.onclick = () => {\n\t\t\t\t\tif (this.concatOptions?.clickable)\n\t\t\t\t\t\t(this.concatOptions?.clickable as HTMLButtonElement).click();\n\t\t\t\t};\n\t\t\t});\n\t}\n\n\tprivate onAddFile(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\t\tconst reloadButton = file.previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-reload]',\n\t\t);\n\n\t\tif (!previewElement) return false;\n\n\t\tif (this.singleton && this.dropzone.files.length > 1)\n\t\t\tthis.dropzone.removeFile(this.dropzone.files[0]);\n\n\t\tif (reloadButton) {\n\t\t\treloadButton.addEventListener('click', (evt: MouseEvent) => {\n\t\t\t\tevt.preventDefault();\n\t\t\t\tevt.stopPropagation();\n\n\t\t\t\tconst tempFileInput = document.createElement('input');\n\t\t\t\ttempFileInput.type = 'file';\n\n\t\t\t\ttempFileInput.click();\n\n\t\t\t\ttempFileInput.addEventListener('change', (event: Event) => {\n\t\t\t\t\tconst input = event.target as HTMLInputElement;\n\t\t\t\t\tconst newFile = input.files?.[0];\n\n\t\t\t\t\tif (newFile) {\n\t\t\t\t\t\tconst dzNewFile = newFile as Dropzone.DropzoneFile;\n\t\t\t\t\t\tdzNewFile.status = Dropzone.ADDED;\n\t\t\t\t\t\tdzNewFile.accepted = true;\n\t\t\t\t\t\tdzNewFile.previewElement = file.previewElement;\n\t\t\t\t\t\tdzNewFile.previewTemplate = file.previewTemplate;\n\t\t\t\t\t\tdzNewFile.previewsContainer = file.previewsContainer;\n\n\t\t\t\t\t\tthis.dropzone.removeFile(file);\n\t\t\t\t\t\tthis.dropzone.addFile(dzNewFile);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tthis.previewAccepted(file);\n\t}\n\n\tprivate previewAccepted(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\t\tconst fileInfo = this.splitFileName(file.name);\n\n\t\tconst fileName = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-name]',\n\t\t);\n\t\tconst fileExt = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-ext]',\n\t\t);\n\t\tconst fileSize = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-size]',\n\t\t);\n\t\tconst fileIcon = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-file-icon]',\n\t\t) as HTMLElement;\n\t\tconst trigger = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-trigger]',\n\t\t) as HTMLElement;\n\t\tconst preview = previewElement.querySelector(\n\t\t\t'[data-dz-thumbnail]',\n\t\t) as HTMLElement;\n\t\tconst remove = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-remove]',\n\t\t) as HTMLButtonElement;\n\n\t\tif (fileName) fileName.textContent = fileInfo.name;\n\t\tif (fileExt) fileExt.textContent = fileInfo.extension;\n\t\tif (fileSize) fileSize.textContent = this.formatFileSize(file.size);\n\n\t\tif (preview) {\n\t\t\tif (file.type.includes('image/')) preview.classList.remove('hidden');\n\t\t\telse this.setIcon(fileInfo.extension, fileIcon);\n\t\t}\n\n\t\tif (this.dropzone.files.length > 0 && this.concatOptions.autoHideTrigger)\n\t\t\ttrigger.style.display = 'none';\n\n\t\tif (remove) remove.onclick = () => this.dropzone.removeFile(file);\n\t}\n\n\tprivate onRemoveFile() {\n\t\tconst trigger = this.el.querySelector(\n\t\t\t'[data-hs-file-upload-trigger]',\n\t\t) as HTMLElement;\n\n\t\tif (this.dropzone.files.length === 0 && this.concatOptions.autoHideTrigger)\n\t\t\ttrigger.style.display = '';\n\t}\n\n\tprivate onUploadProgress(file: DropzoneFile, progress: number) {\n\t\tconst { previewElement } = file;\n\n\t\tif (!previewElement) return false;\n\n\t\tconst progressBar = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar]',\n\t\t);\n\t\tconst progressBarPane = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar-pane]',\n\t\t) as HTMLElement;\n\t\tconst progressBarValue = previewElement.querySelector(\n\t\t\t'[data-hs-file-upload-progress-bar-value]',\n\t\t) as HTMLElement;\n\n\t\tconst currentProgress = Math.floor(progress);\n\n\t\tif (progressBar)\n\t\t\tprogressBar.setAttribute('aria-valuenow', `${currentProgress}`);\n\t\tif (progressBarPane) progressBarPane.style.width = `${currentProgress}%`;\n\t\tif (progressBarValue) progressBarValue.innerText = `${currentProgress}`;\n\t}\n\n\tprivate onComplete(file: DropzoneFile) {\n\t\tconst { previewElement } = file;\n\n\t\tif (!previewElement) return false;\n\n\t\tpreviewElement.classList.add('complete');\n\t}\n\n\tprivate setIcon(ext: string, file: HTMLElement) {\n\t\tconst icon = this.createIcon(ext);\n\n\t\tfile.append(icon);\n\t}\n\n\tprivate createIcon(ext: string) {\n\t\tconst icon = this.extensions[ext]?.icon\n\t\t\t? htmlToElement(this.extensions[ext].icon)\n\t\t\t: htmlToElement(this.extensions.default.icon);\n\n\t\tclassToClassList(\n\t\t\tthis.extensions[ext]?.class\n\t\t\t\t? this.extensions[ext].class\n\t\t\t\t: this.extensions.default.class,\n\t\t\ticon,\n\t\t);\n\n\t\treturn icon;\n\t}\n\n\tprivate formatFileSize(size: number) {\n\t\tif (size < 1024) {\n\t\t\treturn size.toFixed(2) + ' B';\n\t\t} else if (size < 1024 * 1024) {\n\t\t\treturn (size / 1024).toFixed(2) + ' KB';\n\t\t} else if (size < 1024 * 1024 * 1024) {\n\t\t\treturn (size / (1024 * 1024)).toFixed(2) + ' MB';\n\t\t} else if (size < 1024 * 1024 * 1024 * 1024) {\n\t\t\treturn (size / (1024 * 1024 * 1024)).toFixed(2) + ' GB';\n\t\t} else {\n\t\t\treturn (size / (1024 * 1024 * 1024 * 1024)).toFixed(2) + ' TB';\n\t\t}\n\t}\n\n\tprivate splitFileName(file: string): {\n\t\tname: string;\n\t\textension: string;\n\t} {\n\t\tlet dotIndex = file.lastIndexOf('.');\n\n\t\tif (dotIndex == -1) return { name: file, extension: '' };\n\n\t\treturn {\n\t\t\tname: file.substring(0, dotIndex),\n\t\t\textension: file.substring(dotIndex + 1),\n\t\t};\n\t}\n\n\t// Static methods\n\tstatic getInstance(target: HTMLElement | string, isInstance?: boolean) {\n\t\tconst elInCollection = window.$hsFileUploadCollection.find(\n\t\t\t(el) =>\n\t\t\t\tel.element.el ===\n\t\t\t\t(typeof target === 'string' ? document.querySelector(target) : target),\n\t\t);\n\n\t\treturn elInCollection\n\t\t\t? isInstance\n\t\t\t\t? elInCollection\n\t\t\t\t: elInCollection.element.el\n\t\t\t: null;\n\t}\n\n\tstatic autoInit() {\n\t\tif (!window.$hsFileUploadCollection) window.$hsFileUploadCollection = [];\n\n\t\tdocument\n\t\t\t.querySelectorAll('[data-hs-file-upload]:not(.--prevent-on-load-init)')\n\t\t\t.forEach((el: HTMLElement) => {\n\t\t\t\tif (\n\t\t\t\t\t!window.$hsFileUploadCollection.find(\n\t\t\t\t\t\t(elC) => (elC?.element?.el as HTMLElement) === el,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t\tnew HSFileUpload(el);\n\t\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface Window {\n\t\tHSFileUpload: Function;\n\t\t$hsFileUploadCollection: ICollectionItem<HSFileUpload>[];\n\t}\n}\n\nwindow.addEventListener('load', () => {\n\tif (\n\t\tdocument.querySelectorAll(\n\t\t\t'[data-hs-file-upload]:not(.--prevent-on-load-init)',\n\t\t).length\n\t) {\n\t\tif (typeof _ === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSFileUpload: Lodash is not available, please add it to the page.',\n\t\t\t);\n\t\tif (typeof Dropzone === 'undefined')\n\t\t\tconsole.error(\n\t\t\t\t'HSFileUpload: Dropzone is not available, please add it to the page.',\n\t\t\t);\n\t}\n\n\tif (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined') {\n\t\tHSFileUpload.autoInit();\n\t}\n\n\t// Uncomment for debug\n\t// console.log('File upload collection:', window.$hsFileUploadCollection);\n});\n\nif (typeof window !== 'undefined') {\n\twindow.HSFileUpload = HSFileUpload;\n}\n\nexport default HSFileUpload;\n","import { ISpaCollectionItem } from './interfaces';\n\nimport HSCopyMarkup from '../plugins/copy-markup';\nimport HSAccordion from '../plugins/accordion';\nimport HSCarousel from '../plugins/carousel';\nimport HSCollapse from '../plugins/collapse';\nimport HSComboBox from '../plugins/combobox';\nimport HSDataTable from '../plugins/datatable';\nimport HSDropdown from '../plugins/dropdown';\nimport HSFileUpload from '../plugins/file-upload';\nimport HSInputNumber from '../plugins/input-number';\nimport HSOverlay from '../plugins/overlay';\nimport HSPinInput from '../plugins/pin-input';\nimport HSRemoveElement from '../plugins/remove-element';\nimport HSScrollspy from '../plugins/scrollspy';\nimport HSSelect from '../plugins/select';\nimport HSStepper from '../plugins/stepper';\nimport HSStrongPassword from '../plugins/strong-password';\nimport HSTabs from '../plugins/tabs';\nimport HSThemeSwitch from '../plugins/theme-switch';\nimport HSToggleCount from '../plugins/toggle-count';\nimport HSTogglePassword from '../plugins/toggle-password';\nimport HSTooltip from '../plugins/tooltip';\n\nexport const COLLECTIONS: ISpaCollectionItem[] = [\n\t{\n\t\tkey: 'copy-markup',\n\t\tfn: HSCopyMarkup,\n\t\tcollection: '$hsCopyMarkupCollection',\n\t},\n\t{ key: 'accordion', fn: HSAccordion, collection: '$hsAccordionCollection' },\n\t{ key: 'carousel', fn: HSCarousel, collection: '$hsCarouselCollection' },\n\t{ key: 'collapse', fn: HSCollapse, collection: '$hsCollapseCollection' },\n\t{ key: 'combobox', fn: HSComboBox, collection: '$hsComboBoxCollection' },\n\t{ key: 'datatable', fn: HSDataTable, collection: '$hsDataTableCollection' },\n\t{ key: 'dropdown', fn: HSDropdown, collection: '$hsDropdownCollection' },\n\t{\n\t\tkey: 'file-upload',\n\t\tfn: HSFileUpload,\n\t\tcollection: '$hsFileUploadCollection',\n\t},\n\t{\n\t\tkey: 'input-number',\n\t\tfn: HSInputNumber,\n\t\tcollection: '$hsInputNumberCollection',\n\t},\n\t{ key: 'overlay', fn: HSOverlay, collection: '$hsOverlayCollection' },\n\t{ key: 'pin-input', fn: HSPinInput, collection: '$hsPinInputCollection' },\n\t{\n\t\tkey: 'remove-element',\n\t\tfn: HSRemoveElement,\n\t\tcollection: '$hsRemoveElementCollection',\n\t},\n\t{ key: 'scrollspy', fn: HSScrollspy, collection: '$hsScrollspyCollection' },\n\t{ key: 'select', fn: HSSelect, collection: '$hsSelectCollection' },\n\t{ key: 'stepper', fn: HSStepper, collection: '$hsStepperCollection' },\n\t{\n\t\tkey: 'strong-password',\n\t\tfn: HSStrongPassword,\n\t\tcollection: '$hsStrongPasswordCollection',\n\t},\n\t{ key: 'tabs', fn: HSTabs, collection: '$hsTabsCollection' },\n\t{\n\t\tkey: 'theme-switch',\n\t\tfn: HSThemeSwitch,\n\t\tcollection: '$hsThemeSwitchCollection',\n\t},\n\t{\n\t\tkey: 'toggle-count',\n\t\tfn: HSToggleCount,\n\t\tcollection: '$hsToggleCountCollection',\n\t},\n\t{\n\t\tkey: 'toggle-password',\n\t\tfn: HSTogglePassword,\n\t\tcollection: '$hsTogglePasswordCollection',\n\t},\n\t{ key: 'tooltip', fn: HSTooltip, collection: '$hsTooltipCollection' },\n];\n","/*\n * HSStaticMethods\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\n\nimport { getClassProperty, afterTransition } from '../utils';\nimport { COLLECTIONS } from '../spa';\nimport { IStaticMethods } from './interfaces';\nimport { ICollectionItem } from '../interfaces';\nimport type HSCopyMarkup from '../plugins/copy-markup';\nimport type HSAccordion from '../plugins/accordion';\nimport type HSCarousel from '../plugins/carousel';\nimport type HSCollapse from '../plugins/collapse';\nimport type HSComboBox from '../plugins/combobox';\nimport type HSDataTable from '../plugins/datatable';\nimport type HSDropdown from '../plugins/dropdown';\nimport type HSFileUpload from '../plugins/file-upload';\nimport type HSInputNumber from '../plugins/input-number';\nimport type HSOverlay from '../plugins/overlay';\nimport type HSPinInput from '../plugins/pin-input';\nimport type HSRemoveElement from '../plugins/remove-element';\nimport type HSScrollspy from '../plugins/scrollspy';\nimport type HSSelect from '../plugins/select';\nimport type HSStepper from '../plugins/stepper';\nimport type HSStrongPassword from '../plugins/strong-password';\nimport type HSTabs from '../plugins/tabs';\nimport type HSThemeSwitch from '../plugins/theme-switch';\nimport type HSToggleCount from '../plugins/toggle-count';\nimport type HSTogglePassword from '../plugins/toggle-password';\nimport type HSTooltip from '../plugins/tooltip';\n\ndeclare global {\n\tinterface Window {\n\t\tHSStaticMethods: IStaticMethods;\n\t\t$hsCopyMarkupCollection: ICollectionItem<HSCopyMarkup>[];\n\t\t$hsAccordionCollection: ICollectionItem<HSAccordion>[];\n\t\t$hsCarouselCollection: ICollectionItem<HSCarousel>[];\n\t\t$hsCollapseCollection: ICollectionItem<HSCollapse>[];\n\t\t$hsComboBoxCollection: ICollectionItem<HSComboBox>[];\n\t\t$hsDataTableCollection: ICollectionItem<HSDataTable>[];\n\t\t$hsDropdownCollection: ICollectionItem<HSDropdown>[];\n\t\t$hsFileUploadCollection: ICollectionItem<HSFileUpload>[];\n\t\t$hsInputNumberCollection: { id: number; element: HSInputNumber }[];\n\t\t$hsOverlayCollection: ICollectionItem<HSOverlay>[];\n\t\t$hsPinInputCollection: ICollectionItem<HSPinInput>[];\n\t\t$hsRemoveElementCollection: ICollectionItem<HSRemoveElement>[];\n\t\t$hsScrollspyCollection: ICollectionItem<HSScrollspy>[];\n\t\t$hsSelectCollection: ICollectionItem<HSSelect>[];\n\t\t$hsStepperCollection: ICollectionItem<HSStepper>[];\n\t\t$hsStrongPasswordCollection: ICollectionItem<HSStrongPassword>[];\n\t\t$hsTabsCollection: ICollectionItem<HSTabs>[];\n\t\t$hsThemeSwitchCollection: ICollectionItem<HSThemeSwitch>[];\n\t\t$hsToggleCountCollection: ICollectionItem<HSToggleCount>[];\n\t\t$hsTogglePasswordCollection: ICollectionItem<HSTogglePassword>[];\n\t\t$hsTooltipCollection: ICollectionItem<HSTooltip>[];\n\t}\n}\n\nconst HSStaticMethods: IStaticMethods = {\n\tgetClassProperty,\n\tafterTransition,\n\tautoInit(collection: string | string[] = 'all') {\n\t\tif (collection === 'all') {\n\t\t\tCOLLECTIONS.forEach(({ fn }) => {\n\t\t\t\tfn?.autoInit();\n\t\t\t});\n\t\t} else {\n\t\t\tCOLLECTIONS.forEach(({ key, fn }) => {\n\t\t\t\tif (collection.includes(key)) fn?.autoInit();\n\t\t\t});\n\t\t}\n\t},\n\tcleanCollection(name: string | string[] = 'all') {\n\t\tif (name === 'all') {\n\t\t\tCOLLECTIONS.forEach(({ collection }) => {\n\t\t\t\tif ((window as any)[collection] instanceof Array) {\n\t\t\t\t\t(window as any)[collection] = [];\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tCOLLECTIONS.forEach(({ key, collection }) => {\n\t\t\t\tif (\n\t\t\t\t\tname.includes(key) &&\n\t\t\t\t\t(window as any)[collection] instanceof Array\n\t\t\t\t) {\n\t\t\t\t\t(window as any)[collection] = [];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n};\n\nif (typeof window !== 'undefined') {\n\twindow.HSStaticMethods = HSStaticMethods;\n}\n\nexport default HSStaticMethods;\n","declare var _: any;\ndeclare var DataTable: any;\ndeclare var Dropzone: any;\n\nlet HSDataTableModule;\nlet HSFileUploadModule;\n\nexport { default as HSCopyMarkup } from './plugins/copy-markup';\nexport { default as HSAccordion } from './plugins/accordion';\nexport { default as HSCarousel } from './plugins/carousel';\nexport { default as HSCollapse } from './plugins/collapse';\nexport { default as HSComboBox } from './plugins/combobox';\nexport { default as HSDropdown } from './plugins/dropdown';\nexport { default as HSInputNumber } from './plugins/input-number';\nexport { default as HSOverlay } from './plugins/overlay';\nexport { default as HSPinInput } from './plugins/pin-input';\nexport { default as HSRemoveElement } from './plugins/remove-element';\nexport { default as HSScrollspy } from './plugins/scrollspy';\nexport { default as HSSelect } from './plugins/select';\nexport { default as HSStepper } from './plugins/stepper';\nexport { default as HSStrongPassword } from './plugins/strong-password';\nexport { default as HSTabs } from './plugins/tabs';\nexport { default as HSThemeSwitch } from './plugins/theme-switch';\nexport { default as HSToggleCount } from './plugins/toggle-count';\nexport { default as HSTogglePassword } from './plugins/toggle-password';\nexport { default as HSTooltip } from './plugins/tooltip';\nexport { default as HSStaticMethods } from './static';\n\nif (typeof DataTable !== 'undefined' && typeof jQuery !== 'undefined')\n\tHSDataTableModule = require('./plugins/datatable').default;\nelse HSDataTableModule = null;\nexport { HSDataTableModule as HSDataTable };\n\nif (typeof _ !== 'undefined' && typeof Dropzone !== 'undefined')\n\tHSFileUploadModule = require('./plugins/file-upload').default;\nelse HSFileUploadModule = null;\nexport { HSFileUploadModule as HSFileUpload };","!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)=>{\n/*\n * HSBasePlugin\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\nObject.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){\n/*\n * HSSelect\n * @version: 2.4.1\n * @author: Preline Labs Ltd.\n * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)\n * Copyright 2024 Preline Labs Ltd.\n */\nvar 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<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},o.apply(this,arguments)},l=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,s=0,o=e.length;s<o;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0});var a=i(292),d=r(i(961)),c=i(223),u=function(t){function e(e,i){var n,s,l=t.call(this,e,i)||this,r=e.getAttribute(\"data-hs-select\"),a=r?JSON.parse(r):{},d=o(o({},a),i),c={items:\", \",betweenItemsAndCounter:\"and\"};return l.value=(null==d?void 0:d.value)||l.el.value||null,l.placeholder=(null==d?void 0:d.placeholder)||\"Select...\",l.hasSearch=(null==d?void 0:d.hasSearch)||!1,l.preventSearchFocus=(null==d?void 0:d.preventSearchFocus)||!1,l.mode=(null==d?void 0:d.mode)||\"default\",l.viewport=void 0!==(null==d?void 0:d.viewport)?document.querySelector(null==d?void 0:d.viewport):null,l.isOpened=Boolean(null==d?void 0:d.isOpened)||!1,l.isMultiple=l.el.hasAttribute(\"multiple\")||!1,l.isDisabled=l.el.hasAttribute(\"disabled\")||!1,l.selectedItems=[],l.wrapperClasses=(null==d?void 0:d.wrapperClasses)||null,l.toggleTag=(null==d?void 0:d.toggleTag)||null,l.toggleClasses=(null==d?void 0:d.toggleClasses)||null,l.toggleSeparators=null!==(n=o(o({},c),null==d?void 0:d.toggleSeparators))&&void 0!==n?n:c,l.toggleCountText=(null==d?void 0:d.toggleCountText)||null,l.toggleCountTextMinItems=(null==d?void 0:d.toggleCountTextMinItems)||1,l.toggleCountTextMode=(null==d?void 0:d.toggleCountTextMode)||\"countAfterLimit\",l.tagsItemTemplate=(null==d?void 0:d.tagsItemTemplate)||null,l.tagsItemClasses=(null==d?void 0:d.tagsItemClasses)||null,l.tagsInputClasses=(null==d?void 0:d.tagsInputClasses)||null,l.dropdownTag=(null==d?void 0:d.dropdownTag)||null,l.dropdownClasses=(null==d?void 0:d.dropdownClasses)||null,l.dropdownDirectionClasses=(null==d?void 0:d.dropdownDirectionClasses)||null,l.dropdownSpace=(null==d?void 0:d.dropdownSpace)||10,l.searchWrapperTemplate=(null==d?void 0:d.searchWrapperTemplate)||null,l.searchWrapperClasses=(null==d?void 0:d.searchWrapperClasses)||\"bg-white p-2 sticky top-0\",l.searchClasses=(null==d?void 0:d.searchClasses)||\"block w-[calc(100%-2rem)] text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 py-2 px-3 my-2 mx-4\",l.searchPlaceholder=(null==d?void 0:d.searchPlaceholder)||\"Search...\",l.searchNoResultText=(null==d?void 0:d.searchNoResultText)||\"No results found\",l.searchNoResultClasses=(null==d?void 0:d.searchNoResultClasses)||\"px-4 text-sm text-gray-800 dark:text-neutral-200\",l.optionTemplate=(null==d?void 0:d.optionTemplate)||null,l.optionTag=(null==d?void 0:d.optionTag)||null,l.optionClasses=(null==d?void 0:d.optionClasses)||null,l.extraMarkup=(null==d?void 0:d.extraMarkup)||null,l.descriptionClasses=(null==d?void 0:d.descriptionClasses)||null,l.iconClasses=(null==d?void 0:d.iconClasses)||null,l.isAddTagOnEnter=null===(s=null==d?void 0:d.isAddTagOnEnter)||void 0===s||s,l.animationInProcess=!1,l.selectOptions=[],l.tagsInputHelper=null,l.init(),l}return s(e,t),e.prototype.setValue=function(t){this.value=t,this.clearSelections(),Array.isArray(t)?(this.toggleTextWrapper.innerHTML=this.value.length?this.stringFromValue():this.placeholder,this.unselectMultipleItems(),this.selectMultipleItems()):(this.setToggleTitle(),this.toggle.querySelector(\"[data-icon]\")&&this.setToggleIcon(),this.toggle.querySelector(\"[data-title]\")&&this.setToggleTitle(),this.selectSingleItem())},e.prototype.init=function(){this.createCollection(window.$hsSelectCollection,this),this.build()},e.prototype.build=function(){var t=this;if(this.el.style.display=\"none\",this.el.children&&Array.from(this.el.children).filter((function(t){return t.value&&\"\"!==t.value})).forEach((function(e){var i=e.getAttribute(\"data-hs-select-option\");t.selectOptions=l(l([],t.selectOptions,!0),[{title:e.textContent,val:e.value,disabled:e.disabled,options:\"undefined\"!==i?JSON.parse(i):null}],!1)})),this.isMultiple){var e=Array.from(this.el.children).filter((function(t){return t.selected}));if(e){var i=[];e.forEach((function(t){i.push(t.value)})),this.value=i}}this.buildWrapper(),\"tags\"===this.mode?this.buildTags():this.buildToggle(),this.buildDropdown(),this.extraMarkup&&this.buildExtraMarkup()},e.prototype.buildWrapper=function(){var t=this;this.wrapper=document.createElement(\"div\"),this.wrapper.classList.add(\"hs-select\",\"relative\"),\"tags\"===this.mode&&this.wrapper.addEventListener(\"click\",(function(e){e.target.closest(\"[data-hs-select-dropdown]\")||e.target.closest(\"[data-tag-value]\")||t.tagsInput.focus()})),this.wrapperClasses&&(0,a.classToClassList)(this.wrapperClasses,this.wrapper),this.el.before(this.wrapper),this.wrapper.append(this.el)},e.prototype.buildExtraMarkup=function(){var t=this,e=function(e){t.wrapper.append((0,a.htmlToElement)(e))};Array.isArray(this.extraMarkup)?this.extraMarkup.forEach((function(t){return e(t)})):e(this.extraMarkup)},e.prototype.buildToggle=function(){var t,e,i,n,s=this;this.toggleTextWrapper=document.createElement(\"span\"),this.toggleTextWrapper.classList.add(\"truncate\"),this.toggle=(0,a.htmlToElement)(this.toggleTag||\"<div></div>\"),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||\"<div></div>\"),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||\"<div></div>\"),this.searchWrapperClasses&&(0,a.classToClassList)(this.searchWrapperClasses,this.searchWrapper),t=this.searchWrapper.querySelector(\"[data-input]\"),this.search=(0,a.htmlToElement)('<input type=\"text\" />'),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||\"<div></div>\");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)(\"<div></div>\");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)(\"<div></div>\");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)(\"<option></option>\");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)(\"<span></span>\"),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<n.length&&o++,n[o].focus(),s&&s.classList.remove(\"hs-select-option-highlighted\"),n[o].classList.add(\"hs-select-option-highlighted\")}},e.onTab=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}));if(!(o+1<n.length))return s&&s.classList.remove(\"hs-select-option-highlighted\"),e.element.close(),e.element.toggle.focus(),!1;n[++o].focus(),s&&s.classList.remove(\"hs-select-option-highlighted\"),n[o].classList.add(\"hs-select-option-highlighted\")}},e.onStartEnd=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)\")):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;o<arguments.length;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){t.apply(i,s)}),e)}};e.dispatch=function(t,e,i){void 0===i&&(i=null);var n=new CustomEvent(t,{detail:{payload:i},bubbles:!0,cancelable:!0,composed:!1});e.dispatchEvent(n)};e.afterTransition=function(t,e){var i=function(){e(),t.removeEventListener(\"transitionend\",i,!0)},n=window.getComputedStyle(t),s=n.getPropertyValue(\"transition-duration\");\"none\"!==n.getPropertyValue(\"transition-property\")&&parseFloat(s)>0?t.addEventListener(\"transitionend\",i,!0):e()};e.htmlToElement=function(t){var e=document.createElement(\"template\");return t=t.trim(),e.innerHTML=t,e.content.firstChild};e.classToClassList=function(t,e,i,n){void 0===i&&(i=\" \"),void 0===n&&(n=\"add\"),t.split(i).forEach((function(t){return\"add\"===n?e.classList.add(t):e.classList.remove(t)}))};e.menuSearchHistory={historyIndex:-1,addHistory:function(t){this.historyIndex=t},existsInHistory:function(t){return t>this.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})()));","export default class FormDataWithToken extends FormData {\r\n constructor() {\r\n super()\r\n\r\n const rvfEl = document.querySelector<HTMLInputElement>('[name=__RequestVerificationToken]')\r\n\r\n if (rvfEl) {\r\n this.append('__RequestVerificationToken', rvfEl.value)\r\n }\r\n }\r\n}","export const currencyFormatter = new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 0, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)\r\n maximumFractionDigits: 2, // (causes 2500.99 to be printed as $2,501)\r\n})\r\n\r\nexport const numberformatter = new Intl.NumberFormat('en-US', {\r\n minimumFractionDigits: 0, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)\r\n maximumFractionDigits: 0, // (causes 2500.99 to be printed as $2,501)\r\n})\r\n\r\nexport const rateformatter = new Intl.NumberFormat('en-US', {\r\n minimumFractionDigits: 2, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)\r\n maximumFractionDigits: 2, // (causes 2500.99 to be printed as $2,501)\r\n})","import { currencyFormatter, rateformatter } from './formatters';\r\n\r\ndeclare global {\r\n interface HTMLElement {\r\n readonly SearchRates: SearchRates | undefined;\r\n }\r\n\r\n}\r\n\r\nif (!HTMLElement.prototype.SearchRates) {\r\n Object.defineProperty(HTMLElement.prototype, 'SearchRates', {\r\n get: function () {\r\n const modalId = this.getAttribute('id');\r\n return SearchRates.instances.get(modalId || '');\r\n }\r\n });\r\n}\r\n\r\nexport default class SearchRates {\r\n static instances = new Map<string, SearchRates>();\r\n\r\n id: string\r\n formEl: HTMLFormElement\r\n termEls: NodeListOf<HTMLInputElement>\r\n rateEls: NodeListOf<HTMLInputElement>\r\n creditRatingEls: NodeListOf<HTMLInputElement>\r\n cashDownEl: HTMLInputElement | null\r\n\r\n disabledButtonEl: HTMLButtonElement | null\r\n activeButtonEl: HTMLButtonElement | null\r\n monthlyPaymentLabelEls: NodeListOf<HTMLElement> | null\r\n financeAmountLabelEl: HTMLElement | null\r\n rateLabelEls: NodeListOf<HTMLElement> | null\r\n errorLabelEl: HTMLElement | null\r\n\r\n private constructor(triggerElement: HTMLElement) {\r\n let id = triggerElement.getAttribute('id');\r\n if (!id) {\r\n triggerElement.setAttribute('id', 'search-rates-0')\r\n this.id = 'search-rates-0'\r\n }\r\n else {\r\n this.id = id\r\n }\r\n\r\n this.formEl = triggerElement as HTMLFormElement;\r\n this.termEls = this.formEl.querySelectorAll('[search-rates-term]')\r\n this.rateEls = this.formEl.querySelectorAll('[search-rates-rate]')\r\n this.creditRatingEls = this.formEl.querySelectorAll('[search-rates-credit]')\r\n this.cashDownEl = this.formEl.querySelector('[search-rates-cashdown]')\r\n\r\n this.disabledButtonEl = this.formEl.querySelector('[search-rates-disabled-button]')\r\n this.activeButtonEl = this.formEl.querySelector('[search-rates-active-button]')\r\n this.monthlyPaymentLabelEls = document.querySelectorAll('[search-rates-monthlypayment-label]')\r\n this.financeAmountLabelEl = this.formEl.querySelector('[search-rates-financeamount-label]')\r\n this.rateLabelEls = this.formEl.querySelectorAll('[search-rates-rate-label]')\r\n this.errorLabelEl = this.formEl.querySelector('[search-rates-error-label]')\r\n\r\n\r\n this.termEls?.forEach(trigger => {\r\n trigger.addEventListener('click', () => this.termChanged())\r\n })\r\n\r\n this.rateEls?.forEach(trigger => {\r\n trigger.addEventListener('change', () => this.rateChanged())\r\n })\r\n\r\n this.creditRatingEls?.forEach(trigger => {\r\n trigger.addEventListener('click', () => this.creditChanged())\r\n })\r\n\r\n this.cashDownEl?.addEventListener('change', () => this.cashDownChanged())\r\n\r\n this.search()\r\n }\r\n\r\n public async termChanged() {\r\n this.setRates('')\r\n await this.search()\r\n }\r\n\r\n public async rateChanged() {\r\n await this.search()\r\n }\r\n\r\n public async creditChanged() {\r\n this.setRates('')\r\n await this.search()\r\n }\r\n\r\n public async cashDownChanged() {\r\n await this.search()\r\n }\r\n\r\n public setRates(val: string) {\r\n this.rateLabelEls?.forEach(item => {\r\n if (item.tagName == 'INPUT') (item as HTMLInputElement).value = val\r\n else item.innerHTML = val\r\n })\r\n }\r\n\r\n public async search() {\r\n const formData = new FormData(this.formEl);\r\n console.log(formData)\r\n\r\n if (formData.has('Rate')) {\r\n let val = formData.get('Rate')?.toString().replaceAll('%', '')\r\n if (val) formData.set('Rate', val)\r\n }\r\n\r\n if (formData.get(\"__RequestVerificationToken\") == null) {\r\n let token = document.querySelector('[name=\"__RequestVerificationToken\"]') as HTMLFormElement\r\n formData.append(\"__RequestVerificationToken\", token.value)\r\n }\r\n\r\n const response = await fetch('/details/citystate/vehicle?handler=Search', { method: 'POST', body: formData })\r\n const data = await response.json()\r\n\r\n if (data.isError == true) {\r\n if (this.disabledButtonEl) this.disabledButtonEl.style.display = 'none'\r\n if (this.activeButtonEl) this.activeButtonEl.style.display = ''\r\n if (this.errorLabelEl) this.errorLabelEl.style.display = ''\r\n if (this.errorLabelEl) this.errorLabelEl.innerHTML = data.failedReasons\r\n\r\n if (this.financeAmountLabelEl) this.financeAmountLabelEl.innerHTML = ''\r\n if (this.monthlyPaymentLabelEls) this.monthlyPaymentLabelEls.forEach(item => item.innerHTML = '')\r\n this.setRates('')\r\n }\r\n else {\r\n if (this.errorLabelEl) this.errorLabelEl.style.display = 'none'\r\n if (this.financeAmountLabelEl) this.financeAmountLabelEl.innerHTML = currencyFormatter.format(data.financeAmount)\r\n if (this.monthlyPaymentLabelEls) this.monthlyPaymentLabelEls.forEach(item => item.innerHTML = currencyFormatter.format(data.monthlyPayment))\r\n if (this.rateLabelEls) {\r\n let val = rateformatter.format(data.rate) + ' %'\r\n this.setRates(val)\r\n }\r\n if (this.disabledButtonEl) this.disabledButtonEl.style.display = 'none'\r\n if (this.activeButtonEl) this.activeButtonEl.style.display = ''\r\n\r\n if (data.failedReasons && this.errorLabelEl) {\r\n this.errorLabelEl.style.display = ''\r\n this.errorLabelEl.innerHTML = data.failedReasons.join(\"<br>\");\r\n }\r\n\r\n //if (data.tradeEquity > 0 || data.tradeEquity < 0) {\r\n // $(\"#trade-equity-section\").show()\r\n // $(\"#trade-equity\").html(formatter.format(data.tradeEquity))\r\n\r\n // if (data.tradeEquity < 0) {\r\n // $(\"#trade-equity\").css(\"color\", \"rgb(255, 68, 88)\")\r\n // }\r\n // else if (data.tradeEquity > 0) {\r\n // $(\"#trade-equity\").css(\"color\", \"#6dbd44\")\r\n // }\r\n //}\r\n //else {\r\n // $(\"#trade-equity-section\").hide()\r\n // $(\"#trade-equity\").html(\"\")\r\n //}\r\n\r\n // Update Product Costs\r\n //$.each(data.dealershipProducts, function (i, obj) {\r\n // $(\"#ProductCost-\" + obj.id).html(formatter.format(obj.monthlyPayment))\r\n //})\r\n\r\n this.updateTermSliders(data.maxTerm)\r\n }\r\n }\r\n\r\n private updateTermSliders(maxTerm: number) {\r\n const termElsArray = Array.from(this.termEls); // Convert NodeList to Array\r\n const checkedCheckbox = termElsArray.find(checkbox => checkbox.checked);\r\n\r\n if (checkedCheckbox) {\r\n let currentTerm = parseInt(checkedCheckbox.value);\r\n\r\n this.toggleTerm(84, maxTerm);\r\n this.toggleTerm(72, maxTerm);\r\n this.toggleTerm(60, maxTerm);\r\n\r\n if (currentTerm > maxTerm) {\r\n let checkboxToCheck = null;\r\n\r\n if (maxTerm >= 36 && maxTerm <= 47) {\r\n checkboxToCheck = termElsArray.find(el => el.value === \"36\");\r\n } else if (maxTerm >= 48 && maxTerm <= 59) {\r\n checkboxToCheck = termElsArray.find(el => el.value === \"48\");\r\n } else if (maxTerm >= 60 && maxTerm <= 71) {\r\n checkboxToCheck = termElsArray.find(el => el.value === \"60\");\r\n } else if (maxTerm >= 72 && maxTerm <= 83) {\r\n checkboxToCheck = termElsArray.find(el => el.value === \"72\");\r\n } else if (maxTerm >= 84) {\r\n checkboxToCheck = termElsArray.find(el => el.value === \"84\");\r\n }\r\n\r\n if (checkboxToCheck) {\r\n checkboxToCheck.checked = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private toggleTerm(value:number, maxTerm:number) {\r\n const termElsArray = Array.from(this.termEls); // Convert NodeList to Array\r\n\r\n const checkbox = termElsArray.find(el => el.value === value.toString()); // Find checkbox by value\r\n if (checkbox) {\r\n if (maxTerm < value) {\r\n checkbox.disabled = true;\r\n checkbox.closest(\".radio-btn-group\")?.classList.add(\"bg-gray-2\");\r\n } else {\r\n checkbox.disabled = false;\r\n checkbox.closest(\".radio-btn-group\")?.classList.remove(\"bg-gray-2\");\r\n }\r\n }\r\n }\r\n\r\n static getInstance(triggerElement: HTMLElement): SearchRates {\r\n const id = triggerElement.getAttribute('id') ?? '';\r\n let instance = SearchRates.instances.get(id);\r\n\r\n if (!instance) {\r\n instance = new SearchRates(triggerElement);\r\n SearchRates.instances.set(id, instance);\r\n }\r\n\r\n return instance;\r\n }\r\n}\r\n\r\n// Instantiation based on the HTML element with the `data-modal-trigger` attribute\r\ndocument.querySelectorAll('[search-rates]').forEach(triggerElement => {\r\n SearchRates.getInstance(triggerElement as HTMLElement);\r\n});","export class SimpleValidate {\r\n static instances = new Map<string, SimpleValidate>();\r\n\r\n el: HTMLFormElement;\r\n invalidElements: HTMLInputElement[] = [];\r\n \r\n private constructor(triggerElement: HTMLFormElement) {\r\n this.el = triggerElement;\r\n\r\n this.el.querySelectorAll<HTMLInputElement>('input, select, textarea').forEach(item => {\r\n item.addEventListener('blur', () => this.validateElement(item, false))\r\n })\r\n\r\n this.el.querySelectorAll<HTMLElement>('[simple-validate-check]').forEach(item => {\r\n item.addEventListener('click', (event) => {\r\n if (!this.validate()) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n })\r\n })\r\n }\r\n\r\n static getInstance(triggerElement: HTMLFormElement): SimpleValidate {\r\n const modalId = triggerElement.getAttribute('id') ?? 'simple-validate-form-1';\r\n let instance = SimpleValidate.instances.get(modalId);\r\n\r\n if (!instance) {\r\n instance = new SimpleValidate(triggerElement);\r\n SimpleValidate.instances.set(modalId, instance);\r\n }\r\n\r\n return instance;\r\n }\r\n\r\n validate() {\r\n let isValid: boolean = true\r\n let firstError: HTMLElement | null = null\r\n\r\n this.el.querySelectorAll<HTMLInputElement>('input, select, textarea').forEach(f => {\r\n if (f.disabled != true && this.validateElement(f, firstError == null) == false) {\r\n firstError = f\r\n isValid = false\r\n }\r\n })\r\n \r\n return isValid\r\n }\r\n\r\n validateElement(itemToValidate: HTMLInputElement, scrollToError: boolean) {\r\n if (this.checkVisibility(itemToValidate) == true) {\r\n \r\n if (itemToValidate.checkValidity() == false) {\r\n itemToValidate.classList.add('error')\r\n\r\n if (scrollToError) {\r\n itemToValidate.scrollIntoView({ behavior: 'smooth', block: 'end', inline: 'nearest' })\r\n }\r\n\r\n this.invalidElements.push(itemToValidate)\r\n\r\n return false\r\n }\r\n else {\r\n itemToValidate.classList.remove('error')\r\n }\r\n }\r\n\r\n return true\r\n }\r\n\r\n checkVisibility(el: HTMLInputElement) {\r\n if (el.checkVisibility)\r\n return el.checkVisibility()\r\n else {\r\n // Traverse up the DOM\r\n let newEl: HTMLElement | null = el\r\n while (newEl) {\r\n // Get computed style of the current element\r\n const style = getComputedStyle(newEl)\r\n \r\n // Check for visibility conditions\r\n if (style.display === 'none' || style.visibility === 'hidden' || parseFloat(style.opacity) === 0) {\r\n return false\r\n }\r\n\r\n // Move to the parent element\r\n newEl = newEl.parentElement as HTMLElement | null\r\n }\r\n\r\n return true\r\n }\r\n }\r\n}\r\n\r\n// Instantiation based on the HTML element with the `data-modal-trigger` attribute\r\ndocument.querySelectorAll('[simple-validate]').forEach(triggerElement => {\r\n SimpleValidate.getInstance(triggerElement as HTMLFormElement);\r\n})\r\n","import FormDataWithToken from \"./FormDataWithToken\"\r\nimport SearchRates from \"./SearchRates\"\r\nimport { SimpleValidate } from \"./SimpleValidate\"\r\nimport { currencyFormatter } from \"./formatters\"\r\n\r\nconst tes = document.getElementById('trade-equity-strong') as HTMLElement\r\n\r\ndocument.querySelector('.js-set-trade')?.addEventListener('click', async () => {\r\n const tf = document.getElementById('trade-form') as HTMLFormElement\r\n const md = document.getElementById('trade-modal')\r\n const tv = document.getElementById('trade-value')\r\n const to = (document.getElementById('trade-owed') as HTMLInputElement)\r\n\r\n if (tf) {\r\n let vf = SimpleValidate.getInstance(tf)\r\n if (vf?.validate() && md) {\r\n if (md) {\r\n md.style.display = 'none'\r\n }\r\n\r\n let tradeValue = parseInt('0' + tv?.innerHTML.replace('$', '').replace(/,/g, ''))\r\n let tradeOwed = parseInt('0' + to?.value.replace('$', '').replace(/,/g, ''))\r\n let newVal = tradeValue - tradeOwed\r\n\r\n if (tes) tes.innerHTML = currencyFormatter.format(newVal)\r\n\r\n document.body.classList.add('has-trade')\r\n\r\n // Save Trade Equity\r\n let parms = new FormData(tf)\r\n await fetch('/details/citystate/vehicle?handler=SaveTradeEquity', { method: 'POST', body: parms })\r\n\r\n // Refresh Search\r\n const frm2 = document.getElementById('frmLoan') as HTMLFormElement\r\n var sr = SearchRates.getInstance(frm2)\r\n if (sr) sr.search()\r\n }\r\n }\r\n})\r\n\r\ndocument.querySelector('.js-remove-trade')?.addEventListener('click', async () => {\r\n if (tes) tes.innerHTML = currencyFormatter.format(0)\r\n\r\n document.body.classList.remove('has-trade')\r\n\r\n // Remove Trade\r\n await fetch('/details/citystate/vehicle?handler=RemoveTrade', { method: 'POST', body: new FormDataWithToken() })\r\n\r\n // Refresh Search\r\n const frm2 = document.getElementById('frmLoan') as HTMLFormElement\r\n var sr = SearchRates.getInstance(frm2)\r\n if (sr) sr.search()\r\n})\r\n\r\nconst itv = document.querySelector('.input-trade-value') as HTMLFormElement\r\nconst taov = document.getElementById('trade-in-amount-owed-in-vehicle') as HTMLFormElement\r\nconst te = document.querySelectorAll('.trade-equity')\r\n\r\ntaov?.addEventListener('change', setTradeEquity)\r\nitv?.addEventListener('change', setTradeEquity)\r\n\r\nfunction setTradeEquity() {\r\n let tradeValue = Number(itv.value.replace(/[^0-9.]/g, ''))\r\n let tradeOwed = Number(taov.value.replace(/[^0-9.]/g, ''))\r\n let tradeEquity = tradeValue - tradeOwed\r\n\r\n document.querySelectorAll('.input-trade-value').forEach(m => (m as HTMLFormElement).value = tradeValue)\r\n document.querySelectorAll('.input-trade-owed').forEach(m => (m as HTMLFormElement).value = tradeOwed)\r\n\r\n if (te) {\r\n te.forEach(m => {\r\n m.innerHTML = currencyFormatter.format(tradeEquity)\r\n\r\n if (tradeEquity >= 0) {\r\n m.classList.add(\"text-green\")\r\n m.classList.remove(\"text-red\")\r\n }\r\n else {\r\n m.classList.remove(\"text-green\")\r\n m.classList.add(\"text-red\")\r\n }\r\n })\r\n }\r\n\r\n document.querySelectorAll('[search-rates]').forEach(triggerElement => {\r\n var sr = SearchRates.getInstance(triggerElement as HTMLElement)\r\n sr.search()\r\n })\r\n}","document.querySelectorAll('.js-nav-trigger').forEach(trigger => {\n trigger.addEventListener('click', event => {\n event.preventDefault();\n\n trigger.classList.toggle('is-active');\n\n document.querySelectorAll('.js-nav').forEach(sib => sib.classList.toggle('is-active'));\n \n document.body.classList.toggle('has-open-nav');\n });\n});\n","/**\r\n * Handle Scroll Spy Nav \r\n */\r\n\r\nwindow.addEventListener('load', handleScroll);\r\nwindow.addEventListener('scroll', handleScroll);\r\nwindow.addEventListener('resize', handleScroll);\r\nconst scrollSpyMainNav = document.querySelectorAll<HTMLElement>('.js-scroll-spy-main-nav');\r\nconst scrollSpySubNav = document.querySelectorAll<HTMLElement>('.js-scroll-spy-sub-nav');\r\nconst navLinks = document.querySelectorAll('.js-scroll-spy-nav a');\r\n\r\nfunction handleScroll() {\r\n if (scrollSpyMainNav && scrollSpyMainNav[0]) {\r\n const windowScroll = window.scrollY;\r\n const scrollSpyMainNavHeight = scrollSpyMainNav[0].offsetHeight;\r\n const stickyNavThreshold = scrollSpyMainNavHeight;\r\n const scrollSpySubNavOffset = scrollSpySubNav[0].getBoundingClientRect().top + window.scrollY;\r\n \r\n if (windowScroll >= scrollSpySubNavOffset) {\r\n scrollSpyMainNav[0].classList.add('is-active');\r\n } else {\r\n scrollSpyMainNav[0].classList.remove('is-active');\r\n }\r\n \r\n navLinks?.forEach(function (navLink) {\r\n const section = document.querySelector<HTMLElement>(navLink.getAttribute('href') ?? '');\r\n\r\n if (section) {\r\n const sectionOffset = section.getBoundingClientRect().top + window.scrollY;\r\n const sectionHeight = section.offsetHeight;\r\n const sectionBottom = sectionHeight + sectionOffset;\r\n\r\n if (windowScroll - 12 < sectionBottom - stickyNavThreshold && windowScroll + 20 >= sectionOffset - stickyNavThreshold) {\r\n navLink.parentElement?.classList.add('is-active');\r\n } else {\r\n navLink.parentElement?.classList.remove('is-active');\r\n }\r\n }\r\n })\r\n }\r\n}\r\n\r\n//addEventListener('click', function (event) {\r\n// let el = event.target as HTMLElement;\r\n\r\n//\tif (el.tagName === 'A' && el.classList.contains('js-scroll-spy-nav')) {\r\n//\t\tevent.preventDefault();\r\n\r\n//\t\tvar topOffset = anchorContent.getBoundingClientRect().top + window.scrollY;\r\n\r\n//\t\t$('html, body').animate({ scrollTop: topOffset - 70 }, 500);\r\n//\t}\r\n//})\r\n","document.querySelectorAll('.js-scroll-to').forEach(button => {\n button.addEventListener('click', event => {\n event.preventDefault();\n const href = button.getAttribute('href') ?? '';\n const anchorContent = document.querySelector(href);\n const anchorContentOffset = (anchorContent?.getBoundingClientRect().top ?? 0) + window.scrollY;\n\n window.scrollTo({\n top: anchorContentOffset,\n behavior: 'smooth'\n });\n });\n});\n","addEventListener(\"click\", function (event) {\r\n let trigger = event.target as HTMLElement;\r\n\r\n if (trigger.closest('.js-show-hide-trigger')) {\r\n event.preventDefault();\r\n\r\n const closestStep = trigger.closest('[data-step]');\r\n const inputs = closestStep?.querySelectorAll<HTMLFormElement>('input[type=\"radio\"], input[type=\"checkbox\"]');\r\n //const search = closestStep?.querySelector<HTMLElement>('.js-search-autocomplete');\r\n\r\n //if (search != null)\r\n // search.value = '';\r\n\r\n if (inputs) {\r\n inputs.forEach(input => {\r\n input.dispatchEvent(new Event('change'));\r\n input.checked = false;\r\n });\r\n }\r\n\r\n const closestContent = trigger.closest<HTMLElement>('.js-show-hide-content');\r\n closestContent?.parentElement?.querySelectorAll('.js-show-hide-content').forEach(sibling => sibling.classList.toggle('is-active'));\r\n }\r\n});","document.querySelectorAll('.js-show-more-trigger').forEach(trigger => {\n trigger.addEventListener('click', event => {\n event.preventDefault();\n const showMoreWrapper = trigger.closest('.js-show-more-wrapper');\n showMoreWrapper?.classList.toggle('is-open');\n });\n});\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n if (target === void 0) {\n target = {};\n }\n if (src === void 0) {\n src = {};\n }\n Object.keys(src).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction classesToTokens(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return classes.trim().split(' ').filter(c => !!c.trim());\n}\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis) {\n if (axis === void 0) {\n axis = 'x';\n }\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend() {\n const to = Object(arguments.length <= 0 ? undefined : arguments[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < arguments.length; i += 1) {\n const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll(_ref) {\n let {\n swiper,\n targetPosition,\n side\n } = _ref;\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector) {\n if (selector === void 0) {\n selector = '';\n }\n return [...element.children].filter(el => el.matches(selector));\n}\nfunction showWarning(text) {\n try {\n console.warn(text);\n return;\n } catch (err) {\n // err\n }\n}\nfunction createElement(tag, classes) {\n if (classes === void 0) {\n classes = [];\n }\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes)));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\nfunction makeElementsArray(el) {\n return (Array.isArray(el) ? el : [el]).filter(e => !!e);\n}\n\nexport { elementParents as a, elementOffset as b, createElement as c, now as d, elementChildren as e, elementOuterSize as f, elementIndex as g, classesToTokens as h, getTranslate as i, elementTransitionEnd as j, isObject as k, getSlideTransformEl as l, makeElementsArray as m, nextTick as n, elementStyle as o, elementNextAll as p, elementPrevAll as q, animateCSSModeScroll as r, setCSSProperty as s, showWarning as t, extend as u, deleteProps as v };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { a as elementParents, o as elementStyle, e as elementChildren, s as setCSSProperty, f as elementOuterSize, p as elementNextAll, q as elementPrevAll, i as getTranslate, r as animateCSSModeScroll, n as nextTick, t as showWarning, c as createElement, d as now, u as extend, g as elementIndex, v as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice(_temp) {\n let {\n userAgent\n } = _temp === void 0 ? {} : _temp;\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides) {\n if (overrides === void 0) {\n overrides = {};\n }\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n const device = getDevice();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent);\n const isSafariBrowser = isSafari();\n const need3dFix = isSafariBrowser || isWebView && device.ios;\n return {\n isSafari: needPerspectiveFix || isSafariBrowser,\n needPerspectiveFix,\n need3dFix,\n isWebView\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize(_ref) {\n let {\n swiper,\n on,\n emit\n } = _ref;\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(_ref2 => {\n let {\n contentBoxSize,\n contentRect,\n target\n } = _ref2;\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const observers = [];\n const window = getWindow();\n const attach = function (target, options) {\n if (options === void 0) {\n options = {};\n }\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler() {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit() {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slides);\n } else if (swiper.grid) {\n swiper.grid.unsetSlides();\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n let slide;\n if (slides[i]) slide = slides[i];\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slides);\n }\n if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[swiper.getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slides[i]) {\n slides[i].style[swiper.getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n swiper.emit('slidesUpdated');\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nfunction updateSlidesProgress(translate) {\n if (translate === void 0) {\n translate = this && this.translate || 0;\n }\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);\n });\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides[i].classList.add(params.slideVisibleClass);\n }\n if (isFullyVisible) {\n slides[i].classList.add(params.slideFullyVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n });\n let activeSlide;\n let prevSlide;\n let nextSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n if (gridEnabled) {\n activeSlide = slides.filter(slideEl => slideEl.column === activeIndex)[0];\n nextSlide = slides.filter(slideEl => slideEl.column === activeIndex + 1)[0];\n prevSlide = slides.filter(slideEl => slideEl.column === activeIndex - 1)[0];\n } else {\n activeSlide = slides[activeIndex];\n }\n }\n if (activeSlide) {\n // Active classes\n activeSlide.classList.add(params.slideActiveClass);\n if (gridEnabled) {\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n } else {\n // Next Slide\n nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n\n // Prev Slide\n prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n }\n }\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl) lazyEl.remove();\n }\n });\n }\n }\n if (lazyEl) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex && !swiper.params.loop) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n return;\n }\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled && params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else if (gridEnabled) {\n const firstSlideInColumn = swiper.slides.filter(slideEl => slideEl.column === activeIndex)[0];\n let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);\n if (Number.isNaN(activeSlideIndex)) {\n activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);\n }\n realIndex = Math.floor(activeSlideIndex / params.grid.rows);\n } else if (swiper.slides[activeIndex]) {\n const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');\n if (slideIndex) {\n realIndex = parseInt(slideIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis) {\n if (axis === void 0) {\n axis = this.isHorizontal() ? 'x' : 'y';\n }\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate, speed, runCallbacks, translateBounds, internal) {\n if (translate === void 0) {\n translate = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (translateBounds === void 0) {\n translateBounds = true;\n }\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit(_ref) {\n let {\n swiper,\n runCallbacks,\n direction,\n step\n } = _ref;\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index, speed, runCallbacks, internal, initial) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial || swiper.destroyed) {\n return false;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // Update Index\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index, speed, runCallbacks, internal) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n let targetSlideIndex;\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n targetSlideIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n targetSlideIndex = swiper.getSlideIndexByData(newIndex);\n }\n const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;\n const {\n centeredSlides\n } = swiper.params;\n let slidesPerView = swiper.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n let needLoopFix = cols - targetSlideIndex < slidesPerView;\n if (centeredSlides) {\n needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);\n }\n if (needLoopFix) {\n const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';\n swiper.loopFix({\n direction,\n slideTo: true,\n activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,\n slideRealIndex: direction === 'next' ? swiper.realIndex : undefined\n });\n }\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n newIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n }\n requestAnimationFrame(() => {\n swiper.slideTo(newIndex, speed, runCallbacks, internal);\n });\n return swiper;\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks, internal, threshold) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (threshold === void 0) {\n threshold = 0.5;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n if (swiper.destroyed) return;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const initSlides = () => {\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n };\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);\n const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;\n const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;\n const addBlankSlides = amountOfSlides => {\n for (let i = 0; i < amountOfSlides; i += 1) {\n const slideEl = swiper.isElement ? createElement('swiper-slide', [params.slideBlankClass]) : createElement('div', [params.slideClass, params.slideBlankClass]);\n swiper.slidesEl.append(slideEl);\n }\n };\n if (shouldFillGroup) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else if (shouldFillGrid) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else {\n initSlides();\n }\n swiper.loopFix({\n slideRealIndex,\n direction: params.centeredSlides ? undefined : 'next'\n });\n}\n\nfunction loopFix(_temp) {\n let {\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n byController,\n byMousewheel\n } = _temp === void 0 ? {} : _temp;\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n const {\n centeredSlides\n } = params;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!params.centeredSlides && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n let slidesPerView = params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;\n let loopedSlides = slidesPerGroup;\n if (loopedSlides % slidesPerGroup !== 0) {\n loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;\n }\n loopedSlides += params.loopAdditionalSlides;\n swiper.loopedSlides = loopedSlides;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n if (slides.length < slidesPerView + loopedSlides) {\n showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');\n } else if (gridEnabled && params.grid.fill === 'row') {\n showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');\n }\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n let activeIndex = swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(slides.filter(el => el.classList.contains(params.slideActiveClass))[0]);\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;\n const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;\n const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);\n // prepend last slides before start\n if (activeColIndexWithShift < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n const colIndexToPrepend = cols - index - 1;\n for (let i = slides.length - 1; i >= 0; i -= 1) {\n if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i);\n }\n // slides.forEach((slide, slideIndex) => {\n // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);\n // });\n } else {\n prependSlidesIndexes.push(cols - index - 1);\n }\n }\n } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {\n slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n slides.forEach((slide, slideIndex) => {\n if (slide.column === index) appendSlidesIndexes.push(slideIndex);\n });\n } else {\n appendSlidesIndexes.push(index);\n }\n }\n }\n swiper.__preventObserver__ = true;\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {\n swiper.slides.forEach((slide, slideIndex) => {\n swiper.grid.updateSlide(slideIndex, slide, swiper.slides);\n });\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n if (setTranslate) {\n const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex + shift, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex - shift, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base) {\n if (base === void 0) {\n base = this;\n }\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction preventEdgeSwipe(swiper, event, startX) {\n const window = getWindow();\n const {\n params\n } = swiper;\n const edgeSwipeDetection = params.edgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n return true;\n }\n return false;\n }\n return true;\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n const data = swiper.touchEventsData;\n if (e.type === 'pointerdown') {\n if (data.pointerId !== null && data.pointerId !== e.pointerId) {\n return;\n }\n data.pointerId = e.pointerId;\n } else if (e.type === 'touchstart' && e.targetTouches.length === 1) {\n data.touchId = e.targetTouches[0].identifier;\n }\n if (e.type === 'touchstart') {\n // don't proceed touch event\n preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);\n return;\n }\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!swiper.wrapperEl.contains(targetEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = e.composedPath ? e.composedPath() : e.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n if (!preventEdgeSwipe(swiper, e, startX)) {\n return;\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (e.type === 'pointermove') {\n if (data.touchId !== null) return; // return from pointer if we use touch\n const id = e.pointerId;\n if (id !== data.pointerId) return;\n }\n let targetTouch;\n if (e.type === 'touchmove') {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n } else {\n targetTouch = e;\n }\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n touches.previousX = touches.currentX;\n touches.previousY = touches.currentY;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n new Date().getTime();\n if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n startTranslate: data.currentTranslate\n });\n data.loopSwapReset = true;\n data.startTranslate = data.currentTranslate;\n return;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetTouch;\n const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';\n if (!isTouchEvent) {\n if (data.touchId !== null) return; // return from pointer if we use touch\n if (e.pointerId !== data.pointerId) return;\n targetTouch = e;\n } else {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n data.pointerId = null;\n data.touchId = null;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (swipeToLast || currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nfunction onDocumentTouchStart() {\n const swiper = this;\n if (swiper.documentTouchHandlerProceeded) return;\n swiper.documentTouchHandlerProceeded = true;\n if (swiper.params.touchReleaseOnEdges) {\n swiper.el.style.touchAction = 'auto';\n }\n}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n document[domMethod]('touchstart', swiper.onDocumentTouchStart, {\n passive: false,\n capture\n });\n el[domMethod]('touchstart', swiper.onTouchStart, {\n passive: false\n });\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('touchmove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('touchend', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('touchcancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base, containerEl) {\n if (base === void 0) {\n base = 'window';\n }\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n swiperElementNodeName: 'SWIPER-CONTAINER',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n eventsPrefix: 'swiper',\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopAddBlankSlides: true,\n loopAdditionalSlides: 0,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-blank',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideFullyVisibleClass: 'swiper-slide-fully-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj) {\n if (obj === void 0) {\n obj = {};\n }\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor() {\n let el;\n let params;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n pointerId: null,\n touchId: null\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getDirectionLabel(property) {\n if (this.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]);\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view, exact) {\n if (view === void 0) {\n view = 'current';\n }\n if (exact === void 0) {\n exact = false;\n }\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += Math.ceil(slides[i].swiperSlideSize);\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate) {\n if (needUpdate === void 0) {\n needUpdate = true;\n }\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance, cleanStyles) {\n if (deleteInstance === void 0) {\n deleteInstance = true;\n }\n if (cleanStyles === void 0) {\n cleanStyles = true;\n }\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n el.removeAttribute('style');\n wrapperEl.removeAttribute('style');\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n swiper.el.swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","import { e as elementChildren, c as createElement } from './utils.mjs';\n\nfunction createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];\n if (!element) {\n element = createElement('div', checkProps[key]);\n element.className = checkProps[key];\n swiper.el.append(element);\n }\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n return params;\n}\n\nexport { createElementIfNotDefined as c };\n","import { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { m as makeElementsArray } from '../shared/utils.mjs';\n\nfunction Navigation(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock',\n navigationDisabledClass: 'swiper-navigation-disabled'\n }\n });\n swiper.navigation = {\n nextEl: null,\n prevEl: null\n };\n function getEl(el) {\n let res;\n if (el && typeof el === 'string' && swiper.isElement) {\n res = swiper.el.querySelector(el);\n if (res) return res;\n }\n if (el) {\n if (typeof el === 'string') res = [...document.querySelectorAll(el)];\n if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {\n res = swiper.el.querySelector(el);\n }\n }\n if (el && !res) return el;\n // if (Array.isArray(res) && res.length === 1) res = res[0];\n return res;\n }\n function toggleEl(el, disabled) {\n const params = swiper.params.navigation;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (subEl) {\n subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' '));\n if (subEl.tagName === 'BUTTON') subEl.disabled = disabled;\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n }\n });\n }\n function update() {\n // Update Navigation Buttons\n const {\n nextEl,\n prevEl\n } = swiper.navigation;\n if (swiper.params.loop) {\n toggleEl(prevEl, false);\n toggleEl(nextEl, false);\n return;\n }\n toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n emit('navigationPrev');\n }\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n emit('navigationNext');\n }\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n let nextEl = getEl(params.nextEl);\n let prevEl = getEl(params.prevEl);\n Object.assign(swiper.navigation, {\n nextEl,\n prevEl\n });\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const initButton = (el, dir) => {\n if (el) {\n el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);\n }\n if (!swiper.enabled && el) {\n el.classList.add(...params.lockClass.split(' '));\n }\n };\n nextEl.forEach(el => initButton(el, 'next'));\n prevEl.forEach(el => initButton(el, 'prev'));\n }\n function destroy() {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const destroyButton = (el, dir) => {\n el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick);\n el.classList.remove(...swiper.params.navigation.disabledClass.split(' '));\n };\n nextEl.forEach(el => destroyButton(el, 'next'));\n prevEl.forEach(el => destroyButton(el, 'prev'));\n }\n on('init', () => {\n if (swiper.params.navigation.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n update();\n }\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n if (swiper.enabled) {\n update();\n return;\n }\n [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.add(swiper.params.navigation.lockClass));\n });\n on('click', (_s, e) => {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const targetEl = e.target;\n if (swiper.params.navigation.hideOnClick && !prevEl.includes(targetEl) && !nextEl.includes(targetEl)) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n if (nextEl.length) {\n isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass);\n } else if (prevEl.length) {\n isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass);\n }\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.toggle(swiper.params.navigation.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' '));\n init();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' '));\n destroy();\n };\n Object.assign(swiper.navigation, {\n enable,\n disable,\n update,\n init,\n destroy\n });\n}\n\nexport { Navigation as default };\n","function classesToSelector(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return `.${classes.trim().replace(/([\\.:!+\\/])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}\n\nexport { classesToSelector as c };\n","import { c as classesToSelector } from '../shared/classes-to-selector.mjs';\nimport { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { m as makeElementsArray, f as elementOuterSize, g as elementIndex, a as elementParents } from '../shared/utils.mjs';\n\nfunction Pagination(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`,\n paginationDisabledClass: `${pfx}-disabled`\n }\n });\n swiper.pagination = {\n el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;\n }\n function setSideBullets(bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n if (!bulletEl) return;\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}`);\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);\n }\n }\n }\n function onBulletClick(e) {\n const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));\n if (!bulletEl) {\n return;\n }\n e.preventDefault();\n const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;\n if (swiper.params.loop) {\n if (swiper.realIndex === index) return;\n swiper.slideToLoop(index);\n } else {\n swiper.slideTo(index);\n }\n }\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n // Current/Total\n let current;\n let previousIndex;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.loop) {\n previousIndex = swiper.previousRealIndex || 0;\n current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n previousIndex = swiper.previousSnapIndex;\n } else {\n previousIndex = swiper.previousIndex || 0;\n current = swiper.activeIndex || 0;\n }\n // Types\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);\n el.forEach(subEl => {\n subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;\n });\n if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {\n dynamicBulletIndex += current - (previousIndex || 0);\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.forEach(bulletEl => {\n const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat();\n bulletEl.classList.remove(...classesToRemove);\n });\n if (el.length > 1) {\n bullets.forEach(bullet => {\n const bulletIndex = elementIndex(bullet);\n if (bulletIndex === current) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n } else if (swiper.isElement) {\n bullet.setAttribute('part', 'bullet');\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n if (bulletIndex === firstIndex) {\n setSideBullets(bullet, 'prev');\n }\n if (bulletIndex === lastIndex) {\n setSideBullets(bullet, 'next');\n }\n }\n });\n } else {\n const bullet = bullets[current];\n if (bullet) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n }\n if (swiper.isElement) {\n bullets.forEach((bulletEl, bulletIndex) => {\n bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');\n });\n }\n if (params.dynamicBullets) {\n const firstDisplayedBullet = bullets[firstIndex];\n const lastDisplayedBullet = bullets[lastIndex];\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n if (bullets[i]) {\n bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n }\n setSideBullets(firstDisplayedBullet, 'prev');\n setSideBullets(lastDisplayedBullet, 'next');\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.forEach(bullet => {\n bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`;\n });\n }\n }\n el.forEach((subEl, subElIndex) => {\n if (params.type === 'fraction') {\n subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => {\n fractionEl.textContent = params.formatFractionCurrent(current + 1);\n });\n subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => {\n totalEl.textContent = params.formatFractionTotal(total);\n });\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => {\n progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;\n progressEl.style.transitionDuration = `${swiper.params.speed}ms`;\n });\n }\n if (params.type === 'custom' && params.renderCustom) {\n subEl.innerHTML = params.renderCustom(swiper, current + 1, total);\n if (subElIndex === 0) emit('paginationRender', subEl);\n } else {\n if (subElIndex === 0) emit('paginationRender', subEl);\n emit('paginationUpdate', subEl);\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n });\n }\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.grid && swiper.params.grid.rows > 1 ? swiper.slides.length / Math.ceil(swiper.params.grid.rows) : swiper.slides.length;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n let paginationHTML = '';\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n // prettier-ignore\n paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part=\"bullet\"' : ''} class=\"${params.bulletClass}\"></${params.bulletElement}>`;\n }\n }\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `<span class=\"${params.currentClass}\"></span>` + ' / ' + `<span class=\"${params.totalClass}\"></span>`;\n }\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = `<span class=\"${params.progressbarFillClass}\"></span>`;\n }\n }\n swiper.pagination.bullets = [];\n el.forEach(subEl => {\n if (params.type !== 'custom') {\n subEl.innerHTML = paginationHTML || '';\n }\n if (params.type === 'bullets') {\n swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));\n }\n });\n if (params.type !== 'custom') {\n emit('paginationRender', el[0]);\n }\n }\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let el;\n if (typeof params.el === 'string' && swiper.isElement) {\n el = swiper.el.querySelector(params.el);\n }\n if (!el && typeof params.el === 'string') {\n el = [...document.querySelectorAll(params.el)];\n }\n if (!el) {\n el = params.el;\n }\n if (!el || el.length === 0) return;\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {\n el = [...swiper.el.querySelectorAll(params.el)];\n // check if it belongs to another nested Swiper\n if (el.length > 1) {\n el = el.filter(subEl => {\n if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;\n return true;\n })[0];\n }\n }\n if (Array.isArray(el) && el.length === 1) el = el[0];\n Object.assign(swiper.pagination, {\n el\n });\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (params.type === 'bullets' && params.clickable) {\n subEl.classList.add(...(params.clickableClass || '').split(' '));\n }\n subEl.classList.add(params.modifierClass + params.type);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.type === 'bullets' && params.dynamicBullets) {\n subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n subEl.classList.add(params.progressbarOppositeClass);\n }\n if (params.clickable) {\n subEl.addEventListener('click', onBulletClick);\n }\n if (!swiper.enabled) {\n subEl.classList.add(params.lockClass);\n }\n });\n }\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.hiddenClass);\n subEl.classList.remove(params.modifierClass + params.type);\n subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.clickable) {\n subEl.classList.remove(...(params.clickableClass || '').split(' '));\n subEl.removeEventListener('click', onBulletClick);\n }\n });\n }\n if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' ')));\n }\n on('changeDirection', () => {\n if (!swiper.pagination || !swiper.pagination.el) return;\n const params = swiper.params.pagination;\n let {\n el\n } = swiper.pagination;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.horizontalClass, params.verticalClass);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n });\n });\n on('init', () => {\n if (swiper.params.pagination.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n render();\n update();\n }\n });\n on('activeIndexChange', () => {\n if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n update();\n });\n on('snapGridLengthChange', () => {\n render();\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass));\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const el = makeElementsArray(swiper.pagination.el);\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));\n }\n init();\n render();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));\n }\n destroy();\n };\n Object.assign(swiper.pagination, {\n enable,\n disable,\n render,\n update,\n init,\n destroy\n });\n}\n\nexport { Pagination as default };\n","import { g as getDocument } from '../shared/ssr-window.esm.mjs';\nimport { k as isObject, e as elementChildren } from '../shared/utils.mjs';\n\nfunction Thumb(_ref) {\n let {\n swiper,\n extendParams,\n on\n } = _ref;\n extendParams({\n thumbs: {\n swiper: null,\n multipleActiveThumbs: true,\n autoScrollOffset: 0,\n slideThumbActiveClass: 'swiper-slide-thumb-active',\n thumbsContainerClass: 'swiper-thumbs'\n }\n });\n let initialized = false;\n let swiperCreated = false;\n swiper.thumbs = {\n swiper: null\n };\n function onThumbClick() {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper || thumbsSwiper.destroyed) return;\n const clickedIndex = thumbsSwiper.clickedIndex;\n const clickedSlide = thumbsSwiper.clickedSlide;\n if (clickedSlide && clickedSlide.classList.contains(swiper.params.thumbs.slideThumbActiveClass)) return;\n if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;\n let slideToIndex;\n if (thumbsSwiper.params.loop) {\n slideToIndex = parseInt(thumbsSwiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n slideToIndex = clickedIndex;\n }\n if (swiper.params.loop) {\n swiper.slideToLoop(slideToIndex);\n } else {\n swiper.slideTo(slideToIndex);\n }\n }\n function init() {\n const {\n thumbs: thumbsParams\n } = swiper.params;\n if (initialized) return false;\n initialized = true;\n const SwiperClass = swiper.constructor;\n if (thumbsParams.swiper instanceof SwiperClass) {\n swiper.thumbs.swiper = thumbsParams.swiper;\n Object.assign(swiper.thumbs.swiper.originalParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n Object.assign(swiper.thumbs.swiper.params, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper.update();\n } else if (isObject(thumbsParams.swiper)) {\n const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper);\n Object.assign(thumbsSwiperParams, {\n watchSlidesProgress: true,\n slideToClickedSlide: false\n });\n swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams);\n swiperCreated = true;\n }\n swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass);\n swiper.thumbs.swiper.on('tap', onThumbClick);\n return true;\n }\n function update(initial) {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper || thumbsSwiper.destroyed) return;\n const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;\n\n // Activate thumbs\n let thumbsToActivate = 1;\n const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;\n if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {\n thumbsToActivate = swiper.params.slidesPerView;\n }\n if (!swiper.params.thumbs.multipleActiveThumbs) {\n thumbsToActivate = 1;\n }\n thumbsToActivate = Math.floor(thumbsToActivate);\n thumbsSwiper.slides.forEach(slideEl => slideEl.classList.remove(thumbActiveClass));\n if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n elementChildren(thumbsSwiper.slidesEl, `[data-swiper-slide-index=\"${swiper.realIndex + i}\"]`).forEach(slideEl => {\n slideEl.classList.add(thumbActiveClass);\n });\n }\n } else {\n for (let i = 0; i < thumbsToActivate; i += 1) {\n if (thumbsSwiper.slides[swiper.realIndex + i]) {\n thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass);\n }\n }\n }\n const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;\n const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;\n if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {\n const currentThumbsIndex = thumbsSwiper.activeIndex;\n let newThumbsIndex;\n let direction;\n if (thumbsSwiper.params.loop) {\n const newThumbsSlide = thumbsSwiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`)[0];\n newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);\n direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';\n } else {\n newThumbsIndex = swiper.realIndex;\n direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev';\n }\n if (useOffset) {\n newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset;\n }\n if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {\n if (thumbsSwiper.params.centeredSlides) {\n if (newThumbsIndex > currentThumbsIndex) {\n newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;\n } else {\n newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;\n }\n } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ;\n thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);\n }\n }\n }\n on('beforeInit', () => {\n const {\n thumbs\n } = swiper.params;\n if (!thumbs || !thumbs.swiper) return;\n if (typeof thumbs.swiper === 'string' || thumbs.swiper instanceof HTMLElement) {\n const document = getDocument();\n const getThumbsElementAndInit = () => {\n const thumbsElement = typeof thumbs.swiper === 'string' ? document.querySelector(thumbs.swiper) : thumbs.swiper;\n if (thumbsElement && thumbsElement.swiper) {\n thumbs.swiper = thumbsElement.swiper;\n init();\n update(true);\n } else if (thumbsElement) {\n const onThumbsSwiper = e => {\n thumbs.swiper = e.detail[0];\n thumbsElement.removeEventListener('init', onThumbsSwiper);\n init();\n update(true);\n thumbs.swiper.update();\n swiper.update();\n };\n thumbsElement.addEventListener('init', onThumbsSwiper);\n }\n return thumbsElement;\n };\n const watchForThumbsToAppear = () => {\n if (swiper.destroyed) return;\n const thumbsElement = getThumbsElementAndInit();\n if (!thumbsElement) {\n requestAnimationFrame(watchForThumbsToAppear);\n }\n };\n requestAnimationFrame(watchForThumbsToAppear);\n } else {\n init();\n update(true);\n }\n });\n on('slideChange update resize observerUpdate', () => {\n update();\n });\n on('setTransition', (_s, duration) => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper || thumbsSwiper.destroyed) return;\n thumbsSwiper.setTransition(duration);\n });\n on('beforeDestroy', () => {\n const thumbsSwiper = swiper.thumbs.swiper;\n if (!thumbsSwiper || thumbsSwiper.destroyed) return;\n if (swiperCreated) {\n thumbsSwiper.destroy();\n }\n });\n Object.assign(swiper.thumbs, {\n init,\n update\n });\n}\n\nexport { Thumb as default };\n","import Swiper from 'swiper';\r\nimport { Navigation, Pagination } from 'swiper/modules';\r\n//import FormDataWithToken from './FormDataWithToken'\r\nimport { lazyContent } from '../main'\r\n\r\nimport 'swiper/css';\r\nimport 'swiper/css/pagination';\r\n//import { SwiperOptions } from 'swiper/types';\r\nimport { numberformatter } from './formatters';\r\n\r\nexport default class Cars4SalePage {\r\n static filtersForm = document.getElementById('filters-form') as HTMLFormElement\r\n static totalCountEls = document.querySelectorAll('.total-count')\r\n static isFavoritePage = window.location.search.indexOf('ShowFavorites=true') > -1\r\n static isDesktop = window.innerWidth > 768\r\n static loading = false\r\n //static swiperCarsOptions: SwiperOptions = {\r\n // modules: [Navigation, Pagination, Manipulation],\r\n // slidesPerView: 1,\r\n // centeredSlides: true,\r\n // loop: false,\r\n // spaceBetween: 30,\r\n // init: false,\r\n // autoHeight: true,\r\n // updateOnWindowResize: true,\r\n // slideToClickedSlide: true,\r\n // breakpoints: {\r\n // 768: {\r\n // autoHeight: false,\r\n // slidesPerView: 2,\r\n // spaceBetween: 10,\r\n // },\r\n // 1024: {\r\n // autoHeight: false,\r\n // slidesPerView: 3,\r\n // spaceBetween: 0,\r\n // },\r\n // 1199: {\r\n // autoHeight: false,\r\n // slidesPerView: 3.5,\r\n // spaceBetween: 0,\r\n // },\r\n // 1399: {\r\n // autoHeight: false,\r\n // slidesPerView: 4,\r\n // spaceBetween: 0,\r\n // },\r\n // },\r\n // navigation: {\r\n // nextEl: '.js-hero-swiper .swiper-button-next',\r\n // prevEl: '.js-hero-swiper .swiper-button-prev',\r\n // },\r\n // on: {\r\n // slideChange: function (swiper: Swiper) {\r\n // Cars4SalePage.calculateSliderSlidesTransform(swiper);\r\n // Cars4SalePage.activeFavouriteButton(swiper);\r\n\r\n // let activeSlide = document.querySelector('.js-car-item.swiper-slide-active')\r\n // let invId = activeSlide?.getAttribute('data-inventoryvehicleid')\r\n // let isFavorite = activeSlide?.querySelector('.js-car-wrapper')?.classList.contains('is-favourite')\r\n // const data = new FormDataWithToken()\r\n // data.append('inventoryVehicleId', invId ?? '')\r\n // data.append('like', 'false')\r\n\r\n // // Save the skip if it is not a favorite\r\n // if (isFavorite === false)\r\n // fetch('?handler=SaveLikeDislike', { method: 'post', body: data })\r\n\r\n // // Load More Items\r\n // if (Cars4SalePage.loading === false && Cars4SalePage.isFavoritePage === false && swiper.realIndex >= (swiper.slides.length - 7)) {\r\n // Cars4SalePage.loadMoreCars()\r\n // }\r\n // },\r\n // init: function (swiper: Swiper) {\r\n // setTimeout(function () {\r\n // swiper.el.classList.add('is-initialized');\r\n\r\n // Cars4SalePage.calculateSliderSlidesTransform(swiper);\r\n\r\n // Cars4SalePage.activeFavouriteButton(swiper);\r\n // }, 300);\r\n // },\r\n // resize: function (swiper: Swiper) {\r\n // Cars4SalePage.calculateSliderSlidesTransform(swiper);\r\n // },\r\n // destroy: function (swiper: Swiper) {\r\n // swiper.el.classList.remove('is-initialized');\r\n // },\r\n // touchStart: function (swiper: Swiper, event: TouchEvent | MouseEvent | PointerEvent) {\r\n // const target = event.target as HTMLElement;\r\n\r\n // if (target.closest('.swiper-slide')?.classList.contains('js-car-image')) {\r\n // swiper.allowTouchMove = false;\r\n\r\n // return;\r\n // }\r\n\r\n // swiper.allowTouchMove = true;\r\n // }\r\n // }\r\n //}\r\n\r\n //static swiperCars = new Swiper('.js-swiper-cars', this.swiperCarsOptions);\r\n static carsWrapper = document.getElementById('loadcars')\r\n static gridToggleButtons = document.querySelectorAll('.js-toggle-grid-view') as NodeListOf<HTMLElement>\r\n\r\n static loadingMoreEl = document.getElementById('loading-more-div');\r\n static loadingMoreSubEl = document.getElementById('loading-more-subdiv')\r\n\r\n observer = new IntersectionObserver(this.handleVisibilityChange, {\r\n root: null, // observing changes to visibility in the viewport\r\n rootMargin: '750px',\r\n threshold: 0\r\n });\r\n\r\n static swiperImageOptions = {\r\n slidesPerView: 1,\r\n modules: [Navigation, Pagination],\r\n loop: true,\r\n spaceBetween: 10,\r\n pagination: {\r\n el: '.js-swiper-images .swiper-pagination',\r\n clickable: true,\r\n },\r\n navigation: {\r\n nextEl: \".sbn\",\r\n prevEl: \".sbp\",\r\n }\r\n }\r\n\r\n static swiperImages = new Swiper(\".js-swiper-images\", this.swiperImageOptions);\r\n\r\n constructor() {\r\n // Toggle Grid View\r\n if (Cars4SalePage.gridToggleButtons) {\r\n Cars4SalePage.gridToggleButtons.forEach(m => m.onclick = (event) => {\r\n event.preventDefault();\r\n\r\n if (document.body.classList.contains('grid-view') === true) {\r\n document.body.classList.remove('grid-view');\r\n document.body.classList.add('list-view');\r\n } else {\r\n document.body.classList.add('grid-view');\r\n document.body.classList.remove('list-view');\r\n }\r\n\r\n const enableGrid = document.body.classList.contains('grid-view');\r\n localStorage.setItem('enableGrid', String(enableGrid));\r\n })\r\n }\r\n\r\n let enableGrid = null\r\n if (localStorage.getItem('enableGrid') == null)\r\n enableGrid = true\r\n else\r\n enableGrid = localStorage.getItem('enableGrid') === 'true'\r\n\r\n if (enableGrid === true) {\r\n document.body.classList.add('grid-view');\r\n document.body.classList.remove('list-view');\r\n } else {\r\n document.body.classList.remove('grid-view');\r\n document.body.classList.add('list-view');\r\n }\r\n\r\n // Handle loading more when it comes into view\r\n if (Cars4SalePage.loadingMoreSubEl && Cars4SalePage.isFavoritePage === false)\r\n this.observer.observe(Cars4SalePage.loadingMoreSubEl);\r\n }\r\n\r\n handleVisibilityChange(entries: IntersectionObserverEntry[]) {\r\n entries.forEach(entry => {\r\n // Check if the target is intersecting (visible)\r\n if (entry.isIntersecting) {\r\n try {\r\n Cars4SalePage.loadMoreCars()\r\n }\r\n catch (ex) { }\r\n }\r\n });\r\n }\r\n\r\n static refreshSlides(data: any) {\r\n //if (document.body.classList.contains('grid-view') !== true) {\r\n // // Carousel View\r\n // Cars4SalePage.swiperCars.removeAllSlides()\r\n // data?.dataItemsHTML?.forEach((item: any) => Cars4SalePage.swiperCars.appendSlide(item))\r\n // Cars4SalePage.swiperCars.update()\r\n //}\r\n //else {\r\n // Grid View\r\n let html = ''\r\n Cars4SalePage.carsWrapper!.innerHTML = ''\r\n data?.dataItemsHTML?.forEach((item: any) => html += item)\r\n Cars4SalePage.carsWrapper?.insertAdjacentHTML('beforeend', html)\r\n //}\r\n\r\n // Refresh Lazy Load Image handler with new images\r\n lazyContent.update()\r\n\r\n // Update Swiper\r\n new Swiper('.js-swiper-images', this.swiperImageOptions)\r\n\r\n // Update Total Count\r\n if (Cars4SalePage.totalCountEls)\r\n Cars4SalePage.totalCountEls.forEach(item => item.innerHTML = numberformatter.format(data?.totalCount ?? 0))\r\n\r\n // Hide loading spinner if not many results\r\n Cars4SalePage.loadingMoreEl?.classList.toggle('inactive', (data?.totalCount ?? 0) <= 21)\r\n }\r\n\r\n static async loadMoreCars() {\r\n Cars4SalePage.loading = true\r\n\r\n //const enableGrid = localStorage.getItem('enableGrid') === 'true';\r\n\r\n let parms = new FormData(Cars4SalePage.filtersForm)\r\n parms.append('IdCSV', this.getInventoryVehicleIdCSV()) // Prevent loading items that are already visible\r\n const response = await fetch('/cars-for-sale?handler=LoadPage', { method: 'POST', body: parms })\r\n let data = await response.json()\r\n\r\n //if (enableGrid) {\r\n let html = ''\r\n data.dataItemsHTML.forEach((item: string) => html += item)\r\n this.carsWrapper?.insertAdjacentHTML('beforeend', html)\r\n //}\r\n //else {\r\n // Cars4SalePage.swiperCars.appendSlide(data.dataItemsHTML)\r\n //}\r\n\r\n lazyContent.update();\r\n\r\n // Update Swiper\r\n new Swiper('.js-swiper-images', this.swiperImageOptions)\r\n\r\n // Hide loading spinner if not many results\r\n Cars4SalePage.loadingMoreEl?.classList.toggle('inactive', data.totalCount <= 21)\r\n\r\n Cars4SalePage.loading = false\r\n }\r\n\r\n static getInventoryVehicleIdCSV() {\r\n let ids = ''\r\n\r\n document.querySelectorAll('.swiper-slide[data-inventoryvehicleid]')?.forEach(item => {\r\n ids += item.getAttribute('data-inventoryvehicleid') + ','\r\n })\r\n\r\n return ids\r\n }\r\n\r\n //static handleKeyboard() {\r\n // document.addEventListener('keyup', function (event) {\r\n // const currentKeyCode = event.key;\r\n\r\n // if (!document.body.classList.contains('grid-view')) {\r\n // switch (currentKeyCode) {\r\n // case 'ArrowRight':\r\n // Cars4SalePage.swiperCars.slideNext();\r\n // break;\r\n // case 'ArrowLeft':\r\n // Cars4SalePage.swiperCars.slidePrev();\r\n // break;\r\n // case 'ArrowUp':\r\n // const upElements = document.querySelectorAll<HTMLElement>('.js-car-toggle-favourite-swiper');\r\n // if (upElements.length > 0) upElements[0].click();\r\n // break;\r\n // }\r\n // }\r\n // });\r\n //}\r\n\r\n static activeFavouriteButton(swiper: Swiper) {\r\n if (swiper.slides[swiper.activeIndex].querySelector('.js-car-wrapper')?.classList.contains('is-favourite') === true) {\r\n document.querySelector('.js-car-toggle-favourite-swiper')?.classList.add('is-favourite')\r\n } else {\r\n document.querySelector('.js-car-toggle-favourite-swiper')?.classList.remove('is-favourite')\r\n }\r\n }\r\n\r\n static calculateSliderSlidesTransform(swiper: Swiper) {\r\n const activeSlideIndex = swiper.activeIndex\r\n const nextSlidesArray = swiper.slides.slice(activeSlideIndex);\r\n const prevSlidesArray = swiper.slides.slice(0, activeSlideIndex);\r\n\r\n //const slideWidth = $(swiper.slides[0]).outerWidth();\r\n //const numberOfVisibleSlides = swiper.params.slidesPerView;\r\n\r\n let slideScale = .6;\r\n\r\n if (window.outerHeight > 1249) {\r\n slideScale = 1 - .78;\r\n }\r\n\r\n nextSlidesArray.map(function (nextSlide, index) {\r\n nextSlide.classList.remove('prev-element');\r\n nextSlide.classList.add('next-element');\r\n\r\n if (nextSlide.classList.contains('next-element')) {\r\n nextSlide.style.transform = `translateX(-${nextSlide.clientWidth * slideScale / 2 * (index - 1)}px)`\r\n }\r\n })\r\n\r\n prevSlidesArray.map(function (prevSlide, index) {\r\n prevSlide.classList.add('prev-element');\r\n\r\n if (prevSlide.classList.contains('prev-element')) {\r\n prevSlide.style.transform = `translateX(${prevSlide.clientWidth * slideScale / 2 * (prevSlidesArray.length - index - 1)}px)`\r\n }\r\n })\r\n }\r\n}\r\n\r\nif (window.location.href.indexOf('/cars-for-sale') > -1) {\r\n new Cars4SalePage()\r\n}\r\n\r\ndocument.addEventListener('click', function (e: MouseEvent) {\r\n let el = e.target as HTMLFormElement\r\n let c = el.closest('.has-tooltip')\r\n\r\n if (c) {\r\n // Toggle tooltip visibility\r\n let tooltip = c.querySelector('.tooltip') as HTMLElement;\r\n tooltip.classList.toggle('hidden');\r\n } else {\r\n // Hide the tooltip if clicking outside\r\n document.querySelector('.tooltip')?.classList.add('hidden');\r\n }\r\n});","import FormDataWithToken from './FormDataWithToken'\n\ndocument.addEventListener('click', (event) => {\n // Carousel View\n let el1 = (event.target as HTMLElement).closest('.js-car-toggle-favourite-swiper')\n if (el1) {\n event.preventDefault();\n \n document.querySelector('.js-swiper-cars .swiper-slide-active .js-car-wrapper')?.classList.toggle('is-favourite');\n el1.classList.toggle('is-favourite');\n\n let activeSlide = document.querySelector('.js-car-item.swiper-slide-active')\n let isFav = activeSlide?.querySelector('.js-car-wrapper.is-favourite') != undefined\n let invId = document.querySelector('.js-car-item.swiper-slide-active')?.getAttribute('data-inventoryvehicleid')\n const data = new FormDataWithToken()\n data.append('inventoryVehicleId', invId ?? '')\n data.append('like', String(isFav))\n\n fetch('?handler=SaveLikeDislike', { method: 'post', body: data })\n }\n\n // Grid View and other favorite buttons not in carousel view\n let el2 = (event.target as HTMLElement).closest('.js-car-toggle-favourite')\n if (el2) {\n event.preventDefault();\n\n el2.closest('.js-car-wrapper')?.classList.toggle('is-favourite');\n el2.classList.toggle('is-favourite');\n\n let invId = el2.closest('.js-car-item')?.getAttribute('data-inventoryvehicleid')\n let isFav = el2.closest('.js-car-wrapper.is-favourite') != undefined\n \n const data = new FormDataWithToken()\n data.append('inventoryVehicleId', invId ?? '')\n data.append('like', String(isFav))\n\n fetch('/cars-for-sale/?handler=SaveLikeDislike', { method: 'post', body: data })\n }\n})","document.querySelector('[submit-loan-button]')?.addEventListener('click', async event => {\n event.preventDefault();\n\n const target = event.target as HTMLFormElement\n const targetForm = target.closest('form')\n const spinner = document.getElementById('loading-spinner')\n\n if (targetForm) {\n spinner?.classList.remove('hidden')\n\n const formData = new FormData(targetForm);\r\n const errorDiv = document.querySelector('.error-text')\r\n\r\n let response = await fetch('?', { method: 'POST', body: formData })\r\n let data = await response.json()\r\n console.log(data)\r\n\r\n if (data.success) {\r\n window.location.href = `/loan/credit-app-success?CreditAppDealJacketId=${data.creditAppDealJacketId}`\r\n }\r\n else {\r\n spinner?.classList.add('hidden')\r\n\r\n if (errorDiv)\r\n errorDiv.innerHTML = \"An error occurred: \" + data.error\r\n else\r\n alert(\"An error occurred: \" + data.error)\r\n\r\n // Scroll to top\r\n window.scrollTo({\r\n top: 0,\r\n behavior: 'smooth'\r\n });\r\n }\r\n }\r\n})\n","import Swiper from 'swiper';\r\nimport { Navigation, Pagination, Thumbs } from 'swiper/modules';\r\n\r\nif (window.location.pathname.indexOf('/details/') > -1) {\r\n var swiper = new Swiper(\".mySwiper\", {\r\n modules: [Navigation, Pagination, Thumbs],\r\n loop: true,\r\n spaceBetween: 10,\r\n slidesPerView: 4,\r\n slidesPerGroup: 4,\r\n freeMode: true,\r\n watchSlidesProgress: true,\r\n navigation: {\r\n nextEl: \".sbn\",\r\n prevEl: \".sbp\",\r\n },\r\n });\r\n\r\n new Swiper(\".mySwiper2\", {\r\n modules: [Navigation, Pagination, Thumbs],\r\n loop: true,\r\n spaceBetween: 10,\r\n navigation: {\r\n nextEl: \".sbn\",\r\n prevEl: \".sbp\",\r\n },\r\n thumbs: {\r\n swiper: swiper,\r\n }\r\n })\r\n}","import Cars4SalePage from \"./Cars4SalePage\"\r\n\r\nconst filterTrimEl = document.getElementById('filter-trim')\r\nconst filterTrimMainEl = document.getElementById('filter-trim-main')\r\nconst yearSectionEl = document.getElementById('year-section')\r\nconst loanCalculatorApplyEl = document.getElementById('loan-calculator-apply')\r\nconst searchButton = document.querySelectorAll('.js-filters-search')\r\n\r\nif (window.location.pathname.indexOf('/cars-for-sale') > -1) {\r\n \r\n // Input Handlers\r\n document.addEventListener('change', async (event) => {\r\n let p = event.target\r\n let input = ((p as HTMLElement).closest('#filters-form input, #filters-form select') as HTMLInputElement)\r\n\r\n // If input in the filter form was changed\r\n if (input && input.disabled === false)\r\n await refreshData(input)\r\n })\r\n\r\n searchButton?.forEach(item => {\r\n item.addEventListener('click', async () => {\r\n await refreshData(null)\r\n })\r\n })\r\n\r\n loanCalculatorApplyEl?.addEventListener('click', async () => {\r\n await refreshData(null)\r\n })\r\n\r\n document.addEventListener('click', function (event) {\r\n let el = event.target as HTMLElement;\r\n const filters = document.querySelectorAll<HTMLElement>('.js-filters');\r\n \r\n // Check for clicks on filtersClose elements\r\n if (el.closest('.js-filters-close')) {\r\n event.preventDefault();\r\n\r\n const currentFilters = document.querySelector('.js-filters');\r\n currentFilters?.classList.remove('is-active');\r\n currentFilters?.classList.add('hidden');\r\n\r\n document.body.classList.remove('has-open-filters');\r\n\r\n window.scrollTo({\r\n top: 0,\r\n behavior: 'smooth'\r\n });\r\n }\r\n\r\n // Check for clicks on filtersTrigger elements\r\n if (el.closest('.js-filters-trigger')) {\r\n event.preventDefault();\r\n\r\n filters.forEach((filter) => {\r\n filter.classList.remove('hidden');\r\n });\r\n\r\n setTimeout(() => {\r\n filters.forEach((filter) => {\r\n filter.classList.add('is-active');\r\n });\r\n }, 0);\r\n\r\n document.body.classList.add('has-open-filters');\r\n }\r\n\r\n // Check for clicks on filtersClear elements\r\n if (el.closest('.js-filters-clear')) {\r\n event.preventDefault();\r\n\r\n const filtersElement = el.closest<HTMLElement>('.js-filters');\r\n if (filtersElement)\r\n clearFilters(filtersElement);\r\n\r\n refreshData(null)\r\n }\r\n\r\n // Handling click outside of .js-filters-content to close the filter\r\n //if (!el.closest('.js-filters-content')) {\r\n // filters.forEach((filter) => {\r\n // if (filter.classList.contains('is-active')) {\r\n // filter.classList.remove('is-active');\r\n // document.body.classList.remove('has-open-filters');\r\n // }\r\n // });\r\n //}\r\n });\r\n}\r\nfunction clearFilters(filtersElement: HTMLElement) {\r\n const checkboxes = filtersElement.querySelectorAll<HTMLFormElement>('input[type=\"checkbox\"]');\r\n checkboxes.forEach((checkbox) => {\r\n checkbox.checked = false;\r\n });\r\n}\r\n\r\nasync function refreshData(cb: HTMLInputElement | null) {\r\n let data = await getFilterData()\r\n console.log(data)\r\n\r\n // Load Models\r\n if (cb?.name == 'Make') {\r\n handleMakeChange(cb, data)\r\n }\r\n\r\n // Load Trims\r\n if (cb?.name == 'Model') {\r\n handleModelChange(cb, data)\r\n }\r\n\r\n Cars4SalePage.refreshSlides(data)\r\n\r\n toggleTrimSection()\r\n toggleYearSection()\r\n toggleNoResults(data.totalCount)\r\n\r\n updateCounts(data)\r\n}\r\n\r\nfunction updateCounts(data: any) {\r\n document.querySelectorAll(`[data-name]`)?.forEach(item => item.innerHTML = '')\r\n\r\n data.makes?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=Make][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n\r\n data.models?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=Model][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n\r\n data.colors?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=Color][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n\r\n data.drivetrains?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=Drivetrain][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n\r\n data.fuelTypes?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=EngineFuelType][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n\r\n data.transmissions?.forEach((item: { value: string, count: number }) => {\r\n let el = document.querySelector(`[data-name=Transmission][data-value=\"${item.value}\"]`)\r\n if (el) el.innerHTML = '(' + item.count + ')'\r\n })\r\n}\r\n\r\nasync function getFilterData() {\r\n let parms = new FormData(Cars4SalePage.filtersForm)\r\n const response = await fetch('/cars-for-sale?handler=LoadPage', { method: 'POST', body: parms })\r\n let data = await response.json()\r\n\r\n return data;\r\n}\r\n\r\nasync function getModels(make: string) {\r\n const response = await fetch('/cars-for-sale?handler=Models&Make=' + make)\r\n let data = (await response.json()) as Array<string>\r\n\r\n return data;\r\n}\r\n\r\nasync function getTrims(make: string, model: string) {\r\n const response = await fetch(`/cars-for-sale?handler=Trims&Make=${make}&Model=${model}`)\r\n let data = (await response.json()) as Array<{ make: string, model: string, trim: string }>\r\n\r\n return data;\r\n}\r\n\r\nasync function handleMakeChange(cb: HTMLInputElement, data: any) {\r\n if (cb.checked && data) {\r\n let make = cb.value\r\n let models = (await getModels(make)) as Array<string>\r\n\r\n // Get model HTML\r\n let html = `<div class='model-data ps-3 hidden peer-checked:block'>`\r\n\r\n for (let z = 0; z < models?.length; z++) {\r\n // Get matching data item\r\n let di = data.models?.filter((m: { value: string, count: number }) => m.value == models[z])\r\n console.log(di)\r\n\r\n let uniqueId = make + models[z].replace(/\\W+/g, '')\r\n\r\n html += getLIItem(make, models[z], uniqueId, di?.[0]?.count, 'Model')\r\n }\r\n\r\n html += `</div>`\r\n\r\n cb.parentElement?.insertAdjacentHTML('beforeend', html)\r\n }\r\n else {\r\n // Remove from DOM\r\n cb.parentElement?.querySelectorAll('.model-data')?.forEach(item => item.remove())\r\n }\r\n}\r\n\r\nasync function handleModelChange(cb: HTMLInputElement, data: any) {\r\n let make = cb.getAttribute('data-make') as string\r\n let model = cb.value\r\n\r\n if (cb.checked && data) {\r\n let trims = (await getTrims(make, model)) as Array<{ make: string, model: string, trim: string }>\r\n console.log(trims)\r\n\r\n let html = `<div class='trim-item' data-make='${make}' data-model='${model}'>\r\n <h5 class=\"font-inter text-primary mb-2\">${make} ${model}</h5>\r\n <div class=\"grid grid-cols-2 gap-8 gap-y-4 mb-6 list-none\">`\r\n\r\n for (let z = 0; z < trims?.length ; z++) {\r\n // Get matching data item\r\n let di = data.trims?.filter((m: { value: string, count: number }) => m.value == trims[z].trim)\r\n console.log(di)\r\n\r\n let uniqueId = trims[z].trim.replace(/\\W+/g, '')\r\n\r\n html += getLIItem('', trims[z].trim, uniqueId, di?.[0]?.count, 'Trim')\r\n }\r\n\r\n html += `</div></div>`\r\n\r\n filterTrimEl?.insertAdjacentHTML('beforeend', html)\r\n }\r\n else {\r\n // Remove from DOM\r\n document.querySelectorAll(`.trim-item[data-make=\"${make}\"][data-model=\"${model}\"]`)?.forEach(m => m.remove())\r\n }\r\n}\r\n\r\nconst getLIItem = (make: string, value: string, uniqueId: string, count: number, name: string) => {\r\n let html = `<div class=\"pt-1\">\r\n <input type=\"checkbox\" name=\"${name}\" data-make=\"${make}\" value=\"${value}\" id=\"filter-car-${name}-${uniqueId}\" class=\"absolute top-0 left-0 opacity-0 peer\" />\r\n <label for=\"filter-car-${name}-${uniqueId}\" class=\"relative flex items-center gap-4 after:w-8 after:h-8 after:border after:border-blue-2 after:rounded-md after:bg-blue-2 after:absolute after:top-1/2 after:-translate-y-1/2 after:left-0 after:bg-white-check after:bg-no-repeat after:bg-center after:bg-cover after:transition duration-300 after:opacity-0 peer-checked:after:opacity-100\">\r\n <span class=\"w-8 h-8 block border border-gray-2 rounded-md bg-white\"></span>\r\n <span class=\"flex-1\">${value} `\r\n\r\n if (count) {\r\n html += `<span data-name=\"${name}\" data-value=\"${value}\" class=\"italic text-sky-400\">(${count})</span>`\r\n }\r\n\r\n html += `</span>\r\n </label>\r\n </div>`\r\n\r\n return html\r\n}\r\n\r\nfunction toggleNoResults(count: number) {\r\n document.body.classList.toggle('no-cars', count == 0)\r\n}\r\n\r\nfunction toggleTrimSection() {\r\n let hasElements = document.querySelectorAll('input[name=Model]:checked')?.length > 0\r\n\r\n filterTrimMainEl?.classList.toggle('hidden', !hasElements)\r\n\r\n if (!hasElements && filterTrimEl)\r\n filterTrimEl.innerHTML = ''\r\n}\r\n\r\nfunction toggleYearSection() {\r\n let isNewChecked = document.querySelector('input[name=Condition][value=New]:checked') != null\r\n let isUsedChecked = document.querySelector('input[name=Condition][value=Used]:checked') != null\r\n\r\n yearSectionEl?.classList.toggle('hidden', isNewChecked && !isUsedChecked)\r\n}","document.addEventListener('click', async function (event) {\r\n let el = event.target as HTMLFormElement\r\n\r\n if (el.classList.contains('js-standard-lead-submission')) {\r\n let frmId = el.getAttribute('data-formid')\r\n let frm \r\n\r\n if (frmId)\r\n frm = document.getElementById(frmId) as HTMLFormElement\r\n else\r\n frm = document.getElementById('frm-standard-lead-modal') as HTMLFormElement\r\n\r\n if (!frm)\r\n frm = el.closest('form')\r\n\r\n if (frm) {\r\n let frmData = new FormData(frm);\r\n \r\n const response = await fetch('/?handler=StandardLeadSubmissionForm', {\r\n method: 'POST', body: frmData\r\n })\r\n let jsonData = await response.json()\r\n\r\n frm.innerHTML = jsonData.content\r\n\r\n document.getElementById('sl-modal-button-submit')?.classList.add('hidden')\r\n document.getElementById('sl-modal-button-cancel')?.classList.add('hidden')\r\n document.getElementById('sl-modal-button-close')?.classList.remove('hidden')\r\n }\r\n }\r\n})","document.addEventListener('DOMContentLoaded', function () {\r\n InputMask.Init()\r\n})\r\n\r\nexport class InputMask {\r\n public static Init(): void {\r\n document.querySelectorAll('[mask]')?.forEach(triggerElement => {\r\n triggerElement.addEventListener('keydown', (event) => {\r\n let evt = event as KeyboardEvent\r\n let el = event.target as HTMLInputElement\r\n let mask = el.getAttribute('mask')\r\n\r\n //const cursorPosition = el.selectionStart ?? 0;\r\n //const nextChar = el.value[cursorPosition];\r\n //const prevChar = el.value[cursorPosition - 1];\r\n\r\n // Allow arrow keys, home, and end keys\r\n if (evt.key == 'Backspace' || evt.key == 'Tab' || evt.key === 'ArrowLeft' || evt.key === 'ArrowRight' || evt.key === 'Home' || evt.key === 'End' || evt.key === 'ArrowUp' || evt.key === 'ArrowDown') {\r\n return; // Do nothing, allow the keypress\r\n }\r\n\r\n if (mask == 'phone' || mask == 'ssn') {\r\n if (evt.key?.match(/[0-9]|-/g)) {\r\n let startHyphenLoc = 3\r\n let endHyphenLoc = mask == 'phone' ? 7 : 6\r\n\r\n if (evt.key == '-') {\r\n if (el.selectionStart == startHyphenLoc || el.selectionStart == endHyphenLoc) {\r\n //allow hyphen\r\n\r\n }\r\n else {\r\n event.preventDefault()\r\n }\r\n }\r\n else {\r\n // any number\r\n if (el.selectionStart == startHyphenLoc || el.selectionStart == endHyphenLoc) {\r\n // you've typed a number so auto insert hyphen\r\n el.value += '-'\r\n }\r\n }\r\n }\r\n else {\r\n event.preventDefault()\r\n }\r\n }\r\n })\r\n })\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface Window {\r\n InputMask: typeof InputMask;\r\n }\r\n}\r\n\r\nwindow.InputMask = InputMask","import { currencyFormatter, numberformatter } from './formatters';\r\nimport '../css/range-slider.css'\r\n\r\nclass RangeSlider {\r\n el: HTMLElement\r\n min: number\r\n max: number\r\n start: number\r\n end: number | null\r\n step: number\r\n minLabelSelector: string\r\n maxLabelSelector: string\r\n sliderMinName: string\r\n sliderMaxName: string\r\n color: string | null\r\n labelFormat: string | null\r\n\r\n sliderMin: HTMLInputElement\r\n sliderMax: HTMLInputElement | null\r\n sliderDiv: HTMLElement\r\n inverseLeft: HTMLElement\r\n inverseRight: HTMLElement\r\n rangeDiv: HTMLElement\r\n thumbLeft: HTMLElement\r\n thumbRight: HTMLElement | null\r\n\r\n constructor(triggerElement: HTMLElement) {\r\n this.el = triggerElement\r\n this.min = Number(this.el.getAttribute('min') ?? 0)\r\n this.max = Number(this.el.getAttribute('max') ?? 100)\r\n this.start = Number(this.el.getAttribute('start') ?? 1)\r\n this.step = Number(this.el.getAttribute('step') ?? 1)\r\n this.minLabelSelector = this.el.getAttribute('min-label-selector') ?? ''\r\n this.maxLabelSelector = this.el.getAttribute('max-label-selector') ?? ''\r\n this.sliderMinName = this.el.getAttribute('min-input-name') ?? 'SliderMinName'\r\n this.sliderMaxName = this.el.getAttribute('max-input-name') ?? 'SliderMaxName'\r\n this.color = this.el.getAttribute('color') ?? null\r\n this.labelFormat = this.el.getAttribute('label-format') ?? 'currency'\r\n let endv = this.el.getAttribute('end')\r\n this.end = Number(endv)\r\n\r\n // Create divs\r\n this.sliderDiv = document.createElement('div')\r\n this.inverseLeft = document.createElement('div')\r\n this.inverseRight = document.createElement('div')\r\n this.rangeDiv = document.createElement('div')\r\n this.thumbLeft = document.createElement('span')\r\n this.inverseLeft.setAttribute('inverse-left', '')\r\n this.inverseRight.setAttribute('inverse-right', '')\r\n this.rangeDiv.setAttribute('range', '')\r\n this.thumbLeft.setAttribute('thumb-left', '')\r\n this.sliderDiv.appendChild(this.inverseLeft)\r\n this.sliderDiv.appendChild(this.inverseRight)\r\n this.sliderDiv.appendChild(this.rangeDiv)\r\n this.sliderDiv.appendChild(this.thumbLeft)\r\n\r\n // Set color\r\n if (this.color) {\r\n this.thumbLeft.style.backgroundColor = this.color\r\n this.rangeDiv.style.backgroundColor = this.color\r\n }\r\n\r\n // Multislider append second thumb\r\n this.thumbRight = null\r\n if (this.end) {\r\n this.thumbRight = document.createElement('span')\r\n this.thumbRight.setAttribute('thumb-right', '')\r\n this.sliderDiv.appendChild(this.thumbRight)\r\n if (this.color) this.thumbRight.style.backgroundColor = this.color\r\n }\r\n\r\n this.el.appendChild(this.sliderDiv)\r\n\r\n // Create sliders\r\n this.sliderMin = document.createElement('input')\r\n this.sliderMin.type = 'range'\r\n this.sliderMin.min = String(this.min)\r\n this.sliderMin.max = String(this.max)\r\n this.sliderMin.step = String(this.step)\r\n this.sliderMin.value = String(this.start)\r\n this.sliderMin.name = this.sliderMinName\r\n this.el.appendChild(this.sliderMin)\r\n \r\n this.sliderMax = null\r\n if (this.end) {\r\n this.sliderMax = document.createElement('input')\r\n this.sliderMax.type = 'range'\r\n this.sliderMax.min = String(this.min)\r\n this.sliderMax.max = String(this.max)\r\n this.sliderMax.step = String(this.step)\r\n this.sliderMax.value = String(this.end)\r\n this.sliderMax.name = this.sliderMaxName\r\n this.el.appendChild(this.sliderMax)\r\n }\r\n\r\n // Initialize values\r\n this.sliderMinChanged(true)\r\n if (this.sliderMax) this.sliderMaxChanged(true)\r\n\r\n // Events\r\n this.sliderMin.oninput = () => this.sliderMinChanged(false)\r\n if (this.sliderMax) this.sliderMax.oninput = () => this.sliderMaxChanged(false)\r\n }\r\n\r\n convertToNewRange(originalValue: number, newMin: number, newMax: number) {\r\n // Hardcoded original range min and max values\r\n const originalMin = 0\r\n const originalMax = 100\r\n\r\n // Calculate the ratio of the new range to the original range\r\n let scale = (newMax - newMin) / (originalMax - originalMin)\r\n \r\n // Apply the ratio to the original value, adjusting by the new minimum\r\n let newValue = (originalValue - originalMin) * scale + newMin\r\n\r\n return newValue\r\n }\r\n\r\n sliderMinChanged(isInit: boolean) {\r\n if (this.sliderMin && this.sliderMax)\r\n this.sliderMin.value = String(Math.min(Number(this.sliderMin.value), Number(this.sliderMax.value) - 1));\r\n\r\n var value = (100 / (this.max - this.min)) * Number(this.sliderMin.value) - (100 / (this.max - this.min)) * this.min;\r\n this.inverseLeft.style.width = value + '%';\r\n\r\n let newVal = this.convertToNewRange(value, 0, 95)\r\n\r\n this.thumbLeft.style.left = newVal + '%'\r\n \r\n // Adjust Range\r\n if (this.end) {\r\n this.rangeDiv.style.left = value + '%'\r\n }\r\n else {\r\n this.rangeDiv.style.left = '0';\r\n this.rangeDiv.style.right = (100 - value) + '%'\r\n }\r\n \r\n // If single slider this function should also update inverse right\r\n if (!this.sliderMax)\r\n this.inverseRight.style.width = (100 - value) + '%';\r\n\r\n const txt = document.querySelector(this.minLabelSelector) as HTMLInputElement\r\n if (txt) {\r\n txt.value = this.formatValue(Number(this.sliderMin.value))\r\n\r\n if (isInit === false) {\r\n txt.dispatchEvent(new Event('input', {\r\n 'bubbles': true,\r\n 'cancelable': true\r\n }))\r\n }\r\n }\r\n }\r\n\r\n sliderMaxChanged(isInit: boolean) {\r\n if (this.sliderMin && this.sliderMax)\r\n this.sliderMax.value = String(Math.max(Number(this.sliderMax.value), Number(this.sliderMin.value) - (-1)));\r\n\r\n var value = (100 / (this.max - this.min)) * Number(this.sliderMax?.value) - (100 / (this.max - this.min)) * this.min;\r\n this.inverseRight.style.width = (100 - value) + '%';\r\n this.rangeDiv.style.right = (100 - value) + '%';\r\n\r\n let newVal = this.convertToNewRange(value, 4, 100)\r\n\r\n if (this.thumbRight)\r\n this.thumbRight.style.left = newVal + '%'\r\n\r\n // Set Text Label\r\n const txt = document.querySelector(this.maxLabelSelector) as HTMLInputElement\r\n if (txt) {\r\n txt.value = this.formatValue(Number(this.sliderMax?.value))\r\n\r\n if (isInit === false) {\r\n txt.dispatchEvent(new Event('input', {\r\n 'bubbles': true,\r\n 'cancelable': true\r\n }))\r\n }\r\n }\r\n\r\n //children[13].style.left = value + '%';\r\n //children[13].childNodes[1].innerHTML = obj.value;\r\n }\r\n\r\n private formatValue(val: number) {\r\n if (this.labelFormat === 'number')\r\n return numberformatter.format(val)\r\n else if (this.labelFormat === 'currency')\r\n return currencyFormatter.format(val)\r\n\r\n return String(val)\r\n }\r\n}\r\n\r\ndocument.querySelectorAll<HTMLElement>('[range-slider]').forEach(el => new RangeSlider(el))\r\n","document.querySelectorAll('[toggle]').forEach(item => {\n item.addEventListener('click', event => {\n let el = event.target as HTMLInputElement;\n handleToggle(el, event)\n })\n \n item.addEventListener('change', event => {\n let el = event.target as HTMLInputElement;\n handleToggle(el, event)\n })\n})\n\nfunction handleToggle(el: HTMLElement, event: Event) {\n let al = el.closest('[toggle]') as HTMLInputElement\n \n if (al) {\n if (al.tagName == 'a')\n event.preventDefault()\n\n let toggleSelector = al.getAttribute('toggle')\n let targetEl = document.querySelector(toggleSelector ?? '') as HTMLElement\n let toggleClass = al.getAttribute('toggle-class')\n let toggleAddClass = al.getAttribute('toggle-add-class')\n let toggleRemoveClass = al.getAttribute('toggle-remove-class')\n let toggleBodyClass = al.getAttribute('toggle-body-class')\n \n if (toggleBodyClass) {\n document.body.classList.toggle(toggleBodyClass)\r\n }\n\n if (toggleAddClass) {\n targetEl.classList.add(toggleAddClass)\r\n targetEl.style.display = ''\r\n return\r\n }\n\n if (toggleRemoveClass) {\n targetEl.classList.remove(toggleRemoveClass)\r\n return\r\n }\n\n if (toggleClass) {\n targetEl.classList.toggle(toggleClass)\r\n }\n else if (targetEl) {\n targetEl.style.display = al.checked ? '' : 'none'\r\n }\r\n }\r\n}","import { SimpleValidate } from './SimpleValidate'\r\n\r\nclass SimpleWizard {\r\n el: HTMLElement\r\n nextButtonEls: NodeListOf<HTMLButtonElement>\r\n prevButtonEls: NodeListOf<HTMLButtonElement>\r\n stepsEls: NodeListOf<HTMLElement>\r\n navEl: HTMLElement | null\r\n\r\n constructor(triggerElement: HTMLElement) {\r\n this.el = triggerElement\r\n\r\n this.nextButtonEls = this.el.querySelectorAll('[simple-wizard-next]')\r\n this.prevButtonEls = this.el.querySelectorAll('[simple-wizard-previous]')\r\n this.stepsEls = this.el.querySelectorAll('[simple-wizard-step]')\r\n this.navEl = document.querySelector('[simple-wizard-nav-items]');\r\n \r\n this.nextButtonEls?.forEach(trigger => {\r\n trigger.addEventListener('click', () => this.next())\r\n })\r\n\r\n this.prevButtonEls?.forEach(trigger => {\r\n trigger.addEventListener('click', () => this.previous())\r\n })\r\n\r\n this.el.querySelectorAll('[simple-wizard-one-required]').forEach(trigger => {\r\n trigger.addEventListener('click', (event) => {\r\n let item = event.target as HTMLElement\r\n if (item) {\r\n let curNextBtn = item.closest('[simple-wizard-step]')?.querySelector('[simple-wizard-next]') as HTMLButtonElement\r\n if (curNextBtn) {\r\n curNextBtn.disabled = false\r\n curNextBtn.classList.add('is-active')\r\n }\r\n }\r\n })\r\n })\r\n\r\n this.el.querySelectorAll('[simple-wizard-goto-slide]').forEach(item => {\r\n item.addEventListener('click', (event) => {\r\n event.preventDefault()\r\n\r\n let goto = Number((event.target as HTMLElement).getAttribute('simple-wizard-goto-slide'))\r\n this.showStep(goto)\r\n })\r\n })\r\n }\r\n\r\n getCurrentStep() {\r\n for (let i = 0; i < this.stepsEls.length; i++) {\r\n if (this.stepsEls[i].matches('.is-active')) {\r\n return i\r\n }\r\n }\r\n\r\n return -1\r\n }\r\n\r\n showStep(stepToShow: number) {\r\n console.log(\"show step\")\r\n for (let i = 0; i < this.stepsEls.length; i++) {\r\n this.stepsEls[i].classList.toggle('is-active', i == stepToShow)\r\n }\r\n\r\n // Validate fields\r\n let curStep = this.stepsEls[stepToShow]\r\n let curNext = curStep.querySelector<HTMLButtonElement>('[simple-wizard-next]')\r\n let flds = curStep.querySelectorAll('[simple-wizard-one-required]')\r\n\r\n if (curNext) {\r\n console.log(\"cur next\")\r\n if (flds.length > 0) {\r\n let cntChecked = curStep.querySelectorAll('[simple-wizard-one-required]:checked')?.length ?? 0\r\n\r\n if (curNext) {\r\n curNext.disabled = cntChecked == 0\r\n curNext.classList.toggle('is-active', cntChecked > 0)\r\n }\r\n }\r\n else {\r\n curNext.disabled = false\r\n curNext.classList.add('is-active')\r\n }\r\n }\r\n\r\n // Scroll to top\r\n window.scrollTo({\r\n top: 0,\r\n behavior: 'smooth'\r\n });\r\n\r\n // Update Nav\r\n this.updateNav(stepToShow);\r\n }\r\n\r\n updateNav(stepNumber: number) {\r\n const navItems = this.navEl?.querySelectorAll('li, div');\r\n \r\n navItems?.forEach((item, index) => {\r\n item.classList.remove('is-active');\r\n item.classList.toggle('is-done', index < stepNumber)\r\n });\r\n \r\n navItems?.[stepNumber].classList?.add('is-active');\r\n }\r\n\r\n next() {\r\n //el.preventDefault()\r\n let curStep = this.getCurrentStep()\r\n \r\n // Validate\r\n const frm = this.el.querySelector('form[simple-validate]') as HTMLFormElement\r\n\r\n if (frm) {\r\n let svf = SimpleValidate.getInstance(frm)\r\n\r\n if (svf.validate()) {\r\n this.showStep(curStep + 1)\r\n }\r\n }\r\n else {\r\n this.showStep(curStep + 1)\r\n }\r\n }\r\n\r\n previous() {\r\n //el.preventDefault()\r\n let curStep = this.getCurrentStep()\r\n this.showStep(curStep - 1)\r\n }\r\n}\r\n\r\n// Instantiation based on the HTML element with the `data-modal-trigger` attribute\r\ndocument.querySelectorAll('[simple-wizard]').forEach(triggerElement => {\r\n new SimpleWizard(triggerElement as HTMLElement);\r\n});","import '../css/simple-modal.css'\r\n\r\ndeclare global {\r\n interface HTMLElement {\r\n readonly SimpleModal: SimpleModal | undefined;\r\n }\r\n\r\n}\r\n\r\nif (!HTMLElement.prototype.SimpleModal) {\r\n Object.defineProperty(HTMLElement.prototype, 'SimpleModal', {\r\n get: function () {\r\n // Use a data attribute to store and retrieve the modal ID\r\n const modalId = this.getAttribute('data-simple-modal-id');\r\n return SimpleModal.instances.get(modalId || '');\r\n }\r\n });\r\n}\r\n\r\nexport default class SimpleModal {\r\n static instances = new Map<string, SimpleModal>();\r\n\r\n modalId: string;\r\n modalJs: string;\r\n modalElement: HTMLElement | null;\r\n backdrop: HTMLElement | null;\r\n\r\n private constructor(triggerElement: HTMLElement) {\r\n this.modalId = triggerElement.getAttribute('data-simple-modal-trigger') ?? ''\r\n this.modalJs = triggerElement.getAttribute('data-simple-modal-js') ?? ''\r\n this.modalElement = null\r\n this.backdrop = null\r\n }\r\n\r\n static getInstance(triggerElement: HTMLElement): SimpleModal {\r\n const modalId = triggerElement.getAttribute('data-simple-modal-trigger') ?? ''\r\n let instance = SimpleModal.instances.get(modalId);\r\n\r\n if (!instance) {\r\n instance = new SimpleModal(triggerElement);\r\n SimpleModal.instances.set(modalId, instance);\r\n }\r\n\r\n return instance;\r\n }\r\n\r\n async init() {\r\n //if (!this.modalElement) {\r\n // Check if Ajax call\r\n if (this.modalId.indexOf('/') > -1) {\r\n let response = await fetch(this.modalId)\r\n let data = await response.text()\r\n\r\n this.modalElement = document.createElement('div')\r\n this.modalElement.classList.add('simple-modal')\r\n this.modalElement.classList.add('simple-modal-href')\r\n let subEl = document.createElement('div')\r\n subEl.classList.add('simple-modal-content')\r\n subEl.style.zIndex = '1000'\r\n subEl.innerHTML = data\r\n this.modalElement.appendChild(subEl)\r\n this.modalElement.style.display = 'block'\r\n\r\n let me = document.querySelector('.simple-modal-href')\r\n me?.remove()\r\n\r\n // Extract and execute any <script> tags from the fetched HTML\r\n let tempDiv = document.createElement('div');\r\n tempDiv.innerHTML = data;\r\n let scripts = tempDiv.querySelectorAll('script');\r\n\r\n scripts.forEach(script => {\r\n let newScript = document.createElement('script');\r\n if (script.src) {\r\n // External script\r\n newScript.src = script.src;\r\n } else {\r\n // Inline script\r\n newScript.textContent = script.textContent;\r\n }\r\n document.body.appendChild(newScript); // Append and execute the script\r\n });\r\n\r\n document.body.appendChild(this.modalElement)\r\n }\r\n else {\r\n this.modalElement = document.querySelector(this.modalId) as HTMLElement\r\n }\r\n\r\n // Append backdrop\r\n this.backdrop = this.modalElement.querySelector(\".simple-modal-backdrop\") as HTMLElement;\r\n if (!this.backdrop) {\r\n this.backdrop = document.createElement(\"div\")\r\n this.backdrop.innerHTML = \"<div class=\\\"simple-modal-backdrop\\\"></div>\"\r\n this.modalElement.appendChild(this.backdrop)\r\n }\r\n\r\n this.modalElement.querySelectorAll('.simple-modal-close').forEach(closeTrigger => {\r\n closeTrigger.addEventListener('click', (event) => this.close(event))\r\n })\r\n\r\n // Run Js\r\n if (this.modalJs) {\r\n new Function(this.modalJs)()\r\n }\r\n //}\r\n }\r\n\r\n async open() {\r\n await this.init()\r\n if (this.modalElement)\r\n this.modalElement.style.display = 'block';\r\n }\r\n\r\n close(event: Event) {\r\n event.preventDefault()\r\n\r\n if (this.modalElement)\r\n this.modalElement.style.display = 'none';\r\n }\r\n}\r\n\r\ndocument.addEventListener('click', (event) => {\r\n let el = (event.target as HTMLElement).closest('[data-simple-modal-trigger]')\r\n\r\n if (el) {\r\n event.preventDefault()\r\n\r\n let sm = SimpleModal.getInstance(el as HTMLElement)\r\n sm.open()\r\n }\r\n})","const syncTextFields = document.querySelectorAll<HTMLSelectElement>('[data-syncfieldtext]')\r\nconst syncFields = document.querySelectorAll<HTMLInputElement>('[data-syncfield]')\r\n\r\nsyncTextFields.forEach(el => {\r\n el.addEventListener('change', function () {\r\n document.querySelectorAll<HTMLInputElement>(this.getAttribute('data-syncfieldtext') ?? '').forEach(syncEl => {\r\n if (el.selectedIndex > 0) {\r\n syncEl[syncEl.tagName === 'INPUT' || syncEl.tagName === 'TEXTAREA' || syncEl.tagName === 'SELECT' ? 'value' : 'innerHTML'] = el.options[el.selectedIndex].text;\r\n }\r\n });\r\n });\r\n});\r\n\r\nsyncFields.forEach(el => {\r\n el.addEventListener('input', function () {\r\n let format = this.getAttribute('data-syncformat')\r\n\r\n document.querySelectorAll<HTMLInputElement>(this.getAttribute('data-syncfield') ?? '').forEach(syncEl => {\r\n let val = this.value\r\n\r\n if (format == 'number') {\r\n val = val.replace('$', '').replace(/,/g, '')\r\n }\r\n\r\n syncEl[syncEl.tagName === 'INPUT' || syncEl.tagName === 'TEXTAREA' || syncEl.tagName === 'SELECT' ? 'value' : 'innerHTML'] = val;\r\n })\r\n });\r\n});","document.addEventListener('click', function (event) {\r\n let el = event.target as HTMLFormElement\r\n\r\n if (el.classList.contains('credit-check-btn')) {\r\n let data = new FormData(el.form);\r\n\r\n fetch('/?handler=GetCredit', {\r\n method: 'POST', headers: { 'Content-Type': 'application/json' }, body: data\r\n })\r\n .then(response => {\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok ' + response.statusText);\r\n }\r\n return response.json();\r\n })\r\n .then(data => {\r\n var ele = document.getElementById('my-credit-score');\r\n if (ele) {\r\n ele.innerHTML = data.score;\r\n\r\n let r = null;\r\n if (data.score >= 750) {\r\n r = document.getElementById('credit-score-excellent') as HTMLInputElement;\r\n }\r\n else if (data.score >= 700 && data.score <= 749) {\r\n r = document.getElementById('credit-score-good') as HTMLInputElement;\r\n }\r\n else if (data.score >= 640 && data.score <= 699) {\r\n r = document.getElementById('credit-score-fair') as HTMLInputElement;\r\n }\r\n else if (data.score <= 639) {\r\n r = document.getElementById('credit-score-poor') as HTMLInputElement;\r\n }\r\n\r\n if (r) {\r\n r.click();\r\n r.checked = true;\r\n }\r\n }\r\n })\r\n .catch(error => {\r\n alert(\"Error: \" + error)\r\n });\r\n\r\n }\r\n})","(function (e, t) { if (typeof define === \"function\" && define.amd) { define([], t) } else if (typeof module === \"object\" && module.exports) { module.exports = t() } else { e.htmx = e.htmx || t() } })(typeof self !== \"undefined\" ? self : this, function () { return function () { \"use strict\"; var Q = { onLoad: F, process: zt, on: de, off: ge, trigger: ce, ajax: Nr, find: C, findAll: f, closest: v, values: function (e, t) { var r = dr(e, t || \"post\"); return r.values }, remove: _, addClass: z, removeClass: n, toggleClass: $, takeClass: W, defineExtension: Ur, removeExtension: Br, logAll: V, logNone: j, logger: null, config: { historyEnabled: true, historyCacheSize: 10, refreshOnHistoryMiss: false, defaultSwapStyle: \"innerHTML\", defaultSwapDelay: 0, defaultSettleDelay: 20, includeIndicatorStyles: true, indicatorClass: \"htmx-indicator\", requestClass: \"htmx-request\", addedClass: \"htmx-added\", settlingClass: \"htmx-settling\", swappingClass: \"htmx-swapping\", allowEval: true, allowScriptTags: true, inlineScriptNonce: \"\", attributesToSettle: [\"class\", \"style\", \"width\", \"height\"], withCredentials: false, timeout: 0, wsReconnectDelay: \"full-jitter\", wsBinaryType: \"blob\", disableSelector: \"[hx-disable], [data-hx-disable]\", useTemplateFragments: false, scrollBehavior: \"smooth\", defaultFocusScroll: false, getCacheBusterParam: false, globalViewTransitions: false, methodsThatUseUrlParams: [\"get\"], selfRequestsOnly: false, ignoreTitle: false, scrollIntoViewOnBoost: true, triggerSpecsCache: null }, parseInterval: d, _: t, createEventSource: function (e) { return new EventSource(e, { withCredentials: true }) }, createWebSocket: function (e) { var t = new WebSocket(e, []); t.binaryType = Q.config.wsBinaryType; return t }, version: \"1.9.10\" }; var r = { addTriggerHandler: Lt, bodyContains: se, canAccessLocalStorage: U, findThisElement: xe, filterValues: yr, hasAttribute: o, getAttributeValue: te, getClosestAttributeValue: ne, getClosestMatch: c, getExpressionVars: Hr, getHeaders: xr, getInputValues: dr, getInternalData: ae, getSwapSpecification: wr, getTriggerSpecs: it, getTarget: ye, makeFragment: l, mergeObjects: le, makeSettleInfo: T, oobSwap: Ee, querySelectorExt: ue, selectAndSwap: je, settleImmediately: nr, shouldCancel: ut, triggerEvent: ce, triggerErrorEvent: fe, withExtensions: R }; var w = [\"get\", \"post\", \"put\", \"delete\", \"patch\"]; var i = w.map(function (e) { return \"[hx-\" + e + \"], [data-hx-\" + e + \"]\" }).join(\", \"); var S = e(\"head\"), q = e(\"title\"), H = e(\"svg\", true); function e(e, t = false) { return new RegExp(`<${e}(\\\\s[^>]*>|>)([\\\\s\\\\S]*?)<\\\\/${e}>`, t ? \"gim\" : \"im\") } function d(e) { if (e == undefined) { return undefined } let t = NaN; if (e.slice(-2) == \"ms\") { t = parseFloat(e.slice(0, -2)) } else if (e.slice(-1) == \"s\") { t = parseFloat(e.slice(0, -1)) * 1e3 } else if (e.slice(-1) == \"m\") { t = parseFloat(e.slice(0, -1)) * 1e3 * 60 } else { t = parseFloat(e) } return isNaN(t) ? undefined : t } function ee(e, t) { return e.getAttribute && e.getAttribute(t) } function o(e, t) { return e.hasAttribute && (e.hasAttribute(t) || e.hasAttribute(\"data-\" + t)) } function te(e, t) { return ee(e, t) || ee(e, \"data-\" + t) } function u(e) { return e.parentElement } function re() { return document } function c(e, t) { while (e && !t(e)) { e = u(e) } return e ? e : null } function L(e, t, r) { var n = te(t, r); var i = te(t, \"hx-disinherit\"); if (e !== t && i && (i === \"*\" || i.split(\" \").indexOf(r) >= 0)) { return \"unset\" } else { return n } } function ne(t, r) { var n = null; c(t, function (e) { return n = L(t, e, r) }); if (n !== \"unset\") { return n } } function h(e, t) { var r = e.matches || e.matchesSelector || e.msMatchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.oMatchesSelector; return r && r.call(e, t) } function A(e) { var t = /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i; var r = t.exec(e); if (r) { return r[1].toLowerCase() } else { return \"\" } } function a(e, t) { var r = new DOMParser; var n = r.parseFromString(e, \"text/html\"); var i = n.body; while (t > 0) { t--; i = i.firstChild } if (i == null) { i = re().createDocumentFragment() } return i } function N(e) { return /<body/.test(e) } function l(e) { var t = !N(e); var r = A(e); var n = e; if (r === \"head\") { n = n.replace(S, \"\") } if (Q.config.useTemplateFragments && t) { var i = a(\"<body><template>\" + n + \"</template></body>\", 0); return i.querySelector(\"template\").content } switch (r) { case \"thead\": case \"tbody\": case \"tfoot\": case \"colgroup\": case \"caption\": return a(\"<table>\" + n + \"</table>\", 1); case \"col\": return a(\"<table><colgroup>\" + n + \"</colgroup></table>\", 2); case \"tr\": return a(\"<table><tbody>\" + n + \"</tbody></table>\", 2); case \"td\": case \"th\": return a(\"<table><tbody><tr>\" + n + \"</tr></tbody></table>\", 3); case \"script\": case \"style\": return a(\"<div>\" + n + \"</div>\", 1); default: return a(n, 0) } } function ie(e) { if (e) { e() } } function I(e, t) { return Object.prototype.toString.call(e) === \"[object \" + t + \"]\" } function k(e) { return I(e, \"Function\") } function P(e) { return I(e, \"Object\") } function ae(e) { var t = \"htmx-internal-data\"; var r = e[t]; if (!r) { r = e[t] = {} } return r } function M(e) { var t = []; if (e) { for (var r = 0; r < e.length; r++) { t.push(e[r]) } } return t } function oe(e, t) { if (e) { for (var r = 0; r < e.length; r++) { t(e[r]) } } } function X(e) { var t = e.getBoundingClientRect(); var r = t.top; var n = t.bottom; return r < window.innerHeight && n >= 0 } function se(e) { if (e.getRootNode && e.getRootNode() instanceof window.ShadowRoot) { return re().body.contains(e.getRootNode().host) } else { return re().body.contains(e) } } function D(e) { return e.trim().split(/\\s+/) } function le(e, t) { for (var r in t) { if (t.hasOwnProperty(r)) { e[r] = t[r] } } return e } function E(e) { try { return JSON.parse(e) } catch (e) { b(e); return null } } function U() { var e = \"htmx:localStorageTest\"; try { localStorage.setItem(e, e); localStorage.removeItem(e); return true } catch (e) { return false } } function B(t) { try { var e = new URL(t); if (e) { t = e.pathname + e.search } if (!/^\\/$/.test(t)) { t = t.replace(/\\/+$/, \"\") } return t } catch (e) { return t } } function t(e) { return Tr(re().body, function () { return eval(e) }) } function F(t) { var e = Q.on(\"htmx:load\", function (e) { t(e.detail.elt) }); return e } function V() { Q.logger = function (e, t, r) { if (console) { console.log(t, e, r) } } } function j() { Q.logger = null } function C(e, t) { if (t) { return e.querySelector(t) } else { return C(re(), e) } } function f(e, t) { if (t) { return e.querySelectorAll(t) } else { return f(re(), e) } } function _(e, t) { e = g(e); if (t) { setTimeout(function () { _(e); e = null }, t) } else { e.parentElement.removeChild(e) } } function z(e, t, r) { e = g(e); if (r) { setTimeout(function () { z(e, t); e = null }, r) } else { e.classList && e.classList.add(t) } } function n(e, t, r) { e = g(e); if (r) { setTimeout(function () { n(e, t); e = null }, r) } else { if (e.classList) { e.classList.remove(t); if (e.classList.length === 0) { e.removeAttribute(\"class\") } } } } function $(e, t) { e = g(e); e.classList.toggle(t) } function W(e, t) { e = g(e); oe(e.parentElement.children, function (e) { n(e, t) }); z(e, t) } function v(e, t) { e = g(e); if (e.closest) { return e.closest(t) } else { do { if (e == null || h(e, t)) { return e } } while (e = e && u(e)); return null } } function s(e, t) { return e.substring(0, t.length) === t } function G(e, t) { return e.substring(e.length - t.length) === t } function J(e) { var t = e.trim(); if (s(t, \"<\") && G(t, \"/>\")) { return t.substring(1, t.length - 2) } else { return t } } function Z(e, t) { if (t.indexOf(\"closest \") === 0) { return [v(e, J(t.substr(8)))] } else if (t.indexOf(\"find \") === 0) { return [C(e, J(t.substr(5)))] } else if (t === \"next\") { return [e.nextElementSibling] } else if (t.indexOf(\"next \") === 0) { return [K(e, J(t.substr(5)))] } else if (t === \"previous\") { return [e.previousElementSibling] } else if (t.indexOf(\"previous \") === 0) { return [Y(e, J(t.substr(9)))] } else if (t === \"document\") { return [document] } else if (t === \"window\") { return [window] } else if (t === \"body\") { return [document.body] } else { return re().querySelectorAll(J(t)) } } var K = function (e, t) { var r = re().querySelectorAll(t); for (var n = 0; n < r.length; n++) { var i = r[n]; if (i.compareDocumentPosition(e) === Node.DOCUMENT_POSITION_PRECEDING) { return i } } }; var Y = function (e, t) { var r = re().querySelectorAll(t); for (var n = r.length - 1; n >= 0; n--) { var i = r[n]; if (i.compareDocumentPosition(e) === Node.DOCUMENT_POSITION_FOLLOWING) { return i } } }; function ue(e, t) { if (t) { return Z(e, t)[0] } else { return Z(re().body, e)[0] } } function g(e) { if (I(e, \"String\")) { return C(e) } else { return e } } function ve(e, t, r) { if (k(t)) { return { target: re().body, event: e, listener: t } } else { return { target: g(e), event: t, listener: r } } } function de(t, r, n) { jr(function () { var e = ve(t, r, n); e.target.addEventListener(e.event, e.listener) }); var e = k(r); return e ? r : n } function ge(t, r, n) { jr(function () { var e = ve(t, r, n); e.target.removeEventListener(e.event, e.listener) }); return k(r) ? r : n } var me = re().createElement(\"output\"); function pe(e, t) { var r = ne(e, t); if (r) { if (r === \"this\") { return [xe(e, t)] } else { var n = Z(e, r); if (n.length === 0) { b('The selector \"' + r + '\" on ' + t + \" returned no matches!\"); return [me] } else { return n } } } } function xe(e, t) { return c(e, function (e) { return te(e, t) != null }) } function ye(e) { var t = ne(e, \"hx-target\"); if (t) { if (t === \"this\") { return xe(e, \"hx-target\") } else { return ue(e, t) } } else { var r = ae(e); if (r.boosted) { return re().body } else { return e } } } function be(e) { var t = Q.config.attributesToSettle; for (var r = 0; r < t.length; r++) { if (e === t[r]) { return true } } return false } function we(t, r) { oe(t.attributes, function (e) { if (!r.hasAttribute(e.name) && be(e.name)) { t.removeAttribute(e.name) } }); oe(r.attributes, function (e) { if (be(e.name)) { t.setAttribute(e.name, e.value) } }) } function Se(e, t) { var r = Fr(t); for (var n = 0; n < r.length; n++) { var i = r[n]; try { if (i.isInlineSwap(e)) { return true } } catch (e) { b(e) } } return e === \"outerHTML\" } function Ee(e, i, a) { var t = \"#\" + ee(i, \"id\"); var o = \"outerHTML\"; if (e === \"true\") { } else if (e.indexOf(\":\") > 0) { o = e.substr(0, e.indexOf(\":\")); t = e.substr(e.indexOf(\":\") + 1, e.length) } else { o = e } var r = re().querySelectorAll(t); if (r) { oe(r, function (e) { var t; var r = i.cloneNode(true); t = re().createDocumentFragment(); t.appendChild(r); if (!Se(o, e)) { t = r } var n = { shouldSwap: true, target: e, fragment: t }; if (!ce(e, \"htmx:oobBeforeSwap\", n)) return; e = n.target; if (n[\"shouldSwap\"]) { Fe(o, e, e, t, a) } oe(a.elts, function (e) { ce(e, \"htmx:oobAfterSwap\", n) }) }); i.parentNode.removeChild(i) } else { i.parentNode.removeChild(i); fe(re().body, \"htmx:oobErrorNoTarget\", { content: i }) } return e } function Ce(e, t, r) { var n = ne(e, \"hx-select-oob\"); if (n) { var i = n.split(\",\"); for (var a = 0; a < i.length; a++) { var o = i[a].split(\":\", 2); var s = o[0].trim(); if (s.indexOf(\"#\") === 0) { s = s.substring(1) } var l = o[1] || \"true\"; var u = t.querySelector(\"#\" + s); if (u) { Ee(l, u, r) } } } oe(f(t, \"[hx-swap-oob], [data-hx-swap-oob]\"), function (e) { var t = te(e, \"hx-swap-oob\"); if (t != null) { Ee(t, e, r) } }) } function Re(e) { oe(f(e, \"[hx-preserve], [data-hx-preserve]\"), function (e) { var t = te(e, \"id\"); var r = re().getElementById(t); if (r != null) { e.parentNode.replaceChild(r, e) } }) } function Te(o, e, s) { oe(e.querySelectorAll(\"[id]\"), function (e) { var t = ee(e, \"id\"); if (t && t.length > 0) { var r = t.replace(\"'\", \"\\\\'\"); var n = e.tagName.replace(\":\", \"\\\\:\"); var i = o.querySelector(n + \"[id='\" + r + \"']\"); if (i && i !== o) { var a = e.cloneNode(); we(e, i); s.tasks.push(function () { we(e, a) }) } } }) } function Oe(e) { return function () { n(e, Q.config.addedClass); zt(e); Nt(e); qe(e); ce(e, \"htmx:load\") } } function qe(e) { var t = \"[autofocus]\"; var r = h(e, t) ? e : e.querySelector(t); if (r != null) { r.focus() } } function m(e, t, r, n) { Te(e, r, n); while (r.childNodes.length > 0) { var i = r.firstChild; z(i, Q.config.addedClass); e.insertBefore(i, t); if (i.nodeType !== Node.TEXT_NODE && i.nodeType !== Node.COMMENT_NODE) { n.tasks.push(Oe(i)) } } } function He(e, t) { var r = 0; while (r < e.length) { t = (t << 5) - t + e.charCodeAt(r++) | 0 } return t } function Le(e) { var t = 0; if (e.attributes) { for (var r = 0; r < e.attributes.length; r++) { var n = e.attributes[r]; if (n.value) { t = He(n.name, t); t = He(n.value, t) } } } return t } function Ae(e) { var t = ae(e); if (t.onHandlers) { for (var r = 0; r < t.onHandlers.length; r++) { const n = t.onHandlers[r]; e.removeEventListener(n.event, n.listener) } delete t.onHandlers } } function Ne(e) { var t = ae(e); if (t.timeout) { clearTimeout(t.timeout) } if (t.webSocket) { t.webSocket.close() } if (t.sseEventSource) { t.sseEventSource.close() } if (t.listenerInfos) { oe(t.listenerInfos, function (e) { if (e.on) { e.on.removeEventListener(e.trigger, e.listener) } }) } Ae(e); oe(Object.keys(t), function (e) { delete t[e] }) } function p(e) { ce(e, \"htmx:beforeCleanupElement\"); Ne(e); if (e.children) { oe(e.children, function (e) { p(e) }) } } function Ie(t, e, r) { if (t.tagName === \"BODY\") { return Ue(t, e, r) } else { var n; var i = t.previousSibling; m(u(t), t, e, r); if (i == null) { n = u(t).firstChild } else { n = i.nextSibling } r.elts = r.elts.filter(function (e) { return e != t }); while (n && n !== t) { if (n.nodeType === Node.ELEMENT_NODE) { r.elts.push(n) } n = n.nextElementSibling } p(t); u(t).removeChild(t) } } function ke(e, t, r) { return m(e, e.firstChild, t, r) } function Pe(e, t, r) { return m(u(e), e, t, r) } function Me(e, t, r) { return m(e, null, t, r) } function Xe(e, t, r) { return m(u(e), e.nextSibling, t, r) } function De(e, t, r) { p(e); return u(e).removeChild(e) } function Ue(e, t, r) { var n = e.firstChild; m(e, n, t, r); if (n) { while (n.nextSibling) { p(n.nextSibling); e.removeChild(n.nextSibling) } p(n); e.removeChild(n) } } function Be(e, t, r) { var n = r || ne(e, \"hx-select\"); if (n) { var i = re().createDocumentFragment(); oe(t.querySelectorAll(n), function (e) { i.appendChild(e) }); t = i } return t } function Fe(e, t, r, n, i) { switch (e) { case \"none\": return; case \"outerHTML\": Ie(r, n, i); return; case \"afterbegin\": ke(r, n, i); return; case \"beforebegin\": Pe(r, n, i); return; case \"beforeend\": Me(r, n, i); return; case \"afterend\": Xe(r, n, i); return; case \"delete\": De(r, n, i); return; default: var a = Fr(t); for (var o = 0; o < a.length; o++) { var s = a[o]; try { var l = s.handleSwap(e, r, n, i); if (l) { if (typeof l.length !== \"undefined\") { for (var u = 0; u < l.length; u++) { var f = l[u]; if (f.nodeType !== Node.TEXT_NODE && f.nodeType !== Node.COMMENT_NODE) { i.tasks.push(Oe(f)) } } } return } } catch (e) { b(e) } } if (e === \"innerHTML\") { Ue(r, n, i) } else { Fe(Q.config.defaultSwapStyle, t, r, n, i) } } } function Ve(e) { if (e.indexOf(\"<title\") > -1) { var t = e.replace(H, \"\"); var r = t.match(q); if (r) { return r[2] } } } function je(e, t, r, n, i, a) { i.title = Ve(n); var o = l(n); if (o) { Ce(r, o, i); o = Be(r, o, a); Re(o); return Fe(e, r, t, o, i) } } function _e(e, t, r) { var n = e.getResponseHeader(t); if (n.indexOf(\"{\") === 0) { var i = E(n); for (var a in i) { if (i.hasOwnProperty(a)) { var o = i[a]; if (!P(o)) { o = { value: o } } ce(r, a, o) } } } else { var s = n.split(\",\"); for (var l = 0; l < s.length; l++) { ce(r, s[l].trim(), []) } } } var ze = /\\s/; var x = /[\\s,]/; var $e = /[_$a-zA-Z]/; var We = /[_$a-zA-Z0-9]/; var Ge = ['\"', \"'\", \"/\"]; var Je = /[^\\s]/; var Ze = /[{(]/; var Ke = /[})]/; function Ye(e) { var t = []; var r = 0; while (r < e.length) { if ($e.exec(e.charAt(r))) { var n = r; while (We.exec(e.charAt(r + 1))) { r++ } t.push(e.substr(n, r - n + 1)) } else if (Ge.indexOf(e.charAt(r)) !== -1) { var i = e.charAt(r); var n = r; r++; while (r < e.length && e.charAt(r) !== i) { if (e.charAt(r) === \"\\\\\") { r++ } r++ } t.push(e.substr(n, r - n + 1)) } else { var a = e.charAt(r); t.push(a) } r++ } return t } function Qe(e, t, r) { return $e.exec(e.charAt(0)) && e !== \"true\" && e !== \"false\" && e !== \"this\" && e !== r && t !== \".\" } function et(e, t, r) { if (t[0] === \"[\") { t.shift(); var n = 1; var i = \" return (function(\" + r + \"){ return (\"; var a = null; while (t.length > 0) { var o = t[0]; if (o === \"]\") { n--; if (n === 0) { if (a === null) { i = i + \"true\" } t.shift(); i += \")})\"; try { var s = Tr(e, function () { return Function(i)() }, function () { return true }); s.source = i; return s } catch (e) { fe(re().body, \"htmx:syntax:error\", { error: e, source: i }); return null } } } else if (o === \"[\") { n++ } if (Qe(o, a, r)) { i += \"((\" + r + \".\" + o + \") ? (\" + r + \".\" + o + \") : (window.\" + o + \"))\" } else { i = i + o } a = t.shift() } } } function y(e, t) { var r = \"\"; while (e.length > 0 && !t.test(e[0])) { r += e.shift() } return r } function tt(e) { var t; if (e.length > 0 && Ze.test(e[0])) { e.shift(); t = y(e, Ke).trim(); e.shift() } else { t = y(e, x) } return t } var rt = \"input, textarea, select\"; function nt(e, t, r) { var n = []; var i = Ye(t); do { y(i, Je); var a = i.length; var o = y(i, /[,\\[\\s]/); if (o !== \"\") { if (o === \"every\") { var s = { trigger: \"every\" }; y(i, Je); s.pollInterval = d(y(i, /[,\\[\\s]/)); y(i, Je); var l = et(e, i, \"event\"); if (l) { s.eventFilter = l } n.push(s) } else if (o.indexOf(\"sse:\") === 0) { n.push({ trigger: \"sse\", sseEvent: o.substr(4) }) } else { var u = { trigger: o }; var l = et(e, i, \"event\"); if (l) { u.eventFilter = l } while (i.length > 0 && i[0] !== \",\") { y(i, Je); var f = i.shift(); if (f === \"changed\") { u.changed = true } else if (f === \"once\") { u.once = true } else if (f === \"consume\") { u.consume = true } else if (f === \"delay\" && i[0] === \":\") { i.shift(); u.delay = d(y(i, x)) } else if (f === \"from\" && i[0] === \":\") { i.shift(); if (Ze.test(i[0])) { var c = tt(i) } else { var c = y(i, x); if (c === \"closest\" || c === \"find\" || c === \"next\" || c === \"previous\") { i.shift(); var h = tt(i); if (h.length > 0) { c += \" \" + h } } } u.from = c } else if (f === \"target\" && i[0] === \":\") { i.shift(); u.target = tt(i) } else if (f === \"throttle\" && i[0] === \":\") { i.shift(); u.throttle = d(y(i, x)) } else if (f === \"queue\" && i[0] === \":\") { i.shift(); u.queue = y(i, x) } else if (f === \"root\" && i[0] === \":\") { i.shift(); u[f] = tt(i) } else if (f === \"threshold\" && i[0] === \":\") { i.shift(); u[f] = y(i, x) } else { fe(e, \"htmx:syntax:error\", { token: i.shift() }) } } n.push(u) } } if (i.length === a) { fe(e, \"htmx:syntax:error\", { token: i.shift() }) } y(i, Je) } while (i[0] === \",\" && i.shift()); if (r) { r[t] = n } return n } function it(e) { var t = te(e, \"hx-trigger\"); var r = []; if (t) { var n = Q.config.triggerSpecsCache; r = n && n[t] || nt(e, t, n) } if (r.length > 0) { return r } else if (h(e, \"form\")) { return [{ trigger: \"submit\" }] } else if (h(e, 'input[type=\"button\"], input[type=\"submit\"]')) { return [{ trigger: \"click\" }] } else if (h(e, rt)) { return [{ trigger: \"change\" }] } else { return [{ trigger: \"click\" }] } } function at(e) { ae(e).cancelled = true } function ot(e, t, r) { var n = ae(e); n.timeout = setTimeout(function () { if (se(e) && n.cancelled !== true) { if (!ct(r, e, Wt(\"hx:poll:trigger\", { triggerSpec: r, target: e }))) { t(e) } ot(e, t, r) } }, r.pollInterval) } function st(e) { return location.hostname === e.hostname && ee(e, \"href\") && ee(e, \"href\").indexOf(\"#\") !== 0 } function lt(t, r, e) { if (t.tagName === \"A\" && st(t) && (t.target === \"\" || t.target === \"_self\") || t.tagName === \"FORM\") { r.boosted = true; var n, i; if (t.tagName === \"A\") { n = \"get\"; i = ee(t, \"href\") } else { var a = ee(t, \"method\"); n = a ? a.toLowerCase() : \"get\"; if (n === \"get\") { } i = ee(t, \"action\") } e.forEach(function (e) { ht(t, function (e, t) { if (v(e, Q.config.disableSelector)) { p(e); return } he(n, i, e, t) }, r, e, true) }) } } function ut(e, t) { if (e.type === \"submit\" || e.type === \"click\") { if (t.tagName === \"FORM\") { return true } if (h(t, 'input[type=\"submit\"], button') && v(t, \"form\") !== null) { return true } if (t.tagName === \"A\" && t.href && (t.getAttribute(\"href\") === \"#\" || t.getAttribute(\"href\").indexOf(\"#\") !== 0)) { return true } } return false } function ft(e, t) { return ae(e).boosted && e.tagName === \"A\" && t.type === \"click\" && (t.ctrlKey || t.metaKey) } function ct(e, t, r) { var n = e.eventFilter; if (n) { try { return n.call(t, r) !== true } catch (e) { fe(re().body, \"htmx:eventFilter:error\", { error: e, source: n.source }); return true } } return false } function ht(a, o, e, s, l) { var u = ae(a); var t; if (s.from) { t = Z(a, s.from) } else { t = [a] } if (s.changed) { t.forEach(function (e) { var t = ae(e); t.lastValue = e.value }) } oe(t, function (n) { var i = function (e) { if (!se(a)) { n.removeEventListener(s.trigger, i); return } if (ft(a, e)) { return } if (l || ut(e, a)) { e.preventDefault() } if (ct(s, a, e)) { return } var t = ae(e); t.triggerSpec = s; if (t.handledFor == null) { t.handledFor = [] } if (t.handledFor.indexOf(a) < 0) { t.handledFor.push(a); if (s.consume) { e.stopPropagation() } if (s.target && e.target) { if (!h(e.target, s.target)) { return } } if (s.once) { if (u.triggeredOnce) { return } else { u.triggeredOnce = true } } if (s.changed) { var r = ae(n); if (r.lastValue === n.value) { return } r.lastValue = n.value } if (u.delayed) { clearTimeout(u.delayed) } if (u.throttle) { return } if (s.throttle > 0) { if (!u.throttle) { o(a, e); u.throttle = setTimeout(function () { u.throttle = null }, s.throttle) } } else if (s.delay > 0) { u.delayed = setTimeout(function () { o(a, e) }, s.delay) } else { ce(a, \"htmx:trigger\"); o(a, e) } } }; if (e.listenerInfos == null) { e.listenerInfos = [] } e.listenerInfos.push({ trigger: s.trigger, listener: i, on: n }); n.addEventListener(s.trigger, i) }) } var vt = false; var dt = null; function gt() { if (!dt) { dt = function () { vt = true }; window.addEventListener(\"scroll\", dt); setInterval(function () { if (vt) { vt = false; oe(re().querySelectorAll(\"[hx-trigger='revealed'],[data-hx-trigger='revealed']\"), function (e) { mt(e) }) } }, 200) } } function mt(t) { if (!o(t, \"data-hx-revealed\") && X(t)) { t.setAttribute(\"data-hx-revealed\", \"true\"); var e = ae(t); if (e.initHash) { ce(t, \"revealed\") } else { t.addEventListener(\"htmx:afterProcessNode\", function (e) { ce(t, \"revealed\") }, { once: true }) } } } function pt(e, t, r) { var n = D(r); for (var i = 0; i < n.length; i++) { var a = n[i].split(/:(.+)/); if (a[0] === \"connect\") { xt(e, a[1], 0) } if (a[0] === \"send\") { bt(e) } } } function xt(s, r, n) { if (!se(s)) { return } if (r.indexOf(\"/\") == 0) { var e = location.hostname + (location.port ? \":\" + location.port : \"\"); if (location.protocol == \"https:\") { r = \"wss://\" + e + r } else if (location.protocol == \"http:\") { r = \"ws://\" + e + r } } var t = Q.createWebSocket(r); t.onerror = function (e) { fe(s, \"htmx:wsError\", { error: e, socket: t }); yt(s) }; t.onclose = function (e) { if ([1006, 1012, 1013].indexOf(e.code) >= 0) { var t = wt(n); setTimeout(function () { xt(s, r, n + 1) }, t) } }; t.onopen = function (e) { n = 0 }; ae(s).webSocket = t; t.addEventListener(\"message\", function (e) { if (yt(s)) { return } var t = e.data; R(s, function (e) { t = e.transformResponse(t, null, s) }); var r = T(s); var n = l(t); var i = M(n.children); for (var a = 0; a < i.length; a++) { var o = i[a]; Ee(te(o, \"hx-swap-oob\") || \"true\", o, r) } nr(r.tasks) }) } function yt(e) { if (!se(e)) { ae(e).webSocket.close(); return true } } function bt(u) { var f = c(u, function (e) { return ae(e).webSocket != null }); if (f) { u.addEventListener(it(u)[0].trigger, function (e) { var t = ae(f).webSocket; var r = xr(u, f); var n = dr(u, \"post\"); var i = n.errors; var a = n.values; var o = Hr(u); var s = le(a, o); var l = yr(s, u); l[\"HEADERS\"] = r; if (i && i.length > 0) { ce(u, \"htmx:validation:halted\", i); return } t.send(JSON.stringify(l)); if (ut(e, u)) { e.preventDefault() } }) } else { fe(u, \"htmx:noWebSocketSourceError\") } } function wt(e) { var t = Q.config.wsReconnectDelay; if (typeof t === \"function\") { return t(e) } if (t === \"full-jitter\") { var r = Math.min(e, 6); var n = 1e3 * Math.pow(2, r); return n * Math.random() } b('htmx.config.wsReconnectDelay must either be a function or the string \"full-jitter\"') } function St(e, t, r) { var n = D(r); for (var i = 0; i < n.length; i++) { var a = n[i].split(/:(.+)/); if (a[0] === \"connect\") { Et(e, a[1]) } if (a[0] === \"swap\") { Ct(e, a[1]) } } } function Et(t, e) { var r = Q.createEventSource(e); r.onerror = function (e) { fe(t, \"htmx:sseError\", { error: e, source: r }); Tt(t) }; ae(t).sseEventSource = r } function Ct(a, o) { var s = c(a, Ot); if (s) { var l = ae(s).sseEventSource; var u = function (e) { if (Tt(s)) { return } if (!se(a)) { l.removeEventListener(o, u); return } var t = e.data; R(a, function (e) { t = e.transformResponse(t, null, a) }); var r = wr(a); var n = ye(a); var i = T(a); je(r.swapStyle, n, a, t, i); nr(i.tasks); ce(a, \"htmx:sseMessage\", e) }; ae(a).sseListener = u; l.addEventListener(o, u) } else { fe(a, \"htmx:noSSESourceError\") } } function Rt(e, t, r) { var n = c(e, Ot); if (n) { var i = ae(n).sseEventSource; var a = function () { if (!Tt(n)) { if (se(e)) { t(e) } else { i.removeEventListener(r, a) } } }; ae(e).sseListener = a; i.addEventListener(r, a) } else { fe(e, \"htmx:noSSESourceError\") } } function Tt(e) { if (!se(e)) { ae(e).sseEventSource.close(); return true } } function Ot(e) { return ae(e).sseEventSource != null } function qt(e, t, r, n) { var i = function () { if (!r.loaded) { r.loaded = true; t(e) } }; if (n > 0) { setTimeout(i, n) } else { i() } } function Ht(t, i, e) { var a = false; oe(w, function (r) { if (o(t, \"hx-\" + r)) { var n = te(t, \"hx-\" + r); a = true; i.path = n; i.verb = r; e.forEach(function (e) { Lt(t, e, i, function (e, t) { if (v(e, Q.config.disableSelector)) { p(e); return } he(r, n, e, t) }) }) } }); return a } function Lt(n, e, t, r) { if (e.sseEvent) { Rt(n, r, e.sseEvent) } else if (e.trigger === \"revealed\") { gt(); ht(n, r, t, e); mt(n) } else if (e.trigger === \"intersect\") { var i = {}; if (e.root) { i.root = ue(n, e.root) } if (e.threshold) { i.threshold = parseFloat(e.threshold) } var a = new IntersectionObserver(function (e) { for (var t = 0; t < e.length; t++) { var r = e[t]; if (r.isIntersecting) { ce(n, \"intersect\"); break } } }, i); a.observe(n); ht(n, r, t, e) } else if (e.trigger === \"load\") { if (!ct(e, n, Wt(\"load\", { elt: n }))) { qt(n, r, t, e.delay) } } else if (e.pollInterval > 0) { t.polling = true; ot(n, r, e) } else { ht(n, r, t, e) } } function At(e) { if (Q.config.allowScriptTags && (e.type === \"text/javascript\" || e.type === \"module\" || e.type === \"\")) { var t = re().createElement(\"script\"); oe(e.attributes, function (e) { t.setAttribute(e.name, e.value) }); t.textContent = e.textContent; t.async = false; if (Q.config.inlineScriptNonce) { t.nonce = Q.config.inlineScriptNonce } var r = e.parentElement; try { r.insertBefore(t, e) } catch (e) { b(e) } finally { if (e.parentElement) { e.parentElement.removeChild(e) } } } } function Nt(e) { if (h(e, \"script\")) { At(e) } oe(f(e, \"script\"), function (e) { At(e) }) } function It(e) { var t = e.attributes; for (var r = 0; r < t.length; r++) { var n = t[r].name; if (s(n, \"hx-on:\") || s(n, \"data-hx-on:\") || s(n, \"hx-on-\") || s(n, \"data-hx-on-\")) { return true } } return false } function kt(e) { var t = null; var r = []; if (It(e)) { r.push(e) } if (document.evaluate) { var n = document.evaluate('.//*[@*[ starts-with(name(), \"hx-on:\") or starts-with(name(), \"data-hx-on:\") or' + ' starts-with(name(), \"hx-on-\") or starts-with(name(), \"data-hx-on-\") ]]', e); while (t = n.iterateNext()) r.push(t) } else { var i = e.getElementsByTagName(\"*\"); for (var a = 0; a < i.length; a++) { if (It(i[a])) { r.push(i[a]) } } } return r } function Pt(e) { if (e.querySelectorAll) { var t = \", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]\"; var r = e.querySelectorAll(i + t + \", form, [type='submit'], [hx-sse], [data-hx-sse], [hx-ws],\" + \" [data-hx-ws], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger], [hx-on], [data-hx-on]\"); return r } else { return [] } } function Mt(e) { var t = v(e.target, \"button, input[type='submit']\"); var r = Dt(e); if (r) { r.lastButtonClicked = t } } function Xt(e) { var t = Dt(e); if (t) { t.lastButtonClicked = null } } function Dt(e) { var t = v(e.target, \"button, input[type='submit']\"); if (!t) { return } var r = g(\"#\" + ee(t, \"form\")) || v(t, \"form\"); if (!r) { return } return ae(r) } function Ut(e) { e.addEventListener(\"click\", Mt); e.addEventListener(\"focusin\", Mt); e.addEventListener(\"focusout\", Xt) } function Bt(e) { var t = Ye(e); var r = 0; for (var n = 0; n < t.length; n++) { const i = t[n]; if (i === \"{\") { r++ } else if (i === \"}\") { r-- } } return r } function Ft(t, e, r) { var n = ae(t); if (!Array.isArray(n.onHandlers)) { n.onHandlers = [] } var i; var a = function (e) { return Tr(t, function () { if (!i) { i = new Function(\"event\", r) } i.call(t, e) }) }; t.addEventListener(e, a); n.onHandlers.push({ event: e, listener: a }) } function Vt(e) { var t = te(e, \"hx-on\"); if (t) { var r = {}; var n = t.split(\"\\n\"); var i = null; var a = 0; while (n.length > 0) { var o = n.shift(); var s = o.match(/^\\s*([a-zA-Z:\\-\\.]+:)(.*)/); if (a === 0 && s) { o.split(\":\"); i = s[1].slice(0, -1); r[i] = s[2] } else { r[i] += o } a += Bt(o) } for (var l in r) { Ft(e, l, r[l]) } } } function jt(e) { Ae(e); for (var t = 0; t < e.attributes.length; t++) { var r = e.attributes[t].name; var n = e.attributes[t].value; if (s(r, \"hx-on\") || s(r, \"data-hx-on\")) { var i = r.indexOf(\"-on\") + 3; var a = r.slice(i, i + 1); if (a === \"-\" || a === \":\") { var o = r.slice(i + 1); if (s(o, \":\")) { o = \"htmx\" + o } else if (s(o, \"-\")) { o = \"htmx:\" + o.slice(1) } else if (s(o, \"htmx-\")) { o = \"htmx:\" + o.slice(5) } Ft(e, o, n) } } } } function _t(t) { if (v(t, Q.config.disableSelector)) { p(t); return } var r = ae(t); if (r.initHash !== Le(t)) { Ne(t); r.initHash = Le(t); Vt(t); ce(t, \"htmx:beforeProcessNode\"); if (t.value) { r.lastValue = t.value } var e = it(t); var n = Ht(t, r, e); if (!n) { if (ne(t, \"hx-boost\") === \"true\") { lt(t, r, e) } else if (o(t, \"hx-trigger\")) { e.forEach(function (e) { Lt(t, e, r, function () { }) }) } } if (t.tagName === \"FORM\" || ee(t, \"type\") === \"submit\" && o(t, \"form\")) { Ut(t) } var i = te(t, \"hx-sse\"); if (i) { St(t, r, i) } var a = te(t, \"hx-ws\"); if (a) { pt(t, r, a) } ce(t, \"htmx:afterProcessNode\") } } function zt(e) { e = g(e); if (v(e, Q.config.disableSelector)) { p(e); return } _t(e); oe(Pt(e), function (e) { _t(e) }); oe(kt(e), jt) } function $t(e) { return e.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase() } function Wt(e, t) { var r; if (window.CustomEvent && typeof window.CustomEvent === \"function\") { r = new CustomEvent(e, { bubbles: true, cancelable: true, detail: t }) } else { r = re().createEvent(\"CustomEvent\"); r.initCustomEvent(e, true, true, t) } return r } function fe(e, t, r) { ce(e, t, le({ error: t }, r)) } function Gt(e) { return e === \"htmx:afterProcessNode\" } function R(e, t) { oe(Fr(e), function (e) { try { t(e) } catch (e) { b(e) } }) } function b(e) { if (console.error) { console.error(e) } else if (console.log) { console.log(\"ERROR: \", e) } } function ce(e, t, r) { e = g(e); if (r == null) { r = {} } r[\"elt\"] = e; var n = Wt(t, r); if (Q.logger && !Gt(t)) { Q.logger(e, t, r) } if (r.error) { b(r.error); ce(e, \"htmx:error\", { errorInfo: r }) } var i = e.dispatchEvent(n); var a = $t(t); if (i && a !== t) { var o = Wt(a, n.detail); i = i && e.dispatchEvent(o) } R(e, function (e) { i = i && (e.onEvent(t, n) !== false && !n.defaultPrevented) }); return i } var Jt = location.pathname + location.search; function Zt() { var e = re().querySelector(\"[hx-history-elt],[data-hx-history-elt]\"); return e || re().body } function Kt(e, t, r, n) { if (!U()) { return } if (Q.config.historyCacheSize <= 0) { localStorage.removeItem(\"htmx-history-cache\"); return } e = B(e); var i = E(localStorage.getItem(\"htmx-history-cache\")) || []; for (var a = 0; a < i.length; a++) { if (i[a].url === e) { i.splice(a, 1); break } } var o = { url: e, content: t, title: r, scroll: n }; ce(re().body, \"htmx:historyItemCreated\", { item: o, cache: i }); i.push(o); while (i.length > Q.config.historyCacheSize) { i.shift() } while (i.length > 0) { try { localStorage.setItem(\"htmx-history-cache\", JSON.stringify(i)); break } catch (e) { fe(re().body, \"htmx:historyCacheError\", { cause: e, cache: i }); i.shift() } } } function Yt(e) { if (!U()) { return null } e = B(e); var t = E(localStorage.getItem(\"htmx-history-cache\")) || []; for (var r = 0; r < t.length; r++) { if (t[r].url === e) { return t[r] } } return null } function Qt(e) { var t = Q.config.requestClass; var r = e.cloneNode(true); oe(f(r, \".\" + t), function (e) { n(e, t) }); return r.innerHTML } function er() { var e = Zt(); var t = Jt || location.pathname + location.search; var r; try { r = re().querySelector('[hx-history=\"false\" i],[data-hx-history=\"false\" i]') } catch (e) { r = re().querySelector('[hx-history=\"false\"],[data-hx-history=\"false\"]') } if (!r) { ce(re().body, \"htmx:beforeHistorySave\", { path: t, historyElt: e }); Kt(t, Qt(e), re().title, window.scrollY) } if (Q.config.historyEnabled) history.replaceState({ htmx: true }, re().title, window.location.href) } function tr(e) { if (Q.config.getCacheBusterParam) { e = e.replace(/org\\.htmx\\.cache-buster=[^&]*&?/, \"\"); if (G(e, \"&\") || G(e, \"?\")) { e = e.slice(0, -1) } } if (Q.config.historyEnabled) { history.pushState({ htmx: true }, \"\", e) } Jt = e } function rr(e) { if (Q.config.historyEnabled) history.replaceState({ htmx: true }, \"\", e); Jt = e } function nr(e) { oe(e, function (e) { e.call() }) } function ir(a) { var e = new XMLHttpRequest; var o = { path: a, xhr: e }; ce(re().body, \"htmx:historyCacheMiss\", o); e.open(\"GET\", a, true); e.setRequestHeader(\"HX-Request\", \"true\"); e.setRequestHeader(\"HX-History-Restore-Request\", \"true\"); e.setRequestHeader(\"HX-Current-URL\", re().location.href); e.onload = function () { if (this.status >= 200 && this.status < 400) { ce(re().body, \"htmx:historyCacheMissLoad\", o); var e = l(this.response); e = e.querySelector(\"[hx-history-elt],[data-hx-history-elt]\") || e; var t = Zt(); var r = T(t); var n = Ve(this.response); if (n) { var i = C(\"title\"); if (i) { i.innerHTML = n } else { window.document.title = n } } Ue(t, e, r); nr(r.tasks); Jt = a; ce(re().body, \"htmx:historyRestore\", { path: a, cacheMiss: true, serverResponse: this.response }) } else { fe(re().body, \"htmx:historyCacheMissLoadError\", o) } }; e.send() } function ar(e) { er(); e = e || location.pathname + location.search; var t = Yt(e); if (t) { var r = l(t.content); var n = Zt(); var i = T(n); Ue(n, r, i); nr(i.tasks); document.title = t.title; setTimeout(function () { window.scrollTo(0, t.scroll) }, 0); Jt = e; ce(re().body, \"htmx:historyRestore\", { path: e, item: t }) } else { if (Q.config.refreshOnHistoryMiss) { window.location.reload(true) } else { ir(e) } } } function or(e) { var t = pe(e, \"hx-indicator\"); if (t == null) { t = [e] } oe(t, function (e) { var t = ae(e); t.requestCount = (t.requestCount || 0) + 1; e.classList[\"add\"].call(e.classList, Q.config.requestClass) }); return t } function sr(e) { var t = pe(e, \"hx-disabled-elt\"); if (t == null) { t = [] } oe(t, function (e) { var t = ae(e); t.requestCount = (t.requestCount || 0) + 1; e.setAttribute(\"disabled\", \"\") }); return t } function lr(e, t) { oe(e, function (e) { var t = ae(e); t.requestCount = (t.requestCount || 0) - 1; if (t.requestCount === 0) { e.classList[\"remove\"].call(e.classList, Q.config.requestClass) } }); oe(t, function (e) { var t = ae(e); t.requestCount = (t.requestCount || 0) - 1; if (t.requestCount === 0) { e.removeAttribute(\"disabled\") } }) } function ur(e, t) { for (var r = 0; r < e.length; r++) { var n = e[r]; if (n.isSameNode(t)) { return true } } return false } function fr(e) { if (e.name === \"\" || e.name == null || e.disabled || v(e, \"fieldset[disabled]\")) { return false } if (e.type === \"button\" || e.type === \"submit\" || e.tagName === \"image\" || e.tagName === \"reset\" || e.tagName === \"file\") { return false } if (e.type === \"checkbox\" || e.type === \"radio\") { return e.checked } return true } function cr(e, t, r) { if (e != null && t != null) { var n = r[e]; if (n === undefined) { r[e] = t } else if (Array.isArray(n)) { if (Array.isArray(t)) { r[e] = n.concat(t) } else { n.push(t) } } else { if (Array.isArray(t)) { r[e] = [n].concat(t) } else { r[e] = [n, t] } } } } function hr(t, r, n, e, i) { if (e == null || ur(t, e)) { return } else { t.push(e) } if (fr(e)) { var a = ee(e, \"name\"); var o = e.value; if (e.multiple && e.tagName === \"SELECT\") { o = M(e.querySelectorAll(\"option:checked\")).map(function (e) { return e.value }) } if (e.files) { o = M(e.files) } cr(a, o, r); if (i) { vr(e, n) } } if (h(e, \"form\")) { var s = e.elements; oe(s, function (e) { hr(t, r, n, e, i) }) } } function vr(e, t) { if (e.willValidate) { ce(e, \"htmx:validation:validate\"); if (!e.checkValidity()) { t.push({ elt: e, message: e.validationMessage, validity: e.validity }); ce(e, \"htmx:validation:failed\", { message: e.validationMessage, validity: e.validity }) } } } function dr(e, t) { var r = []; var n = {}; var i = {}; var a = []; var o = ae(e); if (o.lastButtonClicked && !se(o.lastButtonClicked)) { o.lastButtonClicked = null } var s = h(e, \"form\") && e.noValidate !== true || te(e, \"hx-validate\") === \"true\"; if (o.lastButtonClicked) { s = s && o.lastButtonClicked.formNoValidate !== true } if (t !== \"get\") { hr(r, i, a, v(e, \"form\"), s) } hr(r, n, a, e, s); if (o.lastButtonClicked || e.tagName === \"BUTTON\" || e.tagName === \"INPUT\" && ee(e, \"type\") === \"submit\") { var l = o.lastButtonClicked || e; var u = ee(l, \"name\"); cr(u, l.value, i) } var f = pe(e, \"hx-include\"); oe(f, function (e) { hr(r, n, a, e, s); if (!h(e, \"form\")) { oe(e.querySelectorAll(rt), function (e) { hr(r, n, a, e, s) }) } }); n = le(n, i); return { errors: a, values: n } } function gr(e, t, r) { if (e !== \"\") { e += \"&\" } if (String(r) === \"[object Object]\") { r = JSON.stringify(r) } var n = encodeURIComponent(r); e += encodeURIComponent(t) + \"=\" + n; return e } function mr(e) { var t = \"\"; for (var r in e) { if (e.hasOwnProperty(r)) { var n = e[r]; if (Array.isArray(n)) { oe(n, function (e) { t = gr(t, r, e) }) } else { t = gr(t, r, n) } } } return t } function pr(e) { var t = new FormData; for (var r in e) { if (e.hasOwnProperty(r)) { var n = e[r]; if (Array.isArray(n)) { oe(n, function (e) { t.append(r, e) }) } else { t.append(r, n) } } } return t } function xr(e, t, r) { var n = { \"HX-Request\": \"true\", \"HX-Trigger\": ee(e, \"id\"), \"HX-Trigger-Name\": ee(e, \"name\"), \"HX-Target\": te(t, \"id\"), \"HX-Current-URL\": re().location.href }; Rr(e, \"hx-headers\", false, n); if (r !== undefined) { n[\"HX-Prompt\"] = r } if (ae(e).boosted) { n[\"HX-Boosted\"] = \"true\" } return n } function yr(t, e) { var r = ne(e, \"hx-params\"); if (r) { if (r === \"none\") { return {} } else if (r === \"*\") { return t } else if (r.indexOf(\"not \") === 0) { oe(r.substr(4).split(\",\"), function (e) { e = e.trim(); delete t[e] }); return t } else { var n = {}; oe(r.split(\",\"), function (e) { e = e.trim(); n[e] = t[e] }); return n } } else { return t } } function br(e) { return ee(e, \"href\") && ee(e, \"href\").indexOf(\"#\") >= 0 } function wr(e, t) { var r = t ? t : ne(e, \"hx-swap\"); var n = { swapStyle: ae(e).boosted ? \"innerHTML\" : Q.config.defaultSwapStyle, swapDelay: Q.config.defaultSwapDelay, settleDelay: Q.config.defaultSettleDelay }; if (Q.config.scrollIntoViewOnBoost && ae(e).boosted && !br(e)) { n[\"show\"] = \"top\" } if (r) { var i = D(r); if (i.length > 0) { for (var a = 0; a < i.length; a++) { var o = i[a]; if (o.indexOf(\"swap:\") === 0) { n[\"swapDelay\"] = d(o.substr(5)) } else if (o.indexOf(\"settle:\") === 0) { n[\"settleDelay\"] = d(o.substr(7)) } else if (o.indexOf(\"transition:\") === 0) { n[\"transition\"] = o.substr(11) === \"true\" } else if (o.indexOf(\"ignoreTitle:\") === 0) { n[\"ignoreTitle\"] = o.substr(12) === \"true\" } else if (o.indexOf(\"scroll:\") === 0) { var s = o.substr(7); var l = s.split(\":\"); var u = l.pop(); var f = l.length > 0 ? l.join(\":\") : null; n[\"scroll\"] = u; n[\"scrollTarget\"] = f } else if (o.indexOf(\"show:\") === 0) { var c = o.substr(5); var l = c.split(\":\"); var h = l.pop(); var f = l.length > 0 ? l.join(\":\") : null; n[\"show\"] = h; n[\"showTarget\"] = f } else if (o.indexOf(\"focus-scroll:\") === 0) { var v = o.substr(\"focus-scroll:\".length); n[\"focusScroll\"] = v == \"true\" } else if (a == 0) { n[\"swapStyle\"] = o } else { b(\"Unknown modifier in hx-swap: \" + o) } } } } return n } function Sr(e) { return ne(e, \"hx-encoding\") === \"multipart/form-data\" || h(e, \"form\") && ee(e, \"enctype\") === \"multipart/form-data\" } function Er(t, r, n) { var i = null; R(r, function (e) { if (i == null) { i = e.encodeParameters(t, n, r) } }); if (i != null) { return i } else { if (Sr(r)) { return pr(n) } else { return mr(n) } } } function T(e) { return { tasks: [], elts: [e] } } function Cr(e, t) { var r = e[0]; var n = e[e.length - 1]; if (t.scroll) { var i = null; if (t.scrollTarget) { i = ue(r, t.scrollTarget) } if (t.scroll === \"top\" && (r || i)) { i = i || r; i.scrollTop = 0 } if (t.scroll === \"bottom\" && (n || i)) { i = i || n; i.scrollTop = i.scrollHeight } } if (t.show) { var i = null; if (t.showTarget) { var a = t.showTarget; if (t.showTarget === \"window\") { a = \"body\" } i = ue(r, a) } if (t.show === \"top\" && (r || i)) { i = i || r; i.scrollIntoView({ block: \"start\", behavior: Q.config.scrollBehavior }) } if (t.show === \"bottom\" && (n || i)) { i = i || n; i.scrollIntoView({ block: \"end\", behavior: Q.config.scrollBehavior }) } } } function Rr(e, t, r, n) { if (n == null) { n = {} } if (e == null) { return n } var i = te(e, t); if (i) { var a = i.trim(); var o = r; if (a === \"unset\") { return null } if (a.indexOf(\"javascript:\") === 0) { a = a.substr(11); o = true } else if (a.indexOf(\"js:\") === 0) { a = a.substr(3); o = true } if (a.indexOf(\"{\") !== 0) { a = \"{\" + a + \"}\" } var s; if (o) { s = Tr(e, function () { return Function(\"return (\" + a + \")\")() }, {}) } else { s = E(a) } for (var l in s) { if (s.hasOwnProperty(l)) { if (n[l] == null) { n[l] = s[l] } } } } return Rr(u(e), t, r, n) } function Tr(e, t, r) { if (Q.config.allowEval) { return t() } else { fe(e, \"htmx:evalDisallowedError\"); return r } } function Or(e, t) { return Rr(e, \"hx-vars\", true, t) } function qr(e, t) { return Rr(e, \"hx-vals\", false, t) } function Hr(e) { return le(Or(e), qr(e)) } function Lr(t, r, n) { if (n !== null) { try { t.setRequestHeader(r, n) } catch (e) { t.setRequestHeader(r, encodeURIComponent(n)); t.setRequestHeader(r + \"-URI-AutoEncoded\", \"true\") } } } function Ar(t) { if (t.responseURL && typeof URL !== \"undefined\") { try { var e = new URL(t.responseURL); return e.pathname + e.search } catch (e) { fe(re().body, \"htmx:badResponseUrl\", { url: t.responseURL }) } } } function O(e, t) { return t.test(e.getAllResponseHeaders()) } function Nr(e, t, r) { e = e.toLowerCase(); if (r) { if (r instanceof Element || I(r, \"String\")) { return he(e, t, null, null, { targetOverride: g(r), returnPromise: true }) } else { return he(e, t, g(r.source), r.event, { handler: r.handler, headers: r.headers, values: r.values, targetOverride: g(r.target), swapOverride: r.swap, select: r.select, returnPromise: true }) } } else { return he(e, t, null, null, { returnPromise: true }) } } function Ir(e) { var t = []; while (e) { t.push(e); e = e.parentElement } return t } function kr(e, t, r) { var n; var i; if (typeof URL === \"function\") { i = new URL(t, document.location.href); var a = document.location.origin; n = a === i.origin } else { i = t; n = s(t, document.location.origin) } if (Q.config.selfRequestsOnly) { if (!n) { return false } } return ce(e, \"htmx:validateUrl\", le({ url: i, sameHost: n }, r)) } function he(t, r, n, i, a, e) { var o = null; var s = null; a = a != null ? a : {}; if (a.returnPromise && typeof Promise !== \"undefined\") { var l = new Promise(function (e, t) { o = e; s = t }) } if (n == null) { n = re().body } var M = a.handler || Mr; var X = a.select || null; if (!se(n)) { ie(o); return l } var u = a.targetOverride || ye(n); if (u == null || u == me) { fe(n, \"htmx:targetError\", { target: te(n, \"hx-target\") }); ie(s); return l } var f = ae(n); var c = f.lastButtonClicked; if (c) { var h = ee(c, \"formaction\"); if (h != null) { r = h } var v = ee(c, \"formmethod\"); if (v != null) { if (v.toLowerCase() !== \"dialog\") { t = v } } } var d = ne(n, \"hx-confirm\"); if (e === undefined) { var D = function (e) { return he(t, r, n, i, a, !!e) }; var U = { target: u, elt: n, path: r, verb: t, triggeringEvent: i, etc: a, issueRequest: D, question: d }; if (ce(n, \"htmx:confirm\", U) === false) { ie(o); return l } } var g = n; var m = ne(n, \"hx-sync\"); var p = null; var x = false; if (m) { var B = m.split(\":\"); var F = B[0].trim(); if (F === \"this\") { g = xe(n, \"hx-sync\") } else { g = ue(n, F) } m = (B[1] || \"drop\").trim(); f = ae(g); if (m === \"drop\" && f.xhr && f.abortable !== true) { ie(o); return l } else if (m === \"abort\") { if (f.xhr) { ie(o); return l } else { x = true } } else if (m === \"replace\") { ce(g, \"htmx:abort\") } else if (m.indexOf(\"queue\") === 0) { var V = m.split(\" \"); p = (V[1] || \"last\").trim() } } if (f.xhr) { if (f.abortable) { ce(g, \"htmx:abort\") } else { if (p == null) { if (i) { var y = ae(i); if (y && y.triggerSpec && y.triggerSpec.queue) { p = y.triggerSpec.queue } } if (p == null) { p = \"last\" } } if (f.queuedRequests == null) { f.queuedRequests = [] } if (p === \"first\" && f.queuedRequests.length === 0) { f.queuedRequests.push(function () { he(t, r, n, i, a) }) } else if (p === \"all\") { f.queuedRequests.push(function () { he(t, r, n, i, a) }) } else if (p === \"last\") { f.queuedRequests = []; f.queuedRequests.push(function () { he(t, r, n, i, a) }) } ie(o); return l } } var b = new XMLHttpRequest; f.xhr = b; f.abortable = x; var w = function () { f.xhr = null; f.abortable = false; if (f.queuedRequests != null && f.queuedRequests.length > 0) { var e = f.queuedRequests.shift(); e() } }; var j = ne(n, \"hx-prompt\"); if (j) { var S = prompt(j); if (S === null || !ce(n, \"htmx:prompt\", { prompt: S, target: u })) { ie(o); w(); return l } } if (d && !e) { if (!confirm(d)) { ie(o); w(); return l } } var E = xr(n, u, S); if (t !== \"get\" && !Sr(n)) { E[\"Content-Type\"] = \"application/x-www-form-urlencoded\" } if (a.headers) { E = le(E, a.headers) } var _ = dr(n, t); var C = _.errors; var R = _.values; if (a.values) { R = le(R, a.values) } var z = Hr(n); var $ = le(R, z); var T = yr($, n); if (Q.config.getCacheBusterParam && t === \"get\") { T[\"org.htmx.cache-buster\"] = ee(u, \"id\") || \"true\" } if (r == null || r === \"\") { r = re().location.href } var O = Rr(n, \"hx-request\"); var W = ae(n).boosted; var q = Q.config.methodsThatUseUrlParams.indexOf(t) >= 0; var H = { boosted: W, useUrlParams: q, parameters: T, unfilteredParameters: $, headers: E, target: u, verb: t, errors: C, withCredentials: a.credentials || O.credentials || Q.config.withCredentials, timeout: a.timeout || O.timeout || Q.config.timeout, path: r, triggeringEvent: i }; if (!ce(n, \"htmx:configRequest\", H)) { ie(o); w(); return l } r = H.path; t = H.verb; E = H.headers; T = H.parameters; C = H.errors; q = H.useUrlParams; if (C && C.length > 0) { ce(n, \"htmx:validation:halted\", H); ie(o); w(); return l } var G = r.split(\"#\"); var J = G[0]; var L = G[1]; var A = r; if (q) { A = J; var Z = Object.keys(T).length !== 0; if (Z) { if (A.indexOf(\"?\") < 0) { A += \"?\" } else { A += \"&\" } A += mr(T); if (L) { A += \"#\" + L } } } if (!kr(n, A, H)) { fe(n, \"htmx:invalidPath\", H); ie(s); return l } b.open(t.toUpperCase(), A, true); b.overrideMimeType(\"text/html\"); b.withCredentials = H.withCredentials; b.timeout = H.timeout; if (O.noHeaders) { } else { for (var N in E) { if (E.hasOwnProperty(N)) { var K = E[N]; Lr(b, N, K) } } } var I = { xhr: b, target: u, requestConfig: H, etc: a, boosted: W, select: X, pathInfo: { requestPath: r, finalRequestPath: A, anchor: L } }; b.onload = function () { try { var e = Ir(n); I.pathInfo.responsePath = Ar(b); M(n, I); lr(k, P); ce(n, \"htmx:afterRequest\", I); ce(n, \"htmx:afterOnLoad\", I); if (!se(n)) { var t = null; while (e.length > 0 && t == null) { var r = e.shift(); if (se(r)) { t = r } } if (t) { ce(t, \"htmx:afterRequest\", I); ce(t, \"htmx:afterOnLoad\", I) } } ie(o); w() } catch (e) { fe(n, \"htmx:onLoadError\", le({ error: e }, I)); throw e } }; b.onerror = function () { lr(k, P); fe(n, \"htmx:afterRequest\", I); fe(n, \"htmx:sendError\", I); ie(s); w() }; b.onabort = function () { lr(k, P); fe(n, \"htmx:afterRequest\", I); fe(n, \"htmx:sendAbort\", I); ie(s); w() }; b.ontimeout = function () { lr(k, P); fe(n, \"htmx:afterRequest\", I); fe(n, \"htmx:timeout\", I); ie(s); w() }; if (!ce(n, \"htmx:beforeRequest\", I)) { ie(o); w(); return l } var k = or(n); var P = sr(n); oe([\"loadstart\", \"loadend\", \"progress\", \"abort\"], function (t) { oe([b, b.upload], function (e) { e.addEventListener(t, function (e) { ce(n, \"htmx:xhr:\" + t, { lengthComputable: e.lengthComputable, loaded: e.loaded, total: e.total }) }) }) }); ce(n, \"htmx:beforeSend\", I); var Y = q ? null : Er(b, n, T); b.send(Y); return l } function Pr(e, t) { var r = t.xhr; var n = null; var i = null; if (O(r, /HX-Push:/i)) { n = r.getResponseHeader(\"HX-Push\"); i = \"push\" } else if (O(r, /HX-Push-Url:/i)) { n = r.getResponseHeader(\"HX-Push-Url\"); i = \"push\" } else if (O(r, /HX-Replace-Url:/i)) { n = r.getResponseHeader(\"HX-Replace-Url\"); i = \"replace\" } if (n) { if (n === \"false\") { return {} } else { return { type: i, path: n } } } var a = t.pathInfo.finalRequestPath; var o = t.pathInfo.responsePath; var s = ne(e, \"hx-push-url\"); var l = ne(e, \"hx-replace-url\"); var u = ae(e).boosted; var f = null; var c = null; if (s) { f = \"push\"; c = s } else if (l) { f = \"replace\"; c = l } else if (u) { f = \"push\"; c = o || a } if (c) { if (c === \"false\") { return {} } if (c === \"true\") { c = o || a } if (t.pathInfo.anchor && c.indexOf(\"#\") === -1) { c = c + \"#\" + t.pathInfo.anchor } return { type: f, path: c } } else { return {} } } function Mr(l, u) { var f = u.xhr; var c = u.target; var e = u.etc; var t = u.requestConfig; var h = u.select; if (!ce(l, \"htmx:beforeOnLoad\", u)) return; if (O(f, /HX-Trigger:/i)) { _e(f, \"HX-Trigger\", l) } if (O(f, /HX-Location:/i)) { er(); var r = f.getResponseHeader(\"HX-Location\"); var v; if (r.indexOf(\"{\") === 0) { v = E(r); r = v[\"path\"]; delete v[\"path\"] } Nr(\"GET\", r, v).then(function () { tr(r) }); return } var n = O(f, /HX-Refresh:/i) && \"true\" === f.getResponseHeader(\"HX-Refresh\"); if (O(f, /HX-Redirect:/i)) { location.href = f.getResponseHeader(\"HX-Redirect\"); n && location.reload(); return } if (n) { location.reload(); return } if (O(f, /HX-Retarget:/i)) { if (f.getResponseHeader(\"HX-Retarget\") === \"this\") { u.target = l } else { u.target = ue(l, f.getResponseHeader(\"HX-Retarget\")) } } var d = Pr(l, u); var i = f.status >= 200 && f.status < 400 && f.status !== 204; var g = f.response; var a = f.status >= 400; var m = Q.config.ignoreTitle; var o = le({ shouldSwap: i, serverResponse: g, isError: a, ignoreTitle: m }, u); if (!ce(c, \"htmx:beforeSwap\", o)) return; c = o.target; g = o.serverResponse; a = o.isError; m = o.ignoreTitle; u.target = c; u.failed = a; u.successful = !a; if (o.shouldSwap) { if (f.status === 286) { at(l) } R(l, function (e) { g = e.transformResponse(g, f, l) }); if (d.type) { er() } var s = e.swapOverride; if (O(f, /HX-Reswap:/i)) { s = f.getResponseHeader(\"HX-Reswap\") } var v = wr(l, s); if (v.hasOwnProperty(\"ignoreTitle\")) { m = v.ignoreTitle } c.classList.add(Q.config.swappingClass); var p = null; var x = null; var y = function () { try { var e = document.activeElement; var t = {}; try { t = { elt: e, start: e ? e.selectionStart : null, end: e ? e.selectionEnd : null } } catch (e) { } var r; if (h) { r = h } if (O(f, /HX-Reselect:/i)) { r = f.getResponseHeader(\"HX-Reselect\") } if (d.type) { ce(re().body, \"htmx:beforeHistoryUpdate\", le({ history: d }, u)); if (d.type === \"push\") { tr(d.path); ce(re().body, \"htmx:pushedIntoHistory\", { path: d.path }) } else { rr(d.path); ce(re().body, \"htmx:replacedInHistory\", { path: d.path }) } } var n = T(c); je(v.swapStyle, c, l, g, n, r); if (t.elt && !se(t.elt) && ee(t.elt, \"id\")) { var i = document.getElementById(ee(t.elt, \"id\")); var a = { preventScroll: v.focusScroll !== undefined ? !v.focusScroll : !Q.config.defaultFocusScroll }; if (i) { if (t.start && i.setSelectionRange) { try { i.setSelectionRange(t.start, t.end) } catch (e) { } } i.focus(a) } } c.classList.remove(Q.config.swappingClass); oe(n.elts, function (e) { if (e.classList) { e.classList.add(Q.config.settlingClass) } ce(e, \"htmx:afterSwap\", u) }); if (O(f, /HX-Trigger-After-Swap:/i)) { var o = l; if (!se(l)) { o = re().body } _e(f, \"HX-Trigger-After-Swap\", o) } var s = function () { oe(n.tasks, function (e) { e.call() }); oe(n.elts, function (e) { if (e.classList) { e.classList.remove(Q.config.settlingClass) } ce(e, \"htmx:afterSettle\", u) }); if (u.pathInfo.anchor) { var e = re().getElementById(u.pathInfo.anchor); if (e) { e.scrollIntoView({ block: \"start\", behavior: \"auto\" }) } } if (n.title && !m) { var t = C(\"title\"); if (t) { t.innerHTML = n.title } else { window.document.title = n.title } } Cr(n.elts, v); if (O(f, /HX-Trigger-After-Settle:/i)) { var r = l; if (!se(l)) { r = re().body } _e(f, \"HX-Trigger-After-Settle\", r) } ie(p) }; if (v.settleDelay > 0) { setTimeout(s, v.settleDelay) } else { s() } } catch (e) { fe(l, \"htmx:swapError\", u); ie(x); throw e } }; var b = Q.config.globalViewTransitions; if (v.hasOwnProperty(\"transition\")) { b = v.transition } if (b && ce(l, \"htmx:beforeTransition\", u) && typeof Promise !== \"undefined\" && document.startViewTransition) { var w = new Promise(function (e, t) { p = e; x = t }); var S = y; y = function () { document.startViewTransition(function () { S(); return w }) } } if (v.swapDelay > 0) { setTimeout(y, v.swapDelay) } else { y() } } if (a) { fe(l, \"htmx:responseError\", le({ error: \"Response Status Error Code \" + f.status + \" from \" + u.pathInfo.requestPath }, u)) } } var Xr = {}; function Dr() { return { init: function (e) { return null }, onEvent: function (e, t) { return true }, transformResponse: function (e, t, r) { return e }, isInlineSwap: function (e) { return false }, handleSwap: function (e, t, r, n) { return false }, encodeParameters: function (e, t, r) { return null } } } function Ur(e, t) { if (t.init) { t.init(r) } Xr[e] = le(Dr(), t) } function Br(e) { delete Xr[e] } function Fr(e, r, n) { if (e == undefined) { return r } if (r == undefined) { r = [] } if (n == undefined) { n = [] } var t = te(e, \"hx-ext\"); if (t) { oe(t.split(\",\"), function (e) { e = e.replace(/ /g, \"\"); if (e.slice(0, 7) == \"ignore:\") { n.push(e.slice(7)); return } if (n.indexOf(e) < 0) { var t = Xr[e]; if (t && r.indexOf(t) < 0) { r.push(t) } } }) } return Fr(u(e), r, n) } var Vr = false; re().addEventListener(\"DOMContentLoaded\", function () { Vr = true }); function jr(e) { if (Vr || re().readyState === \"complete\") { e() } else { re().addEventListener(\"DOMContentLoaded\", e) } } function _r() { if (Q.config.includeIndicatorStyles !== false) { re().head.insertAdjacentHTML(\"beforeend\", \"<style> .\" + Q.config.indicatorClass + \"{opacity:0} .\" + Q.config.requestClass + \" .\" + Q.config.indicatorClass + \"{opacity:1; transition: opacity 200ms ease-in;} .\" + Q.config.requestClass + \".\" + Q.config.indicatorClass + \"{opacity:1; transition: opacity 200ms ease-in;} </style>\") } } function zr() { var e = re().querySelector('meta[name=\"htmx-config\"]'); if (e) { return E(e.content) } else { return null } } function $r() { var e = zr(); if (e) { Q.config = le(Q.config, e) } } jr(function () { $r(); _r(); var e = re().body; zt(e); var t = re().querySelectorAll(\"[hx-trigger='restored'],[data-hx-trigger='restored']\"); e.addEventListener(\"htmx:abort\", function (e) { var t = e.target; var r = ae(t); if (r && r.xhr) { r.xhr.abort() } }); const r = window.onpopstate ? window.onpopstate.bind(window) : null; window.onpopstate = function (e) { if (e.state && e.state.htmx) { ar(); oe(t, function (e) { ce(e, \"htmx:restored\", { document: re(), triggerEvent: ce }) }) } else { if (r) { r(e) } } }; setTimeout(function () { ce(e, \"htmx:load\", {}); e = null }, 0) }); return Q }() });","import './css/style.css'\r\nimport './css/overwrites.css'\r\n\r\nexport const lazyContent = new LazyLoad({\r\n use_native: false\r\n});\r\n\r\nimport LazyLoad from \"vanilla-lazyload\";\r\nimport 'preline'\r\nimport '@preline/select'\r\n\r\nimport './ts/handle-trade-values'\r\nimport './ts/formatters'\r\nimport './ts/handle-mobile-nav'\r\nimport './ts/handle-scroll-spy'\r\nimport './ts/handle-scroll-to'\r\nimport './ts/handle-show-hide-car-make-model'\r\nimport './ts/handle-show-more'\r\nimport './ts/Cars4SalePage'\r\nimport './ts/handle-toggle-car-favourite'\r\nimport './ts/handle-submit-loan'\r\nimport './ts/handle-detail-swipers'\r\nimport './ts/handle-filters'\r\nimport './ts/standard-lead-submission'\r\n\r\nimport './ts/InputMask'\r\nimport './ts/RangeSlider'\r\nimport './ts/toggle'\r\nimport './ts/SimpleWizard'\r\nimport './ts/SimpleModal'\r\nimport './ts/SearchRates'\r\nimport './ts/sync-text'\r\nimport './ts/check-credit'\r\n\r\nimport '/src/js/htmx.min.js'\r\n"],"names":["customSettings","classObj","options","event","eventString","instance","err","i","optionsItem","element","attribute","value","attrName","status","callback","arg1","arg2","arg3","className","observer","settings","delta","parentTag","sourceTags","childTag","fn","parent","attributes","originals","imgEl","sourceTag","iframe","videoEl","sourceEl","object","bg1xValue","bgHiDpiValue","bgDataValue","bgImgSetDataValue","imgSetValues","bgImageValues","setSourcesFunction","addEventListener","eventName","handler","loadHandler","errorHandler","loadEventName","eventListeners","goingNative","elementToListenTo","iframeEl","objectEl","restoreFunction","entry","dontLoad","elements","entries","elementsToObserve","nodeSet","givenNodeset","elementsToLoad","string","el","prop","val","targetClass","c","toggle","preferredPosition","space","wrapper","referenceRect","wrapperRect","viewportHeight","spaceAbove","spaceBelow","minimumSpaceRequired","target","debounce","func","timeout","timer","args","evt","payload","handleEvent","computedStyle","transitionDuration","html","template","classes","splitter","action","cl","index","events","collection","_a","cb","data","dataOptions","concatOptions","__spreadValues","copiedElement","item","deleteItemButton","isInstance","elInCollection","elC","_el","root","_b","_c","start","end","_d","_e","_f","_g","_h","_i","_j","_k","_l","_m","_n","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_value","obj","groupField","params","group","elI","lowerCased","v","acc","cur","__async","query","searchQuery","url","items","title","newItems","newItem","hideIfEmpty","attr","groups","compareFn","i1","i2","a","b","tabsScroll","tabsWrapper","tabDef","selectedTab","tab","f","g","evtTarget","currentlyOpened","isReversed","output","prev","current","input","isArrowUp","currentItem","currentInd","isStart","opened","link","placement","getWindow","node","ownerDocument","OwnElement","_ref","state","name","style","effect","_ref2","initialStyles","styleProperties","property","uaData","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","x","y","width","height","child","rootNode","next","getComputedStyle","isFirefox","isIE","elementCss","currentNode","css","window","offsetParent","min","max","mathMax","mathMin","paddingObject","keys","hashMap","key","padding","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","offset","axisProp","_options$element","win","dpr","_Object$assign2","popper","popperRect","variation","offsets","position","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","hash","matched","scrollLeft","scrollTop","strategy","layoutViewport","_element$ownerDocumen","winScroll","body","_getComputedStyle","overflow","overflowX","overflowY","list","isBody","updatedList","rect","clippingParent","clippingParents","canEscapeClipping","clipperElement","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","reference","commonX","commonY","mainAxis","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","placements","allowedPlacements","overflows","oppositePlacement","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","fittingPlacement","_ret","preventedOffsets","side","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","modifiers","map","visited","result","modifier","sort","requires","dep","depModifier","orderedModifiers","phase","pending","resolve","merged","existing","_key","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","m","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","computeStyles","applyStyles","flip","preventOverflow","arrow","hide","isAnimated","clearAfterClose","prevWidth","dropdown","menu","links","code","getCurrentInd","cleanedValue","cleanedArray","decimalFound","char","number","minInputValue","maxInputValue","incrementedResult","decrementedResult","defaultResult","mode","autoCloseBreakpoint","openedBreakpoint","time","overlayClasses","overlayZIndex","backdropId","backdrop","backdropClasses","closeOnBackdrop","disableBackdrop","div","scrollbarSize","openedOverlays","toggles","disabledScroll","forceClose","closeFn","breakpoint","targets","focusableElements","notHiddenFocusableElements","basicCheck","focused","focusedIndex","nextIndex","overlay","backdropZIndex","text","n","originalValue","section","globalOffset","userOffset","scrollableParentOffset","topOffset","parentLink","targetId","view","scrollFn","beforeScroll","defaultToggleSeparators","selectedOptions","values","appendMarkup","markup","icon","img","titleText","placeholder","remove","props","disabled","selected","titleWrapper","iconWrapper","descriptionWrapper","option","description","inputPadding","inputBorder","newWidth","maxWidth","intersection","selectChangeEvent","isArray","nItems","selectedOption","selectedItem","hasItems","addOption","removeOption","select","inIncludedSkipped","isCompleted","isSkip","isDisabled","isFinal","isOptional","isProcessed","hasError","finalContentItem","otherContentItems","currentNavItem","currentContentItem","infinite","nonCompletedSteps","targetNavItem","targetContentItem","completedText","uncompletedSteps","uncompletedOrSkipSteps","newStrip","rule","ruleValue","weaknessText","weaknessTextToJson","popover","passedRules","regexps","strength","isRulePassed","uncheck","rules","qty","targetInCollection","isOpposite","focusedInd","matches","theme","isSaveToLocalStorage","isSetDispatchEvent","resetStyles","toggleObserveSystemTheme","switchTheme","from","to","startTimestamp","step","timestamp","progress","id","togglesInCollection","handle","__spreadProps","columnDefs","th","ind","entities","recordsTotal","pages","statement","page","length","totalRecords","totalPages","currentPage","startPage","endPage","counter","pageEl","isChecked","checkbox","clear","pseudoTriggers","file","previewElement","reloadButton","tempFileInput","newFile","dzNewFile","fileInfo","fileName","fileExt","fileSize","fileIcon","trigger","preview","progressBar","progressBarPane","progressBarValue","currentProgress","ext","size","dotIndex","t","e","module","s","o","l","r","d","u","p","h","rvfEl","modalId","_SearchRates","triggerElement","formData","token","maxTerm","termElsArray","checkedCheckbox","currentTerm","checkboxToCheck","_SimpleValidate","isValid","firstError","itemToValidate","scrollToError","newEl","tf","md","tv","vf","tradeValue","tradeOwed","newVal","parms","frm2","sr","tradeEquity","sib","windowScroll","stickyNavThreshold","scrollSpySubNavOffset","navLink","sectionOffset","sectionBottom","button","href","anchorContent","anchorContentOffset","closestStep","inputs","closestContent","sibling","showMoreWrapper","isObject","extend","src","doc","delay","matrix","curTransform","transformMatrix","curStyle","noExtend","nextSource","keysArray","nextKey","desc","varName","varValue","swiper","targetPosition","startPosition","startTime","duration","dir","isOutOfBound","animate","easeProgress","currentPosition","selector","tag","prevEls","nextEls","parents","includeMargins","document","_temp","userAgent","support","platform","ua","device","screenWidth","screenHeight","android","ipad","ipod","iphone","windows","macos","iPadScreens","overrides","needPerspectiveFix","isSafari","major","minor","num","isWebView","isSafariBrowser","need3dFix","on","emit","animationFrame","resizeHandler","createObserver","newHeight","contentBoxSize","contentRect","removeObserver","orientationChangeHandler","extendParams","observers","attach","ObserverFunc","mutations","observerUpdate","init","containerParents","destroy","priority","self","method","onceHandler","eventHandler","context","_len2","_key2","getDirectionPropertyValue","label","wrapperEl","slidesEl","swiperSize","rtl","wrongRTL","isVirtual","previousSlidesLength","slides","slidesLength","snapGrid","slidesGrid","slidesSizesGrid","offsetBefore","offsetAfter","previousSnapGridLength","previousSlidesGridLength","spaceBetween","slidePosition","prevSlideSize","slideEl","gridEnabled","slideSize","shouldResetSlideSize","slide","slideStyles","currentTransform","currentWebKitTransform","paddingLeft","paddingRight","marginLeft","marginRight","boxSizing","clientWidth","offsetWidth","newSlidesGrid","slidesGridItem","groupSize","_","slideIndex","allSlidesSize","slideSizeValue","maxSnap","snap","allSlidesOffset","snapIndex","addToSnapGrid","addToSlidesGrid","backFaceHiddenClass","hasClassBackfaceClassAdded","speed","activeSlides","getSlideByIndex","minusOffset","translate","offsetCenter","slideOffset","slideProgress","originalSlideProgress","slideBefore","slideAfter","isFullyVisible","multiplier","translatesDiff","isBeginning","isEnd","progressLoop","wasBeginning","wasEnd","isBeginningRounded","isEndRounded","firstSlideIndex","lastSlideIndex","firstSlideTranslate","lastSlideTranslate","translateMax","translateAbs","activeIndex","getFilteredSlide","activeSlide","prevSlide","nextSlide","imageEl","slideSelector","lazyEl","amount","slidesPerView","activeColumn","preloadColumns","slideIndexLastInView","realIndex","newActiveIndex","previousIndex","previousRealIndex","previousSnapIndex","getVirtualRealIndex","aIndex","skip","firstSlideInColumn","activeSlideIndex","path","pathEl","slideFound","currentTranslate","byController","z","newProgress","runCallbacks","translateBounds","internal","minTranslate","maxTranslate","newTranslate","isH","direction","initial","enabled","normalizedTranslate","normalizedGrid","normalizedGridNext","newIndex","targetSlideIndex","cols","centeredSlides","needLoopFix","animating","perGroup","increment","rtlTranslate","normalize","normalizedSnapGrid","prevSnap","prevSnapIndex","prevIndex","lastIndex","threshold","currentSnap","nextSnap","slideToIndex","slideRealIndex","initSlides","slidesPerGroup","shouldFillGroup","shouldFillGrid","addBlankSlides","amountOfSlides","slidesToAdd","slideTo","setTranslate","byMousewheel","allowSlidePrev","allowSlideNext","loopedSlides","prependSlidesIndexes","appendSlidesIndexes","isNext","isPrev","slidesPrepended","slidesAppended","activeColIndexWithShift","colIndexToPrepend","currentSlideTranslate","diff","shift","loopParams","newSlidesOrder","moving","base","__closestFrom","found","startX","edgeSwipeDetection","edgeSwipeThreshold","touches","targetEl","swipingClassHasValue","eventPath","noSwipingSelector","isTargetShadow","startY","preventDefault","shouldPreventDefault","targetTouch","pageX","pageY","diffX","diffY","__pow","touchAngle","touchesDiff","prevTouchesDirection","isLoop","allowLoopFix","loopFixed","disableParentSwiper","resistanceRatio","touchEndTime","timeDiff","pathTree","currentPos","swipeToLast","stopIndex","rewindFirstIndex","rewindLastIndex","ratio","isVirtualLoop","capture","domMethod","swiperMethod","initialized","breakpoints","breakpointParams","wasMultiRow","isMultiRow","wasEnabled","wasModuleEnabled","isModuleEnabled","directionChanged","needsReLoop","wasLoop","isEnabled","hasLoop","containerEl","currentHeight","points","point","minRatio","prefix","resultClasses","classNames","suffixes","wasLocked","slidesOffsetBefore","lastSlideRightEdge","allModulesParams","moduleParamName","moduleParams","swipers","newParams","mod","swiperParams","cls","updates","exact","spv","breakLoop","translateValue","translated","newDirection","needUpdate","currentDirection","getWrapperSelector","lazyElements","deleteInstance","cleanStyles","newDefaults","modules","prototypeGroup","protoMethod","originalParams","checkProps","getEl","res","toggleEl","subEl","update","nextEl","prevEl","onPrevClick","onNextClick","initButton","destroyButton","disable","isHidden","enable","pfx","bulletSize","dynamicBulletIndex","isPaginationDisabled","setSideBullets","bulletEl","bulletActiveClass","onBulletClick","total","bullets","firstIndex","midIndex","classesToRemove","suffix","bullet","bulletIndex","firstDisplayedBullet","lastDisplayedBullet","dynamicBulletsLength","bulletsOffset","offsetProp","subElIndex","fractionEl","totalEl","progressbarDirection","scale","progressEl","render","paginationHTML","numberOfBullets","swiperCreated","onThumbClick","thumbsSwiper","clickedIndex","clickedSlide","thumbsParams","SwiperClass","thumbsSwiperParams","thumbsToActivate","thumbActiveClass","autoScrollOffset","useOffset","currentThumbsIndex","newThumbsIndex","newThumbsSlide","thumbs","getThumbsElementAndInit","thumbsElement","onThumbsSwiper","watchForThumbsToAppear","_Cars4SalePage","enableGrid","ex","ids","nextSlidesArray","prevSlidesArray","slideScale","el1","isFav","invId","el2","targetForm","spinner","errorDiv","Thumbs","filters","currentFilters","filter","filtersElement","make","model","models","di","uniqueId","trims","count","hasElements","isNewChecked","isUsedChecked","frmId","frm","frmData","jsonData","mask","startHyphenLoc","endHyphenLoc","endv","newMin","newMax","isInit","txt","al","toggleSelector","toggleClass","toggleAddClass","toggleRemoveClass","toggleBodyClass","curNextBtn","goto","stepToShow","curStep","curNext","flds","cntChecked","stepNumber","navItems","_SimpleModal","me","tempDiv","script","newScript","closeTrigger","syncEl","format","response","ele","error","this","M","X","D","U","B","F","V","w","j","S","E","C","R","$","T","O","W","q","H","G","J","L","A","Z","N","K","I","k","P","Y"],"mappings":"gjDAAA,MAAM,iBAAmB,OAAO,QAAW,YAErC,MACH,kBAAoB,EAAE,aAAc,SACpC,OAAO,WAAc,aAAe,gCAAgC,KAAK,UAAU,SAAS,EAEzF,6BAA+B,kBAAoB,yBAA0B,OAE7E,kBAAoB,kBAAoB,cAAe,SAAS,cAAc,GAAG,EAEjF,QAAU,kBAAoB,OAAO,iBAAmB,EAExD,gBAAkB,CACtB,kBAAmB,QACnB,UAAW,OAAS,iBAAmB,SAAW,KAClD,UAAW,IACX,WAAY,KACZ,SAAU,MACV,YAAa,SACb,WAAY,QACZ,QAAS,KACT,cAAe,WACf,cAAe,WACf,oBAAqB,iBACrB,YAAa,SACb,YAAa,SACb,cAAe,UACf,cAAe,UACf,aAAc,SACd,YAAa,QACb,cAAe,UACf,aAAc,SACd,oBAAqB,GACrB,kBAAmB,GACnB,eAAgB,GAChB,eAAgB,KAChB,cAAe,KACf,iBAAkB,KAClB,iBAAkB,KAClB,gBAAiB,KACjB,eAAgB,KAChB,gBAAiB,KACjB,gBAAiB,KACjB,WAAY,GACZ,iBAAkB,EACpB,EAEM,oBAAuBA,IACpB,OAAO,OAAO,CAAE,EAAE,gBAAiBA,EAAc,EAIpD,eAAiB,SAASC,GAAUC,GAAS,CACjD,IAAIC,GACJ,MAAMC,GAAc,wBACdC,GAAW,IAAIJ,GAASC,EAAO,EACrC,GAAI,CAEFC,GAAQ,IAAI,YAAYC,GAAa,CAAE,OAAQ,CAAE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