@gomusdev/web-components 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34992,7 +34992,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34992
34992
  var node_2 = sibling(span, 2);
34993
34993
  {
34994
34994
  var consequent_2 = ($$anchor4) => {
34995
- const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2].id);
34995
+ const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]?.id);
34996
34996
  var fragment_2 = root_3$2();
34997
34997
  var node_3 = first_child(fragment_2);
34998
34998
  {
@@ -34992,7 +34992,7 @@ function TicketSale($$anchor, $$props) {
34992
34992
  var node_2 = sibling(span, 2);
34993
34993
  {
34994
34994
  var consequent_2 = ($$anchor4) => {
34995
- const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2].id);
34995
+ const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]?.id);
34996
34996
  var fragment_2 = root_3$2();
34997
34997
  var node_3 = first_child(fragment_2);
34998
34998
  {
@@ -9,5 +9,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9
9
  `," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const Yp=Qs({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"}),Gp=typeof window<"u"?window:void 0;function eE(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class tE extends Map{#e=new Map;#t=re(0);#r=re(0);#n=Hr||-1;constructor(e){if(super(),e){for(var[r,n]of e)super.set(r,n);this.#r.v=super.size}}#i(e){return Hr===this.#n?re(e):wn(e)}has(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else return h(this.#t),!1}return h(n),!0}forEach(e,r){this.#s(),super.forEach(e,r)}get(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else{h(this.#t);return}}return h(n),super.get(e)}set(e,r){var n=this.#e,i=n.get(e),s=super.get(e),o=super.set(e,r),a=this.#t;if(i===void 0)i=this.#i(0),n.set(e,i),C(this.#r,super.size),kr(a);else if(s!==r){kr(i);var l=a.reactions===null?null:new Set(a.reactions),u=l===null||!i.reactions?.every(c=>l.has(c));u&&kr(a)}return o}delete(e){var r=this.#e,n=r.get(e),i=super.delete(e);return n!==void 0&&(r.delete(e),C(this.#r,super.size),C(n,-1),kr(this.#t)),i}clear(){if(super.size!==0){super.clear();var e=this.#e;C(this.#r,0);for(var r of e.values())C(r,-1);kr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)h(n)}keys(){return h(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return h(this.#r),super.size}}class rE{#e;#t;constructor(e={}){const{window:r=Gp,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=_l(i=>{const s=ft(r,"focusin",i),o=ft(r,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#t?.(),this.#e?eE(this.#e):null}}new rE;function nE(t){return typeof t=="function"}class sn{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return qv(this.#t)}get(){const e=Pd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=Pd(this.#t);return r===void 0?e:r}set(e){return Uv(this.#t,e)}}function iE(t,e){switch(t){case"post":ge(e);break;case"pre":Cl(e);break}}function Jp(t,e,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(t)?[]:void 0;iE(e,()=>{const a=Array.isArray(t)?t.map(u=>u()):t();if(!s){s=!0,o=a;return}const l=qe(()=>r(a,o));return o=a,l})}function st(t,e,r){Jp(t,"post",e,r)}function sE(t,e,r){Jp(t,"pre",e,r)}st.pre=sE;function Qp(t){return nE(t)?t():t}class oE{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=E(()=>(h(this.#o)?.(),this.getSize().width));#a=E(()=>(h(this.#o)?.(),this.getSize().height));#o=E(()=>{const e=Qp(this.#n);if(e)return _l(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#t=!0;for(const s of i){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#e.width=a.reduce((l,u)=>Math.max(l,u.inlineSize),0),this.#e.height=a.reduce((l,u)=>Math.max(l,u.blockSize),0)}r()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,r={box:"border-box"}){this.#i=r.window??Gp,this.#r=r,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Qp(this.#n);if(!e||!this.#i)return;const r=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(e),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),l=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=r-s-a,c=n-o-l;return{width:u,height:c}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return h(this.#o)?.(),this.getSize()}get width(){return h(this.#s)}get height(){return h(this.#a)}}function Bi(t){ge(()=>()=>{t()})}function aE(t,e){return setTimeout(e,t)}function Xs(t){kf().then(t)}const lE=1,uE=9,cE=11;function zu(t){return Ys(t)&&t.nodeType===lE&&typeof t.nodeName=="string"}function Xp(t){return Ys(t)&&t.nodeType===uE}function dE(t){return Ys(t)&&t.constructor?.name==="VisualViewport"}function fE(t){return Ys(t)&&t.nodeType!==void 0}function em(t){return fE(t)&&t.nodeType===cE&&"host"in t}function hE(t,e){if(!t||!e||!zu(t)||!zu(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&em(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ba(t){return Xp(t)?t:dE(t)?t.document:t?.ownerDocument??document}function tm(t){return em(t)?tm(t.host):Xp(t)?t.defaultView??window:zu(t)?t.ownerDocument?.defaultView??window:window}function pE(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class Ui{element;#e=E(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return h(this.#e)}set root(e){C(this.#e,e)}constructor(e){typeof e=="function"?this.element=F(e):this.element=e}getDocument=()=>ba(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>pE(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,r)=>this.getWindow().setTimeout(e,r);clearTimeout=e=>this.getWindow().clearTimeout(e)}function rt(t,e){return{[ky()]:r=>jp(t)?(t.current=r,qe(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e?.(null))}):(t(r),qe(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e?.(null))})}}function cr(t){return t?"true":"false"}function Lu(t){return t?"true":void 0}function ze(t){return t?"":void 0}function rm(t){return t?"open":"closed"}class mE{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${this.#t}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}function _a(t){const e=new mE(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const wa="ArrowDown",eo="ArrowLeft",to="ArrowRight",ka="ArrowUp",nm="Backspace",Zu="Enter",gE="Escape",Vu=" ",Sa="Tab",ju="a",im="P",Bu="A",vE="p",on=typeof document<"u",sm=yE();function yE(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function dr(t){return t instanceof HTMLElement}function ro(t){return t instanceof Element}function bE(t){return t instanceof Element||t instanceof SVGElement}function xa(t){return!Number.isNaN(Number(t))&&!Number.isNaN(Number.parseFloat(t))}function Nn(t){return t===null}function Ea(t){return t.pointerType==="touch"}function _E(t){return t!==null}class wE{#e;#t=null;constructor(e){this.#e=e,Bi(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const r=this.#e.ref.current;if(r){if(typeof r.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=r.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(i=>i.finished)).then(()=>{this.#n(e)})})}}#n(e){const r=()=>{e()};this.#e.afterTick?Xs(r):r()}}class om{#e;#t;#r;#n=re(!1);constructor(e){this.#e=e,C(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new wE({ref:this.#e.ref,afterTick:this.#e.open}),st(()=>this.#e.open.current,r=>{r&&C(this.#n,!0),this.#t&&this.#r.run(()=>{r===this.#e.open.current&&(this.#e.open.current||C(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}}function ke(){}function Ie(t,e){return`bits-${t}`}const kE=new sn("BitsConfig");function SE(){const t=new xE(null,{});return kE.getOr(t).opts}class xE{opts;constructor(e,r){const n=EE(e,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function EE(t,e){return r=>F(()=>{const i=r(e)?.current;if(i!==void 0)return i;if(t!==null)return r(t.opts)?.current})}function OE(t,e){return r=>{const n=SE();return F(()=>{const i=r();if(i!==void 0)return i;const s=t(n).current;return s!==void 0?s:e})}}const am=OE(t=>t.defaultLocale,"en");function lm(t,e=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...i)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function um(t,e){return t===e||t.contains(e)}function cm(t){return t?.ownerDocument??document}function CE(t,e){const{clientX:r,clientY:n}=t,i=e.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var dm=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Oa=dm.join(","),fm=typeof Element>"u",li=fm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ca=!fm&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Ta=function(e,r){var n;r===void 0&&(r=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=i===""||i==="true",o=s||r&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Ta(e.parentNode));return o},TE=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},hm=function(e,r,n){if(Ta(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Oa));return r&&li.call(e,Oa)&&i.unshift(e),i=i.filter(n),i},Aa=function(e,r,n){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ta(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,u=Aa(l,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var c=li.call(o,Oa);c&&n.filter(o)&&(r||!e.includes(o))&&i.push(o);var d=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),f=!Ta(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(d&&f){var p=Aa(d===!0?o.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},pm=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},mm=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||TE(e))&&!pm(e)?0:e.tabIndex},AE=function(e,r){var n=mm(e);return n<0&&r&&!pm(e)?0:n},DE=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},gm=function(e){return e.tagName==="INPUT"},IE=function(e){return gm(e)&&e.type==="hidden"},PE=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},$E=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},ME=function(e){if(!e.name)return!0;var r=e.form||Ca(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=$E(i,e.form);return!s||s===e},FE=function(e){return gm(e)&&e.type==="radio"},NE=function(e){return FE(e)&&!ME(e)},RE=function(e){var r,n=e&&Ca(e),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==e){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var u,c,d;n=Ca(i),i=(u=n)===null||u===void 0?void 0:u.host,s=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return s},vm=function(e){var r=e.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},zE=function(e,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var o=li.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(li.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var u=e.parentElement,c=Ca(e);if(u&&!u.shadowRoot&&i(u)===!0)return vm(e);e.assignedSlot?e=e.assignedSlot:!u&&c!==e.ownerDocument?e=c.host:e=u}e=l}if(RE(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return vm(e);return!1},LE=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return li.call(r,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}r=r.parentElement}return!1},Da=function(e,r){return!(r.disabled||IE(r)||zE(r,e)||PE(r)||LE(r))},Uu=function(e,r){return!(NE(r)||mm(r)<0||!Da(e,r))},ZE=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},ym=function(e){var r=[],n=[];return e.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=AE(a,o),u=o?ym(i.candidates):a;l===0?o?r.push.apply(r,u):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:u})}),n.sort(DE).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},VE=function(e,r){r=r||{};var n;return r.getShadowRoot?n=Aa([e],r.includeContainer,{filter:Uu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:ZE}):n=hm(e,r.includeContainer,Uu.bind(null,r)),ym(n)},jE=function(e,r){r=r||{};var n;return r.getShadowRoot?n=Aa([e],r.includeContainer,{filter:Da.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=hm(e,r.includeContainer,Da.bind(null,r)),n},BE=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return li.call(e,Oa)===!1?!1:Uu(r,e)},UE=dm.concat("iframe:not([inert]):not([inert] *)").join(","),qE=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return li.call(e,UE)===!1?!1:Da(r,e)};function WE(t,e){const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function qu(t,e){return t>=0&&t<e.length}const KE="data-context-menu-trigger",HE="data-context-menu-content";_a({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]}),globalThis.bitsDismissableLayers??=new Map;class Wu{static create(e){return new Wu(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=ke;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,ge(()=>{this.#s=cm(this.opts.ref.current)});let r=ke;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),r()};st([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return aE(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),Bi(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),this.#o(),r()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&Xs(()=>{!this.opts.ref.current||this.#m(e.target)||e.target&&!this.#i&&this.#a.current?.(e)})};#u(){return Js(ft(this.#s,"pointerdown",Js(this.#f,this.#p),{capture:!0}),ft(this.#s,"pointerdown",Js(this.#h,this.#c)),ft(this.#s,"focusin",this.#l))}#d=e=>{let r=e;r.defaultPrevented&&(r=bm(e)),this.#e.current(e)};#c=lm(e=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(e,this.opts.ref.current)||JE(e,this.opts.ref.current);if(!this.#n||this.#v()||!r){this.#o();return}let n=e;if(n.defaultPrevented&&(n=bm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=ft(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#r[e.type]=!0};#h=e=>{this.#r[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#n=GE(this.opts.ref.current))};#m=e=>this.opts.ref.current?um(this.opts.ref.current,e):!1;#g=lm(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#v(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#i=!0};#b=()=>{this.#i=!1};props={onfocuscapture:this.#y,onblurcapture:this.#b}}function YE(t=[...globalThis.bitsDismissableLayers]){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function GE(t){const e=[...globalThis.bitsDismissableLayers],r=YE(e);if(r)return r[0].opts.ref.current===t;const[n]=e[0];return n.opts.ref.current===t}function JE(t,e){const r=t.target;if(!bE(r))return!1;const n=!!r.closest(`[${KE}]`);if("button"in t&&t.button>0&&!n)return!1;if("button"in t&&t.button===0&&n)return!0;const i=!!e.closest(`[${HE}]`);return n&&i?!1:cm(r).documentElement.contains(r)&&!um(e,r)&&CE(t,e)}function bm(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let i=!1;return new Proxy(n,{get:(o,a)=>a==="currentTarget"?e:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:t[a]})}function _m(t,e){ne(e,!0);let r=y(e,"interactOutsideBehavior",7,"close"),n=y(e,"onInteractOutside",7,ke),i=y(e,"onFocusOutside",7,ke),s=y(e,"id",7),o=y(e,"children",7),a=y(e,"enabled",7),l=y(e,"isValidEvent",7,()=>!1),u=y(e,"ref",7);const c=Wu.create({id:F(()=>s()),interactOutsideBehavior:F(()=>r()),onInteractOutside:F(()=>n()),enabled:F(()=>a()),onFocusOutside:F(()=>i()),isValidEvent:F(()=>l()),ref:u()});var d={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(b="close"){r(b),v()},get onInteractOutside(){return n()},set onInteractOutside(b=ke){n(b),v()},get onFocusOutside(){return i()},set onFocusOutside(b=ke){i(b),v()},get id(){return s()},set id(b){s(b),v()},get children(){return o()},set children(b){o(b),v()},get enabled(){return a()},set enabled(b){a(b),v()},get isValidEvent(){return l()},set isValidEvent(b=()=>!1){l(b),v()},get ref(){return u()},set ref(b){u(b),v()}},f=W(),p=R(f);return ye(p,()=>o()??Ne,()=>({props:c.props})),w(t,f),ie(d)}se(_m,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;class Ku{static create(e){return new Ku(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ui(this.opts.ref);let r=ke;st(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ft(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==gE||!QE(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function QE(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function wm(t,e){ne(e,!0);let r=y(e,"escapeKeydownBehavior",7,"close"),n=y(e,"onEscapeKeydown",7,ke),i=y(e,"children",7),s=y(e,"enabled",7),o=y(e,"ref",7);Ku.create({escapeKeydownBehavior:F(()=>r()),onEscapeKeydown:F(()=>n()),enabled:F(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(c="close"){r(c),v()},get onEscapeKeydown(){return n()},set onEscapeKeydown(c=ke){n(c),v()},get children(){return i()},set children(c){i(c),v()},get enabled(){return s()},set enabled(c){s(c),v()},get ref(){return o()},set ref(c){o(c),v()}},l=W(),u=R(l);return ye(u,()=>i()??Ne),w(t,l),ie(a)}se(wm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});class Hu{static instance;#e=ur([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Hu),this.instance}register(e){const r=this.getActive();r&&r!==e&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(i=>i!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,r){this.#t.set(e,r)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,r){this.#r.set(e,r)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class Yu{#e=!1;#t=null;#r=Hu.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,r=e.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(!a)return;if(e.contains(a))this.#r.setFocusMemory(this,a);else{const u=this.#r.getFocusMemory(this);if(u&&e.contains(u)&&qE(u))o.preventDefault(),u.focus();else{const c=this.#d(),d=this.#c()[0];(c||d||e).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length<2)return;const l=a[0],u=a[a.length-1];!o.shiftKey&&r.activeElement===u?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),u.focus())};this.#n.push(ft(r,"focusin",n,{capture:!0}),ft(e,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!e.contains(o)){const a=this.#d(),l=this.#c()[0],u=a||l;u?(u.focus(),this.#r.setFocusMemory(this,u)):e.focus()}});s.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?VE(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#u()[0]||null}#c(){return this.#t?jE(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let r=null;return st([()=>e.ref.current,()=>e.enabled.current],([n,i])=>{n&&i?(r||(r=new Yu(e)),r.mount(n)):r&&(r.unmount(),r=null)}),Bi(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function km(t,e){ne(e,!0);let r=y(e,"enabled",7,!1),n=y(e,"trapFocus",7,!1),i=y(e,"loop",7,!1),s=y(e,"onCloseAutoFocus",7,ke),o=y(e,"onOpenAutoFocus",7,ke),a=y(e,"focusScope",7),l=y(e,"ref",7);const u=Yu.use({enabled:F(()=>r()),trap:F(()=>n()),loop:i(),onCloseAutoFocus:F(()=>s()),onOpenAutoFocus:F(()=>o()),ref:l()});var c={get enabled(){return r()},set enabled(p=!1){r(p),v()},get trapFocus(){return n()},set trapFocus(p=!1){n(p),v()},get loop(){return i()},set loop(p=!1){i(p),v()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(p=ke){s(p),v()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(p=ke){o(p),v()},get focusScope(){return a()},set focusScope(p){a(p),v()},get ref(){return l()},set ref(p){l(p),v()}},d=W(),f=R(d);return ye(f,()=>a()??Ne,()=>({props:u.props})),w(t,d),ie(c)}se(km,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsTextSelectionLayers??=new Map;class Gu{static create(e){return new Gu(e)}opts;domContext;#e=ke;constructor(e){this.opts=e,this.domContext=new Ui(e.ref);let r=ke;st(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#t()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Js(ft(this.domContext.getDocument(),"pointerdown",this.#r),ft(this.domContext.getDocument(),"pointerup",Bp(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const r=this.opts.ref.current,n=e.target;!dr(r)||!dr(n)||!this.opts.enabled.current||!eO(this)||!hE(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=XE(r,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=ke}}const Sm=t=>t.style.userSelect||t.style.webkitUserSelect;function XE(t,e){const r=Sm(e),n=Sm(t);return Ia(e,"none"),Ia(t,"text"),()=>{Ia(e,r),Ia(t,n)}}function Ia(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function eO(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function xm(t,e){ne(e,!0);let r=y(e,"preventOverflowTextSelection",7,!0),n=y(e,"onPointerDown",7,ke),i=y(e,"onPointerUp",7,ke),s=y(e,"id",7),o=y(e,"children",7),a=y(e,"enabled",7),l=y(e,"ref",7);Gu.create({id:F(()=>s()),onPointerDown:F(()=>n()),onPointerUp:F(()=>i()),enabled:F(()=>a()&&r()),ref:l()});var u={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(f=!0){r(f),v()},get onPointerDown(){return n()},set onPointerDown(f=ke){n(f),v()},get onPointerUp(){return i()},set onPointerUp(f=ke){i(f),v()},get id(){return s()},set id(f){s(f),v()},get children(){return o()},set children(f){o(f),v()},get enabled(){return a()},set enabled(f){a(f),v()},get ref(){return l()},set ref(f){l(f),v()}},c=W(),d=R(c);return ye(d,()=>o()??Ne),w(t,c),ie(u)}se(xm,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Rn(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}class tO{#e;#t=0;#r=re();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),C(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,h(this.#r)===void 0&&(this.#n=Mo(()=>{C(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),h(this.#r)}}const Pa=new tE;let $a=re(null),Ju=null,no=null,io=!1;const Em=F(()=>{for(const t of Pa.values())if(t)return!0;return!1});let Qu=null;const rO=new tO(()=>{function t(){document.body.setAttribute("style",h($a)??""),document.body.style.removeProperty("--scrollbar-width"),sm&&Ju?.(),C($a,null)}function e(){no!==null&&(window.clearTimeout(no),no=null)}function r(i,s){e(),io=!0,Qu=Date.now();const o=Qu,a=()=>{no=null,Qu===o&&(Om(Pa)?io=!1:(io=!1,s()))},l=i===null?24:i;no=window.setTimeout(a,l)}function n(){h($a)===null&&Pa.size===0&&!io&&C($a,document.body.getAttribute("style"),!0)}return st(()=>Em.current,()=>{if(!Em.current)return;n(),io=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",sm&&(Ju=ft(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Xs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Bi(()=>()=>{Ju?.()}),{get lockMap(){return Pa},resetBodyStyle:t,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class nO{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,r=()=>null){this.#t=e,this.#r=r,this.#n=rO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=F(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),Bi(()=>{if(this.#n.lockMap.delete(this.#e),Om(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function Om(t){for(const[e,r]of t)if(r)return!0;return!1}function Xu(t,e){ne(e,!0);let r=y(e,"preventScroll",7,!0),n=y(e,"restoreScrollDelay",7,null);r()&&new nO(r(),()=>n());var i={get preventScroll(){return r()},set preventScroll(s=!0){r(s),v()},get restoreScrollDelay(){return n()},set restoreScrollDelay(s=null){n(s),v()}};return ie(i)}se(Xu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function iO(t){if(!on||!t)return null;let e=t.querySelector("[data-bits-announcer]");const r=i=>{const s=t.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!dr(e)){const i=t.createElement("div");i.style.cssText=Yp,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),e=i,t.body.insertBefore(e,t.body.firstChild)}return{getLog:i=>{if(!dr(e))return null;const s=e.querySelector(`[aria-live="${i}"]`);return dr(s)?s:null}}}function Ma(t){const e=iO(t);function r(n,i="assertive",s=7500){if(!e||!on||!t)return;const o=e.getLog(i),a=t.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}const sO={defaultValue:void 0,granularity:"day"};function Cm(t){const e={...sO,...t},{defaultValue:r,granularity:n,minValue:i,maxValue:s}=e;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let o=new Date;i&&o<i.toDate(Vt())?o=i.toDate(Vt()):s&&o>s.toDate(Vt())&&(o=s.toDate(Vt()));const a=o.getFullYear(),l=o.getMonth()+1,u=o.getDate();return["hour","minute","second"].includes(n??"day")?new en(a,l,u,0,0,0):new $n(a,l,u)}}function Tm(t,e){let r;return e instanceof lr?r=Ch(t):e instanceof en?r=Oh(t):r=hu(t),r.calendar!==e.calendar?jt(r,e.calendar):r}function Pt(t,e=Vt()){return t instanceof lr?t.toDate():t.toDate(e)}function oO(t){if(t instanceof $n)return"date";if(t instanceof en)return"datetime";if(t instanceof lr)return"zoneddatetime";throw new Error("Unknown date type")}function aO(t,e){switch(e){case"date":return hu(t);case"datetime":return Oh(t);case"zoneddatetime":return Ch(t);default:throw new Error(`Unknown date type: ${e}`)}}function lO(t){return t instanceof en}function ec(t){return t instanceof lr}function Fa(t){return lO(t)||ec(t)}function so(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function ui(t,e){return t.compare(e)<0}function uO(t,e){return t.compare(e)>0}function Am(t,e,r){const n=lh(t,r);return e>n?t.subtract({days:n+7-e}):e===n?t:t.subtract({days:n-e})}function Dm(t,e,r){const n=lh(t,r),i=e===0?6:e-1;return n===i?t:n>i?t.add({days:7-n+i}):t.add({days:i-n})}const Na=["day","month","year"],tc=["hour","minute","second","dayPeriod"],cO=["literal","timeZoneName"],oo=[...Na,...tc],dO=[...oo,...cO],fO=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],hO=["year","month","day"],rc={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function pO(t){if(Im(t))return rc[t];{const e=yO(t);return Im(e)?rc[e]:rc.en}}function nc(t,e,r){return mO(t)?pO(r)[t]:vO(t)?e:gO(t)?"––":""}function Im(t){return fO.includes(t)}function mO(t){return hO.includes(t)}function gO(t){return t==="hour"||t==="minute"||t==="second"}function vO(t){return t==="era"||t==="dayPeriod"}function yO(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function ic(t){const e=["hour","minute","second"],r=oo.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:t==="day"?!e.includes(n):!0);return Object.fromEntries(r)}function bO(t){const{segmentValues:e,formatter:r,locale:n,dateRef:i}=t,s=Object.keys(e).reduce((a,l)=>{if(!$m(l))return a;if("hour"in e&&l==="dayPeriod"){const u=e[l];Nn(u)?a[l]=nc(l,"AM",n):a[l]=u}else a[l]=o(l);return a},{});function o(a){if("hour"in e){const l=e[a],u=typeof l=="string"&&l?.startsWith("0"),c=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Nn(l)&&!Nn(c)){const d=r.part(i.set({[a]:l}),a,{hourCycle:t.hourCycle===24?"h23":void 0}),f=t.hourCycle===12||t.hourCycle===void 0&&Fm(n)===12;if(a==="hour"&&f){if(c>12){const p=c-12;return p===0?"12":p<10?`0${p}`:`${p}`}return c===0?"12":c<10?`0${c}`:`${c}`}return a==="year"?`${l}`:u&&d.length===1?`0${d}`:d}else return nc(a,"",n)}else{if(Ra(a)){const l=e[a],u=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return nc(a,"",n);{const c=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:u&&c.length===1?`0${c}`:c}}return""}}return s}function _O(t){const{granularity:e,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=t;return n.toParts(r,kO(e,o)).map(u=>["literal","dayPeriod","timeZoneName",null].includes(u.type)||!$m(u.type)?{part:u.type,value:u.value}:{part:u.type,value:i[u.type]}).filter(u=>!(Nn(u.part)||Nn(u.value)||u.part==="timeZoneName"&&(!ec(r)||s)))}function wO(t){const e=bO(t),r=_O({contentObj:e,...t});return{obj:e,arr:r}}function kO(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h23":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&delete r.minute,t==="minute"&&delete r.second,r}function Pm(){return oo.reduce((t,e)=>(t[e]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},t),{})}function Ra(t){return Na.includes(t)}function $m(t){return oo.includes(t)}function SO(t){return dO.includes(t)}function Mm(t){return!on||!t?[]:za(t).map(r=>r.dataset.segment).filter(r=>oo.includes(r))}function xO(t){const{segmentObj:e,fieldNode:r,dateRef:n}=t,i=Mm(r);let s=n;for(const o of i)if("hour"in e){const a=e[o];if(Nn(a))continue;s=s.set({[o]:e[o]})}else if(Ra(o)){const a=e[o];if(Nn(a))continue;s=s.set({[o]:e[o]})}return s}function EO(t,e){const r=Mm(e);for(const n of r)if("hour"in t){if(t[n]===null)return!1}else if(Ra(n)&&t[n]===null)return!1;return!0}function OO(t){return typeof t!="object"||t===null?!1:Object.entries(t).every(([e,r])=>(tc.includes(e)||Na.includes(e))&&(e==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function CO(t,e){return e||(Fa(t)?"minute":"day")}function sc(t){return!!([Zu,ka,wa,eo,to,nm,Vu].includes(t)||xa(t))}function TO(t,e){if(!on)return!1;const r=za(e);return r.length?r[0].id===t:!1}function AO(t){const{id:e,formatter:r,value:n,doc:i}=t;if(!on)return;const s=r.selectedDate(n),o=i.getElementById(e);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Qs({display:"none"}),a.id=e,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function DO(t,e){if(!on)return;const r=e.getElementById(t);r&&e.body.removeChild(r)}function Fm(t){return new Intl.DateTimeFormat(t,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(i=>i.type==="hour")?.value==="1"?12:24}function ao(t,e){const r=t.currentTarget;if(!dr(r))return;const{prev:n,next:i}=oc(r,e);if(t.key===eo){if(!n)return;n.focus()}else if(t.key===to){if(!i)return;i.focus()}}function IO(t,e){const r=e.indexOf(t);if(r===e.length-1||r===-1)return null;const n=r+1;return e[n]}function PO(t,e){const r=e.indexOf(t);if(r===0||r===-1)return null;const n=r-1;return e[n]}function oc(t,e){const r=za(e);return r.length?{next:IO(t,r),prev:PO(t,r)}:{next:null,prev:null}}function Nm(t,e){const r=t.currentTarget;if(!dr(r))return;const{next:n}=oc(r,e);n&&n.focus()}function Rm(t,e){const r=t.currentTarget;if(!dr(r))return;const{prev:n}=oc(r,e);n&&n.focus()}function lo(t){return t===to||t===eo}function za(t){return t?Array.from(t.querySelectorAll("[data-segment]")).filter(r=>{if(!dr(r))return!1;const n=r.dataset.segment;return n==="trigger"?!0:!(!SO(n)||n==="literal")}):[]}function $O(t){return za(t)[0]}const MO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function zm(t){let e=t.initialLocale;function r(p){e=p}function n(){return e}function i(p,b){return new Ir(e,b).format(p)}function s(p,b=!0){return Fa(p)&&b?i(Pt(p),{dateStyle:"long",timeStyle:"long"}):i(Pt(p),{dateStyle:"long"})}function o(p){if(typeof t.monthFormat.current!="function"&&typeof t.yearFormat.current!="function")return new Ir(e,{month:t.monthFormat.current,year:t.yearFormat.current}).format(p);const b=typeof t.monthFormat.current=="function"?t.monthFormat.current(p.getMonth()+1):new Ir(e,{month:t.monthFormat.current}).format(p),m=typeof t.yearFormat.current=="function"?t.yearFormat.current(p.getFullYear()):new Ir(e,{year:t.yearFormat.current}).format(p);return`${b} ${m}`}function a(p){return new Ir(e,{month:"long"}).format(p)}function l(p){return new Ir(e,{year:"numeric"}).format(p)}function u(p,b){return ec(p)?new Ir(e,{...b,timeZone:p.timeZone}).formatToParts(Pt(p)):new Ir(e,b).formatToParts(Pt(p))}function c(p,b="narrow"){return new Ir(e,{weekday:b}).format(p)}function d(p,b=void 0){return new Ir(e,{hour:"numeric",minute:"numeric",hourCycle:b===24?"h23":void 0}).formatToParts(p).find(_=>_.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function f(p,b,m={}){const g={...MO,...m},k=u(p,g).find(P=>P.type===b);return k?k.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:f,dayPeriod:d,selectedDate:s,dayOfWeek:c}}function FO(t){return!(!dr(t)||!t.hasAttribute("data-bits-day"))}function Lm(t,e){const r=[];let n=t.add({days:1});const i=e;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function ac(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:n,locale:i}=t,s=so(e),o=Array.from({length:s},(g,_)=>e.set({day:_+1})),a=iu(e),l=l_(e),u=r!==void 0?Am(a,r,"en-US"):Am(a,0,i),c=r!==void 0?Dm(l,r,"en-US"):Dm(l,0,i),d=Lm(u.subtract({days:1}),a),f=Lm(l,c.add({days:1})),p=d.length+o.length+f.length;if(n&&p<42){const g=42-p;let _=f[f.length-1];_||(_=e.add({months:1}).set({day:1}));let k=g;f.length===0&&(k=g-1,f.push(_));const P=Array.from({length:k},(O,$)=>{const A=$+1;return _.add({days:A})});f.push(...P)}const b=d.concat(o,f),m=WE(b,7);return{value:e,dates:b,weeks:m}}function uo(t){const{numberOfMonths:e,dateObj:r,...n}=t,i=[];if(!e||e===1)return i.push(ac({...n,dateObj:r})),i;i.push(ac({...n,dateObj:r}));for(let s=1;s<e;s++){const o=r.add({months:s});i.push(ac({...n,dateObj:o}))}return i}function lc(t){return t?Array.from(t.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>dr(r)):[]}function Zm(t,e){const r=t.getAttribute("data-value");r&&(e.current=Tm(r,e.current))}function NO({node:t,add:e,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=lc(n);if(!l.length)return;const c=l.indexOf(t)+e;if(qu(c,l)){const d=l[c];return Zm(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Xs(()=>{const f=lc(n);if(!f.length)return;const p=f.length-Math.abs(c);if(qu(p,f)){const b=f[p];return Zm(b,r),b.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Xs(()=>{const f=lc(n);if(!f.length)return;const p=c-l.length;if(qu(p,f))return f[p].focus()})}}const Vm=[wa,ka,eo,to],jm=[Zu,Vu];function RO({event:t,handleCellClick:e,shiftFocus:r,placeholderValue:n}){const i=t.target;if(!FO(i)||!Vm.includes(t.key)&&!jm.includes(t.key))return;t.preventDefault();const s={[wa]:7,[ka]:-7,[eo]:-1,[to]:1};if(Vm.includes(t.key)){const o=s[t.key];o!==void 0&&r(i,o)}if(jm.includes(t.key)){const o=i.getAttribute("data-value");if(!o)return;e(t,Tm(o,n))}}function zO({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.add({months:r}));else{const u=l.add({months:1}),c=uo({dateObj:u,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(u),e(c)}}function LO({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const u=l.subtract({months:1}),c=uo({dateObj:u,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(u),e(c)}}function ZO({months:t,formatter:e,weekdayFormat:r}){if(!t.length)return[];const i=t[0].weeks[0];return i?i.map(s=>e.dayOfWeek(Pt(s),r)):[]}function VO(t){ge(()=>{const e=t.weekStartsOn.current,r=t.locale.current,n=t.fixedWeeks.current,i=t.numberOfMonths.current;qe(()=>{const s=t.placeholder.current;if(!s)return;const o={weekStartsOn:e,locale:r,fixedWeeks:n,numberOfMonths:i};t.setMonths(uo({...o,dateObj:s}))})})}function jO({calendarNode:t,label:e,accessibleHeadingId:r}){const n=ba(t),i=n.createElement("div");i.style.cssText=Qs({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=e,s.id=r,s.role="heading",s.ariaLevel="2",t.insertBefore(i,t.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function BO({placeholder:t,getVisibleMonths:e,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){ge(()=>{t.current,qe(()=>{if(e().some(l=>ru(l,t.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current};o(uo({...a,dateObj:t.current}))})})}function UO({maxValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[e.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return uO(i,t)}function qO({minValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return ui(i,t)}function WO({months:t,locale:e,formatter:r}){if(!t.length)return"";if(e!==r.getLocale()&&r.setLocale(e),t.length===1){const c=Pt(t[0].value);return`${r.fullMonthAndYear(c)}`}const n=Pt(t[0].value),i=Pt(t[t.length-1].value),s=r.fullMonth(n),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function KO({fullCalendarLabel:t,id:e,isInvalid:r,disabled:n,readonly:i}){return{id:e,role:"application","aria-label":t,"data-invalid":ze(r),"data-disabled":ze(n),"data-readonly":ze(i)}}function HO(t){const r=ba(t.target).querySelector("[data-bits-day][data-focused]");r&&(t.preventDefault(),r?.focus())}function YO(t){if(!on)return;const e=Array.from(t.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(e.length===0)return;const r=e[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return aO(n,i)}function GO({ref:t,placeholder:e,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&ui(a,n.current)||i.current&&ui(i.current,a))}st(()=>t.current,()=>{t.current&&e.current&&Dn(e.current,r)&&o(r)&&(e.current=YO(t.current)??r)})}function JO(t,e){return!t||!e?t:Fa(t)&&Fa(e)?t.set({hour:e.hour,minute:e.minute,millisecond:e.millisecond,second:e.second}):t}const QO=_a({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function XO(t){const e=new Date().getFullYear(),r=Math.max(t.placeholderYear,e);let n,i;if(t.minValue)n=t.minValue.year;else{const o=r-100;n=t.placeholderYear<o?t.placeholderYear-10:o}t.maxValue?i=t.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}const fr=new sn("Calendar.Root | RangeCalender.Root");class La{static create(e){return fr.set(new La(e))}opts;#e=E(()=>this.months.map(e=>e.value));get visibleMonths(){return h(this.#e)}set visibleMonths(e){C(this.#e,e)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=re(Fe([]));get months(){return h(this.#t)}set months(e){C(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=rt(this.opts.ref),this.domContext=new Ui(e.ref),this.announcer=Ma(null),this.formatter=zm({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),Yr(()=>{this.announcer=Ma(this.domContext.getDocument())}),this.months=uo({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),BO({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),VO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),st(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),st(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),GO({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#r=E(()=>ZO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(e){C(this.#r,e)}#n=E(()=>qe(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(e){C(this.#n,e)}#i=E(()=>XO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(e){C(this.#i,e)}#s(){ge(()=>{if(qe(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#a(){ge(()=>this.opts.ref.current?jO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#o(){Cl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){zO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){LO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#l=E(()=>UO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(e){C(this.#l,e)}#u=E(()=>qO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#u)}set isPrevButtonDisabled(e){C(this.#u,e)}#d=E(()=>{const e=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(const i of e)if(r(i)||n(i))return!0}else{if(!e)return!1;if(r(e)||n(e))return!0}return!1});get isInvalid(){return h(this.#d)}set isInvalid(e){C(this.#d,e)}#c=E(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,WO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#c)}set headingValue(e){C(this.#c,e)}#f=E(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#f)}set fullCalendarLabel(e){C(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(r=>ru(e,r))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&ui(e,r)||n&&ui(n,e))}isDateSelected(e){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Dn(n,e)):r?Dn(r,e):!1}shiftFocus(e,r){return NO({node:e,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#h(e){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=e.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(e,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const s=this.handleSingleUpdate(n,r);s?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(s,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=JO(s,n),s!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,r){if(!e){const s=[r];return this.#h(s)?s:[r]}if(!Array.isArray(e))return;const n=e.findIndex(s=>Dn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...e,r];return this.#h(s)?s:[r]}else{if(i)return e;{const s=e.filter(o=>!Dn(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(e,r){if(!e)return r;if(!this.opts.preventDeselect.current&&Dn(e,r)){this.opts.placeholder.current=r;return}return r}onkeydown(e){RO({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#p=E(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#p)}set snippetProps(e){C(this.#p,e)}getBitsAttr=e=>QO.getAttr(e);#m=E(()=>({...KO({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#m)}set props(e){C(this.#m,e)}}class uc{static create(e){return new uc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"aria-hidden":Lu(!0),"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}const Bm=new sn("Calendar.Cell | RangeCalendar.Cell");class cc{static create(e){return Bm.set(new cc(e,fr.get()))}opts;root;#e=E(()=>Pt(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(e){C(this.#e,e)}#t=E(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(e){C(this.#t,e)}#r=E(()=>s_(this.opts.date.current,Vt()));get isDateToday(){return h(this.#r)}set isDateToday(e){C(this.#r,e)}#n=E(()=>!ru(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(e){C(this.#n,e)}#i=E(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(e){C(this.#i,e)}#s=E(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(e){C(this.#s,e)}#a=E(()=>Dn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(e){C(this.#a,e)}#o=E(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(e){C(this.#o,e)}#l=E(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(e){C(this.#l,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#u=E(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#u)}set snippetProps(e){C(this.#u,e)}#d=E(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#d)}set ariaDisabled(e){C(this.#d,e)}#c=E(()=>({"data-unavailable":ze(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":ze(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":oO(this.opts.date.current),"data-disabled":ze(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#c)}set sharedDataAttrs(e){C(this.#c,e)}#f=E(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":cr(this.isSelectedDate),"aria-disabled":cr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#f)}set props(e){C(this.#f,e)}}class dc{static create(e){return new dc(e,Bm.get())}opts;cell;attachment;constructor(e,r){this.opts=e,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}#e=E(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=E(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return h(this.#t)}set snippetProps(e){C(this.#t,e)}#r=E(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":cr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:h(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#r)}set props(e){C(this.#r,e)}}class fc{static create(e){return new fc(e,fr.get())}opts;root;#e=E(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){C(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=E(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":cr(this.isDisabled),"data-disabled":ze(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){C(this.#t,e)}}class hc{static create(e){return new hc(e,fr.get())}opts;root;#e=E(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){C(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=E(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":cr(this.isDisabled),"data-disabled":ze(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){C(this.#t,e)}}class pc{static create(e){return new pc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":cr(this.root.opts.readonly.current),"aria-disabled":cr(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),"data-disabled":ze(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class mc{static create(e){return new mc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class gc{static create(e){return new gc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class vc{static create(e){return new vc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class yc{static create(e){return new yc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class bc{static create(e){return new bc(e,fr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref)}#e=E(()=>({id:this.opts.id.current,"data-disabled":ze(this.root.opts.disabled.current),"data-readonly":ze(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}var eC=U("<div><!></div>");function Um(t,e){ne(e,!0);let r=y(e,"child",7),n=y(e,"children",7),i=y(e,"id",23,Rn),s=y(e,"ref",15,null),o=y(e,"value",15),a=y(e,"onValueChange",7,ke),l=y(e,"placeholder",15),u=y(e,"onPlaceholderChange",7,ke),c=y(e,"weekdayFormat",7,"narrow"),d=y(e,"weekStartsOn",7),f=y(e,"pagedNavigation",7,!1),p=y(e,"isDateDisabled",7,()=>!1),b=y(e,"isDateUnavailable",7,()=>!1),m=y(e,"fixedWeeks",7,!1),g=y(e,"numberOfMonths",7,1),_=y(e,"locale",7),k=y(e,"calendarLabel",7,"Event"),P=y(e,"disabled",7,!1),O=y(e,"readonly",7,!1),$=y(e,"minValue",7,void 0),A=y(e,"maxValue",7,void 0),D=y(e,"preventDeselect",7,!1),N=y(e,"type",7),M=y(e,"disableDaysOutsideMonth",7,!0),V=y(e,"initialFocus",7,!1),ee=y(e,"maxDays",7),z=y(e,"monthFormat",7,"long"),oe=y(e,"yearFormat",7,"numeric"),Q=We(e,["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const K=Cm({defaultValue:o(),minValue:$(),maxValue:A()});function Y(){l()===void 0&&l(K)}Y(),st.pre(()=>l(),()=>{Y()});function ce(){o()===void 0&&o(N()==="single"?void 0:[])}ce(),st.pre(()=>o(),()=>{ce()});const q=La.create({id:F(()=>i()),ref:F(()=>s(),B=>s(B)),weekdayFormat:F(()=>c()),weekStartsOn:F(()=>d()),pagedNavigation:F(()=>f()),isDateDisabled:F(()=>p()),isDateUnavailable:F(()=>b()),fixedWeeks:F(()=>m()),numberOfMonths:F(()=>g()),locale:am(()=>_()),calendarLabel:F(()=>k()),readonly:F(()=>O()),disabled:F(()=>P()),minValue:F(()=>$()),maxValue:F(()=>A()),disableDaysOutsideMonth:F(()=>M()),initialFocus:F(()=>V()),maxDays:F(()=>ee()),placeholder:F(()=>l(),B=>{l(B),u()(B)}),preventDeselect:F(()=>D()),value:F(()=>o(),B=>{o(B),a()(B)}),type:F(()=>N()),monthFormat:F(()=>z()),yearFormat:F(()=>oe()),defaultPlaceholder:K}),j=E(()=>He(Q,q.props));var H={get child(){return r()},set child(B){r(B),v()},get children(){return n()},set children(B){n(B),v()},get id(){return i()},set id(B=Rn()){i(B),v()},get ref(){return s()},set ref(B=null){s(B),v()},get value(){return o()},set value(B){o(B),v()},get onValueChange(){return a()},set onValueChange(B=ke){a(B),v()},get placeholder(){return l()},set placeholder(B){l(B),v()},get onPlaceholderChange(){return u()},set onPlaceholderChange(B=ke){u(B),v()},get weekdayFormat(){return c()},set weekdayFormat(B="narrow"){c(B),v()},get weekStartsOn(){return d()},set weekStartsOn(B){d(B),v()},get pagedNavigation(){return f()},set pagedNavigation(B=!1){f(B),v()},get isDateDisabled(){return p()},set isDateDisabled(B=()=>!1){p(B),v()},get isDateUnavailable(){return b()},set isDateUnavailable(B=()=>!1){b(B),v()},get fixedWeeks(){return m()},set fixedWeeks(B=!1){m(B),v()},get numberOfMonths(){return g()},set numberOfMonths(B=1){g(B),v()},get locale(){return _()},set locale(B){_(B),v()},get calendarLabel(){return k()},set calendarLabel(B="Event"){k(B),v()},get disabled(){return P()},set disabled(B=!1){P(B),v()},get readonly(){return O()},set readonly(B=!1){O(B),v()},get minValue(){return $()},set minValue(B=void 0){$(B),v()},get maxValue(){return A()},set maxValue(B=void 0){A(B),v()},get preventDeselect(){return D()},set preventDeselect(B=!1){D(B),v()},get type(){return N()},set type(B){N(B),v()},get disableDaysOutsideMonth(){return M()},set disableDaysOutsideMonth(B=!0){M(B),v()},get initialFocus(){return V()},set initialFocus(B=!1){V(B),v()},get maxDays(){return ee()},set maxDays(B){ee(B),v()},get monthFormat(){return z()},set monthFormat(B="long"){z(B),v()},get yearFormat(){return oe()},set yearFormat(B="numeric"){oe(B),v()}},le=W(),fe=R(le);{var L=B=>{var Z=W(),ve=R(Z);{let S=E(()=>({props:h(j),...q.snippetProps}));ye(ve,r,()=>h(S))}w(B,Z)},pe=B=>{var Z=eC();Ve(Z,()=>({...h(j)}));var ve=I(Z);ye(ve,()=>n()??Ne,()=>q.snippetProps),T(Z),w(B,Z)};ae(fe,B=>{r()?B(L):B(pe,!1)})}return w(t,le),ie(H)}se(Um,{child:{},children:{},id:{},ref:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},weekdayFormat:{},weekStartsOn:{},pagedNavigation:{},isDateDisabled:{},isDateUnavailable:{},fixedWeeks:{},numberOfMonths:{},locale:{},calendarLabel:{},disabled:{},readonly:{},minValue:{},maxValue:{},preventDeselect:{},type:{},disableDaysOutsideMonth:{},initialFocus:{},maxDays:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var tC=U("<div><!></div>");function _c(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=dc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);{let k=E(()=>({props:h(u),...l.snippetProps}));ye(_,i,()=>h(k))}w(m,g)},b=m=>{var g=tC();Ve(g,()=>({...h(u)}));var _=I(g);{var k=O=>{var $=W(),A=R($);ye(A,()=>n()??Ne,()=>l.snippetProps),w(O,$)},P=O=>{var $=It();ue(()=>te($,l.cell.opts.date.current.day)),w(O,$)};ae(_,O=>{n()?O(k):O(P,!1)})}T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(_c,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var rC=U("<table><!></table>");function wc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=pc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=rC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(wc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var nC=U("<tbody><!></tbody>");function kc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=mc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=nC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(kc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var iC=U("<td><!></td>");function Sc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=y(e,"date",7),l=y(e,"month",7),u=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]);const c=cc.create({id:F(()=>o()),ref:F(()=>s(),_=>s(_)),date:F(()=>a()),month:F(()=>l())}),d=E(()=>He(u,c.props));var f={get children(){return n()},set children(_){n(_),v()},get child(){return i()},set child(_){i(_),v()},get ref(){return s()},set ref(_=null){s(_),v()},get id(){return o()},set id(_=Ie(r)){o(_),v()},get date(){return a()},set date(_){a(_),v()},get month(){return l()},set month(_){l(_),v()}},p=W(),b=R(p);{var m=_=>{var k=W(),P=R(k);{let O=E(()=>({props:h(d),...c.snippetProps}));ye(P,i,()=>h(O))}w(_,k)},g=_=>{var k=iC();Ve(k,()=>({...h(d)}));var P=I(k);ye(P,()=>n()??Ne,()=>c.snippetProps),T(k),w(_,k)};ae(b,_=>{i()?_(m):_(g,!1)})}return w(t,p),ie(f)}se(Sc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var sC=U("<thead><!></thead>");function xc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=gc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=sC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(xc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oC=U("<th><!></th>");function Ec(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=yc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=oC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(Ec,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var aC=U("<tr><!></tr>");function co(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=vc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=aC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(co,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var lC=U("<header><!></header>");function Oc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=bc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u)})),w(m,g)},b=m=>{var g=lC();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>n()??Ne),T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(Oc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var uC=U("<div><!></div>");function Cc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=uc.create({id:F(()=>o()),ref:F(()=>s(),m=>s(m))}),u=E(()=>He(a,l.props));var c={get children(){return n()},set children(m){n(m),v()},get child(){return i()},set child(m){i(m),v()},get ref(){return s()},set ref(m=null){s(m),v()},get id(){return o()},set id(m=Ie(r)){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,i,()=>({props:h(u),headingValue:l.root.headingValue})),w(m,g)},b=m=>{var g=uC();Ve(g,()=>({...h(u)}));var _=I(g);{var k=O=>{var $=W(),A=R($);ye(A,()=>n()??Ne,()=>({headingValue:l.root.headingValue})),w(O,$)},P=O=>{var $=It();ue(()=>te($,l.root.headingValue)),w(O,$)};ae(_,O=>{n()?O(k):O(P,!1)})}T(g),w(m,g)};ae(f,m=>{i()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(Cc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var cC=U("<button><!></button>");function Tc(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"id",23,()=>Ie(r)),o=y(e,"ref",15,null),a=y(e,"tabindex",7,0),l=We(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const u=fc.create({id:F(()=>s()),ref:F(()=>o(),g=>o(g))}),c=E(()=>He(l,u.props,{tabindex:a()}));var d={get children(){return n()},set children(g){n(g),v()},get child(){return i()},set child(g){i(g),v()},get id(){return s()},set id(g=Ie(r)){s(g),v()},get ref(){return o()},set ref(g=null){o(g),v()},get tabindex(){return a()},set tabindex(g=0){a(g),v()}},f=W(),p=R(f);{var b=g=>{var _=W(),k=R(_);ye(k,i,()=>({props:h(c)})),w(g,_)},m=g=>{var _=cC();Ve(_,()=>({...h(c)}));var k=I(_);ye(k,()=>n()??Ne),T(_),w(g,_)};ae(p,g=>{i()?g(b):g(m,!1)})}return w(t,f),ie(d)}se(Tc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var dC=U("<button><!></button>");function Ac(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"id",23,()=>Ie(r)),o=y(e,"ref",15,null),a=y(e,"tabindex",7,0),l=We(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const u=hc.create({id:F(()=>s()),ref:F(()=>o(),g=>o(g))}),c=E(()=>He(l,u.props,{tabindex:a()}));var d={get children(){return n()},set children(g){n(g),v()},get child(){return i()},set child(g){i(g),v()},get id(){return s()},set id(g=Ie(r)){s(g),v()},get ref(){return o()},set ref(g=null){o(g),v()},get tabindex(){return a()},set tabindex(g=0){a(g),v()}},f=W(),p=R(f);{var b=g=>{var _=W(),k=R(_);ye(k,i,()=>({props:h(c)})),w(g,_)},m=g=>{var _=dC();Ve(_,()=>({...h(c)}));var k=I(_);ye(k,()=>n()??Ne),T(_),w(g,_)};ae(p,g=>{i()?g(b):g(m,!1)})}return w(t,f),ie(d)}se(Ac,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var fC=U("<input/>"),hC=U("<input/>");function qm(t,e){ne(e,!0);let r=y(e,"value",15),n=We(e,["$$slots","$$events","$$legacy","$$host","value"]);const i=E(()=>He(n,{"aria-hidden":"true",tabindex:-1,style:Yp}));var s={get value(){return r()},set value(c){r(c),v()}},o=W(),a=R(o);{var l=c=>{var d=fC();Ve(d,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),w(c,d)},u=c=>{var d=hC();Ve(d,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),jl(d,r),w(c,d)};ae(a,c=>{h(i).type==="checkbox"?c(l):c(u,!1)})}return w(t,o),ie(s)}se(qm,{value:{}},[],[],{mode:"open"});const pC=["top","right","bottom","left"],zn=Math.min,Ut=Math.max,Za=Math.round,Va=Math.floor,Fr=t=>({x:t,y:t}),mC={left:"right",right:"left",bottom:"top",top:"bottom"},gC={start:"end",end:"start"};function Dc(t,e,r){return Ut(t,zn(e,r))}function an(t,e){return typeof t=="function"?t(e):t}function ln(t){return t.split("-")[0]}function qi(t){return t.split("-")[1]}function Ic(t){return t==="x"?"y":"x"}function Pc(t){return t==="y"?"height":"width"}const vC=new Set(["top","bottom"]);function Nr(t){return vC.has(ln(t))?"y":"x"}function $c(t){return Ic(Nr(t))}function yC(t,e,r){r===void 0&&(r=!1);const n=qi(t),i=$c(t),s=Pc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ja(o)),[o,ja(o)]}function bC(t){const e=ja(t);return[Mc(t),e,Mc(e)]}function Mc(t){return t.replace(/start|end/g,e=>gC[e])}const Wm=["left","right"],Km=["right","left"],_C=["top","bottom"],wC=["bottom","top"];function kC(t,e,r){switch(t){case"top":case"bottom":return r?e?Km:Wm:e?Wm:Km;case"left":case"right":return e?_C:wC;default:return[]}}function SC(t,e,r,n){const i=qi(t);let s=kC(ln(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Mc)))),s}function ja(t){return t.replace(/left|right|bottom|top/g,e=>mC[e])}function xC(t){return{top:0,right:0,bottom:0,left:0,...t}}function Hm(t){return typeof t!="number"?xC(t):{top:t,right:t,bottom:t,left:t}}function Ba(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Ym(t,e,r){let{reference:n,floating:i}=t;const s=Nr(e),o=$c(e),a=Pc(o),l=ln(e),u=s==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(qi(e)){case"start":p[o]-=f*(r&&u?-1:1);break;case"end":p[o]+=f*(r&&u?-1:1);break}return p}async function EC(t,e){var r;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=an(e,t),b=Hm(p),g=a[f?d==="floating"?"reference":"floating":d],_=Ba(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),k=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),O=await(s.isElement==null?void 0:s.isElement(P))?await(s.getScale==null?void 0:s.getScale(P))||{x:1,y:1}:{x:1,y:1},$=Ba(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:P,strategy:l}):k);return{top:(_.top-$.top+b.top)/O.y,bottom:($.bottom-_.bottom+b.bottom)/O.y,left:(_.left-$.left+b.left)/O.x,right:($.right-_.right+b.right)/O.x}}const OC=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Ym(u,n,l),f=n,p={},b=0;for(let g=0;g<a.length;g++){var m;const{name:_,fn:k}=a[g],{x:P,y:O,data:$,reset:A}=await k({x:c,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:u,platform:{...o,detectOverflow:(m=o.detectOverflow)!=null?m:EC},elements:{reference:t,floating:e}});c=P??c,d=O??d,p={...p,[_]:{...p[_],...$}},A&&b<=50&&(b++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(u=A.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:c,y:d}=Ym(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}},CC=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=an(t,e)||{};if(u==null)return{};const d=Hm(c),f={x:r,y:n},p=$c(i),b=Pc(p),m=await o.getDimensions(u),g=p==="y",_=g?"top":"left",k=g?"bottom":"right",P=g?"clientHeight":"clientWidth",O=s.reference[b]+s.reference[p]-f[p]-s.floating[b],$=f[p]-s.reference[p],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let D=A?A[P]:0;(!D||!await(o.isElement==null?void 0:o.isElement(A)))&&(D=a.floating[P]||s.floating[b]);const N=O/2-$/2,M=D/2-m[b]/2-1,V=zn(d[_],M),ee=zn(d[k],M),z=V,oe=D-m[b]-ee,Q=D/2-m[b]/2+N,K=Dc(z,Q,oe),Y=!l.arrow&&qi(i)!=null&&Q!==K&&s.reference[b]/2-(Q<z?V:ee)-m[b]/2<0,ce=Y?Q<z?Q-z:Q-oe:0;return{[p]:f[p]+ce,data:{[p]:K,centerOffset:Q-K-ce,...Y&&{alignmentOffset:ce}},reset:Y}}}),TC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=an(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),k=Nr(a),P=ln(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(u.floating)),$=f||(P||!m?[ja(a)]:bC(a)),A=b!=="none";!f&&A&&$.push(...SC(a,m,b,O));const D=[a,...$],N=await l.detectOverflow(e,g),M=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&M.push(N[_]),d){const Q=yC(i,o,O);M.push(N[Q[0]],N[Q[1]])}if(V=[...V,{placement:i,overflows:M}],!M.every(Q=>Q<=0)){var ee,z;const Q=(((ee=s.flip)==null?void 0:ee.index)||0)+1,K=D[Q];if(K&&(!(d==="alignment"?k!==Nr(K):!1)||V.every(q=>Nr(q.placement)===k?q.overflows[0]>0:!0)))return{data:{index:Q,overflows:V},reset:{placement:K}};let Y=(z=V.filter(ce=>ce.overflows[0]<=0).sort((ce,q)=>ce.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!Y)switch(p){case"bestFit":{var oe;const ce=(oe=V.filter(q=>{if(A){const j=Nr(q.placement);return j===k||j==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((q,j)=>q[1]-j[1])[0])==null?void 0:oe[0];ce&&(Y=ce);break}case"initialPlacement":Y=a;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function Gm(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Jm(t){return pC.some(e=>t[e]>=0)}const AC=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:i="referenceHidden",...s}=an(t,e);switch(i){case"referenceHidden":{const o=await n.detectOverflow(e,{...s,elementContext:"reference"}),a=Gm(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Jm(a)}}}case"escaped":{const o=await n.detectOverflow(e,{...s,altBoundary:!0}),a=Gm(o,r.floating);return{data:{escapedOffsets:a,escaped:Jm(a)}}}default:return{}}}}},Qm=new Set(["left","top"]);async function DC(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ln(r),a=qi(r),l=Nr(r)==="y",u=Qm.has(o)?-1:1,c=s&&l?-1:1,d=an(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const IC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await DC(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},PC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x:k,y:P}=_;return{x:k,y:P}}},...u}=an(t,e),c={x:r,y:n},d=await s.detectOverflow(e,u),f=Nr(ln(i)),p=Ic(f);let b=c[p],m=c[f];if(o){const _=p==="y"?"top":"left",k=p==="y"?"bottom":"right",P=b+d[_],O=b-d[k];b=Dc(P,b,O)}if(a){const _=f==="y"?"top":"left",k=f==="y"?"bottom":"right",P=m+d[_],O=m-d[k];m=Dc(P,m,O)}const g=l.fn({...e,[p]:b,[f]:m});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:o,[f]:a}}}}}},$C=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=an(t,e),c={x:r,y:n},d=Nr(i),f=Ic(d);let p=c[f],b=c[d];const m=an(a,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const P=f==="y"?"height":"width",O=s.reference[f]-s.floating[P]+g.mainAxis,$=s.reference[f]+s.reference[P]-g.mainAxis;p<O?p=O:p>$&&(p=$)}if(u){var _,k;const P=f==="y"?"width":"height",O=Qm.has(ln(i)),$=s.reference[d]-s.floating[P]+(O&&((_=o.offset)==null?void 0:_[d])||0)+(O?0:g.crossAxis),A=s.reference[d]+s.reference[P]+(O?0:((k=o.offset)==null?void 0:k[d])||0)-(O?g.crossAxis:0);b<$?b=$:b>A&&(b=A)}return{[f]:p,[d]:b}}}},MC=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...u}=an(t,e),c=await o.detectOverflow(e,u),d=ln(i),f=qi(i),p=Nr(i)==="y",{width:b,height:m}=s.floating;let g,_;d==="top"||d==="bottom"?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=d,g=f==="end"?"top":"bottom");const k=m-c.top-c.bottom,P=b-c.left-c.right,O=zn(m-c[g],k),$=zn(b-c[_],P),A=!e.middlewareData.shift;let D=O,N=$;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(N=P),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(D=k),A&&!f){const V=Ut(c.left,0),ee=Ut(c.right,0),z=Ut(c.top,0),oe=Ut(c.bottom,0);p?N=b-2*(V!==0||ee!==0?V+ee:Ut(c.left,c.right)):D=m-2*(z!==0||oe!==0?z+oe:Ut(c.top,c.bottom))}await l({...e,availableWidth:N,availableHeight:D});const M=await o.getDimensions(a.floating);return b!==M.width||m!==M.height?{reset:{rects:!0}}:{}}}};function Ua(){return typeof window<"u"}function Wi(t){return Xm(t)?(t.nodeName||"").toLowerCase():"#document"}function qt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rr(t){var e;return(e=(Xm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xm(t){return Ua()?t instanceof Node||t instanceof qt(t).Node:!1}function hr(t){return Ua()?t instanceof Element||t instanceof qt(t).Element:!1}function zr(t){return Ua()?t instanceof HTMLElement||t instanceof qt(t).HTMLElement:!1}function eg(t){return!Ua()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qt(t).ShadowRoot}const FC=new Set(["inline","contents"]);function fo(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=pr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!FC.has(i)}const NC=new Set(["table","td","th"]);function RC(t){return NC.has(Wi(t))}const zC=[":popover-open",":modal"];function qa(t){return zC.some(e=>{try{return t.matches(e)}catch{return!1}})}const LC=["transform","translate","scale","rotate","perspective"],ZC=["transform","translate","scale","rotate","perspective","filter"],VC=["paint","layout","strict","content"];function Fc(t){const e=Nc(),r=hr(t)?pr(t):t;return LC.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||ZC.some(n=>(r.willChange||"").includes(n))||VC.some(n=>(r.contain||"").includes(n))}function jC(t){let e=Ln(t);for(;zr(e)&&!Ki(e);){if(Fc(e))return e;if(qa(e))return null;e=Ln(e)}return null}function Nc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const BC=new Set(["html","body","#document"]);function Ki(t){return BC.has(Wi(t))}function pr(t){return qt(t).getComputedStyle(t)}function Wa(t){return hr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(Wi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||eg(t)&&t.host||Rr(t);return eg(e)?e.host:e}function tg(t){const e=Ln(t);return Ki(e)?t.ownerDocument?t.ownerDocument.body:t.body:zr(e)&&fo(e)?e:tg(e)}function ho(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=tg(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=qt(i);if(s){const a=Rc(o);return e.concat(o,o.visualViewport||[],fo(i)?i:[],a&&r?ho(a):[])}return e.concat(i,ho(i,[],r))}function Rc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rg(t){const e=pr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=zr(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Za(r)!==s||Za(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function zc(t){return hr(t)?t:t.contextElement}function Hi(t){const e=zc(t);if(!zr(e))return Fr(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=rg(e);let o=(s?Za(r.width):r.width)/n,a=(s?Za(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const UC=Fr(0);function ng(t){const e=qt(t);return!Nc()||!e.visualViewport?UC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qC(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==qt(t)?!1:e}function ci(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=zc(t);let o=Fr(1);e&&(n?hr(n)&&(o=Hi(n)):o=Hi(t));const a=qC(s,r,n)?ng(s):Fr(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=qt(s),p=n&&hr(n)?qt(n):n;let b=f,m=Rc(b);for(;m&&n&&p!==b;){const g=Hi(m),_=m.getBoundingClientRect(),k=pr(m),P=_.left+(m.clientLeft+parseFloat(k.paddingLeft))*g.x,O=_.top+(m.clientTop+parseFloat(k.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,d*=g.y,l+=P,u+=O,b=qt(m),m=Rc(b)}}return Ba({width:c,height:d,x:l,y:u})}function Ka(t,e){const r=Wa(t).scrollLeft;return e?e.left+r:ci(Rr(t)).left+r}function ig(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Ka(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function WC(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=Rr(n),a=e?qa(e.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=Fr(1);const c=Fr(0),d=zr(n);if((d||!d&&!s)&&((Wi(n)!=="body"||fo(o))&&(l=Wa(n)),zr(n))){const p=ci(n);u=Hi(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const f=o&&!d&&!s?ig(o,l):Fr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function KC(t){return Array.from(t.getClientRects())}function HC(t){const e=Rr(t),r=Wa(t),n=t.ownerDocument.body,i=Ut(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Ut(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Ka(t);const a=-r.scrollTop;return pr(n).direction==="rtl"&&(o+=Ut(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}const sg=25;function YC(t,e){const r=qt(t),n=Rr(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=Nc();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Ka(n);if(u<=0){const c=n.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(n.clientWidth-d.clientWidth-p);b<=sg&&(s-=b)}else u<=sg&&(s+=u);return{width:s,height:o,x:a,y:l}}const GC=new Set(["absolute","fixed"]);function JC(t,e){const r=ci(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=zr(t)?Hi(t):Fr(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,u=n*s.y;return{width:o,height:a,x:l,y:u}}function og(t,e,r){let n;if(e==="viewport")n=YC(t,r);else if(e==="document")n=HC(Rr(t));else if(hr(e))n=JC(e,r);else{const i=ng(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ba(n)}function ag(t,e){const r=Ln(t);return r===e||!hr(r)||Ki(r)?!1:pr(r).position==="fixed"||ag(r,e)}function QC(t,e){const r=e.get(t);if(r)return r;let n=ho(t,[],!1).filter(a=>hr(a)&&Wi(a)!=="body"),i=null;const s=pr(t).position==="fixed";let o=s?Ln(t):t;for(;hr(o)&&!Ki(o);){const a=pr(o),l=Fc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&GC.has(i.position)||fo(o)&&!l&&ag(t,o))?n=n.filter(c=>c!==o):i=a,o=Ln(o)}return e.set(t,n),n}function XC(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?qa(e)?[]:QC(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=og(e,c,i);return u.top=Ut(d.top,u.top),u.right=zn(d.right,u.right),u.bottom=zn(d.bottom,u.bottom),u.left=Ut(d.left,u.left),u},og(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eT(t){const{width:e,height:r}=rg(t);return{width:e,height:r}}function tT(t,e,r){const n=zr(e),i=Rr(e),s=r==="fixed",o=ci(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Fr(0);function u(){l.x=Ka(i)}if(n||!n&&!s)if((Wi(e)!=="body"||fo(i))&&(a=Wa(e)),n){const p=ci(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&u();s&&!n&&i&&u();const c=i&&!n&&!s?ig(i,a):Fr(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function Lc(t){return pr(t).position==="static"}function lg(t,e){if(!zr(t)||pr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Rr(t)===r&&(r=r.ownerDocument.body),r}function ug(t,e){const r=qt(t);if(qa(t))return r;if(!zr(t)){let i=Ln(t);for(;i&&!Ki(i);){if(hr(i)&&!Lc(i))return i;i=Ln(i)}return r}let n=lg(t,e);for(;n&&RC(n)&&Lc(n);)n=lg(n,e);return n&&Ki(n)&&Lc(n)&&!Fc(n)?r:n||jC(t)||r}const rT=async function(t){const e=this.getOffsetParent||ug,r=this.getDimensions,n=await r(t.floating);return{reference:tT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nT(t){return pr(t).direction==="rtl"}const iT={convertOffsetParentRelativeRectToViewportRelativeRect:WC,getDocumentElement:Rr,getClippingRect:XC,getOffsetParent:ug,getElementRects:rT,getClientRects:KC,getDimensions:eT,getScale:Hi,isElement:hr,isRTL:nT};function cg(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function sT(t,e){let r=null,n;const i=Rr(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=t.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(a||e(),!f||!p)return;const b=Va(d),m=Va(i.clientWidth-(c+f)),g=Va(i.clientHeight-(d+p)),_=Va(c),P={rootMargin:-b+"px "+-m+"px "+-g+"px "+-_+"px",threshold:Ut(0,zn(1,l))||1};let O=!0;function $(A){const D=A[0].intersectionRatio;if(D!==l){if(!O)return o();D?o(!1,D):n=setTimeout(()=>{o(!1,1e-7)},1e3)}D===1&&!cg(u,t.getBoundingClientRect())&&o(),O=!1}try{r=new IntersectionObserver($,{...P,root:i.ownerDocument})}catch{r=new IntersectionObserver($,P)}r.observe(t)}return o(!0),s}function oT(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=zc(t),c=i||s?[...u?ho(u):[],...ho(e)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const d=u&&a?sT(u,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(_=>{let[k]=_;k&&k.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var P;(P=p)==null||P.observe(e)})),r()}),u&&!l&&p.observe(u),p.observe(e));let b,m=l?ci(t):null;l&&g();function g(){const _=ci(t);m&&!cg(m,_)&&r(),m=_,b=requestAnimationFrame(g)}return r(),()=>{var _;c.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),d?.(),(_=p)==null||_.disconnect(),p=null,l&&cancelAnimationFrame(b)}}const aT=IC,lT=PC,uT=TC,cT=MC,dT=AC,fT=CC,hT=$C,pT=(t,e,r)=>{const n=new Map,i={platform:iT,...r},s={...i.platform,_c:n};return OC(t,e,{...i,platform:s})};function di(t){return typeof t=="function"?t():t}function dg(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function fg(t,e){const r=dg(t);return Math.round(e*r)/r}function hg(t){return{[`--bits-${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${t}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${t}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${t}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function mT(t){const e=t.whileElementsMounted,r=E(()=>di(t.open)??!0),n=E(()=>di(t.middleware)),i=E(()=>di(t.transform)??!0),s=E(()=>di(t.placement)??"bottom"),o=E(()=>di(t.strategy)??"absolute"),a=E(()=>di(t.sideOffset)??0),l=E(()=>di(t.alignOffset)??0),u=t.reference;let c=re(0),d=re(0);const f=ur(null);let p=re(Fe(h(o))),b=re(Fe(h(s))),m=re(Fe({})),g=re(!1);const _=E(()=>{const D=f.current?fg(f.current,h(c)):h(c),N=f.current?fg(f.current,h(d)):h(d);return h(i)?{position:h(p),left:"0",top:"0",transform:`translate(${D}px, ${N}px)`,...f.current&&dg(f.current)>=1.5&&{willChange:"transform"}}:{position:h(p),left:`${D}px`,top:`${N}px`}});let k;function P(){u.current===null||f.current===null||pT(u.current,f.current,{middleware:h(n),placement:h(s),strategy:h(o)}).then(D=>{if(!h(r)&&h(c)!==0&&h(d)!==0){const N=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(D.x<=N&&D.y<=N)return}C(c,D.x,!0),C(d,D.y,!0),C(p,D.strategy,!0),C(b,D.placement,!0),C(m,D.middlewareData,!0),C(g,!0)})}function O(){typeof k=="function"&&(k(),k=void 0)}function $(){if(O(),e===void 0){P();return}u.current===null||f.current===null||(k=e(u.current,f.current,P))}function A(){h(r)||C(g,!1)}return ge(P),ge($),ge(A),ge(()=>O),{floating:f,reference:u,get strategy(){return h(p)},get placement(){return h(b)},get middlewareData(){return h(m)},get isPositioned(){return h(g)},get floatingStyles(){return h(_)},get update(){return P}}}const gT={top:"bottom",right:"left",bottom:"top",left:"right"},Zc=new sn("Floating.Root"),pg=new sn("Floating.Content"),Vc=new sn("Floating.Root");class Ha{static create(e=!1){return e?Vc.set(new Ha):Zc.set(new Ha)}anchorNode=ur(null);customAnchorNode=ur(null);triggerNode=ur(null);constructor(){ge(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ya{static create(e,r=!1){return r?pg.set(new Ya(e,Vc.get())):pg.set(new Ya(e,Zc.get()))}opts;root;contentRef=ur(null);wrapperRef=ur(null);arrowRef=ur(null);contentAttachment=rt(this.contentRef);wrapperAttachment=rt(this.wrapperRef);arrowAttachment=rt(this.arrowRef);arrowId=ur(Rn());#e=E(()=>{if(typeof this.opts.style=="string")return Gs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new oE(()=>this.arrowRef.current??void 0);#n=E(()=>this.#r?.width??0);#i=E(()=>this.#r?.height??0);#s=E(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=E(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=E(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(e){C(this.#o,e)}#l=E(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(_E),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(e){C(this.#l,e)}#u=re(void 0);#d=re(void 0);#c=re(void 0);#f=re(void 0);#h=E(()=>[aT({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&lT({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?hT():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&uT({...this.detectOverflowOptions}),cT({...this.detectOverflowOptions,apply:({rects:e,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=e.reference;C(this.#u,r,!0),C(this.#d,n,!0),C(this.#c,i,!0),C(this.#f,s,!0)}}),this.arrowRef.current&&fT({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),vT({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&dT({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#h)}set middleware(e){C(this.#h,e)}floating;#p=E(()=>yT(this.floating.placement));get placedSide(){return h(this.#p)}set placedSide(e){C(this.#p,e)}#m=E(()=>bT(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(e){C(this.#m,e)}#g=E(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#g)}set arrowX(e){C(this.#g,e)}#v=E(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#v)}set arrowY(e){C(this.#v,e)}#y=E(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#y)}set cannotCenterArrow(e){C(this.#y,e)}#b=re();get contentZIndex(){return h(this.#b)}set contentZIndex(e){C(this.#b,e,!0)}#k=E(()=>gT[this.placedSide]);get arrowBaseSide(){return h(this.#k)}set arrowBaseSide(e){C(this.#k,e)}#_=E(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${h(this.#u)}px`,"--bits-floating-available-height":`${h(this.#d)}px`,"--bits-floating-anchor-width":`${h(this.#c)}px`,"--bits-floating-anchor-height":`${h(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...h(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return h(this.#_)}set wrapperProps(e){C(this.#_,e)}#w=E(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Qs({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#w)}set props(e){C(this.#w,e)}#S=E(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return h(this.#S)}set arrowStyle(e){C(this.#S,e)}constructor(e,r){this.opts=e,this.root=r,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),st(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=mT({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>oT(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ge(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),st(()=>this.contentRef.current,n=>{if(!n)return;const i=tm(n);this.contentZIndex=i.getComputedStyle(n).zIndex}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}}class Ga{static create(e,r=!1){return r?new Ga(e,Vc.get()):new Ga(e,Zc.get())}opts;root;constructor(e,r){this.opts=e,this.root=r,e.virtualEl&&e.virtualEl.current?r.triggerNode=T1(e.virtualEl.current):r.triggerNode=e.ref}}function vT(t){return{name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:i}=e,o=i.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=jc(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+l/2;let b="",m="";return u==="bottom"?(b=o?d:`${f}px`,m=`${-l}px`):u==="top"?(b=o?d:`${f}px`,m=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=o?d:`${p}px`):u==="left"&&(b=`${n.floating.width+l}px`,m=o?d:`${p}px`),{data:{x:b,y:m}}}}}function jc(t){const[e,r="center"]=t.split("-");return[e,r]}function yT(t){return jc(t)[0]}function bT(t){return jc(t)[1]}function mg(t,e){ne(e,!0);let r=y(e,"children",7),n=y(e,"tooltip",7,!1);Ha.create(n());var i={get children(){return r()},set children(a){r(a),v()},get tooltip(){return n()},set tooltip(a=!1){n(a),v()}},s=W(),o=R(s);return ye(o,()=>r()??Ne),w(t,s),ie(i)}se(mg,{children:{},tooltip:{}},[],[],{mode:"open"});function gg(t,e){ne(e,!0);let r=y(e,"id",7),n=y(e,"children",7),i=y(e,"virtualEl",7),s=y(e,"ref",7),o=y(e,"tooltip",7,!1);Ga.create({id:F(()=>r()),virtualEl:F(()=>i()),ref:s()},o());var a={get id(){return r()},set id(c){r(c),v()},get children(){return n()},set children(c){n(c),v()},get virtualEl(){return i()},set virtualEl(c){i(c),v()},get ref(){return s()},set ref(c){s(c),v()},get tooltip(){return o()},set tooltip(c=!1){o(c),v()}},l=W(),u=R(l);return ye(u,()=>n()??Ne),w(t,l),ie(a)}se(gg,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function vg(t,e){ne(e,!0);let r=y(e,"content",7),n=y(e,"side",7,"bottom"),i=y(e,"sideOffset",7,0),s=y(e,"align",7,"center"),o=y(e,"alignOffset",7,0),a=y(e,"id",7),l=y(e,"arrowPadding",7,0),u=y(e,"avoidCollisions",7,!0),c=y(e,"collisionBoundary",23,()=>[]),d=y(e,"collisionPadding",7,0),f=y(e,"hideWhenDetached",7,!1),p=y(e,"onPlaced",7,()=>{}),b=y(e,"sticky",7,"partial"),m=y(e,"updatePositionStrategy",7,"optimized"),g=y(e,"strategy",7,"fixed"),_=y(e,"dir",7,"ltr"),k=y(e,"style",23,()=>({})),P=y(e,"wrapperId",23,Rn),O=y(e,"customAnchor",7,null),$=y(e,"enabled",7),A=y(e,"tooltip",7,!1);const D=Ya.create({side:F(()=>n()),sideOffset:F(()=>i()),align:F(()=>s()),alignOffset:F(()=>o()),id:F(()=>a()),arrowPadding:F(()=>l()),avoidCollisions:F(()=>u()),collisionBoundary:F(()=>c()),collisionPadding:F(()=>d()),hideWhenDetached:F(()=>f()),onPlaced:F(()=>p()),sticky:F(()=>b()),updatePositionStrategy:F(()=>m()),strategy:F(()=>g()),dir:F(()=>_()),style:F(()=>k()),enabled:F(()=>$()),wrapperId:F(()=>P()),customAnchor:F(()=>O())},A()),N=E(()=>He(D.wrapperProps,{style:{pointerEvents:"auto"}}));var M={get content(){return r()},set content(z){r(z),v()},get side(){return n()},set side(z="bottom"){n(z),v()},get sideOffset(){return i()},set sideOffset(z=0){i(z),v()},get align(){return s()},set align(z="center"){s(z),v()},get alignOffset(){return o()},set alignOffset(z=0){o(z),v()},get id(){return a()},set id(z){a(z),v()},get arrowPadding(){return l()},set arrowPadding(z=0){l(z),v()},get avoidCollisions(){return u()},set avoidCollisions(z=!0){u(z),v()},get collisionBoundary(){return c()},set collisionBoundary(z=[]){c(z),v()},get collisionPadding(){return d()},set collisionPadding(z=0){d(z),v()},get hideWhenDetached(){return f()},set hideWhenDetached(z=!1){f(z),v()},get onPlaced(){return p()},set onPlaced(z=()=>{}){p(z),v()},get sticky(){return b()},set sticky(z="partial"){b(z),v()},get updatePositionStrategy(){return m()},set updatePositionStrategy(z="optimized"){m(z),v()},get strategy(){return g()},set strategy(z="fixed"){g(z),v()},get dir(){return _()},set dir(z="ltr"){_(z),v()},get style(){return k()},set style(z={}){k(z),v()},get wrapperId(){return P()},set wrapperId(z=Rn()){P(z),v()},get customAnchor(){return O()},set customAnchor(z=null){O(z),v()},get enabled(){return $()},set enabled(z){$(z),v()},get tooltip(){return A()},set tooltip(z=!1){A(z),v()}},V=W(),ee=R(V);return ye(ee,()=>r()??Ne,()=>({props:D.props,wrapperProps:h(N)})),w(t,V),ie(M)}se(vg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function yg(t,e){ne(e,!0);let r=y(e,"content",7),n=y(e,"onPlaced",7);Yr(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),v()},get onPlaced(){return n()},set onPlaced(a){n(a),v()}},s=W(),o=R(s);return ye(o,()=>r()??Ne,()=>({props:{},wrapperProps:{}})),w(t,s),ie(i)}se(yg,{content:{},onPlaced:{}},[],[],{mode:"open"});function bg(t,e){ne(e,!0);let r=y(e,"content",7),n=y(e,"isStatic",7,!1),i=y(e,"onPlaced",7),s=We(e,["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);var o={get content(){return r()},set content(d){r(d),v()},get isStatic(){return n()},set isStatic(d=!1){n(d),v()},get onPlaced(){return i()},set onPlaced(d){i(d),v()}},a=W(),l=R(a);{var u=d=>{yg(d,{get content(){return r()},get onPlaced(){return i()}})},c=d=>{vg(d,xn({get content(){return r()},get onPlaced(){return i()}},()=>s))};ae(l,d=>{n()?d(u):d(c,!1)})}return w(t,a),ie(o)}se(bg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var _T=U("<!> <!>",1);function Bc(t,e){ne(e,!0);let r=y(e,"popper",7),n=y(e,"onEscapeKeydown",7),i=y(e,"escapeKeydownBehavior",7),s=y(e,"preventOverflowTextSelection",7),o=y(e,"id",7),a=y(e,"onPointerDown",7),l=y(e,"onPointerUp",7),u=y(e,"side",7),c=y(e,"sideOffset",7),d=y(e,"align",7),f=y(e,"alignOffset",7),p=y(e,"arrowPadding",7),b=y(e,"avoidCollisions",7),m=y(e,"collisionBoundary",7),g=y(e,"collisionPadding",7),_=y(e,"sticky",7),k=y(e,"hideWhenDetached",7),P=y(e,"updatePositionStrategy",7),O=y(e,"strategy",7),$=y(e,"dir",7),A=y(e,"preventScroll",7),D=y(e,"wrapperId",7),N=y(e,"style",7),M=y(e,"onPlaced",7),V=y(e,"onInteractOutside",7),ee=y(e,"onCloseAutoFocus",7),z=y(e,"onOpenAutoFocus",7),oe=y(e,"onFocusOutside",7),Q=y(e,"interactOutsideBehavior",7,"close"),K=y(e,"loop",7),Y=y(e,"trapFocus",7,!0),ce=y(e,"isValidEvent",7,()=>!1),q=y(e,"customAnchor",7,null),j=y(e,"isStatic",7,!1),H=y(e,"enabled",7),le=y(e,"ref",7),fe=y(e,"tooltip",7,!1),L=y(e,"contentPointerEvents",7,"auto"),pe=We(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);var B={get popper(){return r()},set popper(Z){r(Z),v()},get onEscapeKeydown(){return n()},set onEscapeKeydown(Z){n(Z),v()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(Z){i(Z),v()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(Z){s(Z),v()},get id(){return o()},set id(Z){o(Z),v()},get onPointerDown(){return a()},set onPointerDown(Z){a(Z),v()},get onPointerUp(){return l()},set onPointerUp(Z){l(Z),v()},get side(){return u()},set side(Z){u(Z),v()},get sideOffset(){return c()},set sideOffset(Z){c(Z),v()},get align(){return d()},set align(Z){d(Z),v()},get alignOffset(){return f()},set alignOffset(Z){f(Z),v()},get arrowPadding(){return p()},set arrowPadding(Z){p(Z),v()},get avoidCollisions(){return b()},set avoidCollisions(Z){b(Z),v()},get collisionBoundary(){return m()},set collisionBoundary(Z){m(Z),v()},get collisionPadding(){return g()},set collisionPadding(Z){g(Z),v()},get sticky(){return _()},set sticky(Z){_(Z),v()},get hideWhenDetached(){return k()},set hideWhenDetached(Z){k(Z),v()},get updatePositionStrategy(){return P()},set updatePositionStrategy(Z){P(Z),v()},get strategy(){return O()},set strategy(Z){O(Z),v()},get dir(){return $()},set dir(Z){$(Z),v()},get preventScroll(){return A()},set preventScroll(Z){A(Z),v()},get wrapperId(){return D()},set wrapperId(Z){D(Z),v()},get style(){return N()},set style(Z){N(Z),v()},get onPlaced(){return M()},set onPlaced(Z){M(Z),v()},get onInteractOutside(){return V()},set onInteractOutside(Z){V(Z),v()},get onCloseAutoFocus(){return ee()},set onCloseAutoFocus(Z){ee(Z),v()},get onOpenAutoFocus(){return z()},set onOpenAutoFocus(Z){z(Z),v()},get onFocusOutside(){return oe()},set onFocusOutside(Z){oe(Z),v()},get interactOutsideBehavior(){return Q()},set interactOutsideBehavior(Z="close"){Q(Z),v()},get loop(){return K()},set loop(Z){K(Z),v()},get trapFocus(){return Y()},set trapFocus(Z=!0){Y(Z),v()},get isValidEvent(){return ce()},set isValidEvent(Z=()=>!1){ce(Z),v()},get customAnchor(){return q()},set customAnchor(Z=null){q(Z),v()},get isStatic(){return j()},set isStatic(Z=!1){j(Z),v()},get enabled(){return H()},set enabled(Z){H(Z),v()},get ref(){return le()},set ref(Z){le(Z),v()},get tooltip(){return fe()},set tooltip(Z=!1){fe(Z),v()},get contentPointerEvents(){return L()},set contentPointerEvents(Z="auto"){L(Z),v()}};return bg(t,{get isStatic(){return j()},get id(){return o()},get side(){return u()},get sideOffset(){return c()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return b()},get collisionBoundary(){return m()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return P()},get strategy(){return O()},get dir(){return $()},get wrapperId(){return D()},get style(){return N()},get onPlaced(){return M()},get customAnchor(){return q()},get enabled(){return H()},get tooltip(){return fe()},content:(ve,S)=>{let Ge=()=>S?.().props,Le=()=>S?.().wrapperProps;var je=_T(),it=R(je);{var Ue=Wt=>{Xu(Wt,{get preventScroll(){return A()}})},gr=Wt=>{var yr=W(),vi=R(yr);{var br=_r=>{Xu(_r,{get preventScroll(){return A()}})};ae(vi,_r=>{e.forceMount||_r(br)},!0)}w(Wt,yr)};ae(it,Wt=>{e.forceMount&&H()?Wt(Ue):Wt(gr,!1)})}var vr=G(it,2);km(vr,{get onOpenAutoFocus(){return z()},get onCloseAutoFocus(){return ee()},get loop(){return K()},get enabled(){return H()},get trapFocus(){return Y()},get forceMount(){return e.forceMount},get ref(){return le()},focusScope:(yr,vi)=>{let br=()=>vi?.().props;wm(yr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return H()},get ref(){return le()},children:(_r,ss)=>{_m(_r,{get id(){return o()},get onInteractOutside(){return V()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return Q()},get isValidEvent(){return ce()},get enabled(){return H()},get ref(){return le()},children:(pn,yi)=>{let Vn=()=>yi?.().props;xm(pn,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return H()},get ref(){return le()},children:(jn,gd)=>{var ol=W(),bi=R(ol);{let vd=E(()=>({props:He(pe,Ge(),Vn(),br(),{style:{pointerEvents:L()}}),wrapperProps:Le()}));ye(bi,()=>r()??Ne,()=>h(vd))}w(jn,ol)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),w(ve,je)},$$slots:{content:!0}}),ie(B)}se(Bc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});function _g(t,e){ne(e,!0);let r=y(e,"popper",7),n=y(e,"open",7),i=y(e,"onEscapeKeydown",7),s=y(e,"escapeKeydownBehavior",7),o=y(e,"preventOverflowTextSelection",7),a=y(e,"id",7),l=y(e,"onPointerDown",7),u=y(e,"onPointerUp",7),c=y(e,"side",7),d=y(e,"sideOffset",7),f=y(e,"align",7),p=y(e,"alignOffset",7),b=y(e,"arrowPadding",7),m=y(e,"avoidCollisions",7),g=y(e,"collisionBoundary",7),_=y(e,"collisionPadding",7),k=y(e,"sticky",7),P=y(e,"hideWhenDetached",7),O=y(e,"updatePositionStrategy",7),$=y(e,"strategy",7),A=y(e,"dir",7),D=y(e,"preventScroll",7),N=y(e,"wrapperId",7),M=y(e,"style",7),V=y(e,"onPlaced",7),ee=y(e,"onInteractOutside",7),z=y(e,"onCloseAutoFocus",7),oe=y(e,"onOpenAutoFocus",7),Q=y(e,"onFocusOutside",7),K=y(e,"interactOutsideBehavior",7,"close"),Y=y(e,"loop",7),ce=y(e,"trapFocus",7,!0),q=y(e,"isValidEvent",7,()=>!1),j=y(e,"customAnchor",7,null),H=y(e,"isStatic",7,!1),le=y(e,"ref",7),fe=y(e,"shouldRender",7),L=We(e,["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var pe={get popper(){return r()},set popper(S){r(S),v()},get open(){return n()},set open(S){n(S),v()},get onEscapeKeydown(){return i()},set onEscapeKeydown(S){i(S),v()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(S){s(S),v()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(S){o(S),v()},get id(){return a()},set id(S){a(S),v()},get onPointerDown(){return l()},set onPointerDown(S){l(S),v()},get onPointerUp(){return u()},set onPointerUp(S){u(S),v()},get side(){return c()},set side(S){c(S),v()},get sideOffset(){return d()},set sideOffset(S){d(S),v()},get align(){return f()},set align(S){f(S),v()},get alignOffset(){return p()},set alignOffset(S){p(S),v()},get arrowPadding(){return b()},set arrowPadding(S){b(S),v()},get avoidCollisions(){return m()},set avoidCollisions(S){m(S),v()},get collisionBoundary(){return g()},set collisionBoundary(S){g(S),v()},get collisionPadding(){return _()},set collisionPadding(S){_(S),v()},get sticky(){return k()},set sticky(S){k(S),v()},get hideWhenDetached(){return P()},set hideWhenDetached(S){P(S),v()},get updatePositionStrategy(){return O()},set updatePositionStrategy(S){O(S),v()},get strategy(){return $()},set strategy(S){$(S),v()},get dir(){return A()},set dir(S){A(S),v()},get preventScroll(){return D()},set preventScroll(S){D(S),v()},get wrapperId(){return N()},set wrapperId(S){N(S),v()},get style(){return M()},set style(S){M(S),v()},get onPlaced(){return V()},set onPlaced(S){V(S),v()},get onInteractOutside(){return ee()},set onInteractOutside(S){ee(S),v()},get onCloseAutoFocus(){return z()},set onCloseAutoFocus(S){z(S),v()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(S){oe(S),v()},get onFocusOutside(){return Q()},set onFocusOutside(S){Q(S),v()},get interactOutsideBehavior(){return K()},set interactOutsideBehavior(S="close"){K(S),v()},get loop(){return Y()},set loop(S){Y(S),v()},get trapFocus(){return ce()},set trapFocus(S=!0){ce(S),v()},get isValidEvent(){return q()},set isValidEvent(S=()=>!1){q(S),v()},get customAnchor(){return j()},set customAnchor(S=null){j(S),v()},get isStatic(){return H()},set isStatic(S=!1){H(S),v()},get ref(){return le()},set ref(S){le(S),v()},get shouldRender(){return fe()},set shouldRender(S){fe(S),v()}},B=W(),Z=R(B);{var ve=S=>{Bc(S,xn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return u()},get side(){return c()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return b()},get avoidCollisions(){return m()},get collisionBoundary(){return g()},get collisionPadding(){return _()},get sticky(){return k()},get hideWhenDetached(){return P()},get updatePositionStrategy(){return O()},get strategy(){return $()},get dir(){return A()},get preventScroll(){return D()},get wrapperId(){return N()},get style(){return M()},get onPlaced(){return V()},get customAnchor(){return j()},get isStatic(){return H()},get enabled(){return n()},get onInteractOutside(){return ee()},get onCloseAutoFocus(){return z()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return K()},get loop(){return Y()},get trapFocus(){return ce()},get isValidEvent(){return q()},get onFocusOutside(){return Q()},forceMount:!1,get ref(){return le()}},()=>L))};ae(Z,S=>{fe()&&S(ve)})}return w(t,B),ie(pe)}se(_g,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});function wg(t,e){ne(e,!0);let r=y(e,"popper",7),n=y(e,"onEscapeKeydown",7),i=y(e,"escapeKeydownBehavior",7),s=y(e,"preventOverflowTextSelection",7),o=y(e,"id",7),a=y(e,"onPointerDown",7),l=y(e,"onPointerUp",7),u=y(e,"side",7),c=y(e,"sideOffset",7),d=y(e,"align",7),f=y(e,"alignOffset",7),p=y(e,"arrowPadding",7),b=y(e,"avoidCollisions",7),m=y(e,"collisionBoundary",7),g=y(e,"collisionPadding",7),_=y(e,"sticky",7),k=y(e,"hideWhenDetached",7),P=y(e,"updatePositionStrategy",7),O=y(e,"strategy",7),$=y(e,"dir",7),A=y(e,"preventScroll",7),D=y(e,"wrapperId",7),N=y(e,"style",7),M=y(e,"onPlaced",7),V=y(e,"onInteractOutside",7),ee=y(e,"onCloseAutoFocus",7),z=y(e,"onOpenAutoFocus",7),oe=y(e,"onFocusOutside",7),Q=y(e,"interactOutsideBehavior",7,"close"),K=y(e,"loop",7),Y=y(e,"trapFocus",7,!0),ce=y(e,"isValidEvent",7,()=>!1),q=y(e,"customAnchor",7,null),j=y(e,"isStatic",7,!1),H=y(e,"enabled",7),le=We(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);var fe={get popper(){return r()},set popper(L){r(L),v()},get onEscapeKeydown(){return n()},set onEscapeKeydown(L){n(L),v()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(L){i(L),v()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(L){s(L),v()},get id(){return o()},set id(L){o(L),v()},get onPointerDown(){return a()},set onPointerDown(L){a(L),v()},get onPointerUp(){return l()},set onPointerUp(L){l(L),v()},get side(){return u()},set side(L){u(L),v()},get sideOffset(){return c()},set sideOffset(L){c(L),v()},get align(){return d()},set align(L){d(L),v()},get alignOffset(){return f()},set alignOffset(L){f(L),v()},get arrowPadding(){return p()},set arrowPadding(L){p(L),v()},get avoidCollisions(){return b()},set avoidCollisions(L){b(L),v()},get collisionBoundary(){return m()},set collisionBoundary(L){m(L),v()},get collisionPadding(){return g()},set collisionPadding(L){g(L),v()},get sticky(){return _()},set sticky(L){_(L),v()},get hideWhenDetached(){return k()},set hideWhenDetached(L){k(L),v()},get updatePositionStrategy(){return P()},set updatePositionStrategy(L){P(L),v()},get strategy(){return O()},set strategy(L){O(L),v()},get dir(){return $()},set dir(L){$(L),v()},get preventScroll(){return A()},set preventScroll(L){A(L),v()},get wrapperId(){return D()},set wrapperId(L){D(L),v()},get style(){return N()},set style(L){N(L),v()},get onPlaced(){return M()},set onPlaced(L){M(L),v()},get onInteractOutside(){return V()},set onInteractOutside(L){V(L),v()},get onCloseAutoFocus(){return ee()},set onCloseAutoFocus(L){ee(L),v()},get onOpenAutoFocus(){return z()},set onOpenAutoFocus(L){z(L),v()},get onFocusOutside(){return oe()},set onFocusOutside(L){oe(L),v()},get interactOutsideBehavior(){return Q()},set interactOutsideBehavior(L="close"){Q(L),v()},get loop(){return K()},set loop(L){K(L),v()},get trapFocus(){return Y()},set trapFocus(L=!0){Y(L),v()},get isValidEvent(){return ce()},set isValidEvent(L=()=>!1){ce(L),v()},get customAnchor(){return q()},set customAnchor(L=null){q(L),v()},get isStatic(){return j()},set isStatic(L=!1){j(L),v()},get enabled(){return H()},set enabled(L){H(L),v()}};return Bc(t,xn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return u()},get sideOffset(){return c()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return b()},get collisionBoundary(){return m()},get collisionPadding(){return g()},get sticky(){return _()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return P()},get strategy(){return O()},get dir(){return $()},get preventScroll(){return A()},get wrapperId(){return D()},get style(){return N()},get onPlaced(){return M()},get customAnchor(){return q()},get isStatic(){return j()},get enabled(){return H()},get onInteractOutside(){return V()},get onCloseAutoFocus(){return ee()},get onOpenAutoFocus(){return z()},get interactOutsideBehavior(){return Q()},get loop(){return K()},get trapFocus(){return Y()},get isValidEvent(){return ce()},get onFocusOutside(){return oe()}},()=>le,{forceMount:!0})),ie(fe)}se(wg,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});const Ja=_a({component:"date-field",parts:["input","label","segment"]}),Yi={day:{min:1,max:t=>{const e=t.segmentValues.month,r=t.value.current??t.placeholder.current;return so(e?r.set({month:Number.parseInt(e)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(t,e)=>e.placeholder.current?`${t} - ${e.formatter.fullMonth(Pt(e.placeholder.current.set({month:t})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:t=>t.hourCycle.current===12?1:0,max:t=>t.hourCycle.current===24?23:t.hourCycle.current===12||Fm(t.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},Zn=new sn("DateField.Root");class Uc{static create(e,r){return Zn.set(new Uc(e,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=re();get segmentValues(){return h(this.#e)}set segmentValues(e){C(this.#e,e,!0)}announcer;#t=E(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(e){C(this.#t,e)}segmentStates=Pm();#r=re(null);#n=re(null);#i=re(null);get descriptionNode(){return h(this.#i)}set descriptionNode(e){C(this.#i,e,!0)}#s=re(null);get validationNode(){return h(this.#s)}set validationNode(e){C(this.#s,e,!0)}states=Pm();#a=re(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(e){C(this.#a,e,!0)}rangeRoot=void 0;#o=re("");get name(){return h(this.#o)}set name(e){C(this.#o,e,!0)}domContext=new Ui(()=>null);constructor(e,r){this.rangeRoot=r,this.value=e.value,this.placeholder=r?r.opts.placeholder:e.placeholder,this.validate=r?ur(void 0):e.validate,this.minValue=r?r.opts.minValue:e.minValue,this.maxValue=r?r.opts.maxValue:e.maxValue,this.disabled=r?r.opts.disabled:e.disabled,this.readonly=r?r.opts.readonly:e.readonly,this.granularity=r?r.opts.granularity:e.granularity,this.readonlySegments=r?r.opts.readonlySegments:e.readonlySegments,this.hourCycle=r?r.opts.hourCycle:e.hourCycle,this.locale=r?r.opts.locale:e.locale,this.hideTimeZone=r?r.opts.hideTimeZone:e.hideTimeZone,this.required=r?r.opts.required:e.required,this.onInvalid=r?r.opts.onInvalid:e.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:e.errorMessageId,this.isInvalidProp=e.isInvalidProp,this.formatter=zm({initialLocale:this.locale.current,monthFormat:F(()=>"long"),yearFormat:F(()=>"numeric")}),this.initialSegments=ic(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Ma(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),ge(()=>{qe(()=>{this.initialSegments=ic(this.inferredGranularity)})}),Yr(()=>{this.announcer=Ma(this.domContext.getDocument())}),Bi(()=>{r||DO(this.descriptionId,this.domContext.getDocument())}),ge(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ge(()=>{if(r)return;if(this.value.current){const i=qe(()=>this.descriptionId);AO({id:i,formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()})}const n=qe(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&qe(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ge(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ge(()=>{this.value.current===void 0&&(this.segmentValues=ic(this.inferredGranularity))}),st(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(e){this.name=e}setFieldNode(e){C(this.#r,e,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(e){C(this.#n,e,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:h(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(e){this.value.current=e}syncSegmentValues(e){const r=Na.map(n=>{const i=e[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const o=4-`${i}`.length;if(o>0)return[n,`${"0".repeat(o)}${i}`]}return[n,`${i}`]});if("hour"in e){const n=tc.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Pt(e))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`];if(e[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}return[s,`${e[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=E(()=>{const e=this.value.current;if(!e)return!1;const r=this.validate.current?.(e);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&ui(e,n))return{reason:"min"};const i=this.maxValue.current;return i&&ui(i,e)?{reason:"max"}:!1});get validationStatus(){return h(this.#u)}set validationStatus(e){C(this.#u,e)}#d=E(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#d)}set isInvalid(e){C(this.#d,e)}#c=E(()=>{const e=this.granularity.current;return e||CO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#c)}set inferredGranularity(e){C(this.#c,e)}#f=E(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#f)}set dateRef(e){C(this.#f,e)}#h=E(()=>wO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return h(this.#h)}set allSegmentContent(e){C(this.#h,e)}#p=E(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#p)}set segmentContents(e){C(this.#p,e)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"}};#m(e){return`${e} ${this.getLabelNode()?.id??""}`}updateSegment(e,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(e))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(OO(o)){const u=o[e],c=r;if(e==="month"){const d=c(u);if(this.states.month.updating=d,d!==null&&o.day!==null){const f=l.set({month:Number.parseInt(d)}),p=so(Pt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[e]:d}}else if(e==="dayPeriod"){const d=c(u);this.states.dayPeriod.updating=d;const f=this.value.current;if(f&&"hour"in f){const p=f.hour;d==="AM"?p>=12&&(o.hour=`${p-12}`):d==="PM"&&p<12&&(o.hour=`${p+12}`)}a={...o,[e]:d}}else if(e==="hour"){const d=c(u);if(this.states.hour.updating=d,d!==null&&o.dayPeriod!==null){const f=this.formatter.dayPeriod(Pt(l.set({hour:Number.parseInt(d)})),this.hourCycle.current);(f==="AM"||f==="PM")&&(o.dayPeriod=f)}a={...o,[e]:d}}else if(e==="minute"){const d=c(u);this.states.minute.updating=d,a={...o,[e]:d}}else if(e==="second"){const d=c(u);this.states.second.updating=d,a={...o,[e]:d}}else if(e==="year"){const d=c(u);this.states.year.updating=d,a={...o,[e]:d}}else if(e==="day"){const d=c(u);this.states.day.updating=d,a={...o,[e]:d}}else{const d=c(u);a={...o,[e]:d}}}else if(Ra(e)){const u=o[e],c=r,d=c(u);if(e==="month"&&d!==null&&o.day!==null){this.states.month.updating=d;const f=l.set({month:Number.parseInt(d)}),p=so(Pt(f));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[e]:d}}else if(e==="year"){const f=c(u);this.states.year.updating=f,a={...o,[e]:f}}else if(e==="day"){const f=c(u);this.states.day.updating=f,a={...o,[e]:f}}else a={...o,[e]:d}}this.segmentValues=a,EO(a,h(this.#r))?this.setValue(xO({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(e){this.disabled.current&&e.preventDefault()}getBaseSegmentAttrs(e,r){const n=this.readonlySegmentsSet.has(e),i={"aria-invalid":Lu(this.isInvalid),"aria-disabled":cr(this.disabled.current),"aria-readonly":cr(this.readonly.current||n),"data-invalid":ze(this.isInvalid),"data-disabled":ze(this.disabled.current),"data-readonly":ze(this.readonly.current||n),"data-segment":`${e}`,[Ja.segment]:""};if(e==="literal")return i;const s=this.descriptionNode?.id,o=TO(r,h(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,u=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:u?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}}class qc{static create(e){return new qc(e,Zn.get())}opts;root;domContext;attachment;constructor(e,r){this.opts=e,this.root=r,this.domContext=new Ui(e.ref),this.root.domContext=this.domContext,this.attachment=rt(e.ref,n=>this.root.setFieldNode(n)),st(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=E(()=>{if(!(!on||!this.domContext.getElementById(this.root.descriptionId)))return this.root.descriptionId});#t=E(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":cr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":ze(this.root.disabled.current),[Ja.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(e){C(this.#t,e)}}class Wc{static create(){return new Wc(Zn.get())}root;#e=E(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(e){C(this.#e,e)}#t=E(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(e){C(this.#t,e)}constructor(e){this.root=e}#r=E(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(e){C(this.#r,e)}}class Kc{static create(e){return new Kc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=rt(e.ref,n=>this.root.setLabelNode(n))}onclick(e){if(this.root.disabled.current)return;const r=$O(this.root.getFieldNode());r&&r.focus()}#e=E(()=>({id:this.opts.id.current,"data-invalid":ze(this.root.isInvalid),"data-disabled":ze(this.root.disabled.current),[Ja.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class Gi{opts;root;announcer;part;config;attachment;constructor(e,r,n,i){this.opts=e,this.root=r,this.part=n,this.config=i,this.announcer=r.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=rt(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,r=!0){const n=String(e);return r&&this.config.padZero&&n.length===1?`0${e}`:n}onkeydown(e){const r=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in r))&&(e.key!==Sa&&e.preventDefault(),!!sc(e.key))){if(Jc(e.key)){this.#i(r);return}if(Qc(e.key)){this.#s(r);return}if(xa(e.key)){this.#a(e);return}if(Xc(e.key)){this.#o(e);return}lo(e.key)&&ao(e,this.root.getFieldNode())}}#i(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#s(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#a(e){const r=Number.parseInt(e.key);let n=!1;const i=this.#e(),s=Math.floor(i/10),o=r===0,a=this.part;this.root.updateSegment(this.part,l=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(l=null,this.root.states[a].hasLeftFocus=!1),l===null)return o?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||r>s)&&(n=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),n&&String(r).length===1?(this.announcer.announce(r),`0${r}`):`${r}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return r!==0?(n=!0,this.root.states[a].lastKeyZero=!1,`0${r}`):this.part==="hour"&&r===0&&this.root.hourCycle.current===24?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&r===0?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):l;const u=Number.parseInt(l+r.toString());return u>i?(n=!0,`0${r}`):(n=!0,`${u}`)}),n&&Nm(e,this.root.getFieldNode())}#o(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1);let n=!1;this.root.updateSegment(this.part,i=>{if(i===null)return n=!0,this.announcer.announce(null),null;if(i.length===2&&i.startsWith("0"))return this.announcer.announce(null),null;const s=i.toString();if(s.length===1)return this.announcer.announce(null),null;const o=Number.parseInt(s.slice(0,-1));return this.announcer.announce(this.#r(o)),`${o}`}),n&&Rm(e,this.root.getFieldNode())}onfocusout(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,n=>n&&n.length===1?`0${n}`:n)}getSegmentProps(){const e=this.root.segmentValues,r=this.root.placeholder.current,n=e[this.part]===null;let i=r;e[this.part]&&(i=r.set({[this.part]:Number.parseInt(e[this.part])}));const s=i[this.part],o=this.#t(),a=this.#e();let l=n?"Empty":`${s}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(l=n?"Empty":`${s} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-valuetext":l}}#l=E(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return h(this.#l)}set props(e){C(this.#l,e)}}class wT extends Gi{#e=[];#t=0;constructor(e,r){super(e,r,"year",Yi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==Sa&&e.preventDefault(),!!sc(e.key))){if(Jc(e.key)){this.#r(),super.onkeydown(e);return}if(Qc(e.key)){this.#r(),super.onkeydown(e);return}if(xa(e.key)){this.#i(e);return}if(Xc(e.key)){this.#s(e);return}lo(e.key)&&ao(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let r=!1;const n=Number.parseInt(e.key);this.root.updateSegment("year",i=>{if(this.root.states.year.hasLeftFocus&&(i=null,this.root.states.year.hasLeftFocus=!1),i===null)return this.announcer.announce(n),`000${n}`;const s=i.toString()+n.toString(),o=Number.parseInt(s);if(String(o).length<4)return this.#t>0&&this.#e.length<=this.#t&&s.length<=4?(this.announcer.announce(o),s):(this.announcer.announce(o),kg(o));this.announcer.announce(o),r=!0;const l=`${o}`;return l.length>4?l.slice(0,4):l}),(this.#e.length===4||this.#e.length===this.#t)&&(r=!0),r&&Nm(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let r=!1;this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus=!1,n===null)return r=!0,this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=i.slice(0,-1);return this.announcer.announce(s),`${s}`}),r&&Rm(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",r=>r&&r.length!==4?kg(Number.parseInt(r)):r)}}class kT extends Gi{constructor(e,r){super(e,r,"day",Yi.day)}}class ST extends Gi{constructor(e,r){super(e,r,"month",Yi.month)}}class xT extends Gi{constructor(e,r){super(e,r,"hour",Yi.hour)}onkeydown(e){if(xa(e.key)){const r=this.root.updateSegment.bind(this.root);this.root.updateSegment=(n,i)=>{const s=r(n,i);return n==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),s}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}}class ET extends Gi{constructor(e,r){super(e,r,"minute",Yi.minute)}}class OT extends Gi{constructor(e,r){super(e,r,"second",Yi.second)}}class Hc{static create(e){return new Hc(e,Zn.get())}opts;root;attachment;#e;constructor(e,r){this.opts=e,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=rt(e.ref,n=>this.root.dayPeriodNode=n)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==Sa&&e.preventDefault(),!!TT(e.key))){if(Jc(e.key)||Qc(e.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}Xc(e.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),(e.key===Bu||e.key===im||ju)&&this.root.updateSegment("dayPeriod",()=>{const r=e.key===Bu||e.key===ju?"AM":"PM";return this.#e.announce(r),r}),lo(e.key)&&ao(e,this.root.getFieldNode())}}#t=E(()=>{const e=this.root.segmentValues;if(!("dayPeriod"in e))return;const r=0,n=12,i=e.dayPeriod==="AM"?0:12,s=e.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return h(this.#t)}set props(e){C(this.#t,e)}}class Yc{static create(e){return new Yc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(e.ref)}#e=E(()=>({id:this.opts.id.current,"aria-hidden":Lu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class Gc{static create(e){return new Gc(e,Zn.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=rt(e.ref)}onkeydown(e){e.key!==Sa&&e.preventDefault(),!this.root.disabled.current&&lo(e.key)&&ao(e,this.root.getFieldNode())}#e=E(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":ze(!0),...this.attachment}));get props(){return h(this.#e)}set props(e){C(this.#e,e)}}class CT{static create(e,r){const n=Zn.get();switch(e){case"day":return new kT(r,n);case"month":return new ST(r,n);case"year":return new wT(r,n);case"hour":return new xT(r,n);case"minute":return new ET(r,n);case"second":return new OT(r,n);case"dayPeriod":return new Hc(r,n);case"literal":return new Yc(r,n);case"timeZoneName":return new Gc(r,n)}}}function TT(t){return sc(t)||t===Bu||t===im||t===ju||t===vE}function Jc(t){return t===ka}function Qc(t){return t===wa}function Xc(t){return t===nm}function kg(t){const r=4-String(t).length;return`${"0".repeat(r)}${t}`}function Sg(t,e){ne(e,!1);const r=Wc.create();jo();var n=W(),i=R(n);{var s=o=>{qm(o,xn(()=>r.props))};ae(i,o=>{r.shouldRender&&o(s)})}w(t,n),ie()}se(Sg,{},[],[],{mode:"open"});var AT=U("<div><!></div>"),DT=U("<!> <!>",1);function xg(t,e){const r=ht();ne(e,!0);let n=y(e,"id",23,()=>Ie(r)),i=y(e,"ref",15,null),s=y(e,"name",7,""),o=y(e,"children",7),a=y(e,"child",7),l=We(e,["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]);const u=qc.create({id:F(()=>n()),ref:F(()=>i(),_=>i(_)),name:F(()=>s())}),c=E(()=>He(l,u.props));var d={get id(){return n()},set id(_=Ie(r)){n(_),v()},get ref(){return i()},set ref(_=null){i(_),v()},get name(){return s()},set name(_=""){s(_),v()},get children(){return o()},set children(_){o(_),v()},get child(){return a()},set child(_){a(_),v()}},f=DT(),p=R(f);{var b=_=>{var k=W(),P=R(k);ye(P,a,()=>({props:h(c),segments:u.root.segmentContents})),w(_,k)},m=_=>{var k=AT();Ve(k,()=>({...h(c)}));var P=I(k);ye(P,()=>o()??Ne,()=>({segments:u.root.segmentContents})),T(k),w(_,k)};ae(p,_=>{a()?_(b):_(m,!1)})}var g=G(p,2);return Sg(g,{}),w(t,f),ie(d)}se(xg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var IT=U("<div><!></div>");function Eg(t,e){const r=ht();ne(e,!0);let n=y(e,"id",23,()=>Ie(r)),i=y(e,"ref",15,null),s=y(e,"children",7),o=y(e,"child",7),a=We(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]);const l=Kc.create({id:F(()=>n()),ref:F(()=>i(),m=>i(m))}),u=E(()=>He(a,l.props));var c={get id(){return n()},set id(m=Ie(r)){n(m),v()},get ref(){return i()},set ref(m=null){i(m),v()},get children(){return s()},set children(m){s(m),v()},get child(){return o()},set child(m){o(m),v()}},d=W(),f=R(d);{var p=m=>{var g=W(),_=R(g);ye(_,o,()=>({props:h(u)})),w(m,g)},b=m=>{var g=IT();Ve(g,()=>({...h(u)}));var _=I(g);ye(_,()=>s()??Ne),T(g),w(m,g)};ae(f,m=>{o()?m(p):m(b,!1)})}return w(t,d),ie(c)}se(Eg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var PT=U("<span><!></span>");function Og(t,e){const r=ht();ne(e,!0);let n=y(e,"id",23,()=>Ie(r)),i=y(e,"ref",15,null),s=y(e,"children",7),o=y(e,"child",7),a=y(e,"part",7),l=We(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]);const u=CT.create(a(),{id:F(()=>n()),ref:F(()=>i(),g=>i(g))}),c=E(()=>He(l,u.props));var d={get id(){return n()},set id(g=Ie(r)){n(g),v()},get ref(){return i()},set ref(g=null){i(g),v()},get children(){return s()},set children(g){s(g),v()},get child(){return o()},set child(g){o(g),v()},get part(){return a()},set part(g){a(g),v()}},f=W(),p=R(f);{var b=g=>{var _=W(),k=R(_);ye(k,o,()=>({props:h(c)})),w(g,_)},m=g=>{var _=PT();Ve(_,()=>({...h(c)}));var k=I(_);ye(k,()=>s()??Ne),T(_),w(g,_)};ae(p,g=>{o()?g(b):g(m,!1)})}return w(t,f),ie(d)}se(Og,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});const Cg=new sn("DatePicker.Root");class ed{static create(e){return Cg.set(new ed(e))}opts;constructor(e){this.opts=e}}function Tg(t,e){const[r,n]=t;let i=!1;const s=e.length;for(let o=0,a=s-1;o<s;a=o++){const[l,u]=e[o]??[0,0],[c,d]=e[a]??[0,0];u>=n!=d>=n&&r<=(c-l)*(n-u)/(d-u)+l&&(i=!i)}return i}function Ag(t,e){return t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom}function $T(t,e){const r=t.left+t.width/2,n=t.top+t.height/2,i=e.left+e.width/2,s=e.top+e.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class MT{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,st([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#r=null,this.#n=null;return}const s=ba(r),o=d=>{this.#i(d,r,n)},a=d=>{const f=d.relatedTarget;ro(f)&&n.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},u=()=>{this.#r=null,this.#n=null},c=d=>{const f=d.relatedTarget;ro(f)&&r.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[ft(s,"pointermove",o),ft(r,"pointerleave",a),ft(r,"pointerenter",l),ft(n,"pointerenter",u),ft(n,"pointerleave",c)].reduce((d,f)=>()=>{d(),f()},()=>{})})}#i(e,r,n){if(!this.#r||!this.#n)return;const i=[e.clientX,e.clientY],s=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#n==="content"&&Ag(i,o)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&Ag(i,s)){this.#r=null,this.#n=null;return}const a=$T(s,o),l=this.#s(s,o,a);if(l&&Tg(i,l))return;const u=this.#n==="content"?o:s,c=this.#a(this.#r,u,a,this.#n);Tg(i,c)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#s(e,r,n){const i=this.#t;switch(n){case"top":return[[Math.min(e.left,r.left)-i,e.top],[Math.min(e.left,r.left)-i,r.bottom],[Math.max(e.right,r.right)+i,r.bottom],[Math.max(e.right,r.right)+i,e.top]];case"bottom":return[[Math.min(e.left,r.left)-i,e.bottom],[Math.min(e.left,r.left)-i,r.top],[Math.max(e.right,r.right)+i,r.top],[Math.max(e.right,r.right)+i,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-i],[r.right,Math.min(e.top,r.top)-i],[r.right,Math.max(e.bottom,r.bottom)+i],[e.left,Math.max(e.bottom,r.bottom)+i]];case"right":return[[e.right,Math.min(e.top,r.top)-i],[r.left,Math.min(e.top,r.top)-i],[r.left,Math.max(e.bottom,r.bottom)+i],[e.right,Math.max(e.bottom,r.bottom)+i]]}}#a(e,r,n,i){const s=this.#t*4,[o,a]=e;switch(i==="trigger"?this.#o(n):n){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const td=_a({component:"popover",parts:["root","trigger","content","close","overlay"]}),rd=new sn("Popover.Root");class nd{static create(e){return rd.set(new nd(e))}opts;#e=re(null);get contentNode(){return h(this.#e)}set contentNode(e){C(this.#e,e,!0)}contentPresence;#t=re(null);get triggerNode(){return h(this.#t)}set triggerNode(e){C(this.#t,e,!0)}#r=re(null);get overlayNode(){return h(this.#r)}set overlayNode(e){C(this.#r,e,!0)}overlayPresence;#n=re(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(e){C(this.#n,e,!0)}#i=re(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(e){C(this.#i,e,!0)}#s=re(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(e){C(this.#s,e,!0)}#a=re(0);get closeDelay(){return h(this.#a)}set closeDelay(e){C(this.#a,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new om({ref:F(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new om({ref:F(()=>this.overlayNode),open:this.opts.open}),st(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(e){this.#l=e}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}}class id{static create(e){return new id(e,rd.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=re(!1);constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Ui(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),st(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||Ea(e)||(C(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(Ea(e)||(C(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#s(),h(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}h(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Zu||e.key===Vu)&&(e.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=E(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":cr(this.root.opts.open.current),"data-state":rm(this.root.opts.open.current),"aria-controls":this.#a(),[td.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#o)}set props(e){C(this.#o,e)}}class sd{static create(e){return new sd(e,rd.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=rt(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new MT({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;ro(r)&&BE(r)&&this.root.markInteraction()}onpointerenter(e){Ea(e)||this.root.cancelDelayedClose()}onpointerleave(e){Ea(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!ro(e.target))return;const r=e.target.closest(td.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ro(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=E(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(e){C(this.#e,e)}#t=E(()=>({id:this.opts.id.current,tabindex:-1,"data-state":rm(this.root.opts.open.current),[td.content]:"",style:{pointerEvents:"auto"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(e){C(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}function Dg(t,e){ne(e,!0);let r=y(e,"open",15,!1),n=y(e,"onOpenChange",7,ke),i=y(e,"onOpenChangeComplete",7,ke),s=y(e,"value",15),o=y(e,"onValueChange",7,ke),a=y(e,"placeholder",15),l=y(e,"onPlaceholderChange",7,ke),u=y(e,"isDateUnavailable",7,()=>!1),c=y(e,"validate",7,ke),d=y(e,"onInvalid",7,ke),f=y(e,"minValue",7),p=y(e,"maxValue",7),b=y(e,"disabled",7,!1),m=y(e,"readonly",7,!1),g=y(e,"granularity",7),_=y(e,"readonlySegments",23,()=>[]),k=y(e,"hourCycle",7),P=y(e,"locale",7),O=y(e,"hideTimeZone",7,!1),$=y(e,"required",7,!1),A=y(e,"calendarLabel",7,"Event"),D=y(e,"disableDaysOutsideMonth",7,!0),N=y(e,"preventDeselect",7,!1),M=y(e,"pagedNavigation",7,!1),V=y(e,"weekStartsOn",7),ee=y(e,"weekdayFormat",7,"narrow"),z=y(e,"isDateDisabled",7,()=>!1),oe=y(e,"fixedWeeks",7,!1),Q=y(e,"numberOfMonths",7,1),K=y(e,"closeOnDateSelect",7,!0),Y=y(e,"initialFocus",7,!1),ce=y(e,"errorMessageId",7),q=y(e,"children",7),j=y(e,"monthFormat",7,"long"),H=y(e,"yearFormat",7,"numeric");const le=Cm({granularity:g(),defaultValue:s(),minValue:f(),maxValue:p()});function fe(){a()===void 0&&a(le)}fe(),st.pre(()=>a(),()=>{fe()});function L(){K()&&r(!1)}const pe=ed.create({open:F(()=>r(),S=>{r(S),n()(S)}),value:F(()=>s(),S=>{s(S),o()(S)}),placeholder:F(()=>a(),S=>{a(S),l()(S)}),isDateUnavailable:F(()=>u()),minValue:F(()=>f()),maxValue:F(()=>p()),disabled:F(()=>b()),readonly:F(()=>m()),granularity:F(()=>g()),readonlySegments:F(()=>_()),hourCycle:F(()=>k()),locale:am(()=>P()),hideTimeZone:F(()=>O()),required:F(()=>$()),calendarLabel:F(()=>A()),disableDaysOutsideMonth:F(()=>D()),preventDeselect:F(()=>N()),pagedNavigation:F(()=>M()),weekStartsOn:F(()=>V()),weekdayFormat:F(()=>ee()),isDateDisabled:F(()=>z()),fixedWeeks:F(()=>oe()),numberOfMonths:F(()=>Q()),initialFocus:F(()=>Y()),onDateSelect:F(()=>L),defaultPlaceholder:le,monthFormat:F(()=>j()),yearFormat:F(()=>H())});nd.create({open:pe.opts.open,onOpenChangeComplete:F(()=>i())}),Uc.create({value:pe.opts.value,disabled:pe.opts.disabled,readonly:pe.opts.readonly,readonlySegments:pe.opts.readonlySegments,validate:F(()=>c()),onInvalid:F(()=>d()),minValue:pe.opts.minValue,maxValue:pe.opts.maxValue,granularity:pe.opts.granularity,hideTimeZone:pe.opts.hideTimeZone,hourCycle:pe.opts.hourCycle,locale:pe.opts.locale,required:pe.opts.required,placeholder:pe.opts.placeholder,errorMessageId:F(()=>ce()),isInvalidProp:F(()=>{})});var B={get open(){return r()},set open(S=!1){r(S),v()},get onOpenChange(){return n()},set onOpenChange(S=ke){n(S),v()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(S=ke){i(S),v()},get value(){return s()},set value(S){s(S),v()},get onValueChange(){return o()},set onValueChange(S=ke){o(S),v()},get placeholder(){return a()},set placeholder(S){a(S),v()},get onPlaceholderChange(){return l()},set onPlaceholderChange(S=ke){l(S),v()},get isDateUnavailable(){return u()},set isDateUnavailable(S=()=>!1){u(S),v()},get validate(){return c()},set validate(S=ke){c(S),v()},get onInvalid(){return d()},set onInvalid(S=ke){d(S),v()},get minValue(){return f()},set minValue(S){f(S),v()},get maxValue(){return p()},set maxValue(S){p(S),v()},get disabled(){return b()},set disabled(S=!1){b(S),v()},get readonly(){return m()},set readonly(S=!1){m(S),v()},get granularity(){return g()},set granularity(S){g(S),v()},get readonlySegments(){return _()},set readonlySegments(S=[]){_(S),v()},get hourCycle(){return k()},set hourCycle(S){k(S),v()},get locale(){return P()},set locale(S){P(S),v()},get hideTimeZone(){return O()},set hideTimeZone(S=!1){O(S),v()},get required(){return $()},set required(S=!1){$(S),v()},get calendarLabel(){return A()},set calendarLabel(S="Event"){A(S),v()},get disableDaysOutsideMonth(){return D()},set disableDaysOutsideMonth(S=!0){D(S),v()},get preventDeselect(){return N()},set preventDeselect(S=!1){N(S),v()},get pagedNavigation(){return M()},set pagedNavigation(S=!1){M(S),v()},get weekStartsOn(){return V()},set weekStartsOn(S){V(S),v()},get weekdayFormat(){return ee()},set weekdayFormat(S="narrow"){ee(S),v()},get isDateDisabled(){return z()},set isDateDisabled(S=()=>!1){z(S),v()},get fixedWeeks(){return oe()},set fixedWeeks(S=!1){oe(S),v()},get numberOfMonths(){return Q()},set numberOfMonths(S=1){Q(S),v()},get closeOnDateSelect(){return K()},set closeOnDateSelect(S=!0){K(S),v()},get initialFocus(){return Y()},set initialFocus(S=!1){Y(S),v()},get errorMessageId(){return ce()},set errorMessageId(S){ce(S),v()},get children(){return q()},set children(S){q(S),v()},get monthFormat(){return j()},set monthFormat(S="long"){j(S),v()},get yearFormat(){return H()},set yearFormat(S="numeric"){H(S),v()}},Z=W(),ve=R(Z);return Pe(ve,()=>mg,(S,Ge)=>{Ge(S,{children:(Le,je)=>{var it=W(),Ue=R(it);ye(Ue,()=>q()??Ne),w(Le,it)},$$slots:{default:!0}})}),w(t,Z),ie(B)}se(Dg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var FT=U("<div><!></div>");function Ig(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"id",23,()=>Ie(r)),o=y(e,"ref",15,null),a=We(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]);const l=Cg.get(),u=La.create({id:F(()=>s()),ref:F(()=>o(),g=>o(g)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:F(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:F(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),c=E(()=>He(a,u.props));var d={get children(){return n()},set children(g){n(g),v()},get child(){return i()},set child(g){i(g),v()},get id(){return s()},set id(g=Ie(r)){s(g),v()},get ref(){return o()},set ref(g=null){o(g),v()}},f=W(),p=R(f);{var b=g=>{var _=W(),k=R(_);{let P=E(()=>({props:h(c),...u.snippetProps}));ye(k,i,()=>h(P))}w(g,_)},m=g=>{var _=FT();Ve(_,()=>({...h(c)}));var k=I(_);ye(k,()=>n()??Ne,()=>u.snippetProps),T(_),w(g,_)};ae(p,g=>{i()?g(b):g(m,!1)})}return w(t,f),ie(d)}se(Ig,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var NT=U("<div><div><!></div></div>"),RT=U("<div><div><!></div></div>");function Pg(t,e){const r=ht();ne(e,!0);let n=y(e,"child",7),i=y(e,"children",7),s=y(e,"ref",15,null),o=y(e,"id",23,()=>Ie(r)),a=y(e,"forceMount",7,!1),l=y(e,"onOpenAutoFocus",7,ke),u=y(e,"onCloseAutoFocus",7,ke),c=y(e,"onEscapeKeydown",7,ke),d=y(e,"onInteractOutside",7,ke),f=y(e,"trapFocus",7,!0),p=y(e,"preventScroll",7,!1),b=y(e,"customAnchor",7,null),m=We(e,["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor"]);const g=sd.create({id:F(()=>o()),ref:F(()=>s(),M=>s(M)),onInteractOutside:F(()=>d()),onEscapeKeydown:F(()=>c()),customAnchor:F(()=>b())}),_=E(()=>He(m,g.props)),k=E(()=>f()&&g.shouldTrapFocus);function P(M){g.shouldTrapFocus||M.preventDefault(),l()(M)}var O={get child(){return n()},set child(M){n(M),v()},get children(){return i()},set children(M){i(M),v()},get ref(){return s()},set ref(M=null){s(M),v()},get id(){return o()},set id(M=Ie(r)){o(M),v()},get forceMount(){return a()},set forceMount(M=!1){a(M),v()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(M=ke){l(M),v()},get onCloseAutoFocus(){return u()},set onCloseAutoFocus(M=ke){u(M),v()},get onEscapeKeydown(){return c()},set onEscapeKeydown(M=ke){c(M),v()},get onInteractOutside(){return d()},set onInteractOutside(M=ke){d(M),v()},get trapFocus(){return f()},set trapFocus(M=!0){f(M),v()},get preventScroll(){return p()},set preventScroll(M=!1){p(M),v()},get customAnchor(){return b()},set customAnchor(M=null){b(M),v()}},$=W(),A=R($);{var D=M=>{wg(M,xn(()=>h(_),()=>g.popperProps,{get ref(){return g.opts.ref},get enabled(){return g.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return b()},onOpenAutoFocus:P,get onCloseAutoFocus(){return u()},get shouldRender(){return g.shouldRender},popper:(ee,z)=>{let oe=()=>z?.().props,Q=()=>z?.().wrapperProps;const K=E(()=>He(oe(),{style:hg("popover")}));var Y=W(),ce=R(Y);{var q=H=>{var le=W(),fe=R(le);{let L=E(()=>({props:h(K),wrapperProps:Q(),...g.snippetProps}));ye(fe,n,()=>h(L))}w(H,le)},j=H=>{var le=NT();Ve(le,()=>({...Q()}));var fe=I(le);Ve(fe,()=>({...h(K)}));var L=I(fe);ye(L,()=>i()??Ne),T(fe),T(le),w(H,le)};ae(ce,H=>{n()?H(q):H(j,!1)})}w(ee,Y)},$$slots:{popper:!0}}))},N=M=>{var V=W(),ee=R(V);{var z=oe=>{_g(oe,xn(()=>h(_),()=>g.popperProps,{get ref(){return g.opts.ref},get open(){return g.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return b()},onOpenAutoFocus:P,get onCloseAutoFocus(){return u()},get shouldRender(){return g.shouldRender},popper:(K,Y)=>{let ce=()=>Y?.().props,q=()=>Y?.().wrapperProps;const j=E(()=>He(ce(),{style:hg("popover")}));var H=W(),le=R(H);{var fe=pe=>{var B=W(),Z=R(B);{let ve=E(()=>({props:h(j),wrapperProps:q(),...g.snippetProps}));ye(Z,n,()=>h(ve))}w(pe,B)},L=pe=>{var B=RT();Ve(B,()=>({...q()}));var Z=I(B);Ve(Z,()=>({...h(j)}));var ve=I(Z);ye(ve,()=>i()??Ne),T(Z),T(B),w(pe,B)};ae(le,pe=>{n()?pe(fe):pe(L,!1)})}w(K,H)},$$slots:{popper:!0}}))};ae(ee,oe=>{a()||oe(z)},!0)}w(M,V)};ae(A,M=>{a()?M(D):M(N,!1)})}return w(t,$),ie(O)}se(Pg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{}},[],[],{mode:"open"});function $g(t,e){ne(e,!0);let r=y(e,"ref",15,null),n=y(e,"onOpenAutoFocus",7),i=We(e,["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);const s=E(()=>He({onOpenAutoFocus:n()},{onOpenAutoFocus:HO}));var o={get ref(){return r()},set ref(a=null){r(a),v()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),v()}};return Pg(t,xn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ie(o)}se($g,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var zT=U("<button><!></button>");function Mg(t,e){const r=ht();ne(e,!0);let n=y(e,"children",7),i=y(e,"child",7),s=y(e,"id",23,()=>Ie(r)),o=y(e,"ref",15,null),a=y(e,"type",7,"button"),l=y(e,"disabled",7,!1),u=y(e,"openOnHover",7,!1),c=y(e,"openDelay",7,700),d=y(e,"closeDelay",7,300),f=We(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=id.create({id:F(()=>s()),ref:F(()=>o(),g=>o(g)),disabled:F(()=>!!l()),openOnHover:F(()=>u()),openDelay:F(()=>c()),closeDelay:F(()=>d())}),b=E(()=>He(f,p.props,{type:a()}));var m={get children(){return n()},set children(g){n(g),v()},get child(){return i()},set child(g){i(g),v()},get id(){return s()},set id(g=Ie(r)){s(g),v()},get ref(){return o()},set ref(g=null){o(g),v()},get type(){return a()},set type(g="button"){a(g),v()},get disabled(){return l()},set disabled(g=!1){l(g),v()},get openOnHover(){return u()},set openOnHover(g=!1){u(g),v()},get openDelay(){return c()},set openDelay(g=700){c(g),v()},get closeDelay(){return d()},set closeDelay(g=300){d(g),v()}};return gg(t,{get id(){return s()},get ref(){return p.opts.ref},children:(g,_)=>{var k=W(),P=R(k);{var O=A=>{var D=W(),N=R(D);ye(N,i,()=>({props:h(b)})),w(A,D)},$=A=>{var D=zT();Ve(D,()=>({...h(b)}));var N=I(D);ye(N,()=>n()??Ne),T(D),w(A,D)};ae(P,A=>{i()?A(O):A($,!1)})}w(g,k)},$$slots:{default:!0}}),ie(m)}se(Mg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});function Fg(t,e){ne(e,!0);let r=y(e,"ref",15,null),n=y(e,"onkeydown",7),i=We(e,["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function s(l){if(lo(l.key)){const c=l.currentTarget.closest(Ja.selector("input"));if(!c)return;ao(l,c)}}const o=E(()=>He({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),v()},get onkeydown(){return n()},set onkeydown(l){n(l),v()}};return Mg(t,xn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),ie(a)}se(Fg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var LT=U("<!> <!>",1),ZT=U("<!> <!> <!>",1),VT=U("<!> <!>",1),jT=U("<!> <!>",1),BT=U("<!> <!> <!>",1);function Ng(t,e){ne(e,!0);let r=y(e,"dateString",15),n=y(e,"labelClass",7),i=y(e,"inputClass",7),s=y(e,"labelText",7),o=re(Fe(Ni(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(d){r(d),v()},get labelClass(){return n()},set labelClass(d){n(d),v()},get inputClass(){return i()},set inputClass(d){i(d),v()},get labelText(){return s()},set labelText(d){s(d),v()}},u=W(),c=R(u);{let d=E(()=>x.locale||"de");Pe(c,()=>Dg,(f,p)=>{p(f,{get locale(){return h(d)},weekStartsOn:1,isDateDisabled:b=>b.compare(Ni(Vt()))<0,get value(){return h(o)},set value(b){C(o,b,!0)},children:(b,m)=>{var g=BT(),_=R(g);Pe(_,()=>Eg,(O,$)=>{$(O,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(A,D)=>{var N=W(),M=R(N);{var V=ee=>{var z=W(),oe=R(z);ye(oe,s),w(ee,z)};ae(M,ee=>{s()&&ee(V)})}w(A,N)},$$slots:{default:!0}})});var k=G(_,2);{const O=($,A)=>{let D=()=>A?.().segments;var N=LT(),M=R(N);Ze(M,17,D,Er,(ee,z)=>{let oe=()=>h(z).part,Q=()=>h(z).value;var K=W(),Y=R(K);Pe(Y,()=>Og,(ce,q)=>{q(ce,{get part(){return oe()},children:(j,H)=>{gt();var le=It();ue(()=>te(le,Q())),w(j,le)},$$slots:{default:!0}})}),w(ee,K)});var V=G(M,2);Pe(V,()=>Fg,(ee,z)=>{z(ee,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),w($,N)};Pe(k,()=>xg,($,A)=>{A($,{get class(){return`go-datepicker-input ${i()??""}`},children:O,$$slots:{default:!0}})})}var P=G(k,2);Pe(P,()=>$g,(O,$)=>{$(O,{children:(A,D)=>{var N=W(),M=R(N);{const V=(ee,z)=>{let oe=()=>z?.().months,Q=()=>z?.().weekdays;var K=jT(),Y=R(K);Pe(Y,()=>Oc,(q,j)=>{j(q,{children:(H,le)=>{var fe=ZT(),L=R(fe);Pe(L,()=>Ac,(Z,ve)=>{ve(Z,{class:"go-datepicker-previous"})});var pe=G(L,2);Pe(pe,()=>Cc,(Z,ve)=>{ve(Z,{class:"go-datepicker-selected-month"})});var B=G(pe,2);Pe(B,()=>Tc,(Z,ve)=>{ve(Z,{class:"go-datepicker-next"})}),w(H,fe)},$$slots:{default:!0}})});var ce=G(Y,2);Ze(ce,16,oe,q=>q,(q,j)=>{var H=W(),le=R(H);Pe(le,()=>wc,(fe,L)=>{L(fe,{children:(pe,B)=>{var Z=VT(),ve=R(Z);Pe(ve,()=>xc,(Ge,Le)=>{Le(Ge,{children:(je,it)=>{var Ue=W(),gr=R(Ue);Pe(gr,()=>co,(vr,Wt)=>{Wt(vr,{children:(yr,vi)=>{var br=W(),_r=R(br);Ze(_r,17,Q,Er,(ss,mo)=>{var pn=W(),yi=R(pn);Pe(yi,()=>Ec,(Vn,jn)=>{jn(Vn,{children:(gd,ol)=>{gt();var bi=It();ue(()=>te(bi,h(mo))),w(gd,bi)},$$slots:{default:!0}})}),w(ss,pn)}),w(yr,br)},$$slots:{default:!0}})}),w(je,Ue)},$$slots:{default:!0}})});var S=G(ve,2);Pe(S,()=>kc,(Ge,Le)=>{Le(Ge,{children:(je,it)=>{var Ue=W(),gr=R(Ue);Ze(gr,16,()=>j.weeks,vr=>vr,(vr,Wt)=>{var yr=W(),vi=R(yr);Pe(vi,()=>co,(br,_r)=>{_r(br,{children:(ss,mo)=>{var pn=W(),yi=R(pn);Ze(yi,16,()=>Wt,Vn=>Vn,(Vn,jn,gd,ol)=>{var bi=W(),vd=R(bi);Pe(vd,()=>Sc,(VI,jI)=>{jI(VI,{get date(){return jn},get month(){return j.value},children:(BI,sP)=>{var uv=W(),UI=R(uv);Pe(UI,()=>_c,(qI,WI)=>{WI(qI,{})}),w(BI,uv)},$$slots:{default:!0}})}),w(Vn,bi)}),w(ss,pn)},$$slots:{default:!0}})}),w(vr,yr)}),w(je,Ue)},$$slots:{default:!0}})}),w(pe,Z)},$$slots:{default:!0}})}),w(q,H)}),w(ee,K)};Pe(M,()=>Ig,(ee,z)=>{z(ee,{children:V,$$slots:{default:!0}})})}w(A,N)},$$slots:{default:!0}})}),w(b,g)},$$slots:{default:!0}})})}return w(t,u),ie(l)}se(Ng,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var UT=U('<span class="go-field-star" aria-hidden="true">*</span>'),qT=U(" <!>",1),WT=U("<label><!></label> <input/>",1),KT=U('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),HT=U("<label><!></label> <input/> <!>",1),YT=U('<label><input/> <span class="go-checkbox-label"><!></span></label>'),GT=U('<img src="" alt=""/> <option> </option>',1),JT=U('<option disabled hidden="" selected> </option> <!>',1),QT=U("<!>",1),XT=U("<label><!></label> <select><!></select>",1),eA=U('<img style="width: 60px" aria-hidden="true"/>'),tA=U('<span class="go-payment-mode-icons"></span>'),rA=U('<label><input type="radio"/> <!></label>'),nA=U('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),iA=U("<label> <input/></label>"),sA=U("<fieldset><legend><!></legend> <!></fieldset>");function Rg(t,e){ne(e,!0);const r=Q=>{gt();var K=qT(),Y=R(K),ce=G(Y);{var q=j=>{var H=UT();w(j,H)};ae(ce,j=>{c().required&&j(q)})}ue(()=>te(Y,`${h(D)??""} `)),w(Q,K)},n=Q=>{var K=WT(),Y=R(K),ce=I(Y);r(ce),T(Y);var q=G(Y,2);Ve(q,()=>({...h(A),...m,class:p(),placeholder:c().placeholder,type:c().type,name:c().key}),void 0,void 0,void 0,void 0,!0),ue(()=>{zt(Y,1,Gr(f())),Ee(Y,"for",h(O))}),jl(q,()=>c().value,j=>c(c().value=j,!0)),w(Q,K)},i=Q=>{var K=HT(),Y=R(K),ce=I(Y);r(ce),T(Y);var q=G(Y,2),j=fe=>{const L=fe.currentTarget.files;c(c().value=L&&L[0]?L[0]:null,!0),h(_)?h(_).validateField(c()):c().validate()};Ve(q,()=>({...h(A),...m,class:p(),type:"file",accept:"image/*",name:c().key,onchange:j}),void 0,void 0,void 0,void 0,!0);var H=G(q,2);{var le=fe=>{var L=KT(),pe=I(L),B=G(pe,2),Z=I(B,!0);T(B),T(L),ue(ve=>{Ee(L,"data-field-preview",c().key),Ee(pe,"src",h(M)),Ee(pe,"alt",ve),te(Z,c().value.name)},[()=>x.t("forms.file.preview_alt")||"User uploaded photo"]),w(fe,L)};ae(H,fe=>{h(M)&&c().value instanceof File&&fe(le)})}ue(()=>{zt(Y,1,Gr(f())),Ee(Y,"for",h(O))}),w(Q,K)},s=Q=>{var K=YT(),Y=I(K);Ve(Y,()=>({...h(A),...m,name:c().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var ce=G(Y,2),q=I(ce);r(q),T(ce),T(K),ue(()=>{zt(K,1,Gr(f())),Ee(K,"for",h(O))}),zy(Y,()=>c().value===!0,j=>{c(c().value=j,!0)}),w(Q,K)},o=Q=>{var K=XT(),Y=R(K),ce=I(Y);r(ce),T(Y);var q=G(Y,2);Ve(q,()=>({...h(A),...m,name:c().key,class:p()})),Ny(q,()=>{var j=I(q),H=QT(),le=R(H);{var fe=L=>{var pe=JT(),B=R(pe),Z=I(B,!0);T(B),B.value=B.__value="";var ve=G(B,2);Ze(ve,17,()=>c().options(),S=>S.value,(S,Ge)=>{var Le=GT(),je=G(R(Le),2),it=I(je,!0);T(je);var Ue={};ue(()=>{te(it,h(Ge).label),Ue!==(Ue=h(Ge).value)&&(je.value=(je.__value=h(Ge).value)??"")}),w(S,Le)}),ue(S=>te(Z,S),[()=>x.t("common.choose")]),w(L,pe)};ae(le,L=>{c().options&&L(fe)})}w(j,H)}),ue(()=>{zt(Y,1,Gr(f())),Ee(Y,"for",h(O))}),Py(q,()=>c().value,j=>c(c().value=j,!0)),w(Q,K)},a=Q=>{Ng(Q,{get labelClass(){return f()},get inputClass(){return p()},get labelText(){return r},get dateString(){return c().value},set dateString(K){c(c().value=K,!0)}})},l=Q=>{const K=E(()=>x.payment_modes?Object.values(x.payment_modes):[]);var Y=nA(),ce=I(Y),q=I(ce);r(q),T(ce);var j=G(ce,2);Ze(j,17,()=>h(K),H=>H.id,(H,le)=>{var fe=rA(),L=I(fe);Zo(L),L.__change=()=>{c(c().value=String(h(le).id),!0)};var pe=G(L,2);{var B=Z=>{var ve=tA();Ze(ve,20,()=>h(le).icons,S=>S,(S,Ge)=>{const Le=E(()=>N+Ge+".svg");var je=eA();ue(()=>{zt(je,1,Gr(Ge)),Ee(je,"src",h(Le)),Ee(je,"alt",Ge+" icon")}),w(S,je)}),T(ve),w(Z,ve)};ae(pe,Z=>{h(le).icons.length>0&&Z(B)})}T(fe),ue((Z,ve,S)=>{Ee(L,"name",c().key),Rf(L,Z),$y(L,ve),Ee(L,"hidden",h(K).length===1),Ee(L,"aria-label",S)},[()=>String(h(le).id),()=>h(K).length===1||String(h(le).id)===String(c().value),()=>x.t(`cart.paymentMode.ariaLabel.${h(le).name.toLowerCase()}`)]),w(H,fe)}),T(Y),ue(()=>{Ee(Y,"aria-required",c().required),Ee(Y,"aria-invalid",c().errors.length>0)}),w(Q,Y)},u=Q=>{var K=sA(),Y=I(K),ce=I(Y);r(ce),T(Y);var q=G(Y,2);{var j=H=>{var le=W(),fe=R(le);Ze(fe,17,()=>c().options,Er,(L,pe)=>{var B=iA(),Z=I(B),ve=G(Z);Ve(ve,()=>({...h(A),...m,class:p(),type:"radio"}),void 0,void 0,void 0,void 0,!0),T(B),ue(()=>{zt(B,1,Gr(f())),Ee(B,"for",h(O)+h(pe)),te(Z,`${h(pe)??""} `)}),jl(ve,()=>c().value,S=>c(c().value=S,!0)),w(L,B)}),w(H,le)};ae(q,H=>{c().options&&H(j)})}T(K),w(Q,K)};let c=y(e,"field",15),d=y(e,"describedByIds",7),f=y(e,"labelClass",7),p=y(e,"inputClass",7),b=y(e,"host",7),m=We(e,["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]);const g=ji(b()),_=E(()=>g.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:s,select:o,radio:u,date:a,file:i,textarea:null,paymentMode:l},P=E(()=>k[c().type]);let O=E(()=>e.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function $(){c().type!=="checkbox"&&c().value&&(h(_)?h(_).validateField(c()):c().validate())}const A=E(()=>({id:h(O),"aria-describedby":d(),"aria-required":c().required,"aria-invalid":c().errors.length>0,autocomplete:c().autocomplete,onblur:$}));let D=E(()=>x.t(c().label)||c().label);const N="https://cdn.shop.platform.gomus.de/";let M=re(null);ge(()=>{const Q=c().value;if(Q instanceof File&&Q.type.startsWith("image/")){const K=URL.createObjectURL(Q);return C(M,K,!0),()=>{URL.revokeObjectURL(K),C(M,null)}}C(M,null)});var V={get field(){return c()},set field(Q){c(Q),v()},get describedByIds(){return d()},set describedByIds(Q){d(Q),v()},get labelClass(){return f()},set labelClass(Q){f(Q),v()},get inputClass(){return p()},set inputClass(Q){p(Q),v()},get host(){return b()},set host(Q){b(Q),v()}},ee=W(),z=R(ee);{var oe=Q=>{var K=W(),Y=R(K);ye(Y,()=>h(P)),w(Q,K)};ae(z,Q=>{h(P)&&Q(oe)})}return w(t,ee),ie(V)}Sr(["change"]),se(Rg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var oA=U("<span> </span>"),aA=U("<li> </li>"),lA=U('<ul class="go-field-errors"></ul>'),uA=U("<!> <!> <!>",1);function cA(t,e){ne(e,!0);let r=y(e,"key",7),n=y(e,"required",7,!1),i=y(e,"labelClass",7),s=y(e,"inputClass",7),o=re(Fe(Bt.createField(r(),n())));const a=ji(e.$$host),l=E(()=>a.value),u=()=>h(o);let c=E(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map(D=>x.t(D)):[]),d=E(()=>h(o)?.description),f=E(()=>h(c).length>0),p=E(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),b=E(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=E(()=>[h(d)&&h(p),h(f)&&h(b)].filter(Boolean).join(" ")||void 0);ge(()=>{e.$$host.classList.toggle("go-field",!0),e.$$host.classList.toggle("is-invalid",h(c).length>0)}),e.$$host.dataset.testid=r(),ge(()=>{h(o)&&(h(o).mounted=!0,h(o).value,qe(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var g={getField:u,get key(){return r()},set key(D){r(D),v()},get required(){return n()},set required(D=!1){n(D),v()},get labelClass(){return i()},set labelClass(D){i(D),v()},get inputClass(){return s()},set inputClass(D){s(D),v()}},_=uA(),k=R(_);Rg(k,{get describedByIds(){return h(m)},get labelClass(){return i()},get inputClass(){return s()},host:e.$$host,get field(){return h(o)},set field(D){C(o,D,!0)}});var P=G(k,2);{var O=D=>{var N=oA(),M=I(N,!0);T(N),ue(()=>{Ee(N,"id",h(p)),te(M,h(o).description)}),w(D,N)};ae(P,D=>{h(d)&&D(O)})}var $=G(P,2);{var A=D=>{var N=lA();Ze(N,21,()=>h(c),Er,(M,V)=>{var ee=aA(),z=I(ee,!0);T(ee),ue(()=>te(z,h(V))),w(M,ee)}),T(N),ue(()=>Ee(N,"id",h(b))),w(D,N)};ae($,D=>{h(f)&&D(A)})}return w(t,_),ie(g)}customElements.define("go-field",se(cA,{key:{attribute:"key",reflect:!0,type:"String"},required:{attribute:"required",reflect:!0,type:"Boolean"},labelClass:{attribute:"label-class",reflect:!0,type:"String"},inputClass:{attribute:"input-class",reflect:!0,type:"String"}},[],["getField"]));var dA=U("<go-field></go-field>",2);function fA(t,e){ne(e,!0);let r=ji(e.$$host),n=E(()=>r.value),i=E(()=>h(n)?Bt.getFormFields(h(n)?.formId):[]);var s=W(),o=R(s);Ze(o,17,()=>h(i),a=>a.key,(a,l)=>{var u=dA();ue(()=>Yn(u,"key",h(l).key)),ue(()=>Yn(u,"required",h(l).required)),w(a,u)}),w(t,s),ie()}customElements.define("go-all-fields",se(fA,{},[],[]));var hA=U('<p aria-hidden="true"> </p>'),pA=U("<li> </li>"),mA=U('<ul class="go-error-feedback-api-errors"></ul>'),gA=U('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function vA(t,e){ne(e,!0);const r=ji(e.$$host),n=E(()=>r.value);ge(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{C(o,Fu(h(n)?.fields),!0)})});let i=re(0);setInterval(()=>{C(i,Fu(h(n)?.fields)||0,!0)},100);let s=E(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=re(-1);ge(()=>{e.$$host.classList.toggle("is-invalid",h(s)>0),e.$$host.classList.toggle("go-feedback",!0),e.$$host.setAttribute("data-num-errors",h(s).toString())});var a=gA(),l=I(a),u=I(l);{var c=m=>{var g=It();ue(_=>te(g,_),[()=>x.t("forms.errorSummary",{count:h(o)})]),w(m,g)};ae(u,m=>{h(o)>0&&m(c)})}T(l);var d=G(l,2);{var f=m=>{var g=hA(),_=I(g,!0);T(g),ue(k=>te(_,k),[()=>x.t("forms.errorSummary",{count:h(i)})]),w(m,g)};ae(d,m=>{h(i)>0&&m(f)})}var p=G(d,2);{var b=m=>{var g=mA();Ze(g,21,()=>h(n)?.apiErrors,Er,(_,k)=>{var P=pA(),O=I(P,!0);T(P),ue(()=>te(O,h(k))),w(_,P)}),T(g),w(m,g)};ae(p,m=>{h(n)&&Kl(h(n).apiErrors)&&h(n).apiErrors.length>0&&m(b)})}T(a),w(t,a),ie()}customElements.define("go-errors-feedback",se(vA,{},[],[]));var yA=U('<div class="go-form-feedback"><!></div>');function bA(t,e){var r=yA(),n=I(r);Cy(n,e,"default",{}),T(r),w(t,r)}customElements.define("go-form-feedback",se(bA,{},["default"],[]));function _A(t,e){ne(e,!0);let r=y(e,"buttonClass",7,"");Yr(()=>{oi(e.$$host,"button",{type:"submit",class:r()})});var n={get buttonClass(){return r()},set buttonClass(i=""){r(i),v()}};return ie(n)}customElements.define("go-submit",se(_A,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var wA=U('<div aria-live="assertive"> </div>');function kA(t,e){ne(e,!0);const r=ji(e.$$host),n=E(()=>r.value);var i=W(),s=R(i);{var o=a=>{var l=wA();let u;var c=I(l,!0);T(l),ue(()=>{u=zt(l,1,"go-success-feedback go-feedback",null,u,{"is-successful":h(n).successMessage}),te(c,h(n)?.successMessage)}),w(a,l)};ae(s,a=>{h(n)?.successMessage&&a(o)})}w(t,i),ie()}customElements.define("go-success-feedback",se(kA,{},[],[]));var er="INUMBER",Ji="IOP1",Qi="IOP2",Xi="IOP3",un="IVAR",fi="IVARNAME",es="IFUNCALL",Qa="IFUNDEF",$t="IEXPR",od="IEXPREVAL",hi="IMEMBER",Xa="IENDSTATEMENT",ts="IARRAY";function $e(t,e){this.type=t,this.value=e??0}$e.prototype.toString=function(){switch(this.type){case er:case Ji:case Qi:case Xi:case un:case fi:case Xa:return this.value;case es:return"CALL "+this.value;case Qa:return"DEF "+this.value;case ts:return"ARRAY "+this.value;case hi:return"."+this.value;default:return"Invalid Instruction"}};function el(t){return new $e(Ji,t)}function cn(t){return new $e(Qi,t)}function zg(t){return new $e(Xi,t)}function ad(t,e,r,n,i){for(var s=[],o=[],a,l,u,c,d=0;d<t.length;d++){var f=t[d],p=f.type;if(p===er||p===fi)Array.isArray(f.value)?s.push.apply(s,ad(f.value.map(function(b){return new $e(er,b)}).concat(new $e(ts,f.value.length)),e,r,n,i)):s.push(f);else if(p===un&&i.hasOwnProperty(f.value))f=new $e(er,i[f.value]),s.push(f);else if(p===Qi&&s.length>1)l=s.pop(),a=s.pop(),c=r[f.value],f=new $e(er,c(a.value,l.value)),s.push(f);else if(p===Xi&&s.length>2)u=s.pop(),l=s.pop(),a=s.pop(),f.value==="?"?s.push(a.value?l.value:u.value):(c=n[f.value],f=new $e(er,c(a.value,l.value,u.value)),s.push(f));else if(p===Ji&&s.length>0)a=s.pop(),c=e[f.value],f=new $e(er,c(a.value)),s.push(f);else if(p===$t){for(;s.length>0;)o.push(s.shift());o.push(new $e($t,ad(f.value,e,r,n,i)))}else if(p===hi&&s.length>0)a=s.pop(),s.push(new $e(er,a.value[f.value]));else{for(;s.length>0;)o.push(s.shift());o.push(f)}}for(;s.length>0;)o.push(s.shift());return o}function Lg(t,e,r){for(var n=[],i=0;i<t.length;i++){var s=t[i],o=s.type;if(o===un&&s.value===e)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],u;l.type===Ji?u=el(l.value):l.type===Qi?u=cn(l.value):l.type===Xi?u=zg(l.value):u=new $e(l.type,l.value),n.push(u)}else o===$t?n.push(new $e($t,Lg(s.value,e,r))):n.push(s)}return n}function pi(t,e,r){var n=[],i,s,o,a,l,u;if(ld(t))return dn(t,r);for(var c=t.length,d=0;d<c;d++){var f=t[d],p=f.type;if(p===er||p===fi)n.push(f.value);else if(p===Qi)s=n.pop(),i=n.pop(),f.value==="and"?n.push(i?!!pi(s,e,r):!1):f.value==="or"?n.push(i?!0:!!pi(s,e,r)):f.value==="="?(a=e.binaryOps[f.value],n.push(a(i,pi(s,e,r),r))):(a=e.binaryOps[f.value],n.push(a(dn(i,r),dn(s,r))));else if(p===Xi)o=n.pop(),s=n.pop(),i=n.pop(),f.value==="?"?n.push(pi(i?s:o,e,r)):(a=e.ternaryOps[f.value],n.push(a(dn(i,r),dn(s,r),dn(o,r))));else if(p===un)if(f.value in e.functions)n.push(e.functions[f.value]);else if(f.value in e.unaryOps&&e.parser.isOperatorEnabled(f.value))n.push(e.unaryOps[f.value]);else{var b=r[f.value];if(b!==void 0)n.push(b);else throw new Error("undefined variable: "+f.value)}else if(p===Ji)i=n.pop(),a=e.unaryOps[f.value],n.push(a(dn(i,r)));else if(p===es){for(u=f.value,l=[];u-- >0;)l.unshift(dn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(p===Qa)n.push((function(){for(var m=n.pop(),g=[],_=f.value;_-- >0;)g.unshift(n.pop());var k=n.pop(),P=function(){for(var O=Object.assign({},r),$=0,A=g.length;$<A;$++)O[g[$]]=arguments[$];return pi(m,e,O)};return Object.defineProperty(P,"name",{value:k,writable:!1}),r[k]=P,P})());else if(p===$t)n.push(SA(f,e));else if(p===od)n.push(f);else if(p===hi)i=n.pop(),n.push(i[f.value]);else if(p===Xa)n.pop();else if(p===ts){for(u=f.value,l=[];u-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:dn(n[0],r)}function SA(t,e,r){return ld(t)?t:{type:od,value:function(n){return pi(t.value,e,n)}}}function ld(t){return t&&t.type===od}function dn(t,e){return ld(t)?t.value(e):t}function ud(t,e){for(var r=[],n,i,s,o,a,l,u=0;u<t.length;u++){var c=t[u],d=c.type;if(d===er)typeof c.value=="number"&&c.value<0?r.push("("+c.value+")"):Array.isArray(c.value)?r.push("["+c.value.map(Zg).join(", ")+"]"):r.push(Zg(c.value));else if(d===Qi)i=r.pop(),n=r.pop(),o=c.value,e?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(d===Xi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=c.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(d===un||d===fi)r.push(c.value);else if(d===Ji)n=r.pop(),o=c.value,o==="-"||o==="+"?r.push("("+o+n+")"):e?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(d===es){for(l=c.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(d===Qa){for(i=r.pop(),l=c.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),e?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(d===hi)n=r.pop(),r.push(n+"."+c.value);else if(d===ts){for(l=c.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(d===$t)r.push("("+ud(c.value,e)+")");else if(d!==Xa)throw new Error("invalid Expression")}return r.length>1&&(e?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Zg(t){return typeof t=="string"?JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):t}function rs(t,e){for(var r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}function cd(t,e,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<t.length;s++){var o=t[s];o.type===un||o.type===fi?!n&&!rs(e,o.value)?e.push(o.value):(i!==null&&(rs(e,i)||e.push(i)),i=o.value):o.type===hi&&n&&i!==null?i+="."+o.value:o.type===$t?cd(o.value,e,r):i!==null&&(rs(e,i)||e.push(i),i=null)}i!==null&&!rs(e,i)&&e.push(i)}function mr(t,e){this.tokens=t,this.parser=e,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.functions=e.functions}mr.prototype.simplify=function(t){return t=t||{},new mr(ad(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,t),this.parser)},mr.prototype.substitute=function(t,e){return e instanceof mr||(e=this.parser.parse(String(e))),new mr(Lg(this.tokens,t,e),this.parser)},mr.prototype.evaluate=function(t){return t=t||{},pi(this.tokens,this,t)},mr.prototype.toString=function(){return ud(this.tokens,!1)},mr.prototype.symbols=function(t){t=t||{};var e=[];return cd(this.tokens,e,t),e},mr.prototype.variables=function(t){t=t||{};var e=[];cd(this.tokens,e,t);var r=this.functions;return e.filter(function(n){return!(n in r)})},mr.prototype.toJSFunction=function(t,e){var r=this,n=new Function(t,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+ud(this.simplify(e).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var po="TEOF",Ke="TOP",tl="TNUMBER",Vg="TSTRING",fn="TPAREN",ns="TBRACKET",rl="TCOMMA",dd="TNAME",fd="TSEMICOLON";function jg(t,e,r){this.type=t,this.value=e,this.index=r}jg.prototype.toString=function(){return this.type+": "+this.value};function nt(t,e){this.pos=0,this.current=null,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.consts=t.consts,this.expression=e,this.savedPosition=0,this.savedCurrent=null,this.options=t.options,this.parser=t}nt.prototype.newToken=function(t,e,r){return new jg(t,e,r??this.pos)},nt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},nt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},nt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(po,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},nt.prototype.isString=function(){var t=!1,e=this.pos,r=this.expression.charAt(e);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,e+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(e+1,n);this.current=this.newToken(Vg,this.unescape(i),e),t=!0;break}n=this.expression.indexOf(r,n+1)}return t},nt.prototype.isParen=function(){var t=this.expression.charAt(this.pos);return t==="("||t===")"?(this.current=this.newToken(fn,t),this.pos++,!0):!1},nt.prototype.isBracket=function(){var t=this.expression.charAt(this.pos);return(t==="["||t==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ns,t),this.pos++,!0):!1},nt.prototype.isComma=function(){var t=this.expression.charAt(this.pos);return t===","?(this.current=this.newToken(rl,","),this.pos++,!0):!1},nt.prototype.isSemicolon=function(){var t=this.expression.charAt(this.pos);return t===";"?(this.current=this.newToken(fd,";"),this.pos++,!0):!1},nt.prototype.isConst=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(n in this.consts)return this.current=this.newToken(tl,this.consts[n]),this.pos+=n.length,!0}return!1},nt.prototype.isNamedOp=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ke,n),this.pos+=n.length,!0}return!1},nt.prototype.isName=function(){for(var t=this.pos,e=t,r=!1;e<this.expression.length;e++){var n=this.expression.charAt(e);if(n.toUpperCase()===n.toLowerCase()){if(e===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(e===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(t,e);return this.current=this.newToken(dd,i),this.pos+=i.length,!0}return!1},nt.prototype.isWhitespace=function(){for(var t=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===`
10
10
  `||e==="\r")&&(t=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return t};var xA=/^[0-9a-f]{4}$/i;nt.prototype.unescape=function(t){var e=t.indexOf("\\");if(e<0)return t;for(var r=t.substring(0,e);e>=0;){var n=t.charAt(++e);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
11
11
  `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=t.substring(e+1,e+5);xA.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++e;var s=t.indexOf("\\",e);r+=t.substring(e,s<0?t.length:s),e=s}return r},nt.prototype.isComment=function(){var t=this.expression.charAt(this.pos);return t==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},nt.prototype.isRadixInteger=function(){var t=this.pos;if(t>=this.expression.length-2||this.expression.charAt(t)!=="0")return!1;++t;var e,r;if(this.expression.charAt(t)==="x")e=16,r=/^[0-9a-f]$/i,++t;else if(this.expression.charAt(t)==="b")e=2,r=/^[01]$/i,++t;else return!1;for(var n=!1,i=t;t<this.expression.length;){var s=this.expression.charAt(t);if(r.test(s))t++,n=!0;else break}return n&&(this.current=this.newToken(tl,parseInt(this.expression.substring(i,t),e)),this.pos=t),n},nt.prototype.isNumber=function(){for(var t=!1,e=this.pos,r=e,n=e,i=!1,s=!1,o;e<this.expression.length&&(o=this.expression.charAt(e),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,e++,t=s;if(t&&(n=e),o==="e"||o==="E"){e++;for(var a=!0,l=!1;e<this.expression.length;){if(o=this.expression.charAt(e),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;e++}l||(e=n)}return t?(this.current=this.newToken(tl,parseFloat(this.expression.substring(r,e))),this.pos=e):this.pos=n,t},nt.prototype.isOperator=function(){var t=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(Ke,e);else if(e==="∙"||e==="•")this.current=this.newToken(Ke,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,">="),this.pos++):this.current=this.newToken(Ke,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"<="),this.pos++):this.current=this.newToken(Ke,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ke,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"=="),this.pos++):this.current=this.newToken(Ke,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ke,"!="),this.pos++):this.current=this.newToken(Ke,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=t,!1)},nt.prototype.isOperatorEnabled=function(t){return this.parser.isOperatorEnabled(t)},nt.prototype.getCoordinates=function(){var t=0,e,r=-1;do t++,e=this.pos-r,r=this.expression.indexOf(`
12
- `,r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},nt.prototype.parseError=function(t){var e=this.getCoordinates();throw new Error("parse error ["+e.line+":"+e.column+"]: "+t)};function Ye(t,e,r){this.parser=t,this.tokens=e,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(t,e){return typeof e>"u"?!0:Array.isArray(e)?rs(e,t.value):typeof e=="function"?e(t):t.value===e},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(t,e){return this.nextToken.type===t&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1},Ye.prototype.expect=function(t,e){if(!this.accept(t,e)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(e||t))}},Ye.prototype.parseAtom=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.accept(dd)||this.accept(Ke,r))t.push(new $e(un,this.current.value));else if(this.accept(tl))t.push(new $e(er,this.current.value));else if(this.accept(Vg))t.push(new $e(er,this.current.value));else if(this.accept(fn,"("))this.parseExpression(t),this.expect(fn,")");else if(this.accept(ns,"["))if(this.accept(ns,"]"))t.push(new $e(ts,0));else{var n=this.parseArrayList(t);t.push(new $e(ts,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(t){var e=[];this.parseUntilEndStatement(t,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(t,e)&&this.pushExpression(t,e))},Ye.prototype.pushExpression=function(t,e){for(var r=0,n=e.length;r<n;r++)t.push(e[r])},Ye.prototype.parseUntilEndStatement=function(t,e){return this.accept(fd)?(this.nextToken&&this.nextToken.type!==po&&!(this.nextToken.type===fn&&this.nextToken.value===")")&&e.push(new $e(Xa)),this.nextToken.type!==po&&this.parseExpression(e),t.push(new $e($t,e)),!0):!1},Ye.prototype.parseArrayList=function(t){for(var e=0;!this.accept(ns,"]");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},Ye.prototype.parseVariableAssignmentExpression=function(t){for(this.parseConditionalExpression(t);this.accept(Ke,"=");){var e=t.pop(),r=[],n=t.length-1;if(e.type===es){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=e.value+1;i<s;i++){var o=n-i;t[o].type===un&&(t[o]=new $e(fi,t[o].value))}this.parseVariableAssignmentExpression(r),t.push(new $e($t,r)),t.push(new $e(Qa,e.value));continue}if(e.type!==un&&e.type!==hi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),t.push(new $e(fi,e.value)),t.push(new $e($t,r)),t.push(cn("="))}},Ye.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(Ke,"?");){var e=[],r=[];this.parseConditionalExpression(e),this.expect(Ke,":"),this.parseConditionalExpression(r),t.push(new $e($t,e)),t.push(new $e($t,r)),t.push(zg("?"))}},Ye.prototype.parseOrExpression=function(t){for(this.parseAndExpression(t);this.accept(Ke,"or");){var e=[];this.parseAndExpression(e),t.push(new $e($t,e)),t.push(cn("or"))}},Ye.prototype.parseAndExpression=function(t){for(this.parseComparison(t);this.accept(Ke,"and");){var e=[];this.parseComparison(e),t.push(new $e($t,e)),t.push(cn("and"))}};var EA=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(t){for(this.parseAddSub(t);this.accept(Ke,EA);){var e=this.current;this.parseAddSub(t),t.push(cn(e.value))}};var OA=["+","-","||"];Ye.prototype.parseAddSub=function(t){for(this.parseTerm(t);this.accept(Ke,OA);){var e=this.current;this.parseTerm(t),t.push(cn(e.value))}};var CA=["*","/","%"];Ye.prototype.parseTerm=function(t){for(this.parseFactor(t);this.accept(Ke,CA);){var e=this.current;this.parseFactor(t),t.push(cn(e.value))}},Ye.prototype.parseFactor=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.save(),this.accept(Ke,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===fn&&this.nextToken.value==="("){this.restore(),this.parseExponential(t);return}else if(this.nextToken.type===fd||this.nextToken.type===rl||this.nextToken.type===po||this.nextToken.type===fn&&this.nextToken.value===")"){this.restore(),this.parseAtom(t);return}}var n=this.current;this.parseFactor(t),t.push(el(n.value))}else this.parseExponential(t)},Ye.prototype.parseExponential=function(t){for(this.parsePostfixExpression(t);this.accept(Ke,"^");)this.parseFactor(t),t.push(cn("^"))},Ye.prototype.parsePostfixExpression=function(t){for(this.parseFunctionCall(t);this.accept(Ke,"!");)t.push(el("!"))},Ye.prototype.parseFunctionCall=function(t){var e=this.tokens.unaryOps;function r(s){return s.value in e}if(this.accept(Ke,r)){var n=this.current;this.parseAtom(t),t.push(el(n.value))}else for(this.parseMemberExpression(t);this.accept(fn,"(");)if(this.accept(fn,")"))t.push(new $e(es,0));else{var i=this.parseArgumentList(t);t.push(new $e(es,i))}},Ye.prototype.parseArgumentList=function(t){for(var e=0;!this.accept(fn,")");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},Ye.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(Ke,".")||this.accept(ns,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(dd),t.push(new $e(hi,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(t),this.expect(ns,"]"),t.push(cn("["))}else throw new Error("unexpected symbol: "+e.value)}};function TA(t,e){return Number(t)+Number(e)}function AA(t,e){return t-e}function DA(t,e){return t*e}function IA(t,e){return t/e}function PA(t,e){return t%e}function $A(t,e){return Array.isArray(t)&&Array.isArray(e)?t.concat(e):""+t+e}function MA(t,e){return t===e}function FA(t,e){return t!==e}function NA(t,e){return t>e}function RA(t,e){return t<e}function zA(t,e){return t>=e}function LA(t,e){return t<=e}function ZA(t,e){return!!(t&&e)}function VA(t,e){return!!(t||e)}function jA(t,e){return rs(e,t)}function BA(t){return(Math.exp(t)-Math.exp(-t))/2}function UA(t){return(Math.exp(t)+Math.exp(-t))/2}function qA(t){return t===1/0?1:t===-1/0?-1:(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function WA(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))}function KA(t){return Math.log(t+Math.sqrt(t*t-1))}function HA(t){return Math.log((1+t)/(1-t))/2}function Bg(t){return Math.log(t)*Math.LOG10E}function YA(t){return-t}function GA(t){return!t}function JA(t){return t<0?Math.ceil(t):Math.floor(t)}function QA(t){return Math.random()*(t||1)}function Ug(t){return pd(t+1)}function XA(t){return isFinite(t)&&t===Math.round(t)}var eD=4.7421875,hd=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function pd(t){var e,r;if(XA(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,i=t-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*pd(1-t));if(t>=171.35)return 1/0;if(t>85){var s=t*t,o=s*t,a=o*t,l=a*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*t))}--t,r=hd[0];for(var u=1;u<hd.length;++u)r+=hd[u]/(t+u);return e=t+eD+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r}function tD(t){return Array.isArray(t)?t.length:String(t).length}function qg(){for(var t=0,e=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;e<n?(i=e/n,t=t*i*i+1,e=n):n>0?(i=n/e,t+=i*i):t+=n}return e===1/0?1/0:e*Math.sqrt(t)}function Wg(t,e,r){return t?e:r}function rD(t,e){return typeof e>"u"||+e==0?Math.round(t):(t=+t,e=-+e,isNaN(t)||!(typeof e=="number"&&e%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function nD(t,e,r){return r&&(r[t]=e),e}function iD(t,e){return t[e|0]}function sD(t){return arguments.length===1&&Array.isArray(t)?Math.max.apply(Math,t):Math.max.apply(Math,arguments)}function oD(t){return arguments.length===1&&Array.isArray(t)?Math.min.apply(Math,t):Math.min.apply(Math,arguments)}function aD(t,e){if(typeof t!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(r,n){return t(r,n)})}function lD(t,e,r){if(typeof t!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return t(n,i,s)},e)}function uD(t,e){if(typeof t!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(r,n){return t(r,n)})}function cD(t,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(t)}function dD(t,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(t)}function fD(t){return(t>0)-(t<0)||+t}var Kg=1/3;function hD(t){return t<0?-Math.pow(-t,Kg):Math.pow(t,Kg)}function pD(t){return Math.exp(t)-1}function mD(t){return Math.log(1+t)}function gD(t){return Math.log(t)/Math.LN2}function mi(t){this.options=t||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||BA,cosh:Math.cosh||UA,tanh:Math.tanh||qA,asinh:Math.asinh||WA,acosh:Math.acosh||KA,atanh:Math.atanh||HA,sqrt:Math.sqrt,cbrt:Math.cbrt||hD,log:Math.log,log2:Math.log2||gD,ln:Math.log,lg:Math.log10||Bg,log10:Math.log10||Bg,expm1:Math.expm1||pD,log1p:Math.log1p||mD,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||JA,"-":YA,"+":Number,exp:Math.exp,not:GA,length:tD,"!":Ug,sign:Math.sign||fD},this.binaryOps={"+":TA,"-":AA,"*":DA,"/":IA,"%":PA,"^":Math.pow,"||":$A,"==":MA,"!=":FA,">":NA,"<":RA,">=":zA,"<=":LA,and:ZA,or:VA,in:jA,"=":nD,"[":iD},this.ternaryOps={"?":Wg},this.functions={random:QA,fac:Ug,min:oD,max:sD,hypot:Math.hypot||qg,pyt:Math.hypot||qg,pow:Math.pow,atan2:Math.atan2,if:Wg,gamma:pd,roundTo:rD,map:aD,fold:lD,filter:uD,indexOf:cD,join:dD},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}mi.prototype.parse=function(t){var e=[],r=new Ye(this,new nt(this,t),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(e),r.expect(po,"EOF"),new mr(e,this)},mi.prototype.evaluate=function(t,e){return this.parse(t).evaluate(e)};var Hg=new mi;mi.parse=function(t){return Hg.parse(t)},mi.evaluate=function(t,e){return Hg.parse(t).evaluate(e)};var Yg={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function vD(t){return Yg.hasOwnProperty(t)?Yg[t]:t}mi.prototype.isOperatorEnabled=function(t){var e=vD(t),r=this.options.operators||{};return!(e in r)||!!r[e]};const yD=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,bD=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,_D=/(__optional\("[^"]+"\))\.length\b/g,wD=new mi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Gg=new Map;function kD(t){return t.replace(yD,e=>e.includes("?.")?`__optional("${e.replace(/\?\./g,".")}")`:e).replace(bD,(e,r)=>`__length(${r})`).replace(_D,(e,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function SD(t){const e=Gg.get(t);if(e)return e;const r=wD.parse(kD(t));return Gg.set(t,r),r}function xD(t,e){if(t==null||typeof t!="string")return t;const r={data:e,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=SD(t);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${t}) in go-if: ${n.message}`)}}const Jg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price"],ED={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.selectedDate)return;const{quotas:e}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));x.capacityManager.addQuotas(e)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTimeslot)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Fn(r,e.selectedTime),s=Mn(i,e.selectedTime);for(const o of s)t.preCart.addItem(mt(o,{time:e.selectedTime}))}},OD={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Fn(r,s),a=Mn(o,s);for(const l of a)t.preCart.addItem(mt(l,{time:s}))}},CD={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e)return;const r=await x.asyncFetch(()=>x.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));for(const n of Object.values(r))t.preCart.addItem(mt(sa(n)))}},TD={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!(await x.asyncFetch(()=>x.getEvent(e.eventIds[0]))).tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),date_id:t.dateId}));x.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(mt(a,{time:e.selectedTime}))}},AD={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate)return;const r=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:e.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Fn(n,o),l=Mn(a,o);for(const u of l)t.preCart.addItem(mt(u,{time:o}))}},DD={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!e.selectedTimeslot)return;const r=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(mt(a,{time:e.selectedTime}))}},ID={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||t.dateId===void 0)return;const r=await x.asyncFetch(()=>x.getEventDetailsOnDate(e.eventIds[0],t.dateId));if(r.prices?.length){for(const n of r.prices){const i=_u(n,r.id,{event_title:r.event_title});t.preCart.addItem(mt(i,{time:r.start_time}))}r.seats&&x.capacityManager.addSeats(r.id,r.seats)}}},PD=7200*1e3;function nl(t,e,r){const n=Date.parse(r);return t.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===e&&o>=n&&o<=n+PD&&(i.seats?.available??0)>0})}async function il(t){if(!t?.selectedDate)return;const{quotas:e}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));x.capacityManager.addQuotas(e)}const $D={"ticket:timeslot":ED,"ticket:day":OD,"ticket:annual":CD,"event:admission":TD,"event:admission:day":AD,"event:admission:timeslot":DD,"event:price":ID,"events:admission":{name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(mt(c,{time:i.start_time}))}}},"events:admission:day":{name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Object.values(a)[0],u=l?Object.keys(l.capacities)[0]:i.start_time,c=Fn(o,u),d=Mn(c,u);for(const f of d)t.preCart.addItem(mt(f,{time:u}))}}},"events:admission:timeslot":{name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(mt(c,{time:i.start_time}))}}},"events:price":{name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime),i=t.query;for(const s of n){if(!s.prices?.length)continue;const o=i?s.prices.filter(a=>a.title?.includes(i)):s.prices;for(const a of o){const l=_u(a,s.id,{event_title:s.event_title});t.preCart.addItem(mt(l,{time:s.start_time}))}s.seats&&x.capacityManager.addSeats(s.id,s.seats)}}}};function gi(t){const e=$D[t];return e||console.warn(`[ticket-selection] Unknown filter "${t}". Valid filters: ${Jg.join(", ")}`),e}const Qg=Jg;let MD=0;class FD{uid=MD++;#e=re();get filters(){return h(this.#e)}set filters(e){C(this.#e,e,!0)}#t=re();get eventIds(){return h(this.#t)}set eventIds(e){C(this.#t,e,!0)}#r=re();get museumIds(){return h(this.#r)}set museumIds(e){C(this.#r,e,!0)}#n=re();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){C(this.#n,e,!0)}#i=re();get ticketIds(){return h(this.#i)}set ticketIds(e){C(this.#i,e,!0)}#s=re();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){C(this.#s,e,!0)}#a=re();get selectedDate(){return h(this.#a)}set selectedDate(e){C(this.#a,e,!0)}#o=re();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){C(this.#o,e,!0)}#l=E(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){C(this.#l,e)}#u=re(Fe([]));get ticketSegments(){return h(this.#u)}set ticketSegments(e){C(this.#u,e,!0)}#d=E(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#d)}set preCarts(e){C(this.#d,e)}#c=re();get timeslotDetails(){return h(this.#c)}set timeslotDetails(e){C(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>gi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>gi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>gi(e).isTicketsVisible(this))}}const Xg="go-ticket-selection",ND=qs(Xg),hn=Ws(Xg);function RD(t,e){ne(e,!0);let r=y(e,"when",7),n=y(e,"then",7,"show");const i=hn(e.$$host),s=E(()=>i.value),o=Ow(e.$$host),a=E(()=>o.value),l=ji(e.$$host),u=E(()=>l.value);let c=E(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(u)?.formData,cart:x.cart}));const d=g=>{C(c,g)},f=()=>h(c);let p=E(()=>xD(r(),h(c))),b=null;ge(()=>{const g=e.$$host;if(h(p)&&n()==="show")b&&(g.appendChild(b),b=null);else if(!b&&g.childNodes.length>0)for(b=document.createDocumentFragment();g.firstChild;)b.appendChild(g.firstChild)});var m={_setData:d,_getData:f,get when(){return r()},set when(g){r(g),v()},get then(){return n()},set then(g="show"){n(g),v()}};return ie(m)}customElements.define("go-if",se(RD,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ev(t,e){ne(e,!0);let r=y(e,"apiUrl",7),n=y(e,"shopDomain",7),i=y(e,"locale",7);i(i()||localStorage.getItem("lang")||"en"),ge(()=>{(n()!==x.shopDomain||r()!==x.apiUrl||i()!==x.locale)&&(x.load(r(),n(),i()),console.warn("shop loaded due to prop change"))});var s={get apiUrl(){return r()},set apiUrl(o){r(o),v()},get shopDomain(){return n()},set shopDomain(o){n(o),v()},get locale(){return i()},set locale(o){i(o),v()}};return ie(s)}customElements.define("gomus-init",se(ev,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function zD(t,e){ne(e,!0);let r=y(e,"apiDomain",7),n=y(e,"shopDomain",7),i=y(e,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),v()},get shopDomain(){return n()},set shopDomain(a){n(a),v()},get locale(){return i()},set locale(a){i(a),v()}};return ev(t,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(o)}customElements.define("go-init",se(zD,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function LD(t,e){ne(e,!0);const r=y(e,"to",7),n=E(()=>et.config.urls[r()]),i=oi(e.$$host,"a");ge(()=>{if(!h(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",h(n)())}),i.addEventListener("click",o=>{if(o.preventDefault(),!et.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}et.config.navigateTo(et.config.urls[r()]())});var s={get to(){return r()},set to(o){r(o),v()}};return ie(s)}customElements.define("go-link",se(LD,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));class ZD{#e=re();get token(){return h(this.#e)}set token(e){C(this.#e,e,!0)}constructor(e){this.token=e}get order(){return this.token?gl(x.order(this.token)):void 0}downloadLink(e,r){if(this.order?.is_valid)switch(e.type){case"Event":return`${x.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?et.config.urls.annualTicketPersonalizationList?.()?et.config.urls.annualTicketPersonalizationList(this.token):x.urls?.annualTicketPersonalizationList(this.token):`${x.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}&barcode_id=${r}`}}}const tv="go-order-details",VD=qs(tv),rv=Ws(tv);function jD(t,e){ne(e,!0);let r=y(e,"token",7);const n=new ZD(r());VD(e.$$host,n),Yr(()=>{x.cart.clearItems(),x.auth.isGuest()&&x.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),v()}};return ie(i)}customElements.define("go-order",se(jD,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var BD=U('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),UD=U('<br/> <span class="go-order-item-quantities"> </span>',1),qD=U('<a aria-label="iCal link"> </a>'),WD=U('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function nv(t,e){ne(e,!0);let r=y(e,"item",7),n=y(e,"orderDetails",7);var i={get item(){return r()},set item($){r($),v()},get orderDetails(){return n()},set orderDetails($){n($),v()}},s=WD(),o=I(s),a=I(o),l=G(I(a),2),u=I(l),c=I(u,!0);T(u);var d=G(u,2);{var f=$=>{var A=BD(),D=R(A),N=I(D,!0);T(D);var M=G(D,2),V=I(M,!0);T(M),ue((ee,z)=>{te(N,ee),te(V,z)},[()=>js(r().attributes.start_time,{month:"numeric",day:"numeric"},x.locale),()=>Vs(r().attributes.start_time)]),w($,A)};ae(d,$=>{r().attributes.start_time&&$(f)})}var p=G(d,2);Ze(p,17,()=>r().attributes.quantities,$=>$.id,($,A)=>{var D=UD(),N=G(R(D),2),M=I(N);T(N),ue(()=>te(M,`${h(A).quantity??""} x ${h(A).title??""}`)),w($,D)});var b=G(p,2),m=I(b,!0);T(b),T(l);var g=G(l,2),_=I(g,!0);T(g);var k=G(g,4),P=I(k);{var O=$=>{var A=qD(),D=I(A,!0);T(A),ue(N=>{Ee(A,"href",x.apiUrl+r().attributes.ical_url),te(D,N)},[()=>x.t("common.calendar")]),w($,A)};ae(P,$=>{r().attributes.ical_url&&$(O)})}return T(k),T(a),T(o),T(s),ue(($,A,D)=>{te(c,r().attributes.title),Ee(b,"href",$),te(m,A),te(_,D)},[()=>n().downloadLink(r()),()=>x.t("common.download"),()=>ia(r().price_cents)]),w(t,s),ie(i)}se(nv,{item:{},orderDetails:{}},[],[],{mode:"open"});var KD=U('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),HD=U('<span class="go-cart-item-date"> </span>'),YD=U('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),GD=U('<br/> <a class="go-ticket-personalization"> </a>',1),JD=U('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),QD=U('<a aria-label="iCal link"> </a>'),XD=U('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),eI=U('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),tI=U('<a class="go-ticket-personalization"> </a>'),rI=U('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function iv(t,e){ne(e,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${x.locale}.svg`;let n=y(e,"item",7),i=y(e,"orderDetails",7);var s={get item(){return n()},set item(c){n(c),v()},get orderDetails(){return i()},set orderDetails(c){i(c),v()}},o=W(),a=R(o);{var l=c=>{var d=W(),f=R(d);Ze(f,17,()=>({length:n().attributes.quantity}),Er,(p,b,m)=>{var g=XD(),_=I(g),k=I(_),P=I(k);P.textContent="1";var O=G(P,2),$=I(O),A=I($,!0);T($);var D=G($,2);{var N=q=>{const j=E(()=>n().attributes.barcodes[m].id);var H=YD(),le=R(H);{var fe=Z=>{var ve=KD(),S=R(ve),Ge=I(S,!0);T(S);var Le=G(S,2),je=I(Le,!0);T(Le),ue((it,Ue)=>{te(Ge,it),te(je,Ue)},[()=>js(n().attributes.start_time,{month:"numeric",day:"numeric"},x.locale),()=>Vs(n().attributes.start_time)]),w(Z,ve)},L=Z=>{var ve=W(),S=R(ve);{var Ge=Le=>{var je=HD(),it=I(je,!0);T(je),ue(Ue=>te(it,Ue),[()=>js(n().attributes.start_time,{month:"numeric",day:"numeric"},x.locale)]),w(Le,je)};ae(S,Le=>{n().attributes.ticket_type==="normal"&&Le(Ge)},!0)}w(Z,ve)};ae(le,Z=>{n().attributes.ticket_type==="time_slot"?Z(fe):Z(L,!1)})}var pe=G(le,4),B=I(pe,!0);T(pe),ue((Z,ve)=>{Ee(pe,"href",Z),te(B,ve)},[()=>i().downloadLink(n(),h(j)),()=>x.t("common.download")]),w(q,H)},M=q=>{var j=GD(),H=G(R(j),2),le=I(H,!0);T(H),ue((fe,L)=>{Ee(H,"href",fe),te(le,L)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),w(q,j)};ae(D,q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?q(N):q(M,!1)})}T(O);var V=G(O,2),ee=I(V,!0);T(V);var z=G(V,2),oe=I(z);{var Q=q=>{var j=JD(),H=I(j);T(j),ue(()=>{Ee(j,"href",x.apiUrl+n().attributes.barcodes[m]?.passbook_url),Ee(H,"src",r)}),w(q,j)};ae(oe,q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&q(Q)})}T(z);var K=G(z,2),Y=I(K);{var ce=q=>{var j=QD(),H=I(j,!0);T(j),ue(le=>{Ee(j,"href",x.apiUrl+n().attributes.ical_url),te(H,le)},[()=>x.t("common.calendar")]),w(q,j)};ae(Y,q=>{n().attributes.ical_url&&q(ce)})}T(K),T(k),T(_),T(g),ue(q=>{te(A,n().attributes.title),te(ee,q)},[()=>ia(n().price_cents)]),w(p,g)}),w(c,d)},u=c=>{var d=rI(),f=I(d),p=I(f),b=I(p),m=I(b,!0);T(b);var g=G(b,2),_=I(g),k=I(_,!0);T(_);var P=G(_,2);{var O=N=>{var M=eI(),V=I(M,!0);T(M),ue((ee,z)=>{Ee(M,"href",ee),te(V,z)},[()=>i().downloadLink(n()),()=>x.t("common.download")]),w(N,M)},$=N=>{var M=tI(),V=I(M,!0);T(M),ue((ee,z)=>{Ee(M,"href",ee),te(V,z)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),w(N,M)};ae(P,N=>{n().attributes.is_voucher?N(O):N($,!1)})}T(g);var A=G(g,2),D=I(A,!0);T(A),gt(2),T(p),T(f),T(d),ue(N=>{te(m,n().attributes.quantity),te(k,n().attributes.title),te(D,N)},[()=>ia(n().price_cents)]),w(c,d)};ae(a,c=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?c(l):c(u,!1)})}return w(t,o),ie(s)}se(iv,{item:{},orderDetails:{}},[],[],{mode:"open"});var nI=U('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function iI(t,e){ne(e,!0);const r=rv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);var s=W(),o=R(s);{var a=l=>{var u=nI(),c=I(u),d=I(c),f=I(d),p=I(f,!0);T(f);var b=G(f,2),m=I(b,!0);T(b);var g=G(b,2),_=I(g,!0);T(g),gt(2),T(d),T(c);var k=G(c,2);Ze(k,17,()=>h(i).items,D=>D.id,(D,N)=>{var M=W(),V=R(M);{var ee=oe=>{iv(oe,{get item(){return h(N)},get orderDetails(){return h(n)}})},z=oe=>{var Q=W(),K=R(Q);{var Y=ce=>{nv(ce,{get item(){return h(N)},get orderDetails(){return h(n)}})};ae(K,ce=>{h(N).type==="Event"&&ce(Y)},!0)}w(oe,Q)};ae(V,oe=>{h(N).type==="Ticket"?oe(ee):oe(z,!1)})}w(D,M)});var P=G(k,2),O=I(P),$=G(I(O),4),A=I($,!0);T($),gt(2),T(O),T(P),T(u),ue((D,N,M,V)=>{te(p,D),te(m,N),te(_,M),te(A,V)},[()=>x.t("common.table.count"),()=>x.t("common.table.product"),()=>x.t("common.table.price"),()=>x.t("common.table.total",{value:ia(h(i).total_price_cents)})]),w(l,u)};ae(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ie()}customElements.define("go-order-breakdown",se(iI,{},[],[]));function sI(t,e){ne(e,!0);const r=rv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);gt();var s=It();ue(()=>te(s,h(i)?.id)),w(t,s),ie()}customElements.define("go-order-invoice-id",se(sI,{},[],[]));var oI=U("<go-form></go-form>",2);function aI(t,e){ne(e,!1),Bt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const o=i.target.details,a=await x.updatePassword(o.formData);a.data?(o.successMessage=x.t("user.passwordSuccess.desc.title"),o.apiErrors=[]):o.apiErrors=a.error?.errors||a.error||a.errors}jo();var n=oI();Yn(n,"formId","passwordResetForm"),Pl("submit",n,r),w(t,n),ie()}customElements.define("go-profile-password",se(aI,{},[],[]));var lI=U("<go-form></go-form>",2);function uI(t,e){ne(e,!0),Bt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=re(void 0);const n=E(()=>x.validateToken());Yr(async()=>{await x.waitForAllFetches(),await Wl(()=>h(r).details),await Wl(()=>h(n).data),h(r).details.fill(h(n).data)});var i=lI();Yn(i,"formId","accountDetailsForm"),Zf(i,s=>C(r,s),()=>h(r)),w(t,i),ie()}customElements.define("go-profile-details",se(uI,{},[],[]));var cI=U('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function dI(t,e){ne(e,!0);const r=E(()=>x.validateToken()),n=E(()=>h(r)?.data);var i=W(),s=R(i);{var o=l=>{var u=cI(),c=R(u),d=I(c);T(c);var f=G(c,2),p=I(f,!0);T(f),ue(()=>{te(d,`${h(n).name??""}
12
+ `,r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},nt.prototype.parseError=function(t){var e=this.getCoordinates();throw new Error("parse error ["+e.line+":"+e.column+"]: "+t)};function Ye(t,e,r){this.parser=t,this.tokens=e,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(t,e){return typeof e>"u"?!0:Array.isArray(e)?rs(e,t.value):typeof e=="function"?e(t):t.value===e},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(t,e){return this.nextToken.type===t&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1},Ye.prototype.expect=function(t,e){if(!this.accept(t,e)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(e||t))}},Ye.prototype.parseAtom=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.accept(dd)||this.accept(Ke,r))t.push(new $e(un,this.current.value));else if(this.accept(tl))t.push(new $e(er,this.current.value));else if(this.accept(Vg))t.push(new $e(er,this.current.value));else if(this.accept(fn,"("))this.parseExpression(t),this.expect(fn,")");else if(this.accept(ns,"["))if(this.accept(ns,"]"))t.push(new $e(ts,0));else{var n=this.parseArrayList(t);t.push(new $e(ts,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(t){var e=[];this.parseUntilEndStatement(t,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(t,e)&&this.pushExpression(t,e))},Ye.prototype.pushExpression=function(t,e){for(var r=0,n=e.length;r<n;r++)t.push(e[r])},Ye.prototype.parseUntilEndStatement=function(t,e){return this.accept(fd)?(this.nextToken&&this.nextToken.type!==po&&!(this.nextToken.type===fn&&this.nextToken.value===")")&&e.push(new $e(Xa)),this.nextToken.type!==po&&this.parseExpression(e),t.push(new $e($t,e)),!0):!1},Ye.prototype.parseArrayList=function(t){for(var e=0;!this.accept(ns,"]");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},Ye.prototype.parseVariableAssignmentExpression=function(t){for(this.parseConditionalExpression(t);this.accept(Ke,"=");){var e=t.pop(),r=[],n=t.length-1;if(e.type===es){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=e.value+1;i<s;i++){var o=n-i;t[o].type===un&&(t[o]=new $e(fi,t[o].value))}this.parseVariableAssignmentExpression(r),t.push(new $e($t,r)),t.push(new $e(Qa,e.value));continue}if(e.type!==un&&e.type!==hi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),t.push(new $e(fi,e.value)),t.push(new $e($t,r)),t.push(cn("="))}},Ye.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(Ke,"?");){var e=[],r=[];this.parseConditionalExpression(e),this.expect(Ke,":"),this.parseConditionalExpression(r),t.push(new $e($t,e)),t.push(new $e($t,r)),t.push(zg("?"))}},Ye.prototype.parseOrExpression=function(t){for(this.parseAndExpression(t);this.accept(Ke,"or");){var e=[];this.parseAndExpression(e),t.push(new $e($t,e)),t.push(cn("or"))}},Ye.prototype.parseAndExpression=function(t){for(this.parseComparison(t);this.accept(Ke,"and");){var e=[];this.parseComparison(e),t.push(new $e($t,e)),t.push(cn("and"))}};var EA=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(t){for(this.parseAddSub(t);this.accept(Ke,EA);){var e=this.current;this.parseAddSub(t),t.push(cn(e.value))}};var OA=["+","-","||"];Ye.prototype.parseAddSub=function(t){for(this.parseTerm(t);this.accept(Ke,OA);){var e=this.current;this.parseTerm(t),t.push(cn(e.value))}};var CA=["*","/","%"];Ye.prototype.parseTerm=function(t){for(this.parseFactor(t);this.accept(Ke,CA);){var e=this.current;this.parseFactor(t),t.push(cn(e.value))}},Ye.prototype.parseFactor=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.save(),this.accept(Ke,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===fn&&this.nextToken.value==="("){this.restore(),this.parseExponential(t);return}else if(this.nextToken.type===fd||this.nextToken.type===rl||this.nextToken.type===po||this.nextToken.type===fn&&this.nextToken.value===")"){this.restore(),this.parseAtom(t);return}}var n=this.current;this.parseFactor(t),t.push(el(n.value))}else this.parseExponential(t)},Ye.prototype.parseExponential=function(t){for(this.parsePostfixExpression(t);this.accept(Ke,"^");)this.parseFactor(t),t.push(cn("^"))},Ye.prototype.parsePostfixExpression=function(t){for(this.parseFunctionCall(t);this.accept(Ke,"!");)t.push(el("!"))},Ye.prototype.parseFunctionCall=function(t){var e=this.tokens.unaryOps;function r(s){return s.value in e}if(this.accept(Ke,r)){var n=this.current;this.parseAtom(t),t.push(el(n.value))}else for(this.parseMemberExpression(t);this.accept(fn,"(");)if(this.accept(fn,")"))t.push(new $e(es,0));else{var i=this.parseArgumentList(t);t.push(new $e(es,i))}},Ye.prototype.parseArgumentList=function(t){for(var e=0;!this.accept(fn,")");)for(this.parseExpression(t),++e;this.accept(rl);)this.parseExpression(t),++e;return e},Ye.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(Ke,".")||this.accept(ns,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(dd),t.push(new $e(hi,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(t),this.expect(ns,"]"),t.push(cn("["))}else throw new Error("unexpected symbol: "+e.value)}};function TA(t,e){return Number(t)+Number(e)}function AA(t,e){return t-e}function DA(t,e){return t*e}function IA(t,e){return t/e}function PA(t,e){return t%e}function $A(t,e){return Array.isArray(t)&&Array.isArray(e)?t.concat(e):""+t+e}function MA(t,e){return t===e}function FA(t,e){return t!==e}function NA(t,e){return t>e}function RA(t,e){return t<e}function zA(t,e){return t>=e}function LA(t,e){return t<=e}function ZA(t,e){return!!(t&&e)}function VA(t,e){return!!(t||e)}function jA(t,e){return rs(e,t)}function BA(t){return(Math.exp(t)-Math.exp(-t))/2}function UA(t){return(Math.exp(t)+Math.exp(-t))/2}function qA(t){return t===1/0?1:t===-1/0?-1:(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function WA(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))}function KA(t){return Math.log(t+Math.sqrt(t*t-1))}function HA(t){return Math.log((1+t)/(1-t))/2}function Bg(t){return Math.log(t)*Math.LOG10E}function YA(t){return-t}function GA(t){return!t}function JA(t){return t<0?Math.ceil(t):Math.floor(t)}function QA(t){return Math.random()*(t||1)}function Ug(t){return pd(t+1)}function XA(t){return isFinite(t)&&t===Math.round(t)}var eD=4.7421875,hd=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function pd(t){var e,r;if(XA(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,i=t-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*pd(1-t));if(t>=171.35)return 1/0;if(t>85){var s=t*t,o=s*t,a=o*t,l=a*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*t))}--t,r=hd[0];for(var u=1;u<hd.length;++u)r+=hd[u]/(t+u);return e=t+eD+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r}function tD(t){return Array.isArray(t)?t.length:String(t).length}function qg(){for(var t=0,e=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;e<n?(i=e/n,t=t*i*i+1,e=n):n>0?(i=n/e,t+=i*i):t+=n}return e===1/0?1/0:e*Math.sqrt(t)}function Wg(t,e,r){return t?e:r}function rD(t,e){return typeof e>"u"||+e==0?Math.round(t):(t=+t,e=-+e,isNaN(t)||!(typeof e=="number"&&e%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function nD(t,e,r){return r&&(r[t]=e),e}function iD(t,e){return t[e|0]}function sD(t){return arguments.length===1&&Array.isArray(t)?Math.max.apply(Math,t):Math.max.apply(Math,arguments)}function oD(t){return arguments.length===1&&Array.isArray(t)?Math.min.apply(Math,t):Math.min.apply(Math,arguments)}function aD(t,e){if(typeof t!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(r,n){return t(r,n)})}function lD(t,e,r){if(typeof t!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return t(n,i,s)},e)}function uD(t,e){if(typeof t!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(r,n){return t(r,n)})}function cD(t,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(t)}function dD(t,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(t)}function fD(t){return(t>0)-(t<0)||+t}var Kg=1/3;function hD(t){return t<0?-Math.pow(-t,Kg):Math.pow(t,Kg)}function pD(t){return Math.exp(t)-1}function mD(t){return Math.log(1+t)}function gD(t){return Math.log(t)/Math.LN2}function mi(t){this.options=t||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||BA,cosh:Math.cosh||UA,tanh:Math.tanh||qA,asinh:Math.asinh||WA,acosh:Math.acosh||KA,atanh:Math.atanh||HA,sqrt:Math.sqrt,cbrt:Math.cbrt||hD,log:Math.log,log2:Math.log2||gD,ln:Math.log,lg:Math.log10||Bg,log10:Math.log10||Bg,expm1:Math.expm1||pD,log1p:Math.log1p||mD,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||JA,"-":YA,"+":Number,exp:Math.exp,not:GA,length:tD,"!":Ug,sign:Math.sign||fD},this.binaryOps={"+":TA,"-":AA,"*":DA,"/":IA,"%":PA,"^":Math.pow,"||":$A,"==":MA,"!=":FA,">":NA,"<":RA,">=":zA,"<=":LA,and:ZA,or:VA,in:jA,"=":nD,"[":iD},this.ternaryOps={"?":Wg},this.functions={random:QA,fac:Ug,min:oD,max:sD,hypot:Math.hypot||qg,pyt:Math.hypot||qg,pow:Math.pow,atan2:Math.atan2,if:Wg,gamma:pd,roundTo:rD,map:aD,fold:lD,filter:uD,indexOf:cD,join:dD},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}mi.prototype.parse=function(t){var e=[],r=new Ye(this,new nt(this,t),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(e),r.expect(po,"EOF"),new mr(e,this)},mi.prototype.evaluate=function(t,e){return this.parse(t).evaluate(e)};var Hg=new mi;mi.parse=function(t){return Hg.parse(t)},mi.evaluate=function(t,e){return Hg.parse(t).evaluate(e)};var Yg={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function vD(t){return Yg.hasOwnProperty(t)?Yg[t]:t}mi.prototype.isOperatorEnabled=function(t){var e=vD(t),r=this.options.operators||{};return!(e in r)||!!r[e]};const yD=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,bD=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,_D=/(__optional\("[^"]+"\))\.length\b/g,wD=new mi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Gg=new Map;function kD(t){return t.replace(yD,e=>e.includes("?.")?`__optional("${e.replace(/\?\./g,".")}")`:e).replace(bD,(e,r)=>`__length(${r})`).replace(_D,(e,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function SD(t){const e=Gg.get(t);if(e)return e;const r=wD.parse(kD(t));return Gg.set(t,r),r}function xD(t,e){if(t==null||typeof t!="string")return t;const r={data:e,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=SD(t);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${t}) in go-if: ${n.message}`)}}const Jg=["ticket:timeslot","ticket:day","ticket:annual","event:admission","event:admission:day","event:admission:timeslot","event:price","events:admission","events:admission:day","events:admission:timeslot","events:price"],ED={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.selectedDate)return;const{quotas:e}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));x.capacityManager.addQuotas(e)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTimeslot)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Fn(r,e.selectedTime),s=Mn(i,e.selectedTime);for(const o of s)t.preCart.addItem(mt(o,{time:e.selectedTime}))}},OD={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate)return;const{tickets:r,quotas:n}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));x.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Fn(r,s),a=Mn(o,s);for(const l of a)t.preCart.addItem(mt(l,{time:s}))}},CD={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e)return;const r=await x.asyncFetch(()=>x.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));for(const n of Object.values(r))t.preCart.addItem(mt(sa(n)))}},TD={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!(await x.asyncFetch(()=>x.getEvent(e.eventIds[0]))).tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),date_id:t.dateId}));x.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(mt(a,{time:e.selectedTime}))}},AD={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate)return;const r=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:e.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Fn(n,o),l=Mn(a,o);for(const u of l)t.preCart.addItem(mt(u,{time:o}))}},DD={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await x.asyncFetch(()=>x.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));x.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!e.selectedTimeslot)return;const r=await x.asyncFetch(()=>x.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));x.capacityManager.addQuotas(i);const s=Fn(n,e.selectedTime),o=Mn(s,e.selectedTime);for(const a of o)t.preCart.addItem(mt(a,{time:e.selectedTime}))}},ID={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||t.dateId===void 0)return;const r=await x.asyncFetch(()=>x.getEventDetailsOnDate(e.eventIds[0],t.dateId));if(r.prices?.length){for(const n of r.prices){const i=_u(n,r.id,{event_title:r.event_title});t.preCart.addItem(mt(i,{time:r.start_time}))}r.seats&&x.capacityManager.addSeats(r.id,r.seats)}}},PD=7200*1e3;function nl(t,e,r){const n=Date.parse(r);return t.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===e&&o>=n&&o<=n+PD&&(i.seats?.available??0)>0})}async function il(t){if(!t?.selectedDate)return;const{quotas:e}=await x.asyncFetch(()=>x.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));x.capacityManager.addQuotas(e)}const $D={"ticket:timeslot":ED,"ticket:day":OD,"ticket:annual":CD,"event:admission":TD,"event:admission:day":AD,"event:admission:timeslot":DD,"event:price":ID,"events:admission":{name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(mt(c,{time:i.start_time}))}}},"events:admission:day":{name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Object.values(a)[0],u=l?Object.keys(l.capacities)[0]:i.start_time,c=Fn(o,u),d=Mn(c,u);for(const f of d)t.preCart.addItem(mt(f,{time:u}))}}},"events:admission:timeslot":{name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await x.asyncFetch(()=>x.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await x.asyncFetch(()=>x.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:i.start_time.slice(0,10)}));x.capacityManager.addQuotas(a);const l=Fn(o,i.start_time),u=Mn(l,i.start_time);for(const c of u)t.preCart.addItem(mt(c,{time:i.start_time}))}}},"events:price":{name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>il(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await x.asyncFetch(()=>x.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=nl(r,e.selectedDate.toString(),e.selectedTime),i=t.query;for(const s of n){if(!s.prices?.length)continue;const o=i?s.prices.filter(a=>a.title?.includes(i)):s.prices;for(const a of o){const l=_u(a,s.id,{event_title:s.event_title});t.preCart.addItem(mt(l,{time:s.start_time}))}s.seats&&x.capacityManager.addSeats(s.id,s.seats)}}}};function gi(t){const e=$D[t];return e||console.warn(`[ticket-selection] Unknown filter "${t}". Valid filters: ${Jg.join(", ")}`),e}const Qg=Jg;let MD=0;class FD{uid=MD++;#e=re();get filters(){return h(this.#e)}set filters(e){C(this.#e,e,!0)}#t=re();get eventIds(){return h(this.#t)}set eventIds(e){C(this.#t,e,!0)}#r=re();get museumIds(){return h(this.#r)}set museumIds(e){C(this.#r,e,!0)}#n=re();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){C(this.#n,e,!0)}#i=re();get ticketIds(){return h(this.#i)}set ticketIds(e){C(this.#i,e,!0)}#s=re();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){C(this.#s,e,!0)}#a=re();get selectedDate(){return h(this.#a)}set selectedDate(e){C(this.#a,e,!0)}#o=re();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){C(this.#o,e,!0)}#l=E(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){C(this.#l,e)}#u=re(Fe([]));get ticketSegments(){return h(this.#u)}set ticketSegments(e){C(this.#u,e,!0)}#d=E(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#d)}set preCarts(e){C(this.#d,e)}#c=re();get timeslotDetails(){return h(this.#c)}set timeslotDetails(e){C(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>gi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>gi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>gi(e).isTicketsVisible(this))}}const Xg="go-ticket-selection",ND=qs(Xg),hn=Ws(Xg);function RD(t,e){ne(e,!0);let r=y(e,"when",7),n=y(e,"then",7,"show");const i=hn(e.$$host),s=E(()=>i.value),o=Ow(e.$$host),a=E(()=>o.value),l=ji(e.$$host),u=E(()=>l.value);let c=E(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(u)?.formData,cart:x.cart}));const d=g=>{C(c,g)},f=()=>h(c);let p=E(()=>xD(r(),h(c))),b=null;ge(()=>{const g=e.$$host;if(h(p)&&n()==="show")b&&(g.appendChild(b),b=null);else if(!b&&g.childNodes.length>0)for(b=document.createDocumentFragment();g.firstChild;)b.appendChild(g.firstChild)});var m={_setData:d,_getData:f,get when(){return r()},set when(g){r(g),v()},get then(){return n()},set then(g="show"){n(g),v()}};return ie(m)}customElements.define("go-if",se(RD,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ev(t,e){ne(e,!0);let r=y(e,"apiUrl",7),n=y(e,"shopDomain",7),i=y(e,"locale",7);i(i()||localStorage.getItem("lang")||"en"),ge(()=>{(n()!==x.shopDomain||r()!==x.apiUrl||i()!==x.locale)&&(x.load(r(),n(),i()),console.warn("shop loaded due to prop change"))});var s={get apiUrl(){return r()},set apiUrl(o){r(o),v()},get shopDomain(){return n()},set shopDomain(o){n(o),v()},get locale(){return i()},set locale(o){i(o),v()}};return ie(s)}customElements.define("gomus-init",se(ev,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function zD(t,e){ne(e,!0);let r=y(e,"apiDomain",7),n=y(e,"shopDomain",7),i=y(e,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),v()},get shopDomain(){return n()},set shopDomain(a){n(a),v()},get locale(){return i()},set locale(a){i(a),v()}};return ev(t,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ie(o)}customElements.define("go-init",se(zD,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function LD(t,e){ne(e,!0);const r=y(e,"to",7),n=E(()=>et.config.urls[r()]),i=oi(e.$$host,"a");ge(()=>{if(!h(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",h(n)())}),i.addEventListener("click",o=>{if(o.preventDefault(),!et.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}et.config.navigateTo(et.config.urls[r()]())});var s={get to(){return r()},set to(o){r(o),v()}};return ie(s)}customElements.define("go-link",se(LD,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));class ZD{#e=re();get token(){return h(this.#e)}set token(e){C(this.#e,e,!0)}constructor(e){this.token=e}get order(){return this.token?gl(x.order(this.token)):void 0}downloadLink(e,r){if(this.order?.is_valid)switch(e.type){case"Event":return`${x.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?et.config.urls.annualTicketPersonalizationList?.()?et.config.urls.annualTicketPersonalizationList(this.token):x.urls?.annualTicketPersonalizationList(this.token):`${x.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${x.locale}&token=${this.token}&barcode_id=${r}`}}}const tv="go-order-details",VD=qs(tv),rv=Ws(tv);function jD(t,e){ne(e,!0);let r=y(e,"token",7);const n=new ZD(r());VD(e.$$host,n),Yr(()=>{x.cart.clearItems(),x.auth.isGuest()&&x.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),v()}};return ie(i)}customElements.define("go-order",se(jD,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var BD=U('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),UD=U('<br/> <span class="go-order-item-quantities"> </span>',1),qD=U('<a aria-label="iCal link"> </a>'),WD=U('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function nv(t,e){ne(e,!0);let r=y(e,"item",7),n=y(e,"orderDetails",7);var i={get item(){return r()},set item($){r($),v()},get orderDetails(){return n()},set orderDetails($){n($),v()}},s=WD(),o=I(s),a=I(o),l=G(I(a),2),u=I(l),c=I(u,!0);T(u);var d=G(u,2);{var f=$=>{var A=BD(),D=R(A),N=I(D,!0);T(D);var M=G(D,2),V=I(M,!0);T(M),ue((ee,z)=>{te(N,ee),te(V,z)},[()=>js(r().attributes.start_time,{month:"numeric",day:"numeric"},x.locale),()=>Vs(r().attributes.start_time)]),w($,A)};ae(d,$=>{r().attributes.start_time&&$(f)})}var p=G(d,2);Ze(p,17,()=>r().attributes.quantities,$=>$.id,($,A)=>{var D=UD(),N=G(R(D),2),M=I(N);T(N),ue(()=>te(M,`${h(A).quantity??""} x ${h(A).title??""}`)),w($,D)});var b=G(p,2),m=I(b,!0);T(b),T(l);var g=G(l,2),_=I(g,!0);T(g);var k=G(g,4),P=I(k);{var O=$=>{var A=qD(),D=I(A,!0);T(A),ue(N=>{Ee(A,"href",x.apiUrl+r().attributes.ical_url),te(D,N)},[()=>x.t("common.calendar")]),w($,A)};ae(P,$=>{r().attributes.ical_url&&$(O)})}return T(k),T(a),T(o),T(s),ue(($,A,D)=>{te(c,r().attributes.title),Ee(b,"href",$),te(m,A),te(_,D)},[()=>n().downloadLink(r()),()=>x.t("common.download"),()=>ia(r().price_cents)]),w(t,s),ie(i)}se(nv,{item:{},orderDetails:{}},[],[],{mode:"open"});var KD=U('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),HD=U('<span class="go-cart-item-date"> </span>'),YD=U('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),GD=U('<br/> <a class="go-ticket-personalization"> </a>',1),JD=U('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),QD=U('<a aria-label="iCal link"> </a>'),XD=U('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),eI=U('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),tI=U('<a class="go-ticket-personalization"> </a>'),rI=U('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function iv(t,e){ne(e,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${x.locale}.svg`;let n=y(e,"item",7),i=y(e,"orderDetails",7);var s={get item(){return n()},set item(c){n(c),v()},get orderDetails(){return i()},set orderDetails(c){i(c),v()}},o=W(),a=R(o);{var l=c=>{var d=W(),f=R(d);Ze(f,17,()=>({length:n().attributes.quantity}),Er,(p,b,m)=>{var g=XD(),_=I(g),k=I(_),P=I(k);P.textContent="1";var O=G(P,2),$=I(O),A=I($,!0);T($);var D=G($,2);{var N=q=>{const j=E(()=>n().attributes.barcodes[m]?.id);var H=YD(),le=R(H);{var fe=Z=>{var ve=KD(),S=R(ve),Ge=I(S,!0);T(S);var Le=G(S,2),je=I(Le,!0);T(Le),ue((it,Ue)=>{te(Ge,it),te(je,Ue)},[()=>js(n().attributes.start_time,{month:"numeric",day:"numeric"},x.locale),()=>Vs(n().attributes.start_time)]),w(Z,ve)},L=Z=>{var ve=W(),S=R(ve);{var Ge=Le=>{var je=HD(),it=I(je,!0);T(je),ue(Ue=>te(it,Ue),[()=>js(n().attributes.start_time,{month:"numeric",day:"numeric"},x.locale)]),w(Le,je)};ae(S,Le=>{n().attributes.ticket_type==="normal"&&Le(Ge)},!0)}w(Z,ve)};ae(le,Z=>{n().attributes.ticket_type==="time_slot"?Z(fe):Z(L,!1)})}var pe=G(le,4),B=I(pe,!0);T(pe),ue((Z,ve)=>{Ee(pe,"href",Z),te(B,ve)},[()=>i().downloadLink(n(),h(j)),()=>x.t("common.download")]),w(q,H)},M=q=>{var j=GD(),H=G(R(j),2),le=I(H,!0);T(H),ue((fe,L)=>{Ee(H,"href",fe),te(le,L)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),w(q,j)};ae(D,q=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?q(N):q(M,!1)})}T(O);var V=G(O,2),ee=I(V,!0);T(V);var z=G(V,2),oe=I(z);{var Q=q=>{var j=JD(),H=I(j);T(j),ue(()=>{Ee(j,"href",x.apiUrl+n().attributes.barcodes[m]?.passbook_url),Ee(H,"src",r)}),w(q,j)};ae(oe,q=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&q(Q)})}T(z);var K=G(z,2),Y=I(K);{var ce=q=>{var j=QD(),H=I(j,!0);T(j),ue(le=>{Ee(j,"href",x.apiUrl+n().attributes.ical_url),te(H,le)},[()=>x.t("common.calendar")]),w(q,j)};ae(Y,q=>{n().attributes.ical_url&&q(ce)})}T(K),T(k),T(_),T(g),ue(q=>{te(A,n().attributes.title),te(ee,q)},[()=>ia(n().price_cents)]),w(p,g)}),w(c,d)},u=c=>{var d=rI(),f=I(d),p=I(f),b=I(p),m=I(b,!0);T(b);var g=G(b,2),_=I(g),k=I(_,!0);T(_);var P=G(_,2);{var O=N=>{var M=eI(),V=I(M,!0);T(M),ue((ee,z)=>{Ee(M,"href",ee),te(V,z)},[()=>i().downloadLink(n()),()=>x.t("common.download")]),w(N,M)},$=N=>{var M=tI(),V=I(M,!0);T(M),ue((ee,z)=>{Ee(M,"href",ee),te(V,z)},[()=>i().downloadLink(n()),()=>x.t("common.personalize")]),w(N,M)};ae(P,N=>{n().attributes.is_voucher?N(O):N($,!1)})}T(g);var A=G(g,2),D=I(A,!0);T(A),gt(2),T(p),T(f),T(d),ue(N=>{te(m,n().attributes.quantity),te(k,n().attributes.title),te(D,N)},[()=>ia(n().price_cents)]),w(c,d)};ae(a,c=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?c(l):c(u,!1)})}return w(t,o),ie(s)}se(iv,{item:{},orderDetails:{}},[],[],{mode:"open"});var nI=U('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function iI(t,e){ne(e,!0);const r=rv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);var s=W(),o=R(s);{var a=l=>{var u=nI(),c=I(u),d=I(c),f=I(d),p=I(f,!0);T(f);var b=G(f,2),m=I(b,!0);T(b);var g=G(b,2),_=I(g,!0);T(g),gt(2),T(d),T(c);var k=G(c,2);Ze(k,17,()=>h(i).items,D=>D.id,(D,N)=>{var M=W(),V=R(M);{var ee=oe=>{iv(oe,{get item(){return h(N)},get orderDetails(){return h(n)}})},z=oe=>{var Q=W(),K=R(Q);{var Y=ce=>{nv(ce,{get item(){return h(N)},get orderDetails(){return h(n)}})};ae(K,ce=>{h(N).type==="Event"&&ce(Y)},!0)}w(oe,Q)};ae(V,oe=>{h(N).type==="Ticket"?oe(ee):oe(z,!1)})}w(D,M)});var P=G(k,2),O=I(P),$=G(I(O),4),A=I($,!0);T($),gt(2),T(O),T(P),T(u),ue((D,N,M,V)=>{te(p,D),te(m,N),te(_,M),te(A,V)},[()=>x.t("common.table.count"),()=>x.t("common.table.product"),()=>x.t("common.table.price"),()=>x.t("common.table.total",{value:ia(h(i).total_price_cents)})]),w(l,u)};ae(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ie()}customElements.define("go-order-breakdown",se(iI,{},[],[]));function sI(t,e){ne(e,!0);const r=rv(e.$$host),n=E(()=>r.value);let i=E(()=>h(n)?.order);gt();var s=It();ue(()=>te(s,h(i)?.id)),w(t,s),ie()}customElements.define("go-order-invoice-id",se(sI,{},[],[]));var oI=U("<go-form></go-form>",2);function aI(t,e){ne(e,!1),Bt.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const o=i.target.details,a=await x.updatePassword(o.formData);a.data?(o.successMessage=x.t("user.passwordSuccess.desc.title"),o.apiErrors=[]):o.apiErrors=a.error?.errors||a.error||a.errors}jo();var n=oI();Yn(n,"formId","passwordResetForm"),Pl("submit",n,r),w(t,n),ie()}customElements.define("go-profile-password",se(aI,{},[],[]));var lI=U("<go-form></go-form>",2);function uI(t,e){ne(e,!0),Bt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=re(void 0);const n=E(()=>x.validateToken());Yr(async()=>{await x.waitForAllFetches(),await Wl(()=>h(r).details),await Wl(()=>h(n).data),h(r).details.fill(h(n).data)});var i=lI();Yn(i,"formId","accountDetailsForm"),Zf(i,s=>C(r,s),()=>h(r)),w(t,i),ie()}customElements.define("go-profile-details",se(uI,{},[],[]));var cI=U('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function dI(t,e){ne(e,!0);const r=E(()=>x.validateToken()),n=E(()=>h(r)?.data);var i=W(),s=R(i);{var o=l=>{var u=cI(),c=R(u),d=I(c);T(c);var f=G(c,2),p=I(f,!0);T(f),ue(()=>{te(d,`${h(n).name??""}
13
13
  ${h(n).surname??""}`),te(p,h(n).email)}),w(l,u)},a=l=>{var u=It();ue(c=>te(u,c),[()=>x.t("user.login.desc.text")]),w(l,u)};ae(s,l=>{h(n)?l(o):l(a,!1)})}w(t,i),ie()}customElements.define("go-profile-overview",se(dI,{},[],[]));function fI(t,e){ne(e,!0);function r(p){if(!p)return;const b=[];for(const m of p.split(",")){const g=m.trim();g&&(Qg.includes(g)?b.push(g):console.warn(`[go-ticket-selection] Unknown filter "${g}". Valid filters: ${Qg.join(", ")}`))}return b.length?b:void 0}let n=y(e,"filters",7),i=y(e,"eventIds",7),s=y(e,"museumIds",7),o=y(e,"exhibitionIds",7),a=y(e,"selectedDate",7),l=y(e,"selectedTimeslot",7),u=y(e,"ticketIds",7),c=y(e,"ticketGroupIds",7);const d=new FD;ge(()=>{e.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ge(()=>{d.filters=r(n()),d.eventIds=nn(i()),d.museumIds=nn(s()),d.exhibitionIds=nn(o()),d.ticketIds=nn(u()),d.ticketGroupIds=nn(c()),d.selectedTimeslot=l(),a()&&(d.selectedDate=hu(a()))}),ge(()=>{d.selectedDate&&qe(()=>{a(d.selectedDate.toString())})}),ND(e.$$host,d);var f={details:d,get filters(){return n()},set filters(p){n(p),v()},get eventIds(){return i()},set eventIds(p){i(p),v()},get museumIds(){return s()},set museumIds(p){s(p),v()},get exhibitionIds(){return o()},set exhibitionIds(p){o(p),v()},get selectedDate(){return a()},set selectedDate(p){a(p),v()},get selectedTimeslot(){return l()},set selectedTimeslot(p){l(p),v()},get ticketIds(){return u()},set ticketIds(p){u(p),v()},get ticketGroupIds(){return c()},set ticketGroupIds(p){c(p),v()}};return ie(f)}customElements.define("go-ticket-selection",se(fI,{filters:{attribute:"filters",reflect:!0,type:"String"},eventIds:{attribute:"event-ids",reflect:!0,type:"String"},ticketIds:{attribute:"ticket-ids",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"},exhibitionIds:{attribute:"exhibition-ids",reflect:!0,type:"String"},selectedDate:{attribute:"selected-date",reflect:!0,type:"String"},selectedTimeslot:{attribute:"selected-timeslot",reflect:!0,type:"String"}},[],["details"]));function hI(t,e){ne(e,!0);const r=hn(e.$$host),n=E(()=>r.value);ge(()=>{e.$$host.style.display=h(n)?.isTicketsVisible?"block":"none",e.$$host.classList.toggle("is-hidden",!h(n)?.isTicketsVisible),e.$$host.classList.toggle("is-visible",h(n)?.isTicketsVisible)}),ie()}customElements.define("go-tickets",se(hI,{},[],[]));function pI(t,e){ne(e,!0);const r=hn(e.$$host),n=E(()=>r.value),i=E(()=>Gn(h(n)?.preCarts||[],o=>o.items.length)),s=E(()=>!h(n)?.isTicketsVisible||h(n)?.isTicketsVisible&&h(i)===0);ge(()=>{e.$$host.style.display=h(s)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(s)),e.$$host.classList.toggle("is-visible",h(s))}),ie()}customElements.define("go-tickets-empty",se(pI,{},[],[]));function mI(t,e){ne(e,!0);const r=hn(e.$$host),n=E(()=>r.value);let i=E(()=>Gn(h(n)?.preCarts||[],o=>o.totalPriceCents));gt();var s=It();ue(o=>te(s,o),[()=>Pr(h(i))]),w(t,s),ie()}customElements.define("go-tickets-sum",se(mI,{},[],[]));class gI{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){C(this.#e,e)}#t=re(Fe(Ri()));get preCart(){return h(this.#t)}set preCart(e){C(this.#t,e,!0)}#r=re();get filters(){return h(this.#r)}set filters(e){C(this.#r,e,!0)}#n=re();get dateId(){return h(this.#n)}set dateId(e){C(this.#n,e,!0)}#i=re();get limit(){return h(this.#i)}set limit(e){C(this.#i,e,!0)}#s=re();get query(){return h(this.#s)}set query(e){C(this.#s,e,!0)}#a=re(Fe([]));get ticketGroupIds(){return h(this.#a)}set ticketGroupIds(e){C(this.#a,e,!0)}#o=re(Fe([]));get languageIds(){return h(this.#o)}set languageIds(e){C(this.#o,e,!0)}#l=re(Fe([]));get catchWordIds(){return h(this.#l)}set catchWordIds(e){C(this.#l,e,!0)}#u=re(Fe([]));get museumIds(){return h(this.#u)}set museumIds(e){C(this.#u,e,!0)}constructor(e,r){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=E(()=>r.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=Ri([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Ri();const e=this.effectiveFilters.filter(r=>r!=="custom");await Promise.all(e.map(r=>gi(r).loadProducts(this)))}}const sv="go-ticket-segment",vI=qs(sv),md=Ws(sv);function yI(t,e){ne(e,!0);const r=y(e,"filters",7),n=y(e,"dateId",7),i=y(e,"query",7),s=y(e,"limit",7),o=y(e,"ticketGroupIds",7),a=y(e,"languageIds",7),l=y(e,"catchWordIds",7),u=y(e,"museumIds",7);function c(g){if(!g)return;const _=g.split(",").map(k=>k.trim()).filter(Boolean);return _.length?_:void 0}const d=hn(e.$$host),f=d.value,p=new gI(c(r()),d);vI(e.$$host,p),ge(()=>{p.filters=c(r()),p.dateId=n(),p.query=i(),p.limit=s(),p.ticketGroupIds=nn(o()),p.languageIds=nn(a()),p.catchWordIds=nn(l()),p.museumIds=nn(u())}),ge(()=>{p.dateId,p.filters,p.ticketGroupIds,p.museumIds,p.languageIds,p.catchWordIds,p.query,p.limit,f?.filters,f?.selectedTimeslot,f?.selectedTime,f?.selectedDate,f?.museumIds,qe(()=>{p.loadTickets()})}),ge(()=>{f&&qe(()=>f?.addTicketSegment(p))});const b=E(()=>p.preCart.items.length);ge(()=>{e.$$host.classList.toggle("is-empty",h(b)===0)});var m={details:p,get filters(){return r()},set filters(g){r(g),v()},get dateId(){return n()},set dateId(g){n(g),v()},get query(){return i()},set query(g){i(g),v()},get limit(){return s()},set limit(g){s(g),v()},get ticketGroupIds(){return o()},set ticketGroupIds(g){o(g),v()},get languageIds(){return a()},set languageIds(g){a(g),v()},get catchWordIds(){return l()},set catchWordIds(g){l(g),v()},get museumIds(){return u()},set museumIds(g){u(g),v()}};return ie(m)}customElements.define("go-ticket-segment",se(yI,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"}},[],["details"]));function bI(t,e){ne(e,!0);const n=hn(e.$$host).value,s=md(e.$$host).value,o=E(()=>s?.preCart.items.length),a=E(()=>!n?.isTicketsVisible||n?.isTicketsVisible&&h(o)===0);ge(()=>{e.$$host.style.display=h(a)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(a)),e.$$host.classList.toggle("is-visible",h(a))}),ie()}customElements.define("go-ticket-segment-empty",se(bI,{},[],[]));var _I=U('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),wI=U("<option> </option>"),kI=U('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function ov(t,e){ne(e,!0);const r=p=>{var b=_I(),m=R(b),g=I(m);T(m);var _=G(m,2),k=I(_,!0);T(_),ue(P=>{te(g,`${i().product.eventTitle??""} - ${P??""}`),te(k,i().product.title)},[()=>Vs(i().time)]),w(p,b)},n=p=>{gt();var b=It();ue(()=>te(b,i().product.title)),w(p,b)};let i=y(e,"item",7),s=y(e,"details",7),o=re(void 0);ge(()=>{s().preCart.items.map(p=>p.quantity),qe(()=>{C(o,x.capacityManager.capacity(x.cart,i(),s().preCart),!0)})});function a(p,b,m){const g=b;p.quantity=parseInt(g.value)}let l=n;Bs(i().product)&&(l=r);var u={get item(){return i()},set item(p){i(p),v()},get details(){return s()},set details(p){s(p),v()}},c=W(),d=R(c);{var f=p=>{var b=kI(),m=I(b),g=I(m),_=I(g),k=I(_);l(k),T(_);var P=G(_,2),O=I(P);Oy(O,()=>i().product.description),T(P);var $=G(P,2),A=I($,!0);T($);var D=G($,2),N=I(D);N.__change=M=>a(i(),M.target,s()?.ticketSelectionDetails),Ze(N,21,()=>Np(h(o).min,h(o).max),M=>M.value,(M,V)=>{var ee=wI(),z=I(ee,!0);T(ee);var oe={};ue(()=>{zl(ee,i().quantity===h(V).value),te(z,h(V).label),oe!==(oe=h(V).value)&&(ee.value=(ee.__value=h(V).value)??"")}),w(M,ee)}),T(N),T(D),T(g),T(m),T(b),ue(M=>{zt(m,1,Gr(["go-tickets-item",h(o).bookedOut&&"is-booked-out"])),Ee(m,"data-testid",i().uuid),te(A,i().price_formatted),Ee(N,"aria-label",M)},[()=>x.t("cart.content.table.edit")]),w(p,b)};ae(d,p=>{h(o)&&!h(o).unavailable&&p(f)})}return w(t,c),ie(u)}Sr(["change"]),se(ov,{item:{},details:{}},[],[],{mode:"open"});var SI=U('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function xI(t,e){ne(e,!0);const r=md(e.$$host),n=E(()=>r.value),i=E(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=W(),o=R(s);{var a=l=>{var u=SI(),c=I(u),d=I(c),f=I(d),p=I(f,!0);T(f);var b=G(f,2),m=I(b,!0);T(b);var g=G(b,2),_=I(g,!0);T(g);var k=G(g,2),P=I(k,!0);T(k),T(d),T(c);var O=G(c,2);Ze(O,17,()=>h(n).preCart.items,$=>$.uuid,($,A)=>{ov($,{get item(){return h(A)},get details(){return h(n)}})}),T(u),ue(($,A,D,N)=>{te(p,$),te(m,A),te(_,D),te(P,N)},[()=>x.t("product.detail.table.title"),()=>x.t("product.detail.table.desc"),()=>x.t("product.detail.table.price"),()=>x.t("product.detail.table.quantity")]),w(l,u)};ae(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),ie()}customElements.define("go-ticket-segment-body",se(xI,{},[],[]));function EI(t,e){ne(e,!0);const r=md(e.$$host),n=E(()=>r.value);gt();var i=It();ue(()=>te(i,h(n)?.preCart.totalFormatted)),w(t,i),ie()}customElements.define("go-ticket-segment-sum",se(EI,{},[],[]));let OI=class{#e;get tsd(){return h(this.#e)}set tsd(e){C(this.#e,e)}#t=re(Fe([]));get timeslots(){return h(this.#t)}set timeslots(e){C(this.#t,e,!0)}constructor(e){e&&(this.#e=E(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}this.timeslots=x.capacityManager.quotaManager.timeslotsOn(e).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}};var CI=U('<li><label> <input type="radio" name="timeslot"/></label></li>'),TI=U('<ul data-testid="timeslots"></ul>');function AI(t,e){ne(e,!0);const r=[],n=hn(e.$$host),i=new OI(n);ge(()=>{const d=i.tsd;if(!d)return;const f=d.filters,p=d.selectedDate;qe(async()=>{f?.length&&p&&await Promise.all(f.map(b=>gi(b).loadTimeslots(d))),i.recalculateCapacities()})});const s=(d,f)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:f},bubbles:!0,composed:!0}))},o=d=>{s(d.target,i.tsd?.selectedTimeslot)};ge(()=>{const d=i.tsd;if(!d)return;const f=i.timeslots;if(f.length!==1)return;const p=f[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,s(e.$$host,p.startAt))});var a={details:i},l=W(),u=R(l);{var c=d=>{var f=TI();Ze(f,20,()=>i.timeslots,p=>p,(p,b)=>{const m=E(()=>b.capacity===0),g=E(()=>h(m)||!b.available),_=E(()=>i.tsd?.selectedTimeslot===b.startAt);var k=CI(),P=I(k),O=I(P),$=G(O);Zo($),$.__change=o;var A;T(P),T(k),ue(()=>{zt(k,1,Gr({"go-timeslot":!0,"is-sold-out":h(m),"is-disabled":h(g),"is-selected":h(_)})),te(O,`${b.timeFormatted??""} `),$.disabled=h(g),Ee($,"aria-disabled",h(g)),A!==(A=b.startAt)&&($.value=($.__value=b.startAt)??"")}),Ry(r,[],$,()=>(b.startAt,i.tsd.selectedTimeslot),D=>i.tsd.selectedTimeslot=D),w(p,k)}),T(f),w(d,f)};ae(u,d=>{i.tsd?.isTimeslotsVisible&&d(c)})}return w(t,l),ie(a)}Sr(["change"]),customElements.define("go-timeslots",se(AI,{},[],["details"]));class DI{#e=re();get details(){return h(this.#e)}set details(e){C(this.#e,e,!0)}#t=re(Fe(Ni(Vt())));get startAt(){return h(this.#t)}set startAt(e){C(this.#t,e,!0)}#r=re(void 0);get selected(){return h(this.#r)}set selected(e){C(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(r=>gi(r).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}isDateDisabled(e){return this.dates?e.compare(Ni(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Ni(Vt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>gi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}eventsDates(){const e=x.calendar.bind(x);return this.fetchPeriod().reduce((r,n)=>Lt(r,e(this.params(n))),{})}ticketsDates(){const e=x.ticketsCalendar.bind(x);return this.fetchPeriod().reduce((r,n)=>Lt(r,e(this.params(n))),{})}}var II=U("<!> <!> <!>",1),PI=U("<div> </div>"),$I=U("<!> <!>",1),MI=U("<!> <!>",1),FI=U('<div data-calendar-wrapper=""><!></div>');function av(t,e){ne(e,!0);let r=y(e,"calendarClass",7),n=re(void 0);const i=r();ge(()=>{h(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),v()}},o=FI(),a=I(o);{const l=(u,c)=>{let d=()=>c?.().months,f=()=>c?.().weekdays;var p=MI(),b=R(p);Pe(b,()=>Oc,(g,_)=>{_(g,{children:(k,P)=>{var O=II(),$=R(O);Pe($,()=>Ac,(N,M)=>{M(N,{class:"go-calendar-prev-button",children:(V,ee)=>{gt();var z=It("Prev");w(V,z)},$$slots:{default:!0}})});var A=G($,2);Pe(A,()=>Cc,(N,M)=>{M(N,{class:"go-calendar-heading"})});var D=G(A,2);Pe(D,()=>Tc,(N,M)=>{M(N,{class:"go-calendar-next-button",children:(V,ee)=>{gt();var z=It("Next");w(V,z)},$$slots:{default:!0}})}),w(k,O)},$$slots:{default:!0}})});var m=G(b,2);Ze(m,17,d,Er,(g,_)=>{var k=W(),P=R(k);Pe(P,()=>wc,(O,$)=>{$(O,{class:"go-calendar-grid",children:(A,D)=>{var N=$I(),M=R(N);Pe(M,()=>xc,(ee,z)=>{z(ee,{class:"go-calendar-grid-head",children:(oe,Q)=>{var K=W(),Y=R(K);Pe(Y,()=>co,(ce,q)=>{q(ce,{class:"go-calendar-grid-row",children:(j,H)=>{var le=W(),fe=R(le);Ze(fe,17,f,Er,(L,pe,B,Z)=>{var ve=W(),S=R(ve);Pe(S,()=>Ec,(Ge,Le)=>{Le(Ge,{children:(je,it)=>{var Ue=PI(),gr=I(Ue,!0);T(Ue),ue(vr=>te(gr,vr),[()=>h(pe).slice(0,2)]),w(je,Ue)},$$slots:{default:!0}})}),w(L,ve)}),w(j,le)},$$slots:{default:!0}})}),w(oe,K)},$$slots:{default:!0}})});var V=G(M,2);Pe(V,()=>kc,(ee,z)=>{z(ee,{class:"go-calendar-grid-body",children:(oe,Q)=>{var K=W(),Y=R(K);Ze(Y,17,()=>h(_).weeks,Er,(ce,q,j,H)=>{var le=W(),fe=R(le);Pe(fe,()=>co,(L,pe)=>{pe(L,{class:"go-calendar-grid-row",children:(B,Z)=>{var ve=W(),S=R(ve);Ze(S,17,()=>h(q),Er,(Ge,Le,je,it)=>{var Ue=W(),gr=R(Ue);Pe(gr,()=>Sc,(vr,Wt)=>{Wt(vr,{get date(){return h(Le)},get month(){return h(_).value},class:"go-calendar-cell",children:(yr,vi)=>{var br=W(),_r=R(br);{let ss=E(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Le)),"is-disabled":r().isDateDisabled(h(Le)),"is-selected":r().selected?.compare(h(Le))===0}));Pe(_r,()=>_c,(mo,pn)=>{pn(mo,{get class(){return h(ss)},children:(yi,Vn)=>{gt();var jn=It();ue(()=>te(jn,h(Le).day)),w(yi,jn)},$$slots:{default:!0}})})}w(yr,br)},$$slots:{default:!0}})}),w(Ge,Ue)}),w(B,ve)},$$slots:{default:!0}})}),w(ce,le)}),w(oe,K)},$$slots:{default:!0}})}),w(A,N)},$$slots:{default:!0}})}),w(g,k)}),w(u,p)};Pe(a,()=>Um,(u,c)=>{c(u,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return x.locale},isDateDisabled:d=>r().isDateDisabled(d),isDateUnavailable:d=>r().isDateUnavailable(d),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(d){r().selected=d},get placeholder(){return r().startAt},set placeholder(d){r().startAt=d},children:l,$$slots:{default:!0}})})}return T(o),Zf(o,l=>C(n,l),()=>h(n)),w(t,o),ie(s)}se(av,{calendarClass:{}},[],["details"],{mode:"open"});function NI(t,e){ne(e,!0);const r=new DI,n=r,i=hn(e.$$host),s=E(()=>i.value);ge(()=>{r.details=h(s)}),e.$$host.addEventListener("go-date-select",c=>{h(s)&&(h(s).selectedDate=c.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=W(),l=R(a);{var u=c=>{av(c,{get calendarClass(){return r}})};ae(l,c=>{h(s)?.isCalendarVisible&&c(u)})}return w(t,a),ie(o)}customElements.define("go-calendar",se(NI,{},[],["details"]));class RI{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){C(this.#e,e)}constructor(e){e&&(this.#e=E(()=>e.value))}addToCart(){if(!x.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,r=e.flatMap(n=>n.nonEmptyItems.map(i=>{const s=i.product.ticket_type!="annual"?i.time:void 0;return mt(i.product,{quantity:i.quantity,time:s})}));x.cart.addItems(r),e.forEach(n=>n.items.forEach(i=>i.quantity=0)),et.config.urls.cart&&et.config.navigateTo(et.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(r=>r.items.some(n=>n.quantity>0)):!1}}var zI=U('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function LI(t,e){ne(e,!0);const r=hn(e.$$host),n=new RI(r);var i={details:n},s=zI();s.__click=()=>n.addToCart();var o=I(s,!0);return T(s),ue((a,l,u)=>{s.disabled=a,Ee(s,"data-x",l),te(o,u)},[()=>!n.anyTicketsSelected(),()=>!n.anyTicketsSelected(),()=>x.t("common.actions.cart")]),w(t,s),ie(i)}Sr(["click"]),customElements.define("go-add-to-cart-button",se(LI,{},[],["details"]));async function ZI(t){const e=t.go;let r=e&&e._queue||[];console.log(r);for(const n of r)try{await lv[n.method](n.options)}catch(i){console.error(i)}t.go=lv,e&&(e._queue=null)}const lv={loaded:!0,config:t=>{et.define(t)},init:async t=>{await x.load("https://"+t.api,t.shop,t.locale)}};(async()=>await ZI(window))()})();
@@ -26083,7 +26083,7 @@ function ov(t, e) {
26083
26083
  var A = J(P, 2);
26084
26084
  {
26085
26085
  var F = (q) => {
26086
- const V = /* @__PURE__ */ E(() => n().attributes.barcodes[m].id);
26086
+ const V = /* @__PURE__ */ E(() => n().attributes.barcodes[m]?.id);
26087
26087
  var Y = fI(), ae = R(Y);
26088
26088
  {
26089
26089
  var fe = (Z) => {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "2.1.0",
7
+ "version": "2.1.1",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",