@gomusdev/web-components 3.8.1 → 3.8.2
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.
package/README.md
CHANGED
|
@@ -32586,11 +32586,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32586
32586
|
async loadProducts(segment) {
|
|
32587
32587
|
const tsd = segment.ticketSelectionDetails;
|
|
32588
32588
|
if (!tsd?.eventIds?.length || !tsd.selectedDate) return;
|
|
32589
|
-
|
|
32589
|
+
const event = await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]));
|
|
32590
|
+
if (!event.tickets?.length) return;
|
|
32590
32591
|
const { tickets, quotas } = await shop.asyncFetch(() => shop.ticketsAndQuotas({
|
|
32592
|
+
"by_ticket_ids[]": event.tickets,
|
|
32591
32593
|
by_bookable: true,
|
|
32592
|
-
valid_at: tsd.selectedDate.toString()
|
|
32593
|
-
date_id: segment.dateId
|
|
32594
|
+
valid_at: tsd.selectedDate.toString()
|
|
32594
32595
|
}));
|
|
32595
32596
|
shop.capacityManager.addQuotas(quotas);
|
|
32596
32597
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
|
|
@@ -32585,11 +32585,12 @@ var REGISTRY = {
|
|
|
32585
32585
|
async loadProducts(segment) {
|
|
32586
32586
|
const tsd = segment.ticketSelectionDetails;
|
|
32587
32587
|
if (!tsd?.eventIds?.length || !tsd.selectedDate) return;
|
|
32588
|
-
|
|
32588
|
+
const event = await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]));
|
|
32589
|
+
if (!event.tickets?.length) return;
|
|
32589
32590
|
const { tickets, quotas } = await shop.asyncFetch(() => shop.ticketsAndQuotas({
|
|
32591
|
+
"by_ticket_ids[]": event.tickets,
|
|
32590
32592
|
by_bookable: true,
|
|
32591
|
-
valid_at: tsd.selectedDate.toString()
|
|
32592
|
-
date_id: segment.dateId
|
|
32593
|
+
valid_at: tsd.selectedDate.toString()
|
|
32593
32594
|
}));
|
|
32594
32595
|
shop.capacityManager.addQuotas(quotas);
|
|
32595
32596
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
|
|
@@ -79,7 +79,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
79
79
|
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Kp={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%)"},Nx=Zs(Kp),Yp=typeof window<"u"?window:void 0,J2=typeof window<"u"?window.document:void 0,X2=typeof window<"u"?window.navigator:void 0,Q2=typeof window<"u"?window.location:void 0;function Rx(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Lx=class extends Map{#e=new Map;#t=re(0);#r=re(0);#n=tn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return tn===this.#n?re(e):_n(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return p(this.#t),!1;return p(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{p(this.#t);return}return p(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Nr(o);else if(i!==t){Nr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Nr(o)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),I(r,-1)),n&&(I(this.#r,super.size),Nr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var t of e.values())I(t,-1);Nr(this.#t),e.clear()}}#s(){p(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)p(r)}keys(){return p(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}},zx=class{#e;#t;constructor(e={}){const{window:t=Yp,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=ml(n=>{const i=pt(t,"focusin",n),s=pt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?Rx(this.#e):null}},eF=new zx;function Ux(e){return typeof e=="function"}var Ot=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return sb(this.#t)}get(){const e=bd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=bd(this.#t);return t===void 0?e:t}set(e){return ib(this.#t,e)}};function Vx(e,t){switch(e){case"post":me(t);break;case"pre":Sl(t);break}}function Pu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;Vx(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Ue(()=>r(a,o));return o=a,l})}function Jp(e,t,r){const n=_s(()=>{let i=!1;Pu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});me(()=>n)}function tt(e,t,r){Pu(e,"post",t,r)}function Bx(e,t,r){Pu(e,"pre",t,r)}tt.pre=Bx;function qx(e,t){Jp(e,"post",t)}function jx(e,t){Jp(e,"pre",t)}qx.pre=jx;function Xp(e){return Ux(e)?e():e}var Zx=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(p(this.#o)?.(),this.getSize().width));#a=D(()=>(p(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Xp(this.#n);if(e)return ml(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((a,l)=>Math.max(a,l.inlineSize),0),this.#e.height=o.reduce((a,l)=>Math.max(a,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??Yp,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Xp(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return p(this.#o)?.(),this.getSize()}get width(){return p(this.#s)}get height(){return p(this.#a)}};function Wx(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const o=await e(...i);n&&(n(o),n=null)},t)})}function Hx(e,t){let r=0,n=null;return(...i)=>{const s=Date.now();return r&&s-r<t?n??Promise.resolve(void 0):(r=s,n=e(...i),n)}}function Qp(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=re(Fe(o)),d=re(!1),u=re(void 0),h=re(Fe([]));const f=()=>{p(h).forEach(A=>A()),I(h,[],!0)},g=A=>{I(h,[...p(h),A],!0)},m=async(A,E,x=!1)=>{try{I(d,!0),I(u,void 0),f();const O=new AbortController;g(()=>O.abort());const $=await t(A,E,{data:p(c),refetching:x,onCleanup:g,signal:O.signal});return I(c,$,!0),$}catch(O){O instanceof DOMException&&O.name==="AbortError"||I(u,O,!0);return}finally{I(d,!1)}},v=a?Wx(m,a):l?Hx(m,l):m,_=Array.isArray(e)?e:[e];let T;return n((A,E)=>{s&&T||(T=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return p(c)},get loading(){return p(d)},get error(){return p(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const E=_.map(x=>x());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],A??!0)}}}function Gx(e,t,r){return Qp(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function Kx(e,t,r){return Qp(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());tt.pre(o,(a,l)=>{n(a,l??[])},i)})}Gx.pre=Kx;function ni(e){me(()=>()=>{e()})}function Yx(e,t){return setTimeout(t,e)}function Ws(e){sf().then(e)}var Jx=1,Xx=9,Qx=11;function $u(e){return Bs(e)&&e.nodeType===Jx&&typeof e.nodeName=="string"}function em(e){return Bs(e)&&e.nodeType===Xx}function eA(e){return Bs(e)&&e.constructor?.name==="VisualViewport"}function tA(e){return Bs(e)&&e.nodeType!==void 0}function tm(e){return tA(e)&&e.nodeType===Qx&&"host"in e}function rA(e,t){if(!e||!t||!$u(e)||!$u(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&tm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function da(e){return em(e)?e:eA(e)?e.document:e?.ownerDocument??document}function rm(e){return tm(e)?rm(e.host):em(e)?e.defaultView??window:$u(e)?e.ownerDocument?.defaultView??window:window}function nA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Li=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return p(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>da(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>nA(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,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Qe(e,t){return{[t_()]:r=>Bp(e)?(e.current=r,Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Ue(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function Sr(e){return e?"true":"false"}function Mu(e){return e?"true":void 0}function Le(e){return e?"":void 0}function nm(e){return e?"open":"closed"}function iA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var sA=class{#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(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function fa(e){const t=new sA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Fu="ArrowDown",im="ArrowLeft",sm="ArrowRight",Nu="ArrowUp",oA="Backspace",aA="Enter",tF="Escape",rF=" ",nF="Tab",iF="a",sF="P",oF="A",aF="p",on=typeof document<"u",om=lA();function lA(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Er(e){return e instanceof HTMLElement}function ii(e){return e instanceof Element}function uA(e){return e instanceof Element||e instanceof SVGElement}function ha(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Mn(e){return e===null}function pa(e){return e.pointerType==="touch"}function cA(e){return e!==null}var dA=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ni(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Ws(t):t()}},am=class{#e;#t;#r;#n=re(!1);#i=re(void 0);#s=!1;#a=null;constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new dA({ref:this.#e.ref,afterTick:this.#e.open}),ni(()=>this.#o()),tt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return p(this.#n)}get transitionStatus(){return p(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ce(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var fA=new Ot("BitsConfig");function hA(){const e=new pA(null,{});return fA.getOr(e).opts}var pA=class{opts;constructor(e,t){const r=mA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function mA(e,t){return r=>R(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function lm(e,t){return r=>{const n=hA();return R(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var um=lm(e=>e.defaultLocale,"en"),lF=lm(e=>e.defaultPortalTo,"body"),vA=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){const r=this.createEvent(t);return e.dispatchEvent(r),r}listen(e,t,r){const n=i=>{t(i)};return pt(e,this.eventName,n,r)}};function cm(e,t=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...i)},t)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function dm(e,t){return e===t||e.contains(t)}function fm(e){return e?.ownerDocument??document}function gA(e,t){const{clientX:r,clientY:n}=e,i=t.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var hm=["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] *)"],ma=hm.join(","),pm=typeof Element>"u",si=pm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,va=!pm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ga=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ga(t.parentNode))},yA=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},mm=function(t,r,n){if(ga(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ma));return r&&si.call(t,ma)&&i.unshift(t),i=i.filter(n),i},ya=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!ga(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=ya(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{si.call(o,ma)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!ga(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=ya(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},vm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},gm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yA(t))&&!vm(t)?0:t.tabIndex},bA=function(t,r){var n=gm(t);return n<0&&r&&!vm(t)?0:n},_A=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},ym=function(t){return t.tagName==="INPUT"},wA=function(t){return ym(t)&&t.type==="hidden"},kA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},SA=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},EA=function(t){if(!t.name)return!0;var r=t.form||va(t),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(t.name));else try{i=n(t.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=SA(i,t.form);return!s||s===t},TA=function(t){return ym(t)&&t.type==="radio"},xA=function(t){return TA(t)&&!EA(t)},AA=function(t){var r,n=t&&va(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=va(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=i)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},bm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},OA=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=si.call(t,"details>summary:first-of-type")?t.parentElement:t;if(si.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=va(t);if(a&&!a.shadowRoot&&i(a)===!0)return bm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(AA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return bm(t);return!1},CA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.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 si.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},ba=function(t,r){return!(r.disabled||wA(r)||OA(r,t)||kA(r)||CA(r))},Ru=function(t,r){return!(xA(r)||gm(r)<0||!ba(t,r))},DA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},_m=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=bA(a,o),c=o?_m(i.candidates):a;l===0?o?r.push.apply(r,c):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:c})}),n.sort(_A).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},IA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:Ru.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:DA}):n=mm(t,r.includeContainer,Ru.bind(null,r)),_m(n)},PA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:ba.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=mm(t,r.includeContainer,ba.bind(null,r)),n},$A=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,ma)===!1?!1:Ru(r,t)},MA=hm.concat("iframe:not([inert]):not([inert] *)").join(","),FA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,MA)===!1?!1:ba(r,t)};function NA(e,t){if(t<=0)return[];const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Lu(e,t){return e>=0&&e<t.length}var RA="data-context-menu-trigger",LA="data-context-menu-content",uF=new Ot("Menu.Root"),cF=new Ot("Menu.Root | Menu.Sub"),dF=new Ot("Menu.Content"),fF=new Ot("Menu.Group | Menu.RadioGroup"),hF=new Ot("Menu.RadioGroup"),pF=new Ot("Menu.CheckboxGroup"),mF=new vA("bitsmenuopen",{bubbles:!1,cancelable:!0}),vF=fa({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;var zA=class Gg{static create(t){return new Gg(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,me(()=>{this.#s=fm(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),r()};tt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Yx(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ni(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Ws(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return js(pt(this.#s,"pointerdown",js(this.#h,this.#f),{capture:!0}),pt(this.#s,"pointerdown",js(this.#p,this.#c)),pt(this.#s,"focusin",this.#l))}#d=t=>{let r=t;r.defaultPrevented&&(r=wm(t)),this.#e.current(t)};#c=cm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||BA(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=wm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=pt(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=VA(this.opts.ref.current))};#m=t=>this.opts.ref.current?dm(this.opts.ref.current,t):!1;#v=cm(()=>{for(const t in this.#r)this.#r[t]=!1;this.#n=!1},20);#y(){return Object.values(this.#r).some(Boolean)}#w=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#w,onblurcapture:this.#_}};function UA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function VA(e){const t=[...globalThis.bitsDismissableLayers],r=UA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function BA(e,t){const r=e.target;if(!uA(r))return!1;const n=!!r.closest(`[${RA}]`),i=!!t.closest(`[${LA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:fm(r).documentElement.contains(r)&&!dm(t,r)&&gA(e,t)}function wm(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?t:o==="target"?r:o==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?i:o in s?s[o]:e[o]})}function km(e,t){Q(t,!0);let r=b(t,"interactOutsideBehavior",7,"close"),n=b(t,"onInteractOutside",7,Se),i=b(t,"onFocusOutside",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"isValidEvent",7,()=>!1),c=b(t,"ref",7);const d=zA.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),y()},get onInteractOutside(){return n()},set onInteractOutside(g=Se){n(g),y()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),y()},get id(){return s()},set id(g){s(g),y()},get children(){return o()},set children(g){o(g),y()},get enabled(){return a()},set enabled(g){a(g),y()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),y()},get ref(){return c()},set ref(g){c(g),y()}},h=K(),f=U(h);return _e(f,()=>o()??Me,()=>({props:d.props})),S(e,h),ee(u)}te(km,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var qA=class Kg{static create(t){return new Kg(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Li(this.opts.ref);let r=Se;tt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>pt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!jA(this))return;const r=new KeyboardEvent(t.type,t);t.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}};function jA(e){const t=[...globalThis.bitsEscapeLayers],r=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===e;const[n]=t[0];return n===e}function Sm(e,t){Q(t,!0);let r=b(t,"escapeKeydownBehavior",7,"close"),n=b(t,"onEscapeKeydown",7,Se),i=b(t,"children",7),s=b(t,"enabled",7),o=b(t,"ref",7);qA.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){n(d),y()},get children(){return i()},set children(d){i(d),y()},get enabled(){return s()},set enabled(d){s(d),y()},get ref(){return o()},set ref(d){o(d),y()}},l=K(),c=U(l);return _e(c,()=>i()??Me),S(e,l),ee(a)}te(Sm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var ZA=class Yg{static instance;#e=kr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Yg),this.instance}register(t){const r=this.getActive();r&&r!==t&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(t,n),this.#e.current=this.#e.current.filter(i=>i!==t),this.#e.current.unshift(t)}unregister(t){this.#e.current=this.#e.current.filter(n=>n!==t);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(t,r){this.#t.set(t,r)}getFocusMemory(t){return this.#t.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,r){this.#r.set(t,r)}getPreFocusMemory(t){return this.#r.get(t)}clearPreFocusMemory(t){this.#r.delete(t)}},WA=class Jg{#e=!1;#t=null;#r=ZA.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,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 t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.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 t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&FA(l))o.preventDefault(),l.focus();else{const c=this.#d(),d=this.#c()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)return;const l=a[0],c=a[a.length-1];!o.shiftKey&&r.activeElement===c?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),c.focus())};this.#n.push(pt(r,"focusin",n,{capture:!0}),pt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#d(),l=this.#c()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?IA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#u()[0]||null}#c(){return this.#t?PA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return tt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new Jg(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ni(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Em(e,t){Q(t,!0);let r=b(t,"enabled",7,!1),n=b(t,"trapFocus",7,!1),i=b(t,"loop",7,!1),s=b(t,"onCloseAutoFocus",7,Se),o=b(t,"onOpenAutoFocus",7,Se),a=b(t,"focusScope",7),l=b(t,"ref",7);const c=WA.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>o()),ref:l()});var d={get enabled(){return r()},set enabled(f=!1){r(f),y()},get trapFocus(){return n()},set trapFocus(f=!1){n(f),y()},get loop(){return i()},set loop(f=!1){i(f),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=Se){s(f),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(f=Se){o(f),y()},get focusScope(){return a()},set focusScope(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=K(),h=U(u);return _e(h,()=>a()??Me,()=>({props:c.props})),S(e,u),ee(d)}te(Em,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var Tm=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var HA=class Xg{static create(t){return new Xg(t)}opts;domContext;#e=Se;#t=!1;#r=Tm;#n=Tm;constructor(t){this.opts=t,this.domContext=new Li(t.ref);let r=Se;tt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return js(pt(this.domContext.getDocument(),"pointerdown",this.#a),pt(this.domContext.getDocument(),"pointerup",qp(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Er(r)||!Er(n)||!this.#t||!KA(this)||!rA(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=GA(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},xm=e=>e.style.userSelect||e.style.webkitUserSelect;function GA(e,t){const r=xm(t),n=xm(e);return _a(t,"none"),_a(e,"text"),()=>{_a(t,r),_a(e,n)}}function _a(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function KA(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Am(e,t){Q(t,!0);let r=b(t,"preventOverflowTextSelection",7,!0),n=b(t,"onPointerDown",7,Se),i=b(t,"onPointerUp",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"ref",7);HA.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(h=!0){r(h),y()},get onPointerDown(){return n()},set onPointerDown(h=Se){n(h),y()},get onPointerUp(){return i()},set onPointerUp(h=Se){i(h),y()},get id(){return s()},set id(h){s(h),y()},get children(){return o()},set children(h){o(h),y()},get enabled(){return a()},set enabled(h){a(h),y()},get ref(){return l()},set ref(h){l(h),y()}},d=K(),u=U(d);return _e(u,()=>o()??Me),S(e,d),ee(c)}te(Am,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Fn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var YA=class{#e;#t=0;#r=re();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),I(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,p(this.#r)===void 0&&(this.#n=_s(()=>{I(this.#r,this.#e(...e),!0)})),me(()=>()=>{this.#i()}),p(this.#r)}},wa=new Lx,ka=re(null),zu=null,Hs=null,Gs=!1,Om=R(()=>{for(const e of wa.values())if(e)return!0;return!1}),Uu=null,JA=new YA(()=>{function e(){document.body.setAttribute("style",p(ka)??""),document.body.style.removeProperty("--scrollbar-width"),om&&zu?.(),I(ka,null)}function t(){Hs!==null&&(window.clearTimeout(Hs),Hs=null)}function r(i,s){t(),Gs=!0,Uu=Date.now();const o=Uu,a=()=>{Hs=null,Uu===o&&(Cm(wa)?Gs=!1:(Gs=!1,s()))},l=i===null?24:i;Hs=window.setTimeout(a,l)}function n(){p(ka)===null&&wa.size===0&&!Gs&&I(ka,document.body.getAttribute("style"),!0)}return tt(()=>Om.current,()=>{if(!Om.current)return;n(),Gs=!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,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",om&&(zu=pt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Ws(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ni(()=>()=>{zu?.()}),{get lockMap(){return wa},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),XA=class{#e=Fn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=JA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ni(()=>{if(this.#n.lockMap.delete(this.#e),Cm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function Cm(e){for(const[t,r]of e)if(r)return!0;return!1}function Vu(e,t){Q(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new XA(r(),()=>n()),ee({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}te(Vu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function QA(e){if(!on||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Er(t)){const i=e.createElement("div");i.style.cssText=Nx,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),t=i,e.body.insertBefore(t,e.body.firstChild)}return{getLog:i=>{if(!Er(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Er(s)?s:null}}}function Sa(e){const t=QA(e);function r(n,i="assertive",s=7500){if(!t||!on||!e)return;const o=t.getLog(i),a=e.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}}var eO={defaultValue:void 0,granularity:"day"};function Dm(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...eO,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(Ut())?s=n.toDate(Ut()):i&&s>i.toDate(Ut())&&(s=i.toDate(Ut()));const o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Ii(o,a,l,0,0,0):new Ls(o,a,l)}}function Im(e,t){let r;return t instanceof Cn?r=tp(e):t instanceof Ii?r=ep(e):r=ra(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function Vt(e,t=Ut()){return e instanceof Cn?e.toDate():e.toDate(t)}function tO(e){if(e instanceof Ls)return"date";if(e instanceof Ii)return"datetime";if(e instanceof Cn)return"zoneddatetime";throw new Error("Unknown date type")}function rO(e,t){switch(t){case"date":return ra(e);case"datetime":return ep(e);case"zoneddatetime":return tp(e);default:throw new Error(`Unknown date type: ${t}`)}}function nO(e){return e instanceof Ii}function Bu(e){return e instanceof Cn}function Ea(e){return nO(e)||Bu(e)}function Ks(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function oi(e,t){return e.compare(t)<0}function iO(e,t){return e.compare(t)>0}function Pm(e,t,r){const n=Nh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function $m(e,t,r){const n=Nh(e,r),i=t===0?6:t-1;return n===i?e:n>i?e.add({days:7-n+i}):e.add({days:i-n})}var Ta=["day","month","year"],xa=["hour","minute","second","dayPeriod"],Mm=["literal","timeZoneName"],Ys=[...Ta,...xa],Fm=[...Ys,...Mm],sO=[...xa,...Mm],gF=Fm.filter(e=>e!=="literal"),yF=sO.filter(e=>e!=="literal"),oO=["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"],aO=["year","month","day"],qu={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 lO(e){if(Nm(e))return qu[e];{const t=fO(e);return Nm(t)?qu[t]:qu.en}}function ju(e,t,r){return uO(e)?lO(r)[e]:dO(e)?t:cO(e)?"––":""}function Nm(e){return oO.includes(e)}function uO(e){return aO.includes(e)}function cO(e){return e==="hour"||e==="minute"||e==="second"}function dO(e){return e==="era"||e==="dayPeriod"}function fO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function Zu(e){const t=["hour","minute","second"],r=Ys.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function hO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!Lm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Mn(c)?a[l]=ju(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in t){const l=t[a],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Mn(l)&&!Mn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),h=e.hourCycle===12||e.hourCycle===void 0&&Um(n)===12;if(a==="hour"&&h){if(d>12){const f=d-12;return f===0?"12":f<10?`0${f}`:`${f}`}return d===0?"12":d<10?`0${d}`:`${d}`}return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return ju(a,"",n)}else{if(Aa(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Mn(l))return ju(a,"",n);{const d=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function pO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,vO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!Lm(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Mn(a.part)||Mn(a.value)||a.part==="timeZoneName"&&(!Bu(r)||s)))}function mO(e){const t=hO(e);return{obj:t,arr:pO({contentObj:t,...e})}}function vO(e,t){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:t===24?"h23":void 0,hour12:t===24?!1:void 0};return e==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),e==="hour"&&delete r.minute,e==="minute"&&delete r.second,r}function Rm(){return Ys.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Aa(e){return Ta.includes(e)}function Lm(e){return Ys.includes(e)}function gO(e){return Fm.includes(e)}function zm(e){return!on||!e?[]:Oa(e).map(t=>t.dataset.segment).filter(t=>Ys.includes(t))}function yO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=zm(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if(Mn(a))continue;s=s.set({[o]:t[o]})}else if(Aa(o)){const a=t[o];if(Mn(a))continue;s=s.set({[o]:t[o]})}return s}function bO(e,t){const r=zm(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Aa(n)&&e[n]===null)return!1;return!0}function _O(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(xa.includes(t)||Ta.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function wO(e,t){return t||(Ea(e)?"minute":"day")}function Wu(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ha(e))}function kO(e,t){if(!on)return!1;const r=Oa(t);return r.length?r[0].id===e:!1}function SO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!on)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Zs({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function EO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Um(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function Js(e,t){const r=e.currentTarget;if(!Er(r))return;const{prev:n,next:i}=Hu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function TO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function xO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Hu(e,t){const r=Oa(t);return r.length?{next:TO(e,r),prev:xO(e,r)}:{next:null,prev:null}}function Vm(e,t){const r=e.currentTarget;if(!Er(r))return;const{next:n}=Hu(r,t);n&&n.focus()}function Bm(e,t){const r=e.currentTarget;if(!Er(r))return;const{prev:n}=Hu(r,t);n&&n.focus()}function Xs(e){return e==="ArrowRight"||e==="ArrowLeft"}function Oa(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Er(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!gO(r)||r==="literal")}):[]}function AO(e){return Oa(e)[0]}var OO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function qm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new _r(t,g).format(f)}function s(f,g=!0){return Ea(f)&&g?i(Vt(f),{dateStyle:"long",timeStyle:"long"}):i(Vt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new _r(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new _r(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new _r(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new _r(t,{month:"long"}).format(f)}function l(f){return new _r(t,{year:"numeric"}).format(f)}function c(f,g){return Bu(f)?new _r(t,{...g,timeZone:f.timeZone}).formatToParts(Vt(f)):new _r(t,g).formatToParts(Vt(f))}function d(f,g="narrow"){return new _r(t,{weekday:g}).format(f)}function u(f,g=void 0){return new _r(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,m={}){const v=c(f,{...OO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:h,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function CO(e){return!(!Er(e)||!e.hasAttribute("data-bits-day"))}function jm(e,t){const r=[];let n=e.add({days:1});const i=t;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function Gu(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Ks(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=fu(t),l=x1(t),c=r!==void 0?Pm(a,r,"en-US"):Pm(a,0,i),d=r!==void 0?$m(l,r,"en-US"):$m(l,0,i),u=jm(c.subtract({days:1}),a),h=jm(l,d.add({days:1})),f=u.length+o.length+h.length;if(n&&f<42){const m=42-f;let v=h[h.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;h.length===0&&(_=m-1,h.push(v));const T=Array.from({length:_},(A,E)=>{const x=E+1;return v.add({days:x})});h.push(...T)}const g=u.concat(o,h);return{value:t,dates:g,weeks:NA(g,7)}}function Qs(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(Gu({...n,dateObj:r})),i;i.push(Gu({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(Gu({...n,dateObj:o}))}return i}function Ku(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Er(t)):[]}function Zm(e,t){const r=e.getAttribute("data-value");r&&(t.current=Im(r,t.current))}function DO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=Ku(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Lu(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}),Ws(()=>{const u=Ku(n);if(!u.length)return;const h=u.length-Math.abs(c);if(Lu(h,u)){const f=u[h];return Zm(f,r),f.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Ws(()=>{const u=Ku(n);if(!u.length)return;const h=c-l.length;if(Lu(h,u))return u[h].focus()})}}var Wm=[Fu,Nu,im,sm],Hm=[aA," "];function IO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!CO(i)||!Wm.includes(e.key)&&!Hm.includes(e.key))return;e.preventDefault();const s={[Fu]:7,[Nu]:-7,[im]:-1,[sm]:1};if(Wm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(Hm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Im(o,n))}}function PO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function $O({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function MO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Vt(i),r)):[]}function FO(e){me(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Ue(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(Qs({...o,dateObj:s}))})})}function NO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=da(e),i=n.createElement("div");i.style.cssText=Zs({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=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function RO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){me(()=>{e.current,Ue(()=>{t().some(a=>cu(a,e.current))||o(Qs({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function LO({maxValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[t.length-1]?.value;return n?iO(n.add({months:1}).set({day:1}),e):!1}function zO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?oi(n.subtract({months:1}).set({day:35}),e):!1}function UO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Vt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Vt(e[0].value),i=Vt(e[e.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 VO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Le(r),"data-disabled":Le(n),"data-readonly":Le(i)}}function BO(e){const t=da(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function qO(e){if(!on)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return rO(n,i)}function jO({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&oi(a,n.current)||i.current&&oi(i.current,a))}tt(()=>e.current,()=>{e.current&&t.current&&xn(t.current,r)&&o(r)&&(t.current=qO(e.current)??r)})}function ZO(e,t){return!e||!t?e:Ea(e)&&Ea(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var WO=fa({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 HO(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const o=r-100;n=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}var Tr=new Ot("Calendar.Root | RangeCalender.Root"),Gm=class Qg{static create(t){return Tr.set(new Qg(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return p(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Fn();domContext;attachment;#t=re(Fe([]));get months(){return p(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Qe(this.opts.ref),this.domContext=new Li(t.ref),this.announcer=Sa(null),this.formatter=qm({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),rn(()=>{this.announcer=Sa(this.domContext.getDocument())}),this.months=Qs({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(),RO({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}),FO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),tt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),tt(()=>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)}),jO({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}setMonths(t){this.months=t}#r=D(()=>MO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Ue(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>HO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){me(()=>{if(Ue(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){me(()=>{if(this.opts.ref.current)return NO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Sl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){PO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){$O({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,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(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}#l=D(()=>LO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>zO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(this.#u)}set isPrevButtonDisabled(t){I(this.#u,t)}#d=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,UO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#c)}set headingValue(t){I(this.#c,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>cu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&oi(t,r)||n&&oi(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>xn(n,t)):r?xn(r,t):!1}shiftFocus(t,r){return DO({node:t,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})}#p(t){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=t.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(t,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 i=this.handleSingleUpdate(n,r);i?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(i,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=ZO(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>xn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(o=>!xn(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&xn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){IO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>WO.getAttr(t);#m=D(()=>({...VO({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 p(this.#m)}set props(t){I(this.#m,t)}},GO=class ey{static create(t){return new ey(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Mu(!0),"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},Km=new Ot("Calendar.Cell | RangeCalendar.Cell"),KO=class ty{static create(t){return Km.set(new ty(t,Tr.get()))}opts;root;#e=D(()=>Vt(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>k1(this.opts.date.current,Ut()));get isDateToday(){return p(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!cu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return p(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>xn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return p(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return p(this.#u)}set snippetProps(t){I(this.#u,t)}#d=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return p(this.#d)}set ariaDisabled(t){I(this.#d,t)}#c=D(()=>({"data-unavailable":Le(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":Le(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":tO(this.opts.date.current),"data-disabled":Le(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#c)}set sharedDataAttrs(t){I(this.#c,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Sr(this.isSelectedDate),"aria-disabled":Sr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return p(this.#h)}set props(t){I(this.#h,t)}},YO=class ry{static create(t){return new ry(t,Km.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return p(this.#t)}set snippetProps(t){I(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":Sr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},JO=class ny{static create(t){return new ny(t,Tr.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":Sr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},XO=class iy{static create(t){return new iy(t,Tr.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":Sr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},QO=class sy{static create(t){return new sy(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":Sr(this.root.opts.readonly.current),"aria-disabled":Sr(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),"data-disabled":Le(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},eC=class oy{static create(t){return new oy(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},tC=class ay{static create(t){return new ay(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},rC=class ly{static create(t){return new ly(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},nC=class uy{static create(t){return new uy(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},iC=class cy{static create(t){return new cy(t,Tr.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},sC=new Set(["$$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"]),oC=j("<div><!></div>");function Ym(e,t){Q(t,!0);let r=b(t,"child",7),n=b(t,"children",7),i=b(t,"id",23,Fn),s=b(t,"ref",15,null),o=b(t,"value",15),a=b(t,"onValueChange",7,Se),l=b(t,"placeholder",15),c=b(t,"onPlaceholderChange",7,Se),d=b(t,"weekdayFormat",7,"narrow"),u=b(t,"weekStartsOn",7),h=b(t,"pagedNavigation",7,!1),f=b(t,"isDateDisabled",7,()=>!1),g=b(t,"isDateUnavailable",7,()=>!1),m=b(t,"fixedWeeks",7,!1),v=b(t,"numberOfMonths",7,1),_=b(t,"locale",7),T=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),E=b(t,"readonly",7,!1),x=b(t,"minValue",7,void 0),O=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),L=b(t,"type",7),W=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),se=b(t,"maxDays",7),V=b(t,"monthFormat",7,"long"),oe=b(t,"yearFormat",7,"numeric"),pe=je(t,sC);const J=Dm({defaultValue:o(),minValue:x(),maxValue:O()});function ie(){l()===void 0&&l(J)}ie(),tt.pre(()=>l(),()=>{ie()});function Y(){o()===void 0&&o(L()==="single"?void 0:[])}Y(),tt.pre(()=>o(),()=>{Y()});const B=Gm.create({id:R(()=>i()),ref:R(()=>s(),z=>s(z)),weekdayFormat:R(()=>d()),weekStartsOn:R(()=>u()),pagedNavigation:R(()=>h()),isDateDisabled:R(()=>f()),isDateUnavailable:R(()=>g()),fixedWeeks:R(()=>m()),numberOfMonths:R(()=>v()),locale:um(()=>_()),calendarLabel:R(()=>T()),readonly:R(()=>E()),disabled:R(()=>A()),minValue:R(()=>x()),maxValue:R(()=>O()),disableDaysOutsideMonth:R(()=>W()),initialFocus:R(()=>N()),maxDays:R(()=>se()),placeholder:R(()=>l(),z=>{l(z),c()(z)}),preventDeselect:R(()=>$()),value:R(()=>o(),z=>{o(z),a()(z)}),type:R(()=>L()),monthFormat:R(()=>V()),yearFormat:R(()=>oe()),defaultPlaceholder:J}),H=D(()=>We(pe,B.props));var G={get child(){return r()},set child(z){r(z),y()},get children(){return n()},set children(z){n(z),y()},get id(){return i()},set id(z=Fn()){i(z),y()},get ref(){return s()},set ref(z=null){s(z),y()},get value(){return o()},set value(z){o(z),y()},get onValueChange(){return a()},set onValueChange(z=Se){a(z),y()},get placeholder(){return l()},set placeholder(z){l(z),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(z=Se){c(z),y()},get weekdayFormat(){return d()},set weekdayFormat(z="narrow"){d(z),y()},get weekStartsOn(){return u()},set weekStartsOn(z){u(z),y()},get pagedNavigation(){return h()},set pagedNavigation(z=!1){h(z),y()},get isDateDisabled(){return f()},set isDateDisabled(z=()=>!1){f(z),y()},get isDateUnavailable(){return g()},set isDateUnavailable(z=()=>!1){g(z),y()},get fixedWeeks(){return m()},set fixedWeeks(z=!1){m(z),y()},get numberOfMonths(){return v()},set numberOfMonths(z=1){v(z),y()},get locale(){return _()},set locale(z){_(z),y()},get calendarLabel(){return T()},set calendarLabel(z="Event"){T(z),y()},get disabled(){return A()},set disabled(z=!1){A(z),y()},get readonly(){return E()},set readonly(z=!1){E(z),y()},get minValue(){return x()},set minValue(z=void 0){x(z),y()},get maxValue(){return O()},set maxValue(z=void 0){O(z),y()},get preventDeselect(){return $()},set preventDeselect(z=!1){$(z),y()},get type(){return L()},set type(z){L(z),y()},get disableDaysOutsideMonth(){return W()},set disableDaysOutsideMonth(z=!0){W(z),y()},get initialFocus(){return N()},set initialFocus(z=!1){N(z),y()},get maxDays(){return se()},set maxDays(z){se(z),y()},get monthFormat(){return V()},set monthFormat(z="long"){V(z),y()},get yearFormat(){return oe()},set yearFormat(z="numeric"){oe(z),y()}},le=K(),de=U(le),F=z=>{var ge=K(),fe=U(ge);{let w=D(()=>({props:p(H),...B.snippetProps}));_e(fe,r,()=>p(w))}S(z,ge)},ue=z=>{var ge=oC();Ne(ge,()=>({...p(H)}));var fe=M(ge);_e(fe,()=>n()??Me,()=>B.snippetProps),P(ge),S(z,ge)};return ce(de,z=>{r()?z(F):z(ue,-1)}),S(e,le),ee(G)}te(Ym,{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 aC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),lC=j("<div><!></div>");function Yu(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,aC);const l=YO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);{let T=D(()=>({props:p(c),...l.snippetProps}));_e(_,i,()=>p(T))}S(m,v)},g=m=>{var v=lC();Ne(v,()=>({...p(c)}));var _=M(v),T=E=>{var x=K(),O=U(x);_e(O,()=>n()??Me,()=>l.snippetProps),S(E,x)},A=E=>{var x=Rt();ae(()=>ne(x,l.cell.opts.date.current.day)),S(E,x)};ce(_,E=>{n()?E(T):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Yu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var uC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),cC=j("<table><!></table>");function Ju(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,uC);const l=QO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=cC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Ju,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var dC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),fC=j("<tbody><!></tbody>");function Xu(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,dC);const l=eC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=fC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Xu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var hC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),pC=j("<td><!></td>");function Qu(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"date",7),l=b(t,"month",7),c=je(t,hC);const d=KO.create({id:R(()=>o()),ref:R(()=>s(),_=>s(_)),date:R(()=>a()),month:R(()=>l())}),u=D(()=>We(c,d.props));var h={get children(){return n()},set children(_){n(_),y()},get child(){return i()},set child(_){i(_),y()},get ref(){return s()},set ref(_=null){s(_),y()},get id(){return o()},set id(_=Ce(r)){o(_),y()},get date(){return a()},set date(_){a(_),y()},get month(){return l()},set month(_){l(_),y()}},f=K(),g=U(f),m=_=>{var T=K(),A=U(T);{let E=D(()=>({props:p(u),...d.snippetProps}));_e(A,i,()=>p(E))}S(_,T)},v=_=>{var T=pC();Ne(T,()=>({...p(u)}));var A=M(T);_e(A,()=>n()??Me,()=>d.snippetProps),P(T),S(_,T)};return ce(g,_=>{i()?_(m):_(v,-1)}),S(e,f),ee(h)}te(Qu,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var mC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),vC=j("<thead><!></thead>");function ec(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,mC);const l=tC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=vC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(ec,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var gC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yC=j("<th><!></th>");function tc(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,gC);const l=nC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=yC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),_C=j("<tr><!></tr>");function eo(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,bC);const l=rC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=_C();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(eo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var wC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),kC=j("<header><!></header>");function rc(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,wC);const l=iC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=kC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Me),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var SC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),EC=j("<div><!></div>");function nc(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,SC);const l=GO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,i,()=>({props:p(c),headingValue:l.root.headingValue})),S(m,v)},g=m=>{var v=EC();Ne(v,()=>({...p(c)}));var _=M(v),T=E=>{var x=K(),O=U(x);_e(O,()=>n()??Me,()=>({headingValue:l.root.headingValue})),S(E,x)},A=E=>{var x=Rt();ae(()=>ne(x,l.root.headingValue)),S(E,x)};ce(_,E=>{n()?E(T):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),ee(d)}te(nc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var TC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),xC=j("<button><!></button>");function ic(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,TC);const c=JO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=xC();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(ic,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var AC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),OC=j("<button><!></button>");function sc(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,AC);const c=XO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=OC();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var CC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Jm=j("<input/>");function Xm(e,t){Q(t,!0);let r=b(t,"value",15),n=je(t,CC);const i=D(()=>We(n,{"aria-hidden":"true",tabindex:-1,style:{...Kp,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=K(),a=U(o),l=d=>{var u=Jm();Ne(u,()=>({...p(i),value:r()}),void 0,void 0,void 0,void 0,!0),S(d,u)},c=d=>{var u=Jm();Ne(u,()=>({...p(i)}),void 0,void 0,void 0,void 0,!0),Ro(u,r),S(d,u)};return ce(a,d=>{p(i).type==="checkbox"?d(l):d(c,-1)}),S(e,o),ee(s)}te(Xm,{value:{}},[],[],{mode:"open"});var DC=["top","right","bottom","left"],Nn=Math.min,Yt=Math.max,Ca=Math.round,Da=Math.floor,Wr=e=>({x:e,y:e}),IC={left:"right",right:"left",bottom:"top",top:"bottom"};function oc(e,t,r){return Yt(e,Nn(t,r))}function an(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function zi(e){return e.split("-")[1]}function ac(e){return e==="x"?"y":"x"}function lc(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function uc(e){return ac(Hr(e))}function PC(e,t,r){r===void 0&&(r=!1);const n=zi(e),i=uc(e),s=lc(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Ia(o)),[o,Ia(o)]}function $C(e){const t=Ia(e);return[cc(e),t,cc(t)]}function cc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Qm=["left","right"],ev=["right","left"],MC=["top","bottom"],FC=["bottom","top"];function NC(e,t,r){switch(e){case"top":case"bottom":return r?t?ev:Qm:t?Qm:ev;case"left":case"right":return t?MC:FC;default:return[]}}function RC(e,t,r,n){const i=zi(e);let s=NC(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(cc)))),s}function Ia(e){const t=ln(e);return IC[t]+e.slice(t.length)}function LC(e){return{top:0,right:0,bottom:0,left:0,...e}}function tv(e){return typeof e!="number"?LC(e):{top:e,right:e,bottom:e,left:e}}function Pa(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function rv(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=uc(t),a=lc(o),l=ln(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y}}switch(zi(t)){case"start":f[o]-=h*(r&&c?-1:1);break;case"end":f[o]+=h*(r&&c?-1:1);break}return f}async function zC(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=an(t,e),g=tv(f),m=a[h?u==="floating"?"reference":"floating":u],v=Pa(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},E=Pa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:T,strategy:l}):_);return{top:(v.top-E.top+g.top)/A.y,bottom:(E.bottom-v.bottom+g.bottom)/A.y,left:(v.left-E.left+g.left)/A.x,right:(E.right-v.right+g.right)/A.x}}var UC=50,VC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:zC},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=rv(c,n,l),h=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:T}=v,{x:A,y:E,data:x,reset:O}=await T({x:d,y:u,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=E??u,g[_]={...g[_],...x},O&&f<UC&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=rv(c,h,l)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}},BC=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=an(e,t)||{};if(c==null)return{};const u=tv(d),h={x:r,y:n},f=uc(i),g=lc(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",T=v?"bottom":"right",A=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[f]-h[f]-s.floating[g],x=h[f]-s.reference[f],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=O?O[A]:0;(!$||!await(o.isElement==null?void 0:o.isElement(O)))&&($=a.floating[A]||s.floating[g]);const L=E/2-x/2,W=$/2-m[g]/2-1,N=Nn(u[_],W),se=Nn(u[T],W),V=N,oe=$-m[g]-se,pe=$/2-m[g]/2+L,J=oc(V,pe,oe),ie=!l.arrow&&zi(i)!=null&&pe!==J&&s.reference[g]/2-(pe<V?N:se)-m[g]/2<0,Y=ie?pe<V?pe-V:pe-oe:0;return{[f]:h[f]+Y,data:{[f]:J,centerOffset:pe-J-Y,...ie&&{alignmentOffset:Y}},reset:ie}}}),qC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),T=Hr(a),A=ln(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(A||!m?[Ia(a)]:$C(a)),O=g!=="none";!h&&O&&x.push(...RC(a,m,g,E));const $=[a,...x],L=await l.detectOverflow(t,v),W=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&W.push(L[_]),u){const pe=PC(i,o,E);W.push(L[pe[0]],L[pe[1]])}if(N=[...N,{placement:i,overflows:W}],!W.every(pe=>pe<=0)){var se,V;const pe=(((se=s.flip)==null?void 0:se.index)||0)+1,J=$[pe];if(J&&(!(u==="alignment"&&T!==Hr(J))||N.every(Y=>Hr(Y.placement)===T?Y.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:J}};let ie=(V=N.filter(Y=>Y.overflows[0]<=0).sort((Y,B)=>Y.overflows[1]-B.overflows[1])[0])==null?void 0:V.placement;if(!ie)switch(f){case"bestFit":{var oe;const Y=(oe=N.filter(B=>{if(O){const H=Hr(B.placement);return H===T||H==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(H=>H>0).reduce((H,G)=>H+G,0)]).sort((B,H)=>B[1]-H[1])[0])==null?void 0:oe[0];Y&&(ie=Y);break}case"initialPlacement":ie=a;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function nv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iv(e){return DC.some(t=>e[t]>=0)}var jC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=an(e,t);switch(i){case"referenceHidden":{const o=nv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:iv(o)}}}case"escaped":{const o=nv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:iv(o)}}}default:return{}}}}},sv=new Set(["left","top"]);async function ZC(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ln(r),a=zi(r),l=Hr(r)==="y",c=sv.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}}var WC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await ZC(t,e);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}}}}},HC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x:T,y:A}=_;return{x:T,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),h=Hr(ln(i)),f=ac(h);let g=d[f],m=d[h];if(o){const _=f==="y"?"top":"left",T=f==="y"?"bottom":"right",A=g+u[_],E=g-u[T];g=oc(A,g,E)}if(a){const _=h==="y"?"top":"left",T=h==="y"?"bottom":"right",A=m+u[_],E=m-u[T];m=oc(A,m,E)}const v=l.fn({...t,[f]:g,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[h]:a}}}}}},GC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=an(e,t),d={x:r,y:n},u=Hr(i),h=ac(u);let f=d[h],g=d[u];const m=an(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const A=h==="y"?"height":"width",E=s.reference[h]-s.floating[A]+v.mainAxis,x=s.reference[h]+s.reference[A]-v.mainAxis;f<E?f=E:f>x&&(f=x)}if(c){var _,T;const A=h==="y"?"width":"height",E=sv.has(ln(i)),x=s.reference[u]-s.floating[A]+(E&&((_=o.offset)==null?void 0:_[u])||0)+(E?0:v.crossAxis),O=s.reference[u]+s.reference[A]+(E?0:((T=o.offset)==null?void 0:T[u])||0)-(E?v.crossAxis:0);g<x?g=x:g>O&&(g=O)}return{[h]:f,[u]:g}}}},KC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=an(e,t),d=await o.detectOverflow(t,c),u=ln(i),h=zi(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=h==="end"?"top":"bottom");const T=m-d.top-d.bottom,A=g-d.left-d.right,E=Nn(m-d[v],T),x=Nn(g-d[_],A),O=!t.middlewareData.shift;let $=E,L=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=T),O&&!h){const N=Yt(d.left,0),se=Yt(d.right,0),V=Yt(d.top,0),oe=Yt(d.bottom,0);f?L=g-2*(N!==0||se!==0?N+se:Yt(d.left,d.right)):$=m-2*(V!==0||oe!==0?V+oe:Yt(d.top,d.bottom))}await l({...t,availableWidth:L,availableHeight:$});const W=await o.getDimensions(a.floating);return g!==W.width||m!==W.height?{reset:{rects:!0}}:{}}}};function $a(){return typeof window<"u"}function Ui(e){return ov(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(ov(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ov(e){return $a()?e instanceof Node||e instanceof Jt(e).Node:!1}function xr(e){return $a()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return $a()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function av(e){return!$a()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function to(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function YC(e){return/^(table|td|th)$/.test(Ui(e))}function Ma(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var JC=/transform|translate|scale|rotate|perspective|filter/,XC=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none",dc;function fc(e){const t=xr(e)?Ar(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!hc()&&(ai(t.backdropFilter)||ai(t.filter))||JC.test(t.willChange||"")||XC.test(t.contain||"")}function QC(e){let t=Rn(e);for(;un(t)&&!Vi(t);){if(fc(t))return t;if(Ma(t))return null;t=Rn(t)}return null}function hc(){return dc==null&&(dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dc}function Vi(e){return/^(html|body|#document)$/.test(Ui(e))}function Ar(e){return Jt(e).getComputedStyle(e)}function Fa(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rn(e){if(Ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||av(e)&&e.host||Gr(e);return av(t)?t.host:t}function lv(e){const t=Rn(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&to(t)?t:lv(t)}function ro(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=lv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=pc(o);return t.concat(o,o.visualViewport||[],to(i)?i:[],a&&r?ro(a):[])}else return t.concat(i,ro(i,[],r))}function pc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uv(e){const t=Ar(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=un(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=Ca(r)!==s||Ca(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function mc(e){return xr(e)?e:e.contextElement}function Bi(e){const t=mc(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=uv(t);let o=(s?Ca(r.width):r.width)/n,a=(s?Ca(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var eD=Wr(0);function cv(e){const t=Jt(e);return!hc()||!t.visualViewport?eD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function li(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=mc(e);let o=Wr(1);t&&(n?xr(n)&&(o=Bi(n)):o=Bi(e));const a=tD(s,r,n)?cv(s):Wr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const h=Jt(s),f=n&&xr(n)?Jt(n):n;let g=h,m=pc(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),T=Ar(m),A=_.left+(m.clientLeft+parseFloat(T.paddingLeft))*v.x,E=_.top+(m.clientTop+parseFloat(T.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=E,g=Jt(m),m=pc(g)}}return Pa({width:d,height:u,x:l,y:c})}function Na(e,t){const r=Fa(e).scrollLeft;return t?t.left+r:li(Gr(e)).left+r}function dv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Na(e,r),y:r.top+t.scrollTop}}function rD(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Ma(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const d=Wr(0),u=un(n);if((u||!u&&!s)&&((Ui(n)!=="body"||to(o))&&(l=Fa(n)),u)){const f=li(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=o&&!u&&!s?dv(o,l):Wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function nD(e){return Array.from(e.getClientRects())}function iD(e){const t=Gr(e),r=Fa(e),n=e.ownerDocument.body,i=Yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Na(e);const a=-r.scrollTop;return Ar(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var fv=25;function sD(e,t){const r=Jt(e),n=Gr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=hc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Na(n);if(c<=0){const d=n.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=fv&&(s-=g)}else c<=fv&&(s+=c);return{width:s,height:o,x:a,y:l}}function oD(e,t){const r=li(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=un(e)?Bi(e):Wr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function hv(e,t,r){let n;if(t==="viewport")n=sD(e,r);else if(t==="document")n=iD(Gr(e));else if(xr(t))n=oD(t,r);else{const i=cv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Pa(n)}function pv(e,t){const r=Rn(e);return r===t||!xr(r)||Vi(r)?!1:Ar(r).position==="fixed"||pv(r,t)}function aD(e,t){const r=t.get(e);if(r)return r;let n=ro(e,[],!1).filter(a=>xr(a)&&Ui(a)!=="body"),i=null;const s=Ar(e).position==="fixed";let o=s?Rn(e):e;for(;xr(o)&&!Vi(o);){const a=Ar(o),l=fc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||to(o)&&!l&&pv(e,o))?n=n.filter(c=>c!==o):i=a,o=Rn(o)}return t.set(e,n),n}function lD(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ma(t)?[]:aD(t,this._c):[].concat(r),n],o=hv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const h=hv(t,s[u],i);a=Yt(h.top,a),l=Nn(h.right,l),c=Nn(h.bottom,c),d=Yt(h.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function uD(e){const{width:t,height:r}=uv(e);return{width:t,height:r}}function cD(e,t,r){const n=un(t),i=Gr(t),s=r==="fixed",o=li(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=Na(i)}if(n||!n&&!s)if((Ui(t)!=="body"||to(i))&&(a=Fa(t)),n){const u=li(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const d=i&&!n&&!s?dv(i,a):Wr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function vc(e){return Ar(e).position==="static"}function mv(e,t){if(!un(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function vv(e,t){const r=Jt(e);if(Ma(e))return r;if(!un(e)){let i=Rn(e);for(;i&&!Vi(i);){if(xr(i)&&!vc(i))return i;i=Rn(i)}return r}let n=mv(e,t);for(;n&&YC(n)&&vc(n);)n=mv(n,t);return n&&Vi(n)&&vc(n)&&!fc(n)?r:n||QC(e)||r}var dD=async function(e){const t=this.getOffsetParent||vv,r=this.getDimensions,n=await r(e.floating);return{reference:cD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fD(e){return Ar(e).direction==="rtl"}var hD={convertOffsetParentRelativeRectToViewportRelativeRect:rD,getDocumentElement:Gr,getClippingRect:lD,getOffsetParent:vv,getElementRects:dD,getClientRects:nD,getDimensions:uD,getScale:Bi,isElement:xr,isRTL:fD};function gv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pD(e,t){let r=null,n;const i=Gr(e);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 c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=c;if(a||t(),!h||!f)return;const g=Da(u),m=Da(i.clientWidth-(d+h)),v=Da(i.clientHeight-(u+f)),_=Da(d),T={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Nn(1,l))||1};let A=!0;function E(x){const O=x[0].intersectionRatio;if(O!==l){if(!A)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!gv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(E,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,T)}r.observe(e)}return o(!0),s}function mD(e,t,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,c=mc(e),d=i||s?[...c?ro(c):[],...t?ro(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?pD(c,r):null;let h=-1,f=null;o&&(f=new ResizeObserver(_=>{let[T]=_;T&&T.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let g,m=l?li(e):null;l&&v();function v(){const _=li(e);m&&!gv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(T=>{i&&T.removeEventListener("scroll",r),s&&T.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var vD=WC,gD=HC,yD=qC,bD=KC,_D=jC,wD=BC,kD=GC,SD=(e,t,r)=>{const n=new Map,i={platform:hD,...r},s={...i.platform,_c:n};return VC(e,t,{...i,platform:s})};function ui(e){return typeof e=="function"?e():e}function yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bv(e,t){const r=yv(e);return Math.round(t*r)/r}function _v(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function ED(e){const t=e.whileElementsMounted,r=D(()=>ui(e.open)??!0),n=D(()=>ui(e.middleware)),i=D(()=>ui(e.transform)??!0),s=D(()=>ui(e.placement)??"bottom"),o=D(()=>ui(e.strategy)??"absolute"),a=D(()=>ui(e.sideOffset)??0),l=D(()=>ui(e.alignOffset)??0),c=e.reference;let d=re(0),u=re(0);const h=kr(null);let f=re(Fe(p(o))),g=re(Fe(p(s))),m=re(Fe({})),v=re(!1),_=!1,T=0;const A=D(()=>{const N=h.current?bv(h.current,p(d)):p(d),se=h.current?bv(h.current,p(u)):p(u);return p(i)?{position:p(f),left:"0",top:"0",transform:`translate(${N}px, ${se}px)`,...h.current&&yv(h.current)>=1.5&&{willChange:"transform"}}:{position:p(f),left:`${N}px`,top:`${se}px`}});let E;function x(){if(c.current===null||h.current===null)return;const N=c.current,se=h.current,V=++T;SD(N,se,{middleware:p(n),placement:p(s),strategy:p(o)}).then(oe=>{if(V===T&&!(c.current!==N||h.current!==se)){if(TD(N)){I(m,{...p(m),hide:{...p(m).hide,referenceHidden:!0}},!0);return}if(!p(r)&&p(d)!==0&&p(u)!==0){const pe=Math.max(Math.abs(p(a)),Math.abs(p(l)),15);if(oe.x<=pe&&oe.y<=pe)return}I(d,oe.x,!0),I(u,oe.y,!0),I(f,oe.strategy,!0),I(g,oe.placement,!0),I(m,oe.middlewareData,!0),I(v,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),T++}function $(){if(O(),t===void 0){x();return}p(r)&&(c.current===null||h.current===null||(E=t(c.current,h.current,x)))}function L(){!p(r)&&h.current===null&&I(v,!1)}function W(){return[p(n),p(s),p(o),p(a),p(l),p(r)]}return me(()=>{t===void 0&&p(r)&&x()}),me($),me(()=>{if(t!==void 0){if(W(),!p(r)){_=!1;return}if(!p(v)){_=!1;return}if(!_){_=!0;return}x()}}),me(L),me(()=>O),{floating:h,reference:c,get strategy(){return p(f)},get placement(){return p(g)},get middlewareData(){return p(m)},get isPositioned(){return p(v)},get floatingStyles(){return p(A)},get update(){return x}}}function TD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var xD={top:"bottom",right:"left",bottom:"top",left:"right"},gc=new Ot("Floating.Root"),wv=new Ot("Floating.Content"),yc=new Ot("Floating.Root"),AD=class nd{static create(t=!1){return t?yc.set(new nd):gc.set(new nd)}anchorNode=kr(null);customAnchorNode=kr(null);triggerNode=kr(null);constructor(){me(()=>{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})}},OD=class id{static create(t,r=!1){return r?wv.set(new id(t,yc.get())):wv.set(new id(t,gc.get()))}opts;root;contentRef=kr(null);wrapperRef=kr(null);arrowRef=kr(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=kr(Fn());#e=D(()=>{if(typeof this.opts.style=="string")return qs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new Zx(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>p(this.#a).length>0);get hasExplicitBoundaries(){return p(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:p(this.#a).filter(cA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return p(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=re(void 0);#d=re(void 0);#c=re(void 0);#h=re(void 0);#p=D(()=>[vD({mainAxis:this.opts.sideOffset.current+p(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&gD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?kD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&yD({...this.detectOverflowOptions}),bD({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#d,n,!0),I(this.#c,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&wD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),DD({arrowWidth:p(this.#n),arrowHeight:p(this.#i)}),this.opts.hideWhenDetached.current&&_D({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return p(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>ID(this.floating.placement));get placedSide(){return p(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>PD(this.floating.placement));get placedAlign(){return p(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return p(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return p(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return p(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=re();get contentZIndex(){return p(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>xD[this.placedSide]);get arrowBaseSide(){return p(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({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":`${p(this.#u)}px`,"--bits-floating-available-height":`${p(this.#d)}px`,"--bits-floating-anchor-width":`${p(this.#c)}px`,"--bits-floating-anchor-height":`${p(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...p(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return p(this.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Zs({...p(this.#e)}),...this.contentAttachment}));get props(){return p(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({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 p(this.#S)}set arrowStyle(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),tt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=ED({strategy:()=>this.opts.strategy.current,placement:()=>p(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>mD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),me(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=rm(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),me(()=>{this.floating.floating.current=this.wrapperRef.current})}},CD=class sd{static create(t,r=!1){return r?new sd(t,yc.get()):new sd(t,gc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=cx(t.virtualEl.current):r.triggerNode=t.ref}};function DD(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=bc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,h=(i.arrow?.y??0)+a/2;let f="",g="";return l==="bottom"?(f=s?d:`${u}px`,g=`${-a}px`):l==="top"?(f=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(f=`${-a}px`,g=s?d:`${h}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${h}px`),{data:{x:f,y:g}}}}}function bc(e){const[t,r="center"]=e.split("-");return[t,r]}function ID(e){return bc(e)[0]}function PD(e){return bc(e)[1]}function kv(e,t){Q(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);AD.create(n());var i={get children(){return r()},set children(a){r(a),y()},get tooltip(){return n()},set tooltip(a=!1){n(a),y()}},s=K(),o=U(s);return _e(o,()=>r()??Me),S(e,s),ee(i)}te(kv,{children:{},tooltip:{}},[],[],{mode:"open"});function Sv(e,t){Q(t,!0);let r=b(t,"id",7),n=b(t,"children",7),i=b(t,"virtualEl",7),s=b(t,"ref",7),o=b(t,"tooltip",7,!1);CD.create({id:R(()=>r()),virtualEl:R(()=>i()),ref:s()},o());var a={get id(){return r()},set id(d){r(d),y()},get children(){return n()},set children(d){n(d),y()},get virtualEl(){return i()},set virtualEl(d){i(d),y()},get ref(){return s()},set ref(d){s(d),y()},get tooltip(){return o()},set tooltip(d=!1){o(d),y()}},l=K(),c=U(l);return _e(c,()=>n()??Me),S(e,l),ee(a)}te(Sv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Ev(e,t){Q(t,!0);let r=b(t,"content",7),n=b(t,"side",7,"bottom"),i=b(t,"sideOffset",7,0),s=b(t,"align",7,"center"),o=b(t,"alignOffset",7,0),a=b(t,"id",7),l=b(t,"arrowPadding",7,0),c=b(t,"avoidCollisions",7,!0),d=b(t,"collisionBoundary",23,()=>[]),u=b(t,"collisionPadding",7,0),h=b(t,"hideWhenDetached",7,!1),f=b(t,"onPlaced",7,()=>{}),g=b(t,"sticky",7,"partial"),m=b(t,"updatePositionStrategy",7,"optimized"),v=b(t,"strategy",7,"fixed"),_=b(t,"dir",7,"ltr"),T=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Fn),E=b(t,"customAnchor",7,null),x=b(t,"enabled",7),O=b(t,"tooltip",7,!1);const $=OD.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>d()),collisionPadding:R(()=>u()),hideWhenDetached:R(()=>h()),onPlaced:R(()=>f()),sticky:R(()=>g()),updatePositionStrategy:R(()=>m()),strategy:R(()=>v()),dir:R(()=>_()),style:R(()=>T()),enabled:R(()=>x()),wrapperId:R(()=>A()),customAnchor:R(()=>E())},O()),L=D(()=>We($.wrapperProps,{style:{pointerEvents:"auto"}}));var W={get content(){return r()},set content(V){r(V),y()},get side(){return n()},set side(V="bottom"){n(V),y()},get sideOffset(){return i()},set sideOffset(V=0){i(V),y()},get align(){return s()},set align(V="center"){s(V),y()},get alignOffset(){return o()},set alignOffset(V=0){o(V),y()},get id(){return a()},set id(V){a(V),y()},get arrowPadding(){return l()},set arrowPadding(V=0){l(V),y()},get avoidCollisions(){return c()},set avoidCollisions(V=!0){c(V),y()},get collisionBoundary(){return d()},set collisionBoundary(V=[]){d(V),y()},get collisionPadding(){return u()},set collisionPadding(V=0){u(V),y()},get hideWhenDetached(){return h()},set hideWhenDetached(V=!1){h(V),y()},get onPlaced(){return f()},set onPlaced(V=()=>{}){f(V),y()},get sticky(){return g()},set sticky(V="partial"){g(V),y()},get updatePositionStrategy(){return m()},set updatePositionStrategy(V="optimized"){m(V),y()},get strategy(){return v()},set strategy(V="fixed"){v(V),y()},get dir(){return _()},set dir(V="ltr"){_(V),y()},get style(){return T()},set style(V={}){T(V),y()},get wrapperId(){return A()},set wrapperId(V=Fn()){A(V),y()},get customAnchor(){return E()},set customAnchor(V=null){E(V),y()},get enabled(){return x()},set enabled(V){x(V),y()},get tooltip(){return O()},set tooltip(V=!1){O(V),y()}},N=K(),se=U(N);return _e(se,()=>r()??Me,()=>({props:$.props,wrapperProps:p(L)})),S(e,N),ee(W)}te(Ev,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function Tv(e,t){Q(t,!0);let r=b(t,"content",7),n=b(t,"onPlaced",7);rn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=K(),o=U(s);return _e(o,()=>r()??Me,()=>({props:{},wrapperProps:{}})),S(e,s),ee(i)}te(Tv,{content:{},onPlaced:{}},[],[],{mode:"open"});var $D=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function xv(e,t){Q(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,$D);var o={get content(){return r()},set content(u){r(u),y()},get isStatic(){return n()},set isStatic(u=!1){n(u),y()},get onPlaced(){return i()},set onPlaced(u){i(u),y()}},a=K(),l=U(a),c=u=>{Tv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Ev(u,kn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),S(e,a),ee(o)}te(xv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var MD=new Set(["$$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"]),FD=j("<!> <!>",1);function _c(e,t){Q(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),h=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),T=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),W=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),Y=b(t,"isValidEvent",7,()=>!1),B=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),G=b(t,"enabled",7),le=b(t,"ref",7),de=b(t,"tooltip",7,!1),F=b(t,"contentPointerEvents",7,"auto"),ue=je(t,MD);const z=D(()=>O()??!0),ge=D(()=>E()??(p(z)?"fixed":"absolute"));var fe={get popper(){return r()},set popper(w){r(w),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),y()},get id(){return o()},set id(w){o(w),y()},get onPointerDown(){return a()},set onPointerDown(w){a(w),y()},get onPointerUp(){return l()},set onPointerUp(w){l(w),y()},get side(){return c()},set side(w){c(w),y()},get sideOffset(){return d()},set sideOffset(w){d(w),y()},get align(){return u()},set align(w){u(w),y()},get alignOffset(){return h()},set alignOffset(w){h(w),y()},get arrowPadding(){return f()},set arrowPadding(w){f(w),y()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),y()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),y()},get collisionPadding(){return v()},set collisionPadding(w){v(w),y()},get sticky(){return _()},set sticky(w){_(w),y()},get hideWhenDetached(){return T()},set hideWhenDetached(w){T(w),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(w){A(w),y()},get strategy(){return E()},set strategy(w){E(w),y()},get dir(){return x()},set dir(w){x(w),y()},get preventScroll(){return O()},set preventScroll(w){O(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return L()},set style(w){L(w),y()},get onPlaced(){return W()},set onPlaced(w){W(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(w){se(w),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(w){V(w),y()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),y()},get loop(){return J()},set loop(w){J(w),y()},get trapFocus(){return ie()},set trapFocus(w=!0){ie(w),y()},get isValidEvent(){return Y()},set isValidEvent(w=()=>!1){Y(w),y()},get customAnchor(){return B()},set customAnchor(w=null){B(w),y()},get isStatic(){return H()},set isStatic(w=!1){H(w),y()},get enabled(){return G()},set enabled(w){G(w),y()},get ref(){return le()},set ref(w){le(w),y()},get tooltip(){return de()},set tooltip(w=!1){de(w),y()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),y()}};return xv(e,{get isStatic(){return H()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return T()},get updatePositionStrategy(){return A()},get strategy(){return p(ge)},get dir(){return x()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return W()},get customAnchor(){return B()},get enabled(){return G()},get tooltip(){return de()},content:(qe,Pe)=>{let Ye=()=>Pe?.().props,kt=()=>Pe?.().wrapperProps;var Ge=FD(),Xt=U(Ge),ct=It=>{Vu(It,{get preventScroll(){return p(z)}})},Qt=It=>{Vu(It,{get preventScroll(){return p(z)}})};ce(Xt,It=>{t.forceMount&&G()?It(ct):t.forceMount||It(Qt,1)});var St=X(Xt,2);Em(St,{get onOpenAutoFocus(){return V()},get onCloseAutoFocus(){return se()},get loop(){return J()},get enabled(){return G()},get trapFocus(){return ie()},get forceMount(){return t.forceMount},get ref(){return le()},focusScope:(er,qt)=>{let hr=()=>qt?.().props;Sm(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return G()},get ref(){return le()},children:(Cr,Dr)=>{km(Cr,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return Y()},get enabled(){return G()},get ref(){return le()},children:(Ir,pr)=>{let Jr=()=>pr?.().props;Am(Ir,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return G()},get ref(){return le()},children:(Xr,_t)=>{var zn=K(),rs=U(zn);{let ns=D(()=>({props:We(ue,Ye(),Jr(),hr(),{style:{pointerEvents:F()}}),wrapperProps:kt()}));_e(rs,()=>r()??Me,()=>p(ns))}S(Xr,zn)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(qe,Ge)},$$slots:{content:!0}}),ee(fe)}te(_c,{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"});var ND=new Set(["$$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"]);function Av(e,t){Q(t,!0);let r=b(t,"popper",7),n=b(t,"open",7),i=b(t,"onEscapeKeydown",7),s=b(t,"escapeKeydownBehavior",7),o=b(t,"preventOverflowTextSelection",7),a=b(t,"id",7),l=b(t,"onPointerDown",7),c=b(t,"onPointerUp",7),d=b(t,"side",7),u=b(t,"sideOffset",7),h=b(t,"align",7),f=b(t,"alignOffset",7),g=b(t,"arrowPadding",7),m=b(t,"avoidCollisions",7),v=b(t,"collisionBoundary",7),_=b(t,"collisionPadding",7),T=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),E=b(t,"updatePositionStrategy",7),x=b(t,"strategy",7),O=b(t,"dir",7),$=b(t,"preventScroll",7),L=b(t,"wrapperId",7),W=b(t,"style",7),N=b(t,"onPlaced",7),se=b(t,"onInteractOutside",7),V=b(t,"onCloseAutoFocus",7),oe=b(t,"onOpenAutoFocus",7),pe=b(t,"onFocusOutside",7),J=b(t,"interactOutsideBehavior",7,"close"),ie=b(t,"loop",7),Y=b(t,"trapFocus",7,!0),B=b(t,"isValidEvent",7,()=>!1),H=b(t,"customAnchor",7,null),G=b(t,"isStatic",7,!1),le=b(t,"ref",7),de=b(t,"shouldRender",7),F=je(t,ND);var ue={get popper(){return r()},set popper(w){r(w),y()},get open(){return n()},set open(w){n(w),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(w){o(w),y()},get id(){return a()},set id(w){a(w),y()},get onPointerDown(){return l()},set onPointerDown(w){l(w),y()},get onPointerUp(){return c()},set onPointerUp(w){c(w),y()},get side(){return d()},set side(w){d(w),y()},get sideOffset(){return u()},set sideOffset(w){u(w),y()},get align(){return h()},set align(w){h(w),y()},get alignOffset(){return f()},set alignOffset(w){f(w),y()},get arrowPadding(){return g()},set arrowPadding(w){g(w),y()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),y()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),y()},get collisionPadding(){return _()},set collisionPadding(w){_(w),y()},get sticky(){return T()},set sticky(w){T(w),y()},get hideWhenDetached(){return A()},set hideWhenDetached(w){A(w),y()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),y()},get strategy(){return x()},set strategy(w){x(w),y()},get dir(){return O()},set dir(w){O(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return L()},set wrapperId(w){L(w),y()},get style(){return W()},set style(w){W(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return se()},set onInteractOutside(w){se(w),y()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),y()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),y()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),y()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),y()},get loop(){return ie()},set loop(w){ie(w),y()},get trapFocus(){return Y()},set trapFocus(w=!0){Y(w),y()},get isValidEvent(){return B()},set isValidEvent(w=()=>!1){B(w),y()},get customAnchor(){return H()},set customAnchor(w=null){H(w),y()},get isStatic(){return G()},set isStatic(w=!1){G(w),y()},get ref(){return le()},set ref(w){le(w),y()},get shouldRender(){return de()},set shouldRender(w){de(w),y()}},z=K(),ge=U(z),fe=w=>{_c(w,kn({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 c()},get side(){return d()},get sideOffset(){return u()},get align(){return h()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return T()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return E()},get strategy(){return x()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return L()},get style(){return W()},get onPlaced(){return N()},get customAnchor(){return H()},get isStatic(){return G()},get enabled(){return n()},get onInteractOutside(){return se()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return J()},get loop(){return ie()},get trapFocus(){return Y()},get isValidEvent(){return B()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return le()}},()=>F))};return ce(ge,w=>{de()&&w(fe)}),S(e,z),ee(ue)}te(Av,{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"});var RD=new Set(["$$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"]);function Ov(e,t){Q(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),h=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),T=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),x=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),W=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),J=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),Y=b(t,"isValidEvent",7,()=>!1),B=b(t,"customAnchor",7,null),H=b(t,"isStatic",7,!1),G=b(t,"enabled",7),le=je(t,RD);var de={get popper(){return r()},set popper(F){r(F),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),y()},get id(){return o()},set id(F){o(F),y()},get onPointerDown(){return a()},set onPointerDown(F){a(F),y()},get onPointerUp(){return l()},set onPointerUp(F){l(F),y()},get side(){return c()},set side(F){c(F),y()},get sideOffset(){return d()},set sideOffset(F){d(F),y()},get align(){return u()},set align(F){u(F),y()},get alignOffset(){return h()},set alignOffset(F){h(F),y()},get arrowPadding(){return f()},set arrowPadding(F){f(F),y()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),y()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),y()},get collisionPadding(){return v()},set collisionPadding(F){v(F),y()},get sticky(){return _()},set sticky(F){_(F),y()},get hideWhenDetached(){return T()},set hideWhenDetached(F){T(F),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(F){A(F),y()},get strategy(){return E()},set strategy(F){E(F),y()},get dir(){return x()},set dir(F){x(F),y()},get preventScroll(){return O()},set preventScroll(F){O(F),y()},get wrapperId(){return $()},set wrapperId(F){$(F),y()},get style(){return L()},set style(F){L(F),y()},get onPlaced(){return W()},set onPlaced(F){W(F),y()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(F){se(F),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(F){V(F),y()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),y()},get loop(){return J()},set loop(F){J(F),y()},get trapFocus(){return ie()},set trapFocus(F=!0){ie(F),y()},get isValidEvent(){return Y()},set isValidEvent(F=()=>!1){Y(F),y()},get customAnchor(){return B()},set customAnchor(F=null){B(F),y()},get isStatic(){return H()},set isStatic(F=!1){H(F),y()},get enabled(){return G()},set enabled(F){G(F),y()}};return _c(e,kn({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 c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return T()},get updatePositionStrategy(){return A()},get strategy(){return E()},get dir(){return x()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return W()},get customAnchor(){return B()},get isStatic(){return H()},get enabled(){return G()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return se()},get onOpenAutoFocus(){return V()},get interactOutsideBehavior(){return pe()},get loop(){return J()},get trapFocus(){return ie()},get isValidEvent(){return Y()},get onFocusOutside(){return oe()}},()=>le,{forceMount:!0})),ee(de)}te(Ov,{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"});var Ra=fa({component:"date-field",parts:["input","label","segment"]}),qi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return Ks(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Vt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||Um(e.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}},Ln=new Ot("DateField.Root"),LD=class dy{static create(t,r){return Ln.set(new dy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Fn();formatter;initialSegments;#e=re();get segmentValues(){return p(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return p(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=Rm();#r=re(null);#n=re(null);#i=re(null);get descriptionNode(){return p(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=re(null);get validationNode(){return p(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=Rm();#a=re(null);get dayPeriodNode(){return p(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=re("");get name(){return p(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new Li(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?kr(void 0):t.validate,this.minValue=r?r.opts.minValue:t.minValue,this.maxValue=r?r.opts.maxValue:t.maxValue,this.disabled=r?r.opts.disabled:t.disabled,this.readonly=r?r.opts.readonly:t.readonly,this.granularity=r?r.opts.granularity:t.granularity,this.readonlySegments=r?r.opts.readonlySegments:t.readonlySegments,this.hourCycle=r?r.opts.hourCycle:t.hourCycle,this.locale=r?r.opts.locale:t.locale,this.hideTimeZone=r?r.opts.hideTimeZone:t.hideTimeZone,this.required=r?r.opts.required:t.required,this.onInvalid=r?r.opts.onInvalid:t.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:t.errorMessageId,this.isInvalidProp=t.isInvalidProp,this.formatter=qm({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=Zu(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Sa(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),me(()=>{Ue(()=>{this.initialSegments=Zu(this.inferredGranularity)})}),rn(()=>{this.announcer=Sa(this.domContext.getDocument())}),ni(()=>{r||EO(this.descriptionId,this.domContext.getDocument())}),me(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),me(()=>{if(r)return;this.value.current&&SO({id:Ue(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Ue(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ue(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),me(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),me(()=>{this.value.current===void 0&&(this.segmentValues=Zu(this.inferredGranularity))}),tt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:p(this.#r)}setLabelNode(t){I(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:p(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(t){this.value.current=t}syncSegmentValues(t){const r=Ta.map(n=>{const i=t[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 s=4-`${i}`.length;if(s>0)return[n,`${"0".repeat(s)}${i}`]}return[n,`${i}`]});if("hour"in t){const n=xa.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Vt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&oi(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&oi(i,t)?{reason:"max"}:!1});get validationStatus(){return p(this.#u)}set validationStatus(t){I(this.#u,t)}#d=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>{const t=this.granularity.current;return t||wO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return p(this.#c)}set inferredGranularity(t){I(this.#c,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return p(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>mO({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 p(this.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return p(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(_O(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const h=Ks(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const h=this.value.current;if(h&&"hour"in h){const f=h.hour;u==="AM"?f>=12&&(o.hour=`${f-12}`):u==="PM"&&f<12&&(o.hour=`${f+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const h=this.formatter.dayPeriod(Vt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(h==="AM"||h==="PM")&&(o.dayPeriod=h)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Aa(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const h=Ks(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`),a={...o,[t]:u}}else if(t==="year"){const h=d(c);this.states.year.updating=h,a={...o,[t]:h}}else if(t==="day"){const h=d(c);this.states.day.updating=h,a={...o,[t]:h}}else a={...o,[t]:u}}this.segmentValues=a,bO(a,p(this.#r))?this.setValue(yO({segmentObj:a,fieldNode:p(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Mu(this.isInvalid),"aria-disabled":Sr(this.disabled.current),"aria-readonly":Sr(this.readonly.current||n),"data-invalid":Le(this.isInvalid),"data-disabled":Le(this.disabled.current),"data-readonly":Le(this.readonly.current||n),"data-segment":`${t}`,[Ra.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=kO(r,p(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},zD=class fy{static create(t){return new fy(t,Ln.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Li(t.ref),this.root.domContext=this.domContext,this.attachment=Qe(t.ref,n=>this.root.setFieldNode(n)),tt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(on&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":p(this.#e),"aria-disabled":Sr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Le(this.root.disabled.current),[Ra.input]:"",...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},UD=class hy{static create(){return new hy(Ln.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return p(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return p(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},VD=class py{static create(t){return new py(t,Ln.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=AO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Le(this.root.isInvalid),"data-disabled":Le(this.root.disabled.current),[Ra.label]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},ji=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=Qe(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,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=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 t))&&(e.key!=="Tab"&&e.preventDefault(),!!Wu(e.key))){if(wc(e.key)){this.#i(t);return}if(kc(e.key)){this.#s(t);return}if(ha(e.key)){this.#a(e);return}if(Sc(e.key)){this.#o(e);return}Xs(e.key)&&Js(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Vm(e,this.root.getFieldNode())}#o(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&Bm(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...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 p(this.#l)}set props(e){I(this.#l,e)}},BD=class extends ji{#e=[];#t=0;constructor(e,t){super(e,t,"year",qi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!Wu(e.key))){if(wc(e.key)){this.#r(),super.onkeydown(e);return}if(kc(e.key)){this.#r(),super.onkeydown(e);return}if(ha(e.key)){this.#i(e);return}if(Sc(e.key)){this.#s(e);return}Xs(e.key)&&Js(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),Cv(s));this.announcer.announce(s),t=!0;const o=`${s}`;return o.length>4?o.slice(0,4):o}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&Vm(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let t=!1;this.root.updateSegment("year",r=>{if(this.root.states.year.hasLeftFocus=!1,r===null)return t=!0,this.announcer.announce(null),null;const n=r.toString();if(n.length===1)return this.announcer.announce(null),null;const i=n.slice(0,-1);return this.announcer.announce(i),`${i}`}),t&&Bm(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",t=>t&&t.length!==4?Cv(Number.parseInt(t)):t)}},qD=class extends ji{constructor(e,t){super(e,t,"day",qi.day)}},jD=class extends ji{constructor(e,t){super(e,t,"month",qi.month)}},ZD=class extends ji{constructor(e,t){super(e,t,"hour",qi.hour)}onkeydown(e){if(ha(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},WD=class extends ji{constructor(e,t){super(e,t,"minute",qi.minute)}},HD=class extends ji{constructor(e,t){super(e,t,"second",qi.second)}},GD=class my{static create(t){return new my(t,Ln.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!XD(t.key))){if(wc(t.key)||kc(t.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}Sc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),Xs(t.key)&&Js(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.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 p(this.#t)}set props(t){I(this.#t,t)}},KD=class vy{static create(t){return new vy(t,Ln.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Mu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},YD=class gy{static create(t){return new gy(t,Ln.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&Xs(t.key)&&Js(t,this.root.getFieldNode())}#e=D(()=>({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":Le(!0),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},JD=class{static create(e,t){const r=Ln.get();switch(e){case"day":return new qD(t,r);case"month":return new jD(t,r);case"year":return new BD(t,r);case"hour":return new ZD(t,r);case"minute":return new WD(t,r);case"second":return new HD(t,r);case"dayPeriod":return new GD(t,r);case"literal":return new KD(t,r);case"timeZoneName":return new YD(t,r)}}};function XD(e){return Wu(e)||e==="A"||e==="P"||e==="a"||e==="p"}function wc(e){return e===Nu}function kc(e){return e===Fu}function Sc(e){return e===oA}function Cv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Dv(e,t){Q(t,!1);const r=UD.create();Zl();var n=K(),i=U(n),s=o=>{Xm(o,kn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),S(e,n),ee()}te(Dv,{},[],[],{mode:"open"});var QD=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),eI=j("<div><!></div>"),tI=j("<!> <!>",1);function Iv(e,t){const r=gt();Q(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"name",7,""),o=b(t,"children",7),a=b(t,"child",7),l=je(t,QD);const c=zD.create({id:R(()=>n()),ref:R(()=>i(),v=>i(v)),name:R(()=>s())}),d=D(()=>We(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get name(){return s()},set name(v=""){s(v),y()},get children(){return o()},set children(v){o(v),y()},get child(){return a()},set child(v){a(v),y()}},h=tI(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,a,()=>({props:p(d),segments:c.root.segmentContents})),S(v,_)},m=v=>{var _=eI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>o()??Me,()=>({segments:c.root.segmentContents})),P(_),S(v,_)};return ce(f,v=>{a()?v(g):v(m,-1)}),Dv(X(f,2),{}),S(e,h),ee(u)}te(Iv,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var rI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),nI=j("<div><!></div>");function Pv(e,t){const r=gt();Q(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=je(t,rI);const l=VD.create({id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),c=D(()=>We(a,l.props));var d={get id(){return n()},set id(m=Ce(r)){n(m),y()},get ref(){return i()},set ref(m=null){i(m),y()},get children(){return s()},set children(m){s(m),y()},get child(){return o()},set child(m){o(m),y()}},u=K(),h=U(u),f=m=>{var v=K(),_=U(v);_e(_,o,()=>({props:p(c)})),S(m,v)},g=m=>{var v=nI();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>s()??Me),P(v),S(m,v)};return ce(h,m=>{o()?m(f):m(g,-1)}),S(e,u),ee(d)}te(Pv,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var iI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),sI=j("<span><!></span>");function $v(e,t){const r=gt();Q(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=b(t,"part",7),l=je(t,iI);const c=JD.create(a(),{id:R(()=>n()),ref:R(()=>i(),v=>i(v))}),d=D(()=>We(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get children(){return s()},set children(v){s(v),y()},get child(){return o()},set child(v){o(v),y()},get part(){return a()},set part(v){a(v),y()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);_e(T,o,()=>({props:p(d)})),S(v,_)},m=v=>{var _=sI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>s()??Me),P(_),S(v,_)};return ce(f,v=>{o()?v(g):v(m,-1)}),S(e,h),ee(u)}te($v,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var Mv=new Ot("DatePicker.Root"),oI=class yy{static create(t){return Mv.set(new yy(t))}opts;constructor(t){this.opts=t}};function Ec(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=t[o]??[0,0],[d,u]=t[a]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function Tc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Fv(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}var aI=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#d(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#c(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#c(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,tt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=da(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const h=u.relatedTarget;if(ii(h)&&n.contains(h))return;const f=this.#e.ignoredTargets?.()??[];ii(h)&&f.some(g=>g===h||g.contains(h))||(this.#s=ii(h)&&f.length>0?f.filter(g=>h.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#d())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const h=u.relatedTarget;ii(h)&&r.contains(h)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#d())};return[pt(s,"pointermove",o),pt(r,"pointerleave",a),pt(r,"pointerenter",l),pt(n,"pointerenter",c),pt(n,"pointerleave",d)].reduce((u,h)=>()=>{u(),h()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&Tc(e,i)){this.#f();return}if(this.#i==="trigger"&&Tc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Tc(e,c))return;const d=Fv(n,c),u=this.#m(n,c,d);if(u&&Ec(e,u))return}const s=Fv(n,i),o=this.#m(n,i,s);if(o&&Ec(e,o))return;const a=this.#i==="content"?i:n;Ec(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#c()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},xc=fa({component:"popover",parts:["root","trigger","content","close","overlay"]}),Ac=new Ot("Popover.Root"),lI=class by{static create(t){return Ac.set(new by(t))}opts;#e=re(null);get contentNode(){return p(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=re(null);get triggerNode(){return p(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=re(null);get overlayNode(){return p(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=re(!1);get openedViaHover(){return p(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=re(!1);get hasInteractedWithContent(){return p(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=re(!1);get hoverCooldown(){return p(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=re(0);get closeDelay(){return p(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new am({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new am({ref:R(()=>this.overlayNode),open:this.opts.open}),tt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#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()}},uI=class _y{static create(t){return new _y(t,Ac.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=re(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Li(t.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),tt(()=>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(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||pa(t)||(I(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(t){this.opts.disabled.current||this.opts.openOnHover.current&&(pa(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),p(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}p(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(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Sr(this.root.opts.open.current),"data-state":nm(this.root.opts.open.current),"aria-controls":this.#a(),[xc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#o)}set props(t){I(this.#o,t)}},cI=class wy{static create(t){return new wy(t,Ac.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(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 aI({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(t){this.root.markInteraction()}onfocusin(t){const r=t.target;ii(r)&&$A(r)&&this.root.markInteraction()}onpointerenter(t){pa(t)||this.root.cancelDelayedClose()}onpointerleave(t){pa(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ii(t.target))return;const r=t.target.closest(xc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ii(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":nm(this.root.opts.open.current),...iA(this.root.contentPresence.transitionStatus),[xc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function Nv(e,t){Q(t,!0);let r=b(t,"open",15,!1),n=b(t,"onOpenChange",7,Se),i=b(t,"onOpenChangeComplete",7,Se),s=b(t,"value",15),o=b(t,"onValueChange",7,Se),a=b(t,"placeholder",15),l=b(t,"onPlaceholderChange",7,Se),c=b(t,"isDateUnavailable",7,()=>!1),d=b(t,"validate",7,Se),u=b(t,"onInvalid",7,Se),h=b(t,"minValue",7),f=b(t,"maxValue",7),g=b(t,"disabled",7,!1),m=b(t,"readonly",7,!1),v=b(t,"granularity",7),_=b(t,"readonlySegments",23,()=>[]),T=b(t,"hourCycle",7),A=b(t,"locale",7),E=b(t,"hideTimeZone",7,!1),x=b(t,"required",7,!1),O=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),L=b(t,"preventDeselect",7,!1),W=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),se=b(t,"weekdayFormat",7,"narrow"),V=b(t,"isDateDisabled",7,()=>!1),oe=b(t,"fixedWeeks",7,!1),pe=b(t,"numberOfMonths",7,1),J=b(t,"closeOnDateSelect",7,!0),ie=b(t,"initialFocus",7,!1),Y=b(t,"errorMessageId",7),B=b(t,"children",7),H=b(t,"monthFormat",7,"long"),G=b(t,"yearFormat",7,"numeric");const le=Dm({granularity:v(),defaultValue:s(),minValue:h(),maxValue:f()});function de(){a()===void 0&&a(le)}de(),tt.pre(()=>a(),()=>{de()});function F(){J()&&r(!1)}const ue=oI.create({open:R(()=>r(),w=>{r(w),n()(w)}),value:R(()=>s(),w=>{s(w),o()(w)}),placeholder:R(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:R(()=>c()),minValue:R(()=>h()),maxValue:R(()=>f()),disabled:R(()=>g()),readonly:R(()=>m()),granularity:R(()=>v()),readonlySegments:R(()=>_()),hourCycle:R(()=>T()),locale:um(()=>A()),hideTimeZone:R(()=>E()),required:R(()=>x()),calendarLabel:R(()=>O()),disableDaysOutsideMonth:R(()=>$()),preventDeselect:R(()=>L()),pagedNavigation:R(()=>W()),weekStartsOn:R(()=>N()),weekdayFormat:R(()=>se()),isDateDisabled:R(()=>V()),fixedWeeks:R(()=>oe()),numberOfMonths:R(()=>pe()),initialFocus:R(()=>ie()),onDateSelect:R(()=>F),defaultPlaceholder:le,monthFormat:R(()=>H()),yearFormat:R(()=>G())});lI.create({open:ue.opts.open,onOpenChangeComplete:R(()=>i())}),LD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:R(()=>d()),onInvalid:R(()=>u()),minValue:ue.opts.minValue,maxValue:ue.opts.maxValue,granularity:ue.opts.granularity,hideTimeZone:ue.opts.hideTimeZone,hourCycle:ue.opts.hourCycle,locale:ue.opts.locale,required:ue.opts.required,placeholder:ue.opts.placeholder,errorMessageId:R(()=>Y()),isInvalidProp:R(()=>{})});var z={get open(){return r()},set open(w=!1){r(w),y()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),y()},get value(){return s()},set value(w){s(w),y()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),y()},get placeholder(){return a()},set placeholder(w){a(w),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),y()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),y()},get validate(){return d()},set validate(w=Se){d(w),y()},get onInvalid(){return u()},set onInvalid(w=Se){u(w),y()},get minValue(){return h()},set minValue(w){h(w),y()},get maxValue(){return f()},set maxValue(w){f(w),y()},get disabled(){return g()},set disabled(w=!1){g(w),y()},get readonly(){return m()},set readonly(w=!1){m(w),y()},get granularity(){return v()},set granularity(w){v(w),y()},get readonlySegments(){return _()},set readonlySegments(w=[]){_(w),y()},get hourCycle(){return T()},set hourCycle(w){T(w),y()},get locale(){return A()},set locale(w){A(w),y()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),y()},get required(){return x()},set required(w=!1){x(w),y()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),y()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),y()},get preventDeselect(){return L()},set preventDeselect(w=!1){L(w),y()},get pagedNavigation(){return W()},set pagedNavigation(w=!1){W(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return se()},set weekdayFormat(w="narrow"){se(w),y()},get isDateDisabled(){return V()},set isDateDisabled(w=()=>!1){V(w),y()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),y()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),y()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),y()},get initialFocus(){return ie()},set initialFocus(w=!1){ie(w),y()},get errorMessageId(){return Y()},set errorMessageId(w){Y(w),y()},get children(){return B()},set children(w){B(w),y()},get monthFormat(){return H()},set monthFormat(w="long"){H(w),y()},get yearFormat(){return G()},set yearFormat(w="numeric"){G(w),y()}},ge=K(),fe=U(ge);return De(fe,()=>kv,(w,qe)=>{qe(w,{children:(Pe,Ye)=>{var kt=K(),Ge=U(kt);_e(Ge,()=>B()??Me),S(Pe,kt)},$$slots:{default:!0}})}),S(e,ge),ee(z)}te(Nv,{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 dI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),fI=j("<div><!></div>");function Rv(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=je(t,dI);const l=Mv.get(),c=Gm.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),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:R(()=>"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:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>We(a,c.props));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()}},h=K(),f=U(h),g=v=>{var _=K(),T=U(_);{let A=D(()=>({props:p(d),...c.snippetProps}));_e(T,i,()=>p(A))}S(v,_)},m=v=>{var _=fI();Ne(_,()=>({...p(d)}));var T=M(_);_e(T,()=>n()??Me,()=>c.snippetProps),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),ee(u)}te(Rv,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var hI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),Lv=j("<div><div><!></div></div>");function zv(e,t){const r=gt();Q(t,!0);let n=b(t,"child",7),i=b(t,"children",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"forceMount",7,!1),l=b(t,"onOpenAutoFocus",7,Se),c=b(t,"onCloseAutoFocus",7,Se),d=b(t,"onEscapeKeydown",7,Se),u=b(t,"onInteractOutside",7,Se),h=b(t,"trapFocus",7,!0),f=b(t,"preventScroll",7,!1),g=b(t,"customAnchor",7,null),m=b(t,"style",7),v=je(t,hI);const _=cI.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>u()),onEscapeKeydown:R(()=>d()),customAnchor:R(()=>g())}),T=D(()=>We(v,_.props)),A=D(()=>h()&&_.shouldTrapFocus);function E(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var x={get child(){return n()},set child(N){n(N),y()},get children(){return i()},set children(N){i(N),y()},get ref(){return s()},set ref(N=null){s(N),y()},get id(){return o()},set id(N=Ce(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),y()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),y()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){u(N),y()},get trapFocus(){return h()},set trapFocus(N=!0){h(N),y()},get preventScroll(){return f()},set preventScroll(N=!1){f(N),y()},get customAnchor(){return g()},set customAnchor(N=null){g(N),y()},get style(){return m()},set style(N){m(N),y()}},O=K(),$=U(O),L=N=>{Ov(N,kn(()=>p(T),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:_v("popover")},{style:m()}));var Y=K(),B=U(Y),H=le=>{var de=K(),F=U(de);{let ue=D(()=>({props:p(ie),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},G=le=>{var de=Lv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(B,le=>{n()?le(H):le(G,-1)}),S(V,Y)},$$slots:{popper:!0}}))},W=N=>{Av(N,kn(()=>p(T),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:_v("popover")},{style:m()}));var Y=K(),B=U(Y),H=le=>{var de=K(),F=U(de);{let ue=D(()=>({props:p(ie),wrapperProps:J(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,de)},G=le=>{var de=Lv();Ne(de,()=>({...J()}));var F=M(de);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Me),P(F),P(de),S(le,de)};ce(B,le=>{n()?le(H):le(G,-1)}),S(V,Y)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(L):a()||N(W,1)}),S(e,O),ee(x)}te(zv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var pI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Uv(e,t){Q(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,pI);const s=D(()=>We({onOpenAutoFocus:n()},{onOpenAutoFocus:BO}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return zv(e,kn(()=>p(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),ee(o)}te(Uv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),vI=j("<button><!></button>");function Vv(e,t){const r=gt();Q(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"type",7,"button"),l=b(t,"disabled",7,!1),c=b(t,"openOnHover",7,!1),d=b(t,"openDelay",7,700),u=b(t,"closeDelay",7,300),h=je(t,mI);const f=uI.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>d()),closeDelay:R(()=>u())}),g=D(()=>We(h,f.props,{type:a()}));var m={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get type(){return a()},set type(v="button"){a(v),y()},get disabled(){return l()},set disabled(v=!1){l(v),y()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),y()},get openDelay(){return d()},set openDelay(v=700){d(v),y()},get closeDelay(){return u()},set closeDelay(v=300){u(v),y()}};return Sv(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var T=K(),A=U(T),E=O=>{var $=K(),L=U($);_e(L,i,()=>({props:p(g)})),S(O,$)},x=O=>{var $=vI();Ne($,()=>({...p(g)}));var L=M($);_e(L,()=>n()??Me),P($),S(O,$)};ce(A,O=>{i()?O(E):O(x,-1)}),S(v,T)},$$slots:{default:!0}}),ee(m)}te(Vv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var gI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Bv(e,t){Q(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,gI);function s(l){if(Xs(l.key)){const c=l.currentTarget.closest(Ra.selector("input"));if(!c)return;Js(l,c)}}const o=D(()=>We({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),y()},get onkeydown(){return n()},set onkeydown(l){n(l),y()}};return Vv(e,kn(()=>i,{"data-segment":"trigger"},()=>p(o),{get ref(){return r()},set ref(l){r(l)}})),ee(a)}te(Bv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Oc=j("<!> <!>",1),qv=j("<!> <!> <!>",1);function jv(e,t){Q(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=re(Fe(Xn(Ut())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);me(()=>{r(p(o).toString())});var l={get dateString(){return r()},set dateString(u){r(u),y()},get labelClass(){return n()},set labelClass(u){n(u),y()},get inputClass(){return i()},set inputClass(u){i(u),y()},get labelText(){return s()},set labelText(u){s(u),y()}},c=K(),d=U(c);{let u=D(()=>C.locale||"de");De(d,()=>Nv,(h,f)=>{f(h,{get locale(){return p(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Xn(Ut()))<0,get value(){return p(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=qv(),_=U(v);De(_,()=>Pv,(E,x)=>{x(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var L=K(),W=U(L),N=se=>{var V=K(),oe=U(V);_e(oe,s),S(se,V)};ce(W,se=>{s()&&se(N)}),S(O,L)},$$slots:{default:!0}})});var T=X(_,2);{const E=(x,O)=>{let $=()=>O?.().segments;var L=Oc(),W=U(L);Ve(W,17,$,zr,(se,V)=>{let oe=()=>p(V).part,pe=()=>p(V).value;var J=K(),ie=U(J);De(ie,()=>$v,(Y,B)=>{B(Y,{get part(){return oe()},children:(H,G)=>{Et();var le=Rt();ae(()=>ne(le,pe())),S(H,le)},$$slots:{default:!0}})}),S(se,J)});var N=X(W,2);De(N,()=>Bv,(se,V)=>{V(se,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),S(x,L)};De(T,()=>Iv,(x,O)=>{O(x,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var A=X(T,2);De(A,()=>Uv,(E,x)=>{x(E,{children:(O,$)=>{var L=K(),W=U(L);{const N=(se,V)=>{let oe=()=>V?.().months,pe=()=>V?.().weekdays;var J=Oc(),ie=U(J);De(ie,()=>rc,(B,H)=>{H(B,{children:(G,le)=>{var de=qv(),F=U(de);De(F,()=>sc,(ge,fe)=>{fe(ge,{class:"go-datepicker-previous"})});var ue=X(F,2);De(ue,()=>nc,(ge,fe)=>{fe(ge,{class:"go-datepicker-selected-month"})});var z=X(ue,2);De(z,()=>ic,(ge,fe)=>{fe(ge,{class:"go-datepicker-next"})}),S(G,de)},$$slots:{default:!0}})});var Y=X(ie,2);Ve(Y,16,oe,B=>B,(B,H)=>{var G=K(),le=U(G);De(le,()=>Ju,(de,F)=>{F(de,{children:(ue,z)=>{var ge=Oc(),fe=U(ge);De(fe,()=>ec,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=K(),Xt=U(Ge);De(Xt,()=>eo,(ct,Qt)=>{Qt(ct,{children:(St,It)=>{var er=K(),qt=U(er);Ve(qt,17,pe,zr,(hr,Cr)=>{var Dr=K(),mn=U(Dr);De(mn,()=>tc,(Ir,pr)=>{pr(Ir,{children:(Jr,Xr)=>{Et();var _t=Rt();ae(()=>ne(_t,p(Cr))),S(Jr,_t)},$$slots:{default:!0}})}),S(hr,Dr)}),S(St,er)},$$slots:{default:!0}})}),S(Ye,Ge)},$$slots:{default:!0}})});var w=X(fe,2);De(w,()=>Xu,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=K(),Xt=U(Ge);Ve(Xt,16,()=>H.weeks,ct=>ct,(ct,Qt)=>{var St=K(),It=U(St);De(It,()=>eo,(er,qt)=>{qt(er,{children:(hr,Cr)=>{var Dr=K(),mn=U(Dr);Ve(mn,16,()=>Qt,Ir=>Ir,(Ir,pr,Jr,Xr)=>{var _t=K(),zn=U(_t);De(zn,()=>Qu,(rs,ns)=>{ns(rs,{get date(){return pr},get month(){return H.value},children:(ao,Wc)=>{var mi=K(),is=U(mi);De(is,()=>Yu,(mr,Un)=>{Un(mr,{})}),S(ao,mi)},$$slots:{default:!0}})}),S(Ir,_t)}),S(hr,Dr)},$$slots:{default:!0}})}),S(ct,St)}),S(Ye,Ge)},$$slots:{default:!0}})}),S(ue,ge)},$$slots:{default:!0}})}),S(B,G)}),S(se,J)};De(W,()=>Rv,(se,V)=>{V(se,{children:N,$$slots:{default:!0}})})}S(O,L)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})})}return S(e,c),ee(l)}te(jv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var yI=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),bI=j('<span class="go-field-star" aria-hidden="true">*</span>'),_I=j(" <!>",1),wI=j("<label><!></label> <input/>",1),kI=j("<label><!></label> <textarea></textarea>",1),SI=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),EI=j("<label><!></label> <input/> <!>",1),TI=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),xI=j('<img src="" alt=""/> <option> </option>',1),AI=j('<option disabled="" hidden="" selected=""> </option> <!>',1),OI=j("<!>",1),CI=j("<label><!></label> <select><!></select>",1),DI=j('<img style="width: 60px" aria-hidden="true"/>'),II=j('<span class="go-payment-mode-icons"></span>'),PI=j('<label><input type="radio"/> <!></label>'),$I=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),MI=j("<label> <input/></label>"),FI=j("<fieldset><legend><!></legend> <!></fieldset>");function Zv(e,t){Q(t,!0);const r=J=>{Et();var ie=_I(),Y=U(ie),B=X(Y),H=G=>{var le=bI();S(G,le)};ce(B,G=>{u().required&&G(H)}),ae(()=>ne(Y,`${p(L)??""} `)),S(J,ie)},n=J=>{var ie=wI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Ne(B,()=>({...p($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ae(()=>{Lt(Y,1,Ur(f())),ke(Y,"for",p(x))}),Ro(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},i=J=>{var ie=kI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Cb(B),Ne(B,()=>({...p($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ae(()=>{Lt(Y,1,Ur(f())),ke(Y,"for",p(x))}),Ro(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},s=J=>{var ie=EI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2),H=de=>{const F=de.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),p(T)?p(T).validateField(u()):u().validate()};Ne(B,()=>({...p($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:H}),void 0,void 0,void 0,void 0,!0);var G=X(B,2),le=de=>{var F=SI(),ue=M(F),z=X(ue,2),ge=M(z,!0);P(z),P(F),ae(fe=>{ke(F,"data-field-preview",u().key),ke(ue,"src",p(N)),ke(ue,"alt",fe),ne(ge,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),S(de,F)};ce(G,de=>{p(N)&&u().value instanceof File&&de(le)}),ae(()=>{Lt(Y,1,Ur(f())),ke(Y,"for",p(x))}),S(J,ie)},o=J=>{var ie=TI(),Y=M(ie);Ne(Y,()=>({...p($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var B=X(Y,2);r(M(B)),P(B),P(ie),ae(()=>{Lt(ie,1,Ur(f())),ke(ie,"for",p(x))}),k_(Y,()=>u().value===!0,H=>{u(u().value=H,!0)}),S(J,ie)},a=J=>{var ie=CI(),Y=U(ie);r(M(Y)),P(Y);var B=X(Y,2);Ne(B,()=>({...p($),...v,name:u().key,class:g()})),__(B,()=>{var H=M(B),G=OI(),le=U(G),de=F=>{var ue=AI(),z=U(ue),ge=M(z,!0);P(z),z.value=z.__value="";var fe=X(z,2);Ve(fe,17,()=>u().options(),w=>w.value,(w,qe)=>{var Pe=xI(),Ye=X(U(Pe),2),kt=M(Ye,!0);P(Ye);var Ge={};ae(()=>{ne(kt,p(qe).label),Ge!==(Ge=p(qe).value)&&(Ye.value=(Ye.__value=p(qe).value)??"")}),S(w,Pe)}),ae(w=>ne(ge,w),[()=>C.t("common.choose")]),S(F,ue)};ce(le,F=>{u().options&&F(de)}),S(H,G)}),ae(()=>{Lt(Y,1,Ur(f())),ke(Y,"for",p(x))}),d_(B,()=>u().value,H=>u(u().value=H,!0)),S(J,ie)},l=J=>{jv(J,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(ie){u(u().value=ie,!0)}})},c=J=>{const ie=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var Y=$I(),B=M(Y);r(M(B)),P(B);var H=X(B,2);Ve(H,17,()=>p(ie),G=>G.id,(G,le)=>{var de=PI(),F=M(de);Fo(F);var ue=X(F,2),z=ge=>{var fe=II();Ve(fe,20,()=>p(le).icons,w=>w,(w,qe)=>{const Pe=D(()=>W+qe+".svg");var Ye=DI();ae(()=>{Lt(Ye,1,Ur(qe)),ke(Ye,"src",p(Pe)),ke(Ye,"alt",qe+" icon")}),S(w,Ye)}),P(fe),S(ge,fe)};ce(ue,ge=>{p(le).icons.length>0&&ge(z)}),P(de),ae((ge,fe,w)=>{ke(F,"name",u().key),kf(F,ge),v_(F,fe),ke(F,"hidden",p(ie).length===1),ke(F,"aria-label",w)},[()=>String(p(le).id),()=>p(ie).length===1||String(p(le).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${p(le).name.toLowerCase()}`)]),Nt("change",F,()=>{u(u().value=String(p(le).id),!0)}),S(G,de)}),P(Y),ae(()=>{ke(Y,"aria-required",u().required),ke(Y,"aria-invalid",u().errors.length>0)}),S(J,Y)},d=J=>{var ie=FI(),Y=M(ie);r(M(Y)),P(Y);var B=X(Y,2),H=G=>{var le=K(),de=U(le);Ve(de,17,()=>u().options,zr,(F,ue)=>{var z=MI(),ge=M(z),fe=X(ge);Ne(fe,()=>({...p($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(z),ae(()=>{Lt(z,1,Ur(f())),ke(z,"for",p(x)+p(ue)),ne(ge,`${p(ue)??""} `)}),Ro(fe,()=>u().value,w=>u(u().value=w,!0)),S(F,z)}),S(G,le)};ce(B,G=>{u().options&&G(H)}),P(ie),S(J,ie)};let u=b(t,"field",15),h=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,yI);const _=Ni(m()),T=D(()=>_.value),A={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>A[u().type]);let x=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(p(T)?p(T).validateField(u()):u().validate())}const $=D(()=>({id:p(x),"aria-describedby":h(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let L=D(()=>C.t(u().label)||u().label);const W="https://cdn.shop.platform.gomus.de/";let N=re(null);me(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const ie=URL.createObjectURL(J);return I(N,ie,!0),()=>{URL.revokeObjectURL(ie),I(N,null)}}I(N,null)});var se={get field(){return u()},set field(J){u(J),y()},get describedByIds(){return h()},set describedByIds(J){h(J),y()},get labelClass(){return f()},set labelClass(J){f(J),y()},get inputClass(){return g()},set inputClass(J){g(J),y()},get host(){return m()},set host(J){m(J),y()}},V=K(),oe=U(V),pe=J=>{var ie=K(),Y=U(ie);_e(Y,()=>p(E)),S(J,ie)};return ce(oe,J=>{p(E)&&J(pe)}),S(e,V),ee(se)}Lr(["change"]),te(Zv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var NI=j("<span> </span>"),RI=j("<li> </li>"),LI=j('<ul class="go-field-errors"></ul>'),zI=j("<!> <!> <!>",1);function UI(e,t){Q(t,!0);let r=b(t,"key",7),n=b(t,"required",7,!1),i=b(t,"labelClass",7),s=b(t,"inputClass",7),o=re(Fe(cr.createField(r(),n())));const a=Ni(t.$$host),l=D(()=>a.value),c=()=>p(o);let d=D(()=>p(o)?[...p(o).errors,...p(o).apiErrors].map($=>C.t($)):[]),u=D(()=>p(o)?.description),h=D(()=>p(d).length>0),f=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[p(u)&&p(f),p(h)&&p(g)].filter(Boolean).join(" ")||void 0);me(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",p(d).length>0)}),t.$$host.dataset.testid=r(),me(()=>{p(o)&&(p(o).mounted=!0,p(o).value,Ue(()=>{p(o)?.errors.length&&p(l).validateField(p(o))}))});var v={getField:c,get key(){return r()},set key($){r($),y()},get required(){return n()},set required($=!1){n($),y()},get labelClass(){return i()},set labelClass($){i($),y()},get inputClass(){return s()},set inputClass($){s($),y()}},_=zI(),T=U(_);Zv(T,{get describedByIds(){return p(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return p(o)},set field($){I(o,$,!0)}});var A=X(T,2),E=$=>{var L=NI(),W=M(L,!0);P(L),ae(()=>{ke(L,"id",p(f)),ne(W,p(o).description)}),S($,L)};ce(A,$=>{p(u)&&$(E)});var x=X(A,2),O=$=>{var L=LI();Ve(L,21,()=>p(d),zr,(W,N)=>{var se=RI(),V=M(se,!0);P(se),ae(()=>ne(V,p(N))),S(W,se)}),P(L),ae(()=>ke(L,"id",p(g))),S($,L)};return ce(x,$=>{p(h)&&$(O)}),S(e,_),ee(v)}customElements.define("go-field",te(UI,{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 VI=j("<go-field></go-field>",2);function BI(e,t){Q(t,!0);let r=Ni(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?cr.getFormFields(p(n)?.formId):[]);var s=K(),o=U(s);Ve(o,17,()=>p(i),a=>a.key,(a,l)=>{var c=VI();ae(()=>Gn(c,"key",p(l).key)),ae(()=>Gn(c,"required",p(l).required)),S(a,c)}),S(e,s),ee()}customElements.define("go-all-fields",te(BI,{},[],[]));var qI=j('<p aria-hidden="true"> </p>'),jI=j("<li> </li>"),ZI=j('<ul class="go-error-feedback-api-errors"></ul>'),WI=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function HI(e,t){Q(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);me(()=>{p(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Cu(p(n)?.fields),!0)})});let i=re(0);setInterval(()=>{I(i,Cu(p(n)?.fields)||0,!0)},100);let s=D(()=>p(i)+(p(n)?.apiErrors?.length||0)),o=re(-1);me(()=>{t.$$host.classList.toggle("is-invalid",p(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",p(s).toString())});var a=WI(),l=M(a),c=M(l),d=v=>{var _=Rt();ae(T=>ne(_,T),[()=>C.t("forms.errorSummary",{count:p(o)})]),S(v,_)};ce(c,v=>{p(o)>0&&v(d)}),P(l);var u=X(l,2),h=v=>{var _=qI(),T=M(_,!0);P(_),ae(A=>ne(T,A),[()=>C.t("forms.errorSummary",{count:p(i)})]),S(v,_)};ce(u,v=>{p(i)>0&&v(h)});var f=X(u,2),g=v=>{var _=ZI();Ve(_,21,()=>p(n)?.apiErrors,zr,(T,A)=>{var E=jI(),x=M(E,!0);P(E),ae(()=>ne(x,p(A))),S(T,E)}),P(_),S(v,_)},m=D(()=>p(n)&&Hl(p(n).apiErrors)&&p(n).apiErrors.length>0);ce(f,v=>{p(m)&&v(g)}),P(a),S(e,a),ee()}customElements.define("go-errors-feedback",te(HI,{},[],[]));var GI=j('<div class="go-form-feedback"><!></div>');function KI(e,t){var r=GI(),n=M(r);o_(n,t,"default",{},null),P(r),S(e,r)}customElements.define("go-form-feedback",te(KI,{},["default"],[]));function YI(e,t){Q(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{$n(t.$$host,"button",{type:"submit",class:r()})}),ee({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",te(YI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var JI=j('<div aria-live="assertive"> </div>');function XI(e,t){Q(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);var i=K(),s=U(i),o=a=>{var l=JI();let c;var d=M(l,!0);P(l),ae(()=>{c=Lt(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":p(n).successMessage}),ne(d,p(n)?.successMessage)}),S(a,l)};ce(s,a=>{p(n)?.successMessage&&a(o)}),S(e,i),ee()}customElements.define("go-success-feedback",te(XI,{},[],[]));var dr="INUMBER",Zi="IOP1",Wi="IOP2",Hi="IOP3",cn="IVAR",ci="IVARNAME",Gi="IFUNCALL",La="IFUNDEF",Bt="IEXPR",Cc="IEXPREVAL",di="IMEMBER",za="IENDSTATEMENT",Ki="IARRAY";function Ie(e,t){this.type=e,this.value=t??0}Ie.prototype.toString=function(){switch(this.type){case dr:case Zi:case Wi:case Hi:case cn:case ci:case za:return this.value;case Gi:return"CALL "+this.value;case La:return"DEF "+this.value;case Ki:return"ARRAY "+this.value;case di:return"."+this.value;default:return"Invalid Instruction"}};function Ua(e){return new Ie(Zi,e)}function dn(e){return new Ie(Wi,e)}function Wv(e){return new Ie(Hi,e)}function Dc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var h=e[u],f=h.type;if(f===dr||f===ci)Array.isArray(h.value)?s.push.apply(s,Dc(h.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Ki,h.value.length)),t,r,n,i)):s.push(h);else if(f===cn&&i.hasOwnProperty(h.value))h=new Ie(dr,i[h.value]),s.push(h);else if(f===Wi&&s.length>1)l=s.pop(),a=s.pop(),d=r[h.value],h=new Ie(dr,d(a.value,l.value)),s.push(h);else if(f===Hi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),h.value==="?"?s.push(a.value?l.value:c.value):(d=n[h.value],h=new Ie(dr,d(a.value,l.value,c.value)),s.push(h));else if(f===Zi&&s.length>0)a=s.pop(),d=t[h.value],h=new Ie(dr,d(a.value)),s.push(h);else if(f===Bt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(Bt,Dc(h.value,t,r,n,i)))}else if(f===di&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[h.value]));else{for(;s.length>0;)o.push(s.shift());o.push(h)}}for(;s.length>0;)o.push(s.shift());return o}function Hv(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===cn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Zi?c=Ua(l.value):l.type===Wi?c=dn(l.value):l.type===Hi?c=Wv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===Bt?n.push(new Ie(Bt,Hv(s.value,t,r))):n.push(s)}return n}function fi(e,t,r){var n=[],i,s,o,a,l,c;if(Ic(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var h=e[u],f=h.type;if(f===dr||f===ci)n.push(h.value);else if(f===Wi)s=n.pop(),i=n.pop(),h.value==="and"?n.push(i?!!fi(s,t,r):!1):h.value==="or"?n.push(i?!0:!!fi(s,t,r)):h.value==="="?(a=t.binaryOps[h.value],n.push(a(i,fi(s,t,r),r))):(a=t.binaryOps[h.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Hi)o=n.pop(),s=n.pop(),i=n.pop(),h.value==="?"?n.push(fi(i?s:o,t,r)):(a=t.ternaryOps[h.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(h.value in t.functions)n.push(t.functions[h.value]);else if(h.value in t.unaryOps&&t.parser.isOperatorEnabled(h.value))n.push(t.unaryOps[h.value]);else{var g=r[h.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+h.value)}else if(f===Zi)i=n.pop(),a=t.unaryOps[h.value],n.push(a(fn(i,r)));else if(f===Gi){for(c=h.value,l=[];c-- >0;)l.unshift(fn(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(f===La)n.push((function(){for(var m=n.pop(),v=[],_=h.value;_-- >0;)v.unshift(n.pop());var T=n.pop(),A=function(){for(var E=Object.assign({},r),x=0,O=v.length;x<O;x++)E[v[x]]=arguments[x];return fi(m,t,E)};return Object.defineProperty(A,"name",{value:T,writable:!1}),r[T]=A,A})());else if(f===Bt)n.push(QI(h,t));else if(f===Cc)n.push(h);else if(f===di)i=n.pop(),n.push(i[h.value]);else if(f===za)n.pop();else if(f===Ki){for(c=h.value,l=[];c-- >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:fn(n[0],r)}function QI(e,t,r){return Ic(e)?e:{type:Cc,value:function(n){return fi(e.value,t,n)}}}function Ic(e){return e&&e.type===Cc}function fn(e,t){return Ic(e)?e.value(t):e}function Pc(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===dr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(Gv).join(", ")+"]"):r.push(Gv(d.value));else if(u===Wi)i=r.pop(),n=r.pop(),o=d.value,t?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(u===Hi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===cn||u===ci)r.push(d.value);else if(u===Zi)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===Gi){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===La){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===di)n=r.pop(),r.push(n+"."+d.value);else if(u===Ki){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===Bt)r.push("("+Pc(d.value,t)+")");else if(u!==za)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Gv(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function Yi(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function $c(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===cn||o.type===ci?!n&&!Yi(t,o.value)?t.push(o.value):(i!==null&&(Yi(t,i)||t.push(i)),i=o.value):o.type===di&&n&&i!==null?i+="."+o.value:o.type===Bt?$c(o.value,t,r):i!==null&&(Yi(t,i)||t.push(i),i=null)}i!==null&&!Yi(t,i)&&t.push(i)}function Or(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Or.prototype.simplify=function(e){return e=e||{},new Or(Dc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Or.prototype.substitute=function(e,t){return t instanceof Or||(t=this.parser.parse(String(t))),new Or(Hv(this.tokens,e,t),this.parser)},Or.prototype.evaluate=function(e){return e=e||{},fi(this.tokens,this,e)},Or.prototype.toString=function(){return Pc(this.tokens,!1)},Or.prototype.symbols=function(e){e=e||{};var t=[];return $c(this.tokens,t,e),t},Or.prototype.variables=function(e){e=e||{};var t=[];$c(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Or.prototype.toJSFunction=function(e,t){var r=this,n=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+Pc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var no="TEOF",Ze="TOP",Va="TNUMBER",Kv="TSTRING",hn="TPAREN",Ji="TBRACKET",Ba="TCOMMA",Mc="TNAME",Fc="TSEMICOLON";function Yv(e,t,r){this.type=e,this.value=t,this.index=r}Yv.prototype.toString=function(){return this.type+": "+this.value};function rt(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}rt.prototype.newToken=function(e,t,r){return new Yv(e,t,r??this.pos)},rt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},rt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},rt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(no,"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)+'"')},rt.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(Kv,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},rt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(hn,e),this.pos++,!0):!1},rt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Ji,e),this.pos++,!0):!1},rt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ba,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Fc,";"),this.pos++,!0):!1},rt.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Va,this.consts[n]),this.pos+=n.length,!0}return!1},rt.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ze,n),this.pos+=n.length,!0}return!1},rt.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken(Mc,i),this.pos+=i.length,!0}return!1},rt.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
80
80
|
`||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var eP=/^[0-9a-f]{4}$/i;rt.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);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+=`
|
|
81
81
|
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);eP.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},rt.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},rt.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(Va,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},rt.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),o==="e"||o==="E"){t++;for(var a=!0,l=!1;t<this.expression.length;){if(o=this.expression.charAt(t),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Va,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},rt.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ze,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ze,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},rt.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},rt.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
|
|
82
|
-
`,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},rt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function He(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Yi(t,e.value):typeof t=="function"?t(e):e.value===t},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Mc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(Va))e.push(new Ie(dr,this.current.value));else if(this.accept(Kv))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Ji,"["))if(this.accept(Ji,"]"))e.push(new Ie(Ki,0));else{var n=this.parseArrayList(e);e.push(new Ie(Ki,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Fc)?(this.nextToken&&this.nextToken.type!==no&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(za)),this.nextToken.type!==no&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Ji,"]");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Gi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===cn&&(e[o]=new Ie(ci,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(Bt,r)),e.push(new Ie(La,t.value));continue}if(t.type!==cn&&t.type!==di)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(ci,t.value)),e.push(new Ie(Bt,r)),e.push(dn("="))}},He.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new Ie(Bt,t)),e.push(new Ie(Bt,r)),e.push(Wv("?"))}},He.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(Bt,t)),e.push(dn("or"))}},He.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(Bt,t)),e.push(dn("and"))}};var tP=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,tP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var rP=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,rP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var nP=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,nP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},He.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===hn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Fc||this.nextToken.type===Ba||this.nextToken.type===no||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ua(n.value))}else this.parseExponential(e)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ua("!"))},He.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Ua(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Gi,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Gi,i))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Ji,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Mc),e.push(new Ie(di,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Ji,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function iP(e,t){return Number(e)+Number(t)}function sP(e,t){return e-t}function oP(e,t){return e*t}function aP(e,t){return e/t}function lP(e,t){return e%t}function uP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function cP(e,t){return e===t}function dP(e,t){return e!==t}function fP(e,t){return e>t}function hP(e,t){return e<t}function pP(e,t){return e>=t}function mP(e,t){return e<=t}function vP(e,t){return!!(e&&t)}function gP(e,t){return!!(e||t)}function yP(e,t){return Yi(t,e)}function bP(e){return(Math.exp(e)-Math.exp(-e))/2}function _P(e){return(Math.exp(e)+Math.exp(-e))/2}function wP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function kP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function SP(e){return Math.log(e+Math.sqrt(e*e-1))}function EP(e){return Math.log((1+e)/(1-e))/2}function Jv(e){return Math.log(e)*Math.LOG10E}function TP(e){return-e}function xP(e){return!e}function AP(e){return e<0?Math.ceil(e):Math.floor(e)}function OP(e){return Math.random()*(e||1)}function Xv(e){return Rc(e+1)}function CP(e){return isFinite(e)&&e===Math.round(e)}var DP=4.7421875,Nc=[.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 Rc(e){var t,r;if(CP(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Rc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Nc[0];for(var c=1;c<Nc.length;++c)r+=Nc[c]/(e+c);return t=e+DP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function IP(e){return Array.isArray(e)?e.length:String(e).length}function Qv(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function eg(e,t,r){return e?t:r}function PP(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function $P(e,t,r){return r&&(r[e]=t),t}function MP(e,t){return e[t|0]}function FP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function NP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function RP(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function LP(e,t,r){if(typeof e!="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 e(n,i,s)},t)}function zP(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function UP(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function VP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function BP(e){return(e>0)-(e<0)||+e}var tg=1/3;function qP(e){return e<0?-Math.pow(-e,tg):Math.pow(e,tg)}function jP(e){return Math.exp(e)-1}function ZP(e){return Math.log(1+e)}function WP(e){return Math.log(e)/Math.LN2}function hi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||bP,cosh:Math.cosh||_P,tanh:Math.tanh||wP,asinh:Math.asinh||kP,acosh:Math.acosh||SP,atanh:Math.atanh||EP,sqrt:Math.sqrt,cbrt:Math.cbrt||qP,log:Math.log,log2:Math.log2||WP,ln:Math.log,lg:Math.log10||Jv,log10:Math.log10||Jv,expm1:Math.expm1||jP,log1p:Math.log1p||ZP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||AP,"-":TP,"+":Number,exp:Math.exp,not:xP,length:IP,"!":Xv,sign:Math.sign||BP},this.binaryOps={"+":iP,"-":sP,"*":oP,"/":aP,"%":lP,"^":Math.pow,"||":uP,"==":cP,"!=":dP,">":fP,"<":hP,">=":pP,"<=":mP,and:vP,or:gP,in:yP,"=":$P,"[":MP},this.ternaryOps={"?":eg},this.functions={random:OP,fac:Xv,min:NP,max:FP,hypot:Math.hypot||Qv,pyt:Math.hypot||Qv,pow:Math.pow,atan2:Math.atan2,if:eg,gamma:Rc,roundTo:PP,map:RP,fold:LP,filter:zP,indexOf:UP,join:VP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}hi.prototype.parse=function(e){var t=[],r=new He(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(no,"EOF"),new Or(t,this)},hi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var rg=new hi;hi.parse=function(e){return rg.parse(e)},hi.evaluate=function(e,t){return rg.parse(e).evaluate(t)};var ng={"+":"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 HP(e){return ng.hasOwnProperty(e)?ng[e]:e}hi.prototype.isOperatorEnabled=function(e){var t=HP(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var GP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,KP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,YP=/(__optional\("[^"]+"\))\.length\b/g,JP=new hi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),ig=new Map;function XP(e){return e.replace(GP,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(KP,(t,r)=>`__length(${r})`).replace(YP,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function QP(e){const t=ig.get(e);if(t)return t;const r=JP.parse(XP(e));return ig.set(e,r),r}function e$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,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=QP(e);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 (${e}) in go-if: ${n.message}`)}}var sg=["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","coupon"],t$=7200*1e3;function qa(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function ja(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+t$&&(i.seats?.available??0)>0})}async function Za(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));qa(e,t)}var r$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));qa(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Dn(In(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(ft(s,{time:t.selectedTime}))}},n$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Dn(In(r,s),s);for(const a of o)e.preCart.addItem(ft(a,{time:s}))}},i$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await C.asyncFetch(()=>C.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));for(const n of Object.values(r))e.preCart.addItem(ft(ia(n)))}},s$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));qa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!(await C.asyncFetch(()=>C.getEvent(t.eventIds[0]))).tickets?.length)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),date_id:e.dateId}));C.capacityManager.addQuotas(n);const i=Dn(In(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(ft(s,{time:t.selectedTime}))}},o$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Dn(In(n,o),o);for(const l of a)e.preCart.addItem(ft(l,{time:o}))}},a$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));qa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Dn(In(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(ft(o,{time:t.selectedTime}))}},l$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await C.asyncFetch(()=>C.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=xu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ft(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},u$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},c$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=Dn(In(s,l),l);for(const d of c)e.preCart.addItem(ft(d,{time:l}))}}},d$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},f$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=xu(o,i.id,{event_title:i.event_title});e.preCart.addItem(ft(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},h$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await C.asyncFetch(()=>C.getCoupons());for(const r of t??[])e.preCart.addItem(ft(up(r)))}},p$={"ticket:timeslot":r$,"ticket:day":n$,"ticket:annual":i$,"event:admission":s$,"event:admission:day":o$,"event:admission:timeslot":a$,"event:price":l$,"events:admission":u$,"events:admission:day":c$,"events:admission:timeslot":d$,"events:price":f$,coupon:h$};function pi(e){const t=p$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${sg.join(", ")}`),t}var og=sg,m$=0,v$=class{uid=m$++;#e=re();get filters(){return p(this.#e)}set filters(e){I(this.#e,e,!0)}#t=re();get eventIds(){return p(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=re();get museumIds(){return p(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=re();get exhibitionIds(){return p(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=re();get ticketIds(){return p(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=re();get ticketGroupIds(){return p(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=re();get selectedDate(){return p(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=re();get selectedTimeslot(){return p(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return p(this.#l)}set selectedTime(e){I(this.#l,e)}#u=re(Fe([]));get ticketSegments(){return p(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#d=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return p(this.#d)}set preCarts(e){I(this.#d,e)}#c=re();get timeslotDetails(){return p(this.#c)}set timeslotDetails(e){I(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>pi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>pi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>pi(e).isTicketsVisible(this))}},ag="go-ticket-selection",g$=Mi(ag),pn=Fi(ag);function y$(e,t){Q(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=pn(t.$$host),s=D(()=>i.value),o=ZE(t.$$host),a=D(()=>o.value),l=Ni(t.$$host),c=D(()=>l.value),d=Ri(t.$$host),u=D(()=>d.value);let h=D(()=>({ticketSelection:p(s),personalizationDetails:p(a),formData:p(c)?.formData,cart:C.cart,cartView:p(u)}));const f=T=>{I(h,T)},g=()=>p(h);let m=D(()=>e$(r(),p(h))),v=null;me(()=>{const T=t.$$host;if(p(m)&&n()==="show")v&&(T.appendChild(v),v=null);else if(!v&&T.childNodes.length>0)for(v=document.createDocumentFragment();T.firstChild;)v.appendChild(T.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(T){r(T),y()},get then(){return n()},set then(T="show"){n(T),y()}};return ee(_)}customElements.define("go-if",te(y$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function lg(e,t){Q(t,!0);let r=b(t,"apiUrl",7),n=b(t,"shopDomain",7),i=b(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),me(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ee({get apiUrl(){return r()},set apiUrl(s){r(s),y()},get shopDomain(){return n()},set shopDomain(s){n(s),y()},get locale(){return i()},set locale(s){i(s),y()}})}customElements.define("gomus-init",te(lg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function b$(e,t){Q(t,!0);let r=b(t,"apiDomain",7),n=b(t,"shopDomain",7),i=b(t,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return lg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ee(o)}customElements.define("go-init",te(b$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function _$(e,t){Q(t,!0);const r=b(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=$n(t.$$host,"a");return me(()=>{if(!p(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",p(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.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}Xe.config.navigateTo(Xe.config.urls[r()]())}),ee({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",te(_$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var w$=class{#e=re();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return al(C.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${C.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.config.urls.annualTicketPersonalizationList(this.token):C.urls?.annualTicketPersonalizationList(this.token):`${C.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},ug="go-order-details",k$=Mi(ug),cg=Fi(ug);function S$(e,t){Q(t,!0);let r=b(t,"token",7);const n=new w$(r());k$(t.$$host,n),rn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ee(i)}customElements.define("go-order",te(S$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var E$=j('<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),T$=j('<br/> <span class="go-order-item-quantities"> </span>',1),x$=j('<a aria-label="iCal link"> </a>'),A$=j('<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 dg(e,t){Q(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(x){r(x),y()},get orderDetails(){return n()},set orderDetails(x){n(x),y()}},s=A$(),o=M(s),a=M(o),l=X(M(a),2),c=M(l),d=M(c,!0);P(c);var u=X(c,2),h=x=>{var O=E$(),$=U(O),L=M($,!0);P($);var W=X($,2),N=M(W,!0);P(W),ae((se,V)=>{ne(L,se),ne(N,V)},[()=>Us(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().attributes.start_time)]),S(x,O)};ce(u,x=>{r().attributes.start_time&&x(h)});var f=X(u,2);Ve(f,17,()=>r().attributes.quantities,x=>x.id,(x,O)=>{var $=T$(),L=X(U($),2),W=M(L);P(L),ae(()=>ne(W,`${p(O).quantity??""} x ${p(O).title??""}`)),S(x,$)});var g=X(f,2),m=M(g,!0);P(g),P(l);var v=X(l,2),_=M(v,!0);P(v);var T=X(v,4),A=M(T),E=x=>{var O=x$(),$=M(O,!0);P(O),ae(L=>{ke(O,"href",C.apiUrl+r().attributes.ical_url),ne($,L)},[()=>C.t("common.calendar")]),S(x,O)};return ce(A,x=>{r().attributes.ical_url&&x(E)}),P(T),P(a),P(o),P(s),ae((x,O,$)=>{ne(d,r().attributes.title),ke(g,"href",x),ne(m,O),ne(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>na(r().price_cents)]),S(e,s),ee(i)}te(dg,{item:{},orderDetails:{}},[],[],{mode:"open"});var O$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),C$=j('<span class="go-cart-item-date"> </span>'),D$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),I$=j('<br/> <a class="go-ticket-personalization"> </a>',1),P$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),$$=j('<a aria-label="iCal link"> </a>'),M$=j('<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>'),F$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),N$=j('<a class="go-ticket-personalization"> </a>'),R$=j('<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 fg(e,t){Q(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=b(t,"item",7),i=b(t,"orderDetails",7);var s={get item(){return n()},set item(d){n(d),y()},get orderDetails(){return i()},set orderDetails(d){i(d),y()}},o=K(),a=U(o),l=d=>{var u=K(),h=U(u);Ve(h,17,()=>({length:n().attributes.quantity}),zr,(f,g,m)=>{var v=M$(),_=M(v),T=M(_),A=M(T);A.textContent="1";var E=X(A,2),x=M(E),O=M(x,!0);P(x);var $=X(x,2),L=B=>{const H=D(()=>n().attributes.barcodes[m]?.id);var G=D$(),le=U(G),de=ge=>{var fe=O$(),w=U(fe),qe=M(w,!0);P(w);var Pe=X(w,2),Ye=M(Pe,!0);P(Pe),ae((kt,Ge)=>{ne(qe,kt),ne(Ye,Ge)},[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(n().attributes.start_time)]),S(ge,fe)},F=ge=>{var fe=C$(),w=M(fe,!0);P(fe),ae(qe=>ne(w,qe),[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(ge,fe)};ce(le,ge=>{n().attributes.ticket_type==="time_slot"?ge(de):n().attributes.ticket_type==="normal"&&ge(F,1)});var ue=X(le,4),z=M(ue,!0);P(ue),ae((ge,fe)=>{ke(ue,"href",ge),ne(z,fe)},[()=>i().downloadLink(n(),p(H)),()=>C.t("common.download")]),S(B,G)},W=B=>{var H=I$(),G=X(U(H),2),le=M(G,!0);P(G),ae((de,F)=>{ke(G,"href",de),ne(le,F)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(B,H)};ce($,B=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?B(L):B(W,-1)}),P(E);var N=X(E,2),se=M(N,!0);P(N);var V=X(N,2),oe=M(V),pe=B=>{var H=P$(),G=M(H);P(H),ae(()=>{ke(H,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),ke(G,"src",r)}),S(B,H)};ce(oe,B=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&B(pe)}),P(V);var J=X(V,2),ie=M(J),Y=B=>{var H=$$(),G=M(H,!0);P(H),ae(le=>{ke(H,"href",C.apiUrl+n().attributes.ical_url),ne(G,le)},[()=>C.t("common.calendar")]),S(B,H)};ce(ie,B=>{n().attributes.ical_url&&B(Y)}),P(J),P(T),P(_),P(v),ae(B=>{ne(O,n().attributes.title),ne(se,B)},[()=>na(n().price_cents)]),S(f,v)}),S(d,u)},c=d=>{var u=R$(),h=M(u),f=M(h),g=M(f),m=M(g,!0);P(g);var v=X(g,2),_=M(v),T=M(_,!0);P(_);var A=X(_,2),E=L=>{var W=F$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(L,W)},x=L=>{var W=N$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(L,W)};ce(A,L=>{n().attributes.is_voucher?L(E):L(x,-1)}),P(v);var O=X(v,2),$=M(O,!0);P(O),Et(2),P(f),P(h),P(u),ae(L=>{ne(m,n().attributes.quantity),ne(T,n().attributes.title),ne($,L)},[()=>na(n().price_cents)]),S(d,u)};return ce(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),S(e,o),ee(s)}te(fg,{item:{},orderDetails:{}},[],[],{mode:"open"});var L$=j('<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 z$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);var s=K(),o=U(s),a=l=>{var c=L$(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v),Et(2),P(u),P(d);var T=X(d,2);Ve(T,17,()=>p(i).items,$=>$.id,($,L)=>{var W=K(),N=U(W),se=oe=>{fg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})},V=oe=>{dg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})};ce(N,oe=>{p(L).type==="Ticket"?oe(se):p(L).type==="Event"&&oe(V,1)}),S($,W)});var A=X(T,2),E=M(A),x=X(M(E),4),O=M(x,!0);P(x),Et(2),P(E),P(A),P(c),ae(($,L,W,N)=>{ne(f,$),ne(m,L),ne(_,W),ne(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:na(p(i).total_price_cents)})]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),ee()}customElements.define("go-order-breakdown",te(z$,{},[],[]));function U$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);Et();var s=Rt();ae(()=>ne(s,p(i)?.id)),S(e,s),ee()}customElements.define("go-order-invoice-id",te(U$,{},[],[]));var V$=j("<go-form></go-form>",2);function B$(e,t){Q(t,!1),cr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Zl();var n=V$();Gn(n,"formId","passwordResetForm"),Cl("submit",n,r),S(e,n),ee()}customElements.define("go-profile-password",te(B$,{},[],[]));var q$=j("<go-form></go-form>",2);function j$(e,t){Q(t,!0),cr.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=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Wl(()=>p(r).details),await Wl(()=>p(n).data),p(r).details.fill(p(n).data)});var i=q$();Gn(i,"formId","accountDetailsForm"),Tf(i,s=>I(r,s),()=>p(r)),S(e,i),ee()}customElements.define("go-profile-details",te(j$,{},[],[]));var Z$=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function W$(e,t){Q(t,!0);const r=D(()=>C.validateToken()),n=D(()=>p(r)?.data);var i=K(),s=U(i),o=l=>{var c=Z$(),d=U(c),u=M(d);P(d);var h=X(d,2),f=M(h,!0);P(h),ae(()=>{ne(u,`${p(n).name??""}
|
|
82
|
+
`,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},rt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function He(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Yi(t,e.value):typeof t=="function"?t(e):e.value===t},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Mc)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(Va))e.push(new Ie(dr,this.current.value));else if(this.accept(Kv))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Ji,"["))if(this.accept(Ji,"]"))e.push(new Ie(Ki,0));else{var n=this.parseArrayList(e);e.push(new Ie(Ki,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Fc)?(this.nextToken&&this.nextToken.type!==no&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(za)),this.nextToken.type!==no&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Ji,"]");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Gi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===cn&&(e[o]=new Ie(ci,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(Bt,r)),e.push(new Ie(La,t.value));continue}if(t.type!==cn&&t.type!==di)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(ci,t.value)),e.push(new Ie(Bt,r)),e.push(dn("="))}},He.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new Ie(Bt,t)),e.push(new Ie(Bt,r)),e.push(Wv("?"))}},He.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(Bt,t)),e.push(dn("or"))}},He.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(Bt,t)),e.push(dn("and"))}};var tP=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,tP);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var rP=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,rP);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var nP=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,nP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},He.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===hn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Fc||this.nextToken.type===Ba||this.nextToken.type===no||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ua(n.value))}else this.parseExponential(e)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ua("!"))},He.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Ua(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Gi,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Gi,i))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Ji,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Mc),e.push(new Ie(di,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Ji,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function iP(e,t){return Number(e)+Number(t)}function sP(e,t){return e-t}function oP(e,t){return e*t}function aP(e,t){return e/t}function lP(e,t){return e%t}function uP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function cP(e,t){return e===t}function dP(e,t){return e!==t}function fP(e,t){return e>t}function hP(e,t){return e<t}function pP(e,t){return e>=t}function mP(e,t){return e<=t}function vP(e,t){return!!(e&&t)}function gP(e,t){return!!(e||t)}function yP(e,t){return Yi(t,e)}function bP(e){return(Math.exp(e)-Math.exp(-e))/2}function _P(e){return(Math.exp(e)+Math.exp(-e))/2}function wP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function kP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function SP(e){return Math.log(e+Math.sqrt(e*e-1))}function EP(e){return Math.log((1+e)/(1-e))/2}function Jv(e){return Math.log(e)*Math.LOG10E}function TP(e){return-e}function xP(e){return!e}function AP(e){return e<0?Math.ceil(e):Math.floor(e)}function OP(e){return Math.random()*(e||1)}function Xv(e){return Rc(e+1)}function CP(e){return isFinite(e)&&e===Math.round(e)}var DP=4.7421875,Nc=[.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 Rc(e){var t,r;if(CP(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var n=e-2,i=e-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Rc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Nc[0];for(var c=1;c<Nc.length;++c)r+=Nc[c]/(e+c);return t=e+DP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function IP(e){return Array.isArray(e)?e.length:String(e).length}function Qv(){for(var e=0,t=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;t<n?(i=t/n,e=e*i*i+1,t=n):n>0?(i=n/t,e+=i*i):e+=n}return t===1/0?1/0:t*Math.sqrt(e)}function eg(e,t,r){return e?t:r}function PP(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function $P(e,t,r){return r&&(r[e]=t),t}function MP(e,t){return e[t|0]}function FP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function NP(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function RP(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(r,n){return e(r,n)})}function LP(e,t,r){if(typeof e!="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 e(n,i,s)},t)}function zP(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(r,n){return e(r,n)})}function UP(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function VP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function BP(e){return(e>0)-(e<0)||+e}var tg=1/3;function qP(e){return e<0?-Math.pow(-e,tg):Math.pow(e,tg)}function jP(e){return Math.exp(e)-1}function ZP(e){return Math.log(1+e)}function WP(e){return Math.log(e)/Math.LN2}function hi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||bP,cosh:Math.cosh||_P,tanh:Math.tanh||wP,asinh:Math.asinh||kP,acosh:Math.acosh||SP,atanh:Math.atanh||EP,sqrt:Math.sqrt,cbrt:Math.cbrt||qP,log:Math.log,log2:Math.log2||WP,ln:Math.log,lg:Math.log10||Jv,log10:Math.log10||Jv,expm1:Math.expm1||jP,log1p:Math.log1p||ZP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||AP,"-":TP,"+":Number,exp:Math.exp,not:xP,length:IP,"!":Xv,sign:Math.sign||BP},this.binaryOps={"+":iP,"-":sP,"*":oP,"/":aP,"%":lP,"^":Math.pow,"||":uP,"==":cP,"!=":dP,">":fP,"<":hP,">=":pP,"<=":mP,and:vP,or:gP,in:yP,"=":$P,"[":MP},this.ternaryOps={"?":eg},this.functions={random:OP,fac:Xv,min:NP,max:FP,hypot:Math.hypot||Qv,pyt:Math.hypot||Qv,pow:Math.pow,atan2:Math.atan2,if:eg,gamma:Rc,roundTo:PP,map:RP,fold:LP,filter:zP,indexOf:UP,join:VP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}hi.prototype.parse=function(e){var t=[],r=new He(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(no,"EOF"),new Or(t,this)},hi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var rg=new hi;hi.parse=function(e){return rg.parse(e)},hi.evaluate=function(e,t){return rg.parse(e).evaluate(t)};var ng={"+":"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 HP(e){return ng.hasOwnProperty(e)?ng[e]:e}hi.prototype.isOperatorEnabled=function(e){var t=HP(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var GP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,KP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,YP=/(__optional\("[^"]+"\))\.length\b/g,JP=new hi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),ig=new Map;function XP(e){return e.replace(GP,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(KP,(t,r)=>`__length(${r})`).replace(YP,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function QP(e){const t=ig.get(e);if(t)return t;const r=JP.parse(XP(e));return ig.set(e,r),r}function e$(e,t){if(e==null||typeof e!="string")return e;const r={data:t,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=QP(e);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 (${e}) in go-if: ${n.message}`)}}var sg=["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","coupon"],t$=7200*1e3;function qa(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function ja(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+t$&&(i.seats?.available??0)>0})}async function Za(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));qa(e,t)}var r$={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.selectedDate)return;const{quotas:t}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds}));qa(e,t)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTimeslot)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Dn(In(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(ft(s,{time:t.selectedTime}))}},n$={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Dn(In(r,s),s);for(const a of o)e.preCart.addItem(ft(a,{time:s}))}},i$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await C.asyncFetch(()=>C.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));for(const n of Object.values(r))e.preCart.addItem(ft(ia(n)))}},s$={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_bookable:!0,valid_at:e.selectedDate.toString()}));qa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Dn(In(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(ft(o,{time:t.selectedTime}))}},o$={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Dn(In(n,o),o);for(const l of a)e.preCart.addItem(ft(l,{time:o}))}},a$={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:e=>!!e.selectedDate,isTicketsVisible:e=>!!(e.selectedDate&&e.selectedTimeslot),async loadTimeslots(e){if(!e?.eventIds?.length||!e.selectedDate)return;const t=await C.asyncFetch(()=>C.getEvent(e.eventIds[0]));if(!t.tickets?.length)return;const{quotas:r}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":t.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));qa(e,r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!t.selectedTimeslot)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Dn(In(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(ft(o,{time:t.selectedTime}))}},l$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await C.asyncFetch(()=>C.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=xu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ft(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},u$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},c$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=Dn(In(s,l),l);for(const d of c)e.preCart.addItem(ft(d,{time:l}))}}},d$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Dn(In(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(ft(l,{time:n.start_time}))}}},f$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Za(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=xu(o,i.id,{event_title:i.event_title});e.preCart.addItem(ft(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},h$={name:"coupon",calendarEndpoint:null,requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,loadTimeslots:async()=>{},async loadProducts(e){const t=await C.asyncFetch(()=>C.getCoupons());for(const r of t??[])e.preCart.addItem(ft(up(r)))}},p$={"ticket:timeslot":r$,"ticket:day":n$,"ticket:annual":i$,"event:admission":s$,"event:admission:day":o$,"event:admission:timeslot":a$,"event:price":l$,"events:admission":u$,"events:admission:day":c$,"events:admission:timeslot":d$,"events:price":f$,coupon:h$};function pi(e){const t=p$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${sg.join(", ")}`),t}var og=sg,m$=0,v$=class{uid=m$++;#e=re();get filters(){return p(this.#e)}set filters(e){I(this.#e,e,!0)}#t=re();get eventIds(){return p(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=re();get museumIds(){return p(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=re();get exhibitionIds(){return p(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=re();get ticketIds(){return p(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=re();get ticketGroupIds(){return p(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=re();get selectedDate(){return p(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=re();get selectedTimeslot(){return p(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return p(this.#l)}set selectedTime(e){I(this.#l,e)}#u=re(Fe([]));get ticketSegments(){return p(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#d=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return p(this.#d)}set preCarts(e){I(this.#d,e)}#c=re();get timeslotDetails(){return p(this.#c)}set timeslotDetails(e){I(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>pi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>pi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>pi(e).isTicketsVisible(this))}},ag="go-ticket-selection",g$=Mi(ag),pn=Fi(ag);function y$(e,t){Q(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=pn(t.$$host),s=D(()=>i.value),o=ZE(t.$$host),a=D(()=>o.value),l=Ni(t.$$host),c=D(()=>l.value),d=Ri(t.$$host),u=D(()=>d.value);let h=D(()=>({ticketSelection:p(s),personalizationDetails:p(a),formData:p(c)?.formData,cart:C.cart,cartView:p(u)}));const f=T=>{I(h,T)},g=()=>p(h);let m=D(()=>e$(r(),p(h))),v=null;me(()=>{const T=t.$$host;if(p(m)&&n()==="show")v&&(T.appendChild(v),v=null);else if(!v&&T.childNodes.length>0)for(v=document.createDocumentFragment();T.firstChild;)v.appendChild(T.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(T){r(T),y()},get then(){return n()},set then(T="show"){n(T),y()}};return ee(_)}customElements.define("go-if",te(y$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function lg(e,t){Q(t,!0);let r=b(t,"apiUrl",7),n=b(t,"shopDomain",7),i=b(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),me(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),ee({get apiUrl(){return r()},set apiUrl(s){r(s),y()},get shopDomain(){return n()},set shopDomain(s){n(s),y()},get locale(){return i()},set locale(s){i(s),y()}})}customElements.define("gomus-init",te(lg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function b$(e,t){Q(t,!0);let r=b(t,"apiDomain",7),n=b(t,"shopDomain",7),i=b(t,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return lg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),ee(o)}customElements.define("go-init",te(b$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function _$(e,t){Q(t,!0);const r=b(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=$n(t.$$host,"a");return me(()=>{if(!p(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",p(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.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}Xe.config.navigateTo(Xe.config.urls[r()]())}),ee({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",te(_$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var w$=class{#e=re();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return al(C.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${C.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.config.urls.annualTicketPersonalizationList(this.token):C.urls?.annualTicketPersonalizationList(this.token):`${C.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},ug="go-order-details",k$=Mi(ug),cg=Fi(ug);function S$(e,t){Q(t,!0);let r=b(t,"token",7);const n=new w$(r());k$(t.$$host,n),rn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return ee(i)}customElements.define("go-order",te(S$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var E$=j('<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),T$=j('<br/> <span class="go-order-item-quantities"> </span>',1),x$=j('<a aria-label="iCal link"> </a>'),A$=j('<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 dg(e,t){Q(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(x){r(x),y()},get orderDetails(){return n()},set orderDetails(x){n(x),y()}},s=A$(),o=M(s),a=M(o),l=X(M(a),2),c=M(l),d=M(c,!0);P(c);var u=X(c,2),h=x=>{var O=E$(),$=U(O),L=M($,!0);P($);var W=X($,2),N=M(W,!0);P(W),ae((se,V)=>{ne(L,se),ne(N,V)},[()=>Us(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().attributes.start_time)]),S(x,O)};ce(u,x=>{r().attributes.start_time&&x(h)});var f=X(u,2);Ve(f,17,()=>r().attributes.quantities,x=>x.id,(x,O)=>{var $=T$(),L=X(U($),2),W=M(L);P(L),ae(()=>ne(W,`${p(O).quantity??""} x ${p(O).title??""}`)),S(x,$)});var g=X(f,2),m=M(g,!0);P(g),P(l);var v=X(l,2),_=M(v,!0);P(v);var T=X(v,4),A=M(T),E=x=>{var O=x$(),$=M(O,!0);P(O),ae(L=>{ke(O,"href",C.apiUrl+r().attributes.ical_url),ne($,L)},[()=>C.t("common.calendar")]),S(x,O)};return ce(A,x=>{r().attributes.ical_url&&x(E)}),P(T),P(a),P(o),P(s),ae((x,O,$)=>{ne(d,r().attributes.title),ke(g,"href",x),ne(m,O),ne(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>na(r().price_cents)]),S(e,s),ee(i)}te(dg,{item:{},orderDetails:{}},[],[],{mode:"open"});var O$=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),C$=j('<span class="go-cart-item-date"> </span>'),D$=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),I$=j('<br/> <a class="go-ticket-personalization"> </a>',1),P$=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),$$=j('<a aria-label="iCal link"> </a>'),M$=j('<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>'),F$=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),N$=j('<a class="go-ticket-personalization"> </a>'),R$=j('<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 fg(e,t){Q(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=b(t,"item",7),i=b(t,"orderDetails",7);var s={get item(){return n()},set item(d){n(d),y()},get orderDetails(){return i()},set orderDetails(d){i(d),y()}},o=K(),a=U(o),l=d=>{var u=K(),h=U(u);Ve(h,17,()=>({length:n().attributes.quantity}),zr,(f,g,m)=>{var v=M$(),_=M(v),T=M(_),A=M(T);A.textContent="1";var E=X(A,2),x=M(E),O=M(x,!0);P(x);var $=X(x,2),L=B=>{const H=D(()=>n().attributes.barcodes[m]?.id);var G=D$(),le=U(G),de=ge=>{var fe=O$(),w=U(fe),qe=M(w,!0);P(w);var Pe=X(w,2),Ye=M(Pe,!0);P(Pe),ae((kt,Ge)=>{ne(qe,kt),ne(Ye,Ge)},[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(n().attributes.start_time)]),S(ge,fe)},F=ge=>{var fe=C$(),w=M(fe,!0);P(fe),ae(qe=>ne(w,qe),[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(ge,fe)};ce(le,ge=>{n().attributes.ticket_type==="time_slot"?ge(de):n().attributes.ticket_type==="normal"&&ge(F,1)});var ue=X(le,4),z=M(ue,!0);P(ue),ae((ge,fe)=>{ke(ue,"href",ge),ne(z,fe)},[()=>i().downloadLink(n(),p(H)),()=>C.t("common.download")]),S(B,G)},W=B=>{var H=I$(),G=X(U(H),2),le=M(G,!0);P(G),ae((de,F)=>{ke(G,"href",de),ne(le,F)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(B,H)};ce($,B=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?B(L):B(W,-1)}),P(E);var N=X(E,2),se=M(N,!0);P(N);var V=X(N,2),oe=M(V),pe=B=>{var H=P$(),G=M(H);P(H),ae(()=>{ke(H,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),ke(G,"src",r)}),S(B,H)};ce(oe,B=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&B(pe)}),P(V);var J=X(V,2),ie=M(J),Y=B=>{var H=$$(),G=M(H,!0);P(H),ae(le=>{ke(H,"href",C.apiUrl+n().attributes.ical_url),ne(G,le)},[()=>C.t("common.calendar")]),S(B,H)};ce(ie,B=>{n().attributes.ical_url&&B(Y)}),P(J),P(T),P(_),P(v),ae(B=>{ne(O,n().attributes.title),ne(se,B)},[()=>na(n().price_cents)]),S(f,v)}),S(d,u)},c=d=>{var u=R$(),h=M(u),f=M(h),g=M(f),m=M(g,!0);P(g);var v=X(g,2),_=M(v),T=M(_,!0);P(_);var A=X(_,2),E=L=>{var W=F$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(L,W)},x=L=>{var W=N$(),N=M(W,!0);P(W),ae((se,V)=>{ke(W,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(L,W)};ce(A,L=>{n().attributes.is_voucher?L(E):L(x,-1)}),P(v);var O=X(v,2),$=M(O,!0);P(O),Et(2),P(f),P(h),P(u),ae(L=>{ne(m,n().attributes.quantity),ne(T,n().attributes.title),ne($,L)},[()=>na(n().price_cents)]),S(d,u)};return ce(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),S(e,o),ee(s)}te(fg,{item:{},orderDetails:{}},[],[],{mode:"open"});var L$=j('<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 z$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);var s=K(),o=U(s),a=l=>{var c=L$(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v),Et(2),P(u),P(d);var T=X(d,2);Ve(T,17,()=>p(i).items,$=>$.id,($,L)=>{var W=K(),N=U(W),se=oe=>{fg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})},V=oe=>{dg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})};ce(N,oe=>{p(L).type==="Ticket"?oe(se):p(L).type==="Event"&&oe(V,1)}),S($,W)});var A=X(T,2),E=M(A),x=X(M(E),4),O=M(x,!0);P(x),Et(2),P(E),P(A),P(c),ae(($,L,W,N)=>{ne(f,$),ne(m,L),ne(_,W),ne(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:na(p(i).total_price_cents)})]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),ee()}customElements.define("go-order-breakdown",te(z$,{},[],[]));function U$(e,t){Q(t,!0);const r=cg(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);Et();var s=Rt();ae(()=>ne(s,p(i)?.id)),S(e,s),ee()}customElements.define("go-order-invoice-id",te(U$,{},[],[]));var V$=j("<go-form></go-form>",2);function B$(e,t){Q(t,!1),cr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Zl();var n=V$();Gn(n,"formId","passwordResetForm"),Cl("submit",n,r),S(e,n),ee()}customElements.define("go-profile-password",te(B$,{},[],[]));var q$=j("<go-form></go-form>",2);function j$(e,t){Q(t,!0),cr.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=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Wl(()=>p(r).details),await Wl(()=>p(n).data),p(r).details.fill(p(n).data)});var i=q$();Gn(i,"formId","accountDetailsForm"),Tf(i,s=>I(r,s),()=>p(r)),S(e,i),ee()}customElements.define("go-profile-details",te(j$,{},[],[]));var Z$=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function W$(e,t){Q(t,!0);const r=D(()=>C.validateToken()),n=D(()=>p(r)?.data);var i=K(),s=U(i),o=l=>{var c=Z$(),d=U(c),u=M(d);P(d);var h=X(d,2),f=M(h,!0);P(h),ae(()=>{ne(u,`${p(n).name??""}
|
|
83
83
|
${p(n).surname??""}`),ne(f,p(n).email)}),S(l,c)},a=l=>{var c=Rt();ae(d=>ne(c,d),[()=>C.t("user.login.desc.text")]),S(l,c)};ce(s,l=>{p(n)?l(o):l(a,-1)}),S(e,i),ee()}customElements.define("go-profile-overview",te(W$,{},[],[]));function H$(e,t){Q(t,!0);function r(f){if(!f)return;const g=[];for(const m of f.split(",")){const v=m.trim();v&&(og.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${og.join(", ")}`))}return g.length?g:void 0}let n=b(t,"filters",7),i=b(t,"eventIds",7),s=b(t,"museumIds",7),o=b(t,"exhibitionIds",7),a=b(t,"selectedDate",7),l=b(t,"selectedTimeslot",7),c=b(t,"ticketIds",7),d=b(t,"ticketGroupIds",7);const u=new v$;me(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),me(()=>{u.filters=r(n()),u.eventIds=sn(i()),u.museumIds=sn(s()),u.exhibitionIds=sn(o()),u.ticketIds=sn(c()),u.ticketGroupIds=sn(d()),u.selectedTimeslot=l(),a()&&(u.selectedDate=ra(a()))}),me(()=>{u.selectedDate&&Ue(()=>{a(u.selectedDate.toString())})}),me(()=>{u.selectedTimeslot,Ue(()=>{l(u.selectedTimeslot)})}),g$(t.$$host,u);var h={details:u,get filters(){return n()},set filters(f){n(f),y()},get eventIds(){return i()},set eventIds(f){i(f),y()},get museumIds(){return s()},set museumIds(f){s(f),y()},get exhibitionIds(){return o()},set exhibitionIds(f){o(f),y()},get selectedDate(){return a()},set selectedDate(f){a(f),y()},get selectedTimeslot(){return l()},set selectedTimeslot(f){l(f),y()},get ticketIds(){return c()},set ticketIds(f){c(f),y()},get ticketGroupIds(){return d()},set ticketGroupIds(f){d(f),y()}};return ee(h)}customElements.define("go-ticket-selection",te(H$,{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 G$(e,t){Q(t,!0);const r=pn(t.$$host),n=D(()=>r.value);me(()=>{t.$$host.style.display=p(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!p(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",p(n)?.isTicketsVisible)}),ee()}customElements.define("go-tickets",te(G$,{},[],[]));function K$(e,t){Q(t,!0);const r=pn(t.$$host),n=D(()=>r.value),i=D(()=>Sn(p(n)?.preCarts||[],o=>o.items.length)),s=D(()=>!p(n)?.isTicketsVisible||p(n)?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),ee()}customElements.define("go-tickets-empty",te(K$,{},[],[]));function Y$(e,t){Q(t,!0);const r=pn(t.$$host),n=D(()=>r.value);let i=D(()=>Sn(p(n)?.preCarts||[],o=>o.totalPriceCents));Et();var s=Rt();ae(o=>ne(s,o),[()=>ur(p(i))]),S(e,s),ee()}customElements.define("go-tickets-sum",te(Y$,{},[],[]));var J$=class{#e;get ticketSelectionDetails(){return p(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=re(Fe(Pi()));get preCart(){return p(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=re();get filters(){return p(this.#r)}set filters(e){I(this.#r,e,!0)}#n=re();get dateId(){return p(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=re();get limit(){return p(this.#i)}set limit(e){I(this.#i,e,!0)}#s=re();get query(){return p(this.#s)}set query(e){I(this.#s,e,!0)}#a=re(Fe([]));get ticketGroupIds(){return p(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=re(Fe([]));get languageIds(){return p(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=re(Fe([]));get catchWordIds(){return p(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=re(Fe([]));get museumIds(){return p(this.#u)}set museumIds(e){I(this.#u,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=Pi([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Pi();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>pi(t).loadProducts(this)))}},hg="go-ticket-segment",X$=Mi(hg),Lc=Fi(hg);function Q$(e,t){Q(t,!0);const r=b(t,"filters",7),n=b(t,"dateId",7),i=b(t,"query",7),s=b(t,"limit",7),o=b(t,"ticketGroupIds",7),a=b(t,"languageIds",7),l=b(t,"catchWordIds",7),c=b(t,"museumIds",7);function d(v){if(!v)return;const _=v.split(",").map(T=>T.trim()).filter(Boolean);return _.length?_:void 0}const u=pn(t.$$host),h=u.value,f=new J$(d(r()),u);X$(t.$$host,f),me(()=>{f.filters=d(r()),f.dateId=n(),f.query=i(),f.limit=s(),f.ticketGroupIds=sn(o()),f.languageIds=sn(a()),f.catchWordIds=sn(l()),f.museumIds=sn(c())}),me(()=>{f.dateId,f.filters,f.ticketGroupIds,f.museumIds,f.languageIds,f.catchWordIds,f.query,f.limit,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Ue(()=>{f.loadTickets()})}),me(()=>{h&&Ue(()=>h?.addTicketSegment(f))});const g=D(()=>f.preCart.items.length);me(()=>{t.$$host.classList.toggle("is-empty",p(g)===0)});var m={details:f,get filters(){return r()},set filters(v){r(v),y()},get dateId(){return n()},set dateId(v){n(v),y()},get query(){return i()},set query(v){i(v),y()},get limit(){return s()},set limit(v){s(v),y()},get ticketGroupIds(){return o()},set ticketGroupIds(v){o(v),y()},get languageIds(){return a()},set languageIds(v){a(v),y()},get catchWordIds(){return l()},set catchWordIds(v){l(v),y()},get museumIds(){return c()},set museumIds(v){c(v),y()}};return ee(m)}customElements.define("go-ticket-segment",te(Q$,{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 eM(e,t){Q(t,!0);const r=pn(t.$$host).value,n=Lc(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),ee()}customElements.define("go-ticket-segment-empty",te(eM,{},[],[]));function pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tM(e){if(Array.isArray(e))return e}function rM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function nM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
84
84
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iM(e,t){return tM(e)||rM(e,t)||sM(e,t)||nM()}function sM(e,t){if(e){if(typeof e=="string")return pg(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pg(e,t):void 0}}var mg=Object.entries,vg=Object.setPrototypeOf,oM=Object.isFrozen,aM=Object.getPrototypeOf,lM=Object.getOwnPropertyDescriptor,Ct=Object.freeze,fr=Object.seal,Xi=Object.create,gg=typeof Reflect<"u"&&Reflect,zc=gg.apply,Uc=gg.construct;Ct||(Ct=function(t){return t}),fr||(fr=function(t){return t}),zc||(zc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return t.apply(r,i)}),Uc||(Uc=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});var Qi=ut(Array.prototype.forEach),uM=ut(Array.prototype.lastIndexOf),yg=ut(Array.prototype.pop),es=ut(Array.prototype.push),cM=ut(Array.prototype.splice),Dt=Array.isArray,io=ut(String.prototype.toLowerCase),Vc=ut(String.prototype.toString),bg=ut(String.prototype.match),ts=ut(String.prototype.replace),_g=ut(String.prototype.indexOf),dM=ut(String.prototype.trim),fM=ut(Number.prototype.toString),hM=ut(Boolean.prototype.toString),wg=typeof BigInt>"u"?null:ut(BigInt.prototype.toString),kg=typeof Symbol>"u"?null:ut(Symbol.prototype.toString),nt=ut(Object.prototype.hasOwnProperty),so=ut(Object.prototype.toString),bt=ut(RegExp.prototype.test),oo=pM(TypeError);function ut(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return zc(e,t,n)}}function pM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uc(e,r)}}function Te(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:io;if(vg&&vg(e,null),!Dt(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(oM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function mM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function wt(e){const t=Xi(null);for(const n of mg(e)){var r=iM(n,2);const i=r[0],s=r[1];nt(e,i)&&(Dt(s)?t[i]=mM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=wt(s):t[i]=s)}return t}function vM(e){switch(typeof e){case"string":return e;case"number":return fM(e);case"boolean":return hM(e);case"bigint":return wg?wg(e):"0";case"symbol":return kg?kg(e):"Symbol()";case"undefined":return so(e);case"function":case"object":{if(e===null)return so(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:so(n)}return so(e)}default:return so(e)}}function Kr(e,t){for(;e!==null;){const n=lM(e,t);if(n){if(n.get)return ut(n.get);if(typeof n.value=="function")return ut(n.value)}e=aM(e)}function r(){return null}return r}function gM(e){try{return bt(e,""),!0}catch{return!1}}var Sg=Ct(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bc=Ct(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qc=Ct(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yM=Ct(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jc=Ct(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bM=Ct(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Eg=Ct(["#text"]),Tg=Ct(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Zc=Ct(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xg=Ct(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Wa=Ct(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_M=fr(/{{[\w\W]*|^[\w\W]*}}/g),wM=fr(/<%[\w\W]*|^[\w\W]*%>/g),kM=fr(/\${[\w\W]*/g),SM=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),EM=fr(/^aria-[\-\w]+$/),Ag=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TM=fr(/^(?:\w+script|data):/i),xM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),AM=fr(/^html$/i),OM=fr(/^[a-z][.\w]*(-[.\w]+)+$/i),Yr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},CM=function(){return typeof window>"u"?null:window},DM=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Og=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Cg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CM();const t=ve=>Cg(ve);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Yr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,h=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),T=Kr(u,"attributes"),A=o&&o.prototype?Kr(o.prototype,"nodeType"):null,E=o&&o.prototype?Kr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let x,O="";const $=r,L=$.implementation,W=$.createNodeIterator,N=$.createDocumentFragment,se=$.getElementsByTagName,V=n.importNode;let oe=Og();t.isSupported=typeof mg=="function"&&typeof v=="function"&&L&&L.createHTMLDocument!==void 0;const pe=_M,J=wM,ie=kM,Y=SM,B=EM,H=TM,G=xM,le=OM;let de=Ag,F=null;const ue=Te({},[...Sg,...Bc,...qc,...jc,...Eg]);let z=null;const ge=Te({},[...Tg,...Zc,...xg,...Wa]);let fe=Object.seal(Xi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,qe=null;const Pe=Object.seal(Xi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ye=!0,kt=!0,Ge=!1,Xt=!0,ct=!1,Qt=!0,St=!1,It=!1,er=!1,qt=!1,hr=!1,Cr=!1,Dr=!0,mn=!1;const Ir="user-content-";let pr=!0,Jr=!1,Xr={},_t=null;const zn=Te({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rs=null;const ns=Te({},["audio","video","img","source","image","track"]);let ao=null;const Wc=Te({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",is="http://www.w3.org/2000/svg",mr="http://www.w3.org/1999/xhtml";let Un=mr,Hc=!1,Gc=null;const XM=Te({},[mi,is,mr],Vc);let Kc=Te({},["mi","mo","mn","ms","mtext"]),Yc=Te({},["annotation-xml"]);const QM=Te({},["title","style","font","a","script"]);let lo=null;const e2=["application/xhtml+xml","text/html"],t2="text/html";let st=null,ss=null;const r2=r.createElement("form"),Mg=function(k){return k instanceof RegExp||k instanceof Function},Jc=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===k)return;(!k||typeof k!="object")&&(k={}),k=wt(k),lo=e2.indexOf(k.PARSER_MEDIA_TYPE)===-1?t2:k.PARSER_MEDIA_TYPE,st=lo==="application/xhtml+xml"?Vc:io,F=nt(k,"ALLOWED_TAGS")&&Dt(k.ALLOWED_TAGS)?Te({},k.ALLOWED_TAGS,st):ue,z=nt(k,"ALLOWED_ATTR")&&Dt(k.ALLOWED_ATTR)?Te({},k.ALLOWED_ATTR,st):ge,Gc=nt(k,"ALLOWED_NAMESPACES")&&Dt(k.ALLOWED_NAMESPACES)?Te({},k.ALLOWED_NAMESPACES,Vc):XM,ao=nt(k,"ADD_URI_SAFE_ATTR")&&Dt(k.ADD_URI_SAFE_ATTR)?Te(wt(Wc),k.ADD_URI_SAFE_ATTR,st):Wc,rs=nt(k,"ADD_DATA_URI_TAGS")&&Dt(k.ADD_DATA_URI_TAGS)?Te(wt(ns),k.ADD_DATA_URI_TAGS,st):ns,_t=nt(k,"FORBID_CONTENTS")&&Dt(k.FORBID_CONTENTS)?Te({},k.FORBID_CONTENTS,st):zn,w=nt(k,"FORBID_TAGS")&&Dt(k.FORBID_TAGS)?Te({},k.FORBID_TAGS,st):wt({}),qe=nt(k,"FORBID_ATTR")&&Dt(k.FORBID_ATTR)?Te({},k.FORBID_ATTR,st):wt({}),Xr=nt(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?wt(k.USE_PROFILES):k.USE_PROFILES:!1,Ye=k.ALLOW_ARIA_ATTR!==!1,kt=k.ALLOW_DATA_ATTR!==!1,Ge=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ct=k.SAFE_FOR_TEMPLATES||!1,Qt=k.SAFE_FOR_XML!==!1,St=k.WHOLE_DOCUMENT||!1,qt=k.RETURN_DOM||!1,hr=k.RETURN_DOM_FRAGMENT||!1,Cr=k.RETURN_TRUSTED_TYPE||!1,er=k.FORCE_BODY||!1,Dr=k.SANITIZE_DOM!==!1,mn=k.SANITIZE_NAMED_PROPS||!1,pr=k.KEEP_CONTENT!==!1,Jr=k.IN_PLACE||!1,de=gM(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Ag,Un=typeof k.NAMESPACE=="string"?k.NAMESPACE:mr,Kc=nt(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?wt(k.MATHML_TEXT_INTEGRATION_POINTS):Te({},["mi","mo","mn","ms","mtext"]),Yc=nt(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?wt(k.HTML_INTEGRATION_POINTS):Te({},["annotation-xml"]);const q=nt(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?wt(k.CUSTOM_ELEMENT_HANDLING):Xi(null);if(fe=Xi(null),nt(q,"tagNameCheck")&&Mg(q.tagNameCheck)&&(fe.tagNameCheck=q.tagNameCheck),nt(q,"attributeNameCheck")&&Mg(q.attributeNameCheck)&&(fe.attributeNameCheck=q.attributeNameCheck),nt(q,"allowCustomizedBuiltInElements")&&typeof q.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=q.allowCustomizedBuiltInElements),ct&&(kt=!1),hr&&(qt=!0),Xr&&(F=Te({},Eg),z=Xi(null),Xr.html===!0&&(Te(F,Sg),Te(z,Tg)),Xr.svg===!0&&(Te(F,Bc),Te(z,Zc),Te(z,Wa)),Xr.svgFilters===!0&&(Te(F,qc),Te(z,Zc),Te(z,Wa)),Xr.mathMl===!0&&(Te(F,jc),Te(z,xg),Te(z,Wa))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Pe.tagCheck=k.ADD_TAGS:Dt(k.ADD_TAGS)&&(F===ue&&(F=wt(F)),Te(F,k.ADD_TAGS,st))),nt(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Pe.attributeCheck=k.ADD_ATTR:Dt(k.ADD_ATTR)&&(z===ge&&(z=wt(z)),Te(z,k.ADD_ATTR,st))),nt(k,"ADD_URI_SAFE_ATTR")&&Dt(k.ADD_URI_SAFE_ATTR)&&Te(ao,k.ADD_URI_SAFE_ATTR,st),nt(k,"FORBID_CONTENTS")&&Dt(k.FORBID_CONTENTS)&&(_t===zn&&(_t=wt(_t)),Te(_t,k.FORBID_CONTENTS,st)),nt(k,"ADD_FORBID_CONTENTS")&&Dt(k.ADD_FORBID_CONTENTS)&&(_t===zn&&(_t=wt(_t)),Te(_t,k.ADD_FORBID_CONTENTS,st)),pr&&(F["#text"]=!0),St&&Te(F,["html","head","body"]),F.table&&(Te(F,["tbody"]),delete w.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=k.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=DM(d,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===ue&&(F=wt(F)),oe.uponSanitizeAttribute.length>0&&z===ge&&(z=wt(z)),Ct&&Ct(k),ss=k},Fg=Te({},[...Bc,...qc,...yM]),Ng=Te({},[...jc,...bM]),n2=function(k){let q=v(k);(!q||!q.tagName)&&(q={namespaceURI:Un,tagName:"template"});const he=io(k.tagName),Oe=io(q.tagName);return Gc[k.namespaceURI]?k.namespaceURI===is?q.namespaceURI===mr?he==="svg":q.namespaceURI===mi?he==="svg"&&(Oe==="annotation-xml"||Kc[Oe]):!!Fg[he]:k.namespaceURI===mi?q.namespaceURI===mr?he==="math":q.namespaceURI===is?he==="math"&&Yc[Oe]:!!Ng[he]:k.namespaceURI===mr?q.namespaceURI===is&&!Yc[Oe]||q.namespaceURI===mi&&!Kc[Oe]?!1:!Ng[he]&&(QM[he]||!Fg[he]):!!(lo==="application/xhtml+xml"&&Gc[k.namespaceURI]):!1},Pr=function(k){es(t.removed,{element:k});try{v(k).removeChild(k)}catch{f(k)}},vi=function(k,q){try{es(t.removed,{attribute:q.getAttributeNode(k),from:q})}catch{es(t.removed,{attribute:null,from:q})}if(q.removeAttribute(k),k==="is")if(qt||hr)try{Pr(q)}catch{}else try{q.setAttribute(k,"")}catch{}},Rg=function(k){let q=null,he=null;if(er)k="<remove></remove>"+k;else{const et=bg(k,/^[\r\n\t ]+/);he=et&&et[0]}lo==="application/xhtml+xml"&&Un===mr&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const Oe=x?x.createHTML(k):k;if(Un===mr)try{q=new c().parseFromString(Oe,lo)}catch{}if(!q||!q.documentElement){q=L.createDocument(Un,"template",null);try{q.documentElement.innerHTML=Hc?O:Oe}catch{}}const $e=q.body||q.documentElement;return k&&he&&$e.insertBefore(r.createTextNode(he),$e.childNodes[0]||null),Un===mr?se.call(q,St?"html":"body")[0]:St?q.documentElement:$e},Lg=function(k){return W.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},zg=function(k){k.normalize();const q=W.call(k.ownerDocument||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=q.nextNode();for(;he;){let Oe=he.data;Qi([pe,J,ie],$e=>{Oe=ts(Oe,$e," ")}),he.data=Oe,he=q.nextNode()}},Ha=function(k){const q=E?E(k):null;return typeof q!="string"||st(q)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==T(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==A(k)||k.childNodes!==m(k)},uo=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return A(k)===Yr.documentFragment}catch{return!1}},Ga=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return typeof A(k)=="number"}catch{return!1}};function vn(ve,k,q){Qi(ve,he=>{he.call(t,k,q,ss)})}const Ug=function(k){let q=null;if(vn(oe.beforeSanitizeElements,k,null),Ha(k))return Pr(k),!0;const he=st(k.nodeName);if(vn(oe.uponSanitizeElement,k,{tagName:he,allowedTags:F}),Qt&&k.hasChildNodes()&&!Ga(k.firstElementChild)&&bt(/<[/\w!]/g,k.innerHTML)&&bt(/<[/\w!]/g,k.textContent)||Qt&&k.namespaceURI===mr&&he==="style"&&Ga(k.firstElementChild)||k.nodeType===Yr.progressingInstruction||Qt&&k.nodeType===Yr.comment&&bt(/<[/\w]/g,k.data))return Pr(k),!0;if(w[he]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(he))&&!F[he]){if(!w[he]&&Bg(he)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(pr&&!_t[he]){const Oe=v(k),$e=m(k);if($e&&Oe){const et=$e.length;for(let jt=et-1;jt>=0;--jt){const Vn=h($e[jt],!0);Oe.insertBefore(Vn,g(k))}}}return Pr(k),!0}return(A?A(k):k.nodeType)===Yr.element&&!n2(k)||(he==="noscript"||he==="noembed"||he==="noframes")&&bt(/<\/no(script|embed|frames)/i,k.innerHTML)?(Pr(k),!0):(ct&&k.nodeType===Yr.text&&(q=k.textContent,Qi([pe,J,ie],Oe=>{q=ts(q,Oe," ")}),k.textContent!==q&&(es(t.removed,{element:k.cloneNode()}),k.textContent=q)),vn(oe.afterSanitizeElements,k,null),!1)},Vg=function(k,q,he){if(qe[q]||Dr&&(q==="id"||q==="name")&&(he in r||he in r2))return!1;const Oe=z[q]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(q,k);if(!(kt&&!qe[q]&&bt(Y,q))){if(!(Ye&&bt(B,q))){if(!Oe||qe[q]){if(!(Bg(k)&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,k)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(k))&&(fe.attributeNameCheck instanceof RegExp&&bt(fe.attributeNameCheck,q)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(q,k))||q==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&bt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!ao[q]){if(!bt(de,ts(he,G,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&k!=="script"&&_g(he,"data:")===0&&rs[k])){if(!(Ge&&!bt(H,ts(he,G,"")))){if(he)return!1}}}}}}return!0},i2=Te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bg=function(k){return!i2[io(k)]&&bt(le,k)},qg=function(k){vn(oe.beforeSanitizeAttributes,k,null);const q=k.attributes;if(!q||Ha(k))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let Oe=q.length;for(;Oe--;){const $e=q[Oe],et=$e.name,jt=$e.namespaceURI,Vn=$e.value,gn=st(et),Xc=Vn;let mt=et==="value"?Xc:dM(Xc);if(he.attrName=gn,he.attrValue=mt,he.keepAttr=!0,he.forceKeepAttr=void 0,vn(oe.uponSanitizeAttribute,k,he),mt=he.attrValue,mn&&(gn==="id"||gn==="name")&&_g(mt,Ir)!==0&&(vi(et,k),mt=Ir+mt),Qt&&bt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){vi(et,k);continue}if(gn==="attributename"&&bg(mt,"href")){vi(et,k);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){vi(et,k);continue}if(!Xt&&bt(/\/>/i,mt)){vi(et,k);continue}ct&&Qi([pe,J,ie],Zg=>{mt=ts(mt,Zg," ")});const jg=st(k.nodeName);if(!Vg(jg,gn,mt)){vi(et,k);continue}if(x&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!jt)switch(d.getAttributeType(jg,gn)){case"TrustedHTML":mt=x.createHTML(mt);break;case"TrustedScriptURL":mt=x.createScriptURL(mt);break}if(mt!==Xc)try{jt?k.setAttributeNS(jt,et,mt):k.setAttribute(et,mt),Ha(k)?Pr(k):yg(t.removed)}catch{vi(et,k)}}vn(oe.afterSanitizeAttributes,k,null)},Ka=function(k){let q=null;const he=Lg(k);for(vn(oe.beforeSanitizeShadowDOM,k,null);q=he.nextNode();)if(vn(oe.uponSanitizeShadowNode,q,null),Ug(q),qg(q),uo(q.content)&&Ka(q.content),(A?A(q):q.nodeType)===Yr.element){const Oe=_?_(q):q.shadowRoot;uo(Oe)&&(os(Oe),Ka(Oe))}vn(oe.afterSanitizeShadowDOM,k,null)},os=function(k){const q=A?A(k):k.nodeType;if(q===Yr.element){const $e=_?_(k):k.shadowRoot;uo($e)&&(os($e),Ka($e))}const he=m?m(k):k.childNodes;if(!he)return;const Oe=[];Qi(he,$e=>{es(Oe,$e)});for(const $e of Oe)os($e);if(q===Yr.element){const $e=E?E(k):null;if(typeof $e=="string"&&st($e)==="template"){const et=k.content;uo(et)&&os(et)}}};return t.sanitize=function(ve){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,he=null,Oe=null,$e=null;if(Hc=!ve,Hc&&(ve="<!-->"),typeof ve!="string"&&!Ga(ve)&&(ve=vM(ve),typeof ve!="string"))throw oo("dirty is not a string, aborting");if(!t.isSupported)return ve;if(It||Jc(k),t.removed=[],typeof ve=="string"&&(Jr=!1),Jr){const Vn=E?E(ve):ve.nodeName;if(typeof Vn=="string"){const gn=st(Vn);if(!F[gn]||w[gn])throw oo("root node is forbidden and cannot be sanitized in-place")}if(Ha(ve))throw oo("root node is clobbered and cannot be sanitized in-place");os(ve)}else if(Ga(ve))q=Rg("<!---->"),he=q.ownerDocument.importNode(ve,!0),he.nodeType===Yr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?q=he:q.appendChild(he),os(he);else{if(!qt&&!ct&&!St&&ve.indexOf("<")===-1)return x&&Cr?x.createHTML(ve):ve;if(q=Rg(ve),!q)return qt?null:Cr?O:""}q&&er&&Pr(q.firstChild);const et=Lg(Jr?ve:q);for(;Oe=et.nextNode();)Ug(Oe),qg(Oe),uo(Oe.content)&&Ka(Oe.content);if(Jr)return ct&&zg(ve),ve;if(qt){if(ct&&zg(q),hr)for($e=N.call(q.ownerDocument);q.firstChild;)$e.appendChild(q.firstChild);else $e=q;return(z.shadowroot||z.shadowrootmode)&&($e=V.call(n,$e,!0)),$e}let jt=St?q.outerHTML:q.innerHTML;return St&&F["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&bt(AM,q.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
|
|
85
85
|
`+jt),ct&&Qi([pe,J,ie],Vn=>{jt=ts(jt,Vn," ")}),x&&Cr?x.createHTML(jt):jt},t.setConfig=function(){Jc(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),It=!0},t.clearConfig=function(){ss=null,It=!1},t.isValidAttribute=function(ve,k,q){return ss||Jc({}),Vg(st(ve),st(k),q)},t.addHook=function(ve,k){typeof k=="function"&&es(oe[ve],k)},t.removeHook=function(ve,k){if(k!==void 0){const q=uM(oe[ve],k);return q===-1?void 0:cM(oe[ve],q,1)[0]}return yg(oe[ve])},t.removeHooks=function(ve){oe[ve]=[]},t.removeAllHooks=function(){oe=Og()},t}var IM=Cg(),PM=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),$M=j("<option> </option>"),MM=j('<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 Dg(e,t){Q(t,!0);const r=f=>{var g=PM(),m=U(g),v=M(m);P(m);var _=X(m,2),T=M(_,!0);P(_),ae(A=>{ne(v,`${i().product.event_title??""} - ${A??""}`),ne(T,i().product.title)},[()=>zs(i().time)]),S(f,g)},n=f=>{Et();var g=Rt();ae(()=>ne(g,i().product.title)),S(f,g)};let i=b(t,"item",7),s=b(t,"details",7),o=re(void 0);me(()=>{s().preCart.items.map(f=>f.quantity),Ue(()=>{I(o,C.capacityManager.capacity(C.cart,i(),s().preCart),!0)})});function a(f,g,m){f.quantity=parseInt(g.value)}let l=n;Vs(i().product)&&(l=r);var c={get item(){return i()},set item(f){i(f),y()},get details(){return s()},set details(f){s(f),y()}},d=K(),u=U(d),h=f=>{var g=MM(),m=M(g),v=M(m),_=M(v),T=M(_);l(T),P(_);var A=X(_,2);s_(A,()=>IM.sanitize(i().product.description),!0),P(A);var E=X(A,2),x=M(E,!0);P(E);var O=X(E,2),$=M(O);Ve($,21,()=>Rp(p(o).min,p(o).max),L=>L.value,(L,W)=>{var N=$M(),se=M(N,!0);P(N);var V={};ae(()=>{Nl(N,i().quantity===p(W).value),ne(se,p(W).label),V!==(V=p(W).value)&&(N.value=(N.__value=p(W).value)??"")}),S(L,N)}),P($),P(O),P(v),P(m),P(g),ae(L=>{Lt(m,1,Ur(["go-tickets-item",p(o).bookedOut&&"is-booked-out"])),ke(m,"data-testid",i().uuid),ne(x,i().price_formatted),ke($,"aria-label",L)},[()=>C.t("cart.content.table.edit")]),Nt("change",$,L=>a(i(),L.target,s()?.ticketSelectionDetails)),S(f,g)};return ce(u,f=>{p(o)&&!p(o).unavailable&&f(h)}),S(e,d),ee(c)}Lr(["change"]),te(Dg,{item:{},details:{}},[],[],{mode:"open"});var FM=j('<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 NM(e,t){Q(t,!0);const r=Lc(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?.preCart?.items.length&&p(n)?.preCart?.items.length>0);var s=K(),o=U(s),a=l=>{var c=FM(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v);var T=X(v,2),A=M(T,!0);P(T),P(u),P(d);var E=X(d,2);Ve(E,17,()=>p(n).preCart.items,x=>x.uuid,(x,O)=>{Dg(x,{get item(){return p(O)},get details(){return p(n)}})}),P(c),ae((x,O,$,L)=>{ne(f,x),ne(m,O),ne(_,$),ne(A,L)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),ee()}customElements.define("go-ticket-segment-body",te(NM,{},[],[]));function RM(e,t){Q(t,!0);const r=Lc(t.$$host),n=D(()=>r.value);Et();var i=Rt();ae(()=>ne(i,p(n)?.preCart.totalFormatted)),S(e,i),ee()}customElements.define("go-ticket-segment-sum",te(RM,{},[],[]));var LM=class{#e;get tsd(){return p(this.#e)}set tsd(e){I(this.#e,e)}#t=re(Fe([]));get timeslots(){return p(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>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=C.capacityManager.quotaManager.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(t=>({...t,startAt:t.timeSlot,timeFormatted:t.timeSlot.substring(11,16),available:t.capacity>0}))}},zM=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),UM=j('<ul data-testid="timeslots"></ul>');function VM(e,t){Q(t,!0);const r=[],n=new LM(pn(t.$$host));me(()=>{const d=n.tsd;if(!d)return;const u=d.filters,h=d.selectedDate;Ue(async()=>{d.timeslotTicketIds=[],u?.length&&h&&await Promise.all(u.map(f=>pi(f).loadTimeslots(d))),n.recalculateCapacities()})});const i=(d,u)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=d=>{i(d.target,n.tsd?.selectedTimeslot)};me(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const h=u[0];h.available&&d.selectedTimeslot!==h.startAt&&(d.selectedTimeslot=h.startAt,i(t.$$host,h.startAt))});var o={details:n},a=K(),l=U(a),c=d=>{var u=UM();Ve(u,20,()=>n.timeslots,h=>h,(h,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!p(g)&&f.capacity===0),v=D(()=>p(g)||p(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var T=zM(),A=M(T),E=M(A),x=X(E);Fo(x);var O;P(A),P(T),ae(()=>{Lt(T,1,Ur({"go-timeslot":!0,"is-unavailable":p(g),"is-sold-out":p(m),"is-disabled":p(v),"is-selected":p(_)})),ne(E,`${f.timeFormatted??""} `),x.disabled=p(v),ke(x,"aria-disabled",p(v)),O!==(O=f.startAt)&&(x.value=(x.__value=f.startAt)??"")}),Nt("change",x,s),w_(r,[],x,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),S(h,T)}),P(u),S(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),S(e,a),ee(o)}Lr(["change"]),customElements.define("go-timeslots",te(VM,{},[],["details"]));var BM=class{#e=re();get details(){return p(this.#e)}set details(e){I(this.#e,e,!0)}#t=re(Fe(Xn(Ut())));get startAt(){return p(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=re(void 0);get selected(){return p(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>pi(e).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(Xn(Ut()))<0||this.dates[e.toString()]=="unavailable":e.compare(Xn(Ut()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>pi(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=C.calendar.bind(C);return this.fetchPeriod().reduce((t,r)=>Gt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>Gt(t,e(this.params(r))),{})}},qM=j("<!> <!> <!>",1),jM=j("<div> </div>"),Ig=j("<!> <!>",1),ZM=j('<div data-calendar-wrapper=""><!></div>');function Pg(e,t){Q(t,!0);let r=b(t,"calendarClass",7),n=re(void 0);const i=r();me(()=>{p(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),y()}},o=ZM(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,h=()=>d?.().weekdays;var f=Ig(),g=U(f);De(g,()=>rc,(v,_)=>{_(v,{children:(T,A)=>{var E=qM(),x=U(E);De(x,()=>sc,(L,W)=>{W(L,{class:"go-calendar-prev-button",children:(N,se)=>{Et();var V=Rt("Prev");S(N,V)},$$slots:{default:!0}})});var O=X(x,2);De(O,()=>nc,(L,W)=>{W(L,{class:"go-calendar-heading"})});var $=X(O,2);De($,()=>ic,(L,W)=>{W(L,{class:"go-calendar-next-button",children:(N,se)=>{Et();var V=Rt("Next");S(N,V)},$$slots:{default:!0}})}),S(T,E)},$$slots:{default:!0}})});var m=X(g,2);Ve(m,17,u,zr,(v,_)=>{var T=K(),A=U(T);De(A,()=>Ju,(E,x)=>{x(E,{class:"go-calendar-grid",children:(O,$)=>{var L=Ig(),W=U(L);De(W,()=>ec,(se,V)=>{V(se,{class:"go-calendar-grid-head",children:(oe,pe)=>{var J=K(),ie=U(J);De(ie,()=>eo,(Y,B)=>{B(Y,{class:"go-calendar-grid-row",children:(H,G)=>{var le=K(),de=U(le);Ve(de,17,h,zr,(F,ue,z,ge)=>{var fe=K(),w=U(fe);De(w,()=>tc,(qe,Pe)=>{Pe(qe,{children:(Ye,kt)=>{var Ge=jM(),Xt=M(Ge,!0);P(Ge),ae(ct=>ne(Xt,ct),[()=>p(ue).slice(0,2)]),S(Ye,Ge)},$$slots:{default:!0}})}),S(F,fe)}),S(H,le)},$$slots:{default:!0}})}),S(oe,J)},$$slots:{default:!0}})});var N=X(W,2);De(N,()=>Xu,(se,V)=>{V(se,{class:"go-calendar-grid-body",children:(oe,pe)=>{var J=K(),ie=U(J);Ve(ie,17,()=>p(_).weeks,zr,(Y,B,H,G)=>{var le=K(),de=U(le);De(de,()=>eo,(F,ue)=>{ue(F,{class:"go-calendar-grid-row",children:(z,ge)=>{var fe=K(),w=U(fe);Ve(w,17,()=>p(B),zr,(qe,Pe,Ye,kt)=>{var Ge=K(),Xt=U(Ge);De(Xt,()=>Qu,(ct,Qt)=>{Qt(ct,{get date(){return p(Pe)},get month(){return p(_).value},class:"go-calendar-cell",children:(St,It)=>{var er=K(),qt=U(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(p(Pe)),"is-disabled":r().isDateDisabled(p(Pe)),"is-selected":r().selected?.compare(p(Pe))===0}));De(qt,()=>Yu,(Cr,Dr)=>{Dr(Cr,{get class(){return p(hr)},children:(mn,Ir)=>{Et();var pr=Rt();ae(()=>ne(pr,p(Pe).day)),S(mn,pr)},$$slots:{default:!0}})})}S(St,er)},$$slots:{default:!0}})}),S(qe,Ge)}),S(z,fe)},$$slots:{default:!0}})}),S(Y,le)}),S(oe,J)},$$slots:{default:!0}})}),S(O,L)},$$slots:{default:!0}})}),S(v,T)}),S(c,f)};De(a,()=>Ym,(c,d)=>{d(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return C.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return P(o),Tf(o,l=>I(n,l),()=>p(n)),S(e,o),ee(s)}te(Pg,{calendarClass:{}},[],["details"],{mode:"open"});function WM(e,t){Q(t,!0);const r=new BM,n=r,i=pn(t.$$host),s=D(()=>i.value);me(()=>{r.details=p(s)}),t.$$host.addEventListener("go-date-select",d=>{p(s)&&(p(s).selectedDate=d.detail.selected,p(s).selectedTimeslot=void 0)});var o={details:n},a=K(),l=U(a),c=d=>{Pg(d,{get calendarClass(){return r}})};return ce(l,d=>{p(s)?.isCalendarVisible&&d(c)}),S(e,a),ee(o)}customElements.define("go-calendar",te(WM,{},[],["details"]));var HM=class{#e;get ticketSelectionDetails(){return p(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!C.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return ft(n.product,{quantity:n.quantity,time:i})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},GM=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function KM(e,t){Q(t,!0);const r=new HM(pn(t.$$host));var n={details:r},i=GM(),s=M(i,!0);return P(i),ae((o,a,l)=>{i.disabled=o,ke(i,"data-x",a),ne(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),Nt("click",i,()=>r.addToCart()),S(e,i),ee(n)}Lr(["click"]),customElements.define("go-add-to-cart-button",te(KM,{},[],["details"]));function YM(e,t){Q(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,o=await C.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return $n(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),ee({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-withdrawal-form",te(YM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function JM(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)try{await $g[n.method](n.options)}catch(i){console.error(i)}e.go=$g,t&&(t._queue=null)}var $g={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{await C.load("https://"+e.api,e.shop,e.locale)}};(async()=>await JM(window))()})();
|
|
@@ -22952,15 +22952,17 @@ var ZP = {
|
|
|
22952
22952
|
},
|
|
22953
22953
|
async loadProducts(e) {
|
|
22954
22954
|
const t = e.ticketSelectionDetails;
|
|
22955
|
-
if (!t?.eventIds?.length || !t.selectedDate
|
|
22956
|
-
const
|
|
22955
|
+
if (!t?.eventIds?.length || !t.selectedDate) return;
|
|
22956
|
+
const r = await C.asyncFetch(() => C.getEvent(t.eventIds[0]));
|
|
22957
|
+
if (!r.tickets?.length) return;
|
|
22958
|
+
const { tickets: n, quotas: i } = await C.asyncFetch(() => C.ticketsAndQuotas({
|
|
22959
|
+
"by_ticket_ids[]": r.tickets,
|
|
22957
22960
|
by_bookable: !0,
|
|
22958
|
-
valid_at: t.selectedDate.toString()
|
|
22959
|
-
date_id: e.dateId
|
|
22961
|
+
valid_at: t.selectedDate.toString()
|
|
22960
22962
|
}));
|
|
22961
|
-
C.capacityManager.addQuotas(
|
|
22962
|
-
const
|
|
22963
|
-
for (const
|
|
22963
|
+
C.capacityManager.addQuotas(i);
|
|
22964
|
+
const s = Rn(Ln(n, t.selectedTime), t.selectedTime);
|
|
22965
|
+
for (const o of s) e.preCart.addItem(ft(o, { time: t.selectedTime }));
|
|
22964
22966
|
}
|
|
22965
22967
|
}, KP = {
|
|
22966
22968
|
name: "event:admission:day",
|