vendor: 77,391 bytes, line 1
1/*! choices.js v11.1.0 | © 2025 Josh Johnson | https://github.com/jshjohnson/Choices#readme */var wt=function(t,e){return wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n[r])},wt(t,e)};function Gi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wt(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}var ie=function(){return ie=Object.assign||function(e){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ie.apply(this,arguments)};function Gn(t,e,i){for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var j={ADD_CHOICE:"ADD_CHOICE",REMOVE_CHOICE:"REMOVE_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM"},te={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},Y={TAB_KEY:9,SHIFT_KEY:16,BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},Wn=["fuseOptions","classNames"],be={Text:"text",SelectOne:"select-one",SelectMultiple:"select-multiple"},pi=function(t){return{type:j.ADD_CHOICE,choice:t}},qn=function(t){return{type:j.REMOVE_CHOICE,choice:t}},Yn=function(t){return{type:j.FILTER_CHOICES,results:t}},Xn=function(t){return{type:j.ACTIVATE_CHOICES,active:t}},Jn=function(t){return{type:j.ADD_GROUP,group:t}},mi=function(t){return{type:j.ADD_ITEM,item:t}},gi=function(t){return{type:j.REMOVE_ITEM,item:t}},qe=function(t,e){return{type:j.HIGHLIGHT_ITEM,item:t,highlighted:e}},Zn=function(t,e){return Math.floor(Math.random()*(e-t)+t)},vi=function(t){return Array.from({length:t},function(){return Zn(0,36).toString(36)}).join("")},Qn=function(t,e){var i=t.id||t.name&&"".concat(t.name,"-").concat(vi(2))||vi(4);return i=i.replace(/(:|\.|\[|\]|,)/g,""),i="".concat(e,"-").concat(i),i},er=function(t,e,i){i===void 0&&(i=1);for(var n="".concat(i>0?"next":"previous","ElementSibling"),r=t[n];r;){if(r.matches(e))return r;r=r[n]}return null},tr=function(t,e,i){i===void 0&&(i=1);var n;return i>0?n=e.scrollTop+e.offsetHeight>=t.offsetTop+t.offsetHeight:n=t.offsetTop>=e.scrollTop,n},ot=function(t){if(typeof t!="string"){if(t==null)return"";if(typeof t=="object"){if("raw"in t)return ot(t.raw);if("trusted"in t)return t.trusted}return t}return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/'/g,"'").replace(/"/g,""")},ir=function(){var t=document.createElement("div");return function(e){t.innerHTML=e.trim();for(var i=t.children[0];t.firstChild;)t.removeChild(t.firstChild);return i}}(),He=function(t,e){return typeof t=="function"?t(ot(e),e):t},bi=function(t){return typeof t=="function"?t():t},Ie=function(t){if(typeof t=="string")return t;if(typeof t=="object"){if("trusted"in t)return t.trusted;if("raw"in t)return t.raw}return""},Wi=function(t){if(typeof t=="string")return t;if(typeof t=="object"){if("escaped"in t)return t.escaped;if("trusted"in t)return t.trusted}return""},Yt=function(t,e){return t?Wi(e):ot(e)},ue=function(t,e,i){t.innerHTML=Yt(e,i)},nr=function(t,e){var i=t.value,n=t.label,r=n===void 0?i:n,s=e.value,o=e.label,l=o===void 0?s:o;return Ie(r).localeCompare(Ie(l),[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},rr=function(t,e){return t.rank-e.rank},sr=function(t,e,i){i===void 0&&(i=null);var n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0});return t.dispatchEvent(n)},or=function(t,e){var i=Object.keys(t).sort(),n=Object.keys(e).sort();return i.filter(function(r){return n.indexOf(r)<0})},at=function(t){return Array.isArray(t)?t:[t]},Fe=function(t){return t&&Array.isArray(t)?t.map(function(e){return".".concat(e)}).join(""):".".concat(t)},x=function(t,e){var i;(i=t.classList).add.apply(i,at(e))},le=function(t,e){var i;(i=t.classList).remove.apply(i,at(e))},ar=function(t){if(typeof t<"u")try{return JSON.parse(t)}catch{return t}return{}},lr=function(t,e,i){var n=t.itemEl;n&&(le(n,i),x(n,e))},cr=function(){function t(e){var i=e.element,n=e.type,r=e.classNames;this.element=i,this.classNames=r,this.type=n,this.isActive=!1}return t.prototype.show=function(){return x(this.element,this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},t.prototype.hide=function(){return le(this.element,this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},t}(),_i=function(){function t(e){var i=e.element,n=e.type,r=e.classNames,s=e.position;this.element=i,this.classNames=r,this.type=n,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isDisabled=!1,this.isLoading=!1}return t.prototype.shouldFlip=function(e,i){var n=!1;return this.position==="auto"?n=this.element.getBoundingClientRect().top-i>=0&&!window.matchMedia("(min-height: ".concat(e+1,"px)")).matches:this.position==="top"&&(n=!0),n},t.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},t.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},t.prototype.open=function(e,i){x(this.element,this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e,i)&&(x(this.element,this.classNames.flippedState),this.isFlipped=!0)},t.prototype.close=function(){le(this.element,this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(le(this.element,this.classNames.flippedState),this.isFlipped=!1)},t.prototype.addFocusState=function(){x(this.element,this.classNames.focusState)},t.prototype.removeFocusState=function(){le(this.element,this.classNames.focusState)},t.prototype.enable=function(){le(this.element,this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===be.SelectOne&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},t.prototype.disable=function(){x(this.element,this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===be.SelectOne&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},t.prototype.wrap=function(e){var i=this.element,n=e.parentNode;n&&(e.nextSibling?n.insertBefore(i,e.nextSibling):n.appendChild(i)),i.appendChild(e)},t.prototype.unwrap=function(e){var i=this.element,n=i.parentNode;n&&(n.insertBefore(e,i),n.removeChild(i))},t.prototype.addLoadingState=function(){x(this.element,this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},t.prototype.removeLoadingState=function(){le(this.element,this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},t}(),ur=function(){function t(e){var i=e.element,n=e.type,r=e.classNames,s=e.preventPaste;this.element=i,this.type=n,this.classNames=r,this.preventPaste=s,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=i.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(t.prototype,"placeholder",{set:function(e){this.element.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),t.prototype.addEventListeners=function(){var e=this.element;e.addEventListener("paste",this._onPaste),e.addEventListener("input",this._onInput,{passive:!0}),e.addEventListener("focus",this._onFocus,{passive:!0}),e.addEventListener("blur",this._onBlur,{passive:!0})},t.prototype.removeEventListeners=function(){var e=this.element;e.removeEventListener("input",this._onInput),e.removeEventListener("paste",this._onPaste),e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur)},t.prototype.enable=function(){var e=this.element;e.removeAttribute("disabled"),this.isDisabled=!1},t.prototype.disable=function(){var e=this.element;e.setAttribute("disabled",""),this.isDisabled=!0},t.prototype.focus=function(){this.isFocussed||this.element.focus()},t.prototype.blur=function(){this.isFocussed&&this.element.blur()},t.prototype.clear=function(e){return e===void 0&&(e=!0),this.element.value="",e&&this.setWidth(),this},t.prototype.setWidth=function(){var e=this.element;e.style.minWidth="".concat(e.placeholder.length+1,"ch"),e.style.width="".concat(e.value.length+1,"ch")},t.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},t.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},t.prototype._onInput=function(){this.type!==be.SelectOne&&this.setWidth()},t.prototype._onPaste=function(e){this.preventPaste&&e.preventDefault()},t.prototype._onFocus=function(){this.isFocussed=!0},t.prototype._onBlur=function(){this.isFocussed=!1},t}(),hr=4,yi=function(){function t(e){var i=e.element;this.element=i,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return t.prototype.prepend=function(e){var i=this.element.firstElementChild;i?this.element.insertBefore(e,i):this.element.append(e)},t.prototype.scrollToTop=function(){this.element.scrollTop=0},t.prototype.scrollToChildElement=function(e,i){var n=this;if(e){var r=this.element.offsetHeight,s=this.element.scrollTop+r,o=e.offsetHeight,l=e.offsetTop+o,c=i>0?this.element.scrollTop+l-s:e.offsetTop;requestAnimationFrame(function(){n._animateScroll(c,i)})}},t.prototype._scrollDown=function(e,i,n){var r=(n-e)/i,s=r>1?r:1;this.element.scrollTop=e+s},t.prototype._scrollUp=function(e,i,n){var r=(e-n)/i,s=r>1?r:1;this.element.scrollTop=e-s},t.prototype._animateScroll=function(e,i){var n=this,r=hr,s=this.element.scrollTop,o=!1;i>0?(this._scrollDown(s,r,e),s<e&&(o=!0)):(this._scrollUp(s,r,e),s>e&&(o=!0)),o&&requestAnimationFrame(function(){n._animateScroll(e,i)})},t}(),qi=function(){function t(e){var i=e.element,n=e.classNames;this.element=i,this.classNames=n,this.isDisabled=!1}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this.element.dataset.choice==="active"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.setAttribute("value",e),this.element.value=e},enumerable:!1,configurable:!0}),t.prototype.conceal=function(){var e=this.element;x(e,this.classNames.input),e.hidden=!0,e.tabIndex=-1;var i=e.getAttribute("style");i&&e.setAttribute("data-choice-orig-style",i),e.setAttribute("data-choice","active")},t.prototype.reveal=function(){var e=this.element;le(e,this.classNames.input),e.hidden=!1,e.removeAttribute("tabindex");var i=e.getAttribute("data-choice-orig-style");i?(e.removeAttribute("data-choice-orig-style"),e.setAttribute("style",i)):e.removeAttribute("style"),e.removeAttribute("data-choice")},t.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},t.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},t.prototype.triggerEvent=function(e,i){sr(this.element,e,i||{})},t}(),dr=function(t){Gi(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qi),$e=function(t,e){return e===void 0&&(e=!0),typeof t>"u"?e:!!t},Yi=function(t){if(typeof t=="string"&&(t=t.split(" ").filter(function(e){return e.length})),Array.isArray(t)&&t.length)return t},ae=function(t,e,i){if(i===void 0&&(i=!0),typeof t=="string"){var n=ot(t),r=i||n===t?t:{escaped:n,raw:t},s=ae({value:t,label:r,selected:!0},!1);return s}var o=t;if("choices"in o){if(!e)throw new TypeError("optGroup is not allowed");var l=o,c=l.choices.map(function(m){return ae(m,!1)}),u={id:0,label:Ie(l.label)||l.value,active:!!c.length,disabled:!!l.disabled,choices:c};return u}var f=o,p={id:0,group:null,score:0,rank:0,value:f.value,label:f.label||f.value,active:$e(f.active),selected:$e(f.selected,!1),disabled:$e(f.disabled,!1),placeholder:$e(f.placeholder,!1),highlighted:!1,labelClass:Yi(f.labelClass),labelDescription:f.labelDescription,customProperties:f.customProperties};return p},fr=function(t){return t.tagName==="INPUT"},Xi=function(t){return t.tagName==="SELECT"},pr=function(t){return t.tagName==="OPTION"},mr=function(t){return t.tagName==="OPTGROUP"},gr=function(t){Gi(e,t);function e(i){var n=i.element,r=i.classNames,s=i.template,o=i.extractPlaceholder,l=t.call(this,{element:n,classNames:r})||this;return l.template=s,l.extractPlaceholder=o,l}return Object.defineProperty(e.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),e.prototype.addOptions=function(i){var n=this,r=document.createDocumentFragment();i.forEach(function(s){var o=s;if(!o.element){var l=n.template(o);r.appendChild(l),o.element=l}}),this.element.appendChild(r)},e.prototype.optionsAsChoices=function(){var i=this,n=[];return this.element.querySelectorAll(":scope > option, :scope > optgroup").forEach(function(r){pr(r)?n.push(i._optionToChoice(r)):mr(r)&&n.push(i._optgroupToChoice(r))}),n},e.prototype._optionToChoice=function(i){return!i.hasAttribute("value")&&i.hasAttribute("placeholder")&&(i.setAttribute("value",""),i.value=""),{id:0,group:null,score:0,rank:0,value:i.value,label:i.label,element:i,active:!0,selected:this.extractPlaceholder?i.selected:i.hasAttribute("selected"),disabled:i.disabled,highlighted:!1,placeholder:this.extractPlaceholder&&(!i.value||i.hasAttribute("placeholder")),labelClass:typeof i.dataset.labelClass<"u"?Yi(i.dataset.labelClass):void 0,labelDescription:typeof i.dataset.labelDescription<"u"?i.dataset.labelDescription:void 0,customProperties:ar(i.dataset.customProperties)}},e.prototype._optgroupToChoice=function(i){var n=this,r=i.querySelectorAll("option"),s=Array.from(r).map(function(o){return n._optionToChoice(o)});return{id:0,label:i.label||"",element:i,active:!!s.length,disabled:i.disabled,choices:s}},e}(qi),vr={containerOuter:["choices"],containerInner:["choices__inner"],input:["choices__input"],inputCloned:["choices__input--cloned"],list:["choices__list"],listItems:["choices__list--multiple"],listSingle:["choices__list--single"],listDropdown:["choices__list--dropdown"],item:["choices__item"],itemSelectable:["choices__item--selectable"],itemDisabled:["choices__item--disabled"],itemChoice:["choices__item--choice"],description:["choices__description"],placeholder:["choices__placeholder"],group:["choices__group"],groupHeading:["choices__heading"],button:["choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],notice:["choices__notice"],addChoice:["choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]},Ei={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,closeDropdownOnSelect:"auto",singleModeForMultiSelect:!1,addChoices:!1,addItems:!0,addItemFilter:function(t){return!!t&&t!==""},removeItems:!0,removeItemButton:!1,removeItemButtonAlignLeft:!1,editItems:!1,allowHTML:!1,allowHtmlUserInput:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:nr,shadowRoot:null,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(t){return'Press Enter to add <b>"'.concat(t,'"</b>')},removeItemIconText:function(){return"Remove item"},removeItemLabelText:function(t){return"Remove item: ".concat(t)},maxItemText:function(t){return"Only ".concat(t," values can be added")},valueComparer:function(t,e){return t===e},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:vr,appendGroupInSearch:!1},Si=function(t){var e=t.itemEl;e&&(e.remove(),t.itemEl=void 0)};function br(t,e,i){var n=t,r=!0;switch(e.type){case j.ADD_ITEM:{e.item.selected=!0;var s=e.item.element;s&&(s.selected=!0,s.setAttribute("selected","")),n.push(e.item);break}case j.REMOVE_ITEM:{e.item.selected=!1;var s=e.item.element;if(s){s.selected=!1,s.removeAttribute("selected");var o=s.parentElement;o&&Xi(o)&&o.type===be.SelectOne&&(o.value="")}Si(e.item),n=n.filter(function(f){return f.id!==e.item.id});break}case j.REMOVE_CHOICE:{Si(e.choice),n=n.filter(function(u){return u.id!==e.choice.id});break}case j.HIGHLIGHT_ITEM:{var l=e.highlighted,c=n.find(function(u){return u.id===e.item.id});c&&c.highlighted!==l&&(c.highlighted=l,i&&lr(c,l?i.classNames.highlightedState:i.classNames.selectedState,l?i.classNames.selectedState:i.classNames.highlightedState));break}default:{r=!1;break}}return{state:n,update:r}}function _r(t,e){var i=t,n=!0;switch(e.type){case j.ADD_GROUP:{i.push(e.group);break}case j.CLEAR_CHOICES:{i=[];break}default:{n=!1;break}}return{state:i,update:n}}function yr(t,e,i){var n=t,r=!0;switch(e.type){case j.ADD_CHOICE:{n.push(e.choice);break}case j.REMOVE_CHOICE:{e.choice.choiceEl=void 0,e.choice.group&&(e.choice.group.choices=e.choice.group.choices.filter(function(o){return o.id!==e.choice.id})),n=n.filter(function(o){return o.id!==e.choice.id});break}case j.ADD_ITEM:case j.REMOVE_ITEM:{e.item.choiceEl=void 0;break}case j.FILTER_CHOICES:{var s=[];e.results.forEach(function(o){s[o.item.id]=o}),n.forEach(function(o){var l=s[o.id];l!==void 0?(o.score=l.score,o.rank=l.rank,o.active=!0):(o.score=0,o.rank=0,o.active=!1),i&&i.appendGroupInSearch&&(o.choiceEl=void 0)});break}case j.ACTIVATE_CHOICES:{n.forEach(function(o){o.active=e.active,i&&i.appendGroupInSearch&&(o.choiceEl=void 0)});break}case j.CLEAR_CHOICES:{n=[];break}default:{r=!1;break}}return{state:n,update:r}}var Ci={groups:_r,items:br,choices:yr},Er=function(){function t(e){this._state=this.defaultState,this._listeners=[],this._txn=0,this._context=e}return Object.defineProperty(t.prototype,"defaultState",{get:function(){return{groups:[],items:[],choices:[]}},enumerable:!1,configurable:!0}),t.prototype.changeSet=function(e){return{groups:e,items:e,choices:e}},t.prototype.reset=function(){this._state=this.defaultState;var e=this.changeSet(!0);this._txn?this._changeSet=e:this._listeners.forEach(function(i){return i(e)})},t.prototype.subscribe=function(e){return this._listeners.push(e),this},t.prototype.dispatch=function(e){var i=this,n=this._state,r=!1,s=this._changeSet||this.changeSet(!1);Object.keys(Ci).forEach(function(o){var l=Ci[o](n[o],e,i._context);l.update&&(r=!0,s[o]=!0,n[o]=l.state)}),r&&(this._txn?this._changeSet=s:this._listeners.forEach(function(o){return o(s)}))},t.prototype.withTxn=function(e){this._txn++;try{e()}finally{if(this._txn=Math.max(0,this._txn-1),!this._txn){var i=this._changeSet;i&&(this._changeSet=void 0,this._listeners.forEach(function(n){return n(i)}))}}},Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.state.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightedActiveItems",{get:function(){return this.items.filter(function(e){return e.active&&e.highlighted})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.state.choices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeChoices",{get:function(){return this.choices.filter(function(e){return e.active})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchableChoices",{get:function(){return this.choices.filter(function(e){return!e.disabled&&!e.placeholder})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"groups",{get:function(){return this.state.groups},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeGroups",{get:function(){var e=this;return this.state.groups.filter(function(i){var n=i.active&&!i.disabled,r=e.state.choices.some(function(s){return s.active&&!s.disabled});return n&&r},[])},enumerable:!1,configurable:!0}),t.prototype.inTxn=function(){return this._txn>0},t.prototype.getChoiceById=function(e){return this.activeChoices.find(function(i){return i.id===e})},t.prototype.getGroupById=function(e){return this.groups.find(function(i){return i.id===e})},t}(),W={noChoices:"no-choices",noResults:"no-results",addChoice:"add-choice",generic:""};function Sr(t,e,i){return(e=wr(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function wi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,n)}return i}function Te(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?wi(Object(i),!0).forEach(function(n){Sr(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wi(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function Cr(t,e){if(typeof t!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var n=i.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wr(t){var e=Cr(t,"string");return typeof e=="symbol"?e:e+""}function de(t){return Array.isArray?Array.isArray(t):Qi(t)==="[object Array]"}function Ar(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function xr(t){return t==null?"":Ar(t)}function ce(t){return typeof t=="string"}function Ji(t){return typeof t=="number"}function Ir(t){return t===!0||t===!1||Mr(t)&&Qi(t)=="[object Boolean]"}function Zi(t){return typeof t=="object"}function Mr(t){return Zi(t)&&t!==null}function re(t){return t!=null}function Et(t){return!t.trim().length}function Qi(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Or="Incorrect 'index' type",Lr=t=>`Invalid value for key ${t}`,Tr=t=>`Pattern length exceeds max of ${t}.`,Pr=t=>`Missing ${t} property in key`,kr=t=>`Property 'weight' in key '${t}' must be a positive integer`,Ai=Object.prototype.hasOwnProperty;class Dr{constructor(e){this._keys=[],this._keyMap={};let i=0;e.forEach(n=>{let r=en(n);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(n=>{n.weight/=i})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function en(t){let e=null,i=null,n=null,r=1,s=null;if(ce(t)||de(t))n=t,e=xi(t),i=At(t);else{if(!Ai.call(t,"name"))throw new Error(Pr("name"));const o=t.name;if(n=o,Ai.call(t,"weight")&&(r=t.weight,r<=0))throw new Error(kr(o));e=xi(o),i=At(o),s=t.getFn}return{path:e,id:i,weight:r,src:n,getFn:s}}function xi(t){return de(t)?t:t.split(".")}function At(t){return de(t)?t.join("."):t}function Nr(t,e){let i=[],n=!1;const r=(s,o,l)=>{if(re(s))if(!o[l])i.push(s);else{let c=o[l];const u=s[c];if(!re(u))return;if(l===o.length-1&&(ce(u)||Ji(u)||Ir(u)))i.push(xr(u));else if(de(u)){n=!0;for(let f=0,p=u.length;f<p;f+=1)r(u[f],o,l+1)}else o.length&&r(u,o,l+1)}};return r(t,ce(e)?e.split("."):e,0),n?i:i[0]}const Fr={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Rr={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},$r={location:0,threshold:.6,distance:100},Vr={useExtendedSearch:!1,getFn:Nr,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var w=Te(Te(Te(Te({},Rr),Fr),$r),Vr);const jr=/[^ ]+/g;function Hr(t=1,e=3){const i=new Map,n=Math.pow(10,e);return{get(r){const s=r.match(jr).length;if(i.has(s))return i.get(s);const o=1/Math.pow(s,.5*t),l=parseFloat(Math.round(o*n)/n);return i.set(s,l),l},clear(){i.clear()}}}class Xt{constructor({getFn:e=w.getFn,fieldNormWeight:i=w.fieldNormWeight}={}){this.norm=Hr(i,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((i,n)=>{this._keysMap[i.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ce(this.docs[0])?this.docs.forEach((e,i)=>{this._addString(e,i)}):this.docs.forEach((e,i)=>{this._addObject(e,i)}),this.norm.clear())}add(e){const i=this.size();ce(e)?this._addString(e,i):this._addObject(e,i)}removeAt(e){this.records.splice(e,1);for(let i=e,n=this.size();i<n;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(e,i){return e[this._keysMap[i]]}size(){return this.records.length}_addString(e,i){if(!re(e)||Et(e))return;let n={v:e,i,n:this.norm.get(e)};this.records.push(n)}_addObject(e,i){let n={i,$:{}};this.keys.forEach((r,s)=>{let o=r.getFn?r.getFn(e):this.getFn(e,r.path);if(re(o)){if(de(o)){let l=[];const c=[{nestedArrIndex:-1,value:o}];for(;c.length;){const{nestedArrIndex:u,value:f}=c.pop();if(re(f))if(ce(f)&&!Et(f)){let p={v:f,i:u,n:this.norm.get(f)};l.push(p)}else de(f)&&f.forEach((p,m)=>{c.push({nestedArrIndex:m,value:p})})}n.$[s]=l}else if(ce(o)&&!Et(o)){let l={v:o,n:this.norm.get(o)};n.$[s]=l}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function tn(t,e,{getFn:i=w.getFn,fieldNormWeight:n=w.fieldNormWeight}={}){const r=new Xt({getFn:i,fieldNormWeight:n});return r.setKeys(t.map(en)),r.setSources(e),r.create(),r}function Br(t,{getFn:e=w.getFn,fieldNormWeight:i=w.fieldNormWeight}={}){const{keys:n,records:r}=t,s=new Xt({getFn:e,fieldNormWeight:i});return s.setKeys(n),s.setIndexRecords(r),s}function Ye(t,{errors:e=0,currentLocation:i=0,expectedLocation:n=0,distance:r=w.distance,ignoreLocation:s=w.ignoreLocation}={}){const o=e/t.length;if(s)return o;const l=Math.abs(n-i);return r?o+l/r:l?1:o}function Kr(t=[],e=w.minMatchCharLength){let i=[],n=-1,r=-1,s=0;for(let o=t.length;s<o;s+=1){let l=t[s];l&&n===-1?n=s:!l&&n!==-1&&(r=s-1,r-n+1>=e&&i.push([n,r]),n=-1)}return t[s-1]&&s-n>=e&&i.push([n,s-1]),i}const xe=32;function Ur(t,e,i,{location:n=w.location,distance:r=w.distance,threshold:s=w.threshold,findAllMatches:o=w.findAllMatches,minMatchCharLength:l=w.minMatchCharLength,includeMatches:c=w.includeMatches,ignoreLocation:u=w.ignoreLocation}={}){if(e.length>xe)throw new Error(Tr(xe));const f=e.length,p=t.length,m=Math.max(0,Math.min(n,p));let g=s,b=m;const _=l>1||c,A=_?Array(p):[];let I;for(;(I=t.indexOf(e,b))>-1;){let Q=Ye(e,{currentLocation:I,expectedLocation:m,distance:r,ignoreLocation:u});if(g=Math.min(Q,g),b=I+f,_){let K=0;for(;K<f;)A[I+K]=1,K+=1}}b=-1;let T=[],H=1,Z=f+p;const Oe=1<<f-1;for(let Q=0;Q<f;Q+=1){let K=0,oe=Z;for(;K<oe;)Ye(e,{errors:Q,currentLocation:m+oe,expectedLocation:m,distance:r,ignoreLocation:u})<=g?K=oe:Z=oe,oe=Math.floor((Z-K)/2+K);Z=oe;let Le=Math.max(1,m-oe+1),ke=o?p:Math.min(m+oe,p)+f,pe=Array(ke+2);pe[ke+1]=(1<<Q)-1;for(let ee=ke;ee>=Le;ee-=1){let me=ee-1,Ue=i[t.charAt(me)];if(_&&(A[me]=+!!Ue),pe[ee]=(pe[ee+1]<<1|1)&Ue,Q&&(pe[ee]|=(T[ee+1]|T[ee])<<1|1|T[ee+1]),pe[ee]&Oe&&(H=Ye(e,{errors:Q,currentLocation:me,expectedLocation:m,distance:r,ignoreLocation:u}),H<=g)){if(g=H,b=me,b<=m)break;Le=Math.max(1,2*m-b)}}if(Ye(e,{errors:Q+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:u})>g)break;T=pe}const fe={isMatch:b>=0,score:Math.max(.001,H)};if(_){const Q=Kr(A,l);Q.length?c&&(fe.indices=Q):fe.isMatch=!1}return fe}function zr(t){let e={};for(let i=0,n=t.length;i<n;i+=1){const r=t.charAt(i);e[r]=(e[r]||0)|1<<n-i-1}return e}class nn{constructor(e,{location:i=w.location,threshold:n=w.threshold,distance:r=w.distance,includeMatches:s=w.includeMatches,findAllMatches:o=w.findAllMatches,minMatchCharLength:l=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreLocation:u=w.ignoreLocation}={}){if(this.options={location:i,threshold:n,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u},this.pattern=c?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(m,g)=>{this.chunks.push({pattern:m,alphabet:zr(m),startIndex:g})},p=this.pattern.length;if(p>xe){let m=0;const g=p%xe,b=p-g;for(;m<b;)f(this.pattern.substr(m,xe),m),m+=xe;if(g){const _=p-xe;f(this.pattern.substr(_),_)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:i,includeMatches:n}=this.options;if(i||(e=e.toLowerCase()),this.pattern===e){let b={isMatch:!0,score:0};return n&&(b.indices=[[0,e.length-1]]),b}const{location:r,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:c,ignoreLocation:u}=this.options;let f=[],p=0,m=!1;this.chunks.forEach(({pattern:b,alphabet:_,startIndex:A})=>{const{isMatch:I,score:T,indices:H}=Ur(e,b,_,{location:r+A,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:c,includeMatches:n,ignoreLocation:u});I&&(m=!0),p+=T,I&&H&&(f=[...f,...H])});let g={isMatch:m,score:m?p/this.chunks.length:1};return m&&n&&(g.indices=f),g}}class Ee{constructor(e){this.pattern=e}static isMultiMatch(e){return Ii(e,this.multiRegex)}static isSingleMatch(e){return Ii(e,this.singleRegex)}search(){}}function Ii(t,e){const i=t.match(e);return i?i[1]:null}class Gr extends Ee{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const i=e===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Wr extends Ee{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class qr extends Ee{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const i=e.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Yr extends Ee{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const i=!e.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Xr extends Ee{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const i=e.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Jr extends Ee{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const i=!e.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class rn extends Ee{constructor(e,{location:i=w.location,threshold:n=w.threshold,distance:r=w.distance,includeMatches:s=w.includeMatches,findAllMatches:o=w.findAllMatches,minMatchCharLength:l=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreLocation:u=w.ignoreLocation}={}){super(e),this._bitapSearch=new nn(e,{location:i,threshold:n,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class sn extends Ee{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let i=0,n;const r=[],s=this.pattern.length;for(;(n=e.indexOf(this.pattern,i))>-1;)i=n+s,r.push([n,i-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const xt=[Gr,sn,qr,Yr,Jr,Xr,Wr,rn],Mi=xt.length,Zr=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Qr="|";function es(t,e={}){return t.split(Qr).map(i=>{let n=i.trim().split(Zr).filter(s=>s&&!!s.trim()),r=[];for(let s=0,o=n.length;s<o;s+=1){const l=n[s];let c=!1,u=-1;for(;!c&&++u<Mi;){const f=xt[u];let p=f.isMultiMatch(l);p&&(r.push(new f(p,e)),c=!0)}if(!c)for(u=-1;++u<Mi;){const f=xt[u];let p=f.isSingleMatch(l);if(p){r.push(new f(p,e));break}}}return r})}const ts=new Set([rn.type,sn.type]);class is{constructor(e,{isCaseSensitive:i=w.isCaseSensitive,includeMatches:n=w.includeMatches,minMatchCharLength:r=w.minMatchCharLength,ignoreLocation:s=w.ignoreLocation,findAllMatches:o=w.findAllMatches,location:l=w.location,threshold:c=w.threshold,distance:u=w.distance}={}){this.query=null,this.options={isCaseSensitive:i,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:s,location:l,threshold:c,distance:u},this.pattern=i?e:e.toLowerCase(),this.query=es(this.pattern,this.options)}static condition(e,i){return i.useExtendedSearch}searchIn(e){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let s=0,o=[],l=0;for(let c=0,u=i.length;c<u;c+=1){const f=i[c];o.length=0,s=0;for(let p=0,m=f.length;p<m;p+=1){const g=f[p],{isMatch:b,indices:_,score:A}=g.search(e);if(b){if(s+=1,l+=A,n){const I=g.constructor.type;ts.has(I)?o=[...o,..._]:o.push(_)}}else{l=0,s=0,o.length=0;break}}if(s){let p={isMatch:!0,score:l/s};return n&&(p.indices=o),p}}return{isMatch:!1,score:1}}}const It=[];function ns(...t){It.push(...t)}function Mt(t,e){for(let i=0,n=It.length;i<n;i+=1){let r=It[i];if(r.condition(t,e))return new r(t,e)}return new nn(t,e)}const et={AND:"$and",OR:"$or"},Ot={PATH:"$path",PATTERN:"$val"},Lt=t=>!!(t[et.AND]||t[et.OR]),rs=t=>!!t[Ot.PATH],ss=t=>!de(t)&&Zi(t)&&!Lt(t),Oi=t=>({[et.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function on(t,e,{auto:i=!0}={}){const n=r=>{let s=Object.keys(r);const o=rs(r);if(!o&&s.length>1&&!Lt(r))return n(Oi(r));if(ss(r)){const c=o?r[Ot.PATH]:s[0],u=o?r[Ot.PATTERN]:r[c];if(!ce(u))throw new Error(Lr(c));const f={keyId:At(c),pattern:u};return i&&(f.searcher=Mt(u,e)),f}let l={children:[],operator:s[0]};return s.forEach(c=>{const u=r[c];de(u)&&u.forEach(f=>{l.children.push(n(f))})}),l};return Lt(t)||(t=Oi(t)),n(t)}function os(t,{ignoreFieldNorm:e=w.ignoreFieldNorm}){t.forEach(i=>{let n=1;i.matches.forEach(({key:r,norm:s,score:o})=>{const l=r?r.weight:null;n*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),i.score=n})}function as(t,e){const i=t.matches;e.matches=[],re(i)&&i.forEach(n=>{if(!re(n.indices)||!n.indices.length)return;const{indices:r,value:s}=n;let o={indices:r,value:s};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function ls(t,e){e.score=t.score}function cs(t,e,{includeMatches:i=w.includeMatches,includeScore:n=w.includeScore}={}){const r=[];return i&&r.push(as),n&&r.push(ls),t.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return r.length&&r.forEach(c=>{c(s,l)}),l})}class Pe{constructor(e,i={},n){this.options=Te(Te({},w),i),this.options.useExtendedSearch,this._keyStore=new Dr(this.options.keys),this.setCollection(e,n)}setCollection(e,i){if(this._docs=e,i&&!(i instanceof Xt))throw new Error(Or);this._myIndex=i||tn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){re(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const i=[];for(let n=0,r=this._docs.length;n<r;n+=1){const s=this._docs[n];e(s,n)&&(this.removeAt(n),n-=1,r-=1,i.push(s))}return i}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:i=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let c=ce(e)?ce(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return os(c,{ignoreFieldNorm:l}),s&&c.sort(o),Ji(i)&&i>-1&&(c=c.slice(0,i)),cs(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const i=Mt(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:s,i:o,n:l})=>{if(!re(s))return;const{isMatch:c,score:u,indices:f}=i.searchIn(s);c&&r.push({item:s,idx:o,matches:[{score:u,value:s,norm:l,indices:f}]})}),r}_searchLogical(e){const i=on(e,this.options),n=(l,c,u)=>{if(!l.children){const{keyId:p,searcher:m}=l,g=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(c,p),searcher:m});return g&&g.length?[{idx:u,item:c,matches:g}]:[]}const f=[];for(let p=0,m=l.children.length;p<m;p+=1){const g=l.children[p],b=n(g,c,u);if(b.length)f.push(...b);else if(l.operator===et.AND)return[]}return f},r=this._myIndex.records,s={},o=[];return r.forEach(({$:l,i:c})=>{if(re(l)){let u=n(i,l,c);u.length&&(s[c]||(s[c]={idx:c,item:l,matches:[]},o.push(s[c])),u.forEach(({matches:f})=>{s[c].matches.push(...f)}))}}),o}_searchObjectList(e){const i=Mt(e,this.options),{keys:n,records:r}=this._myIndex,s=[];return r.forEach(({$:o,i:l})=>{if(!re(o))return;let c=[];n.forEach((u,f)=>{c.push(...this._findMatches({key:u,value:o[f],searcher:i}))}),c.length&&s.push({idx:l,item:o,matches:c})}),s}_findMatches({key:e,value:i,searcher:n}){if(!re(i))return[];let r=[];if(de(i))i.forEach(({v:s,i:o,n:l})=>{if(!re(s))return;const{isMatch:c,score:u,indices:f}=n.searchIn(s);c&&r.push({score:u,key:e,value:s,idx:o,norm:l,indices:f})});else{const{v:s,n:o}=i,{isMatch:l,score:c,indices:u}=n.searchIn(s);l&&r.push({score:c,key:e,value:s,norm:o,indices:u})}return r}}Pe.version="7.0.0";Pe.createIndex=tn;Pe.parseIndex=Br;Pe.config=w;Pe.parseQuery=on;ns(is);var us=function(){function t(e){this._haystack=[],this._fuseOptions=ie(ie({},e.fuseOptions),{keys:Gn([],e.searchFields),includeMatches:!0})}return t.prototype.index=function(e){this._haystack=e,this._fuse&&this._fuse.setCollection(e)},t.prototype.reset=function(){this._haystack=[],this._fuse=void 0},t.prototype.isEmptyIndex=function(){return!this._haystack.length},t.prototype.search=function(e){this._fuse||(this._fuse=new Pe(this._haystack,this._fuseOptions));var i=this._fuse.search(e);return i.map(function(n,r){return{item:n.item,score:n.score||0,rank:r+1}})},t}();function hs(t){return new us(t)}var ds=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},St=function(t,e,i){var n=t.dataset,r=e.customProperties,s=e.labelClass,o=e.labelDescription;s&&(n.labelClass=at(s).join(" ")),o&&(n.labelDescription=o),i&&r&&(typeof r=="string"?n.customProperties=r:typeof r=="object"&&!ds(r)&&(n.customProperties=JSON.stringify(r)))},Li=function(t,e,i){var n=e&&t.querySelector("label[for='".concat(e,"']")),r=n&&n.innerText;r&&i.setAttribute("aria-label",r)},fs={containerOuter:function(t,e,i,n,r,s,o){var l=t.classNames.containerOuter,c=document.createElement("div");return x(c,l),c.dataset.type=s,e&&(c.dir=e),n&&(c.tabIndex=0),i&&(c.setAttribute("role",r?"combobox":"listbox"),r?c.setAttribute("aria-autocomplete","list"):o||Li(this._docRoot,this.passedElement.element.id,c),c.setAttribute("aria-haspopup","true"),c.setAttribute("aria-expanded","false")),o&&c.setAttribute("aria-labelledby",o),c},containerInner:function(t){var e=t.classNames.containerInner,i=document.createElement("div");return x(i,e),i},itemList:function(t,e){var i=t.searchEnabled,n=t.classNames,r=n.list,s=n.listSingle,o=n.listItems,l=document.createElement("div");return x(l,r),x(l,e?s:o),this._isSelectElement&&i&&l.setAttribute("role","listbox"),l},placeholder:function(t,e){var i=t.allowHTML,n=t.classNames.placeholder,r=document.createElement("div");return x(r,n),ue(r,i,e),r},item:function(t,e,i){var n=t.allowHTML,r=t.removeItemButtonAlignLeft,s=t.removeItemIconText,o=t.removeItemLabelText,l=t.classNames,c=l.item,u=l.button,f=l.highlightedState,p=l.itemSelectable,m=l.placeholder,g=Ie(e.value),b=document.createElement("div");if(x(b,c),e.labelClass){var _=document.createElement("span");ue(_,n,e.label),x(_,e.labelClass),b.appendChild(_)}else ue(b,n,e.label);if(b.dataset.item="",b.dataset.id=e.id,b.dataset.value=g,St(b,e,!0),(e.disabled||this.containerOuter.isDisabled)&&b.setAttribute("aria-disabled","true"),this._isSelectElement&&(b.setAttribute("aria-selected","true"),b.setAttribute("role","option")),e.placeholder&&(x(b,m),b.dataset.placeholder=""),x(b,e.highlighted?f:p),i){e.disabled&&le(b,p),b.dataset.deletable="";var A=document.createElement("button");A.type="button",x(A,u),ue(A,!0,He(s,e.value));var I=He(o,e.value);I&&A.setAttribute("aria-label",I),A.dataset.button="",r?b.insertAdjacentElement("afterbegin",A):b.appendChild(A)}return b},choiceList:function(t,e){var i=t.classNames.list,n=document.createElement("div");return x(n,i),e||n.setAttribute("aria-multiselectable","true"),n.setAttribute("role","listbox"),n},choiceGroup:function(t,e){var i=t.allowHTML,n=t.classNames,r=n.group,s=n.groupHeading,o=n.itemDisabled,l=e.id,c=e.label,u=e.disabled,f=Ie(c),p=document.createElement("div");x(p,r),u&&x(p,o),p.setAttribute("role","group"),p.dataset.group="",p.dataset.id=l,p.dataset.value=f,u&&p.setAttribute("aria-disabled","true");var m=document.createElement("div");return x(m,s),ue(m,i,c||""),p.appendChild(m),p},choice:function(t,e,i,n){var r=t.allowHTML,s=t.classNames,o=s.item,l=s.itemChoice,c=s.itemSelectable,u=s.selectedState,f=s.itemDisabled,p=s.description,m=s.placeholder,g=e.label,b=Ie(e.value),_=document.createElement("div");_.id=e.elementId,x(_,o),x(_,l),n&&typeof g=="string"&&(g=Yt(r,g),g+=" (".concat(n,")"),g={trusted:g});var A=_;if(e.labelClass){var I=document.createElement("span");ue(I,r,g),x(I,e.labelClass),A=I,_.appendChild(I)}else ue(_,r,g);if(e.labelDescription){var T="".concat(e.elementId,"-description");A.setAttribute("aria-describedby",T);var H=document.createElement("span");ue(H,r,e.labelDescription),H.id=T,x(H,p),_.appendChild(H)}return e.selected&&x(_,u),e.placeholder&&x(_,m),_.setAttribute("role",e.group?"treeitem":"option"),_.dataset.choice="",_.dataset.id=e.id,_.dataset.value=b,i&&(_.dataset.selectText=i),e.group&&(_.dataset.groupId="".concat(e.group.id)),St(_,e,!1),e.disabled?(x(_,f),_.dataset.choiceDisabled="",_.setAttribute("aria-disabled","true")):(x(_,c),_.dataset.choiceSelectable=""),_},input:function(t,e){var i=t.classNames,n=i.input,r=i.inputCloned,s=t.labelId,o=document.createElement("input");return o.type="search",x(o,n),x(o,r),o.autocomplete="off",o.autocapitalize="off",o.spellcheck=!1,o.setAttribute("aria-autocomplete","list"),e?o.setAttribute("aria-label",e):s||Li(this._docRoot,this.passedElement.element.id,o),o},dropdown:function(t){var e=t.classNames,i=e.list,n=e.listDropdown,r=document.createElement("div");return x(r,i),x(r,n),r.setAttribute("aria-expanded","false"),r},notice:function(t,e,i){var n=t.classNames,r=n.item,s=n.itemChoice,o=n.addChoice,l=n.noResults,c=n.noChoices,u=n.notice;i===void 0&&(i=W.generic);var f=document.createElement("div");switch(ue(f,!0,e),x(f,r),x(f,s),x(f,u),i){case W.addChoice:x(f,o);break;case W.noResults:x(f,l);break;case W.noChoices:x(f,c);break}return i===W.addChoice&&(f.dataset.choiceSelectable="",f.dataset.choice=""),f},option:function(t){var e=Ie(t.label),i=new Option(e,t.value,!1,t.selected);return St(i,t,!0),i.disabled=t.disabled,t.selected&&i.setAttribute("selected",""),i}},ps="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,ms={},Ct=function(t){if(t)return t.dataset.id?parseInt(t.dataset.id,10):void 0},Re="[data-choice-selectable]",gs=function(){function t(e,i){e===void 0&&(e="[data-choice]"),i===void 0&&(i={});var n=this;this.initialisedOK=void 0,this._hasNonChoicePlaceholder=!1,this._lastAddedChoiceId=0,this._lastAddedGroupId=0;var r=t.defaults;this.config=ie(ie(ie({},r.allOptions),r.options),i),Wn.forEach(function(I){n.config[I]=ie(ie(ie({},r.allOptions[I]),r.options[I]),i[I])});var s=this.config;s.silent||this._validateConfig();var o=s.shadowRoot||document.documentElement;this._docRoot=o;var l=typeof e=="string"?o.querySelector(e):e;if(!l||typeof l!="object"||!(fr(l)||Xi(l)))throw TypeError(!l&&typeof e=="string"?"Selector ".concat(e," failed to find an element"):"Expected one of the following types text|select-one|select-multiple");var c=l.type,u=c===be.Text;(u||s.maxItemCount!==1)&&(s.singleModeForMultiSelect=!1),s.singleModeForMultiSelect&&(c=be.SelectMultiple);var f=c===be.SelectOne,p=c===be.SelectMultiple,m=f||p;if(this._elementType=c,this._isTextElement=u,this._isSelectOneElement=f,this._isSelectMultipleElement=p,this._isSelectElement=f||p,this._canAddUserChoices=u&&s.addItems||m&&s.addChoices,typeof s.renderSelectedChoices!="boolean"&&(s.renderSelectedChoices=s.renderSelectedChoices==="always"||f),s.closeDropdownOnSelect==="auto"?s.closeDropdownOnSelect=u||f||s.singleModeForMultiSelect:s.closeDropdownOnSelect=$e(s.closeDropdownOnSelect),s.placeholder&&(s.placeholderValue?this._hasNonChoicePlaceholder=!0:l.dataset.placeholder&&(this._hasNonChoicePlaceholder=!0,s.placeholderValue=l.dataset.placeholder)),i.addItemFilter&&typeof i.addItemFilter!="function"){var g=i.addItemFilter instanceof RegExp?i.addItemFilter:new RegExp(i.addItemFilter);s.addItemFilter=g.test.bind(g)}if(this._isTextElement)this.passedElement=new dr({element:l,classNames:s.classNames});else{var b=l;this.passedElement=new gr({element:b,classNames:s.classNames,template:function(I){return n._templates.option(I)},extractPlaceholder:s.placeholder&&!this._hasNonChoicePlaceholder})}if(this.initialised=!1,this._store=new Er(s),this._currentValue="",s.searchEnabled=!u&&s.searchEnabled||p,this._canSearch=s.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=Qn(l,"choices-"),this._direction=l.dir,!this._direction){var _=window.getComputedStyle(l).direction,A=window.getComputedStyle(document.documentElement).direction;_!==A&&(this._direction=_)}if(this._idNames={itemChoice:"item-choice"},this._templates=r.templates,this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onInput=this._onInput.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onSelectKey=this._onSelectKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive){s.silent||console.warn("Trying to initialise Choices on element already initialised",{element:e}),this.initialised=!0,this.initialisedOK=!1;return}this.init(),this._initialItems=this._store.items.map(function(I){return I.value})}return Object.defineProperty(t,"defaults",{get:function(){return Object.preventExtensions({get options(){return ms},get allOptions(){return Ei},get templates(){return fs}})},enumerable:!1,configurable:!0}),t.prototype.init=function(){if(!(this.initialised||this.initialisedOK!==void 0)){this._searcher=hs(this.config),this._loadChoices(),this._createTemplates(),this._createElements(),this._createStructure(),this._isTextElement&&!this.config.addItems||this.passedElement.element.hasAttribute("disabled")||this.passedElement.element.closest("fieldset:disabled")?this.disable():(this.enable(),this._addEventListeners()),this._initStore(),this.initialised=!0,this.initialisedOK=!0;var e=this.config.callbackOnInit;typeof e=="function"&&e.call(this)}},t.prototype.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this._store._listeners=[],this.clearStore(!1),this._stopSearch(),this._templates=t.defaults.templates,this.initialised=!1,this.initialisedOK=void 0)},t.prototype.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},t.prototype.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},t.prototype.highlightItem=function(e,i){if(i===void 0&&(i=!0),!e||!e.id)return this;var n=this._store.items.find(function(r){return r.id===e.id});return!n||n.highlighted?this:(this._store.dispatch(qe(n,!0)),i&&this.passedElement.triggerEvent(te.highlightItem,this._getChoiceForOutput(n)),this)},t.prototype.unhighlightItem=function(e,i){if(i===void 0&&(i=!0),!e||!e.id)return this;var n=this._store.items.find(function(r){return r.id===e.id});return!n||!n.highlighted?this:(this._store.dispatch(qe(n,!1)),i&&this.passedElement.triggerEvent(te.unhighlightItem,this._getChoiceForOutput(n)),this)},t.prototype.highlightAll=function(){var e=this;return this._store.withTxn(function(){e._store.items.forEach(function(i){i.highlighted||(e._store.dispatch(qe(i,!0)),e.passedElement.triggerEvent(te.highlightItem,e._getChoiceForOutput(i)))})}),this},t.prototype.unhighlightAll=function(){var e=this;return this._store.withTxn(function(){e._store.items.forEach(function(i){i.highlighted&&(e._store.dispatch(qe(i,!1)),e.passedElement.triggerEvent(te.highlightItem,e._getChoiceForOutput(i)))})}),this},t.prototype.removeActiveItemsByValue=function(e){var i=this;return this._store.withTxn(function(){i._store.items.filter(function(n){return n.value===e}).forEach(function(n){return i._removeItem(n)})}),this},t.prototype.removeActiveItems=function(e){var i=this;return this._store.withTxn(function(){i._store.items.filter(function(n){var r=n.id;return r!==e}).forEach(function(n){return i._removeItem(n)})}),this},t.prototype.removeHighlightedItems=function(e){var i=this;return e===void 0&&(e=!1),this._store.withTxn(function(){i._store.highlightedActiveItems.forEach(function(n){i._removeItem(n),e&&i._triggerChange(n.value)})}),this},t.prototype.showDropdown=function(e){var i=this;return this.dropdown.isActive?this:(e===void 0&&(e=!this._canSearch),requestAnimationFrame(function(){i.dropdown.show();var n=i.dropdown.element.getBoundingClientRect();i.containerOuter.open(n.bottom,n.height),e||i.input.focus(),i.passedElement.triggerEvent(te.showDropdown)}),this)},t.prototype.hideDropdown=function(e){var i=this;return this.dropdown.isActive?(requestAnimationFrame(function(){i.dropdown.hide(),i.containerOuter.close(),!e&&i._canSearch&&(i.input.removeActiveDescendant(),i.input.blur()),i.passedElement.triggerEvent(te.hideDropdown)}),this):this},t.prototype.getValue=function(e){var i=this,n=this._store.items.map(function(r){return e?r.value:i._getChoiceForOutput(r)});return this._isSelectOneElement||this.config.singleModeForMultiSelect?n[0]:n},t.prototype.setValue=function(e){var i=this;return this.initialisedOK?(this._store.withTxn(function(){e.forEach(function(n){n&&i._addChoice(ae(n,!1))})}),this._searcher.reset(),this):(this._warnChoicesInitFailed("setValue"),this)},t.prototype.setChoiceByValue=function(e){var i=this;return this.initialisedOK?this._isTextElement?this:(this._store.withTxn(function(){var n=Array.isArray(e)?e:[e];n.forEach(function(r){return i._findAndSelectChoiceByValue(r)}),i.unhighlightAll()}),this._searcher.reset(),this):(this._warnChoicesInitFailed("setChoiceByValue"),this)},t.prototype.setChoices=function(e,i,n,r,s,o){var l=this;if(e===void 0&&(e=[]),i===void 0&&(i="value"),n===void 0&&(n="label"),r===void 0&&(r=!1),s===void 0&&(s=!0),o===void 0&&(o=!1),!this.initialisedOK)return this._warnChoicesInitFailed("setChoices"),this;if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof i!="string"||!i)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(typeof e=="function"){var c=e(this);if(typeof Promise=="function"&&c instanceof Promise)return new Promise(function(u){return requestAnimationFrame(u)}).then(function(){return l._handleLoadingState(!0)}).then(function(){return c}).then(function(u){return l.setChoices(u,i,n,r,s,o)}).catch(function(u){l.config.silent||console.error(u)}).then(function(){return l._handleLoadingState(!1)}).then(function(){return l});if(!Array.isArray(c))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof c));return this.setChoices(c,i,n,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._store.withTxn(function(){s&&(l._isSearching=!1),r&&l.clearChoices(!0,o);var u=i==="value",f=n==="label";e.forEach(function(p){if("choices"in p){var m=p;f||(m=ie(ie({},m),{label:m[n]})),l._addGroup(ae(m,!0))}else{var g=p;(!f||!u)&&(g=ie(ie({},g),{value:g[i],label:g[n]}));var b=ae(g,!1);l._addChoice(b),b.placeholder&&!l._hasNonChoicePlaceholder&&(l._placeholderValue=Wi(b.label))}}),l.unhighlightAll()}),this._searcher.reset(),this},t.prototype.refresh=function(e,i,n){var r=this;return e===void 0&&(e=!1),i===void 0&&(i=!1),n===void 0&&(n=!1),this._isSelectElement?(this._store.withTxn(function(){var s=r.passedElement.optionsAsChoices(),o={};n||r._store.items.forEach(function(c){c.id&&c.active&&c.selected&&(o[c.value]=!0)}),r.clearStore(!1);var l=function(c){n?r._store.dispatch(gi(c)):o[c.value]&&(c.selected=!0)};s.forEach(function(c){if("choices"in c){c.choices.forEach(l);return}l(c)}),r._addPredefinedChoices(s,i,e),r._isSearching&&r._searchChoices(r.input.value)}),this):(this.config.silent||console.warn("refresh method can only be used on choices backed by a <select> element"),this)},t.prototype.removeChoice=function(e){var i=this._store.choices.find(function(n){return n.value===e});return i?(this._clearNotice(),this._store.dispatch(qn(i)),this._searcher.reset(),i.selected&&this.passedElement.triggerEvent(te.removeItem,this._getChoiceForOutput(i)),this):this},t.prototype.clearChoices=function(e,i){var n=this;return e===void 0&&(e=!0),i===void 0&&(i=!1),e&&(i?this.passedElement.element.replaceChildren(""):this.passedElement.element.querySelectorAll(":not([selected])").forEach(function(r){r.remove()})),this.itemList.element.replaceChildren(""),this.choiceList.element.replaceChildren(""),this._clearNotice(),this._store.withTxn(function(){var r=i?[]:n._store.items;n._store.reset(),r.forEach(function(s){n._store.dispatch(pi(s)),n._store.dispatch(mi(s))})}),this._searcher.reset(),this},t.prototype.clearStore=function(e){return e===void 0&&(e=!0),this.clearChoices(e,!0),this._stopSearch(),this._lastAddedChoiceId=0,this._lastAddedGroupId=0,this},t.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),this._stopSearch(),this},t.prototype._validateConfig=function(){var e=this.config,i=or(e,Ei);i.length&&console.warn("Unknown config option(s) passed",i.join(", ")),e.allowHTML&&e.allowHtmlUserInput&&(e.addItems&&console.warn("Warning: allowHTML/allowHtmlUserInput/addItems all being true is strongly not recommended and may lead to XSS attacks"),e.addChoices&&console.warn("Warning: allowHTML/allowHtmlUserInput/addChoices all being true is strongly not recommended and may lead to XSS attacks"))},t.prototype._render=function(e){e===void 0&&(e={choices:!0,groups:!0,items:!0}),!this._store.inTxn()&&(this._isSelectElement&&(e.choices||e.groups)&&this._renderChoices(),e.items&&this._renderItems())},t.prototype._renderChoices=function(){var e=this;if(this._canAddItems()){var i=this,n=i.config,r=i._isSearching,s=this._store,o=s.activeGroups,l=s.activeChoices,c=0;if(r&&n.searchResultLimit>0?c=n.searchResultLimit:n.renderChoiceLimit>0&&(c=n.renderChoiceLimit),this._isSelectElement){var u=l.filter(function(b){return!b.element});u.length&&this.passedElement.addOptions(u)}var f=document.createDocumentFragment(),p=function(b){return b.filter(function(_){return!_.placeholder&&(r?!!_.rank:n.renderSelectedChoices||!_.selected)})},m=!1,g=function(b,_,A){r?b.sort(rr):n.shouldSort&&b.sort(n.sorter);var I=b.length;I=!_&&c&&I>c?c:I,I--,b.every(function(T,H){var Z=T.choiceEl||e._templates.choice(n,T,n.itemSelectText,A);return T.choiceEl=Z,f.appendChild(Z),(r||!T.selected)&&(m=!0),H<I})};l.length&&(n.resetScrollPosition&&requestAnimationFrame(function(){return e.choiceList.scrollToTop()}),!this._hasNonChoicePlaceholder&&!r&&this._isSelectOneElement&&g(l.filter(function(b){return b.placeholder&&!b.group}),!1,void 0),o.length&&!r?(n.shouldSort&&o.sort(n.sorter),g(l.filter(function(b){return!b.placeholder&&!b.group}),!1,void 0),o.forEach(function(b){var _=p(b.choices);if(_.length){if(b.label){var A=b.groupEl||e._templates.choiceGroup(e.config,b);b.groupEl=A,A.remove(),f.appendChild(A)}g(_,!0,n.appendGroupInSearch&&r?b.label:void 0)}})):g(p(l),!1,void 0)),!m&&(r||!f.children.length||!n.renderSelectedChoices)&&(this._notice||(this._notice={text:bi(r?n.noResultsText:n.noChoicesText),type:r?W.noResults:W.noChoices}),f.replaceChildren("")),this._renderNotice(f),this.choiceList.element.replaceChildren(f),m&&this._highlightChoice()}},t.prototype._renderItems=function(){var e=this,i=this._store.items||[],n=this.itemList.element,r=this.config,s=document.createDocumentFragment(),o=function(p){return n.querySelector('[data-item][data-id="'.concat(p.id,'"]'))},l=function(p){var m=p.itemEl;m&&m.parentElement||(m=o(p)||e._templates.item(r,p,r.removeItemButton),p.itemEl=m,s.appendChild(m))};i.forEach(l);var c=!!s.childNodes.length;if(this._isSelectOneElement){var u=n.children.length;if(c||u>1){var f=n.querySelector(Fe(r.classNames.placeholder));f&&f.remove()}else!c&&!u&&this._placeholderValue&&(c=!0,l(ae({selected:!0,value:"",label:this._placeholderValue,placeholder:!0},!1)))}c&&(n.append(s),r.shouldSortItems&&!this._isSelectOneElement&&(i.sort(r.sorter),i.forEach(function(p){var m=o(p);m&&(m.remove(),s.append(m))}),n.append(s))),this._isTextElement&&(this.passedElement.value=i.map(function(p){var m=p.value;return m}).join(r.delimiter))},t.prototype._displayNotice=function(e,i,n){n===void 0&&(n=!0);var r=this._notice;if(r&&(r.type===i&&r.text===e||r.type===W.addChoice&&(i===W.noResults||i===W.noChoices))){n&&this.showDropdown(!0);return}this._clearNotice(),this._notice=e?{text:e,type:i}:void 0,this._renderNotice(),n&&e&&this.showDropdown(!0)},t.prototype._clearNotice=function(){if(this._notice){var e=this.choiceList.element.querySelector(Fe(this.config.classNames.notice));e&&e.remove(),this._notice=void 0}},t.prototype._renderNotice=function(e){var i=this._notice;if(i){var n=this._templates.notice(this.config,i.text,i.type);e?e.append(n):this.choiceList.prepend(n)}},t.prototype._getChoiceForOutput=function(e,i){return{id:e.id,highlighted:e.highlighted,labelClass:e.labelClass,labelDescription:e.labelDescription,customProperties:e.customProperties,disabled:e.disabled,active:e.active,label:e.label,placeholder:e.placeholder,value:e.value,groupValue:e.group?e.group.label:void 0,element:e.element,keyCode:i}},t.prototype._triggerChange=function(e){e!=null&&this.passedElement.triggerEvent(te.change,{value:e})},t.prototype._handleButtonAction=function(e){var i=this,n=this._store.items;if(!(!n.length||!this.config.removeItems||!this.config.removeItemButton)){var r=e&&Ct(e.parentElement),s=r&&n.find(function(o){return o.id===r});s&&this._store.withTxn(function(){if(i._removeItem(s),i._triggerChange(s.value),i._isSelectOneElement&&!i._hasNonChoicePlaceholder){var o=(i.config.shouldSort?i._store.choices.reverse():i._store.choices).find(function(l){return l.placeholder});o&&(i._addItem(o),i.unhighlightAll(),o.value&&i._triggerChange(o.value))}})}},t.prototype._handleItemAction=function(e,i){var n=this;i===void 0&&(i=!1);var r=this._store.items;if(!(!r.length||!this.config.removeItems||this._isSelectOneElement)){var s=Ct(e);s&&(r.forEach(function(o){o.id===s&&!o.highlighted?n.highlightItem(o):!i&&o.highlighted&&n.unhighlightItem(o)}),this.input.focus())}},t.prototype._handleChoiceAction=function(e){var i=this,n=Ct(e),r=n&&this._store.getChoiceById(n);if(!r||r.disabled)return!1;var s=this.dropdown.isActive;if(!r.selected){if(!this._canAddItems())return!0;this._store.withTxn(function(){i._addItem(r,!0,!0),i.clearInput(),i.unhighlightAll()}),this._triggerChange(r.value)}return s&&this.config.closeDropdownOnSelect&&(this.hideDropdown(!0),this.containerOuter.element.focus()),!0},t.prototype._handleBackspace=function(e){var i=this.config;if(!(!i.removeItems||!e.length)){var n=e[e.length-1],r=e.some(function(s){return s.highlighted});i.editItems&&!r&&n?(this.input.value=n.value,this.input.setWidth(),this._removeItem(n),this._triggerChange(n.value)):(r||this.highlightItem(n,!1),this.removeHighlightedItems(!0))}},t.prototype._loadChoices=function(){var e,i=this,n=this.config;if(this._isTextElement){if(this._presetChoices=n.items.map(function(o){return ae(o,!1)}),this.passedElement.value){var r=this.passedElement.value.split(n.delimiter).map(function(o){return ae(o,!1,i.config.allowHtmlUserInput)});this._presetChoices=this._presetChoices.concat(r)}this._presetChoices.forEach(function(o){o.selected=!0})}else if(this._isSelectElement){this._presetChoices=n.choices.map(function(o){return ae(o,!0)});var s=this.passedElement.optionsAsChoices();s&&(e=this._presetChoices).push.apply(e,s)}},t.prototype._handleLoadingState=function(e){e===void 0&&(e=!0);var i=this.itemList.element;e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?i.replaceChildren(this._templates.placeholder(this.config,this.config.loadingText)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?(i.replaceChildren(""),this._render()):this.input.placeholder=this._placeholderValue||"")},t.prototype._handleSearch=function(e){if(this.input.isFocussed)if(e!==null&&typeof e<"u"&&e.length>=this.config.searchFloor){var i=this.config.searchChoices?this._searchChoices(e):0;i!==null&&this.passedElement.triggerEvent(te.search,{value:e,resultCount:i})}else this._store.choices.some(function(n){return!n.active})&&this._stopSearch()},t.prototype._canAddItems=function(){var e=this.config,i=e.maxItemCount,n=e.maxItemText;return!e.singleModeForMultiSelect&&i>0&&i<=this._store.items.length?(this.choiceList.element.replaceChildren(""),this._notice=void 0,this._displayNotice(typeof n=="function"?n(i):n,W.addChoice),!1):(this._notice&&this._notice.type===W.addChoice&&this._clearNotice(),!0)},t.prototype._canCreateItem=function(e){var i=this.config,n=!0,r="";if(n&&typeof i.addItemFilter=="function"&&!i.addItemFilter(e)&&(n=!1,r=He(i.customAddItemText,e)),n){var s=this._store.choices.find(function(o){return i.valueComparer(o.value,e)});if(s){if(this._isSelectElement)return this._displayNotice("",W.addChoice),!1;i.duplicateItemsAllowed||(n=!1,r=He(i.uniqueItemText,e))}}return n&&(r=He(i.addItemText,e)),r&&this._displayNotice(r,W.addChoice),n},t.prototype._searchChoices=function(e){var i=e.trim().replace(/\s{2,}/," ");if(!i.length||i===this._currentValue)return null;var n=this._searcher;n.isEmptyIndex()&&n.index(this._store.searchableChoices);var r=n.search(i);this._currentValue=i,this._highlightPosition=0,this._isSearching=!0;var s=this._notice,o=s&&s.type;return o!==W.addChoice&&(r.length?this._clearNotice():this._displayNotice(bi(this.config.noResultsText),W.noResults)),this._store.dispatch(Yn(r)),r.length},t.prototype._stopSearch=function(){this._isSearching&&(this._currentValue="",this._isSearching=!1,this._clearNotice(),this._store.dispatch(Xn(!0)),this.passedElement.triggerEvent(te.search,{value:"",resultCount:0}))},t.prototype._addEventListeners=function(){var e=this._docRoot,i=this.containerOuter.element,n=this.input.element;e.addEventListener("touchend",this._onTouchEnd,!0),i.addEventListener("keydown",this._onKeyDown,!0),i.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(i.addEventListener("focus",this._onFocus,{passive:!0}),i.addEventListener("blur",this._onBlur,{passive:!0})),n.addEventListener("keyup",this._onKeyUp,{passive:!0}),n.addEventListener("input",this._onInput,{passive:!0}),n.addEventListener("focus",this._onFocus,{passive:!0}),n.addEventListener("blur",this._onBlur,{passive:!0}),n.form&&n.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},t.prototype._removeEventListeners=function(){var e=this._docRoot,i=this.containerOuter.element,n=this.input.element;e.removeEventListener("touchend",this._onTouchEnd,!0),i.removeEventListener("keydown",this._onKeyDown,!0),i.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(i.removeEventListener("focus",this._onFocus),i.removeEventListener("blur",this._onBlur)),n.removeEventListener("keyup",this._onKeyUp),n.removeEventListener("input",this._onInput),n.removeEventListener("focus",this._onFocus),n.removeEventListener("blur",this._onBlur),n.form&&n.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},t.prototype._onKeyDown=function(e){var i=e.keyCode,n=this.dropdown.isActive,r=e.key.length===1||e.key.length===2&&e.key.charCodeAt(0)>=55296||e.key==="Unidentified";switch(!this._isTextElement&&!n&&i!==Y.ESC_KEY&&i!==Y.TAB_KEY&&i!==Y.SHIFT_KEY&&(this.showDropdown(),!this.input.isFocussed&&r&&(this.input.value+=e.key,e.key===" "&&e.preventDefault())),i){case Y.A_KEY:return this._onSelectKey(e,this.itemList.element.hasChildNodes());case Y.ENTER_KEY:return this._onEnterKey(e,n);case Y.ESC_KEY:return this._onEscapeKey(e,n);case Y.UP_KEY:case Y.PAGE_UP_KEY:case Y.DOWN_KEY:case Y.PAGE_DOWN_KEY:return this._onDirectionKey(e,n);case Y.DELETE_KEY:case Y.BACK_KEY:return this._onDeleteKey(e,this._store.items,this.input.isFocussed)}},t.prototype._onKeyUp=function(){this._canSearch=this.config.searchEnabled},t.prototype._onInput=function(){var e=this.input.value;if(!e){this._isTextElement?this.hideDropdown(!0):this._stopSearch();return}this._canAddItems()&&(this._canSearch&&this._handleSearch(e),this._canAddUserChoices&&(this._canCreateItem(e),this._isSelectElement&&(this._highlightPosition=0,this._highlightChoice())))},t.prototype._onSelectKey=function(e,i){if((e.ctrlKey||e.metaKey)&&i){this._canSearch=!1;var n=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;n&&this.highlightAll()}},t.prototype._onEnterKey=function(e,i){var n=this,r=this.input.value,s=e.target;if(e.preventDefault(),s&&s.hasAttribute("data-button")){this._handleButtonAction(s);return}if(!i){(this._isSelectElement||this._notice)&&this.showDropdown();return}var o=this.dropdown.element.querySelector(Fe(this.config.classNames.highlightedState));if(!(o&&this._handleChoiceAction(o))){if(!s||!r){this.hideDropdown(!0);return}if(this._canAddItems()){var l=!1;this._store.withTxn(function(){if(l=n._findAndSelectChoiceByValue(r,!0),!l){if(!n._canAddUserChoices||!n._canCreateItem(r))return;n._addChoice(ae(r,!1,n.config.allowHtmlUserInput),!0,!0),l=!0}n.clearInput(),n.unhighlightAll()}),l&&(this._triggerChange(r),this.config.closeDropdownOnSelect&&this.hideDropdown(!0))}}},t.prototype._onEscapeKey=function(e,i){i&&(e.stopPropagation(),this.hideDropdown(!0),this._stopSearch(),this.containerOuter.element.focus())},t.prototype._onDirectionKey=function(e,i){var n=e.keyCode;if(i||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var r=n===Y.DOWN_KEY||n===Y.PAGE_DOWN_KEY?1:-1,s=e.metaKey||n===Y.PAGE_DOWN_KEY||n===Y.PAGE_UP_KEY,o=void 0;if(s)r>0?o=this.dropdown.element.querySelector("".concat(Re,":last-of-type")):o=this.dropdown.element.querySelector(Re);else{var l=this.dropdown.element.querySelector(Fe(this.config.classNames.highlightedState));l?o=er(l,Re,r):o=this.dropdown.element.querySelector(Re)}o&&(tr(o,this.choiceList.element,r)||this.choiceList.scrollToChildElement(o,r),this._highlightChoice(o)),e.preventDefault()}},t.prototype._onDeleteKey=function(e,i,n){!this._isSelectOneElement&&!e.target.value&&n&&(this._handleBackspace(i),e.preventDefault())},t.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},t.prototype._onTouchEnd=function(e){var i=(e||e.touches[0]).target,n=this._wasTap&&this.containerOuter.element.contains(i);if(n){var r=i===this.containerOuter.element||i===this.containerInner.element;r&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()}this._wasTap=!0},t.prototype._onMouseDown=function(e){var i=e.target;if(i instanceof HTMLElement){if(ps&&this.choiceList.element.contains(i)){var n=this.choiceList.element.firstElementChild;this._isScrollingOnIe=this._direction==="ltr"?e.offsetX>=n.offsetWidth:e.offsetX<n.offsetLeft}if(i!==this.input.element){var r=i.closest("[data-button],[data-item],[data-choice]");r instanceof HTMLElement&&("button"in r.dataset?this._handleButtonAction(r):"item"in r.dataset?this._handleItemAction(r,e.shiftKey):"choice"in r.dataset&&this._handleChoiceAction(r)),e.preventDefault()}}},t.prototype._onMouseOver=function(e){var i=e.target;i instanceof HTMLElement&&"choice"in i.dataset&&this._highlightChoice(i)},t.prototype._onClick=function(e){var i=e.target,n=this.containerOuter,r=n.element.contains(i);r?!this.dropdown.isActive&&!n.isDisabled?this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),n.element.focus()):this._isSelectOneElement&&i!==this.input.element&&!this.dropdown.element.contains(i)&&this.hideDropdown():(n.removeFocusState(),this.hideDropdown(!0),this.unhighlightAll())},t.prototype._onFocus=function(e){var i=e.target,n=this.containerOuter,r=i&&n.element.contains(i);if(r){var s=i===this.input.element;this._isTextElement?s&&n.addFocusState():this._isSelectMultipleElement?s&&(this.showDropdown(!0),n.addFocusState()):(n.addFocusState(),s&&this.showDropdown(!0))}},t.prototype._onBlur=function(e){var i=e.target,n=this.containerOuter,r=i&&n.element.contains(i);r&&!this._isScrollingOnIe?i===this.input.element?(n.removeFocusState(),this.hideDropdown(!0),(this._isTextElement||this._isSelectMultipleElement)&&this.unhighlightAll()):i===this.containerOuter.element&&(n.removeFocusState(),this._canSearch||this.hideDropdown(!0)):(this._isScrollingOnIe=!1,this.input.element.focus())},t.prototype._onFormReset=function(){var e=this;this._store.withTxn(function(){e.clearInput(),e.hideDropdown(),e.refresh(!1,!1,!0),e._initialItems.length&&e.setChoiceByValue(e._initialItems)})},t.prototype._highlightChoice=function(e){e===void 0&&(e=null);var i=Array.from(this.dropdown.element.querySelectorAll(Re));if(i.length){var n=e,r=this.config.classNames.highlightedState,s=Array.from(this.dropdown.element.querySelectorAll(Fe(r)));s.forEach(function(o){le(o,r),o.setAttribute("aria-selected","false")}),n?this._highlightPosition=i.indexOf(n):(i.length>this._highlightPosition?n=i[this._highlightPosition]:n=i[i.length-1],n||(n=i[0])),x(n,r),n.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(te.highlightChoice,{el:n}),this.dropdown.isActive&&(this.input.setActiveDescendant(n.id),this.containerOuter.setActiveDescendant(n.id))}},t.prototype._addItem=function(e,i,n){if(i===void 0&&(i=!0),n===void 0&&(n=!1),!e.id)throw new TypeError("item.id must be set before _addItem is called for a choice/item");(this.config.singleModeForMultiSelect||this._isSelectOneElement)&&this.removeActiveItems(e.id),this._store.dispatch(mi(e)),i&&(this.passedElement.triggerEvent(te.addItem,this._getChoiceForOutput(e)),n&&this.passedElement.triggerEvent(te.choice,this._getChoiceForOutput(e)))},t.prototype._removeItem=function(e){if(e.id){this._store.dispatch(gi(e));var i=this._notice;i&&i.type===W.noChoices&&this._clearNotice(),this.passedElement.triggerEvent(te.removeItem,this._getChoiceForOutput(e))}},t.prototype._addChoice=function(e,i,n){if(i===void 0&&(i=!0),n===void 0&&(n=!1),e.id)throw new TypeError("Can not re-add a choice which has already been added");var r=this.config;if(!(!r.duplicateItemsAllowed&&this._store.choices.find(function(l){return r.valueComparer(l.value,e.value)}))){this._lastAddedChoiceId++,e.id=this._lastAddedChoiceId,e.elementId="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(e.id);var s=r.prependValue,o=r.appendValue;s&&(e.value=s+e.value),o&&(e.value+=o.toString()),(s||o)&&e.element&&(e.element.value=e.value),this._clearNotice(),this._store.dispatch(pi(e)),e.selected&&this._addItem(e,i,n)}},t.prototype._addGroup=function(e,i){var n=this;if(i===void 0&&(i=!0),e.id)throw new TypeError("Can not re-add a group which has already been added");this._store.dispatch(Jn(e)),e.choices&&(this._lastAddedGroupId++,e.id=this._lastAddedGroupId,e.choices.forEach(function(r){r.group=e,e.disabled&&(r.disabled=!0),n._addChoice(r,i)}))},t.prototype._createTemplates=function(){var e=this,i=this.config.callbackOnCreateTemplates,n={};typeof i=="function"&&(n=i.call(this,ir,Yt,at));var r={};Object.keys(this._templates).forEach(function(s){s in n?r[s]=n[s].bind(e):r[s]=e._templates[s].bind(e)}),this._templates=r},t.prototype._createElements=function(){var e=this._templates,i=this,n=i.config,r=i._isSelectOneElement,s=n.position,o=n.classNames,l=this._elementType;this.containerOuter=new _i({element:e.containerOuter(n,this._direction,this._isSelectElement,r,n.searchEnabled,l,n.labelId),classNames:o,type:l,position:s}),this.containerInner=new _i({element:e.containerInner(n),classNames:o,type:l,position:s}),this.input=new ur({element:e.input(n,this._placeholderValue),classNames:o,type:l,preventPaste:!n.paste}),this.choiceList=new yi({element:e.choiceList(n,r)}),this.itemList=new yi({element:e.itemList(n,r)}),this.dropdown=new cr({element:e.dropdown(n),classNames:o,type:l})},t.prototype._createStructure=function(){var e=this,i=e.containerInner,n=e.containerOuter,r=e.passedElement,s=this.dropdown.element;r.conceal(),i.wrap(r.element),n.wrap(i.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":(this._placeholderValue&&(this.input.placeholder=this._placeholderValue),this.input.setWidth()),n.element.appendChild(i.element),n.element.appendChild(s),i.element.appendChild(this.itemList.element),s.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&s.insertBefore(this.input.element,s.firstChild):i.element.appendChild(this.input.element),this._highlightPosition=0,this._isSearching=!1},t.prototype._initStore=function(){var e=this;this._store.subscribe(this._render).withTxn(function(){e._addPredefinedChoices(e._presetChoices,e._isSelectOneElement&&!e._hasNonChoicePlaceholder,!1)}),(!this._store.choices.length||this._isSelectOneElement&&this._hasNonChoicePlaceholder)&&this._render()},t.prototype._addPredefinedChoices=function(e,i,n){var r=this;if(i===void 0&&(i=!1),n===void 0&&(n=!0),i){var s=e.findIndex(function(o){return o.selected})===-1;s&&e.some(function(o){return o.disabled||"choices"in o?!1:(o.selected=!0,!0)})}e.forEach(function(o){"choices"in o?r._isSelectElement&&r._addGroup(o,n):r._addChoice(o,n)})},t.prototype._findAndSelectChoiceByValue=function(e,i){var n=this;i===void 0&&(i=!1);var r=this._store.choices.find(function(s){return n.config.valueComparer(s.value,e)});return r&&!r.disabled&&!r.selected?(this._addItem(r,!0,i),!0):!1},t.prototype._generatePlaceholderValue=function(){var e=this.config;if(!e.placeholder)return null;if(this._hasNonChoicePlaceholder)return e.placeholderValue;if(this._isSelectElement){var i=this.passedElement.placeholderOption;return i?i.text:null}return null},t.prototype._warnChoicesInitFailed=function(e){if(!this.config.silent)if(this.initialised){if(!this.initialisedOK)throw new TypeError("".concat(e," called for an element which has multiple instances of Choices initialised on it"))}else throw new TypeError("".concat(e," called on a non-initialised instance of Choices"))},t.version="11.1.0",t}();
1$(document).ready(function(){var t=$('[data-slider-type="alternative"]');t.length&&i();var e=$('[data-slider-type="normal"]');e.length&&n();function i(){$('[data-slider-type="alternative"]').each(function(c){var u=$(this),f=u.find(".splide__list");if(!u.length||!f.length){console.warn("Alternative slider elements not found");return}var p=Array.from(f[0].children),m=u.data("no-shuffle")===!0||u.data("no-shuffle")==="true";m||r(f,p);var g=new Splide(this,{type:"loop",perPage:4.5,perMove:1,pagination:!1,gap:"2rem",breakpoints:{992:{perPage:3.5},768:{perPage:2.5},479:{perPage:1.5}}});g.mount()})}function n(){$('[data-slider-type="normal"]').each(function(c){var u=$(this),f=u.find(".splide__list");if(!u.length||!f.length){console.warn("Normal slider elements not found");return}var p=Array.from(f[0].children),m=u.data("no-shuffle")===!0||u.data("no-shuffle")==="true";m||r(f,p);var g=new Splide(this,{type:"slide",perPage:4,perMove:1,pagination:!1,gap:"2rem",breakpoints:{992:{perPage:3},768:{perPage:2},479:{perPage:1}}});g.mount()})}function r(c,u){c.empty();for(var f=u.slice(),p=f.length-1;p>0;p--){var m=Math.floor(Math.random()*(p+1)),g=f[p];f[p]=f[m],f[m]=g}f.forEach(function(b){c.append(b)})}window.choicesInstances=[];function s(){$(".choices-select").each(function(){var c=this,u=$(c),f=u.data("no-sort")===1||u.data("no-sort")==="1",p=new Choices(c,{removeItemButton:!0,shouldSort:!f,shouldSortItems:!1,placeholder:!0,placeholderValue:u.data("placeholder")||"Choose options...",searchPlaceholderValue:u.data("search-placeholder")||"Search options...",searchEnabled:!0,searchFields:["label"],itemSelectText:"",classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"}});window.choicesInstances.push({element:c,choices:p}),c.addEventListener("choice",function(m){o($(c).closest(".filters-dropdown, .filter-panel"))}),c.addEventListener("removeItem",function(m){o($(c).closest(".filters-dropdown, .filter-panel"))})})}$(".filters-dropdown, .filter-panel").each(function(){o($(this))}),s();function o(c){if(!(!c||!c.length)){var u=c.find("> .dropdown-toggle .checkbox-count, > .filter-panel_heading .checkbox-count").first();u.length||(u=c.find(".checkbox-count").first());var f=c.find("select.choices-select").first();if(f.length&&u.length){var p=f.val()?f.val().length:0;p>0?u.css("display","flex").text(p):u.hide()}var m=$("#total-checkbox-count, .total-checkbox-count").first(),g=0;$(".choices-select").each(function(){var b=$(this).val();g+=b?b.length:0}),g===0?m.hide():m.css("display","flex").text(g)}}$("#reset-form").on("click",function(){window.choicesInstances.forEach(function(u){u.choices&&typeof u.choices.removeActiveItems=="function"&&u.choices.removeActiveItems()}),$(".choices-select").each(function(){$(this).val([]).trigger("change")}),$("#inline-search").val(""),$(".checkbox-count").hide();var c=$("#total-checkbox-count");c.hide(),c.text("")}),$("#search-button").on("click",function(){$(".search-panel").addClass("is-open"),$("body").addClass("no-scroll"),$("#search-input").focus()}),$("#close-search").on("click",function(){$(".search-panel").removeClass("is-open"),$(".search-results").removeClass("is-open"),$("body").removeClass("no-scroll"),$("#search-input").val("")}),$("#clear-search-input").on("click",function(){$("#search-input").val(""),$("#search-input").focus()}),$("#search-input").on("input",function(){$("#search-input").val().trim()!==""?$(".search-results").addClass("is-open"):$(".search-results").removeClass("is-open")}),$("#menu-button").on("click",function(){$("body").toggleClass("no-scroll")}),$(document).on("keydown",function(c){c.keyCode===27&&l()}),$(document).on("pointerdown touchstart",function(c){if($(".search-panel").hasClass("is-open")){var u=$(c.target);u.closest(".search-panel").length||u.is("#search-button")||u.closest("#search-button").length||u.is("#search-input")||u.closest("#search-input").length||u.is("#clear-search-input")||u.closest("#clear-search-input").length||l()}});function l(){$(".search-panel").removeClass("is-open"),$("body").removeClass("no-scroll"),$("#search-input").val(""),$(".search-results").removeClass("is-open")}});document.addEventListener("sprig:request:success",function(t){setTimeout(function(){window.choicesInstances&&(window.choicesInstances.forEac
1h(function(e){e.choices&&typeof e.choices.destroy=="function"&&e.choices.destroy()}),window.choicesInstances=[]),vs()},100)});function vs(){window.choicesInstances||(window.choicesInstances=[]),$(".choices-select").each(function(){var t=this,e=$(t),i=window.choicesInstances.some(function(s){return s.element===t});if(!i){var n=e.data("no-sort")===1||e.data("no-sort")==="1",r=new Choices(t,{removeItemButton:!0,shouldSort:!n,shouldSortItems:!1,placeholder:!0,placeholderValue:e.data("placeholder")||"Choose options...",searchPlaceholderValue:e.data("search-placeholder")||"Search options...",searchEnabled:!0,searchFields:["label"],itemSelectText:"",classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"}});window.choicesInstances.push({element:t,choices:r}),t.addEventListener("choice",function(s){r.hideDropdown(),Ti($(t).closest(".filters-dropdown, .filter-panel"))}),t.addEventListener("removeItem",function(s){Ti($(t).closest(".filters-dropdown, .filter-panel"))})}})}function Ti(t){if(!(!t||!t.length)){var e=t.find("> .dropdown-toggle .checkbox-count, > .filter-panel_heading .checkbox-count").first();e.length||(e=t.find(".checkbox-count").first());var i=t.find("select.choices-select").first();if(i.length&&e.length){var n=i.val()?i.val().length:0;n>0?e.css("display","flex").text(n):e.hide()}var r=$("#total-checkbox-count, .total-checkbox-count").first(),s=0;$(".choices-select").each(function(){var o=$(this).val();s+=o?o.length:0}),s===0?r.hide():r.css("display","flex").text(s)}}document.addEventListener("DOMContentLoaded",function(){window.dataLayer=window.dataLayer||[];function t(){dataLayer.push(arguments)}console.log("DOM Content Loaded. Setting default consent..."),t("consent","default",{analytics_storage:"denied",ad_storage:"denied",wait_for_update:500}),console.log("Default consent set. Calling loadGoogleTagManager..."),o(),console.log("Returned from loadGoogleTagManager call. Checking local storage...");const e=localStorage.getItem("cookieConsent");if(e)try{const l=JSON.parse(e),c=new Date(l.timestamp),u=new Date,f=365*24*60*60*1e3;if(u-c<f){l.accepted?s(!0):s(!1);return}localStorage.removeItem("cookieConsent")}catch{localStorage.removeItem("cookieConsent")}e?console.log("Valid consent found and applied. Banner not shown."):(console.log("No valid consent found or expired. Showing banner..."),i());function i(){const l=document.getElementById("cookie-consent-banner");if(l){l.style.display="block";const c=document.getElementById("cookie-accept"),u=document.getElementById("cookie-reject");c&&c.addEventListener("click",function(){r(!0),n()}),u&&u.addEventListener("click",function(){r(!1),n()})}}function n(){const l=document.getElementById("cookie-consent-banner");l&&(l.style.display="none")}function r(l){s(l),localStorage.setItem("cookieConsent",JSON.stringify({accepted:l,timestamp:new Date().toISOString()}))}function s(l){const c={analytics_storage:l?"granted":"denied",ad_storage:l?"granted":"denied"};t("consent","update",c),console.log("GTM Consent Updated:",c)}function o(){if(console.log("Inside loadGoogleTagManager function."),window.gtmLoaded){console.log("GTM already loaded, exiting loadGoogleTagManager.");return}window.gtmLoaded=!0,console.log("Setting gtmLoaded flag to true."),console.log("Attempting to inject GTM script..."),function(u,f,p,m,g){u[m]=u[m]||[],u[m].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var b=f.getElementsByTagName(p)[0],_=f.createElement(p),A="";_.async=!0,_.src="https://www.googletagmanager.com/gtm.js?id="+g+A,b.parentNode.insertBefore(_,b),console.log("GTM script injected.")}
1(window,document,"script","dataLayer","GTM-W8C385V"),console.log("Attempting to inject GTM noscript...");const l=document.createElement("noscript"),c=document.createElement("iframe");c.src="https://www.googletagmanager.com/ns.html?id=GTM-W8C385V",c.height="0",c.width="0",c.style.display="none",c.style.visibility="hidden",l.appendChild(c),document.body?(document.body.insertBefore(l,document.body.firstChild),console.log("GTM noscript injected.")):(console.log("Document body not found immediately, adding load listener for noscript."),document.addEventListener("load",()=>{document.body.insertBefore(l,document.body.firstChild),console.log("GTM noscript injected after load event.")}))}});let R=null,Tt=[],_e=[],tt="",we="",Pt=!1,P=null;function kt(){const t=document.getElementById("accommodation-map-data");if(!t)return{items:null,found:!1};try{const e=JSON.parse(t.textContent.trim());_e=Array.isArray(e.items)?e.items:[],console.debug("[AccomMap] dataset items:",_e.length)}catch(e){console.warn("[AccomMap] Failed to parse accommodation map data",e),_e=[]}return{items:_e,found:!0}}function Pi(){Tt.forEach(t=>t.remove()),Tt=[]}function Ve(t,e){if(console.debug("[AccomMap] fitBounds called with",e.length,"points"),!e.length){console.debug("[AccomMap] Setting default national view"),t.setCenter([-8.5,39.5]),t.setZoom(6);return}if(e.length===1){console.debug("[AccomMap] Single point, centering at",e[0].lng,e[0].lat),t.setCenter([e[0].lng,e[0].lat]),t.setZoom(12);return}const i=new maplibregl.LngLatBounds;e.forEach(n=>i.extend([n.lng,n.lat])),console.debug("[AccomMap] Fitting bounds for",e.length,"points"),t.fitBounds(i,{padding:40,animate:!1})}function Dt(t){return t.map(e=>e.id).join(",")}function bs(){if(R)return P||(P=document.createElement("div"),P.id="accommodation-map-empty",P.style.position="absolute",P.style.top="0",P.style.left="0",P.style.right="0",P.style.bottom="0",P.style.display="flex",P.style.alignItems="center",P.style.justifyContent="center",P.style.padding="2rem",P.style.textAlign="center",P.style.background="rgba(255,255,255,0.85)",P.style.backdropFilter="blur(2px)",P.style.fontSize="1rem",P.style.lineHeight="1.4",P.style.color="#222",P.style.fontFamily="inherit",P.innerHTML="No accommodation with your search criteria was found. Please try again using different filters.",R.getContainer().appendChild(P)),P}function Nt(t){bs(),P&&(P.style.display=t?"flex":"none")}function an(){const t=document.getElementById("accommodation-map");if(!t)return;if(!window.maplibregl){console.warn("MapLibre GL not loaded");return}R||(it(!1),!kt().found)||(R=new maplibregl.Map({container:t,style:"https://api.maptiler.com/maps/01975567-e47a-79a6-8d25-0b40808a34e3/style.json?key=AdFWskAQwunr979rjeXd",center:[-8.5,39.5],zoom:6,localFontFamily:"Aestetico, sans-serif"}),R.addControl(new maplibregl.FullscreenControl),R.addControl(new maplibregl.NavigationControl),R.scrollZoom.enable(),["dragstart","zoomstart","pitchstart","rotatestart"].forEach(i=>{R.on(i,()=>{Pt=!0})}),R.on("load",()=>{Ft(_e),Ve(R,_e),we=Dt(_e),Nt(!_e.length),setTimeout(()=>it(!0),50)}))}function it(t=!0){const e=document.getElementById("accommodation-map-data");console.debug("[AccomMap] Update called, script element found:",!!e,"refit:",t);let i=e?e.getAttribute("data-endpoint"):"";if(!i&&e){const c=e.getAttribute("data-params");if(c)try{const u=JSON.parse(c);i="/map/places?"+new URLSearchParams(u).toString(),console.debug("[AccomMap] Constructed endpoint from params:",i)}catch(u){console.warn("[AccomMap] Failed to parse params:",u)}}if(i&&i!==tt){tt=i,console.debug("[AccomMap] Fetch",i),fetch(i,{headers:{Accept:"application/json"}}).then(c=>c.ok?c.json():{items:[]}).then(c=>{var _;console.debug("[AccomMap] Fetched data:",((_=c==null?void 0:c.items)==null?void 0:_.length)||0,"items");const u=document.getElementById("accommodation-map-data");u&&(u.textContent=JSON.stringify(c||{items:[]}));const f=kt();if(!f.found||!R)return;const p=f.items||[],m=Dt(p),g=m!==we;if(console.debug("[AccomMap] Processing fetched data:",p.length,"items, changed:",g,"refit:",t,"userMoved:",Pt),Pi(),Ft(p),Nt(!p.length),!p.length){g&&Ve(R,[]),we=m;return}t&&g&&(console.debug("[AccomMap] Refitting bounds for new search results"),Ve(R,p)),we=m}).catch(c=>{console.error("[AccomMap] Fetch error",c)});return}const n=kt();if(!n.found){console.debug("[AccomMap] Script element not found or not ready");return}if(!R){an();return}const r=n.items||[],s=Dt(r),o=s!==we;if(console.debug("[AccomMap] Processing",r.length,"items, changed:",o,"refit:",t,"userMoved:",Pt),Pi(),Ft(r),Nt(!r.length),!r.length){o&&Ve(R,[]),we=s;return}t&&o&&(console.debug("[AccomMap] Refitting bounds for new search results"),Ve(R,r)),we=s}function Ft(t){if(!window.maplibregl||!R)return;const e=i=>String(i||"").replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]);t.forEach(i=>
1{if(typeof i.lat!="number"||typeof i.lng!="number")return;const n=new maplibregl.Marker({color:"#F65936",scale:.75}).setLngLat([i.lng,i.lat]).addTo(R),r=[];i.type&&r.push(e(i.type)),i.classification&&r.push(e(i.classification));const s=r.join(" â "),o=i.image?`<div class="popup-card_image"><img src="${e(i.image)}" alt="${e(i.title)}" loading="lazy" /></div>`:"",l=` 2 <article class="popup-card"> 3 <a class="popup-card_link" href="${e(i.url)}"> 4 ${o} 5 <div class="popup-card_content"> 6 ${s?`<div class="tag color_accent">${s}</div>`:""} 7 <h3 class="heading_xs">${e(i.title)}</h3> 8 </div> 9 </a> 10 </article>`,c=new maplibregl.Popup({closeOnClick:!0,className:"accommodation-popup",offset:20}).setHTML(l);n.setPopup(c),Tt.push(n)})}function _s(){const t=document.querySelector('[data-w-tab="map"]');t&&t.addEventListener("click",()=>{setTimeout(()=>{R||an(),R&&(R.resize(),it(!0))},30)})}function ys(){const t=()=>{setTimeout(()=>{document.querySelector('[data-w-tab="map"].w--tab-active'),tt&&(console.debug("[AccomMap] Forcing refresh after Sprig event"),tt=""),it(!0)},50)};document.body.addEventListener("htmx:afterSwap",t),document.body.addEventListener("sprig:afterRender",t)}function ki(){_s(),ys()}document.readyState!=="loading"?ki():document.addEventListener("DOMContentLoaded",ki);let z=null,Rt=[],Me=[],Di="",Je="",Ze="",he=null;function ln(){const t=document.getElementById("things-to-do-map-data");if(!t)return{items:null,found:!1};try{const e=JSON.parse(t.textContent.trim());Me=(Array.isArray(e.items)?e.items:[]).map(n=>{const r=typeof n.lat=="number"?n.lat:parseFloat(String(n.lat).replace(",",".")),s=typeof n.lng=="number"?n.lng:parseFloat(String(n.lng).replace(",","."));return{...n,lat:r,lng:s}}),console.log("[ThingsMap] dataset items:",Me.length)}catch(e){console.warn("Failed to parse things-to-do map data",e),Me=[]}return{items:Me,found:!0}}function Es(){Rt.forEach(t=>t.remove()),Rt=[]}function $t(t,e){const i=e.filter(r=>Number.isFinite(r.lat)&&Number.isFinite(r.lng));if(!i.length){t.setCenter([-8.5,39.5]),t.setZoom(6),Ze="";return}if(i.length===1){t.setCenter([i[0].lng,i[0].lat]),t.setZoom(12),Ze=Be(i);return}const n=new maplibregl.LngLatBounds;i.forEach(r=>n.extend([r.lng,r.lat])),t.fitBounds(n,{padding:40,animate:!1}),Ze=Be(i)}function Be(t){return t.map(e=>e.id).join(",")}function Ss(){if(z)return he||(he=document.createElement("div"),he.id="things-to-do-map-empty",Object.assign(he.style,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center",background:"rgba(255,255,255,0.85)",backdropFilter:"blur(2px)",fontSize:"1rem",lineHeight:"1.4",color:"#222",fontFamily:"inherit"}),he.innerHTML="No activities were found",z.getContainer().appendChild(he)),he}function cn(t){Ss(),he&&(he.style.display=t?"flex":"none")}function un(){const t=document.getElementById("things-to-do-map");if(!t)return;if(!window.maplibregl){console.warn("MapLibre GL not loaded");return}z||!ln().found||(z=new maplibregl.Map({container:t,style:"https://api.maptiler.com/maps/01975567-e47a-79a6-8d25-0b40808a34e3/style.json?key=AdFWskAQwunr979rjeXd",center:[-8.5,39.5],zoom:6,localFontFamily:"Aestetico, sans-serif"}),z.addControl(new maplibregl.FullscreenControl),z.addControl(new maplibregl.NavigationControl),z.scrollZoom.enable(),["dragstart","zoomstart","pitchstart","rotatestart"].forEach(i=>z.on(i,()=>{})),z.on("load",()=>{const i=Me.filter(n=>Number.isFinite(n.lat)&&Number.isFinite(n.lng));hn(i),$t(z,i),Je=Be(Me),cn(!Me.length),setTimeout(()=>Jt(!0),50)}))}let Xe=!1;function Jt(t=!0){const e=document.getElementById("things-to-do-map-data");let i=e?e.getAttribute("data-endpoint"):"";if(!i&&e){const s=e.getAttribute("data-params");if(s)try{const o=JSON.parse(s);i="/map/things?"+new URLSearchParams(o).toString()}catch(o){console.error("[ThingsMap] Bad data-params JSON",o)}}const n=e?e.textContent.trim():"";if(i&&(i!==Di||(!n||n===""||n==='{"items":[]}'))&&!Xe){Di=i,Xe=!0,console.log("[ThingsMap] Fetch",i),fetch(i,{headers:{Accept:"application/json"}}).then(s=>s.ok?s.json():{items:[]}).then(s=>{const o=document.getElementById("things-to-do-map-data");o&&(o.textContent=JSON.stringify(s||{items:[]})),Xe=!1,Ni(t)}).catch(s=>{console.error("[ThingsMap] Fetch error",s),Xe=!1});return}Ni(t)}function Ni(t=!0){const e=ln();if(!e.found)return;if(!z){un();return}const i=e.items||[],n=i.filter(l=>Number.isFinite(l.lat)&&Number.isFinite(l.lng)),r=Be(i),s=r!==Je;if(Es(),hn(n),cn(!i.length),!i.length){s&&t&&$t(z,[]),Je=r;return}t&&(s||Ze!==Be(n))&&$t(z,n),Je=r}function hn(t){if(!window.maplibregl||!z)return;const e=n=>String(n||"").replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r]),i={poi:"#1E90FF",articles:"#FF8C00",tours:"#32CD32",entities:"#8A2BE2"};t.forEach(n=>{const r=typeof n.lat=="number"?n.lat:parseFloat(n.lat),s=typeof n.lng=="number"?n.lng:parseFloat(n.lng);if(!Number.isFinite(r)||!Number.isFinite(s))return;const o=i[n.section]||n.color||"#F65936",l=new maplibregl.Marker({color:o,scale:.75}).setLngLat([s,r]).addTo(z);let c="";const u=n.category?e(n.category):"";n.section==="tours"?c=u?`${u} â Tour`:"Tour":u&&(c=u);const f=n.image?`<div class="popup-card_image"><img src="${e(n.image)}" alt="${e(n.title)}" loading="lazy" /></div>`:"",p=` 11 <article class="popup-card"> 12 <a class="popup-card_link" href="${e(n.url)}"> 13 ${f} 14 <div class="popup-card_content"> 15 ${c?`<div class="tag color_accent">${c}</div>`:""} 16 <h3 class="heading_xs">${e(n.title)}</h3> 17 </div> 18 </a> 19 </article>`,m=new maplibregl.Popup({closeOnClick:!0,className:"accommodation-
19popup",offset:20}).setHTML(p);l.setPopup(m),Rt.push(l)})}function Cs(){const t=document.querySelector('[data-w-tab="map"]');t&&t.addEventListener("click",()=>{setTimeout(()=>{z||un(),z&&(z.resize(),Jt(!0))},30)})}function ws(){const t=()=>{const e=document.querySelector('[data-w-tab="map"].w--tab-active');Jt(!!e)};document.body.addEventListener("htmx:afterSwap",t),document.body.addEventListener("sprig:afterRender",t)}function Fi(){Cs(),ws()}document.readyState!=="loading"?Fi():document.addEventListener("DOMContentLoaded",Fi);let ne=null,Vt=[],jt="";function dn(){const t=document.getElementById("destinations-map-data");if(!t)return[];try{const e=JSON.parse(t.textContent.trim());return(Array.isArray(e.items)?e.items:[]).map(n=>{const r=typeof n.lat=="number"?n.lat:parseFloat(String(n.lat).replace(",",".")),s=typeof n.lng=="number"?n.lng:parseFloat(String(n.lng).replace(",","."));return{...n,lat:r,lng:s}})}catch(e){return console.warn("[DestinationsMap] Failed to parse dataset",e),[]}}function fn(t){return t.map(e=>e.id).join(",")}function As(){Vt.forEach(t=>t.remove()),Vt=[]}function pn(t,e){const i=e.filter(r=>Number.isFinite(r.lat)&&Number.isFinite(r.lng));if(!i.length){t.setCenter([-8.5,39.5]),t.setZoom(6);return}if(i.length===1){t.setCenter([i[0].lng,i[0].lat]),t.setZoom(10);return}const n=new maplibregl.LngLatBounds;i.forEach(r=>n.extend([r.lng,r.lat])),t.fitBounds(n,{padding:40,animate:!1})}function mn(t){if(!ne)return;const e=i=>String(i||"").replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]);t.forEach(i=>{if(!Number.isFinite(i.lat)||!Number.isFinite(i.lng))return;const n=new maplibregl.Marker({color:"#F65936",scale:.75}).setLngLat([i.lng,i.lat]).addTo(ne),r=i.image?`<div class="popup-card_image"><img src="${e(i.image)}" alt="${e(i.title)}" loading="lazy" /></div>`:"",s=i.type?`<div class="tag color_accent">${e(i.type)}</div>`:"",o=`<article class="popup-card"><a class="popup-card_link" href="${e(i.url)}">${r}<div class="popup-card_content">${s}<h3 class="heading_xs">${e(i.title)}</h3></div></a></article>`,l=new maplibregl.Popup({closeOnClick:!0,className:"accommodation-popup",offset:20}).setHTML(o);n.setPopup(l),Vt.push(n)})}function gn(){if(ne)return;const t=document.getElementById("destinations-map");if(!t)return;if(!window.maplibregl){console.warn("[DestinationsMap] maplibregl not found");return}const e=dn();ne=new maplibregl.Map({container:t,style:"https://api.maptiler.com/maps/01975567-e47a-79a6-8d25-0b40808a34e3/style.json?key=AdFWskAQwunr979rjeXd",center:[-8.5,39.5],zoom:6,localFontFamily:"Aestetico, sans-serif"}),ne.addControl(new maplibregl.FullscreenControl),ne.addControl(new maplibregl.NavigationControl),ne.scrollZoom.enable(),ne.on("load",()=>{mn(e),pn(ne,e),jt=fn(e)})}function xs(){const t=document.querySelector('[data-w-tab="map"]');t&&t.addEventListener("click",()=>{setTimeout(()=>{ne||gn(),ne&&ne.resize();const e=dn(),i=fn(e);i!==jt&&ne&&(As(),mn(e),pn(ne,e),jt=i)},30)})}function Ri(){xs(),document.querySelector('[data-w-tab="map"].w--tab-active')&&gn()}document.readyState!=="loading"?Ri():document.addEventListener("DOMContentLoaded",Ri);let V=null,Ht=[],ye=[],nt="",Ae="",Bt=!1,k=null;function Kt(){const t=document.getElementById("mice-venues-map-data");if(!t)return{items:null,found:!1};try{const e=JSON.parse(t.textContent.trim());ye=Array.isArray(e.items)?e.items:[],console.debug("[MiceVenuesMap] dataset items:",ye.length)}catch(e){console.warn("[MiceVenuesMap] Failed to parse MICE venues map data",e),ye=[]}return{items:ye,found:!0}}function $i(){Ht.forEach(t=>t.remove()),Ht=[]}function je(t,e){if(console.debug("[MiceVenuesMap] fitBounds called with",e.length,"points"),!e.length){console.debug("[MiceVenuesMap] Setting default national view"),t.setCenter([-8.5,39.5]),t.setZoom(6);return}if(e.length===1){console.debug("[MiceVenuesMap] Single point, centering at",e[0].lng,e[0].lat),t.setCenter([e[0].lng,e[0].lat]),t.setZoom(12);return}const i=new maplibregl.LngLatBounds;e.forEach(n=>i.extend([n.lng,n.lat])),console.debug("[MiceVenuesMap] Fitting bounds for",e.length,"points"),t.fitBounds(i,{padding:40,animate:!1})}function Ut(t){return t.map(e=>e.id).join(",")}function Is(){if(V)return k||(k=document.createElement("div"),k.id="mice-venues-map-empty",k.style.position="absolute",k.style.top="0",k.style.left="0",k.style.right="0",k.style.bottom="0",k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="center",k.style.padding="2rem",k.style.textAlign="center",k.style.background="rgba(255,255,255,0.85)",k.style.backdropFilter="blur(2px)",k.style.fontSize="1rem",k.style.lineHeight="1.4",k.style.color="#222",k.style.fontFamily="inherit",k.innerHTML="No MICE venues with your search criteria were found. Please try again using different filters.",V.getContainer().appendChild(k)),k}function zt(t){Is(),k&&(k.style.display=t?"flex":"none")}function vn(){const t=document.getElementById("mice-venues-map");if(!t)return;if(!window.maplibregl){console.warn("MapLibre GL not loaded");return}V||(rt(!1),!Kt().found)||(V=new maplibregl.Map({container:t,style:"https://api.maptiler.com/maps/01975567-e47a-79a6-8d25-0b40808a34e3/style.json?key=AdFWskAQwunr979rjeXd",center:[-8.5,39.5],zoom:6,localFontFamily:"Aestetico, sans-serif"}),V.addControl(new maplibregl.FullscreenControl),V.addControl(new maplibregl.NavigationControl),V.scrollZoom.enable(),["dragstart","zoomstart","pitchstart","rotatestart"].forEach(i=>
19{V.on(i,()=>{Bt=!0})}),V.on("load",()=>{Gt(ye),je(V,ye),Ae=Ut(ye),zt(!ye.length),setTimeout(()=>rt(!0),50)}))}function rt(t=!0){const e=document.getElementById("mice-venues-map-data");console.debug("[MiceVenuesMap] Update called, script element found:",!!e,"refit:",t);let i=e?e.getAttribute("data-endpoint"):"";if(!i&&e){const c=e.getAttribute("data-params");if(c)try{const u=JSON.parse(c);i="/map/mice?"+new URLSearchParams(u).toString(),console.debug("[MiceVenuesMap] Constructed endpoint from params:",i)}catch(u){console.warn("[MiceVenuesMap] Failed to parse params:",u)}}if(i&&i!==nt){nt=i,console.debug("[MiceVenuesMap] Fetch",i),fetch(i,{headers:{Accept:"application/json"}}).then(c=>c.ok?c.json():{items:[]}).then(c=>{var _;console.debug("[MiceVenuesMap] Fetched data:",((_=c==null?void 0:c.items)==null?void 0:_.length)||0,"items");const u=document.getElementById("mice-venues-map-data");u&&(u.textContent=JSON.stringify(c||{items:[]}));const f=Kt();if(!f.found||!V)return;const p=f.items||[],m=Ut(p),g=m!==Ae;if(console.debug("[MiceVenuesMap] Processing fetched data:",p.length,"items, changed:",g,"refit:",t,"userMoved:",Bt),$i(),Gt(p),zt(!p.length),!p.length){g&&je(V,[]),Ae=m;return}t&&g&&(console.debug("[MiceVenuesMap] Refitting bounds for new search results"),je(V,p)),Ae=m}).catch(c=>{console.error("[MiceVenuesMap] Fetch error",c)});return}const n=Kt();if(!n.found){console.debug("[MiceVenuesMap] Script element not found or not ready");return}if(!V){vn();return}const r=n.items||[],s=Ut(r),o=s!==Ae;if(console.debug("[MiceVenuesMap] Processing",r.length,"items, changed:",o,"refit:",t,"userMoved:",Bt),$i(),Gt(r),zt(!r.length),!r.length){o&&je(V,[]),Ae=s;return}t&&o&&(console.debug("[MiceVenuesMap] Refitting bounds for new search results"),je(V,r)),Ae=s}function Gt(t){if(!window.maplibregl||!V)return;const e=i=>String(i||"").replace(/[&<>"']/g,n=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[n]);t.forEach(i=>{if(typeof i.lat!="number"||typeof i.lng!="number")return;const n=new maplibregl.Marker({color:"#F65936",scale:.75}).setLngLat([i.lng,i.lat]).addTo(V),r=[];i.rooms&&r.push(e(i.rooms)+" "+(i.rooms===1?"Room":"Rooms")),i.pax&&r.push(e(i.pax)+" PAX");const s=r.join(" â "),o=i.image?`<div class="popup-card_image"><img src="${e(i.image)}" alt="${e(i.title)}" loading="lazy" /></div>`:"",l=` 20 <article class="popup-card"> 21 <a class="popup-card_link" href="${e(i.url)}"> 22 ${o} 23 <div class="popup-card_content"> 24 ${s?`<div class="tag color_accent">${s}</div>`:""} 25 <h3 class="heading_xs">${e(i.title)}</h3> 26 </div> 27 </a> 28 </article>`,c=new maplibregl.Popup({closeOnClick:!0,className:"mice-venues-popup",offset:20}).setHTML(l);n.setPopup(c),Ht.push(n)})}function Ms(){const t=document.querySelector('[data-w-tab="map"]');t&&t.addEventListener("click",()=>{setTimeout(()=>{V||vn(),V&&(V.resize(),rt(!0))},30)})}function Os(){const t=()=>{setTimeout(()=>{document.querySelector('[data-w-tab="map"].w--tab-active'),nt&&(console.debug("[MiceVenuesMap] Forcing refresh after Sprig event"),nt=""),rt(!0)},50)};document.body.addEventListener("htmx:afterSwap",t),document.body.addEventListener("sprig:afterRender",t)}function Vi(){Ms(),Os()}document.readyState!=="loading"?Vi():document.addEventListener("DOMContentLoaded",Vi);var ve;(function(t){t.Range="range",t.Steps="steps",t.Positions="positions",t.Count="count",t.Values="values"})(ve||(ve={}));var J;(function(t){t[t.None=-1]="None",t[t.NoValue=0]="NoValue",t[t.LargeValue=1]="LargeValue",t[t.SmallValue=2]="SmallValue"})(J||(J={}));function Ls(t){return st(t)&&typeof t.from=="function"}function st(t){return typeof t=="object"&&typeof t.to=="function"}function ji(t){t.parentElement.removeChild(t)}function Wt(t){return t!=null}function Hi(t){t.preventDefault()}function Ts(t){return t.filter(function(e){return this[e]?!1:this[e]=!0},{})}function Ps(t,e){return Math.round(t/e)*e}function ks(t,e){var i=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,s=bn(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(s.x=0),e?i.top+s.y-r.clientTop:i.left+s.x-r.clientLeft}function se(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}
28function Bi(t,e,i){i>0&&(X(t,e),setTimeout(function(){Qe(t,e)},i))}function Ki(t){return Math.max(Math.min(t,100),0)}function lt(t){return Array.isArray(t)?t:[t]}function Ds(t){t=String(t);var e=t.split(".");return e.length>1?e[1].length:0}function X(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function Qe(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function Ns(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function bn(t){var e=window.pageXOffset!==void 0,i=(t.compatMode||"")==="CSS1Compat",n=e?window.pageXOffset:i?t.documentElement.scrollLeft:t.body.scrollLeft,r=e?window.pageYOffset:i?t.documentElement.scrollTop:t.body.scrollTop;return{x:n,y:r}}function Fs(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Rs(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch{}return t}function $s(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Zt(t,e){return 100/(e-t)}function qt(t,e,i){return e*100/(t[i+1]-t[i])}function Vs(t,e){return qt(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function js(t,e){return e*(t[1]-t[0])/100+t[0]}function Ke(t,e){for(var i=1;t>=e[i];)i+=1;return i}function Hs(t,e,i){if(i>=t.slice(-1)[0])return 100;var n=Ke(i,t),r=t[n-1],s=t[n],o=e[n-1],l=e[n];return o+Vs([r,s],i)/Zt(o,l)}function Bs(t,e,i){if(i>=100)return t.slice(-1)[0];var n=Ke(i,e),r=t[n-1],s=t[n],o=e[n-1],l=e[n];return js([r,s],(i-o)*Zt(o,l))}function Ks(t,e,i,n){if(n===100)return n;var r=Ke(n,t),s=t[r-1],o=t[r];return i?n-s>(o-s)/2?o:s:e[r-1]?t[r-1]+Ps(n-t[r-1],e[r-1]):n}var _n=function(){function t(e,i,n){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.snap=i;var r,s=[];for(Object.keys(e).forEach(function(o){s.push([lt(e[o]),o])}),s.sort(function(o,l){return o[0][0]-l[0][0]}),r=0;r<s.length;r++)this.handleEntryPoint(s[r][1],s[r][0]);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)this.handleStepPoint(r,this.xNumSteps[r])}return t.prototype.getDistance=function(e){for(var i=[],n=0;n<this.xNumSteps.length-1;n++)i[n]=qt(this.xVal,e,n);return i},t.prototype.getAbsoluteDistance=function(e,i,n){var r=0;if(e<this.xPct[this.xPct.length-1])for(;e>this.xPct[r+1];)r++;else e===this.xPct[this.xPct.length-1]&&(r=this.xPct.length-2);!n&&e===this.xPct[r+1]&&r++,i===null&&(i=[]);var s,o=1,l=i[r],c=0,u=0,f=0,p=0;for(n?s=(e-this.xPct[r])/(this.xPct[r+1]-this.xPct[r]):s=(this.xPct[r+1]-e)/(this.xPct[r+1]-this.xPct[r]);l>0;)c=this.xPct[r+1+p]-this.xPct[r+p],i[r+p]*o+100-s*100>100?(u=c*s,o=(l-100*s)/i[r+p],s=1):(u=i[r+p]*c/100*o,o=0),n?(f=f-u,this.xPct.length+p>=1&&p--):(f=f+u,this.xPct.length-p>=1&&p++),l=i[r+p]*o;return e+f},t.prototype.toStepping=function(e){return e=Hs(this.xVal,this.xPct,e),e},t.prototype.fromStepping=function(e){return Bs(this.xVal,this.xPct,e)},t.prototype.getStep=function(e){return e=Ks(this.xPct,this.xSteps,this.snap,e),e},t.prototype.getDefaultStep=function(e,i,n){var r=Ke(e,this.xPct);return(e===100||i&&e===this.xPct[r-1])&&(r=Math.max(r-1,1)),(this.xVal[r]-this.xVal[r-1])/n},t.prototype.getNearbySteps=function(e){var i=Ke(e,this.xPct);return{stepBefore:{startValue:this.xVal[i-2],step:this.xNumSteps[i-2],highestStep:this.xHighestCompleteStep[i-2]},thisStep:{startValue:this.xVal[i-1],step:this.xNumSteps[i-1],highestStep:this.xHighestCompleteStep[i-1]},stepAfter:{startValue:this.xVal[i],step:this.xNumSteps[i],highestStep:this.xHighestCompleteStep[i]}}},t.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(Ds);return Math.max.apply(null,e)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]}
28,t.prototype.convert=function(e){return this.getStep(this.toStepping(e))},t.prototype.handleEntryPoint=function(e,i){var n;if(e==="min"?n=0:e==="max"?n=100:n=parseFloat(e),!se(n)||!se(i[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(n),this.xVal.push(i[0]);var r=Number(i[1]);n?this.xSteps.push(isNaN(r)?!1:r):isNaN(r)||(this.xSteps[0]=r),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(e,i){if(i){if(this.xVal[e]===this.xVal[e+1]){this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e];return}this.xSteps[e]=qt([this.xVal[e],this.xVal[e+1]],i,0)/Zt(this.xPct[e],this.xPct[e+1]);var n=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],r=Math.ceil(Number(n.toFixed(3))-1),s=this.xVal[e]+this.xNumSteps[e]*r;this.xHighestCompleteStep[e]=s}},t}(),Ui={to:function(t){return t===void 0?"":t.toFixed(2)},from:Number},yn={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},ge={tooltips:".__tooltips",aria:".__aria"};function Us(t,e){if(!se(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function zs(t,e){if(!se(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function Gs(t,e){if(!se(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function Ws(t,e){if(!se(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function qs(t,e){if(typeof e!="object"||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(e.min===void 0||e.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new _n(e,t.snap||!1,t.singleStep)}function Ys(t,e){if(e=lt(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function Xs(t,e){if(typeof e!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function Js(t,e){if(typeof e!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function Zs(t,e){if(typeof e!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function En(t,e){var i=[!1],n;if(e==="lower"?e=[!0,!1]:e==="upper"&&(e=[!1,!0]),e===!0||e===!1){for(n=1;n<t.handles;n++)i.push(e);i.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");i=e}t.connect=i}function Qs(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Sn(t,e){if(!se(e))throw new Error("noUiSlider: 'margin' option must be numeric.");e!==0&&(t.margin=t.spectrum.getDistance(e))}function eo(t,e){if(!se(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function to(t,e){var i;if(!se(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&!(e.length===2||se(e[0])||se(e[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(e!==0){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],i=0;i<t.spectrum.xNumSteps.length-1;i++)if(t.padding[0][i]<0||t.padding[1][i]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=e[0]+e[1],r=t.spectrum.xVal[0],s=t.spectrum.xVal[t.spectrum.xVal.length-1];if(n/(s-r)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function io(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function no(t,e){if(typeof e!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var i=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,r=e.indexOf("fixed")>=0,s=e.indexOf("snap")>=0,o=e.indexOf("hover")>=0,l=e.indexOf("unconstrained")>=0,c=e.indexOf("invert-connects")>=0,u=e.indexOf("drag-all")>=0,f=e.indexOf("smooth-steps")>=0;if(r){if(t.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Sn(t,t.start[1]-t.start[0])}if(c&&t.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(l&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:i||s,drag:n,dragAll:u,smoothSteps:f,fixed:r,snap:s,hover:o,unconstrained:l,invertConnects:c}}function ro(t,e){if(e!==!1)if(e===!0||st(e)){t.tooltips=[];for(var i=0;i<t.handles;i++)t.tooltips.push(e)}else{if(e=lt(e),e.length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");e.forEach(function(n){if(typeof n!="boolean"&&!st(n))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),t.tooltips=e}}function so(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function oo(t,e){if(!st(e))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=e}function ao(t,e){if(!Ls(e))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");t.format=e}function lo(t,e){if(typeof e!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function co(t,e){t.documentElement=e}function uo(t,e){if(typeof e!="string"&&e!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function ho(t,e){if(typeof e!="object")throw new Error("noUiSlider: 'cssClasse
28s' must be an object.");typeof t.cssPrefix=="string"?(t.cssClasses={},Object.keys(e).forEach(function(i){t.cssClasses[i]=t.cssPrefix+e[i]})):t.cssClasses=e}function Cn(t){var e={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Ui,format:Ui},i={step:{r:!1,t:Us},keyboardPageMultiplier:{r:!1,t:zs},keyboardMultiplier:{r:!1,t:Gs},keyboardDefaultStep:{r:!1,t:Ws},start:{r:!0,t:Ys},connect:{r:!0,t:En},direction:{r:!0,t:io},snap:{r:!1,t:Xs},animate:{r:!1,t:Js},animationDuration:{r:!1,t:Zs},range:{r:!0,t:qs},orientation:{r:!1,t:Qs},margin:{r:!1,t:Sn},limit:{r:!1,t:eo},padding:{r:!1,t:to},behaviour:{r:!0,t:no},ariaFormat:{r:!1,t:oo},format:{r:!1,t:ao},tooltips:{r:!1,t:ro},keyboardSupport:{r:!0,t:lo},documentElement:{r:!1,t:co},cssPrefix:{r:!0,t:uo},cssClasses:{r:!0,t:ho},handleAttributes:{r:!1,t:so}},n={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:yn,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(i).forEac
28h(function(c){if(!Wt(t[c])&&n[c]===void 0){if(i[c].r)throw new Error("noUiSlider: '"+c+"' is required.");return}i[c].t(e,Wt(t[c])?t[c]:n[c])}),e.pips=t.pips;var r=document.createElement("div"),s=r.style.msTransform!==void 0,o=r.style.transform!==void 0;e.transformRule=o?"transform":s?"msTransform":"webkitTransform";var l=[["left","top"],["right","bottom"]];return e.style=l[e.dir][e.ort],e}function fo(t,e,i){var n=Fs(),r=$s(),s=r&&Rs(),o=t,l,c,u,f,p,m,g=e.spectrum,b=[],_=[],A=[],I=0,T={},H=!1,Z=t.ownerDocument,Oe=e.documentElement||Z.documentElement,fe=Z.body,Q=Z.dir==="rtl"||e.ort===1?0:100;function K(a,h){var d=Z.createElement("div");return h&&X(d,h),a.appendChild(d),d}function oe(a,h){var d=K(a,e.cssClasses.origin),v=K(d,e.cssClasses.handle);if(K(v,e.cssClasses.touchArea),v.setAttribute("data-handle",String(h)),e.keyboardSupport&&(v.setAttribute("tabindex","0"),v.addEventListener("keydown",function(E){return Fn(E,h)})),e.handleAttributes!==void 0){var y=e.handleAttributes[h];Object.keys(y).forEach(function(E){v.setAttribute(E,y[E])})}return v.setAttribute("role","slider"),v.setAttribute("aria-orientation",e.ort?"vertical":"horizontal"),h===0?X(v,e.cssClasses.handleLower):h===e.handles-1&&X(v,e.cssClasses.handleUpper),d.handle=v,d}function Le(a,h){return h?K(a,e.cssClasses.connect):!1}function ke(a,h){c=K(h,e.cssClasses.connects),u=[],f=[],f.push(Le(c,a[0]));for(var d=0;d<e.handles;d++)u.push(oe(h,d)),A[d]=d,f.push(Le(c,a[d+1]))}function pe(a){X(a,e.cssClasses.target),e.dir===0?X(a,e.cssClasses.ltr):X(a,e.cssClasses.rtl),e.ort===0?X(a,e.cssClasses.horizontal):X(a,e.cssClasses.vertical);var h=getComputedStyle(a).direction;return h==="rtl"?X(a,e.cssClasses.textDirectionRtl):X(a,e.cssClasses.textDirectionLtr),K(a,e.cssClasses.base)}function Qt(a,h){return!e.tooltips||!e.tooltips[h]?!1:K(a.firstChild,e.cssClasses.tooltip)}function ee(){return o.hasAttribute("disabled")}function me(a){var h=u[a];return h.hasAttribute("disabled")}function Ue(a){a!=null?(u[a].setAttribute("disabled",""),u[a].handle.removeAttribute("tabindex")):(o.setAttribute("disabled",""),u.forEach(function(h){h.handle.removeAttribute("tabindex")}))}function An(a){a!=null?(u[a].removeAttribute("disabled"),u[a].handle.setAttribute("tabindex","0")):(o.removeAttribute("disabled"),u.forEach(function(h){h.removeAttribute("disabled"),h.handle.setAttribute("tabindex","0")}))}function ct(){m&&(De("update"+ge.tooltips),m.forEach(function(a){a&&ji(a)}),m=null)}function ei(){ct(),m=u.map(Qt),pt("update"+ge.tooltips,function(a,h,d){if(!(!m||!e.tooltips)&&m[h]!==!1){var v=a[h];e.tooltips[h]!==!0&&(v=e.tooltips[h].to(d[h])),m[h].innerHTML=v}})}function xn(){De("update"+ge.aria),pt("update"+ge.aria,function(a,h,d,v,y){A.forEach(function(E){var C=u[E],S=ze(_,E,0,!0,!0,!0),O=ze(_,E,100,!0,!0,!0),L=y[E],D=String(e.ariaFormat.to(d[E]));S=g.fromStepping(S).toFixed(1),O=g.fromStepping(O).toFixed(1),L=g.fromStepping(L).toFixed(1),C.children[0].setAttribute("aria-valuemin",S),C.children[0].setAttribute("aria-valuemax",O),C.children[0].setAttribute("aria-valuenow",L),C.children[0].setAttribute("aria-valuetext",D)})})}function In(a){if(a.mode===ve.Range||a.mode===ve.Steps)return g.xVal;if(a.mode===ve.Count){if(a.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var h=a.values-1,d=100/h,v=[];h--;)v[h]=h*d;return v.push(100),ti(v,a.stepped)}return a.mode===ve.Positions?ti(a.values,a.stepped):a.mode===ve.Values?a.stepped?a.values.map(function(y){return g.fromStepping(g.getStep(g.toStepping(y)))}):a.values:[]}function ti(a,h){return a.map(function(d){return g.fromStepping(h?g.getStep(d):d)})}function Mn(a){function h(L,D){return Number((L+D).toFixed(7))}var d=In(a),v={},y=g.xVal[0],E=g.xVal[g.xVal.length-1],C=!1,S=!1,O=0;return d=Ts(d.slice().sort(function(L,D){return L-D})),d[0]!==y&&(d.unshift(y),C=!0),d[d.length-1]!==E&&(d.push(E),S=!0),d.forEach(function(L,D){var N,M,B,q=L,U=d[D+1],G,vt,bt,_t,hi,yt,di,fi=a.mode===ve.Steps;for(fi&&(N=g.xNumSteps[D]),N||(N=U-q),U===void 0&&(U=q),N=Math.max(N,1e-7),M=q;M<=U;M=h(M,N)){for(G=g.toStepping(M),vt=G-O,hi=vt/(a.density||1),yt=Math.round(hi),di=vt/yt,B=1;B<=yt;B+=1)bt=O+B*di,v[bt.toFixed(5)]=[g.fromStepping(bt),0];_t=d.indexOf(M)>-1?J.LargeValue:fi?J.SmallValue:J.NoValue,!D&&C&&M!==U&&(_t=0),M===U&&S||(v[G.toFixed(5)]=[M,_t]),O=G}}),v}function On(a,h,d){var v,y,E=Z.createElement("div"),C=(v={}
28,v[J.None]="",v[J.NoValue]=e.cssClasses.valueNormal,v[J.LargeValue]=e.cssClasses.valueLarge,v[J.SmallValue]=e.cssClasses.valueSub,v),S=(y={},y[J.None]="",y[J.NoValue]=e.cssClasses.markerNormal,y[J.LargeValue]=e.cssClasses.markerLarge,y[J.SmallValue]=e.cssClasses.markerSub,y),O=[e.cssClasses.valueHorizontal,e.cssClasses.valueVertical],L=[e.cssClasses.markerHorizontal,e.cssClasses.markerVertical];X(E,e.cssClasses.pips),X(E,e.ort===0?e.cssClasses.pipsHorizontal:e.cssClasses.pipsVertical);function D(M,B){var q=B===e.cssClasses.value,U=q?O:L,G=q?C:S;return B+" "+U[e.ort]+" "+G[M]}function N(M,B,q){if(q=h?h(B,q):q,q!==J.None){var U=K(E,!1);U.className=D(q,e.cssClasses.marker),U.style[e.style]=M+"%",q>J.NoValue&&(U=K(E,!1),U.className=D(q,e.cssClasses.value),U.setAttribute("data-value",String(B)),U.style[e.style]=M+"%",U.innerHTML=String(d.to(B)))}}return Object.keys(a).forEach(function(M){N(M,a[M][0],a[M][1])}),E}function ut(){p&&(ji(p),p=null)}function ht(a){ut();var h=Mn(a),d=a.filter,v=a.format||{to:function(y){return String(Math.round(y))}};return p=o.appendChild(On(h,d,v)),p}function ii(){var a=l.getBoundingClientRect(),h="offset"+["Width","Height"][e.ort];return e.ort===0?a.width||l[h]:a.height||l[h]}function Se(a,h,d,v){var y=function(C){var S=Ln(C,v.pageOffset,v.target||h);if(!S||ee()&&!v.doNotReject||Ns(o,e.cssClasses.tap)&&!v.doNotReject||a===n.start&&S.buttons!==void 0&&S.buttons>1||v.hover&&S.buttons)return!1;s||S.preventDefault(),S.calcPoint=S.points[e.ort],d(S,v)},E=[];return a.split(" ").forEach(function(C){h.addEventListener(C,y,s?{passive:!0}:!1),E.push([C,y])}),E}function Ln(a,h,d){var v=a.type.indexOf("touch")===0,y=a.type.indexOf("mouse")===0,E=a.type.indexOf("pointer")===0,C=0,S=0;if(a.type.indexOf("MSPointer")===0&&(E=!0),a.type==="mousedown"&&!a.buttons&&!a.touches)return!1;if(v){var O=function(N){var M=N.target;return M===d||d.contains(M)||a.composed&&a.composedPath().shift()===d};if(a.type==="touchstart"){var L=Array.prototype.filter.call(a.touches,O);if(L.length>1)return!1;C=L[0].pageX,S=L[0].pageY}else{var D=Array.prototype.find.call(a.changedTouches,O);if(!D)return!1;C=D.pageX,S=D.pageY}}return h=h||bn(Z),(y||E)&&(C=a.clientX+h.x,S=a.clientY+h.y),a.pageOffset=h,a.points=[C,S],a.cursor=y||E,a}function ni(a){var h=a-ks(l,e.ort),d=h*100/ii();return d=Ki(d),e.dir?100-d:d}function Tn(a){var h=100,d=!1;return u.forEach(function(v,y){if(!me(y)){var E=_[y],C=Math.abs(E-a),S=C===100&&h===100,O=C<h,L=C<=h&&a>E;(O||L||S)&&(d=y,h=C)}}),d}function Pn(a,h){a.type==="mouseout"&&a.target.nodeName==="HTML"&&a.relatedTarget===null&&dt(a,h)}function kn(a,h){if(navigator.appVersion.indexOf("MSIE 9")===-1&&a.buttons===0&&h.buttonsProperty!==0)return dt(a,h);var d=(e.dir?-1:1)*(a.calcPoint-h.startCalcPoint),v=d*100/h.baseSize;si(d>0,v,h.locations,h.handleNumbers,h.connect)}function dt(a,h){h.handle&&(Qe(h.handle,e.cssClasses.active),I-=1),h.listeners.forEach(function(d){Oe.removeEventListener(d[0],d[1])}),I===0&&(Qe(o,e.cssClasses.drag),gt(),a.cursor&&(fe.style.cursor="",fe.removeEventListener("selectstart",Hi))),e.events.smoothSteps&&(h.handleNumbers.forEach(function(d){Ce(d,_[d],!0,!0,!1,!1)}),h.handleNumbers.forEach(function(d){F("update",d)})),h.handleNumbers.forEach(function(d){F("change",d),F("set",d),F("end",d)})}function ft(a,h){if(!h.handleNumbers.some(me)){var d;if(h.handleNumbers.length===1){var v=u[h.handleNumbers[0]];d=v.children[0],I+=1,X(d,e.cssClasses.active)}a.stopPropagation();var y=[],E=Se(n.move,Oe,kn,{target:a.target,handle:d,connect:h.connect,listeners:y,startCalcPoint:a.calcPoint,baseSize:ii(),pageOffset:a.pageOffset,handleNumbers:h.handleNumbers,buttonsProperty:a.buttons,locations:_.slice()}),C=Se(n.end,Oe,dt,{target:a.target,handle:d,listeners:y,doNotReject:!0,handleNumbers:h.handleNumbers}),S=Se("mouseout",Oe,Pn,{target:a.target,handle:d,listeners:y,doNotReject:!0,handleNumbers:h.handleNumbers});y.push.apply(y,E.concat(C,S)),a.cursor&&(fe.style.cursor=getComputedStyle(a.target).cursor,u.length>1&&X(o,e.cssClasses.drag),fe.addEventListener("selectstart",Hi,!1)),h.handleNumbers.forEach(function(O){F("start",O)})}}function Dn(a){a.stopPropagation();
28var h=ni(a.calcPoint),d=Tn(h);d!==!1&&(e.events.snap||Bi(o,e.cssClasses.tap,e.animationDuration),Ce(d,h,!0,!0),gt(),F("slide",d,!0),F("update",d,!0),e.events.snap?ft(a,{handleNumbers:[d]}):(F("change",d,!0),F("set",d,!0)))}function Nn(a){var h=ni(a.calcPoint),d=g.getStep(h),v=g.fromStepping(d);Object.keys(T).forEach(function(y){y.split(".")[0]==="hover"&&T[y].forEach(function(E){E.call(We,v)})})}function Fn(a,h){if(ee()||me(h))return!1;var d=["Left","Right"],v=["Down","Up"],y=["PageDown","PageUp"],E=["Home","End"];e.dir&&!e.ort?d.reverse():e.ort&&!e.dir&&(v.reverse(),y.reverse());var C=a.key.replace("Arrow",""),S=C===y[0],O=C===y[1],L=C===v[0]||C===d[0]||S,D=C===v[1]||C===d[1]||O,N=C===E[0],M=C===E[1];if(!L&&!D&&!N&&!M)return!0;a.preventDefault();var B;if(D||L){var q=L?0:1,U=ci(h),G=U[q];if(G===null)return!1;G===!1&&(G=g.getDefaultStep(_[h],L,e.keyboardDefaultStep)),O||S?G*=e.keyboardPageMultiplier:G*=e.keyboardMultiplier,G=Math.max(G,1e-7),G=(L?-1:1)*G,B=b[h]+G}else M?B=e.spectrum.xVal[e.spectrum.xVal.length-1]:B=e.spectrum.xVal[0];return Ce(h,g.toStepping(B),!0,!0),F("slide",h),F("update",h),F("change",h),F("set",h),!1}function ri(a){a.fixed||u.forEach(function(h,d){Se(n.start,h.children[0],ft,{handleNumbers:[d]})}),a.tap&&Se(n.start,l,Dn,{}),a.hover&&Se(n.move,l,Nn,{hover:!0}),a.drag&&f.forEach(function(h,d){if(!(h===!1||d===0||d===f.length-1)){var v=u[d-1],y=u[d],E=[h],C=[v,y],S=[d-1,d];X(h,e.cssClasses.draggable),a.fixed&&(E.push(v.children[0]),E.push(y.children[0])),a.dragAll&&(C=u,S=A),E.forEach(function(O){Se(n.start,O,ft,{handles:C,handleNumbers:S,connect:h})})}})}function pt(a,h){T[a]=T[a]||[],T[a].push(h),a.split(".")[0]==="update"&&u.forEach(function(d,v){F("update",v)})}function Rn(a){return a===ge.aria||a===ge.tooltips}function De(a){var h=a&&a.split(".")[0],d=h?a.substring(h.length):a;Object.keys(T).forEach(function(v){var y=v.split(".")[0],E=v.substring(y.length);(!h||h===y)&&(!d||d===E)&&(!Rn(E)||d===E)&&delete T[v]})}function F(a,h,d){Object.keys(T).forEach(function(v){var y=v.split(".")[0];a===y&&T[v].forEach(function(E){E.call(We,b.map(e.format.to),h,b.slice(),d||!1,_.slice(),We)})})}function ze(a,h,d,v,y,E,C){var S;return u.length>1&&!e.events.unconstrained&&(v&&h>0&&(S=g.getAbsoluteDistance(a[h-1],e.margin,!1),d=Math.max(d,S)),y&&h<u.length-1&&(S=g.getAbsoluteDistance(a[h+1],e.margin,!0),d=Math.min(d,S))),u.length>1&&e.limit&&(v&&h>0&&(S=g.getAbsoluteDistance(a[h-1],e.limit,!1),d=Math.min(d,S)),y&&h<u.length-1&&(S=g.getAbsoluteDistance(a[h+1],e.limit,!0),d=Math.max(d,S))),e.padding&&(h===0&&(S=g.getAbsoluteDistance(0,e.padding[0],!1),d=Math.max(d,S)),h===u.length-1&&(S=g.getAbsoluteDistance(100,e.padding[1],!0),d=Math.min(d,S))),C||(d=g.getStep(d)),d=Ki(d),d===a[h]&&!E?!1:d}function mt(a,h){var d=e.ort;return(d?h:a)+", "+(d?a:h)}function si(a,h,d,v,y){var E=d.slice(),C=v[0],S=e.events.smoothSteps,O=[!a,a],L=[a,!a];v=v.slice(),a&&v.reverse(),v.length>1?v.forEach(function(N,M){var B=ze(E,N,E[N]+h,O[M],L[M],!1,S);B===!1?h=0:(h=B-E[N],E[N]=B)}):O=L=[!0];var D=!1;v.forEach(function(N,M){D=Ce(N,d[N]+h,O[M],L[M],!1,S)||D}),D&&(v.forEach(function(N){F("update",N),F("slide",N)}),y!=null&&F("drag",C))}function oi(a,h){return e.dir?100-a-h:a}function $n(a,h){_[a]=h,b[a]=g.fromStepping(h);var d=oi(h,0)-Q,v="translate("+mt(d+"%","0")+")";if(u[a].style[e.transformRule]=v,e.events.invertConnects&&_.length>1){var y=_.every(function(E,C,S){return C===0||E>=S[C-1]});if(H!==!y){Un();return}}Ne(a),Ne(a+1),H&&(Ne(a-1),Ne(a+2))}function gt(){A.forEach(function(a){var h=_[a]>50?-1:1,d=3+(u.length+h*a);u[a].style.zIndex=String(d)})}function Ce(a,h,d,v,y,E){return y||(h=ze(_,a,h,d,v,!1,E)),h===!1?!1:($n(a,h),!0)}function Ne(a){if(f[a]){var h=_.slice();H&&h.sort(function(S,O){return S-O});var d=0,v=100;a!==0&&(d=h[a-1]),a!==f.length-1&&(v=h[a]);var y=v-d,E="translate("+mt(oi(d,y)+"%","0")+")",C="scale("+mt(y/100,"1")+")";f[a].style[e.transformRule]=E+" "+C}}function ai(a,h){return a===null||a===!1||a===void 0||(typeof a=="number"&&(a=String(a)),a=e.format.from(a),a!==!1&&(a=g.toStepping(a)),a===!1||isNaN(a))?_[h]:a}function Ge(a,h,d){var v=lt(a),y=_[0]===void 0;
28h=h===void 0?!0:h,e.animate&&!y&&Bi(o,e.cssClasses.tap,e.animationDuration),A.forEach(function(S){Ce(S,ai(v[S],S),!0,!1,d)});var E=A.length===1?0:1;if(y&&g.hasNoSize()&&(d=!0,_[0]=0,A.length>1)){var C=100/(A.length-1);A.forEach(function(S){_[S]=S*C})}for(;E<A.length;++E)A.forEach(function(S){Ce(S,_[S],!0,!0,d)});gt(),A.forEach(function(S){F("update",S),v[S]!==null&&h&&F("set",S)})}function Vn(a){Ge(e.start,a)}function jn(a,h,d,v){if(a=Number(a),!(a>=0&&a<A.length))throw new Error("noUiSlider: invalid handle number, got: "+a);Ce(a,ai(h,a),!0,!0,v),F("update",a),d&&F("set",a)}function li(a){if(a===void 0&&(a=!1),a)return b.length===1?b[0]:b.slice(0);var h=b.map(e.format.to);return h.length===1?h[0]:h}function Hn(){for(De(ge.aria),De(ge.tooltips),Object.keys(e.cssClasses).forEach(function(a){Qe(o,e.cssClasses[a])});o.firstChild;)o.removeChild(o.firstChild);delete o.noUiSlider}function ci(a){var h=_[a],d=g.getNearbySteps(h),v=b[a],y=d.thisStep.step,E=null;if(e.snap)return[v-d.stepBefore.startValue||null,d.stepAfter.startValue-v||null];y!==!1&&v+y>d.stepAfter.startValue&&(y=d.stepAfter.startValue-v),v>d.thisStep.startValue?E=d.thisStep.step:d.stepBefore.step===!1?E=!1:E=v-d.stepBefore.highestStep,h===100?y=null:h===0&&(E=null);var C=g.countStepDecimals();return y!==null&&y!==!1&&(y=Number(y.toFixed(C))),E!==null&&E!==!1&&(E=Number(E.toFixed(C))),[E,y]}function Bn(){return A.map(ci)}function Kn(a,h){var d=li(),v=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];v.forEach(function(E){a[E]!==void 0&&(i[E]=a[E])});var y=Cn(i);v.forEach(function(E){a[E]!==void 0&&(e[E]=y[E])}),g=y.spectrum,e.margin=y.margin,e.limit=y.limit,e.padding=y.padding,e.pips?ht(e.pips):ut(),e.tooltips?ei():ct(),_=[],Ge(Wt(a.start)?a.start:d,h),a.connect&&ui()}function ui(){for(;c.firstChild;)c.removeChild(c.firstChild);for(var a=0;a<=e.handles;a++)f[a]=Le(c,e.connect[a]),Ne(a);ri({drag:e.events.drag,fixed:!0})}function Un(){H=!H,En(e,e.connect.map(function(a){return!a})),ui()}function zn(){l=pe(o),ke(e.connect,l),ri(e.events),Ge(e.start),e.pips&&ht(e.pips),e.tooltips&&ei(),xn()}zn();var We={destroy:Hn,steps:Bn,on:pt,off:De,get:li,set:Ge,setHandle:jn,reset:Vn,disable:Ue,enable:An,__moveHandles:function(a,h,d){si(a,h,_,d)},options:i,updateOptions:Kn,target:o,removePips:ut,removeTooltips:ct,getPositions:function(){return _.slice()},getTooltips:function(){return m},getOrigins:function(){return u},pips:ht};return We}function po(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var i=Cn(e),n=fo(t,i,e);return t.noUiSlider=n,n}
28const mo={__spectrum:_n,cssClasses:yn,create:po};function wn(){const t=document.getElementById("pax-slider"),e=document.getElementById("pax-min-input"),i=document.getElementById("pax-max-input"),n=document.getElementById("pax-min-display"),r=document.getElementById("pax-max-display");if(!t||!e||!i||!n||!r){console.debug("[MiceRangeSliders] PAX slider elements not found, skipping");return}if(t.noUiSlider){console.debug("[MiceRangeSliders] Slider already initialized, skipping");return}const s=parseInt(t.getAttribute("data-min"))||0,o=parseInt(t.getAttribute("data-max"))||1e3,l=parseInt(t.getAttribute("data-start-min"))||s,c=parseInt(t.getAttribute("data-start-max"))||o;console.debug("[MiceRangeSliders] Initializing PAX slider:",{dbMin:s,dbMax:o,startMin:l,startMax:c}),mo.create(t,{start:[l,c],connect:!0,range:{min:s,max:o},step:1,tooltips:!1,format:{to:u=>Math.round(u),from:u=>Math.round(u)}}),t.noUiSlider.on("update",(u,f)=>{const p=u[0],m=u[1];n.textContent=p,r.textContent=m,e.value=p,i.value=m}),t.noUiSlider.on("change",(u,f)=>{console.debug("[MiceRangeSliders] PAX slider changed:",u);const p=new Event("change",{bubbles:!0});e.dispatchEvent(p)})}function go(){const t=document.getElementById("reset-form");t&&t.addEventListener("click",()=>{console.debug("[MiceRangeSliders] Reset button clicked");const e=document.getElementById("pax-slider");if(e&&e.noUiSlider){const i=parseInt(e.getAttribute("data-min"))||0,n=parseInt(e.getAttribute("data-max"))||1e3;e.noUiSlider.set([i,n]),console.debug(`[MiceRangeSliders] Reset PAX slider to [${i}, ${n}]`)}})}function vo(){const t=e=>{console.debug("[MiceRangeSliders] Sprig/htmx swap detected, checking if slider needs initialization"),setTimeout(()=>{const i=document.getElementById("pax-slider");i&&!i.noUiSlider?(console.debug("[MiceRangeSliders] New slider element detected, initializing"),wn()):i&&console.debug("[MiceRangeSliders] Slider already initialized, skipping reinit")},50)};document.body.addEventListener("htmx:afterSwap",t),document.body.addEventListener("sprig:afterRender",t)}function zi(){console.debug("[MiceRangeSliders] Booting"),wn(),go(),vo()}document.readyState!=="loading"?zi():document.addEventListener("DOMContentLoaded",zi);window.Choices=gs;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.