bootstrap-italia 2.15.1 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@splidejs/splide"),require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js")):"function"==typeof define&&define.amd?define(["@splidejs/splide","@popperjs/core","video.js","animejs/lib/anime.es.js"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Splide,t.Popper,t.videojs,t.anime)}(this,(function(t,e,i,n){"use strict";function s(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const o=s(e);!function(){const t={NODE_ENV:"production"};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();const r="data-focus-mouse";class a{constructor(){this._usingMouse=!1,this._bindEvents()}_bindEvents(){if("undefined"==typeof document)return;["keydown","mousedown"].forEach((t=>{document.addEventListener(t,(t=>{this._usingMouse="mousedown"===t.type}))})),document.addEventListener("focusin",(t=>{this._usingMouse&&t.target&&t.target.setAttribute(r,!0)})),document.addEventListener("focusout",(t=>{t.target&&t.target.setAttribute(r,!1)}))}}new a;const l=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new a,window.BOOTSTRAP_ITALIA_VERSION="2.15.1")};l();const c={ck3:{}},u={rememberChoice:(t,e)=>{c.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(c.ck3))},isChoiceRemembered:t=>(c.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),c.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},h=new Map,d={set(t,e,i){h.has(t)||h.set(t,new Map);const n=h.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>h.has(t)&&h.get(t).get(e)||null,remove(t,e){if(!h.has(t))return;const i=h.get(t);i.delete(e),0===i.size&&h.delete(t)}},f="transitionend",p=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},m=t=>{const e=p(t);return e&&document.querySelector(e)?e:null},g=t=>{const e=p(t);return e?document.querySelector(e):null},_=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,b=t=>_(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,v=t=>{if(!_(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},y=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),w=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?w(t.parentNode):null},E=()=>{},C=t=>{t.offsetHeight},S=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,k=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void k(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(f,o),k(t))};e.addEventListener(f,o),setTimeout((()=>{s||e.dispatchEvent(new Event(f))}),n)},T=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},A=/[^.]*(?=\..*)\.|.*/,O=/\..*/,L=/::\d+$/,P={};let I=1;const M={mouseenter:"mouseover",mouseleave:"mouseout"},F=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function $(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function j(t){const e=$(t);return t.uidEvent=e,P[e]=P[e]||{},P[e]}function N(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=(r=(r=t).replace(O,""),M[r]||r);var r;return F.has(o)||(o=t),[n,s,o]}function B(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,n);if(e in M){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=j(t),c=l[a]||(l[a]={}),u=N(c,r,o?i:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=$(r,e.replace(A,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return W(s,{delegateTarget:r}),n.oneOff&&z.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return W(n,{delegateTarget:t}),i.oneOff&&z.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=h,c[h]=d,t.addEventListener(a,d,o)}function R(t,e,i,n,s){const o=N(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function V(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];R(t,e,i,n.callable,n.delegationSelector)}}const z={on(t,e,i,n){B(t,e,i,n,!1)},one(t,e,i,n){B(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=D(e,i,n),a=r!==e,l=j(t),c=l[r]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const i of Object.keys(l))V(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(L,"");if(!a||e.includes(n)){const e=c[i];R(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;R(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let n=new Event(e,{bubbles:!0,cancelable:!0});return n=W(n,i),t.dispatchEvent(n),n}};function W(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=q(t.dataset[n])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${H(e)}`))};class G{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=_(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},..._(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],o=t[n],r=_(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class Y extends G{constructor(t,e){super(),(t=b(t))&&(this._element=t,this._config=this._getConfig(e),d.set(this._element,this.constructor.DATA_KEY,this))}dispose(){d.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){x(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return d.get(b(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const K={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!y(t)&&v(t)))}},Q={slideFocus:!1,rewind:!0,perMove:1,i18n:{prev:"Slide precedente",next:"Slide successiva",first:"Vai alla prima slide",last:"Vai all’ultima slide",slideX:"Vai alla slide %s",pageX:"Vai a pagina %s",play:"Attiva autoplay",pause:"Pausa autoplay",carousel:"Carosello",select:"Seleziona una slide da mostrare",slide:"slide",slideLabel:"%s di %s"}},X={"it-carousel-landscape-abstract-three-cols":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!1}}},"it-carousel-landscape-abstract-three-cols-arrow-visible":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!0,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!0},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!0}}},"it-big-img":{type:"loop",perPage:1,gap:48,padding:{left:320,right:320},arrows:!1,breakpoints:{768:{perPage:1,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:160,right:160},arrows:!1}}},"it-standard-image":{type:"loop",perPage:3,gap:24,padding:{left:48,right:48},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!1},992:{perPage:2,gap:24,padding:{left:48,right:48},arrows:!1}}},"it-carousel-landscape-abstract":{type:"slide",perPage:1,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:24,right:24},arrows:!1}}},"it-calendar-wrapper":{type:"slide",perPage:4,gap:0,padding:{left:0,right:0},arrows:!1,breakpoints:{560:{perPage:1,gap:0,padding:{left:24,right:24},arrows:!1},768:{perPage:2,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:3,gap:0,padding:{left:0,right:0},arrows:!1}}}};class Z extends Y{constructor(e){super(e),this._config=this._getConfig(),this._splide=new t(this._element,this._config),this._init()}dispose(){this._splide.destroy(),super.dispose()}static get NAME(){return"carousel"}_init(){this._splide.mount()}_getConfig(){let t=Object.assign({},Q);return Object.keys(X).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,X[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load.bs.carousel.data-api",(()=>{K.find("[data-bs-carousel-splide]").forEach((t=>{Z.getOrCreateInstance(t)}))}));const J=".bs.inputlabel",tt=`focus${J}`,et=`blur${J}`,it=`change${J}`,nt="active";class st{constructor(t){this._element=t,this._init()}static get NAME(){return"inputlabel"}static getInputFromLabel=t=>{if("undefined"!=typeof window&&"undefined"!=typeof document)return document.querySelector("#"+CSS.escape(t.getAttribute("for")))};_init(){const t=this._getLabel();t&&!t.classList.contains(nt)&&(this._labelOut(),this._labelOver()),t&&null===t.getAttribute("it-bs-static")&&this._bindEvents()}_bindEvents(){["date","time"].includes(this._element.getAttribute("type"))||("file"===this._element.getAttribute("type")?z.on(this._element,et,(()=>{this._labelOut()})):(z.on(this._element,tt,(()=>{this._labelOut()})),z.on(this._element,et,(()=>{this._labelOver()})),z.on(this._element,it,(()=>{this._labelToggle()}))))}_getLabel(){return K.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return"number"===this._element.getAttribute("type")?!this._element.value&&!this._element.getAttribute("placeholder")&&!this._element.validity.badInput:!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(nt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(nt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const ot=".bs.inputnumber",rt=`click${ot}`,at=`change${ot}`,lt=`click${ot}.data-api`,ct=".input-number",ut='input[data-bs-input][type="number"]',ht='button[class^="input-number-"]';class dt extends Y{constructor(t){super(t),this._wrapperElement=this._element.closest(ct),this._label=new st(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(K.find(ht,this._wrapperElement).forEach((t=>{z.on(t,rt,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),z.on(this._element,at,(()=>this._checkLimit())))}_inputResize(){if(this._wrapperElement.classList.contains("input-number-adaptive")){let t=null;t="calc(70px + "+this._element.value.length+"ch)",t&&(this._element.style.width=t)}}_incrDecr(t){let e=0;if(!this._element.disabled&&!this._element.readonly&&(""!==this._element.value&&(e=parseFloat(this._element.value)),!isNaN(e))){let i=parseFloat(this._element.getAttribute("step"));i||(i=1),this._element.value=e+i*(t?-1:1),z.trigger(this._element,at),z.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),n=parseFloat(this._element.getAttribute("min"));n&&t<n&&(e=n),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ut+", label").forEach((function(t){const e=st.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ut)&&i.parentNode.querySelector(ht)&&dt.getOrCreateInstance(i)}))})),z.on(document,lt,ht,(function(){const t=this.closest(ct);if(t){const e=K.findOne(ut,t);e&&dt.getOrCreateInstance(e)}})));const ft="show";class pt extends Y{constructor(t){super(t),this._isShown=!t.matches("[aria-hidden=true]"),this._isTransitioning=!1}static get NAME(){return"dimmer"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(ft),this._queueCallback((()=>this._hideElement()),this._element,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),t&&C(this._element),this._element.classList.add(ft);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=g(this),e=pt.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const mt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;z.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),y(this))return;const s=g(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},gt=".bs.notification",_t=`click${gt}.data-api`,bt=`hidden${gt}`,vt=`show${gt}`,yt={timeout:0},wt="show";class Et extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(wt),this._isTransitioning=!1,this._toId=null}static get NAME(){return"notification"}show(t,e){if(this._isShown||this._isTransitioning)return;const i=t||this._getElementTimeout(e);this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement(i)}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(wt),this._queueCallback((()=>this._hideElement()),this._element,t)}toggle(t){this._isShown?this.hide():this.show(null,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(t){const e=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),e&&C(this._element),this._element.classList.add(wt);this._queueCallback((()=>{this._isTransitioning=!1,t&&this._setTimeout(t,(()=>this.hide()))}),this._element,e)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}_getConfig(t){return t={...yt,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_getElementTimeout(t){const e=t?parseInt(t.getAttribute("data-bs-timeout")):null;return e>0?e:this._config.timeout}_setTimeout(t,e){this._clearTimeout(),setTimeout(e,t)}_clearTimeout(){this._toId&&(clearTimeout(this._toId),this._toId=null)}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,_t,'[data-bs-toggle="notification"]',(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,vt,(t=>{t.defaultPrevented||z.one(e,bt,(()=>{v(this)&&this.focus()}))}));Et.getOrCreateInstance(e).toggle(this)})),mt(Et));const Ct="cookiebar",St=".bs.cookiebar",kt=".data-api",xt="cookies_consent",Tt=`close${St}`,At=`closed${St}`,Ot=`load${St}${kt}`,Lt=`click${St}${kt}`,Pt="show";class It extends Y{constructor(t){super(t),this._isShown=this._element.classList.contains(Pt),this._isTransitioning=!1}static get NAME(){return Ct}static get VERSION(){return"5.0.0"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(Pt),this._queueCallback((()=>this._hideElement()),this._element,t)}accept(t){t=t||this._element;const e=this._getRootElement(t);this._triggerCloseEvent(e).defaultPrevented||(this._setCookieEU(),this.hide())}static clearCookie(){"undefined"!=typeof document&&(document.cookie=xt+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-live","polite"),t&&C(this._element),this._element.classList.add(Pt);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-live"),this._isTransitioning=!1}_setCookieEU(){var t=new Date;t.setDate(t.getDate()+30);var e=escape("true")+"; expires="+t.toUTCString();"undefined"!=typeof document&&(document.cookie=xt+"="+e+"; path=/; SameSite=Strict")}_getRootElement(t){const e=g(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return z.trigger(t,Tt)}_removeElement(t){t.classList.remove(Pt),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),z.trigger(t,At),this.dispose()}static _handleAccept(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _handleConsent(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _getCookieEU(){if("undefined"!=typeof document){var t,e,i,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(e=n[t].substring(0,n[t].indexOf("=")),i=n[t].substring(n[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,Lt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),y(this))return;const e=g(this)||this.closest(`.${Ct}`);It.getOrCreateInstance(e).accept()})),z.on(window,Ot,(function(){if(!It._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{It.getOrCreateInstance(t).show()}))}})));const Mt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Ft=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$t=".sticky-top",jt="padding-right",Nt="margin-right";class Dt{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,jt,(e=>e+t)),this._setElementAttributes(Ft,jt,(e=>e+t)),this._setElementAttributes($t,Nt,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,jt),this._resetElementAttributes(Ft,jt),this._resetElementAttributes($t,Nt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(_(t))e(t);else for(const i of K.find(t,this._element))e(i)}}const Bt=".bs.focustrap",Rt=`focusin${Bt}`,Vt=`keydown.tab${Bt}`,zt="backward",Wt={autofocus:!0,trapElement:null,initialFocus:null},qt={autofocus:"boolean",trapElement:"element",initialFocus:"(null|element|string|function)"};class Ht extends G{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null,this._affectedElements=[]}static get Default(){return Wt}static get DefaultType(){return qt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._setInitialFocus(),z.off(document,Bt),z.on(document,Rt,(t=>this._handleFocusin(t))),z.on(document,Vt,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,Bt))}_setInitialFocus(){if(this._config.initialFocus){let t;t="function"==typeof this._config.initialFocus?this._config.initialFocus():this._config.initialFocus,t&&"function"==typeof t.focus?t.focus():this._config.trapElement.focus()}else this._config.trapElement.focus()}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=K.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===zt?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?zt:"forward")}}const Ut="backdrop",Gt="show",Yt=`mousedown.bs.${Ut}`,Kt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Qt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Xt extends G{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Kt}static get DefaultType(){return Qt}static get NAME(){return Ut}show(t){if(!this._config.isVisible)return void k(t);this._append();const e=this._getElement();this._config.isAnimated&&C(e),e.classList.add(Gt),this._emulateAnimation((()=>{k(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Gt),this._emulateAnimation((()=>{this.dispose(),k(t)}))):k(t)}dispose(){this._isAppended&&(z.off(this._element,Yt),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=b(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),z.on(t,Yt,(()=>{k(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){x(t,this._getElement(),this._config.isAnimated)}}const Zt=".bs.navbarcollapsible",Jt=`click${Zt}.data-api`,te=`click${Zt}`,ee=`keydown${Zt}`,ie=`hide${Zt}`,ne=`hidden${Zt}`,se=`show${Zt}`,oe=`shown${Zt}`,re=`resize${Zt}`,ae="navbar-open",le="show",ce="expanded",ue='[data-bs-toggle="navbarcollapsible"]',he=".close-menu",de=".nav-link",fe=".nav-item .list-item",pe=".it-heading-link",me=".it-footer-link",ge={backdrop:!0,focus:!0},_e={backdrop:"(boolean|string)",focus:"boolean"};class be extends Y{constructor(t,e){super(t,e),this._mainElement=K.findOne("main"),this._isNavbarOutsideMain=this._mainElement&&!this._mainElement.contains(this._element),this._parentElement=this._element.parentNode,this._isShown=this._element.classList.contains(ce),this._element.getAttribute("tabindex")||this._element.setAttribute("tabindex","-1"),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._scrollBar=new Dt,this._isTransitioning=!1,this._isMobile=Mt(),this._btnClose=K.findOne(".close-div button",this._element),this._btnBack=K.findOne(".it-back-button",this._element),this._menuWrapper=K.findOne(".menu-wrapper",this._element),this._menuItems=K.find([de,fe,pe,me,he].join(","),this._element),this._toggleButton=K.findOne(`${ue}[data-bs-target="#${this._element.id}"]`)||K.findOne(`${ue}[href="#${this._element.id}"]`),this._toggleButton&&(this._toggleButton.getAttribute("aria-expanded")||this._toggleButton.setAttribute("aria-expanded",this._isShown?"true":"false")),this._bindEvents()}static get Default(){return ge}static get DefaultType(){return _e}static get NAME(){return"navbarcollapsible"}toggle(t){this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;z.trigger(this._element,se,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),this._btnBack&&this._btnBack.classList.add(le),document.body.classList.add(ae),this._backdrop.show(),this._showElement(),this._toggleButton&&this._toggleButton.setAttribute("aria-expanded","true"))}hide(){if(!this._isShown||this._isTransitioning)return;z.trigger(this._element,ie).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._btnBack&&this._btnBack.classList.remove(le),this._element.classList.remove(ce),this._backdrop.hide(),this._queueCallback((()=>this._hideElement()),this._menuWrapper,this._isAnimated()),this._toggleButton&&this._toggleButton.setAttribute("aria-expanded","false"))}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,re),z.off(document,ee)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){return new Xt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated(),className:"navbar-backdrop",rootElement:this._parentElement,clickCallback:()=>{this.hide()}})}_initializeFocusTrap(){return new Ht({trapElement:this._element,initialFocus:()=>this._btnClose||this._element.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')})}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,re,(()=>this._onResize())),z.on(document,ee,(t=>{this._isShown&&"Escape"===t.key&&this.hide()})),z.on(this._btnClose,te,(t=>{t.preventDefault(),this.hide()})),z.on(this._btnBack,te,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{z.on(t,ee,(t=>this._isMobile&&this._onMenuItemKeyDown(t)))})))}_onResize(){this._isMobile=Mt()}_onMenuItemKeyDown(t){"Escape"===t.key&&this.hide()}_isAnimated(){return!0}_isElementHidden(t){return null===t.offsetParent}_showElement(){this._element.style.display="block",this._element.getAttribute("aria-label")||this._element.getAttribute("aria-labelledby")||this._element.setAttribute("aria-label","Menu"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._mainElement&&this._isNavbarOutsideMain&&this._mainElement.setAttribute("inert",""),C(this._element),this._element.classList.add(ce);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,oe)}),this._menuWrapper,this._isAnimated())}_hideElement(){this._element.style.display="none",this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),document.body.classList.remove(ae),this._mainElement&&this._isNavbarOutsideMain&&this._mainElement.removeAttribute("inert"),this._scrollBar.reset(),this._isTransitioning=!1,z.trigger(this._element,ne)}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,Jt,ue,(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,se,(t=>{t.defaultPrevented||z.one(e,ne,(()=>{v(this)&&this.focus()}))}));be.getOrCreateInstance(e).toggle(this)}));const ve=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const n=((t,e)=>{let i=null;return e.forEach(((e,n)=>{e===t&&(i=n)})),i})(t,e);let s=null;if(i.isLimit&&i.isDirectionTop&&n>0)s=e[0];else if(i.isLimit&&n<e.length-1)s=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===n)return;s=e[0===n?e.length-1:n-1]}else{if(!i.loop&&n===e.length-1)return;s=e[n===e.length-1?0:n+1]}s&&s.focus()},ye=".bs.accordion",we=`keydown${ye}`,Ee=`keydown${ye}.data-api`,Ce='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class Se extends Y{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const n={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof n[t]&&(i&&i.preventDefault(),n[t](e))}_bindEvents(){K.find(Ce,this._element).forEach((t=>{z.on(t,we,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return K.find(":scope > "+Ce,this._element)}_focusNext(t){ve(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){ve(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){ve(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){ve(t,this._getHeadButtons(),{isLimit:!0})}}var ke;"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,Ee,Ce,(function(t){const e=this.closest(".accordion");if(e){Se.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var xe=new Uint8Array(16);function Te(){if(!ke&&!(ke="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(xe)}const Ae=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Oe=[],Le=0;Le<256;++Le)Oe.push((Le+256).toString(16).substr(1));function Pe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(Oe[t[e+0]]+Oe[t[e+1]]+Oe[t[e+2]]+Oe[t[e+3]]+"-"+Oe[t[e+4]]+Oe[t[e+5]]+"-"+Oe[t[e+6]]+Oe[t[e+7]]+"-"+Oe[t[e+8]]+Oe[t[e+9]]+"-"+Oe[t[e+10]]+Oe[t[e+11]]+Oe[t[e+12]]+Oe[t[e+13]]+Oe[t[e+14]]+Oe[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&Ae.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function Ie(t,e,i){var n=(t=t||{}).random||(t.rng||Te)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,Pe(n)}let Me=!1,Fe=[];class $e{constructor(t,e){this.id=t,this._callback=e}dispose(){je(this.id)}_execute(t){this._callback(t)}}const je=t=>{Fe=Fe.filter((e=>e.id!==t))},Ne=t=>{if("undefined"!=typeof document){if(Fe.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{Me||(window.requestAnimationFrame((()=>{Fe.forEach((e=>e.cb._execute(t))),Me=!1})),Me=!0)})),"function"==typeof t){const e=new $e(Ie(),t);return Fe.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},De={duration:800,easing:"easeInOutSine"},Be=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const i=("object"==typeof e?e:{}).complete,s=window.document.scrollingElement||window.document.body||window.document.documentElement,o=s.style.scrollBehavior;e={scrollTop:t||0,...De,..."object"==typeof e?e:{}},s.style.scrollBehavior="auto",e.complete=t=>{s.style.scrollBehavior=o,"function"==typeof i&&i(t)},n({targets:s,...e})},Re="active",Ve="ul.link-list",ze="a.nav-link",We=`${ze}.${Re}`,qe=`${ze}[href^="#"]`,He={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Ue extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=K.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=K.findOne(".it-page-sections-container"),this._collapsible=this._getCollapsible(),this._isCollapseOpened=!1,this._callbackQueue=[],this._scrollCb=null;const i=K.findOne(".menu-wrapper",this._element);i&&!i.hasAttribute("tabindex")&&i.setAttribute("tabindex","-1"),this._bindEvents()}static get NAME(){return"navscroll"}setScrollPadding(t){this._config.scrollPadding=t}dispose(){this._scrollCb&&this._scrollCb.dispose(),super.dispose()}_getConfig(t){return t={...He,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=Ne((()=>this._onScroll())),this._collapsible&&(z.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),z.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),K.find(qe,this._element).forEach((t=>{t.addEventListener("click",(()=>{const e=()=>this._scrollToHash(t.hash);this._isCollapseOpened?(this._callbackQueue.push(e),this._collapsible.hide()):e()}))})),"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load",(()=>{setTimeout((()=>this._onScroll()),150)}))}_onCollapseOpened(){this._isCollapseOpened=!0}_onCollapseClosed(){for(;this._callbackQueue.length>0;){const t=this._callbackQueue.shift();"function"==typeof t&&t()}this._isCollapseOpened=!1}_getParentLinks(t){const e=[];let i=t.closest(Ve),n=null,s=!1;for(;i&&!s;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(ze);i&&e.push(i)}n=i,i=(i.parentElement||i).closest(Ve),i===n&&(s=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=K.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){if(!t||"#"===t)return;const e=this._sectionContainer?K.findOne(t,this._sectionContainer):K.findOne(t);e&&(Be(e.offsetTop-this._getScrollPadding(),{duration:this._config.duration,easing:this._config.easing,complete:()=>{const t=e.matches("h1, h2, h3, h4, h5, h6"),i=!e.hasAttribute("tabindex");i&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),i&&t&&setTimeout((()=>{e.removeAttribute("tabindex")}),500)}}),history.pushState?history.pushState(null,null,t):location.hash=t)}_updateProgress(t){if(!t)return;const e=K.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,n=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=n+"%",e.setAttribute("aria-valuenow",n)):(e.style.width="0%",e.setAttribute("aria-valuenow",0))}))}}_onScroll(){const t=this._sectionContainer?this._sectionContainer.offsetTop:0;if("undefined"==typeof document)return;const e=document.scrollingElement.scrollTop-t,i=K.find(ze,this._element),n=this._getScrollPadding();K.find(".it-page-section").forEach(((s,o)=>{if(s.offsetTop-t<=e+n&&(K.find(We,this._element).forEach((t=>{t.classList.remove(Re)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Re)})),t.classList.add(Re),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=K.findOne(".navbar-collapsable",this._element);return t?be.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){K.find("[data-bs-navscroll]").map((t=>{Ue.getOrCreateInstance(t)}))}const Ge=".bs.sticky",Ye=`resize${Ge}`,Ke=`on${Ge}`,Qe=`off${Ge}`,Xe="bs-is-sticky",Ze="bs-is-fixed",Je='[data-bs-toggle="sticky"]',ti={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class ei extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=K.findOne(m(this._element),this._element)||this._element,this._stickyTargetMobile=K.findOne(this._element.getAttribute("data-bs-target-mobile"),this._element)||this._stickyTarget,this._stickyLimit=0,this._stickyLimitMobile=0,this._setLimit(),this._scrollCb=null,this._isMobile=Mt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,Ye),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...ti,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,Ye,(()=>this._onResize())),this._scrollCb=Ne((()=>this._onScroll())))}_onResize(){this._isMobile=Mt(),this._setLimit()}_onScroll(){this._checkSticky()}_setLimit(){this._stickyLimit=this._cumulativeOffset(this._stickyTarget).top,this._stickyLimitMobile=this._cumulativeOffset(this._stickyTargetMobile).top}_getLimit(){let t=this._isMobile?this._stickyLimitMobile:this._stickyLimit;return this._config.stackable&&this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t-=n.height+(0===i?parseFloat(e.style.top):0)})),t>0?t:0}_cumulativeOffset(t){let e=0,i=0;do{e+=t.offsetTop||0,i+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:e,left:i}}_isTypeSticky(){return"sticky"===this._config.positionType}_checkSticky(){this._isSticky||this._setLimit();const t=this._getLimit();"undefined"!=typeof window&&window.pageYOffset>t?this._setSticky():this._unsetSticky()}_setSticky(){if(!this._isSticky){this._isSticky=!0;let t=Xe;this._isTypeSticky()||(t=Ze,this._wrapper=this._createWrapper()),this._element.classList.add(t),this._config.stickyClassName&&this._element.classList.add(this._config.stickyClassName),this._prevTop=this._element.style.top,this._element.style.top=this._getPositionTop()+"px",z.trigger(this._element,Ke)}}_unsetSticky(){if(this._isSticky){let t=Xe;this._isTypeSticky()||(t=Ze,this._destroyWrapper()),this._element.classList.remove(t),this._config.stickyClassName&&this._element.classList.remove(this._config.stickyClassName),this._element.style.top=this._prevTop,this._isSticky=!1,z.trigger(this._element,Qe)}}_createWrapper(){if("undefined"==typeof document)return;const t=document.createElement("div");return t.classList.add("bs-it-sticky-wrapper"),t.style.width="100%",t.style.height=this._element.getBoundingClientRect().height+"px",t.style.overflow="hidden",this._element.parentNode.insertBefore(t,this._element),t.appendChild(this._element),t}_destroyWrapper(){this._wrapper&&(this._wrapper.parentNode.insertBefore(this._element,this._wrapper),this._wrapper.remove())}_getStickySimblings(){return K.find(Je).filter((t=>{const e=ei.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t+=n.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&Ne((()=>{K.find(Je).map((t=>{ei.getOrCreateInstance(t)}))}));const ii="cloned-element",ni=`.${ii}`,si=new Map;class oi{constructor(t){if(si.get(t))return null;this._element=t,this._elementObj=ei.getOrCreateInstance(t),si.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return si.get(t)||new this(t)}_bindEvents(){this._element.addEventListener("on.bs.sticky",(()=>this._toggleClonedElement(!0))),this._element.addEventListener("off.bs.sticky",(()=>this._toggleClonedElement(!1)))}_toggleClonedElement(t=!0){if(!v(K.findOne(".custom-navbar-toggler",this._element))){const e=K.findOne(".menu-wrapper",this._element);if(t){const t=K.findOne(".it-brand-wrapper",this._element),i=K.findOne(".it-search-wrapper",this._element),n=K.findOne(".it-user-wrapper",this._element),s=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=n?n.cloneNode(!0):null;s&&e.insertBefore(s,e.childNodes[0]).classList.add(ii),o&&e.appendChild(o).classList.add(ii),r&&(e.appendChild(r).classList.add(ii),e.appendChild(r).classList.remove("show"))}else K.find(ni,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}Ne((()=>{K.find('.it-header-sticky [data-bs-toggle="sticky"]').map((t=>{oi.getOrCreateInstance(t)}))}));var ri=Object.defineProperty,ai=(t,e,i)=>(((t,e,i)=>{e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const li=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ci=/^-?[0-9]\d*$/,ui=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,hi=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,di=t=>"string"!=typeof t||""===t;var fi=(t=>(t.Required="required",t.Email="email",t.MinLength="minLength",t.MaxLength="maxLength",t.Password="password",t.Number="number",t.Integer="integer",t.MaxNumber="maxNumber",t.MinNumber="minNumber",t.StrongPassword="strongPassword",t.CustomRegexp="customRegexp",t.MinFilesCount="minFilesCount",t.MaxFilesCount="maxFilesCount",t.Files="files",t))(fi||{}),pi=(t=>(t.Required="required",t))(pi||{}),mi=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(mi||{});const gi=[{key:fi.Required,dict:{en:"The field is required"}},{key:fi.Email,dict:{en:"Email has invalid format"}},{key:fi.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:fi.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:fi.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:fi.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:fi.Number,dict:{en:"Value should be a number"}},{key:fi.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:fi.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:fi.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:fi.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:fi.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],_i=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,bi=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],vi=t=>t instanceof Element||t instanceof HTMLDocument,yi={errorFieldStyle:{color:"#b81111",border:"1px solid #B81111"},errorFieldCssClass:"just-validate-error-field",successFieldCssClass:"just-validate-success-field",errorLabelStyle:{color:"#b81111"},errorLabelCssClass:"just-validate-error-label",successLabelCssClass:"just-validate-success-label",focusInvalidField:!0,lockForm:!0,testingMode:!1,validateBeforeSubmitting:!1,submitFormAutomatically:!1};class wi{constructor(t,e,i){ai(this,"form",null),ai(this,"fields",{}),ai(this,"groupFields",{}),ai(this,"errors",{}),ai(this,"isValid",!1),ai(this,"isSubmitted",!1),ai(this,"globalConfig",yi),ai(this,"errorLabels",{}),ai(this,"successLabels",{}),ai(this,"eventListeners",[]),ai(this,"dictLocale",gi),ai(this,"currentLocale","en"),ai(this,"customStyleTags",{}),ai(this,"onSuccessCallback"),ai(this,"onFailCallback"),ai(this,"onValidateCallback"),ai(this,"tooltips",[]),ai(this,"lastScrollPosition"),ai(this,"isScrollTick"),ai(this,"fieldIds",new Map),ai(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),ai(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),ai(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const n=this.getFieldSelectorByKey(e);"string"==typeof n&&(i=n),t[i]={...this.fields[e]}})),t})),ai(this,"setKeyByFieldSelector",(t=>{if(this.fieldIds.has(t))return this.fieldIds.get(t);const e=String(this.fieldIds.size+1);return this.fieldIds.set(t,e),e})),ai(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),ai(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),ai(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),ai(this,"handleFieldChange",(t=>{let e;for(const i in this.fields){if(this.fields[i].elem===t){e=i;break}}e&&(this.fields[e].touched=!0,this.validateField(e,!0))})),ai(this,"handleGroupChange",(t=>{let e;for(const i in this.groupFields){if(this.groupFields[i].elems.find((e=>e===t))){e=i;break}}e&&(this.groupFields[e].touched=!0,this.validateGroup(e,!0))})),ai(this,"handlerChange",(t=>{t.target&&(this.handleFieldChange(t.target),this.handleGroupChange(t.target),this.renderErrors())})),this.initialize(t,e,i)}initialize(t,e,i){if(this.form=null,this.errors={},this.isValid=!1,this.isSubmitted=!1,this.globalConfig=yi,this.errorLabels={},this.successLabels={},this.eventListeners=[],this.customStyleTags={},this.tooltips=[],this.currentLocale="en","string"==typeof t){const e=document.querySelector(t);if(!e)throw Error(`Form with ${t} selector not found! Please check the form selector`);this.setForm(e)}else{if(!(t instanceof HTMLFormElement))throw Error("Form selector is not valid. Please specify a string selector or a DOM element.");this.setForm(t)}if(this.globalConfig={...yi,...e},i&&(this.dictLocale=[...i,...gi]),this.isTooltip()){const t=document.createElement("style");t.textContent=".just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}",this.customStyleTags[mi.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var n;const s=null!=i?i:t;let o=null==(n=this.dictLocale.find((t=>t.key===s)))?void 0:n.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case fi.MaxLength:case fi.MinLength:case fi.MaxNumber:case fi.MinNumber:case fi.MinFilesCount:case fi.MaxFilesCount:o=o.replace(":value",String(e))}return o||i||"Value is incorrect"}getFieldErrorMessage(t,e){const i="function"==typeof t.errorMessage?t.errorMessage(this.getElemValue(e),this.fields):t.errorMessage;return this.getLocalisedString(t.rule,t.value,i)}getFieldSuccessMessage(t,e){const i="function"==typeof t?t(this.getElemValue(e),this.fields):t;return this.getLocalisedString(void 0,void 0,i)}getGroupErrorMessage(t){return this.getLocalisedString(t.rule,void 0,t.errorMessage)}getGroupSuccessMessage(t){if(t.successMessage)return this.getLocalisedString(void 0,void 0,t.successMessage)}setFieldInvalid(t,e){this.fields[t].isValid=!1,this.fields[t].errorMessage=this.getFieldErrorMessage(e,this.fields[t].elem)}setFieldValid(t,e){this.fields[t].isValid=!0,void 0!==e&&(this.fields[t].successMessage=this.getFieldSuccessMessage(e,this.fields[t].elem))}setGroupInvalid(t,e){this.groupFields[t].isValid=!1,this.groupFields[t].errorMessage=this.getGroupErrorMessage(e)}setGroupValid(t,e){this.groupFields[t].isValid=!0,this.groupFields[t].successMessage=this.getGroupSuccessMessage(e)}getElemValue(t){switch(t.type){case"checkbox":return t.checked;case"file":return t.files;default:return t.value}}validateGroupRule(t,e,i){if(i.rule===pi.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,n=!1){const s=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case fi.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case fi.Email:if(di(o))break;r=o,li.test(r)||this.setFieldInvalid(t,i);break;case fi.MaxLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;((t,e)=>t.length>e)(o,s)&&this.setFieldInvalid(t,i);break;case fi.MinLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;((t,e)=>t.length<e)(o,s)&&this.setFieldInvalid(t,i);break;case fi.Password:if(di(o))break;(t=>ui.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.StrongPassword:if(di(o))break;(t=>hi.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.Number:if(di(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case fi.Integer:if(di(o))break;(t=>ci.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.MaxNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,s))&&this.setFieldInvalid(t,i);break}case fi.MinNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,s))&&this.setFieldInvalid(t,i);break}case fi.CustomRegexp:{if(void 0===s)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);let e;try{e=new RegExp(s)}catch(e){console.error(`Value for ${i.rule} rule for [${t}] should be a valid regexp. This field will be always invalid.`),this.setFieldInvalid(t,i);break}const n=String(o);""===n||e.test(n)||this.setFieldInvalid(t,i);break}case fi.MinFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length<s){this.setFieldInvalid(t,i);break}break;case fi.MaxFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length>s){this.setFieldInvalid(t,i);break}break;case fi.Files:{if(void 0===s)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);if("object"!=typeof s)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=s.files;if("object"!=typeof e)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object with files array. This field will be always invalid.`),void this.setFieldInvalid(t,i);const n=(t,e)=>{const i=Number.isFinite(e.minSize)&&t.size<e.minSize,n=Number.isFinite(e.maxSize)&&t.size>e.maxSize,s=Array.isArray(e.names)&&!e.names.includes(t.name),o=Array.isArray(e.extensions)&&!e.extensions.includes(t.name.split(".")[t.name.split(".").length-1]),r=Array.isArray(e.types)&&!e.types.includes(t.type);return i||n||s||o||r};if("object"==typeof o&&null!==o)for(let s=0,r=o.length;s<r;++s){const r=o.item(s);if(!r){this.setFieldInvalid(t,i);break}if(n(r,e)){this.setFieldInvalid(t,i);break}}break}default:{if("function"!=typeof i.validator)return console.error(`Validator for custom rule for [${t}] field should be a function. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=i.validator(o,this.getCompatibleFields());if("boolean"!=typeof e&&"function"!=typeof e&&console.error(`Validator return value for [${t}] field should be boolean or function. It will be cast to boolean.`),"function"==typeof e){if(!n){this.fields[t].asyncCheckPending=!1;const n=e();return _i(n)?n.then((e=>{e||this.setFieldInvalid(t,i)})).catch((()=>{this.setFieldInvalid(t,i)})):(console.error(`Validator function for custom rule for [${t}] field should return a Promise. This field will be always invalid.`),void this.setFieldInvalid(t,i))}this.fields[t].asyncCheckPending=!0}e||this.setFieldInvalid(t,i)}}var r}}isFormValid(){let t=!0;for(let e=0,i=Object.values(this.fields).length;e<i;++e){const i=Object.values(this.fields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}for(let e=0,i=Object.values(this.groupFields).length;e<i;++e){const i=Object.values(this.groupFields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}return t}validateField(t,e=!1){var i;const n=this.fields[t];n.isValid=!0;const s=[];return[...n.rules].reverse().forEach((i=>{const o=this.validateFieldRule(t,n.elem,i,e);_i(o)&&s.push(o)})),n.isValid&&this.setFieldValid(t,null==(i=n.config)?void 0:i.successMessage),Promise.allSettled(s).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}revalidateField(t){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.fields[e]?new Promise((t=>{this.validateField(e,!0).finally((()=>{this.clearFieldStyle(e),this.clearFieldLabel(e),this.renderFieldError(e,!0),t(!!this.fields[e].isValid)}))})):(console.error("Field not found. Check the field selector."),Promise.reject())}revalidateGroup(t){if("string"!=typeof t&&!vi(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?new Promise((t=>{this.validateGroup(e).finally((()=>{this.clearFieldLabel(e),this.renderGroupError(e,!0),t(!!this.groupFields[e].isValid)}))})):(console.error("Group not found. Check the group selector."),Promise.reject())}validateGroup(t,e=!1){const i=this.groupFields[t],n=[];return[...i.rules].reverse().forEach((e=>{const s=this.validateGroupRule(t,i.elems,e);_i(s)&&n.push(s)})),Promise.allSettled(n).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}focusInvalidField(){for(const t in this.fields){const e=this.fields[t];if(!e.isValid){setTimeout((()=>e.elem.focus()),0);break}}}afterSubmitValidation(t=!1){this.renderErrors(t),this.globalConfig.focusInvalidField&&this.focusInvalidField()}validate(t=!1){return new Promise((e=>{const i=[];Object.keys(this.fields).forEach((t=>{const e=this.validateField(t);_i(e)&&i.push(e)})),Object.keys(this.groupFields).forEach((t=>{const e=this.validateGroup(t);_i(e)&&i.push(e)})),Promise.allSettled(i).then((()=>{var n;this.afterSubmitValidation(t),null==(n=this.onValidateCallback)||n.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}),e(!!i.length)}))}))}revalidate(){return new Promise((t=>{this.validateHandler(void 0,!0).finally((()=>{this.globalConfig.focusInvalidField&&this.focusInvalidField(),t(this.isValid)}))}))}validateHandler(t,e=!1){return this.globalConfig.lockForm&&this.lockForm(),this.validate(e).finally((()=>{var e,i,n;this.globalConfig.lockForm&&this.unlockForm(),this.isValid?(null==(e=this.onSuccessCallback)||e.call(this,t),this.globalConfig.submitFormAutomatically&&(null==(i=null==t?void 0:t.currentTarget)||i.submit())):null==(n=this.onFailCallback)||n.call(this,this.getCompatibleFields(),this.groupFields)}))}setForm(t){this.form=t,this.form.setAttribute("novalidate","novalidate"),this.removeListener("submit",this.form,this.formSubmitHandler),this.addListener("submit",this.form,this.formSubmitHandler)}addListener(t,e,i){e.addEventListener(t,i),this.eventListeners.push({type:t,elem:e,func:i})}removeListener(t,e,i){e.removeEventListener(t,i),this.eventListeners=this.eventListeners.filter((i=>i.type!==t||i.elem!==e))}addField(t,e,i){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");let n;if(n="string"==typeof t?this.form.querySelector(t):t,!n)throw Error("Field doesn't exist in the DOM! Please check the field selector.");if(!Array.isArray(e)||!e.length)throw Error("Rules argument should be an array and should contain at least 1 element.");e.forEach((t=>{if(!("rule"in t||"validator"in t||"plugin"in t))throw Error("Rules argument must contain at least one rule or validator property.");if(!(t.validator||t.plugin||t.rule&&Object.values(fi).includes(t.rule)))throw Error(`Rule should be one of these types: ${Object.values(fi).join(", ")}. Provided value: ${t.rule}`)}));const s=this.setKeyByFieldSelector(t);return this.fields[s]={elem:n,rules:e,isValid:void 0,touched:!1,config:i},this.setListeners(n),(this.isSubmitted||this.globalConfig.validateBeforeSubmitting)&&this.validateField(s),this}removeField(t){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);if(!e||!this.fields[e])return console.error("Field not found. Check the field selector."),this;const i=this.getListenerType(this.fields[e].elem.type);return this.removeListener(i,this.fields[e].elem,this.handlerChange),this.clearErrors(),delete this.fields[e],this}removeGroup(t){if("string"!=typeof t)throw Error("Group selector is not valid. Please specify a string selector.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?(this.groupFields[e].elems.forEach((t=>{const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange)})),this.clearErrors(),delete this.groupFields[e],this):(console.error("Group not found. Check the group selector."),this)}addRequiredGroup(t,e,i,n){if("string"!=typeof t&&!vi(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");let s;if(s="string"==typeof t?this.form.querySelector(t):t,!s)throw Error("Group selector not found! Please check the group selector.");const o=s.querySelectorAll("input"),r=Array.from(o).filter((t=>{const e=((t,e)=>{const i=[...e].reverse();for(let e=0,n=i.length;e<n;++e){const n=i[e];for(const e in t){const i=t[e];if(i.groupElem===n)return[e,i]}}return null})(this.groupFields,(t=>{let e=t;const i=[];for(;e;)i.unshift(e),e=e.parentNode;return i})(t));return!e||e[1].elems.find((e=>e!==t))})),a=this.setKeyByFieldSelector(t);return this.groupFields[a]={rules:[{rule:pi.Required,errorMessage:e,successMessage:n}],groupElem:s,elems:r,touched:!1,isValid:void 0,config:i},o.forEach((t=>{this.setListeners(t)})),this}getListenerType(t){switch(t){case"checkbox":case"select-one":case"file":case"radio":return"change";default:return"input"}}setListeners(t){const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange),this.addListener(e,t,this.handlerChange)}clearFieldLabel(t){var e,i;null==(e=this.errorLabels[t])||e.remove(),null==(i=this.successLabels[t])||i.remove()}clearFieldStyle(t){var e,i,n,s;const o=this.fields[t],r=(null==(e=o.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(r).forEach((t=>{o.elem.style[t]=""}));const a=(null==(i=o.config)?void 0:i.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(a).forEach((t=>{o.elem.style[t]=""})),o.elem.classList.remove(...bi((null==(n=o.config)?void 0:n.errorFieldCssClass)||this.globalConfig.errorFieldCssClass),...bi((null==(s=o.config)?void 0:s.successFieldCssClass)||this.globalConfig.successFieldCssClass))}clearErrors(){var t,e;Object.keys(this.errorLabels).forEach((t=>this.errorLabels[t].remove())),Object.keys(this.successLabels).forEach((t=>this.successLabels[t].remove()));for(const t in this.fields)this.clearFieldStyle(t);for(const i in this.groupFields){const n=this.groupFields[i],s=(null==(t=n.config)?void 0:t.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(s).forEach((t=>{n.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...bi((null==(i=n.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}))}));const o=(null==(e=n.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(o).forEach((t=>{n.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...bi((null==(i=n.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}))}))}this.tooltips=[]}isTooltip(){return!!this.globalConfig.tooltip}lockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)t[e].setAttribute("data-just-validate-fallback-disabled",t[e].disabled?"true":"false"),t[e].setAttribute("disabled","disabled"),t[e].style.pointerEvents="none",t[e].style.webkitFilter="grayscale(100%)",t[e].style.filter="grayscale(100%)"}unlockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)"true"!==t[e].getAttribute("data-just-validate-fallback-disabled")&&t[e].removeAttribute("disabled"),t[e].style.pointerEvents="",t[e].style.webkitFilter="",t[e].style.filter=""}renderTooltip(t,e,i){var n;const{top:s,left:o,width:r,height:a}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),c=i||(null==(n=this.globalConfig.tooltip)?void 0:n.position);switch(c){case"left":e.style.top=s+a/2-l.height/2+"px",e.style.left=o-l.width-5+"px";break;case"top":e.style.top=s-l.height-5+"px",e.style.left=o+r/2-l.width/2+"px";break;case"right":e.style.top=s+a/2-l.height/2+"px",e.style.left=`${o+r+5}px`;break;case"bottom":e.style.top=`${s+a+5}px`,e.style.left=o+r/2-l.width/2+"px"}e.dataset.direction=c;return{refresh:()=>{this.renderTooltip(t,e,i)}}}createErrorLabelElem(t,e,i){const n=document.createElement("div");n.innerHTML=e;const s=this.isTooltip()?null==i?void 0:i.errorLabelStyle:(null==i?void 0:i.errorLabelStyle)||this.globalConfig.errorLabelStyle;return Object.assign(n.style,s),n.classList.add(...bi((null==i?void 0:i.errorLabelCssClass)||this.globalConfig.errorLabelCssClass),"just-validate-error-label"),this.isTooltip()&&(n.dataset.tooltip="true"),this.globalConfig.testingMode&&(n.dataset.testId=`error-label-${t}`),this.errorLabels[t]=n,n}createSuccessLabelElem(t,e,i){if(void 0===e)return null;const n=document.createElement("div");n.innerHTML=e;const s=(null==i?void 0:i.successLabelStyle)||this.globalConfig.successLabelStyle;return Object.assign(n.style,s),n.classList.add(...bi((null==i?void 0:i.successLabelCssClass)||this.globalConfig.successLabelCssClass),"just-validate-success-label"),this.globalConfig.testingMode&&(n.dataset.testId=`success-label-${t}`),this.successLabels[t]=n,n}renderErrorsContainer(t,e){const i=e||this.globalConfig.errorsContainer;if("string"==typeof i){const e=this.form.querySelector(i);if(e)return e.appendChild(t),!0;console.error(`Error container with ${i} selector not found. Errors will be rendered as usual`)}return i instanceof Element?(i.appendChild(t),!0):(void 0!==i&&console.error("Error container not found. It should be a string or existing Element. Errors will be rendered as usual"),!1)}renderGroupLabel(t,e,i,n){if(!n){if(this.renderErrorsContainer(e,i))return}t.appendChild(e)}renderFieldLabel(t,e,i,n){var s,o,r,a,l,c,u;if(!n){if(this.renderErrorsContainer(e,i))return}if("checkbox"===t.type||"radio"===t.type){const i=document.querySelector(`label[for="${t.getAttribute("id")}"]`);"label"===(null==(o=null==(s=t.parentElement)?void 0:s.tagName)?void 0:o.toLowerCase())?null==(a=null==(r=t.parentElement)?void 0:r.parentElement)||a.appendChild(e):i?null==(l=i.parentElement)||l.appendChild(e):null==(c=t.parentElement)||c.appendChild(e)}else null==(u=t.parentElement)||u.appendChild(e)}showLabels(t,e){Object.keys(t).forEach(((i,n)=>{const s=t[i],o=this.getKeyByFieldSelector(i);if(!o||!this.fields[o])return void console.error("Field not found. Check the field selector.");const r=this.fields[o];r.isValid=!e,this.clearFieldStyle(o),this.clearFieldLabel(o),this.renderFieldError(o,!1,s),0===n&&this.globalConfig.focusInvalidField&&setTimeout((()=>r.elem.focus()),0)}))}showErrors(t){if("object"!=typeof t)throw Error("[showErrors]: Errors should be an object with key: value format");this.showLabels(t,!0)}showSuccessLabels(t){if("object"!=typeof t)throw Error("[showSuccessLabels]: Labels should be an object with key: value format");this.showLabels(t,!1)}renderFieldError(t,e=!1,i){var n,s,o,r,a,l;const c=this.fields[t];if(!1===c.isValid&&(this.isValid=!1),void 0===c.isValid||!e&&!this.isSubmitted&&!c.touched&&void 0===i)return;if(c.isValid){if(!c.asyncCheckPending){const e=this.createSuccessLabelElem(t,void 0!==i?i:c.successMessage,c.config);e&&this.renderFieldLabel(c.elem,e,null==(n=c.config)?void 0:n.errorsContainer,!0),c.elem.classList.add(...bi((null==(s=c.config)?void 0:s.successFieldCssClass)||this.globalConfig.successFieldCssClass))}return}c.elem.classList.add(...bi((null==(o=c.config)?void 0:o.errorFieldCssClass)||this.globalConfig.errorFieldCssClass));const u=this.createErrorLabelElem(t,void 0!==i?i:c.errorMessage,c.config);this.renderFieldLabel(c.elem,u,null==(r=c.config)?void 0:r.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(c.elem,u,null==(l=null==(a=c.config)?void 0:a.tooltip)?void 0:l.position))}renderGroupError(t,e=!0){var i,n,s,o;const r=this.groupFields[t];if(!1===r.isValid&&(this.isValid=!1),void 0===r.isValid||!e&&!this.isSubmitted&&!r.touched)return;if(r.isValid){r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle),t.classList.add(...bi((null==(i=r.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}));const e=this.createSuccessLabelElem(t,r.successMessage,r.config);return void(e&&this.renderGroupLabel(r.groupElem,e,null==(i=r.config)?void 0:i.errorsContainer,!0))}this.isValid=!1,r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle),t.classList.add(...bi((null==(i=r.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}));const a=this.createErrorLabelElem(t,r.errorMessage,r.config);this.renderGroupLabel(r.groupElem,a,null==(n=r.config)?void 0:n.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(r.groupElem,a,null==(o=null==(s=r.config)?void 0:s.tooltip)?void 0:o.position))}renderErrors(t=!1){if(this.isSubmitted||t||this.globalConfig.validateBeforeSubmitting){this.clearErrors(),this.isValid=!0;for(const t in this.groupFields)this.renderGroupError(t);for(const t in this.fields)this.renderFieldError(t)}}destroy(){this.eventListeners.forEach((t=>{this.removeListener(t.type,t.elem,t.func)})),Object.keys(this.customStyleTags).forEach((t=>{this.customStyleTags[t].remove()})),this.clearErrors(),this.globalConfig.lockForm&&this.unlockForm()}refresh(){this.destroy(),this.form?(this.initialize(this.form,this.globalConfig),Object.keys(this.fields).forEach((t=>{const e=this.getFieldSelectorByKey(t);e&&this.addField(e,[...this.fields[t].rules],this.fields[t].config)}))):console.error("Cannot initialize the library! Form is not defined")}setCurrentLocale(t){"string"==typeof t||void 0===t?(this.currentLocale=t,this.isSubmitted&&this.validate()):console.error("Current locale should be a string")}onSuccess(t){return this.onSuccessCallback=t,this}onFail(t){return this.onFailCallback=t,this}onValidate(t){return this.onValidateCallback=t,this}}class Ei{constructor(t,e,i,n,s){this.targetNode=t,this.classToWatch=e,this.classAddedCallback=i,this.classRemovedCallback=n,this.observer=null,this.lastClassState=t.classList.contains(this.classToWatch),this.ignoreToggle=!!s,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{attributes:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)if("attributes"===e.type&&"class"===e.attributeName){let t=e.target.classList.contains(this.classToWatch);(this.ignoreToggle||this.lastClassState!==t)&&(this.lastClassState=t,t?"function"==typeof this.classAddedCallback&&this.classAddedCallback():"function"==typeof this.classRemovedCallback&&this.classRemovedCallback())}}}class Ci{constructor(t,e,i,n){this.targetNode=t,this.contentSelector=e,this.contentAddedCallback=i,this.contentRemovedCallback=n,this.observer=null,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{childList:!0,subtree:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)"childList"===e.type&&(e.addedNodes.forEach((t=>{this._callbackExec(t)})),e.removedNodes.forEach((t=>{this._callbackExec(t,!0)})))}_callbackExec(t,e){const i=t.matches&&t.matches(this.contentSelector)?[t]:t.querySelectorAll?t.querySelectorAll(this.contentSelector):null,n=e&&"function"==typeof this.contentRemovedCallback?this.contentRemovedCallback:"function"==typeof this.contentAddedCallback?this.contentAddedCallback:null;i&&n&&i.forEach((t=>n(t)))}}const Si={errorFieldCssClass:"is-invalid",errorLabelCssClass:"just-validate-error-label"},ki="justvalidatebi";class xi extends Y{constructor(t){super(t),this._label=new st(t),this._bindEvents()}static get NAME(){return"input"}_bindEvents(){"file"===this._element.getAttribute("type")&&z.on(this._element,"change.bs.input",(()=>{this._handleFileDescription()}))}_handleFileDescription(){const t=[];let e="";Array.from(this._element.files).forEach((e=>{const i=Math.round(parseInt(e.size,10)/1024);t.push(e.name+" ("+i+"kb)")})),this._element.files.length>1&&(e=this._element.files.length+" file da caricare: ");const i=K.findOne('label[for="'+this._element.getAttribute("id")+'"] label.form-file-name',this._element);i&&(i.innerText=e+t.join("; "))}}const Ti=["select",'input[data-bs-input][type="password"]',"input.input-password[data-bs-input]",'input[data-bs-autocomplete][type="search"]','input[type="time"]','input[type="radio"]','input[type="checkbox"]'];"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("input, textarea, label").forEach((function(t){(t=>{const e=!!Ti.find((e=>t.matches(e))),i=!("number"!==t.getAttribute("type")||!t.parentNode.querySelector('button[class^="input-number-"]'));e||i||xi.getOrCreateInstance(t)})(st.getInputFromLabel(t)||t)}))}));var Ai="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Oi(t,e){return t(e={exports:{}},e.exports),e.exports}var Li=Oi((function(t,e){var i;globalThis,i=()=>(()=>{var t={8952:(t,e,i)=>{var n=i(4328),s=i(36),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not a function")}},6100:(t,e,i)=>{var n=i(7e3),s=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new s("Incorrect invocation")}},3951:(t,e,i)=>{var n=i(1632),s=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not an object")}},2504:(t,e,i)=>{var n=i(4096),s=i(2495),o=i(3556),r=function(t){return function(e,i,r){var a=n(e),l=o(a);if(0===l)return!t&&-1;var c,u=s(r,l);if(t&&i!=i){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===i)return t||u||0;return!t&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},6728:(t,e,i)=>{var n=i(3476),s=i(1432),o=TypeError,r=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(s(t)&&!r(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},8696:(t,e,i)=>{var n=i(3951),s=i(3112);t.exports=function(t,e,i,o){try{return o?e(n(i)[0],i[1]):e(i)}catch(e){s(t,"throw",e)}}},1888:(t,e,i)=>{var n=i(1664),s=n({}.toString),o=n("".slice);t.exports=function(t){return o(s(t),8,-1)}},9968:(t,e,i)=>{var n=i(5152),s=i(9252),o=i(9444),r=i(8352);t.exports=function(t,e,i){for(var a=s(e),l=r.f,c=o.f,u=0;u<a.length;u++){var h=a[u];n(t,h)||i&&n(i,h)||l(t,h,c(e,h))}}},2272:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3336:t=>{t.exports=function(t,e){return{value:t,done:e}}},3440:(t,e,i)=>{var n=i(3476),s=i(8352),o=i(9728);t.exports=n?function(t,e,i){return s.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},9728:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},92:(t,e,i)=>{var n=i(3476),s=i(8352),o=i(9728);t.exports=function(t,e,i){n?s.f(t,e,o(0,i)):t[e]=i}},2544:(t,e,i)=>{var n=i(5312),s=i(8352);t.exports=function(t,e,i){return i.get&&n(i.get,e,{getter:!0}),i.set&&n(i.set,e,{setter:!0}),s.f(t,e,i)}},6076:(t,e,i)=>{var n=i(4328),s=i(8352),o=i(5312),r=i(4636);t.exports=function(t,e,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(n(i)&&o(i,c,a),a.global)l?t[e]=i:r(e,i);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=i:s.f(t,e,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},4036:(t,e,i)=>{var n=i(6076);t.exports=function(t,e,i){for(var s in e)n(t,s,e[s],i);return t}},4636:(t,e,i)=>{var n=i(6420),s=Object.defineProperty;t.exports=function(t,e){try{s(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},3476:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8168:(t,e,i)=>{var n=i(6420),s=i(1632),o=n.document,r=s(o)&&s(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},4316:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6064:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},8504:(t,e,i)=>{var n,s,o=i(6420),r=i(6064),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(s=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&r&&(!(n=r.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/))&&(s=+n[1]),t.exports=s},8256:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9160:(t,e,i)=>{var n=i(6420),s=i(9444).f,o=i(3440),r=i(6076),a=i(4636),l=i(9968),c=i(6704);t.exports=function(t,e){var i,u,h,d,f,p=t.target,m=t.global,g=t.stat;if(i=m?n:g?n[p]||a(p,{}):n[p]&&n[p].prototype)for(u in e){if(d=e[u],h=t.dontCallGetSet?(f=s(i,u))&&f.value:i[u],!c(m?u:p+(g?".":"#")+u,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),r(i,u,d,t)}}},9957:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7332:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8448:(t,e,i)=>{var n=i(7332),s=Function.prototype.call;t.exports=n?s.bind(s):function(){return s.apply(s,arguments)}},6208:(t,e,i)=>{var n=i(3476),s=i(5152),o=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,a=s(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&r(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},1664:(t,e,i)=>{var n=i(7332),s=Function.prototype,o=s.call,r=n&&s.bind.bind(o,o);t.exports=n?r:function(t){return function(){return o.apply(t,arguments)}}},5232:(t,e,i)=>{var n=i(6420),s=i(4328);t.exports=function(t,e){return arguments.length<2?(i=n[t],s(i)?i:void 0):n[t]&&n[t][e];var i}},6752:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},4504:(t,e,i)=>{var n=i(8952),s=i(9760);t.exports=function(t,e){var i=t[e];return s(i)?void 0:n(i)}},6420:function(t,e,i){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5152:(t,e,i)=>{var n=i(1664),s=i(4356),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(s(t),e)}},2560:t=>{t.exports={}},4168:(t,e,i)=>{var n=i(5232);t.exports=n("document","documentElement")},9888:(t,e,i)=>{var n=i(3476),s=i(9957),o=i(8168);t.exports=!n&&!s((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5712:(t,e,i)=>{var n=i(1664),s=i(9957),o=i(1888),r=Object,a=n("".split);t.exports=s((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):r(t)}:r},9112:(t,e,i)=>{var n=i(1664),s=i(4328),o=i(3976),r=n(Function.toString);s(o.inspectSource)||(o.inspectSource=function(t){return r(t)}),t.exports=o.inspectSource},9104:(t,e,i)=>{var n,s,o,r=i(4288),a=i(6420),l=i(1632),c=i(3440),u=i(5152),h=i(3976),d=i(6504),f=i(2560),p="Object already initialized",m=a.TypeError,g=a.WeakMap;if(r||h.state){var _=h.state||(h.state=new g);_.get=_.get,_.has=_.has,_.set=_.set,n=function(t,e){if(_.has(t))throw new m(p);return e.facade=t,_.set(t,e),e},s=function(t){return _.get(t)||{}},o=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,n=function(t,e){if(u(t,b))throw new m(p);return e.facade=t,c(t,b,e),e},s=function(t){return u(t,b)?t[b]:{}},o=function(t){return u(t,b)}}t.exports={set:n,get:s,has:o,enforce:function(t){return o(t)?s(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=s(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return i}}}},1432:(t,e,i)=>{var n=i(1888);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4328:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},6704:(t,e,i)=>{var n=i(9957),s=i(4328),o=/#|\.prototype\./,r=function(t,e){var i=l[a(t)];return i===u||i!==c&&(s(e)?n(e):!!e)},a=r.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=r.data={},c=r.NATIVE="N",u=r.POLYFILL="P";t.exports=r},9760:t=>{t.exports=function(t){return null==t}},1632:(t,e,i)=>{var n=i(4328);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},7048:t=>{t.exports=!1},7728:(t,e,i)=>{var n=i(5232),s=i(4328),o=i(7e3),r=i(6536),a=Object;t.exports=r?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return s(e)&&o(e.prototype,a(t))}},3112:(t,e,i)=>{var n=i(8448),s=i(3951),o=i(4504);t.exports=function(t,e,i){var r,a;s(t);try{if(!(r=o(t,"return"))){if("throw"===e)throw i;return i}r=n(r,t)}catch(t){a=!0,r=t}if("throw"===e)throw i;if(a)throw r;return s(r),i}},9724:(t,e,i)=>{var n=i(8448),s=i(9368),o=i(3440),r=i(4036),a=i(9972),l=i(9104),c=i(4504),u=i(336).IteratorPrototype,h=i(3336),d=i(3112),f=a("toStringTag"),p="IteratorHelper",m="WrapForValidIterator",g=l.set,_=function(t){var e=l.getterFor(t?m:p);return r(s(u),{next:function(){var i=e(this);if(t)return i.nextHandler();try{var n=i.done?void 0:i.nextHandler();return h(n,i.done)}catch(t){throw i.done=!0,t}},return:function(){var i=e(this),s=i.iterator;if(i.done=!0,t){var o=c(s,"return");return o?n(o,s):h(void 0,!0)}if(i.inner)try{d(i.inner.iterator,"normal")}catch(t){return d(s,"throw",t)}return d(s,"normal"),h(void 0,!0)}})},b=_(!0),v=_(!1);o(v,f,"Iterator Helper"),t.exports=function(t,e){var i=function(i,n){n?(n.iterator=i.iterator,n.next=i.next):n=i,n.type=e?m:p,n.nextHandler=t,n.counter=0,n.done=!1,g(this,n)};return i.prototype=e?b:v,i}},5792:(t,e,i)=>{var n=i(8448),s=i(8952),o=i(3951),r=i(6752),a=i(9724),l=i(8696),c=a((function(){var t=this.iterator,e=o(n(this.next,t));if(!(this.done=!!e.done))return l(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return o(this),s(t),new c(r(this),{mapper:t})}},336:(t,e,i)=>{var n,s,o,r=i(9957),a=i(4328),l=i(1632),c=i(9368),u=i(7796),h=i(6076),d=i(9972),f=i(7048),p=d("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(s=u(u(o)))!==Object.prototype&&(n=s):m=!0),!l(n)||r((function(){var t={};return n[p].call(t)!==t}))?n={}:f&&(n=c(n)),a(n[p])||h(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},3556:(t,e,i)=>{var n=i(7584);t.exports=function(t){return n(t.length)}},5312:(t,e,i)=>{var n=i(1664),s=i(9957),o=i(4328),r=i(5152),a=i(3476),l=i(6208).CONFIGURABLE,c=i(9112),u=i(9104),h=u.enforce,d=u.get,f=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),_=n([].join),b=a&&!s((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=t.exports=function(t,e,i){"Symbol("===m(f(e),0,7)&&(e="["+g(f(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!r(t,"name")||l&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&i&&r(i,"arity")&&t.length!==i.arity&&p(t,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return r(n,"source")||(n.source=_(v,"string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return o(this)&&d(this).source||c(this)}),"toString")},1748:t=>{var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?i:e)(n)}},9368:(t,e,i)=>{var n,s=i(3951),o=i(2056),r=i(8256),a=i(2560),l=i(4168),c=i(8168),u=i(6504),h="prototype",d="script",f=u("IE_PROTO"),p=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},_=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;_="undefined"!=typeof document?document.domain&&n?g(n):(e=c("iframe"),i="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var s=r.length;s--;)delete _[h][r[s]];return _()};a[f]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(p[h]=s(t),i=new p,p[h]=null,i[f]=t):i=_(),void 0===e?i:o.f(i,e)}},2056:(t,e,i)=>{var n=i(3476),s=i(1576),o=i(8352),r=i(3951),a=i(4096),l=i(1531);e.f=n&&!s?Object.defineProperties:function(t,e){r(t);for(var i,n=a(e),s=l(e),c=s.length,u=0;c>u;)o.f(t,i=s[u++],n[i]);return t}},8352:(t,e,i)=>{var n=i(3476),s=i(9888),o=i(1576),r=i(3951),a=i(88),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";e.f=n?o?function(t,e,i){if(r(t),e=a(e),r(i),"function"==typeof t&&"prototype"===e&&"value"in i&&f in i&&!i[f]){var n=u(t,e);n&&n[f]&&(t[e]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:h in i?i[h]:n[h],writable:!1})}return c(t,e,i)}:c:function(t,e,i){if(r(t),e=a(e),r(i),s)try{return c(t,e,i)}catch(t){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},9444:(t,e,i)=>{var n=i(3476),s=i(8448),o=i(8912),r=i(9728),a=i(4096),l=i(88),c=i(5152),u=i(9888),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return r(!s(o.f,t,e),t[e])}},5048:(t,e,i)=>{var n=i(9008),s=i(8256).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,s)}},9392:(t,e)=>{e.f=Object.getOwnPropertySymbols},7796:(t,e,i)=>{var n=i(5152),s=i(4328),o=i(4356),r=i(6504),a=i(2272),l=r("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var i=e.constructor;return s(i)&&e instanceof i?i.prototype:e instanceof c?u:null}},7e3:(t,e,i)=>{var n=i(1664);t.exports=n({}.isPrototypeOf)},9008:(t,e,i)=>{var n=i(1664),s=i(5152),o=i(4096),r=i(2504).indexOf,a=i(2560),l=n([].push);t.exports=function(t,e){var i,n=o(t),c=0,u=[];for(i in n)!s(a,i)&&s(n,i)&&l(u,i);for(;e.length>c;)s(n,i=e[c++])&&(~r(u,i)||l(u,i));return u}},1531:(t,e,i)=>{var n=i(9008),s=i(8256);t.exports=Object.keys||function(t){return n(t,s)}},8912:(t,e)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!i.call({1:2},1);e.f=s?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},2104:(t,e,i)=>{var n=i(8448),s=i(4328),o=i(1632),r=TypeError;t.exports=function(t,e){var i,a;if("string"===e&&s(i=t.toString)&&!o(a=n(i,t)))return a;if(s(i=t.valueOf)&&!o(a=n(i,t)))return a;if("string"!==e&&s(i=t.toString)&&!o(a=n(i,t)))return a;throw new r("Can't convert object to primitive value")}},9252:(t,e,i)=>{var n=i(5232),s=i(1664),o=i(5048),r=i(9392),a=i(3951),l=s([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),i=r.f;return i?l(e,i(t)):e}},5436:(t,e,i)=>{var n=i(9760),s=TypeError;t.exports=function(t){if(n(t))throw new s("Can't call method on "+t);return t}},6504:(t,e,i)=>{var n=i(4696),s=i(7776),o=n("keys");t.exports=function(t){return o[t]||(o[t]=s(t))}},3976:(t,e,i)=>{var n=i(7048),s=i(6420),o=i(4636),r="__core-js_shared__",a=t.exports=s[r]||o(r,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:(t,e,i)=>{var n=i(3976);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},772:(t,e,i)=>{var n=i(8504),s=i(9957),o=i(6420).String;t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},2495:(t,e,i)=>{var n=i(6180),s=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?s(i+e,0):o(i,e)}},4096:(t,e,i)=>{var n=i(5712),s=i(5436);t.exports=function(t){return n(s(t))}},6180:(t,e,i)=>{var n=i(1748);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7584:(t,e,i)=>{var n=i(6180),s=Math.min;t.exports=function(t){var e=n(t);return e>0?s(e,9007199254740991):0}},4356:(t,e,i)=>{var n=i(5436),s=Object;t.exports=function(t){return s(n(t))}},7024:(t,e,i)=>{var n=i(8448),s=i(1632),o=i(7728),r=i(4504),a=i(2104),l=i(9972),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!s(t)||o(t))return t;var i,l=r(t,u);if(l){if(void 0===e&&(e="default"),i=n(l,t,e),!s(i)||o(i))return i;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},88:(t,e,i)=>{var n=i(7024),s=i(7728);t.exports=function(t){var e=n(t,"string");return s(e)?e:e+""}},36:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},7776:(t,e,i)=>{var n=i(1664),s=0,o=Math.random(),r=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++s+o,36)}},6536:(t,e,i)=>{var n=i(772);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1576:(t,e,i)=>{var n=i(3476),s=i(9957);t.exports=n&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4288:(t,e,i)=>{var n=i(6420),s=i(4328),o=n.WeakMap;t.exports=s(o)&&/native code/.test(String(o))},9972:(t,e,i)=>{var n=i(6420),s=i(4696),o=i(5152),r=i(7776),a=i(772),l=i(6536),c=n.Symbol,u=s("wks"),h=l?c.for||c:c&&c.withoutSetter||r;t.exports=function(t){return o(u,t)||(u[t]=a&&o(c,t)?c[t]:h("Symbol."+t)),u[t]}},4728:(t,e,i)=>{var n=i(9160),s=i(4356),o=i(3556),r=i(6728),a=i(4316);n({target:"Array",proto:!0,arity:1,forced:i(9957)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=s(this),i=o(e),n=arguments.length;a(i+n);for(var l=0;l<n;l++)e[i]=arguments[l],i++;return r(e,i),i}})},3536:(t,e,i)=>{var n=i(9160),s=i(6420),o=i(6100),r=i(3951),a=i(4328),l=i(7796),c=i(2544),u=i(92),h=i(9957),d=i(5152),f=i(9972),p=i(336).IteratorPrototype,m=i(3476),g=i(7048),_="constructor",b="Iterator",v=f("toStringTag"),y=TypeError,w=s[b],E=g||!a(w)||w.prototype!==p||!h((function(){w({})})),C=function(){if(o(this,p),l(this)===p)throw new y("Abstract class Iterator not directly constructable")},S=function(t,e){m?c(p,t,{configurable:!0,get:function(){return e},set:function(e){if(r(this),this===p)throw new y("You can't redefine this property");d(this,t)?this[t]=e:u(this,t,e)}}):p[t]=e};d(p,v)||S(v,b),!E&&d(p,_)&&p[_]!==Object||S(_,C),C.prototype=p,n({global:!0,constructor:!0,forced:E},{Iterator:C})},2144:(t,e,i)=>{var n=i(9160),s=i(8448),o=i(8952),r=i(3951),a=i(6752),l=i(9724),c=i(8696),u=i(7048),h=l((function(){for(var t,e,i=this.iterator,n=this.predicate,o=this.next;;){if(t=r(s(o,i)),this.done=!!t.done)return;if(e=t.value,c(i,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:u},{filter:function(t){return r(this),o(t),new h(a(this),{predicate:t})}})},9080:(t,e,i)=>{var n=i(9160),s=i(5792);n({target:"Iterator",proto:!0,real:!0,forced:i(7048)},{map:s})}},e={};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}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};return(()=>{i.d(n,{default:()=>q}),i(3536),i(2144),i(9080);var t=function(){},e={},s=[],o=[];function r(i,n){var r,a,l,c,u=o;for(c=arguments.length;c-- >2;)s.push(arguments[c]);for(n&&null!=n.children&&(s.length||s.push(n.children),delete n.children);s.length;)if((a=s.pop())&&void 0!==a.pop)for(c=a.length;c--;)s.push(a[c]);else"boolean"==typeof a&&(a=null),(l="function"!=typeof i)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(l=!1)),l&&r?u[u.length-1]+=a:u===o?u=[a]:u.push(a),r=l;var h=new t;return h.nodeName=i,h.children=u,h.attributes=null==n?void 0:n,h.key=null==n?void 0:n.key,void 0!==e.vnode&&e.vnode(h),h}function a(t,e){for(var i in e)t[i]=e[i];return t}function l(t,e){t&&("function"==typeof t?t(e):t.current=e)}var c="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,u=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function d(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(e.debounceRendering||c)(f)}function f(){for(var t;t=h.pop();)t._dirty&&M(t)}function p(t,e,i){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&m(t,e.nodeName):i||t._componentConstructor===e.nodeName}function m(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function g(t){var e=a({},t.attributes);e.children=t.children;var i=t.nodeName.defaultProps;if(void 0!==i)for(var n in i)void 0===e[n]&&(e[n]=i[n]);return e}function _(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,i,n,s){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)l(i,null),l(n,t);else if("class"!==e||s)if("style"===e){if(n&&"string"!=typeof n&&"string"!=typeof i||(t.style.cssText=n||""),n&&"object"==typeof n){if("string"!=typeof i)for(var o in i)o in n||(t.style[o]="");for(var o in n)t.style[o]="number"==typeof n[o]&&!1===u.test(o)?n[o]+"px":n[o]}}else if("dangerouslySetInnerHTML"===e)n&&(t.innerHTML=n.__html||"");else if("o"==e[0]&&"n"==e[1]){var r=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),n?i||t.addEventListener(e,v,r):t.removeEventListener(e,v,r),(t._listeners||(t._listeners={}))[e]=n}else if("list"!==e&&"type"!==e&&!s&&e in t){try{t[e]=null==n?"":n}catch(t){}null!=n&&!1!==n||"spellcheck"==e||t.removeAttribute(e)}else{var a=s&&e!==(e=e.replace(/^xlink:?/,""));null==n||!1===n?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof n&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):t.setAttribute(e,n))}else t.className=n||""}function v(t){return this._listeners[t.type](e.event&&e.event(t)||t)}var y=[],w=0,E=!1,C=!1;function S(){for(var t;t=y.shift();)e.afterMount&&e.afterMount(t),t.componentDidMount&&t.componentDidMount()}function k(t,e,i,n,s,o){w++||(E=null!=s&&void 0!==s.ownerSVGElement,C=null!=t&&!("__preactattr_"in t));var r=x(t,e,i,n,o);return s&&r.parentNode!==s&&s.appendChild(r),--w||(C=!1,o||S()),r}function x(t,e,i,n,s){var o=t,r=E;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||s)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),T(t,!0))),o.__preactattr_=!0,o;var a,l,c=e.nodeName;if("function"==typeof c)return function(t,e,i,n){for(var s=t&&t._component,o=s,r=t,a=s&&t._componentConstructor===e.nodeName,l=a,c=g(e);s&&!l&&(s=s._parentComponent);)l=s.constructor===e.nodeName;return s&&l&&(!n||s._component)?(I(s,c,3,i,n),t=s.base):(o&&!a&&(F(o),t=r=null),s=L(e.nodeName,c,i),t&&!s.nextBase&&(s.nextBase=t,r=null),I(s,c,1,i,n),t=s.base,r&&t!==r&&(r._component=null,T(r,!1))),t}(t,e,i,n);if(E="svg"===c||"foreignObject"!==c&&E,c=String(c),(!t||!m(t,c))&&(a=c,(l=E?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,o=l,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),T(t,!0)}var u=o.firstChild,h=o.__preactattr_,d=e.children;if(null==h){h=o.__preactattr_={};for(var f=o.attributes,v=f.length;v--;)h[f[v].name]=f[v].value}return!C&&d&&1===d.length&&"string"==typeof d[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=d[0]&&(u.nodeValue=d[0]):(d&&d.length||null!=u)&&function(t,e,i,n,s){var o,r,a,l,c,u=t.childNodes,h=[],d={},f=0,m=0,g=u.length,b=0,v=e?e.length:0;if(0!==g)for(var y=0;y<g;y++){var w=u[y],E=w.__preactattr_;null!=(C=v&&E?w._component?w._component.__key:E.key:null)?(f++,d[C]=w):(E||(void 0!==w.splitText?!s||w.nodeValue.trim():s))&&(h[b++]=w)}if(0!==v)for(y=0;y<v;y++){var C;if(c=null,null!=(C=(l=e[y]).key))f&&void 0!==d[C]&&(c=d[C],d[C]=void 0,f--);else if(m<b)for(o=m;o<b;o++)if(void 0!==h[o]&&p(r=h[o],l,s)){c=r,h[o]=void 0,o===b-1&&b--,o===m&&m++;break}c=x(c,l,i,n),a=u[y],c&&c!==t&&c!==a&&(null==a?t.appendChild(c):c===a.nextSibling?_(a):t.insertBefore(c,a))}if(f)for(var y in d)void 0!==d[y]&&T(d[y],!1);for(;m<=b;)void 0!==(c=h[b--])&&T(c,!1)}(o,d,i,n,C||null!=h.dangerouslySetInnerHTML),function(t,e,i){var n;for(n in i)e&&null!=e[n]||null==i[n]||b(t,n,i[n],i[n]=void 0,E);for(n in e)"children"===n||"innerHTML"===n||n in i&&e[n]===("value"===n||"checked"===n?t[n]:i[n])||b(t,n,i[n],i[n]=e[n],E)}(o,e.attributes,h),E=r,o}function T(t,e){var i=t._component;i?F(i):(null!=t.__preactattr_&&l(t.__preactattr_.ref,null),!1!==e&&null!=t.__preactattr_||_(t),A(t))}function A(t){for(t=t.lastChild;t;){var e=t.previousSibling;T(t,!0),t=e}}var O=[];function L(t,e,i){var n,s=O.length;for(t.prototype&&t.prototype.render?(n=new t(e,i),$.call(n,e,i)):((n=new $(e,i)).constructor=t,n.render=P);s--;)if(O[s].constructor===t)return n.nextBase=O[s].nextBase,O.splice(s,1),n;return n}function P(t,e,i){return this.constructor(t,i)}function I(t,i,n,s,o){t._disable||(t._disable=!0,t.__ref=i.ref,t.__key=i.key,delete i.ref,delete i.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(i,s)),s&&s!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=s),t.prevProps||(t.prevProps=t.props),t.props=i,t._disable=!1,0!==n&&(1!==n&&!1===e.syncComponentUpdates&&t.base?d(t):M(t,1,o)),l(t.__ref,t))}function M(t,i,n,s){if(!t._disable){var o,r,l,c=t.props,u=t.state,h=t.context,d=t.prevProps||c,f=t.prevState||u,p=t.prevContext||h,m=t.base,_=t.nextBase,b=m||_,v=t._component,E=!1,C=p;if(t.constructor.getDerivedStateFromProps&&(u=a(a({},u),t.constructor.getDerivedStateFromProps(c,u)),t.state=u),m&&(t.props=d,t.state=f,t.context=p,2!==i&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(c,u,h)?E=!0:t.componentWillUpdate&&t.componentWillUpdate(c,u,h),t.props=c,t.state=u,t.context=h),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!E){o=t.render(c,u,h),t.getChildContext&&(h=a(a({},h),t.getChildContext())),m&&t.getSnapshotBeforeUpdate&&(C=t.getSnapshotBeforeUpdate(d,f));var x,A,O=o&&o.nodeName;if("function"==typeof O){var P=g(o);(r=v)&&r.constructor===O&&P.key==r.__key?I(r,P,1,h,!1):(x=r,t._component=r=L(O,P,h),r.nextBase=r.nextBase||_,r._parentComponent=t,I(r,P,0,h,!1),M(r,1,n,!0)),A=r.base}else l=b,(x=v)&&(l=t._component=null),(b||1===i)&&(l&&(l._component=null),A=k(l,o,h,n||!m,b&&b.parentNode,!0));if(b&&A!==b&&r!==v){var $=b.parentNode;$&&A!==$&&($.replaceChild(A,b),x||(b._component=null,T(b,!1)))}if(x&&F(x),t.base=A,A&&!s){for(var j=t,N=t;N=N._parentComponent;)(j=N).base=A;A._component=j,A._componentConstructor=j.constructor}}for(!m||n?y.push(t):E||(t.componentDidUpdate&&t.componentDidUpdate(d,f,C),e.afterUpdate&&e.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);w||s||S()}}function F(t){e.beforeUnmount&&e.beforeUnmount(t);var i=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?F(n):i&&(null!=i.__preactattr_&&l(i.__preactattr_.ref,null),t.nextBase=i,_(i),O.push(t),A(i)),l(t.__ref,null)}function $(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}a($.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=a(a({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),d(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),M(this,2)},render:function(){}}),i(4728);class j extends ${static defaultProps={tQueryTooShort:t=>`Type in ${t} or more characters for results`,tNoResults:()=>"No search results",tSelectedOption:(t,e,i)=>`${t} ${i+1} of ${e} is highlighted`,tResults:(t,e)=>`${t} ${1===t?"result":"results"} ${1===t?"is":"are"} available. ${e}`};state={bump:!1,debounced:!1};componentWillMount(){const t=this;this.debounceStatusUpdate=function(t){let e;return function(){const i=this,n=arguments;clearTimeout(e),e=setTimeout((function(){e=null,t.apply(i,n)}),1400)}}((function(){if(!t.state.debounced){const e=!t.props.isInFocus||t.props.validChoiceMade;t.setState((({bump:t})=>({bump:!t,debounced:!0,silenced:e})))}}))}componentWillReceiveProps({queryLength:t}){this.setState({debounced:!1})}render(){const{id:t,length:e,queryLength:i,minQueryLength:n,selectedOption:s,selectedOptionIndex:o,tQueryTooShort:a,tNoResults:l,tSelectedOption:c,tResults:u,className:h}=this.props,{bump:d,debounced:f,silenced:p}=this.state,m=i<n,g=0===e,_=s?c(s,e,o):"";let b=null;return b=m?a(n):g?l():u(e,_),this.debounceStatusUpdate(),r("div",{className:h,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},r("div",{id:t+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!p&&f&&d?b:""),r("div",{id:t+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},p||!f||d?"":b))}}const N=({className:t})=>r("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},r("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},r("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})));function D(){return D=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},D.apply(this,arguments)}const B={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function R(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}class V extends ${static defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:()=>{},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:()=>"No results found",tAssistiveHint:()=>"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.",dropdownArrow:N,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null};elementReferences={};constructor(t){super(t),this.state={focused:null,hovered:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},this.handleComponentBlur=this.handleComponentBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleUpArrow=this.handleUpArrow.bind(this),this.handleDownArrow=this.handleDownArrow.bind(this),this.handleEnter=this.handleEnter.bind(this),this.handlePrintableKey=this.handlePrintableKey.bind(this),this.handleListMouseLeave=this.handleListMouseLeave.bind(this),this.handleOptionBlur=this.handleOptionBlur.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleOptionMouseDown=this.handleOptionMouseDown.bind(this),this.handleOptionMouseEnter=this.handleOptionMouseEnter.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.handleInputFocus=this.handleInputFocus.bind(this),this.pollInputElement=this.pollInputElement.bind(this),this.getDirectInputChanges=this.getDirectInputChanges.bind(this)}isQueryAnOption(t,e){return-1!==e.map((t=>this.templateInputValue(t).toLowerCase())).indexOf(t.toLowerCase())}componentDidMount(){this.pollInputElement()}componentWillUnmount(){clearTimeout(this.$pollInput)}pollInputElement(){this.getDirectInputChanges(),this.$pollInput=setTimeout((()=>{this.pollInputElement()}),100)}getDirectInputChanges(){const t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})}componentDidUpdate(t,e){const{focused:i}=this.state,n=null===i,s=e.focused!==i;s&&!n&&this.elementReferences[i].focus();const o=-1===i,r=s&&null===e.focused;if(o&&r){const t=this.elementReferences[i];t.setSelectionRange(0,t.value.length)}}hasAutoselect(){return!R()&&this.props.autoselect}templateInputValue(t){const e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t}templateSuggestion(t){const e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t}handleComponentBlur(t){const{options:e,query:i,selected:n}=this.state;let s;this.props.confirmOnBlur?(s=t.query||i,this.props.onConfirm(e[n])):s=i,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:s,selected:null,validChoiceMade:this.isQueryAnOption(s,e)})}handleListMouseLeave(t){this.setState({hovered:null})}handleOptionBlur(t,e){const{focused:i,menuOpen:n,options:s,selected:o}=this.state,r=null===t.relatedTarget,a=t.relatedTarget===this.elementReferences[-1],l=i!==e&&-1!==i;if(!l&&r||!l&&!a){const t=n&&R();this.handleComponentBlur({menuOpen:t,query:this.templateInputValue(s[o])})}}handleInputBlur(t){const{focused:e,menuOpen:i,options:n,query:s,selected:o}=this.state;if(-1===e){const t=i&&R(),e=R()?s:this.templateInputValue(n[o]);this.handleComponentBlur({menuOpen:t,query:e})}}handleInputChange(t){const{minLength:e,source:i,showAllValues:n}=this.props,s=this.hasAutoselect(),o=t.target.value,r=0===o.length,a=this.state.query!==o,l=o.length>=e;this.setState({query:o,ariaHint:r}),n||!r&&a&&l?i(o,(t=>{const e=t.length>0;this.setState({menuOpen:e,options:t,selected:s&&e?0:-1,validChoiceMade:!1})})):!r&&l||this.setState({menuOpen:!1,options:[]})}handleInputClick(t){this.handleInputChange(t)}handleInputFocus(t){const{query:e,validChoiceMade:i,options:n}=this.state,{minLength:s}=this.props,o=!i&&e.length>=s&&n.length>0;o?this.setState((({menuOpen:t})=>({focused:-1,menuOpen:o||t,selected:-1}))):this.setState({focused:-1})}handleOptionFocus(t){this.setState({focused:t,hovered:null,selected:t})}handleOptionMouseEnter(t,e){R()||this.setState({hovered:e})}handleOptionClick(t,e){const i=this.state.options[e],n=this.templateInputValue(i);this.props.onConfirm(i),this.setState({focused:-1,hovered:null,menuOpen:!1,query:n,selected:-1,validChoiceMade:!0}),this.forceUpdate()}handleOptionMouseDown(t){t.preventDefault()}handleUpArrow(t){t.preventDefault();const{menuOpen:e,selected:i}=this.state;-1!==i&&e&&this.handleOptionFocus(i-1)}handleDownArrow(t){if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(t=>{this.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){const{menuOpen:t,options:e,selected:i}=this.state;i!==e.length-1&&t&&this.handleOptionFocus(i+1)}}handleSpace(t){this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(t=>{this.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))}handleEnter(t){this.state.menuOpen&&(t.preventDefault(),this.state.selected>=0&&this.handleOptionClick(t,this.state.selected))}handlePrintableKey(t){const e=this.elementReferences[-1];t.target===e||e.focus()}handleKeyDown(t){switch(B[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((e=t.keyCode)>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223)&&this.handlePrintableKey(t)}var e}render(){const{cssNamespace:t,displayMenu:e,id:i,minLength:n,name:s,placeholder:o,required:a,showAllValues:l,tNoResults:c,tStatusQueryTooShort:u,tStatusNoResults:h,tStatusSelectedOption:d,tStatusResults:f,tAssistiveHint:p,dropdownArrow:m,menuAttributes:g,inputClasses:_,hintClasses:b,menuClasses:v}=this.props,{focused:y,hovered:w,menuOpen:E,options:C,query:S,selected:k,ariaHint:x,validChoiceMade:T}=this.state,A=this.hasAutoselect(),O=-1===y,L=0===C.length,P=0!==S.length,I=S.length>=n,M=this.props.showNoOptionsFound&&O&&L&&P&&I,F=`${t}__wrapper`,$=`${t}__status`,N=`${t}__dropdown-arrow-down`,B=-1!==y&&null!==y,V=`${t}__option`,z=`${t}__hint`,W=this.templateInputValue(C[k]),q=W&&0===W.toLowerCase().indexOf(S.toLowerCase())&&A?S+W.substr(S.length):"",H=i+"__assistiveHint",U={"aria-describedby":x?H:null,"aria-expanded":E?"true":"false","aria-activedescendant":B?`${i}__option--${y}`:null,"aria-controls":`${i}__listbox`,"aria-autocomplete":this.hasAutoselect()?"both":"list"};let G;l&&(G=m({className:N}),"string"==typeof G&&(G=r("div",{className:`${t}__dropdown-arrow-down-wrapper`,dangerouslySetInnerHTML:{__html:G}})));const Y=`${t}__input`,K=[Y,this.props.showAllValues?`${Y}--show-all-values`:`${Y}--default`];null!==y&&K.push(`${Y}--focused`),_&&K.push(_);const Q=`${t}__menu`,X=[Q,`${Q}--${e}`,`${Q}--${E||M?"visible":"hidden"}`];v&&X.push(v),(g?.class||g?.className)&&X.push(g?.class||g?.className);const Z={"aria-labelledby":i,...g,id:`${i}__listbox`,role:"listbox",className:X.join(" "),onMouseLeave:this.handleListMouseLeave};return delete Z.class,r("div",{className:F,onKeyDown:this.handleKeyDown},r(j,{id:i,length:C.length,queryLength:S.length,minQueryLength:n,selectedOption:this.templateInputValue(C[k]),selectedOptionIndex:k,validChoiceMade:T,isInFocus:null!==this.state.focused,tQueryTooShort:u,tNoResults:h,tSelectedOption:d,tResults:f,className:$}),q&&r("span",null,r("input",{className:[z,null===b?_:b].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:q})),r("input",D({},U,{autoComplete:"off",className:K.join(" "),id:i,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:s,placeholder:o,ref:t=>{this.elementReferences[-1]=t},type:"text",role:"combobox",required:a,value:S})),G,r("ul",Z,C.map(((t,e)=>{const n=(-1===y?k===e:y===e)&&null===w?` ${V}--focused`:"",s=e%2?` ${V}--odd`:"",o=R()?`<span id=${i}__option-suffix--${e} style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> ${e+1} of ${C.length}</span>`:"";return r("li",{"aria-selected":y===e?"true":"false",className:`${V}${n}${s}`,dangerouslySetInnerHTML:{__html:this.templateSuggestion(t)+o},id:`${i}__option--${e}`,key:e,onBlur:t=>this.handleOptionBlur(t,e),onClick:t=>this.handleOptionClick(t,e),onMouseDown:this.handleOptionMouseDown,onMouseEnter:t=>this.handleOptionMouseEnter(t,e),ref:t=>{this.elementReferences[e]=t},role:"option",tabIndex:"-1","aria-posinset":e+1,"aria-setsize":C.length})})),M&&r("li",{className:`${V} ${V}--no-results`,role:"option","aria-disabled":"true"},c())),r("span",{id:H,style:{display:"none"}},p()))}}function z(t){if(!t.element)throw new Error("element is not defined");if(!t.id)throw new Error("id is not defined");if(!t.source)throw new Error("source is not defined");Array.isArray(t.source)&&(t.source=W(t.source)),function(t,e,i){k(i,t,{},!1,e,!1)}(r(V,t),t.element)}const W=t=>(e,i)=>{i(t.filter((t=>-1!==t.toLowerCase().indexOf(e.toLowerCase()))))};z.enhanceSelectElement=t=>{if(!t.selectElement)throw new Error("selectElement is not defined");if(!t.source){const e=[].filter.call(t.selectElement.options,(e=>e.value||t.preserveNullOptions));t.source=e.map((t=>t.textContent||t.innerText))}if(t.onConfirm=t.onConfirm||(e=>{const i=[].filter.call(t.selectElement.options,(t=>(t.textContent||t.innerText)===e))[0];i&&(i.selected=!0)}),t.selectElement.value||void 0===t.defaultValue){const e=t.selectElement.options[t.selectElement.options.selectedIndex];t.defaultValue=e.textContent||e.innerText}void 0===t.name&&(t.name=""),void 0===t.id&&(void 0===t.selectElement.id?t.id="":t.id=t.selectElement.id),void 0===t.autoselect&&(t.autoselect=!0);const e=document.createElement("div");t.selectElement.parentNode.insertBefore(e,t.selectElement),z({...t,element:e}),t.selectElement.style.display="none",t.selectElement.id=t.selectElement.id+"-select"};const q=z})(),n.default})(),t.exports=i()}));Li.accessibleAutocomplete;const Pi={autocomplete:[]},Ii="autocomplete-list-show",Mi="data-bs-autocomplete",Fi="input["+Mi+'][type="search"]';class $i extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._items=[],this._autocompleteElement=null,this._label=new st(t),this._init(),this._bindEvents()}static get NAME(){return"inputsearchautocomplete"}search(){const t=this._element.value;
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@splidejs/splide"),require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js")):"function"==typeof define&&define.amd?define(["@splidejs/splide","@popperjs/core","video.js","animejs/lib/anime.es.js"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Splide,t.Popper,t.videojs,t.anime)}(this,(function(t,e,i,n){"use strict";function s(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const o=s(e);!function(){const t={NODE_ENV:"production"};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();const r="data-focus-mouse";class a{constructor(){this._usingMouse=!1,this._bindEvents()}_bindEvents(){if("undefined"==typeof document)return;["keydown","mousedown"].forEach((t=>{document.addEventListener(t,(t=>{this._usingMouse="mousedown"===t.type}))})),document.addEventListener("focusin",(t=>{this._usingMouse&&t.target&&t.target.setAttribute(r,!0)})),document.addEventListener("focusout",(t=>{t.target&&t.target.setAttribute(r,!1)}))}}new a;const l=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new a,window.BOOTSTRAP_ITALIA_VERSION="2.16.0")};l();const c={ck3:{}},u={rememberChoice:(t,e)=>{c.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(c.ck3))},isChoiceRemembered:t=>(c.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),c.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},h=new Map,d={set(t,e,i){h.has(t)||h.set(t,new Map);const n=h.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>h.has(t)&&h.get(t).get(e)||null,remove(t,e){if(!h.has(t))return;const i=h.get(t);i.delete(e),0===i.size&&h.delete(t)}},f="transitionend",p=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},m=t=>{const e=p(t);return e&&document.querySelector(e)?e:null},g=t=>{const e=p(t);return e?document.querySelector(e):null},_=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,b=t=>_(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,v=t=>{if(!_(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},y=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),w=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?w(t.parentNode):null},E=()=>{},C=t=>{t.offsetHeight},S=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,k=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void k(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(f,o),k(t))};e.addEventListener(f,o),setTimeout((()=>{s||e.dispatchEvent(new Event(f))}),n)},T=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},A=/[^.]*(?=\..*)\.|.*/,O=/\..*/,L=/::\d+$/,P={};let I=1;const M={mouseenter:"mouseover",mouseleave:"mouseout"},F=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function $(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function j(t){const e=$(t);return t.uidEvent=e,P[e]=P[e]||{},P[e]}function N(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=(r=(r=t).replace(O,""),M[r]||r);var r;return F.has(o)||(o=t),[n,s,o]}function B(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,n);if(e in M){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=j(t),c=l[a]||(l[a]={}),u=N(c,r,o?i:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=$(r,e.replace(A,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return W(s,{delegateTarget:r}),n.oneOff&&z.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return W(n,{delegateTarget:t}),i.oneOff&&z.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=h,c[h]=d,t.addEventListener(a,d,o)}function R(t,e,i,n,s){const o=N(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function V(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];R(t,e,i,n.callable,n.delegationSelector)}}const z={on(t,e,i,n){B(t,e,i,n,!1)},one(t,e,i,n){B(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=D(e,i,n),a=r!==e,l=j(t),c=l[r]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const i of Object.keys(l))V(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(L,"");if(!a||e.includes(n)){const e=c[i];R(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;R(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let n=new Event(e,{bubbles:!0,cancelable:!0});return n=W(n,i),t.dispatchEvent(n),n}};function W(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=q(t.dataset[n])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${H(e)}`))};class G{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=_(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},..._(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],o=t[n],r=_(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class Y extends G{constructor(t,e){super(),(t=b(t))&&(this._element=t,this._config=this._getConfig(e),d.set(this._element,this.constructor.DATA_KEY,this))}dispose(){d.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){x(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return d.get(b(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const K={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!y(t)&&v(t)))}},Q={slideFocus:!1,rewind:!0,perMove:1,i18n:{prev:"Slide precedente",next:"Slide successiva",first:"Vai alla prima slide",last:"Vai all’ultima slide",slideX:"Vai alla slide %s",pageX:"Vai a pagina %s",play:"Attiva autoplay",pause:"Pausa autoplay",carousel:"Carosello",select:"Seleziona una slide da mostrare",slide:"slide",slideLabel:"%s di %s"}},X={"it-carousel-landscape-abstract-three-cols":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!1}}},"it-carousel-landscape-abstract-three-cols-arrow-visible":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!0,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!0},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!0}}},"it-big-img":{type:"loop",perPage:1,gap:48,padding:{left:320,right:320},arrows:!1,breakpoints:{768:{perPage:1,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:160,right:160},arrows:!1}}},"it-standard-image":{type:"loop",perPage:3,gap:24,padding:{left:48,right:48},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!1},992:{perPage:2,gap:24,padding:{left:48,right:48},arrows:!1}}},"it-carousel-landscape-abstract":{type:"slide",perPage:1,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:24,right:24},arrows:!1}}},"it-calendar-wrapper":{type:"slide",perPage:4,gap:0,padding:{left:0,right:0},arrows:!1,breakpoints:{560:{perPage:1,gap:0,padding:{left:24,right:24},arrows:!1},768:{perPage:2,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:3,gap:0,padding:{left:0,right:0},arrows:!1}}}};class Z extends Y{constructor(e){super(e),this._config=this._getConfig(),this._splide=new t(this._element,this._config),this._init()}dispose(){this._splide.destroy(),super.dispose()}static get NAME(){return"carousel"}_init(){this._splide.mount()}_getConfig(){let t=Object.assign({},Q);return Object.keys(X).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,X[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load.bs.carousel.data-api",(()=>{K.find("[data-bs-carousel-splide]").forEach((t=>{Z.getOrCreateInstance(t)}))}));const J=".bs.inputlabel",tt=`focus${J}`,et=`blur${J}`,it=`change${J}`,nt="active";class st{constructor(t){this._element=t,this._init()}static get NAME(){return"inputlabel"}static getInputFromLabel=t=>{if("undefined"!=typeof window&&"undefined"!=typeof document)return document.querySelector("#"+CSS.escape(t.getAttribute("for")))};_init(){const t=this._getLabel();t&&!t.classList.contains(nt)&&(this._labelOut(),this._labelOver()),t&&null===t.getAttribute("it-bs-static")&&this._bindEvents()}_bindEvents(){["date","time"].includes(this._element.getAttribute("type"))||("file"===this._element.getAttribute("type")?z.on(this._element,et,(()=>{this._labelOut()})):(z.on(this._element,tt,(()=>{this._labelOut()})),z.on(this._element,et,(()=>{this._labelOver()})),z.on(this._element,it,(()=>{this._labelToggle()}))))}_getLabel(){return K.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return"number"===this._element.getAttribute("type")?!this._element.value&&!this._element.getAttribute("placeholder")&&!this._element.validity.badInput:!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(nt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(nt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const ot=".bs.inputnumber",rt=`click${ot}`,at=`change${ot}`,lt=`click${ot}.data-api`,ct=".input-number",ut='input[data-bs-input][type="number"]',ht='button[class^="input-number-"]';class dt extends Y{constructor(t){super(t),this._wrapperElement=this._element.closest(ct),this._label=new st(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(K.find(ht,this._wrapperElement).forEach((t=>{z.on(t,rt,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),z.on(this._element,at,(()=>this._checkLimit())))}_inputResize(){if(this._wrapperElement.classList.contains("input-number-adaptive")){let t=null;t="calc(70px + "+this._element.value.length+"ch)",t&&(this._element.style.width=t)}}_incrDecr(t){let e=0;if(!this._element.disabled&&!this._element.readonly&&(""!==this._element.value&&(e=parseFloat(this._element.value)),!isNaN(e))){let i=parseFloat(this._element.getAttribute("step"));i||(i=1),this._element.value=e+i*(t?-1:1),z.trigger(this._element,at),z.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),n=parseFloat(this._element.getAttribute("min"));n&&t<n&&(e=n),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ut+", label").forEach((function(t){const e=st.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ut)&&i.parentNode.querySelector(ht)&&dt.getOrCreateInstance(i)}))})),z.on(document,lt,ht,(function(){const t=this.closest(ct);if(t){const e=K.findOne(ut,t);e&&dt.getOrCreateInstance(e)}})));const ft="show";class pt extends Y{constructor(t){super(t),this._isShown=!t.matches("[aria-hidden=true]"),this._isTransitioning=!1}static get NAME(){return"dimmer"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(ft),this._queueCallback((()=>this._hideElement()),this._element,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),t&&C(this._element),this._element.classList.add(ft);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=g(this),e=pt.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const mt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;z.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),y(this))return;const s=g(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},gt=".bs.notification",_t=`click${gt}.data-api`,bt=`hidden${gt}`,vt=`show${gt}`,yt={timeout:0},wt="show";class Et extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(wt),this._isTransitioning=!1,this._toId=null}static get NAME(){return"notification"}show(t,e){if(this._isShown||this._isTransitioning)return;const i=t||this._getElementTimeout(e);this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement(i)}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(wt),this._queueCallback((()=>this._hideElement()),this._element,t)}toggle(t){this._isShown?this.hide():this.show(null,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(t){const e=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),e&&C(this._element),this._element.classList.add(wt);this._queueCallback((()=>{this._isTransitioning=!1,t&&this._setTimeout(t,(()=>this.hide()))}),this._element,e)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}_getConfig(t){return t={...yt,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_getElementTimeout(t){const e=t?parseInt(t.getAttribute("data-bs-timeout")):null;return e>0?e:this._config.timeout}_setTimeout(t,e){this._clearTimeout(),setTimeout(e,t)}_clearTimeout(){this._toId&&(clearTimeout(this._toId),this._toId=null)}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,_t,'[data-bs-toggle="notification"]',(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,vt,(t=>{t.defaultPrevented||z.one(e,bt,(()=>{v(this)&&this.focus()}))}));Et.getOrCreateInstance(e).toggle(this)})),mt(Et));const Ct="cookiebar",St=".bs.cookiebar",kt=".data-api",xt="cookies_consent",Tt=`close${St}`,At=`closed${St}`,Ot=`load${St}${kt}`,Lt=`click${St}${kt}`,Pt="show";class It extends Y{constructor(t){super(t),this._isShown=this._element.classList.contains(Pt),this._isTransitioning=!1}static get NAME(){return Ct}static get VERSION(){return"5.0.0"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(Pt),this._queueCallback((()=>this._hideElement()),this._element,t)}accept(t){t=t||this._element;const e=this._getRootElement(t);this._triggerCloseEvent(e).defaultPrevented||(this._setCookieEU(),this.hide())}static clearCookie(){"undefined"!=typeof document&&(document.cookie=xt+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-live","polite"),t&&C(this._element),this._element.classList.add(Pt);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-live"),this._isTransitioning=!1}_setCookieEU(){var t=new Date;t.setDate(t.getDate()+30);var e=escape("true")+"; expires="+t.toUTCString();"undefined"!=typeof document&&(document.cookie=xt+"="+e+"; path=/; SameSite=Strict")}_getRootElement(t){const e=g(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return z.trigger(t,Tt)}_removeElement(t){t.classList.remove(Pt),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),z.trigger(t,At),this.dispose()}static _handleAccept(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _handleConsent(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _getCookieEU(){if("undefined"!=typeof document){var t,e,i,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(e=n[t].substring(0,n[t].indexOf("=")),i=n[t].substring(n[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,Lt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),y(this))return;const e=g(this)||this.closest(`.${Ct}`);It.getOrCreateInstance(e).accept()})),z.on(window,Ot,(function(){if(!It._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{It.getOrCreateInstance(t).show()}))}})));const Mt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Ft=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$t=".sticky-top",jt="padding-right",Nt="margin-right";class Dt{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,jt,(e=>e+t)),this._setElementAttributes(Ft,jt,(e=>e+t)),this._setElementAttributes($t,Nt,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,jt),this._resetElementAttributes(Ft,jt),this._resetElementAttributes($t,Nt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(_(t))e(t);else for(const i of K.find(t,this._element))e(i)}}const Bt=".bs.focustrap",Rt=`focusin${Bt}`,Vt=`keydown.tab${Bt}`,zt="backward",Wt={autofocus:!0,trapElement:null,initialFocus:null},qt={autofocus:"boolean",trapElement:"element",initialFocus:"(null|element|string|function)"};class Ht extends G{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null,this._affectedElements=[]}static get Default(){return Wt}static get DefaultType(){return qt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._setInitialFocus(),z.off(document,Bt),z.on(document,Rt,(t=>this._handleFocusin(t))),z.on(document,Vt,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,Bt))}_setInitialFocus(){if(this._config.initialFocus){let t;t="function"==typeof this._config.initialFocus?this._config.initialFocus():this._config.initialFocus,t&&"function"==typeof t.focus?t.focus():this._config.trapElement.focus()}else this._config.trapElement.focus()}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=K.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===zt?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?zt:"forward")}}const Ut="backdrop",Gt="show",Yt=`mousedown.bs.${Ut}`,Kt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Qt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Xt extends G{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Kt}static get DefaultType(){return Qt}static get NAME(){return Ut}show(t){if(!this._config.isVisible)return void k(t);this._append();const e=this._getElement();this._config.isAnimated&&C(e),e.classList.add(Gt),this._emulateAnimation((()=>{k(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Gt),this._emulateAnimation((()=>{this.dispose(),k(t)}))):k(t)}dispose(){this._isAppended&&(z.off(this._element,Yt),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=b(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),z.on(t,Yt,(()=>{k(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){x(t,this._getElement(),this._config.isAnimated)}}const Zt=".bs.navbarcollapsible",Jt=`click${Zt}.data-api`,te=`click${Zt}`,ee=`keydown${Zt}`,ie=`hide${Zt}`,ne=`hidden${Zt}`,se=`show${Zt}`,oe=`shown${Zt}`,re=`resize${Zt}`,ae="navbar-open",le="show",ce="expanded",ue='[data-bs-toggle="navbarcollapsible"]',he=".close-menu",de=".nav-link",fe=".nav-item .list-item",pe=".it-heading-link",me=".it-footer-link",ge={backdrop:!0,focus:!0},_e={backdrop:"(boolean|string)",focus:"boolean"};class be extends Y{constructor(t,e){super(t,e),this._mainElement=K.findOne("main"),this._isNavbarOutsideMain=this._mainElement&&!this._mainElement.contains(this._element),this._parentElement=this._element.parentNode,this._isShown=this._element.classList.contains(ce),this._element.getAttribute("tabindex")||this._element.setAttribute("tabindex","-1"),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._scrollBar=new Dt,this._isTransitioning=!1,this._isMobile=Mt(),this._btnClose=K.findOne(".close-div button",this._element),this._btnBack=K.findOne(".it-back-button",this._element),this._menuWrapper=K.findOne(".menu-wrapper",this._element),this._menuItems=K.find([de,fe,pe,me,he].join(","),this._element),this._toggleButton=K.findOne(`${ue}[data-bs-target="#${this._element.id}"]`)||K.findOne(`${ue}[href="#${this._element.id}"]`),this._toggleButton&&(this._toggleButton.getAttribute("aria-expanded")||this._toggleButton.setAttribute("aria-expanded",this._isShown?"true":"false")),this._bindEvents()}static get Default(){return ge}static get DefaultType(){return _e}static get NAME(){return"navbarcollapsible"}toggle(t){this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;z.trigger(this._element,se,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),this._btnBack&&this._btnBack.classList.add(le),document.body.classList.add(ae),this._backdrop.show(),this._showElement(),this._toggleButton&&this._toggleButton.setAttribute("aria-expanded","true"))}hide(){if(!this._isShown||this._isTransitioning)return;z.trigger(this._element,ie).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._btnBack&&this._btnBack.classList.remove(le),this._element.classList.remove(ce),this._backdrop.hide(),this._queueCallback((()=>this._hideElement()),this._menuWrapper,this._isAnimated()),this._toggleButton&&this._toggleButton.setAttribute("aria-expanded","false"))}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,re),z.off(document,ee)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){return new Xt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated(),className:"navbar-backdrop",rootElement:this._parentElement,clickCallback:()=>{this.hide()}})}_initializeFocusTrap(){return new Ht({trapElement:this._element,initialFocus:()=>this._btnClose||this._element.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')})}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,re,(()=>this._onResize())),z.on(document,ee,(t=>{this._isShown&&"Escape"===t.key&&this.hide()})),z.on(this._btnClose,te,(t=>{t.preventDefault(),this.hide()})),z.on(this._btnBack,te,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{z.on(t,ee,(t=>this._isMobile&&this._onMenuItemKeyDown(t)))})))}_onResize(){this._isMobile=Mt()}_onMenuItemKeyDown(t){"Escape"===t.key&&this.hide()}_isAnimated(){return!0}_isElementHidden(t){return null===t.offsetParent}_showElement(){this._element.style.display="block",this._element.getAttribute("aria-label")||this._element.getAttribute("aria-labelledby")||this._element.setAttribute("aria-label","Menu"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._mainElement&&this._isNavbarOutsideMain&&this._mainElement.setAttribute("inert",""),C(this._element),this._element.classList.add(ce);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,oe)}),this._menuWrapper,this._isAnimated())}_hideElement(){this._element.style.display="none",this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),document.body.classList.remove(ae),this._mainElement&&this._isNavbarOutsideMain&&this._mainElement.removeAttribute("inert"),this._scrollBar.reset(),this._isTransitioning=!1,z.trigger(this._element,ne)}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,Jt,ue,(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,se,(t=>{t.defaultPrevented||z.one(e,ne,(()=>{v(this)&&this.focus()}))}));be.getOrCreateInstance(e).toggle(this)}));const ve=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const n=((t,e)=>{let i=null;return e.forEach(((e,n)=>{e===t&&(i=n)})),i})(t,e);let s=null;if(i.isLimit&&i.isDirectionTop&&n>0)s=e[0];else if(i.isLimit&&n<e.length-1)s=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===n)return;s=e[0===n?e.length-1:n-1]}else{if(!i.loop&&n===e.length-1)return;s=e[n===e.length-1?0:n+1]}s&&s.focus()},ye=".bs.accordion",we=`keydown${ye}`,Ee=`keydown${ye}.data-api`,Ce='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class Se extends Y{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const n={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof n[t]&&(i&&i.preventDefault(),n[t](e))}_bindEvents(){K.find(Ce,this._element).forEach((t=>{z.on(t,we,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return K.find(":scope > "+Ce,this._element)}_focusNext(t){ve(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){ve(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){ve(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){ve(t,this._getHeadButtons(),{isLimit:!0})}}var ke;"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,Ee,Ce,(function(t){const e=this.closest(".accordion");if(e){Se.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var xe=new Uint8Array(16);function Te(){if(!ke&&!(ke="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(xe)}const Ae=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Oe=[],Le=0;Le<256;++Le)Oe.push((Le+256).toString(16).substr(1));function Pe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(Oe[t[e+0]]+Oe[t[e+1]]+Oe[t[e+2]]+Oe[t[e+3]]+"-"+Oe[t[e+4]]+Oe[t[e+5]]+"-"+Oe[t[e+6]]+Oe[t[e+7]]+"-"+Oe[t[e+8]]+Oe[t[e+9]]+"-"+Oe[t[e+10]]+Oe[t[e+11]]+Oe[t[e+12]]+Oe[t[e+13]]+Oe[t[e+14]]+Oe[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&Ae.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function Ie(t,e,i){var n=(t=t||{}).random||(t.rng||Te)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,Pe(n)}let Me=!1,Fe=[];class $e{constructor(t,e){this.id=t,this._callback=e}dispose(){je(this.id)}_execute(t){this._callback(t)}}const je=t=>{Fe=Fe.filter((e=>e.id!==t))},Ne=t=>{if("undefined"!=typeof document){if(Fe.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{Me||(window.requestAnimationFrame((()=>{Fe.forEach((e=>e.cb._execute(t))),Me=!1})),Me=!0)})),"function"==typeof t){const e=new $e(Ie(),t);return Fe.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},De={duration:800,easing:"easeInOutSine"},Be=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const i=("object"==typeof e?e:{}).complete,s=window.document.scrollingElement||window.document.body||window.document.documentElement,o=s.style.scrollBehavior;e={scrollTop:t||0,...De,..."object"==typeof e?e:{}},s.style.scrollBehavior="auto",e.complete=t=>{s.style.scrollBehavior=o,"function"==typeof i&&i(t)},n({targets:s,...e})},Re="active",Ve="ul.link-list",ze="a.nav-link",We=`${ze}.${Re}`,qe=`${ze}[href^="#"]`,He={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Ue extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=K.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=K.findOne(".it-page-sections-container"),this._collapsible=this._getCollapsible(),this._isCollapseOpened=!1,this._callbackQueue=[],this._scrollCb=null;const i=K.findOne(".menu-wrapper",this._element);i&&!i.hasAttribute("tabindex")&&i.setAttribute("tabindex","-1"),this._bindEvents()}static get NAME(){return"navscroll"}setScrollPadding(t){this._config.scrollPadding=t}dispose(){this._scrollCb&&this._scrollCb.dispose(),super.dispose()}_getConfig(t){return t={...He,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=Ne((()=>this._onScroll())),this._collapsible&&(z.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),z.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),K.find(qe,this._element).forEach((t=>{t.addEventListener("click",(()=>{const e=()=>this._scrollToHash(t.hash);this._isCollapseOpened?(this._callbackQueue.push(e),this._collapsible.hide()):e()}))})),"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load",(()=>{setTimeout((()=>this._onScroll()),150)}))}_onCollapseOpened(){this._isCollapseOpened=!0}_onCollapseClosed(){for(;this._callbackQueue.length>0;){const t=this._callbackQueue.shift();"function"==typeof t&&t()}this._isCollapseOpened=!1}_getParentLinks(t){const e=[];let i=t.closest(Ve),n=null,s=!1;for(;i&&!s;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(ze);i&&e.push(i)}n=i,i=(i.parentElement||i).closest(Ve),i===n&&(s=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=K.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){if(!t||"#"===t)return;const e=this._sectionContainer?K.findOne(t,this._sectionContainer):K.findOne(t);e&&(Be(e.offsetTop-this._getScrollPadding(),{duration:this._config.duration,easing:this._config.easing,complete:()=>{const t=e.matches("h1, h2, h3, h4, h5, h6"),i=!e.hasAttribute("tabindex");i&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),i&&t&&setTimeout((()=>{e.removeAttribute("tabindex")}),500)}}),history.pushState?history.pushState(null,null,t):location.hash=t)}_updateProgress(t){if(!t)return;const e=K.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,n=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=n+"%",e.setAttribute("aria-valuenow",n)):(e.style.width="0%",e.setAttribute("aria-valuenow",0))}))}}_onScroll(){const t=this._sectionContainer?this._sectionContainer.offsetTop:0;if("undefined"==typeof document)return;const e=document.scrollingElement.scrollTop-t,i=K.find(ze,this._element),n=this._getScrollPadding();K.find(".it-page-section").forEach(((s,o)=>{if(s.offsetTop-t<=e+n&&(K.find(We,this._element).forEach((t=>{t.classList.remove(Re)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Re)})),t.classList.add(Re),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=K.findOne(".navbar-collapsable",this._element);return t?be.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){K.find("[data-bs-navscroll]").map((t=>{Ue.getOrCreateInstance(t)}))}const Ge=".bs.sticky",Ye=`resize${Ge}`,Ke=`on${Ge}`,Qe=`off${Ge}`,Xe="bs-is-sticky",Ze="bs-is-fixed",Je='[data-bs-toggle="sticky"]',ti={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class ei extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=K.findOne(m(this._element),this._element)||this._element,this._stickyTargetMobile=K.findOne(this._element.getAttribute("data-bs-target-mobile"),this._element)||this._stickyTarget,this._stickyLimit=0,this._stickyLimitMobile=0,this._setLimit(),this._scrollCb=null,this._isMobile=Mt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,Ye),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...ti,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,Ye,(()=>this._onResize())),this._scrollCb=Ne((()=>this._onScroll())))}_onResize(){this._isMobile=Mt(),this._setLimit()}_onScroll(){this._checkSticky()}_setLimit(){this._stickyLimit=this._cumulativeOffset(this._stickyTarget).top,this._stickyLimitMobile=this._cumulativeOffset(this._stickyTargetMobile).top}_getLimit(){let t=this._isMobile?this._stickyLimitMobile:this._stickyLimit;return this._config.stackable&&this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t-=n.height+(0===i?parseFloat(e.style.top):0)})),t>0?t:0}_cumulativeOffset(t){let e=0,i=0;do{e+=t.offsetTop||0,i+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:e,left:i}}_isTypeSticky(){return"sticky"===this._config.positionType}_checkSticky(){this._isSticky||this._setLimit();const t=this._getLimit();"undefined"!=typeof window&&window.pageYOffset>t?this._setSticky():this._unsetSticky()}_setSticky(){if(!this._isSticky){this._isSticky=!0;let t=Xe;this._isTypeSticky()||(t=Ze,this._wrapper=this._createWrapper()),this._element.classList.add(t),this._config.stickyClassName&&this._element.classList.add(this._config.stickyClassName),this._prevTop=this._element.style.top,this._element.style.top=this._getPositionTop()+"px",z.trigger(this._element,Ke)}}_unsetSticky(){if(this._isSticky){let t=Xe;this._isTypeSticky()||(t=Ze,this._destroyWrapper()),this._element.classList.remove(t),this._config.stickyClassName&&this._element.classList.remove(this._config.stickyClassName),this._element.style.top=this._prevTop,this._isSticky=!1,z.trigger(this._element,Qe)}}_createWrapper(){if("undefined"==typeof document)return;const t=document.createElement("div");return t.classList.add("bs-it-sticky-wrapper"),t.style.width="100%",t.style.height=this._element.getBoundingClientRect().height+"px",t.style.overflow="hidden",this._element.parentNode.insertBefore(t,this._element),t.appendChild(this._element),t}_destroyWrapper(){this._wrapper&&(this._wrapper.parentNode.insertBefore(this._element,this._wrapper),this._wrapper.remove())}_getStickySimblings(){return K.find(Je).filter((t=>{const e=ei.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t+=n.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&Ne((()=>{K.find(Je).map((t=>{ei.getOrCreateInstance(t)}))}));const ii="cloned-element",ni=`.${ii}`,si=new Map;class oi{constructor(t){if(si.get(t))return null;this._element=t,this._elementObj=ei.getOrCreateInstance(t),si.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return si.get(t)||new this(t)}_bindEvents(){this._element.addEventListener("on.bs.sticky",(()=>this._toggleClonedElement(!0))),this._element.addEventListener("off.bs.sticky",(()=>this._toggleClonedElement(!1)))}_toggleClonedElement(t=!0){if(!v(K.findOne(".custom-navbar-toggler",this._element))){const e=K.findOne(".menu-wrapper",this._element);if(t){const t=K.findOne(".it-brand-wrapper",this._element),i=K.findOne(".it-search-wrapper",this._element),n=K.findOne(".it-user-wrapper",this._element),s=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=n?n.cloneNode(!0):null;s&&e.insertBefore(s,e.childNodes[0]).classList.add(ii),o&&e.appendChild(o).classList.add(ii),r&&(e.appendChild(r).classList.add(ii),e.appendChild(r).classList.remove("show"))}else K.find(ni,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}Ne((()=>{K.find('.it-header-sticky [data-bs-toggle="sticky"]').map((t=>{oi.getOrCreateInstance(t)}))}));var ri=Object.defineProperty,ai=(t,e,i)=>(((t,e,i)=>{e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const li=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ci=/^-?[0-9]\d*$/,ui=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,hi=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,di=t=>"string"!=typeof t||""===t;var fi=(t=>(t.Required="required",t.Email="email",t.MinLength="minLength",t.MaxLength="maxLength",t.Password="password",t.Number="number",t.Integer="integer",t.MaxNumber="maxNumber",t.MinNumber="minNumber",t.StrongPassword="strongPassword",t.CustomRegexp="customRegexp",t.MinFilesCount="minFilesCount",t.MaxFilesCount="maxFilesCount",t.Files="files",t))(fi||{}),pi=(t=>(t.Required="required",t))(pi||{}),mi=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(mi||{});const gi=[{key:fi.Required,dict:{en:"The field is required"}},{key:fi.Email,dict:{en:"Email has invalid format"}},{key:fi.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:fi.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:fi.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:fi.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:fi.Number,dict:{en:"Value should be a number"}},{key:fi.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:fi.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:fi.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:fi.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:fi.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],_i=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,bi=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],vi=t=>t instanceof Element||t instanceof HTMLDocument,yi={errorFieldStyle:{color:"#b81111",border:"1px solid #B81111"},errorFieldCssClass:"just-validate-error-field",successFieldCssClass:"just-validate-success-field",errorLabelStyle:{color:"#b81111"},errorLabelCssClass:"just-validate-error-label",successLabelCssClass:"just-validate-success-label",focusInvalidField:!0,lockForm:!0,testingMode:!1,validateBeforeSubmitting:!1,submitFormAutomatically:!1};class wi{constructor(t,e,i){ai(this,"form",null),ai(this,"fields",{}),ai(this,"groupFields",{}),ai(this,"errors",{}),ai(this,"isValid",!1),ai(this,"isSubmitted",!1),ai(this,"globalConfig",yi),ai(this,"errorLabels",{}),ai(this,"successLabels",{}),ai(this,"eventListeners",[]),ai(this,"dictLocale",gi),ai(this,"currentLocale","en"),ai(this,"customStyleTags",{}),ai(this,"onSuccessCallback"),ai(this,"onFailCallback"),ai(this,"onValidateCallback"),ai(this,"tooltips",[]),ai(this,"lastScrollPosition"),ai(this,"isScrollTick"),ai(this,"fieldIds",new Map),ai(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),ai(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),ai(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const n=this.getFieldSelectorByKey(e);"string"==typeof n&&(i=n),t[i]={...this.fields[e]}})),t})),ai(this,"setKeyByFieldSelector",(t=>{if(this.fieldIds.has(t))return this.fieldIds.get(t);const e=String(this.fieldIds.size+1);return this.fieldIds.set(t,e),e})),ai(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),ai(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),ai(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),ai(this,"handleFieldChange",(t=>{let e;for(const i in this.fields){if(this.fields[i].elem===t){e=i;break}}e&&(this.fields[e].touched=!0,this.validateField(e,!0))})),ai(this,"handleGroupChange",(t=>{let e;for(const i in this.groupFields){if(this.groupFields[i].elems.find((e=>e===t))){e=i;break}}e&&(this.groupFields[e].touched=!0,this.validateGroup(e,!0))})),ai(this,"handlerChange",(t=>{t.target&&(this.handleFieldChange(t.target),this.handleGroupChange(t.target),this.renderErrors())})),this.initialize(t,e,i)}initialize(t,e,i){if(this.form=null,this.errors={},this.isValid=!1,this.isSubmitted=!1,this.globalConfig=yi,this.errorLabels={},this.successLabels={},this.eventListeners=[],this.customStyleTags={},this.tooltips=[],this.currentLocale="en","string"==typeof t){const e=document.querySelector(t);if(!e)throw Error(`Form with ${t} selector not found! Please check the form selector`);this.setForm(e)}else{if(!(t instanceof HTMLFormElement))throw Error("Form selector is not valid. Please specify a string selector or a DOM element.");this.setForm(t)}if(this.globalConfig={...yi,...e},i&&(this.dictLocale=[...i,...gi]),this.isTooltip()){const t=document.createElement("style");t.textContent=".just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}",this.customStyleTags[mi.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var n;const s=null!=i?i:t;let o=null==(n=this.dictLocale.find((t=>t.key===s)))?void 0:n.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case fi.MaxLength:case fi.MinLength:case fi.MaxNumber:case fi.MinNumber:case fi.MinFilesCount:case fi.MaxFilesCount:o=o.replace(":value",String(e))}return o||i||"Value is incorrect"}getFieldErrorMessage(t,e){const i="function"==typeof t.errorMessage?t.errorMessage(this.getElemValue(e),this.fields):t.errorMessage;return this.getLocalisedString(t.rule,t.value,i)}getFieldSuccessMessage(t,e){const i="function"==typeof t?t(this.getElemValue(e),this.fields):t;return this.getLocalisedString(void 0,void 0,i)}getGroupErrorMessage(t){return this.getLocalisedString(t.rule,void 0,t.errorMessage)}getGroupSuccessMessage(t){if(t.successMessage)return this.getLocalisedString(void 0,void 0,t.successMessage)}setFieldInvalid(t,e){this.fields[t].isValid=!1,this.fields[t].errorMessage=this.getFieldErrorMessage(e,this.fields[t].elem)}setFieldValid(t,e){this.fields[t].isValid=!0,void 0!==e&&(this.fields[t].successMessage=this.getFieldSuccessMessage(e,this.fields[t].elem))}setGroupInvalid(t,e){this.groupFields[t].isValid=!1,this.groupFields[t].errorMessage=this.getGroupErrorMessage(e)}setGroupValid(t,e){this.groupFields[t].isValid=!0,this.groupFields[t].successMessage=this.getGroupSuccessMessage(e)}getElemValue(t){switch(t.type){case"checkbox":return t.checked;case"file":return t.files;default:return t.value}}validateGroupRule(t,e,i){if(i.rule===pi.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,n=!1){const s=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case fi.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case fi.Email:if(di(o))break;r=o,li.test(r)||this.setFieldInvalid(t,i);break;case fi.MaxLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;((t,e)=>t.length>e)(o,s)&&this.setFieldInvalid(t,i);break;case fi.MinLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;((t,e)=>t.length<e)(o,s)&&this.setFieldInvalid(t,i);break;case fi.Password:if(di(o))break;(t=>ui.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.StrongPassword:if(di(o))break;(t=>hi.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.Number:if(di(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case fi.Integer:if(di(o))break;(t=>ci.test(t))(o)||this.setFieldInvalid(t,i);break;case fi.MaxNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,s))&&this.setFieldInvalid(t,i);break}case fi.MinNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(di(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,s))&&this.setFieldInvalid(t,i);break}case fi.CustomRegexp:{if(void 0===s)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);let e;try{e=new RegExp(s)}catch(e){console.error(`Value for ${i.rule} rule for [${t}] should be a valid regexp. This field will be always invalid.`),this.setFieldInvalid(t,i);break}const n=String(o);""===n||e.test(n)||this.setFieldInvalid(t,i);break}case fi.MinFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length<s){this.setFieldInvalid(t,i);break}break;case fi.MaxFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length>s){this.setFieldInvalid(t,i);break}break;case fi.Files:{if(void 0===s)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);if("object"!=typeof s)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=s.files;if("object"!=typeof e)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object with files array. This field will be always invalid.`),void this.setFieldInvalid(t,i);const n=(t,e)=>{const i=Number.isFinite(e.minSize)&&t.size<e.minSize,n=Number.isFinite(e.maxSize)&&t.size>e.maxSize,s=Array.isArray(e.names)&&!e.names.includes(t.name),o=Array.isArray(e.extensions)&&!e.extensions.includes(t.name.split(".")[t.name.split(".").length-1]),r=Array.isArray(e.types)&&!e.types.includes(t.type);return i||n||s||o||r};if("object"==typeof o&&null!==o)for(let s=0,r=o.length;s<r;++s){const r=o.item(s);if(!r){this.setFieldInvalid(t,i);break}if(n(r,e)){this.setFieldInvalid(t,i);break}}break}default:{if("function"!=typeof i.validator)return console.error(`Validator for custom rule for [${t}] field should be a function. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=i.validator(o,this.getCompatibleFields());if("boolean"!=typeof e&&"function"!=typeof e&&console.error(`Validator return value for [${t}] field should be boolean or function. It will be cast to boolean.`),"function"==typeof e){if(!n){this.fields[t].asyncCheckPending=!1;const n=e();return _i(n)?n.then((e=>{e||this.setFieldInvalid(t,i)})).catch((()=>{this.setFieldInvalid(t,i)})):(console.error(`Validator function for custom rule for [${t}] field should return a Promise. This field will be always invalid.`),void this.setFieldInvalid(t,i))}this.fields[t].asyncCheckPending=!0}e||this.setFieldInvalid(t,i)}}var r}}isFormValid(){let t=!0;for(let e=0,i=Object.values(this.fields).length;e<i;++e){const i=Object.values(this.fields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}for(let e=0,i=Object.values(this.groupFields).length;e<i;++e){const i=Object.values(this.groupFields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}return t}validateField(t,e=!1){var i;const n=this.fields[t];n.isValid=!0;const s=[];return[...n.rules].reverse().forEach((i=>{const o=this.validateFieldRule(t,n.elem,i,e);_i(o)&&s.push(o)})),n.isValid&&this.setFieldValid(t,null==(i=n.config)?void 0:i.successMessage),Promise.allSettled(s).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}revalidateField(t){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.fields[e]?new Promise((t=>{this.validateField(e,!0).finally((()=>{this.clearFieldStyle(e),this.clearFieldLabel(e),this.renderFieldError(e,!0),t(!!this.fields[e].isValid)}))})):(console.error("Field not found. Check the field selector."),Promise.reject())}revalidateGroup(t){if("string"!=typeof t&&!vi(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?new Promise((t=>{this.validateGroup(e).finally((()=>{this.clearFieldLabel(e),this.renderGroupError(e,!0),t(!!this.groupFields[e].isValid)}))})):(console.error("Group not found. Check the group selector."),Promise.reject())}validateGroup(t,e=!1){const i=this.groupFields[t],n=[];return[...i.rules].reverse().forEach((e=>{const s=this.validateGroupRule(t,i.elems,e);_i(s)&&n.push(s)})),Promise.allSettled(n).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}focusInvalidField(){for(const t in this.fields){const e=this.fields[t];if(!e.isValid){setTimeout((()=>e.elem.focus()),0);break}}}afterSubmitValidation(t=!1){this.renderErrors(t),this.globalConfig.focusInvalidField&&this.focusInvalidField()}validate(t=!1){return new Promise((e=>{const i=[];Object.keys(this.fields).forEach((t=>{const e=this.validateField(t);_i(e)&&i.push(e)})),Object.keys(this.groupFields).forEach((t=>{const e=this.validateGroup(t);_i(e)&&i.push(e)})),Promise.allSettled(i).then((()=>{var n;this.afterSubmitValidation(t),null==(n=this.onValidateCallback)||n.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}),e(!!i.length)}))}))}revalidate(){return new Promise((t=>{this.validateHandler(void 0,!0).finally((()=>{this.globalConfig.focusInvalidField&&this.focusInvalidField(),t(this.isValid)}))}))}validateHandler(t,e=!1){return this.globalConfig.lockForm&&this.lockForm(),this.validate(e).finally((()=>{var e,i,n;this.globalConfig.lockForm&&this.unlockForm(),this.isValid?(null==(e=this.onSuccessCallback)||e.call(this,t),this.globalConfig.submitFormAutomatically&&(null==(i=null==t?void 0:t.currentTarget)||i.submit())):null==(n=this.onFailCallback)||n.call(this,this.getCompatibleFields(),this.groupFields)}))}setForm(t){this.form=t,this.form.setAttribute("novalidate","novalidate"),this.removeListener("submit",this.form,this.formSubmitHandler),this.addListener("submit",this.form,this.formSubmitHandler)}addListener(t,e,i){e.addEventListener(t,i),this.eventListeners.push({type:t,elem:e,func:i})}removeListener(t,e,i){e.removeEventListener(t,i),this.eventListeners=this.eventListeners.filter((i=>i.type!==t||i.elem!==e))}addField(t,e,i){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");let n;if(n="string"==typeof t?this.form.querySelector(t):t,!n)throw Error("Field doesn't exist in the DOM! Please check the field selector.");if(!Array.isArray(e)||!e.length)throw Error("Rules argument should be an array and should contain at least 1 element.");e.forEach((t=>{if(!("rule"in t||"validator"in t||"plugin"in t))throw Error("Rules argument must contain at least one rule or validator property.");if(!(t.validator||t.plugin||t.rule&&Object.values(fi).includes(t.rule)))throw Error(`Rule should be one of these types: ${Object.values(fi).join(", ")}. Provided value: ${t.rule}`)}));const s=this.setKeyByFieldSelector(t);return this.fields[s]={elem:n,rules:e,isValid:void 0,touched:!1,config:i},this.setListeners(n),(this.isSubmitted||this.globalConfig.validateBeforeSubmitting)&&this.validateField(s),this}removeField(t){if("string"!=typeof t&&!vi(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);if(!e||!this.fields[e])return console.error("Field not found. Check the field selector."),this;const i=this.getListenerType(this.fields[e].elem.type);return this.removeListener(i,this.fields[e].elem,this.handlerChange),this.clearErrors(),delete this.fields[e],this}removeGroup(t){if("string"!=typeof t)throw Error("Group selector is not valid. Please specify a string selector.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?(this.groupFields[e].elems.forEach((t=>{const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange)})),this.clearErrors(),delete this.groupFields[e],this):(console.error("Group not found. Check the group selector."),this)}addRequiredGroup(t,e,i,n){if("string"!=typeof t&&!vi(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");let s;if(s="string"==typeof t?this.form.querySelector(t):t,!s)throw Error("Group selector not found! Please check the group selector.");const o=s.querySelectorAll("input"),r=Array.from(o).filter((t=>{const e=((t,e)=>{const i=[...e].reverse();for(let e=0,n=i.length;e<n;++e){const n=i[e];for(const e in t){const i=t[e];if(i.groupElem===n)return[e,i]}}return null})(this.groupFields,(t=>{let e=t;const i=[];for(;e;)i.unshift(e),e=e.parentNode;return i})(t));return!e||e[1].elems.find((e=>e!==t))})),a=this.setKeyByFieldSelector(t);return this.groupFields[a]={rules:[{rule:pi.Required,errorMessage:e,successMessage:n}],groupElem:s,elems:r,touched:!1,isValid:void 0,config:i},o.forEach((t=>{this.setListeners(t)})),this}getListenerType(t){switch(t){case"checkbox":case"select-one":case"file":case"radio":return"change";default:return"input"}}setListeners(t){const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange),this.addListener(e,t,this.handlerChange)}clearFieldLabel(t){var e,i;null==(e=this.errorLabels[t])||e.remove(),null==(i=this.successLabels[t])||i.remove()}clearFieldStyle(t){var e,i,n,s;const o=this.fields[t],r=(null==(e=o.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(r).forEach((t=>{o.elem.style[t]=""}));const a=(null==(i=o.config)?void 0:i.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(a).forEach((t=>{o.elem.style[t]=""})),o.elem.classList.remove(...bi((null==(n=o.config)?void 0:n.errorFieldCssClass)||this.globalConfig.errorFieldCssClass),...bi((null==(s=o.config)?void 0:s.successFieldCssClass)||this.globalConfig.successFieldCssClass))}clearErrors(){var t,e;Object.keys(this.errorLabels).forEach((t=>this.errorLabels[t].remove())),Object.keys(this.successLabels).forEach((t=>this.successLabels[t].remove()));for(const t in this.fields)this.clearFieldStyle(t);for(const i in this.groupFields){const n=this.groupFields[i],s=(null==(t=n.config)?void 0:t.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(s).forEach((t=>{n.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...bi((null==(i=n.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}))}));const o=(null==(e=n.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(o).forEach((t=>{n.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...bi((null==(i=n.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}))}))}this.tooltips=[]}isTooltip(){return!!this.globalConfig.tooltip}lockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)t[e].setAttribute("data-just-validate-fallback-disabled",t[e].disabled?"true":"false"),t[e].setAttribute("disabled","disabled"),t[e].style.pointerEvents="none",t[e].style.webkitFilter="grayscale(100%)",t[e].style.filter="grayscale(100%)"}unlockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)"true"!==t[e].getAttribute("data-just-validate-fallback-disabled")&&t[e].removeAttribute("disabled"),t[e].style.pointerEvents="",t[e].style.webkitFilter="",t[e].style.filter=""}renderTooltip(t,e,i){var n;const{top:s,left:o,width:r,height:a}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),c=i||(null==(n=this.globalConfig.tooltip)?void 0:n.position);switch(c){case"left":e.style.top=s+a/2-l.height/2+"px",e.style.left=o-l.width-5+"px";break;case"top":e.style.top=s-l.height-5+"px",e.style.left=o+r/2-l.width/2+"px";break;case"right":e.style.top=s+a/2-l.height/2+"px",e.style.left=`${o+r+5}px`;break;case"bottom":e.style.top=`${s+a+5}px`,e.style.left=o+r/2-l.width/2+"px"}e.dataset.direction=c;return{refresh:()=>{this.renderTooltip(t,e,i)}}}createErrorLabelElem(t,e,i){const n=document.createElement("div");n.innerHTML=e;const s=this.isTooltip()?null==i?void 0:i.errorLabelStyle:(null==i?void 0:i.errorLabelStyle)||this.globalConfig.errorLabelStyle;return Object.assign(n.style,s),n.classList.add(...bi((null==i?void 0:i.errorLabelCssClass)||this.globalConfig.errorLabelCssClass),"just-validate-error-label"),this.isTooltip()&&(n.dataset.tooltip="true"),this.globalConfig.testingMode&&(n.dataset.testId=`error-label-${t}`),this.errorLabels[t]=n,n}createSuccessLabelElem(t,e,i){if(void 0===e)return null;const n=document.createElement("div");n.innerHTML=e;const s=(null==i?void 0:i.successLabelStyle)||this.globalConfig.successLabelStyle;return Object.assign(n.style,s),n.classList.add(...bi((null==i?void 0:i.successLabelCssClass)||this.globalConfig.successLabelCssClass),"just-validate-success-label"),this.globalConfig.testingMode&&(n.dataset.testId=`success-label-${t}`),this.successLabels[t]=n,n}renderErrorsContainer(t,e){const i=e||this.globalConfig.errorsContainer;if("string"==typeof i){const e=this.form.querySelector(i);if(e)return e.appendChild(t),!0;console.error(`Error container with ${i} selector not found. Errors will be rendered as usual`)}return i instanceof Element?(i.appendChild(t),!0):(void 0!==i&&console.error("Error container not found. It should be a string or existing Element. Errors will be rendered as usual"),!1)}renderGroupLabel(t,e,i,n){if(!n){if(this.renderErrorsContainer(e,i))return}t.appendChild(e)}renderFieldLabel(t,e,i,n){var s,o,r,a,l,c,u;if(!n){if(this.renderErrorsContainer(e,i))return}if("checkbox"===t.type||"radio"===t.type){const i=document.querySelector(`label[for="${t.getAttribute("id")}"]`);"label"===(null==(o=null==(s=t.parentElement)?void 0:s.tagName)?void 0:o.toLowerCase())?null==(a=null==(r=t.parentElement)?void 0:r.parentElement)||a.appendChild(e):i?null==(l=i.parentElement)||l.appendChild(e):null==(c=t.parentElement)||c.appendChild(e)}else null==(u=t.parentElement)||u.appendChild(e)}showLabels(t,e){Object.keys(t).forEach(((i,n)=>{const s=t[i],o=this.getKeyByFieldSelector(i);if(!o||!this.fields[o])return void console.error("Field not found. Check the field selector.");const r=this.fields[o];r.isValid=!e,this.clearFieldStyle(o),this.clearFieldLabel(o),this.renderFieldError(o,!1,s),0===n&&this.globalConfig.focusInvalidField&&setTimeout((()=>r.elem.focus()),0)}))}showErrors(t){if("object"!=typeof t)throw Error("[showErrors]: Errors should be an object with key: value format");this.showLabels(t,!0)}showSuccessLabels(t){if("object"!=typeof t)throw Error("[showSuccessLabels]: Labels should be an object with key: value format");this.showLabels(t,!1)}renderFieldError(t,e=!1,i){var n,s,o,r,a,l;const c=this.fields[t];if(!1===c.isValid&&(this.isValid=!1),void 0===c.isValid||!e&&!this.isSubmitted&&!c.touched&&void 0===i)return;if(c.isValid){if(!c.asyncCheckPending){const e=this.createSuccessLabelElem(t,void 0!==i?i:c.successMessage,c.config);e&&this.renderFieldLabel(c.elem,e,null==(n=c.config)?void 0:n.errorsContainer,!0),c.elem.classList.add(...bi((null==(s=c.config)?void 0:s.successFieldCssClass)||this.globalConfig.successFieldCssClass))}return}c.elem.classList.add(...bi((null==(o=c.config)?void 0:o.errorFieldCssClass)||this.globalConfig.errorFieldCssClass));const u=this.createErrorLabelElem(t,void 0!==i?i:c.errorMessage,c.config);this.renderFieldLabel(c.elem,u,null==(r=c.config)?void 0:r.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(c.elem,u,null==(l=null==(a=c.config)?void 0:a.tooltip)?void 0:l.position))}renderGroupError(t,e=!0){var i,n,s,o;const r=this.groupFields[t];if(!1===r.isValid&&(this.isValid=!1),void 0===r.isValid||!e&&!this.isSubmitted&&!r.touched)return;if(r.isValid){r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle),t.classList.add(...bi((null==(i=r.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}));const e=this.createSuccessLabelElem(t,r.successMessage,r.config);return void(e&&this.renderGroupLabel(r.groupElem,e,null==(i=r.config)?void 0:i.errorsContainer,!0))}this.isValid=!1,r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle),t.classList.add(...bi((null==(i=r.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}));const a=this.createErrorLabelElem(t,r.errorMessage,r.config);this.renderGroupLabel(r.groupElem,a,null==(n=r.config)?void 0:n.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(r.groupElem,a,null==(o=null==(s=r.config)?void 0:s.tooltip)?void 0:o.position))}renderErrors(t=!1){if(this.isSubmitted||t||this.globalConfig.validateBeforeSubmitting){this.clearErrors(),this.isValid=!0;for(const t in this.groupFields)this.renderGroupError(t);for(const t in this.fields)this.renderFieldError(t)}}destroy(){this.eventListeners.forEach((t=>{this.removeListener(t.type,t.elem,t.func)})),Object.keys(this.customStyleTags).forEach((t=>{this.customStyleTags[t].remove()})),this.clearErrors(),this.globalConfig.lockForm&&this.unlockForm()}refresh(){this.destroy(),this.form?(this.initialize(this.form,this.globalConfig),Object.keys(this.fields).forEach((t=>{const e=this.getFieldSelectorByKey(t);e&&this.addField(e,[...this.fields[t].rules],this.fields[t].config)}))):console.error("Cannot initialize the library! Form is not defined")}setCurrentLocale(t){"string"==typeof t||void 0===t?(this.currentLocale=t,this.isSubmitted&&this.validate()):console.error("Current locale should be a string")}onSuccess(t){return this.onSuccessCallback=t,this}onFail(t){return this.onFailCallback=t,this}onValidate(t){return this.onValidateCallback=t,this}}class Ei{constructor(t,e,i,n,s){this.targetNode=t,this.classToWatch=e,this.classAddedCallback=i,this.classRemovedCallback=n,this.observer=null,this.lastClassState=t.classList.contains(this.classToWatch),this.ignoreToggle=!!s,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{attributes:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)if("attributes"===e.type&&"class"===e.attributeName){let t=e.target.classList.contains(this.classToWatch);(this.ignoreToggle||this.lastClassState!==t)&&(this.lastClassState=t,t?"function"==typeof this.classAddedCallback&&this.classAddedCallback():"function"==typeof this.classRemovedCallback&&this.classRemovedCallback())}}}class Ci{constructor(t,e,i,n){this.targetNode=t,this.contentSelector=e,this.contentAddedCallback=i,this.contentRemovedCallback=n,this.observer=null,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{childList:!0,subtree:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)"childList"===e.type&&(e.addedNodes.forEach((t=>{this._callbackExec(t)})),e.removedNodes.forEach((t=>{this._callbackExec(t,!0)})))}_callbackExec(t,e){const i=t.matches&&t.matches(this.contentSelector)?[t]:t.querySelectorAll?t.querySelectorAll(this.contentSelector):null,n=e&&"function"==typeof this.contentRemovedCallback?this.contentRemovedCallback:"function"==typeof this.contentAddedCallback?this.contentAddedCallback:null;i&&n&&i.forEach((t=>n(t)))}}const Si={errorFieldCssClass:"is-invalid",errorLabelCssClass:"just-validate-error-label"},ki="justvalidatebi";class xi extends Y{constructor(t){super(t),this._label=new st(t),this._bindEvents()}static get NAME(){return"input"}_bindEvents(){"file"===this._element.getAttribute("type")&&z.on(this._element,"change.bs.input",(()=>{this._handleFileDescription()}))}_handleFileDescription(){const t=[];let e="";Array.from(this._element.files).forEach((e=>{const i=Math.round(parseInt(e.size,10)/1024);t.push(e.name+" ("+i+"kb)")})),this._element.files.length>1&&(e=this._element.files.length+" file da caricare: ");const i=K.findOne('label[for="'+this._element.getAttribute("id")+'"] label.form-file-name',this._element);i&&(i.innerText=e+t.join("; "))}}const Ti=["select",'input[data-bs-input][type="password"]',"input.input-password[data-bs-input]",'input[data-bs-autocomplete][type="search"]','input[type="time"]','input[type="radio"]','input[type="checkbox"]'];"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("input, textarea, label").forEach((function(t){(t=>{const e=!!Ti.find((e=>t.matches(e))),i=!("number"!==t.getAttribute("type")||!t.parentNode.querySelector('button[class^="input-number-"]'));e||i||xi.getOrCreateInstance(t)})(st.getInputFromLabel(t)||t)}))}));var Ai="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Oi(t,e){return t(e={exports:{}},e.exports),e.exports}var Li=Oi((function(t,e){var i;globalThis,i=()=>(()=>{var t={8952:(t,e,i)=>{var n=i(4328),s=i(36),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not a function")}},6100:(t,e,i)=>{var n=i(7e3),s=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new s("Incorrect invocation")}},3951:(t,e,i)=>{var n=i(1632),s=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not an object")}},2504:(t,e,i)=>{var n=i(4096),s=i(2495),o=i(3556),r=function(t){return function(e,i,r){var a=n(e),l=o(a);if(0===l)return!t&&-1;var c,u=s(r,l);if(t&&i!=i){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===i)return t||u||0;return!t&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},6728:(t,e,i)=>{var n=i(3476),s=i(1432),o=TypeError,r=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(s(t)&&!r(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},8696:(t,e,i)=>{var n=i(3951),s=i(3112);t.exports=function(t,e,i,o){try{return o?e(n(i)[0],i[1]):e(i)}catch(e){s(t,"throw",e)}}},1888:(t,e,i)=>{var n=i(1664),s=n({}.toString),o=n("".slice);t.exports=function(t){return o(s(t),8,-1)}},9968:(t,e,i)=>{var n=i(5152),s=i(9252),o=i(9444),r=i(8352);t.exports=function(t,e,i){for(var a=s(e),l=r.f,c=o.f,u=0;u<a.length;u++){var h=a[u];n(t,h)||i&&n(i,h)||l(t,h,c(e,h))}}},2272:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3336:t=>{t.exports=function(t,e){return{value:t,done:e}}},3440:(t,e,i)=>{var n=i(3476),s=i(8352),o=i(9728);t.exports=n?function(t,e,i){return s.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},9728:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},92:(t,e,i)=>{var n=i(3476),s=i(8352),o=i(9728);t.exports=function(t,e,i){n?s.f(t,e,o(0,i)):t[e]=i}},2544:(t,e,i)=>{var n=i(5312),s=i(8352);t.exports=function(t,e,i){return i.get&&n(i.get,e,{getter:!0}),i.set&&n(i.set,e,{setter:!0}),s.f(t,e,i)}},6076:(t,e,i)=>{var n=i(4328),s=i(8352),o=i(5312),r=i(4636);t.exports=function(t,e,i,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(n(i)&&o(i,c,a),a.global)l?t[e]=i:r(e,i);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=i:s.f(t,e,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},4036:(t,e,i)=>{var n=i(6076);t.exports=function(t,e,i){for(var s in e)n(t,s,e[s],i);return t}},4636:(t,e,i)=>{var n=i(6420),s=Object.defineProperty;t.exports=function(t,e){try{s(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},3476:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8168:(t,e,i)=>{var n=i(6420),s=i(1632),o=n.document,r=s(o)&&s(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},4316:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6064:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},8504:(t,e,i)=>{var n,s,o=i(6420),r=i(6064),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(s=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&r&&(!(n=r.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/))&&(s=+n[1]),t.exports=s},8256:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9160:(t,e,i)=>{var n=i(6420),s=i(9444).f,o=i(3440),r=i(6076),a=i(4636),l=i(9968),c=i(6704);t.exports=function(t,e){var i,u,h,d,f,p=t.target,m=t.global,g=t.stat;if(i=m?n:g?n[p]||a(p,{}):n[p]&&n[p].prototype)for(u in e){if(d=e[u],h=t.dontCallGetSet?(f=s(i,u))&&f.value:i[u],!c(m?u:p+(g?".":"#")+u,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),r(i,u,d,t)}}},9957:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7332:(t,e,i)=>{var n=i(9957);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},8448:(t,e,i)=>{var n=i(7332),s=Function.prototype.call;t.exports=n?s.bind(s):function(){return s.apply(s,arguments)}},6208:(t,e,i)=>{var n=i(3476),s=i(5152),o=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,a=s(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&r(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},1664:(t,e,i)=>{var n=i(7332),s=Function.prototype,o=s.call,r=n&&s.bind.bind(o,o);t.exports=n?r:function(t){return function(){return o.apply(t,arguments)}}},5232:(t,e,i)=>{var n=i(6420),s=i(4328);t.exports=function(t,e){return arguments.length<2?(i=n[t],s(i)?i:void 0):n[t]&&n[t][e];var i}},6752:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},4504:(t,e,i)=>{var n=i(8952),s=i(9760);t.exports=function(t,e){var i=t[e];return s(i)?void 0:n(i)}},6420:function(t,e,i){var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5152:(t,e,i)=>{var n=i(1664),s=i(4356),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(s(t),e)}},2560:t=>{t.exports={}},4168:(t,e,i)=>{var n=i(5232);t.exports=n("document","documentElement")},9888:(t,e,i)=>{var n=i(3476),s=i(9957),o=i(8168);t.exports=!n&&!s((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},5712:(t,e,i)=>{var n=i(1664),s=i(9957),o=i(1888),r=Object,a=n("".split);t.exports=s((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):r(t)}:r},9112:(t,e,i)=>{var n=i(1664),s=i(4328),o=i(3976),r=n(Function.toString);s(o.inspectSource)||(o.inspectSource=function(t){return r(t)}),t.exports=o.inspectSource},9104:(t,e,i)=>{var n,s,o,r=i(4288),a=i(6420),l=i(1632),c=i(3440),u=i(5152),h=i(3976),d=i(6504),f=i(2560),p="Object already initialized",m=a.TypeError,g=a.WeakMap;if(r||h.state){var _=h.state||(h.state=new g);_.get=_.get,_.has=_.has,_.set=_.set,n=function(t,e){if(_.has(t))throw new m(p);return e.facade=t,_.set(t,e),e},s=function(t){return _.get(t)||{}},o=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,n=function(t,e){if(u(t,b))throw new m(p);return e.facade=t,c(t,b,e),e},s=function(t){return u(t,b)?t[b]:{}},o=function(t){return u(t,b)}}t.exports={set:n,get:s,has:o,enforce:function(t){return o(t)?s(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=s(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return i}}}},1432:(t,e,i)=>{var n=i(1888);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4328:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},6704:(t,e,i)=>{var n=i(9957),s=i(4328),o=/#|\.prototype\./,r=function(t,e){var i=l[a(t)];return i===u||i!==c&&(s(e)?n(e):!!e)},a=r.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=r.data={},c=r.NATIVE="N",u=r.POLYFILL="P";t.exports=r},9760:t=>{t.exports=function(t){return null==t}},1632:(t,e,i)=>{var n=i(4328);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},7048:t=>{t.exports=!1},7728:(t,e,i)=>{var n=i(5232),s=i(4328),o=i(7e3),r=i(6536),a=Object;t.exports=r?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return s(e)&&o(e.prototype,a(t))}},3112:(t,e,i)=>{var n=i(8448),s=i(3951),o=i(4504);t.exports=function(t,e,i){var r,a;s(t);try{if(!(r=o(t,"return"))){if("throw"===e)throw i;return i}r=n(r,t)}catch(t){a=!0,r=t}if("throw"===e)throw i;if(a)throw r;return s(r),i}},9724:(t,e,i)=>{var n=i(8448),s=i(9368),o=i(3440),r=i(4036),a=i(9972),l=i(9104),c=i(4504),u=i(336).IteratorPrototype,h=i(3336),d=i(3112),f=a("toStringTag"),p="IteratorHelper",m="WrapForValidIterator",g=l.set,_=function(t){var e=l.getterFor(t?m:p);return r(s(u),{next:function(){var i=e(this);if(t)return i.nextHandler();try{var n=i.done?void 0:i.nextHandler();return h(n,i.done)}catch(t){throw i.done=!0,t}},return:function(){var i=e(this),s=i.iterator;if(i.done=!0,t){var o=c(s,"return");return o?n(o,s):h(void 0,!0)}if(i.inner)try{d(i.inner.iterator,"normal")}catch(t){return d(s,"throw",t)}return d(s,"normal"),h(void 0,!0)}})},b=_(!0),v=_(!1);o(v,f,"Iterator Helper"),t.exports=function(t,e){var i=function(i,n){n?(n.iterator=i.iterator,n.next=i.next):n=i,n.type=e?m:p,n.nextHandler=t,n.counter=0,n.done=!1,g(this,n)};return i.prototype=e?b:v,i}},5792:(t,e,i)=>{var n=i(8448),s=i(8952),o=i(3951),r=i(6752),a=i(9724),l=i(8696),c=a((function(){var t=this.iterator,e=o(n(this.next,t));if(!(this.done=!!e.done))return l(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return o(this),s(t),new c(r(this),{mapper:t})}},336:(t,e,i)=>{var n,s,o,r=i(9957),a=i(4328),l=i(1632),c=i(9368),u=i(7796),h=i(6076),d=i(9972),f=i(7048),p=d("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(s=u(u(o)))!==Object.prototype&&(n=s):m=!0),!l(n)||r((function(){var t={};return n[p].call(t)!==t}))?n={}:f&&(n=c(n)),a(n[p])||h(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},3556:(t,e,i)=>{var n=i(7584);t.exports=function(t){return n(t.length)}},5312:(t,e,i)=>{var n=i(1664),s=i(9957),o=i(4328),r=i(5152),a=i(3476),l=i(6208).CONFIGURABLE,c=i(9112),u=i(9104),h=u.enforce,d=u.get,f=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),_=n([].join),b=a&&!s((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=t.exports=function(t,e,i){"Symbol("===m(f(e),0,7)&&(e="["+g(f(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!r(t,"name")||l&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),b&&i&&r(i,"arity")&&t.length!==i.arity&&p(t,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return r(n,"source")||(n.source=_(v,"string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return o(this)&&d(this).source||c(this)}),"toString")},1748:t=>{var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?i:e)(n)}},9368:(t,e,i)=>{var n,s=i(3951),o=i(2056),r=i(8256),a=i(2560),l=i(4168),c=i(8168),u=i(6504),h="prototype",d="script",f=u("IE_PROTO"),p=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},_=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;_="undefined"!=typeof document?document.domain&&n?g(n):(e=c("iframe"),i="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var s=r.length;s--;)delete _[h][r[s]];return _()};a[f]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(p[h]=s(t),i=new p,p[h]=null,i[f]=t):i=_(),void 0===e?i:o.f(i,e)}},2056:(t,e,i)=>{var n=i(3476),s=i(1576),o=i(8352),r=i(3951),a=i(4096),l=i(1531);e.f=n&&!s?Object.defineProperties:function(t,e){r(t);for(var i,n=a(e),s=l(e),c=s.length,u=0;c>u;)o.f(t,i=s[u++],n[i]);return t}},8352:(t,e,i)=>{var n=i(3476),s=i(9888),o=i(1576),r=i(3951),a=i(88),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";e.f=n?o?function(t,e,i){if(r(t),e=a(e),r(i),"function"==typeof t&&"prototype"===e&&"value"in i&&f in i&&!i[f]){var n=u(t,e);n&&n[f]&&(t[e]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:h in i?i[h]:n[h],writable:!1})}return c(t,e,i)}:c:function(t,e,i){if(r(t),e=a(e),r(i),s)try{return c(t,e,i)}catch(t){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},9444:(t,e,i)=>{var n=i(3476),s=i(8448),o=i(8912),r=i(9728),a=i(4096),l=i(88),c=i(5152),u=i(9888),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return r(!s(o.f,t,e),t[e])}},5048:(t,e,i)=>{var n=i(9008),s=i(8256).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,s)}},9392:(t,e)=>{e.f=Object.getOwnPropertySymbols},7796:(t,e,i)=>{var n=i(5152),s=i(4328),o=i(4356),r=i(6504),a=i(2272),l=r("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var i=e.constructor;return s(i)&&e instanceof i?i.prototype:e instanceof c?u:null}},7e3:(t,e,i)=>{var n=i(1664);t.exports=n({}.isPrototypeOf)},9008:(t,e,i)=>{var n=i(1664),s=i(5152),o=i(4096),r=i(2504).indexOf,a=i(2560),l=n([].push);t.exports=function(t,e){var i,n=o(t),c=0,u=[];for(i in n)!s(a,i)&&s(n,i)&&l(u,i);for(;e.length>c;)s(n,i=e[c++])&&(~r(u,i)||l(u,i));return u}},1531:(t,e,i)=>{var n=i(9008),s=i(8256);t.exports=Object.keys||function(t){return n(t,s)}},8912:(t,e)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!i.call({1:2},1);e.f=s?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},2104:(t,e,i)=>{var n=i(8448),s=i(4328),o=i(1632),r=TypeError;t.exports=function(t,e){var i,a;if("string"===e&&s(i=t.toString)&&!o(a=n(i,t)))return a;if(s(i=t.valueOf)&&!o(a=n(i,t)))return a;if("string"!==e&&s(i=t.toString)&&!o(a=n(i,t)))return a;throw new r("Can't convert object to primitive value")}},9252:(t,e,i)=>{var n=i(5232),s=i(1664),o=i(5048),r=i(9392),a=i(3951),l=s([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),i=r.f;return i?l(e,i(t)):e}},5436:(t,e,i)=>{var n=i(9760),s=TypeError;t.exports=function(t){if(n(t))throw new s("Can't call method on "+t);return t}},6504:(t,e,i)=>{var n=i(4696),s=i(7776),o=n("keys");t.exports=function(t){return o[t]||(o[t]=s(t))}},3976:(t,e,i)=>{var n=i(7048),s=i(6420),o=i(4636),r="__core-js_shared__",a=t.exports=s[r]||o(r,{});(a.versions||(a.versions=[])).push({version:"3.36.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:(t,e,i)=>{var n=i(3976);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},772:(t,e,i)=>{var n=i(8504),s=i(9957),o=i(6420).String;t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},2495:(t,e,i)=>{var n=i(6180),s=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?s(i+e,0):o(i,e)}},4096:(t,e,i)=>{var n=i(5712),s=i(5436);t.exports=function(t){return n(s(t))}},6180:(t,e,i)=>{var n=i(1748);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7584:(t,e,i)=>{var n=i(6180),s=Math.min;t.exports=function(t){var e=n(t);return e>0?s(e,9007199254740991):0}},4356:(t,e,i)=>{var n=i(5436),s=Object;t.exports=function(t){return s(n(t))}},7024:(t,e,i)=>{var n=i(8448),s=i(1632),o=i(7728),r=i(4504),a=i(2104),l=i(9972),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!s(t)||o(t))return t;var i,l=r(t,u);if(l){if(void 0===e&&(e="default"),i=n(l,t,e),!s(i)||o(i))return i;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},88:(t,e,i)=>{var n=i(7024),s=i(7728);t.exports=function(t){var e=n(t,"string");return s(e)?e:e+""}},36:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},7776:(t,e,i)=>{var n=i(1664),s=0,o=Math.random(),r=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++s+o,36)}},6536:(t,e,i)=>{var n=i(772);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1576:(t,e,i)=>{var n=i(3476),s=i(9957);t.exports=n&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4288:(t,e,i)=>{var n=i(6420),s=i(4328),o=n.WeakMap;t.exports=s(o)&&/native code/.test(String(o))},9972:(t,e,i)=>{var n=i(6420),s=i(4696),o=i(5152),r=i(7776),a=i(772),l=i(6536),c=n.Symbol,u=s("wks"),h=l?c.for||c:c&&c.withoutSetter||r;t.exports=function(t){return o(u,t)||(u[t]=a&&o(c,t)?c[t]:h("Symbol."+t)),u[t]}},4728:(t,e,i)=>{var n=i(9160),s=i(4356),o=i(3556),r=i(6728),a=i(4316);n({target:"Array",proto:!0,arity:1,forced:i(9957)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=s(this),i=o(e),n=arguments.length;a(i+n);for(var l=0;l<n;l++)e[i]=arguments[l],i++;return r(e,i),i}})},3536:(t,e,i)=>{var n=i(9160),s=i(6420),o=i(6100),r=i(3951),a=i(4328),l=i(7796),c=i(2544),u=i(92),h=i(9957),d=i(5152),f=i(9972),p=i(336).IteratorPrototype,m=i(3476),g=i(7048),_="constructor",b="Iterator",v=f("toStringTag"),y=TypeError,w=s[b],E=g||!a(w)||w.prototype!==p||!h((function(){w({})})),C=function(){if(o(this,p),l(this)===p)throw new y("Abstract class Iterator not directly constructable")},S=function(t,e){m?c(p,t,{configurable:!0,get:function(){return e},set:function(e){if(r(this),this===p)throw new y("You can't redefine this property");d(this,t)?this[t]=e:u(this,t,e)}}):p[t]=e};d(p,v)||S(v,b),!E&&d(p,_)&&p[_]!==Object||S(_,C),C.prototype=p,n({global:!0,constructor:!0,forced:E},{Iterator:C})},2144:(t,e,i)=>{var n=i(9160),s=i(8448),o=i(8952),r=i(3951),a=i(6752),l=i(9724),c=i(8696),u=i(7048),h=l((function(){for(var t,e,i=this.iterator,n=this.predicate,o=this.next;;){if(t=r(s(o,i)),this.done=!!t.done)return;if(e=t.value,c(i,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:u},{filter:function(t){return r(this),o(t),new h(a(this),{predicate:t})}})},9080:(t,e,i)=>{var n=i(9160),s=i(5792);n({target:"Iterator",proto:!0,real:!0,forced:i(7048)},{map:s})}},e={};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}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};return(()=>{i.d(n,{default:()=>q}),i(3536),i(2144),i(9080);var t=function(){},e={},s=[],o=[];function r(i,n){var r,a,l,c,u=o;for(c=arguments.length;c-- >2;)s.push(arguments[c]);for(n&&null!=n.children&&(s.length||s.push(n.children),delete n.children);s.length;)if((a=s.pop())&&void 0!==a.pop)for(c=a.length;c--;)s.push(a[c]);else"boolean"==typeof a&&(a=null),(l="function"!=typeof i)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(l=!1)),l&&r?u[u.length-1]+=a:u===o?u=[a]:u.push(a),r=l;var h=new t;return h.nodeName=i,h.children=u,h.attributes=null==n?void 0:n,h.key=null==n?void 0:n.key,void 0!==e.vnode&&e.vnode(h),h}function a(t,e){for(var i in e)t[i]=e[i];return t}function l(t,e){t&&("function"==typeof t?t(e):t.current=e)}var c="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,u=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function d(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(e.debounceRendering||c)(f)}function f(){for(var t;t=h.pop();)t._dirty&&M(t)}function p(t,e,i){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&m(t,e.nodeName):i||t._componentConstructor===e.nodeName}function m(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function g(t){var e=a({},t.attributes);e.children=t.children;var i=t.nodeName.defaultProps;if(void 0!==i)for(var n in i)void 0===e[n]&&(e[n]=i[n]);return e}function _(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,i,n,s){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)l(i,null),l(n,t);else if("class"!==e||s)if("style"===e){if(n&&"string"!=typeof n&&"string"!=typeof i||(t.style.cssText=n||""),n&&"object"==typeof n){if("string"!=typeof i)for(var o in i)o in n||(t.style[o]="");for(var o in n)t.style[o]="number"==typeof n[o]&&!1===u.test(o)?n[o]+"px":n[o]}}else if("dangerouslySetInnerHTML"===e)n&&(t.innerHTML=n.__html||"");else if("o"==e[0]&&"n"==e[1]){var r=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),n?i||t.addEventListener(e,v,r):t.removeEventListener(e,v,r),(t._listeners||(t._listeners={}))[e]=n}else if("list"!==e&&"type"!==e&&!s&&e in t){try{t[e]=null==n?"":n}catch(t){}null!=n&&!1!==n||"spellcheck"==e||t.removeAttribute(e)}else{var a=s&&e!==(e=e.replace(/^xlink:?/,""));null==n||!1===n?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof n&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),n):t.setAttribute(e,n))}else t.className=n||""}function v(t){return this._listeners[t.type](e.event&&e.event(t)||t)}var y=[],w=0,E=!1,C=!1;function S(){for(var t;t=y.shift();)e.afterMount&&e.afterMount(t),t.componentDidMount&&t.componentDidMount()}function k(t,e,i,n,s,o){w++||(E=null!=s&&void 0!==s.ownerSVGElement,C=null!=t&&!("__preactattr_"in t));var r=x(t,e,i,n,o);return s&&r.parentNode!==s&&s.appendChild(r),--w||(C=!1,o||S()),r}function x(t,e,i,n,s){var o=t,r=E;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||s)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),T(t,!0))),o.__preactattr_=!0,o;var a,l,c=e.nodeName;if("function"==typeof c)return function(t,e,i,n){for(var s=t&&t._component,o=s,r=t,a=s&&t._componentConstructor===e.nodeName,l=a,c=g(e);s&&!l&&(s=s._parentComponent);)l=s.constructor===e.nodeName;return s&&l&&(!n||s._component)?(I(s,c,3,i,n),t=s.base):(o&&!a&&(F(o),t=r=null),s=L(e.nodeName,c,i),t&&!s.nextBase&&(s.nextBase=t,r=null),I(s,c,1,i,n),t=s.base,r&&t!==r&&(r._component=null,T(r,!1))),t}(t,e,i,n);if(E="svg"===c||"foreignObject"!==c&&E,c=String(c),(!t||!m(t,c))&&(a=c,(l=E?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,o=l,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),T(t,!0)}var u=o.firstChild,h=o.__preactattr_,d=e.children;if(null==h){h=o.__preactattr_={};for(var f=o.attributes,v=f.length;v--;)h[f[v].name]=f[v].value}return!C&&d&&1===d.length&&"string"==typeof d[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=d[0]&&(u.nodeValue=d[0]):(d&&d.length||null!=u)&&function(t,e,i,n,s){var o,r,a,l,c,u=t.childNodes,h=[],d={},f=0,m=0,g=u.length,b=0,v=e?e.length:0;if(0!==g)for(var y=0;y<g;y++){var w=u[y],E=w.__preactattr_;null!=(C=v&&E?w._component?w._component.__key:E.key:null)?(f++,d[C]=w):(E||(void 0!==w.splitText?!s||w.nodeValue.trim():s))&&(h[b++]=w)}if(0!==v)for(y=0;y<v;y++){var C;if(c=null,null!=(C=(l=e[y]).key))f&&void 0!==d[C]&&(c=d[C],d[C]=void 0,f--);else if(m<b)for(o=m;o<b;o++)if(void 0!==h[o]&&p(r=h[o],l,s)){c=r,h[o]=void 0,o===b-1&&b--,o===m&&m++;break}c=x(c,l,i,n),a=u[y],c&&c!==t&&c!==a&&(null==a?t.appendChild(c):c===a.nextSibling?_(a):t.insertBefore(c,a))}if(f)for(var y in d)void 0!==d[y]&&T(d[y],!1);for(;m<=b;)void 0!==(c=h[b--])&&T(c,!1)}(o,d,i,n,C||null!=h.dangerouslySetInnerHTML),function(t,e,i){var n;for(n in i)e&&null!=e[n]||null==i[n]||b(t,n,i[n],i[n]=void 0,E);for(n in e)"children"===n||"innerHTML"===n||n in i&&e[n]===("value"===n||"checked"===n?t[n]:i[n])||b(t,n,i[n],i[n]=e[n],E)}(o,e.attributes,h),E=r,o}function T(t,e){var i=t._component;i?F(i):(null!=t.__preactattr_&&l(t.__preactattr_.ref,null),!1!==e&&null!=t.__preactattr_||_(t),A(t))}function A(t){for(t=t.lastChild;t;){var e=t.previousSibling;T(t,!0),t=e}}var O=[];function L(t,e,i){var n,s=O.length;for(t.prototype&&t.prototype.render?(n=new t(e,i),$.call(n,e,i)):((n=new $(e,i)).constructor=t,n.render=P);s--;)if(O[s].constructor===t)return n.nextBase=O[s].nextBase,O.splice(s,1),n;return n}function P(t,e,i){return this.constructor(t,i)}function I(t,i,n,s,o){t._disable||(t._disable=!0,t.__ref=i.ref,t.__key=i.key,delete i.ref,delete i.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(i,s)),s&&s!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=s),t.prevProps||(t.prevProps=t.props),t.props=i,t._disable=!1,0!==n&&(1!==n&&!1===e.syncComponentUpdates&&t.base?d(t):M(t,1,o)),l(t.__ref,t))}function M(t,i,n,s){if(!t._disable){var o,r,l,c=t.props,u=t.state,h=t.context,d=t.prevProps||c,f=t.prevState||u,p=t.prevContext||h,m=t.base,_=t.nextBase,b=m||_,v=t._component,E=!1,C=p;if(t.constructor.getDerivedStateFromProps&&(u=a(a({},u),t.constructor.getDerivedStateFromProps(c,u)),t.state=u),m&&(t.props=d,t.state=f,t.context=p,2!==i&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(c,u,h)?E=!0:t.componentWillUpdate&&t.componentWillUpdate(c,u,h),t.props=c,t.state=u,t.context=h),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!E){o=t.render(c,u,h),t.getChildContext&&(h=a(a({},h),t.getChildContext())),m&&t.getSnapshotBeforeUpdate&&(C=t.getSnapshotBeforeUpdate(d,f));var x,A,O=o&&o.nodeName;if("function"==typeof O){var P=g(o);(r=v)&&r.constructor===O&&P.key==r.__key?I(r,P,1,h,!1):(x=r,t._component=r=L(O,P,h),r.nextBase=r.nextBase||_,r._parentComponent=t,I(r,P,0,h,!1),M(r,1,n,!0)),A=r.base}else l=b,(x=v)&&(l=t._component=null),(b||1===i)&&(l&&(l._component=null),A=k(l,o,h,n||!m,b&&b.parentNode,!0));if(b&&A!==b&&r!==v){var $=b.parentNode;$&&A!==$&&($.replaceChild(A,b),x||(b._component=null,T(b,!1)))}if(x&&F(x),t.base=A,A&&!s){for(var j=t,N=t;N=N._parentComponent;)(j=N).base=A;A._component=j,A._componentConstructor=j.constructor}}for(!m||n?y.push(t):E||(t.componentDidUpdate&&t.componentDidUpdate(d,f,C),e.afterUpdate&&e.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);w||s||S()}}function F(t){e.beforeUnmount&&e.beforeUnmount(t);var i=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?F(n):i&&(null!=i.__preactattr_&&l(i.__preactattr_.ref,null),t.nextBase=i,_(i),O.push(t),A(i)),l(t.__ref,null)}function $(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}a($.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=a(a({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),d(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),M(this,2)},render:function(){}}),i(4728);class j extends ${static defaultProps={tQueryTooShort:t=>`Type in ${t} or more characters for results`,tNoResults:()=>"No search results",tSelectedOption:(t,e,i)=>`${t} ${i+1} of ${e} is highlighted`,tResults:(t,e)=>`${t} ${1===t?"result":"results"} ${1===t?"is":"are"} available. ${e}`};state={bump:!1,debounced:!1};componentWillMount(){const t=this;this.debounceStatusUpdate=function(t){let e;return function(){const i=this,n=arguments;clearTimeout(e),e=setTimeout((function(){e=null,t.apply(i,n)}),1400)}}((function(){if(!t.state.debounced){const e=!t.props.isInFocus||t.props.validChoiceMade;t.setState((({bump:t})=>({bump:!t,debounced:!0,silenced:e})))}}))}componentWillReceiveProps({queryLength:t}){this.setState({debounced:!1})}render(){const{id:t,length:e,queryLength:i,minQueryLength:n,selectedOption:s,selectedOptionIndex:o,tQueryTooShort:a,tNoResults:l,tSelectedOption:c,tResults:u,className:h}=this.props,{bump:d,debounced:f,silenced:p}=this.state,m=i<n,g=0===e,_=s?c(s,e,o):"";let b=null;return b=m?a(n):g?l():u(e,_),this.debounceStatusUpdate(),r("div",{className:h,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},r("div",{id:t+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!p&&f&&d?b:""),r("div",{id:t+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},p||!f||d?"":b))}}const N=({className:t})=>r("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},r("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},r("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})));function D(){return D=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},D.apply(this,arguments)}const B={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function R(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}class V extends ${static defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:()=>{},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:()=>"No results found",tAssistiveHint:()=>"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.",dropdownArrow:N,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null};elementReferences={};constructor(t){super(t),this.state={focused:null,hovered:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},this.handleComponentBlur=this.handleComponentBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleUpArrow=this.handleUpArrow.bind(this),this.handleDownArrow=this.handleDownArrow.bind(this),this.handleEnter=this.handleEnter.bind(this),this.handlePrintableKey=this.handlePrintableKey.bind(this),this.handleListMouseLeave=this.handleListMouseLeave.bind(this),this.handleOptionBlur=this.handleOptionBlur.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleOptionMouseDown=this.handleOptionMouseDown.bind(this),this.handleOptionMouseEnter=this.handleOptionMouseEnter.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.handleInputFocus=this.handleInputFocus.bind(this),this.pollInputElement=this.pollInputElement.bind(this),this.getDirectInputChanges=this.getDirectInputChanges.bind(this)}isQueryAnOption(t,e){return-1!==e.map((t=>this.templateInputValue(t).toLowerCase())).indexOf(t.toLowerCase())}componentDidMount(){this.pollInputElement()}componentWillUnmount(){clearTimeout(this.$pollInput)}pollInputElement(){this.getDirectInputChanges(),this.$pollInput=setTimeout((()=>{this.pollInputElement()}),100)}getDirectInputChanges(){const t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})}componentDidUpdate(t,e){const{focused:i}=this.state,n=null===i,s=e.focused!==i;s&&!n&&this.elementReferences[i].focus();const o=-1===i,r=s&&null===e.focused;if(o&&r){const t=this.elementReferences[i];t.setSelectionRange(0,t.value.length)}}hasAutoselect(){return!R()&&this.props.autoselect}templateInputValue(t){const e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t}templateSuggestion(t){const e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t}handleComponentBlur(t){const{options:e,query:i,selected:n}=this.state;let s;this.props.confirmOnBlur?(s=t.query||i,this.props.onConfirm(e[n])):s=i,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:s,selected:null,validChoiceMade:this.isQueryAnOption(s,e)})}handleListMouseLeave(t){this.setState({hovered:null})}handleOptionBlur(t,e){const{focused:i,menuOpen:n,options:s,selected:o}=this.state,r=null===t.relatedTarget,a=t.relatedTarget===this.elementReferences[-1],l=i!==e&&-1!==i;if(!l&&r||!l&&!a){const t=n&&R();this.handleComponentBlur({menuOpen:t,query:this.templateInputValue(s[o])})}}handleInputBlur(t){const{focused:e,menuOpen:i,options:n,query:s,selected:o}=this.state;if(-1===e){const t=i&&R(),e=R()?s:this.templateInputValue(n[o]);this.handleComponentBlur({menuOpen:t,query:e})}}handleInputChange(t){const{minLength:e,source:i,showAllValues:n}=this.props,s=this.hasAutoselect(),o=t.target.value,r=0===o.length,a=this.state.query!==o,l=o.length>=e;this.setState({query:o,ariaHint:r}),n||!r&&a&&l?i(o,(t=>{const e=t.length>0;this.setState({menuOpen:e,options:t,selected:s&&e?0:-1,validChoiceMade:!1})})):!r&&l||this.setState({menuOpen:!1,options:[]})}handleInputClick(t){this.handleInputChange(t)}handleInputFocus(t){const{query:e,validChoiceMade:i,options:n}=this.state,{minLength:s}=this.props,o=!i&&e.length>=s&&n.length>0;o?this.setState((({menuOpen:t})=>({focused:-1,menuOpen:o||t,selected:-1}))):this.setState({focused:-1})}handleOptionFocus(t){this.setState({focused:t,hovered:null,selected:t})}handleOptionMouseEnter(t,e){R()||this.setState({hovered:e})}handleOptionClick(t,e){const i=this.state.options[e],n=this.templateInputValue(i);this.props.onConfirm(i),this.setState({focused:-1,hovered:null,menuOpen:!1,query:n,selected:-1,validChoiceMade:!0}),this.forceUpdate()}handleOptionMouseDown(t){t.preventDefault()}handleUpArrow(t){t.preventDefault();const{menuOpen:e,selected:i}=this.state;-1!==i&&e&&this.handleOptionFocus(i-1)}handleDownArrow(t){if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(t=>{this.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){const{menuOpen:t,options:e,selected:i}=this.state;i!==e.length-1&&t&&this.handleOptionFocus(i+1)}}handleSpace(t){this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(t=>{this.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))}handleEnter(t){this.state.menuOpen&&(t.preventDefault(),this.state.selected>=0&&this.handleOptionClick(t,this.state.selected))}handlePrintableKey(t){const e=this.elementReferences[-1];t.target===e||e.focus()}handleKeyDown(t){switch(B[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((e=t.keyCode)>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223)&&this.handlePrintableKey(t)}var e}render(){const{cssNamespace:t,displayMenu:e,id:i,minLength:n,name:s,placeholder:o,required:a,showAllValues:l,tNoResults:c,tStatusQueryTooShort:u,tStatusNoResults:h,tStatusSelectedOption:d,tStatusResults:f,tAssistiveHint:p,dropdownArrow:m,menuAttributes:g,inputClasses:_,hintClasses:b,menuClasses:v}=this.props,{focused:y,hovered:w,menuOpen:E,options:C,query:S,selected:k,ariaHint:x,validChoiceMade:T}=this.state,A=this.hasAutoselect(),O=-1===y,L=0===C.length,P=0!==S.length,I=S.length>=n,M=this.props.showNoOptionsFound&&O&&L&&P&&I,F=`${t}__wrapper`,$=`${t}__status`,N=`${t}__dropdown-arrow-down`,B=-1!==y&&null!==y,V=`${t}__option`,z=`${t}__hint`,W=this.templateInputValue(C[k]),q=W&&0===W.toLowerCase().indexOf(S.toLowerCase())&&A?S+W.substr(S.length):"",H=i+"__assistiveHint",U={"aria-describedby":x?H:null,"aria-expanded":E?"true":"false","aria-activedescendant":B?`${i}__option--${y}`:null,"aria-controls":`${i}__listbox`,"aria-autocomplete":this.hasAutoselect()?"both":"list"};let G;l&&(G=m({className:N}),"string"==typeof G&&(G=r("div",{className:`${t}__dropdown-arrow-down-wrapper`,dangerouslySetInnerHTML:{__html:G}})));const Y=`${t}__input`,K=[Y,this.props.showAllValues?`${Y}--show-all-values`:`${Y}--default`];null!==y&&K.push(`${Y}--focused`),_&&K.push(_);const Q=`${t}__menu`,X=[Q,`${Q}--${e}`,`${Q}--${E||M?"visible":"hidden"}`];v&&X.push(v),(g?.class||g?.className)&&X.push(g?.class||g?.className);const Z={"aria-labelledby":i,...g,id:`${i}__listbox`,role:"listbox",className:X.join(" "),onMouseLeave:this.handleListMouseLeave};return delete Z.class,r("div",{className:F,onKeyDown:this.handleKeyDown},r(j,{id:i,length:C.length,queryLength:S.length,minQueryLength:n,selectedOption:this.templateInputValue(C[k]),selectedOptionIndex:k,validChoiceMade:T,isInFocus:null!==this.state.focused,tQueryTooShort:u,tNoResults:h,tSelectedOption:d,tResults:f,className:$}),q&&r("span",null,r("input",{className:[z,null===b?_:b].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:q})),r("input",D({},U,{autoComplete:"off",className:K.join(" "),id:i,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:s,placeholder:o,ref:t=>{this.elementReferences[-1]=t},type:"text",role:"combobox",required:a,value:S})),G,r("ul",Z,C.map(((t,e)=>{const n=(-1===y?k===e:y===e)&&null===w?` ${V}--focused`:"",s=e%2?` ${V}--odd`:"",o=R()?`<span id=${i}__option-suffix--${e} style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> ${e+1} of ${C.length}</span>`:"";return r("li",{"aria-selected":y===e?"true":"false",className:`${V}${n}${s}`,dangerouslySetInnerHTML:{__html:this.templateSuggestion(t)+o},id:`${i}__option--${e}`,key:e,onBlur:t=>this.handleOptionBlur(t,e),onClick:t=>this.handleOptionClick(t,e),onMouseDown:this.handleOptionMouseDown,onMouseEnter:t=>this.handleOptionMouseEnter(t,e),ref:t=>{this.elementReferences[e]=t},role:"option",tabIndex:"-1","aria-posinset":e+1,"aria-setsize":C.length})})),M&&r("li",{className:`${V} ${V}--no-results`,role:"option","aria-disabled":"true"},c())),r("span",{id:H,style:{display:"none"}},p()))}}function z(t){if(!t.element)throw new Error("element is not defined");if(!t.id)throw new Error("id is not defined");if(!t.source)throw new Error("source is not defined");Array.isArray(t.source)&&(t.source=W(t.source)),function(t,e,i){k(i,t,{},!1,e,!1)}(r(V,t),t.element)}const W=t=>(e,i)=>{i(t.filter((t=>-1!==t.toLowerCase().indexOf(e.toLowerCase()))))};z.enhanceSelectElement=t=>{if(!t.selectElement)throw new Error("selectElement is not defined");if(!t.source){const e=[].filter.call(t.selectElement.options,(e=>e.value||t.preserveNullOptions));t.source=e.map((t=>t.textContent||t.innerText))}if(t.onConfirm=t.onConfirm||(e=>{const i=[].filter.call(t.selectElement.options,(t=>(t.textContent||t.innerText)===e))[0];i&&(i.selected=!0)}),t.selectElement.value||void 0===t.defaultValue){const e=t.selectElement.options[t.selectElement.options.selectedIndex];t.defaultValue=e.textContent||e.innerText}void 0===t.name&&(t.name=""),void 0===t.id&&(void 0===t.selectElement.id?t.id="":t.id=t.selectElement.id),void 0===t.autoselect&&(t.autoselect=!0);const e=document.createElement("div");t.selectElement.parentNode.insertBefore(e,t.selectElement),z({...t,element:e}),t.selectElement.style.display="none",t.selectElement.id=t.selectElement.id+"-select"};const q=z})(),n.default})(),t.exports=i()}));Li.accessibleAutocomplete;const Pi={autocomplete:[]},Ii="autocomplete-list-show",Mi="data-bs-autocomplete",Fi="input["+Mi+'][type="search"]';class $i extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._items=[],this._autocompleteElement=null,this._label=new st(t),this._init(),this._bindEvents()}static get NAME(){return"inputsearchautocomplete"}search(){const t=this._element.value;
2
2
  //!!! $autocomplete.empty()
3
3
  this._autocompleteElement.innerHTML="",t?this._items.forEach((e=>{let i=new RegExp("("+t+")","gi"),n=e.text.replace(i,"<mark>$1</mark>"),s=e.label?"<em>"+e.label+"</em>":"",o=e.icon?e.icon:"",r=e.link?e.link:"#";-1!==n.toLowerCase().indexOf(t.toLowerCase())&&(this._autocompleteElement.classList.add(Ii),this._autocompleteElement.appendChild(this._createOption(r,n,s,o)))})):this._autocompleteElement.classList.remove(Ii)}_getConfig(t){return t={...Pi,..."object"==typeof t?t:{}}}_getItems(){try{return JSON.parse(this._element.getAttribute(Mi))}catch(t){return console.error("[InputSearchAutocomplete] invalid data provided for "+Mi+" attribute",t),[]}}_init(){if(this._element.classList.contains("autocomplete")){if("undefined"==typeof document)return;this._items=this._getItems(),this._autocompleteElement=document.createElement("ul"),this._autocompleteElement.classList.add("autocomplete-list"),this._element.parentNode.insertBefore(this._autocompleteElement,this._element.nextSibling)}}_bindEvents(){z.on(this._element,"keyup.bs.inputsearchautocomplete",(()=>this.search()))}_createOption(t,e,i,n){if("undefined"==typeof document)return;const s=document.createElement("li");return s.innerHTML=`<a href="${t}">\n ${n}\n <span class="autocomplete-list-text">\n <span>${e}</span>\n ${i}\n </span>\n </a>`,s}}"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(Fi+", label").forEach((function(t){const e=st.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(Fi)&&$i.getOrCreateInstance(i)}))}));const ji=".bs.inputpassword",Ni=".data-api",Di={shortPass:"Password troppo breve",badPass:"Password debole.",goodPass:"Password abbastanza sicura.",strongPass:"Password sicura.",minimumLength:8,suggestionsLabel:"Suggerimenti per una buona password:",suggestionFollowed:"suggerimenti seguito",suggestionFollowedPlural:"suggerimenti seguiti",suggestionOf:"di",suggestionMetLabel:"Soddisfatto: ",suggestionMetIconPath:"\n M9.6 16.9 4 11.4l.8-.7 4.8 4.8 8.5-8.4.7.7-9.2 9.1z\n ",suggestionLength:"Almeno {minLength} caratteri.",suggestionUppercase:"Una o più maiuscole.",suggestionLowercase:"Una o più minuscole.",suggestionNumber:"Uno o più numeri.",suggestionSpecial:"Uno o più caratteri speciali."},Bi=`click${ji}`,Ri=`keyup${ji}`,Vi=`score${ji}`,zi=`text${ji}`,Wi=`suggs${ji}`,qi=`click${ji}${Ni}`,Hi=`mousedown${ji}${Ni}`,Ui=`keyup${ji}${Ni}`,Gi='input[data-bs-input][type="password"]',Yi=".password-icon";class Ki extends Y{constructor(t,e){super(t),this._config=this._getConfig(e),this._isCustom=this._element.classList.contains("input-password"),this._meter=this._element.parentNode.querySelector(".password-strength-meter"),this._grayBarElement=null,this._colorBarElement=null,this._textElement=null,this._suggsElement=null,this._showPwdElement=null,this._text={},this._label=new st(t),this._suggestions=[{key:"length",text:t=>t.suggestionLength.replace("{minLength}",t.minimumLength.toString()),test:(t,e)=>t.length>=e.minimumLength},{key:"uppercase",text:t=>t.suggestionUppercase,test:t=>/[A-Z]/.test(t)},{key:"lowercase",text:t=>t.suggestionLowercase,test:t=>/[a-z]/.test(t)},{key:"number",text:t=>t.suggestionNumber,test:t=>/[0-9]/.test(t)},{key:"special",text:t=>t.suggestionSpecial,test:t=>/[^A-Za-z0-9]/.test(t)}],this._init(),this._bindEvents()}static get NAME(){return"inputpassword"}_getConfig(t){return t={...Di,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_init(){this._isCustom&&(this._handleAutofill(),this._showPwdElement=K.findOne(Yi,this._element.parentNode),this._meter&&(this._grayBarElement=this._meter.querySelector(".password-meter"),this._colorBarElement=this._meter.querySelector(".progress-bar"),this._textElement=this._meter.querySelector(".strength-meter-info"),this._suggsElement=this._meter.querySelector(".strenght-meter-suggestions"),this._textElement&&(this._config=Object.assign({},this._config,{...U.getDataAttributes(this._textElement)})),this._suggsElement&&this._createsuggestionsList()))}_bindEvents(){this._isCustom&&(this._showPwdElement&&z.on(this._showPwdElement,Bi,(()=>this._toggleShowPassword())),this._meter&&(z.on(this._element,Ri,(()=>this._checkPassword())),z.on(this._element,"input",(()=>this._checkPassword()))))}_handleAutofill(){const t=()=>{""!==this._element.value&&(this._label._labelOut(),this._checkPassword())};t(),setTimeout(t,100),z.on(this._element,"animationstart",(e=>{"onAutoFillStart"===e.animationName&&t()}))}_toggleShowPassword(){const t="password"===this._element.getAttribute("type");K.find('[class^="password-icon"]',this._showPwdElement).forEach((t=>t.classList.toggle("d-none"))),this._element.setAttribute("type",t?"text":"password"),this._showPwdElement.setAttribute("aria-checked",t.toString())}_checkPassword(){const t=this._element.value,e=this._calculateScore(t);this._updateMeter(e),this._updateText(e,t),this._updateSuggestions(t)}_updateMeter(t){const e=t<0?0:t;this._colorBarElement&&(this._colorBarElement.classList.forEach((t=>{t.match(/(^|\s)bg-\S+/g)&&this._colorBarElement.classList.remove(t)})),this._colorBarElement.classList.add(`bg-${this._scoreColor(t)}`),this._colorBarElement.style.width=`${e}%`,this._colorBarElement.setAttribute("aria-valuenow",e)),z.trigger(this._element,Vi)}_updateText(t,e){if(this._textElement){let i=this._scoreText(t);if(this._suggsElement){const{completedCount:t,totalCount:n}=this._getCompletedSuggestions(e),s=1===t?this._config.suggestionFollowed:this._config.suggestionFollowedPlural;i+=` ${t} ${this._config.suggestionOf} ${n} ${s}.`}this._textElement.textContent!==i&&(this._textElement.textContent=i,this._textElement.classList.forEach((t=>{t.match(/(^|\s)text-\S+/g)&&this._textElement.classList.remove(t)})),this._textElement.classList.add(`text-${this._scoreColor(t)}`),z.trigger(this._element,zi))}}_updateSuggestions(t){this._suggsElement&&(this._updateSuggestionsList(t),z.trigger(this._element,Wi))}_getCompletedSuggestions(t){let e=0;const i=this._suggestions.length;return this._suggestions.forEach((i=>{i.test(t,this._config)&&e++})),{completedCount:e,totalCount:i}}_createsuggestionsList(){if(this._suggsElement.querySelector(".password-suggestions"))return;const t=document.createElement("label");t.className="visually-hidden",t.htmlFor="suggestions",t.textContent=Di.suggestionsLabel;const e=document.createElement("div");e.id="suggestions",e.className="password-suggestions",this._suggestions.forEach((t=>{const i=document.createElement("div");i.className="suggestion",i.dataset.suggestion=t.key;const n=this._createIconCheck(),s=document.createElement("span");s.textContent=t.text(this._config),i.appendChild(n),i.appendChild(s),e.appendChild(i)})),this._suggsElement.appendChild(t),this._suggsElement.appendChild(e)}_createIconCheck(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("class","icon icon-xs me-1 d-none"),t.setAttribute("aria-label",this._config.suggestionMetLabel),t.setAttribute("viewBox","0 0 24 24"),t.style.width="1em",t.style.height="1em";const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",this._config.suggestionMetIconPath.trim()),t.appendChild(e),t}_updateSuggestionsList(t){this._suggsElement&&this._suggestions.forEach((e=>{const i=this._suggsElement.querySelector(`[data-suggestion="${e.key}"]`);if(i){const n=e.test(t,this._config),s=i.querySelector(".icon");s&&s.classList.toggle("d-none",!n)}}))}_scoreText(t){return-1===t?this._config.shortPass:-2===t?"":(t=t<0?0:t)<26||t<51?this._config.badPass:t<76?this._config.goodPass:this._config.strongPass}_scoreColor(t){return-1===t||-2===t||t<26?"danger":t<51?"warning":"success"}_calculateScore(t){var e=0;if(0===t.trim().length)return-2;if(t.length<this._config.minimumLength)return-1;e+=4*t.length,e+=this._checkRepetition(1,t).length-t.length,e+=this._checkRepetition(2,t).length-t.length,e+=this._checkRepetition(3,t).length-t.length,e+=this._checkRepetition(4,t).length-t.length,t.match(/(.*[0-9].*[0-9].*[0-9])/)&&(e+=5);var i=".*[!,@,#,$,%,^,&,*,?,_,~]";return i=new RegExp("("+i+i+")"),t.match(i)&&(e+=5),t.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(e+=10),t.match(/([a-zA-Z])/)&&t.match(/([0-9])/)&&(e+=15),t.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&t.match(/([0-9])/)&&(e+=15),t.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&t.match(/([a-zA-Z])/)&&(e+=15),(t.match(/^\w+$/)||t.match(/^\d+$/))&&(e-=10),e>100&&(e=100),e<0&&(e=0),e}_checkRepetition(t,e){for(var i="",n=!1,s=0;s<e.length;s++){n=!0;for(var o=0;o<t&&o+s+t<e.length;o++)n=n&&e.charAt(o+s)===e.charAt(o+s+t);o<t&&(n=!1),n?(s+=t-1,n=!1):i+=e.charAt(s)}return i}}if("undefined"!=typeof window&&"undefined"!=typeof document){const t=t=>t&&t.matches(Gi)?Ki.getOrCreateInstance(t):null,e=()=>{const t=K.findOne(Gi);t&&Ki.getOrCreateInstance(t)};"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e),z.on(document,Hi,Gi+", label",(function(){const e=st.getInputFromLabel(this)||this;t(e)})),z.on(document,Ui,Gi+", label",(function(){const e=st.getInputFromLabel(this)||this,i=t(e);i&&i._label&&i._label._labelOut()})),z.on(document,qi,Yi,(function(){const t=this.parentNode&&this.parentNode.querySelector(Gi);t&&Ki.getOrCreateInstance(t)}))}var Qi,Xi=Oi((function(t,e){
4
4
  /*! Shifty 2.20.4 - https://github.com/jeremyckahn/shifty */