PageSourceSearch

https://www.brnenskyzvonec.cz/build/816.e32b0990.js

js brnenskyzvonec.cz collected 2026-10-08 09:37:50 UTC 351,210 bytes, 25 lines download raw bytes

vendor: 37,401 bytes, lines 1-2
1/*! For license information please see 816.e32b0990.js.LICENSE.txt */
2(self.webpackChunk=self.webpackChunk||[]).push([[816],{2891(e,t,n){"use strict";n.d(t,{lg:()=>Q,xI:()=>ce});class r{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{const n=e.index,r=t.index;return n<r?-1:n>r?1:0})}}class i{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:n,eventOptions:r}=e,i=this.fetchEventListenerMapForEventTarget(t),o=this.cacheKey(n,r);i.delete(o),0==i.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){const r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n);let o=r.get(i);return o||(o=this.createEventListener(e,t,n),r.set(i,o)),o}createEventListener(e,t,n){const i=new r(e,t,n);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const n=[e];return Object.keys(t).sort().forEach(e=>{n.push(`${t[e]?"":"!"}${e}`)}),n.join(":")}}const o={stop:({event:e,value:t})=>(t&&e.stopPropagation(),!0),prevent:({event:e,value:t})=>(t&&e.preventDefault(),!0),self:({event:e,value:t,element:n})=>!t||n===e.target},s=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function a(e){return"window"==e?window:"document"==e?document:void 0}function l(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function c(e){return l(e.replace(/--/g,"-").replace(/__/g,"_"))}function u(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){return e.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function h(e){return null!=e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const m=["meta","ctrl","alt","shift"];class p{constructor(e,t,n,r){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){const t=e.tagName.toLowerCase();if(t in g)return g[t](e)}(e)||v("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||v("missing identifier"),this.methodName=n.methodName||v("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=r}static forToken(e,t){return new this(e.element,e.index,function(e){const t=e.trim().match(s)||[];let n=t[2],r=t[3];return r&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${r}`,r=""),{eventTarget:a(t[4]),eventName:n,eventOptions:t[7]?(i=t[7],i.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||r};var i}(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return!0;const n=t.filter(e=>!m.includes(e))[0];return!!n&&(f(this.keyMappings,n)||v(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[n].toLowerCase()!==e.key.toLowerCase())}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:n,value:r}of Array.from(this.element.attributes)){const i=n.match(t),o=i&&i[1];o&&(e[l(o)]=b(r))}return e}get eventTargetName(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[n,r,i,o]=m.map(e=>t.includes(e));return e.metaKey!==n||e.ctrlKey!==r||e.altKey!==i||e.shiftKey!==o}}const g={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function v(e){throw new Error(e)}function b(e){try{return JSON.parse(e)}catch(t){return e}}class y{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action,{actionDescriptorFilters:n}=this.context.application,{controller:r}=this.context;let i=!0;for(const[o,s]of Object.entries(this.eventOptions))if(o in n){const a=n[o];i=i&&a({name:o,value:s,event:e,element:t,controller:r})}return i}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:n}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){const{identifier:n,controller:r,element:i,index:o}=this,s={identifier:n,controller:r,element:i,index:o,event:e};this.context.handleError(t,`invoking action "${this.action}"`,s)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class w{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class E{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new w(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function A(e,t,n){T(e,t).add(n)}function S(e,t,n){T(e,t).delete(n),function(e,t){const n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function T(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}class x{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e.concat(Array.from(t)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e+t.size,0)}add(e,t){A(this.valuesByKey,e,t)}delete(e,t){S(this.valuesByKey,e,t)}has(e,t){const n=this.valuesByKey.get(e);return null!=n&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(t=>t.has(e))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,n])=>n.has(e)).map(([e,t])=>e)}}class L{constructor(e,t,n,r){this._selector=t,this.details=r,this.elementObserver=new w(e,this),this.delegate=n,this.matchesByElement=new x}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const n=e.matches(t);return this.delegate.selectorMatchElement?n&&this.delegate.selectorMatchElement(e,this.details):n}return!1}matchElementsInTree(e){const{selector:t}=this;if(t){const n=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(t)).filter(e=>this.matchElement(e));return n.concat(r)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const n of t)this.selectorUnmatched(e,n)}elementAttributeChanged(e,t){const{selector:n}=this;if(n){const t=this.matchElement(e),r=this.matchesByElement.has(n,e);t&&!r?this.selectorMatched(e,n):!t&&r&&this.selectorUnmatched(e,n)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}}class M{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const n=this.delegate.getStringMapKeyForAttribute(e);if(null!=n){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class O{constructor(e,t,n){this.attributeObserver=new E(e,t,this),this.delegate=n,this.tokensByElement=new x}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(e=>this.tokenMatched(e))}tokensUnmatched(e){e.forEach(e=>this.tokenUnmatched(e))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){const n=Math.max(e.length,t.length);return Array.from({length:n},(n,r)=>[e[r],t[r]])}(t,n).findIndex(([e,t])=>{return r=t,!((n=e)&&r&&n.index==r.index&&n.content==r.content);var n,r});return-1==r?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){const t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter(e=>e.length).map((e,r)=>({element:t,attributeName:n,content:e,index:r}))}(e.getAttribute(t)||"",e,t)}}class C{constructor(e,t,n){this.tokenListObserver=new O(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class k{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new C(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new y(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){const t=p.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class P{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new M(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){const r=this.valueDescriptorNameMap[t];null!==e&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)null==n||this.controller.data.has(e)||this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){const r=`${e}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[e];try{const e=r.reader(t);let o=n;n&&(o=r.reader(n)),i.call(this.receiver,e,o)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${r.name}" - ${e.message}`),e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{const n=this.valueDescriptorMap[t];e[n.name]=n}),e}hasValue(e){const t=`has${u(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class R{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new x}start(){this.tokenListObserver||(this.tokenListObserver=new O(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function I(e,t){const n=D(e);return Array.from(n.reduce((e,n)=>(function(e,t){const n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach(t=>e.add(t)),e),new Set))}function F(e,t){return D(e).reduce((e,n)=>(e.push(...function(e,t){const n=e[t];return n?Object.keys(n).map(e=>[e,n[e]]):[]}(n,t)),e),[])}function D(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}class N{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new x,this.outletElementsByName=new x,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:n}){const r=this.getOutlet(e,n);r&&this.connectOutlet(r,e,n)}selectorUnmatched(e,t,{outletName:n}){const r=this.getOutletFromMap(e,n);r&&this.disconnectOutlet(r,e,n)}selectorMatchElement(e,{outletName:t}){const n=this.selector(t),r=this.hasOutlet(e,t),i=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!n&&(r&&i&&e.matches(n))}elementMatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementAttributeValueChanged(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementUnmatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}connectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)||(this.outletsByName.add(n,e),this.outletElementsByName.add(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause(()=>this.delegate.outletConnected(e,t,n)))}disconnectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)&&(this.outletsByName.delete(n,e),this.outletElementsByName.delete(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause(()=>this.delegate.outletDisconnected(e,t,n)))}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const n of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(n,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e),n=new L(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,n),n.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e),n=new E(this.scope.element,t,this);this.attributeObserverMap.set(e,n),n.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(t=>this.attributeNameForOutletName(t)===e)}get outletDependencies(){const e=new x;return this.router.modules.forEach(t=>{I(t.definition.controllerConstructor,"outlets").forEach(n=>e.add(n,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(t=>t.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class B{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:n,controller:r,element:i}=this;t=Object.assign({identifier:n,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new k(this,this.dispatcher),this.valueObserver=new P(this,this.controller),this.targetObserver=new R(this,this),this.outletObserver=new N(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){const{identifier:r,controller:i,element:o}=this;n=Object.assign({identifier:r,controller:i,element:o},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,n){this.invokeControllerMethod(`${c(n)}OutletConnected`,e,t)}outletDisconnected(e,t,n){this.invokeControllerMethod(`${c(n)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const n=this.controller;"function"==typeof n[e]&&n[e](...t)}}function q(e){return function(e,t){const n=j(e),r=function(e,t){return H(t).reduce((n,r)=>{const i=function(e,t,n){const r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){const e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}(e,t,r);return i&&Object.assign(n,{[r]:i}),n},{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function(e){const t=I(e,"blessings");return t.reduce((t,n)=>{const r=n(e);for(const e in r){const n=t[e]||{};t[e]=Object.assign(n,r[e])}return t},{})}(e))}const H="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,j=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){const t=e(function(){this.a.call(this)});t.prototype.a=function(){},new t}(),e}catch(e){return e=>class extends e{}}})();class ${constructor(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:q(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new B(this,e),this.contextsByScope.set(e,t)),t}}class V{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return t.match(/[^\s]+/g)||[]}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class z{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${d(e)}`}}class W{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}}function _(e,t){return`[${e}~="${t}"]`}class U{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)],[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return _(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(t=>this.deprecate(t,e))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return _(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class K{constructor(e,t){this.scope=e,this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findOutlet(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllOutlets(t)],[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))}matchesElement(e,t,n){const r=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&r.split(" ").includes(n)}}class G{constructor(e,t,n,r){this.targets=new U(this),this.classes=new V(this),this.data=new z(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new W(r),this.outlets=new K(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return _(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new G(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class X{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new C(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:n}=e;return this.parseValueForElementAndIdentifier(t,n)}parseValueForElementAndIdentifier(e,t){const n=this.fetchScopesByIdentifierForElement(e);let r=n.get(t);return r||(r=this.delegate.createScopeForElementAndIdentifier(e,t),n.set(t,r)),r}elementMatchedValue(e,t){const n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class Y{constructor(e){this.application=e,this.scopeObserver=new X(this.element,this.schema,this),this.scopesByIdentifier=new x,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new $(this.application,e);this.connectModule(t);const n=e.controllerConstructor.afterLoad;n&&n.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find(t=>t.element==e)}proposeToConnectScopeForElementAndIdentifier(e,t){const n=this.scopeObserver.parseValueForElementAndIdentifier(e,t);n?this.scopeObserver.elementMatchedValue(n.element,n):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new G(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.connectContextForScope(t))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.disconnectContextForScope(t))}}const Z={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}
2-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},J("abcdefghijklmnopqrstuvwxyz".split("").map(e=>[e,e]))),J("0123456789".split("").map(e=>[e,e])))};function J(e){return e.reduce((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n}),{})}class Q{constructor(e=document.documentElement,t=Z){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new i(this),this.router=new Y(this),this.actionDescriptorFilters=Object.assign({},o)}static start(e,t){const n=new this(e,t);return n.start(),n}async start(){await new Promise(e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",()=>e()):e()}),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>this.router.unloadIdentifier(e))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){const n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,n),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function ee(e,t,n){return e.application.getControllerForElementAndIdentifier(t,n)}function te(e,t,n){let r=ee(e,t,n);return r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,n),r=ee(e,t,n),r||void 0)}function ne([e,t],n){return function(e){const{token:t,typeDefinition:n}=e,r=`${d(t)}-value`,i=function(e){const{controller:t,token:n,typeDefinition:r}=e,i={controller:t,token:n,typeObject:r},o=function(e){const{controller:t,token:n,typeObject:r}=e,i=h(r.type),o=h(r.default),s=i&&o,a=i&&!o,l=!i&&o,c=re(r.type),u=ie(e.typeObject.default);if(a)return c;if(l)return u;if(c!==u){throw new Error(`The specified default value for the Stimulus Value "${t?`${t}.${n}`:n}" must match the defined type "${c}". The provided default value of "${r.default}" is of type "${u}".`)}if(s)return c}(i),s=ie(r),a=re(r),l=o||s||a;if(l)return l;const c=t?`${t}.${r}`:n;throw new Error(`Unknown value type "${c}" for "${n}" value`)}(e);return{type:i,key:r,name:l(r),get defaultValue(){return function(e){const t=re(e);if(t)return oe[t];const n=f(e,"default"),r=f(e,"type"),i=e;if(n)return i.default;if(r){const{type:e}=i,t=re(e);if(t)return oe[t]}return e}(n)},get hasCustomDefaultValue(){return void 0!==ie(n)},reader:se[i],writer:ae[i]||ae.default}}({controller:n,token:e,typeDefinition:t})}function re(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function ie(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const oe={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},se={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${ie(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e.replace(/_/g,"")),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${ie(t)}"`);return t},string:e=>e},ae={default:function(e){return`${e}`},array:le,object:le};function le(e){return JSON.stringify(e)}class ce{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}
2get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:o=!0}={}){const s=new CustomEvent(r?`${r}:${e}`:e,{detail:n,bubbles:i,cancelable:o});return t.dispatchEvent(s),s}}ce.blessings=[function(e){return I(e,"classes").reduce((e,t)=>{return Object.assign(e,(n=t,{[`${n}Class`]:{get(){const{classes:e}=this;if(e.has(n))return e.get(n);{const t=e.getAttributeName(n);throw new Error(`Missing attribute "${t}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${u(n)}Class`]:{get(){return this.classes.has(n)}}}));var n},{})},function(e){return I(e,"targets").reduce((e,t)=>{return Object.assign(e,(n=t,{[`${n}Target`]:{get(){const e=this.targets.find(n);if(e)return e;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${u(n)}Target`]:{get(){return this.targets.has(n)}}}));var n},{})},function(e){const t=F(e,"values"),n={valueDescriptorMap:{get(){return t.reduce((e,t)=>{const n=ne(t,this.identifier),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})},{})}}};return t.reduce((e,t)=>Object.assign(e,function(e,t){const n=ne(e,t),{key:r,name:i,reader:o,writer:s}=n;return{[i]:{get(){const e=this.data.get(r);return null!==e?o(e):n.defaultValue},set(e){void 0===e?this.data.delete(r):this.data.set(r,s(e))}},[`has${u(i)}`]:{get(){return this.data.has(r)||n.hasCustomDefaultValue}}}}(t)),n)},function(e){return I(e,"outlets").reduce((e,t)=>Object.assign(e,function(e){const t=c(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t){const n=te(this,t,e);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map(t=>{const n=te(this,t,e);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)}).filter(e=>e):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${u(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}(t)),{})}],ce.targets=[],ce.outlets=[],ce.values={}},89(e,t,n){"use strict";const r="eager",i="lazy";class o extends HTMLElement{static delegateConstructor=void 0;loaded=Promise.resolve();static get observedAttributes(){return["disabled","loading","src"]}constructor(){super(),this.delegate=new o.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"src"==e?this.delegate.sourceURLChanged():"disabled"==e&&this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get shouldReloadWithMorph(){return this.src&&"morph"===this.refresh}get loading(){return function(e){if("lazy"===e.toLowerCase())return i;return r}(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}}const s={enabled:!0,progressBarDelay:500,unvisitableExtensions:new Set([".7z",".aac",".apk",".avi",".bmp",".bz2",".css",".csv",".deb",".dmg",".doc",".docx",".exe",".gif",".gz",".heic",".heif",".ico",".iso",".jpeg",".jpg",".js",".json",".m4a",".mkv",".mov",".mp3",".mp4",".mpeg",".mpg",".msi",".ogg",".ogv",".pdf",".pkg",".png",".ppt",".pptx",".rar",".rtf",".svg",".tar",".tif",".tiff",".txt",".wav",".webm",".webp",".wma",".wmv",".xls",".xlsx",".xml",".zip"])};function a(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{const t=document.createElement("script"),n=T();return n&&(t.nonce=n),t.textContent=e.textContent,t.async=!1,function(e,t){for(const{name:n,value:r}of t.attributes)e.setAttribute(n,r)}(t,e),t}}function l(e,{target:t,cancelable:n,detail:r}={}){const i=new CustomEvent(e,{cancelable:n,bubbles:!0,composed:!0,detail:r});return t&&t.isConnected?t.dispatchEvent(i):document.documentElement.dispatchEvent(i),i}function c(e){e.preventDefault(),e.stopImmediatePropagation()}function u(){return"hidden"===document.visibilityState?h():d()}function d(){return new Promise(e=>requestAnimationFrame(()=>e()))}function h(){return new Promise(e=>setTimeout(()=>e(),0))}function f(e=""){return(new DOMParser).parseFromString(e,"text/html")}function m(e,...t){const n=function(e,t){return e.reduce((e,n,r)=>e+n+(null==t[r]?"":t[r]),"")}(e,t).replace(/^\n/,"").split("\n"),r=n[0].match(/^\s+/),i=r?r[0].length:0;return n.map(e=>e.slice(i)).join("\n")}function p(){return Array.from({length:36}).map((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(16*Math.random()).toString(16)).join("")}function g(e,...t){for(const n of t.map(t=>t?.getAttribute(e)))if("string"==typeof n)return n;return null}function v(...e){for(const t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function b(...e){for(const t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}function y(e,t=2e3){return new Promise(n=>{const r=()=>{e.removeEventListener("error",r),e.removeEventListener("load",r),n()};e.addEventListener("load",r,{once:!0}),e.addEventListener("error",r,{once:!0}),setTimeout(n,t)})}function w(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function E(...e){const t=g("data-turbo-action",...e);return function(e){return"advance"==e||"replace"==e||"restore"==e}(t)?t:null}function A(e){return document.querySelector(`meta[name="${e}"]`)}function S(e){const t=A(e);return t&&t.content}function T(){const e=A("csp-nonce");if(e){const{nonce:t,content:n}=e;return""==t?n:t}}function x(e,t){if(e instanceof Element)return e.closest(t)||x(e.assignedSlot||e.getRootNode()?.host,t)}function L(e){return!!e&&null==e.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])")&&"function"==typeof e.focus}function M(e){return Array.from(e.querySelectorAll("[autofocus]")).find(L)}function O(e){if("_blank"===e)return!1;if(e){for(const t of document.getElementsByName(e))if(t instanceof HTMLIFrameElement)return!1;return!0}return!0}function C(e){const t=x(e,"a[href], a[xlink\\:href]");if(!t)return null;if(t.href.startsWith("#"))return null;if(t.hasAttribute("download"))return null;const n=t.getAttribute("target");return n&&"_self"!==n?null:t}const k={"aria-disabled":{beforeSubmit:e=>{e.setAttribute("aria-disabled","true"),e.addEventListener("click",c)},afterSubmit:e=>{e.removeAttribute("aria-disabled"),e.removeEventListener("click",c)}},disabled:{beforeSubmit:e=>e.disabled=!0,afterSubmit:e=>e.disabled=!1}};const P=new class{#e=null;constructor(e){Object.assign(this,e)}get submitter(){return this.#e}set submitter(e){this.#e=k[e]||e}}({mode:"on",submitter:"disabled"}),R={drive:s,forms:P};function I(e){return new URL(e.toString(),document.baseURI)}function F(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function D(e,t){return I(t?.getAttribute("formaction")||e.getAttribute("action")||e.action)}function N(e){return(function(e){return function(e){return e.pathname.split("/").slice(1)}(e).slice(-1)[0]}(e).match(/\.[^.]*$/)||[])[0]||""}function B(e,t){return function(e,t){const n=$(t.origin+t.pathname);return $(e.href)===n||e.href.startsWith(n)}(e,t)&&!R.drive.unvisitableExtensions.has(N(e))}function q(e){return I(e.getAttribute("href")||"")}function H(e){return function(e){const t=F(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}(e)}function j(e,t){return I(e).href==I(t).href}function $(e){return e.endsWith("/")?e:e+"/"}class V{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return I(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}class z extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){const e=this.values().next().value;this.delete(e)}super.add(e)}}const W=new z(20);function _(e,t={}){const n=new Headers(t.headers||{}),r=p();return W.add(r),n.append("X-Turbo-Request-Id",r),window.fetch(e,{...t,headers:n})}function U(e){switch(e.toLowerCase()){case"get":return K.get;case"post":return K.post;case"put":return K.put;case"patch":return K.patch;case"delete":return K.delete}}const K={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};const G={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"};class X{abortController=new AbortController;#t=e=>{};
2constructor(e,t,n,r=new URLSearchParams,i=null,o=G.urlEncoded){const[s,a]=Z(I(n),t,r,o);this.delegate=e,this.url=s,this.target=i,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:t.toUpperCase(),headers:{...this.defaultHeaders},body:a,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=o}get method(){return this.fetchOptions.method}set method(e){const t=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,n=U(e)||K.get;this.url.search="";const[r,i]=Z(this.url,n,t,this.enctype);this.url=r,this.fetchOptions.body=i,this.fetchOptions.method=n.toUpperCase()}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){const{fetchOptions:e}=this;this.delegate.prepareRequest(this);const t=await this.#n(e);try{this.delegate.requestStarted(this),t.detail.fetchRequest?this.response=t.detail.fetchRequest.response:this.response=_(this.url.href,e);const n=await this.response;return await this.receive(n)}catch(e){if("AbortError"!==e.name)throw this.#r(e)&&this.delegate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new V(e);return l("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return Y(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#n(e){const t=new Promise(e=>this.#t=e),n=l("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#t},target:this.target});return this.url=n.detail.url,n.defaultPrevented&&await t,n}#r(e){return!l("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}function Y(e){return U(e)==K.get}function Z(e,t,n,r){const i=Array.from(n).length>0?new URLSearchParams(J(n)):e.searchParams;return Y(t)?[Q(e,i),null]:r==G.urlEncoded?[e,i]:[e,n]}function J(e){const t=[];for(const[n,r]of e)r instanceof File||t.push([n,r]);return t}function Q(e,t){const n=new URLSearchParams(J(t));return e.search=n.toString(),e}class ee{started=!1;constructor(e,t){this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{const t=e.slice(-1)[0];t?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}}class te{static contentType="text/vnd.turbo-stream.html";static wrap(e){return"string"==typeof e?new this(function(e){const t=document.createElement("template");return t.innerHTML=e,t.content}(e)):e}constructor(e){this.fragment=function(e){for(const t of e.querySelectorAll("turbo-stream")){const e=document.importNode(t,!0);for(const t of e.templateElement.content.querySelectorAll("script"))t.replaceWith(a(t));t.replaceWith(e)}return e}(e)}}const ne=e=>e;class re{keys=[];entries={};#i;constructor(e,t=ne){this.size=e,this.#i=t}has(e){return this.#i(e)in this.entries}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){for(const e of Object.keys(this.entries))this.evict(e)}read(e){return this.entries[this.#i(e)]}write(e,t){this.entries[this.#i(e)]=t}touch(e){e=this.#i(e);const t=this.keys.indexOf(e);t>-1&&this.keys.splice(t,1),this.keys.unshift(e),this.trim()}trim(){for(const e of this.keys.splice(this.size))this.evict(e)}evict(e){delete this.entries[e]}}const ie=1e4,oe=new class extends re{#o=null;#s={};constructor(e=1,t=100){super(e,H),this.prefetchDelay=t}putLater(e,t,n){this.#o=setTimeout(()=>{t.perform(),this.put(e,t,n),this.#o=null},this.prefetchDelay)}put(e,t,n=ie){super.put(e,t),this.#s[H(e)]=new Date((new Date).getTime()+n)}clear(){super.clear(),this.#o&&clearTimeout(this.#o)}evict(e){super.evict(e),delete this.#s[e]}has(e){if(super.has(e)){const t=this.#s[H(e)];return t&&t>Date.now()}return!1}},se={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"};class ae{state=se.initialized;static confirmMethod(e){return Promise.resolve(confirm(e))}constructor(e,t,n,r=!1){const i=function(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method")||"";return U(n.toLowerCase())||K.get}(t,n),o=function(e,t){const n=I(e);Y(t)&&(n.search="");return n}(function(e,t){const n="string"==typeof e.action?e.action:null;return t?.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||n||""}(t,n),i),s=function(e,t){const n=new FormData(e),r=t?.getAttribute("name"),i=t?.getAttribute("value");r&&n.append(r,i||"");return n}(t,n),a=function(e,t){return function(e){switch(e.toLowerCase()){case G.multipart:return G.multipart;case G.plain:return G.plain;default:return G.urlEncoded}}(t?.getAttribute("formenctype")||e.enctype)}(t,n);this.delegate=e,this.formElement=t,this.submitter=n,this.fetchRequest=new X(this,i,o,s,t,a),this.mustRedirect=r}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=I(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){const{initialized:e,requesting:t}=se,n=g("data-turbo-confirm",this.submitter,this.formElement);if("string"==typeof n){const e="function"==typeof R.forms.confirm?R.forms.confirm:ae.confirmMethod;if(!await e(n,this.formElement,this.submitter))return}if(this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=se;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){const t=function(e){if(null!=e){const t=(document.cookie?document.cookie.split("; "):[]).find(t=>t.startsWith(e));if(t){const e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}
2(S("csrf-param"))||S("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(te.contentType)}requestStarted(e){this.state=se.waiting,this.submitter&&R.forms.submitter.beforeSubmit(this.submitter),this.setSubmitsWith(),v(this.formElement),l("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){oe.clear(),this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(oe.clear(),this.requestMustRedirect(e)&&function(e){return 200==e.statusCode&&!e.redirected}(t)){const e=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=se.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){this.state=se.stopped,this.submitter&&R.forms.submitter.afterSubmit(this.submitter),this.resetSubmitterText(),b(this.formElement),l("turbo:submit-end",{target:this.formElement,detail:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(this.submitter&&this.submitsWith)if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){const e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}resetSubmitterText(){if(this.submitter&&this.originalSubmitText)if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){this.submitter.value=this.originalSubmitText}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||function(e,...t){return t.some(t=>t&&t.hasAttribute(e))}("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}}class le{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return M(this.element)}get permanentElements(){return ue(this.element)}getPermanentElementById(e){return ce(this.element,e)}getPermanentElementMapForSnapshot(e){const t={};for(const n of this.permanentElements){const{id:r}=n,i=e.getPermanentElementById(r);i&&(t[r]=[n,i])}return t}}function ce(e,t){return e.querySelector(`#${t}[data-turbo-permanent]`)}function ue(e){return e.querySelectorAll("[id][data-turbo-permanent]")}class de{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){const t=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;t&&function(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method");return"dialog"!=n}(t,n)&&function(e,t){const n=t?.getAttribute("formtarget")||e.getAttribute("target");return O(n)}(t,n)&&this.delegate.willSubmitForm(t,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,n))}}}class he{#a=e=>{};#l=e=>{};constructor(e,t){this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.focusElement(t),this.scrollToElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(F(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}
2async render(e){const{isPreview:t,shouldRender:n,willRender:r,newSnapshot:i}=e,o=r;if(n)try{this.renderPromise=new Promise(e=>this.#a=e),this.renderer=e,await this.prepareToRenderSnapshot(e);const n=new Promise(e=>this.#l=e),r={resume:this.#l,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(i,r)||await n,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(i,t,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#a(void 0),delete this.renderPromise}else o&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class fe extends he{missing(){this.element.innerHTML='<strong class="turbo-frame-error">Content missing</strong>'}get snapshot(){return new le(this.element)}}class me{constructor(e,t){this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.clickEventIsSignificant(e)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.clickEventIsSignificant(e)&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};clickEventIsSignificant(e){const t=e.composed?e.target?.parentElement:e.target,n=C(t)||t;return n instanceof Element&&n.closest("turbo-frame, html")==this.element}}class pe{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){const t=C(e.composedPath&&e.composedPath()[0]||e.target);if(t&&O(t.target)){const n=q(t);this.delegate.willFollowLinkToLocation(t,n,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(t,n))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}}class ge{constructor(e,t){this.delegate=e,this.linkInterceptor=new pe(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,t){return!1}prefetchAndCacheRequestToLocation(e,t){}willFollowLinkToLocation(e,t,n){return this.delegate.willSubmitFormLinkToLocation(e,t,n)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,t){const n=document.createElement("form");for(const[e,r]of t.searchParams)n.append(Object.assign(document.createElement("input"),{type:"hidden",name:e,value:r}));const r=Object.assign(t,{search:""});n.setAttribute("data-turbo","true"),n.setAttribute("action",r.href),n.setAttribute("hidden","");const i=e.getAttribute("data-turbo-method");i&&n.setAttribute("method",i);const o=e.getAttribute("data-turbo-frame");o&&n.setAttribute("data-turbo-frame",o);const s=E(e);s&&n.setAttribute("data-turbo-action",s);const a=e.getAttribute("data-turbo-confirm");a&&n.setAttribute("data-turbo-confirm",a);e.hasAttribute("data-turbo-stream")&&n.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,n),document.body.appendChild(n),n.addEventListener("turbo:submit-end",()=>n.remove(),{once:!0}),requestAnimationFrame(()=>n.requestSubmit())}}
2class ve{static async preservingPermanentElements(e,t,n){const r=new this(e,t);r.enter(),await n(),r.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(const e in this.permanentElementMap){const[t,n]=this.permanentElementMap[e];this.delegate.enteringBardo(t,n),this.replaceNewPermanentElementWithPlaceholder(n)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=function(e){const t=document.createElement("meta");return t.setAttribute("name","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);t?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}class be{#c=null;static renderElement(e,t){}constructor(e,t,n,r=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=n,this.willRender=r,this.renderElement=this.constructor.renderElement,this.promise=new Promise((e,t)=>this.resolvingFunctions={resolve:e,reject:t})}get shouldRender(){return!0}get shouldAutofocus(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await ve.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){if(this.shouldAutofocus){const e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}}enteringBardo(e){this.#c||e.contains(this.currentSnapshot.activeElement)&&(this.#c=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#c)&&this.#c instanceof HTMLElement&&(this.#c.focus(),this.#c=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}}class ye extends be{static renderElement(e,t){const n=document.createRange();n.selectNodeContents(e),n.deleteContents();const r=t,i=r.ownerDocument?.createRange();i&&(i.selectNodeContents(r),e.appendChild(i.extractContents()))}constructor(e,t,n,r,i,o=!0){super(t,n,r,i,o),this.delegate=e}get shouldRender(){return!0}async render(){await u(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await u(),this.focusFirstAutofocusableElement(),await u(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const n=this.currentElement.firstElementChild,r=(e=this.currentElement.getAttribute("data-autoscroll-block"),t="end","end"==e||"start"==e||"center"==e||"nearest"==e?e:t),i=function(e,t){return"auto"==e||"smooth"==e?e:t}(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(n)return n.scrollIntoView({block:r,behavior:i}),!0}var e,t;return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=a(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}var we=function(){const e=()=>{},t={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:e,afterNodeAdded:e,beforeNodeMorphed:e,afterNodeMorphed:e,beforeNodeRemoved:e,afterNodeRemoved:e,beforeAttributeUpdated:e},head:{style:"merge",shouldPreserve:e=>"true"===e.getAttribute("im-preserve"),shouldReAppend:e=>"true"===e.getAttribute("im-re-append"),shouldRemove:e,afterHeadMorphed:e},restoreFocus:!0};const n=function(){function e(e,t,n,i){if(!1===i.callbacks.beforeNodeAdded(t))return null;if(i.idMap.has(t)){const o=document.createElement(t.tagName);return e.insertBefore(o,n),r(o,t,i),i.callbacks.afterNodeAdded(o),o}{const r=document.importNode(t,!0);return e.insertBefore(r,n),i.callbacks.afterNodeAdded(r),r}}const t=function(){function e(e,t,n){let r=e.idMap.get(t),i=e.idMap.get(n);if(!i||!r)return!1;for(const e of r)if(i.has(e))return!0;return!1}function t(e,t){const n=e,r=t;return n.nodeType===r.nodeType&&n.tagName===r.tagName&&(!n.getAttribute?.("id")||n.getAttribute?.("id")===r.getAttribute?.("id"))}return function(n,r,i,o){let s=null,a=r.nextSibling,l=0,c=i;for(;c&&c!=o;){if(t(c,r)){if(e(n,c,r))return c;null===s&&(n.idMap.has(c)||(s=c))}if(null===s&&a&&t(c,a)&&(l++,a=a.nextSibling,l>=2&&(s=void 0)),n.activeElementAndParents.includes(c))break;c=c.nextSibling}return s||null}}();function n(e,t){if(e.idMap.has(t))s(e.pantry,t,null);else{if(!1===e.callbacks.beforeNodeRemoved(t))return;t.parentNode?.removeChild(t),e.callbacks.afterNodeRemoved(t)}}function i(e,t,r){let i=t;for(;i&&i!==r;){let t=i;i=i.nextSibling,n(e,t)}return i}function o(e,t,n,r){const i=r.target.getAttribute?.("id")===t&&r.target||r.target.querySelector(`[id="${t}"]`)||r.pantry.querySelector(`[id="${t}"]`);return function(e,t){const n=e.getAttribute("id");for(;e=e.parentNode;){let r=t.idMap.get(e);r&&(r.delete(n),r.size||t.idMap.delete(e))}}(i,r),s(e,i,n),i}function s(e,t,n){if(e.moveBefore)try{e.moveBefore(t,n)}catch(r){e.insertBefore(t,n)}else e.insertBefore(t,n)}return function(s,a,l,c=null,u=null){a instanceof HTMLTemplateElement&&l instanceof HTMLTemplateElement&&(a=a.content,l=l.content),c||=a.firstChild;for(const n of l.childNodes){if(c&&c!=u){const e=t(s,n,c,u);if(e){e!==c&&i(s,c,e),r(e,n,s),c=e.nextSibling;continue}}if(n instanceof Element){const e=n.getAttribute("id");if(s.persistentIds.has(e)){const t=o(a,e,c,s);r(t,n,s),c=t.nextSibling;continue}}const l=e(a,n,c,s);l&&(c=l.nextSibling)}for(;c&&c!=u;){const e=c;c=c.nextSibling,n(s,e)}}}(),r=function(){function e(e,n,r,i){const o=n[r];if(o!==e[r]){const s=t(r,e,"update",i);s||(e[r]=n[r]),o?s||e.setAttribute(r,""):t(r,e,"remove",i)||e.removeAttribute(r)}}function t(e,t,n,r){return!("value"!==e||!r.ignoreActiveValue||t!==document.activeElement)||!1===r.callbacks.beforeAttributeUpdated(e,t,n)}function r(e,t){return!!t.ignoreActiveValue&&e===document.activeElement&&e!==document.body}return function(o,s,a){return a.ignoreActive&&o===document.activeElement?null:(!1===a.callbacks.beforeNodeMorphed(o,s)||(o instanceof HTMLHeadElement&&a.head.ignore||(o instanceof HTMLHeadElement&&"morph"!==a.head.style?i(o,s,a):(!function(n,i,o){let s=i.nodeType;if(1===s){const s=n,a=i,l=s.attributes,c=a.attributes;for(const e of c)t(e.name,s,"update",o)||s.getAttribute(e.name)!==e.value&&s.setAttribute(e.name,e.value);for(let e=l.length-1;0<=e;e--){const n=l[e];
vendor: 5,237 bytes, line 2
2if(n&&!a.hasAttribute(n.name)){if(t(n.name,s,"remove",o))continue;s.removeAttribute(n.name)}}r(s,o)||function(n,r,i){if(n instanceof HTMLInputElement&&r instanceof HTMLInputElement&&"file"!==r.type){let o=r.value,s=n.value;e(n,r,"checked",i),e(n,r,"disabled",i),r.hasAttribute("value")?s!==o&&(t("value",n,"update",i)||(n.setAttribute("value",o),n.value=o)):t("value",n,"remove",i)||(n.value="",n.removeAttribute("value"))}else if(n instanceof HTMLOptionElement&&r instanceof HTMLOptionElement)e(n,r,"selected",i);else if(n instanceof HTMLTextAreaElement&&r instanceof HTMLTextAreaElement){let e=r.value,o=n.value;if(t("value",n,"update",i))return;e!==o&&(n.value=e),n.firstChild&&n.firstChild.nodeValue!==e&&(n.firstChild.nodeValue=e)}}(s,a,o)}8!==s&&3!==s||n.nodeValue!==i.nodeValue&&(n.nodeValue=i.nodeValue)}(o,s,a),r(o,a)||n(a,o,s))),a.callbacks.afterNodeMorphed(o,s)),o)}}();function i(e,t,n){let r=[],i=[],o=[],s=[],a=new Map;for(const e of t.children)a.set(e.outerHTML,e);for(const t of e.children){let e=a.has(t.outerHTML),r=n.head.shouldReAppend(t),l=n.head.shouldPreserve(t);e||l?r?i.push(t):(a.delete(t.outerHTML),o.push(t)):"append"===n.head.style?r&&(i.push(t),s.push(t)):!1!==n.head.shouldRemove(t)&&i.push(t)}s.push(...a.values());let l=[];for(const t of s){let i=document.createRange().createContextualFragment(t.outerHTML).firstChild;if(!1!==n.callbacks.beforeNodeAdded(i)){if("href"in i&&i.href||"src"in i&&i.src){let e,t=new Promise(function(t){e=t});i.addEventListener("load",function(){e()}),l.push(t)}e.appendChild(i),n.callbacks.afterNodeAdded(i),r.push(i)}}for(const t of i)!1!==n.callbacks.beforeNodeRemoved(t)&&(e.removeChild(t),n.callbacks.afterNodeRemoved(t));return n.head.afterHeadMorphed(e,{added:r,kept:o,removed:i}),l}const o=function(){function e(){const e=document.createElement("div");return e.hidden=!0,document.body.insertAdjacentElement("afterend",e),e}function n(e){let t=[],n=document.activeElement;if("BODY"!==n?.tagName&&e.contains(n))for(;n&&(t.push(n),n!==e);)n=n.parentElement;return t}function r(e){let t=Array.from(e.querySelectorAll("[id]"));return e.getAttribute?.("id")&&t.push(e),t}function i(e,t,n,r){for(const i of r){const r=i.getAttribute("id");if(t.has(r)){let t=i;for(;t;){let i=e.get(t);if(null==i&&(i=new Set,e.set(t,i)),i.add(r),t===n)break;t=t.parentElement}}}}return function(o,s,a){const{persistentIds:l,idMap:c}=function(e,t){const n=r(e),o=r(t),s=function(e,t){let n=new Set,r=new Map;for(const{id:t,tagName:i}of e)r.has(t)?n.add(t):r.set(t,i);let i=new Set;for(const{id:e,tagName:o}of t)i.has(e)?n.add(e):r.get(e)===o&&i.add(e);for(const e of n)i.delete(e);return i}(n,o);let a=new Map;i(a,s,e,n);const l=t.__idiomorphRoot||t;return i(a,s,l,o),{persistentIds:s,idMap:a}}(o,s),u=function(e){let n=Object.assign({},t);return Object.assign(n,e),n.callbacks=Object.assign({},t.callbacks,e.callbacks),n.head=Object.assign({},t.head,e.head),n}(a),d=u.morphStyle||"outerHTML";if(!["innerHTML","outerHTML"].includes(d))throw`Do not understand how to morph style ${d}`;return{target:o,newContent:s,config:u,morphStyle:d,ignoreActive:u.ignoreActive,ignoreActiveValue:u.ignoreActiveValue,restoreFocus:u.restoreFocus,idMap:c,persistentIds:l,pantry:e(),activeElementAndParents:n(o),callbacks:u.callbacks,head:u.head}}}(),{normalizeElement:s,normalizeParent:a}=function(){const e=new WeakSet;class t{constructor(e){this.originalNode=e,this.realParentNode=e.parentNode,this.previousSibling=e.previousSibling,this.nextSibling=e.nextSibling}get childNodes(){const e=[];let t=this.previousSibling?this.previousSibling.nextSibling:this.realParentNode.firstChild;for(;t&&t!=this.nextSibling;)e.push(t),t=t.nextSibling;return e}querySelectorAll(e){return this.childNodes.reduce((t,n)=>{if(n instanceof Element){n.matches(e)&&t.push(n);const r=n.querySelectorAll(e);for(let e=0;e<r.length;e++)t.push(r[e])}return t},[])}insertBefore(e,t){return this.realParentNode.insertBefore(e,t)}moveBefore(e,t){return this.realParentNode.moveBefore(e,t)}get __idiomorphRoot(){return this.originalNode}}return{normalizeElement:function(e){return e instanceof Document?e.documentElement:e},normalizeParent:function n(r){if(null==r)return document.createElement("div");if("string"==typeof r)return n(function(t){let n=new DOMParser,r=t.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,"");if(r.match(/<\/html>/)||r.match(/<\/head>/)||r.match(/<\/body>/)){let i=n.parseFromString(t,"text/html");if(r.match(/<\/html>/))return e.add(i),i;{let t=i.firstChild;return t&&e.add(t),t}}{let r=n.parseFromString("<body><template>"+t+"</template></body>","text/html").body.querySelector("template").content;return e.add(r),r}}(r));if(e.has(r))return r;if(r instanceof Node){if(r.parentNode)return new t(r);{const e=document.createElement("div");return e.append(r),e}}{const e=document.createElement("div");for(const t of[...r])e.append(t);return e}}}}();return{morph:function(e,t,r={}){e=s(e);const l=a(t),c=o(e,l,r),u=function(e,t){if(!e.config.restoreFocus)return t();let n=document.activeElement;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return t();const{id:r,selectionStart:i,selectionEnd:o}=n,s=t();r&&r!==document.activeElement?.getAttribute("id")&&(n=e.target.querySelector(`[id="${r}
2"]`),n?.focus());n&&!n.selectionEnd&&o&&n.setSelectionRange(i,o);return s}(c,()=>function(e,t,n,r){if(e.head.block){const o=t.querySelector("head"),s=n.querySelector("head");if(o&&s){const t=i(o,s,e);return Promise.all(t).then(()=>{const t=Object.assign(e,{head:{block:!1,ignore:!0}});return r(t)})}}return r(e)}(c,e,l,t=>"innerHTML"===t.morphStyle?(n(t,e,l),Array.from(e.childNodes)):function(e,t,r){const i=a(t);return n(e,i,r,t,t.nextSibling),Array.from(i.childNodes)}(t,e,l)));return c.pantry.remove(),u},defaults:t}}();function Ee(e,t,{callbacks:n,...r}={}){we.morph(e,t,{...r,callbacks:new xe(n)})}function Ae(e,t,n={}){Ee(e,t.childNodes,{...n,morphStyle:"innerHTML"})}function Se(e,t){return e instanceof o&&e.shouldReloadWithMorph&&(!t||function(e,t){return t instanceof Element&&"TURBO-FRAME"===t.nodeName&&e.id===t.id&&(!t.getAttribute("src")||j(e.src,t.getAttribute("src")))}(e,t))&&!e.closest("[data-turbo-permanent]")}function Te(e){return e.parentElement.closest("turbo-frame[src][refresh=morph]")}class xe{#u;constructor({beforeNodeMorphed:e}={}){this.#u=e||(()=>!0)}beforeNodeAdded=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));beforeNodeMorphed=(e,t)=>{if(e instanceof Element){if(!e.hasAttribute("data-turbo-permanent")&&this.#u(e,t)){return!l("turbo:before-morph-element",{cancelable:!0,target:e,detail:{currentElement:e,newElement:t}}).defaultPrevented}return!1}};beforeAttributeUpdated=(e,t,n)=>!l("turbo:before-morph-attribute",{cancelable:!0,target:t,detail:{attributeName:e,mutationType:n}}).defaultPrevented;beforeNodeRemoved=e=>this.beforeNodeMorphed(e);afterNodeMorphed=(e,t)=>{e instanceof Element&&l("turbo:morph-element",{target:e,detail:{currentElement:e,newElement:t}})}}class Le extends ye{static renderElement(e,t){l("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:t}}),Ae(e,t,{callbacks:{beforeNodeMorphed:(t,n)=>!Se(t,n)||Te(t)!==e||(t.reload(),!1)}})}async preservingPermanentElements(e){return await e()}}class Me{static animationDuration=300;static get defaultCSS(){return m`
3      .turbo-progress-bar {
4        position: fixed;
5        display: block;
6        top: 0;
7        left: 0;
8        height: 3px;
9        background: #0076ff;
10        z-index: 2147483647;
11        transition:
12          width ${Me.animationDuration}ms ease-out,
13          opacity ${Me.animationDuration/2}ms ${Me.animationDuration/2}ms ease-in;
14        transform: translate3d(0, 0, 0);
15      }
16    `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*Me.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,Me.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=10+90*this.value+"%"})}createStylesheetElement(){const e=document.createElement("style");e.type="text/css",e.textContent=Me.defaultCSS;const t=T();return t&&(e.nonce=t),e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}}class Oe extends le{detailsByOuterHTML=this.children.filter(e=>!function(e){const t=e.localName;return"noscript"==t}(e)).map(e=>function(e){e.hasAttribute("nonce")&&e.setAttribute("nonce","");return e}(e)).reduce((e,t)=>
16{const{outerHTML:n}=t,r=n in e?e[n]:{type:Ce(t),tracked:ke(t),elements:[]};return{...e,[n]:{...r,elements:[...r.elements,t]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(e=>!(e in t.detailsByOuterHTML)).map(e=>this.detailsByOuterHTML[e]).filter(({type:t})=>t==e).map(({elements:[e]})=>e)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{const{type:n,tracked:r,elements:i}=this.detailsByOuterHTML[t];return null!=n||r?i.length>1?[...e,...i.slice(1)]:e:[...e,...i]},[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,n)=>{const{elements:[r]}=this.detailsByOuterHTML[n];return function(e,t){const n=e.localName;return"meta"==n&&e.getAttribute("name")==t}(r,e)?r:t},0)}}function Ce(e){return function(e){const t=e.localName;return"script"==t}
16(e)?"script":function(e){const t=e.localName;return"style"==t||"link"==t&&"stylesheet"==e.getAttribute("rel")}(e)?"stylesheet":void 0}function ke(e){return"reload"==e.getAttribute("data-turbo-track")}class Pe extends le{static fromHTMLString(e=""){return this.fromDocument(f(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:t,head:n}){return new this(e,t,new Oe(n))}constructor(e,t,n){super(t),this.documentElement=e,this.headSnapshot=n}clone(){const e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),n=e.querySelectorAll("select");for(const[e,r]of t.entries()){const t=n[e];for(const e of t.selectedOptions)e.selected=!1;for(const e of r.selectedOptions)t.options[e.index].selected=!0}for(const t of e.querySelectorAll('input[type="password"]'))t.value="";for(const t of e.querySelectorAll("noscript"))t.remove();return new Pe(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get dir(){return this.documentElement.getAttribute("dir")}get headElement(){return this.headSnapshot.element}get rootLocation(){return I(this.getSetting("root")??"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}get prefersViewTransitions(){return("true"===this.getSetting("view-transition")||"same-origin"===this.headSnapshot.getMetaValue("view-transition"))&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}get refreshMethod(){return this.getSetting("refresh-method")}get refreshScroll(){return this.getSetting("refresh-scroll")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}class Re{#d=!1;#h=Promise.resolve();renderChange(e,t){return e&&this.viewTransitionsAvailable&&!this.#d?(this.#d=!0,this.#h=this.#h.then(async()=>{await document.startViewTransition(t).finished})):this.#h=this.#h.then(t),this.#h}get viewTransitionsAvailable(){return document.startViewTransition}}const Ie={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1,refresh:{}},Fe="visitStart",De="requestStart",Ne="requestEnd",Be="visitEnd",qe="initialized",He="started",je="canceled",$e="failed",Ve="completed",ze=0,We=-1,_e=-2,Ue={advance:"forward",restore:"back",replace:"none"};class Ke{identifier=p();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=qe;viewTransitioner=new Re;constructor(e,t,n,r={}){this.delegate=e,this.location=t,this.restorationIdentifier=n||p();const{action:i,historyChanged:o,referrer:s,snapshot:a,snapshotHTML:l,response:c,visitCachedSnapshot:u,willRender:d,updateHistory:h,shouldCacheSnapshot:f,acceptsStreamResponse:m,direction:g,refresh:v}={...Ie,...r};this.action=i,this.historyChanged=o,this.referrer=s,this.snapshot=a,this.snapshotHTML=l,this.response=c,this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=u,this.willRender=d,this.updateHistory=h,this.scrolled=!d,this.shouldCacheSnapshot=f,this.acceptsStreamResponse=m,this.direction=g||Ue[i],this.refresh=v}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}start(){this.state==qe&&(this.recordTimingMetric(Fe),this.state=He,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==He&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=je)}complete(){this.state==He&&(this.recordTimingMetric(Be),this.adapter.visitCompleted(this),this.state=Ve,this.followRedirect(),this.followedRedirect||this.delegate.visitCompleted(this))}fail(){this.state==He&&(this.state=$e,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){const e=w(this.location.href===this.referrer?.href?"replace":this.action);this.history.update(e,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new X(this,K.get,this.location),this.request.perform())}
16simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(De),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;Ge(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(Ne),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,Ge(e)&&null!=t){const e=Pe.fromHTMLString(t);await this.renderPageSnapshot(e,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(Pe.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!F(this.location)||e.hasAnchor(F(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return Pe.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,t),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(te.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:i}=t;null==n?this.recordResponse({statusCode:_e,redirected:r}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:i,responseHTML:n,redirected:r}))}async requestFailedWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:i}=t;null==n?this.recordResponse({statusCode:_e,redirected:r}):this.recordResponse({statusCode:i,responseHTML:n,redirected:r})}requestErrored(e,t){this.recordResponse({statusCode:ze,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||this.view.shouldPreserveScrollPosition(this)||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=F(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=(new Date).getTime()}getTimingMetrics(){return{...this.timingMetrics}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return"restore"==this.action?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(e=>{this.frame="hidden"===document.visibilityState?setTimeout(()=>e(),0):requestAnimationFrame(()=>e())}),await e(),delete this.frame}async renderPageSnapshot(e,t){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,t,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function Ge(e){return e>=200&&e<300}class Xe{progressBar=new Me;constructor(e){this.session=e}visitProposedToLocation(e,t){B(e,this.navigator.rootLocation)?this.navigator.startVisit(e,t?.restorationIdentifier||p(),t):window.location.href=e.toString()}visitStarted(e){this.location=e.location,this.redirectedToLocation=null,e.loadCachedSnapshot(),e.issueRequest()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse(),e.response.redirected&&(this.redirectedToLocation=e.redirectedToLocation)}visitRequestFailedWithStatusCode(e,t){switch(t){case ze:case We:case _e:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}linkPrefetchingIsEnabledForLocation(e){return!0}
16formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){l("turbo:reload",{detail:e}),window.location.href=(this.redirectedToLocation||this.location)?.toString()||window.location.href}get navigator(){return this.session.navigator}}class Ye{selector="[data-turbo-temporary]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(const e of this.temporaryElements)e.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector)]}}class Ze{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new me(this,t),this.formSubmitObserver=new de(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,n){return this.#f(e)}linkClickIntercepted(e,t,n){const r=this.#m(e);r&&r.delegate.linkClickIntercepted(e,t,n)}willSubmitForm(e,t){return null==e.closest("turbo-frame")&&this.#p(e,t)&&this.#f(e,t)}formSubmitted(e,t){const n=this.#m(e,t);n&&n.delegate.formSubmitted(e,t)}#p(e,t){const n=D(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),i=I(r?.content??"/");return this.#f(e,t)&&B(n,i)}#f(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){const n=this.#m(e,t);return!!n&&n!=e.closest("turbo-frame")}return!1}#m(e,t){const n=t?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(n&&"_top"!=n){const e=this.element.querySelector(`#${n}:not([disabled])`);if(e instanceof o)return e}}}class Je{location;restorationIdentifier=p();restorationData={};started=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,n=p()){e===history.pushState&&++this.currentIndex;const r={turbo:{restorationIdentifier:n,restorationIndex:this.currentIndex}};e.call(history,r,"",t.href),this.location=t,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,n=this.restorationData[t];this.restorationData[t]={...n,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{const{turbo:t}=e.state||{};if(this.location=new URL(window.location.href),t){const{restorationIdentifier:e,restorationIndex:n}=t;this.restorationIdentifier=e;const r=n>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,e,r),this.currentIndex=n}else this.currentIndex++,this.delegate.historyPoppedWithEmptyState(this.location)}}class Qe{started=!1;#g=null;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||("loading"===this.eventTarget.readyState?this.eventTarget.addEventListener("DOMContentLoaded",this.#v,{once:!0}):this.#v())}stop(){this.started&&(this.eventTarget.removeEventListener("mouseenter",this.#b,{capture:!0,passive:!0}
16),this.eventTarget.removeEventListener("mouseleave",this.#y,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#w,!0),this.started=!1)}#v=()=>{this.eventTarget.addEventListener("mouseenter",this.#b,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#y,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#w,!0),this.started=!0};#b=e=>{if("false"===S("turbo-prefetch"))return;const t=e.target;if(t.matches&&t.matches("a[href]:not([target^=_]):not([download])")&&this.#E(t)){const e=t,n=q(e);if(this.delegate.canPrefetchRequestToLocation(e,n)){this.#g=e;const r=new X(this,K.get,n,new URLSearchParams,t);r.fetchOptions.priority="low",oe.putLater(n,r,this.#A)}}};#y=e=>{e.target===this.#g&&this.#S()};#S=()=>{oe.clear(),this.#g=null};#w=e=>{if("FORM"!==e.target.tagName&&"GET"===e.detail.fetchOptions.method){const t=oe.get(e.detail.url);t&&(e.detail.fetchRequest=t),oe.clear()}};prepareRequest(e){const t=e.target;e.headers["X-Sec-Purpose"]="prefetch";const n=t.closest("turbo-frame"),r=t.getAttribute("data-turbo-frame")||n?.getAttribute("target")||n?.id;r&&"_top"!==r&&(e.headers["Turbo-Frame"]=r)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}get#A(){return Number(S("turbo-prefetch-cache-time"))||ie}#E(e){return!!e.getAttribute("href")&&(!et(e)&&(!tt(e)&&(!nt(e)&&(!rt(e)&&!ot(e)))))}}const et=e=>e.origin!==document.location.origin||!["http:","https:"].includes(e.protocol)||e.hasAttribute("target"),tt=e=>e.pathname+e.search===document.location.pathname+document.location.search||e.href.startsWith("#"),nt=e=>{if("false"===e.getAttribute("data-turbo-prefetch"))return!0;if("false"===e.getAttribute("data-turbo"))return!0;const t=x(e,"[data-turbo-prefetch]");return!(!t||"false"!==t.getAttribute("data-turbo-prefetch"))},rt=e=>{const t=e.getAttribute("data-turbo-method");return!(!t||"get"===t.toLowerCase())||(!!it(e)||(!!e.hasAttribute("data-turbo-confirm")||!!e.hasAttribute("data-turbo-stream")))},it=e=>e.hasAttribute("data-remote")||e.hasAttribute("data-behavior")||e.hasAttribute("data-confirm")||e.hasAttribute("data-method"),ot=e=>l("turbo:before-prefetch",{target:e,cancelable:!0}).defaultPrevented;class st{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&this.delegate.visitProposedToLocation(e,t)}startVisit(e,t,n={}){this.stop(),this.currentVisit=new Ke(this,I(e),t,{referrer:this.location,...n}),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new ae(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const n=await t.responseHTML;if(n){const r=e.isSafe;r||this.view.clearSnapshotCache();const{statusCode:i,redirected:o}=t,s={action:this.#T(e,t),shouldCacheSnapshot:r,response:{statusCode:i,responseHTML:n,redirected:o}};this.proposeVisit(t.location,s)}}}async formSubmissionFailedWithResponse(e,t){const n=await t.responseHTML;if(n){const e=Pe.fromHTMLString(n);t.serverError?await this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,!1,!0,this.currentVisit),"preserve"!==e.refreshScroll&&this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}linkPrefetchingIsEnabledForLocation(e){return"function"!=typeof this.adapter.linkPrefetchingIsEnabledForLocation||this.adapter.linkPrefetchingIsEnabledForLocation(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e),delete this.currentVisit}locationWithActionIsSamePage(e,t){return!1}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#T(e,t){const{submitter:n,formElement:r}=e;return E(n,r)||this.#x(t)}#x(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}}const at=0,lt=1,ct=2,ut=3;class dt{stage=at;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==at&&(this.stage=lt),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{const{readyState:e}=this;
16"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()};pageIsInteractive(){this.stage==lt&&(this.stage=ct,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==ct&&(this.stage=ut,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}}class ht{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}}class ft{render({fragment:e}){ve.preservingPermanentElements(this,function(e){const t=ue(document.documentElement),n={};for(const r of t){const{id:t}=r;for(const i of e.querySelectorAll("turbo-stream")){const e=ce(i.templateElement.content,t);e&&(n[t]=[r,e])}}return n}(e),()=>{!async function(e,t){const n=`turbo-stream-autofocus-${p()}`,r=e.querySelectorAll("turbo-stream"),i=function(e){for(const t of e){const e=M(t.templateElement.content);if(e)return e}return null}(r);let o=null;i&&(o=i.id?i.id:n,i.id=o);t(),await u();if((null==document.activeElement||document.activeElement==document.body)&&o){const e=document.getElementById(o);L(e)&&e.focus(),e&&e.id==n&&e.removeAttribute("id")}}(e,()=>{!async function(e){const[t,n]=await async function(e,t){const n=t();return e(),await d(),[n,t()]}(e,()=>document.activeElement),r=t&&t.id;if(r){const e=document.getElementById(r);L(e)&&e!=n&&e.focus()}}(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}class mt{sources=new Set;#L=!1;constructor(e){this.delegate=e}start(){this.#L||(this.#L=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#L&&(this.#L=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{const t=function(e){const t=e.detail?.fetchResponse;if(t instanceof V)return t}(e);t&&function(e){const t=e.contentType??"";return t.startsWith(te.contentType)}(t)&&(e.preventDefault(),this.receiveMessageResponse(t))};receiveMessageEvent=e=>{this.#L&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(te.wrap(e))}}class pt extends be{static renderElement(e,t){const{documentElement:n,body:r}=document;n.replaceChild(t,r)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const n=a(e);t.replaceChild(n,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class gt extends be{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reason:"turbo_visit_control_is_reload"}}async prepareToRender(){this.#M(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}
16get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#M(){const{documentElement:e}=this.currentSnapshot,{dir:t,lang:n}=this.newSnapshot;n?e.setAttribute("lang",n):e.removeAttribute("lang"),t?e.setAttribute("dir",t):e.removeAttribute("dir")}async mergeHead(){const e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){const e=[];for(const t of this.newHeadStylesheetElements)e.push(y(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(a(e))}removeUnusedDynamicStylesheetElements(){for(const e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){const e=[...this.newHeadProvisionalElements];for(const t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(const t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(const[n,r]of t.entries()){if("TITLE"==e.tagName){if("TITLE"!=r.tagName)continue;if(e.innerHTML==r.innerHTML)return t.splice(n,1),!0}if(r.isEqualNode(e))return t.splice(n,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.removeNoscriptElements(),this.activateNewBodyScriptElements()}removeNoscriptElements(){for(const e of this.newElement.querySelectorAll("noscript"))e.remove()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=a(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>"dynamic"===e.getAttribute("data-turbo-track"))}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class vt extends gt{static renderElement(e,t){Ee(e,t,{callbacks:{beforeNodeMorphed:(e,t)=>!(Se(e,t)&&!Te(e))||(e.reload(),!1)}}),l("turbo:morph",{detail:{currentElement:e,newElement:t}})}async preservingPermanentElements(e){return await e()}get renderMethod(){return"morph"}get shouldAutofocus(){return!1}}class bt extends re{constructor(e){super(e,H)}get snapshots(){return this.entries}}class yt extends he{snapshotCache=new bt(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,t=!1,n=!0,r){const i=new(this.isPageRefresh(r)&&"morph"===(r?.refresh?.method||this.snapshot.refreshMethod)?vt:gt)(this.snapshot,e,t,n);return i.shouldRender?r?.changeHistory():this.forceReloaded=!0,this.render(i)}renderError(e,t){t?.changeHistory();const n=new pt(this.snapshot,e,!1);return this.render(n)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLocation:t}=this;await h();const n=e.clone();return this.snapshotCache.put(t,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&"replace"===e.action}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&"preserve"===(e?.refresh?.scroll||this.snapshot.refreshScroll)}get snapshot(){return Pe.fromElement(this.element)}}class wt{selector="a[data-turbo-preload]";constructor(e,t){this.delegate=e,this.snapshotCache=t}start(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.#O):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#O)}preloadOnLoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(t)&&this.preloadURL(t)}async preloadURL(e){const t=new URL(e.href);if(this.snapshotCache.has(t))return;const n=new X(this,K.get,t,new URLSearchParams,e);await n.perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,t){try{const n=await t.responseHTML,r=Pe.fromHTMLString(n);this.snapshotCache.put(e.url,r)}catch(e){}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}#O=()=>{this.preloadOnLoadLinksForView(document.body)}}class Et{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#C("")}exemptPageFromCache(){this.#C("no-cache")}exemptPageFromPreview(){this.#C("no-preview")}#C(e){!function(e,t){let n=A(e);n||(n=document.createElement("meta"),n.setAttribute("name",e),document.head.appendChild(n)),n.setAttribute("content",t)}("turbo-cache-control",e)}}function At(e){Object.defineProperties(e,St)}const St={absoluteURL:{get(){return this.toString()}}},Tt=new class{navigator=new st(this);history=new Je(this);view=new yt(this,document.documentElement);adapter=new Xe(this);
16pageObserver=new dt(this);cacheObserver=new Ye;linkPrefetchObserver=new Qe(this,document);linkClickObserver=new pe(this,window);formSubmitObserver=new de(this,document);scrollObserver=new ht(this);streamObserver=new mt(this);formLinkClickObserver=new ge(this,document.documentElement);frameRedirector=new Ze(this,document.documentElement);streamMessageRenderer=new ft;cache=new Et(this);enabled=!0;started=!1;#k=150;constructor(e){this.recentRequests=e,this.preloader=new wt(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){const n=t.frame?document.getElementById(t.frame):null;if(n instanceof o){const r=t.action||E(n);n.delegate.proposeVisitIfNavigatedWithAction(n,r),n.src=e.toString()}else this.navigator.proposeVisit(I(e),t)}refresh(e,t={}){t="string"==typeof t?{requestId:t}:t;const{method:n,requestId:r,scroll:i}=t,o=r&&this.recentRequests.has(r),s=e===document.baseURI;o||this.navigator.currentVisit||!s||this.visit(e,{action:"replace",shouldCacheSnapshot:!1,refresh:{method:n,scroll:i}})}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(te.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){console.warn("Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`"),this.progressBarDelay=e}set progressBarDelay(e){R.drive.progressBarDelay=e}get progressBarDelay(){return R.drive.progressBarDelay}set drive(e){R.drive.enabled=e}get drive(){return R.drive.enabled}set formMode(e){R.forms.mode=e}get formMode(){return R.forms.mode}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#k}set pageRefreshDebouncePeriod(e){this.refresh=function(e,t){let n=null;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}(this.debouncedRefresh.bind(this),e),this.#k=e}shouldPreloadLink(e){const t=e.hasAttribute("data-turbo-method"),n=e.hasAttribute("data-turbo-stream"),r=e.getAttribute("data-turbo-frame"),i="_top"==r?null:document.getElementById(r)||x(e,"turbo-frame:not([disabled])");if(t||n||i instanceof o)return!1;{const t=new URL(e.href);return this.elementIsNavigatable(e)&&B(t,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,t,n){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0,direction:n}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}historyPoppedWithEmptyState(e){this.history.replace(e),this.view.lastRenderedLocation=e,this.view.cacheSnapshot()}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&B(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,t){return this.elementIsNavigatable(e)&&B(t,this.snapshot.rootLocation)&&this.navigator.linkPrefetchingIsEnabledForLocation(t)}willFollowLinkToLocation(e,t,n){return this.elementIsNavigatable(e)&&B(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,n)}followedLinkToLocation(e,t){const n=this.getActionForLink(e),r=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:n,acceptsStreamResponse:r})}allowsVisitingLocationWithAction(e,t){return this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){At(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||(v(document.documentElement),this.view.markVisitDirection(e.direction)),At(e.location),this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),b(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}willSubmitForm(e,t){const n=D(e,t);return this.submissionIsNavigatable(e,t)&&B(I(n),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}
16pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){const n=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:r,detail:{render:i}}=n;return this.view.renderer&&i&&(this.view.renderer.renderElement=i),!r}viewRenderedSnapshot(e,t,n){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(n)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,n){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,n).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,n){return l("turbo:click",{target:e,detail:{url:t.href,originalEvent:n},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return l("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return l("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return l("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return l("turbo:before-render",{detail:{newBody:e,...t},cancelable:!0})}notifyApplicationAfterRender(e){return l("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return l("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterFrameLoad(e){return l("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return l("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("off"==R.forms.mode)return!1;{const n=!t||this.elementIsNavigatable(t);return"optin"==R.forms.mode?n&&null!=e.closest('[data-turbo="true"]'):n&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=x(e,"[data-turbo]"),n=x(e,"turbo-frame");return R.drive.enabled||n?!t||"false"!=t.getAttribute("data-turbo"):!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){return E(e)||"advance"}get snapshot(){return this.view.snapshot}}(W),{cache:xt,navigator:Lt}=Tt;function Mt(){Tt.start()}function Ot(e){Tt.connectStreamSource(e)}function Ct(e){Tt.disconnectStreamSource(e)}var kt=Object.freeze({__proto__:null,PageRenderer:gt,PageSnapshot:Pe,FrameRenderer:ye,fetch:_,config:R,session:Tt,cache:xt,navigator:Lt,start:Mt,registerAdapter:function(e){Tt.registerAdapter(e)},visit:function(e,t){Tt.visit(e,t)},connectStreamSource:Ot,disconnectStreamSource:Ct,renderStreamMessage:function(e){Tt.renderStreamMessage(e)},setProgressBarDelay:function(e){console.warn("Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),R.drive.progressBarDelay=e},setConfirmMethod:function(e){console.warn("Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),R.forms.confirm=e},setFormMode:function(e){console.warn("Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),R.forms.mode=e},morphBodyElements:function(e,t){vt.renderElement(e,t)},morphTurboFrameElements:function(e,t){Le.renderElement(e,t)},morphChildren:Ae,morphElements:Ee});class Pt extends Error{}function Rt(e,t){if(e){const n=e.getAttribute("src");if(null!=n&&null!=t&&j(n,t))throw new Error(`Matching <turbo-frame id="${e.id}"> element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof o)return e.connectedCallback(),e.disconnectedCallback(),e}}const It={after(){this.removeDuplicateTargetSiblings(),this.targetElements.forEac
16h(e=>e.parentElement?.insertBefore(this.templateContent,e.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.removeDuplicateTargetSiblings(),this.targetElements.forEach(e=>e.parentElement?.insertBefore(this.templateContent,e))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?Ee(t,this.templateContent):t.replaceWith(this.templateContent)})},update(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?Ae(t,this.templateContent):(t.innerHTML="",t.append(this.templateContent))})},refresh(){const e=this.getAttribute("method"),t=this.requestId,n=this.getAttribute("scroll");Tt.refresh(this.baseURI,{method:e,requestId:t,scroll:n})}};class Ft extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{const e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await u(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){const e=this.targetElements.flatMap(e=>[...e.children]).filter(e=>!!e.getAttribute("id")),t=[...this.templateContent?.children||[]].filter(e=>!!e.getAttribute("id")).map(e=>e.getAttribute("id"));return e.filter(e=>t.includes(e.getAttribute("id")))}removeDuplicateTargetSiblings(){this.duplicateSiblings.forEach(e=>e.remove())}get duplicateSiblings(){const e=this.targetElements.flatMap(e=>[...e.parentElement.children]).filter(e=>!!e.id),t=[...this.templateContent?.children||[]].filter(e=>!!e.id).map(e=>e.id);return e.filter(e=>t.includes(e.id))}get performAction(){if(this.action){const e=It[this.action];if(e)return e;this.#P("unknown action")}this.#P("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.#P("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(null===this.firstElementChild){const e=this.ownerDocument.createElement("template");return this.appendChild(e),e}if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#P("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}get requestId(){return this.getAttribute("request-id")}#P(e){throw new Error(`${this.description}: ${e}`)}get description(){return(this.outerHTML.match(/<[^>]+>/)??[])[0]??"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0,detail:{newStream:this,render:Ft.renderElement}})}get targetElementsById(){const e=this.ownerDocument?.getElementById(this.target);return null!==e?[e]:[]}get targetElementsByQuery(){const e=this.ownerDocument?.querySelectorAll(this.targets);return 0!==e.length?Array.prototype.slice.call(e):[]}}class Dt extends HTMLElement{streamSource=null;connectedCallback(){this.streamSource=this.src.match(/^ws{1,2}:/)?new WebSocket(this.src):new EventSource(this.src),Ot(this.streamSource)}disconnectedCallback(){this.streamSource&&(this.streamSource.close(),Ct(this.streamSource))}get src(){return this.getAttribute("src")||""}}o.delegateConstructor=class{fetchResponseLoaded=e=>Promise.resolve();#R=null;#I=()=>{};#F=!1;#D=!1;#N=new Set;#B=!1;action=null;constructor(e){this.element=e,this.view=new fe(this,this.element),this.appearanceObserver=new ee(this,this.element),this.formLinkClickObserver=new ge(this,this.element),this.linkInterceptor=new me(this,this.element),this.restorationIdentifier=p(),this.formSubmitObserver=new de(this,this.element)}connect(){this.#F||(this.#F=!0,this.loadingStyle==i?this.appearanceObserver.start():this.#q(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.#F&&(this.#F=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop(),this.element.hasAttribute("recurse")||this.#R?.cancel())}disabledChanged(){this.disabled?this.#R?.cancel():this.loadingStyle==r&&this.#q()}sourceURLChanged(){this.#H("src")||(this.sourceURL||this.#R?.cancel(),this.element.isConnected&&(this.complete=!1),(this.loadingStyle==r||this.#D)&&this.#q())}sourceURLReloaded(){const{refresh:e,src:t}=this.element;return this.#B=t&&"morph"===e,this.element.removeAttribute("complete"),this.element.src=null,this.element.src=t,this.element.loaded}loadingStyleChanged(){this.loadingStyle==i?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.#q())}async#q(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.#j(I(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.#D=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{const t=await e.responseHTML;if(t){const n=f(t);Pe.fromDocument(n).isVisitable?await this.#$(e,n):await this.#V(e)}}finally{this.#B=!1,this.fetchResponseLoaded=()=>Promise.resolve()}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,E(e)),this.#q()}willSubmitFormLinkToLocation(e){return this.#z(e)}submittedFormLinkToLocation(e,t,n){const r=this.#m(e);r&&n.setAttribute("data-turbo-frame",r.id)}shouldInterceptLinkClick(e,t,n){return this.#z(e)}linkClickIntercepted(e,t){this.#W(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.#z(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new ae(this,e,t);const{fetchRequest:n}=this.formSubmission,r=this.#m(e,t);this.prepareRequest(n,r),this.formSubmission.start()}
16prepareRequest(e,t=this){e.headers["Turbo-Frame"]=t.id,this.currentNavigationElement?.hasAttribute("data-turbo-stream")&&e.acceptResponseType(te.contentType)}requestStarted(e){v(this.element)}requestPreventedHandlingResponse(e,t){this.#I()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.#I()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.#I()}requestErrored(e,t){console.error(t),this.#I()}requestFinished(e){b(this.element)}formSubmissionStarted({formElement:e}){v(e,this.#m(e))}formSubmissionSucceededWithResponse(e,t){const n=this.#m(e.formElement,e.submitter);n.delegate.proposeVisitIfNavigatedWithAction(n,E(e.submitter,e.formElement,n)),n.delegate.loadResponse(t),e.isSafe||Tt.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),Tt.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){b(e,this.#m(e))}allowsImmediateRender({element:e},t){const n=l("turbo:before-frame-render",{target:this.element,detail:{newFrame:e,...t},cancelable:!0}),{defaultPrevented:r,detail:{render:i}}=n;return this.view.renderer&&i&&(this.view.renderer.renderElement=i),!r}viewRenderedSnapshot(e,t,n){}preloadOnLoadLinksForView(e){Tt.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}visitCachedSnapshot=({element:e})=>{const t=e.querySelector("#"+this.element.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement};async#$(e,t){const n=await this.extractForeignFrameElement(t.body),r=this.#B?Le:ye;if(n){const t=new le(n),i=new r(this,this.view.snapshot,t,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(i),this.complete=!0,Tt.frameRendered(e,this.element),Tt.frameLoaded(this.element),await this.fetchResponseLoaded(e)}else this.#_(e)&&this.#U(e)}async#j(e){const t=new X(this,K.get,e,new URLSearchParams,this.element);return this.#R?.cancel(),this.#R=t,new Promise(e=>{this.#I=()=>{this.#I=()=>{},this.#R=null,e()},t.perform()})}#W(e,t,n){const r=this.#m(e,n);r.delegate.proposeVisitIfNavigatedWithAction(r,E(n,e,r)),this.#K(e,()=>{r.src=t})}proposeVisitIfNavigatedWithAction(e,t=null){if(this.action=t,this.action){const t=Pe.fromElement(e).clone(),{visitCachedSnapshot:n}=e.delegate;e.delegate.fetchResponseLoaded=async r=>{if(e.src){const{statusCode:i,redirected:o}=r,s={response:{statusCode:i,redirected:o,responseHTML:await r.responseHTML},visitCachedSnapshot:n,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:t};this.action&&(s.action=this.action),Tt.visit(e.src,s)}}}}changeHistory(){if(this.action){const e=w(this.action);Tt.history.update(e,I(this.element.src||""),this.restorationIdentifier)}}async#V(e){console.warn(`The response (${e.statusCode}) from <turbo-frame id="${this.element.id}"> is performing a full page visit due to turbo-visit-control.`),await this.#G(e.response)}#_(e){this.element.setAttribute("complete","");const t=e.response;return!l("turbo:frame-missing",{target:this.element,detail:{response:t,visit:async(e,t)=>{e instanceof Response?this.#G(e):Tt.visit(e,t)}},cancelable:!0}).defaultPrevented}#U(e){this.view.missing(),this.#X(e)}#X(e){const t=`The response (${e.statusCode}) did not contain the expected <turbo-frame id="${this.element.id}"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new Pt(t)}async#G(e){const t=new V(e),n=await t.responseHTML,{location:r,redirected:i,statusCode:o}=t;return Tt.visit(r,{response:{redirected:i,statusCode:o,responseHTML:n}})}#m(e,t){const n=g("data-turbo-frame",t,e)||this.element.getAttribute("target"),r=this.#Y(n);return r instanceof o?r:this.element}async extractForeignFrameElement(e){let t;const n=CSS.escape(this.id);try{if(t=Rt(e.querySelector(`turbo-frame#${n}`),this.sourceURL),t)return t;if(t=Rt(e.querySelector(`turbo-frame[src][recurse~=${n}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(e){return console.error(e),new o}return null}#Z(e,t){return B(I(D(e,t)),this.rootLocation)}#z(e,t){const n=g("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.#Z(e,t))return!1;if(!this.enabled||"_top"==n)return!1;if(n){const e=this.#Y(n);if(e)return!e.disabled;if("_parent"==n)return!1}return!!Tt.elementIsNavigatable(e)&&!(t&&!Tt.elementIsNavigatable(t))}
16get id(){return this.element.id}get disabled(){return this.element.disabled}get enabled(){return!this.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.#J("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.#I()}get complete(){return this.element.hasAttribute("complete")}set complete(e){e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}get isActive(){return this.element.isActive&&this.#F}get rootLocation(){const e=this.element.ownerDocument.querySelector('meta[name="turbo-root"]');return I(e?.content??"/")}#H(e){return this.#N.has(e)}#J(e,t){this.#N.add(e),t(),this.#N.delete(e)}#K(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}#Y(e){if(null!=e){const t="_parent"===e?this.element.parentElement.closest("turbo-frame"):document.getElementById(e);if(t instanceof o)return t}}},void 0===customElements.get("turbo-frame")&&customElements.define("turbo-frame",o),void 0===customElements.get("turbo-stream")&&customElements.define("turbo-stream",Ft),void 0===customElements.get("turbo-stream-source")&&customElements.define("turbo-stream-source",Dt),(()=>{const e=document.currentScript;if(!e)return;if(e.hasAttribute("data-turbo-suppress-warning"))return;let t=e.parentElement;for(;t;){if(t==document.body)return console.warn(m`
17        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!
18
19        Load your application’s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.
20
21        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements
22
23        ——
24        Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s
25      `,e.outerHTML);t=t.parentElement}})(),window.Turbo={...kt,StreamActions:It},Mt()},3066(e,t,n){"use strict";n.d(t,{E:()=>s});var r=n(2891),i=n(9473);function o(e){return e.keys().map(t=>function(e,t){const n=function(e){const t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}(t);if(n)return function(e,t){const n=e.default;if("function"==typeof n)return{identifier:t,controllerConstructor:n}}(e(t),n)}(e,t)).filter(e=>e)}function s(e){const t=r.lg.start();t.debug=!0,e&&t.load(o(e));for(const e in i.A)Object.prototype.hasOwnProperty.call(i.A,e)&&t.register(e,i.A[e]);return t}},4601(e,t,n){var r=n(8420),i=n(3838),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not a function")}},298(e,t,n){var r=n(1602),i=n(3105),o=n(3610).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),e.exports=function(e){a[s][e]=!0}},3938(e,t,n){var r=n(5335),i=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw o(i(e)+" is not an object")}},8186(e,t,n){var r=n(5476),i=n(6539),o=n(3493),s=function(e){return function(t,n,s){var a,l=r(t),c=o(l),u=i(s,c);if(e&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},8569(e,t,n){var r=n(281),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},4361(e,t,n){var r=n(6490),i=n(5816),o=n(7632),s=n(3610);e.exports=function(e,t,n){for(var a=i(t),l=s.f,c=o.f,u=0;u<a.length;u++){var d=a[u];r(e,d)||n&&r(n,d)||l(e,d,c(t,d))}}},7712(e,t,n){var r=n(5077),i=n(3610),o=n(6843);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},6843(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7485(e,t,n){var r=n(8420),i=n(3610),o=n(8218),s=n(9430);e.exports=function(e,t,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(r(n)&&o(n,c,a),a.global)l?e[t]=n:s(t,n);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},9430(e,t,n){var r=n(200),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}}
25,5077(e,t,n){var r=n(2074);e.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},3262(e,t,n){var r=n(200),i=n(5335),o=r.document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},7061(e,t,n){var r=n(6492);e.exports=r("navigator","userAgent")||""},6845(e,t,n){var r,i,o=n(200),s=n(7061),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},290(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1605(e,t,n){var r=n(200),i=n(7632).f,o=n(7712),s=n(7485),a=n(9430),l=n(4361),c=n(4977);e.exports=function(e,t){var n,u,d,h,f,m=e.target,p=e.global,g=e.stat;if(n=p?r:g?r[m]||a(m,{}):(r[m]||{}).prototype)for(u in t){if(h=t[u],d=e.dontCallGetSet?(f=i(n,u))&&f.value:n[u],!c(p?u:m+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;l(h,d)}(e.sham||d&&d.sham)&&o(h,"sham",!0),s(n,u,h,e)}}},2074(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},8823(e,t,n){var r=n(2074);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},2368(e,t,n){var r=n(8823),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2071(e,t,n){var r=n(5077),i=n(6490),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&s(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},281(e,t,n){var r=n(8823),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);e.exports=r?function(e){return e&&a(e)}:function(e){return e&&function(){return s.apply(e,arguments)}}},6492(e,t,n){var r=n(200),i=n(8420);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},6457(e,t,n){var r=n(4601),i=n(8406);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},200(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6490(e,t,n){var r=n(281),i=n(2612),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},7708(e){e.exports={}},8890(e,t,n){var r=n(6492);e.exports=r("document","documentElement")},7694(e,t,n){var r=n(5077),i=n(2074),o=n(3262);e.exports=!r&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},8664(e,t,n){var r=n(281),i=n(2074),o=n(8569),s=Object,a=r("".split);e.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(e){return"String"==o(e)?a(e,""):s(e)}:s},9965(e,t,n){var r=n(281),i=n(8420),o=n(9310),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return s(e)}),e.exports=o.inspectSource},9206(e,t,n){var r,i,o,s=n(8369),a=n(200),l=n(281),c=n(5335),u=n(7712),d=n(6490),h=n(9310),f=n(5904),m=n(7708),p="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||h.state){var b=h.state||(h.state=new v),y=l(b.get),w=l(b.has),E=l(b.set);r=function(e,t){if(w(b,e))throw g(p);return t.facade=e,E(b,e,t),t},i=function(e){return y(b,e)||{}},o=function(e){return w(b,e)}}else{var A=f("state");m[A]=!0,r=function(e,t){if(d(e,A))throw g(p);return t.facade=e,u(e,A,t),t},i=function(e){return d(e,A)?e[A]:{}},o=function(e){return d(e,A)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return n}}}},8420(e){e.exports=function(e){return"function"==typeof e}},4977(e,t,n){var r=n(2074),i=n(8420),o=/#|\.prototype\./,s=function(e,t){var n=l[a(e)];return n==u||n!=c&&(i(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},8406(e){e.exports=function(e){return null==e}},5335(e,t,n){var r=n(8420),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;e.exports=o?function(e){return"object"==typeof e?null!==e:r(e)||e===i}:function(e){return"object"==typeof e?null!==e:r(e)}},6926(e){e.exports=!1},2328(e,t,n){var r=n(6492),i=n(8420),o=n(7658),s=n(5225),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&o(t.prototype,a(e))}},3493(e,t,n){var r=n(3747);e.exports=function(e){return r(e.length)}},8218(e,t,n){var r=n(2074),i=n(8420),o=n(6490),s=n(5077),a=n(2071).CONFIGURABLE,l=n(9965),c=n(9206),u=c.enforce,d=c.get,h=Object.defineProperty,f=s&&!r(function(){return 8!==h(function(){},"length",{value:8}).length}),m=String(String).split("String"),p=e.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||a&&e.name!==t)&&(s?h(e,"name",{value:t,configurable:!0}):e.name=t),f&&n&&o(n,"arity")&&e.length!==n.arity&&h(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=u(e);return o(r,"source")||(r.source=m.join("string"==typeof t?t:"")),e};Function.prototype.toString=p(function(){return i(this)&&d(this).source||l(this)},"toString")},9830(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},3105(e,t,n){var r,i=n(3938),o=n(5318),s=n(290),a=n(7708),l=n(8890),c=n(3262),u=n(5904),d="prototype",h="script",f=u("IE_PROTO"),m=function(){},p=function(e){return"<"+h+">"+e+"</"+h+">"},g=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;v="undefined"!=typeof document?document.domain&&r?g(r):(t=c("iframe"),n="java"+h+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):g(r);for(var i=s.length;i--;)delete v[d][s[i]];return v()};a[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[d]=i(e),n=new m,m[d]=null,n[f]=e):n=v(),void 0===t?n:o.f(n,t)}},5318(e,t,n){var r=n(5077),i=n(4491),o=n(3610),s=n(3938),a=n(5476),l=n(1641);t.f=r&&!i?Object.defineProperties:function(e,t){s(e);for(var n,r=a(t),i=l(t),c=i.length,u=0;c>u;)o.f(e,n=i[u++],r[n]);return e}},3610(e,t,n){var r=n(5077),i=n(7694),o=n(4491),s=n(3938),a=n(6032),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",f="writable";t.f=r?o?function(e,t,n){if(s(e),t=a(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&f in n&&!n[f]){var r=u(e,t);
25r&&r[f]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:d in n?n[d]:r[d],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(s(e),t=a(t),s(n),i)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7632(e,t,n){var r=n(5077),i=n(2368),o=n(9304),s=n(6843),a=n(5476),l=n(6032),c=n(6490),u=n(7694),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=a(e),t=l(t),u)try{return d(e,t)}catch(e){}if(c(e,t))return s(!i(o.f,e,t),e[t])}},4789(e,t,n){var r=n(6347),i=n(290).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},8916(e,t){t.f=Object.getOwnPropertySymbols},7658(e,t,n){var r=n(281);e.exports=r({}.isPrototypeOf)},6347(e,t,n){var r=n(281),i=n(6490),o=n(5476),s=n(8186).indexOf,a=n(7708),l=r([].push);e.exports=function(e,t){var n,r=o(e),c=0,u=[];for(n in r)!i(a,n)&&i(r,n)&&l(u,n);for(;t.length>c;)i(r,n=t[c++])&&(~s(u,n)||l(u,n));return u}},1641(e,t,n){var r=n(6347),i=n(290);e.exports=Object.keys||function(e){return r(e,i)}},9304(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9751(e,t,n){var r=n(2368),i=n(8420),o=n(5335),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&i(n=e.toString)&&!o(a=r(n,e)))return a;if(i(n=e.valueOf)&&!o(a=r(n,e)))return a;if("string"!==t&&i(n=e.toString)&&!o(a=r(n,e)))return a;throw s("Can't convert object to primitive value")}},5816(e,t,n){var r=n(6492),i=n(281),o=n(4789),s=n(8916),a=n(3938),l=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=s.f;return n?l(t,n(e)):t}},1229(e,t,n){var r=n(8406),i=TypeError;e.exports=function(e){if(r(e))throw i("Can't call method on "+e);return e}},5904(e,t,n){var r=n(2),i=n(665),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},9310(e,t,n){var r=n(200),i=n(9430),o="__core-js_shared__",s=r[o]||i(o,{});e.exports=s},2(e,t,n){var r=n(6926),i=n(9310);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},2072(e,t,n){var r=n(6845),i=n(2074);e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},6539(e,t,n){var r=n(9328),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5476(e,t,n){var r=n(8664),i=n(1229);e.exports=function(e){return r(i(e))}},9328(e,t,n){var r=n(9830);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3747(e,t,n){var r=n(9328),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},2612(e,t,n){var r=n(1229),i=Object;e.exports=function(e){return i(r(e))}},874(e,t,n){var r=n(2368),i=n(5335),o=n(2328),s=n(6457),a=n(9751),l=n(1602),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var n,l=s(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!i(n)||o(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},6032(e,t,n){var r=n(874),i=n(2328);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},3838(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},665(e,t,n){var r=n(281),i=0,o=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+o,36)}},5225(e,t,n){var r=n(2072);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},4491(e,t,n){var r=n(5077),i=n(2074);e.exports=r&&i(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8369(e,t,n){var r=n(200),i=n(8420),o=r.WeakMap;e.exports=i(o)&&/native code/.test(String(o))},1602(e,t,n){var r=n(200),i=n(2),o=n(6490),s=n(665),a=n(2072),l=n(5225),c=i("wks"),u=r.Symbol,d=u&&u.for,h=l?u:u&&u.withoutSetter||s;e.exports=function(e){if(!o(c,e)||!a&&"string"!=typeof c[e]){var t="Symbol."+e;a&&o(u,e)?c[e]=u[e]:c[e]=l&&d?d(t):h(t)}return c[e]}},7746(e,t,n){"use strict";var r=n(1605),i=n(8186).includes,o=n(2074),s=n(298);r({target:"Array",proto:!0,forced:o(function(){return!Array(1).includes()})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},1364(e,t,n){"use strict";n.d(t,{lX:()=>pt});const r=e=>"string"==typeof e,i=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,o=function(e,t=void 0){return!e||e===document.body||t&&e===t?null:function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=!1,n=!1;if(e.scrollWidth>e.clientWidth){const n=window.getComputedStyle(e).overflowX,r=-1!==n.indexOf("hidden"),i=-1!==n.indexOf("clip"),o=-1!==n.indexOf("visible");t=!r&&!i&&!o}if(e.scrollHeight>e.clientHeight){const t=window.getComputedStyle(e).overflowY,r=-1!==t.indexOf("hidden"),i=-1!==t.indexOf("clip"),o=-1!==t.indexOf("visible");n=!r&&!i&&!o}return t||n}(e)?e:o(e.parentElement,t)},s=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}let r=t.firstChild;return!r||r instanceof HTMLElement?r:((n=document.createElement("div")).appendChild(r),n)},a=function(e=0,t=0,n=0){return Math.max(Math.min(t,n),e)},l=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e);function c(e){return l(e)||Array.isArray(e)}function u(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{const r=e[n],i=t[n];return"function"==typeof r?`${r}`==`${i}`:c(r)&&c(i)?u(r,i):r===i})}const d=function(e){for(const t of p)t.getState()===h.Running&&t.tick(v?e-v:0);v=e,g=window.requestAnimationFrame(d)};var h,f,m;!function(e){e[e.Initializing=0]="Initializing",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Completed=3]="Completed",e[e.Destroyed=4]="Destroyed"}
25(h||(h={})),function(e){e[e.Spring=0]="Spring",e[e.Ease=1]="Ease"}(f||(f={})),function(e){e[e.Loop=0]="Loop",e[e.Reverse=1]="Reverse"}(m||(m={}));const p=new Set;let g=null,v=0;function b(){let e=h.Initializing,t=f.Ease,n=0,r=0,i=b.Easings.Linear,o=500,s=0,l=0,c=0,v=0,y=1/0,w=.01,E=.01,A=!1,S={},T=null,x={},L={},M={},O=0,C=0,k=m.Loop,P=b.Easings.Linear;const R=new Map;function I(e,...t){for(const n of R.get(e)||[])n(...t)}function F(e){return r=0,e?T=setTimeout(()=>{D()},e):D(),B}function D(){e=h.Running,I("start",x,L)}function N(){if(e=h.Completed,M={},I("end",x),e===h.Completed)if(n<O){if(n++,k===m.Reverse){const e=Object.assign({},S);S=Object.assign({},L),L=e}F(C)}else n=0;return B}const B={getState:function(){return e},easing:function(e){return i=e,t=f.Ease,M={},B},duration:function(e){return o=e,B},spring:function(e={}){t=f.Spring;const{velocity:n,mass:r,tension:i,friction:o,restDelta:a,restSpeed:u,maxSpeed:d,clamp:h}=Object.assign(Object.assign({},{velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0}),e);return s=n,l=r,c=i,v=o,E=a,w=u,y=d,A=h,M={},B},isRunning:function(){return e===h.Running},isSpring:function(){return t===f.Spring},from:function(e){return x=Object.assign({},e),B},to:function(e){return L=e,B},repeat:function(e,t=0,n=m.Loop,r){return O=e,C=t,k=n,P=r||i,B},on:function(e,t){var n,r;return n=e,r=t,R.set(n,[...R.get(n)||[],r]),B},off:function(e,t){var n,r;return n=e,r=t,R.has(n)&&R.set(n,R.get(n).filter(e=>e!==r)),B},start:function(t){return u(x,L)||(e=h.Initializing,S=Object.assign({},x),p.add(this),g||(g=window.requestAnimationFrame(d)),F(t)),B},pause:function(){return T&&(clearTimeout(T),T=null),e===h.Running&&(e=h.Paused,I("pause",x)),B},end:N,tick:function(n){n>50&&(n=50),r+=n;let d=0,p=!1;if(e!==h.Running)return B;if(t===f.Ease){d=a(0,r/o,1),p=1===d;const e=k===m.Reverse?P:i;for(const t in x)x[t]=S[t]+(L[t]-S[t])*e(d)}if(t===f.Spring){const e=.001*n;let t=0;for(const n in x){const r=L[n];let i=x[n];if("number"!=typeof r||isNaN(r)||"number"!=typeof i||isNaN(i))continue;if(Math.abs(r-i)<=E){x[n]=r,M[n]=0;continue}M[n]||("object"==typeof s&&"number"==typeof s[n]?M[n]=s[n]:M[n]="number"==typeof s?s:0);let o=M[n];o=a(-1*Math.abs(y),o,Math.abs(y));const u=o*l*v;o+=((i>r?-1:1)*(Math.abs(r-i)*c)-u)/l*e,i+=o*e;const d=x[n]>r?i<r:i>r;let h=Math.abs(o)<w&&Math.abs(r-i)<=E;A&&d&&(h=!0),h?(i=r,o=0):t++,x[n]=i,M[n]=o}p=!t}const g=Object.assign({},L);return I("step",x,S,L,d),p&&e===h.Running&&u(L,g)&&(e=h.Completed,N()),B},getStartValues:function(){return S},getCurrentValues:function(){return x},getCurrentVelocities:function(){return M},getEndValues:function(){return L},destroy:function(){e=h.Destroyed,T&&(clearTimeout(T),T=null),S=x=L={},p.delete(this)}};return B}function y(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}function w(e,t){const n=[],r=y(e)?e[t]:e instanceof MouseEvent&&("changedTouches"===t||"mouseup"!==e.type)?[e]:[];for(const e of r)n.push({x:e.clientX,y:e.clientY,ts:Date.now()});return n}function E(e){return w(e,"touches")}function A(e){return w(e,"targetTouches")}function S(e){return w(e,"changedTouches")}function T(e){const t=e[0],n=e[1]||t;return{x:(t.x+n.x)/2,y:(t.y+n.y)/2,ts:n.ts}}function x(e){const t=e[0],n=e[1]||e[0];return t&&n?-1*Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)):0}b.destroy=()=>{for(const e of p)e.destroy();g&&(cancelAnimationFrame(g),g=null)},b.Easings={Linear:function(e){return e},EaseIn:function(e){return 0===e?0:Math.pow(2,10*e-10)},EaseOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},EaseInOut:function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2}};const L=e=>{e.cancelable&&e.preventDefault()},M={passive:!1},O={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]};let C=!1,k=!0;const P=(e,t)=>{let n,r,i,o,s,a=Object.assign(Object.assign({},O),t),l=[],c=[],u=[],d=!1,h=!1,f=!1,m=!1,p=0,g=0,v=0,b=0,y=0,w=0,P=0,R=0,I=0,F=[];const D=new Map;function N(e){const t=x(c),o=x(u),s=t&&o?t/o:0,a=Math.abs(P)>Math.abs(R)?P:R,f={srcEvent:n,isPanRecognized:d,isSwipeRecognized:h,firstTouch:l,previousTouch:u,currentTouch:c,deltaX:v,deltaY:b,offsetX:y,offsetY:w,velocityX:P,velocityY:R,velocity:a,angle:I,axis:i,scale:s,center:r};for(const t of D.get(e)||[])t(f)}function B(e){const t=e.target,n=e.composedPath()[0],r=a.ignore.join(","),i=e=>e&&e instanceof HTMLElement&&(e.matches(r)||e.closest(r));if(i(t)||i(n))return!1}function q(e){const t=Date.now();if(F=F.filter(e=>!e.ts||e.ts>t-100),e&&F.push(e),P=0,R=0,F.length>3){const e=F[0],t=F[F.length-1];if(e&&t){const n=t.x-e.x,r=t.y-e.y,i=e.ts&&t.ts?t.ts-e.ts:0;i>0&&(P=Math.abs(n)>3?n/(i/30):0,R=Math.abs(r)>3?r/(i/30):0)}}}function H(e){if(!1===B(e))return;if("undefined"!=typeof MouseEvent&&e instanceof MouseEvent){if(C)return}else C=!0;if("undefined"!=typeof MouseEvent&&e instanceof MouseEvent){if(!e.buttons||0!==e.button)return;L(e)}e instanceof MouseEvent&&(window.addEventListener("mousemove",j),window.addEventListener("mouseup",$)),window.addEventListener("blur",V),n=e,c=A(e),l=[...c],u=[],g=c.length,r=T(c),1===g&&(d=!1,h=!1,f=!1),g&&q(T(c));const t=Date.now(),i=t-(p||t);m=i>0&&i<=250&&1===g,p=t,clearTimeout(o),N("start")}function j(e){var t;if(!l.length)return;if(e.defaultPrevented)return;if(!1===B(e))return;n=e,u=[...c],c=E(e);const o=T(u),h=T(E(e));if(q(h),g=c.length,r=h,u.length===c.length?(v=h.x-o.x,b=h.y-o.y):(v=0,b=0),l.length){const e=T(l);y=h.x-e.x,w=h.y-e.y}if(c.length>1){const e=x(c),t=x(u);Math.abs(e-t)>=.1&&(f=!0,N("pinch"))}d||(d=Math.abs(y)>=a.panThreshold||Math.abs(w)>=a.panThreshold,d&&(k=!1,clearTimeout(s),s=void 0,I=Math.abs(180*Math.atan2(w,y)/Math.PI),i=I>45&&I<135?"y":"x",l=[...c],u=[...c],y=0,w=0,v=0,b=0,null===(t=window.getSelection())||void 0===t||t.removeAllRanges(),N("panstart"))),d&&(v||b)&&N("pan"),N("move")}function $(e){if(n=e,!l.length)return;const t=A(e),i=S(e);if(g=t.length,r=T(i),i.length&&q(T(i)),u=[...c],c=[...t],l=[...t],g>0)N("end"),d=!1,h=!1,F=[];else{const e=a.swipeThreshold;(Math.abs(P)>e||Math.abs(R)>e)&&(h=!0),d&&N("panend"),h&&N("swipe"),d||h||f||(N("tap"),m?N("doubleTap"):o=setTimeout(function(){N("singleTap")},250)),N("end"),z()}}function V(){clearTimeout(o),z(),d&&N("panend"),N("end")}function z(){C=!1,d=!1,h=!1,m=!1,g=0,F=[],c=[],u=[],l=[],v=0,b=0,y=0,w=0,P=0,R=0,I=0,i=void 0,window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",$),window.removeEventListener("blur",V),k||s||(s=setTimeout(()=>{k=!0,s=void 0},100))}function W(e){const t=e.target;C=!1,t&&!e.defaultPrevented&&(k||(L(e),e.stopPropagation()))}const _={init:function(){return e&&(e.addEventListener("click",W,M),e.addEventListener("mousedown",H,M),e.addEventListener("touchstart",H,M),e.addEventListener("touchmove",j,M),e.addEventListener("touchend",$),e.addEventListener("touchcancel",$)),_},on:function(e,t){return function(e,t){D.set(e,[...D.get(e)||[],t])}(e,t),_},off:function(e,t){return D.has(e)&&D.set(e,D.get(e).filter(e=>e!==t)),_},isPointerDown:()=>g>0,destroy:function(){clearTimeout(o),clearTimeout(s),s=void 0,e&&(e.removeEventListener("click",W,M),e.removeEventListener("mousedown",H,M),e.removeEventListener("touchstart",H,M),e.removeEventListener("touchmove",j,M),e.removeEventListener("touchend",$),e.removeEventListener("touchcancel",$)),e=null,z()}};return _};P.isClickAllowed=()=>k;const R={IMAGE_ERROR:"This image couldn't be loaded. <br /> Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"},I=(e,t="")=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.add(t)})},F=(e,t="")=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.remove(t)})},D=(e,t="",n)=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,n||!1)})},N=e=>{e.cancelable&&e.preventDefault()},B=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),q=e=>e instanceof HTMLImageElement;var H,j;
25!function(e){e.Reset="reset",e.Zoom="zoom",e.ZoomIn="zoomIn",e.ZoomOut="zoomOut",e.ZoomTo="zoomTo",e.ToggleCover="toggleCover",e.ToggleFull="toggleFull",e.ToggleMax="toggleMax",e.IterateZoom="iterateZoom",e.Pan="pan",e.Swipe="swipe",e.Move="move",e.MoveLeft="moveLeft",e.MoveRight="moveRight",e.MoveUp="moveUp",e.MoveDown="moveDown",e.RotateCCW="rotateCCW",e.RotateCW="rotateCW",e.FlipX="flipX",e.FlipY="flipY",e.ToggleFS="toggleFS"}(H||(H={})),function(e){e.Cover="cover",e.Full="full",e.Max="max"}(j||(j={}));const $={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1},V={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:H.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:R,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'<div class="f-spinner"></div>',wheelAction:H.Zoom,width:"auto"};let z,W=0,_=0,U=0;const K=(e,t={},n={})=>{let l,c,d,h,f,m,p,g,v=0,y=Object.assign(Object.assign({},V),t),w={},E=Object.assign({},$),A=Object.assign({},$);const x=[];function L(e){let t=y[e];return t&&"function"==typeof t?t(Te):t}function M(){return e&&e.parentElement&&l&&3===v}const O=new Map;function C(e,...t){const n=[...O.get(e)||[]];y.on&&n.push(y.on[e]);for(const e of n)e&&"function"==typeof e&&e(Te,...t);"*"!==e&&C("*",e,...t)}function k(e){if(!M())return;const t=e.target;if(o(t))return;const n=Date.now(),r=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),i=a(-1,r,1);C("wheel",e,i);const s=L("wheelAction");if(!s)return;if(e.defaultPrevented)return;const l=A.scale;let c=l*(i>0?1.5:.5);if(s===H.Zoom){const t=Math.abs(e.deltaY)<100&&Math.abs(e.deltaX)<100;if(n-_<(t?200:45))return void N(e);_=n;const r=ne(),o=oe();if(B(c)<B(r)&&B(l)<=B(r)?(U+=Math.abs(i),c=r):B(c)>B(o)&&B(l)>=B(o)?(U+=Math.abs(i),c=o):(U=0,c=a(r,c,o)),U>7)return}switch(N(e),s){case H.Pan:ce(s,{srcEvent:e,deltaX:2*-e.deltaX,deltaY:2*-e.deltaY});break;case H.Zoom:ce(H.ZoomTo,{srcEvent:e,scale:c,center:{x:e.clientX,y:e.clientY}});break;default:ce(s,{srcEvent:e})}}function R(t){var n,r;const o=t.composedPath()[0];if(!P.isClickAllowed())return;if(!i(o)||t.defaultPrevented)return;if(!(null==e?void 0:e.contains(o)))return;if(o.hasAttribute("disabled")||o.hasAttribute("aria-disabled")||o.hasAttribute("data-carousel-go-prev")||o.hasAttribute("data-carousel-go-next"))return;const s=o.closest("[data-panzoom-action]"),a=null===(n=null==s?void 0:s.dataset)||void 0===n?void 0:n.panzoomAction,c=(null===(r=null==s?void 0:s.dataset)||void 0===r?void 0:r.panzoomValue)||"";if(a){switch(N(t),a){case H.ZoomTo:case H.ZoomIn:case H.ZoomOut:ce(a,{scale:parseFloat(c||"")||void 0});break;case H.MoveLeft:case H.MoveRight:ce(a,{deltaX:parseFloat(c||"")||void 0});break;case H.MoveUp:case H.MoveDown:ce(a,{deltaY:parseFloat(c||"")||void 0});break;case H.ToggleFS:Ae();break;default:ce(a)}return}if(!(null==l?void 0:l.contains(o)))return;const u={srcEvent:t};if(ce(L("clickAction"),u),L("dblClickAction")){const e=Date.now(),t=e-(W||e);W=e,t>0&&t<=250?(z&&(clearTimeout(z),z=void 0),ce(L("dblClickAction"),u)):z=setTimeout(()=>{ce(L("singleClickAction"),u)},250)}}function j(e){if(g=e,!M()||!Q())return;if(E.scale<=1||A.scale<=1)return;if(((null==l?void 0:l.dataset.animationName)||"").indexOf("zoom")>-1)return;const t=ee(A.scale);if(!t)return;const{x:n,y:r}=t;ce(H.Pan,{deltaX:n-A.x,deltaY:r-A.y})}function K(){var t;e&&(F(e,"is-loading"),null===(t=e.querySelector(".f-spinner"))||void 0===t||t.remove())}function G(){if(!e||!c)return;if(K(),q(c)&&(!c.complete||!c.naturalWidth))return v=2,null==l||l.classList.add("has-error"),void C("error");C("loaded");const{width:t,height:n}=Z();q(c)&&(c.setAttribute("width",t+""),c.setAttribute("height",n+"")),l&&(F(l,"has-error"),q(c)&&(l.setAttribute("width",t+""),l.setAttribute("height",n+""),l.style.aspectRatio=`${t/n||""}`)),m=b().on("start",(e,t)=>{void 0!==t.angle&&(t.angle=90*Math.round(t.angle/90)),void 0!==t.flipX&&(t.flipX=t.flipX>0?1:-1),void 0!==t.flipY&&(t.flipY=t.flipY>0?1:-1),A=Object.assign(Object.assign({},$),t),le(),C("animationStart")}).on("pause",e=>{A=Object.assign(Object.assign({},$),e)}).on("step",e=>{if(!M())return void(null==m||m.end());if(E=Object.assign(Object.assign({},$),e),Q()||!L("bounds")||ye()||A.scale>E.scale||A.scale<re())return void ue();const t=se(A.scale);let n=!1,r=!1,i=!1,o=!1;E.x<t.x[0]&&(n=!0),E.x>t.x[1]&&(r=!0),E.y<t.y[0]&&(o=!0),E.y>t.y[1]&&(i=!0);let s=!1,l=!1,c=!1,u=!1;A.x<t.x[0]&&(s=!0),A.x>t.x[1]&&(l=!0),A.y<t.y[0]&&(u=!0),A.y>t.y[1]&&(c=!0);let d=!1;(r&&l||n&&s)&&(A.x=a(t.x[0],A.x,t.x[1]),d=!0),(i&&c||o&&u)&&(A.y=a(t.y[0],A.y,t.y[1]),d=!0),d&&m&&m.spring({tension:94,friction:17,maxSpeed:555*A.scale,restDelta:.1,restSpeed:.1,velocity:m.getCurrentVelocities()}).from(E).to(A).start(),ue()}).on("end",()=>{(null==f?void 0:f.isPointerDown())||ae(),(null==m?void 0:m.isRunning())||(le(),C("animationEnd"))}),function(){const e=L("gestures");if(!e)return;if(!h||!c)return;let t=!1;f=P(h,e).on("start",e=>{if(!L("gestures"))return;if(!m)return;if(!M()||Q())return;const n=e.srcEvent;(E.scale>1||be(E.angle)||e.currentTouch.length>1)&&(null==n||n.stopPropagation(),m.pause(),t=!0),1===e.currentTouch.length&&C("touchStart")}).on("move",e=>{var n;t&&(1!==A.scale||be(A.angle)||e.currentTouch.length>1)&&(N(e.srcEvent),null===(n=e.srcEvent)||void 0===n||n.stopPropagation())}).on("pan",e=>{if(!t)return;const n=e.srcEvent;(1!==A.scale||be(A.angle)||e.currentTouch.length>1)&&(N(n),ce(H.Pan,e))}).on("swipe",e=>{t&&(A.scale>1||be(A.angle))&&ce(H.Swipe,e)}).on("tap",e=>{C("click",e)}).on("singleTap",e=>{C("singleClick",e)}).on("doubleTap",e=>{C("dblClick",e)}).on("pinch",e=>{t&&(e.scale>re()?ce(H.ZoomIn,e):e.scale<re()?ce(H.ZoomOut,e):ce(H.Pan,e))}).on("end",e=>{t&&(e.currentTouch.length?(e.srcEvent.stopPropagation(),N(e.srcEvent),null==m||m.end()):(t=!1,le(),ae(),C("touchEnd")))}).init()}(),h&&(h.addEventListener("wheel",k,{passive:!1}),x.push(()=>{null==h||h.removeEventListener("wheel",k,{passive:!1})}
vendor: 7,875 bytes, line 25
25)),null==e||e.addEventListener("click",R),null===document||void 0===document||document.addEventListener("mousemove",j),x.push(()=>{null==e||e.removeEventListener("click",R),null===document||void 0===document||document.removeEventListener("mousemove",j)});const r=X();E=Object.assign({},r),A=Object.assign({},r),v=3,ue(),le(),C("ready"),requestAnimationFrame(()=>{3===v&&(K(),h&&(h.style.visibility=""))})}function X(){const e=Object.assign({},L("startPos")||{});let t=e.scale,n=1;n="string"==typeof t?te(t):"number"==typeof t?t:re();const r=Object.assign(Object.assign(Object.assign({},$),e),{scale:n}),i=Q()?ee(n):void 0;if(i){const{x:e,y:t}=i;r.x=e,r.y=t}return r}function Y(){const e={top:0,left:0,width:0,height:0};if(l){const t=l.getBoundingClientRect();be(A.angle)?(e.top=t.top+.5*t.height-.5*t.width,e.left=t.left+.5*t.width-.5*t.height,e.width=t.height,e.height=t.width):(e.top=t.top,e.left=t.left,e.width=t.width,e.height=t.height)}return e}function Z(){let e=L("width"),t=L("height");if(c&&"auto"===e){const t=c.getAttribute("width");e=t?parseFloat(t+""):void 0!==c.dataset.width?parseFloat(c.dataset.width+""):q(h)?h.naturalWidth:q(c)?c.naturalWidth:(null==l?void 0:l.getBoundingClientRect().width)||0}else e=r(e)?parseFloat(e):e;if(c&&"auto"===t){const e=c.getAttribute("height");t=e?parseFloat(e+""):void 0!==c.dataset.height?parseFloat(c.dataset.height+""):q(h)?h.naturalHeight:q(c)?c.naturalHeight:(null==l?void 0:l.getBoundingClientRect().height)||0}else t=r(t)?parseFloat(t):t;return{width:e,height:t}}function J(){const e=Y();return{width:e.width,height:e.height}}function Q(){return"mousemove"===L("panMode")&&matchMedia("(hover: hover)").matches}function ee(e){const t=g||L("event"),n=null==l?void 0:l.getBoundingClientRect();if(!t||!n||e<=1)return{x:0,y:0};const r=(t.clientX||0)-n.left,i=(t.clientY||0)-n.top,{width:o,height:s}=J(),c=se(e);if(e>1){const t=L("mouseMoveFactor");t>1&&(e*=t)}let u=o*e,d=s*e,h=.5*(u-o)-r/o*100/100*(u-o),f=.5*(d-s)-i/s*100/100*(d-s);return h=a(c.x[0],h,c.x[1]),f=a(c.y[0],f,c.y[1]),{x:h,y:f}}function te(t){if(!t)return A.scale;if(!e)return 1;const n=e.getBoundingClientRect(),r=Y(),{width:i,height:o}=Z(),s=e=>{if("number"==typeof e)return e;switch(e){case"min":case"base":return 1;case"cover":return Math.max(n.height/r.height,n.width/r.width)||1;case"full":case"max":{const e=be(A.angle)?o:i;return e&&r.width?e/r.width:1}}},l=L("minScale"),c=L("maxScale"),u=Math.min(s("full"),s(l)),d="number"==typeof c?s("full")*c:Math.min(s("full"),s(c));switch(t){case"min":return u;case"base":return a(u,1,d);case"cover":return s("cover");case"full":return Math.min(d,s("full"));case"max":return d}}function ne(){return te("min")}function re(){return te("base")}function ie(){return te("full")}function oe(){return te("max")}function se(t){const n={x:[0,0],y:[0,0]},r=null==e?void 0:e.getBoundingClientRect();if(!r)return n;const i=Y(),o=r.width,s=r.height;let a=i.width,l=i.height,c=t=void 0===t?A.scale:t,u=t;if(Q()&&t>1){const e=L("mouseMoveFactor");e>1&&(a*t>o+.01&&(c*=e),l*t>s+.01&&(u*=e))}if(a*=c,l*=u,a>o){n.x[0]=.5*(o-a),n.x[1]=.5*(a-o);const e=.5*(i.left-r.left),t=.5*(i.left+i.width-r.right);n.x[0]-=e+t,n.x[1]-=e+t}if(l>s){n.y[0]=.5*(s-l),n.y[1]=.5*(l-s);const e=.5*(i.top-r.top),t=.5*(i.top+i.height-r.bottom);n.y[0]-=e+t,n.y[1]-=e+t}return n}function ae(){if(!M())return;if(!L("bounds"))return;if(!m)return;const e=ne(),t=oe(),n=a(e,A.scale,t);if(A.scale<e-.01||A.scale>t+.01)return void ce(H.ZoomTo,{scale:n});if(m.isRunning())return;if(ye())return;const r=se(n);A.x<r.x[0]||A.x>r.x[1]||A.y<r.y[0]||A.y>r.y[1]?(A.x=a(r.x[0],A.x,r.x[1]),A.y=a(r.y[0],A.y,r.y[1]),m.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:m.getCurrentVelocities()}),m.from(E).to(A).start()):ue()}function le(t){var n;if(!M())return;const r=ve(),i=ye(),o=we(),s=Ee(),a=he(),c=fe();D(l,"is-fullsize",s),D(l,"is-expanded",o),D(l,"is-dragging",i),D(l,"can-drag",r),D(l,"will-zoom-in",a),D(l,"will-zoom-out",c);const u=pe(),d=ge(),h=me(),f=!M();for(const r of(null===(n=t||e)||void 0===n?void 0:n.querySelectorAll("[data-panzoom-action]"))||[]){const e=r.dataset.panzoomAction;let t=!1;if(f)t=!0;else switch(e){case H.ZoomIn:u||(t=!0);break;case H.ZoomOut:h||(t=!0);break;case H.ToggleFull:{d||h||(t=!0);const e=r.querySelector("g");e&&(e.style.display=s&&!t?"none":"");break}case H.IterateZoom:{u||h||(t=!0);const e=r.querySelector("g");e&&(e.style.display=u||t?"":"none");break}case H.ToggleCover:case H.ToggleMax:u||h||(t=!0)}t?(r.setAttribute("aria-disabled",""),r.setAttribute("tabindex","-1")):(r.removeAttribute("aria-disabled"),r.removeAttribute("tabindex"))}}function ce(t,n){var r;if(!(t&&e&&c&&m&&M()))return;if(t===H.Swipe&&Math.abs(m.getCurrentVelocities().scale)>.01)return;const i=Object.assign({},A);let o=Object.assign({},A),s=se(Q()?i.scale:E.scale);const l=m.getCurrentVelocities(),d=Y(),h=((null===(r=(n=n||{}).currentTouch)||void 0===r?void 0:r.length)||0)>1,f=n.velocityX||0,p=n.velocityY||0;let g=n.center;n.srcEvent&&(g=T(S(n.srcEvent)));let v=n.deltaX||0,b=n.deltaY||0;switch(t){case H.MoveRight:v=n.deltaX||100;break;case H.MoveLeft:v=n.deltaX||-100;break;case H.MoveUp:b=n.deltaY||-100;break;case H.MoveDown:b=n.deltaY||100}let y=[];if("number"==typeof t)o.scale=t;else switch(t){case H.Reset:o=Object.assign({},$),o.scale=re();break;case H.ZoomTo:case H.ZoomIn:case H.ZoomOut:case H.ToggleCover:case H.ToggleFull:case H.ToggleMax:case H.IterateZoom:case H.Zoom:o.scale=de(t,n);break;case H.Pan:case H.Move:case H.MoveLeft:case H.MoveRight:case H.MoveUp:case H.MoveDown:if(ye()){let e=1,t=1;o.x<=s.x[0]&&f<=0&&(e=Math.max(.01,1-Math.abs(1/d.width*Math.abs(o.x-s.x[0]))),e*=.2),o.x>=s.x[1]&&f>=0&&(e=Math.max(.01,1-Math.abs(1/d.width*Math.abs(o.x-s.x[1]))),e*=.2),o.y<=s.y[0]&&p<=0&&(t=Math.max(.01,1-Math.abs(1/d.height*Math.abs(o.y-s.y[0]))),t*=.2),o.y>=s.y[1]&&p>=0&&(t=Math.max(.01,1-Math.abs(1/d.height*Math.abs(o.y-s.y[1]))),t*=.2),o.x+=v*e,o.y+=b*t}else o.x=a(s.x[0],o.x+v,s.x[1]),o.y=a(s.y[0],o.y+b,s.y[1]);break;case H.Swipe:const e=(e=0)=>Math.sign(e)*Math.pow(Math.abs(e),1.5);o.x+=a(-1e3,e(f),1e3),o.y+=a(-1e3,e(p),1e3),p&&!f&&(o.x=a(s.x[0],o.x,s.x[1])),!p&&f&&(o.y=a(s.y[0],o.y,s.y[1])),l.x=f,l.y=p;break;case H.RotateCW:o.angle+=90;break;case H.RotateCCW:o.angle-=90;break;case H.FlipX:o.flipX*=-1;break;case H.FlipY:o.flipY*=-1}if(void 0!==E.angle&&Math.abs(E.angle)>=360&&(o.angle-=360*Math.floor(E.angle/360),E.angle-=360*Math.floor(E.angle/360)),y.length){const e=y.findIndex(e=>e>o.scale+1e-4);o.scale=y[e]||y[0]}if(h&&(o.scale=a(ne()*(h?.8:1),o.scale,oe()*(h?1.6:1))),Q()){const e=ee(o.scale);if(e){const{x:t,y:n}=e;o.x=t,o.y=n}}else if(Math.abs(o.scale-i.scale)>1e-4){let t=0,n=0;if(g)t=g.x,n=g.y;else{const r=e.getBoundingClientRect();t=r.x+.5*r.width,n=r.y+.5*r.height}let r=t-d.left,l=n-d.top;r-=.5*d.width,l-=.5*d.height;const c=(r-i.x)/i.scale,u=(l-i.y)/i.scale;o.x=r-c*o.scale,o.y=l-u*o.scale,!h&&L("bounds")&&(s=se(o.scale),o.x=a(s.x[0],o.x,s.x[1]),o.y=a(s.y[0],o.y,s.y[1]))}if(t===H.Swipe){let e=94,t=17,n=500*o.scale,r=l;m.spring({tension:e,friction:t,maxSpeed:n,restDelta:.1,restSpeed:.1,velocity:r})}else t===H.Pan||h?m.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):m.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:l});if(0===n.velocity||u(E,o))E=Object.assign({},o),A=Object.assign({},o),m.end(),ue(),le();else{if(u(A,o))return;m.from(E).to(o).start()}C("action",t)}function ue(){if(!c||!l||!h)return;const{width:t,height:n}=Z();Object.assign(l.style,{maxWidth:`min(${t}px, 100%)`,maxHeight:`min(${n}px, 100%)`});const r=function(){const{width:t,height:n}=Z(),{width:r,height:i}=J();if(!e)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:r,fitHeight:i,fullWidth:t,fullHeight:n};let{x:o,y:s,scale:a,angle:l,flipX:c,flipY:u}=E,d=1/ie(),h=t,f=n,m=E.scale*d,p=A.scale*d;
25const g=Math.max(r,i),v=Math.min(r,i);t>n?(h=g,f=v):(h=v,f=g),m=t>n?g*a/t||1:g*a/n||1;let b=h?t*p:0,y=f?n*p:0;return o=o+.5*h-.5*b,s=s+.5*f-.5*y,{x:o,y:s,width:b,height:y,scale:h&&f?t*m/b:0,flipX:c,flipY:u,angle:l,fitWidth:r,fitHeight:i,fullWidth:t,fullHeight:n}}(),{x:i,y:o,width:s,height:a,scale:u,angle:d,flipX:f,flipY:m}=r;let p=`translate(${B(i,100)}px, ${B(o,100)}px)`;p+=1!==f||1!==m?` scaleX(${B(u*f)}) scaleY(${B(u*m)})`:` scale(${B(u)})`,0!==d&&(p+=` rotate(${d}deg)`),h.style.width=`${B(s)}px`,h.style.height=`${B(a)}px`,h.style.transform=`${p}`,C("render")}function de(e=L("clickAction"),t={}){let n=A.scale,r=re(),i=[];if("number"==typeof e)r=e;else if(e){switch(e){case H.ZoomTo:r=t.scale||1;break;case H.ZoomIn:r=n*(t.scale||2);break;case H.ZoomOut:r=n*(t.scale||.5);break;case H.ToggleCover:i=[re(),te("cover")];break;case H.ToggleFull:i=[re(),ie()];break;case H.ToggleMax:i=[re(),oe()];break;case H.IterateZoom:i=[re(),ie(),oe()];break;case H.Zoom:{const e=ie();r=n>=e-.05?re():Math.min(e,n*(t.scale||2));break}}if(i.length){const e=i.find(e=>e>n+1e-4);r=null!=e?e:re()}}return e!==H.ZoomTo&&(r=a(ne(),r,oe())),r}function he(){return!!(M()&&de()>A.scale)}function fe(){return!!(M()&&de()<A.scale)}function me(){return!!(M()&&A.scale>ne())}function pe(){return!!(M()&&A.scale<oe())}function ge(){return!!(M()&&A.scale<ie())}function ve(){return!(!M()||!we()&&!be(A.angle)||!f||Q())}function be(e){return 90===Math.abs(e%180)}function ye(){return!(!M()||!(null==f?void 0:f.isPointerDown())||Q())}function we(){return!!(M()&&A.scale>re())}function Ee(){return!!(M()&&A.scale>=ie())}function Ae(){const t="in-fullscreen",n="with-panzoom-in-fullscreen";null==e||e.classList.toggle(t);const r=null==e?void 0:e.classList.contains(t);r?(document.documentElement.classList.add(n),document.addEventListener("keydown",Se,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",Se,!0)),ue(),C(r?"enterFS":"exitFS")}function Se(e){"Escape"!==e.key||e.defaultPrevented||Ae()}const Te={canDrag:ve,canZoomIn:pe,canZoomOut:me,canZoomToFull:ge,destroy:function(){C("destroy");for(const e of Object.values(w))null==e||e.destroy(Te);for(const e of x)e();return l&&(l.style.aspectRatio="",l.style.maxWidth="",l.style.maxHeight=""),h&&(h.style.width="",h.style.height="",h.style.transform=""),l=void 0,c=void 0,h=void 0,E=Object.assign({},$),A=Object.assign({},$),null==m||m.destroy(),m=void 0,null==f||f.destroy(),f=void 0,v=4,Te},emit:C,execute:ce,getBoundaries:se,getContainer:function(){return e},getContent:function(){return c},getFullDim:Z,getGestures:function(){return f},getMousemovePos:ee,getOptions:function(){return y},getPlugins:function(){return w},getScale:te,getStartPosition:X,getState:function(){return v},getTransform:function(e){return!0===e?A:E},getTween:function(){return m},getViewport:function(){return h},getWrapper:function(){return l},init:function(){return v=0,C("init"),function(){for(const[e,t]of Object.entries(Object.assign(Object.assign({},n),y.plugins||{})))if(e&&!w[e]&&t instanceof Function){const n=t();n.init(Te),w[e]=n}C("initPlugins")}(),function(){var t,n,r;const i=Object.assign(Object.assign({},V.classes),L("classes")),o=null===(t=i.content)||void 0===t?void 0:t.split(" ").shift(),s=null===(n=i.wrapper)||void 0===n?void 0:n.split(" ").shift(),a=null===(r=i.viewport)||void 0===r?void 0:r.split(" ").shift();if(o&&s&&a&&e&&(I(e,i.container),c=e.querySelector(`.${o}
25:not(.is-clone)`),c)){if(c.setAttribute("draggable","false"),l=e.querySelector(`.${s}`),l||(l=document.createElement("div"),I(l,i.wrapper),c.insertAdjacentElement("beforebegin",l),l.insertAdjacentElement("afterbegin",c)),h=e.querySelector(`.${a}`),h||(h=document.createElement("div"),I(h,i.viewport),l.insertAdjacentElement("beforeend",h)),h.contains(c)||h.insertAdjacentElement("afterbegin",c),d=e.querySelector(`.${o}.is-clone`),d||(d=c.cloneNode(!0),d.removeAttribute("id"),I(d,"is-clone"),l.insertAdjacentElement("afterbegin",d)),c instanceof HTMLPictureElement&&(c=c.querySelector("img")),d instanceof HTMLPictureElement&&(d=d.querySelector("img")),h instanceof HTMLPictureElement&&(h=h.querySelector("img")),h&&(h.style.visibility="hidden",L("protected"))){h.addEventListener("contextmenu",e=>{N(e)});const e=document.createElement("div");I(e,"f-panzoom__protected"),h.appendChild(e)}C("initLayout")}}(),function(){if(e&&l&&!p){let e=null;p=new ResizeObserver(()=>{M()&&(e=e||requestAnimationFrame(()=>{M()&&(le(),ae(),C("refresh")),e=null}))}),p.observe(l),x.push(()=>{null==p||p.disconnect(),p=void 0,e&&(cancelAnimationFrame(e),e=null)})}}(),function(){if(!e||!c)return;if(!q(c)||!q(d))return void G();const t=()=>{c&&q(c)&&c.decode().then(()=>{G()}).catch(()=>{G()})};v=1,e.classList.add("is-loading"),C("loading"),d.src&&d.complete?t():(function(){if(!e)return;if(null==e?void 0:e.querySelector(".f-spinner"))return;const t=L("spinnerTpl"),n=s(t);n&&(n.classList.add("f-spinner"),e.classList.add("is-loading"),null==l||l.insertAdjacentElement("afterbegin",n))}(),d.addEventListener("load",t,!1),d.addEventListener("error",t,!1),x.push(()=>{null==d||d.removeEventListener("load",t,!1),null==d||d.removeEventListener("error",t,!1)}))}(),Te},isDragging:ye,isExpanded:we,isFullsize:Ee,isMousemoveMode:Q,localize:function(e,t=[]){const n=L("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)},off:function(e,t){for(const n of e instanceof Array?e:[e])O.has(n)&&O.set(n,O.get(n).filter(e=>e!==t));return Te},on:function(e,t){for(const n of e instanceof Array?e:[e])O.set(n,[...O.get(n)||[],t]);return Te},toggleFS:Ae,updateControls:le,version:"6.1.14",willZoomIn:he,willZoomOut:fe};return Te};K.l10n={en_EN:R},K.getDefaults=()=>V;const G=(e,t)=>{let n=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||n.push(e)}),n},X=(e,...t)=>{const n=t.length;for(let r=0;r<n;r++){const n=t[r]||{};Object.entries(n).forEach(([t,n])=>{const r=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:r}),l(n)?Object.assign(e[t],X(e[t],n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},Y=function(e=0,t=0,n=0,r=0,i=0,o=!1){const s=(e-t)/(n-t)*(i-r)+r;return o?r<i?a(r,s,i):a(i,s,r):s},Z=Object.assign(Object.assign({},R),{ERROR:"Something went wrong. <br /> Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"}),J=e=>{e.cancelable&&e.preventDefault()},Q={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'<div class="f-html">{{ERROR}}</div>',fill:!0,infinite:!0,initialPage:0,l10n:Z,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'<div class="f-spinner"></div>',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1};let ee,te,ne=0;const re=(e,t={},n={})=>{ne++;let c,u,d,h,f,m=0,p=Object.assign({},Q),g=Object.assign({},Q),v={},w=null,E=null,A=0,S=0,T=0,x=!1,L=!1,M=!1,O="height",C=0,k=!0,R=0,N=0,B=0,q=0,H="*",j=[],$=[];const V=new Set;let z=[],W=[],_=0,U=0,K=0;function Z(e,...t){let n=g[e];return n&&n instanceof Function?n(je,...t):n}function ie(e,t=[]){const n=Z("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}const oe=new Map;function se(e,...t){const n=[...oe.get(e)||[]];g.on&&n.push(g.on[e]);for(const e of n)e&&e instanceof Function&&e(je,...t);"click"===e&&ke(t[0]),"*"!==e&&se("*",e,...t)}function ae(){var e,t;const r=X({},Q,p);let i="";const o=p.breakpoints||{};for(const[e,t]of Object.entries(o))window.matchMedia(e).matches&&(i+=e,X(r,t));if(void 0===f||i!==f){if(f=i,0!==m){let n=null===(t=null===(e=W[R])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index;void 0===n&&(n=g.initialSlide),r.initialSlide=n,r.slides=[];for(const e of j)e.isVirtual&&r.slides.push(e)}Be(),g=r,!1!==Z("enabled")&&(m=0,se("init"),function(){for(const[e,t]of Object.entries(Object.assign(Object.assign({},n),g.plugins||{})))if(e&&!v[e]&&t instanceof Function){const n=t();n.init(je,re),v[e]=n}se("initPlugins")}(),function(){if(!w)return;const e=Z("classes")||{};I(w,e.container);const t=Z("style");if(t&&l(t))for(const[e,n]of Object.entries(t))w.style.setProperty(e,n);E=Array.from(w.querySelectorAll(`.${e.viewport}`)).filter(t=>t.closest(`.${e.container}`)===w).pop()||null,E||(E=document.createElement("div"),I(E,e.viewport),E.append(...G(w,`.${e.slide}`)),w.insertAdjacentElement("afterbegin",E)),w.carousel=je,se("initLayout")}(),function(){if(!E)return;const e=Z("classes")||{};j=[],[...G(E,`.${e.slide}
25`)].forEach(e=>{if(e.parentElement){const t=we(Object.assign({el:e,isVirtual:!1},e.dataset||{}));se("createSlide",t),j.push(t)}}),Te();for(const e of j)se("addSlide",e);ye(Z("slides"));for(const e of j){const t=e.el;(null==t?void 0:t.parentElement)===E&&(I(t,g.classes.slide),I(t,e.class),Ie(e),se("attachSlideEl",e))}se("initSlides")}(),xe(),m=1,I(w,(Z("classes")||{}).isEnabled||""),Ne(),he(),u=b().on("start",()=>{c&&c.isPointerDown()||(de(),Ne())}).on("step",e=>{const t=C;C=e.pos,C!==t&&(k=!1,Ne())}).on("end",e=>{(null==c?void 0:c.isPointerDown())||(C=e.pos,u&&!x&&(C<B||C>q)?u.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:C}).to({pos:a(B,C,q)}).start():k||(k=!0,se("settle")))}),ce(),function(){if(!w||!E)return;w.addEventListener("click",Ce),document.addEventListener("mousemove",le),te||(te=function(e){var t,n;const r=null===(n=null===(t=e.target)||void 0===t?void 0:t.dataset)||void 0===n?void 0:n.carouselTarget;if(r){const t=document.getElementById(`${r.split("#").pop()}`),n=null==t?void 0:t.carousel;null==n||n.emit("click",e)}},document.addEventListener("click",te));const e=E.getBoundingClientRect();if(_=e.height,U=e.width,!d){let e=null;d=new ResizeObserver(()=>{e||(e=requestAnimationFrame(()=>{!function(){if(1!==m||!E)return;const e=W.length,t=E.getBoundingClientRect(),n=t.height,r=t.width;e>1&&(M&&Math.abs(n-_)<.5||!M&&Math.abs(r-U)<.5)||(xe(),ce(),_=n,U=r,M&&!_||!M&&!U||w&&E&&(e===W.length&&(null==c?void 0:c.isPointerDown())||(Z("dragFree")&&(x||C>B&&C<q)?(de(),Ne()):Fe(R,{transition:!1}))))}(),e=null}))}),d.observe(E)}}(),se("ready"))}}function le(e){ee=e}function ce(){!1===Z("gestures")?c&&(c.destroy(),c=void 0):c||function(){const e=Z("gestures");!c&&!1!==e&&E&&(c=P(E,e).on("start",e=>{var t,n;if(!u)return;if(!1===Z("gestures",e))return;const{srcEvent:r}=e;M&&y(r)&&!o(r.target)&&J(r),u.pause(),u.getCurrentVelocities().pos=0;const i=null===(t=W[R])||void 0===t?void 0:t.slides[0],s=null==i?void 0:i.el;i&&V.has(i.index)&&s&&(C=i.offset||0,C+=(function(e){const t=window.getComputedStyle(e),n=new DOMMatrixReadOnly(t.transform);return{width:n.m41||0,height:n.m42||0}}(s)[O]||0)*(L&&!M?1:-1)),Me(),x||(C<B||C>q)&&u.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:(null===(n=u.getCurrentVelocities())||void 0===n?void 0:n.pos)||0,restDelta:1,restSpeed:1}).from({pos:C}).to({pos:a(B,C,q)}).start()}).on("move",e=>{var t,n;if(!1===Z("gestures",e))return;const{srcEvent:r,axis:i,deltaX:s,deltaY:a}=e;if(y(r)&&(null===(t=r.touches)||void 0===t?void 0:t.length)>1)return;const l=r.target,c=o(l),d=c?c.scrollHeight>c.clientHeight?"y":"x":void 0;if(c&&c!==E&&(!i||i===d))return;if(!i)return J(r),r.stopPropagation(),void r.stopImmediatePropagation();if("y"===i&&!M||"x"===i&&M)return;if(J(r),r.stopPropagation(),!u)return;const h=L&&!M?1:-1,f=M?a:s;let m=(null==u?void 0:u.isRunning())?u.getEndValues().pos:C,p=1;x||(m<=B&&f*h<0?(p=Math.max(.01,1-(Math.abs(1/ge()*Math.abs(m-B))||0)),p*=.2):m>=q&&f*h>0&&(p=Math.max(.01,1-(Math.abs(1/ge()*Math.abs(m-q))||0)),p*=.2)),m+=f*p*h,u.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:(null===(n=u.getCurrentVelocities())||void 0===n?void 0:n.pos)||0,restDelta:1,restSpeed:1}).from({pos:C}).to({pos:m}).start()}).on("panstart",e=>{!1!==Z("gestures",e)&&(null==e?void 0:e.axis)===(M?"y":"x")&&I(E,"is-dragging")}).on("panend",e=>{!1!==Z("gestures",e)&&F(E,"is-dragging")}).on("end",e=>{var t,n;if(!1===Z("gestures",e))return;const{srcEvent:r,axis:i,velocityX:s,velocityY:l,currentTouch:c}=e;if(c.length>0||!u)return;const d=r.target,h=o(d),f=h?h.scrollHeight>h.clientHeight?"y":"x":void 0,m=h&&(!i||i===f);M&&y(r)&&!i&&Ce(r);const p=W.length,g=Z("dragFree");if(!p)return;let b=m?0:Z("vertical")?l:s;i!==(M?"y":"x")&&(b=0);let w=(null==u?void 0:u.isRunning())?u.getEndValues().pos:C;const E=L&&!M?1:-1;if(m||(w+=b*(g?5:1)*E),!x&&(b*E<=0&&w<B||b*E>=0&&w>q)){let e=0;return Math.abs(b)>0&&(e=2*Math.abs(b),e=Math.min(.3*ge(),e)),w=a(B+-1*e,w,q+e),void u.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*b,restDelta:1,restSpeed:1}).from({pos:C}).to({pos:w}).start()}if(g||(null===(t=v.Autoscroll)||void 0===t?void 0:t.isEnabled()))return void(Math.abs(b)>10?u.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*b,restDelta:1,restSpeed:1}).from({pos:C}).to({pos:w}).start():u.isRunning()||k||(k=!0,se("settle")));if(!g&&!(null===(n=v.Autoscroll)||void 0===n?void 0:n.isEnabled())&&(!e.offsetX&&!e.offsetY||"y"===i&&!M||"x"===i&&M))return void Fe(R,{transition:"tween"});let A=me(w);Math.abs(b)>10&&A===R&&(A+=b>0?L&&!M?1:-1:L&&!M?-1:1),Fe(A,{transition:"tween",tween:{velocity:-1*b}})}).init())}(),D(E,"is-draggable",!!c&&W.length>0)}function ue(e="*"){var t;const n=[];for(const r of j)("*"===e||r.class&&r.class.includes(e)||r.el&&(null===(t=r.el)||void 0===t?void 0:t.classList.contains(e)))&&n.push(r);h=void 0,H=e,$=[...n]}function de(){if(!u)return;const e=me((null==u?void 0:u.isRunning())?u.getEndValues().pos:C);e!==R&&(h=R,R=e,Ie(),he(),fe(),se("change",R,h))}function he(){var e,t;if(!w)return;for(const e of w.querySelectorAll("[data-carousel-index]"))e.innerHTML=R+"";for(const e of w.querySelectorAll("[data-carousel-page]"))e.innerHTML=R+1+"";for(const e of w.querySelectorAll("[data-carousel-pages]"))e.innerHTML=W.length+"";const n=Z("classes")||{},r=Array.from(w.querySelectorAll("[data-carousel-go-to]")).filter(e=>e.closest(`.${n.container}`)===w);for(const t of r)parseInt((null===(e=t.dataset)||void 0===e?void 0:e.carouselGoTo)||"-1",10)===R?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current");for(const e of w.querySelectorAll("[data-carousel-go-prev]"))e.toggleAttribute("aria-disabled",!qe()),qe()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");for(const e of w.querySelectorAll("[data-carousel-go-next]"))e.toggleAttribute("aria-disabled",!He()),He()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");let i=!1;
25const o=null===(t=W[R])||void 0===t?void 0:t.slides[0];o&&(o.downloadSrc||"image"===o.type&&o.src)&&(i=!0);for(const e of w.querySelectorAll("[data-carousel-download]"))e.toggleAttribute("aria-disabled",!i)}function fe(e){var t;e||(e=null===(t=W[R])||void 0===t?void 0:t.slides[0]);const n=null==e?void 0:e.el;if(n)for(const t of n.querySelectorAll("[data-slide-index]"))t.innerHTML=e.index+1+""}function me(e){var t,n,r;if(!W.length)return 0;const i=ve();let o=e;x?o-=Math.floor((e-(null===(t=W[0])||void 0===t?void 0:t.pos))/i)*i||0:o=a(null===(n=W[0])||void 0===n?void 0:n.pos,e,null===(r=W[W.length-1])||void 0===r?void 0:r.pos);const s=new Map;let l=0;for(const e of W){const t=Math.abs(e.pos-o),n=Math.abs(e.pos-o-i),r=Math.abs(e.pos-o+i),a=Math.min(t,n,r);s.set(l,a),l++}const c=s.size>0?[...s.entries()].reduce((e,t)=>t[1]<e[1]?t:e):[R,0];return parseInt(c[0])}function pe(){return K}function ge(){return A}function ve(e=!0){return $.length?$.reduce((e,t)=>e+t.dim,0)+($.length-(x&&e?0:1))*K:0}function be(e){const t=ve(),n=ge();if(!t||!E||!n)return[];const r=[];e=void 0===e?C:e,x&&(e-=Math.floor(e/t)*t||0);let i=0;for(let o of $){const s=(t=0)=>{r.indexOf(o)>-1||(o.pos=i-e+t||0,o.offset+t>e-o.dim-S+.51&&o.offset+t<e+n+T-.51&&r.push(o))};o.offset=i,x&&(s(t),s(-1*t)),s(),i+=o.dim+K}return r}function ye(e,t){const n=[];for(const t of Array.isArray(e)?e:[e]){const e=we(Object.assign(Object.assign({},t),{isVirtual:!0}));e.el||(e.el=document.createElement("div")),se("createSlide",e),n.push(e)}j.splice(void 0===t?j.length:t,0,...n),Te();for(const e of n)se("addSlide",e),Ee(e);return ue(H),n}function we(e){return(r(e)||e instanceof HTMLElement)&&(e={html:e}),Object.assign({index:-1,el:void 0,class:"",isVirtual:!0,dim:0,pos:0,offset:0,html:"",src:""},e)}function Ee(e){let t=e.el;if(!e||!t)return;const n=e.html?e.html instanceof HTMLElement?e.html:s(e.html):void 0;n&&(I(n,"f-html"),e.htmlEl=n,I(t,"has-html"),t.append(n),se("contentReady",e))}function Ae(e){if(!E||!e)return;let t=e.el;if(t){if(t.setAttribute("index",e.index+""),t.parentElement!==E){let n;I(t,g.classes.slide),I(t,e.class),Ie(e);for(const t of j)if(t.index>e.index){n=t.el;break}E.insertBefore(t,n&&E.contains(n)?n:null),se("attachSlideEl",e)}return fe(e),t}}function Se(e){const t=null==e?void 0:e.el;t&&(t.remove(),Le(t),se("detachSlideEl",e))}function Te(){for(let e=0;e<j.length;e++){const t=j[e],n=t.el;n&&(t.index!==e&&Le(n),n.setAttribute("index",`${e}`)),t.index=e}}function xe(){var e,t,n,r,o;if(!w||!E)return;L=Z("rtl"),M=Z("vertical"),O=M?"height":"width";const s=Z("classes");if(D(w,s.isLTR,!L),D(w,s.isRTL,L),D(w,s.isHorizontal,!M),D(w,s.isVertical,M),D(w,s.hasAdaptiveHeight,Z("adaptiveHeight")),A=0,S=0,T=0,K=0,E){E.childElementCount||(E.style.display="grid");const e=E.getBoundingClientRect();A=E.getBoundingClientRect()[O]||0;const t=window.getComputedStyle(E);K=parseFloat(t.getPropertyValue("--f-carousel-gap"))||0,"visible"===t.getPropertyValue("overflow-"+(M?"y":"x"))&&(S=Math.abs(e[M?"top":"left"]),T=Math.abs(window[M?"innerHeight":"innerWidth"]-e[M?"bottom":"right"])),E.style.display=""}if(!A)return;const l=function(){let e=0;if(E){let t=document.createElement("div");t.style.display="block",I(t,g.classes.slide),E.appendChild(t),e=t.getBoundingClientRect()[O],t.remove(),t=void 0}return e}();for(const t of $){const n=t.el;let r=0;if(!t.isVirtual&&n&&i(n)){let t=!1;n.parentElement&&n.parentElement===E||(E.appendChild(n),t=!0),r=n.getBoundingClientRect()[O],t&&(null===(e=n.parentElement)||void 0===e||e.removeChild(n))}else r=l;t.dim=r}if(x=!1,Z("infinite")){x=!0;const e=ve();let n=A+S+T;for(let r=0;r<$.length;r++){const i=(null===(t=$[r])||void 0===t?void 0:t.dim)+K;if(e-i<n&&e-i-n<i){x=!1;break}}}!function(){var e;if(!w)return;const t=ge(),n=ve(!1);let r=Z("slidesPerPage");r="auto"===r?1/0:parseFloat(r+""),W=[];let i=0,o=0;for(const n of $)(!W.length||i+n.dim-t>.05||o>=r)&&(W.push({index:W.length,slides:[],dim:0,offset:0,pos:0}),i=0,o=0),null===(e=W[W.length-1])||void 0===e||e.slides.push(n),i+=n.dim+K,o++;const s=Z("center"),l=Z("fill");let c=0;for(const e of W){e.dim=(e.slides.length-1)*K;for(const t of e.slides)e.dim+=t.dim;e.offset=c,e.pos=c,!1!==s&&(e.pos-=.5*(t-e.dim)),l&&!x&&n>t&&(e.pos=a(0,e.pos,n-t)),c+=e.dim+K}const u=[];let d;for(const e of W){const t=Object.assign({},e);d&&Math.abs(t.pos-d.pos)<.1?(d.dim+=t.dim,d.slides=[...d.slides,...t.slides]):(d=t,t.index=u.length,u.push(t))}W=u,R=a(0,R,W.length-1)}(),B=(null===(n=W[0])||void 0===n?void 0:n.pos)||0,q=(null===(r=W[W.length-1])||void 0===r?void 0:r.pos)||0,0===m?function(){var e;h=void 0,R=Z("initialPage");const t=Z("initialSlide")||void 0;void 0!==t&&(R=je.getPageIndex(t)||0),R=a(0,R,W.length-1),C=(null===(e=W[R])||void 0===e?void 0:e.pos)||0,N=C}():N=(null===(o=W[R||0])||void 0===o?void 0:o.pos)||0,se("refresh"),he()}function Le(e){if(!e||!i(e))return;const t=parseInt(e.getAttribute("index")||"-1");let n="";for(const t of Array.from(e.classList)){const e=t.match(/^f-(\w+)(Out|In)$/);e&&e[1]&&(n=e[1]+"")}if(!e||!n)return;const r=[`f-${n}Out`,`f-${n}In`,"to-prev","to-next","from-prev","from-next"];e.removeEventListener("animationend",Oe),F(e,r.join(" ")),V.delete(t)}function Me(){if(!E)return;const e=V.size>0;for(const e of $)Le(e.el);V.clear(),e&&Ne()}function Oe(e){var t;"f-"===(null===(t=e.animationName)||void 0===t?void 0:t.substring(0,2))&&(Le(e.target),V.size||(F(w,"in-transition"),!k&&Math.abs(je.getPosition(!0)-N)<.5&&(k=!0,se("settle"))),Ne())}function Ce(e){ke(e),se("click",e)}function ke(e){var t;if(e.defaultPrevented)return;const n=e.composedPath()[0];if(n.closest("[data-carousel-go-prev]"))return J(e),void je.prev();if(n.closest("[data-carousel-go-next]"))return J(e),void je.next();const r=n.closest("[data-carousel-go-to]");if(r)return J(e),void je.goTo(parseFloat(r.dataset.carouselGoTo||"")||
250);if(n.closest("[data-carousel-download]")){J(e);const n=null===(t=W[R])||void 0===t?void 0:t.slides[0];if(n&&(n.downloadSrc||"image"===n.type&&n.src)){const e=n.downloadFilename,t=document.createElement("a"),r=n.downloadSrc||n.src||"";t.href=r,t.target="_blank",t.download=e||r,t.click()}return}}function Pe(e){var t;const n=e.el;n&&(null===(t=n.querySelector(".f-spinner"))||void 0===t||t.remove())}function Re(e){var t;const n=e.el;n&&(null===(t=n.querySelector(".f-html.is-error"))||void 0===t||t.remove(),F(n,"has-error"))}function Ie(e){var t;e||(e=null===(t=W[R])||void 0===t?void 0:t.slides[0]);const n=null==e?void 0:e.el;if(!n)return;let i=Z("formatCaption",e);void 0===i&&(i=e.caption),i=i||"";const o=Z("captionEl");if(o&&o instanceof HTMLElement){if(e.index!==R)return;if(r(i)&&(o.innerHTML=ie(i+"")),i instanceof HTMLElement){if(i.parentElement===o)return;o.innerHTML="",i.parentElement&&(i=i.cloneNode(!0)),o.append(i)}return}if(!i)return;let s=e.captionEl||n.querySelector(".f-caption");!s&&i instanceof HTMLElement&&i.classList.contains("f-caption")&&(s=i),s||(s=document.createElement("div"),I(s,"f-caption"),r(i)?s.innerHTML=ie(i+""):i instanceof HTMLElement&&(i.parentElement&&(i=i.cloneNode(!0)),s.append(i)));const a=`f-caption-${ne}_${e.index}`;s.setAttribute("id",a),s.dataset.selectable="true",I(n,"has-caption"),n.setAttribute("aria-labelledby",a),e.captionEl=s,n.insertAdjacentElement("beforeend",s)}function Fe(e,t={}){var n,i;let{transition:o,tween:s}=Object.assign({transition:g.transition,tween:g.tween},t||{});if(!w||!u)return;const c=W.length;if(!c)return;if(function(e,t){var n,i,o;if(!(w&&A&&u&&t&&r(t)&&"tween"!==t))return!1;for(const e of z)if(A-e.dim>.5)return!1;if(S>.5||T>.5)return;const s=W.length;let l=e>R?1:-1;e=x?(e%s+s)%s:a(0,e,s-1),L&&(l*=-1);const c=null===(n=W[R])||void 0===n?void 0:n.slides[0],d=null==c?void 0:c.index,h=null===(i=W[e])||void 0===i?void 0:i.slides[0],f=null==h?void 0:h.index,m=null===(o=W[e])||void 0===o?void 0:o.pos;if(void 0===f||void 0===d||d===f||C===m||Math.abs(A-((null==h?void 0:h.dim)||0))>1)return!1;k=!1,u.pause(),Me(),I(w,"in-transition"),C=N=m;const p=Ae(c),v=Ae(h);return de(),p&&(V.add(d),p.style.transform="",p.addEventListener("animationend",Oe),F(p,g.classes.isSelected),p.inert=!1,I(p,`f-${t}Out to-${l>0?"next":"prev"}`)),v&&(V.add(f),v.style.transform="",v.addEventListener("animationend",Oe),I(v,g.classes.isSelected),v.inert=!1,I(v,`f-${t}In from-${l>0?"prev":"next"}`)),Ne(),!0}(e,o))return;e=x?(e%c+c)%c:a(0,e,c-1);const d=(null===(n=W[e||0])||void 0===n?void 0:n.pos)||0;N=d;const f=u.isRunning()?u.getEndValues().pos:C;if(Math.abs(N-f)<1)return C=N,R!==e&&(Ie(),h=R,R=e,he(),fe(),se("change",R,h)),Ne(),void(k||(k=!0,se("settle")));if(u.pause(),Me(),x){const e=ve(),t=Math.floor((f-(null===(i=W[0])||void 0===i?void 0:i.pos))/e)||0,n=N+t*e;N=[n+e,n,n-e].reduce(function(e,t){return Math.abs(t-f)<Math.abs(e-f)?t:e})}!1!==o&&l(s)?u.spring(X({},g.tween,s)).from({pos:C}).to({pos:N}).start():(C=N,de(),Ne(),k||(k=!0,se("settle")))}function De(e){var t;let n=C;if(x&&!0!==e){const e=ve();n-=(Math.floor((C-(null===(t=W[0])||void 0===t?void 0:t.pos)||0)/e)||0)*e}return n}function Ne(){var e;if(!w||!E)return;z=be();const t=new Set,n=[],r=W[R],i=g.setTransform;let o;for(const i of $){const s=V.has(i.index),a=z.indexOf(i)>-1,l=(null===(e=null==r?void 0:r.slides)||void 0===e?void 0:e.indexOf(i))>-1;if(i.isVirtual&&!s&&!a)continue;let c=Ae(i);if(c&&(n.push(i),l&&t.add(c),Z("adaptiveHeight")&&l)){const e=(c.lastElementChild||c).getBoundingClientRect().height;o=null==o?e:Math.max(o,e)}}E&&o&&(E.style.height=`${o}px`),[...G(E,`.${g.classes.slide}`)].forEach(e=>{D(e,g.classes.isSelected,t.has(e));const n=j[parseInt(e.getAttribute("index")||"-1")];if(!n)return e.remove(),void Le(e);const r=V.has(n.index),o=z.indexOf(n)>-1;if(n.isVirtual&&!r&&!o)return void Se(n);if(e.inert=!o,!1===i)return;let s=n.pos?Math.round(1e4*n.pos)/1e4:0,a=0,l=0,c=0,u=0;r||(a=M?0:L?-1*s:s,l=M?s:0,c=Y(a,0,n.dim,0,100),u=Y(l,0,n.dim,0,100)),i instanceof Function&&!r?i(je,n,{x:a,y:l,xPercent:c,yPercent:u}):e.style.transform=a||l?`translate3d(${c}%, ${u}%,0)`:""}),se("render",n)}function Be(){null==w||w.removeEventListener("click",Ce),document.removeEventListener("mousemove",le),V.clear(),null==d||d.disconnect(),d=void 0;for(const e of j){let t=e.el;t&&i(t)&&(e.state=void 0,Pe(e),Re(e),e.isVirtual?(Se(e),e.el=void 0):(Le(t),t.style.transform="",E&&!E.contains(t)&&E.appendChild(t)))}for(const e of Object.values(v))null==e||e.destroy();v={},null==c||c.destroy(),c=void 0,null==u||u.destroy(),u=void 0;for(const[e,t]of Object.entries(g.classes||{}))"container"!==e&&F(w,t);F(E,"is-draggable")}function qe(){return x||R>0}function He(){return x||R<W.length-1}const je={add:function(e,t){var n;let r=C;const i=R,o=ve(),s=(null==u?void 0:u.isRunning())?u.getEndValues().pos:C,a=o&&Math.floor((s-((null===(n=W[0])||void 0===n?void 0:n.pos)||0))/o)||0;return ye(e,t),ue(H),xe(),u&&o&&(i===R&&(r-=a*o),r===N?C=N:u.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:r}).to({pos:N}).start()),Ne(),je},canGoPrev:qe,canGoNext:He,destroy:function(){return se("destroy"),window.removeEventListener("resize",ae),Be(),oe.clear(),w=null,W=[],j=[],g=Object.assign({},Q),v={},$=[],f=void 0,H="*",m=2,je},emit:se,filter:function(e="*"){return ue(e),xe(),C=a(B,C,q),Ne(),se("filter",e),je},getContainer:function(){return w},getGapDim:pe,getGestures:function(){return c},getLastMouseMove:function(){return ee},getOption:function(e){return Z(e)},getOptions:function(){return g},getPage:function(){return W[R]},getPageIndex:function(e){if(void 0!==e){for(const t of W||[])for(const n of t.slides)if(n.index===e)return t.index;return-1}return R},getPageIndexFromPosition:me,getPageProgress:function(e,t){var n;void 0===e&&(e=R);const r=W[e];if(!r)return e>R?-1:1;const i=ve(),o=pe();let s=r.pos,a=De();if(x&&!0!==t){const e=Math.floor((a-(null===(n=W[0])||void 0===n?void 0:n.pos))/i)||0;a-=e*i,s=[s+i,s,s-i].reduce(function(e,t){return Math.abs(t-a)<Math.abs(e-a)?t:e})}return(a-s)/(r.dim+o)||0},getPageVisibility:function(e){var t;void 0===e&&(e=R);const n=W[e];if(!n)return e>R?-1:1;const r=De(),i=ge();let o=n.pos;if(x){const e=ve(),n=o+(Math.floor((r-(null===(t=W[0])||void 0===t?void 0:t.pos))/e)||0)*e;o=[n+e,n,n-e].reduce(function(e,t){return Math.abs(t-r)<Math.abs(e-r)?t:e})}return o>r&&o+n.dim<r+i?1:o<r?(o+n.dim-r)/n.dim||0:o+n.dim>r+i&&(r+i-o)/n.dim||0},getPages:function(){return W},getPlugins:function(){return v},getPosition:De,getSlides:function(){return j},getState:function(){return m},getTotalSlideDim:ve,getTween:function(){return u},getViewport:function(){return E},getViewportDim:ge,getVisibleSlides:function(e){return void 0===e?z:be(e)},goTo:Fe,hasNavigated:function(){return void 0!==h},hideError:Re,hideLoading:Pe,init:function(){if(!e||!i(e))throw new Error("No Element found");return 0!==m&&(Be(),m=0),w=e,p=t,window.removeEventListener("resize",ae),p.breakpoints&&window.addEventListener("resize",ae),ae(),je},isInfinite:function(){return x},isInTransition:function(){return V.size>0},isRTL:function(){return L},isSettled:function(){return k},isVertical:function(){return M},localize:ie,next:function(e={}){return Fe(R+1,e),je},off:function(e,t){for(const n of e instanceof Array?e:[e])oe.has(n)&&oe.set(n,oe.get(n).filter(e=>e!==t));return je},on:function(e,t){for(const n of e instanceof Array?e:[e])oe.set(n,[...oe.get(n)||[],t]);return je},prev:function(e={}){return Fe(R-1,e),je},reInit:function(e={},r){return Be(),m=0,f=void 0,H="*",t=e,p=e,l(r)&&(n=r),ae(),je},remove:function(e){void 0===e&&(e=j.length-1);const t=j[e];return t&&(se("removeSlide",t),t.el&&(Le(t.el),t.el.remove(),t.el=void 0),j.splice(e,1),ue(H),xe(),C=a(B,C,q),Ne()),je},setPosition:function(e){C=e,de(),Ne()},showError:function(e,t){if(1===m){Pe(e),Re(e);const n=e.el;if(n){const r=document.createElement("div");I(r,"f-html"),I(r,"is-error"),r.innerHTML=ie(t||"<p>{{ERROR}}</p>"),e.htmlEl=r,I(n,"has-html has-error"),n.insertAdjacentElement("afterbegin",r),se("contentReady",e)}}return je},showLoading:function(e){const t=e.el,n=null==t?void 0:t.querySelector(".f-spinner");if(!t||n)return je;const r=Z("spinnerTpl"),i=s(r);return i&&(I(i,"f-spinner"),t.insertAdjacentElement("beforeend",i)),je},version:"6.1.14"};return je};re.l10n={en_EN:Z},re.getDefaults=()=>Q;const ie=(e=!0,t="--f-scrollbar-compensate",n="--f-body-margin",r="hide-scrollbar")=>{const i=document,o=i.body,s=i.documentElement;if(e){if(o.classList.contains(r))return;let e=window.innerWidth-s.getBoundingClientRect().width;e<0&&(e=0),s.style.setProperty(t,`${e}px`);const i=parseFloat(window.getComputedStyle(o).marginRight);i&&o.style.setProperty(n,`${i}px`),o.classList.add(r)}else o.classList.remove(r),o.style.setProperty(n,""),i.documentElement.style.setProperty(t,"")};function oe(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}const se=function(e="",t="",n=""){return e.split(t).join(n)},ae={tpl:e=>`<img class="f-panzoom__content" \n    ${e.srcset?'data-lazy-srcset="{{srcset}}"':""} \n    ${e.sizes?'data-lazy-sizes="{{sizes}}"':""} \n    data-lazy-src="{{src}}" alt="{{alt}}" />`},le=()=>{let e;function t(t,n){const r=null==e?void 0:e.getOptions().Zoomable;let i=(l(r)?Object.assign(Object.assign({},ae),r):ae)[t];return i&&"function"==typeof i&&n?i(n):i}function n(){e&&!1!==e.getOptions().Zoomable&&(e.on("addSlide",s),e.on("removeSlide",a),e.on("attachSlideEl",c),e.on("click",o),e.on("change",i
25),e.on("ready",i))}function i(){u();const t=(null==e?void 0:e.getVisibleSlides())||[];if(t.length>1||"slide"===(null==e?void 0:e.getOption("transition")))for(const n of t){const t=n.panzoomRef;t&&((null==e?void 0:e.getPage().slides)||[]).indexOf(n)<0&&t.execute(H.ZoomTo,Object.assign({},t.getStartPosition()))}}function o(e,t){const n=t.target;n&&!t.defaultPrevented&&n.dataset.panzoomAction&&d(n.dataset.panzoomAction)}function s(n,i){const o=i.el;if(!e||!o||i.panzoomRef)return;const s=i.src||i.lazySrc||"",a=i.alt||i.caption||`Image #${i.index}`,l=i.srcset||i.lazySrcset||"",c=i.sizes||i.lazySizes||"";if(s&&r(s)&&!i.html&&(!i.type||"image"===i.type)){i.type="image",i.thumbSrc=i.thumbSrc||s;let e=t("tpl",i);e=se(e,"{{src}}",s+""),e=se(e,"{{srcset}}",l+""),e=se(e,"{{sizes}}",c+""),o.insertAdjacentHTML("afterbegin",e)}const d=o.querySelector(".f-panzoom__content");if(!d)return;d.setAttribute("alt",a+"");const h=i.width&&"auto"!==i.width?parseFloat(i.width+""):"auto",f=i.height&&"auto"!==i.height?parseFloat(i.height+""):"auto",m=K(o,Object.assign({width:h,height:f,classes:{container:"f-zoomable"},event:()=>null==e?void 0:e.getLastMouseMove(),spinnerTpl:()=>(null==e?void 0:e.getOption("spinnerTpl"))||""},t("Panzoom")));m.on("*",(t,n,...r)=>{e&&("loading"===n&&(i.state=0),"loaded"===n&&(i.state=1),"error"===n&&(i.state=2,null==e||e.showError(i,"{{IMAGE_ERROR}}")),e.emit(`panzoom:${n}`,i,...r),"loading"===n&&e.emit("contentLoading",i),"ready"===n&&e.emit("contentReady",i),i.index===(null==e?void 0:e.getPageIndex())&&u())}),i.panzoomRef=m}function a(e,t){t.panzoomRef&&(t.panzoomRef.destroy(),t.panzoomRef=void 0)}function c(e,t){const n=t.panzoomRef;if(n)switch(n.getState()){case 0:n.init();break;case 3:n.execute(H.ZoomTo,Object.assign(Object.assign({},n.getStartPosition()),{velocity:0}))}}function u(){var t,n;const r=(null==e?void 0:e.getContainer())||void 0,i=null===(n=null===(t=null==e?void 0:e.getPage())||void 0===t?void 0:t.slides[0])||void 0===n?void 0:n.panzoomRef;if(r)if(i)i.updateControls(r);else for(const e of r.querySelectorAll("[data-panzoom-action]")||[])e.setAttribute("aria-disabled",""),e.setAttribute("tabindex","-1")}function d(t,...n){var r;null===(r=null==e?void 0:e.getPage().slides[0].panzoomRef)||void 0===r||r.execute(t,...n)}return{init:function(t){e=t,e.on("initPlugins",n)},destroy:function(){if(e){e.off("initPlugins",n),e.off("addSlide",s),e.off("removeSlide",a),e.off("attachSlideEl",c),e.off("click",o),e.off("change",i),e.off("ready",i);for(const t of e.getSlides())a(0,t)}e=void 0},execute:d}},ce={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},ue=()=>{let e,t;function n(){const t=null==e?void 0:e.getOptions().Sync;return l(t)?Object.assign(Object.assign({},ce),t):ce}function r(){const r=n().target;e&&r&&function(r){var l,h,f;e&&r&&(t=r,e.getOptions().classes=Object.assign(Object.assign({},e.getOptions().classes),{isSelected:""}),e.getOptions().initialSlide=(null===(h=null===(l=t.getPage())||void 0===l?void 0:l.slides[0])||void 0===h?void 0:h.index)||0,n().syncOnChange&&e.on("change",o),n().syncOnClick&&e.on("click",a),n().syncOnHover&&(null===(f=e.getViewport())||void 0===f||f.addEventListener("mouseover",c)),e&&t&&(e.on("ready",i),e.on("refresh",u),t.on("change",s),t.on("filter",d)))}(r)}function i(){h()}function o(){var n;if(e&&t){const r=(null===(n=e.getPage())||void 0===n?void 0:n.slides)||[],i=t.getPageIndex(r[0].index||0);i>-1&&t.goTo(i,e.hasNavigated()?void 0:{tween:!1,transition:!1}),h()}}function s(){var n;if(e&&t){const r=e.getPageIndex((null===(n=t.getPage())||void 0===n?void 0:n.slides[0].index)||0);r>-1&&e.goTo(r,t.hasNavigated()?void 0:{tween:!1,transition:!1}),h()}}function a(n,r){var i;if(!e||!t)return;if(null===(i=e.getTween())||void 0===i?void 0:i.isRunning())return;const o=null==e?void 0:e.getOptions().classes.slide;if(!o)return;const s=r.target.closest(`.${o}`);
25if(s){const e=parseInt(s.getAttribute("index")||"")||0,n=t.getPageIndex(e);t.goTo(n)}}function c(t){e&&a(0,t)}function u(){var n;if(e&&t){const r=e.getPageIndex((null===(n=t.getPage())||void 0===n?void 0:n.slides[0].index)||0);r>-1&&e.goTo(r,{tween:!1,transition:!1}),h()}}function d(n,r){e&&t&&(e.filter(r),s())}function h(){var n,r,i;if(!t)return;const o=(null===(r=null===(n=t.getPage())||void 0===n?void 0:n.slides[0])||void 0===r?void 0:r.index)||0;for(const t of(null==e?void 0:e.getSlides())||[])null===(i=t.el)||void 0===i||i.classList.toggle("is-selected",t.index===o)}return{init:function(t){e=t,e.on("initSlides",r)},destroy:function(){var n;null==e||e.off("ready",i),null==e||e.off("refresh",u),null==e||e.off("change",o),null==e||e.off("click",a),null===(n=null==e?void 0:e.getViewport())||void 0===n||n.removeEventListener("mouseover",c),null==t||t.off("change",s),null==t||t.off("filter",d),t=void 0,null==e||e.off("initSlides",r),e=void 0},getTarget:function(){return t}}},de={showLoading:!0,preload:1},he="is-lazyloading",fe="is-lazyloaded",me="has-lazyerror",pe=()=>{let e;function t(){const t=null==e?void 0:e.getOptions().Lazyload;return l(t)?Object.assign(Object.assign({},de),t):de}function n(n){var r;const i=n.el;if(!i)return;const o=t(),s="[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]",a=Array.from(i.querySelectorAll(s));i.matches(s)&&a.push(i);for(const t of a){const i=t.dataset.lazySrc,s=t.dataset.lazySrcset,a=t.dataset.lazySizes,l=t.dataset.lazyBg,c=(t instanceof HTMLImageElement||t instanceof HTMLSourceElement)&&(i||s),u=!!l;if(!c&&!u)continue;const d=i||s||l;if(d){if(c){const l=null===(r=t.parentElement)||void 0===r?void 0:r.classList.contains("f-panzoom__wrapper");o.showLoading&&(null==e||e.showLoading(n)),t.addEventListener("load",()=>{null==e||e.hideLoading(n),F(t,me),t instanceof HTMLImageElement?t.decode().finally(()=>{F(t,he),I(t,fe)}).catch(()=>{}):(F(t,he),I(t,fe)),l||null==e||e.emit("lazyLoad:loaded",n,t,d)}),t.addEventListener("error",()=>{null==e||e.hideLoading(n),F(t,he),I(t,me),l||null==e||e.emit("lazyLoad:error",n,t,d)}),t.classList.add("f-lazyload"),t.classList.add(he),l||null==e||e.emit("lazyLoad:load",n,t,d),i&&(t.src=i),s&&(t.srcset=s),a&&(t.sizes=a)}else u&&(t.style.backgroundImage=`url('${l}')`);delete t.dataset.lazySrc,delete t.dataset.lazySrcset,delete t.dataset.lazySizes,delete t.dataset.lazyBg}}}function r(){if(!e)return;const r=[...e.getVisibleSlides()],i=t().preload;if(i>0){const t=e.getPosition(),n=e.getViewportDim();r.push(...e.getVisibleSlides(t+n*i),...e.getVisibleSlides(t-n*i))}for(const e of r)n(e)}return{init:function(t){e=t,e.on("render",r)},destroy:function(){null==e||e.off("render",r),e=void 0}}},ge='<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1">',ve="</svg>",be={prevTpl:ge+'<path d="M15 3l-9 9 9 9"></path>'+ve,nextTpl:ge+'<path d="M9 3l9 9-9 9"></path>'+ve},ye=()=>{let e,t,n;function r(t){const n=function(){const t=null==e?void 0:e.getOptions().Arrows;return l(t)?Object.assign(Object.assign({},be),t):be}(),r=`<button data-carousel-go-${t} tabindex="0" class="f-button is-arrow is-${t}" title="{{${t.toUpperCase()}}}">`+n[`${t}Tpl`]+"</button>",i=s(e.localize(r))||void 0;return i&&I(i,n[`${t}Class`]),i}function i(){var r;null==t||t.remove(),t=void 0,null==n||n.remove(),n=void 0,null===(r=null==e?void 0:e.getContainer())||void 0===r||r.classList.remove("has-arrows")}function o(){e&&!1!==e.getOptions().Arrows&&e.getPages().length>1?(function(){if(!e)return;const i=e.getViewport();i&&(t||(t=r("prev"),t&&i.insertAdjacentElement("beforebegin",t)),n||(n=r("next"),n&&i.insertAdjacentElement("afterend",n)),D(e.getContainer(),"has-arrows",!0))}(),e&&(null==t||t.toggleAttribute("aria-disabled",!e.canGoPrev()),null==n||n.toggleAttribute("aria-disabled",!e.canGoNext()))):i()}return{init:function(t){e=t.on(["change","refresh"],o)},destroy:function(){i(),null==e||e.off(["change","refresh"],o),e=void 0}}},we='<circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>',Ee='<g><line x1="11" y1="8" x2="11" y2="14"></line></g>'+we,Ae={moveLeft:["moveLeft","MOVE_LEFT",'<path d="M5 12h14M5 12l6 6M5 12l6-6"/>'],moveRight:["moveRight","MOVE_RIGHT",'<path d="M5 12h14M13 18l6-6M13 6l6 6"/>'],moveUp:["moveUp","MOVE_UP",'<path d="M12 5v14M18 11l-6-6M6 11l6-6"/>'],moveDown:["moveDown","MOVE_DOWN",'<path d="M12 5v14M18 13l-6 6M6 13l6 6"/>'],zoomOut:["zoomOut","ZOOM_OUT",we],zoomIn:["zoomIn","ZOOM_IN",Ee],toggleFull:["toggleFull","TOGGLE_FULL",Ee],iterateZoom:["iterateZoom","ITERATE_ZOOM",Ee],toggle1to1:["toggleFull","TOGGLE_FULL",'<path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/>'],rotateCCW:["rotateCCW","ROTATE_CCW",'<path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/>'],rotateCW:["rotateCW","ROTATE_CW",'<path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/>'],flipX:["flipX","FLIP_X",'<path d="M12 3v18M16 7v10h5L16 7M8 7v10
25H3L8 7"/>'],flipY:["flipY","FLIP_Y",'<path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/>'],reset:["reset","RESET",'<path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'],toggleFS:["toggleFS","TOGGLE_FS",'<g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g>']},Se={};for(const e of Object.keys(Ae)){const t=Ae[e];Se[e]={tpl:`<button data-panzoom-action="${t[0]}" class="f-button" title="{{${t[1]}}}"><svg>${t[2]}</svg></button>`}}var Te;!function(e){e.Left="left",e.middle="middle",e.right="right"}(Te||(Te={}));const xe=Object.assign({counter:{tpl:'<div class="f-counter"><span data-carousel-page></span>/<span data-carousel-pages></span></div>'},download:{tpl:'<button data-carousel-download class="f-button" title="{{DOWNLOAD}}"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></button>'},autoplay:{tpl:'<button data-autoplay-action="toggle" class="f-button" title="{{TOGGLE_AUTOPLAY}}"><svg><g><path d="M5 3.5 19 12 5 20.5Z"/></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},thumbs:{tpl:'<button data-thumbs-action="toggle" class="f-button" title="{{TOGGLE_THUMBS}}"><svg><rect width="18" height="14" x="3" y="3" rx="2"/><path d="M4 21h1M9 21h1M14 21h1M19 21h1"/></svg></button>'}},Se),Le={absolute:!1,display:{left:[],middle:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset"],right:[]},enabled:"auto",items:{}},Me=()=>{let e,t;function n(t){const n=null==e?void 0:e.getOptions().Toolbar;let r=(l(n)?Object.assign(Object.assign({},Le),n):Le)[t];return r&&"function"==typeof r&&e?r(e):r}function i(){var i;if(!e||t)return;if(!1===(null==e?void 0:e.getOptions().Toolbar))return;const o=e.getContainer();if(!o)return;let a=n("enabled");if(!a)return;const c=n("absolute"),u=e.getSlides().length>1;let d=!1,h=!1;for(const t of e.getSlides())t.panzoomRef&&(d=!0),(t.downloadSrc||"image"===t.type&&t.src)&&(h=!0);const f=(null===(i=e.getPlugins().Thumbs)||void 0===i?void 0:i.isEnabled())||!1,m=u&&e.getPlugins().Autoplay||!1,p=e.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if("auto"===a&&(a=d),!a)return;t=o.querySelector(".f-carousel__toolbar")||void 0,t||(t=document.createElement("div"),I(t,"f-carousel__toolbar"));const g=n("display"),v=X({},xe,n("items"));for(const n of["left","middle","right"]){const i=g[n]||[],o=document.createElement("div");I(o,`f-carousel__toolbar__column is-${n}`);for(const t of i){let n;if(r(t)){if("counter"===t&&!u)continue;if("autoplay"===t&&!m)continue;if(Se[t]&&!d)continue;if("fullscreen"===t&&!p)continue;if("thumbs"===t&&!f)continue;if("download"===t&&!h)continue;n=v[t]}if(l(t)&&(n=t),n&&n.tpl){let t=e.localize(n.tpl);t=t.split("<svg>").join('<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24">');const r=s(t);r&&("function"==typeof n.click&&e&&r.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof n.click&&e&&n.click(e,t)}),o.append(r))}}t.append(o)}if(t.childElementCount){if(c&&I(t,"is-absolute"),!t.parentElement){const e=n("parentEl");e?e.insertAdjacentElement("afterbegin",t):o.insertAdjacentElement("afterbegin",t)}o.contains(t)&&(I(o,"has-toolbar"),c&&I(o,"has-absolute-toolbar"))}}return{init:function(t){e=t,null==e||e.on("initSlides",i)},destroy:function(){null==e||e.off("initSlides",i),F(null==e?void 0:e.getContainer(),"has-toolbar has-absolute-toolbar"),null==t||t.remove(),t=void 0},add:function(e,t){xe[e]=t},isEnabled:function(){return!!t}}},Oe={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},Ce=()=>{let e,t,n=!1,r=!1,i=!1,o=null;function s(t){const n=null==e?void 0:e.getOptions().Autoplay;let r=(l(n)?Object.assign(Object.assign({},Oe),n):Oe)[t];return r&&"function"==typeof r&&e?r(e):r}function a(){clearTimeout(t),t=void 0}function c(){if(!e||!n||i||r||t||!e.isSettled()||function(){var t;const n=(null===(t=null==e?void 0:e.getPage())||void 0===t?void 0:t.slides)||[];for(const e of n)if(0===e.state)return!0;return!1}())return;!function(){var t,n,r,i;if(!e)return;if(h(),!s("showProgressbar"))return;let a=s("progressbarParentEl");if(!a&&(null===(t=e.getPlugins().Toolbar)||void 0===t?void 0:t.isEnabled())&&(a=e.getContainer()),!a&&!0!==(null===(n=e.getPlugins().Toolbar)||void 0===n?void 0:n.isEnabled())){const t=(null===(r=e.getPages()[0])||void 0===r?void 0:r.slides)||[],n=(null===(i=e.getPage())||void 0===i?void 0:i.slides)||[];1===t.length&&1===n.length&&(a=n[0].el)}if(a||(a=e.getViewport()),!a)return;o=document.createElement("div"),I(o,"f-progressbar"),a.prepend(o);const l=s("timeout")||1e3;o.style.animationDuration=`${l}ms`}();const a=s("timeout");t=setTimeout(()=>{e&&n&&!r&&(e.isInfinite()||e.getPageIndex()!==e.getPages().length-1?e.next():e.goTo(0))},a)}function u(){var t;if(!e||e.getPages().length<2||!1===e.getOptions().Autoplay)return;if(n)return;n=!0,e.emit("autoplay:start",s("timeout")),I(e.getContainer(),"has-autoplay"),null===(t=e.getTween())||void 0===t||t.on("start",b);const r=null==e?void 0:e.getContainer();r&&s("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(r.addEventListener("mouseenter",y,!1),r.addEventListener("mouseleave",w,!1)),e.on("change",g),e.on("settle",v),e.on("contentReady",m),e.on("panzoom:touchStart",d),e.on("panzoom:wheel",d),e.isSettled()&&c()}function d(){var t;
25if(a(),h(),e){if(n){e.emit("autoplay:end"),null===(t=e.getTween())||void 0===t||t.off("start",b);const n=e.getContainer();n&&(n.classList.remove("has-autoplay"),n.removeEventListener("mouseenter",y,!1),n.removeEventListener("mouseleave",w,!1))}e.off("change",g),e.off("settle",v),e.off("contentReady",m),e.off("panzoom:touchStart",d),e.off("panzoom:wheel",d)}n=!1,r=!1}function h(){o&&(o.remove(),o=null)}function f(){e&&e.getPages().length>1&&s("autoStart")&&u()}function m(){c()}function p(e,t){const n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.autoplayAction&&E.toggle()}function g(){!e||!(null==e?void 0:e.isInfinite())&&e.getPageIndex()===e.getPages().length-1?d():(a(),h())}function v(){c()}function b(){a(),h()}function y(){i=!0,n&&(a(),h())}function w(){i=!1,n&&!r&&(null==e?void 0:e.isSettled())&&c()}const E={init:function(t){e=t,e.on("ready",f),e.on("click",p)},destroy:function(){d(),null==e||e.off("ready",f),null==e||e.off("click",p),e=void 0},isEnabled:()=>n,pause:function(){r=!0,a(),h()},resume:function(){r=!1,n&&!i&&c()},start(){u()},stop(){d()},toggle(){n?d():u()}};return E},ke={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:'<button aria-label="Slide to #{{page}}"><img draggable="false" alt="{{alt}}" data-lazy-src="{{src}}" /></button>',type:"modern"};let Pe;const Re=()=>{let e,t,n,r,i,o=0,c=0,u=!0;function d(t){const n=null==e?void 0:e.getOptions().Thumbs;let r=(l(n)?Object.assign(Object.assign({},ke),n):ke)[t];return r&&"function"==typeof r&&e?r(e):r}function h(){if(!e)return!1;if(!1===(null==e?void 0:e.getOptions().Thumbs))return!1;let t=0;for(const n of e.getSlides())n.thumbSrc&&t++;return t>=d("minCount")}function f(){return"modern"===d("type")}function m(){return"scrollable"===d("type")}function p(){const t=[],n=(null==e?void 0:e.getSlides())||[];for(const e of n)t.push({index:e.index,class:e.thumbClass,html:g(e)});return t}function g(e){const t=e.thumb?e.thumb instanceof HTMLImageElement?e.thumb.src:e.thumb:e.thumbSrc||void 0,n=void 0===e.thumbAlt?`Thumbnail #${(e.index||0)+1}`:e.thumbAlt+"";let r=d("thumbTpl");return r=se(r,"{{alt}}",n),r=se(r,"{{src}}",t+""),r=se(r,"{{index}}",`${e.index||0}`),r=se(r,"{{page}}",`${(e.index||0)+1}`),r}function v(e){return`<div index="${e.index||0}" class="f-thumbs__slide ${e.class||""}">${e.html||""}</div>`}function b(t=!1){var r;const i=null==e?void 0:e.getContainer();if(!e||!i||n||!h())return;const o=(null===(r=d("Carousel"))||void 0===r?void 0:r.classes)||{};if(o.container=o.container||"f-thumbs",!n){const e=i.nextElementSibling;(null==e?void 0:e.classList.contains(o.container))&&(n=e)}if(!n){n=document.createElement("div");const e=d("parentEl");e?e.insertAdjacentElement("beforeend",n):i.insertAdjacentElement("afterend",n)}I(n,o.container),I(n,"f-thumbs"),I(n,`is-${d("type")}`),t&&I(n,"is-hidden")}function y(){if(!n||!m())return;r=document.createElement("div"),I(r,"f-thumbs__viewport");let t="";for(const e of p())"string"==typeof(e.html||"")&&(t+=v(e));r.innerHTML=t,n.append(r),n.addEventListener("click",t=>{t.preventDefault();const n=t.target.closest("[index]"),r=parseInt((null==n?void 0:n.getAttribute("index"))||"-1");e&&r>-1&&e.goTo(r)}),i=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target instanceof HTMLImageElement&&(e.target.src=e.target.getAttribute("data-lazy-src")+"",e.target.removeAttribute("data-lazy-src"),null==i||i.unobserve(e.target))})},{root:r,rootMargin:"100px"}),n.querySelectorAll("[data-lazy-src]").forEach(e=>{null==i||i.observe(e)}),null==e||e.emit("thumbs:ready")}function w(){var r;if(!Pe||!e||!n||m()||t)return;const i=p();if(!i.length)return;const s=X({},{Sync:{target:e},Lazyload:{preload:1},slides:i,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",slide:"f-thumbs__slide"},center:!0,fill:!f(),infinite:!1,dragFree:!0,rtl:e.getOptions().rtl||!1,slidesPerPage:e=>{let t=0;return f()&&(function(){if(!f())return;if(!n)return;const e=e=>n&&parseFloat(getComputedStyle(n).getPropertyValue("--f-thumb-"+e))||0;o=e("width"),c=e("clip-width")}(),t=4*(o-c)),e&&e.getTotalSlideDim()<=e.getViewportDim()-t?1/0:1}},ke.Carousel||{},d("Carousel")||{});t=Pe(n,s,{Sync:ue,Lazyload:pe}),t.on("ready",()=>{I(n,"is-syncing"),null==e||e.emit("thumbs:ready"),f()&&(null==e||e.on("render",T))}),t.on("destroy",()=>{null==e||e.emit("thumbs:destroy")}),t.init(),null===(r=t.getGestures())||void 0===r||r.on("start",()=>{u=!1}),t.on("click",(e,t)=>{const n=t.target;if(n){const e=n.matches("button")?n:n.firstElementChild;e&&e.matches("button")&&(t.preventDefault(),e.focus({preventScroll:!0}))}}),I(e.getContainer(),"has-thumbs"),P()}function E(){h()&&d("showOnStart")&&(b(),y())}function A(){var t;h()&&(w(),null==e||e.on("addSlide",L),null==e||e.on("removeSlide",M),null==e||e.on("click",O),null==e||e.on("refresh",C),null===(t=null==e?void 0:e.getGestures())||void 0===t||t.on("start",S),k(!0))}function S(){var e,t;u=!0,(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=document.activeElement)||void 0===t||t.blur())}function T(){var r,i;null==n||n.classList.toggle("is-syncing",!1===(null==e?void 0:e.hasNavigated())||(null===(r=null==e?void 0:e.getTween())||void 0===r?void 0:r.isRunning())),P(),(null===(i=null==e?void 0:e.getGestures())||void 0===i?void 0:i.isPointerDown())&&function(){if(!f())return;if(!e||!t)return;if(!u)return;const n=t.getTween(),r=t.getPages(),i=e.getPageIndex()||0,s=e.getPageProgress()||0;if(!(e&&r&&r[i]&&n))return;const l=n.isRunning()?n.getCurrentValues().pos:t.getPosition();if(void 0===l)return;let d=r[i].pos+s*(o-c);d=a(r[0].pos,d,r[r.length-1].pos),n.from({pos:l}).to({pos:d}).start()}()}function x(){u=!0,k()}function L(e,n){const o={html:g(n)};if(t)t.add(o,n.index);else if(r){const e=s(v(o));if(e){r.append(e);const t=e.querySelector("img");t&&(null==i||i.observe(t))}}}function M(e,n){var i;t?t.remove(n.index):r&&(null===(i=r.querySelector(`[index="${n.index}"]`))||void 0===i||i.remove())}function O(e,t){var r;const i=t.target;t.defaultPrevented||"toggle"!==(null===(r=null==i?void 0:i.dataset)||void 0===r?void 0:r.thumbsAction)||(n||(b(!0),y(),w()),n&&n.classList.toggle("is-hidden"))}function C(){k()}function k(t=!1){if(!e||!r||!m())return;const n=e.getPageIndex();
25r.querySelectorAll(".is-selected").forEach(e=>{e.classList.remove("is-selected")});const i=r.querySelector(`[index="${n}"]`);if(i){i.classList.add("is-selected");const e=r.getBoundingClientRect(),n=i.getBoundingClientRect(),o=i.offsetTop-r.offsetTop-.5*e.height+.5*n.height,s=i.scrollLeft-r.scrollLeft-.5*e.width+.5*n.width;r.scrollTo({top:o,left:s,behavior:t?"instant":"smooth"})}}function P(){if(!f())return;if(!e||!t)return;const n=(null==t?void 0:t.getSlides())||[];let r=-.5*o;for(const t of n){const n=t.el;if(!n)continue;let i=e.getPageProgress(t.index)||0;i=Math.max(-1,Math.min(1,i)),i>-1&&i<1&&(r+=.5*o*(1-Math.abs(i))),i=Math.round(1e4*i)/1e4,r=Math.round(1e4*r)/1e4,n.style.setProperty("--progress",`${Math.abs(i)}`),n.style.setProperty("--shift",`${(null==e?void 0:e.isRTL())?-1*r:r}px`),i>-1&&i<1&&(r+=.5*o*(1-Math.abs(i)))}}return{init:function(t,n){Pe=n,e=t,e.on("ready",A),e.on("initSlides",E),e.on("change",x)},destroy:function(){var r,i;m()&&(null==e||e.emit("thumbs:destroy")),null==e||e.off("ready",A),null==e||e.off("initSlides",E),null==e||e.off("change",x),null==e||e.off("render",T),null==e||e.off("addSlide",L),null==e||e.off("click",O),null==e||e.off("refresh",C),null===(r=null==e?void 0:e.getGestures())||void 0===r||r.off("start",S),null===(i=null==e?void 0:e.getContainer())||void 0===i||i.classList.remove("has-thumbs"),e=void 0,null==t||t.destroy(),t=void 0,null==n||n.remove(),n=void 0},getCarousel:function(){return t},getContainer:function(){return n},getType:function(){return d("type")},isEnabled:h}},Ie={autosize:!1,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!1},Fe=()=>{let e;function t(){const t=null==e?void 0:e.getOptions().Html;return l(t)?X({},Ie,t):Ie}function n(){return!1!==(null==e?void 0:e.getOptions().Html)}function i(e){return"iframe"===e.type||"pdf"===e.type||"gmap"===e.type}function o(e){const t=`${e}`;return t.match(/^\d+$/)?`${t}px`:t}function s(e){if(void 0===e||""===e)return;const t=`${e}`.trim();if(!t.match(/^\d+(\.\d+)?(px)?$/))return;const n=parseFloat(t);return Number.isFinite(n)?n:void 0}function a(e,n){var r;const i=null!==(r=e[n])&&void 0!==r?r:t()[n];return"true"===i||"false"!==i&&i}function c(e,t){if(!n())return;let i=t.type,o=t.src;if(!i&&r(o)){if("#"===o.charAt(0)?i="inline":o.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?i="image":o.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":o.match(/\.(html|php)((\?|#).*)?$/i)&&(i="iframe"),!i){const e=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+\.?\d+?)z))|(?:\?ll=))(.*)?/i);e&&(o=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+"&z="+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^\//,"&"):""):e[4]+"").replace(/\?/,"&")}&output=${e[4]&&e[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="gmap")}if(!i){const e=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);e&&(o=`https://maps.google.${e[1]}/maps?q=${e[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="gmap")}i&&(t.src=o,t.type=i)}}function u(r,o){n()&&i(o)&&function(n){const r=n.el,i=n.src;if(!e||!r||!i)return;const o=document.createElement("iframe");I(o,"f-iframe");for(const[e,n]of Object.entries(t().iframeAttr||{}))o.setAttribute(e,n);o.onerror=()=>{n.state=2,null==e||e.showError(n,"{{IFRAME_ERROR}}")};const s=document.createElement("div");I(s,"f-html"),s.append(o),n.htmlEl=s,n.contentEl=o,I(r,`has-html has-iframe has-${n.type}`),r.prepend(s),f(n);const l=a(n,"preload"),c=a(n,"autosize");"iframe"===n.type&&(l||c)?(n.state=0,e.showLoading(n),I(r,"is-loading"),o.onload=()=>{if(!e||2===e.getState()||!o.src.length||n.contentEl!==o||!o.isConnected)return;n.state=1;const t="true"!==o.dataset.ready;o.dataset.ready="true",m(n),e.hideLoading(n),t&&e.emit("contentReady",n),F(r,"is-loading")},o.src=`${i}`):(o.src=`${i}`,e.emit("contentReady",n))}(o)}function d(t,n){var r,o;if(i(n)){const t=n.el;null==e||e.hideError(n),null===(r=n.contentEl)||void 0===r||r.remove(),n.contentEl=void 0,null===(o=n.htmlEl)||void 0===o||o.remove(),n.htmlEl=void 0,t&&(F(t,"has-html has-iframe has-pdf has-gmap"),F(t,"is-loading"))}}function h(){for(const t of(null==e?void 0:e.getSlides())||[])i(t)&&(f(t),1===t.state&&m(t))}function f(e){const t=e.htmlEl;if(t&&i(e)&&(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width&&(t.style.maxWidth=o(e.width)),e.height&&(t.style.maxHeight=o(e.height)),e.aspectRatio)){const n=e.aspectRatio.split("/"),r=parseFloat(n[0].trim()),i=n[1]?parseFloat(n[1].trim()):0,o=r&&i?r/i:r;t.offsetHeight;const s=t.getBoundingClientRect(),a=o<(s.width||1)/(s.height||1);
25t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=a?"auto":"",t.style.height=a?"":"auto"}}function m(e){const t=e.contentEl,n=null==t?void 0:t.parentElement,r=null==n?void 0:n.style;let i=a(e,"autosize"),o=s(e.width)||0,l=s(e.height)||0;if(o&&l&&(i=!1),t&&n&&r&&i){try{const e=window.getComputedStyle(n),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),s=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),a=t.contentWindow;if(a){const e=a.document,t=e.getElementsByTagName("html")[0],n=e.body;r.width="";const c=window.getComputedStyle(n),u=parseFloat(c.marginLeft)+parseFloat(c.marginRight),d=n.style.overflow||"";n.style.overflow="hidden",o=o||n.scrollWidth+u+i,r.flex="0 0 auto",r.width=`${o}px`,r.height=`${n.scrollHeight}px`,n.style.overflow=d,l=Math.max(t.scrollHeight,Math.ceil(t.getBoundingClientRect().height))+s}}catch(e){}(o||l)&&Object.assign(r,{flex:"0 1 auto",width:o?`${o}px`:"",height:l?`${l}px`:""})}}return{init:function(t){e=t,e.on("addSlide",c),e.on("attachSlideEl",u),e.on("detachSlideEl",d),e.on("refresh",h)},destroy:function(){null==e||e.off("addSlide",c),null==e||e.off("attachSlideEl",u),null==e||e.off("detachSlideEl",d),null==e||e.off("refresh",h),e=void 0}}},De=(e,t={})=>{const n=new URL(e),r=new URLSearchParams(n.search),i=new URLSearchParams;for(const[e,n]of[...r,...Object.entries(t)]){let t=n+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&i.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else i.set(e,t)}let o=i+"",s=e.match(/#t=((.*)?\d+s)/);return s&&(o+=`#t=${s[1]}`),o},Ne={autoplay:!1,html5videoTpl:'<video class="f-html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n    <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',iframeAttr:{allow:"autoplay; fullscreen",scrolling:"no",referrerPolicy:"strict-origin-when-cross-origin",credentialless:""},vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Be=()=>{let e,t=!1;function n(){const t=null==e?void 0:e.getOptions().Video;return l(t)?Object.assign(Object.assign({},Ne),t):Ne}function i(){var t;return null===(t=null==e?void 0:e.getPage())||void 0===t?void 0:t.slides[0]}const o=t=>{var n;try{let r=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===r.event)for(let r of Array.from((null===(n=null==e?void 0:e.getContainer())||void 0===n?void 0:n.getElementsByClassName("f-iframe"))||[]))r instanceof HTMLIFrameElement&&r.contentWindow===t.source&&(r.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===r.event){const e=document.getElementById(r.id);e&&(e.dataset.ready="true")}}catch(t){}};function a(e,t){const i=t.src;if(!r(i))return;let o=t.type;if(!o||"html5video"===o){const e=i.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i);e&&(o="html5video",t.html5videoFormat=t.html5videoFormat||"video/"+("ogv"===e[1]?"ogg":e[1]))}if(!o||"youtube"===o){const e=i.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i);if(e){const r=Object.assign(Object.assign({},n().youtube),t.youtube||{}),s=`www.youtube${r.nocookie?"-nocookie":""}.com`,a=De(i,r),l=encodeURIComponent(e[2]);t.videoId=l,t.src=`https://${s}/embed/${l}?${a}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${l}/mqdefault.jpg`,o="youtube"}}if(!o||"vimeo"===o){const e=i.match(/^.+vimeo.com\/(?:\/)?(video\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/);if(e){const r=Object.assign(Object.assign({},n().vimeo),t.vimeo||{}),s=De(i,r),a=encodeURIComponent(e[2]),l=e[5]||"";t.videoId=a,t.src=`https://player.vimeo.com/video/${a}?${l?`h=${l}${s?"&":""}`:""}${s}`,o="vimeo"}}t.type=o}function c(t,i){"html5video"===i.type&&function(t){const i=t.el,o=t.src;if(!e||!i||!o)return;const a=t.html5videoTpl||n().html5videoTpl,l=t.html5videoFormat||n().html5videoFormat;if(!a)return;const c=t.poster||(t.thumb&&r(t.thumb)?t.thumb:""),u=s(a.replace(/\{\{src\}\}/gi,o+"").replace(/\{\{format\}\}/gi,l||"").replace(/\{\{poster\}\}/gi,c+""));if(!u)return;const d=document.createElement("div");I(d,"f-html"),d.append(u),t.contentEl=u,t.htmlEl=d,I(i,`has-${t.type}`),i.prepend(d),f(t),e.emit("contentReady",t)}(i),"youtube"!==i.type&&"vimeo"!==i.type||function(t){const r=t.el,i=t.src;if(!e||!r||!i)return;const o=document.createElement("iframe");I(o,"f-iframe"),o.setAttribute("id",`f-iframe_${t.videoId}`);for(const[e,t]of Object.entries(n().iframeAttr||{}))o.setAttribute(e,t);"youtube"===t.type&&(o.onload=()=>{var t;
251===(null==e?void 0:e.getState())&&(null===(t=o.contentWindow)||void 0===t||t.postMessage(JSON.stringify({event:"listening",id:o.getAttribute("id")}),"*"))}),o.onerror=()=>{null==e||e.showError(t,"{{IFRAME_ERROR}}")};const s=document.createElement("div");I(s,"f-html"),s.append(o),t.contentEl=o,t.htmlEl=s,I(r,`has-html has-iframe has-${t.type}`),o.src=`${t.src}`,r.prepend(s),f(t),e.emit("contentReady",t)}(i)}function u(e,t){var n,r;"html5video"!==t.type&&"youtube"!==t.type&&"vimeo"!==t.type||(null===(n=t.contentEl)||void 0===n||n.remove(),t.contentEl=void 0,null===(r=t.htmlEl)||void 0===r||r.remove(),t.htmlEl=void 0),t.poller&&clearTimeout(t.poller)}function d(){t=!1}function h(){if(t)return;t=!0;const e=i();(e&&void 0!==e.autoplay?e.autoplay:n().autoplay)&&(function(){var e;const t=i(),n=null==t?void 0:t.el;if(n&&"html5video"===(null==t?void 0:t.type))try{const e=n.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch(e){}const r=null==t?void 0:t.htmlEl;r instanceof HTMLIFrameElement&&(null===(e=r.contentWindow)||void 0===e||e.postMessage('{"event":"command","func":"stopVideo","args":""}',"*"))}(),function(){const e=i(),t=null==e?void 0:e.type;if(!(null==e?void 0:e.el)||"youtube"!==t&&"vimeo"!==t)return;const n=()=>
25{if(e.contentEl&&e.contentEl instanceof HTMLIFrameElement&&e.contentEl.contentWindow){let t;if("true"===e.contentEl.dataset.ready)return t="youtube"===e.type?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);"youtube"===e.type&&(t={event:"listening",id:e.contentEl.getAttribute("id")},e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(n,250)};n()}())}function f(e){const t=null==e?void 0:e.htmlEl;if(e&&t&&("html5video"===e.type||"youtube"===e.type||"vimeo"===e.type)){if(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width){let n=`${e.width}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxWidth=`${n}`}if(e.height){let n=`${e.height}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxHeight=`${n}`}if(e.aspectRatio){const n=e.aspectRatio.split("/"),r=parseFloat(n[0].trim()),i=n[1]?parseFloat(n[1].trim()):0,o=r&&i?r/i:r;t.offsetHeight;const s=t.getBoundingClientRect(),a=o<(s.width||1)/(s.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=a?"auto":"",t.style.height=a?"":"auto"}}}function m(){f(i())}return{init:function(t){e=t,e.on("addSlide",a),e.on("attachSlideEl",c),e.on("detachSlideEl",u),e.on("ready",h),e.on("change",d),e.on("settle",h),e.on("refresh",m),window.addEventListener("message",o)},destroy:function(){null==e||e.off("addSlide",a),null==e||e.off("attachSlideEl",c),null==e||e.off("detachSlideEl",u),null==e||e.off("ready",h),null==e||e.off("change",d),null==e||e.off("settle",h),null==e||e.off("refresh",m),window.removeEventListener("message",o),e=void 0}}},qe={autoStart:!1,btnTpl:'<button data-fullscreen-action="toggle" class="f-button" title="{{TOGGLE_FULLSCREEN}}"><svg><g><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},He="in-fullscreen-mode",je=()=>{let e;function t(t){const n=null==e?void 0:e.getOptions().Fullscreen;let r=(l(n)?Object.assign(Object.assign({},qe),n):qe)[t];return r&&"function"==typeof r&&e?r(e):r}function n(){var n;null===(n=null==e?void 0:e.getPlugins().Toolbar)||void 0===n||n.add("fullscreen",{tpl:t("btnTpl")})}function r(){if(t("autoStart")){const e=o();e&&a(e)}}function i(e,t){const n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.fullscreenAction&&u()}function o(){return t("el")||(null==e?void 0:e.getContainer())||void 0}function s(){const e=document;return e.fullscreenEnabled?!!e.fullscreenElement:!!e.webkitFullscreenEnabled&&!!e.webkitFullscreenElement}function a(e){const t=document;let n;return e||(e=t.documentElement),t.fullscreenEnabled?n=e.requestFullscreen():t.webkitFullscreenEnabled&&(n=e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)),n&&n.then(()=>{e.classList.add(He)}),n}function c(){const e=document;let t;return e.fullscreenEnabled?t=e.fullscreenElement&&e.exitFullscreen():e.webkitFullscreenEnabled&&(t=e.webkitFullscreenElement&&e.webkitExitFullscreen()),t&&t.then(()=>{var e;null===(e=o())||void 0===e||e.classList.remove(He)}),t}function u(){if(s())c();else{const e=o();e&&a(e)}}return{init:function(t){e=t,e.on("initPlugins",n),e.on("ready",r),e.on("click",i)},destroy:function(){null==e||e.off("initPlugins",n),null==e||e.off("ready",r),null==e||e.off("click",i)},exit:c,inFullscreen:s,request:a,toggle:u}};let $e,Ve,ze=!1,We=!1,_e=!1,Ue=!1;const Ke=()=>{const e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],r=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{urlHash:e,urlSlug:t.join("-"),urlIndex:r}},Ge=()=>{const e=null==$e?void 0:$e.getInstance(),t=null==e?void 0:e.getState();return!(!e||0!==t&&1!==t)},Xe=()=>{if(!$e)return;if(Ge())return;const{urlSlug:e,urlIndex:t}=Ke();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);n&&$e.fromTriggerEl(n),Ge()||(n=document.querySelectorAll(`[data-fancybox="${e}"]`)[t-1],n&&$e.fromTriggerEl(n,{startIndex:t-1})),Ge()&&n&&!n.closest("[inert]")&&n.scrollIntoView({behavior:"instant",block:"center",inline:"center"})},Ye=e=>{const t=e.getOptions().Hash,n=e.getSlide();return n&&(n.slug||n.fancybox||(l(t)?t.slug:""))||""},Ze=e=>{var t,n;const r=Ye(e),i=e.getSlide();if(!i||!r)return"";let o=parseInt(i.index+"",10)+1,s=i.slug?`#${i.slug}`:`#${r}-${o}`;return((null===(n=null===(t=e.getCarousel())||void 0===t?void 0:t.getPages())||void 0===n?void 0:n.length)||0)<2&&(s=`#${r}`),s},Je=()=>{if(!$e)return;if(_e)return;const e=null==$e?void 0:$e.getInstance(),t=null==e?void 0:e.getCarousel(),{urlSlug:n,urlIndex:r}=Ke(),i=null==e?void 0:e.getOptions().Hash;if(!1!==i){if(e&&1===e.getState()&&t){const o=t.getSlides();for(const e of o||[])if(e.slug===n||(e.fancybox===n||l(i)&&i.slug===n)&&e.index===r-1)return We=!1,void t.goTo(e.index);Ue=!0,e.close(),Ue=!1}Xe()}},Qe=()=>{$e&&(Ve=setTimeout(()=>{ze=!0,Xe(),ze=!1},300),window.addEventListener("hashchange",Je,!1))};let et;function tt(){history.scrollRestoration&&et&&(history.scrollRestoration=et,et=void 0)}const nt=()=>{let e,t="";function n(){var n;if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;if(ze){const t=e.getOptions().sync;t&&t.goTo((null===(n=null==e?void 0:e.getCarousel())||void 0===n?void 0:n.getPageIndex())||0,{transition:!1,tween:!1})}const i=e.getCarousel();if(!i)return;if(!e.getSlide())return;const o=Ye(e);
25if(!o)return;const{urlHash:s,urlSlug:a}=Ke(),l=Ze(e);s!==l&&(t=s),history.scrollRestoration&&!et&&(et=history.scrollRestoration,history.scrollRestoration="manual",window.addEventListener("beforeunload",tt)),i.on("change",r);const c=o!==a;try{window.history[c?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+l),c&&(We=!0)}catch(e){}}function r(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;if(!e.getSlide())return;if(!Ye(e))return;const t=Ze(e);_e=!0;try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch(e){}_e=!1}function i(){var n;if(e&&e.isTopMost()&&!1!==e.getOptions().Hash&&!Ue&&Ye(e)){_e=!0;try{We&&!function(){if(window.parent===window)return!1;try{var e=window.frameElement}catch(t){e=null}return null===e?"data:"===location.protocol:e.hasAttribute("sandbox")}()&&"IFRAME"!==(null===(n=document.activeElement)||void 0===n?void 0:n.nodeName)?window.history.back():window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch(e){}_e=!1}}return{init:function(t){clearTimeout(Ve),e=t,e.on("ready",n),e.on("close",i)},destroy:function(){null==e||e.off("ready",n),null==e||e.off("close",i);const t=null==e?void 0:e.getCarousel();t&&t.off("change",r),e=void 0,(null==$e?void 0:$e.getInstance())||(tt(),window.removeEventListener("beforeunload",tt))}}};nt.getInfoFromURL=Ke,nt.startFromUrl=Xe,nt.setup=function(e){$e||($e=e,oe()&&(/complete|interactive|loaded/.test(document.readyState)?Qe():document.addEventListener("DOMContentLoaded",Qe)))};const rt=Object.assign(Object.assign({},Z),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ELEMENT_NOT_FOUND:"HTML Element Not Found",IFRAME_ERROR:"Error Loading Page",NO_CAPTION:"No Caption",TOGGLE_SIDEBAR:"Toggle sidebar"}),it='<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.286 4.714 4.714 19.286M4.714 4.714l14.572 14.572" /></svg></button>';Me().add("close",{tpl:it});const ot=e=>{e.cancelable&&e.preventDefault()},st=(e=null,t="",n)=>{if(!e||!e.parentElement||!t)return void(n&&n());at(e);const r=i=>{i.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",r),delete e.dataset.animationName,n&&n(),e.classList.remove(t))};e.dataset.animationName=t,e.addEventListener("animationend",r),I(e,t)},at=e=>{e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))};var lt;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.Destroyed=3]="Destroyed"}(lt||(lt={}));const ct={ajax:null,backdropClick:"close",Carousel:{},closeButton:"auto",closeButtonTpl:it,closeExisting:!1,delegateEl:void 0,dragToClose:!0,fadeEffect:!0,groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,id:void 0,idle:!1,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:rt,mainClass:"",mainStyle:{},mainTpl:'<dialog class="fancybox__dialog">\n    <div class="fancybox__container" tabindex="0" aria-label="{{MODAL}}">\n      <div class="fancybox__backdrop"></div>\n      <div class="fancybox__carousel"></div>\n    </div>\n  </dialog>',modal:!0,on:{},parentEl:void 0,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,sync:void 0,theme:"dark",triggerEl:void 0,triggerEvent:void 0,zoomEffect:!0},ut=new Map;let dt=0;const ht="with-fancybox";function ft(){for(const e of Object.values(pt.Plugins)){const t=e.setup;"function"==typeof t&&t(pt)}}function mt(e,t={}){var n,r,i;if(!(e&&e instanceof Element))return;let o,s,a,l,c={};for(const[t,n]of pt.openers)if(t.contains(e))for(const[r,i]of n){let n;if(r){for(const i of t.querySelectorAll(r))if(i.contains(e)){n=i;break}if(!n)continue}for(const[r,u]of i){let i=null;try{i=e.closest(r)}catch(e){}i&&(s=t,a=n,o=i,l=r,X(c,u||{}))}}if(!s||!l||!o)return;const u=X({},ct,t,c,{triggerEl:o});let d=[].slice.call((a||s).querySelectorAll(l));const h=o.closest(".f-carousel"),f=null==h?void 0:h.carousel;if(f&&(!a||!h.contains(a))){const e=[];for(const t of null==f?void 0:f.getSlides()){const n=t.el;n&&(n.matches(l)?e.push(n):e.push(...[].slice.call(n.querySelectorAll(l)))
25)}e.length&&(d=[...e],null===(n=f.getPlugins().Autoplay)||void 0===n||n.pause(),null===(r=f.getPlugins().Autoscroll)||void 0===r||r.pause(),u.sync=f)}if(!1===u.groupAll){const e=u.groupAttr,t=e&&o?o.getAttribute(`${e}`):"";d=e&&t&&"true"!==t?d.filter(n=>n.getAttribute(`${e}`)===t):[o]}if(!d.length)return;null===(i=u.triggerEvent)||void 0===i||i.preventDefault();const m=pt.getInstance(),p=null==m?void 0:m.getState();if(m&&(p===lt.Init||p===lt.Ready)){const e=m.getOptions().triggerEl;if(e&&d.indexOf(e)>-1)return}return Object.assign({},u.Carousel||{}).rtl&&(d=d.reverse()),o&&void 0===t.startIndex&&(u.startIndex=d.indexOf(o)),pt.fromNodes(d,u)}const pt={Plugins:{Hash:nt},version:"6.1.14",openers:new Map,bind:function(e,t,n,i){if(!oe())return;let o=document.body,s=null,a="[data-fancybox]",l={};e instanceof Element&&(o=e),r(e)&&r(t)?(s=e,a=t):r(t)&&r(n)?(s=t,a=n):r(t)?a=t:r(e)&&(a=e),"object"==typeof t&&(l=t||{}),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{}),function(e,t,n,r={}){if(!(e&&e instanceof Element&&n))return;const i=pt.openers.get(e)||new Map,o=i.get(t)||new Map;o.set(n,r),i.set(t,o),pt.openers.set(e,i),1===i.size&&e.addEventListener("click",pt.fromEvent),ft()}(o,s,a,l)},close:function(e=!0,...t){if(e)for(const e of ut.values())e.close(...t);else{const e=pt.getInstance();e&&e.close(...t)}},destroy:function(){let e;for(;e=pt.getInstance();)e.destroy();for(const e of pt.openers.keys())e.removeEventListener("click",pt.fromEvent);pt.openers.clear()},fromEvent:function(e){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const n={triggerEvent:e};if(t.closest(".fancybox__container.is-hiding"))return ot(e),void e.stopPropagation();const r=t.closest("[data-fancybox-delegate]")||void 0;if(r){const e=r.dataset.fancyboxDelegate||"",i=document.querySelectorAll(`[data-fancybox="${e}"]`),o=parseInt(r.dataset.fancyboxIndex||"",10)||0;t=i[o]||i[0],X(n,{delegateEl:r,startIndex:o})}return mt(t,n)},fromNodes:function(e,t){t=X({},ct,t||{});const n=[],r=e=>e instanceof HTMLImageElement?e:e instanceof HTMLElement?e.querySelector("img:not([aria-hidden])"):void 0;for(const i of e){const o=i.dataset||{},s=t.delegateEl&&e.indexOf(i)===t.startIndex?t.delegateEl:void 0,a=r(s)||r(i)||void 0,l=o.src||i.getAttribute("href")||i.getAttribute("currentSrc")||i.getAttribute("src")||void 0,c=o.thumb||o.thumbSrc||(null==a?void 0:a.getAttribute("currentSrc"))||(null==a?void 0:a.getAttribute("src"))||(null==a?void 0:a.dataset.lazySrc)||void 0,u={src:l,alt:o.alt||(null==a?void 0:a.getAttribute("alt"))||void 0,thumbSrc:c,thumbEl:a,triggerEl:i,delegateEl:s};for(const e in o){let t=o[e]+"";u[e]="true"===t?"fancybox"!==e||"":"false"!==t&&t}n.push(u)}return pt.show(n,t)},fromSelector:function(e,t,n,i){if(!oe())return;let o=document.body,s=null,a="[data-fancybox]",l={};e instanceof Element&&(o=e),r(e)&&r(t)?(s=e,a=t):r(t)&&r(n)?(s=t,a=n):r(t)?a=t:r(e)&&(a=e),"object"==typeof t&&(l=t||{}),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{});for(const[e,t]of pt.openers)for(const[n,r]of t)for(const[t,i]of r)if(e===o&&n===s){const e=o.querySelector((n?`${n} `:"")+a);if(e&&e.matches(t))return pt.fromTriggerEl(e,l)}},fromTriggerEl:mt,getCarousel:function(){var e;return(null===(e=pt.getInstance())||void 0===e?void 0:e.getCarousel())||void 0},getDefaults:function(){return ct},getInstance:function(e){if(e){const t=ut.get(e);return t&&t.getState()!==lt.Destroyed?t:void 0}return Array.from(ut.values()).reverse().find(e=>{if(e.getState()!==lt.Destroyed)return e})||void 0},getSlide:function(){var e;return(null===(e=pt.getInstance())||void 0===e?void 0:e.getSlide())||void 0},show:function(e=[],t={}){return ft(),(()=>{let e,t,n,a,c,u,d,h=lt.Init,f=Object.assign({},ct),m=-1,p={},g=[],v=!1,w=!0,E=0;function A(e,...t){let n=f[e];return n&&"function"==typeof n?n(ge,...t):n}function S(e,t=[]){const n=A("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}const T=new Map;function x(e,...t){const n=[...T.get(e)||[]];for(const[t,r]of Object.entries(f.on||{}))(t===e||t.split(" ").indexOf(e)>-1)&&n.push(r);for(const e of n)e&&"function"==typeof e&&e(ge,...t);"*"!==e&&x("*",e,...t)}function L(){F(t,"is-revealing");try{document.activeElement===e&&((null==t?void 0:t.querySelector("[autofocus]"))||t).focus()}catch(e){}}function M(e,t){var n;K(t),V(),null===(n=t.el)||void 0===n||n.addEventListener("click",C),"inline"!==t.type&&"clone"!==t.type||function(e){if(!a||!e||!e.el)return;let t=null;if(r(e.src)){const n=e.src.split("#",2).pop();t=n?document.getElementById(n):null}if(t){if(I(t,"f-html"),"clone"===e.type||t.closest(".fancybox__carousel")){t=t.cloneNode(!0);const n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let r=t.getAttribute("id");r=r?`${r}--clone`:`clone-${m}-${e.index}`,t.setAttribute("id",r)}else if(t.parentNode){const n=document.createElement("div");n.inert=!0,t.parentNode.insertBefore(n,t),e.placeholderEl=n}e.htmlEl=t,I(e.el,"has-html"),e.el.prepend(t),t.classList.remove("hidden"),"none"===t.style.display&&(t.style.display=""),"none"===getComputedStyle(t).getPropertyValue("display")&&(t.style.display=t.dataset.display||"flex"),null==a||a.emit("contentReady",e)}else null==a||a.showError(e,"{{ELEMENT_NOT_FOUND}}")}(t),"ajax"===t.type&&function(e){const t=e.el;if(!t)return;if(e.htmlEl||e.xhr)return;null==a||a.showLoading(e),e.state=0;const n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&h===lt.Ready)if(null==a||a.hideLoading(e),e.state=1,200===n.status){let r=n.responseText+"",i=null,o=null;if(e.filter){const t=document.createElement("div");t.innerHTML=r,o=t.querySelector(e.filter+"")}o&&o instanceof HTMLElement?i=o:(i=document.createElement("div"),i.innerHTML=r),i.classList.add("f-html"),e.htmlEl=i,t.classList.add("has-html"),t.classList.add("has-ajax"),t.prepend(i),null==a||a.emit("contentReady",e)}else null==a||a.showError(e)};const r=A("ajax")||null;n.open(r?"POST":"GET",e.src+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(r),e.xhr=n}(t)}function O(e,t){var n;G(t),null===(n=t.el)||void 0===n||n.removeEventListener("click",C),"inline"!==t.type&&"clone"!==t.type||function(e){const t=e.htmlEl,n=e.placeholderEl;t&&("none"!==getComputedStyle(t).getPropertyValue("display")&&(t.style.display="none"),t.offsetHeight),n&&(t&&n.parentNode&&n.parentNode.insertBefore(t,n),n.remove()),e.htmlEl=void 0,e.placeholderEl=void 0}(t),t.xhr&&(t.xhr.abort(),t.xhr=void 0)}function C(e){if(!J())return;if(h!==lt.Ready)return ot(e),void e.stopPropagation();if(e.defaultPrevented)return;if(!P.isClickAllowed())return;const t=e.composedPath()[0];t.closest(".fancybox__carousel")&&t.classList.contains("fancybox__slide")&&z(e)}function k(){w=!1,t&&a&&t.classList.remove("is-revealing"),V();const e=A("sync");if(a&&e){const t=e.getPageIndex(a.getPageIndex())||0;e.goTo(t,{transition:!1,tween:!1})}}function R(){var e;!function(){const e=null==a?void 0:a.getViewport();if(!A("dragToClose")||!a||!e)return;if(c=P(e).init(),!c)return;let n=!1,r=0,i=0,s={},l=1;function d(){var e,t;null==u||u.spring({clamp:!0,mass:1,tension:0===i?140:960,friction:17,restDelta:.1,restSpeed:.1,maxSpeed:1/0}).from({y:r}).to({y:i}).start();const n=(null===(e=null==a?void 0:a.getViewport())||void 0===e?void 0:e.getBoundingClientRect().height)||0,o=null===(t=Q())||void 0===t?void 0:t.panzoomRef;if(n&&o)if(0===i)o.execute(H.Reset);else{const e=Y(Math.abs(r),0,.33*n,l,.77*l,!1);o.execute(H.ZoomTo,{scale:e})}}const f=e=>{var t;const n=e.srcEvent,r=n.target;return a&&!(y(n)&&(null===(t=n.touches)||void 0===t?void 0:t.length)>1)&&r&&!o(r)};u=b().on("step",n=>{if(t&&e&&h===lt.Ready){const i=e.getBoundingClientRect().height;r=Math.min(i,Math.max(-1*i,n.y));const o=Y(Math.abs(r),0,.65*i,1,.2,!0);t.style.setProperty("--f-drag-opacity",o+""),t.style.setProperty("--f-drag-offset",r+"px")}}),c.on("start",function(){n||(null==u||u.pause(),i=r)}).on("panstart",e=>{var t,r;if(!n&&f(e)&&"y"===e.axis){ot(e.srcEvent),n=!0,de(),null===(t=null==a?void 0:a.getViewport())||void 0===t||t.classList.add("is-dragging");const i=null===(r=Q())||void 0===r?void 0:r.panzoomRef;if(i){l=i.getTransform().scale||1;const e=i.getOptions();s=Object.assign({},e),e.bounds=!1,e.gestures=!1}}else n=!1}).on("pan",function(e){n&&f(e)&&(ot(e.srcEvent),e.srcEvent.stopPropagation(),"y"===e.axis&&(i+=e.deltaY,d()))}).on("end",e=>{var t,o,l;if(null===(t=null==a?void 0:a.getViewport())||void 0===t||t.classList.remove("is-dragging"),n){const t=null===(o=Q())||void 0===o?void 0:o.panzoomRef;if(t){null===(l=t.getTween())||void 0===l||l.end();const e=t.getOptions();
25e.bounds=s.bounds||!1,e.gestures=s.gestures||!1}f(e)&&"y"===e.axis&&(Math.abs(e.velocityY)>5||Math.abs(r)>50)&&he(e.srcEvent,"f-throwOut"+(e.velocityY>0?"Down":"Up"))}n=!1,h===lt.Ready&&0!==r&&(i=0,d())})}(),document.body.addEventListener("click",U),document.body.addEventListener("keydown",_,{passive:!1,capture:!0}),V(),oe();const n=A("sync");a&&n&&(null===(e=n.getTween())||void 0===e||e.start()),Z(Q())}function N(){(null==a?void 0:a.canGoNext())?oe():ce()}function B(e,t){K(t)}function q(e,t){K(t),Z(t)}function j(){var e;const n=null==a?void 0:a.getPlugins().Thumbs;D(t,"has-thumbs",(null==n?void 0:n.isEnabled())||!1),D(t,"has-vertical-thumbs",!!n&&("scrollable"===n.getType()||!0===(null===(e=n.getCarousel())||void 0===e?void 0:e.isVertical())))}function V(){if(!t)return;const e=(null==a?void 0:a.getPages().length)||0,n=(null==a?void 0:a.getPageIndex())||0,r=t.querySelectorAll("[data-fancybox-index],[data-fancybox-page],[data-fancybox-pages]");for(const t of r)t.hasAttribute("data-fancybox-index")?t.textContent=String(n):t.hasAttribute("data-fancybox-page")?t.textContent=String(n+1):t.textContent=String(e)}function z(e){e.composedPath()[0].closest("[data-fancybox-close]")?he(e):(x("backdropClick",e),e.defaultPrevented||A("backdropClick")&&he(e))}function W(){ae()}function _(e){if(!J())return;if(h!==lt.Ready)return;const t=e.key,n=A("keyboard");if(!n)return;if(e.ctrlKey||e.altKey||e.shiftKey)return;const r=e.composedPath()[0];if(!i(r))return;if("Escape"!==t&&(e=>{const t=["input","textarea","select","option","video","iframe","[contenteditable]","[data-selectable]","[data-draggable]"].join(",");return e.matches(t)||e.closest(t)})(r))return;if(x("keydown",e),e.defaultPrevented)return;const o=n[t];if(o)switch(o){case"close":he(e);break;case"next":ot(e),null==a||a.next();break;case"prev":ot(e),null==a||a.prev()}}function U(e){if(!J())return;if(h!==lt.Ready)return;if(ae(),e.defaultPrevented)return;const t=e.composedPath()[0],n=!!t.closest("[data-fancybox-close]"),r=t.classList.contains("fancybox__backdrop");(n||r)&&z(e)}function K(e){var t;const{el:n,htmlEl:r,panzoomRef:i,closeButtonEl:o}=e,l=i?i.getWrapper():r;if(!n||!n.parentElement||!l)return;let c=A("closeButton");if("auto"===c&&(c=!0!==(null===(t=null==a?void 0:a.getPlugins().Toolbar)||void 0===t?void 0:t.isEnabled())),c){if(!o){const t=s(S(A("closeButtonTpl")));t&&(I(t,"is-close-button"),e.closeButtonEl=l.insertAdjacentElement("afterbegin",t),I(n,"has-close-btn"))}}else G(e)}function G(e){e.closeButtonEl&&(e.closeButtonEl.remove(),e.closeButtonEl=void 0),F(e.el,"has-close-btn")}function Z(e){if(!(w&&a&&1===a.getState()&&e&&e.index===a.getOptions().initialPage&&e.el&&e.el.parentElement))return;if(void 0!==e.state&&1!==e.state)return;w=!1;const t=e.panzoomRef,n=null==t?void 0:t.getTween(),r=A("zoomEffect")&&n?te(e):void 0;if(t&&n&&r){const{x:e,y:i,scale:o}=t.getStartPosition();return void n.spring({tension:215,friction:25,restDelta:.001,restSpeed:.001,maxSpeed:1/0}).from(r).to({x:e,y:i,scale:o}).start()}const i=(null==t?void 0:t.getContent())||e.htmlEl;i&&st(i,A("showClass",e))}function J(){var e;return(null===(e=pt.getInstance())||void 0===e?void 0:e.getId())===m}function Q(){var e;return null===(e=null==a?void 0:a.getPage())||void 0===e?void 0:e.slides[0]}function ee(){const e=Q();return e?e.triggerEl||A("triggerEl"):void 0}function te(e){var t,n;const r=e.thumbEl;if(!r||!(e=>{const t=e.getBoundingClientRect(),n=e.closest("[style]"),r=null==n?void 0:n.parentElement;if(n&&n.style.transform&&r){const e=r.getBoundingClientRect();if(t.left<e.left||t.left>e.left+e.width-t.width)return!1;if(t.top<e.top||t.top>e.top+e.height-t.height)return!1}const i=Math.max(document.documentElement.clientHeight,window.innerHeight),o=Math.max(document.documentElement.clientWidth,window.innerWidth);return!(t.bottom<0||t.top-i>=0||t.right<0||t.left-o>=0)})(r))return;const i=null===(n=null===(t=e.panzoomRef)||void 0===t?void 0:t.getWrapper())||void 0===n?void 0:n.getBoundingClientRect(),o=null==i?void 0:i.width,s=null==i?void 0:i.height;if(!o||!s)return;const a=r.getBoundingClientRect();let l=a.width,c=a.height,u=a.left,d=a.top;if(a&&l&&c){if(r instanceof HTMLImageElement){const e=window.getComputedStyle(r).getPropertyValue("object-fit");
25if("contain"===e||"scale-down"===e){const{width:t,height:n}=((e,t,n,r,i="contain")=>{if("contain"===i||e>n||t>r){const i=n/e,o=r/t,s=Math.min(i,o);e*=s,t*=s}return{width:e,height:t}})(r.naturalWidth,r.naturalHeight,l,c,e);u+=.5*(l-t),d+=.5*(c-n),l=t,c=n}}if(!(Math.abs(o/s-l/c)>.1))return{x:u+.5*l-(i.left+.5*o),y:d+.5*c-(i.top+.5*s),scale:l/o}}}function ne(){d&&clearTimeout(d),d=void 0,document.removeEventListener("mousemove",W)}function oe(){if(v)return;if(d)return;const e=A("idle");e&&(d=setTimeout(se,e))}function se(){t&&(ne(),I(t,"is-idle"),document.addEventListener("mousemove",W),v=!0)}function ae(){v&&(ce(),oe())}function ce(){ne(),null==t||t.classList.remove("is-idle"),v=!1}function de(){const e=ee();var t;!e||(t=e.getBoundingClientRect()).bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)||e.closest("[inert]")||e.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}function he(e,t){var n,r,i,o,s;if(h===lt.Closing||h===lt.Destroyed)return;const l=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(x("shouldClose",l,e),l.defaultPrevented)return;if(ne(),e){if(e.defaultPrevented)return;ot(e),e.stopPropagation(),e.stopImmediatePropagation()}if(h=lt.Closing,null==u||u.pause(),null==c||c.destroy(),a){null===(n=a.getGestures())||void 0===n||n.destroy(),null===(r=a.getTween())||void 0===r||r.pause();for(const e of a.getSlides()){const t=e.panzoomRef;t&&(X(t.getOptions(),{clickAction:!1,dblClickAction:!1,wheelAction:!1,bounds:!1,minScale:0,maxScale:1/0}),null===(i=t.getGestures())||void 0===i||i.destroy(),null===(o=t.getTween())||void 0===o||o.pause())}}const d=null==a?void 0:a.getPlugins();null===(s=null==d?void 0:d.Autoplay)||void 0===s||s.stop();const f=null==d?void 0:d.Fullscreen;f&&f.inFullscreen()?Promise.resolve(f.exit()).then(()=>{setTimeout(()=>{fe(e,t)},150)}):fe(e,t)}function fe(n,r){var i,o;if(h!==lt.Closing)return;x("close",n),w=!1,document.body.removeEventListener("click",U),document.body.removeEventListener("keydown",_,{passive:!1,capture:!0}),A("placeFocusBack")&&de();const s=document.activeElement;s&&(null==e?void 0:e.contains(s))&&s.blur(),A("fadeEffect")&&(null==t||t.classList.remove("is-ready"),null==t||t.classList.add("is-hiding")),null==t||t.classList.add("is-closing");const l=Q(),c=null==l?void 0:l.el,u=null==l?void 0:l.panzoomRef,d=null===(i=null==l?void 0:l.panzoomRef)||void 0===i?void 0:i.getTween(),f=r||A("hideClass");let m=!1,p=!1;if(a&&l&&c&&u&&d){let e;if(A("zoomEffect")&&1===l.state&&(e=te(l)),e){m=!0;const t=()=>{e=te(l),e?d.to(Object.assign(Object.assign({},$),e)):me()};u.on("refresh",()=>{t()}),d.easing(b.Easings.EaseOut).duration(350).from(Object.assign({},u.getTransform())).to(Object.assign(Object.assign({},$),e)).start(),(null==c?void 0:c.getAnimations())&&(c.style.animationPlayState="paused",requestAnimationFrame(()=>{t()}))}}const g=(null==l?void 0:l.htmlEl)||(null===(o=null==l?void 0:l.panzoomRef)||void 0===o?void 0:o.getWrapper());g&&at(g),!m&&f&&g&&(p=!0,st(g,f,()=>{me()})),m||p?setTimeout(()=>{me()},350):me()}function me(){var n,r,i,o,s;if(h===lt.Destroyed)return;h=lt.Destroyed;const l=ee();x("destroy"),null===(r=null===(n=A("sync"))||void 0===n?void 0:n.getPlugins().Autoplay)||void 0===r||r.resume(),null===(o=null===(i=A("sync"))||void 0===i?void 0:i.getPlugins().Autoscroll)||void 0===o||o.resume(),e instanceof HTMLDialogElement&&e.close(),null===(s=null==a?void 0:a.getContainer())||void 0===s||s.classList.remove("is-idle"),null==a||a.destroy();for(const e of Object.values(p))null==e||e.destroy();if(p={},null==e||e.remove(),e=void 0,t=void 0,a=void 0,ut.delete(m),!ut.size&&(ie(!1),document.documentElement.classList.remove(ht),A("placeFocusBack")&&l&&!l.closest("[inert]")))try{null==l||l.focus({preventScroll:!0})}catch(n){}}const ge={close:he,destroy:me,getCarousel:function(){return a},getContainer:function(){return t},getId:function(){return m},getOptions:function(){return f},getPlugins:function(){return p},getSlide:function(){return Q()},getState:function(){return h},init:function(r=[],i={}){h!==lt.Init&&(ge.destroy(),h=lt.Init),f=X({},ct,i),m=A("id")||"fancybox-"+ ++dt;const c=ut.get(m);
25if(c&&c.destroy(),ut.set(m,ge),x("init"),function(){for(const[e,t]of Object.entries(Object.assign(Object.assign({},pt.Plugins),f.plugins||{})))if(e&&!p[e]&&t instanceof Function){const n=t();n.init(ge),p[e]=n}x("initPlugins")}(),function(e=[]){x("initSlides",e),g=[...e]}(r),function(){const n=A("parentEl")||document.body;if(!(n&&n instanceof HTMLElement))return;const r=S(A("mainTpl")||"");if(e=s(r)||void 0,!e)return;if(t=e.querySelector(".fancybox__container"),!(t&&t instanceof HTMLElement))return;const i=A("mainClass");i&&I(t,i);const c=A("mainStyle");if(c&&l(c))for(const[e,n]of Object.entries(c))t.style.setProperty(e,n);const u=A("theme"),d="auto"===u?window.matchMedia("(prefers-color-scheme:light)").matches:"light"===u;t.setAttribute("theme",d?"light":"dark"),e.setAttribute("id",`${m}`),e.addEventListener("keydown",e=>{"Escape"===e.key&&ot(e)}),e.addEventListener("wheel",e=>{const t=e.target;let n=A("wheel",e);t.closest(".f-thumbs")&&(n="slide");const r="slide"===n,i=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),s=Math.max(-1,Math.min(1,i)),l=Date.now();E&&l-E<300?r&&ot(e):(E=l,x("wheel",e,s),e.defaultPrevented||("close"===n?he(e):"slide"===n&&a&&!o(t)&&(ot(e),a[s>0?"prev":"next"]())))},{capture:!0,passive:!1}),e.addEventListener("cancel",e=>{he(e)}),n.append(e),1===ut.size&&(A("hideScrollbar")&&ie(!0),document.documentElement.classList.add(ht)),x("initLayout"),e instanceof HTMLDialogElement&&(A("modal")?e.showModal():e.show())}(),function(){if(n=(null==e?void 0:e.querySelector(".fancybox__carousel"))||void 0,!n)return;n.fancybox=ge;const r=X({},{Autoplay:{autoStart:!1,pauseOnHover:!1,progressbarParentEl:e=>{const t=e.getContainer();return(null==t?void 0:t.querySelector(".f-carousel__toolbar [data-autoplay-action]"))||t}},Fullscreen:{el:t},Toolbar:{absolute:!0,items:{counter:{tpl:'<div class="f-counter"><span data-fancybox-page></span>/<span data-fancybox-pages></span></div>'}},display:{left:["counter"],right:["toggleFull","autoplay","fullscreen","thumbs","close"]}},Video:{autoplay:!0},Thumbs:{minCount:2,Carousel:{classes:{container:"fancybox__thumbs"}}},classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",slide:"fancybox__slide"},spinnerTpl:'<div class="f-spinner" data-fancybox-close></div>',dragFree:!1,slidesPerPage:1,plugins:{Sync:ue,Arrows:ye,Lazyload:pe,Zoomable:le,Html:Fe,Video:Be,Autoplay:Ce,Fullscreen:je,Thumbs:Re,Toolbar:Me}},A("Carousel")||{},{slides:g,enabled:!0,initialPage:A("startIndex")||0,l10n:A("l10n")});a=re(n,r),x("initCarousel",a),a.on("*",(e,t,...n)=>{x(`Carousel.${t}`,e,...n)}),a.on("attachSlideEl",M),a.on("detachSlideEl",O),a.on("contentLoading",B),a.on("contentReady",q),a.on("ready",R),a.on("change",k),a.on("settle",N),a.on("thumbs:ready",j),a.on("thumbs:destroy",j),a.init()}(),e&&t){if(A("closeExisting"))for(const[e,t]of ut.entries())e!==m&&t.close();A("fadeEffect")?(setTimeout(()=>{L()},500),I(t,"is-revealing")):L(),t.classList.add("is-ready"),h=lt.Ready,x("ready")}},isCurrentSlide:function(e){const t=Q();return!(!e||!t)&&t.index===e.index},isTopMost:function(){return J()},localize:S,off:function(e,t){return T.has(e)&&T.set(e,T.get(e).filter(e=>e!==t)),ge},on:function(e,t){return T.set(e,[...T.get(e)||[],t]),ge},toggleIdle(e){(v||!0===e)&&se(),v&&!1!==e||ce()}};return ge})().init(e,t)},unbind:function(e,t,n){if(!oe())return;let i=document.body,o=null,s="[data-fancybox]";e instanceof Element&&(i=e),r(e)&&r(t)?(o=e,s=t):r(t)&&r(n)?(o=t,s=n):r(t)?s=t:r(e)&&(s=e),function(e,t,n){if(!(e&&e instanceof Element&&n))return;const r=pt.openers.get(e)||new Map,i=r.get(t)||new Map;i&&n&&i.delete(n),i.size&&n||r.delete(t),r.size||(pt.openers.delete(e),e.removeEventListener("click",pt.fromEvent))}(i,o,s)}}},5669(){"use strict";var e=Object.defineProperty,t=e=>{throw TypeError(e)},n=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r),r=(e,n,r)=>n.has(e)||t("Cannot "+r),i=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),o=(e,n,r)=>n.has(e)?t("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),s=(e,t,n,i)=>(r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),a=(e,t,n)=>(r(e,t,"access private method"),n);if(typeof globalThis.window<"u"){let e=!1;document.addEventListener("submit",t=>{if(e)return void(e=!1);let n=t.target;if(n&&"dialog"===n.method){let r=n.closest("el-dialog");if(!r||!("beforeClose"in r))return;let i=t.submitter?.value??"",o=r.beforeClose(i);if(!0===o||(t.preventDefault(),t.stopImmediatePropagation(),!1===o))return;o.then(r=>{r&&(e=!0,n.dispatchEvent(t))}).catch(console.error)}},!0)}
25var l=class extends Event{constructor(e,{oldState:t="",newState:r="",...i}={}){super(e,i),n(this,"oldState"),n(this,"newState"),this.oldState=String(t||""),this.newState=String(r||"")}},c=new WeakMap;function u(e,t,n){c.set(e,setTimeout(()=>{c.has(e)&&e.dispatchEvent(new l("toggle",{cancelable:!1,oldState:t,newState:n}))},0))}var d=globalThis.ShadowRoot||function(){},h=globalThis.HTMLDialogElement||function(){},f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakMap;function v(e){return g.get(e)||"hidden"}var b=new WeakMap;function y(e){return[...e].pop()}function w(e,t){return!("auto"!==e.popover&&"manual"!==e.popover&&"hint"!==e.popover||!e.isConnected||t&&"showing"!==v(e)||!t&&"hidden"!==v(e)||e instanceof h&&e.hasAttribute("open")||document.fullscreenElement===e)}function E(e){if(!e)return 0;let t=m.get(document)||new Set,n=p.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function A(e){let t=L(e),n=function(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if((e=e.parentElement||x(e))instanceof d&&(e=e.host),e instanceof Document)return}}(e);return E(t)>E(n)?t:n}function S(e){let t,n=p.get(e)||new Set,r=m.get(e)||new Set,i=n.size>0?n:r.size>0?r:null;return i?(t=y(i),t.isConnected?t:(i.delete(t),S(e))):null}function T(e){for(let t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function x(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?x(e.parentNode):e}function L(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===g.get(e))return e;if((e=e instanceof Element&&e.assignedSlot||e.parentElement||x(e))instanceof d&&(e=e.host),e instanceof Document)return}}function M(e,t){let n=new Map,r=0;for(let e of t||[])n.set(e,r),r+=1;n.set(e,r),r+=1;let i=null;return function(t){if(!t)return;let r=!1,o=null,s=null;for(;!r;){if(o=L(t)||null,null===o||!n.has(o))return;("hint"===e.popover||"auto"===o.popover)&&(r=!0),r||(t=o.parentElement)}s=n.get(o),(null===i||n.get(i)<s)&&(i=o)}(e.parentElement||x(e)),i}function O(e){return!(e.hidden||e instanceof d||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&"hidden"===e.type||e instanceof HTMLAnchorElement&&""===e.href)&&("number"==typeof e.tabIndex&&-1!==e.tabIndex)}function C(e){var t;null==(t=function(e){if(e.shadowRoot&&!0!==e.shadowRoot.delegatesFocus)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let n=t.querySelector("[autofocus]");if(n)return n;{let e=t.querySelectorAll("slot");for(let t of e){let e=t.assignedElements({flatten:!0});for(let t of e){if(t.hasAttribute("autofocus"))return t;if(n=t.querySelector("[autofocus]"),n)return n}}}let r=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){if(O(i))return i;i=r.nextNode()}}(e))||t.focus()}var k=new WeakMap;function P(e){if(!w(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new l("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!w(e,!1))return;let n=!1,r=e.popover,i=null,o=M(e,m.get(t)||new Set),s=M(e,p.get(t)||new Set);if("auto"===r&&(I(p.get(t)||new Set,n,!0),D(o||t,n,!0),i="auto"),"hint"===r&&(s?(D(s,n,!0),i="hint"):(I(p.get(t)||new Set,n,!0),o?(D(o,n,!0),i="auto"):i="hint")),"auto"===r||"hint"===r){if(r!==e.popover||!w(e,!1))return;S(t)||(n=!0),"auto"===i?(m.has(t)||m.set(t,new Set),m.get(t).add(e)):"hint"===i&&(p.has(t)||p.set(t,new Set),p.get(t).add(e))}k.delete(e);let a=t.activeElement;e.classList.add(":popover-open"),g.set(e,"showing"),f.has(t)||f.set(t,new Set),f.get(t).add(e),H(b.get(e),!0),C(e),n&&a&&"auto"===e.popover&&k.set(e,a),u(e,"closed","open")}function R(e,t=!1,n=!1){var r,i;if(!w(e,!0))return;let o=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(D(e,t,n),!w(e,!0)))return;let s=m.get(o)||new Set,a=s.has(e)&&y(s)===e;if(H(b.get(e),!1),b.delete(e),n&&(e.dispatchEvent(new l("beforetoggle",{oldState:"open",newState:"closed"})),a&&y(s)!==e&&D(e,t,n),!w(e,!0)))return;null==(r=f.get(o))||r.delete(e),s.delete(e),null==(i=p.get(o))||i.delete(e),e.classList.remove(":popover-open"),g.set(e,"hidden"),n&&u(e,"open","closed");let c=k.get(e);c&&(k.delete(e),t&&c.focus())}function I(e,t=!1,n=!1){let r=T(e);for(;r;)R(r,t,n),r=T(e)}function F(e,t,n,r){let i=!1,o=!1;for(;i||!o;){o=!0;let s=null,a=!1;for(let n of t)if(n===e)a=!0;else if(a){s=n;break}if(!s)return;for(;"showing"===v(s)&&t.size;)R(y(t),n,r);t.has(e)&&y(t)!==e&&(i=!0),i&&(r=!1)}}function D(e,t,n){var r,i;let o=e.ownerDocument||e;if(e instanceof Document)return function(e,t=!1,n=!1){let r=S(e);for(;r;)R(r,t,n),r=S(e)}(o,t,n);null!=(r=p.get(o))&&r.has(e)?F(e,p.get(o),t,n):(I(p.get(o)||new Set,t,n
25),null!=(i=m.get(o))&&i.has(e)&&F(e,m.get(o),t,n))}var N=new WeakMap;function B(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let n=t.ownerDocument;if(!S(n))return;let r=A(t);if(r&&"pointerdown"===e.type)N.set(n,r);else if("pointerup"===e.type){let e=N.get(n)===r;N.delete(n),e&&D(r||n,!1,!0)}}var q=new WeakMap;function H(e,t=!1){if(!e)return;q.has(e)||q.set(e,e.getAttribute("aria-expanded"));let n=e.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)e.setAttribute("aria-expanded",String(t));else{let t=q.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var j=globalThis.ShadowRoot||function(){};function $(e,t,n){let r=e[t];Object.defineProperty(e,t,{value(e){return r.call(this,n(e))}})}var V=/(^|[^\\]):popover-open\b/g;function z(){let e="function"==typeof globalThis.CSSLayerBlockRule;return`\n${e?"@layer popover-polyfill {":""}\n  :where([popover]) {\n    position: fixed;\n    z-index: 2147483647;\n    inset: 0;\n    padding: 0.25em;\n    width: fit-content;\n    height: fit-content;\n    border-width: initial;\n    border-color: initial;\n    border-image: initial;\n    border-style: solid;\n    background-color: canvas;\n    color: canvastext;\n    overflow: auto;\n    margin: auto;\n  }\n\n  :where([popover]:not(.\\:popover-open)) {\n    display: none;\n  }\n\n  :where(dialog[popover].\\:popover-open) {\n    display: block;\n  }\n\n  :where(dialog[popover][open]) {\n    display: revert;\n  }\n\n  :where([anchor].\\:popover-open) {\n    inset: auto;\n  }\n\n  :where([anchor]:popover-open) {\n    inset: auto;\n  }\n\n  @supports not (background-color: canvas) {\n    :where([popover]) {\n      background-color: white;\n      color: black;\n    }\n  }\n\n  @supports (width: -moz-fit-content) {\n    :where([popover]) {\n      width: -moz-fit-content;\n      height: -moz-fit-content;\n    }\n  }\n\n  @supports not (inset: 0) {\n    :where([popover]) {\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n    }\n  }\n${e?"}":""}\n`}var W=null;function _(e){let t=z();if(null===W)try{(W=new CSSStyleSheet).replaceSync(t)}catch{W=!1}if(!1===W){let n=document.createElement("style");n.textContent=t,e instanceof Document?e.head.prepend(n):e.prepend(n)}else e.adoptedStyleSheets=[W,...e.adoptedStyleSheets]}function U(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function K(e){"focus"in e&&e.focus({focusVisible:X})}typeof globalThis.window<"u"&&(typeof HTMLElement<"u"&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||(function(){if(typeof window>"u")return;function e(e){return e?.includes(":popover-open")&&(e=e.replace(V,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||l,$(Document.prototype,"querySelector",e),$(Document.prototype,"querySelectorAll",e),$(Element.prototype,"querySelector",e),$(Element.prototype,"querySelectorAll",e),$(Element.prototype,"matches",e),$(Element.prototype,"closest",e),$(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"hint"==e?"hint":"manual"},set(e){null===e?this.removeAttribute("popover"):this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(e={}){P(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){R(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e={}){return"boolean"==typeof e&&(e={force:e}),"showing"===g.get(this)&&void 0===e.force||!1===e.force?R(this,!0,!0):(void 0===e.force||!0===e.force)&&P(this),"showing"===g.get(this)}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let n=t.call(this,e);return _(n),n}}});let n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=n.call(this);return e.shadowRoot&&_(e.shadowRoot),e}}});let r=new WeakMap;function i(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),r.delete(this);else{if(!(e instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),r.set(this,e)}}
25,get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let e=r.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return r.delete(this),null;let t=x(this),n=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof j)&&n&&t.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}i(HTMLButtonElement),i(HTMLInputElement);let o=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=t[0];if(!(n instanceof Element)||n?.shadowRoot)return;let r=x(n);if(!(r instanceof j||r instanceof Document))return;let i=t.find(e=>{var t;return null==(t=e.matches)?void 0:t.call(e,"[popovertargetaction],[popovertarget]")});return i?(function(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let n=v(t);"show"===e.popoverTargetAction&&"showing"===n||"hide"===e.popoverTargetAction&&"hidden"===n||("showing"===n?R(t,!0,!0):w(t,!1)&&(b.set(t,e),P(t)))}(i),void e.preventDefault()):void 0},s=e=>{let t=e.key,n=e.target;!e.defaultPrevented&&n&&("Escape"===t||"Esc"===t)&&D(n.ownerDocument,!0,!0)};var a;(a=document).addEventListener("click",o),a.addEventListener("keydown",s),a.addEventListener("pointerdown",B),a.addEventListener("pointerup",B),_(document)}(),U(async()=>{if(await async function(e){await async function(){await Promise.all(Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(e=>e.sheet?Promise.resolve():new Promise(t=>{e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0})})))}();for(let t of document.styleSheets)try{for(let n of t.rules)if("CSSLayerStatementRule"===n.constructor.name&&"nameList"in n&&n.nameList.includes(e))return!0}catch{}return!1}("popover-polyfill"))return;let e=document.createElement("style");e.textContent="@layer popover-polyfill;",e.setAttribute("suppressHydrationWarning",""),e.addEventListener("securitypolicyviolation",()=>{console.log("CSP rules on this website prevented @tailwindplus/elements from defining `popover-polyfill` as the first CSS layer. This is necessary to ensure the popover polyfill behaves correctly with CSS layers. To fix this, please manually add the following CSS to the top of your first stylesheet:\n\n```\n@layer popover-polyfill;\n```")}),document.documentElement.prepend(e)})),typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})||function(){function e(e,t,n=!0){Object.defineProperty(e,t,{...Object.getOwnPropertyDescriptor(e,t),enumerable:n})}function t(e){return e&&"function"==typeof e.getRootNode?e.getRootNode():e&&e.parentNode?t(e.parentNode):e}document.addEventListener("invoke",e=>{"invoke"==e.type&&e.isTrusted&&(e.stopImmediatePropagation(),e.preventDefault())},!0),document.addEventListener("command",e=>{"command"==e.type&&e.isTrusted&&(e.stopImmediatePropagation(),e.preventDefault())},!0);let n=new WeakMap,r=new WeakMap;class i extends Event{constructor(e,t={}){super(e,t);let{source:i,command:o}=t;if(null!=i&&!(i instanceof Element))throw new TypeError("source must be an element");n.set(this,i||null),r.set(this,void 0!==o?String(o):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");let e=n.get(this);if(!(e instanceof Element))return null;let r=t(e);return r!==t(this.target||document)?r.host:e}get command(){if(!r.has(this))throw new TypeError("illegal invocation");return r.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}e(i.prototype,"source"),e(i.prototype,"command");class o extends Event{constructor(e,t={}){throw super(e,t),new Error("InvokeEvent has been deprecated, it has been renamed to `C
25ommandEvent`")}}let s=new WeakMap,a=new WeakMap;function l(e){for(let t of e)t.oncommand=new Function("event",t.getAttribute("oncommand"))}Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),a.get(this)||null},set(e){let t=a.get(this)||null;t&&this.removeEventListener("command",t),a.set(this,"object"==typeof e||"function"==typeof e?e:null),"function"==typeof e&&this.addEventListener("command",e)}}});let c=new MutationObserver(e=>{for(let t of e){let{target:e}=t;"childList"===t.type?l(e.querySelectorAll("[oncommand]")):l([e])}});function u(e){if(e.defaultPrevented||"click"!==e.type)return;let t=e.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(t&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),t.matches("input")))throw new Error("Input elements no longer support `commandfor`");let n=e.target.closest("button[commandfor], button[command]");if(!n)return;if(n.form&&"button"!==n.getAttribute("type"))throw e.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(n.hasAttribute("command")!==n.hasAttribute("commandfor")){let e=n.hasAttribute("command")?"command":"commandfor",t=n.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${e} attribute must also have a ${t} attribute to function.`)}if("show-popover"!==n.command&&"hide-popover"!==n.command&&"toggle-popover"!==n.command&&"show-modal"!==n.command&&"close"!==n.command&&!n.command.startsWith("--"))return void console.warn(`"${n.command}" is not a valid command value. Custom commands must begin with --`);let r=n.commandForElement;if(!r)return;let o=new i("command",{command:n.command,source:n,cancelable:!0});if(r.dispatchEvent(o),o.defaultPrevented)return;let s=o.command.toLowerCase();if(r.popover){let e=!r.matches(":popover-open");!e||"toggle-popover"!==s&&"show-popover"!==s?!e&&"hide-popover"===s&&r.hidePopover():r.showPopover({source:n})}else if("dialog"===r.localName){let e=!r.hasAttribute("open");e&&"show-modal"===s?r.showModal():!e&&"close"===s&&r.close()}}function d(e){e.addEventListener("click",u,!0)}var h;c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]")),h=HTMLButtonElement,Object.defineProperties(h.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(e){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(null===e)this.removeAttribute("commandfor"),s.delete(this);else{if(!(e instanceof Element))throw new TypeError("commandForElement must be an element or null");{this.setAttribute("commandfor","");let n=t(e);t(this)===n||n===this.ownerDocument?s.set(this,e):s.delete(this)}}},get(){if("button"!==this.localName)return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&"button"!==this.getAttribute("type"))return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;let e=s.get(this);if(e)return e.isConnected?e:(s.delete(this),null);let n=t(this),r=this.getAttribute("commandfor");return(n instanceof Document||n instanceof ShadowRoot)&&r&&n.getElementById(r)||null}},command:{enumerable:!0,configurable:!0,get(){let e=this.getAttribute("command")||"";if(e.startsWith("--"))return e;let t=e.toLowerCase();switch(t){case"show-modal":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return t}return""},set(e){this.setAttribute("command",e)}}
25,invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(e){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(e){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}}),function(e,t){let n=e.prototype.attachShadow;e.prototype.attachShadow=function(e){let r=n.call(this,e);return t(r),r};let r=e.prototype.attachInternals;e.prototype.attachInternals=function(){let e=r.call(this);return e.shadowRoot&&t(e.shadowRoot),e}}(HTMLElement,e=>{d(e),c.observe(e,{attributeFilter:["oncommand"]}),l(e.querySelectorAll("[oncommand]"))}),d(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:o})}(),function(){if("function"!=typeof HTMLDialogElement)return!1;let e=!1,t=document.createElement("dialog");return t.addEventListener("beforetoggle",t=>{e=!0,t.preventDefault()}),t.show(),e}()||function(){let e=new WeakMap;function t(t){let n=t.open?"closed":"open",r=t.open?"open":"closed";if(e.has(t)){let n=e.get(t);r=n.oldState,clearTimeout(n.id)}e.set(t,{oldState:r,id:setTimeout(()=>{t.dispatchEvent(new ToggleEvent("toggle",{newState:n,oldState:r}))})})}let n=HTMLDialogElement.prototype.show,r=HTMLDialogElement.prototype.showModal,i=HTMLDialogElement.prototype.close;function o(e){let n=new ToggleEvent("beforetoggle",{newState:"closed",oldState:"open",cancelable:!1});e.dispatchEvent(n),e.open&&t(e)}document.addEventListener("submit",e=>{let t=e.target;if("dialog"===t.method){let e=t.closest("dialog");e instanceof HTMLDialogElement&&o(e)}}
25,!0),Object.defineProperties(HTMLDialogElement.prototype,{show:{value(){if(this.open||this.matches(":popover-open, :modal")||!this.ownerDocument)return n.apply(this,arguments);let e=new ToggleEvent("beforetoggle",{newState:"open",oldState:"closed",cancelable:!0});this.dispatchEvent(e)&&(t(this),n.apply(this,arguments))}},showModal:{value(){if(this.open||this.matches(":popover-open, :modal")||!this.isConnected||!this.ownerDocument)return r.apply(this,arguments);let e=new ToggleEvent("beforetoggle",{newState:"open",oldState:"closed",cancelable:!0});return this.dispatchEvent(e)?(t(this),r.apply(this,arguments)):void 0}},close:{value(){return this.open||this.matches(":popover-open, :modal")?(o(this),i.apply(this,arguments)):i.apply(this,arguments)}}})}());var G,X=!1;if(typeof globalThis.window<"u"){let e;(G=e||(e={}))[G.Keyboard=0]="Keyboard",G[G.Mouse=1]="Mouse",document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(X=!0,document.documentElement.dataset.focusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?(X=!1,delete document.documentElement.dataset.focusVisible):0===e.detail&&(X=!0,document.documentElement.dataset.focusVisible="")},!0)}typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{});var Y,Z,J,Q=class extends HTMLElement{constructor(){super(...arguments),o(this,Y,new AbortController),o(this,Z,!1),o(this,J,!1)}connectedCallback(){if("observedAttributes"in this.constructor&&"object"==typeof this.constructor.observedAttributes&&Array.isArray(this.constructor.observedAttributes))for(let e of this.constructor.observedAttributes)"string"==typeof e&&(e in this||Object.defineProperty(this,e,{get(){return this.getAttribute(e)},set(t){null!=t&&!1!==t?this.setAttribute(e,t.toString()):this.removeAttribute(e)}}));s(this,Z,!0);let e=i(this,Y).signal;queueMicrotask(()=>{if(!e.aborted)try{this.mount?.(e)}catch(e){console.error(e)}})}disconnectedCallback(){i(this,Y).abort(),s(this,Y,new AbortController)}setAttributeNoCallbacks(e,t){try{s(this,J,!0),this.setAttribute(e,t)}finally{s(this,J,!1)}}removeAttributeNoCallbacks(e){try{s(this,J,!0),this.removeAttribute(e)}finally{s(this,J,!1)}}attributeChangedCallback(e,t,n){i(this,Z)&&(i(this,J)||t!==n&&this.onAttributeChange?.(e,t,n))}};function ee(e,t){typeof globalThis.customElements>"u"||customElements.get(e)===t||customElements.define(e,t)}function te(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return queueMicrotask(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return t.startsWith("--")?e.style.setProperty(t,n):Object.assign(e.style,{[t]:n}),this.add(()=>{t.startsWith("--")?e.style.setProperty(t,r):Object.assign(e.style,{[t]:r})})},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function ne(e,t=()=>[]){let n=!1,r=null,i=te();return{start(o,s){let a=[e,...t()];n=!n&&(null!==r&&r!==o),r=o;for(let e of a)re(e,()=>{n||("in"===o?(e.dataset.transition="",e.dataset.enter="",e.dataset.closed="",delete e.dataset.leave):"out"===o&&(e.dataset.transition="",e.dataset.leave="",delete e.dataset.enter))},null!==r);i.nextFrame(()=>{for(let e of a)n?"in"===o?(delete e.dataset.enter,delete e.dataset.closed,e.dataset.leave=""):"out"===o&&(delete e.dataset.leave,e.dataset.enter="",e.dataset.closed=""):"in"===o?delete e.dataset.closed:"out"===o&&(e.dataset.closed="");i.requestAnimationFrame(()=>{i.add(ie(e,()=>{if(!n||!a.some(e=>oe(e))){for(let e of a)delete e.dataset.transition,delete e.dataset.enter,delete e.dataset.closed,delete e.dataset.leave;r=null,s?.()}}))})})},abort(){i.dispose(),n=!1,r=null}}}function re(e,t,n=!1){if(n)return void t();let r=e.style.transition;e.style.transition="none",t(),e.offsetHeight,e.style.transition=r}function ie(e,t){let n=te();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.({subtree:!0}).filter(e=>e instanceof CSSTransition)??[];return 0===i.length?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function oe(e){return(e.getAnimations?.()??[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)}Y=new WeakMap,Z=new WeakMap,J=new WeakMap;var se=Math.min,ae=Math.max,le=Math.round,ce=Math.floor,ue=e=>({x:e,y:e}
25),de={left:"right",right:"left",bottom:"top",top:"bottom"},he={start:"end",end:"start"};function fe(e,t,n){return ae(e,se(t,n))}function me(e,t){return"function"==typeof e?e(t):e}function pe(e){return e.split("-")[0]}function ge(e){return e.split("-")[1]}function ve(e){return"x"===e?"y":"x"}function be(e){return"y"===e?"height":"width"}var ye=new Set(["top","bottom"]);function we(e){return ye.has(pe(e))?"y":"x"}function Ee(e){return ve(we(e))}function Ae(e){return e.replace(/start|end/g,e=>he[e])}var Se=["left","right"],Te=["right","left"],xe=["top","bottom"],Le=["bottom","top"];function Me(e,t,n,r){let i=ge(e),o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Te:Se:t?Se:Te;case"left":case"right":return t?xe:Le;default:return[]}}(pe(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(Ae)))),o}function Oe(e){return e.replace(/left|right|bottom|top/g,e=>de[e])}function Ce(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ke(e,t,n){let r,{reference:i,floating:o}=e,s=we(t),a=Ee(t),l=be(a),c=pe(t),u="y"===s,d=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;switch(c){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-o.width,y:h};break;default:r={x:i.x,y:i.y}}switch(ge(t)){case"start":r[a]-=f*(n&&u?-1:1);break;case"end":r[a]+=f*(n&&u?-1:1)}return r}async function Pe(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=me(t,e),m=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(f),p=a[h?"floating"===d?"reference":"floating":d],g=Ce(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(p)))||n?p:p.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),y=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},w=Ce(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function Re(){return typeof window<"u"}function Ie(e){return Ne(e)?(e.nodeName||"").toLowerCase():"#document"}function Fe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function De(e){var t;return null==(t=(Ne(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ne(e){return!!Re()&&(e instanceof Node||e instanceof Fe(e).Node)}function Be(e){return!!Re()&&(e instanceof Element||e instanceof Fe(e).Element)}function qe(e){return!!Re()&&(e instanceof HTMLElement||e instanceof Fe(e).HTMLElement)}function He(e){return!(!Re()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Fe(e).ShadowRoot)}var je=new Set(["inline","contents"]);function $e(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!je.has(i)}var Ve=new Set(["table","td","th"]);function ze(e){return Ve.has(Ie(e))}var We=[":popover-open",":modal"];function _e(e){return We.some(t=>{try{return e.matches(t)}catch{return!1}})}var Ue=["transform","translate","scale","rotate","perspective"],Ke=["transform","translate","scale","rotate","perspective","filter"],Ge=["paint","layout","strict","content"];function Xe(e){let t=Ye(),n=Be(e)?Qe(e):e;return Ue.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Ke.some(e=>(n.willChange||"").includes(e))||Ge.some(e=>(n.contain||"").includes(e))}function Ye(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}var Ze=new Set(["html","body","#document"]);function Je(e){return Ze.has(Ie(e))}function Qe(e){return Fe(e).getComputedStyle(e)}function et(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if("html"===Ie(e))return e;let t=e.assignedSlot||e.parentNode||He(e)&&e.host||De(e);return He(t)?t.host:t}function nt(e){let t=tt(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&$e(t)?t:nt(t)}
25function rt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=nt(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=Fe(i);if(o){let e=it(s);return t.concat(s,s.visualViewport||[],$e(i)?i:[],e&&n?rt(e):[])}return t.concat(i,rt(i,[],n))}function it(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ot(e){let t=Qe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=le(n)!==o||le(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function st(e){return Be(e)?e:e.contextElement}function at(e){let t=st(e);if(!qe(t))return ue(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ot(t),s=(o?le(n.width):n.width)/r,a=(o?le(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var lt=ue(0);function ct(e){let t=Fe(e);return Ye()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lt}function ut(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),o=st(e),s=ue(1);t&&(r?Be(r)&&(s=at(r)):s=at(e));let a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Fe(e))&&t}(o,n,r)?ct(o):ue(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let e=Fe(o),t=r&&Be(r)?Fe(r):r,n=e,i=it(n);for(;i&&r&&t!==n;){let e=at(i),t=i.getBoundingClientRect(),r=Qe(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=s,n=Fe(i),i=it(n)}}return Ce({width:u,height:d,x:l,y:c})}function dt(e,t){let n=et(e).scrollLeft;return t?t.left+n:ut(De(e)).left+n}function ht(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:dt(e,r)),y:r.top+t.scrollTop}}var ft=new Set(["absolute","fixed"]);function mt(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=Fe(e),r=De(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let e=Ye();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){let t=De(e),n=et(e),r=e.ownerDocument.body,i=ae(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ae(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+dt(e),a=-n.scrollTop;return"rtl"===Qe(r).direction&&(s+=ae(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(De(e));else if(Be(t))r=function(e,t){let n=ut(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=qe(e)?at(e):ue(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ct(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ce(r)}function pt(e,t){let n=tt(e);return!(n===t||!Be(n)||Je(n))&&("fixed"===Qe(n).position||pt(n,t))}function gt(e,t){let n=t.get(e);if(n)return n;let r=rt(e,[],!1).filter(e=>Be(e)&&"body"!==Ie(e)),i=null,o="fixed"===Qe(e).position,s=o?tt(e):e;for(;Be(s)&&!Je(s);){let t=Qe(s),n=Xe(s);!n&&"fixed"===t.position&&(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&ft.has(i.position)||$e(s)&&!n&&pt(e,s))?r=r.filter(e=>e!==s):i=t,s=tt(s)}return t.set(e,r),r}function vt(e,t,n){let r=qe(t),i=De(t),o="fixed"===n,s=ut(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ue(0);function c(){l.x=dt(i)}if(r||!r&&!o)if(("body"!==Ie(t)||$e(i))&&(a=et(t)),r){let e=ut(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();let u=!i||r||o?ue(0):ht(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function bt(e){return"static"===Qe(e).position}function yt(e,t){if(!qe(e)||"fixed"===Qe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return De(e)===n&&(n=n.ownerDocument.body),n}function wt(e,t){let n=Fe(e);if(_e(e))return n;if(!qe(e)){let t=tt(e);for(;t&&!Je(t);){if(Be(t)&&!bt(t))return t;t=tt(t)}return n}let r=yt(e,t);for(;r&&ze(r)&&bt(r);)r=yt(r,t);return r&&Je(r)&&bt(r)&&!Xe(r)?n:r||function(e){let t=tt(e);for(;qe(t)&&!Je(t);){if(Xe(t))return t;if(_e(t))return null;t=tt(t)}return null}(e)||n}var Et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,s=De(r),a=!!t&&_e(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=ue(1),u=ue(0),d=qe(r);
25if((d||!d&&!o)&&(("body"!==Ie(r)||$e(s))&&(l=et(r)),qe(r))){let e=ut(r);c=at(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let h=!s||d||o?ue(0):ht(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:De,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?_e(t)?[]:gt(t,this._c):[].concat(n),r],s=o[0],a=o.reduce((e,n)=>{let r=mt(t,n,i);return e.top=ae(r.top,e.top),e.right=se(r.right,e.right),e.bottom=se(r.bottom,e.bottom),e.left=ae(r.left,e.left),e},mt(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:wt,getElementRects:async function(e){let t=this.getOffsetParent||wt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ot(e);return{width:t,height:n}},getScale:at,isElement:Be,isRTL:function(e){return"rtl"===Qe(e).direction}};function At(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function St(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=st(e),u=i||o?[...c?rt(c):[],...rt(t)]:[];u.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});let d=c&&a?function(e,t){let n,r=null,i=De(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();let c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;let m={rootMargin:-ce(d)+"px "+-ce(i.clientWidth-(u+h))+"px "+-ce(i.clientHeight-(d+f))+"px "+-ce(u)+"px",threshold:ae(0,se(1,l))||1},p=!0;function g(t){let r=t[0].intersectionRatio;if(r!==l){if(!p)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1===r&&!At(c,e.getBoundingClientRect())&&s(),p=!1}try{r=new IntersectionObserver(g,{...m,root:i.ownerDocument})}catch{r=new IntersectionObserver(g,m)}r.observe(e)}(!0),o}(c,n):null,h=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m,p=l?ut(e):null;return l&&function t(){let r=ut(e);p&&!At(p,r)&&n(),p=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),d?.(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(m)}}var Tt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=me(e,t),c={x:n,y:r},u=await Pe(t,l),d=we(pe(i)),h=ve(d),f=c[h],m=c[d];if(o){let e="y"===h?"bottom":"right";f=fe(f+u["y"===h?"top":"left"],f,f-u[e])}if(s){let e="y"===d?"bottom":"right";m=fe(m+u["y"===d?"top":"left"],m,m-u[e])}let p=a.fn({...t,[h]:f,[d]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:o,[d]:s}}}}}},xt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=me(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};let v=pe(i),b=we(a),y=pe(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),E=h||(y||!p?[Oe(a)]:function(e){let t=Oe(e);return[Ae(e),t,Ae(t)]}(a)),A="none"!==m;!h&&A&&E.push(...Me(a,p,m,w));let S=[a,...E],T=await Pe(t,g),x=[],L=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&x.push(T[v]),d){let e=function(e,t,n){void 0===n&&(n=!1);let r=ge(e),i=Ee(e),o=be(i),s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Oe(s)),[s,Oe(s)]}(i,s,w);x.push(T[e[0]],T[e[1]])}if(L=[...L,{placement:i,overflows:x}],!x.every(e=>e<=0)){var M,O;let e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=S[e];if(t&&("alignment"!==d||b===we(t)||L.every(e=>we(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(O=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>
25e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!n)switch(f){case"bestFit":{var C;let e=null==(C=L.filter(e=>{if(A){let t=we(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},Lt=(e,t,n)=>{let r=new Map,i={platform:Et,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ke(c,r,l),h=r,f={},m=0;for(let n=0;n<a.length;n++){let{name:o,fn:p}=a[n],{x:g,y:v,data:b,reset:y}=await p({x:u,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=g??u,d=v??d,f={...f,[o]:{...f[o],...b}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):y.rects),({x:u,y:d}=ke(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:f}})(e,t,{...i,platform:o})};function Mt(e){let t=()=>{};return function(n,r){if(t(),!n)return void requestAnimationFrame(()=>{oe(e)?ie(e,()=>{e.style.removeProperty("position")}):e.style.removeProperty("position")});if(!r||!e.hasAttribute("anchor"))return;let i=e.getAttribute("anchor"),o=e.getAttribute("anchor-strategy")||"absolute";"absolute"!==o&&"fixed"!==o&&(console.warn(`[createAnchorUpdater] Invalid anchor strategy "${o}" for element:`,e),o="absolute"),t=St(r,e,()=>{let t=Ot(window.getComputedStyle(e).getPropertyValue("--anchor-gap"),e),n=Ot(window.getComputedStyle(e).getPropertyValue("--anchor-offset"),e),s={};switch(i.split(" ")[0]){case"top":case"bottom":s={top:t,left:-1*n,right:n,bottom:t};break;case"left":case"right":s={top:-1*n,bottom:n,left:t,right:t}}Lt(r,e,{strategy:o,placement:i.replace(" ","-"),middleware:[xt({padding:s}),Tt({padding:s})]}).then(async({x:t,y:n,placement:r})=>{if(!("showPopover"in HTMLElement.prototype&&HTMLElement.prototype.showPopover.toString().includes("[native code]")||"absolute"!==o)){let r=null;for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).position;if("relative"===e||"absolute"===e||"fixed"===e||"sticky"===e){r=t;break}}if(r){let e=r.getBoundingClientRect();t-=e.left+window.scrollX,n-=e.top+window.scrollY}}let i=`${t}px`,s=`${n}px`;switch(r.split("-")[0]){case"top":s=`calc(${n}px - var(--anchor-gap, 0px))`,i=`calc(${t}px + var(--anchor-offset, 0px))`;break;case"right":i=`calc(${t}px + var(--anchor-gap, 0px))`,s=`calc(${n}px + var(--anchor-offset, 0px))`;break;case"bottom":s=`calc(${n}px + var(--anchor-gap, 0px))`,i=`calc(${t}px + var(--anchor-offset, 0px))`;break;case"left":i=`calc(${t}px - var(--anchor-gap, 0px))`,s=`calc(${n}px + var(--anchor-offset, 0px))`}{let t=e.getBoundingClientRect();if(0===t.x&&0===t.y&&0===t.width&&0===t.height)return}Object.assign(e.style,{left:i,top:s,position:o}),await(Et.isRTL?.(e))&&Object.assign(e.style,{right:"unset",bottom:"unset"})})})}}function Ot(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Ct(e){return kt(e)&&"tabIndex"in e}function kt(e){return function(e){return"object"==typeof e&&null!==e&&"nodeType"in e}(e)&&"tagName"in e}function Pt(e){return kt(e)&&"accessKey"in e}function Rt(e){let t=e.getBoundingClientRect();return!(0===t.x&&0===t.y&&0===t.width&&0===t.height||"hidden"===(e.ownerDocument.defaultView||window).getComputedStyle(e).visibility)}var It={get selectRequired(){let e=document.createElement("select");e.setAttribute("required","true");let t=e.validationMessage;return Object.defineProperty(this,"selectRequired",{value:t}),t}};function Ft(e,t,n){function r(){if(!Rt(e)){for(let t of e.children)if(Rt(t))return;n()}}if(typeof ResizeObserver<"u"){let n=new ResizeObserver(r);n.observe(e),t.addEventListener("abort",()=>n.disconnect())}if(typeof IntersectionObserver<"u"){let n=new IntersectionObserver(r);n.observe(e),t.addEventListener("abort",()=>n.disconnect())}}var Dt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");function Nt(e,t,n){let r=t?e.indexOf(t):null;switch(-1===r&&(r=null),n){case 0:for(let t=0;t<e.length;t++)if(Rt(e[t]))return e[t];return null;case 1:for(let t=e.length-1;t>=0;t--)if(Rt(e[t]))return e[t];return null;case 2:if(null===r)return Nt(e,t,1);for(let t=r-1;t>=0;t--)if(Rt(e[t]))return e[t];return null;case 3:if(null===r)return Nt(e,t,0);for(let t=r+1;t<e.length;t++)if(Rt(e[t]))return e[t];return null;case 4:return null}}var Bt=[];U(()=>{function e(e){if(e.target===document.body||Bt[0]===e.target)return;let t=e.target;t&&"closest"in t&&(t=t.closest(Dt),Bt.unshift(t??e.target),Bt=Bt.filter(e=>null!=e&&e.isConnected),Bt.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("pointerdown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("pointerdown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var qt=!1,Ht=!1;typeof navigator<"u"&&(qt=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ht=navigator.userAgent.toLowerCase().includes("firefox"));var jt=!1;function $t(e,t,n,r,i,o){!function(e){if(Ht||qt||zt.has(e))return;zt.add(e);let t=null;e.addEventListener("mousedown",()=>{jt&&(e.body.setAttribute("tabindex","-1"),t&&clearTimeout(t),t=setTimeout(()=>e.body.removeAttribute("tabindex")))},{capture:!0})}(e.ownerDocument);let s=ne(e),a=Mt(e),l=te();e.hasAttribute("popover")||e.setAttribute("popover","");let c=n();for(let t of c)t.setAttribute("type","button"),t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","fal
25se");function u(){e.hasAttribute("open")&&e.hidePopover()}e.hasAttribute("open")&&queueMicrotask(()=>e.showPopover());let d=new AbortController;t.addEventListener("abort",()=>d.abort()),e.addEventListener("beforetoggle",t=>{let n=Vt(t,c);a("open"===t.newState,r?.()??n),"open"===t.newState?n&&(Ft(n,d.signal,u),Ft(e,d.signal,u)):(d.abort(),d=new AbortController);let h=e.hasAttribute("open");"open"!==t.newState||h?"closed"===t.newState&&h&&e.removeAttributeNoCallbacks("open"):e.setAttributeNoCallbacks("open",""),"open"===t.newState?(n?.setAttribute("aria-expanded","true"),n?.id&&e.setAttribute("aria-labelledby",n.id),i?.(),jt=""===e.getAttribute("popover")):(n?.setAttribute("aria-expanded","false"),e.removeAttribute("aria-labelledby"),o?.(),jt=!1),"closed"===t.oldState&&"open"===t.newState?(qt&&(l.dispose(),l=te()),s.start("in")):"open"===t.oldState&&"closed"===t.newState&&(qt&&l.style(e,"transition-property","none"),s.start("out"))},{signal:t}),t.addEventListener("abort",()=>s.abort())}function Vt(e,t){return e.source??Bt.find(e=>t.includes(e))??t[0]??null}var zt=new WeakSet;function Wt(e,t,n,r){function i(){let n=e.getBoundingClientRect();r.style.setProperty(t,n.width+"px")}let o=e.ownerDocument,s=new ResizeObserver(i);s.observe(e),o.addEventListener("transitionend",i,{signal:n}),n.addEventListener("abort",()=>s.disconnect())}var _t=0;function Ut(e){return`${e}-${_t++}`}function Kt(e,t,n,r){Xt||(Xt=!0,document.addEventListener("keydown",()=>{Gt=Date.now()},{capture:!0})),e.addEventListener(t,e=>{null!==Gt&&Date.now()-Gt<200||r(e)},{passive:!0,signal:n})}var Gt=null,Xt=!1;var Yt=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e,this),this.set(e,t)),t}},Zt=new Yt(()=>({referenceCounter:0,d:te()}));function Jt(e){let t=Zt.get(e);if(t.referenceCounter++,1===t.referenceCounter){let n=[/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0?{before({doc:e,d:t}){function n(e){return!!e.closest("[popover], dialog > *")}t.microTask(()=>{if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=te();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let r=window.scrollY??window.pageYOffset,i=null;t.addEventListener(e,"click",t=>{if(Ct(t.target))try{let r=t.target.closest("a");if(!r)return;let{hash:o}=new URL(r.href),s=e.querySelector(o);Ct(s)&&!n(s)&&(i=s)}catch{}},!0),t.addEventListener(e,"touchstart",e=>{if(Ct(e.target)&&function(e){return kt(e)&&"style"in e}(e.target))if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")}),t.addEventListener(e,"touchmove",e=>{if(Ct(e.target)){if(function(e){return Pt(e)&&"INPUT"===e.nodeName}(e.target))return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.tailwindplusPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.tailwindplusPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{let e=window.scrollY??window.pageYOffset;r!==e&&window.scrollTo(0,r),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})},after(){}}:{before(){},after(){}},Qt(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")},after(){}}];n.forEach(({before:n})=>n({doc:e,d:t.d})),n.forEach(({after:n})=>n({doc:e,d:t.d}))}let n=!1;return()=>{n||(n=!0,t.referenceCounter--,!(t.referenceCounter>0)&&(t.d.dispose(),Zt.delete(e)))}}function Qt(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth),n.style.setProperty("--el-top-layer-scrollbar-offset","0px")},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`),n.add(()=>{r.style.setProperty("--el-top-layer-scrollbar-offset",`-${o}px`)})}}}function en(e,t){let n=null;e.addEventListener("toggle",t=>{"open"===t.newState?n||(n=Jt(e.ownerDocument)):n&&(n(),n=null)},{signal:t}),t.addEventListener("abort",()=>{n&&(n(),n=null)})}var tn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function nn(e){let t=e.innerText??"",n=e.cloneNode(!0);if(!Pt(n))return t;let r=!1;for(let e of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),r=!0;let i=r?n.innerText??"":t;return tn.test(i)&&(i=i.replace(tn,"")),i}function rn(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():nn(t).trim()}return null}
25).filter(Boolean);if(e.length>0)return e.join(", ")}return nn(e).trim()}var on,sn;on=new WeakMap,sn=new WeakMap,ee("el-autocomplete",class extends Q{constructor(){super(...arguments),o(this,on,[]),o(this,sn,null)}mount(e){let t=this.getInput(),n=this.getButton(),r=this.getOptions();t.id||(t.id=Ut("autocomplete-input")),n&&(n.id||(n.id=Ut("autocomplete-button"))),r.id||(r.id=Ut("autocomplete-listbox")),$t(r,e,()=>{let e=this.getButton();return e?[e]:[]},()=>this.getInput(),()=>this.onBeforeOpen(),()=>this.onBeforeClose()),en(r,e),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",r.id),t.setAttribute("aria-activedescendant",""),t.setAttribute("autocomplete","off"),n&&(n.setAttribute("type","button"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-expanded","false"),n.setAttribute("aria-haspopup","listbox"),n.setAttribute("popovertarget",r.id)),r.setAttribute("role","listbox"),r.setAttribute("popover","manual");let o=this,s=new WeakSet;function a(){for(let t of r.getItems())s.has(t)||(s.add(t),t.id||(t.id=Ut("option")),t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.setAttribute("tabIndex","-1"),t.addEventListener("mousedown",e=>{0===e.button&&(e.preventDefault(),o.selectOption(t))},{signal:e}),Kt(t,"mouseover",e,()=>
25o.setActiveItem(t,!1)),Kt(t,"mouseout",e,()=>o.clearActiveItem()));o.filterOptions()}a();let l=new MutationObserver(a);l.observe(this,{attributes:!1,childList:!0,subtree:!0}),n&&Wt(n,"--button-width",e,this),Wt(t,"--input-width",e,this),t.addEventListener("input",()=>{t.matches(":disabled")||(this.filterOptions(),i(this,on).length>0?r.hasAttribute("open")||r.showPopover():r.hidePopover())},{signal:e});let c=()=>{t.matches(":disabled")||(t.focus(),r.hasAttribute("open")?r.hidePopover():(this.filterOptions(),i(this,on).length>0&&r.showPopover()))};t.addEventListener("pointerdown",c,{signal:e}),n&&(n.addEventListener("pointerdown",e=>{e.preventDefault(),c()},{signal:e}),n.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation()},{signal:e})),t.addEventListener("blur",({relatedTarget:e})=>{e&&this.contains(e)||r.hidePopover()},{signal:e}),t.addEventListener("keydown",e=>{if(!t.matches(":disabled"))switch(e.key){case"ArrowDown":e.preventDefault(),r.hasAttribute("open")||(0===i(this,on).length&&this.filterOptions(),i(this,on).length>0&&r.showPopover()),this.goToItem(3);break;case"ArrowUp":e.preventDefault(),r.hasAttribute("open")||(0===i(this,on).length&&this.filterOptions(),i(this,on).length>0&&r.showPopover()),this.goToItem(2);break;case"Home":case"PageUp":return r.hasAttribute("open")?(e.preventDefault(),e.stopPropagation(),this.goToItem(0)):void 0;case"End":case"PageDown":return r.hasAttribute("open")?(e.preventDefault(),e.stopPropagation(),this.goToItem(1)):void 0;case"Enter":{let t=this.getActiveItem();t&&(e.preventDefault(),this.selectOption(t)),r.hasAttribute("open")&&(e.preventDefault(),r.hidePopover());break}case"Escape":if(!r.hasAttribute("open"))return;e.preventDefault(),r.hidePopover();break;case"Tab":r.hidePopover()}},{signal:e});let u=Array.from(r.querySelectorAll("el-option[disabled]"));for(let e of u)e.setAttribute("aria-disabled","true"),e.setAttribute("aria-selected","false");e.addEventListener("abort",()=>{l.disconnect()})}getInput(){let e=this.querySelector("input");if(!e)throw new Error("`<el-autocomplete>` must contain an input element.");return e}getButton(){return this.querySelector("button")}getOptions(){let e=this.querySelector("el-options");if(!e)throw new Error("`<el-autocomplete>` must contain a `<el-options>` element.");return e}filterOptions(){let e=this.getInput().value.toLowerCase();i(this,sn)!==e&&(this.clearActiveItem(),s(this,sn,e)),s(this,on,[]);for(let t of this.getOptions().getItems()){let n=t.getAttribute("value")?.toLowerCase()||"",r=nn(t)?.trim().toLowerCase()??"";""===e||n.includes(e)||r.includes(e)?(i(this,on).push(t),t.removeAttribute("hidden"),t.removeAttribute("aria-hidden")):(t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"))}}getActiveItem(){let e=this.getInput().getAttribute("aria-activedescendant");return e?document.getElementById(e):null}goToItem(e){if(0===i(this,on).length)return;let t=this.getActiveItem(),n=Nt(i(this,on),t,e);n&&this.setActiveItem(n)}setActiveItem(e,t=!0){let n=this.getInput(),r=this.getActiveItem();null!==r&&r.setAttribute("aria-selected","false"),e.setAttribute("aria-selected","true"),n.setAttribute("aria-activedescendant",e.id),t&&e.scrollIntoView({block:"nearest"})}clearActiveItem(){let e=this.getInput(),t=this.getActiveItem();null!==t&&t.setAttribute("aria-selected","false"),e.setAttribute("aria-activedescendant","")}selectOption(e){let t=this.getInput(),n=e.getAttribute("value");n&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),this.getOptions().hidePopover())}onBeforeOpen(){let e=this.getInput(),t=this.getButton();e.setAttribute("aria-expanded","true"),t?.setAttribute("aria-expanded","true")}onBeforeClose(){let e=this.getInput(),t=this.getButton();e.setAttribute("aria-expanded","false"),t?.setAttribute("aria-expanded","false"),this.clearActiveItem()}});var an,ln,cn,un,dn,hn;an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakSet,dn=function(e=!1){let t=this.getItems(),n=this.getInput().value??"";s(this,an,[]);for(let e of t.getItems()){if(e.closest("el-defaults"))continue;let t=rn(e)??"";""!==n&&i(this,cn).call(this,{query:n,node:e,content:t})?(i(this,an).push(e),e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}for(let e of this.getGroups())e.getItems().some(e=>!e.hasAttribute("hidden"))?e.removeAttribute("hidden"):e.setAttribute("hidden","");let r=this.getSuggestions();
25r&&(""===n?(r.removeAttribute("hidden"),s(this,an,r.getItems())):r.setAttribute("hidden",""));let o=this.querySelector("el-no-results");o&&(""===n||i(this,an).length>0?o.setAttribute("hidden",""):o.removeAttribute("hidden")),0===i(this,an).length?t.setAttribute("hidden",""):t.removeAttribute("hidden"),(!e||""!==n)&&(0===i(this,an).length?this.clearActiveItem():i(this,ln)!==n&&this.goToItem(0),s(this,ln,n))},hn=function(e,t=!0){let n=this.getInput(),r=this.getActiveItem();if(e===r)return;if(null!==r){r.setAttribute("aria-selected","false");let e=this.querySelector(`el-command-preview[for="${r.id}"]`);e&&e.setAttribute("hidden","")}e.setAttribute("aria-selected","true"),n.setAttribute("aria-activedescendant",e.id);let i=this.querySelector(`el-command-preview[for="${e.id}"]`);i&&i.removeAttribute("hidden"),t&&e.scrollIntoView({block:"nearest"}),this.dispatchEvent(new CustomEvent("change",{detail:{relatedTarget:e},bubbles:!1,cancelable:!1}))};ee("el-command-palette",class extends Q{constructor(){super(...arguments),o(this,un),o(this,an,[]),o(this,ln,null),o(this,cn,({query:e,content:t})=>t.toLocaleLowerCase().includes(e.toLocaleLowerCase().trim()))}mount(e){let t=this.getInput(),n=this.getItems();t.id||(t.id=Ut("command-input")),n.id||(n.id=Ut("command-items")),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("autocomplete","off"),t.setAttribute("aria-controls",n.id),n.setAttribute("role","listbox");let r=this,i=new WeakSet;function o(t=!1){var o;for(let t of n.getItems())i.has(t)||(i.add(t),t.id||(t.id=Ut("item")),t.setAttribute("role","option"),t.setAttribute("tabIndex","-1"),t.setAttribute("aria-selected","false"),t.hasAttribute("disabled")&&t.setAttribute("aria-disabled","true"),Kt(t,"mouseover",e,()=>{var e;return a(e=r,un,hn).call(e,t,!1)}));a(o=r,un,dn).call(o,t),t||r.goToItem(0)}o(!0);let s=new MutationObserver(()=>o(!1));s.observe(this,{attributes:!1,childList:!0,subtree:!0}),Wt(t,"--input-width",e,this),t.addEventListener("input",()=>a(this,un,dn).call(this),{signal:e}),t.addEventListener("keydown",e=>{switch(e.key){case"ArrowDown":e.preventDefault(),this.goToItem(3);break;case"ArrowUp":e.preventDefault(),this.goToItem(2);break;case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),this.goToItem(0);case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),this.goToItem(1);case"Enter":{let t=this.getActiveItem();t&&(e.preventDefault(),t.click());break}}},{signal:e}),e.addEventListener("abort",()=>{s.disconnect()})}getInput(){let e=this.querySelector("input");if(!e)throw new Error("`<el-command-palette>` must contain an input element.");return e}getItems(){let e=this.querySelector("el-command-list");if(!e)throw new Error("`<el-command-palette>` must contain a `<el-command-list>` element.");return e}getGroups(){return this.getItems().querySelectorAll("el-command-group")}getSuggestions(){return this.querySelector("el-defaults")}getActiveItem(){let e=this.getInput().getAttribute("aria-activedescendant");return e?document.getElementById(e):null}goToItem(e){if(0===i(this,an).length)return;let t=this.getActiveItem(),n=Nt(i(this,an),t,e);n&&a(this,un,hn).call(this,n)}clearActiveItem(){let e=this.getInput(),t=this.getActiveItem();if(null!==t){t.setAttribute("aria-selected","false");let e=this.querySelector(`el-command-preview[for="${t.id}"]`);e&&e.setAttribute("hidden","")}e.removeAttribute("aria-activedescendant"),this.dispatchEvent(new CustomEvent("change",{detail:{relatedTarget:null},bubbles:!1,cancelable:!1}))}reset(){let e=this.getInput();e.value="",e.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),a(this,un,dn).call(this,!0),this.clearActiveItem()}setFilterCallback(e){s(this,cn,e)}}),ee("el-command-list",class extends Q{getItems(){return Array.from(this.querySelectorAll(`${Dt},[role="option"]`))}}),ee("el-defaults",class extends Q{getItems(){return Array.from(this.querySelectorAll(`${Dt},[role="option"]`))}}),ee("el-no-results",class extends Q{}),ee("el-command-group",class extends Q{getItems(){return Array.from(this.querySelectorAll(`${Dt},[role="option"]`))}}),ee("el-command-preview",class extends Q{});var fn=null;typeof globalThis.window<"u"&&(fn=HTMLDialogElement.prototype.close,Object.defineProperties(HTMLDialogElement.prototype,{close:{value(e){let t=this.closest("el-dialog");if(!(t instanceof wn))return fn?.call(this,e);let n=t.beforeClose(e);if(!0===n)return fn?.call(this,e);!1!==n&&n.then(t=>
25t?fn?.call(this,e):null).catch(console.error)}}}),document.addEventListener("command",e=>{let t=e.target;if(!(t instanceof HTMLDialogElement&&"command"in e&&"close"===e.command))return;let n=t.closest("el-dialog");if(!(n instanceof wn))return;let r="BUTTON"===e.source?.tagName?e.source.value:void 0,i=n.beforeClose(r);!0!==i&&(e.stopImmediatePropagation(),e.preventDefault(),!1!==i&&i.then(e=>e?fn?.call(t,r):null).catch(console.error))},!0));var mn,pn,gn,vn,bn,yn,wn=class extends Q{constructor(){super(...arguments),o(this,bn),o(this,mn,null),o(this,pn,null),o(this,gn,!0),o(this,vn,ne(this,()=>Array.from(this.querySelectorAll("el-dialog-panel,el-dialog-backdrop"))))}mount(e){let t=this.getNativeDialog();t.removeAttribute("open"),t.style.setProperty("right","var(--el-top-layer-scrollbar-offset, 0px)");let n=this.hasAttribute("open");for(let e of a(this,bn,yn).call(this))e.setAttribute("aria-expanded",n.toString());!function(e,t,n){e.addEventListener("keydown",e=>{"Escape"===e.key&&(e.defaultPrevented||n(e))},{signal:t})}(t,e,e=>{e.preventDefault();let n=new Event("cancel",{bubbles:!1,cancelable:!0});!this.dispatchEvent(n)||t.close("")}),Ft(this.querySelector("el-dialog-panel")??t,e,()=>{this.hasAttribute("open")&&t.close("")});let r=null;t.addEventListener("beforetoggle",e=>{let t=e;"open"===t.newState&&"closed"===t.oldState&&this.beforeOpen();let n=this.hasAttribute("open");if("open"!==t.newState||n?"closed"===t.newState&&n&&(this.dispatchEvent(new CustomEvent("close",{bubbles:!1,cancelable:!1})),this.removeAttribute("open")):(this.dispatchEvent(new CustomEvent("open",{bubbles:!1,cancelable:!1})),this.setAttribute("open","")),"open"===t.newState&&"closed"===t.oldState)Bt.length>0&&!r&&(r=Bt[0]);else if("closed"===t.newState&&"open"===t.oldState){let e=i(this,gn);setTimeout(()=>{e?(r&&r!==document.activeElement&&r.isConnected&&K(r),r=null):r&&r===document.activeElement&&r.isConnected&&"blur"in r&&"function"==typeof r.blur&&r.blur()})}},{signal:e}),t.addEventListener("focusout",e=>{null===e.relatedTarget&&queueMicrotask(()=>{t.contains(t.ownerDocument.activeElement)||t.focus()})},{signal:e}),e.addEventListener("abort",()=>{var e;i(this,vn).abort(),null==(e=i(this,pn))||e.call(this)}),this.hasAttribute("open")&&t.showModal()}onAttributeChange(e,t,n){switch(e){case"open":{let e=this.getNativeDialog();for(let e of a(this,bn,yn).call(this))e.setAttribute("aria-expanded",null!==n?"true":"false");null===n?e.close():e.showModal();break}}}getNativeDialog(){let e=this.querySelector("dialog");if(!e)throw new Error("[ElDialog] No `<dialog>` element found");return e}beforeOpen(){s(this,gn,!0),i(this,mn)&&(i(this,mn).abort(),s(this,mn,null)),i(this,pn)||s(this,pn,Jt(this.ownerDocument)),i(this,vn)&&i(this,vn).start("in")}beforeClose(e){if(i(this,pn)&&(i(this,pn).call(this),s(this,pn,null)),i(this,mn))return!1;s(this,mn,new AbortController);let t=i(this,mn).signal;return new Promise(n=>{i(this,vn)?.start("out",()=>{t.aborted||(s(this,mn,null),requestAnimationFrame(()=>{let t=this.getNativeDialog(),n=t.style.cssText;t.style.cssText=n+"transition-duration: 0 !important;",fn?.call(t,e),requestAnimationFrame(()=>{t.style.cssText=n})}),n(!0))})})}show(){this.getNativeDialog().showModal()}hide({restoreFocus:e=!0}={}){s(this,gn,e),this.getNativeDialog().close()}};mn=new WeakMap,pn=new WeakMap,gn=new WeakMap,vn=new WeakMap,bn=new WeakSet,yn=function(){return document.querySelectorAll(`[commandfor="${this.getNativeDialog().id}"]`)},n(wn,"observedAttributes",["open"]);ee("el-dialog",wn),ee("el-dialog-panel",class extends Q{mount(e){!function(e,t,n){let r=null;document.addEventListener("pointerdown",e=>{r=e.composedPath()[0]||e.target},!0),document.addEventListener("click",t=>{if(r!==t.target)return;if(t.target===e){let{clientX:r,clientY:i}=t,o=e.getBoundingClientRect();if(r>=o.left&&r<=o.right&&i>=o.top&&i<=o.bottom)return;return void n(t)}let i=e.closest("dialog");i&&i.contains(t.target)&&!e.contains(t.target)?n(t):t.target!==t.target.ownerDocument.documentElement||n(t)},{signal:t,capture:!0})}(this,e,()=>{let e=this.getDialog(),t=e.getNativeDialog();if(!t.hasAttribute("open"))return;let n=new Event("cancel",{bubbles:!1,cancelable:!0});!e.dispatchEvent(n)||t.close()})}getDialog(){let e=this.closest("el-dialog");if(!e)throw new Error("[ElDialogPanel] No `<el-dialog>` parent found");return e}}),ee("el-dialog-backdrop",class extends Q{mount(){this.setAttribute("inert","")}});var En,An,Sn,Tn=class extends Q{constructor(){super(...arguments),o(this,An),o(this,En,ne(this))}mount(e){this.id||(this.id=Ut("disclosure")),this.hasAttribute("hidden")?this.removeAttributeNoCallbacks("open"):this.setAttributeNoCallbacks("open","");let t=!this.hasAttribute("hidden");for(let e of a(this,An,Sn).call(this))e.setAttribute("aria-expanded",t.toString()),e.setAttribute("aria-controls",this.id);this.addEventListener("command",e=>{if(e.target instanceof HTMLElement&&"command"in e)switch(e.command){case"--show":this.show(),e.preventDefault();break;case"--hide":this.hide(),e.preventDefault();break;case"--toggle":this.toggle(),e.preventDefault()}},{signal:e}),e.addEventListener("abort",()=>i(this,En).abort())}onAttributeChange(e,t,n){switch(e){case"hidden":null===n?this.setAttributeNoCallbacks("open",""):this.removeAttributeNoCallbacks("open");for(let e of a(this,An,Sn).call(this))e.setAttribute("aria-expanded",null===n?"true":"false");null===n?i(this,En).start("in"):i(this,En).start("out");break;case"open":null===n?this.hide():this.show()}}show(){this.removeAttribute("hidden")}hide(){this.setAttribute("hidden","")}toggle(){this.hasAttribute("hidden")?this.show():this.hide()}};function xn(e,t,n,r,i){let o=null;for(let n of t)n.addEventListener("pointerdown",t=>{0===t.button&&e.classList.contains(":popover-open")&&(o=Date.now()+100)},{signal:r,capture:!0});e.ownerDocument.addEventListener("focusin",r=>{if(!n.hasAttribute("open"))return;let s=r.target,a=r.relatedTarget;null!==s&&(o&&Date.now()<o||e.contains(s)||t.some(e=>e.contains(s))||i(a))},{signal:r})}En=new WeakMap,An=new WeakSet,Sn=function(){return document.querySelectorAll(`[commandfor="${this.id}"]`)},n(Tn,"observedAttributes",["hidden","open"]),ee("el-disclosure",Tn);function Ln(e,t,n){let r=null,i="",o=null,s=null;e.id||(e.id=Ut(t.role));let a=t.getButton();a.id||(a.id=Ut(`${t.role}-button`)),$t(e,n,()=>[t.getButton()],()=>t.getButton(),()=>t.onBeforeOpen(),()=>{t.onBeforeClose(),p(),i="",o&&(clearTimeout(o),o=null)}),en(e,n),e.setAttribute("popover","manual"),e.setAttribute("role",t.role),a.setAttribute("popovertarget",e.id),a.setAttribute("aria-haspopup",t.role);let l=new WeakSet;function c(){let e=t.getItems(),r={passive:!0,signal:n},i="menu"===t.role?"menuitem":"option";
25for(let o of e)l.has(o)||(l.add(o),o.id||(o.id=Ut("item")),o.setAttribute("role",i),o.setAttribute("tabIndex","-1"),o.addEventListener("click",()=>t.onItemClick(o),r),Kt(o,"mouseover",n,()=>m(o,!1)),Kt(o,"mouseout",n,()=>p()))}c();let u=new MutationObserver(c);u.observe(e,{attributes:!1,childList:!0,subtree:!0}),xn(e,[a],e,n,t=>{null===t&&(s=Date.now()+100),e.hidePopover()});let d=null,h=!1;a.addEventListener("pointerdown",t=>{if(0===t.button&&!a.matches(":disabled")){if("touch"===t.pointerType)return void(h=!0);e.togglePopover(),d=Date.now()}},{signal:n}),document.addEventListener("pointerup",t=>{if(0===t.button&&!a.matches(":disabled")&&e.hasAttribute("open")){if(Date.now()-(d??0)>200){let n=t.composedPath();if(n.includes(e)){if(null!==d){let e=g();e&&e.click()}return}for(let t of n)if(t instanceof Element&&(t.getAttribute("commandfor")||t.getAttribute("popovertarget"))===e.id)return;e.hidePopover()}d=null}},{signal:n,capture:!0}),a.addEventListener("click",e=>{h?h=!1:(e.preventDefault(),e.stopPropagation())},{signal:n});let f=null;function m(t,n=!0){let i=g();null!==i&&i.setAttribute("tabIndex","-1"),e.removeAttribute("tabIndex"),t.setAttribute("tabIndex","0"),t.focus({preventScroll:!0}),r=t,n&&t.scrollIntoView({block:"nearest"})}function p(){let t=g();null!==t&&t.setAttribute("tabIndex","-1"),r=null,e.hasAttribute("open")&&(e.setAttribute("tabIndex","0"),e.focus())}function g(){return r}function v(e,n=!1){if(""===e)return null;let r=t.getItems(),i=e.toLowerCase(),o=g(),s=o?r.indexOf(o):-1;if(!n&&o&&-1!==s&&Rt(o)&&(o.textContent?.trim().toLowerCase()||"").startsWith(i))return o;for(let e=s+1;e<r.length;e++)if((r[e].textContent?.trim().toLowerCase()||"").startsWith(i)&&Rt(r[e]))return r[e];for(let e=0;e<=s;e++)if((r[e].textContent?.trim().toLowerCase()||"").startsWith(i)&&Rt(r[e]))return r[e];return null}return e.addEventListener("beforetoggle",e=>{let t=e;"open"===t.newState&&"closed"===t.oldState&&Bt.length>0&&!f&&(f=Bt[0])},{signal:n}),e.addEventListener("toggle",t=>{let n=t;"closed"===n.newState&&"open"===n.oldState&&setTimeout(()=>{!e.contains(document.activeElement)&&document.activeElement!==document.body||s&&Date.now()<s||(f&&f!==document.activeElement&&f.isConnected&&K(f),f=null)})},{signal:n}),n.addEventListener("abort",()=>{o&&(clearTimeout(o),o=null),u.disconnect()}),{ignoreNextFocusRestoration:()=>s=Date.now()+100,setActiveItem:m,clearActiveItem:p,getActiveItem:g,findItemBySearchQuery:v,handleSearchKey:function(e){let t=""===i;o&&(clearTimeout(o),o=null),i+=e.toLowerCase();let n=v(i,t);n&&m(n,!0),o=setTimeout(()=>{i="",o=null},350)},hasActiveSearchQuery:function(){return""!==i}}}var Mn,On,Cn,kn,Pn,Rn=class extends Q{constructor(){super(...arguments),o(this,kn),o(this,Mn,this.attachInternals()),o(this,On,""),o(this,Cn,null)}mount(e){let t=this.getOptions();this.value=this.getAttribute("value")??this.value??"";let n=this.getButton();n.id||(n.id=Ut("select-button")),Wt(n,"--button-width",e,this),n.addEventListener("keydown",e=>{if(!n.matches(":disabled"))switch(e.key){case"ArrowUp":case"ArrowDown":t.showPopover(),this.goToItem("selected"),e.preventDefault();break;case"Enter":e.preventDefault(),i(this,Mn).form&&i(this,Mn).form.requestSubmit();break;case" ":if(t.hasAttribute("open")&&i(this,Cn)&&i(this,Cn).hasActiveSearchQuery()){e.preventDefault(),e.stopPropagation(),i(this,Cn).handleSearchKey(e.key);break}e.preventDefault(),t.hasAttribute("open")?t.hidePopover():(t.showPopover(),this.goToItem("selected"));break;default:t.hasAttribute("open")&&1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),this.handleSearchKey(e.key))}},{signal:e});for(let e of i(this,Mn).labels)e.setAttribute("for",n.id);s(this,Cn,Ln(t,{role:"listbox",getItems:()=>this.getItems(),onItemClick:e=>this.setSelectedOption(e),getButton:()=>this.getButton(),onBeforeOpen:()=>this.onBeforeOpen(),onBeforeClose:()=>this.onBeforeClose()},e)),t.addEventListener("keydown",e=>{switch(e.key){case"ArrowDown":return e.preventDefault(),e.stopPropagation(),this.goToItem(3);case"ArrowUp":return e.preventDefault(),e.stopPropagation(),this.goToItem(2);case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),this.goToItem(0);case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),this.goToItem(1);case" ":if(i(this,Cn)&&i(this,Cn).hasActiveSearchQuery())return e.preventDefault(),e.stopPropagation(),void i(this,Cn).handleSearchKey(e.key);case"Enter":{e.preventDefault(),e.stopPropagation();let n=this.getActiveItem();return void(n?n.click():t.hidePopover())}case"Tab":i(this,Cn)&&i(this,Cn).ignoreNextFocusRestoration();break;case"Escape":e.preventDefault(),e.stopPropagation(),t.hidePopover(),n.focus();break;
25default:1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),i(this,Cn)&&i(this,Cn).handleSearchKey(e.key))}},{signal:e}),t.addEventListener("toggle",e=>{"open"===e.newState&&this.onOpen()},{signal:e});let r=Array.from(t.querySelectorAll("el-option[disabled]"));for(let e of r)e.setAttribute("aria-disabled","true"),e.setAttribute("aria-selected","false")}onAttributeChange(e,t,n){switch(e){case"value":null!==n&&(this.value=n);break;case"required":a(this,kn,Pn).call(this)}}getButton(){let e=this.querySelector("button");if(!e)throw new Error("`<el-select>` must contain a button element.");return e}getOptions(){let e=this.querySelector("el-options");if(!e)throw new Error("`<el-select>` must contain a `<el-options>` element.");return e}setSelectedOption(e){this.value=e.getAttribute("value"),this.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),this.getOptions().hidePopover()}getOptionByName(e){return this.getOptions().getOptionByName(e)}getItems(){return this.getOptions().getItems()}getActiveItem(){return i(this,Cn)?.getActiveItem()}getSelectedOption(){return this.getOptionByName(i(this,On))}goToItem(e=4){let t=this.getItems();if(0===t.length)return;let n=this.getActiveItem();if(null===n&&(2===e||3===e))return void this.goToItem("selected");if("selected"===e){let e=this.getSelectedOption();return void(e&&Rt(e)?this.setActiveItem(e):this.goToItem(0))}let r=Nt(t,n,e);r&&this.setActiveItem(r)}setActiveItem(e){i(this,Cn)&&i(this,Cn).setActiveItem(e)}clearActiveItem(){i(this,Cn)&&i(this,Cn).clearActiveItem()}onBeforeOpen(){let e=this.getButton(),t=e.dataset.originalTabIndex;t&&(e.dataset.originalTabIndex=t),e.setAttribute("tabIndex","-1")}onOpen(){null===this.getActiveItem()&&this.goToItem("selected")}onBeforeClose(){let e=this.getButton(),t=e.dataset.originalTabIndex;delete e.dataset.originalTabIndex,void 0!==t?e.setAttribute("tabIndex",t):e.removeAttribute("tabIndex");let n=this.getActiveItem();null!==n&&n.setAttribute("tabIndex","-1")}handleSearchKey(e){i(this,Cn)&&i(this,Cn).handleSearchKey(e)}set value(e){s(this,On,e),i(this,Mn).setFormValue(e),a(this,kn,Pn).call(this);let t=this.getSelectedOption();if(t){for(let e of this.getItems())e.setAttribute("aria-selected","false");t.setAttribute("aria-selected","true");try{this.querySelectorAll("el-selectedcontent").forEach(e=>e.update())}catch{}}}get value(){return i(this,On)}};Mn=new WeakMap,On=new WeakMap,Cn=new WeakMap,kn=new WeakSet,Pn=function(){this.hasAttribute("required")&&!i(this,On)?i(this,Mn).setValidity({valueMissing:!0},It.selectRequired,this.getButton()):i(this,Mn).setValidity({})},n(Rn,"formAssociated",!0),n(Rn,"observedAttributes",["required"]);ee("el-select",Rn),ee("el-selectedcontent",class extends Q{mount(){this.update()}update(){let e=this.getSelect().getSelectedOption();if(!e)return;let t=document.createDocumentFragment();for(let n of e.childNodes)t.append(n.cloneNode(!0));this.replaceChildren(t)}getSelect(){let e=this.closest("el-select");if(!e)throw new Error("`<el-selectedcontent>` must be inside of a `<el-select>` element.");return e}});var In,Fn=class extends Q{constructor(){super(...arguments),o(this,In,null)}mount(e){s(this,In,Ln(this,{role:"menu",getItems:()=>this.getItems(),onItemClick:()=>this.hidePopover(),getButton:()=>this.getDropdown().getButton(),onBeforeOpen:()=>this.onBeforeOpen(),onBeforeClose:()=>this.onBeforeClose()},e));let t=this.getDropdown().getButton();t.addEventListener("keydown",e=>{if(!t.disabled)switch(e.key){case"ArrowDown":this.showPopover(),this.goToItem(0),e.preventDefault();break;case"ArrowUp":this.showPopover(),this.goToItem(1),e.preventDefault();break;case" ":if(this.hasAttribute("open")&&i(this,In)&&i(this,In).hasActiveSearchQuery()){e.preventDefault(),e.stopPropagation(),i(this,In).handleSearchKey(e.key);break}case"Enter":e.preventDefault(),this.hasAttribute("open")?this.hidePopover():(this.showPopover(),this.goToItem(0));break;default:this.hasAttribute("open")&&1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),i(this,In)&&i(this,In).handleSearchKey(e.key))}},{signal:e}),this.addEventListener("keydown",e=>{switch(e.key){case"ArrowDown":return e.preventDefault(),e.stopPropagation(),this.goToItem(3);case"ArrowUp":return e.preventDefault(),e.stopPropagation(),this.goToItem(2);case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),this.goToItem(0);case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),this.goToItem(1);case" ":if(i(this,In)&&i(this,In).hasActiveSearchQuery())return e.preventDefault(),e.stopPropagation(),void i(this,In).handleSearchKey(e.key);case"Enter":{e.preventDefault(),e.stopPropagation();let t=this.getActiveItem();return void(t?t.click():this.hidePopover())}case"Tab":i(this,In)&&i(this,In).ignoreNextFocusRestoration();break;case"Escape":e.preventDefault(),e.stopPropagation(),this.hidePopover(),t.focus();break;
25default:1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.preventDefault(),e.stopPropagation(),i(this,In)&&i(this,In).handleSearchKey(e.key))}},{signal:e})}onBeforeOpen(){let e=this.getDropdown().getButton(),t=e.dataset.originalTabIndex;t&&(e.dataset.originalTabIndex=t),e.setAttribute("tabIndex","-1"),null===this.getActiveItem()&&(this.setAttribute("tabIndex","0"),setTimeout(()=>this.focus({preventScroll:!0})))}onBeforeClose(){let e=this.getDropdown().getButton(),t=e.dataset.originalTabIndex;delete e.dataset.originalTabIndex,void 0!==t?e.setAttribute("tabIndex",t):e.removeAttribute("tabIndex");let n=this.getActiveItem();null!==n&&n.setAttribute("tabIndex","-1")}goToItem(e=4){let t=this.getItems();if(0===t.length)return;let n=Nt(t,this.getActiveItem(),e);n&&this.setActiveItem(n)}setActiveItem(e){i(this,In)&&i(this,In).setActiveItem(e)}clearActiveItem(){i(this,In)&&i(this,In).clearActiveItem()}getDropdown(){let e=this.closest("el-dropdown");if(!e)throw new Error("[ElMenu] No `<el-dropdown>` element found");return e}getItems(){return Array.from(this.querySelectorAll(`${Dt},[role="menuitem"]`))}getActiveItem(){return i(this,In)?.getActiveItem()||null}onAttributeChange(e,t,n){if("open"===e)null===n?this.hidePopover():this.showPopover()}};In=new WeakMap,n(Fn,"observedAttributes",["anchor","open"]),ee("el-menu",Fn),ee("el-dropdown",class extends Q{getButton(){let e=this.querySelector("button");if(!e)throw new Error("[ElDropdown] No `<button>` element found");return e}mount(e){let t=this.getButton();t.id||(t.id=Ut("dropdown-button")),Wt(t,"--button-width",e,this);let n=this.querySelectorAll("label");for(let e of n)e.setAttribute("for",t.id)}});var Dn=class extends Q{onAttributeChange(e,t,n){if("open"===e)null===n?this.hidePopover():this.showPopover()}getOptionByName(e){return this.querySelector(`el-option[value="${e}"]`)||null}getItems(){return Array.from(this.querySelectorAll("el-option:not([disabled])"))}};n(Dn,"observedAttributes",["anchor","open"]);ee("el-options",Dn),ee("el-option",class extends Q{});var Nn=class extends Q{mount(e){if(!this.id)throw new Error("[ElPopover] No id found for popover (ensure `id` is set)");let t=this.getButtons();for(let n of t)n.id||(n.id=Ut("popover-button")),n.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.togglePopover())},{signal:e});$t(this,e,()=>this.getButtons()),this.setAttribute("tabindex","-1");let n=this,r=this.closest("el-popover-group");r&&r.getPopovers().includes(this)&&(n=r),xn(n,t,this,e,()=>this.hidePopover());let i=new AbortController;e.addEventListener("abort",()=>i.abort()),this.addEventListener("beforetoggle",e=>{if("open"===e.newState){let n=Vt(e,t);n&&Wt(n,"--button-width",i.signal,this)}else i.abort(),i=new AbortController}),this.addEventListener("toggle",e=>{"closed"===e.newState&&"open"===e.oldState&&setTimeout(()=>{if(!this.contains(document.activeElement)&&document.activeElement!==document.body)return;let n=Vt(e,t);n&&n!==document.activeElement&&n.isConnected&&K(n)})},{signal:e})}getButtons(){let e=this.id,t=Array.from(document.querySelectorAll(`[popovertarget="${e}"]`));if(!t)throw new Error('[ElPopover] No button found for popover (ensure you add a `<button popovertarget="${id}">` on the page)');return t}onAttributeChange(e,t,n){if("open"===e)null===n?this.hidePopover():this.showPopover()}};n(Nn,"observedAttributes",["anchor","open"]),ee("el-popover",Nn),ee("el-popover-group",class extends Q{getPopovers(){return Array.from(this.querySelectorAll("* > el-popover"))}});ee("el-tab-list",class extends Q{mount(){this.setAttribute("role","tablist"),this.setAttribute("aria-orientation","horizontal")}getTabButtons(){let e=this.querySelectorAll("button");return Array.from(e)}setActiveTab(e){this.getTabButtons().forEach((t,n)=>{let r=n===e;t.setAttribute("tabindex",r?"0":"-1"),t.setAttribute("aria-selected",r?"true":"false")})}}),ee("el-tab-panels",class extends Q{mount(){let e=this.getTabGroup().getList(),t=this.getPanels(),n=new MutationObserver(n=>{for(let r of n){let n=r.target;if("hidden"===r.attributeName)if(!n.hasAttribute(r.attributeName)){let r=t.indexOf(n);e.setActiveTab(r),this.setActivePanel(r)}}});for(let e of t)e.setAttribute("role","tabpanel"),e.setAttribute("tabindex","0"),n.observe(e,{attributeFilter:["hidden"],attributes:!0})}getTabGroup(){let e=this.closest("el-tab-group");if(!e)throw new Error("`<el-tab-panels>` must be inside of a `<el-tab-group>` element.");return e}getPanels(){return Array.from(this.children)}
25setActivePanel(e){this.getPanels().forEach((t,n)=>{t.toggleAttribute("hidden",n!==e)})}}),ee("el-tab-group",class extends Q{mount(e){let t=this.getList(),n=this.getPanels(),r=t.getTabButtons(),i=n.getPanels();if(r.length!==i.length)return void console.warn("[ElTabGroup] Mismatch between number of tabs and panels");for(let e=0;e<i.length;e++){let t=i[e],n=r[e];n.id||(n.id=Ut("tailwindplus-tab")),t.id||(t.id=Ut("tailwindplus-tab-panel")),t.setAttribute("aria-labelledby",n.id),n.setAttribute("aria-controls",t.id),n.setAttribute("role","tab")}let o=this.getActiveTab();-1===o&&(o=0),t.setActiveTab(o),n.setActivePanel(o),t.addEventListener("keydown",e=>{switch(e.key){case"ArrowLeft":{e.preventDefault();let t=this.getActiveTab()-1;t<0&&(t=r.length-1),this.setActiveTab(t),r[t].focus();break}case"ArrowRight":{e.preventDefault();let t=this.getActiveTab()+1;t>=r.length&&(t=0),this.setActiveTab(t),r[t].focus();break}case"Home":case"PageUp":e.preventDefault(),this.setActiveTab(0),r[0].focus();break;case"End":case"PageDown":e.preventDefault(),this.setActiveTab(r.length-1),r[r.length-1].focus()}},{signal:e});for(let t=0;t<r.length;t++)r[t].addEventListener("click",e=>{e.preventDefault(),this.setActiveTab(t)},{signal:e})}getActiveTab(){let e=this.querySelector("el-tab-panels"),t=e.getPanels().find(e=>!e.hasAttribute("hidden"));return t?e.getPanels().indexOf(t):-1}getList(){let e=this.querySelector("el-tab-list");if(!e)throw new Error("[ElTabGroup] No `<el-tab-list>` element found");return e}getPanels(){let e=this.querySelector("el-tab-panels");if(!e)throw new Error("[ElTabGroup] No `<el-tab-panels>` element found");return e}setActiveTab(e){if(this.getActiveTab()===e)return;let t=this.getList(),n=this.getPanels(),r=t.getTabButtons();e<0||e>=r.length||(t.setActiveTab(e),n.setActivePanel(e))}});ee("el-copyable",class extends Q{mount(e){let t=new WeakMap;this.addEventListener("command",e=>{let n=e;if("--copy"!==n.command)return;let r=n.source;t.get(r)?.abort();let i=new AbortController;t.set(r,i);let o=this.textContent??"";return navigator.clipboard.writeText(o).then(()=>{r.dataset.copied=""}).catch(e=>{r.dataset.error="",console.error("Failed to copy text: ",e)}).finally(()=>{let e=setTimeout(()=>{delete r.dataset.copied,delete r.dataset.error},2e3);i.signal.addEventListener("abort",()=>clearTimeout(e),{once:!0})})},{signal:e})}}),typeof globalThis.window<"u"&&setTimeout(()=>window.dispatchEvent(new Event("elements:ready")))}}]);

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.