@gomusdev/web-components 4.4.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/README.md +16 -0
  2. package/dist-js/components/checkoutForm/CheckoutGuest.svelte.d.ts +1 -0
  3. package/dist-js/components/checkoutForm/CheckoutUser.svelte.d.ts +1 -0
  4. package/dist-js/gomus-webcomponents.iife.js +172 -60
  5. package/dist-js/gomus-webcomponents.js +172 -60
  6. package/dist-js/gomus-webcomponents.min.iife.js +20 -20
  7. package/dist-js/gomus-webcomponents.min.js +4494 -4408
  8. package/dist-js/src/components/annualTicketPersonalization/lib/PersonalizationDetails.svelte.d.ts +2 -0
  9. package/dist-js/src/components/cart/mocks/gomusTicketMocks.d.ts +3 -0
  10. package/dist-js/src/components/checkoutForm/CheckoutGuest.spec.d.ts +1 -0
  11. package/dist-js/src/components/checkoutForm/CheckoutUser.spec.d.ts +1 -0
  12. package/dist-js/src/components/checkoutForm/lib.d.ts +2 -1
  13. package/dist-js/src/components/graveyard/event/lib.svelte.d.ts +1 -0
  14. package/dist-js/src/components/order/lib/OrderDetails.svelte.d.ts +3 -2
  15. package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +6 -0
  16. package/dist-js/src/factories/CartItemFactories.d.ts +18 -0
  17. package/dist-js/src/go/go.d.ts +3 -2
  18. package/dist-js/src/lib/models/cart/CartItem.d.ts +23 -0
  19. package/dist-js/src/lib/models/cart/cart.svelte.d.ts +12 -0
  20. package/dist-js/src/lib/models/cart/localStorage.svelte.d.ts +3 -0
  21. package/dist-js/src/lib/models/ticket/UITicket.svelte.d.ts +3 -0
  22. package/dist-js/src/lib/stores/shop.svelte.d.ts +13 -1
  23. package/dist-js/src/mocks/ShopMocks.d.ts +2 -0
  24. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- (function(){var qy=globalThis;(qy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var jn={},ut=Symbol("uninitialized"),il=Symbol("filename"),Uy="http://www.w3.org/1999/xhtml",Vy="http://www.w3.org/2000/svg",By="http://www.w3.org/1998/Math/MathML",jy="@attach",ma=Array.isArray,Zy=Array.prototype.indexOf,va=Array.prototype.includes,ga=Array.from,ya=Object.keys,kn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,yd=Object.getOwnPropertyDescriptors,bd=Object.prototype,Wy=Array.prototype,ba=Object.getPrototypeOf,_d=Object.isExtensible;function ds(e){return typeof e=="function"}var Re=()=>{};function Hy(e){return e()}function sl(e){for(var t=0;t<e.length;t++)e[t]()}function wd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Gy(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}var Ky=1<<24,rr=1024,nr=2048,Zn=4096,al=8192,Yy=16384,ol=32768,kd=1<<25,fs=65536,aF=1<<17,oF=1<<18,wi=1<<19,Sd=1<<20,hs=1<<25,ps=65536,Ed=1<<21,Jy=1<<22,_a=1<<23,Nr=Symbol("$state"),ll=Symbol("legacy props"),Qy=Symbol(""),Xy=Symbol("proxy path"),xd=Symbol("attributes"),ul=Symbol("class"),cl=Symbol("style"),dl=Symbol("text"),ms=Symbol("form reset"),lF=Symbol("hmr anchor"),wa=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function eb(e){throw new Error("https://svelte.dev/e/invariant_violation")}function Td(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function tb(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function uF(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function cF(){throw new Error("https://svelte.dev/e/derived_references_self")}function Ad(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function dF(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function rb(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function nb(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ib(e){throw new Error("https://svelte.dev/e/effect_orphan")}function sb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ab(){throw new Error("https://svelte.dev/e/hydration_failed")}function fF(){throw new Error("https://svelte.dev/e/invalid_snippet")}function ob(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function hF(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function pF(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function lb(){throw new Error("https://svelte.dev/e/set_context_after_init")}function ub(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function cb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function db(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var mF="font-weight: bold",vF="font-weight: normal";function gF(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function yF(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function hb(){console.warn("https://svelte.dev/e/derived_inert")}function pb(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function mb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function gs(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function bF(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function vb(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function fl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function _F(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function gb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var _e=!1;function bt(e){_e=e}var Ce;function ht(e){if(e===null)throw gs(),jn;return Ce=e}function en(){return ht(br(Ce))}function I(e){if(_e){if(br(Ce)!==null)throw gs(),jn;Ce=e}}function At(e=1){if(_e){for(var t=e,r=Ce;t--;)r=br(r);Ce=r}}function ys(e=!0){for(var t=0,r=Ce;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=br(r);e&&r.remove(),r=i}}function hl(e){if(!e||e.nodeType!==8)throw gs(),jn;return e.data}function Cd(e){return e===this.v}function yb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Od(e){return!yb(e,this.v)}var Ht=!1,ki=!1,wF=!1;function bb(){ki=!0}var kF="font-weight: bold",SF="font-weight: normal";function EF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var _b=[];function pl(e,t=!1,r=!1){return ka(e,new Map,"",_b,null,r)}function ka(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(ma(e)){var o=Array(e.length);t.set(e,o),i!==null&&t.set(i,o);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(o[l]=ka(c,t,r,n,null,s))}return o}if(ba(e)===bd){o={},t.set(e,o),i!==null&&t.set(i,o);for(var d of Object.keys(e))o[d]=ka(e[d],t,r,n,null,s);return o}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return ka(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var xF=null;function Dd(e,t){return e.label=t,wb(e.v,t),e}function wb(e,t){return e?.[Xy]?.(t),e}function TF(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function AF(e){const t=new Error,r=kb();return r.length===0?null:(r.unshift(`
1
+ (function(){var Vy=globalThis;(Vy.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var jn={},ut=Symbol("uninitialized"),sl=Symbol("filename"),By="http://www.w3.org/1999/xhtml",jy="http://www.w3.org/2000/svg",Zy="http://www.w3.org/1998/Math/MathML",Wy="@attach",va=Array.isArray,Hy=Array.prototype.indexOf,ga=Array.prototype.includes,ya=Array.from,ba=Object.keys,kn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,yd=Object.getOwnPropertyDescriptors,bd=Object.prototype,Gy=Array.prototype,_a=Object.getPrototypeOf,_d=Object.isExtensible;function ds(e){return typeof e=="function"}var Re=()=>{};function Ky(e){return e()}function al(e){for(var t=0;t<e.length;t++)e[t]()}function wd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Yy(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}var Jy=1<<24,rr=1024,nr=2048,Zn=4096,ol=8192,Qy=16384,ll=32768,kd=1<<25,fs=65536,hF=1<<17,pF=1<<18,wi=1<<19,Sd=1<<20,hs=1<<25,ps=65536,Ed=1<<21,Xy=1<<22,wa=1<<23,Nr=Symbol("$state"),ul=Symbol("legacy props"),eb=Symbol(""),tb=Symbol("proxy path"),xd=Symbol("attributes"),cl=Symbol("class"),dl=Symbol("style"),fl=Symbol("text"),ms=Symbol("form reset"),mF=Symbol("hmr anchor"),ka=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function rb(e){throw new Error("https://svelte.dev/e/invariant_violation")}function Td(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nb(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function vF(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function gF(){throw new Error("https://svelte.dev/e/derived_references_self")}function Ad(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function yF(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function ib(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sb(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ab(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ob(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function lb(){throw new Error("https://svelte.dev/e/hydration_failed")}function bF(){throw new Error("https://svelte.dev/e/invalid_snippet")}function ub(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function _F(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function wF(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function cb(){throw new Error("https://svelte.dev/e/set_context_after_init")}function db(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function fb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function hb(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function pb(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var kF="font-weight: bold",SF="font-weight: normal";function EF(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function xF(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function mb(){console.warn("https://svelte.dev/e/derived_inert")}function vb(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function gb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function gs(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function TF(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function yb(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function hl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function AF(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function bb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var _e=!1;function bt(e){_e=e}var Ce;function ht(e){if(e===null)throw gs(),jn;return Ce=e}function tn(){return ht(br(Ce))}function I(e){if(_e){if(br(Ce)!==null)throw gs(),jn;Ce=e}}function Ct(e=1){if(_e){for(var t=e,r=Ce;t--;)r=br(r);Ce=r}}function ys(e=!0){for(var t=0,r=Ce;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=br(r);e&&r.remove(),r=i}}function pl(e){if(!e||e.nodeType!==8)throw gs(),jn;return e.data}function Cd(e){return e===this.v}function _b(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Od(e){return!_b(e,this.v)}var Gt=!1,ki=!1,CF=!1;function wb(){ki=!0}var OF="font-weight: bold",DF="font-weight: normal";function IF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var kb=[];function ml(e,t=!1,r=!1){return Sa(e,new Map,"",kb,null,r)}function Sa(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(va(e)){var o=Array(e.length);t.set(e,o),i!==null&&t.set(i,o);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(o[l]=Sa(c,t,r,n,null,s))}return o}if(_a(e)===bd){o={},t.set(e,o),i!==null&&t.set(i,o);for(var f of Object.keys(e))o[f]=Sa(e[f],t,r,n,null,s);return o}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return Sa(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var PF=null;function Dd(e,t){return e.label=t,Sb(e.v,t),e}function Sb(e,t){return e?.[tb]?.(t),e}function $F(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function MF(e){const t=new Error,r=Eb();return r.length===0?null:(r.unshift(`
2
2
  `),kn(t,"stack",{value:r.join(`
3
- `)}),kn(t,"name",{value:e}),t)}function kb(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];const r=t.split(`
4
- `),n=[];for(let i=0;i<r.length;i++){const s=r[i],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(s)}}return n}function CF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ve=null;function Si(e){Ve=e}var Sb=null;function OF(e){Sb=e}var ml=null;function DF(e){ml=e}function Id(e){return vl("getContext").get(e)}function Eb(e,t){const r=vl("setContext");if(Ht){var n=xe.f;!Oe&&(n&32)!==0&&!Ve.i||lb()}return r.set(e,t),t}function xb(e){return vl("hasContext").has(e)}function ee(e,t=!1,r){Ve={p:Ve,i:!1,c:null,e:null,s:e,x:null,r:xe,l:ki&&!t?{s:null,u:null,$:[]}:null}}function te(e){var t=Ve,r=t.e;if(r!==null){t.e=null;for(var n of r)rf(n)}return e!==void 0&&(t.x=e),t.i=!0,Ve=t.p,e??{}}function bs(){return!ki||Ve!==null&&Ve.l===null}function vl(e){return Ve===null&&Td(e),Ve.c??=new Map(Tb(Ve)||void 0)}function Tb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var Wn=[];function Pd(){var e=Wn;Wn=[],sl(e)}function ir(e){if(Wn.length===0&&!ws){var t=Wn;queueMicrotask(()=>{t===Wn&&Pd()})}Wn.push(e)}function Ab(){for(;Wn.length>0;)Pd()}var Cb=new WeakMap;function $d(e){var t=xe;if(t===null)return Oe.f|=_a,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;Sn(e,t)}function Sn(e,t){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}function IF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=Tl?" ":" ",i=`
3
+ `)}),kn(t,"name",{value:e}),t)}function Eb(){const e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];const r=t.split(`
4
+ `),n=[];for(let i=0;i<r.length;i++){const s=r[i],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||n.push(s)}}return n}function FF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ve=null;function Si(e){Ve=e}var xb=null;function NF(e){xb=e}var vl=null;function RF(e){vl=e}function Id(e){return gl("getContext").get(e)}function Tb(e,t){const r=gl("setContext");if(Gt){var n=Te.f;!Oe&&(n&32)!==0&&!Ve.i||cb()}return r.set(e,t),t}function Ab(e){return gl("hasContext").has(e)}function te(e,t=!1,r){Ve={p:Ve,i:!1,c:null,e:null,s:e,x:null,r:Te,l:ki&&!t?{s:null,u:null,$:[]}:null}}function re(e){var t=Ve,r=t.e;if(r!==null){t.e=null;for(var n of r)rf(n)}return e!==void 0&&(t.x=e),t.i=!0,Ve=t.p,e??{}}function bs(){return!ki||Ve!==null&&Ve.l===null}function gl(e){return Ve===null&&Td(e),Ve.c??=new Map(Cb(Ve)||void 0)}function Cb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var Wn=[];function Pd(){var e=Wn;Wn=[],al(e)}function ir(e){if(Wn.length===0&&!ws){var t=Wn;queueMicrotask(()=>{t===Wn&&Pd()})}Wn.push(e)}function Ob(){for(;Wn.length>0;)Pd()}var Db=new WeakMap;function $d(e){var t=Te;if(t===null)return Oe.f|=wa,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;Sn(e,t)}function Sn(e,t){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}function LF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=Al?" ":" ",i=`
5
5
  ${n}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;s!==null;)i+=`
6
- ${n}in ${s.function?.[il].split("/").pop()}`,s=s.p;return{message:e.message+`
6
+ ${n}in ${s.function?.[sl].split("/").pop()}`,s=s.p;return{message:e.message+`
7
7
  ${i}
8
8
  `,stack:e.stack?.split(`
9
9
  `).filter(a=>!a.includes("svelte/src/internal")).join(`
10
- `)}}}function PF(e){const t=Cb.get(e);t&&(kn(e,"message",{value:t.message}),kn(e,"stack",{value:t.stack}))}var Ob=~(nr|Zn|rr);function at(e,t){e.f=e.f&Ob|t}function gl(e){(e.f&512)!==0||e.deps===null?at(e,rr):at(e,Zn)}function Md(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=ps,Md(t.deps))}function Fd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Md(e.deps),at(e,rr)}var Db=!1,Sa=!1;function Ib(e){var t=Sa;try{return Sa=!1,[e(),Sa]}finally{Sa=t}}var Ea=null,Ei=null,Se=null,_s=null,Ct=null,yl=null,ws=!1,bl=!1,xi=null,xa=null,Nd=0,$F=new Set,Pb=1,Ti=class dd{id=Pb++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#o=new Map;#a=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){Ei===null?Ea=Ei=this:(Ei.#r=this,this.#t=Ei),Ei=this}#m(){if(this.is_fork)return!0;for(const n of this.#o.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)at(i,nr),r(i);for(i of n.m)at(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Nd++>1e3&&(this.#b(),$b());for(const l of this.#c)this.#d.delete(l),at(l,nr),this.schedule(l);for(const l of this.#d)at(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=xi=[],n=[],i=xa=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw qd(l),this.#m()||this.discard(),c}if(Se=null,i.length>0){var s=dd.ensure();for(const l of i)s.schedule(l)}if(xi=null,xa=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)zd(l,c);i.length>0&&Se.#v();return}const a=this.#w();if(a){this.#g(n),this.#g(r),a.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),_s=this,Rd(n),Rd(r),_s=null,this.#a?.resolve();var o=Se;if(this.#s===0&&(this.#l.length===0||o!==null)&&(this.#b(),Ht&&(this.#k(),Se=o)),this.#l.length>0)if(o!==null){const l=o;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else o=this;o!==null&&o.#v()}#y(t,r,n){t.f^=rr;for(var i=t.first;i!==null;){var s=i.f,a=(s&96)!==0;if(!(a&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){a?i.f^=rr:(s&4)!==0?r.push(i):Ht&&(s&16777224)!==0?n.push(i):Ts(i)&&((s&16)!==0&&this.#d.add(i),Di(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var s=o.f;if((s&2)!==0)r(o);else{var a=o;s&4194320&&!this.async_deriveds.has(a)&&(this.#d.delete(a),at(a,nr),this.schedule(a))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),Se=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Fd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ut&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Ct?.set(t,r)),this.is_fork||(t.v=r)}activate(){Se=this}deactivate(){Se=null,Ct=null}flush(){try{bl=!0,Se=this,this.#v()}finally{Nd=0,yl=null,xi=null,xa=null,bl=!1,Se=null,Ct=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#a?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let d=Ea;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[p,h]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&p!==n)d.current.set(u,[p,h]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const h=d.async_deriveds.get(u);h&&p.promise.then(h.resolve).catch(h.reject)}if(d.#e){var i=[...d.current.keys()].filter(u=>!d.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&d.discard();else if(r.length>0){if(t)for(const u of this.#p)d.unskip_effect(u,p=>{(p.f&4194320)!==0?d.schedule(p):d.#g([p])});d.activate();var s=new Set,a=new Map;for(var o of r)Ld(o,i,s,a);a=new Map;var l=[...d.current].filter(([u,p])=>{const h=this.current.get(u);return h?h[0]!==p[0]||h[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&_l(u,l,a)&&((u.f&4194320)!==0?(at(u,nr),d.schedule(u)):d.#c.add(u));if(d.#l.length>0&&!d.#f){d.apply();for(var c of d.#l)d.#y(c,[],[]);d.#l=[]}d.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#o.get(r)??0;this.#o.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#o.get(r)??0;n===1?this.#o.delete(r):this.#o.set(r,n-1)}this.#f||(this.#f=!0,ir(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#a??=wd()).promise}static ensure(){if(Se===null){const t=Se=new dd;!bl&&!ws&&ir(()=>{t.#e||t.flush()})}return Se}apply(){if(!Ht||!this.is_fork&&this.#t===null&&this.#r===null){Ct=null;return}Ct=new Map;for(const[r,[n]]of this.current)Ct.set(r,n);for(let r=Ea;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)Ct.has(n)||Ct.set(n,i)}}schedule(t){if(yl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(xi!==null&&r===xe&&(Ht||(Oe===null||(Oe.f&2)===0)&&!Db))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=rr}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Ea=r:t.#r=r,r===null?Ei=t:r.#t=t,this.linked=!1}}};function b(e){var t=ws;ws=!0;try{var r;for(e&&(Se!==null&&!Se.is_fork&&Se.flush(),r=e());;){if(Ab(),Se===null)return r;Se.flush()}}finally{ws=t}}function $b(){if(0){var e;for(const r of Se.current.keys())for(const[n,i]of r.updated??[])var t}try{sb()}catch(r){Sn(r,yl)}}var Rr=null;function Rd(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Ts(n)&&(Rr=new Set,Di(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&of(n),Rr?.size>0)){Hn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Rr.has(a)&&(Rr.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&24576)===0&&Di(l)}}Rr.clear()}}Rr=null}}function Ld(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?Ld(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&_l(i,t,n)&&(at(i,nr),wl(i))}}function _l(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(va.call(t,i))return!0;if((i.f&2)!==0&&_l(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function wl(e){Se.schedule(e)}function zd(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),at(e,rr);for(var r=e.first;r!==null;)zd(r,t),r=r.next}}function qd(e){at(e,rr);for(var t=e.first;t!==null;)qd(t),t=t.next}function kl(e){let t=0,r=En(0),n;return()=>{Ol()&&(f(r),Oi(()=>(t===0&&(n=Le(()=>e(()=>Lr(r)))),t+=1,()=>{ir(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var Mb=fs|wi;function Fb(e,t,r,n){new Nb(e,t,r,n)}var Nb=class{parent;is_pending=!1;transform_error;#e;#t=_e?Ce:null;#r;#n;#i;#s=null;#o=null;#a=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=kl(()=>(this.#f=En(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=xe;s.b=this,s.f|=128,r(i)},this.parent=xe.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=xs(()=>{if(_e){const i=this.#t;en();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));this.#y(a)}else s?this.#w():this.#v()}else this.#_()},Mb),_e&&(this.#e=Ce)}#v(){try{this.#s=Rt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#a=Rt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#o=Rt(()=>e(this.#e)),ir(()=>{var t=this.#l=document.createDocumentFragment(),r=Nt();t.append(r),this.#s=this.#k(()=>Rt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Gn(this.#o,()=>{this.#o=null}),this.#g(Se))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=Rt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();Pl(this.#s,e);const t=this.#r.pending;this.#o=Rt(()=>t(this.#e))}else this.#g(Se)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Fd(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=xe,r=Oe,n=Ve;ar(this.#i),Lt(this.#i),Si(this.#i.ctx);try{return Ti.ensure(),e()}catch(i){return $d(i),null}finally{ar(t),Lt(r),Si(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#o&&Gn(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,ir(()=>{this.#d=!1,this.#f&&Ci(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),f(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;Se?.is_fork?(this.#s&&Se.skip_effect(this.#s),this.#o&&Se.skip_effect(this.#o),this.#a&&Se.skip_effect(this.#a),Se.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(vt(this.#s),this.#s=null),this.#o&&(vt(this.#o),this.#o=null),this.#a&&(vt(this.#a),this.#a=null),_e&&(ht(this.#t),At(),ht(ys()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){gb();return}n=!0,i&&fb(),this.#a!==null&&Gn(this.#a,()=>{this.#a=null}),this.#k(()=>{this.#_()})},a=o=>{try{i=!0,t?.(o,s),i=!1}catch(l){Sn(l,this.#i&&this.#i.parent)}r&&(this.#a=this.#k(()=>{try{return Rt(()=>{var l=xe;l.b=this,l.f|=128,r(this.#e,()=>o,()=>s)})}catch(l){return Sn(l,this.#i.parent),null}}))};ir(()=>{var o;try{o=this.transform_error(e)}catch(l){Sn(l,this.#i&&this.#i.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>Sn(l,this.#i&&this.#i.parent)):a(o)})}};function Ud(e,t,r,n){const i=bs()?Ai:Sl;var s=e.filter(h=>!h.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var o=xe,l=Rb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function d(h){if((o.f&16384)===0){l();try{n([...a,...h])}catch(g){Sn(g,o)}Ta()}}var u=Vd();if(r.length===0){c.then(()=>d([])).finally(u);return}function p(){Promise.all(r.map(h=>zb(h))).then(d).catch(h=>Sn(h,o)).finally(u)}c?c.then(()=>{l(),p(),Ta()}):p()}function Rb(){var e=xe,t=Oe,r=Ve,n=Se;if(0)var i;return function(a=!0){ar(e),Lt(t),Si(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Ta(e=!0){ar(null),Lt(null),Si(null),e&&Se?.deactivate()}function Vd(){var e=xe,t=e.b,r=Se,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var Lb=null;function MF(e){Lb=e}var FF=new Set;function Ai(e){var t=2|nr;return xe!==null&&(xe.f|=wi),{ctx:Ve,deps:null,effects:null,equals:Cd,f:t,fn:e,reactions:null,rv:0,v:ut,wv:0,parent:xe,ac:null}}var Aa=Symbol("obsolete");function zb(e,t,r){let n=xe;n===null&&tb();var i=void 0,s=En(ut),a=!Oe,o=new Set;return Qb(()=>{var l=xe,c=wd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==wa&&c.reject(h)}).finally(Ta)}catch(h){c.reject(h),Ta()}var d=Se;if(a){if((l.f&32768)!==0)var u=Vd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(Aa);else for(const h of o.values())h.reject(Aa);o.add(c),d.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),o.delete(c),g!==Aa&&(d.activate(),g?(s.f|=_a,Ci(s,g)):((s.f&8388608)!==0&&(s.f^=_a),Ci(s,h)),d.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Pa(()=>{for(const l of o)l.reject(Aa)}),new Promise(l=>{function c(d){function u(){d===i?l(s):c(i)}d.then(u,u)}c(i)})}function D(e){const t=Ai(e);return Ht||df(t),t}function Sl(e){const t=Ai(e);return t.equals=Od,t}function qb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)vt(t[r])}}var NF=[];function El(e){var t,r=xe,n=e.parent;if(!tn&&n!==null&&e.v!==ut&&(n.f&24576)!==0)return hb(),e.v;ar(n);try{e.f&=~ps,qb(e),t=vf(e)}finally{ar(r)}return t}function Bd(e){var t=El(e);if(!e.equals(t)&&(e.wv=pf(),(!Se?.is_fork||e.deps===null)&&(Se!==null?(Se.capture(e,t,!0),_s?.capture(e,t,!0)):e.v=t,e.deps===null))){at(e,rr);return}tn||(Ct!==null?(Ol()||Se?.is_fork)&&Ct.set(e,t):gl(e))}function Ub(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(wa),t.fn!==null&&(t.teardown=Re),t.ac=null,As(t,0),Il(t))}function jd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Di(t)}var ks=new Set,Hn=new Map;function RF(e){ks=e}var xl=!1;function Vb(){xl=!0}function En(e,t){var r={f:0,v:e,reactions:null,equals:Cd,rv:0,wv:0};return r}function ie(e,t){const r=En(e,t);return df(r),r}function Zd(e,t=!1,r=!0){const n=En(e);return t||(n.equals=Od),ki&&r&&Ve!==null&&Ve.l!==null&&(Ve.l.s??=[]).push(n),n}function M(e,t,r=!1){Oe!==null&&(!_r||(Oe.f&131072)!==0)&&bs()&&(Oe.f&4325394)!==0&&(zr===null||!zr.has(e))&&db();let n=r?Me(t):t;return Ci(e,n,xa)}function Ci(e,t,r=null){if(!e.equals(t)){Hn.set(e,tn?t:e.v);var n=Ti.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&El(i),Ct===null&&gl(i)}e.wv=pf(),Hd(e,nr,r),bs()&&xe!==null&&(xe.f&1024)!==0&&(xe.f&96)===0&&(or===null?t_([e]):or.push(e)),!n.is_fork&&ks.size>0&&!xl&&Wd()}return t}function Wd(){xl=!1;for(const e of ks){(e.f&1024)!==0&&at(e,Zn);let t;try{t=Ts(e)}catch{t=!0}t&&Di(e)}ks.clear()}function Lr(e){M(e,e.v+1)}function Hd(e,t,r){var n=e.reactions;if(n!==null)for(var i=bs(),s=n.length,a=0;a<s;a++){var o=n[a],l=o.f;if(!(!i&&o===xe)){var c=(l&nr)===0;if(c&&at(o,t),(l&131072)!==0)ks.add(o);else if((l&2)!==0){var d=o;Ct?.delete(d),(l&65536)===0&&(l&512&&(xe===null||(xe.f&2097152)===0)&&(o.f|=ps),Hd(d,Zn,r))}else if(c){var u=o;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):wl(u)}}}}var Bb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Me(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=ba(e);if(t!==bd&&t!==Wy)return e;var r=new Map,n=ma(e),i=ie(0),s=null,a=rn,o=u=>{if(rn===a)return u();var p=Oe,h=rn;Lt(null),hf(a);var g=u();return Lt(p),hf(h),g};n&&r.set("length",ie(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,Dd(i,`${l} version`);for(const[p,h]of r)Dd(h,jb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&ub();var g=r.get(p);return g===void 0?o(()=>{var m=ie(h.value,s);return r.set(p,m),m}):M(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=o(()=>ie(ut,s));r.set(p,g),Lr(i)}}else M(h,ut),Lr(i);return!0},get(u,p,h){if(p===Nr)return e;var g=r.get(p),m=p in u;if(g===void 0&&(!m||Fr(u,p)?.writable)&&(g=o(()=>{var y=ie(Me(m?u[p]:ut),s);return y}),r.set(p,g)),g!==void 0){var v=f(g);return v===ut?void 0:v}return Reflect.get(u,p,h)},getOwnPropertyDescriptor(u,p){var h=Reflect.getOwnPropertyDescriptor(u,p);if(h&&"value"in h){var g=r.get(p);g&&(h.value=f(g))}else if(h===void 0){var m=r.get(p),v=m?.v;if(m!==void 0&&v!==ut)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,p){if(p===Nr)return!0;var h=r.get(p),g=h!==void 0&&h.v!==ut||Reflect.has(u,p);return(h!==void 0||xe!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var m=ie(g?Me(u[p]):ut,s);return m}),r.set(p,h)),f(h)===ut)?!1:g},set(u,p,h,g){var m=r.get(p),v=p in u;if(n&&p==="length")for(var y=h;y<m.v;y+=1){var k=r.get(y+"");k!==void 0?M(k,ut):y in u&&(k=o(()=>ie(ut,s)),r.set(y+"",k))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=o(()=>ie(void 0,s)),M(m,Me(h)),r.set(p,m));else{v=m.v!==ut;var x=o(()=>Me(h));M(m,x)}var T=Reflect.getOwnPropertyDescriptor(u,p);if(T?.set&&T.set.call(g,h),!v){if(n&&typeof p=="string"){var S=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=S.v&&M(S,O+1)}Lr(i)}return!0},ownKeys(u){f(i);var p=Reflect.ownKeys(u).filter(m=>{var v=r.get(m);return v===void 0||v.v!==ut});for(var[h,g]of r)g.v!==ut&&!(h in u)&&p.push(h);return p},setPrototypeOf(){cb()}})}function jb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Bb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Ss(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Gd(e,t){return Object.is(Ss(e),Ss(t))}var Zb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function LF(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Zb.has(r)?function(...s){Vb();var a=i.apply(this,s);return Wd(),a}:i}})}function zF(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,a){const o=r.call(this,s,a);if(o===-1){for(let l=a??0;l<this.length;l+=1)if(Ss(this[l])===s){fl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(s,a){const o=n.call(this,s,a??this.length-1);if(o===-1){for(let l=0;l<=(a??this.length-1);l+=1)if(Ss(this[l])===s){fl("array.lastIndexOf(...)");break}}return o},e.includes=function(s,a){const o=i.call(this,s,a);if(!o){for(let l=0;l<this.length;l+=1)if(Ss(this[l])===s){fl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Kd,Wb,Tl,Yd,Jd;function Al(){if(Kd===void 0){Kd=window,Wb=document,Tl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Yd=Fr(t,"firstChild").get,Jd=Fr(t,"nextSibling").get,_d(e)&&(e[ul]=void 0,e[xd]=null,e[cl]=void 0,e.__e=void 0),_d(r)&&(r[dl]=void 0)}}function Nt(e=""){return document.createTextNode(e)}function Gt(e){return Yd.call(e)}function br(e){return Jd.call(e)}function $(e,t){if(!_e)return Gt(e);var r=Gt(Ce);if(r===null)r=Ce.appendChild(Nt());else if(t&&r.nodeType!==3){var n=Nt();return r?.before(n),ht(n),n}return t&&Oa(r),ht(r),r}function z(e,t=!1){if(!_e){var r=Gt(e);return r instanceof Comment&&r.data===""?br(r):r}if(t){if(Ce?.nodeType!==3){var n=Nt();return Ce?.before(n),ht(n),n}Oa(Ce)}return Ce}function W(e,t=1,r=!1){let n=_e?Ce:e;for(var i;t--;)i=n,n=br(n);if(!_e)return n;if(r){if(n?.nodeType!==3){var s=Nt();return n===null?i?.after(s):n.before(s),ht(s),s}Oa(n)}return ht(n),n}function Cl(e){e.textContent=""}function Qd(){return!Ht||Rr!==null?!1:(xe.f&ol)!==0}function Ca(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Hb(e=""){return document.createComment(e)}function Oa(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Gb(e,t){if(t){const r=document.body;e.autofocus=!0,ir(()=>{document.activeElement===r&&e.focus()})}}function Kb(e){_e&&Gt(e)!==null&&Cl(e)}var Xd=!1;function ef(){Xd||(Xd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[ms]?.()})},{capture:!0}))}function Da(e){var t=Oe,r=xe;Lt(null),ar(null);try{return e()}finally{Lt(t),ar(r)}}function Ia(e,t,r,n=r){e.addEventListener(t,()=>Da(r));const i=e[ms];i?e[ms]=()=>{i(),n(!0)}:e[ms]=()=>n(!0),ef()}function tf(e){xe===null&&(Oe===null&&ib(e),nb()),tn&&rb(e)}function Yb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function sr(e,t){var r=xe;r!==null&&(r.f&8192)!==0&&(e|=al);var n={ctx:Ve,deps:null,nodes:null,f:e|nr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Se?.register_created_effect(n);var i=n;if((e&4)!==0)xi!==null?xi.push(n):Ti.ensure().schedule(n);else if(t!==null){try{Di(n)}catch(a){throw vt(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=fs))}if(i!==null&&(i.parent=r,r!==null&&Yb(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var s=Oe;(s.effects??=[]).push(i)}return n}function Ol(){return Oe!==null&&!_r}function Pa(e){const t=sr(8,null);return at(t,rr),t.teardown=e,t}function ge(e){tf("$effect");var t=xe.f;if(!Oe&&(t&32)!==0&&Ve!==null&&!Ve.i){var r=Ve;(r.e??=[]).push(e)}else return rf(e)}function rf(e){return sr(4|Sd,e)}function Dl(e){return tf("$effect.pre"),sr(8|Sd,e)}function Es(e){Ti.ensure();const t=sr(64|wi,e);return()=>{vt(t)}}function Jb(e){Ti.ensure();const t=sr(64|wi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{vt(t),n(void 0)}):(vt(t),n(void 0))})}function $a(e){return sr(4,e)}function Qb(e){return sr(Jy|wi,e)}function Oi(e,t=0){return sr(8|t,e)}function J(e,t=[],r=[],n=[]){Ud(n,t,r,i=>{sr(8,()=>{e(...i.map(f))})})}function xs(e,t=0){var r=sr(16|t,e);return r}function nf(e,t=0){var r=sr(Ky|t,e);return r}function Rt(e){return sr(32|wi,e)}function sf(e){var t=e.teardown;if(t!==null){const r=tn,n=Oe;cf(!0),Lt(null);try{t.call(null)}finally{cf(r),Lt(n)}}}function Il(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Da(()=>{i.abort(wa)});var n=r.next;(r.f&64)!==0?r.parent=null:vt(r,t),r=n}}function Xb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&vt(t),t=r}}function vt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(af(e.nodes.start,e.nodes.end),r=!0),e.f|=kd,Il(e,t&&!r),As(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();sf(e),e.f^=kd,e.f|=Yy;var i=e.parent;i!==null&&i.first!==null&&of(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function af(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function of(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Gn(e,t,r=!0){var n=[];lf(e,n,!0);var i=()=>{r&&vt(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function lf(e,t,r){if((e.f&8192)===0){e.f^=al;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;lf(i,t,a?r:!1)}i=s}}}function Ma(e){uf(e,!0)}function uf(e,t){if((e.f&8192)!==0){e.f^=al,(e.f&1024)===0&&(at(e,nr),Ti.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;uf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Pl(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:br(r);t.append(r),r=i}}var e_=null,Fa=!1,tn=!1;function cf(e){tn=e}var Oe=null,_r=!1;function Lt(e){Oe=e}var xe=null;function ar(e){xe=e}var zr=null;function df(e){Oe!==null&&(!Ht||(Oe.f&2)!==0)&&(zr??=new Set).add(e)}var zt=null,Kt=0,or=null;function t_(e){or=e}var ff=1,Kn=0,rn=Kn;function hf(e){rn=e}function pf(){return++ff}function Ts(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~ps),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ts(s)&&Bd(s),s.wv>e.wv)return!0}(t&512)!==0&&Ct===null&&at(e,rr)}return!1}function mf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Ht&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?mf(s,t,!1):t===s&&(r?at(s,nr):(s.f&1024)!==0&&at(s,Zn),wl(s))}}function vf(e){var t=zt,r=Kt,n=or,i=Oe,s=zr,a=Ve,o=_r,l=rn,c=e.f;zt=null,Kt=0,or=null,Oe=(c&96)===0?e:null,zr=null,Si(e.ctx),_r=!1,rn=++Kn,e.ac!==null&&(Da(()=>{e.ac.abort(wa)}),e.ac=null);try{e.f|=Ed;var d=e.fn,u=d();e.f|=ol;var p=e.deps,h=Se?.is_fork;if(zt!==null){var g;if(h||As(e,Kt),p!==null&&Kt>0)for(p.length=Kt+zt.length,g=0;g<zt.length;g++)p[Kt+g]=zt[g];else e.deps=p=zt;if(Ol()&&(e.f&512)!==0)for(g=Kt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Kt<p.length&&(As(e,Kt),p.length=Kt);if(bs()&&or!==null&&!_r&&p!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)mf(or[g],e);if(i!==null&&i!==e){if(Kn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Kn;if(t!==null)for(const m of t)m.rv=Kn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=_a),u}catch(m){return $d(m)}finally{e.f^=Ed,zt=t,Kt=r,or=n,Oe=i,zr=s,Si(a),_r=o,rn=l}}function r_(e,t){let r=t.reactions;if(r!==null){var n=Zy.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(zt===null||!va.call(zt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~ps),s.v!==ut&&gl(s),Ub(s),As(s,0)}}function As(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)r_(e,r[n])}function Di(e){var t=e.f;if((t&16384)===0){at(e,rr);var r=xe,n=Fa;if(xe=e,Fa=!0,0)var i,s;try{(t&16777232)!==0?Xb(e):Il(e),sf(e);var a=vf(e);if(e.teardown=typeof a=="function"?a:null,e.wv=ff,0)for(var o of e.deps);}finally{Fa=n,xe=r}}}async function gf(){if(Ht)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function f(e){var t=(e.f&2)!==0;if(e_?.add(e),Oe!==null&&!_r&&!(xe!==null&&(xe.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Kn&&(e.rv=Kn,zt===null&&r!==null&&r[Kt]===e?Kt++:zt===null?zt=[e]:zt.push(e));else{Oe.deps??=[],va.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:va.call(n,Oe)||n.push(Oe)}}if(0){if(!_r&&Lb&&!Lb.warned&&(Lb.effect.f&2097152)===0&&!Lb.effect_deps.has(e))var i;if(wF&&!_r&&xF!==null&&Oe!==null&&xF.reaction===Oe&&!e.trace){if(i)var s,a}}if(tn&&Hn.has(e))return Hn.get(e);if(t){var o=e;if(tn){var l=o.v;return((o.f&1024)===0&&o.reactions!==null||bf(o))&&(l=El(o)),Hn.set(o,l),l}var c=(o.f&512)===0&&!_r&&Oe!==null&&(Fa||(Oe.f&512)!==0),d=(o.f&ol)===0;Ts(o)&&(c&&(o.f|=512),Bd(o)),c&&!d&&(jd(o),yf(o))}if(Ct?.has(e))return Ct.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function yf(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(jd(t),yf(t))}function bf(e){if(e.v===ut)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&bf(t))return!0;return!1}function Le(e){var t=_r;try{return _r=!0,e()}finally{_r=t}}function n_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)$l(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&$l(r)}}}function $l(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{$l(e[n],t)}catch{}const r=ba(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=yd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Cs=Symbol("events"),_f=new Set,Ml=new Set;function Fl(e,t,r,n={}){function i(s){if(n.capture||Nl.call(t,s),!s.cancelBubble)return Da(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ir(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function gt(e,t,r,n={}){var i=Fl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Na(e,t,r,n,i){var s={capture:n,passive:i},a=Fl(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pa(()=>{t.removeEventListener(e,a,s)})}function pt(e,t,r){(t[Cs]??={})[e]=r}function lr(e){for(var t=0;t<e.length;t++)_f.add(e[t]);for(var r of Ml)r(e)}var wf=null;function Nl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;wf=e;var a=0,o=wf===e&&e[Cs];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[Cs]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(a=l)}if(s=i[a]||e.target,s!==t){kn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Oe,u=xe;Lt(null),ar(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Cs]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?h.push(m):p=m}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(p){for(let m of h)queueMicrotask(()=>{throw m});throw p}}finally{e[Cs]=t,delete e.currentTarget,Lt(d),ar(u)}}}var i_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function kf(e){return i_?.createHTML(e)??e}function s_(e){var t=Ca("template");return t.innerHTML=kf(e.replaceAll("<!>","<!---->")),t.content}function wr(e,t){var r=xe;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return wr(Ce,null),Ce;i===void 0&&(i=s_(s?e:"<!>"+e),r||(i=Gt(i)));var a=n||Tl?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Gt(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function qt(e=""){if(!_e){var t=Nt(e+"");return wr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Nt()),ht(r)):Oa(r),wr(r,r),r}function Q(){if(_e)return wr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Nt();return e.append(t,r),wr(t,r),e}function E(e,t){if(_e){var r=xe;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Ce),en();return}e!==null&&e.before(t)}function mt(){if(_e&&Ce&&Ce.nodeType===8&&Ce.textContent?.startsWith("$")){const e=Ce.textContent.substring(1);return en(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var a_=/\r/g;function o_(e){e=e.replace(a_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function l_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var u_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function c_(e){return u_.includes(e)}var d_=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],f_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function h_(e){return e=e.toLowerCase(),f_[e]??e}var qF=[...d_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],p_=["touchstart","touchmove"];function m_(e){return p_.includes(e)}var v_=["$state","$state.raw","$derived","$derived.by"],UF=[...v_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function g_(e){return e?.replace(/\//g,"/​")}var Sf=!0;function K(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[dl]??=e.nodeValue)&&(e[dl]=r,e.nodeValue=`${r}`)}function Ef(e,t){return xf(e,t)}function y_(e,t){Al(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Ce;try{for(var s=Gt(r);s&&(s.nodeType!==8||s.data!=="[");)s=br(s);if(!s)throw jn;bt(!0),ht(s);const a=xf(e,{...t,anchor:s});return bt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
11
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==jn&&console.warn("Failed to hydrate: ",a),t.recover===!1&&ab(),Al(),Cl(r),bt(!1),Ef(e,t)}finally{bt(n),ht(i)}}var Ra=new Map;function xf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:o}){Al();var l=void 0,c=Jb(()=>{var d=r??t.appendChild(Nt());Fb(d,{pending:()=>{}},h=>{ee({});var g=Ve;if(s&&(g.c=s),i&&(n.$$events=i),_e&&wr(h,null),Sf=a,l=e(h,n)||{},Sf=!0,_e&&(xe.nodes.end=Ce,Ce===null||Ce.nodeType!==8||Ce.data!=="]"))throw gs(),jn;te()},o);var u=new Set,p=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!u.has(m)){u.add(m);var v=m_(m);for(const x of[t,document]){var y=Ra.get(x);y===void 0&&(y=new Map,Ra.set(x,y));var k=y.get(m);k===void 0?(x.addEventListener(m,Nl,{passive:v}),y.set(m,1)):y.set(m,k+1)}}}};return p(ga(_f)),Ml.add(p),()=>{for(var h of u)for(const v of[t,document]){var g=Ra.get(v),m=g.get(h);--m==0?(v.removeEventListener(h,Nl),g.delete(h),g.size===0&&Ra.delete(v)):g.set(h,m)}Ml.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return Rl.set(l,c),l}var Rl=new WeakMap;function b_(e,t){const r=Rl.get(e);return r?(Rl.delete(e),r(t)):Promise.resolve()}var Ll=class{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#s=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)Ma(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Ma(n.effect),this.#t.set(t,n.effect),this.#r.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const a=this.#r.get(s);a&&(vt(a.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var o=document.createDocumentFragment();Pl(s,o),o.append(Nt()),this.#r.set(i,{effect:s,fragment:o})}else vt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(s,a,!1)):a()}}};#o=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(vt(n.effect),this.#r.delete(r))};ensure(e,t){var r=Se,n=Qd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Nt();i.append(s),this.#r.set(e,{effect:Rt(()=>t(s)),fragment:i})}else this.#t.set(e,Rt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[a,o]of this.#t)a===e?r.unskip_effect(o):r.skip_effect(o);for(const[a,o]of this.#r)a===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#s),r.ondiscard(this.#o)}else _e&&(this.anchor=Ce),this.#s(r)}};function we(e,t,...r){var n=new Ll(e);xs(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},fs)}if(0)var _N;function nn(e){Ve===null&&Td("onMount"),ki&&Ve.l!==null?__(Ve).m.push(e):ge(()=>{const t=Le(e);if(typeof t=="function")return t})}function __(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function w_(){return Symbol(jy)}function le(e,t,r=!1){var n;_e&&(n=Ce,en());var i=new Ll(e),s=r?fs:0;function a(o,l){if(_e){var c=hl(n);if(o!==parseInt(c.substring(1))){var d=ys();ht(d),i.anchor=d,bt(!1),i.ensure(o,l),bt(!0);return}}i.ensure(o,l)}xs(()=>{var o=!1;t((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}function sn(e,t){return t}function k_(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let u=t[o];Gn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;zl(e,ga(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var c=r,d=c.parentNode;Cl(d),d.append(c),e.items.clear()}zl(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function zl(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const o of a)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=hs,Pl(s,document.createDocumentFragment())):vt(t[i],r)}}var Tf;function Fe(e,t,r,n,i,s=null){var a=e,o=new Map;if((t&4)!==0){var l=e;a=_e?ht(Gt(l)):l.appendChild(Nt())}_e&&en();var c=null,d=Sl(()=>{var y=r();return ma(y)?y:y==null?[]:ga(y)}),u,p=new Map,h=!0;function g(y){(v.effect.f&16384)===0&&(v.pending.delete(y),v.fallback=c,S_(v,u,a,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Ma(c):(c.f^=hs,Ds(c,null,a)):Gn(c,()=>{c=null})))}function m(y){v.pending.delete(y)}var v={effect:xs(()=>{u=f(d);var y=u.length;let k=!1;_e&&hl(a)==="[!"!=(y===0)&&(a=ys(),ht(a),bt(!1),k=!0);for(var x=new Set,T=Se,S=Qd(),O=0;O<y;O+=1){_e&&Ce.nodeType===8&&Ce.data==="]"&&(a=Ce,k=!0,bt(!1));var P=u[O],R=n(P,O);if(0)var j;var N=h?null:o.get(R);N?(N.v&&Ci(N.v,P),N.i&&Ci(N.i,O),S&&T.unskip_effect(N.e)):(N=E_(o,h?a:Tf??=Nt(),P,R,O,i,t,r),h||(N.e.f|=hs),o.set(R,N)),x.add(R)}if(y===0&&s&&!c&&(h?c=Rt(()=>s(a)):(c=Rt(()=>s(Tf??=Nt())),c.f|=hs)),y>x.size&&Ad("","",""),_e&&y>0&&ht(ys()),!h)if(p.set(T,x),S){for(const[B,U]of o)x.has(B)||T.skip_effect(U.e);T.oncommit(g),T.ondiscard(m)}else g(T);k&&bt(!0),f(d)}),flags:t,items:o,pending:p,outrogroups:null,fallback:c};h=!1,_e&&(a=Ce)}function Os(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function S_(e,t,r,n,i){var s=(n&8)!==0,a=t.length,o=e.items,l=Os(e.effect.first),c,d=null,u,p=[],h=[],g,m,v,y;if(s)for(y=0;y<a;y+=1)g=t[y],m=i(g,y),v=o.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(y=0;y<a;y+=1){if(g=t[y],m=i(g,y),v=o.get(m).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(v),N.done.delete(v);if((v.f&8192)!==0&&(Ma(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=hs,v===l)Ds(v,null,r);else{var k=d?d.next:l;v===e.effect.last&&(e.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),xn(e,d,v),xn(e,v,k),Ds(v,k,r),d=v,p=[],h=[],l=Os(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(p.length<h.length){var x=h[0],T;d=x.prev;var S=p[0],O=p[p.length-1];for(T=0;T<p.length;T+=1)Ds(p[T],x,r);for(T=0;T<h.length;T+=1)c.delete(h[T]);xn(e,S.prev,O.next),xn(e,d,S),xn(e,O,x),l=x,d=O,y-=1,p=[],h=[]}else c.delete(v),Ds(v,l,r),xn(e,v.prev,v.next),xn(e,v,d===null?e.effect.first:d.next),xn(e,d,v),d=v;continue}for(p=[],h=[];l!==null&&l!==v;)(c??=new Set).add(l),h.push(l),l=Os(l.next);if(l===null)continue}(v.f&33554432)===0&&p.push(v),d=v,l=Os(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(zl(e,ga(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var P=[];if(c!==void 0)for(v of c)(v.f&8192)===0&&P.push(v);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&P.push(l),l=Os(l.next);var R=P.length;if(R>0){var j=(n&4)!==0&&a===0?r:null;if(s){for(y=0;y<R;y+=1)P[y].nodes?.a?.measure();for(y=0;y<R;y+=1)P[y].nodes?.a?.fix()}k_(e,P,j)}}s&&ir(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function E_(e,t,r,n,i,s,a,o){var l=(a&1)!==0?(a&16)===0?Zd(r,!1,!1):En(r):null,c=(a&2)!==0?En(i):null;return{v:l,i:c,e:Rt(()=>(s(t,l??r,c??i,o),()=>{e.delete(n)}))}}function Ds(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=br(n);if(s.before(n),n===i)return;n=a}}function xn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function VF(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const s=t(e[i],i);if(r.has(s)){const a=String(r.get(s)),o=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Ad(a,o,l)}r.set(s,i)}}function BF(e,t,r){if(!t||t===o_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:ml?.[il]&&(n=`in ${ml[il]}`),mb(g_(n))}function Af(e,t,r=!1,n=!1,i=!1,s=!1){var a=e,o="";if(r){var l=e;_e&&(a=ht(Gt(l)))}J(()=>{var c=xe;if(o===(o=t()??"")){_e&&en();return}if(r&&!_e){c.nodes=null,l.innerHTML=o,o!==""&&wr(Gt(l),l.lastChild);return}if(c.nodes!==null&&(af(c.nodes.start,c.nodes.end),c.nodes=null),o!==""){if(_e){for(var d=Ce.data,u=en(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=br(u);if(u===null)throw gs(),jn;wr(Ce,p),a=ht(u);return}var h=Ca(n?"svg":i?"math":"template",n?Vy:i?By:void 0);h.innerHTML=o;var g=n||i?h:h.content;if(wr(Gt(g),g.lastChild),n||i)for(;Gt(g);)a.before(Gt(g));else a.before(g)}})}function x_(e,t,r,n,i){_e&&en();var s=t.$$slots?.[r],a=!1;s===!0&&(s=t[r==="default"?"children":r],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>n:n)}function Pe(e,t,r){var n;_e&&(n=Ce,en());var i=new Ll(e);xs(()=>{var s=t()??null;if(_e&&hl(n)==="["!=(s!==null)){var a=ys();ht(a),i.anchor=a,bt(!1),i.ensure(s,s&&(o=>r(o,s))),bt(!0);return}i.ensure(s,s&&(o=>r(o,s)))},fs)}function T_(e,t){var r=void 0,n;nf(()=>{r!==(r=t())&&(n&&(vt(n),n=null),r&&(n=Rt(()=>{$a(()=>r(e))})))})}function Cf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function La(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cf(e))&&(n&&(n+=" "),n+=t);return n}function ur(e){return typeof e=="object"?La(e):e??""}var Of=[...`
12
- \r\f \v\uFEFF`];function A_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Of.includes(n[a-1]))&&(o===n.length||Of.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function Df(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function ql(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function C_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(ql)),i&&l.push(...Object.keys(i).map(ql));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(o?p==="/"&&e[u-1]==="*"&&(o=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?s=p:p==="("?a++:p===")"&&a--,!o&&s===!1&&a===0){if(p===":"&&d===-1)d=u;else if(p===";"||u===m-1){if(d!==-1){var h=ql(e.substring(c,d).trim());if(!l.includes(h)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=Df(n)),i&&(r+=Df(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function St(e,t,r,n,i,s){var a=e[ul];if(_e||a!==r||a===void 0){var o=A_(r,n,s);(!_e||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[ul]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function Ul(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function O_(e,t,r,n){var i=e[cl];if(_e||i!==t){var s=C_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[cl]=t}else n&&(Array.isArray(n)?(Ul(e,r?.[0],n[0]),Ul(e,r?.[1],n[1],"important")):Ul(e,r,n));return n}function za(e,t,r=!1){if(e.multiple){if(t==null)return;if(!ma(t))return vb();for(var n of e.options)n.selected=t.includes(Is(n));return}for(n of e.options)if(Gd(Is(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function If(e){var t=new MutationObserver(()=>{za(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pa(()=>{t.disconnect()})}function D_(e,t,r=t){var n=new WeakSet,i=!0;Ia(e,"change",s=>{var a=s?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Is);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Is(l)}r(o),e.__value=o,Se!==null&&n.add(Se)}),$a(()=>{var s=t();if(e===document.activeElement){var a=Ht?_s:Se;if(n.has(a))return}if(za(e,s,i),i&&s===void 0){var o=e.querySelector(":checked");o!==null&&(s=Is(o),r(s))}e.__value=s,i=!1}),If(e)}function Is(e){return"__value"in e?e.__value:e.value}var Ps=Symbol("class"),$s=Symbol("style"),Pf=Symbol("is custom element"),$f=Symbol("is html"),I_=vs?"link":"LINK",Mf=vs?"input":"INPUT",P_=vs?"option":"OPTION",$_=vs?"select":"SELECT",M_=vs?"progress":"PROGRESS";function Ms(e){if(_e){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ve(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;ve(e,"checked",null),e.checked=i}}};e[ms]=r,ir(r),ef()}}function Vl(e,t){var r=qa(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==M_)||(e.value=t??"")}function F_(e,t){var r=qa(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Ff(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ve(e,t,r,n){var i=qa(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===I_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Qy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&jl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Yn(e,t,r){var n=Oe,i=xe;let s=_e;_e&&bt(!1),Lt(null),ar(null);try{t!=="style"&&(Bl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?jl(e).includes(t):r&&typeof r=="object")?e[t]=r:ve(e,t,r==null?r:String(r))}finally{Lt(n),ar(i),s&&bt(!0)}}function N_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===Mf){var a=e;(a.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ms(a)}var o=qa(e),l=o[Pf],c=!o[$f];let d=_e&&l;d&&bt(!1);var u=t||{},p=e.nodeName===P_;for(var h in t)h in r||(r[h]=null);r.class?r.class=ur(r.class):(n||r[Ps])&&(r.class=null),r[$s]&&(r.style??=null);var g=jl(e);if(e.nodeName===Mf&&"type"in r&&("value"in r||"__value"in r)){var m=r.type;(m!==u.type||m===void 0&&e.hasAttribute("type"))&&(u.type=m,ve(e,"type",m,s))}for(const O in r){let P=r[O];if(p&&O==="value"&&P==null){e.value=e.__value="",u[O]=P;continue}if(O==="class"){St(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",P,n,t?.[Ps],r[Ps]),u[O]=P,u[Ps]=r[Ps];continue}if(O==="style"){O_(e,P,t?.[$s],r[$s]),u[O]=P,u[$s]=r[$s];continue}var v=u[O];if(!(P===v&&!(P===void 0&&e.hasAttribute(O)))){u[O]=P;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const R={},j="$$"+O;let N=O.slice(2);var k=c_(N);if(l_(N)&&(N=N.slice(0,-7),R.capture=!0),!k&&v){if(P!=null)continue;e.removeEventListener(N,u[j],R),u[j]=null}if(k)pt(N,e,P),lr([N]);else if(P!=null){let B=function(U){u[O].call(this,U)};var S=B;u[j]=Fl(N,e,B,R)}}else if(O==="style")ve(e,O,P);else if(O==="autofocus")Gb(e,!!P);else if(!l&&(O==="__value"||O==="value"&&P!=null))e.value=e.__value=P;else if(O==="selected"&&p)Ff(e,P);else{var x=O;c||(x=h_(x));var T=x==="defaultValue"||x==="defaultChecked";if(P==null&&!l&&!T)if(o[O]=null,x==="value"||x==="checked"){let R=e;const j=t===void 0;if(x==="value"){let N=R.defaultValue;R.removeAttribute(x),R.defaultValue=N,R.value=R.__value=j?N:null}else{let N=R.defaultChecked;R.removeAttribute(x),R.defaultChecked=N,R.checked=j?N:!1}}else e.removeAttribute(O);else T||g.includes(x)&&(l||typeof P!="string")?(e[x]=P,x in o&&(o[x]=ut)):typeof P!="function"&&ve(e,x,P,s)}}}return d&&bt(!0),u}function ze(e,t,r=[],n=[],i=[],s,a=!1,o=!1){Ud(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===$_,p=!1;if(nf(()=>{var g=t(...l.map(f)),m=N_(e,c,g,s,a,o);p&&u&&"value"in g&&za(e,g.value);for(let y of Object.getOwnPropertySymbols(d))g[y]||vt(d[y]);for(let y of Object.getOwnPropertySymbols(g)){var v=g[y];y.description==="@attach"&&(!c||v!==c[y])&&(d[y]&&vt(d[y]),d[y]=Rt(()=>T_(e,()=>v))),m[y]=v}c=m}),u){var h=e;$a(()=>{za(h,c.value,!0),If(h)})}p=!0})}function qa(e){return e[xd]??={[Pf]:e.nodeName.includes("-"),[$f]:e.namespaceURI===Uy}}var Bl=new Map;function jl(e){var t=e.getAttribute("is")||e.nodeName,r=Bl.get(t);if(r)return r;Bl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=yd(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=ba(i)}return r}function jF(e,t,r){}function Zl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Nf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function R_(e,t){var r=Nf(e.srcset),n=Nf(t);return n.length===r.length&&n.every(([i,s],a)=>s===r[a][1]&&(Zl(r[a][0],i)||Zl(i,r[a][0])))}var Wl=null;function L_(){if(Wl===null){var e=Ca("select");e.innerHTML=kf("<option><span>t</span></option>"),Wl=e.firstChild?.firstChild?.nodeType===1}return Wl}function z_(e,t){var r=_e;L_()||(bt(!1),e.textContent="",e.append(Hb("")));try{t()}finally{r&&(_e?I(e):(bt(!0),ht(e)))}}function Ua(e,t,r=t){var n=new WeakSet;Ia(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Gl(e)?Kl(s):s,r(s),Se!==null&&n.add(Se),await gf(),s!==(s=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=s??"",o!==null){var c=e.value.length;a===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(o,c))}}}),(_e&&e.defaultValue!==e.value||Le(t)==null&&e.value)&&(r(Gl(e)?Kl(e.value):e.value),Se!==null&&n.add(Se)),Oi(()=>{var i=t();if(e===document.activeElement){var s=Ht?_s:Se;if(n.has(s))return}Gl(e)&&i===Kl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Hl=new Set;function q_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",a=e;let o=!1;if(t!==null)for(var l of t)a=a[l]??=[];a.push(r),Ia(r,"change",()=>{var c=r.__value;s&&(c=Rf(a,c,r.checked)),i(c)},()=>i(s?[]:null)),Oi(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){o=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Gd(r.__value,c)}),Pa(()=>{var c=a.indexOf(r);c!==-1&&a.splice(c,1)}),Hl.has(a)||(Hl.add(a),ir(()=>{a.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Hl.delete(a)})),ir(()=>{if(o){var c;s?c=Rf(a,c,r.checked):c=a.find(d=>d.checked)?.__value,i(c)}})}function U_(e,t,r=t){Ia(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Le(t)==null)&&r(e.checked),Oi(()=>{var n=t();e.checked=!!n})}function Rf(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Gl(e){var t=e.type;return t==="number"||t==="range"}function Kl(e){return e===""?null:+e}function Yl(e,t){return e===t||e?.[Nr]===t}function Jl(e={},t,r,n){var i=Ve.r,s=xe;return $a(()=>{var a,o;return Oi(()=>{a=o,o=n?.()||[],Le(()=>{Yl(r(...o),e)||(t(e,...o),a&&Yl(r(...a),e)&&t(null,...a))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Yl(r(...o),e)&&t(null,...o)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Ql(e=!1){const t=Ve,r=t.l.u;if(!r)return;let n=()=>n_(t.s);if(e){let i=0,s={};const a=Ai(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],o=!0);return o&&i++,i});n=()=>f(a)}r.b.length&&Dl(()=>{Lf(t,n),sl(r.b)}),ge(()=>{const i=Le(()=>r.m.map(Hy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ge(()=>{Lf(t,n),sl(r.a)})}function Lf(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}var V_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function We(e,t,r){return new Proxy({props:e,exclude:t},V_)}var B_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ds(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];ds(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ds(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===ll)return!1;for(let r of e.props)if(ds(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(ds(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function Tn(...e){return new Proxy({props:e},B_)}function _(e,t,r,n){var i=!ki||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=n,l=!0,c=void 0,d=()=>a&&i?(c??=Ai(n),f(c)):(l&&(l=!1,o=a?Le(n):n),o);let u;if(s){var p=Nr in e||ll in e;u=Fr(e,t)?.set??(p&&t in e?T=>e[t]=T:void 0)}var h,g=!1;s?[h,g]=Ib(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=d(),u&&(i&&ob(t),u(h)));var m;if(i?m=()=>{var T=e[t];return T===void 0?d():(l=!0,T)}:m=()=>{var T=e[t];return T!==void 0&&(o=void 0),T===void 0?o:T},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(T,S){return arguments.length>0?((!i||!S||v||g)&&u(S?m():T),T):m()})}var y=!1,k=((r&1)!==0?Ai:Sl)(()=>(y=!1,m()));s&&f(k);var x=xe;return(function(T,S){if(arguments.length>0){const O=S?f(k):i&&s?Me(T):T;return M(k,O),y=!0,o!==void 0&&(o=O),T}return tn&&y||(x.f&16384)!==0?k.v:f(k)})}function j_(e){return new Z_(e)}var Z_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var a=Zd(s,!1,!1);return t.set(i,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return f(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===ll?!0:(f(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return M(t.get(s)??r(s,a),a),Reflect.set(i,s,a)}});this.#t=(e.hydrate?y_:Ef)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Ht&&(!e?.props?.$$host||e.sync===!1)&&b(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||kn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{b_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},zf;typeof HTMLElement=="function"&&(zf=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=Ca("slot");i!=="default"&&(a.name=i),E(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=W_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Va(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=j_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Es(()=>{Oi(()=>{this.$$r=!0;for(const i of ya(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Va(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Va(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return ya(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Va(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function W_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function re(e,t,r,n,i,s){let a=class extends zf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ya(t).map(o=>(t[o].attribute||o).toLowerCase())}};return ya(t).forEach(o=>{kn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Va(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Fr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{kn(a.prototype,o,{get(){return this.$$c?.[o]}})}),s&&(a=s(a)),e.element=a,a}var qf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:K_,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:Y_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},H_={...qf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function G_(e){return e==="angular"?qf:H_}function K_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function Y_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function J_(e){return new Promise(t=>setTimeout(t,e))}function Uf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Q_(e){return typeof e=="boolean"}function Xl(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,a=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(a,s)}catch(o){n(o)}};a()})}var eu=Array.isArray,Vf=e=>!!e&&e.constructor===Object,X_=e=>typeof e=="string"||e instanceof String,ew=e=>{try{return Number(e)===e}catch{return!1}},tw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Bf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function qr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var rw=(e,t,r=!1)=>{if(!e)return[];const n=(s,a)=>t(s)-t(a),i=(s,a)=>t(a)-t(s);return e.slice().sort(r===!0?i:n)};function nw(e,t){const r=t??(n=>n);return Bf(e,(n,i)=>r(n)>r(i)?n:i)}function tu(e,t){const r=t??(n=>n);return Bf(e,(n,i)=>r(n)<r(i)?n:i)}var iw=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},jf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},sw=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},Et=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Vf(e[n])?Et(e[n],i):i}),{}),Zf=class{#e={uid:"",client:"",accessToken:"",expiry:0};constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.#e.uid!==""}isLoggedIn(){return!!(this.#e.uid&&Uf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Uf(this.#e.uid))}signOut(){this.#e.uid="",this.#e.client="",this.#e.accessToken="",this.#e.expiry=0,this.save()}signIn(e){this.#e.uid=e.uid,this.#e.client=e.client,this.#e.accessToken=e.accessToken,this.#e.expiry=e.expiry,this.save()}get data(){return this.#e.expiry<Math.floor(Date.now()/1e3)&&this.signOut(),this.#e}toString(){return JSON.stringify(this.#e)}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const t=JSON.parse(e);if(!(Vf(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(t)}},aw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Wf;function G(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=a.prototype,d=Object.keys(c);for(let u=0;u<d.length;u++){const p=d[u];p in o||(o[p]=c[p].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function a(o){var l;const c=r?.Parent?new s:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Ii=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Hf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Wf=globalThis).__zod_globalConfig??(Wf.__zod_globalConfig={});var Ba=globalThis.__zod_globalConfig;function Jn(e){return e&&Object.assign(Ba,e),Ba}function Gf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function ru(e,t){return typeof t=="bigint"?t.toString():t}function nu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function iu(e){return e==null}function su(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ow(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var Kf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Kf)return n===void 0&&(n=Kf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Qn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function An(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Yf(e){return JSON.stringify(e)}function lw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Jf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ja(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var uw=nu(()=>{if(Ba.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Fs(e){if(ja(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ja(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Qf(e){return Fs(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var cw=new Set(["string","number","symbol"]);function Za(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function dw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var fw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function hw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Cn(e,An(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Qn(this,"shape",i),i},checks:[]}))}function pw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return Cn(e,An(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Qn(this,"shape",i),i},checks:[]}))}function mw(e,t){if(!Fs(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Cn(e,An(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Qn(this,"shape",n),n}}))}function vw(e,t){if(!Fs(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Cn(e,An(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Qn(this,"shape",r),r}}))}function gw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return Cn(e,An(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Qn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function yw(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return Cn(t,An(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:i[a]}):i[a])}else for(const a in i)s[a]=e?new e({type:"optional",innerType:i[a]}):i[a];return Qn(this,"shape",s),s},checks:[]}))}function bw(e,t,r){return Cn(t,An(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Qn(this,"shape",i),i}}))}function Pi(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function _w(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Xf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Wa(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Wa(e.inst?._zod.def?.error?.(e))??Wa(t?.error?.(e))??Wa(r.customError?.(e))??Wa(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:a,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=a),o}function au(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ns(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var eh=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ru,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},th=G("$ZodError",eh),rh=G("$ZodError",eh,{Parent:Error});function ww(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function kw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o},[...s,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...s,...a.path]);else{const o=[...s,...a.path];if(o.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<o.length;){const d=o[c];c!==o.length-1?l[d]=l[d]||{_errors:[]}:(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(a))),l=l[d],c++}}}};return n(e),r}var ou=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Ii;if(a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Xn(l,s,Jn())));throw Jf(o,i?.callee),o}return a.value},lu=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Xn(l,s,Jn())));throw Jf(o,i?.callee),o}return a.value},Ha=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ii;return s.issues.length?{success:!1,error:new(e??th)(s.issues.map(a=>Xn(a,i,Jn())))}:{success:!0,data:s.value}},Sw=Ha(rh),Ga=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Xn(a,i,Jn())))}:{success:!0,data:s.value}},Ew=Ga(rh),xw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},Tw=e=>(t,r,n)=>ou(e)(t,r,n),Aw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return lu(e)(t,r,i)},Cw=e=>async(t,r,n)=>lu(e)(t,r,n),Ow=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ha(e)(t,r,i)},Dw=e=>(t,r,n)=>Ha(e)(t,r,n),Iw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ga(e)(t,r,i)},Pw=e=>async(t,r,n)=>Ga(e)(t,r,n),$w=/^[cC][0-9a-z]{6,}$/,Mw=/^[0-9a-z]+$/,Fw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Nw=/^[0-9a-vA-V]{20}$/,Rw=/^[A-Za-z0-9]{27}$/,Lw=/^[a-zA-Z0-9_-]{21}$/,zw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,nh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Uw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bw(){return new RegExp(Vw,"u")}var jw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ww=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Hw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Gw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ih=/^[A-Za-z0-9_-]*$/,Kw=/^https?$/,Yw=/^\+[1-9]\d{6,14}$/,sh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Jw=new RegExp(`^${sh}$`);function ah(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Qw(e){return new RegExp(`^${ah(e)}$`)}function Xw(e){const t=ah({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${sh}T(?:${n})$`)}var e0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},t0=/^-?\d+$/,r0=/^-?\d+(?:\.\d+)?$/,n0=/^[^A-Z]*$/,i0=/^[^a-z]*$/,Ut=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),oh={number:"number",bigint:"bigint",object:"date"},lh=G("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=oh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uh=G("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=oh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),s0=G("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ow(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),a0=G("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=fw[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=i,o.maximum=s,r&&(o.pattern=t0)}),e._zod.check=a=>{const o=a.value;if(r){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),o0=G("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!iu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=au(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),l0=G("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!iu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=au(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),u0=G("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!iu(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const a=au(i),o=s>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ka=G("$ZodCheckStringFormat",(e,t)=>{var r,n;Ut.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),c0=G("$ZodCheckRegex",(e,t)=>{Ka.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),d0=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=n0),Ka.init(e,t)}),f0=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=i0),Ka.init(e,t)}),h0=G("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Za(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),p0=G("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Za(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),m0=G("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Za(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),v0=G("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),g0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
10
+ `)}}}function zF(e){const t=Db.get(e);t&&(kn(e,"message",{value:t.message}),kn(e,"stack",{value:t.stack}))}var Ib=~(nr|Zn|rr);function at(e,t){e.f=e.f&Ib|t}function yl(e){(e.f&512)!==0||e.deps===null?at(e,rr):at(e,Zn)}function Md(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=ps,Md(t.deps))}function Fd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Md(e.deps),at(e,rr)}var Pb=!1,Ea=!1;function $b(e){var t=Ea;try{return Ea=!1,[e(),Ea]}finally{Ea=t}}var xa=null,Ei=null,Ee=null,_s=null,Ot=null,bl=null,ws=!1,_l=!1,xi=null,Ta=null,Nd=0,qF=new Set,Mb=1,Ti=class dd{id=Mb++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#n=new Set;#i=new Set;#s=0;#o=new Map;#a=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){Ei===null?xa=Ei=this:(Ei.#r=this,this.#t=Ei),Ei=this}#m(){if(this.is_fork)return!0;for(const n of this.#o.keys()){for(var t=n,r=!1;t.parent!==null;){if(this.#h.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=this.#h.get(t);if(n){this.#h.delete(t);for(var i of n.d)at(i,nr),r(i);for(i of n.m)at(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Nd++>1e3&&(this.#b(),Fb());for(const l of this.#c)this.#d.delete(l),at(l,nr),this.schedule(l);for(const l of this.#d)at(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=xi=[],n=[],i=Ta=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw qd(l),this.#m()||this.discard(),c}if(Ee=null,i.length>0){var s=dd.ensure();for(const l of i)s.schedule(l)}if(xi=null,Ta=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)zd(l,c);i.length>0&&Ee.#v();return}const a=this.#w();if(a){this.#g(n),this.#g(r),a.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),_s=this,Rd(n),Rd(r),_s=null,this.#a?.resolve();var o=Ee;if(this.#s===0&&(this.#l.length===0||o!==null)&&(this.#b(),Gt&&(this.#k(),Ee=o)),this.#l.length>0)if(o!==null){const l=o;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else o=this;o!==null&&o.#v()}#y(t,r,n){t.f^=rr;for(var i=t.first;i!==null;){var s=i.f,a=(s&96)!==0;if(!(a&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){a?i.f^=rr:(s&4)!==0?r.push(i):Gt&&(s&16777224)!==0?n.push(i):Ts(i)&&((s&16)!==0&&this.#d.add(i),Di(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#w(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=t.#t}return null}#_(t){for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const s=this.async_deriveds.get(n);s&&i.promise.then(s.resolve).catch(s.reject)}this.transfer_effects(t.#c,t.#d);const r=n=>{var i=n.reactions;if(i!==null)for(const o of i){var s=o.f;if((s&2)!==0)r(o);else{var a=o;s&4194320&&!this.async_deriveds.has(a)&&(this.#d.delete(a),at(a,nr),this.schedule(a))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),Ee=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Fd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==ut&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),Ot?.set(t,r)),this.is_fork||(t.v=r)}activate(){Ee=this}deactivate(){Ee=null,Ot=null}flush(){try{_l=!0,Ee=this,this.#v()}finally{Nd=0,bl=null,xi=null,Ta=null,_l=!1,Ee=null,Ot=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#a?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let f=xa;f!==null;f=f.#r){var t=f.id<this.id,r=[];for(const[u,[p,h]]of this.current){if(f.current.has(u)){var n=f.current.get(u)[0];if(t&&p!==n)f.current.set(u,[p,h]);else continue}r.push(u)}if(t)for(const[u,p]of this.async_deriveds){const h=f.async_deriveds.get(u);h&&p.promise.then(h.resolve).catch(h.reject)}if(f.#e){var i=[...f.current.keys()].filter(u=>!f.current.get(u)[1]&&!this.current.has(u));if(i.length===0)t&&f.discard();else if(r.length>0){if(t)for(const u of this.#p)f.unskip_effect(u,p=>{(p.f&4194320)!==0?f.schedule(p):f.#g([p])});f.activate();var s=new Set,a=new Map;for(var o of r)Ld(o,i,s,a);a=new Map;var l=[...f.current].filter(([u,p])=>{const h=this.current.get(u);return h?h[0]!==p[0]||h[1]!==p[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&wl(u,l,a)&&((u.f&4194320)!==0?(at(u,nr),f.schedule(u)):f.#c.add(u));if(f.#l.length>0&&!f.#f){f.apply();for(var c of f.#l)f.#y(c,[],[]);f.#l=[]}f.deactivate()}}}}increment(t,r){if(this.#s+=1,t){let n=this.#o.get(r)??0;this.#o.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#o.get(r)??0;n===1?this.#o.delete(r):this.#o.set(r,n-1)}this.#f||(this.#f=!0,ir(()=>{this.#f=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)this.#c.add(n);for(const n of r)this.#d.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#a??=wd()).promise}static ensure(){if(Ee===null){const t=Ee=new dd;!_l&&!ws&&ir(()=>{t.#e||t.flush()})}return Ee}apply(){if(!Gt||!this.is_fork&&this.#t===null&&this.#r===null){Ot=null;return}Ot=new Map;for(const[r,[n]]of this.current)Ot.set(r,n);for(let r=xa;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)Ot.has(n)||Ot.set(n,i)}}schedule(t){if(bl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(xi!==null&&r===Te&&(Gt||(Oe===null||(Oe.f&2)===0)&&!Pb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=rr}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?xa=r:t.#r=r,r===null?Ei=t:r.#t=t,this.linked=!1}}};function b(e){var t=ws;ws=!0;try{var r;for(e&&(Ee!==null&&!Ee.is_fork&&Ee.flush(),r=e());;){if(Ob(),Ee===null)return r;Ee.flush()}}finally{ws=t}}function Fb(){if(0){var e;for(const r of Ee.current.keys())for(const[n,i]of r.updated??[])var t}try{ob()}catch(r){Sn(r,bl)}}var Rr=null;function Rd(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Ts(n)&&(Rr=new Set,Di(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&of(n),Rr?.size>0)){Hn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Rr.has(a)&&(Rr.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&24576)===0&&Di(l)}}Rr.clear()}}Rr=null}}function Ld(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&2)!==0?Ld(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&wl(i,t,n)&&(at(i,nr),kl(i))}}function wl(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(ga.call(t,i))return!0;if((i.f&2)!==0&&wl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function kl(e){Ee.schedule(e)}function zd(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),at(e,rr);for(var r=e.first;r!==null;)zd(r,t),r=r.next}}function qd(e){at(e,rr);for(var t=e.first;t!==null;)qd(t),t=t.next}function Sl(e){let t=0,r=En(0),n;return()=>{Dl()&&(d(r),Oi(()=>(t===0&&(n=Le(()=>e(()=>Lr(r)))),t+=1,()=>{ir(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var Nb=fs|wi;function Rb(e,t,r,n){new Lb(e,t,r,n)}var Lb=class{parent;is_pending=!1;transform_error;#e;#t=_e?Ce:null;#r;#n;#i;#s=null;#o=null;#a=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=Sl(()=>(this.#f=En(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Te;s.b=this,s.f|=128,r(i)},this.parent=Te.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=xs(()=>{if(_e){const i=this.#t;tn();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));this.#y(a)}else s?this.#w():this.#v()}else this.#_()},Nb),_e&&(this.#e=Ce)}#v(){try{this.#s=Rt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#a=Rt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#o=Rt(()=>e(this.#e)),ir(()=>{var t=this.#l=document.createDocumentFragment(),r=Nt();t.append(r),this.#s=this.#k(()=>Rt(()=>this.#n(r))),this.#c===0&&(this.#e.before(t),this.#l=null,Gn(this.#o,()=>{this.#o=null}),this.#g(Ee))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#s=Rt(()=>{this.#n(this.#e)}),this.#c>0){var e=this.#l=document.createDocumentFragment();$l(this.#s,e);const t=this.#r.pending;this.#o=Rt(()=>t(this.#e))}else this.#g(Ee)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Fd(e,this.#h,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#k(e){var t=Te,r=Oe,n=Ve;ar(this.#i),Lt(this.#i),Si(this.#i.ctx);try{return Ti.ensure(),e()}catch(i){return $d(i),null}finally{ar(t),Lt(r),Si(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#c+=e,this.#c===0&&(this.#g(t),this.#o&&Gn(this.#o,()=>{this.#o=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(e,t){this.#b(e,t),this.#u+=e,!(!this.#f||this.#d)&&(this.#d=!0,ir(()=>{this.#d=!1,this.#f&&Ci(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),d(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;Ee?.is_fork?(this.#s&&Ee.skip_effect(this.#s),this.#o&&Ee.skip_effect(this.#o),this.#a&&Ee.skip_effect(this.#a),Ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(vt(this.#s),this.#s=null),this.#o&&(vt(this.#o),this.#o=null),this.#a&&(vt(this.#a),this.#a=null),_e&&(ht(this.#t),Ct(),ht(ys()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){bb();return}n=!0,i&&pb(),this.#a!==null&&Gn(this.#a,()=>{this.#a=null}),this.#k(()=>{this.#_()})},a=o=>{try{i=!0,t?.(o,s),i=!1}catch(l){Sn(l,this.#i&&this.#i.parent)}r&&(this.#a=this.#k(()=>{try{return Rt(()=>{var l=Te;l.b=this,l.f|=128,r(this.#e,()=>o,()=>s)})}catch(l){return Sn(l,this.#i.parent),null}}))};ir(()=>{var o;try{o=this.transform_error(e)}catch(l){Sn(l,this.#i&&this.#i.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>Sn(l,this.#i&&this.#i.parent)):a(o)})}};function Ud(e,t,r,n){const i=bs()?Ai:El;var s=e.filter(h=>!h.settled),a=t.map(i);if(r.length===0&&s.length===0){n(a);return}var o=Te,l=zb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function f(h){if((o.f&16384)===0){l();try{n([...a,...h])}catch(g){Sn(g,o)}Aa()}}var u=Vd();if(r.length===0){c.then(()=>f([])).finally(u);return}function p(){Promise.all(r.map(h=>Ub(h))).then(f).catch(h=>Sn(h,o)).finally(u)}c?c.then(()=>{l(),p(),Aa()}):p()}function zb(){var e=Te,t=Oe,r=Ve,n=Ee;if(0)var i;return function(a=!0){ar(e),Lt(t),Si(r),a&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function Aa(e=!0){ar(null),Lt(null),Si(null),e&&Ee?.deactivate()}function Vd(){var e=Te,t=e.b,r=Ee,n=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(n,e),()=>{t?.update_pending_count(-1,r),r.decrement(n,e)}}var qb=null;function UF(e){qb=e}var VF=new Set;function Ai(e){var t=2|nr;return Te!==null&&(Te.f|=wi),{ctx:Ve,deps:null,effects:null,equals:Cd,f:t,fn:e,reactions:null,rv:0,v:ut,wv:0,parent:Te,ac:null}}var Ca=Symbol("obsolete");function Ub(e,t,r){let n=Te;n===null&&nb();var i=void 0,s=En(ut),a=!Oe,o=new Set;return e_(()=>{var l=Te,c=wd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==ka&&c.reject(h)}).finally(Aa)}catch(h){c.reject(h),Aa()}var f=Ee;if(a){if((l.f&32768)!==0)var u=Vd();if(n.b?.is_rendered())f.async_deriveds.get(l)?.reject(Ca);else for(const h of o.values())h.reject(Ca);o.add(c),f.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),o.delete(c),g!==Ca&&(f.activate(),g?(s.f|=wa,Ci(s,g)):((s.f&8388608)!==0&&(s.f^=wa),Ci(s,h)),f.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),$a(()=>{for(const l of o)l.reject(Ca)}),new Promise(l=>{function c(f){function u(){f===i?l(s):c(i)}f.then(u,u)}c(i)})}function D(e){const t=Ai(e);return Gt||df(t),t}function El(e){const t=Ai(e);return t.equals=Od,t}function Vb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)vt(t[r])}}var BF=[];function xl(e){var t,r=Te,n=e.parent;if(!rn&&n!==null&&e.v!==ut&&(n.f&24576)!==0)return mb(),e.v;ar(n);try{e.f&=~ps,Vb(e),t=vf(e)}finally{ar(r)}return t}function Bd(e){var t=xl(e);if(!e.equals(t)&&(e.wv=pf(),(!Ee?.is_fork||e.deps===null)&&(Ee!==null?(Ee.capture(e,t,!0),_s?.capture(e,t,!0)):e.v=t,e.deps===null))){at(e,rr);return}rn||(Ot!==null?(Dl()||Ee?.is_fork)&&Ot.set(e,t):yl(e))}function Bb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ka),t.fn!==null&&(t.teardown=Re),t.ac=null,As(t,0),Pl(t))}function jd(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Di(t)}var ks=new Set,Hn=new Map;function jF(e){ks=e}var Tl=!1;function jb(){Tl=!0}function En(e,t){var r={f:0,v:e,reactions:null,equals:Cd,rv:0,wv:0};return r}function se(e,t){const r=En(e,t);return df(r),r}function Zd(e,t=!1,r=!0){const n=En(e);return t||(n.equals=Od),ki&&r&&Ve!==null&&Ve.l!==null&&(Ve.l.s??=[]).push(n),n}function M(e,t,r=!1){Oe!==null&&(!_r||(Oe.f&131072)!==0)&&bs()&&(Oe.f&4325394)!==0&&(zr===null||!zr.has(e))&&hb();let n=r?Pe(t):t;return Ci(e,n,Ta)}function Ci(e,t,r=null){if(!e.equals(t)){Hn.set(e,rn?t:e.v);var n=Ti.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&xl(i),Ot===null&&yl(i)}e.wv=pf(),Hd(e,nr,r),bs()&&Te!==null&&(Te.f&1024)!==0&&(Te.f&96)===0&&(or===null?n_([e]):or.push(e)),!n.is_fork&&ks.size>0&&!Tl&&Wd()}return t}function Wd(){Tl=!1;for(const e of ks){(e.f&1024)!==0&&at(e,Zn);let t;try{t=Ts(e)}catch{t=!0}t&&Di(e)}ks.clear()}function Lr(e){M(e,e.v+1)}function Hd(e,t,r){var n=e.reactions;if(n!==null)for(var i=bs(),s=n.length,a=0;a<s;a++){var o=n[a],l=o.f;if(!(!i&&o===Te)){var c=(l&nr)===0;if(c&&at(o,t),(l&131072)!==0)ks.add(o);else if((l&2)!==0){var f=o;Ot?.delete(f),(l&65536)===0&&(l&512&&(Te===null||(Te.f&2097152)===0)&&(o.f|=ps),Hd(f,Zn,r))}else if(c){var u=o;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):kl(u)}}}}var Zb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Pe(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=_a(e);if(t!==bd&&t!==Gy)return e;var r=new Map,n=va(e),i=se(0),s=null,a=nn,o=u=>{if(nn===a)return u();var p=Oe,h=nn;Lt(null),hf(a);var g=u();return Lt(p),hf(h),g};n&&r.set("length",se(e.length,s));var l="";let c=!1;function f(u){if(!c){c=!0,l=u,Dd(i,`${l} version`);for(const[p,h]of r)Dd(h,Wb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&db();var g=r.get(p);return g===void 0?o(()=>{var m=se(h.value,s);return r.set(p,m),m}):M(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=o(()=>se(ut,s));r.set(p,g),Lr(i)}}else M(h,ut),Lr(i);return!0},get(u,p,h){if(p===Nr)return e;var g=r.get(p),m=p in u;if(g===void 0&&(!m||Fr(u,p)?.writable)&&(g=o(()=>{var y=se(Pe(m?u[p]:ut),s);return y}),r.set(p,g)),g!==void 0){var v=d(g);return v===ut?void 0:v}return Reflect.get(u,p,h)},getOwnPropertyDescriptor(u,p){var h=Reflect.getOwnPropertyDescriptor(u,p);if(h&&"value"in h){var g=r.get(p);g&&(h.value=d(g))}else if(h===void 0){var m=r.get(p),v=m?.v;if(m!==void 0&&v!==ut)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,p){if(p===Nr)return!0;var h=r.get(p),g=h!==void 0&&h.v!==ut||Reflect.has(u,p);return(h!==void 0||Te!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=o(()=>{var m=se(g?Pe(u[p]):ut,s);return m}),r.set(p,h)),d(h)===ut)?!1:g},set(u,p,h,g){var m=r.get(p),v=p in u;if(n&&p==="length")for(var y=h;y<m.v;y+=1){var x=r.get(y+"");x!==void 0?M(x,ut):y in u&&(x=o(()=>se(ut,s)),r.set(y+"",x))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=o(()=>se(void 0,s)),M(m,Pe(h)),r.set(p,m));else{v=m.v!==ut;var k=o(()=>Pe(h));M(m,k)}var T=Reflect.getOwnPropertyDescriptor(u,p);if(T?.set&&T.set.call(g,h),!v){if(n&&typeof p=="string"){var S=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=S.v&&M(S,O+1)}Lr(i)}return!0},ownKeys(u){d(i);var p=Reflect.ownKeys(u).filter(m=>{var v=r.get(m);return v===void 0||v.v!==ut});for(var[h,g]of r)g.v!==ut&&!(h in u)&&p.push(h);return p},setPrototypeOf(){fb()}})}function Wb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Zb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Ss(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Gd(e,t){return Object.is(Ss(e),Ss(t))}var Hb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function ZF(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return Hb.has(r)?function(...s){jb();var a=i.apply(this,s);return Wd(),a}:i}})}function WF(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,a){const o=r.call(this,s,a);if(o===-1){for(let l=a??0;l<this.length;l+=1)if(Ss(this[l])===s){hl("array.indexOf(...)");break}}return o},e.lastIndexOf=function(s,a){const o=n.call(this,s,a??this.length-1);if(o===-1){for(let l=0;l<=(a??this.length-1);l+=1)if(Ss(this[l])===s){hl("array.lastIndexOf(...)");break}}return o},e.includes=function(s,a){const o=i.call(this,s,a);if(!o){for(let l=0;l<this.length;l+=1)if(Ss(this[l])===s){hl("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Kd,Gb,Al,Yd,Jd;function Cl(){if(Kd===void 0){Kd=window,Gb=document,Al=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Yd=Fr(t,"firstChild").get,Jd=Fr(t,"nextSibling").get,_d(e)&&(e[cl]=void 0,e[xd]=null,e[dl]=void 0,e.__e=void 0),_d(r)&&(r[fl]=void 0)}}function Nt(e=""){return document.createTextNode(e)}function Kt(e){return Yd.call(e)}function br(e){return Jd.call(e)}function $(e,t){if(!_e)return Kt(e);var r=Kt(Ce);if(r===null)r=Ce.appendChild(Nt());else if(t&&r.nodeType!==3){var n=Nt();return r?.before(n),ht(n),n}return t&&Da(r),ht(r),r}function z(e,t=!1){if(!_e){var r=Kt(e);return r instanceof Comment&&r.data===""?br(r):r}if(t){if(Ce?.nodeType!==3){var n=Nt();return Ce?.before(n),ht(n),n}Da(Ce)}return Ce}function W(e,t=1,r=!1){let n=_e?Ce:e;for(var i;t--;)i=n,n=br(n);if(!_e)return n;if(r){if(n?.nodeType!==3){var s=Nt();return n===null?i?.after(s):n.before(s),ht(s),s}Da(n)}return ht(n),n}function Ol(e){e.textContent=""}function Qd(){return!Gt||Rr!==null?!1:(Te.f&ll)!==0}function Oa(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Kb(e=""){return document.createComment(e)}function Da(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Yb(e,t){if(t){const r=document.body;e.autofocus=!0,ir(()=>{document.activeElement===r&&e.focus()})}}function Jb(e){_e&&Kt(e)!==null&&Ol(e)}var Xd=!1;function ef(){Xd||(Xd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[ms]?.()})},{capture:!0}))}function Ia(e){var t=Oe,r=Te;Lt(null),ar(null);try{return e()}finally{Lt(t),ar(r)}}function Pa(e,t,r,n=r){e.addEventListener(t,()=>Ia(r));const i=e[ms];i?e[ms]=()=>{i(),n(!0)}:e[ms]=()=>n(!0),ef()}function tf(e){Te===null&&(Oe===null&&ab(e),sb()),rn&&ib(e)}function Qb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function sr(e,t){var r=Te;r!==null&&(r.f&8192)!==0&&(e|=ol);var n={ctx:Ve,deps:null,nodes:null,f:e|nr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Ee?.register_created_effect(n);var i=n;if((e&4)!==0)xi!==null?xi.push(n):Ti.ensure().schedule(n);else if(t!==null){try{Di(n)}catch(a){throw vt(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=fs))}if(i!==null&&(i.parent=r,r!==null&&Qb(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var s=Oe;(s.effects??=[]).push(i)}return n}function Dl(){return Oe!==null&&!_r}function $a(e){const t=sr(8,null);return at(t,rr),t.teardown=e,t}function ve(e){tf("$effect");var t=Te.f;if(!Oe&&(t&32)!==0&&Ve!==null&&!Ve.i){var r=Ve;(r.e??=[]).push(e)}else return rf(e)}function rf(e){return sr(4|Sd,e)}function Il(e){return tf("$effect.pre"),sr(8|Sd,e)}function Es(e){Ti.ensure();const t=sr(64|wi,e);return()=>{vt(t)}}function Xb(e){Ti.ensure();const t=sr(64|wi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{vt(t),n(void 0)}):(vt(t),n(void 0))})}function Ma(e){return sr(4,e)}function e_(e){return sr(Xy|wi,e)}function Oi(e,t=0){return sr(8|t,e)}function Q(e,t=[],r=[],n=[]){Ud(n,t,r,i=>{sr(8,()=>{e(...i.map(d))})})}function xs(e,t=0){var r=sr(16|t,e);return r}function nf(e,t=0){var r=sr(Jy|t,e);return r}function Rt(e){return sr(32|wi,e)}function sf(e){var t=e.teardown;if(t!==null){const r=rn,n=Oe;cf(!0),Lt(null);try{t.call(null)}finally{cf(r),Lt(n)}}}function Pl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ia(()=>{i.abort(ka)});var n=r.next;(r.f&64)!==0?r.parent=null:vt(r,t),r=n}}function t_(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&vt(t),t=r}}function vt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(af(e.nodes.start,e.nodes.end),r=!0),e.f|=kd,Pl(e,t&&!r),As(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();sf(e),e.f^=kd,e.f|=Qy;var i=e.parent;i!==null&&i.first!==null&&of(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function af(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function of(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Gn(e,t,r=!0){var n=[];lf(e,n,!0);var i=()=>{r&&vt(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function lf(e,t,r){if((e.f&8192)===0){e.f^=ol;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;lf(i,t,a?r:!1)}i=s}}}function Fa(e){uf(e,!0)}function uf(e,t){if((e.f&8192)!==0){e.f^=ol,(e.f&1024)===0&&(at(e,nr),Ti.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;uf(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function $l(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:br(r);t.append(r),r=i}}var r_=null,Na=!1,rn=!1;function cf(e){rn=e}var Oe=null,_r=!1;function Lt(e){Oe=e}var Te=null;function ar(e){Te=e}var zr=null;function df(e){Oe!==null&&(!Gt||(Oe.f&2)!==0)&&(zr??=new Set).add(e)}var zt=null,Yt=0,or=null;function n_(e){or=e}var ff=1,Kn=0,nn=Kn;function hf(e){nn=e}function pf(){return++ff}function Ts(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~ps),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ts(s)&&Bd(s),s.wv>e.wv)return!0}(t&512)!==0&&Ot===null&&at(e,rr)}return!1}function mf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Gt&&zr!==null&&zr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?mf(s,t,!1):t===s&&(r?at(s,nr):(s.f&1024)!==0&&at(s,Zn),kl(s))}}function vf(e){var t=zt,r=Yt,n=or,i=Oe,s=zr,a=Ve,o=_r,l=nn,c=e.f;zt=null,Yt=0,or=null,Oe=(c&96)===0?e:null,zr=null,Si(e.ctx),_r=!1,nn=++Kn,e.ac!==null&&(Ia(()=>{e.ac.abort(ka)}),e.ac=null);try{e.f|=Ed;var f=e.fn,u=f();e.f|=ll;var p=e.deps,h=Ee?.is_fork;if(zt!==null){var g;if(h||As(e,Yt),p!==null&&Yt>0)for(p.length=Yt+zt.length,g=0;g<zt.length;g++)p[Yt+g]=zt[g];else e.deps=p=zt;if(Dl()&&(e.f&512)!==0)for(g=Yt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Yt<p.length&&(As(e,Yt),p.length=Yt);if(bs()&&or!==null&&!_r&&p!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)mf(or[g],e);if(i!==null&&i!==e){if(Kn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Kn;if(t!==null)for(const m of t)m.rv=Kn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=wa),u}catch(m){return $d(m)}finally{e.f^=Ed,zt=t,Yt=r,or=n,Oe=i,zr=s,Si(a),_r=o,nn=l}}function i_(e,t){let r=t.reactions;if(r!==null){var n=Hy.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(zt===null||!ga.call(zt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~ps),s.v!==ut&&yl(s),Bb(s),As(s,0)}}function As(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)i_(e,r[n])}function Di(e){var t=e.f;if((t&16384)===0){at(e,rr);var r=Te,n=Na;if(Te=e,Na=!0,0)var i,s;try{(t&16777232)!==0?t_(e):Pl(e),sf(e);var a=vf(e);if(e.teardown=typeof a=="function"?a:null,e.wv=ff,0)for(var o of e.deps);}finally{Na=n,Te=r}}}async function gf(){if(Gt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function d(e){var t=(e.f&2)!==0;if(r_?.add(e),Oe!==null&&!_r&&!(Te!==null&&(Te.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Oe.deps;if((Oe.f&2097152)!==0)e.rv<Kn&&(e.rv=Kn,zt===null&&r!==null&&r[Yt]===e?Yt++:zt===null?zt=[e]:zt.push(e));else{Oe.deps??=[],ga.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:ga.call(n,Oe)||n.push(Oe)}}if(0){if(!_r&&qb&&!qb.warned&&(qb.effect.f&2097152)===0&&!qb.effect_deps.has(e))var i;if(CF&&!_r&&PF!==null&&Oe!==null&&PF.reaction===Oe&&!e.trace){if(i)var s,a}}if(rn&&Hn.has(e))return Hn.get(e);if(t){var o=e;if(rn){var l=o.v;return((o.f&1024)===0&&o.reactions!==null||bf(o))&&(l=xl(o)),Hn.set(o,l),l}var c=(o.f&512)===0&&!_r&&Oe!==null&&(Na||(Oe.f&512)!==0),f=(o.f&ll)===0;Ts(o)&&(c&&(o.f|=512),Bd(o)),c&&!f&&(jd(o),yf(o))}if(Ot?.has(e))return Ot.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function yf(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(jd(t),yf(t))}function bf(e){if(e.v===ut)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&bf(t))return!0;return!1}function Le(e){var t=_r;try{return _r=!0,e()}finally{_r=t}}function s_(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Ml(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Ml(r)}}}function Ml(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ml(e[n],t)}catch{}const r=_a(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=yd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Cs=Symbol("events"),_f=new Set,Fl=new Set;function Nl(e,t,r,n={}){function i(s){if(n.capture||Rl.call(t,s),!s.cancelBubble)return Ia(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ir(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function gt(e,t,r,n={}){var i=Nl(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Ra(e,t,r,n,i){var s={capture:n,passive:i},a=Nl(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&$a(()=>{t.removeEventListener(e,a,s)})}function pt(e,t,r){(t[Cs]??={})[e]=r}function lr(e){for(var t=0;t<e.length;t++)_f.add(e[t]);for(var r of Fl)r(e)}var wf=null;function Rl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;wf=e;var a=0,o=wf===e&&e[Cs];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[Cs]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(a=l)}if(s=i[a]||e.target,s!==t){kn(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=Oe,u=Te;Lt(null),ar(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Cs]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?h.push(m):p=m}if(e.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(p){for(let m of h)queueMicrotask(()=>{throw m});throw p}}finally{e[Cs]=t,delete e.currentTarget,Lt(f),ar(u)}}}var a_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function kf(e){return a_?.createHTML(e)??e}function o_(e){var t=Oa("template");return t.innerHTML=kf(e.replaceAll("<!>","<!---->")),t.content}function wr(e,t){var r=Te;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return wr(Ce,null),Ce;i===void 0&&(i=o_(s?e:"<!>"+e),r||(i=Kt(i)));var a=n||Al?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Kt(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function qt(e=""){if(!_e){var t=Nt(e+"");return wr(t,t),t}var r=Ce;return r.nodeType!==3?(r.before(r=Nt()),ht(r)):Da(r),wr(r,r),r}function X(){if(_e)return wr(Ce,null),Ce;var e=document.createDocumentFragment(),t=document.createComment(""),r=Nt();return e.append(t,r),wr(t,r),e}function E(e,t){if(_e){var r=Te;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Ce),tn();return}e!==null&&e.before(t)}function mt(){if(_e&&Ce&&Ce.nodeType===8&&Ce.textContent?.startsWith("$")){const e=Ce.textContent.substring(1);return tn(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var l_=/\r/g;function u_(e){e=e.replace(l_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function c_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var d_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function f_(e){return d_.includes(e)}var h_=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],p_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function m_(e){return e=e.toLowerCase(),p_[e]??e}var HF=[...h_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],v_=["touchstart","touchmove"];function g_(e){return v_.includes(e)}var y_=["$state","$state.raw","$derived","$derived.by"],GF=[...y_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function b_(e){return e?.replace(/\//g,"/​")}var Sf=!0;function Y(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[fl]??=e.nodeValue)&&(e[fl]=r,e.nodeValue=`${r}`)}function Ef(e,t){return xf(e,t)}function __(e,t){Cl(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Ce;try{for(var s=Kt(r);s&&(s.nodeType!==8||s.data!=="[");)s=br(s);if(!s)throw jn;bt(!0),ht(s);const a=xf(e,{...t,anchor:s});return bt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
11
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==jn&&console.warn("Failed to hydrate: ",a),t.recover===!1&&lb(),Cl(),Ol(r),bt(!1),Ef(e,t)}finally{bt(n),ht(i)}}var La=new Map;function xf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:o}){Cl();var l=void 0,c=Xb(()=>{var f=r??t.appendChild(Nt());Rb(f,{pending:()=>{}},h=>{te({});var g=Ve;if(s&&(g.c=s),i&&(n.$$events=i),_e&&wr(h,null),Sf=a,l=e(h,n)||{},Sf=!0,_e&&(Te.nodes.end=Ce,Ce===null||Ce.nodeType!==8||Ce.data!=="]"))throw gs(),jn;re()},o);var u=new Set,p=h=>{for(var g=0;g<h.length;g++){var m=h[g];if(!u.has(m)){u.add(m);var v=g_(m);for(const k of[t,document]){var y=La.get(k);y===void 0&&(y=new Map,La.set(k,y));var x=y.get(m);x===void 0?(k.addEventListener(m,Rl,{passive:v}),y.set(m,1)):y.set(m,x+1)}}}};return p(ya(_f)),Fl.add(p),()=>{for(var h of u)for(const v of[t,document]){var g=La.get(v),m=g.get(h);--m==0?(v.removeEventListener(h,Rl),g.delete(h),g.size===0&&La.delete(v)):g.set(h,m)}Fl.delete(p),f!==r&&f.parentNode?.removeChild(f)}});return Ll.set(l,c),l}var Ll=new WeakMap;function w_(e,t){const r=Ll.get(e);return r?(Ll.delete(e),r(t)):Promise.resolve()}var zl=class{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#s=e=>{if(this.#e.has(e)){var t=this.#e.get(e),r=this.#t.get(t);if(r)Fa(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Fa(n.effect),this.#t.set(t,n.effect),this.#r.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===e)break;const a=this.#r.get(s);a&&(vt(a.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var o=document.createDocumentFragment();$l(s,o),o.append(Nt()),this.#r.set(i,{effect:s,fragment:o})}else vt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(s,a,!1)):a()}}};#o=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(vt(n.effect),this.#r.delete(r))};ensure(e,t){var r=Ee,n=Qd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Nt();i.append(s),this.#r.set(e,{effect:Rt(()=>t(s)),fragment:i})}else this.#t.set(e,Rt(()=>t(this.anchor)));if(this.#e.set(r,e),n){for(const[a,o]of this.#t)a===e?r.unskip_effect(o):r.skip_effect(o);for(const[a,o]of this.#r)a===e?r.unskip_effect(o.effect):r.skip_effect(o.effect);r.oncommit(this.#s),r.ondiscard(this.#o)}else _e&&(this.anchor=Ce),this.#s(r)}};function we(e,t,...r){var n=new zl(e);xs(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},fs)}if(0)var AN;function sn(e){Ve===null&&Td("onMount"),ki&&Ve.l!==null?k_(Ve).m.push(e):ve(()=>{const t=Le(e);if(typeof t=="function")return t})}function k_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function S_(){return Symbol(Wy)}function le(e,t,r=!1){var n;_e&&(n=Ce,tn());var i=new zl(e),s=r?fs:0;function a(o,l){if(_e){var c=pl(n);if(o!==parseInt(c.substring(1))){var f=ys();ht(f),i.anchor=f,bt(!1),i.ensure(o,l),bt(!0);return}}i.ensure(o,l)}xs(()=>{var o=!1;t((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}function an(e,t){return t}function E_(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let u=t[o];Gn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;ql(e,ya(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var c=r,f=c.parentNode;Ol(f),f.append(c),e.items.clear()}ql(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function ql(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const o of a)n.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=hs,$l(s,document.createDocumentFragment())):vt(t[i],r)}}var Tf;function Fe(e,t,r,n,i,s=null){var a=e,o=new Map;if((t&4)!==0){var l=e;a=_e?ht(Kt(l)):l.appendChild(Nt())}_e&&tn();var c=null,f=El(()=>{var y=r();return va(y)?y:y==null?[]:ya(y)}),u,p=new Map,h=!0;function g(y){(v.effect.f&16384)===0&&(v.pending.delete(y),v.fallback=c,x_(v,u,a,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Fa(c):(c.f^=hs,Ds(c,null,a)):Gn(c,()=>{c=null})))}function m(y){v.pending.delete(y)}var v={effect:xs(()=>{u=d(f);var y=u.length;let x=!1;_e&&pl(a)==="[!"!=(y===0)&&(a=ys(),ht(a),bt(!1),x=!0);for(var k=new Set,T=Ee,S=Qd(),O=0;O<y;O+=1){_e&&Ce.nodeType===8&&Ce.data==="]"&&(a=Ce,x=!0,bt(!1));var P=u[O],R=n(P,O);if(0)var j;var N=h?null:o.get(R);N?(N.v&&Ci(N.v,P),N.i&&Ci(N.i,O),S&&T.unskip_effect(N.e)):(N=T_(o,h?a:Tf??=Nt(),P,R,O,i,t,r),h||(N.e.f|=hs),o.set(R,N)),k.add(R)}if(y===0&&s&&!c&&(h?c=Rt(()=>s(a)):(c=Rt(()=>s(Tf??=Nt())),c.f|=hs)),y>k.size&&Ad("","",""),_e&&y>0&&ht(ys()),!h)if(p.set(T,k),S){for(const[B,U]of o)k.has(B)||T.skip_effect(U.e);T.oncommit(g),T.ondiscard(m)}else g(T);x&&bt(!0),d(f)}),flags:t,items:o,pending:p,outrogroups:null,fallback:c};h=!1,_e&&(a=Ce)}function Os(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function x_(e,t,r,n,i){var s=(n&8)!==0,a=t.length,o=e.items,l=Os(e.effect.first),c,f=null,u,p=[],h=[],g,m,v,y;if(s)for(y=0;y<a;y+=1)g=t[y],m=i(g,y),v=o.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(y=0;y<a;y+=1){if(g=t[y],m=i(g,y),v=o.get(m).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(v),N.done.delete(v);if((v.f&8192)!==0&&(Fa(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=hs,v===l)Ds(v,null,r);else{var x=f?f.next:l;v===e.effect.last&&(e.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),xn(e,f,v),xn(e,v,x),Ds(v,x,r),f=v,p=[],h=[],l=Os(f.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(p.length<h.length){var k=h[0],T;f=k.prev;var S=p[0],O=p[p.length-1];for(T=0;T<p.length;T+=1)Ds(p[T],k,r);for(T=0;T<h.length;T+=1)c.delete(h[T]);xn(e,S.prev,O.next),xn(e,f,S),xn(e,O,k),l=k,f=O,y-=1,p=[],h=[]}else c.delete(v),Ds(v,l,r),xn(e,v.prev,v.next),xn(e,v,f===null?e.effect.first:f.next),xn(e,f,v),f=v;continue}for(p=[],h=[];l!==null&&l!==v;)(c??=new Set).add(l),h.push(l),l=Os(l.next);if(l===null)continue}(v.f&33554432)===0&&p.push(v),f=v,l=Os(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(ql(e,ya(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var P=[];if(c!==void 0)for(v of c)(v.f&8192)===0&&P.push(v);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&P.push(l),l=Os(l.next);var R=P.length;if(R>0){var j=(n&4)!==0&&a===0?r:null;if(s){for(y=0;y<R;y+=1)P[y].nodes?.a?.measure();for(y=0;y<R;y+=1)P[y].nodes?.a?.fix()}E_(e,P,j)}}s&&ir(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function T_(e,t,r,n,i,s,a,o){var l=(a&1)!==0?(a&16)===0?Zd(r,!1,!1):En(r):null,c=(a&2)!==0?En(i):null;return{v:l,i:c,e:Rt(()=>(s(t,l??r,c??i,o),()=>{e.delete(n)}))}}function Ds(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&(t.f&33554432)===0?t.nodes.start:r;n!==null;){var a=br(n);if(s.before(n),n===i)return;n=a}}function xn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function KF(e,t){const r=new Map,n=e.length;for(let i=0;i<n;i++){const s=t(e[i],i);if(r.has(s)){const a=String(r.get(s)),o=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Ad(a,o,l)}r.set(s,i)}}function YF(e,t,r){if(!t||t===u_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:vl?.[sl]&&(n=`in ${vl[sl]}`),gb(b_(n))}function Af(e,t,r=!1,n=!1,i=!1,s=!1){var a=e,o="";if(r){var l=e;_e&&(a=ht(Kt(l)))}Q(()=>{var c=Te;if(o===(o=t()??"")){_e&&tn();return}if(r&&!_e){c.nodes=null,l.innerHTML=o,o!==""&&wr(Kt(l),l.lastChild);return}if(c.nodes!==null&&(af(c.nodes.start,c.nodes.end),c.nodes=null),o!==""){if(_e){for(var f=Ce.data,u=tn(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=br(u);if(u===null)throw gs(),jn;wr(Ce,p),a=ht(u);return}var h=Oa(n?"svg":i?"math":"template",n?jy:i?Zy:void 0);h.innerHTML=o;var g=n||i?h:h.content;if(wr(Kt(g),g.lastChild),n||i)for(;Kt(g);)a.before(Kt(g));else a.before(g)}})}function A_(e,t,r,n,i){_e&&tn();var s=t.$$slots?.[r],a=!1;s===!0&&(s=t[r==="default"?"children":r],a=!0),s===void 0?i!==null&&i(e):s(e,a?()=>n:n)}function $e(e,t,r){var n;_e&&(n=Ce,tn());var i=new zl(e);xs(()=>{var s=t()??null;if(_e&&pl(n)==="["!=(s!==null)){var a=ys();ht(a),i.anchor=a,bt(!1),i.ensure(s,s&&(o=>r(o,s))),bt(!0);return}i.ensure(s,s&&(o=>r(o,s)))},fs)}function C_(e,t){var r=void 0,n;nf(()=>{r!==(r=t())&&(n&&(vt(n),n=null),r&&(n=Rt(()=>{Ma(()=>r(e))})))})}function Cf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function za(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cf(e))&&(n&&(n+=" "),n+=t);return n}function ur(e){return typeof e=="object"?za(e):e??""}var Of=[...`
12
+ \r\f \v\uFEFF`];function O_(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Of.includes(n[a-1]))&&(o===n.length||Of.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function Df(e,t=!1){var r=t?" !important;":";",n="";for(var i of Object.keys(e)){var s=e[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Ul(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function D_(e,t){if(t){var r="",n,i;if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(Ul)),i&&l.push(...Object.keys(i).map(Ul));var c=0,f=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(o?p==="/"&&e[u-1]==="*"&&(o=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?o=!0:p==='"'||p==="'"?s=p:p==="("?a++:p===")"&&a--,!o&&s===!1&&a===0){if(p===":"&&f===-1)f=u;else if(p===";"||u===m-1){if(f!==-1){var h=Ul(e.substring(c,f).trim());if(!l.includes(h)){p!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,f=-1}}}}return n&&(r+=Df(n)),i&&(r+=Df(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Et(e,t,r,n,i,s){var a=e[cl];if(_e||a!==r||a===void 0){var o=O_(r,n,s);(!_e||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):t?e.className=o:e.setAttribute("class",o)),e[cl]=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function Vl(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function I_(e,t,r,n){var i=e[dl];if(_e||i!==t){var s=D_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[dl]=t}else n&&(Array.isArray(n)?(Vl(e,r?.[0],n[0]),Vl(e,r?.[1],n[1],"important")):Vl(e,r,n));return n}function qa(e,t,r=!1){if(e.multiple){if(t==null)return;if(!va(t))return yb();for(var n of e.options)n.selected=t.includes(Is(n));return}for(n of e.options)if(Gd(Is(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function If(e){var t=new MutationObserver(()=>{qa(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),$a(()=>{t.disconnect()})}function P_(e,t,r=t){var n=new WeakSet,i=!0;Pa(e,"change",s=>{var a=s?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Is);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Is(l)}r(o),e.__value=o,Ee!==null&&n.add(Ee)}),Ma(()=>{var s=t();if(e===document.activeElement){var a=Gt?_s:Ee;if(n.has(a))return}if(qa(e,s,i),i&&s===void 0){var o=e.querySelector(":checked");o!==null&&(s=Is(o),r(s))}e.__value=s,i=!1}),If(e)}function Is(e){return"__value"in e?e.__value:e.value}var Ps=Symbol("class"),$s=Symbol("style"),Pf=Symbol("is custom element"),$f=Symbol("is html"),$_=vs?"link":"LINK",Mf=vs?"input":"INPUT",M_=vs?"option":"OPTION",F_=vs?"select":"SELECT",N_=vs?"progress":"PROGRESS";function Ms(e){if(_e){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;me(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;me(e,"checked",null),e.checked=i}}};e[ms]=r,ir(r),ef()}}function Bl(e,t){var r=Ua(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==N_)||(e.value=t??"")}function R_(e,t){var r=Ua(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Ff(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function me(e,t,r,n){var i=Ua(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===$_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[eb]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Zl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Yn(e,t,r){var n=Oe,i=Te;let s=_e;_e&&bt(!1),Lt(null),ar(null);try{t!=="style"&&(jl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Zl(e).includes(t):r&&typeof r=="object")?e[t]=r:me(e,t,r==null?r:String(r))}finally{Lt(n),ar(i),s&&bt(!0)}}function L_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===Mf){var a=e;(a.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ms(a)}var o=Ua(e),l=o[Pf],c=!o[$f];let f=_e&&l;f&&bt(!1);var u=t||{},p=e.nodeName===M_;for(var h in t)h in r||(r[h]=null);r.class?r.class=ur(r.class):(n||r[Ps])&&(r.class=null),r[$s]&&(r.style??=null);var g=Zl(e);if(e.nodeName===Mf&&"type"in r&&("value"in r||"__value"in r)){var m=r.type;(m!==u.type||m===void 0&&e.hasAttribute("type"))&&(u.type=m,me(e,"type",m,s))}for(const O in r){let P=r[O];if(p&&O==="value"&&P==null){e.value=e.__value="",u[O]=P;continue}if(O==="class"){Et(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",P,n,t?.[Ps],r[Ps]),u[O]=P,u[Ps]=r[Ps];continue}if(O==="style"){I_(e,P,t?.[$s],r[$s]),u[O]=P,u[$s]=r[$s];continue}var v=u[O];if(!(P===v&&!(P===void 0&&e.hasAttribute(O)))){u[O]=P;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const R={},j="$$"+O;let N=O.slice(2);var x=f_(N);if(c_(N)&&(N=N.slice(0,-7),R.capture=!0),!x&&v){if(P!=null)continue;e.removeEventListener(N,u[j],R),u[j]=null}if(x)pt(N,e,P),lr([N]);else if(P!=null){let B=function(U){u[O].call(this,U)};var S=B;u[j]=Nl(N,e,B,R)}}else if(O==="style")me(e,O,P);else if(O==="autofocus")Yb(e,!!P);else if(!l&&(O==="__value"||O==="value"&&P!=null))e.value=e.__value=P;else if(O==="selected"&&p)Ff(e,P);else{var k=O;c||(k=m_(k));var T=k==="defaultValue"||k==="defaultChecked";if(P==null&&!l&&!T)if(o[O]=null,k==="value"||k==="checked"){let R=e;const j=t===void 0;if(k==="value"){let N=R.defaultValue;R.removeAttribute(k),R.defaultValue=N,R.value=R.__value=j?N:null}else{let N=R.defaultChecked;R.removeAttribute(k),R.defaultChecked=N,R.checked=j?N:!1}}else e.removeAttribute(O);else T||g.includes(k)&&(l||typeof P!="string")?(e[k]=P,k in o&&(o[k]=ut)):typeof P!="function"&&me(e,k,P,s)}}}return f&&bt(!0),u}function ze(e,t,r=[],n=[],i=[],s,a=!1,o=!1){Ud(i,r,n,l=>{var c=void 0,f={},u=e.nodeName===F_,p=!1;if(nf(()=>{var g=t(...l.map(d)),m=L_(e,c,g,s,a,o);p&&u&&"value"in g&&qa(e,g.value);for(let y of Object.getOwnPropertySymbols(f))g[y]||vt(f[y]);for(let y of Object.getOwnPropertySymbols(g)){var v=g[y];y.description==="@attach"&&(!c||v!==c[y])&&(f[y]&&vt(f[y]),f[y]=Rt(()=>C_(e,()=>v))),m[y]=v}c=m}),u){var h=e;Ma(()=>{qa(h,c.value,!0),If(h)})}p=!0})}function Ua(e){return e[xd]??={[Pf]:e.nodeName.includes("-"),[$f]:e.namespaceURI===By}}var jl=new Map;function Zl(e){var t=e.getAttribute("is")||e.nodeName,r=jl.get(t);if(r)return r;jl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=yd(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);i=_a(i)}return r}function JF(e,t,r){}function Wl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Nf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function z_(e,t){var r=Nf(e.srcset),n=Nf(t);return n.length===r.length&&n.every(([i,s],a)=>s===r[a][1]&&(Wl(r[a][0],i)||Wl(i,r[a][0])))}var Hl=null;function q_(){if(Hl===null){var e=Oa("select");e.innerHTML=kf("<option><span>t</span></option>"),Hl=e.firstChild?.firstChild?.nodeType===1}return Hl}function U_(e,t){var r=_e;q_()||(bt(!1),e.textContent="",e.append(Kb("")));try{t()}finally{r&&(_e?I(e):(bt(!0),ht(e)))}}function Va(e,t,r=t){var n=new WeakSet;Pa(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Kl(e)?Yl(s):s,r(s),Ee!==null&&n.add(Ee),await gf(),s!==(s=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=s??"",o!==null){var c=e.value.length;a===o&&o===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=a,e.selectionEnd=Math.min(o,c))}}}),(_e&&e.defaultValue!==e.value||Le(t)==null&&e.value)&&(r(Kl(e)?Yl(e.value):e.value),Ee!==null&&n.add(Ee)),Oi(()=>{var i=t();if(e===document.activeElement){var s=Gt?_s:Ee;if(n.has(s))return}Kl(e)&&i===Yl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Gl=new Set;function V_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",a=e;let o=!1;if(t!==null)for(var l of t)a=a[l]??=[];a.push(r),Pa(r,"change",()=>{var c=r.__value;s&&(c=Rf(a,c,r.checked)),i(c)},()=>i(s?[]:null)),Oi(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){o=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Gd(r.__value,c)}),$a(()=>{var c=a.indexOf(r);c!==-1&&a.splice(c,1)}),Gl.has(a)||(Gl.add(a),ir(()=>{a.sort((c,f)=>c.compareDocumentPosition(f)===4?-1:1),Gl.delete(a)})),ir(()=>{if(o){var c;s?c=Rf(a,c,r.checked):c=a.find(f=>f.checked)?.__value,i(c)}})}function B_(e,t,r=t){Pa(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Le(t)==null)&&r(e.checked),Oi(()=>{var n=t();e.checked=!!n})}function Rf(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Kl(e){var t=e.type;return t==="number"||t==="range"}function Yl(e){return e===""?null:+e}function Jl(e,t){return e===t||e?.[Nr]===t}function Ql(e={},t,r,n){var i=Ve.r,s=Te;return Ma(()=>{var a,o;return Oi(()=>{a=o,o=n?.()||[],Le(()=>{Jl(r(...o),e)||(t(e,...o),a&&Jl(r(...a),e)&&t(null,...a))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{o&&Jl(r(...o),e)&&t(null,...o)},f=l.teardown;l.teardown=()=>{c(),f?.()}}}),e}function Xl(e=!1){const t=Ve,r=t.l.u;if(!r)return;let n=()=>s_(t.s);if(e){let i=0,s={};const a=Ai(()=>{let o=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],o=!0);return o&&i++,i});n=()=>d(a)}r.b.length&&Il(()=>{Lf(t,n),al(r.b)}),ve(()=>{const i=Le(()=>r.m.map(Ky));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ve(()=>{Lf(t,n),al(r.a)})}function Lf(e,t){if(e.l.s)for(const r of e.l.s)d(r);t()}var j_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function We(e,t,r){return new Proxy({props:e,exclude:t},j_)}var Z_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ds(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let i=e.props[n];ds(i)&&(i=i());const s=Fr(i,t);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(ds(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Fr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===Nr||t===ul)return!1;for(let r of e.props)if(ds(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(ds(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function Tn(...e){return new Proxy({props:e},Z_)}function _(e,t,r,n){var i=!ki||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=n,l=!0,c=void 0,f=()=>a&&i?(c??=Ai(n),d(c)):(l&&(l=!1,o=a?Le(n):n),o);let u;if(s){var p=Nr in e||ul in e;u=Fr(e,t)?.set??(p&&t in e?T=>e[t]=T:void 0)}var h,g=!1;s?[h,g]=$b(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=f(),u&&(i&&ub(t),u(h)));var m;if(i?m=()=>{var T=e[t];return T===void 0?f():(l=!0,T)}:m=()=>{var T=e[t];return T!==void 0&&(o=void 0),T===void 0?o:T},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(T,S){return arguments.length>0?((!i||!S||v||g)&&u(S?m():T),T):m()})}var y=!1,x=((r&1)!==0?Ai:El)(()=>(y=!1,m()));s&&d(x);var k=Te;return(function(T,S){if(arguments.length>0){const O=S?d(x):i&&s?Pe(T):T;return M(x,O),y=!0,o!==void 0&&(o=O),T}return rn&&y||(k.f&16384)!==0?x.v:d(x)})}function W_(e){return new H_(e)}var H_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var a=Zd(s,!1,!1);return t.set(i,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return d(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===ul?!0:(d(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return M(t.get(s)??r(s,a),a),Reflect.set(i,s,a)}});this.#t=(e.hydrate?__:Ef)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Gt&&(!e?.props?.$$host||e.sync===!1)&&b(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||kn(this,i,{get(){return this.#t[i]},set(s){this.#t[i]=s},enumerable:!0});this.#t.$set=i=>{Object.assign(n,i)},this.#t.$destroy=()=>{w_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const r=(...n)=>t.call(this,...n);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(n=>n!==r)}}$destroy(){this.#t.$destroy()}},zf;typeof HTMLElement=="function"&&(zf=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=Oa("slot");i!=="default"&&(a.name=i),E(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=G_(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Ba(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=W_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Es(()=>{Oi(()=>{this.$$r=!0;for(const i of ba(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Ba(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ba(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return ba(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ba(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function G_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ne(e,t,r,n,i,s){let a=class extends zf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ba(t).map(o=>(t[o].attribute||o).toLowerCase())}};return ba(t).forEach(o=>{kn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=Ba(o,l,t),this.$$d[o]=l;var c=this.$$c;c&&(Fr(c,o)?.get?c[o]=l:c.$set({[o]:l}))}})}),n.forEach(o=>{kn(a.prototype,o,{get(){return this.$$c?.[o]}})}),s&&(a=s(a)),e.element=a,a}var qf={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:e=>`/#/checkout/failure?payment_error=${e}`,checkoutSuccess:e=>`/#/checkout/success?ORDERID=${e}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:e=>"/#/tickets/combi?group="+e,dayTickets:()=>"/#/tickets/day",eventGroup:J_,event:e=>"/#/product/event/"+e,events:()=>"/#/products/events",exhibition:e=>"/#/exhibition/"+e,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:e=>"/#/merchandise/detail/"+e,merchandises:()=>"/#/merchandise/list",museum:e=>"/#/museum/"+e,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:e=>"/#/tickets/filters?group="+e,tour:e=>"/#/product/tour/"+e,tours:()=>"/#/products/tours",toursGroup:Q_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},K_={...qf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function Y_(e){return e==="angular"?qf:K_}function J_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function Q_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function X_(e){return new Promise(t=>setTimeout(t,e))}function Uf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function ew(e){return typeof e=="boolean"}function eu(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,a=()=>{try{const o=e();if(o){r(o);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(a,s)}catch(o){n(o)}};a()})}var tu=Array.isArray,Vf=e=>!!e&&e.constructor===Object,tw=e=>typeof e=="string"||e instanceof String,rw=e=>{try{return Number(e)===e}catch{return!1}},nw=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Bf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function qr(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var iw=(e,t,r=!1)=>{if(!e)return[];const n=(s,a)=>t(s)-t(a),i=(s,a)=>t(a)-t(s);return e.slice().sort(r===!0?i:n)};function sw(e,t){const r=t??(n=>n);return Bf(e,(n,i)=>r(n)>r(i)?n:i)}function ru(e,t){const r=t??(n=>n);return Bf(e,(n,i)=>r(n)<r(i)?n:i)}var aw=(e,t)=>{const r=e.reduce((n,i)=>{const s=t?t(i):i;return n[s]||(n[s]=i),n},{});return Object.values(r)},jf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},ow=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},xt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Vf(e[n])?xt(e[n],i):i}),{}),Zf=class{#e=se(Pe({uid:"",client:"",accessToken:"",expiry:0}));constructor(){this.load(),typeof window<"u"&&window.addEventListener("storage",e=>{e.key==="go-auth"&&this.load()})}customerLevel(){if(this.isGuest())return 10;if(this.isLoggedIn())return 20}isAuthenticated(){return this.data.uid!==""}isLoggedIn(){return!!(this.data.uid&&Uf(this.data.uid))}isGuest(){return!!(this.data.uid&&!Uf(this.data.uid))}signOut(){d(this.#e).uid="",d(this.#e).client="",d(this.#e).accessToken="",d(this.#e).expiry=0,this.save()}signIn(e){d(this.#e).uid=e.uid,d(this.#e).client=e.client,d(this.#e).accessToken=e.accessToken,d(this.#e).expiry=e.expiry,this.save()}get data(){return d(this.#e).uid!==""&&d(this.#e).expiry<Math.floor(Date.now()/1e3)?{uid:"",client:"",accessToken:"",expiry:0}:d(this.#e)}toString(){return JSON.stringify(d(this.#e))}save(){typeof localStorage>"u"||localStorage.setItem("go-auth",this.toString())}load(){if(typeof localStorage>"u")return;const e=localStorage.getItem("go-auth");if(!e){this.signOut();return}const t=JSON.parse(e);if(!(Vf(t)&&"uid"in t&&"client"in t&&"accessToken"in t&&"expiry"in t))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);if(t.uid!==""&&t.expiry<Math.floor(Date.now()/1e3)){this.signOut();return}this.signIn(t)}},lw=class{auth;constructor(e){this.auth=e}onRequest({request:e}){const{uid:t,client:r,accessToken:n,expiry:i}=this.auth.data,s=e.headers;t&&!s.has("uid")&&s.set("uid",t),r&&!s.has("client")&&s.set("client",r),n&&!s.has("access-token")&&s.set("access-token",n),i&&!s.has("expiry")&&s.set("expiry",String(i)),n&&!s.has("token-type")&&s.set("token-type","Bearer")}onResponse({response:e}){const t=e.headers.get("access-token"),r=e.headers.get("client"),n=e.headers.get("uid"),i=parseInt(e.headers.get("expiry")||"");return t&&r&&n&&i&&this.auth.signIn({uid:n,client:r,accessToken:t,expiry:i}),e}},Wf;function G(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const c=a.prototype,f=Object.keys(c);for(let u=0;u<f.length;u++){const p=f[u];p in o||(o[p]=c[p].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function a(o){var l;const c=r?.Parent?new s:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const f of c._zod.deferred)f();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Ii=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Hf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Wf=globalThis).__zod_globalConfig??(Wf.__zod_globalConfig={});var ja=globalThis.__zod_globalConfig;function Jn(e){return e&&Object.assign(ja,e),ja}function Gf(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function nu(e,t){return typeof t=="bigint"?t.toString():t}function iu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function su(e){return e==null}function au(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function uw(e,t){const r=e/t,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var Kf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Kf)return n===void 0&&(n=Kf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Qn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function An(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Yf(e){return JSON.stringify(e)}function cw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Jf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Za(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var dw=iu(()=>{if(ja.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Fs(e){if(Za(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Za(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Qf(e){return Fs(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var fw=new Set(["string","number","symbol"]);function Wa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function hw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var pw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function mw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Cn(e,An(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Qn(this,"shape",i),i},checks:[]}))}function vw(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return Cn(e,An(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Qn(this,"shape",i),i},checks:[]}))}function gw(e,t){if(!Fs(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Cn(e,An(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Qn(this,"shape",n),n}}))}function yw(e,t){if(!Fs(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Cn(e,An(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Qn(this,"shape",r),r}}))}function bw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return Cn(e,An(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Qn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _w(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");return Cn(t,An(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:i[a]}):i[a])}else for(const a in i)s[a]=e?new e({type:"optional",innerType:i[a]}):i[a];return Qn(this,"shape",s),s},checks:[]}))}function ww(e,t,r){return Cn(t,An(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Qn(this,"shape",i),i}}))}function Pi(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function kw(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Xf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ha(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Ha(e.inst?._zod.def?.error?.(e))??Ha(t?.error?.(e))??Ha(r.customError?.(e))??Ha(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:a,...o}=e;return o.path??(o.path=[]),o.message=n,t?.reportInput&&(o.input=a),o}function ou(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ns(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var eh=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},th=G("$ZodError",eh),rh=G("$ZodError",eh,{Parent:Error});function Sw(e,t=r=>r.message){const r={},n=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function Ew(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o},[...s,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...s,...a.path]);else{const o=[...s,...a.path];if(o.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<o.length;){const f=o[c];c!==o.length-1?l[f]=l[f]||{_errors:[]}:(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(a))),l=l[f],c++}}}};return n(e),r}var lu=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Ii;if(a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Xn(l,s,Jn())));throw Jf(o,i?.callee),o}return a.value},uu=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(i?.Err??e)(a.issues.map(l=>Xn(l,s,Jn())));throw Jf(o,i?.callee),o}return a.value},Ga=e=>(t,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ii;return s.issues.length?{success:!1,error:new(e??th)(s.issues.map(a=>Xn(a,i,Jn())))}:{success:!0,data:s.value}},xw=Ga(rh),Ka=e=>async(t,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Xn(a,i,Jn())))}:{success:!0,data:s.value}},Tw=Ka(rh),Aw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return lu(e)(t,r,i)},Cw=e=>(t,r,n)=>lu(e)(t,r,n),Ow=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return uu(e)(t,r,i)},Dw=e=>async(t,r,n)=>uu(e)(t,r,n),Iw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ga(e)(t,r,i)},Pw=e=>(t,r,n)=>Ga(e)(t,r,n),$w=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ka(e)(t,r,i)},Mw=e=>async(t,r,n)=>Ka(e)(t,r,n),Fw=/^[cC][0-9a-z]{6,}$/,Nw=/^[0-9a-z]+$/,Rw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lw=/^[0-9a-vA-V]{20}$/,zw=/^[A-Za-z0-9]{27}$/,qw=/^[a-zA-Z0-9_-]{21}$/,Uw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,nh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Bw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Zw(){return new RegExp(jw,"u")}var Ww=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Gw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ih=/^[A-Za-z0-9_-]*$/,Jw=/^https?$/,Qw=/^\+[1-9]\d{6,14}$/,sh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Xw=new RegExp(`^${sh}$`);function ah(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function e0(e){return new RegExp(`^${ah(e)}$`)}function t0(e){const t=ah({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${sh}T(?:${n})$`)}var r0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},n0=/^-?\d+$/,i0=/^-?\d+(?:\.\d+)?$/,s0=/^[^A-Z]*$/,a0=/^[^a-z]*$/,Ut=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),oh={number:"number",bigint:"bigint",object:"date"},lh=G("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=oh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uh=G("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=oh[typeof t.value];e._zod.onattach.push(n=>{const i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),o0=G("$ZodCheckMultipleOf",(e,t)=>{Ut.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):uw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),l0=G("$ZodCheckNumberFormat",(e,t)=>{Ut.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=pw[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=i,o.maximum=s,r&&(o.pattern=n0)}),e._zod.check=a=>{const o=a.value;if(r){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),u0=G("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const s=ou(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),c0=G("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const s=ou(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),d0=G("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!su(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{const i=n.value,s=i.length;if(s===t.length)return;const a=ou(i),o=s>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ya=G("$ZodCheckStringFormat",(e,t)=>{var r,n;Ut.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),f0=G("$ZodCheckRegex",(e,t)=>{Ya.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),h0=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=s0),Ya.init(e,t)}),p0=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=a0),Ya.init(e,t)}),m0=G("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Wa(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),v0=G("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Wa(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),g0=G("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Wa(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),y0=G("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),b0=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
13
13
  `).filter(i=>i),r=Math.min(...t.map(i=>i.length-i.trimStart().length)),n=t.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(const i of n)this.content.push(i)}compile(){const e=Function,t=this?.args,r=[...(this?.content??[""]).map(n=>` ${n}`)];return new e(...t,r.join(`
14
- `))}},y0={major:4,minor:4,patch:3},ct=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=y0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,o,l)=>{let c=Pi(a),d;for(const u of o){if(u._zod.def.when){if(_w(a)||!u._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,h=u._zod.check(a);if(h instanceof Promise&&l?.async===!1)throw new Ii;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(c||(c=Pi(a,p)))});else{if(a.issues.length===p)continue;c||(c=Pi(a,p))}}return d?d.then(()=>a):a},s=(a,o,l)=>{if(Pi(a))return a.aborted=!0,a;const c=i(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new Ii;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(d=>s(d,a,o)):s(c,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new Ii;return l.then(c=>i(c,n,o))}return i(l,n,o)}}Be(e,"~standard",()=>({validate:i=>{try{const s=Sw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Ew(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),uu=G("$ZodString",(e,t)=>{ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??e0(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ye=G("$ZodStringFormat",(e,t)=>{Ka.init(e,t),uu.init(e,t)}),b0=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=qw),Ye.init(e,t)}),_0=G("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=nh(r))}else t.pattern??(t.pattern=nh());Ye.init(e,t)}),w0=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Uw),Ye.init(e,t)}),k0=G("$ZodURL",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Kw.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),S0=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bw()),Ye.init(e,t)}),E0=G("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Lw),Ye.init(e,t)}),x0=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$w),Ye.init(e,t)}),T0=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Mw),Ye.init(e,t)}),A0=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Fw),Ye.init(e,t)}),C0=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Nw),Ye.init(e,t)}),O0=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Rw),Ye.init(e,t)}),D0=G("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Xw(t)),Ye.init(e,t)}),I0=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Jw),Ye.init(e,t)}),P0=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Qw(t)),Ye.init(e,t)}),$0=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zw),Ye.init(e,t)}),M0=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jw),Ye.init(e,t),e._zod.bag.format="ipv4"}),F0=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Zw),Ye.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),N0=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ww),Ye.init(e,t)}),R0=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Hw),Ye.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ch(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var L0=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Gw),Ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ch(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function z0(e){if(!ih.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return ch(t.padEnd(Math.ceil(t.length/4)*4,"="))}var q0=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ih),Ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{z0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),U0=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Yw),Ye.init(e,t)});function V0(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var B0=G("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{V0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),dh=G("$ZodNumber",(e,t)=>{ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??r0,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),j0=G("$ZodNumberFormat",(e,t)=>{a0.init(e,t),dh.init(e,t)}),Z0=G("$ZodUnknown",(e,t)=>{ct.init(e,t),e._zod.parse=r=>r}),W0=G("$ZodNever",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function fh(e,t,r){e.issues.length&&t.issues.push(...Xf(r,e.issues)),t.value[r]=e.value}var H0=G("$ZodArray",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?s.push(l.then(c=>fh(c,r,a))):fh(l,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Ya(e,t,r,n,i,s){const a=r in n;if(e.issues.length){if(i&&s&&!a)return;t.issues.push(...Xf(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function hh(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=dw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ph(e,t,r,n,i,s){const a=[],o=i.keySet,l=i.catchall._zod,c=l.def.type,d=l.optin==="optional",u=l.optout==="optional";for(const p in t){if(p==="__proto__"||o.has(p))continue;if(c==="never"){a.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Ya(g,r,p,t,d,u))):Ya(h,r,p,t,d,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var G0=G("$ZodObject",(e,t)=>{if(ct.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const o={...a};return Object.defineProperty(t,"shape",{value:o}),o}})}const r=nu(()=>hh(t));Be(e._zod,"propValues",()=>{const a=t.shape,o={};for(const l in a){const c=a[l]._zod;if(c.values){o[l]??(o[l]=new Set);for(const d of c.values)o[l].add(d)}}return o});const n=ja,i=t.catchall;let s;e._zod.parse=(a,o)=>{s??(s=r.value);const l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const c=[],d=s.shape;for(const u of s.keys){const p=d[u],h=p._zod.optin==="optional",g=p._zod.optout==="optional",m=p._zod.run({value:l[u],issues:[]},o);m instanceof Promise?c.push(m.then(v=>Ya(v,a,u,l,h,g))):Ya(m,a,u,l,h,g)}return i?ph(c,l,a,o,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),K0=G("$ZodObjectJIT",(e,t)=>{G0.init(e,t);const r=e._zod.parse,n=nu(()=>hh(t)),i=p=>{const h=new g0(["shape","payload","ctx"]),g=n.value,m=x=>{const T=Yf(x);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};h.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const x of g.keys)v[x]=`key_${y++}`;h.write("const newResult = {};");for(const x of g.keys){const T=v[x],S=Yf(x),O=p[x],P=O?._zod?.optin==="optional",R=O?._zod?.optout==="optional";h.write(`const ${T} = ${m(x)};`),P&&R?h.write(`
14
+ `))}},_0={major:4,minor:4,patch:3},ct=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,o,l)=>{let c=Pi(a),f;for(const u of o){if(u._zod.def.when){if(kw(a)||!u._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,h=u._zod.check(a);if(h instanceof Promise&&l?.async===!1)throw new Ii;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(c||(c=Pi(a,p)))});else{if(a.issues.length===p)continue;c||(c=Pi(a,p))}}return f?f.then(()=>a):a},s=(a,o,l)=>{if(Pi(a))return a.aborted=!0,a;const c=i(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new Ii;return c.then(f=>e._zod.parse(f,l))}return e._zod.parse(c,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(f=>s(f,a,o)):s(c,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new Ii;return l.then(c=>i(c,n,o))}return i(l,n,o)}}Be(e,"~standard",()=>({validate:i=>{try{const s=xw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Tw(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),cu=G("$ZodString",(e,t)=>{ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??r0(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Je=G("$ZodStringFormat",(e,t)=>{Ya.init(e,t),cu.init(e,t)}),w0=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Vw),Je.init(e,t)}),k0=G("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=nh(r))}else t.pattern??(t.pattern=nh());Je.init(e,t)}),S0=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Bw),Je.init(e,t)}),E0=G("$ZodURL",(e,t)=>{Je.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Jw.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),x0=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Zw()),Je.init(e,t)}),T0=G("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qw),Je.init(e,t)}),A0=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Fw),Je.init(e,t)}),C0=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Nw),Je.init(e,t)}),O0=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Rw),Je.init(e,t)}),D0=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Lw),Je.init(e,t)}),I0=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zw),Je.init(e,t)}),P0=G("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=t0(t)),Je.init(e,t)}),$0=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xw),Je.init(e,t)}),M0=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=e0(t)),Je.init(e,t)}),F0=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Uw),Je.init(e,t)}),N0=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ww),Je.init(e,t),e._zod.bag.format="ipv4"}),R0=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Hw),Je.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),L0=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Gw),Je.init(e,t)}),z0=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Kw),Je.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ch(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var q0=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Yw),Je.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ch(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function U0(e){if(!ih.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return ch(t.padEnd(Math.ceil(t.length/4)*4,"="))}var V0=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ih),Je.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{U0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),B0=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qw),Je.init(e,t)});function j0(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var Z0=G("$ZodJWT",(e,t)=>{Je.init(e,t),e._zod.check=r=>{j0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),dh=G("$ZodNumber",(e,t)=>{ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??i0,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),W0=G("$ZodNumberFormat",(e,t)=>{l0.init(e,t),dh.init(e,t)}),H0=G("$ZodUnknown",(e,t)=>{ct.init(e,t),e._zod.parse=r=>r}),G0=G("$ZodNever",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function fh(e,t,r){e.issues.length&&t.issues.push(...Xf(r,e.issues)),t.value[r]=e.value}var K0=G("$ZodArray",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?s.push(l.then(c=>fh(c,r,a))):fh(l,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function Ja(e,t,r,n,i,s){const a=r in n;if(e.issues.length){if(i&&s&&!a)return;t.issues.push(...Xf(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function hh(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=hw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ph(e,t,r,n,i,s){const a=[],o=i.keySet,l=i.catchall._zod,c=l.def.type,f=l.optin==="optional",u=l.optout==="optional";for(const p in t){if(p==="__proto__"||o.has(p))continue;if(c==="never"){a.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Ja(g,r,p,t,f,u))):Ja(h,r,p,t,f,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var Y0=G("$ZodObject",(e,t)=>{if(ct.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const o={...a};return Object.defineProperty(t,"shape",{value:o}),o}})}const r=iu(()=>hh(t));Be(e._zod,"propValues",()=>{const a=t.shape,o={};for(const l in a){const c=a[l]._zod;if(c.values){o[l]??(o[l]=new Set);for(const f of c.values)o[l].add(f)}}return o});const n=Za,i=t.catchall;let s;e._zod.parse=(a,o)=>{s??(s=r.value);const l=a.value;if(!n(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const c=[],f=s.shape;for(const u of s.keys){const p=f[u],h=p._zod.optin==="optional",g=p._zod.optout==="optional",m=p._zod.run({value:l[u],issues:[]},o);m instanceof Promise?c.push(m.then(v=>Ja(v,a,u,l,h,g))):Ja(m,a,u,l,h,g)}return i?ph(c,l,a,o,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),J0=G("$ZodObjectJIT",(e,t)=>{Y0.init(e,t);const r=e._zod.parse,n=iu(()=>hh(t)),i=p=>{const h=new b0(["shape","payload","ctx"]),g=n.value,m=k=>{const T=Yf(k);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};h.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const k of g.keys)v[k]=`key_${y++}`;h.write("const newResult = {};");for(const k of g.keys){const T=v[k],S=Yf(k),O=p[k],P=O?._zod?.optin==="optional",R=O?._zod?.optout==="optional";h.write(`const ${T} = ${m(k)};`),P&&R?h.write(`
15
15
  if (${T}.issues.length) {
16
16
  if (${S} in input) {
17
17
  payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
@@ -70,16 +70,16 @@ ${i}
70
70
  }
71
71
  }
72
72
 
73
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const k=h.compile();return(x,T)=>k(p,x,T)};let s;const a=ja,o=!Ba.jitless,c=o&&uw.value,d=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return a(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),d?ph([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function mh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Pi(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Xn(a,n,Jn())))}),t)}var Y0=G("$ZodUnion",(e,t)=>{ct.init(e,t),Be(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>su(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const a=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(o=>mh(o,n,e,i)):mh(a,n,e,i)}}),J0=G("$ZodIntersection",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([o,l])=>vh(r,o,l)):vh(r,s,a)}});function cu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fs(e)&&Fs(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=cu(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=cu(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function vh(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),Pi(e))return e;const a=cu(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Q0=G("$ZodEnum",(e,t)=>{ct.init(e,t);const r=Gf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>cw.has(typeof i)).map(i=>typeof i=="string"?Za(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),X0=G("$ZodTransform",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Hf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Ii;return r.value=i,r.fallback=!0,r}});function gh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var yh=G("$ZodOptional",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${su(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(a=>gh(a,i)):gh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),ek=G("$ZodExactOptional",(e,t)=>{yh.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),tk=G("$ZodNullable",(e,t)=>{ct.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${su(r.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),rk=G("$ZodDefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>bh(s,t)):bh(i,t)}});function bh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var nk=G("$ZodPrefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ik=G("$ZodNonOptional",(e,t)=>{ct.init(e,t),Be(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>_h(s,e)):_h(i,e)}});function _h(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var sk=G("$ZodCatch",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Xn(a,n,Jn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Xn(s,n,Jn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),ak=G("$ZodPipe",(e,t)=>{ct.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Ja(a,t.in,n)):Ja(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ja(s,t.out,n)):Ja(i,t.out,n)}});function Ja(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var ok=G("$ZodReadonly",(e,t)=>{ct.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(wh):wh(i)}});function wh(e){return e.value=Object.freeze(e.value),e}var lk=G("$ZodCustom",(e,t)=>{Ut.init(e,t),ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>kh(s,r,n,e));kh(i,r,n,e)}});function kh(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Ns(i))}}var Sh,uk=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ck(){return new uk}(Sh=globalThis).__zod_globalRegistry??(Sh.__zod_globalRegistry=ck());var Rs=globalThis.__zod_globalRegistry;function dk(e,t){return new e({type:"string",...be(t)})}function fk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function Eh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function hk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function pk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function mk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function vk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function gk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function yk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function bk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function wk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function kk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function Sk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function Ek(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function xk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function Tk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function Ak(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function Ck(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function Ok(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function Dk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function Ik(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function Pk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function $k(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function Mk(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function Fk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Nk(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function Rk(e,t){return new e({type:"number",checks:[],...be(t)})}function Lk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function zk(e){return new e({type:"unknown"})}function qk(e,t){return new e({type:"never",...be(t)})}function xh(e,t){return new lh({check:"less_than",...be(t),value:e,inclusive:!1})}function du(e,t){return new lh({check:"less_than",...be(t),value:e,inclusive:!0})}function Th(e,t){return new uh({check:"greater_than",...be(t),value:e,inclusive:!1})}function fu(e,t){return new uh({check:"greater_than",...be(t),value:e,inclusive:!0})}function Ah(e,t){return new s0({check:"multiple_of",...be(t),value:e})}function Ch(e,t){return new o0({check:"max_length",...be(t),maximum:e})}function Qa(e,t){return new l0({check:"min_length",...be(t),minimum:e})}function Oh(e,t){return new u0({check:"length_equals",...be(t),length:e})}function Uk(e,t){return new c0({check:"string_format",format:"regex",...be(t),pattern:e})}function Vk(e){return new d0({check:"string_format",format:"lowercase",...be(e)})}function Bk(e){return new f0({check:"string_format",format:"uppercase",...be(e)})}function jk(e,t){return new h0({check:"string_format",format:"includes",...be(t),includes:e})}function Zk(e,t){return new p0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function Wk(e,t){return new m0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function $i(e){return new v0({check:"overwrite",tx:e})}function Hk(e){return $i(t=>t.normalize(e))}function Gk(){return $i(e=>e.trim())}function Kk(){return $i(e=>e.toLowerCase())}function Yk(){return $i(e=>e.toUpperCase())}function Jk(){return $i(e=>lw(e))}function Qk(e,t,r){return new e({type:"array",element:t,...be(r)})}function Xk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function eS(e,t){const r=tS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ns(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Ns(s))}},e(n.value,n)),t);return r}function tS(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function Dh(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Rs,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function _t(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const u=a.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),_t(d,t,c),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Ot(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ih(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const i=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(a[0])?.id,u=e.external.uri??(h=>h);if(d)return{ref:u(d)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(a[1]===r)return{ref:"#"};const l=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:c}=i(a);o.def={...o.schema},c&&(o.defId=c);const d=o.schema;for(const u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
73
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const x=h.compile();return(k,T)=>x(p,k,T)};let s;const a=Za,o=!ja.jitless,c=o&&dw.value,f=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return a(g)?o&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),f?ph([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function mh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!Pi(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(a=>Xn(a,n,Jn())))}),t)}var Q0=G("$ZodUnion",(e,t)=>{ct.init(e,t),Be(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Be(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>au(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let s=!1;const a=[];for(const o of t.options){const l=o._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(o=>mh(o,n,e,i)):mh(a,n,e,i)}}),X0=G("$ZodIntersection",(e,t)=>{ct.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),a=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([o,l])=>vh(r,o,l)):vh(r,s,a)}});function du(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fs(e)&&Fs(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of n){const a=du(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};i[s]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=t[n],a=du(i,s);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function vh(e,t,r){const n=new Map;let i;for(const o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of r.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const s=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(s.length&&i&&e.issues.push({...i,keys:s}),Pi(e))return e;const a=du(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var ek=G("$ZodEnum",(e,t)=>{ct.init(e,t);const r=Gf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>fw.has(typeof i)).map(i=>typeof i=="string"?Wa(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),tk=G("$ZodTransform",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Hf(e.constructor.name);const i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r.fallback=!0,r));if(i instanceof Promise)throw new Ii;return r.value=i,r.fallback=!0,r}});function gh(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var yh=G("$ZodOptional",(e,t)=>{ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${au(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const i=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(a=>gh(a,i)):gh(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),rk=G("$ZodExactOptional",(e,t)=>{yh.init(e,t),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),nk=G("$ZodNullable",(e,t)=>{ct.init(e,t),Be(e._zod,"optin",()=>t.innerType._zod.optin),Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${au(r.source)}|null)$`):void 0}),Be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ik=G("$ZodDefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>bh(s,t)):bh(i,t)}});function bh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var sk=G("$ZodPrefault",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ak=G("$ZodNonOptional",(e,t)=>{ct.init(e,t),Be(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>_h(s,e)):_h(i,e)}});function _h(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var ok=G("$ZodCatch",(e,t)=>{ct.init(e,t),e._zod.optin="optional",Be(e._zod,"optout",()=>t.innerType._zod.optout),Be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(a=>Xn(a,n,Jn()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Xn(s,n,Jn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),lk=G("$ZodPipe",(e,t)=>{ct.init(e,t),Be(e._zod,"values",()=>t.in._zod.values),Be(e._zod,"optin",()=>t.in._zod.optin),Be(e._zod,"optout",()=>t.out._zod.optout),Be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(a=>Qa(a,t.in,n)):Qa(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Qa(s,t.out,n)):Qa(i,t.out,n)}});function Qa(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var uk=G("$ZodReadonly",(e,t)=>{ct.init(e,t),Be(e._zod,"propValues",()=>t.innerType._zod.propValues),Be(e._zod,"values",()=>t.innerType._zod.values),Be(e._zod,"optin",()=>t.innerType?._zod?.optin),Be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(wh):wh(i)}});function wh(e){return e.value=Object.freeze(e.value),e}var ck=G("$ZodCustom",(e,t)=>{Ut.init(e,t),ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>kh(s,r,n,e));kh(i,r,n,e)}});function kh(e,t,r,n){if(!e){const i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Ns(i))}}var Sh,dk=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fk(){return new dk}(Sh=globalThis).__zod_globalRegistry??(Sh.__zod_globalRegistry=fk());var Rs=globalThis.__zod_globalRegistry;function hk(e,t){return new e({type:"string",...be(t)})}function pk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function Eh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function mk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function vk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function gk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function yk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function bk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function wk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function kk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function Sk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function Ek(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function xk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function Tk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function Ak(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function Ck(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function Ok(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function Dk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function Ik(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function Pk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function $k(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function Mk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function Fk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function Nk(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function Rk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Lk(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function zk(e,t){return new e({type:"number",checks:[],...be(t)})}function qk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function Uk(e){return new e({type:"unknown"})}function Vk(e,t){return new e({type:"never",...be(t)})}function xh(e,t){return new lh({check:"less_than",...be(t),value:e,inclusive:!1})}function fu(e,t){return new lh({check:"less_than",...be(t),value:e,inclusive:!0})}function Th(e,t){return new uh({check:"greater_than",...be(t),value:e,inclusive:!1})}function hu(e,t){return new uh({check:"greater_than",...be(t),value:e,inclusive:!0})}function Ah(e,t){return new o0({check:"multiple_of",...be(t),value:e})}function Ch(e,t){return new u0({check:"max_length",...be(t),maximum:e})}function Xa(e,t){return new c0({check:"min_length",...be(t),minimum:e})}function Oh(e,t){return new d0({check:"length_equals",...be(t),length:e})}function Bk(e,t){return new f0({check:"string_format",format:"regex",...be(t),pattern:e})}function jk(e){return new h0({check:"string_format",format:"lowercase",...be(e)})}function Zk(e){return new p0({check:"string_format",format:"uppercase",...be(e)})}function Wk(e,t){return new m0({check:"string_format",format:"includes",...be(t),includes:e})}function Hk(e,t){return new v0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function Gk(e,t){return new g0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function $i(e){return new y0({check:"overwrite",tx:e})}function Kk(e){return $i(t=>t.normalize(e))}function Yk(){return $i(e=>e.trim())}function Jk(){return $i(e=>e.toLowerCase())}function Qk(){return $i(e=>e.toUpperCase())}function Xk(){return $i(e=>cw(e))}function eS(e,t,r){return new e({type:"array",element:t,...be(r)})}function tS(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function rS(e,t){const r=nS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ns(i,n.value,r._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(Ns(s))}},e(n.value,n)),t);return r}function nS(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function Dh(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Rs,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function _t(e,t,r={path:[],schemaPath:[]}){var n;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const u=a.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,u,c)}const f=e._zod.parent;f&&(a.ref||(a.ref=f),_t(f,t,c),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Dt(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ih(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const i=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(a[0])?.id,u=e.external.uri??(h=>h);if(f)return{ref:u(f)};const p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${u("__shared")}#/${o}/${p}`}}if(a[1]===r)return{ref:"#"};const l=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:c}=i(a);o.def={...o.schema},c&&(o.defId=c);const f=o.schema;for(const u in f)delete f[u];f.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
74
74
 
75
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Ph(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,d),o._zod.parent===u)for(const m in c)m==="$ref"||m==="allOf"||m in d||delete c[m];if(g.$ref&&h.def)for(const m in c)m==="$ref"||m==="allOf"||m in h.def&&JSON.stringify(c[m])===JSON.stringify(h.def[m])&&delete c[m]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xa(t,"input",e.processors),output:Xa(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Ot(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ot(n.element,r);if(n.type==="set")return Ot(n.valueType,r);if(n.type==="lazy")return Ot(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Ot(n.innerType,r);if(n.type==="intersection")return Ot(n.left,r)||Ot(n.right,r);if(n.type==="record"||n.type==="map")return Ot(n.keyType,r)||Ot(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ot(n.in,r)||Ot(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Ot(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Ot(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Ot(i,r))return!0;return!!(n.rest&&Ot(n.rest,r))}return!1}var rS=(e,t={})=>r=>{const n=Dh({...r,processors:t});return _t(e,n),Ih(n,e),Ph(n,e)},Xa=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Dh({...i??{},target:s,io:t,processors:r});return _t(e,a),Ih(a,e),Ph(a,e)},nS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=nS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const d=[...l];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},sS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},aS=(e,t,r,n)=>{r.not={}},oS=(e,t,r,n)=>{},lS=(e,t,r,n)=>{const i=e._zod.def,s=Gf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},uS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},cS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},dS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=_t(s.element,t,{...n,path:[...n.path,"items"]})},fS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=_t(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const d=s.shape[c]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=_t(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},hS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>_t(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},pS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=_t(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},mS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},vS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},gS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},yS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},bS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},_S=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;_t(a,t,n);const o=t.seen.get(e);o.ref=a},wS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},$h=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},kS=G("ZodISODateTime",(e,t)=>{D0.init(e,t),Xe.init(e,t)});function SS(e){return $k(kS,e)}var ES=G("ZodISODate",(e,t)=>{I0.init(e,t),Xe.init(e,t)});function xS(e){return Mk(ES,e)}var TS=G("ZodISOTime",(e,t)=>{P0.init(e,t),Xe.init(e,t)});function AS(e){return Fk(TS,e)}var CS=G("ZodISODuration",(e,t)=>{$0.init(e,t),Xe.init(e,t)});function OS(e){return Nk(CS,e)}var DS=(e,t)=>{th.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>kw(e,r)},flatten:{value:r=>ww(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ru,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ru,2)}},isEmpty:{get(){return e.issues.length===0}}})},cr=G("ZodError",DS,{Parent:Error}),IS=ou(cr),PS=lu(cr),$S=Ha(cr),MS=Ga(cr),FS=xw(cr),NS=Tw(cr),RS=Aw(cr),LS=Cw(cr),zS=Ow(cr),qS=Dw(cr),US=Iw(cr),VS=Pw(cr),Mh=new WeakMap;function Ls(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=G("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xa(e,"input"),output:Xa(e,"output")}}),e.toJSONSchema=rS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>IS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>$S(e,r,n),e.parseAsync=async(r,n)=>PS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>MS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>FS(e,r,n),e.decode=(r,n)=>NS(e,r,n),e.encodeAsync=async(r,n)=>RS(e,r,n),e.decodeAsync=async(r,n)=>LS(e,r,n),e.safeEncode=(r,n)=>zS(e,r,n),e.safeDecode=(r,n)=>qS(e,r,n),e.safeEncodeAsync=async(r,n)=>US(e,r,n),e.safeDecodeAsync=async(r,n)=>VS(e,r,n),Ls(e,"ZodType",{check(...r){const n=this.def;return this.clone(An(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Cn(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check($1(r,n))},superRefine(r,n){return this.check(M1(r,n))},overwrite(r){return this.check($i(r))},optional(){return Vh(this)},exactOptional(){return w1(this)},nullable(){return Bh(this)},nullish(){return Vh(Bh(this))},nonoptional(r){return A1(this,r)},array(){return qh(this)},or(r){return p1([this,r])},and(r){return v1(this,r)},transform(r){return Zh(this,b1(r))},default(r){return E1(this,r)},prefault(r){return T1(this,r)},catch(r){return O1(this,r)},pipe(r){return Zh(this,r)},readonly(){return P1(this)},describe(r){const n=this.clone();return Rs.add(n,{description:r}),n},meta(...r){if(r.length===0)return Rs.get(this);const n=this.clone();return Rs.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Rs.get(e)?.description},configurable:!0}),e)),Fh=G("_ZodString",(e,t)=>{uu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>iS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ls(e,"_ZodString",{regex(...n){return this.check(Uk(...n))},includes(...n){return this.check(jk(...n))},startsWith(...n){return this.check(Zk(...n))},endsWith(...n){return this.check(Wk(...n))},min(...n){return this.check(Qa(...n))},max(...n){return this.check(Ch(...n))},length(...n){return this.check(Oh(...n))},nonempty(...n){return this.check(Qa(1,...n))},lowercase(n){return this.check(Vk(n))},uppercase(n){return this.check(Bk(n))},trim(){return this.check(Gk())},normalize(...n){return this.check(Hk(...n))},toLowerCase(){return this.check(Kk())},toUpperCase(){return this.check(Yk())},slugify(){return this.check(Jk())}})}),BS=G("ZodString",(e,t)=>{uu.init(e,t),Fh.init(e,t),e.email=r=>e.check(fk(jS,r)),e.url=r=>e.check(gk(ZS,r)),e.jwt=r=>e.check(Pk(a1,r)),e.emoji=r=>e.check(yk(WS,r)),e.guid=r=>e.check(Eh(Nh,r)),e.uuid=r=>e.check(hk(eo,r)),e.uuidv4=r=>e.check(pk(eo,r)),e.uuidv6=r=>e.check(mk(eo,r)),e.uuidv7=r=>e.check(vk(eo,r)),e.nanoid=r=>e.check(bk(HS,r)),e.guid=r=>e.check(Eh(Nh,r)),e.cuid=r=>e.check(_k(GS,r)),e.cuid2=r=>e.check(wk(KS,r)),e.ulid=r=>e.check(kk(YS,r)),e.base64=r=>e.check(Ok(n1,r)),e.base64url=r=>e.check(Dk(i1,r)),e.xid=r=>e.check(Sk(JS,r)),e.ksuid=r=>e.check(Ek(QS,r)),e.ipv4=r=>e.check(xk(XS,r)),e.ipv6=r=>e.check(Tk(e1,r)),e.cidrv4=r=>e.check(Ak(t1,r)),e.cidrv6=r=>e.check(Ck(r1,r)),e.e164=r=>e.check(Ik(s1,r)),e.datetime=r=>e.check(SS(r)),e.date=r=>e.check(xS(r)),e.time=r=>e.check(AS(r)),e.duration=r=>e.check(OS(r))});function dr(e){return dk(BS,e)}var Xe=G("ZodStringFormat",(e,t)=>{Ye.init(e,t),Fh.init(e,t)}),jS=G("ZodEmail",(e,t)=>{w0.init(e,t),Xe.init(e,t)}),Nh=G("ZodGUID",(e,t)=>{b0.init(e,t),Xe.init(e,t)}),eo=G("ZodUUID",(e,t)=>{_0.init(e,t),Xe.init(e,t)}),ZS=G("ZodURL",(e,t)=>{k0.init(e,t),Xe.init(e,t)}),WS=G("ZodEmoji",(e,t)=>{S0.init(e,t),Xe.init(e,t)}),HS=G("ZodNanoID",(e,t)=>{E0.init(e,t),Xe.init(e,t)}),GS=G("ZodCUID",(e,t)=>{x0.init(e,t),Xe.init(e,t)}),KS=G("ZodCUID2",(e,t)=>{T0.init(e,t),Xe.init(e,t)}),YS=G("ZodULID",(e,t)=>{A0.init(e,t),Xe.init(e,t)}),JS=G("ZodXID",(e,t)=>{C0.init(e,t),Xe.init(e,t)}),QS=G("ZodKSUID",(e,t)=>{O0.init(e,t),Xe.init(e,t)}),XS=G("ZodIPv4",(e,t)=>{M0.init(e,t),Xe.init(e,t)}),e1=G("ZodIPv6",(e,t)=>{F0.init(e,t),Xe.init(e,t)}),t1=G("ZodCIDRv4",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),r1=G("ZodCIDRv6",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),n1=G("ZodBase64",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),i1=G("ZodBase64URL",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),s1=G("ZodE164",(e,t)=>{U0.init(e,t),Xe.init(e,t)}),a1=G("ZodJWT",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),Rh=G("ZodNumber",(e,t)=>{dh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>sS(e,n,i,s),Ls(e,"ZodNumber",{gt(n,i){return this.check(Th(n,i))},gte(n,i){return this.check(fu(n,i))},min(n,i){return this.check(fu(n,i))},lt(n,i){return this.check(xh(n,i))},lte(n,i){return this.check(du(n,i))},max(n,i){return this.check(du(n,i))},int(n){return this.check(Lh(n))},safe(n){return this.check(Lh(n))},positive(n){return this.check(Th(0,n))},nonnegative(n){return this.check(fu(0,n))},negative(n){return this.check(xh(0,n))},nonpositive(n){return this.check(du(0,n))},multipleOf(n,i){return this.check(Ah(n,i))},step(n,i){return this.check(Ah(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function zs(e){return Rk(Rh,e)}var o1=G("ZodNumberFormat",(e,t)=>{j0.init(e,t),Rh.init(e,t)});function Lh(e){return Lk(o1,e)}var l1=G("ZodUnknown",(e,t)=>{Z0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oS(e,r,n,i)});function zh(){return zk(l1)}var u1=G("ZodNever",(e,t)=>{W0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aS(e,r,n,i)});function c1(e){return qk(u1,e)}var d1=G("ZodArray",(e,t)=>{H0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dS(e,r,n,i),e.element=t.element,Ls(e,"ZodArray",{min(r,n){return this.check(Qa(r,n))},nonempty(r){return this.check(Qa(1,r))},max(r,n){return this.check(Ch(r,n))},length(r,n){return this.check(Oh(r,n))},unwrap(){return this.element}})});function qh(e,t){return Qk(d1,e,t)}var f1=G("ZodObject",(e,t)=>{K0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fS(e,r,n,i),Be(e,"shape",()=>t.shape),Ls(e,"ZodObject",{keyof(){return g1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:zh()})},loose(){return this.clone({...this._zod.def,catchall:zh()})},strict(){return this.clone({...this._zod.def,catchall:c1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return mw(this,r)},safeExtend(r){return vw(this,r)},merge(r){return gw(this,r)},pick(r){return hw(this,r)},omit(r){return pw(this,r)},partial(...r){return yw(Uh,this,r[0])},required(...r){return bw(jh,this,r[0])}})});function hu(e,t){return new f1({type:"object",shape:e??{},...be(t)})}var h1=G("ZodUnion",(e,t)=>{Y0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hS(e,r,n,i),e.options=t.options});function p1(e,t){return new h1({type:"union",options:e,...be(t)})}var m1=G("ZodIntersection",(e,t)=>{J0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i)});function v1(e,t){return new m1({type:"intersection",left:e,right:t})}var pu=G("ZodEnum",(e,t)=>{Q0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>lS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new pu({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new pu({...t,checks:[],...be(i),entries:s})}});function g1(e,t){return new pu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var y1=G("ZodTransform",(e,t)=>{X0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Hf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ns(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ns(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function b1(e){return new y1({type:"transform",transform:e})}var Uh=G("ZodOptional",(e,t)=>{yh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Vh(e){return new Uh({type:"optional",innerType:e})}var _1=G("ZodExactOptional",(e,t)=>{ek.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function w1(e){return new _1({type:"optional",innerType:e})}var k1=G("ZodNullable",(e,t)=>{tk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new k1({type:"nullable",innerType:e})}var S1=G("ZodDefault",(e,t)=>{rk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function E1(e,t){return new S1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Qf(t)}})}var x1=G("ZodPrefault",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function T1(e,t){return new x1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Qf(t)}})}var jh=G("ZodNonOptional",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function A1(e,t){return new jh({type:"nonoptional",innerType:e,...be(t)})}var C1=G("ZodCatch",(e,t)=>{sk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function O1(e,t){return new C1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var D1=G("ZodPipe",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i),e.in=t.in,e.out=t.out});function Zh(e,t){return new D1({type:"pipe",in:e,out:t})}var I1=G("ZodReadonly",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function P1(e){return new I1({type:"readonly",innerType:e})}var Wh=G("ZodCustom",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uS(e,r,n,i)});function $1(e,t={}){return Xk(Wh,e,t)}function M1(e,t){return eS(e,t)}function F1(e,t={}){const r=new Wh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...be(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var N1=hu({id:zs(),customer:hu({customer_salutation_id:zs().positive({message:"user.fieldErrors.titleRequire"}),name:dr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:dr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:dr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:dr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:dr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:dr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:dr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:zs().positive().default(60),language_id:zs().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),ZF=hu({ticket_sale_id:zs(),start_at:dr().date(),personalizations:qh(N1)});function mu(e,t){return e-t*Math.floor(e/t)}var Hh=1721426;function to(e,t,r,n){t=vu(e,t);let i=t-1,s=-2;return r<=2?s=0:ro(t)&&(s=-1),Hh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function ro(e){return e%4===0&&(e%100!==0||e%400===0)}function vu(e,t){return e==="BC"?1-t:t}function R1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var L1={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,r=t-Hh,n=Math.floor(r/146097),i=mu(r,146097),s=Math.floor(i/36524),a=mu(i,36524),o=Math.floor(a/1461),l=mu(a,1461),c=Math.floor(l/365),[d,u]=R1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-to(d,u,1,1),h=2;t<to(d,u,3,1)?h=0:ro(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new Bs(d,u,g,t-to(d,u,g,1)+1)}toJulianDay(e){return to(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return L1[ro(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ro(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},z1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function On(e,t){return t=Yt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function gu(e,t){return t=Yt(t,e.calendar),e=bu(e),t=bu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function q1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function U1(e,t){return On(e,ei(t))}var V1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Gh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?V1[r]:H1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function B1(e){return Vr(Date.now(),e)}function ei(e){return Y1(B1(e))}function Kh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Yh(e,t){return Jh(e)-Jh(t)}function Jh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var yu=null,j1=!1;function Vt(){return yu==null&&(yu=new Intl.DateTimeFormat().resolvedOptions().timeZone),yu}function Qh(){return j1}function bu(e){return e.subtract({days:e.day-1})}function Z1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Xh=new Map,_u=new Map;function W1(e){if(Intl.Locale){let r=Xh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Xh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function H1(e){let t=_u.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return _u.set(e,t),t.firstDay}let r=W1(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&z1[r]||0};_u.set(e,t)}return t.firstDay}function Dn(e){return e=Yt(e,new Mi),ep(vu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ep(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function qs(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Qh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=rp(e,t);return ep(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var tp=new Map;function rp(e,t){let r=tp.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),tp.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var no=864e5;function G1(e,t){let r=Dn(e);return np(e,t,r-qs(r-no,t),r-qs(r+no,t))}function np(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>K1(e,t,i))}function K1(e,t,r){let n=rp(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=In(e);if(t==="UTC")return Dn(n);if(t===Vt()&&r==="compatible"&&!Qh()){n=Yt(n,new Mi);let l=new Date,c=vu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=Dn(n),s=qs(i-no,t),a=qs(i+no,t),o=np(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function ip(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Vr(e,t){let r=qs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new Pn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,d)}function Y1(e){return new Bs(e.calendar,e.era,e.year,e.month,e.day)}function In(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Fi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function J1(e){return new dE(e.hour,e.minute,e.second,e.millisecond)}function Yt(e,t){if(q1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,ti(n),n}function Q1(e,t,r){return e instanceof Pn?e.timeZone===t?e:sp(e,t):Vr(Ur(e,t,r),t)}function X1(e){let t=Dn(e)-e.offset;return new Date(t)}function sp(e,t){return Yt(Vr(Dn(e)-e.offset,t),e.calendar)}var Us=36e5;function io(e,t){let r=e.copy(),n="hour"in r?up(r,t):0;wu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,ku(r),ap(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,eE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function wu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function ku(e){for(;e.month<1;)wu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,wu(e,1)}function eE(e){for(;e.day<1;)e.month--,ku(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ku(e)}function ap(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ti(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ap(e)}function Su(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function op(e,t){return io(e,Su(t))}function Eu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),ti(r),r}function Vs(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),lp(r),r}function tE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=so(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=so(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=so(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=so(e.hour,24),t}function lp(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function so(e,t){let r=e%t;return r<0&&(r+=t),r}function up(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,tE(e)}function cp(e,t){let r=e.copy();return up(r,t),r}function rE(e,t){return cp(e,Su(t))}function xu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=an(a,r,0,s.length-1,n?.round),i.era=s[a],ti(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=an(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=an(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=an(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ti(i),i}function Tu(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=an(s,r,a,o,n?.round);break}case"minute":i.minute=an(e.minute,r,0,59,n?.round);break;case"second":i.second=an(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=an(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function an(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function dp(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(io(In(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=Dn(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Yt(Vr(r,e.timeZone),e.calendar)}function nE(e,t){return dp(e,Su(t))}function iE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=In(e),o=Yt(Vs(a,{hour:i}),new Mi),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===o.day)[0],c=Yt(Vs(a,{hour:s}),new Mi),d=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=Dn(e)-e.offset,p=Math.floor(u/Us),h=u%Us;return u=an(p,r,Math.floor(l/Us),Math.floor(d/Us),n?.round)*Us+h,Yt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Tu(e,t,r,n);case"era":case"year":case"month":case"day":return Yt(Vr(Ur(xu(In(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function sE(e,t,r){let n=In(e),i=Vs(Eu(n,t),t);return i.compare(n)===0?e:Yt(Vr(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var aE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,oE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,lE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Au=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,uE=["hours","minutes","seconds"],WF=["years","months","weeks","days",...uE];function ao(e){let t=e.match(aE);if(!t)throw Au.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Bs(qe(t[1],0,9999),qe(t[2],1,12),1);return r.day=qe(t[3],1,r.calendar.getDaysInMonth(r)),r}function fp(e){let t=e.match(oE);if(!t)throw Au.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=qe(t[1],-9999,9999),n=new Fi(r<1?"BC":"AD",r<1?-r+1:r,qe(t[2],1,12),1,t[4]?qe(t[4],0,23):0,t[5]?qe(t[5],0,59):0,t[6]?qe(t[6],0,59):0,t[7]?qe(t[7],0,1/0)*1e3:0);return n.day=qe(t[3],0,n.calendar.getDaysInMonth(n)),n}function hp(e,t){let r=e.match(lE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new Pn(n<1?"BC":"AD",n<1?-n+1:n,qe(r[2],1,12),1,r[11],0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);i.day=qe(r[3],0,i.calendar.getDaysInMonth(i));let s=In(i),a;if(r[8]){let o=qe(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),a=Dn(i)-i.offset,!G1(s,i.timeZone).includes(a))throw new Error(`Offset ${gp(i.offset)} is invalid for ${Cu(i)} in ${i.timeZone}`)}else a=Ur(In(s),i.timeZone,t);return Vr(a,i.timeZone)}function pp(e,t){let r=e.match(Au);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new Pn(n<1?"BC":"AD",n<1?-n+1:n,qe(r[2],1,12),1,t,0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);return i.day=qe(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=qe(r[8],-23,23)*36e5+qe(r[9]??"0",0,59)*6e4),sp(i,t)}function qe(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function mp(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function vp(e){let t=Yt(e,new Mi),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Cu(e){return`${vp(e)}T${mp(e)}`}function gp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function cE(e){return`${Cu(e)}${gp(e.offset)}[${e.timeZone}]`}function Ou(e){let t=typeof e[0]=="object"?e.shift():new Mi,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Bs=class fd{#e;constructor(...t){let[r,n,i,s,a]=Ou(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,ti(this)}copy(){return this.era?new fd(this.calendar,this.era,this.year,this.month,this.day):new fd(this.calendar,this.year,this.month,this.day)}add(t){return io(this,t)}subtract(t){return op(this,t)}set(t){return Eu(this,t)}cycle(t,r,n){return xu(this,t,r,n)}toDate(t){return ip(this,t)}toString(){return vp(this)}compare(t){return Kh(this,t)}},dE=class cy{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,lp(this)}copy(){return new cy(this.hour,this.minute,this.second,this.millisecond)}add(t){return cp(this,t)}subtract(t){return rE(this,t)}set(t){return Vs(this,t)}cycle(t,r,n){return Tu(this,t,r,n)}toString(){return mp(this)}compare(t){return Yh(this,t)}},Fi=class hd{#e;constructor(...t){let[r,n,i,s,a]=Ou(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ti(this)}copy(){return this.era?new hd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return io(this,t)}subtract(t){return op(this,t)}set(t){return Eu(Vs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return xu(this,t,r,n);default:return Tu(this,t,r,n)}}toDate(t,r){return ip(this,t,r)}toString(){return Cu(this)}compare(t){let r=Kh(this,t);return r===0?Yh(this,In(t)):r}},Pn=class pd{#e;constructor(...t){let[r,n,i,s,a]=Ou(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ti(this)}copy(){return this.era?new pd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new pd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return dp(this,t)}subtract(t){return nE(this,t)}set(t,r){return sE(this,t,r)}cycle(t,r,n){return iE(this,t,r,n)}toDate(){return X1(this)}toString(){return cE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-Q1(t,this.timeZone).toDate().getTime()}},Du=new Map,kr=class{constructor(e,t={}){this.formatter=yp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return pE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=mE(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}},fE={true:{ja:"h11"},false:{}};function yp(e,t={}){if(typeof t.hour12=="boolean"&&hE()){t={...t};let i=fE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Du.has(r))return Du.get(r);let n=new Intl.DateTimeFormat(e,t);return Du.set(r,n),n}var Iu=null;function hE(){return Iu==null&&(Iu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Iu}var Pu=null;function pE(){return Pu==null&&(Pu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Pu}function mE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=yp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function ri(e){return J1(pp(e,"Europe/Berlin")).toString().slice(0,-3)}function ni(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=pp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function js(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function $u(e){return e?.type==="Ticket"}function Br(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function Zs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function oo(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function $n(e,t=""){return rw(Object.values(e).map(r=>oo(r,{selectedTime:t})),r=>r.shop_order)}function Mn(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var bp=e=>qr(Object.values(e.mantle?.composition??{}));function vE(e){const t=e.quantity??0;return Br(e.product)?t*bp(e):t}function Mu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!$u(s.product))continue;const a=vE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var gE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!$u(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Mu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},yE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Br(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Mu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=bp(r),d=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,d),min:i.min_persons||0,bookedOut:d===0,unavailable:l===0}},bE=e=>Object.fromEntries(Zs(e).map(t=>[t.id,t.max_persons]));function _E(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Br(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Mu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(Zs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function lo(e){return e?.type==="Event"}function wE(e){return lo(e)&&e.subtype==="scale"}function kE(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Fu(e,t,r){return kE(e,t,r)}var SE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!lo(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,d=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},EE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function xE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=tu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return tu(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=tw(n,s=>s.timeSlot);return Object.values(i).map(s=>nw(iw(s.flatMap(a=>a.tickets)).map(a=>tu(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function TE(e){let t=0;Es(()=>{ge(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function _p(e){return e?.type==="Tour"}function wp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:AE(e)}}function AE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function CE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return wp({...l,totalPriceCents:n},{instanceKey:a})}var OE=0;function ot(e,t){const r={quantity:0,time:"",...t??{}};return Br(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(Zs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${OE++}`}),{...r,type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Br(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),wE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),_p(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Br(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return fr(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return fr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return fr(this.total_price_cents)}}}var HF=15*6e4;function uo(){return typeof window<"u"&&typeof localStorage<"u"}function DE(e,t){if(uo())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Nu(e){if(!uo())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function kp(e){if(uo())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function Sp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var Ep="go-cart",co=(e,t)=>localStorage.setItem(Ep,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function IE(e){const t=e.product.type;switch(t){case"Ticket":return Ru(e)?ot(oo(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle}):void 0;case"Event":return Ru(e)?ot(Fu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return Ru(e)?ot(CE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ot(Sp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function PE(e){let t=[],r=[],n;try{const i=localStorage.getItem(Ep);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),co([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(IE).filter(NE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),co([],[]),[]}}function $E(e){PE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});co(e.items||[],e.coupons||[]),Es(()=>{ge(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,co(e.items||[],e.coupons||[]))})})}var ME=e=>new Date<new Date(e),FE=e=>ao(e.slice(0,10)).compare(ei(Vt()))>=0,Ru=e=>e.time?e.product.subtype==="day"?FE(e.time):ME(e.time):!0,NE=e=>e!==void 0,RE=0;function Ni(e,t=20){const r={items:Me([]),coupons:Me([]),paymentModeId:void 0,uid:`cart-${RE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,n=>n.total_price_cents))},get totalQuantity(){return qr(this.items,n=>n.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(n=>n.kind==="valueVoucher"),n=>n.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(n=>n.uuid+":"+n.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(n=>({type:n.type,attributes:n.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??C.settings?.defaultPaymentModeId,coupons:this.coupons.map(n=>n.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return fr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(n){for(let i=this.items.length-1;i>=0;i--)this.items[i].uuid===n.uuid&&this.items.splice(i,1)},addItem(n){const i=this.items.find(s=>s.uuid===n.uuid);i?i.quantity+=n.quantity:this.items.push(n)},addItems(n){n.forEach(i=>this.addItem(i))},addCoupon(n){const i={...n,code:n.code.toUpperCase()};this.coupons.some(s=>s.code===i.code)||this.coupons.push(i)},removeCoupon(n){const i=n.toUpperCase(),s=this.coupons.findIndex(a=>a.code===i);s>-1&&this.coupons.splice(s,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(n=>r.addItem(ot(n))),r}function fr(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function LE(){const e=Me(Ni());return $E(e),TE(e),e}var Ri="go-capacity";function xp(e,t){const r=Nu(Ri);DE(Ri,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Tp(e){const t=Nu(Ri);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){kp(Ri);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function zE(e){uo()&&window.addEventListener("storage",t=>{if(t.key===Ri&&Tp(e),t.key==="go-cart"){const r=Nu("go-cart");(!r||!r.items||r.items.length===0)&&kp(Ri)}})}function Ap(){const e={allSeats:{},allQuotas:{},quotaManager:xE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&xp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&xp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Br(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:gE,mantle:yE,seats:SE,unlimited:EE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Le(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Br(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Le(()=>i==="mantle"?_E(this,t,r,n):bE(r.product))}};return Tp(e),zE(e),e}function Cp(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Op=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},qE=class extends Op{constructor(){super()}get isLoggedIn(){try{const e=Cp("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Cp("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},UE=class extends Op{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},VE=e=>{switch(e){case"angular":return new qE;case"jmb":return new UE;default:throw new Error("Unhandled shop type: "+e)}};function BE(e){return e==null||typeof e=="string"&&e.trim()===""}function jE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||BE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function ZE(e,t){return jE(e,t)}var WE={withStackTrace:!1},Dp=(e,t,r=WE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ii(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(n.next(d))}catch(u){a(u)}}function l(d){try{c(n.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):i(d.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Ip(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Pp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(m){return new Promise(function(v,y){s.push([h,m,v,y])>1||l(h,m)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(m){p(s[0][3],m)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(d,u):p(s[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function HE(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function GE(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ip=="function"?Ip(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var si=class yr{constructor(t){this._promise=t}static fromSafePromise(t){return new yr(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new yr(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new yr(ii(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return KE(t)}static combineWithAllErrors(t){return YE(t)}map(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new yr(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof yr?n._promise:n}))}orElse(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Pp(this,arguments,function*(){return yield jr(yield jr(yield*HE(GE(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Pp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fo(r.error))),yield jr(r.value)})}};function fo(e){return new si(Promise.resolve(new Sr(e)))}var GF=si.fromPromise,KF=si.fromSafePromise,YF=si.fromThrowable,$p=e=>{let t=Fn([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},KE=e=>si.fromSafePromise(Promise.all(e)).andThen($p),Mp=e=>{let t=Fn([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},YE=e=>si.fromSafePromise(Promise.all(e)).andThen(Mp),Lu;(function(e){function t(i,s){return(...a)=>{try{return Fn(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return $p(i)}e.combine=r;function n(i){return Mp(i)}e.combineWithAllErrors=n})(Lu||(Lu={}));function Fn(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Fn(e(this.value))}mapErr(e){return Fn(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return Fn(this.value)}orTee(e){return Fn(this.value)}orElse(e){return Fn(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return si.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Dp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return fo(this.error)}asyncAndThrough(e){return fo(this.error)}asyncMap(e){return fo(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Dp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},JF=Lu.fromThrowable,JE=/\{[^{}]+\}/g,QE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function XE(){return Math.random().toString(36).slice(2,11)}function ex(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=QE()?l:void 0,t=zp(t);const d=[];async function u(p,h){const{baseUrl:g,fetch:m=n,Request:v=r,headers:y,params:k={},parseAs:x="json",querySerializer:T,bodySerializer:S=s??rx,pathSerializer:O,body:P,middleware:R=[],...j}=h||{};let N=t;g&&(N=zp(g)??t);let B=typeof i=="function"?i:Rp(i);T&&(B=typeof T=="function"?T:Rp({...typeof i=="object"?i:{},...T}));const U=O||a||tx,oe=P===void 0?void 0:S(P,Lp(o,y,k.header)),pe=Lp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},o,y,k.header),Y=[...d,...R],ae={redirect:"follow",...c,...j,body:oe,headers:pe};let X,fe,ue=new v(nx(p,{baseUrl:N,params:k,querySerializer:B,pathSerializer:U}),ae),H;for(const F in j)F in ue||(ue[F]=j[F]);if(Y.length){X=XE(),fe=Object.freeze({baseUrl:N,fetch:m,parseAs:x,querySerializer:B,bodySerializer:S,pathSerializer:U});for(const F of Y)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const he=await F.onRequest({request:ue,schemaPath:p,params:k,options:fe,id:X});if(he)if(he instanceof v)ue=he;else if(he instanceof Response){H=he;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!H){try{H=await m(ue,l)}catch(F){let he=F;if(Y.length)for(let q=Y.length-1;q>=0;q--){const ce=Y[q];if(ce&&typeof ce=="object"&&typeof ce.onError=="function"){const se=await ce.onError({request:ue,error:he,schemaPath:p,params:k,options:fe,id:X});if(se){if(se instanceof Response){he=void 0,H=se;break}if(se instanceof Error){he=se;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(he)throw he}if(Y.length)for(let F=Y.length-1;F>=0;F--){const he=Y[F];if(he&&typeof he=="object"&&typeof he.onResponse=="function"){const q=await he.onResponse({request:ue,response:H,schemaPath:p,params:k,options:fe,id:X});if(q){if(!(q instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");H=q}}}}const ne=H.headers.get("Content-Length");if(H.status===204||ue.method==="HEAD"||ne==="0"&&!H.headers.get("Transfer-Encoding")?.includes("chunked"))return H.ok?{data:void 0,response:H}:{error:void 0,response:H};if(H.ok)return{data:await(async()=>{if(x==="stream")return H.body;if(x==="json"&&!ne){const he=await H.text();return he?JSON.parse(he):void 0}return await H[x]()})(),response:H};let de=await H.text();try{de=JSON.parse(de)}catch{}return{error:de,response:H}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");d.push(h)}},eject(...p){for(const h of p){const g=d.indexOf(h);g!==-1&&d.splice(g,1)}}}}function ho(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Fp(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(ho(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Np(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(ho(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Rp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Np(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Fp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ho(i,s,e))}}return n.join("&")}}function tx(e,t){let r=e;for(const n of e.match(JE)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Np(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Fp(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${ho(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function rx(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function nx(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function Lp(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function zp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function ix(e,t){return ex({baseUrl:e,headers:{"X-Shop-Url":t}})}var sx="/api/v4/calendar",ax="/api/v4/tickets/calendar",ox="/api/v4/auth/validate_token",lx="/api/v4/tickets/list_and_quotas",ux="/api/v4/tickets",cx="/api/v4/auth/sign_in",dx="/api/v4/auth",fx="/api/v4/orders/withdrawals",hx="/api/v4/customer/memberships/activate",px="/api/v4/orders",mx="/api/v4/customer/customer_addresses",qp={SHOP_GUEST:10,SHOP:20},zu={error:{success:!1,errors:["Not signed in"]}},vx=class{type;#e=ie(Me({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),f(this.#e).urls=G_(this.type),f(this.#e).currentUser=VE(this.type),f(this.#e).apiUrl=e,f(this.#e).shopDomain=t,f(this.#e).locale=r||"de",this.#t={},f(this.#e).client=ix(e,t),f(this.#e).capacityManager=Ap(),f(this.#e).cart=LE(),f(this.#e).auth=new Zf,f(this.#e).client.use(new aw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return f(this.#e).capacityManager||(f(this.#e).capacityManager=Ap()),f(this.#e).capacityManager}get cart(){return f(this.#e).cart}get auth(){return f(this.#e).auth||(f(this.#e).auth=new Zf),f(this.#e).auth}get currentUser(){return f(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return f(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return f(this.#e).apiUrl}get shopDomain(){return f(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return f(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return f(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(ox,"getCustomer","",{cache:5}):zu}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(px,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):zu}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(mx,"customerAddresses","",{cache:5}):zu}ticketsCalendar(e){return this.fetchAndCache(ax,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(sx,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(lx,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Et({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(ux,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:Et({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:Et({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(cx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Et({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?qp.SHOP_GUEST:qp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(dx,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(fx,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:Et({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}activateMembership(e){return this.apiPost(hx,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),f(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(f(this.#e)[t]=r===""?l:l[r])}),f(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return f(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:Et(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=ZE(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:Et(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await J_(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=Et(i,{params:{query:t}})),e&&(i=Et(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},C=new vx;function Li(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var gx=class dy{host;KEY;pollDuration;#e=ie(Me({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new dy(null,null);return r.value=t,r}load(){Xl(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return f(this.#e).value}set value(t){f(this.#e).value=t}};function zi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new gx(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var yx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},bx=class{defaultConfig=Et(yx,window.customOptions);override=this.defaultConfig;#e=ie(Me(this.defaultConfig));get options(){return f(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=Et(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=Et(this.override,e),this.update(),this}default(e){return this.defaultConfig=Et(this.defaultConfig,e),this.update(),this}},Je=new bx,Up=class{#e=ie();get token(){return f(this.#e)}set token(e){M(this.#e,e,!0)}#t=ie();get ticketSaleId(){return f(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){if(this.token)return pl(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return pl(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Je.config.urls.annualTicketPersonalizationForm?Je.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Vp="go-annual-ticket-personalization",Bp=Li(Vp),_x=zi(Vp),wx=V("<li><a> </a></li>"),kx=V('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function Sx(e,t){ee(t,!0);let r=_(t,"token",7);const n=new Up;Bp(t.$$host,n),ge(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=Q(),o=z(a),l=c=>{var d=Q(),u=z(d);Fe(u,17,()=>f(i).ticket_sales,p=>p.id,(p,h)=>{var g=kx(),m=$(g),v=$(m,!0);I(m);var y=W(m,2),k=$(y,!0);I(y);var x=W(y,2),T=S=>{var O=wx(),P=$(O),R=$(P,!0);I(P),I(O),J((j,N)=>{ve(P,"href",j),K(R,N)},[()=>n.goToPersonalization(f(h)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),E(S,O)};le(x,S=>{f(h).status=="not_ready_to_send"&&S(T)}),I(g),J(S=>{ve(g,"data-ticket-sale-id",f(h).id),K(v,f(h).title),K(k,S)},[()=>C.t("ticket.annual.personalization.detail.title",{count:f(h).personalizations.length})]),E(p,g)}),E(c,d)};return le(o,c=>{f(i)&&c(l)}),E(e,a),te(s)}customElements.define("go-annual-ticket-personalization",re(Sx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ex={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>C.customerSalutations.map(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:dr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:dr().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:dr().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>C.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>C.locales.map(e=>({label:C.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:dr().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:F1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(C.payment_modes?Object.values(C.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function xx(e,t){return{...e,errors:e.errors||[],value:e.value??Tx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){Ax(this)}}}function Tx(e){return e==="checkbox"?!1:e==="file"?null:""}function Ax(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Jt=class nl{static#e={};static defineForm(t){Je.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Je.default({fields:t})}static{nl.defineFields(Ex)}static setRequiredApiKeys(t,r){nl.#e[t]=r}static getFormOptions(t){return Je.config.forms[t]}static createField(t,r){const n=nl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return xx(n,r)}static getFormFields(t){return Cx(t)}static getFieldInit(t){return Je.config.fields[t]}};function Cx(e){const t=Je.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function qu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function Ox(e,t){ee(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i;const s=new Up;Bp(t.$$host,s),ge(()=>{s.token=r(),s.ticketSaleId=n()}),Jt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=jf(m,(S,O)=>{const P=v[O-1].details;return S.push(P),S},[]);if(y.forEach(S=>{S.fields.forEach(O=>{S.validateField(O)})}),!jf(m,(S,O)=>y[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const S=y.map(async(P,R)=>{const j=s.ticketSale.personalizations[R].id,N=P.fields.find(U=>U.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const B=await C.uploadPersonalizationPhoto(r(),j,N);return B.error?{ok:!1,error:B.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(S)).find(P=>!P.ok);if(O){i.details.apiErrors=[O.error];return}}const k={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((S,O)=>{const P=sw(S.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:P}})}},x=await C.finalizePersonalizations(r(),k);if(x.error){i.details.apiErrors=[x.error.error];return}const T=Je.config.forms.personalization?.beforeSubmit;T&&T(k),Je.config.urls.annualTicketPersonalizationFormSubmit?.()&&Je.config.navigateTo(Je.config.urls.annualTicketPersonalizationFormSubmit())}let o=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(m){if(!p()||!o||!l||!c)return;const v=o.parentElement;if(!v)return;const y=Math.max(m,1),k=Array.from(v.querySelectorAll("go-personalization-form"));for(;k.length<y;){const T=l.cloneNode(!0);u(T),v.insertBefore(T,c),k.push(T)}for(;k.length>y;){const T=k.pop();T&&T!==o&&T.remove()}const x=s.ticketSale?.personalizations??[];k.forEach((T,S)=>{const O=x[S];O&&(T.dataset.personalizationId=String(O.id))}),d=y}nn(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ge(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==d&&h(m)});var g={details:s,get token(){return r()},set token(m){r(m),b()},get ticketSaleId(){return n()},set ticketSaleId(m){n(m),b()}};return te(g)}customElements.define("go-annual-ticket-personalization-form",re(Ox,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var Dx=class{formId;form;#e=ie(Me([]));#t=D(()=>qu(this.fields)==0);get isValid(){return f(this.#t)}set isValid(e){M(this.#t,e)}#r=ie();get successMessage(){return f(this.#r)}set successMessage(e){M(this.#r,e,!0)}get formData(){function e(r){return ew(r)||Q_(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return f(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),eu(e)){M(this.#e,e,!0);return}if(e.errors&&eu(e.errors)&&M(this.#e,e.errors,!0),X_(e.error)){M(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},jp="go-form-details",Ix=Li(jp),qi=zi(jp);function on(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var Px=V("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function $x(e,t){ee(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new Dx(r(),t.$$host);Ix(t.$$host,i);async function s(d){d.preventDefault(),d.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",d)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",d)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}nn(()=>{const d=on(t.$$host,"form",{novalidate:!0});d.addEventListener("submit",s),i.form=d});var a={details:i,get formId(){return r()},set formId(d){r(d),b()},get custom(){return n()},set custom(d){n(d),b()}},o=Q(),l=z(o),c=d=>{var u=Px(),p=z(u),h=W(p,2),g=W(h,2),m=$(g,!0);I(g),J(v=>K(m,v),[()=>C.t(Jt.getFormOptions(r())?.submitLabel||"Submit")]),E(d,u)};return le(l,d=>{n()||d(c)}),E(e,o),te(a)}customElements.define("go-form",re($x,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Mx=V("<go-form></go-form>",2);function Fx(e,t){ee(t,!0);let r=_(t,"custom",7,!1);Jt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(a){const o=a.target.details,l=await C.passwordReset(o.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),o.successMessage=l.data.message,o.apiErrors=[]):o.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(a=!1){r(a),b()}},s=Mx();return Yn(s,"formId","passwordReset"),J(()=>Yn(s,"custom",r())),Na("submit",s,n),E(e,s),te(i)}customElements.define("go-password-reset",re(Fx,{custom:{}},[],[]));function Nx(e,t){ee(t,!0),Jt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await C.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return on(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),te({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",re(Nx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Rx(e,t){ee(t,!0);let r=_(t,"custom",7,!1);Jt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await C.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return on(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),te({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",re(Rx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Lx(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function zx(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function qx(e){return Lx(zx(e),0)}function Ux(e,t){const r=Ni(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(Vx(o,s))}),r}function Vx(e,t){const r=_p(e.product)?1:qx(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return ot({...e.product,price_cents:n},{quantity:r,time:e.time,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var Bx=class{#e=ie();get displayCart(){return f(this.#e)}set displayCart(e){M(this.#e,e,!0)}#t=ie(!1);get preview(){return f(this.#t)}set preview(e){M(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return C.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=C.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await C.createCart({items:t,coupons:r});if(n?.data){this.displayCart=Ux(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Zp="go-cart-details",jx=Li(Zp),Ui=zi(Zp),Zx=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Wp(e,t){ee(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=Zx(),s=$(i,!0);return I(i),J(()=>K(s,r().product.title)),E(e,i),te(n)}re(Wp,{cartItem:{}},[],[],{mode:"open"});var Wx=V('<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),Hx=V('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Hp(e,t){ee(t,!0);let r=_(t,"cartItem",7);if(!lo(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=Hx(),a=z(s),o=$(a),l=$(o,!0);I(o);var c=W(o),d=$(c,!0);I(c),I(a);var u=W(a),p=h=>{var g=Wx(),m=z(g),v=$(m,!0);I(m);var y=W(m),k=$(y,!0);I(y),J((x,T)=>{K(v,x),K(k,T)},[()=>ni(r().time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().time)]),E(h,g)};return le(u,h=>{r().time&&h(p)}),J(()=>{K(l,n.event_title),K(d,n.title)}),E(e,s),te(i)}re(Hp,{cartItem:{}},[],[],{mode:"open"});var Gx=V('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Kx=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Yx=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Gp(e,t){ee(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),b()}},i=Yx(),s=z(i),a=$(s,!0);I(s);var o=W(s,2),l=c=>{var d=Kx(),u=z(d),p=$(u,!0);I(u);var h=W(u,2),g=m=>{var v=Gx(),y=$(v,!0);I(v),J(k=>K(y,k),[()=>ri(r().time)]),E(m,v)};le(h,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),J(m=>K(p,m),[()=>ni(r().time,{month:"numeric",day:"numeric"},C.locale)]),E(c,d)};return le(o,c=>{r().time&&c(l)}),J(()=>K(a,r().product.title)),E(e,i),te(n)}re(Gp,{cartItem:{}},[],[],{mode:"open"});var Jx=V('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Qx=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Xx=V('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),eT=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Kp(e,t){ee(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:ni(r().time,{year:"numeric",month:"numeric",day:"numeric"},C.locale),time:ri(r().time)}}catch{return{date:r().time,time:""}}}),s=v=>v==null?"":typeof v=="object"?JSON.stringify(v):String(v),a=D(()=>Object.entries(f(n).customs??{}).filter(([,v])=>v!=null&&v!==""));var o={get cartItem(){return r()},set cartItem(v){r(v),b()}},l=eT(),c=z(l),d=$(c,!0);I(c);var u=W(c,2),p=$(u,!0);I(u);var h=W(u,2),g=v=>{var y=Qx(),k=z(y),x=$(k,!0);I(k);var T=W(k,2),S=O=>{var P=Jx(),R=$(P,!0);I(P),J(()=>K(R,f(i).time)),E(O,P)};le(T,O=>{f(i).time&&O(S)}),J(()=>K(x,f(i).date)),E(v,y)};le(h,v=>{f(i)&&v(g)});var m=W(h,2);return Fe(m,17,()=>f(a),([v,y])=>v,(v,y)=>{var k=D(()=>Gy(f(y),2));let x=()=>f(k)[0],T=()=>f(k)[1];var S=Xx(),O=$(S);I(S),J(P=>K(O,`${x()??""}: ${P??""}`),[()=>s(T())]),E(v,S)}),J(v=>{K(d,f(n).title),K(p,v)},[()=>C.t("cart.item.participants",{count:f(n).participants})]),E(e,l),te(o)}re(Kp,{cartItem:{}},[],[],{mode:"open"});function Yp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function tT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function rT(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function nT(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Jp(e,t){return Yp(e,t)>e}function Qp(e,{floor:t=0}){return e>t}var iT=V('<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Xp(e,t){const r=mt();ee(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),d=_(t,"onChange",7);const u=D(()=>({min:i(),max:s(),floor:a()}));let p,h=ie(!1);const g=D(()=>!Qp(n(),f(u))),m=D(()=>!Jp(n(),f(u)));function v(B){B!==n()&&d()(B)}function y(){Qp(n(),f(u))&&v(tT(n(),f(u)))}function k(){Jp(n(),f(u))&&v(Yp(n(),f(u)))}function x(){const B=rT(parseInt(p.value,10),f(u));M(h,!1),p.value=String(B),v(B)}function T(){const B=p.value.trim();M(h,!(/^\d+$/.test(B)&&nT(parseInt(B,10),f(u))))}function S(B){switch(B.key){case"ArrowUp":B.preventDefault(),k();break;case"ArrowDown":B.preventDefault(),y();break;case"Home":B.preventDefault(),v(a());break;case"End":B.preventDefault(),v(s());break;case"Enter":B.preventDefault(),x();break}}var O={get value(){return n()},set value(B){n(B),b()},get min(){return i()},set min(B){i(B),b()},get max(){return s()},set max(B){s(B),b()},get floor(){return a()},set floor(B=0){a(B),b()},get label(){return o()},set label(B){o(B),b()},get decreaseLabel(){return l()},set decreaseLabel(B){l(B),b()},get increaseLabel(){return c()},set increaseLabel(B){c(B),b()},get onChange(){return d()},set onChange(B){d(B),b()}},P=iT(),R=$(P),j=W(R,2);Ms(j),Jl(j,B=>p=B,()=>p);var N=W(j,2);return I(P),J(()=>{ve(P,"aria-label",o()),ve(R,"title",l()),ve(R,"aria-controls",r),ve(R,"aria-disabled",f(g)),ve(j,"id",r),ve(j,"aria-label",o()),Vl(j,n()),ve(j,"aria-valuenow",n()),ve(j,"aria-valuemin",a()),ve(j,"aria-valuemax",s()),ve(j,"aria-invalid",f(h)?"true":void 0),ve(N,"title",c()),ve(N,"aria-controls",r),ve(N,"aria-disabled",f(m))}),pt("click",R,y),pt("input",j,T),pt("change",j,x),Na("blur",j,x),pt("keydown",j,S),pt("click",N,k),E(e,P),te(O)}lr(["click","input","change","keydown"]),re(Xp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function sT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[po(n)];if(t<e)return e>n?[po(e)]:[];const i=Math.max(e,n),s=[po(n)];for(let a=i;a<=t;a++)a!==n&&s.push(po(a));return s}function po(e){return{value:e,label:e.toString()}}var aT=V("<option> </option>"),oT=V('<select class="go-quantity-select"></select>');function mo(e,t){ee(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onChange",7);const c=D(()=>Je.config.quantityStepper);var d={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onChange(){return l()},set onChange(m){l(m),b()}},u=Q(),p=z(u),h=m=>{{let v=D(()=>o()?0:n()),y=D(()=>C.t("quantity.decrease")),k=D(()=>C.t("quantity.increase"));Xp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return f(v)},get label(){return s()},get decreaseLabel(){return f(y)},get increaseLabel(){return f(k)},get onChange(){return l()}})}},g=m=>{var v=oT();Fe(v,21,()=>sT(n(),i(),{floor:o()?a():n()}),y=>y.value,(y,k)=>{var x=aT(),T=$(x,!0);I(x);var S={};J(()=>{Ff(x,r()===f(k).value),K(T,f(k).label),S!==(S=f(k).value)&&(x.value=(x.__value=f(k).value)??"")}),E(y,x)}),I(v),J(()=>ve(v,"aria-label",s())),pt("change",v,y=>l()(parseInt(y.target.value,10))),E(m,v)};return le(p,m=>{f(c)?m(h):m(g,-1)}),E(e,u),te(d)}lr(["change"]),re(mo,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onChange:{}},[],[],{mode:"open"});function em(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 lT(e){if(Array.isArray(e))return e}function uT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function cT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(e,t){return lT(e)||uT(e,t)||fT(e,t)||cT()}function fT(e,t){if(e){if(typeof e=="string")return em(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)?em(e,t):void 0}}var tm=Object.entries,rm=Object.setPrototypeOf,hT=Object.isFrozen,pT=Object.getPrototypeOf,mT=Object.getOwnPropertyDescriptor,Dt=Object.freeze,hr=Object.seal,Vi=Object.create,nm=typeof Reflect<"u"&&Reflect,Uu=nm.apply,Vu=nm.construct;Dt||(Dt=function(t){return t}),hr||(hr=function(t){return t}),Uu||(Uu=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)}),Vu||(Vu=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 Bi=ft(Array.prototype.forEach),vT=ft(Array.prototype.lastIndexOf),im=ft(Array.prototype.pop),ji=ft(Array.prototype.push),gT=ft(Array.prototype.splice),It=Array.isArray,Ws=ft(String.prototype.toLowerCase),Bu=ft(String.prototype.toString),sm=ft(String.prototype.match),Zi=ft(String.prototype.replace),am=ft(String.prototype.indexOf),yT=ft(String.prototype.trim),bT=ft(Number.prototype.toString),_T=ft(Boolean.prototype.toString),om=typeof BigInt>"u"?null:ft(BigInt.prototype.toString),lm=typeof Symbol>"u"?null:ft(Symbol.prototype.toString),rt=ft(Object.prototype.hasOwnProperty),Hs=ft(Object.prototype.toString),wt=ft(RegExp.prototype.test),Gs=wT(TypeError);function ft(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 Uu(e,t,n)}}function wT(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ws;if(rm&&rm(e,null),!It(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(hT(t)||(t[n]=s),i=s)}e[i]=!0}return e}function kT(e){for(let t=0;t<e.length;t++)rt(e,t)||(e[t]=null);return e}function xt(e){const t=Vi(null);for(const n of tm(e)){var r=dT(n,2);const i=r[0],s=r[1];rt(e,i)&&(It(s)?t[i]=kT(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=xt(s):t[i]=s)}return t}function ST(e){switch(typeof e){case"string":return e;case"number":return bT(e);case"boolean":return _T(e);case"bigint":return om?om(e):"0";case"symbol":return lm?lm(e):"Symbol()";case"undefined":return Hs(e);case"function":case"object":{if(e===null)return Hs(e);const t=e,r=Hr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Hs(n)}return Hs(e)}default:return Hs(e)}}function Hr(e,t){for(;e!==null;){const n=mT(e,t);if(n){if(n.get)return ft(n.get);if(typeof n.value=="function")return ft(n.value)}e=pT(e)}function r(){return null}return r}function ET(e){try{return wt(e,""),!0}catch{return!1}}var um=Dt(["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"]),ju=Dt(["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"]),Zu=Dt(["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"]),xT=Dt(["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"]),Wu=Dt(["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"]),TT=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cm=Dt(["#text"]),dm=Dt(["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"]),Hu=Dt(["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"]),fm=Dt(["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"]),vo=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),AT=hr(/{{[\w\W]*|^[\w\W]*}}/g),CT=hr(/<%[\w\W]*|^[\w\W]*%>/g),OT=hr(/\${[\w\W]*/g),DT=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),IT=hr(/^aria-[\-\w]+$/),hm=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PT=hr(/^(?:\w+script|data):/i),$T=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MT=hr(/^html$/i),FT=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),Gr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},NT=function(){return typeof window>"u"?null:window},RT=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(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},pm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NT();const t=ye=>mm(ye);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Gr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=o.prototype,p=Hr(u,"cloneNode"),h=Hr(u,"remove"),g=Hr(u,"nextSibling"),m=Hr(u,"childNodes"),v=Hr(u,"parentNode"),y=Hr(u,"shadowRoot"),k=Hr(u,"attributes"),x=a&&a.prototype?Hr(a.prototype,"nodeType"):null,T=a&&a.prototype?Hr(a.prototype,"nodeName"):null;if(typeof s=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let S,O="";const P=r,R=P.implementation,j=P.createNodeIterator,N=P.createDocumentFragment,B=P.getElementsByTagName,U=n.importNode;let oe=pm();t.isSupported=typeof tm=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const pe=AT,Y=CT,ae=OT,X=DT,fe=IT,ue=PT,H=$T,ne=FT;let de=hm,F=null;const he=Ae({},[...um,...ju,...Zu,...Wu,...cm]);let q=null;const ce=Ae({},[...dm,...Hu,...fm,...vo]);let se=Object.seal(Vi(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,ke=null;const Te=Object.seal(Vi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,Qe=!0,Ze=!1,Mt=!0,st=!1,er=!0,Tt=!1,Ft=!1,tr=!1,Zt=!1,mr=!1,Ir=!1,Pr=!0,bn=!1;const $r="user-content-";let vr=!0,Qr=!1,Xr={},kt=null;const Un=Ae({},["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 as=null;const os=Ae({},["audio","video","img","source","image","track"]);let fa=null;const id=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bi="http://www.w3.org/1998/Math/MathML",ls="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let Vn=gr,sd=!1,ad=null;const X2=Ae({},[bi,ls,gr],Bu);let od=Ae({},["mi","mo","mn","ms","mtext"]),ld=Ae({},["annotation-xml"]);const eF=Ae({},["title","style","font","a","script"]);let ha=null;const tF=["application/xhtml+xml","text/html"],rF="text/html";let lt=null,us=null;const nF=r.createElement("form"),Qg=function(A){return A instanceof RegExp||A instanceof Function},ud=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(us&&us===A)return;(!A||typeof A!="object")&&(A={}),A=xt(A),ha=tF.indexOf(A.PARSER_MEDIA_TYPE)===-1?rF:A.PARSER_MEDIA_TYPE,lt=ha==="application/xhtml+xml"?Bu:Ws,F=rt(A,"ALLOWED_TAGS")&&It(A.ALLOWED_TAGS)?Ae({},A.ALLOWED_TAGS,lt):he,q=rt(A,"ALLOWED_ATTR")&&It(A.ALLOWED_ATTR)?Ae({},A.ALLOWED_ATTR,lt):ce,ad=rt(A,"ALLOWED_NAMESPACES")&&It(A.ALLOWED_NAMESPACES)?Ae({},A.ALLOWED_NAMESPACES,Bu):X2,fa=rt(A,"ADD_URI_SAFE_ATTR")&&It(A.ADD_URI_SAFE_ATTR)?Ae(xt(id),A.ADD_URI_SAFE_ATTR,lt):id,as=rt(A,"ADD_DATA_URI_TAGS")&&It(A.ADD_DATA_URI_TAGS)?Ae(xt(os),A.ADD_DATA_URI_TAGS,lt):os,kt=rt(A,"FORBID_CONTENTS")&&It(A.FORBID_CONTENTS)?Ae({},A.FORBID_CONTENTS,lt):Un,w=rt(A,"FORBID_TAGS")&&It(A.FORBID_TAGS)?Ae({},A.FORBID_TAGS,lt):xt({}),ke=rt(A,"FORBID_ATTR")&&It(A.FORBID_ATTR)?Ae({},A.FORBID_ATTR,lt):xt({}),Xr=rt(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?xt(A.USE_PROFILES):A.USE_PROFILES:!1,je=A.ALLOW_ARIA_ATTR!==!1,Qe=A.ALLOW_DATA_ATTR!==!1,Ze=A.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=A.SAFE_FOR_TEMPLATES||!1,er=A.SAFE_FOR_XML!==!1,Tt=A.WHOLE_DOCUMENT||!1,Zt=A.RETURN_DOM||!1,mr=A.RETURN_DOM_FRAGMENT||!1,Ir=A.RETURN_TRUSTED_TYPE||!1,tr=A.FORCE_BODY||!1,Pr=A.SANITIZE_DOM!==!1,bn=A.SANITIZE_NAMED_PROPS||!1,vr=A.KEEP_CONTENT!==!1,Qr=A.IN_PLACE||!1,de=ET(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:hm,Vn=typeof A.NAMESPACE=="string"?A.NAMESPACE:gr,od=rt(A,"MATHML_TEXT_INTEGRATION_POINTS")&&A.MATHML_TEXT_INTEGRATION_POINTS&&typeof A.MATHML_TEXT_INTEGRATION_POINTS=="object"?xt(A.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ld=rt(A,"HTML_INTEGRATION_POINTS")&&A.HTML_INTEGRATION_POINTS&&typeof A.HTML_INTEGRATION_POINTS=="object"?xt(A.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const Z=rt(A,"CUSTOM_ELEMENT_HANDLING")&&A.CUSTOM_ELEMENT_HANDLING&&typeof A.CUSTOM_ELEMENT_HANDLING=="object"?xt(A.CUSTOM_ELEMENT_HANDLING):Vi(null);if(se=Vi(null),rt(Z,"tagNameCheck")&&Qg(Z.tagNameCheck)&&(se.tagNameCheck=Z.tagNameCheck),rt(Z,"attributeNameCheck")&&Qg(Z.attributeNameCheck)&&(se.attributeNameCheck=Z.attributeNameCheck),rt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),st&&(Qe=!1),mr&&(Zt=!0),Xr&&(F=Ae({},cm),q=Vi(null),Xr.html===!0&&(Ae(F,um),Ae(q,dm)),Xr.svg===!0&&(Ae(F,ju),Ae(q,Hu),Ae(q,vo)),Xr.svgFilters===!0&&(Ae(F,Zu),Ae(q,Hu),Ae(q,vo)),Xr.mathMl===!0&&(Ae(F,Wu),Ae(q,fm),Ae(q,vo))),Te.tagCheck=null,Te.attributeCheck=null,rt(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?Te.tagCheck=A.ADD_TAGS:It(A.ADD_TAGS)&&(F===he&&(F=xt(F)),Ae(F,A.ADD_TAGS,lt))),rt(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?Te.attributeCheck=A.ADD_ATTR:It(A.ADD_ATTR)&&(q===ce&&(q=xt(q)),Ae(q,A.ADD_ATTR,lt))),rt(A,"ADD_URI_SAFE_ATTR")&&It(A.ADD_URI_SAFE_ATTR)&&Ae(fa,A.ADD_URI_SAFE_ATTR,lt),rt(A,"FORBID_CONTENTS")&&It(A.FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),Ae(kt,A.FORBID_CONTENTS,lt)),rt(A,"ADD_FORBID_CONTENTS")&&It(A.ADD_FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),Ae(kt,A.ADD_FORBID_CONTENTS,lt)),vr&&(F["#text"]=!0),Tt&&Ae(F,["html","head","body"]),F.table&&(Ae(F,["tbody"]),delete w.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=A.TRUSTED_TYPES_POLICY,O=S.createHTML("")}else S===void 0&&(S=RT(d,i)),S!==null&&typeof O=="string"&&(O=S.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===he&&(F=xt(F)),oe.uponSanitizeAttribute.length>0&&q===ce&&(q=xt(q)),Dt&&Dt(A),us=A},Xg=Ae({},[...ju,...Zu,...xT]),ey=Ae({},[...Wu,...TT]),iF=function(A){let Z=v(A);(!Z||!Z.tagName)&&(Z={namespaceURI:Vn,tagName:"template"});const me=Ws(A.tagName),De=Ws(Z.tagName);return ad[A.namespaceURI]?A.namespaceURI===ls?Z.namespaceURI===gr?me==="svg":Z.namespaceURI===bi?me==="svg"&&(De==="annotation-xml"||od[De]):!!Xg[me]:A.namespaceURI===bi?Z.namespaceURI===gr?me==="math":Z.namespaceURI===ls?me==="math"&&ld[De]:!!ey[me]:A.namespaceURI===gr?Z.namespaceURI===ls&&!ld[De]||Z.namespaceURI===bi&&!od[De]?!1:!ey[me]&&(eF[me]||!Xg[me]):!!(ha==="application/xhtml+xml"&&ad[A.namespaceURI]):!1},Mr=function(A){ji(t.removed,{element:A});try{v(A).removeChild(A)}catch{h(A)}},_i=function(A,Z){try{ji(t.removed,{attribute:Z.getAttributeNode(A),from:Z})}catch{ji(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(A),A==="is")if(Zt||mr)try{Mr(Z)}catch{}else try{Z.setAttribute(A,"")}catch{}},ty=function(A){let Z=null,me=null;if(tr)A="<remove></remove>"+A;else{const tt=sm(A,/^[\r\n\t ]+/);me=tt&&tt[0]}ha==="application/xhtml+xml"&&Vn===gr&&(A='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+A+"</body></html>");const De=S?S.createHTML(A):A;if(Vn===gr)try{Z=new c().parseFromString(De,ha)}catch{}if(!Z||!Z.documentElement){Z=R.createDocument(Vn,"template",null);try{Z.documentElement.innerHTML=sd?O:De}catch{}}const Ne=Z.body||Z.documentElement;return A&&me&&Ne.insertBefore(r.createTextNode(me),Ne.childNodes[0]||null),Vn===gr?B.call(Z,Tt?"html":"body")[0]:Tt?Z.documentElement:Ne},ry=function(A){return j.call(A.ownerDocument||A,A,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ny=function(A){A.normalize();const Z=j.call(A.ownerDocument||A,A,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let me=Z.nextNode();for(;me;){let De=me.data;Bi([pe,Y,ae],Ne=>{De=Zi(De,Ne," ")}),me.data=De,me=Z.nextNode()}},el=function(A){const Z=T?T(A):null;return typeof Z!="string"||lt(Z)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==k(A)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==x(A)||A.childNodes!==m(A)},pa=function(A){if(!x||typeof A!="object"||A===null)return!1;try{return x(A)===Gr.documentFragment}catch{return!1}},tl=function(A){if(!x||typeof A!="object"||A===null)return!1;try{return typeof x(A)=="number"}catch{return!1}};function _n(ye,A,Z){Bi(ye,me=>{me.call(t,A,Z,us)})}const iy=function(A){let Z=null;if(_n(oe.beforeSanitizeElements,A,null),el(A))return Mr(A),!0;const me=lt(A.nodeName);if(_n(oe.uponSanitizeElement,A,{tagName:me,allowedTags:F}),er&&A.hasChildNodes()&&!tl(A.firstElementChild)&&wt(/<[/\w!]/g,A.innerHTML)&&wt(/<[/\w!]/g,A.textContent)||er&&A.namespaceURI===gr&&me==="style"&&tl(A.firstElementChild)||A.nodeType===Gr.progressingInstruction||er&&A.nodeType===Gr.comment&&wt(/<[/\w]/g,A.data))return Mr(A),!0;if(w[me]||!(Te.tagCheck instanceof Function&&Te.tagCheck(me))&&!F[me]){if(!w[me]&&ay(me)&&(se.tagNameCheck instanceof RegExp&&wt(se.tagNameCheck,me)||se.tagNameCheck instanceof Function&&se.tagNameCheck(me)))return!1;if(vr&&!kt[me]){const De=v(A),Ne=m(A);if(Ne&&De){const tt=Ne.length;for(let Wt=tt-1;Wt>=0;--Wt){const Bn=p(Ne[Wt],!0);De.insertBefore(Bn,g(A))}}}return Mr(A),!0}return(x?x(A):A.nodeType)===Gr.element&&!iF(A)||(me==="noscript"||me==="noembed"||me==="noframes")&&wt(/<\/no(script|embed|frames)/i,A.innerHTML)?(Mr(A),!0):(st&&A.nodeType===Gr.text&&(Z=A.textContent,Bi([pe,Y,ae],De=>{Z=Zi(Z,De," ")}),A.textContent!==Z&&(ji(t.removed,{element:A.cloneNode()}),A.textContent=Z)),_n(oe.afterSanitizeElements,A,null),!1)},sy=function(A,Z,me){if(ke[Z]||Pr&&(Z==="id"||Z==="name")&&(me in r||me in nF))return!1;const De=q[Z]||Te.attributeCheck instanceof Function&&Te.attributeCheck(Z,A);if(!(Qe&&!ke[Z]&&wt(X,Z))){if(!(je&&wt(fe,Z))){if(!De||ke[Z]){if(!(ay(A)&&(se.tagNameCheck instanceof RegExp&&wt(se.tagNameCheck,A)||se.tagNameCheck instanceof Function&&se.tagNameCheck(A))&&(se.attributeNameCheck instanceof RegExp&&wt(se.attributeNameCheck,Z)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(Z,A))||Z==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&wt(se.tagNameCheck,me)||se.tagNameCheck instanceof Function&&se.tagNameCheck(me))))return!1}else if(!fa[Z]){if(!wt(de,Zi(me,H,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&A!=="script"&&am(me,"data:")===0&&as[A])){if(!(Ze&&!wt(ue,Zi(me,H,"")))){if(me)return!1}}}}}}return!0},sF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ay=function(A){return!sF[Ws(A)]&&wt(ne,A)},oy=function(A){_n(oe.beforeSanitizeAttributes,A,null);const Z=A.attributes;if(!Z||el(A))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let De=Z.length;for(;De--;){const Ne=Z[De],tt=Ne.name,Wt=Ne.namespaceURI,Bn=Ne.value,wn=lt(tt),cd=Bn;let yt=tt==="value"?cd:yT(cd);if(me.attrName=wn,me.attrValue=yt,me.keepAttr=!0,me.forceKeepAttr=void 0,_n(oe.uponSanitizeAttribute,A,me),yt=me.attrValue,bn&&(wn==="id"||wn==="name")&&am(yt,$r)!==0&&(_i(tt,A),yt=$r+yt),er&&wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){_i(tt,A);continue}if(wn==="attributename"&&sm(yt,"href")){_i(tt,A);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){_i(tt,A);continue}if(!Mt&&wt(/\/>/i,yt)){_i(tt,A);continue}st&&Bi([pe,Y,ae],uy=>{yt=Zi(yt,uy," ")});const ly=lt(A.nodeName);if(!sy(ly,wn,yt)){_i(tt,A);continue}if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Wt)switch(d.getAttributeType(ly,wn)){case"TrustedHTML":yt=S.createHTML(yt);break;case"TrustedScriptURL":yt=S.createScriptURL(yt);break}if(yt!==cd)try{Wt?A.setAttributeNS(Wt,tt,yt):A.setAttribute(tt,yt),el(A)?Mr(A):im(t.removed)}catch{_i(tt,A)}}_n(oe.afterSanitizeAttributes,A,null)},rl=function(A){let Z=null;const me=ry(A);for(_n(oe.beforeSanitizeShadowDOM,A,null);Z=me.nextNode();)if(_n(oe.uponSanitizeShadowNode,Z,null),iy(Z),oy(Z),pa(Z.content)&&rl(Z.content),(x?x(Z):Z.nodeType)===Gr.element){const De=y?y(Z):Z.shadowRoot;pa(De)&&(cs(De),rl(De))}_n(oe.afterSanitizeShadowDOM,A,null)},cs=function(A){const Z=x?x(A):A.nodeType;if(Z===Gr.element){const Ne=y?y(A):A.shadowRoot;pa(Ne)&&(cs(Ne),rl(Ne))}const me=m?m(A):A.childNodes;if(!me)return;const De=[];Bi(me,Ne=>{ji(De,Ne)});for(const Ne of De)cs(Ne);if(Z===Gr.element){const Ne=T?T(A):null;if(typeof Ne=="string"&&lt(Ne)==="template"){const tt=A.content;pa(tt)&&cs(tt)}}};return t.sanitize=function(ye){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,me=null,De=null,Ne=null;if(sd=!ye,sd&&(ye="<!-->"),typeof ye!="string"&&!tl(ye)&&(ye=ST(ye),typeof ye!="string"))throw Gs("dirty is not a string, aborting");if(!t.isSupported)return ye;if(Ft||ud(A),t.removed=[],typeof ye=="string"&&(Qr=!1),Qr){const Bn=T?T(ye):ye.nodeName;if(typeof Bn=="string"){const wn=lt(Bn);if(!F[wn]||w[wn])throw Gs("root node is forbidden and cannot be sanitized in-place")}if(el(ye))throw Gs("root node is clobbered and cannot be sanitized in-place");cs(ye)}else if(tl(ye))Z=ty("<!---->"),me=Z.ownerDocument.importNode(ye,!0),me.nodeType===Gr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?Z=me:Z.appendChild(me),cs(me);else{if(!Zt&&!st&&!Tt&&ye.indexOf("<")===-1)return S&&Ir?S.createHTML(ye):ye;if(Z=ty(ye),!Z)return Zt?null:Ir?O:""}Z&&tr&&Mr(Z.firstChild);const tt=ry(Qr?ye:Z);for(;De=tt.nextNode();)iy(De),oy(De),pa(De.content)&&rl(De.content);if(Qr)return st&&ny(ye),ye;if(Zt){if(st&&ny(Z),mr)for(Ne=N.call(Z.ownerDocument);Z.firstChild;)Ne.appendChild(Z.firstChild);else Ne=Z;return(q.shadowroot||q.shadowrootmode)&&(Ne=U.call(n,Ne,!0)),Ne}let Wt=Tt?Z.outerHTML:Z.innerHTML;return Tt&&F["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&wt(MT,Z.ownerDocument.doctype.name)&&(Wt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
77
- `+Wt),st&&Bi([pe,Y,ae],Bn=>{Wt=Zi(Wt,Bn," ")}),S&&Ir?S.createHTML(Wt):Wt},t.setConfig=function(){ud(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ft=!0},t.clearConfig=function(){us=null,Ft=!1},t.isValidAttribute=function(ye,A,Z){return us||ud({}),sy(lt(ye),lt(A),Z)},t.addHook=function(ye,A){typeof A=="function"&&ji(oe[ye],A)},t.removeHook=function(ye,A){if(A!==void 0){const Z=vT(oe[ye],A);return Z===-1?void 0:gT(oe[ye],Z,1)[0]}return im(oe[ye])},t.removeHooks=function(ye){oe[ye]=[]},t.removeAllHooks=function(){oe=pm()},t}var vm=mm(),LT=V('<span class="go-sub-ticket-description"></span>'),zT=V('<span class="go-sub-ticket-quantity"> </span>'),qT=V('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function Gu(e,t){ee(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),s=_(t,"onChange",7),a=_(t,"preview",7,!1);const o=D(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(y){r(y),b()},get quantity(){return n()},set quantity(y){n(y),b()},get max(){return i()},set max(y=r.max_persons){i(y),b()},get onChange(){return s()},set onChange(y){s(y),b()},get preview(){return a()},set preview(y=!1){a(y),b()}},c=qT(),d=$(c),u=$(d,!0);I(d);var p=W(d,2),h=y=>{var k=LT();Af(k,()=>vm.sanitize(r().description),!0),I(k),E(y,k)};le(p,y=>{r().description&&y(h)});var g=W(p,2),m=y=>{var k=zT(),x=$(k,!0);I(k),J(()=>{ve(k,"data-testid",`sub-ticket-${r().id??""}-quantity`),K(x,n())}),E(y,k)},v=y=>{{let k=D(()=>r().title||C.t("cart.content.table.edit"));mo(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return f(k)},deselectable:!1,get onChange(){return s()}})}};return le(g,y=>{a()||f(o)?y(m):y(v,-1)}),I(c),J(()=>{St(c,1,ur(["go-sub-ticket",f(o)&&"is-fixed",a()&&"is-preview",n()===0&&"is-empty"])),ve(c,"data-testid",`sub-ticket-${r().id??""}`),K(u,r().title)}),E(e,c),te(l)}re(Gu,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});var UT=V('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),VT=V('<span class="go-cart-item-price-discounted"> </span>'),BT=V('<span data-testid="cart-item-participant-count"> </span>'),jT=V("<span> </span>"),ZT=V('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),WT=V('<ul class="go-sub-tickets" role="list"></ul>'),HT=V('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>',1);function gm(e,t){ee(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=ie(void 0),a=ie(Me({}));const o=D(()=>C.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Br(r().product)?r().product:null),c=Ni();ge(()=>{C.cart?.items.map(y=>y.quantity),C.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Le(()=>{M(s,C.capacityManager.capacity(n(),r(),c),!0),M(a,f(o)?C.capacityManager.subTicketMaxes(C.cart,f(o),c):{},!0)})});function d(y){if(!f(o)){console.error("(CartItem) Could not find main item for line",r());return}f(o).quantity=Math.max(0,f(o).quantity-r().quantity+y)}function u(){if(!f(o)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,f(o).quantity-r().quantity);y===0?C.cart?.deleteItem(f(o)):f(o).quantity=y}function p(y,k){if(!f(o)){console.error("(CartItem) Could not find main item for line",r());return}f(o).mantle&&(f(o).mantle.composition[y]=k)}var h={get displayItem(){return r()},set displayItem(y){r(y),b()},get displayCart(){return n()},set displayCart(y){n(y),b()},get preview(){return i()},set preview(y){i(y),b()}},g=Q(),m=z(g),v=y=>{var k=HT(),x=z(k),T=$(x),S=$(T),O=$(S),P=ce=>{Gp(ce,{get cartItem(){return r()}})},R=ce=>{Hp(ce,{get cartItem(){return r()}})},j=ce=>{Wp(ce,{get cartItem(){return r()}})},N=ce=>{Kp(ce,{get cartItem(){return r()}})};le(O,ce=>{r().product.type==="Ticket"?ce(P):r().product.type==="Event"?ce(R,1):r().product.type==="Coupon"?ce(j,2):r().product.type==="Tour"&&ce(N,3)}),I(S);var B=W(S,2),U=$(B),oe=ce=>{var se=UT(),w=z(se),ke=$(w,!0);I(w);var Te=W(w,2),je=$(Te,!0);I(Te),J((Qe,Ze)=>{K(ke,Qe),K(je,Ze)},[()=>fr(r().display.originalPrice),()=>fr(r().final_price_cents)]),E(ce,se)},pe=ce=>{var se=VT(),w=$(se,!0);I(se),J(ke=>K(w,ke),[()=>fr(r().final_price_cents)]),E(ce,se)};le(U,ce=>{r().display?.discounted?ce(oe):ce(pe,-1)}),I(B);var Y=W(B,2),ae=$(Y),X=ce=>{var se=BT(),w=$(se,!0);I(se),J(()=>K(w,r().product.participants)),E(ce,se)},fe=ce=>{var se=jT(),w=$(se,!0);I(se),J(()=>K(w,r().quantity)),E(ce,se)},ue=ce=>{{let se=D(()=>r().quantity??0);mo(ce,{get value(){return f(se)},get min(){return f(s).min},get max(){return f(s).max},get label(){return r().product.title},floor:1,onChange:d})}};le(ae,ce=>{r().product.type==="Tour"?ce(X):i()?ce(fe,1):ce(ue,-1)}),I(Y);var H=W(Y,2),ne=ce=>{var se=ZT(),w=$(se);I(se),J(ke=>ve(w,"aria-label",ke),[()=>C.t("cart.item.remove")]),pt("click",w,u),E(ce,se)};le(H,ce=>{i()||ce(ne)});var de=W(H,2),F=$(de,!0);I(de),I(T),I(x);var he=W(x,2),q=ce=>{var se=WT();Fe(se,21,()=>Zs(f(l)),w=>w.id,(w,ke)=>{{let Te=D(()=>r().mantle?.composition?.[f(ke).id]??0);Gu(w,{get sub(){return f(ke)},get preview(){return i()},get quantity(){return f(Te)},get max(){return f(a)[f(ke).id]},onChange:je=>p(f(ke).id,je)})}}),I(se),J(()=>ve(se,"aria-label",f(l).title)),E(ce,se)};le(he,ce=>{f(l)&&ce(q)}),J(ce=>K(F,ce),[()=>fr(r().total_price_cents)]),E(y,k)};return le(m,y=>{f(s)&&y(v)}),E(e,g),te(h)}lr(["click"]),re(gm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var GT=V('<li class="go-cart-header-remove"></li>'),KT=V('<li class="go-cart-item"><!></li>'),YT=V('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function JT(e,t){ee(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=YT(),c=$(l),d=$(c),u=$(d),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);I(h);var m=W(h,2),v=$(m,!0);I(m);var y=W(m,2),k=O=>{var P=GT();E(O,P)};le(y,O=>{f(n).preview||O(k)});var x=W(y,2),T=$(x,!0);I(x),I(d),I(c);var S=W(c,2);Fe(S,17,()=>f(n).displayCart.items,O=>O.uuid,(O,P)=>{var R=KT();gm($(R),{get displayItem(){return f(P)},get displayCart(){return f(n).displayCart},get preview(){return f(n).preview}}),I(R),E(O,R)}),I(l),J((O,P,R,j)=>{K(p,O),K(g,P),K(v,R),K(T,j)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),E(o,l)};le(s,o=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&o(a)}),E(e,i),te()}customElements.define("go-cart-items",re(JT,{},[],[]));var QT=V('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),XT=V('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),eA=V('<ol data-testid="cart-coupons"></ol>');function tA(e,t){ee(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=eA();Fe(l,21,()=>f(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=XT();let p;var h=$(u),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2),k=x=>{var T=QT(),S=$(T);I(T),J(O=>ve(S,"aria-label",O),[()=>C.t("cart.coupons.remove")]),pt("click",S,()=>C.cart?.removeCoupon(f(d).code)),E(x,T)};le(y,x=>{f(n).preview||x(k)}),I(g),I(h),I(u),J(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!f(d).applied}),K(v,f(d).code)}),E(c,u)}),I(l),E(o,l)};le(s,o=>{f(n)&&f(n).displayCart&&f(n).displayCart.coupons.length>0&&o(a)}),E(e,i),te()}lr(["click"]),customElements.define("go-cart-coupons",re(tA,{},[],[]));var rA=V('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function nA(e,t){ee(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=rA(),c=$(l,!0);I(l),J(d=>K(c,d),[()=>fr(f(n).totalPriceCents)]),E(o,l)};le(s,o=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&o(a)}),E(e,i),te()}customElements.define("go-cart-total-amount",re(nA,{},[],[]));function iA(e,t){ee(t,!0);const r=_(t,"preview",7,!1),n=new Bx;jx(t.$$host,n),ge(()=>{n.preview=r()}),ge(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.map(s=>s.code).join("|"),C.cart.items.forEach(s=>s.mantle&&Object.values(s.mantle.composition)),Le(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const o of s){const l=await o.flush?.();l&&!l.success&&(a=!1)}return a}return t.$$host.addEventListener("click",async s=>{const a=s.target.closest("go-submit");if(!a)return;const o=a.closest("go-form");if(o&&t.$$host.contains(o))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),te({get preview(){return r()},set preview(s=!1){r(s),b()}})}customElements.define("go-cart",re(iA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var sA=V('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function aA(e,t){ee(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=sA(),c=$(l,!0);I(l),J(d=>K(c,d),[()=>fr(f(n).subtotalPriceCents)]),E(o,l)};le(s,o=>{f(n)&&C.cart?.items.length&&o(a)}),E(e,i),te()}customElements.define("go-cart-subtotal-amount",re(aA,{},[],[]));var oA=V('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function lA(e,t){ee(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=oA(),c=W($(l),1,!0);I(l),J(d=>K(c,d),[()=>fr(f(n).discountedAmountCents)]),E(o,l)};le(s,o=>{f(n)&&f(n).discountedAmountCents>0&&o(a)}),E(e,i),te()}customElements.define("go-cart-discounted-amount",re(lA,{},[],[]));function uA(e,t){ee(t,!0),on(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),te()}customElements.define("go-cart-empty",re(uA,{},[],[]));function cA(e,t){ee(t,!0);let r=D(()=>C.cart?.items.length);At();var n=qt();J(()=>K(n,f(r))),E(e,n),te()}customElements.define("go-cart-counter",re(cA,{},[],[]));function dA(e,t){ee(t,!0);let r=_(t,"custom",7,!1),n=D(()=>C.cart);return Jt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),on(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!f(n))return;const a=await C.signUp(s.details.formData,!0);if(a.error){s.details.apiErrors=a.error.errors;return}const o=s.details.fieldValue("paymentMode");f(n).paymentModeId=o==null?void 0:String(o);const l=await C.checkout(f(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=Je.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;Je.config.navigateTo?.(d)}),te({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-checkout-form",re(dA,{custom:{}},[],[]));var fA="TokenActions::ApplyOrderDiscount";async function hA(e){if(!C.cart)throw new Error("(go-coupon-redemption): cart not found");const t=C.cart,r=await C.asyncFetch(()=>C.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===fA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?mA(e,r):r.value_cents&&r.value_cents>0?pA(e,r.value_cents):Ku([C.t("cart.coupon.form.errors.notValid")]):Ku([C.t("cart.coupon.form.errors.notValid")])}function pA(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function mA(e,t){const r=(await C.asyncFetch(()=>C.tickets({"by_ticket_ids[]":[t.is_voucher_for]}))).find(i=>i.id===t.is_voucher_for);if(!r)return Ku([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(ot(oo(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Ku(e){return{success:!1,errors:e}}var vA=V("<go-form></go-form>",2);function gA(e,t){ee(t,!0),Jt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const d=await hA(c);return d.success?(l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),d):(o.details.apiErrors=d.errors,d)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var s={flush:i},a=vA();return Yn(a,"formId","couponRedemption"),Na("submit",a,n),E(e,a),te(s)}customElements.define("go-coupon-redemption",re(gA,{},[],["flush"])),bb();var yA=class{#e=ie();get campaign(){return f(this.#e)}set campaign(e){M(this.#e,e,!0)}#t=ie();get amount(){return f(this.#t)}set amount(e){M(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");qr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!C.currentUser?.isAuthenticated||C.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart())}},Pt=new yA,bA=V('<img alt="logo"/>'),_A=V('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function ym(e,t){ee(t,!0);let r=_(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(m){r(m),b()}},s=_A();let a;var o=$(s),l=$(o),c=m=>{var v=bA();J(y=>ve(v,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),E(m,v)};le(l,m=>{r().picture.thumbnail&&m(c)}),I(o);var d=W(o,2),u=$(d),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);return I(h),I(d),I(s),J(()=>{a=St(s,1,"go-donation-campaign",null,a,{selected:Pt.campaign?.id===r()?.id}),K(p,f(n)["donations.headline"]),K(g,f(n)["donations.shop.info"])}),pt("click",s,()=>Pt.selectCampaign(r())),pt("keydown",s,m=>{m.key==="Enter"&&Pt.selectCampaign(r())}),E(e,s),te(i)}lr(["click","keydown"]),re(ym,{campaign:{}},[],[],{mode:"open"});function wA(e,t){return t=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:t}).format(e):new Intl.NumberFormat("de-DE",{style:"currency",currency:t}).format(e)}function ln(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}var kA=V("<button> </button>"),SA=V('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),EA=V('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function bm(e,t){ee(t,!0);const r=Pt.campaign?.guest_limit/100;let n=ie(void 0);function i(p){Pt.amount=p,M(n,null)}function s(p){const h=document.getElementById("donationForm");h.checkValidity()?Pt.amount=p.target.valueAsNumber*100:(Pt.amount=void 0,h.reportValidity())}var a=EA(),o=$(a),l=$(o,!0);I(o);var c=W(o,2);Fe(c,20,()=>Pt.campaign?.options,p=>p,(p,h)=>{var g=kA();let m;var v=$(g,!0);I(g),J(y=>{m=St(g,1,"btn btn-default",null,m,{selected:Pt.amount===h}),K(v,y)},[()=>wA(h/100,C.currency)]),pt("click",g,()=>i(h)),E(p,g)}),I(c);var d=W(c,2),u=p=>{var h=SA(),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2);Ms(y),I(g),I(h),J((k,x)=>{K(v,k),ve(y,"max",r),ve(y,"placeholder",x),Vl(y,f(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),pt("input",y,s),E(p,h)};le(d,p=>{Pt.campaign?.free_donations&&p(u)}),I(a),J(p=>K(l,p),[()=>C.t("donations.selection.title")]),E(e,a),te()}lr(["click","input"]),re(bm,{},[],[],{mode:"open"});var xA=V('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function TA(e,t){ee(t,!1),nn(()=>{C.donations?.campaigns?.length==1&&Pt.selectCampaign(C.donations?.campaigns[0])}),Ql();var r=Q(),n=z(r),i=s=>{var a=xA(),o=$(a);Fe(o,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{ym(m,{get campaign(){return f(v)}})});var l=W(o,2),c=m=>{bm(m,{})};le(l,m=>{Pt.campaign&&m(c)});var d=W(l,2),u=$(d),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);I(h),I(d),I(a),J((m,v)=>{K(p,m),h.disabled=!Pt.amount,K(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),pt("click",u,function(...m){Pt.skipDonation?.apply(this,m)}),pt("click",h,function(...m){Pt.addDonationToCart?.apply(this,m)}),E(s,a)};le(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),E(e,r),te()}lr(["click"]),customElements.define("go-donations",re(TA,{},[],[]));function AA(e){return typeof e=="function"}function Ks(e){return e!==null&&typeof e=="object"}var CA=["string","number","bigint","boolean"];function Yu(e){return e==null||CA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Yu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var go=Symbol("box"),_m=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[go]:!0,[_m]:!0,get current(){return f(r)},set current(n){t(n)}}:{[go]:!0,get current(){return e()}}}function wm(e){return Ks(e)&&go in e}function OA(e){return wm(e)?e:AA(e)?L(e):Er(e)}function Er(e){let t=ie(Me(e));return{[go]:!0,[_m]:!0,get current(){return f(t)},set current(r){M(t,r,!0)}}}function km(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var Sm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,DA=/\n/g,IA=/^\s*/,PA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$A=/^:\s*/,MA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,FA=/^[;\s]*/,NA=/^\s+|\s+$/g,RA=`
78
- `,Em="/",xm="*",ai="",LA="comment",zA="declaration";function qA(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var m=g.match(DA);m&&(r+=m.length);var v=g.lastIndexOf(RA);n=~v?g.length-v:n+g.length}function s(){var g={line:r,column:n};return function(m){return m.position=new a(g),c(),m}}function a(g){this.start=g,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(g){var m=new Error(t.source+":"+r+":"+n+": "+g);if(m.reason=g,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(g){var m=g.exec(e);if(m){var v=m[0];return i(v),e=e.slice(v.length),m}}function c(){l(IA)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(Em!=e.charAt(0)||xm!=e.charAt(1))){for(var m=2;ai!=e.charAt(m)&&(xm!=e.charAt(m)||Em!=e.charAt(m+1));)++m;if(m+=2,ai===e.charAt(m-1))return o("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,g({type:LA,comment:v})}}function p(){var g=s(),m=l(PA);if(m){if(u(),!l($A))return o("property missing ':'");var v=l(MA),y=g({type:zA,property:Tm(m[0].replace(Sm,ai)),value:v?Tm(v[0].replace(Sm,ai)):ai});return l(FA),y}}function h(){var g=[];d(g);for(var m;m=p();)m!==!1&&(g.push(m),d(g));return g}return c(),h()}function Tm(e){return e?e.replace(NA,ai):ai}function UA(e,t){let r=null;if(!e||typeof e!="string")return r;const n=qA(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var VA=/\d/,BA=["-","_","/","."];function jA(e=""){if(!VA.test(e))return e!==e.toLowerCase()}function ZA(e){const t=[];let r="",n,i;for(const s of e){const a=BA.includes(s);if(a===!0){t.push(r),r="",n=void 0;continue}const o=jA(s);if(i===!1){if(n===!1&&o===!0){t.push(r),r=s,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=o;continue}}r+=s,n=o,i=a}return t.push(r),t}function Am(e){return e?ZA(e).map(t=>HA(t)).join(""):""}function WA(e){return GA(Am(e||""))}function HA(e){return e?e[0].toUpperCase()+e.slice(1):""}function GA(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ys(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Am(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[WA(n)]=i}return UA(e,r),t}function Js(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function KA(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}var YA=KA(/[A-Z]/,e=>`-${e.toLowerCase()}`);function JA(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${YA(t)}: ${e[t]};`).join(`
79
- `)}function Qs(e={}){return JA(e).replace(`
80
- `," ")}var QA=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],XA=new Set(QA);function eC(e){return XA.has(e)}function Ge(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const s=t[i],a=n[i],o=typeof s=="function",l=typeof a=="function";if(o&&eC(i))t[i]=km(s,a);else if(o&&l)t[i]=Js(s,a);else if(i==="class"){const c=Yu(s),d=Yu(a);c&&d?t[i]=La(s,a):c?t[i]=La(s):d&&(t[i]=La(a))}else if(i==="style"){const c=typeof s=="object",d=typeof a=="object",u=typeof s=="string",p=typeof a=="string";if(c&&d)t[i]={...s,...a};else if(c&&p){const h=Ys(a);t[i]={...s,...h}}else if(u&&d)t[i]={...Ys(s),...a};else if(u&&p){const h=Ys(s),g=Ys(a);t[i]={...h,...g}}else c?t[i]=s:d?t[i]=a:u?t[i]=s:p&&(t[i]=a)}else t[i]=a!==void 0?a:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],a=n[i];t[i]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=Qs(t.style).replaceAll(`
81
- `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Cm={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%)"},tC=Qs(Cm),Om=typeof window<"u"?window:void 0,QF=typeof window<"u"?window.document:void 0,XF=typeof window<"u"?window.navigator:void 0,eN=typeof window<"u"?window.location:void 0;function rC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var nC=class extends Map{#e=new Map;#t=ie(0);#r=ie(0);#n=rn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return rn===this.#n?ie(e):En(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 f(this.#t),!1;return f(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{f(this.#t);return}return f(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),a=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),M(this.#r,super.size),Lr(a);else if(i!==t){Lr(n);var o=a.reactions===null?null:new Set(a.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&Lr(a)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),M(r,-1)),n&&(M(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#r,0);for(var t of e.values())M(t,-1);Lr(this.#t),e.clear()}}#s(){f(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)f(r)}keys(){return f(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return f(this.#r),super.size}},iC=class{#e;#t;constructor(e={}){const{window:t=Om,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=kl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?rC(this.#e):null}},tN=new iC;function sC(e){return typeof e=="function"}var $t=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return xb(this.#t)}get(){const e=Id(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Id(this.#t);return t===void 0?e:t}set(e){return Eb(this.#t,e)}};function aC(e,t){switch(e){case"post":ge(t);break;case"pre":Dl(t);break}}function Ju(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,a=Array.isArray(e)?[]:void 0;aC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,a=o;return}const l=Le(()=>r(o,a));return a=o,l})}function Dm(e,t,r){const n=Es(()=>{let i=!1;Ju(e,t,(s,a)=>{if(i){n();return}const o=r(s,a);return i=!0,o},{lazy:!0})});ge(()=>n)}function nt(e,t,r){Ju(e,"post",t,r)}function oC(e,t,r){Ju(e,"pre",t,r)}nt.pre=oC;function lC(e,t){Dm(e,"post",t)}function uC(e,t){Dm(e,"pre",t)}lC.pre=uC;function Im(e){return sC(e)?e():e}var cC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(f(this.#a)?.(),this.getSize().width));#o=D(()=>(f(this.#a)?.(),this.getSize().height));#a=D(()=>{const e=Im(this.#n);if(e)return kl(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,a=Array.isArray(s)?s:[s];this.#e.width=a.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=a.reduce((o,l)=>Math.max(o,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??Om,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Im(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),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-a,height:r-s-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return f(this.#a)?.(),this.getSize()}get width(){return f(this.#s)}get height(){return f(this.#o)}};function dC(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const a=await e(...i);n&&(n(a),n=null)},t)})}function fC(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 Pm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:a,debounce:o,throttle:l}=r;let c=ie(Me(a)),d=ie(!1),u=ie(void 0),p=ie(Me([]));const h=()=>{f(p).forEach(x=>x()),M(p,[],!0)},g=x=>{M(p,[...f(p),x],!0)},m=async(x,T,S=!1)=>{try{M(d,!0),M(u,void 0),h();const O=new AbortController;g(()=>O.abort());const P=await t(x,T,{data:f(c),refetching:S,onCleanup:g,signal:O.signal});return M(c,P,!0),P}catch(O){O instanceof DOMException&&O.name==="AbortError"||M(u,O,!0);return}finally{M(d,!1)}},v=o?dC(m,o):l?fC(m,l):m,y=Array.isArray(e)?e:[e];let k;return n((x,T)=>{s&&k||(k=x,v(Array.isArray(e)?x:x[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return f(c)},get loading(){return f(d)},get error(){return f(u)},mutate:x=>{M(c,x,!0)},refetch:x=>{const T=y.map(S=>S());return v(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],x??!0)}}}function hC(e,t,r){return Pm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];nt(()=>s.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function pC(e,t,r){return Pm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],a=()=>s.map(o=>o());nt.pre(a,(o,l)=>{n(o,l??[])},i)})}hC.pre=pC;function oi(e){ge(()=>()=>{e()})}function mC(e,t){return setTimeout(t,e)}function Xs(e){gf().then(e)}var vC=1,gC=9,yC=11;function Qu(e){return Ks(e)&&e.nodeType===vC&&typeof e.nodeName=="string"}function $m(e){return Ks(e)&&e.nodeType===gC}function bC(e){return Ks(e)&&e.constructor?.name==="VisualViewport"}function _C(e){return Ks(e)&&e.nodeType!==void 0}function Mm(e){return _C(e)&&e.nodeType===yC&&"host"in e}function wC(e,t){if(!e||!t||!Qu(e)||!Qu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Mm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yo(e){return $m(e)?e:bC(e)?e.document:e?.ownerDocument??document}function Fm(e){return Mm(e)?Fm(e.host):$m(e)?e.defaultView??window:Qu(e)?e.ownerDocument?.defaultView??window:window}function kC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Wi=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return f(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e=="function"?this.element=L(e):this.element=e}getDocument=()=>yo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>kC(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 et(e,t){return{[w_()]:r=>wm(e)?(e.current=r,Le(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Le(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Xu(e){return e?"true":void 0}function Ue(e){return e?"":void 0}function Nm(e){return e?"open":"closed"}function SC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var EC=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 bo(e){const t=new EC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var ec="ArrowDown",Rm="ArrowLeft",Lm="ArrowRight",tc="ArrowUp",xC="Backspace",TC="Enter",rN="Escape",nN=" ",iN="Tab",sN="a",aN="P",oN="A",lN="p",un=typeof document<"u",zm=AC();function AC(){return un&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Tr(e){return e instanceof HTMLElement}function li(e){return e instanceof Element}function CC(e){return e instanceof Element||e instanceof SVGElement}function _o(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Nn(e){return e===null}function wo(e){return e.pointerType==="touch"}function OC(e){return e!==null}var DC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,oi(()=>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 a=t.getAnimations();if(a.length===0){n();return}Promise.all(a.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.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 a="data-starting-style";if(!t.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[a]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Xs(t):t()}},qm=class{#e;#t;#r;#n=ie(!1);#i=ie(void 0);#s=!1;#o=null;constructor(e){this.#e=e,M(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new DC({ref:this.#e.ref,afterTick:this.#e.open}),oi(()=>this.#a()),nt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#a(),!t&&this.#e.shouldSkipExitAnimation?.()){M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.();return}if(t&&M(this.#n,!0),M(this.#i,t?"starting":"ending",!0),t&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&M(this.#i,void 0)})),!this.#t){t||M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return f(this.#n)}get transitionStatus(){return f(this.#i)}#a(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Ee(){}function Ie(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var IC=new $t("BitsConfig");function PC(){const e=new $C(null,{});return IC.getOr(e).opts}var $C=class{opts;constructor(e,t){const r=MC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function MC(e,t){return r=>L(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function Um(e,t){return r=>{const n=PC();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Vm=Um(e=>e.defaultLocale,"en"),uN=Um(e=>e.defaultPortalTo,"body"),FC=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 gt(e,this.eventName,n,r)}};function Bm(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 jm(e,t){return e===t||e.contains(t)}function Zm(e){return e?.ownerDocument??document}function NC(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 Wm=["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] *)"],ko=Wm.join(","),Hm=typeof Element>"u",ui=Hm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,So=!Hm&&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},Eo=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]"):Eo(t.parentNode))},RC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Gm=function(t,r,n){if(Eo(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ko));return r&&ui.call(t,ko)&&i.unshift(t),i=i.filter(n),i},xo=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!Eo(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),l=xo(o.length?o:a.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{ui.call(a,ko)&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),d=!Eo(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&d){var u=xo(c===!0?a.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else s.unshift.apply(s,a.children)}}return i},Km=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ym=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RC(t))&&!Km(t)?0:t.tabIndex},LC=function(t,r){var n=Ym(t);return n<0&&r&&!Km(t)?0:n},zC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Jm=function(t){return t.tagName==="INPUT"},qC=function(t){return Jm(t)&&t.type==="hidden"},UC=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},VC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},BC=function(t){if(!t.name)return!0;var r=t.form||So(t),n=function(o){return r.querySelectorAll('input[type="radio"][name="'+o+'"]')},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(a){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",a.message),!1}var s=VC(i,t.form);return!s||s===t},jC=function(t){return Jm(t)&&t.type==="radio"},ZC=function(t){return jC(t)&&!BC(t)},WC=function(t){var r,n=t&&So(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var a,o,l;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=So(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},Qm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},HC=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=ui.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ui.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var o=t.parentElement,l=So(t);if(o&&!o.shadowRoot&&i(o)===!0)return Qm(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=a}if(WC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Qm(t);return!1},GC=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 ui.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},To=function(t,r){return!(r.disabled||qC(r)||HC(r,t)||UC(r)||GC(r))},rc=function(t,r){return!(ZC(r)||Ym(r)<0||!To(t,r))},KC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Xm=function(t){var r=[],n=[];return t.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,l=LC(o,a),c=a?Xm(i.candidates):o;l===0?a?r.push.apply(r,c):r.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:c})}),n.sort(zC).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},YC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xo([t],r.includeContainer,{filter:rc.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:KC}):n=Gm(t,r.includeContainer,rc.bind(null,r)),Xm(n)},JC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xo([t],r.includeContainer,{filter:To.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Gm(t,r.includeContainer,To.bind(null,r)),n},QC=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ui.call(t,ko)===!1?!1:rc(r,t)},XC=Wm.concat("iframe:not([inert]):not([inert] *)").join(","),eO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ui.call(t,XC)===!1?!1:To(r,t)};function tO(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 nc(e,t){return e>=0&&e<t.length}var rO="data-context-menu-trigger",nO="data-context-menu-content",cN=new $t("Menu.Root"),dN=new $t("Menu.Root | Menu.Sub"),fN=new $t("Menu.Content"),hN=new $t("Menu.Group | Menu.RadioGroup"),pN=new $t("Menu.RadioGroup"),mN=new $t("Menu.CheckboxGroup"),vN=new FC("bitsmenuopen",{bubbles:!1,cancelable:!0}),gN=bo({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 iO=class fy{static create(t){return new fy(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#o;#a=Ee;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#o=t.onFocusOutside,ge(()=>{this.#s=Zm(this.opts.ref.current)});let r=Ee;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};nt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return mC(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),oi(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Xs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#o.current?.(t)})};#u(){return Js(gt(this.#s,"pointerdown",Js(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Js(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=ev(t)),this.#e.current(t)};#d=Bm(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||oO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=ev(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=gt(this.#s,"click",this.#c,{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=aO(this.opts.ref.current))};#m=t=>this.opts.ref.current?jm(this.opts.ref.current,t):!1;#v=Bm(()=>{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 sO(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function aO(e){const t=[...globalThis.bitsDismissableLayers],r=sO(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function oO(e,t){const r=e.target;if(!CC(r))return!1;const n=!!r.closest(`[${rO}]`),i=!!t.closest(`[${nO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Zm(r).documentElement.contains(r)&&!jm(t,r)&&NC(e,t)}function ev(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,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function tv(e,t){ee(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,Ee),i=_(t,"onFocusOutside",7,Ee),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const d=iO.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>o()),onFocusOutside:L(()=>i()),isValidEvent:L(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),b()},get onInteractOutside(){return n()},set onInteractOutside(g=Ee){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=Ee){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return a()},set children(g){a(g),b()},get enabled(){return o()},set enabled(g){o(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=Q(),h=z(p);return we(h,()=>a()??Re,()=>({props:d.props})),E(e,p),te(u)}re(tv,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var lO=class hy{static create(t){return new hy(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Wi(this.opts.ref);let r=Ee;nt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>gt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!uO(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 uO(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 rv(e,t){ee(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,Ee),i=_(t,"children",7),s=_(t,"enabled",7),a=_(t,"ref",7);lO.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:a()});var o={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Ee){n(d),b()},get children(){return i()},set children(d){i(d),b()},get enabled(){return s()},set enabled(d){s(d),b()},get ref(){return a()},set ref(d){a(d),b()}},l=Q(),c=z(l);return we(c,()=>i()??Re),E(e,l),te(o)}re(rv,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var cO=class py{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new py),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)}},dO=class my{#e=!1;#t=null;#r=cO.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.#o()}unmount(){this.#t&&(this.#s(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#o(){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.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#a(){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=a=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=a.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&eO(l))a.preventDefault(),l.focus();else{const c=this.#c(),d=this.#d()[0];(c||d||t).focus()}}},i=a=>{if(!this.#i.loop||this.#e||a.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#u();if(o.length===0)return;const l=o[0],c=o[o.length-1];!a.shiftKey&&r.activeElement===c?(a.preventDefault(),l.focus()):a.shiftKey&&r.activeElement===l&&(a.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const a=this.#r.getFocusMemory(this);if(a&&!t.contains(a)){const o=this.#c(),l=this.#d()[0],c=o||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?YC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?JC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return nt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new my(t)),r.mount(n)):r&&(r.unmount(),r=null)}),oi(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function nv(e,t){ee(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),s=_(t,"onCloseAutoFocus",7,Ee),a=_(t,"onOpenAutoFocus",7,Ee),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=dO.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>a()),ref:l()});var d={get enabled(){return r()},set enabled(h=!1){r(h),b()},get trapFocus(){return n()},set trapFocus(h=!1){n(h),b()},get loop(){return i()},set loop(h=!1){i(h),b()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(h=Ee){s(h),b()},get onOpenAutoFocus(){return a()},set onOpenAutoFocus(h=Ee){a(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=Q(),p=z(u);return we(p,()=>o()??Re,()=>({props:c.props})),E(e,u),te(d)}re(nv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var iv=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var fO=class vy{static create(t){return new vy(t)}opts;domContext;#e=Ee;#t=!1;#r=iv;#n=iv;constructor(t){this.opts=t,this.domContext=new Wi(t.ref);let r=Ee;nt(()=>[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.#a(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Js(gt(this.domContext.getDocument(),"pointerdown",this.#o),gt(this.domContext.getDocument(),"pointerup",km(this.#a,this.#s)))}#s=t=>{this.#n(t)};#o=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!pO(this)||!wC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=hO(r,this.domContext.getDocument().body)))};#a=()=>{this.#e(),this.#e=Ee}},sv=e=>e.style.userSelect||e.style.webkitUserSelect;function hO(e,t){const r=sv(t),n=sv(e);return Ao(t,"none"),Ao(e,"text"),()=>{Ao(t,r),Ao(e,n)}}function Ao(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function pO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function av(e,t){ee(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,Ee),i=_(t,"onPointerUp",7,Ee),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);fO.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>o()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=Ee){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=Ee){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return a()},set children(p){a(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},d=Q(),u=z(d);return we(u,()=>a()??Re),E(e,d),te(c)}re(av,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Rn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var mO=class{#e;#t=0;#r=ie();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),M(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,f(this.#r)===void 0&&(this.#n=Es(()=>{M(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),f(this.#r)}},Co=new nC,Oo=ie(null),ic=null,ea=null,ta=!1,ov=L(()=>{for(const e of Co.values())if(e)return!0;return!1}),sc=null,vO=new mO(()=>{function e(){document.body.setAttribute("style",f(Oo)??""),document.body.style.removeProperty("--scrollbar-width"),zm&&ic?.(),M(Oo,null)}function t(){ea!==null&&(window.clearTimeout(ea),ea=null)}function r(i,s){t(),ta=!0,sc=Date.now();const a=sc,o=()=>{ea=null,sc===a&&(lv(Co)?ta=!1:(ta=!1,s()))},l=i===null?24:i;ea=window.setTimeout(o,l)}function n(){f(Oo)===null&&Co.size===0&&!ta&&M(Oo,document.body.getAttribute("style"),!0)}return nt(()=>ov.current,()=>{if(!ov.current)return;n(),ta=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),a=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+o,margin:Number.parseInt(s.marginRight??"0",10)};o>0&&!a&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",zm&&(ic=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Xs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),oi(()=>()=>{ic?.()}),{get lockMap(){return Co},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),gO=class{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=vO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=L(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),oi(()=>{if(this.#n.lockMap.delete(this.#e),lv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function lv(e){for(const[t,r]of e)if(r)return!0;return!1}function ac(e,t){ee(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new gO(r(),()=>n()),te({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}re(ac,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function yO(e){if(!un||!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(!Tr(t)){const i=e.createElement("div");i.style.cssText=tC,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(!Tr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Tr(s)?s:null}}}function Do(e){const t=yO(e);function r(n,i="assertive",s=7500){if(!t||!un||!e)return;const a=t.getLog(i),o=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),o.innerText=n,i==="assertive"?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},s)}return{announce:r}}var bO={defaultValue:void 0,granularity:"day"};function uv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...bO,...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(Vt())?s=n.toDate(Vt()):i&&s>i.toDate(Vt())&&(s=i.toDate(Vt()));const a=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Fi(a,o,l,0,0,0):new Bs(a,o,l)}}function cv(e,t){let r;return t instanceof Pn?r=hp(e):t instanceof Fi?r=fp(e):r=ao(e),r.calendar!==t.calendar?Yt(r,t.calendar):r}function Bt(e,t=Vt()){return e instanceof Pn?e.toDate():e.toDate(t)}function _O(e){if(e instanceof Bs)return"date";if(e instanceof Fi)return"datetime";if(e instanceof Pn)return"zoneddatetime";throw new Error("Unknown date type")}function wO(e,t){switch(t){case"date":return ao(e);case"datetime":return fp(e);case"zoneddatetime":return hp(e);default:throw new Error(`Unknown date type: ${t}`)}}function kO(e){return e instanceof Fi}function oc(e){return e instanceof Pn}function Io(e){return kO(e)||oc(e)}function ra(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 ci(e,t){return e.compare(t)<0}function SO(e,t){return e.compare(t)>0}function dv(e,t,r){const n=Gh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function fv(e,t,r){const n=Gh(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 Po=["day","month","year"],$o=["hour","minute","second","dayPeriod"],hv=["literal","timeZoneName"],na=[...Po,...$o],pv=[...na,...hv],EO=[...$o,...hv],yN=pv.filter(e=>e!=="literal"),bN=EO.filter(e=>e!=="literal"),xO=["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"],TO=["year","month","day"],lc={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 AO(e){if(mv(e))return lc[e];{const t=IO(e);return mv(t)?lc[t]:lc.en}}function uc(e,t,r){return CO(e)?AO(r)[e]:DO(e)?t:OO(e)?"––":""}function mv(e){return xO.includes(e)}function CO(e){return TO.includes(e)}function OO(e){return e==="hour"||e==="minute"||e==="second"}function DO(e){return e==="era"||e==="dayPeriod"}function IO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function cc(e){const t=["hour","minute","second"],r=na.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 PO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((o,l)=>{if(!gv(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Nn(c)?o[l]=uc(l,"AM",n):o[l]=c}else o[l]=a(l);return o},{});function a(o){if("hour"in t){const l=t[o],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&o!=="year")return"0";if(!Nn(l)&&!Nn(d)){const u=r.part(i.set({[o]:l}),o,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&bv(n)===12;if(o==="hour"&&p){if(d>12){const h=d-12;return h===0?"12":h<10?`0${h}`:`${h}`}return d===0?"12":d<10?`0${d}`:`${d}`}return o==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return uc(o,"",n)}else{if(Mo(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return uc(o,"",n);{const d=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function $O(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:a}=e;return n.toParts(r,FO(t,a)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!gv(o.type)?{part:o.type,value:o.value}:{part:o.type,value:i[o.type]}).filter(o=>!(Nn(o.part)||Nn(o.value)||o.part==="timeZoneName"&&(!oc(r)||s)))}function MO(e){const t=PO(e);return{obj:t,arr:$O({contentObj:t,...e})}}function FO(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 vv(){return na.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Mo(e){return Po.includes(e)}function gv(e){return na.includes(e)}function NO(e){return pv.includes(e)}function yv(e){return!un||!e?[]:Fo(e).map(t=>t.dataset.segment).filter(t=>na.includes(t))}function RO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=yv(r);let s=n;for(const a of i)if("hour"in t){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}else if(Mo(a)){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}return s}function LO(e,t){const r=yv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Mo(n)&&e[n]===null)return!1;return!0}function zO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>($o.includes(t)||Po.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function qO(e,t){return t||(Io(e)?"minute":"day")}function dc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||_o(e))}function UO(e,t){if(!un)return!1;const r=Fo(t);return r.length?r[0].id===e:!1}function VO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!un)return;const s=r.selectedDate(n),a=i.getElementById(t);if(a)a.innerText=`Selected Date: ${s}`;else{const o=i.createElement("div");o.style.cssText=Qs({display:"none"}),o.id=t,o.innerText=`Selected Date: ${s}`,i.body.appendChild(o)}}function BO(e,t){if(!un)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function bv(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 ia(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=fc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function jO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function ZO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function fc(e,t){const r=Fo(t);return r.length?{next:jO(e,r),prev:ZO(e,r)}:{next:null,prev:null}}function _v(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=fc(r,t);n&&n.focus()}function wv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=fc(r,t);n&&n.focus()}function sa(e){return e==="ArrowRight"||e==="ArrowLeft"}function Fo(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Tr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!NO(r)||r==="literal")}):[]}function WO(e){return Fo(e)[0]}var HO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function kv(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new kr(t,g).format(h)}function s(h,g=!0){return Io(h)&&g?i(Bt(h),{dateStyle:"long",timeStyle:"long"}):i(Bt(h),{dateStyle:"long"})}function a(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new kr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new kr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new kr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new kr(t,{month:"long"}).format(h)}function l(h){return new kr(t,{year:"numeric"}).format(h)}function c(h,g){return oc(h)?new kr(t,{...g,timeZone:h.timeZone}).formatToParts(Bt(h)):new kr(t,g).formatToParts(Bt(h))}function d(h,g="narrow"){return new kr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new kr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(h).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,g,m={}){const v=c(h,{...HO,...m}).find(y=>y.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:a,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function GO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function Sv(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 hc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=ra(t),a=Array.from({length:s},(m,v)=>t.set({day:v+1})),o=bu(t),l=Z1(t),c=r!==void 0?dv(o,r,"en-US"):dv(o,0,i),d=r!==void 0?fv(l,r,"en-US"):fv(l,0,i),u=Sv(c.subtract({days:1}),o),p=Sv(l,d.add({days:1})),h=u.length+a.length+p.length;if(n&&h<42){const m=42-h;let v=p[p.length-1];v||(v=t.add({months:1}).set({day:1}));let y=m;p.length===0&&(y=m-1,p.push(v));const k=Array.from({length:y},(x,T)=>{const S=T+1;return v.add({days:S})});p.push(...k)}const g=u.concat(a,p);return{value:t,dates:g,weeks:tO(g,7)}}function aa(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(hc({...n,dateObj:r})),i;i.push(hc({...n,dateObj:r}));for(let s=1;s<t;s++){const a=r.add({months:s});i.push(hc({...n,dateObj:a}))}return i}function pc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Ev(e,t){const r=e.getAttribute("data-value");r&&(t.current=cv(r,t.current))}function KO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:a,numberOfMonths:o}){const l=pc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(nc(c,l)){const d=l[c];return Ev(d,r),d.focus()}if(c<0){if(i)return;const d=a[0]?.value;if(!d)return;r.current=d.subtract({months:o}),Xs(()=>{const u=pc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(nc(p,u)){const h=u[p];return Ev(h,r),h.focus()}})}if(c>=l.length){if(s)return;const d=a[0]?.value;if(!d)return;r.current=d.add({months:o}),Xs(()=>{const u=pc(n);if(!u.length)return;const p=c-l.length;if(nc(p,u))return u[p].focus()})}}var xv=[ec,tc,Rm,Lm],Tv=[TC," "];function YO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!GO(i)||!xv.includes(e.key)&&!Tv.includes(e.key))return;e.preventDefault();const s={[ec]:7,[tc]:-7,[Rm]:-1,[Lm]:1};if(xv.includes(e.key)){const a=s[e.key];a!==void 0&&r(i,a)}if(Tv.includes(e.key)){const a=i.getAttribute("data-value");if(!a)return;t(e,cv(a,n))}}function JO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),d=aa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(d)}}function QO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=aa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(d)}}function XO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Bt(i),r)):[]}function eD(e){ge(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Le(()=>{const s=e.placeholder.current;if(!s)return;const a={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(aa({...a,dateObj:s}))})})}function tD({calendarNode:e,label:t,accessibleHeadingId:r}){const n=yo(e),i=n.createElement("div");i.style.cssText=Qs({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const a=n.getElementById(r);a&&(i.parentElement?.removeChild(i),a.remove())}}function rD({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:a}){ge(()=>{e.current,Le(()=>{t().some(o=>gu(o,e.current))||a(aa({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function nD({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?SO(n.add({months:1}).set({day:1}),e):!1}function iD({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?ci(n.subtract({months:1}).set({day:35}),e):!1}function sD({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Bt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Bt(e[0].value),i=Bt(e[e.length-1].value),s=r.fullMonth(n),a=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${s} - ${a} ${l}`:`${s} ${o} - ${a} ${l}`}function aD({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Ue(r),"data-disabled":Ue(n),"data-readonly":Ue(i)}}function oD(e){const t=yo(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function lD(e){if(!un)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 wO(n,i)}function uD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function a(o){return!!(s.current(o)||n.current&&ci(o,n.current)||i.current&&ci(i.current,o))}nt(()=>e.current,()=>{e.current&&t.current&&On(t.current,r)&&a(r)&&(t.current=lD(e.current)??r)})}function cD(e,t){return!e||!t?e:Io(e)&&Io(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var dD=bo({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 fD(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const a=r-100;n=e.placeholderYear<a?e.placeholderYear-10:a}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(a,o)=>n+o)}var Ar=new $t("Calendar.Root | RangeCalender.Root"),Av=class gy{static create(t){return Ar.set(new gy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return f(this.#e)}set visibleMonths(t){M(this.#e,t)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=ie(Me([]));get months(){return f(this.#t)}set months(t){M(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=et(this.opts.ref),this.domContext=new Wi(t.ref),this.announcer=Do(null),this.formatter=kv({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),nn(()=>{this.announcer=Do(this.domContext.getDocument())}),this.months=aa({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.#o(),this.#a(),rD({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}),eD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),nt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),nt(()=>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)}),uD({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(()=>XO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return f(this.#r)}set weekdays(t){M(this.#r,t)}#n=D(()=>Le(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return f(this.#n)}set initialPlaceholderYear(t){M(this.#n,t)}#i=D(()=>fD({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return f(this.#i)}set defaultYears(t){M(this.#i,t)}#s(){ge(()=>{if(Le(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#o(){ge(()=>{if(this.opts.ref.current)return tD({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#a(){Dl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){JO({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(){QO({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(()=>nD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return f(this.#l)}set isNextButtonDisabled(t){M(this.#l,t)}#u=D(()=>iD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return f(this.#u)}set isPrevButtonDisabled(t){M(this.#u,t)}#c=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 f(this.#c)}set isInvalid(t){M(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,sD({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return f(this.#d)}set headingValue(t){M(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return f(this.#h)}set fullCalendarLabel(t){M(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>gu(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&&ci(t,r)||n&&ci(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>On(n,t)):r?On(r,t):!1}shiftFocus(t,r){return KO({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=cD(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=>On(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(a=>!On(a,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&&On(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){YO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return f(this.#f)}set snippetProps(t){M(this.#f,t)}getBitsAttr=t=>dD.getAttr(t);#m=D(()=>({...aD({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 f(this.#m)}set props(t){M(this.#m,t)}},hD=class yy{static create(t){return new yy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},Cv=new $t("Calendar.Cell | RangeCalendar.Cell"),pD=class by{static create(t){return Cv.set(new by(t,Ar.get()))}opts;root;#e=D(()=>Bt(this.opts.date.current));get cellDate(){return f(this.#e)}set cellDate(t){M(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return f(this.#t)}set isUnavailable(t){M(this.#t,t)}#r=D(()=>U1(this.opts.date.current,Vt()));get isDateToday(){return f(this.#r)}set isDateToday(t){M(this.#r,t)}#n=D(()=>!gu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return f(this.#n)}set isOutsideMonth(t){M(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return f(this.#i)}set isOutsideVisibleMonths(t){M(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return f(this.#s)}set isDisabled(t){M(this.#s,t)}#o=D(()=>On(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return f(this.#o)}set isFocusedDate(t){M(this.#o,t)}#a=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return f(this.#a)}set isSelectedDate(t){M(this.#a,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return f(this.#l)}set labelText(t){M(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return f(this.#u)}set snippetProps(t){M(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return f(this.#c)}set ariaDisabled(t){M(this.#c,t)}#d=D(()=>({"data-unavailable":Ue(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":Ue(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":_O(this.opts.date.current),"data-disabled":Ue(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return f(this.#d)}set sharedDataAttrs(t){M(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":xr(this.isSelectedDate),"aria-disabled":xr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return f(this.#h)}set props(t){M(this.#h,t)}},mD=class _y{static create(t){return new _y(t,Cv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(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 f(this.#t)}set snippetProps(t){M(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":xr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:f(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#r)}set props(t){M(this.#r,t)}},vD=class wy{static create(t){return new wy(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){M(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(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":xr(this.isDisabled),"data-disabled":Ue(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#t)}set props(t){M(this.#t,t)}},gD=class ky{static create(t){return new ky(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){M(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(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":xr(this.isDisabled),"data-disabled":Ue(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#t)}set props(t){M(this.#t,t)}},yD=class Sy{static create(t){return new Sy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":xr(this.root.opts.readonly.current),"aria-disabled":xr(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),"data-disabled":Ue(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},bD=class Ey{static create(t){return new Ey(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},_D=class xy{static create(t){return new xy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},wD=class Ty{static create(t){return new Ty(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},kD=class Ay{static create(t){return new Ay(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},SD=class Cy{static create(t){return new Cy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},ED=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"]),xD=V("<div><!></div>");function Ov(e,t){ee(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Rn),s=_(t,"ref",15,null),a=_(t,"value",15),o=_(t,"onValueChange",7,Ee),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,Ee),d=_(t,"weekdayFormat",7,"narrow"),u=_(t,"weekStartsOn",7),p=_(t,"pagedNavigation",7,!1),h=_(t,"isDateDisabled",7,()=>!1),g=_(t,"isDateUnavailable",7,()=>!1),m=_(t,"fixedWeeks",7,!1),v=_(t,"numberOfMonths",7,1),y=_(t,"locale",7),k=_(t,"calendarLabel",7,"Event"),x=_(t,"disabled",7,!1),T=_(t,"readonly",7,!1),S=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),P=_(t,"preventDeselect",7,!1),R=_(t,"type",7),j=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),B=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),oe=_(t,"yearFormat",7,"numeric"),pe=We(t,ED);const Y=uv({defaultValue:a(),minValue:S(),maxValue:O()});function ae(){l()===void 0&&l(Y)}ae(),nt.pre(()=>l(),()=>{ae()});function X(){a()===void 0&&a(R()==="single"?void 0:[])}X(),nt.pre(()=>a(),()=>{X()});const fe=Av.create({id:L(()=>i()),ref:L(()=>s(),q=>s(q)),weekdayFormat:L(()=>d()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>h()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:Vm(()=>y()),calendarLabel:L(()=>k()),readonly:L(()=>T()),disabled:L(()=>x()),minValue:L(()=>S()),maxValue:L(()=>O()),disableDaysOutsideMonth:L(()=>j()),initialFocus:L(()=>N()),maxDays:L(()=>B()),placeholder:L(()=>l(),q=>{l(q),c()(q)}),preventDeselect:L(()=>P()),value:L(()=>a(),q=>{a(q),o()(q)}),type:L(()=>R()),monthFormat:L(()=>U()),yearFormat:L(()=>oe()),defaultPlaceholder:Y}),ue=D(()=>Ge(pe,fe.props));var H={get child(){return r()},set child(q){r(q),b()},get children(){return n()},set children(q){n(q),b()},get id(){return i()},set id(q=Rn()){i(q),b()},get ref(){return s()},set ref(q=null){s(q),b()},get value(){return a()},set value(q){a(q),b()},get onValueChange(){return o()},set onValueChange(q=Ee){o(q),b()},get placeholder(){return l()},set placeholder(q){l(q),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(q=Ee){c(q),b()},get weekdayFormat(){return d()},set weekdayFormat(q="narrow"){d(q),b()},get weekStartsOn(){return u()},set weekStartsOn(q){u(q),b()},get pagedNavigation(){return p()},set pagedNavigation(q=!1){p(q),b()},get isDateDisabled(){return h()},set isDateDisabled(q=()=>!1){h(q),b()},get isDateUnavailable(){return g()},set isDateUnavailable(q=()=>!1){g(q),b()},get fixedWeeks(){return m()},set fixedWeeks(q=!1){m(q),b()},get numberOfMonths(){return v()},set numberOfMonths(q=1){v(q),b()},get locale(){return y()},set locale(q){y(q),b()},get calendarLabel(){return k()},set calendarLabel(q="Event"){k(q),b()},get disabled(){return x()},set disabled(q=!1){x(q),b()},get readonly(){return T()},set readonly(q=!1){T(q),b()},get minValue(){return S()},set minValue(q=void 0){S(q),b()},get maxValue(){return O()},set maxValue(q=void 0){O(q),b()},get preventDeselect(){return P()},set preventDeselect(q=!1){P(q),b()},get type(){return R()},set type(q){R(q),b()},get disableDaysOutsideMonth(){return j()},set disableDaysOutsideMonth(q=!0){j(q),b()},get initialFocus(){return N()},set initialFocus(q=!1){N(q),b()},get maxDays(){return B()},set maxDays(q){B(q),b()},get monthFormat(){return U()},set monthFormat(q="long"){U(q),b()},get yearFormat(){return oe()},set yearFormat(q="numeric"){oe(q),b()}},ne=Q(),de=z(ne),F=q=>{var ce=Q(),se=z(ce);{let w=D(()=>({props:f(ue),...fe.snippetProps}));we(se,r,()=>f(w))}E(q,ce)},he=q=>{var ce=xD();ze(ce,()=>({...f(ue)}));var se=$(ce);we(se,()=>n()??Re,()=>fe.snippetProps),I(ce),E(q,ce)};return le(de,q=>{r()?q(F):q(he,-1)}),E(e,ne),te(H)}re(Ov,{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 TD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),AD=V("<div><!></div>");function mc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,TD);const l=mD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);{let k=D(()=>({props:f(c),...l.snippetProps}));we(y,i,()=>f(k))}E(m,v)},g=m=>{var v=AD();ze(v,()=>({...f(c)}));var y=$(v),k=T=>{var S=Q(),O=z(S);we(O,()=>n()??Re,()=>l.snippetProps),E(T,S)},x=T=>{var S=qt();J(()=>K(S,l.cell.opts.date.current.day)),E(T,S)};le(y,T=>{n()?T(k):T(x,-1)}),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var CD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),OD=V("<table><!></table>");function vc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,CD);const l=yD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=OD();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var DD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),ID=V("<tbody><!></tbody>");function gc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,DD);const l=bD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=ID();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var PD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),$D=V("<td><!></td>");function yc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=_(t,"date",7),l=_(t,"month",7),c=We(t,PD);const d=pD.create({id:L(()=>a()),ref:L(()=>s(),y=>s(y)),date:L(()=>o()),month:L(()=>l())}),u=D(()=>Ge(c,d.props));var p={get children(){return n()},set children(y){n(y),b()},get child(){return i()},set child(y){i(y),b()},get ref(){return s()},set ref(y=null){s(y),b()},get id(){return a()},set id(y=Ie(r)){a(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=Q(),g=z(h),m=y=>{var k=Q(),x=z(k);{let T=D(()=>({props:f(u),...d.snippetProps}));we(x,i,()=>f(T))}E(y,k)},v=y=>{var k=$D();ze(k,()=>({...f(u)}));var x=$(k);we(x,()=>n()??Re,()=>d.snippetProps),I(k),E(y,k)};return le(g,y=>{i()?y(m):y(v,-1)}),E(e,h),te(p)}re(yc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var MD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),FD=V("<thead><!></thead>");function bc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,MD);const l=_D.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=FD();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(bc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var ND=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),RD=V("<th><!></th>");function _c(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,ND);const l=kD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=RD();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(_c,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var LD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),zD=V("<tr><!></tr>");function oa(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,LD);const l=wD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=zD();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(oa,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var qD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),UD=V("<header><!></header>");function wc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,qD);const l=SD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c)})),E(m,v)},g=m=>{var v=UD();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(wc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var VD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),BD=V("<div><!></div>");function kc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,VD);const l=hD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ge(o,l.props));var d={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,i,()=>({props:f(c),headingValue:l.root.headingValue})),E(m,v)},g=m=>{var v=BD();ze(v,()=>({...f(c)}));var y=$(v),k=T=>{var S=Q(),O=z(S);we(O,()=>n()??Re,()=>({headingValue:l.root.headingValue})),E(T,S)},x=T=>{var S=qt();J(()=>K(S,l.root.headingValue)),E(T,S)};le(y,T=>{n()?T(k):T(x,-1)}),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),te(d)}re(kc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var jD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),ZD=V("<button><!></button>");function Sc(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=We(t,jD);const c=vD.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v))}),d=D(()=>Ge(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get tabindex(){return o()},set tabindex(v=0){o(v),b()}},p=Q(),h=z(p),g=v=>{var y=Q(),k=z(y);we(k,i,()=>({props:f(d)})),E(v,y)},m=v=>{var y=ZD();ze(y,()=>({...f(d)}));var k=$(y);we(k,()=>n()??Re),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),te(u)}re(Sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var WD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),HD=V("<button><!></button>");function Ec(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=We(t,WD);const c=gD.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v))}),d=D(()=>Ge(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get tabindex(){return o()},set tabindex(v=0){o(v),b()}},p=Q(),h=z(p),g=v=>{var y=Q(),k=z(y);we(k,i,()=>({props:f(d)})),E(v,y)},m=v=>{var y=HD();ze(y,()=>({...f(d)}));var k=$(y);we(k,()=>n()??Re),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),te(u)}re(Ec,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var GD=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Dv=V("<input/>");function Iv(e,t){ee(t,!0);let r=_(t,"value",15),n=We(t,GD);const i=D(()=>Ge(n,{"aria-hidden":"true",tabindex:-1,style:{...Cm,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),b()}},a=Q(),o=z(a),l=d=>{var u=Dv();ze(u,()=>({...f(i),value:r()}),void 0,void 0,void 0,void 0,!0),E(d,u)},c=d=>{var u=Dv();ze(u,()=>({...f(i)}),void 0,void 0,void 0,void 0,!0),Ua(u,r),E(d,u)};return le(o,d=>{f(i).type==="checkbox"?d(l):d(c,-1)}),E(e,a),te(s)}re(Iv,{value:{}},[],[],{mode:"open"});var KD=["top","right","bottom","left"],Ln=Math.min,Qt=Math.max,No=Math.round,Ro=Math.floor,Kr=e=>({x:e,y:e}),YD={left:"right",right:"left",bottom:"top",top:"bottom"};function xc(e,t,r){return Qt(e,Ln(t,r))}function cn(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function Hi(e){return e.split("-")[1]}function Tc(e){return e==="x"?"y":"x"}function Ac(e){return e==="y"?"height":"width"}function Yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cc(e){return Tc(Yr(e))}function JD(e,t,r){r===void 0&&(r=!1);const n=Hi(e),i=Cc(e),s=Ac(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Lo(a)),[a,Lo(a)]}function QD(e){const t=Lo(e);return[Oc(e),t,Oc(t)]}function Oc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Pv=["left","right"],$v=["right","left"],XD=["top","bottom"],eI=["bottom","top"];function tI(e,t,r){switch(e){case"top":case"bottom":return r?t?$v:Pv:t?Pv:$v;case"left":case"right":return t?XD:eI;default:return[]}}function rI(e,t,r,n){const i=Hi(e);let s=tI(dn(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Oc)))),s}function Lo(e){const t=dn(e);return YD[t]+e.slice(t.length)}function nI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mv(e){return typeof e!="number"?nI(e):{top:e,right:e,bottom:e,left:e}}function zo(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 Fv(e,t,r){let{reference:n,floating:i}=e;const s=Yr(t),a=Cc(t),o=Ac(a),l=dn(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Hi(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1);break}return h}async function iI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=cn(t,e),g=Mv(h),m=o[p?u==="floating"?"reference":"floating":u],v=zo(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(o.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),x=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},T=zo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:k,strategy:l}):y);return{top:(v.top-T.top+g.top)/x.y,bottom:(T.bottom-v.bottom+g.bottom)/x.y,left:(v.left-T.left+g.left)/x.x,right:(T.right-v.right+g.right)/x.x}}var sI=50,aI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=a.detectOverflow?a:{...a,detectOverflow:iI},l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Fv(c,n,l),p=n,h=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:y,fn:k}=v,{x,y:T,data:S,reset:O}=await k({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});d=x??d,u=T??u,g[y]={...g[y],...S},O&&h<sI&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=Fv(c,p,l)),m=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:g}},oI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:d=0}=cn(e,t)||{};if(c==null)return{};const u=Mv(d),p={x:r,y:n},h=Cc(i),g=Ac(h),m=await a.getDimensions(c),v=h==="y",y=v?"top":"left",k=v?"bottom":"right",x=v?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[h]-p[h]-s.floating[g],S=p[h]-s.reference[h],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let P=O?O[x]:0;(!P||!await(a.isElement==null?void 0:a.isElement(O)))&&(P=o.floating[x]||s.floating[g]);const R=T/2-S/2,j=P/2-m[g]/2-1,N=Ln(u[y],j),B=Ln(u[k],j),U=N,oe=P-m[g]-B,pe=P/2-m[g]/2+R,Y=xc(U,pe,oe),ae=!l.arrow&&Hi(i)!=null&&pe!==Y&&s.reference[g]/2-(pe<U?N:B)-m[g]/2<0,X=ae?pe<U?pe-U:pe-oe:0;return{[h]:p[h]+X,data:{[h]:Y,centerOffset:pe-Y-X,...ae&&{alignmentOffset:X}},reset:ae}}}),lI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=cn(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=dn(i),k=Yr(o),x=dn(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(x||!m?[Lo(o)]:QD(o)),O=g!=="none";!p&&O&&S.push(...rI(o,m,g,T));const P=[o,...S],R=await l.detectOverflow(t,v),j=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&j.push(R[y]),u){const pe=JD(i,a,T);j.push(R[pe[0]],R[pe[1]])}if(N=[...N,{placement:i,overflows:j}],!j.every(pe=>pe<=0)){var B,U;const pe=(((B=s.flip)==null?void 0:B.index)||0)+1,Y=P[pe];if(Y&&(!(u==="alignment"&&k!==Yr(Y))||N.every(X=>Yr(X.placement)===k?X.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:Y}};let ae=(U=N.filter(X=>X.overflows[0]<=0).sort((X,fe)=>X.overflows[1]-fe.overflows[1])[0])==null?void 0:U.placement;if(!ae)switch(h){case"bestFit":{var oe;const X=(oe=N.filter(fe=>{if(O){const ue=Yr(fe.placement);return ue===k||ue==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(ue=>ue>0).reduce((ue,H)=>ue+H,0)]).sort((fe,ue)=>fe[1]-ue[1])[0])==null?void 0:oe[0];X&&(ae=X);break}case"initialPlacement":ae=o;break}if(i!==ae)return{reset:{placement:ae}}}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 Rv(e){return KD.some(t=>e[t]>=0)}var uI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=cn(e,t);switch(i){case"referenceHidden":{const a=Nv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Rv(a)}}}case"escaped":{const a=Nv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:Rv(a)}}}default:return{}}}}},Lv=new Set(["left","top"]);async function cI(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=dn(r),o=Hi(r),l=Yr(r)==="y",c=Lv.has(a)?-1:1,d=s&&l?-1:1,u=cn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}var dI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await cI(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},fI=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:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:k,y:x}=y;return{x:k,y:x}}},...c}=cn(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),p=Yr(dn(i)),h=Tc(p);let g=d[h],m=d[p];if(a){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=g+u[y],T=g-u[k];g=xc(x,g,T)}if(o){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",x=m+u[y],T=m-u[k];m=xc(x,m,T)}const v=l.fn({...t,[h]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:a,[p]:o}}}}}},hI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=cn(e,t),d={x:r,y:n},u=Yr(i),p=Tc(u);let h=d[p],g=d[u];const m=cn(o,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",T=s.reference[p]-s.floating[x]+v.mainAxis,S=s.reference[p]+s.reference[x]-v.mainAxis;h<T?h=T:h>S&&(h=S)}if(c){var y,k;const x=p==="y"?"width":"height",T=Lv.has(dn(i)),S=s.reference[u]-s.floating[x]+(T&&((y=a.offset)==null?void 0:y[u])||0)+(T?0:v.crossAxis),O=s.reference[u]+s.reference[x]+(T?0:((k=a.offset)==null?void 0:k[u])||0)-(T?v.crossAxis:0);g<S?g=S:g>O&&(g=O)}return{[p]:h,[u]:g}}}},pI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=cn(e,t),d=await a.detectOverflow(t,c),u=dn(i),p=Hi(i),h=Yr(i)==="y",{width:g,height:m}=s.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,v=p==="end"?"top":"bottom");const k=m-d.top-d.bottom,x=g-d.left-d.right,T=Ln(m-d[v],k),S=Ln(g-d[y],x),O=!t.middlewareData.shift;let P=T,R=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=k),O&&!p){const N=Qt(d.left,0),B=Qt(d.right,0),U=Qt(d.top,0),oe=Qt(d.bottom,0);h?R=g-2*(N!==0||B!==0?N+B:Qt(d.left,d.right)):P=m-2*(U!==0||oe!==0?U+oe:Qt(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:P});const j=await a.getDimensions(o.floating);return g!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function qo(){return typeof window<"u"}function Gi(e){return zv(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(zv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zv(e){return qo()?e instanceof Node||e instanceof Xt(e).Node:!1}function Cr(e){return qo()?e instanceof Element||e instanceof Xt(e).Element:!1}function fn(e){return qo()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function qv(e){return!qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function la(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function mI(e){return/^(table|td|th)$/.test(Gi(e))}function Uo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var vI=/transform|translate|scale|rotate|perspective|filter/,gI=/paint|layout|strict|content/,di=e=>!!e&&e!=="none",Dc;function Ic(e){const t=Cr(e)?Or(e):e;return di(t.transform)||di(t.translate)||di(t.scale)||di(t.rotate)||di(t.perspective)||!Pc()&&(di(t.backdropFilter)||di(t.filter))||vI.test(t.willChange||"")||gI.test(t.contain||"")}function yI(e){let t=zn(e);for(;fn(t)&&!Ki(t);){if(Ic(t))return t;if(Uo(t))return null;t=zn(t)}return null}function Pc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function Ki(e){return/^(html|body|#document)$/.test(Gi(e))}function Or(e){return Xt(e).getComputedStyle(e)}function Vo(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qv(e)&&e.host||Jr(e);return qv(t)?t.host:t}function Uv(e){const t=zn(e);return Ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&la(t)?t:Uv(t)}function ua(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Uv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=Xt(i);if(s){const o=$c(a);return t.concat(a,a.visualViewport||[],la(i)?i:[],o&&r?ua(o):[])}else return t.concat(i,ua(i,[],r))}function $c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=fn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=No(r)!==s||No(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function Mc(e){return Cr(e)?e:e.contextElement}function Yi(e){const t=Mc(e);if(!fn(t))return Kr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Vv(t);let a=(s?No(r.width):r.width)/n,o=(s?No(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var bI=Kr(0);function Bv(e){const t=Xt(e);return!Pc()||!t.visualViewport?bI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _I(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function fi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Mc(e);let a=Kr(1);t&&(n?Cr(n)&&(a=Yi(n)):a=Yi(e));const o=_I(s,r,n)?Bv(s):Kr(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(s){const p=Xt(s),h=n&&Cr(n)?Xt(n):n;let g=p,m=$c(g);for(;m&&n&&h!==g;){const v=Yi(m),y=m.getBoundingClientRect(),k=Or(m),x=y.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,T=y.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=x,c+=T,g=Xt(m),m=$c(g)}}return zo({width:d,height:u,x:l,y:c})}function Bo(e,t){const r=Vo(e).scrollLeft;return t?t.left+r:fi(Jr(e)).left+r}function jv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Bo(e,r),y:r.top+t.scrollTop}}function wI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Jr(n),o=t?Uo(t.floating):!1;if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Kr(1);const d=Kr(0),u=fn(n);if((u||!u&&!s)&&((Gi(n)!=="body"||la(a))&&(l=Vo(n)),u)){const h=fi(n);c=Yi(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=a&&!u&&!s?jv(a,l):Kr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function kI(e){return Array.from(e.getClientRects())}function SI(e){const t=Jr(e),r=Vo(e),n=e.ownerDocument.body,i=Qt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Qt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Bo(e);const o=-r.scrollTop;return Or(n).direction==="rtl"&&(a+=Qt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}var Zv=25;function EI(e,t){const r=Xt(e),n=Jr(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const d=Pc();(!d||d&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Bo(n);if(c<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=Zv&&(s-=g)}else c<=Zv&&(s+=c);return{width:s,height:a,x:o,y:l}}function xI(e,t){const r=fi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=fn(e)?Yi(e):Kr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Wv(e,t,r){let n;if(t==="viewport")n=EI(e,r);else if(t==="document")n=SI(Jr(e));else if(Cr(t))n=xI(t,r);else{const i=Bv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zo(n)}function Hv(e,t){const r=zn(e);return r===t||!Cr(r)||Ki(r)?!1:Or(r).position==="fixed"||Hv(r,t)}function TI(e,t){const r=t.get(e);if(r)return r;let n=ua(e,[],!1).filter(o=>Cr(o)&&Gi(o)!=="body"),i=null;const s=Or(e).position==="fixed";let a=s?zn(e):e;for(;Cr(a)&&!Ki(a);){const o=Or(a),l=Ic(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||la(a)&&!l&&Hv(e,a))?n=n.filter(c=>c!==a):i=o,a=zn(a)}return t.set(e,n),n}function AI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Uo(t)?[]:TI(t,this._c):[].concat(r),n],a=Wv(t,s[0],i);let o=a.top,l=a.right,c=a.bottom,d=a.left;for(let u=1;u<s.length;u++){const p=Wv(t,s[u],i);o=Qt(p.top,o),l=Ln(p.right,l),c=Ln(p.bottom,c),d=Qt(p.left,d)}return{width:l-d,height:c-o,x:d,y:o}}function CI(e){const{width:t,height:r}=Vv(e);return{width:t,height:r}}function OI(e,t,r){const n=fn(t),i=Jr(t),s=r==="fixed",a=fi(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Kr(0);function c(){l.x=Bo(i)}if(n||!n&&!s)if((Gi(t)!=="body"||la(i))&&(o=Vo(t)),n){const u=fi(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?jv(i,o):Kr(0);return{x:a.left+o.scrollLeft-l.x-d.x,y:a.top+o.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Fc(e){return Or(e).position==="static"}function Gv(e,t){if(!fn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Jr(e)===r&&(r=r.ownerDocument.body),r}function Kv(e,t){const r=Xt(e);if(Uo(e))return r;if(!fn(e)){let i=zn(e);for(;i&&!Ki(i);){if(Cr(i)&&!Fc(i))return i;i=zn(i)}return r}let n=Gv(e,t);for(;n&&mI(n)&&Fc(n);)n=Gv(n,t);return n&&Ki(n)&&Fc(n)&&!Ic(n)?r:n||yI(e)||r}var DI=async function(e){const t=this.getOffsetParent||Kv,r=this.getDimensions,n=await r(e.floating);return{reference:OI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function II(e){return Or(e).direction==="rtl"}var PI={convertOffsetParentRelativeRectToViewportRelativeRect:wI,getDocumentElement:Jr,getClippingRect:AI,getOffsetParent:Kv,getElementRects:DI,getClientRects:kI,getDimensions:CI,getScale:Yi,isElement:Cr,isRTL:II};function Yv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $I(e,t){let r=null,n;const i=Jr(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=Ro(u),m=Ro(i.clientWidth-(d+p)),v=Ro(i.clientHeight-(u+h)),y=Ro(d),k={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Qt(0,Ln(1,l))||1};let x=!0;function T(S){const O=S[0].intersectionRatio;if(O!==l){if(!x)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Yv(c,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(T,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,k)}r.observe(e)}return a(!0),s}function MI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Mc(e),d=i||s?[...c?ua(c):[],...t?ua(t):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&o?$I(c,r):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[k]=y;k&&k.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,m=l?fi(e):null;l&&v();function v(){const y=fi(e);m&&!Yv(m,y)&&r(),m=y,g=requestAnimationFrame(v)}return r(),()=>{var y;d.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var FI=dI,NI=fI,RI=lI,LI=pI,zI=uI,qI=oI,UI=hI,VI=(e,t,r)=>{const n=new Map,i={platform:PI,...r},s={...i.platform,_c:n};return aI(e,t,{...i,platform:s})};function hi(e){return typeof e=="function"?e():e}function Jv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qv(e,t){const r=Jv(e);return Math.round(t*r)/r}function Xv(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 BI(e){const t=e.whileElementsMounted,r=D(()=>hi(e.open)??!0),n=D(()=>hi(e.middleware)),i=D(()=>hi(e.transform)??!0),s=D(()=>hi(e.placement)??"bottom"),a=D(()=>hi(e.strategy)??"absolute"),o=D(()=>hi(e.sideOffset)??0),l=D(()=>hi(e.alignOffset)??0),c=e.reference;let d=ie(0),u=ie(0);const p=Er(null);let h=ie(Me(f(a))),g=ie(Me(f(s))),m=ie(Me({})),v=ie(!1),y=!1,k=0;const x=D(()=>{const N=p.current?Qv(p.current,f(d)):f(d),B=p.current?Qv(p.current,f(u)):f(u);return f(i)?{position:f(h),left:"0",top:"0",transform:`translate(${N}px, ${B}px)`,...p.current&&Jv(p.current)>=1.5&&{willChange:"transform"}}:{position:f(h),left:`${N}px`,top:`${B}px`}});let T;function S(){if(c.current===null||p.current===null)return;const N=c.current,B=p.current,U=++k;VI(N,B,{middleware:f(n),placement:f(s),strategy:f(a)}).then(oe=>{if(U===k&&!(c.current!==N||p.current!==B)){if(jI(N)){M(m,{...f(m),hide:{...f(m).hide,referenceHidden:!0}},!0);return}if(!f(r)&&f(d)!==0&&f(u)!==0){const pe=Math.max(Math.abs(f(o)),Math.abs(f(l)),15);if(oe.x<=pe&&oe.y<=pe)return}M(d,oe.x,!0),M(u,oe.y,!0),M(h,oe.strategy,!0),M(g,oe.placement,!0),M(m,oe.middlewareData,!0),M(v,!0)}})}function O(){typeof T=="function"&&(T(),T=void 0),k++}function P(){if(O(),t===void 0){S();return}f(r)&&(c.current===null||p.current===null||(T=t(c.current,p.current,S)))}function R(){!f(r)&&p.current===null&&M(v,!1)}function j(){return[f(n),f(s),f(a),f(o),f(l),f(r)]}return ge(()=>{t===void 0&&f(r)&&S()}),ge(P),ge(()=>{if(t!==void 0){if(j(),!f(r)){y=!1;return}if(!f(v)){y=!1;return}if(!y){y=!0;return}S()}}),ge(R),ge(()=>O),{floating:p,reference:c,get strategy(){return f(h)},get placement(){return f(g)},get middlewareData(){return f(m)},get isPositioned(){return f(v)},get floatingStyles(){return f(x)},get update(){return S}}}function jI(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var ZI={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=new $t("Floating.Root"),eg=new $t("Floating.Content"),Rc=new $t("Floating.Root"),WI=class md{static create(t=!1){return t?Rc.set(new md):Nc.set(new md)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ge(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},HI=class vd{static create(t,r=!1){return r?eg.set(new vd(t,Rc.get())):eg.set(new vd(t,Nc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=Er(Rn());#e=D(()=>{if(typeof this.opts.style=="string")return Ys(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new cC(()=>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}`:""));#o=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=D(()=>f(this.#o).length>0);get hasExplicitBoundaries(){return f(this.#a)}set hasExplicitBoundaries(t){M(this.#a,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:f(this.#o).filter(OC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return f(this.#l)}set detectOverflowOptions(t){M(this.#l,t)}#u=ie(void 0);#c=ie(void 0);#d=ie(void 0);#h=ie(void 0);#p=D(()=>[FI({mainAxis:this.opts.sideOffset.current+f(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&NI({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?UI():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&RI({...this.detectOverflowOptions}),LI({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;M(this.#u,r,!0),M(this.#c,n,!0),M(this.#d,i,!0),M(this.#h,s,!0)}}),this.arrowRef.current&&qI({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),KI({arrowWidth:f(this.#n),arrowHeight:f(this.#i)}),this.opts.hideWhenDetached.current&&zI({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return f(this.#p)}set middleware(t){M(this.#p,t)}floating;#f=D(()=>YI(this.floating.placement));get placedSide(){return f(this.#f)}set placedSide(t){M(this.#f,t)}#m=D(()=>JI(this.floating.placement));get placedAlign(){return f(this.#m)}set placedAlign(t){M(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return f(this.#v)}set arrowX(t){M(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return f(this.#y)}set arrowY(t){M(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return f(this.#w)}set cannotCenterArrow(t){M(this.#w,t)}#_=ie();get contentZIndex(){return f(this.#_)}set contentZIndex(t){M(this.#_,t,!0)}#g=D(()=>ZI[this.placedSide]);get arrowBaseSide(){return f(this.#g)}set arrowBaseSide(t){M(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":`${f(this.#u)}px`,"--bits-floating-available-height":`${f(this.#c)}px`,"--bits-floating-anchor-width":`${f(this.#d)}px`,"--bits-floating-anchor-height":`${f(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...f(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return f(this.#k)}set wrapperProps(t){M(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Qs({...f(this.#e)}),...this.contentAttachment}));get props(){return f(this.#b)}set props(t){M(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 f(this.#S)}set arrowStyle(t){M(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),nt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=BI({strategy:()=>this.opts.strategy.current,placement:()=>f(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>MI(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ge(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Fm(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const a=i.getComputedStyle(n).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(s)}}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}},GI=class gd{static create(t,r=!1){return r?new gd(t,Rc.get()):new gd(t,Nc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=OA(t.virtualEl.current):r.triggerNode=t.ref}};function KI(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,o=s?0:e.arrowHeight,[l,c]=Lc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=s?d:`${u}px`,g=`${-o}px`):l==="top"?(h=s?d:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=s?d:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}}}function Lc(e){const[t,r="center"]=e.split("-");return[t,r]}function YI(e){return Lc(e)[0]}function JI(e){return Lc(e)[1]}function tg(e,t){ee(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);WI.create(n());var i={get children(){return r()},set children(o){r(o),b()},get tooltip(){return n()},set tooltip(o=!1){n(o),b()}},s=Q(),a=z(s);return we(a,()=>r()??Re),E(e,s),te(i)}re(tg,{children:{},tooltip:{}},[],[],{mode:"open"});function rg(e,t){ee(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),a=_(t,"tooltip",7,!1);GI.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},a());var o={get id(){return r()},set id(d){r(d),b()},get children(){return n()},set children(d){n(d),b()},get virtualEl(){return i()},set virtualEl(d){i(d),b()},get ref(){return s()},set ref(d){s(d),b()},get tooltip(){return a()},set tooltip(d=!1){a(d),b()}},l=Q(),c=z(l);return we(c,()=>n()??Re),E(e,l),te(o)}re(rg,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function ng(e,t){ee(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),s=_(t,"align",7,"center"),a=_(t,"alignOffset",7,0),o=_(t,"id",7),l=_(t,"arrowPadding",7,0),c=_(t,"avoidCollisions",7,!0),d=_(t,"collisionBoundary",23,()=>[]),u=_(t,"collisionPadding",7,0),p=_(t,"hideWhenDetached",7,!1),h=_(t,"onPlaced",7,()=>{}),g=_(t,"sticky",7,"partial"),m=_(t,"updatePositionStrategy",7,"optimized"),v=_(t,"strategy",7,"fixed"),y=_(t,"dir",7,"ltr"),k=_(t,"style",23,()=>({})),x=_(t,"wrapperId",23,Rn),T=_(t,"customAnchor",7,null),S=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const P=HI.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>a()),id:L(()=>o()),arrowPadding:L(()=>l()),avoidCollisions:L(()=>c()),collisionBoundary:L(()=>d()),collisionPadding:L(()=>u()),hideWhenDetached:L(()=>p()),onPlaced:L(()=>h()),sticky:L(()=>g()),updatePositionStrategy:L(()=>m()),strategy:L(()=>v()),dir:L(()=>y()),style:L(()=>k()),enabled:L(()=>S()),wrapperId:L(()=>x()),customAnchor:L(()=>T())},O()),R=D(()=>Ge(P.wrapperProps,{style:{pointerEvents:"auto"}}));var j={get content(){return r()},set content(U){r(U),b()},get side(){return n()},set side(U="bottom"){n(U),b()},get sideOffset(){return i()},set sideOffset(U=0){i(U),b()},get align(){return s()},set align(U="center"){s(U),b()},get alignOffset(){return a()},set alignOffset(U=0){a(U),b()},get id(){return o()},set id(U){o(U),b()},get arrowPadding(){return l()},set arrowPadding(U=0){l(U),b()},get avoidCollisions(){return c()},set avoidCollisions(U=!0){c(U),b()},get collisionBoundary(){return d()},set collisionBoundary(U=[]){d(U),b()},get collisionPadding(){return u()},set collisionPadding(U=0){u(U),b()},get hideWhenDetached(){return p()},set hideWhenDetached(U=!1){p(U),b()},get onPlaced(){return h()},set onPlaced(U=()=>{}){h(U),b()},get sticky(){return g()},set sticky(U="partial"){g(U),b()},get updatePositionStrategy(){return m()},set updatePositionStrategy(U="optimized"){m(U),b()},get strategy(){return v()},set strategy(U="fixed"){v(U),b()},get dir(){return y()},set dir(U="ltr"){y(U),b()},get style(){return k()},set style(U={}){k(U),b()},get wrapperId(){return x()},set wrapperId(U=Rn()){x(U),b()},get customAnchor(){return T()},set customAnchor(U=null){T(U),b()},get enabled(){return S()},set enabled(U){S(U),b()},get tooltip(){return O()},set tooltip(U=!1){O(U),b()}},N=Q(),B=z(N);return we(B,()=>r()??Re,()=>({props:P.props,wrapperProps:f(R)})),E(e,N),te(j)}re(ng,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function ig(e,t){ee(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);nn(()=>{n()?.()});var i={get content(){return r()},set content(o){r(o),b()},get onPlaced(){return n()},set onPlaced(o){n(o),b()}},s=Q(),a=z(s);return we(a,()=>r()??Re,()=>({props:{},wrapperProps:{}})),E(e,s),te(i)}re(ig,{content:{},onPlaced:{}},[],[],{mode:"open"});var QI=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function sg(e,t){ee(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=We(t,QI);var a={get content(){return r()},set content(u){r(u),b()},get isStatic(){return n()},set isStatic(u=!1){n(u),b()},get onPlaced(){return i()},set onPlaced(u){i(u),b()}},o=Q(),l=z(o),c=u=>{ig(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{ng(u,Tn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return le(l,u=>{n()?u(c):u(d,-1)}),E(e,o),te(a)}re(sg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var XI=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"]),eP=V("<!> <!>",1);function zc(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),d=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),v=_(t,"collisionPadding",7),y=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),x=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),S=_(t,"dir",7),O=_(t,"preventScroll",7),P=_(t,"wrapperId",7),R=_(t,"style",7),j=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),B=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),Y=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),X=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ue=_(t,"isStatic",7,!1),H=_(t,"enabled",7),ne=_(t,"ref",7),de=_(t,"tooltip",7,!1),F=_(t,"contentPointerEvents",7,"auto"),he=We(t,XI);const q=D(()=>O()??!0),ce=D(()=>T()??(f(q)?"fixed":"absolute"));var se={get popper(){return r()},set popper(w){r(w),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),b()},get id(){return a()},set id(w){a(w),b()},get onPointerDown(){return o()},set onPointerDown(w){o(w),b()},get onPointerUp(){return l()},set onPointerUp(w){l(w),b()},get side(){return c()},set side(w){c(w),b()},get sideOffset(){return d()},set sideOffset(w){d(w),b()},get align(){return u()},set align(w){u(w),b()},get alignOffset(){return p()},set alignOffset(w){p(w),b()},get arrowPadding(){return h()},set arrowPadding(w){h(w),b()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),b()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),b()},get collisionPadding(){return v()},set collisionPadding(w){v(w),b()},get sticky(){return y()},set sticky(w){y(w),b()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),b()},get updatePositionStrategy(){return x()},set updatePositionStrategy(w){x(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return S()},set dir(w){S(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return P()},set wrapperId(w){P(w),b()},get style(){return R()},set style(w){R(w),b()},get onPlaced(){return j()},set onPlaced(w){j(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return B()},set onCloseAutoFocus(w){B(w),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(w){U(w),b()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),b()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),b()},get loop(){return Y()},set loop(w){Y(w),b()},get trapFocus(){return ae()},set trapFocus(w=!0){ae(w),b()},get isValidEvent(){return X()},set isValidEvent(w=()=>!1){X(w),b()},get customAnchor(){return fe()},set customAnchor(w=null){fe(w),b()},get isStatic(){return ue()},set isStatic(w=!1){ue(w),b()},get enabled(){return H()},set enabled(w){H(w),b()},get ref(){return ne()},set ref(w){ne(w),b()},get tooltip(){return de()},set tooltip(w=!1){de(w),b()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),b()}};return sg(e,{get isStatic(){return ue()},get id(){return a()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return y()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return x()},get strategy(){return f(ce)},get dir(){return S()},get wrapperId(){return P()},get style(){return R()},get onPlaced(){return j()},get customAnchor(){return fe()},get enabled(){return H()},get tooltip(){return de()},content:(ke,Te)=>{let je=()=>Te?.().props,Qe=()=>Te?.().wrapperProps;var Ze=eP(),Mt=z(Ze),st=Ft=>{ac(Ft,{get preventScroll(){return f(q)}})},er=Ft=>{ac(Ft,{get preventScroll(){return f(q)}})};le(Mt,Ft=>{t.forceMount&&H()?Ft(st):t.forceMount||Ft(er,1)});var Tt=W(Mt,2);nv(Tt,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return B()},get loop(){return Y()},get enabled(){return H()},get trapFocus(){return ae()},get forceMount(){return t.forceMount},get ref(){return ne()},focusScope:(tr,Zt)=>{let mr=()=>Zt?.().props;rv(tr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return H()},get ref(){return ne()},children:(Ir,Pr)=>{tv(Ir,{get id(){return a()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return X()},get enabled(){return H()},get ref(){return ne()},children:($r,vr)=>{let Qr=()=>vr?.().props;av($r,{get id(){return a()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return H()},get ref(){return ne()},children:(Xr,kt)=>{var Un=Q(),as=z(Un);{let os=D(()=>({props:Ge(he,je(),Qr(),mr(),{style:{pointerEvents:F()}}),wrapperProps:Qe()}));we(as,()=>r()??Re,()=>f(os))}E(Xr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),E(ke,Ze)},$$slots:{content:!0}}),te(se)}re(zc,{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 tP=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 ag(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),l=_(t,"onPointerDown",7),c=_(t,"onPointerUp",7),d=_(t,"side",7),u=_(t,"sideOffset",7),p=_(t,"align",7),h=_(t,"alignOffset",7),g=_(t,"arrowPadding",7),m=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),y=_(t,"collisionPadding",7),k=_(t,"sticky",7),x=_(t,"hideWhenDetached",7),T=_(t,"updatePositionStrategy",7),S=_(t,"strategy",7),O=_(t,"dir",7),P=_(t,"preventScroll",7),R=_(t,"wrapperId",7),j=_(t,"style",7),N=_(t,"onPlaced",7),B=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),oe=_(t,"onOpenAutoFocus",7),pe=_(t,"onFocusOutside",7),Y=_(t,"interactOutsideBehavior",7,"close"),ae=_(t,"loop",7),X=_(t,"trapFocus",7,!0),fe=_(t,"isValidEvent",7,()=>!1),ue=_(t,"customAnchor",7,null),H=_(t,"isStatic",7,!1),ne=_(t,"ref",7),de=_(t,"shouldRender",7),F=We(t,tP);var he={get popper(){return r()},set popper(w){r(w),b()},get open(){return n()},set open(w){n(w),b()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),b()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return o()},set id(w){o(w),b()},get onPointerDown(){return l()},set onPointerDown(w){l(w),b()},get onPointerUp(){return c()},set onPointerUp(w){c(w),b()},get side(){return d()},set side(w){d(w),b()},get sideOffset(){return u()},set sideOffset(w){u(w),b()},get align(){return p()},set align(w){p(w),b()},get alignOffset(){return h()},set alignOffset(w){h(w),b()},get arrowPadding(){return g()},set arrowPadding(w){g(w),b()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),b()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),b()},get collisionPadding(){return y()},set collisionPadding(w){y(w),b()},get sticky(){return k()},set sticky(w){k(w),b()},get hideWhenDetached(){return x()},set hideWhenDetached(w){x(w),b()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),b()},get strategy(){return S()},set strategy(w){S(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return P()},set preventScroll(w){P(w),b()},get wrapperId(){return R()},set wrapperId(w){R(w),b()},get style(){return j()},set style(w){j(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return B()},set onInteractOutside(w){B(w),b()},get onCloseAutoFocus(){return U()},set onCloseAutoFocus(w){U(w),b()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),b()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),b()},get interactOutsideBehavior(){return Y()},set interactOutsideBehavior(w="close"){Y(w),b()},get loop(){return ae()},set loop(w){ae(w),b()},get trapFocus(){return X()},set trapFocus(w=!0){X(w),b()},get isValidEvent(){return fe()},set isValidEvent(w=()=>!1){fe(w),b()},get customAnchor(){return ue()},set customAnchor(w=null){ue(w),b()},get isStatic(){return H()},set isStatic(w=!1){H(w),b()},get ref(){return ne()},set ref(w){ne(w),b()},get shouldRender(){return de()},set shouldRender(w){de(w),b()}},q=Q(),ce=z(q),se=w=>{zc(w,Tn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return d()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return h()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return y()},get sticky(){return k()},get hideWhenDetached(){return x()},get updatePositionStrategy(){return T()},get strategy(){return S()},get dir(){return O()},get preventScroll(){return P()},get wrapperId(){return R()},get style(){return j()},get onPlaced(){return N()},get customAnchor(){return ue()},get isStatic(){return H()},get enabled(){return n()},get onInteractOutside(){return B()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return Y()},get loop(){return ae()},get trapFocus(){return X()},get isValidEvent(){return fe()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return ne()}},()=>F))};return le(ce,w=>{de()&&w(se)}),E(e,q),te(he)}re(ag,{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 rP=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 og(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),d=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),v=_(t,"collisionPadding",7),y=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),x=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),S=_(t,"dir",7),O=_(t,"preventScroll",7),P=_(t,"wrapperId",7),R=_(t,"style",7),j=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),B=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),Y=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),X=_(t,"isValidEvent",7,()=>!1),fe=_(t,"customAnchor",7,null),ue=_(t,"isStatic",7,!1),H=_(t,"enabled",7),ne=We(t,rP);var de={get popper(){return r()},set popper(F){r(F),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),b()},get id(){return a()},set id(F){a(F),b()},get onPointerDown(){return o()},set onPointerDown(F){o(F),b()},get onPointerUp(){return l()},set onPointerUp(F){l(F),b()},get side(){return c()},set side(F){c(F),b()},get sideOffset(){return d()},set sideOffset(F){d(F),b()},get align(){return u()},set align(F){u(F),b()},get alignOffset(){return p()},set alignOffset(F){p(F),b()},get arrowPadding(){return h()},set arrowPadding(F){h(F),b()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),b()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),b()},get collisionPadding(){return v()},set collisionPadding(F){v(F),b()},get sticky(){return y()},set sticky(F){y(F),b()},get hideWhenDetached(){return k()},set hideWhenDetached(F){k(F),b()},get updatePositionStrategy(){return x()},set updatePositionStrategy(F){x(F),b()},get strategy(){return T()},set strategy(F){T(F),b()},get dir(){return S()},set dir(F){S(F),b()},get preventScroll(){return O()},set preventScroll(F){O(F),b()},get wrapperId(){return P()},set wrapperId(F){P(F),b()},get style(){return R()},set style(F){R(F),b()},get onPlaced(){return j()},set onPlaced(F){j(F),b()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),b()},get onCloseAutoFocus(){return B()},set onCloseAutoFocus(F){B(F),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(F){U(F),b()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),b()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),b()},get loop(){return Y()},set loop(F){Y(F),b()},get trapFocus(){return ae()},set trapFocus(F=!0){ae(F),b()},get isValidEvent(){return X()},set isValidEvent(F=()=>!1){X(F),b()},get customAnchor(){return fe()},set customAnchor(F=null){fe(F),b()},get isStatic(){return ue()},set isStatic(F=!1){ue(F),b()},get enabled(){return H()},set enabled(F){H(F),b()}};return zc(e,Tn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return y()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return x()},get strategy(){return T()},get dir(){return S()},get preventScroll(){return O()},get wrapperId(){return P()},get style(){return R()},get onPlaced(){return j()},get customAnchor(){return fe()},get isStatic(){return ue()},get enabled(){return H()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return B()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return pe()},get loop(){return Y()},get trapFocus(){return ae()},get isValidEvent(){return X()},get onFocusOutside(){return oe()}},()=>ne,{forceMount:!0})),te(de)}re(og,{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 jo=bo({component:"date-field",parts:["input","label","segment"]}),Ji={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ra(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(Bt(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||bv(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}},qn=new $t("DateField.Root"),nP=class Oy{static create(t,r){return qn.set(new Oy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=ie();get segmentValues(){return f(this.#e)}set segmentValues(t){M(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return f(this.#t)}set readonlySegmentsSet(t){M(this.#t,t)}segmentStates=vv();#r=ie(null);#n=ie(null);#i=ie(null);get descriptionNode(){return f(this.#i)}set descriptionNode(t){M(this.#i,t,!0)}#s=ie(null);get validationNode(){return f(this.#s)}set validationNode(t){M(this.#s,t,!0)}states=vv();#o=ie(null);get dayPeriodNode(){return f(this.#o)}set dayPeriodNode(t){M(this.#o,t,!0)}rangeRoot=void 0;#a=ie("");get name(){return f(this.#a)}set name(t){M(this.#a,t,!0)}domContext=new Wi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(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=kv({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=cc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Do(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),ge(()=>{Le(()=>{this.initialSegments=cc(this.inferredGranularity)})}),nn(()=>{this.announcer=Do(this.domContext.getDocument())}),oi(()=>{r||BO(this.descriptionId,this.domContext.getDocument())}),ge(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ge(()=>{if(r)return;this.value.current&&VO({id:Le(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Le(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Le(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ge(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ge(()=>{this.value.current===void 0&&(this.segmentValues=cc(this.inferredGranularity))}),nt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){M(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:f(this.#r)}setLabelNode(t){M(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:f(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=Po.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=$o.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Bt(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&&ci(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&ci(i,t)?{reason:"max"}:!1});get validationStatus(){return f(this.#u)}set validationStatus(t){M(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return f(this.#c)}set isInvalid(t){M(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||qO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return f(this.#d)}set inferredGranularity(t){M(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return f(this.#h)}set dateRef(t){M(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 f(this.#p)}set allSegmentContent(t){M(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return f(this.#f)}set segmentContents(t){M(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 a=this.segmentValues;let o=a;const l=this.placeholder.current;if(zO(a)){const c=a[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&a.day!==null){const p=ra(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`)}o={...a,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const h=p.hour;u==="AM"?h>=12&&(a.hour=`${h-12}`):u==="PM"&&h<12&&(a.hour=`${h+12}`)}o={...a,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&a.dayPeriod!==null){const p=this.formatter.dayPeriod(Bt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(a.dayPeriod=p)}o={...a,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,o={...a,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,o={...a,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,o={...a,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,o={...a,[t]:u}}else{const u=d(c);o={...a,[t]:u}}}else if(Mo(t)){const c=a[t],d=r,u=d(c);if(t==="month"&&u!==null&&a.day!==null){this.states.month.updating=u;const p=ra(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`),o={...a,[t]:u}}else if(t==="year"){const p=d(c);this.states.year.updating=p,o={...a,[t]:p}}else if(t==="day"){const p=d(c);this.states.day.updating=p,o={...a,[t]:p}}else o={...a,[t]:u}}this.segmentValues=o,LO(o,f(this.#r))?this.setValue(RO({segmentObj:o,fieldNode:f(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=o)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Xu(this.isInvalid),"aria-disabled":xr(this.disabled.current),"aria-readonly":xr(this.readonly.current||n),"data-invalid":Ue(this.isInvalid),"data-disabled":Ue(this.disabled.current),"data-readonly":Ue(this.readonly.current||n),"data-segment":`${t}`,[jo.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,a=UO(r,f(this.#r))&&s,o=this.errorMessageId?.current,l=a?`${s} ${this.isInvalid&&o?o:""}`: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}}},iP=class Dy{static create(t){return new Dy(t,qn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Wi(t.ref),this.root.domContext=this.domContext,this.attachment=et(t.ref,n=>this.root.setFieldNode(n)),nt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(un&&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":f(this.#e),"aria-disabled":xr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Ue(this.root.disabled.current),[jo.input]:"",...this.attachment}));get props(){return f(this.#t)}set props(t){M(this.#t,t)}},sP=class Iy{static create(){return new Iy(qn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return f(this.#e)}set shouldRender(t){M(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return f(this.#t)}set isoValue(t){M(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 f(this.#r)}set props(t){M(this.#r,t)}},aP=class Py{static create(t){return new Py(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=WO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Ue(this.root.isInvalid),"data-disabled":Ue(this.root.disabled.current),[jo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},Qi=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=et(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(),!!dc(e.key))){if(qc(e.key)){this.#i(t);return}if(Uc(e.key)){this.#s(t);return}if(_o(e.key)){this.#o(e);return}if(Vc(e.key)){this.#a(e);return}sa(e.key)&&ia(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)})}#o(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,a=this.part;this.root.updateSegment(this.part,o=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(o=null,this.root.states[a].hasLeftFocus=!1),o===null)return s?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||t>i)&&(r=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return t!==0?(r=!0,this.root.states[a].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&_v(e,this.root.getFieldNode())}#a(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&&wv(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(),a=this.#e();let o=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(o=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o}}#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 f(this.#l)}set props(e){M(this.#l,e)}},oP=class extends Qi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Ji.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!dc(e.key))){if(qc(e.key)){this.#r(),super.onkeydown(e);return}if(Uc(e.key)){this.#r(),super.onkeydown(e);return}if(_o(e.key)){this.#i(e);return}if(Vc(e.key)){this.#s(e);return}sa(e.key)&&ia(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),lg(s));this.announcer.announce(s),t=!0;const a=`${s}`;return a.length>4?a.slice(0,4):a}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&_v(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&&wv(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?lg(Number.parseInt(t)):t)}},lP=class extends Qi{constructor(e,t){super(e,t,"day",Ji.day)}},uP=class extends Qi{constructor(e,t){super(e,t,"month",Ji.month)}},cP=class extends Qi{constructor(e,t){super(e,t,"hour",Ji.hour)}onkeydown(e){if(_o(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)}},dP=class extends Qi{constructor(e,t){super(e,t,"minute",Ji.minute)}},fP=class extends Qi{constructor(e,t){super(e,t,"second",Ji.second)}},hP=class $y{static create(t){return new $y(t,qn.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=et(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!gP(t.key))){if(qc(t.key)||Uc(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}Vc(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}),sa(t.key)&&ia(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 f(this.#t)}set props(t){M(this.#t,t)}},pP=class My{static create(t){return new My(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},mP=class Fy{static create(t){return new Fy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&sa(t.key)&&ia(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":Ue(!0),...this.attachment}));get props(){return f(this.#e)}set props(t){M(this.#e,t)}},vP=class{static create(e,t){const r=qn.get();switch(e){case"day":return new lP(t,r);case"month":return new uP(t,r);case"year":return new oP(t,r);case"hour":return new cP(t,r);case"minute":return new dP(t,r);case"second":return new fP(t,r);case"dayPeriod":return new hP(t,r);case"literal":return new pP(t,r);case"timeZoneName":return new mP(t,r)}}};function gP(e){return dc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function qc(e){return e===tc}function Uc(e){return e===ec}function Vc(e){return e===xC}function lg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function ug(e,t){ee(t,!1);const r=sP.create();Ql();var n=Q(),i=z(n),s=a=>{Iv(a,Tn(()=>r.props))};le(i,a=>{r.shouldRender&&a(s)}),E(e,n),te()}re(ug,{},[],[],{mode:"open"});var yP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),bP=V("<div><!></div>"),_P=V("<!> <!>",1);function cg(e,t){const r=mt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),a=_(t,"children",7),o=_(t,"child",7),l=We(t,yP);const c=iP.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),d=D(()=>Ge(l,c.props));var u={get id(){return n()},set id(v=Ie(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get name(){return s()},set name(v=""){s(v),b()},get children(){return a()},set children(v){a(v),b()},get child(){return o()},set child(v){o(v),b()}},p=_P(),h=z(p),g=v=>{var y=Q(),k=z(y);we(k,o,()=>({props:f(d),segments:c.root.segmentContents})),E(v,y)},m=v=>{var y=bP();ze(y,()=>({...f(d)}));var k=$(y);we(k,()=>a()??Re,()=>({segments:c.root.segmentContents})),I(y),E(v,y)};return le(h,v=>{o()?v(g):v(m,-1)}),ug(W(h,2),{}),E(e,p),te(u)}re(cg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var wP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),kP=V("<div><!></div>");function dg(e,t){const r=mt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=We(t,wP);const l=aP.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>Ge(o,l.props));var d={get id(){return n()},set id(m=Ie(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return a()},set child(m){a(m),b()}},u=Q(),p=z(u),h=m=>{var v=Q(),y=z(v);we(y,a,()=>({props:f(c)})),E(m,v)},g=m=>{var v=kP();ze(v,()=>({...f(c)}));var y=$(v);we(y,()=>s()??Re),I(v),E(m,v)};return le(p,m=>{a()?m(h):m(g,-1)}),E(e,u),te(d)}re(dg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var SP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),EP=V("<span><!></span>");function fg(e,t){const r=mt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=_(t,"part",7),l=We(t,SP);const c=vP.create(o(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),d=D(()=>Ge(l,c.props));var u={get id(){return n()},set id(v=Ie(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return s()},set children(v){s(v),b()},get child(){return a()},set child(v){a(v),b()},get part(){return o()},set part(v){o(v),b()}},p=Q(),h=z(p),g=v=>{var y=Q(),k=z(y);we(k,a,()=>({props:f(d)})),E(v,y)},m=v=>{var y=EP();ze(y,()=>({...f(d)}));var k=$(y);we(k,()=>s()??Re),I(y),E(v,y)};return le(h,v=>{a()?v(g):v(m,-1)}),E(e,p),te(u)}re(fg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var hg=new $t("DatePicker.Root"),xP=class Ny{static create(t){return hg.set(new Ny(t))}opts;constructor(t){this.opts=t}};function Bc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let a=0,o=s-1;a<s;o=a++){const[l,c]=t[a]??[0,0],[d,u]=t[o]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function jc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function pg(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,a=i-r,o=s-n;return Math.abs(a)>Math.abs(o)?a>0?"right":"left":o>0?"bottom":"top"}var TP=class{#e;#t;#r;#n=null;#i=null;#s=[];#o=null;#a=null;#l=null;#u(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#c(){this.#u(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),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,nt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#o=null,this.#f();return}this.#o&&this.#o!==r&&this.#f(),this.#o=r;const s=yo(r),a=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(li(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];li(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=li(p)&&h.length>0?h.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const p=u.relatedTarget;li(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",a),gt(r,"pointerleave",o),gt(r,"pointerenter",l),gt(n,"pointerenter",c),gt(n,"pointerleave",d)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#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"&&jc(e,i)){this.#f();return}if(this.#i==="trigger"&&jc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(jc(e,c))return;const d=pg(n,c),u=this.#m(n,c,d);if(u&&Bc(e,u))return}const s=pg(n,i),a=this.#m(n,i,s);if(a&&Bc(e,a))return;const o=this.#i==="content"?i:n;Bc(e,this.#v(this.#n,o,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#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,a]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,a+i],[s+i,a+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,a-i],[s+i,a-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,a-i],[s+i,a+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,a-i],[s-i,a+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"}}},Zc=bo({component:"popover",parts:["root","trigger","content","close","overlay"]}),Wc=new $t("Popover.Root"),AP=class Ry{static create(t){return Wc.set(new Ry(t))}opts;#e=ie(null);get contentNode(){return f(this.#e)}set contentNode(t){M(this.#e,t,!0)}contentPresence;#t=ie(null);get triggerNode(){return f(this.#t)}set triggerNode(t){M(this.#t,t,!0)}#r=ie(null);get overlayNode(){return f(this.#r)}set overlayNode(t){M(this.#r,t,!0)}overlayPresence;#n=ie(!1);get openedViaHover(){return f(this.#n)}set openedViaHover(t){M(this.#n,t,!0)}#i=ie(!1);get hasInteractedWithContent(){return f(this.#i)}set hasInteractedWithContent(t){M(this.#i,t,!0)}#s=ie(!1);get hoverCooldown(){return f(this.#s)}set hoverCooldown(t){M(this.#s,t,!0)}#o=ie(0);get closeDelay(){return f(this.#o)}set closeDelay(t){M(this.#o,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new qm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new qm({ref:L(()=>this.overlayNode),open:this.opts.open}),nt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=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.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},CP=class Ly{static create(t){return new Ly(t,Wc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=ie(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Wi(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),nt(()=>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||wo(t)||(M(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&&(wo(t)||(M(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),f(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}f(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())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":Nm(this.root.opts.open.current),"aria-controls":this.#o(),[Zc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return f(this.#a)}set props(t){M(this.#a,t)}},OP=class zy{static create(t){return new zy(t,Wc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(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 TP({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;li(r)&&QC(r)&&this.root.markInteraction()}onpointerenter(t){wo(t)||this.root.cancelDelayedClose()}onpointerleave(t){wo(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!li(t.target))return;const r=t.target.closest(Zc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(li(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 f(this.#e)}set snippetProps(t){M(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Nm(this.root.opts.open.current),...SC(this.root.contentPresence.transitionStatus),[Zc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return f(this.#t)}set props(t){M(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function mg(e,t){ee(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,Ee),i=_(t,"onOpenChangeComplete",7,Ee),s=_(t,"value",15),a=_(t,"onValueChange",7,Ee),o=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,Ee),c=_(t,"isDateUnavailable",7,()=>!1),d=_(t,"validate",7,Ee),u=_(t,"onInvalid",7,Ee),p=_(t,"minValue",7),h=_(t,"maxValue",7),g=_(t,"disabled",7,!1),m=_(t,"readonly",7,!1),v=_(t,"granularity",7),y=_(t,"readonlySegments",23,()=>[]),k=_(t,"hourCycle",7),x=_(t,"locale",7),T=_(t,"hideTimeZone",7,!1),S=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),P=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"preventDeselect",7,!1),j=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),B=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),oe=_(t,"fixedWeeks",7,!1),pe=_(t,"numberOfMonths",7,1),Y=_(t,"closeOnDateSelect",7,!0),ae=_(t,"initialFocus",7,!1),X=_(t,"errorMessageId",7),fe=_(t,"children",7),ue=_(t,"monthFormat",7,"long"),H=_(t,"yearFormat",7,"numeric");const ne=uv({granularity:v(),defaultValue:s(),minValue:p(),maxValue:h()});function de(){o()===void 0&&o(ne)}de(),nt.pre(()=>o(),()=>{de()});function F(){Y()&&r(!1)}const he=xP.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),a()(w)}),placeholder:L(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:L(()=>c()),minValue:L(()=>p()),maxValue:L(()=>h()),disabled:L(()=>g()),readonly:L(()=>m()),granularity:L(()=>v()),readonlySegments:L(()=>y()),hourCycle:L(()=>k()),locale:Vm(()=>x()),hideTimeZone:L(()=>T()),required:L(()=>S()),calendarLabel:L(()=>O()),disableDaysOutsideMonth:L(()=>P()),preventDeselect:L(()=>R()),pagedNavigation:L(()=>j()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>B()),isDateDisabled:L(()=>U()),fixedWeeks:L(()=>oe()),numberOfMonths:L(()=>pe()),initialFocus:L(()=>ae()),onDateSelect:L(()=>F),defaultPlaceholder:ne,monthFormat:L(()=>ue()),yearFormat:L(()=>H())});AP.create({open:he.opts.open,onOpenChangeComplete:L(()=>i())}),nP.create({value:he.opts.value,disabled:he.opts.disabled,readonly:he.opts.readonly,readonlySegments:he.opts.readonlySegments,validate:L(()=>d()),onInvalid:L(()=>u()),minValue:he.opts.minValue,maxValue:he.opts.maxValue,granularity:he.opts.granularity,hideTimeZone:he.opts.hideTimeZone,hourCycle:he.opts.hourCycle,locale:he.opts.locale,required:he.opts.required,placeholder:he.opts.placeholder,errorMessageId:L(()=>X()),isInvalidProp:L(()=>{})});var q={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=Ee){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Ee){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return a()},set onValueChange(w=Ee){a(w),b()},get placeholder(){return o()},set placeholder(w){o(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Ee){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return d()},set validate(w=Ee){d(w),b()},get onInvalid(){return u()},set onInvalid(w=Ee){u(w),b()},get minValue(){return p()},set minValue(w){p(w),b()},get maxValue(){return h()},set maxValue(w){h(w),b()},get disabled(){return g()},set disabled(w=!1){g(w),b()},get readonly(){return m()},set readonly(w=!1){m(w),b()},get granularity(){return v()},set granularity(w){v(w),b()},get readonlySegments(){return y()},set readonlySegments(w=[]){y(w),b()},get hourCycle(){return k()},set hourCycle(w){k(w),b()},get locale(){return x()},set locale(w){x(w),b()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),b()},get required(){return S()},set required(w=!1){S(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return P()},set disableDaysOutsideMonth(w=!0){P(w),b()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),b()},get pagedNavigation(){return j()},set pagedNavigation(w=!1){j(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return B()},set weekdayFormat(w="narrow"){B(w),b()},get isDateDisabled(){return U()},set isDateDisabled(w=()=>!1){U(w),b()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),b()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),b()},get closeOnDateSelect(){return Y()},set closeOnDateSelect(w=!0){Y(w),b()},get initialFocus(){return ae()},set initialFocus(w=!1){ae(w),b()},get errorMessageId(){return X()},set errorMessageId(w){X(w),b()},get children(){return fe()},set children(w){fe(w),b()},get monthFormat(){return ue()},set monthFormat(w="long"){ue(w),b()},get yearFormat(){return H()},set yearFormat(w="numeric"){H(w),b()}},ce=Q(),se=z(ce);return Pe(se,()=>tg,(w,ke)=>{ke(w,{children:(Te,je)=>{var Qe=Q(),Ze=z(Qe);we(Ze,()=>fe()??Re),E(Te,Qe)},$$slots:{default:!0}})}),E(e,ce),te(q)}re(mg,{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 DP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),IP=V("<div><!></div>");function vg(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=We(t,DP);const l=hg.get(),c=Av.create({id:L(()=>s()),ref:L(()=>a(),v=>a(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:L(()=>"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:L(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>Ge(o,c.props));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()}},p=Q(),h=z(p),g=v=>{var y=Q(),k=z(y);{let x=D(()=>({props:f(d),...c.snippetProps}));we(k,i,()=>f(x))}E(v,y)},m=v=>{var y=IP();ze(y,()=>({...f(d)}));var k=$(y);we(k,()=>n()??Re,()=>c.snippetProps),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),te(u)}re(vg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var PP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),gg=V("<div><div><!></div></div>");function yg(e,t){const r=mt();ee(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,Ee),c=_(t,"onCloseAutoFocus",7,Ee),d=_(t,"onEscapeKeydown",7,Ee),u=_(t,"onInteractOutside",7,Ee),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),m=_(t,"style",7),v=We(t,PP);const y=OP.create({id:L(()=>a()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>d()),customAnchor:L(()=>g())}),k=D(()=>Ge(v,y.props)),x=D(()=>p()&&y.shouldTrapFocus);function T(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var S={get child(){return n()},set child(N){n(N),b()},get children(){return i()},set children(N){i(N),b()},get ref(){return s()},set ref(N=null){s(N),b()},get id(){return a()},set id(N=Ie(r)){a(N),b()},get forceMount(){return o()},set forceMount(N=!1){o(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Ee){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Ee){c(N),b()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Ee){d(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=Ee){u(N),b()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),b()},get preventScroll(){return h()},set preventScroll(N=!1){h(N),b()},get customAnchor(){return g()},set customAnchor(N=null){g(N),b()},get style(){return m()},set style(N){m(N),b()}},O=Q(),P=z(O),R=N=>{og(N,Tn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return f(x)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let pe=()=>oe?.().props,Y=()=>oe?.().wrapperProps;const ae=D(()=>Ge(pe(),{style:Xv("popover")},{style:m()}));var X=Q(),fe=z(X),ue=ne=>{var de=Q(),F=z(de);{let he=D(()=>({props:f(ae),wrapperProps:Y(),...y.snippetProps}));we(F,n,()=>f(he))}E(ne,de)},H=ne=>{var de=gg();ze(de,()=>({...Y()}));var F=$(de);ze(F,()=>({...f(ae)}));var he=$(F);we(he,()=>i()??Re),I(F),I(de),E(ne,de)};le(fe,ne=>{n()?ne(ue):ne(H,-1)}),E(U,X)},$$slots:{popper:!0}}))},j=N=>{ag(N,Tn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return f(x)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let pe=()=>oe?.().props,Y=()=>oe?.().wrapperProps;const ae=D(()=>Ge(pe(),{style:Xv("popover")},{style:m()}));var X=Q(),fe=z(X),ue=ne=>{var de=Q(),F=z(de);{let he=D(()=>({props:f(ae),wrapperProps:Y(),...y.snippetProps}));we(F,n,()=>f(he))}E(ne,de)},H=ne=>{var de=gg();ze(de,()=>({...Y()}));var F=$(de);ze(F,()=>({...f(ae)}));var he=$(F);we(he,()=>i()??Re),I(F),I(de),E(ne,de)};le(fe,ne=>{n()?ne(ue):ne(H,-1)}),E(U,X)},$$slots:{popper:!0}}))};return le(P,N=>{o()?N(R):o()||N(j,1)}),E(e,O),te(S)}re(yg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var $P=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function bg(e,t){ee(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=We(t,$P);const s=D(()=>Ge({onOpenAutoFocus:n()},{onOpenAutoFocus:oD}));var a={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return yg(e,Tn(()=>f(s),()=>i,{get ref(){return r()},set ref(o){r(o)}})),te(a)}re(bg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var MP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),FP=V("<button><!></button>");function _g(e,t){const r=mt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"type",7,"button"),l=_(t,"disabled",7,!1),c=_(t,"openOnHover",7,!1),d=_(t,"openDelay",7,700),u=_(t,"closeDelay",7,300),p=We(t,MP);const h=CP.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>d()),closeDelay:L(()=>u())}),g=D(()=>Ge(p,h.props,{type:o()}));var m={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get type(){return o()},set type(v="button"){o(v),b()},get disabled(){return l()},set disabled(v=!1){l(v),b()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),b()},get openDelay(){return d()},set openDelay(v=700){d(v),b()},get closeDelay(){return u()},set closeDelay(v=300){u(v),b()}};return rg(e,{get id(){return s()},get ref(){return h.opts.ref},children:(v,y)=>{var k=Q(),x=z(k),T=O=>{var P=Q(),R=z(P);we(R,i,()=>({props:f(g)})),E(O,P)},S=O=>{var P=FP();ze(P,()=>({...f(g)}));var R=$(P);we(R,()=>n()??Re),I(P),E(O,P)};le(x,O=>{i()?O(T):O(S,-1)}),E(v,k)},$$slots:{default:!0}}),te(m)}re(_g,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var NP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function wg(e,t){ee(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=We(t,NP);function s(l){if(sa(l.key)){const c=l.currentTarget.closest(jo.selector("input"));if(!c)return;ia(l,c)}}const a=D(()=>Ge({onkeydown:n()},{onkeydown:s}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return _g(e,Tn(()=>i,{"data-segment":"trigger"},()=>f(a),{get ref(){return r()},set ref(l){r(l)}})),te(o)}re(wg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Hc=V("<!> <!>",1),kg=V("<!> <!> <!>",1);function Sg(e,t){ee(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),a=ie(Me(ei(Vt())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(f(a).toString())});var l={get dateString(){return r()},set dateString(u){r(u),b()},get labelClass(){return n()},set labelClass(u){n(u),b()},get inputClass(){return i()},set inputClass(u){i(u),b()},get labelText(){return s()},set labelText(u){s(u),b()}},c=Q(),d=z(c);{let u=D(()=>C.locale||"de");Pe(d,()=>mg,(p,h)=>{h(p,{get locale(){return f(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(ei(Vt()))<0,get value(){return f(a)},set value(g){M(a,g,!0)},children:(g,m)=>{var v=kg(),y=z(v);Pe(y,()=>dg,(T,S)=>{S(T,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(O,P)=>{var R=Q(),j=z(R),N=B=>{var U=Q(),oe=z(U);we(oe,s),E(B,U)};le(j,B=>{s()&&B(N)}),E(O,R)},$$slots:{default:!0}})});var k=W(y,2);{const T=(S,O)=>{let P=()=>O?.().segments;var R=Hc(),j=z(R);Fe(j,17,P,sn,(B,U)=>{let oe=()=>f(U).part,pe=()=>f(U).value;var Y=Q(),ae=z(Y);Pe(ae,()=>fg,(X,fe)=>{fe(X,{get part(){return oe()},children:(ue,H)=>{At();var ne=qt();J(()=>K(ne,pe())),E(ue,ne)},$$slots:{default:!0}})}),E(B,Y)});var N=W(j,2);Pe(N,()=>wg,(B,U)=>{U(B,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),E(S,R)};Pe(k,()=>cg,(S,O)=>{O(S,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var x=W(k,2);Pe(x,()=>bg,(T,S)=>{S(T,{children:(O,P)=>{var R=Q(),j=z(R);{const N=(B,U)=>{let oe=()=>U?.().months,pe=()=>U?.().weekdays;var Y=Hc(),ae=z(Y);Pe(ae,()=>wc,(fe,ue)=>{ue(fe,{children:(H,ne)=>{var de=kg(),F=z(de);Pe(F,()=>Ec,(ce,se)=>{se(ce,{class:"go-datepicker-previous"})});var he=W(F,2);Pe(he,()=>kc,(ce,se)=>{se(ce,{class:"go-datepicker-selected-month"})});var q=W(he,2);Pe(q,()=>Sc,(ce,se)=>{se(ce,{class:"go-datepicker-next"})}),E(H,de)},$$slots:{default:!0}})});var X=W(ae,2);Fe(X,16,oe,fe=>fe,(fe,ue)=>{var H=Q(),ne=z(H);Pe(ne,()=>vc,(de,F)=>{F(de,{children:(he,q)=>{var ce=Hc(),se=z(ce);Pe(se,()=>bc,(ke,Te)=>{Te(ke,{children:(je,Qe)=>{var Ze=Q(),Mt=z(Ze);Pe(Mt,()=>oa,(st,er)=>{er(st,{children:(Tt,Ft)=>{var tr=Q(),Zt=z(tr);Fe(Zt,17,pe,sn,(mr,Ir)=>{var Pr=Q(),bn=z(Pr);Pe(bn,()=>_c,($r,vr)=>{vr($r,{children:(Qr,Xr)=>{At();var kt=qt();J(()=>K(kt,f(Ir))),E(Qr,kt)},$$slots:{default:!0}})}),E(mr,Pr)}),E(Tt,tr)},$$slots:{default:!0}})}),E(je,Ze)},$$slots:{default:!0}})});var w=W(se,2);Pe(w,()=>gc,(ke,Te)=>{Te(ke,{children:(je,Qe)=>{var Ze=Q(),Mt=z(Ze);Fe(Mt,16,()=>ue.weeks,st=>st,(st,er)=>{var Tt=Q(),Ft=z(Tt);Pe(Ft,()=>oa,(tr,Zt)=>{Zt(tr,{children:(mr,Ir)=>{var Pr=Q(),bn=z(Pr);Fe(bn,16,()=>er,$r=>$r,($r,vr,Qr,Xr)=>{var kt=Q(),Un=z(kt);Pe(Un,()=>yc,(as,os)=>{os(as,{get date(){return vr},get month(){return ue.value},children:(fa,id)=>{var bi=Q(),ls=z(bi);Pe(ls,()=>mc,(gr,Vn)=>{Vn(gr,{})}),E(fa,bi)},$$slots:{default:!0}})}),E($r,kt)}),E(mr,Pr)},$$slots:{default:!0}})}),E(st,Tt)}),E(je,Ze)},$$slots:{default:!0}})}),E(he,ce)},$$slots:{default:!0}})}),E(fe,H)}),E(B,Y)};Pe(j,()=>vg,(B,U)=>{U(B,{children:N,$$slots:{default:!0}})})}E(O,R)},$$slots:{default:!0}})}),E(g,v)},$$slots:{default:!0}})})}return E(e,c),te(l)}re(Sg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var RP=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),LP=V('<span class="go-field-star" aria-hidden="true">*</span>'),zP=V(" <!>",1),qP=V("<label><!></label> <input/>",1),UP=V("<label><!></label> <textarea></textarea>",1),VP=V('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),BP=V("<label><!></label> <input/> <!>",1),jP=V('<label><input/> <span class="go-checkbox-label"><!></span></label>'),ZP=V('<img src="" alt=""/> <option> </option>',1),WP=V('<option disabled="" hidden="" selected=""> </option> <!>',1),HP=V("<!>",1),GP=V("<label><!></label> <select><!></select>",1),KP=V('<img style="width: 60px" aria-hidden="true"/>'),YP=V('<span class="go-payment-mode-icons"></span>'),JP=V('<span class="go-payment-mode-name"> </span>'),QP=V('<label><input type="radio"/> <!></label>'),XP=V('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),e$=V("<label> <input/></label>"),t$=V("<fieldset><legend><!></legend> <!></fieldset>");function Eg(e,t){ee(t,!0);const r=Y=>{At();var ae=zP(),X=z(ae),fe=W(X),ue=H=>{var ne=LP();E(H,ne)};le(fe,H=>{u().required&&H(ue)}),J(()=>K(X,`${f(R)??""} `)),E(Y,ae)},n=Y=>{var ae=qP(),X=z(ae);r($(X)),I(X);var fe=W(X,2);ze(fe,()=>({...f(P),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),J(()=>{St(X,1,ur(h())),ve(X,"for",f(S))}),Ua(fe,()=>u().value,ue=>u(u().value=ue,!0)),E(Y,ae)},i=Y=>{var ae=UP(),X=z(ae);r($(X)),I(X);var fe=W(X,2);Kb(fe),ze(fe,()=>({...f(P),...v,class:g(),placeholder:u().placeholder,name:u().key})),J(()=>{St(X,1,ur(h())),ve(X,"for",f(S))}),Ua(fe,()=>u().value,ue=>u(u().value=ue,!0)),E(Y,ae)},s=Y=>{var ae=BP(),X=z(ae);r($(X)),I(X);var fe=W(X,2),ue=de=>{const F=de.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),f(k)?f(k).validateField(u()):u().validate()};ze(fe,()=>({...f(P),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:ue}),void 0,void 0,void 0,void 0,!0);var H=W(fe,2),ne=de=>{var F=VP(),he=$(F),q=W(he,2),ce=$(q,!0);I(q),I(F),J(se=>{ve(F,"data-field-preview",u().key),ve(he,"src",f(N)),ve(he,"alt",se),K(ce,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),E(de,F)};le(H,de=>{f(N)&&u().value instanceof File&&de(ne)}),J(()=>{St(X,1,ur(h())),ve(X,"for",f(S))}),E(Y,ae)},a=Y=>{var ae=jP(),X=$(ae);ze(X,()=>({...f(P),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var fe=W(X,2);r($(fe)),I(fe),I(ae),J(()=>{St(ae,1,ur(h())),ve(ae,"for",f(S))}),U_(X,()=>u().value===!0,ue=>{u(u().value=ue,!0)}),E(Y,ae)},o=Y=>{var ae=GP(),X=z(ae);r($(X)),I(X);var fe=W(X,2);ze(fe,()=>({...f(P),...v,name:u().key,class:g()})),z_(fe,()=>{var ue=$(fe),H=HP(),ne=z(H),de=F=>{var he=WP(),q=z(he),ce=$(q,!0);I(q),q.value=q.__value="";var se=W(q,2);Fe(se,17,()=>u().options(),w=>w.value,(w,ke)=>{var Te=ZP(),je=W(z(Te),2),Qe=$(je,!0);I(je);var Ze={};J(()=>{K(Qe,f(ke).label),Ze!==(Ze=f(ke).value)&&(je.value=(je.__value=f(ke).value)??"")}),E(w,Te)}),J(w=>K(ce,w),[()=>C.t("common.choose")]),E(F,he)};le(ne,F=>{u().options&&F(de)}),E(ue,H)}),J(()=>{St(X,1,ur(h())),ve(X,"for",f(S))}),D_(fe,()=>u().value,ue=>u(u().value=ue,!0)),E(Y,ae)},l=Y=>{Sg(Y,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(ae){u(u().value=ae,!0)}})},c=Y=>{const ae=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var X=XP(),fe=$(X);r($(fe)),I(fe);var ue=W(fe,2);Fe(ue,17,()=>f(ae),H=>H.id,(H,ne)=>{var de=QP(),F=$(de);Ms(F);var he=W(F,2),q=se=>{var w=YP();Fe(w,20,()=>f(ne).icons,ke=>ke,(ke,Te)=>{const je=D(()=>j+Te+".svg");var Qe=KP();J(()=>{St(Qe,1,ur(Te)),ve(Qe,"src",f(je)),ve(Qe,"alt",Te+" icon")}),E(ke,Qe)}),I(w),E(se,w)},ce=se=>{var w=JP(),ke=$(w,!0);I(w),J(()=>K(ke,f(ne).name)),E(se,w)};le(he,se=>{f(ne).icons.length>0?se(q):se(ce,-1)}),I(de),J((se,w,ke)=>{ve(F,"name",u().key),Vl(F,se),F_(F,w),ve(F,"hidden",f(ae).length===1),ve(F,"aria-label",ke)},[()=>String(f(ne).id),()=>u().value===String(f(ne).id),()=>C.t(`cart.paymentMode.ariaLabel.${f(ne).name.toLowerCase()}`)]),pt("change",F,()=>{u(u().value=String(f(ne).id),!0)}),E(H,de)}),I(X),J(()=>{ve(X,"aria-required",u().required),ve(X,"aria-invalid",u().errors.length>0)}),E(Y,X)},d=Y=>{var ae=t$(),X=$(ae);r($(X)),I(X);var fe=W(X,2),ue=H=>{var ne=Q(),de=z(ne);Fe(de,17,()=>u().options(),F=>F.value,(F,he)=>{var q=e$(),ce=$(q),se=W(ce);ze(se,()=>({...f(P),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(q),J(()=>{St(q,1,ur(h())),ve(q,"for",f(S)+f(he).value),K(ce,`${f(he).label??""} `)}),Ua(se,()=>u().value,w=>u(u().value=w,!0)),E(F,q)}),E(H,ne)};le(fe,H=>{u().options&&H(ue)}),I(ae),E(Y,ae)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),m=_(t,"host",7),v=We(t,RP);const y=qi(m()),k=D(()=>y.value),x={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:a,select:o,radio:d,date:l,file:s,textarea:i,paymentMode:c},T=D(()=>x[u().type]);let S=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(f(k)?f(k).validateField(u()):u().validate())}const P=D(()=>({id:f(S),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>C.t(u().label)||u().label);const j="https://cdn.shop.platform.gomus.de/";ge(()=>{if(u().type!=="paymentMode")return;const Y=C.payment_modes?Object.values(C.payment_modes):[];Y.length===1&&u().value===""&&u(u().value=String(Y[0].id),!0)});let N=ie(null);ge(()=>{const Y=u().value;if(Y instanceof File&&Y.type.startsWith("image/")){const ae=URL.createObjectURL(Y);return M(N,ae,!0),()=>{URL.revokeObjectURL(ae),M(N,null)}}M(N,null)});var B={get field(){return u()},set field(Y){u(Y),b()},get describedByIds(){return p()},set describedByIds(Y){p(Y),b()},get labelClass(){return h()},set labelClass(Y){h(Y),b()},get inputClass(){return g()},set inputClass(Y){g(Y),b()},get host(){return m()},set host(Y){m(Y),b()}},U=Q(),oe=z(U),pe=Y=>{var ae=Q(),X=z(ae);we(X,()=>f(T)),E(Y,ae)};return le(oe,Y=>{f(T)&&Y(pe)}),E(e,U),te(B)}lr(["change"]),re(Eg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var r$=V("<span> </span>"),n$=V("<li> </li>"),i$=V('<ul class="go-field-errors"></ul>'),s$=V("<!> <!> <!>",1);function a$(e,t){ee(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),a=ie(Me(Jt.createField(r(),n())));const o=qi(t.$$host),l=D(()=>o.value),c=()=>f(a);let d=D(()=>f(a)?[...f(a).errors,...f(a).apiErrors].map(P=>C.t(P)):[]),u=D(()=>f(a)?.description),p=D(()=>f(d).length>0),h=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[f(u)&&f(h),f(p)&&f(g)].filter(Boolean).join(" ")||void 0);ge(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",f(d).length>0)}),t.$$host.dataset.testid=r(),ge(()=>{f(a)&&(f(a).mounted=!0,f(a).value,Le(()=>{f(a)?.errors.length&&f(l).validateField(f(a))}))});var v={getField:c,get key(){return r()},set key(P){r(P),b()},get required(){return n()},set required(P=!1){n(P),b()},get labelClass(){return i()},set labelClass(P){i(P),b()},get inputClass(){return s()},set inputClass(P){s(P),b()}},y=s$(),k=z(y);Eg(k,{get describedByIds(){return f(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return f(a)},set field(P){M(a,P,!0)}});var x=W(k,2),T=P=>{var R=r$(),j=$(R,!0);I(R),J(()=>{ve(R,"id",f(h)),K(j,f(a).description)}),E(P,R)};le(x,P=>{f(u)&&P(T)});var S=W(x,2),O=P=>{var R=i$();Fe(R,21,()=>f(d),sn,(j,N)=>{var B=n$(),U=$(B,!0);I(B),J(()=>K(U,f(N))),E(j,B)}),I(R),J(()=>ve(R,"id",f(g))),E(P,R)};return le(S,P=>{f(p)&&P(O)}),E(e,y),te(v)}customElements.define("go-field",re(a$,{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 o$=V("<go-field></go-field>",2);function l$(e,t){ee(t,!0);let r=qi(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?Jt.getFormFields(f(n)?.formId):[]);var s=Q(),a=z(s);Fe(a,17,()=>f(i),o=>o.key,(o,l)=>{var c=o$();J(()=>Yn(c,"key",f(l).key)),J(()=>Yn(c,"required",f(l).required)),E(o,c)}),E(e,s),te()}customElements.define("go-all-fields",re(l$,{},[],[]));var u$=V('<p aria-hidden="true"> </p>'),c$=V("<li> </li>"),d$=V('<ul class="go-error-feedback-api-errors"></ul>'),f$=V('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function h$(e,t){ee(t,!0);const r=qi(t.$$host),n=D(()=>r.value);ge(()=>{f(n)?.form?.addEventListener("go-after-validation",()=>{M(a,qu(f(n)?.fields),!0)})});let i=ie(0);setInterval(()=>{M(i,qu(f(n)?.fields)||0,!0)},100);let s=D(()=>f(i)+(f(n)?.apiErrors?.length||0)),a=ie(-1);ge(()=>{t.$$host.classList.toggle("is-invalid",f(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",f(s).toString())});var o=f$(),l=$(o),c=$(l),d=v=>{var y=qt();J(k=>K(y,k),[()=>C.t("forms.errorSummary",{count:f(a)})]),E(v,y)};le(c,v=>{f(a)>0&&v(d)}),I(l);var u=W(l,2),p=v=>{var y=u$(),k=$(y,!0);I(y),J(x=>K(k,x),[()=>C.t("forms.errorSummary",{count:f(i)})]),E(v,y)};le(u,v=>{f(i)>0&&v(p)});var h=W(u,2),g=v=>{var y=d$();Fe(y,21,()=>f(n)?.apiErrors,sn,(k,x)=>{var T=c$(),S=$(T,!0);I(T),J(()=>K(S,f(x))),E(k,T)}),I(y),E(v,y)},m=D(()=>f(n)&&eu(f(n).apiErrors)&&f(n).apiErrors.length>0);le(h,v=>{f(m)&&v(g)}),I(o),E(e,o),te()}customElements.define("go-errors-feedback",re(h$,{},[],[]));var p$=V('<div class="go-form-feedback"><!></div>');function m$(e,t){var r=p$(),n=$(r);x_(n,t,"default",{},null),I(r),E(e,r)}customElements.define("go-form-feedback",re(m$,{},["default"],[]));function v$(e,t){ee(t,!0);let r=_(t,"buttonClass",7,"");return nn(()=>{on(t.$$host,"button",{type:"submit",class:r()})}),te({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",re(v$,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var g$=V('<div aria-live="assertive"> </div>');function y$(e,t){ee(t,!0);const r=qi(t.$$host),n=D(()=>r.value);var i=Q(),s=z(i),a=o=>{var l=g$();let c;var d=$(l,!0);I(l),J(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":f(n).successMessage}),K(d,f(n)?.successMessage)}),E(o,l)};le(s,o=>{f(n)?.successMessage&&o(a)}),E(e,i),te()}customElements.define("go-success-feedback",re(y$,{},[],[]));var pr="INUMBER",Xi="IOP1",es="IOP2",ts="IOP3",hn="IVAR",pi="IVARNAME",rs="IFUNCALL",Zo="IFUNDEF",jt="IEXPR",Gc="IEXPREVAL",mi="IMEMBER",Wo="IENDSTATEMENT",ns="IARRAY";function $e(e,t){this.type=e,this.value=t??0}$e.prototype.toString=function(){switch(this.type){case pr:case Xi:case es:case ts:case hn:case pi:case Wo:return this.value;case rs:return"CALL "+this.value;case Zo:return"DEF "+this.value;case ns:return"ARRAY "+this.value;case mi:return"."+this.value;default:return"Invalid Instruction"}};function Ho(e){return new $e(Xi,e)}function pn(e){return new $e(es,e)}function xg(e){return new $e(ts,e)}function Kc(e,t,r,n,i){for(var s=[],a=[],o,l,c,d,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===pr||h===pi)Array.isArray(p.value)?s.push.apply(s,Kc(p.value.map(function(g){return new $e(pr,g)}).concat(new $e(ns,p.value.length)),t,r,n,i)):s.push(p);else if(h===hn&&i.hasOwnProperty(p.value))p=new $e(pr,i[p.value]),s.push(p);else if(h===es&&s.length>1)l=s.pop(),o=s.pop(),d=r[p.value],p=new $e(pr,d(o.value,l.value)),s.push(p);else if(h===ts&&s.length>2)c=s.pop(),l=s.pop(),o=s.pop(),p.value==="?"?s.push(o.value?l.value:c.value):(d=n[p.value],p=new $e(pr,d(o.value,l.value,c.value)),s.push(p));else if(h===Xi&&s.length>0)o=s.pop(),d=t[p.value],p=new $e(pr,d(o.value)),s.push(p);else if(h===jt){for(;s.length>0;)a.push(s.shift());a.push(new $e(jt,Kc(p.value,t,r,n,i)))}else if(h===mi&&s.length>0)o=s.pop(),s.push(new $e(pr,o.value[p.value]));else{for(;s.length>0;)a.push(s.shift());a.push(p)}}for(;s.length>0;)a.push(s.shift());return a}function Tg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=s.type;if(a===hn&&s.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Xi?c=Ho(l.value):l.type===es?c=pn(l.value):l.type===ts?c=xg(l.value):c=new $e(l.type,l.value),n.push(c)}else a===jt?n.push(new $e(jt,Tg(s.value,t,r))):n.push(s)}return n}function vi(e,t,r){var n=[],i,s,a,o,l,c;if(Yc(e))return mn(e,r);for(var d=e.length,u=0;u<d;u++){var p=e[u],h=p.type;if(h===pr||h===pi)n.push(p.value);else if(h===es)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!vi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!vi(s,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,vi(s,t,r),r))):(o=t.binaryOps[p.value],n.push(o(mn(i,r),mn(s,r))));else if(h===ts)a=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(vi(i?s:a,t,r)):(o=t.ternaryOps[p.value],n.push(o(mn(i,r),mn(s,r),mn(a,r))));else if(h===hn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(h===Xi)i=n.pop(),o=t.unaryOps[p.value],n.push(o(mn(i,r)));else if(h===rs){for(c=p.value,l=[];c-- >0;)l.unshift(mn(n.pop(),r));if(o=n.pop(),o.apply&&o.call)n.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(h===Zo)n.push((function(){for(var m=n.pop(),v=[],y=p.value;y-- >0;)v.unshift(n.pop());var k=n.pop(),x=function(){for(var T=Object.assign({},r),S=0,O=v.length;S<O;S++)T[v[S]]=arguments[S];return vi(m,t,T)};return Object.defineProperty(x,"name",{value:k,writable:!1}),r[k]=x,x})());else if(h===jt)n.push(b$(p,t));else if(h===Gc)n.push(p);else if(h===mi)i=n.pop(),n.push(i[p.value]);else if(h===Wo)n.pop();else if(h===ns){for(c=p.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:mn(n[0],r)}function b$(e,t,r){return Yc(e)?e:{type:Gc,value:function(n){return vi(e.value,t,n)}}}function Yc(e){return e&&e.type===Gc}function mn(e,t){return Yc(e)?e.value(t):e}function Jc(e,t){for(var r=[],n,i,s,a,o,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===pr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(Ag).join(", ")+"]"):r.push(Ag(d.value));else if(u===es)i=r.pop(),n=r.pop(),a=d.value,t?a==="^"?r.push("Math.pow("+n+", "+i+")"):a==="and"?r.push("(!!"+n+" && !!"+i+")"):a==="or"?r.push("(!!"+n+" || !!"+i+")"):a==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):a==="=="?r.push("("+n+" === "+i+")"):a==="!="?r.push("("+n+" !== "+i+")"):a==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+a+" "+i+")"):a==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+a+" "+i+")");else if(u===ts)if(s=r.pop(),i=r.pop(),n=r.pop(),a=d.value,a==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===hn||u===pi)r.push(d.value);else if(u===Xi)n=r.pop(),a=d.value,a==="-"||a==="+"?r.push("("+a+n+")"):t?a==="not"?r.push("(!"+n+")"):a==="!"?r.push("fac("+n+")"):r.push(a+"("+n+")"):a==="!"?r.push("("+n+"!)"):r.push("("+a+" "+n+")");else if(u===rs){for(l=d.value,o=[];l-- >0;)o.unshift(r.pop());a=r.pop(),r.push(a+"("+o.join(", ")+")")}else if(u===Zo){for(i=r.pop(),l=d.value,o=[];l-- >0;)o.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+o.join(", ")+") { return "+i+" })"):r.push("("+n+"("+o.join(", ")+") = "+i+")")}else if(u===mi)n=r.pop(),r.push(n+"."+d.value);else if(u===ns){for(l=d.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===jt)r.push("("+Jc(d.value,t)+")");else if(u!==Wo)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Ag(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function is(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Qc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var a=e[s];a.type===hn||a.type===pi?!n&&!is(t,a.value)?t.push(a.value):(i!==null&&(is(t,i)||t.push(i)),i=a.value):a.type===mi&&n&&i!==null?i+="."+a.value:a.type===jt?Qc(a.value,t,r):i!==null&&(is(t,i)||t.push(i),i=null)}i!==null&&!is(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Kc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Tg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},vi(this.tokens,this,e)},Dr.prototype.toString=function(){return Jc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Qc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Qc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.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 "+Jc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var ca="TEOF",He="TOP",Go="TNUMBER",Cg="TSTRING",vn="TPAREN",ss="TBRACKET",Ko="TCOMMA",Xc="TNAME",ed="TSEMICOLON";function Og(e,t,r){this.type=e,this.value=t,this.index=r}Og.prototype.toString=function(){return this.type+": "+this.value};function it(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}it.prototype.newToken=function(e,t,r){return new Og(e,t,r??this.pos)},it.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},it.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},it.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(ca,"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)+'"')},it.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(Cg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},it.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(vn,e),this.pos++,!0):!1},it.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ss,e),this.pos++,!0):!1},it.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ko,","),this.pos++,!0):!1},it.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(ed,";"),this.pos++,!0):!1},it.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(Go,this.consts[n]),this.pos+=n.length,!0}return!1},it.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(He,n),this.pos+=n.length,!0}return!1},it.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(Xc,i),this.pos+=i.length,!0}return!1},it.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
82
- `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var _$=/^[0-9a-f]{4}$/i;it.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+=`
83
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);_$.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},it.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},it.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(Go,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},it.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,a;t<this.expression.length&&(a=this.expression.charAt(t),a>="0"&&a<="9"||!i&&a===".");)a==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),a==="e"||a==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(a=this.expression.charAt(t),o&&(a==="+"||a==="-"))o=!1;else if(a>="0"&&a<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Go,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},it.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(He,t);else if(t==="∙"||t==="•")this.current=this.newToken(He,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,">="),this.pos++):this.current=this.newToken(He,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"<="),this.pos++):this.current=this.newToken(He,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(He,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"=="),this.pos++):this.current=this.newToken(He,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"!="),this.pos++):this.current=this.newToken(He,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},it.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},it.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
84
- `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},it.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ke(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}Ke.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ke.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?is(t,e.value):typeof t=="function"?t(e):e.value===t},Ke.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ke.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ke.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ke.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))}},Ke.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Xc)||this.accept(He,r))e.push(new $e(hn,this.current.value));else if(this.accept(Go))e.push(new $e(pr,this.current.value));else if(this.accept(Cg))e.push(new $e(pr,this.current.value));else if(this.accept(vn,"("))this.parseExpression(e),this.expect(vn,")");else if(this.accept(ss,"["))if(this.accept(ss,"]"))e.push(new $e(ns,0));else{var n=this.parseArrayList(e);e.push(new $e(ns,n))}else throw new Error("unexpected "+this.nextToken)},Ke.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ke.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ke.prototype.parseUntilEndStatement=function(e,t){return this.accept(ed)?(this.nextToken&&this.nextToken.type!==ca&&!(this.nextToken.type===vn&&this.nextToken.value===")")&&t.push(new $e(Wo)),this.nextToken.type!==ca&&this.parseExpression(t),e.push(new $e(jt,t)),!0):!1},Ke.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ss,"]");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ke.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(He,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===rs){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===hn&&(e[a]=new $e(pi,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new $e(jt,r)),e.push(new $e(Zo,t.value));continue}if(t.type!==hn&&t.type!==mi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new $e(pi,t.value)),e.push(new $e(jt,r)),e.push(pn("="))}},Ke.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(He,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(He,":"),this.parseConditionalExpression(r),e.push(new $e(jt,t)),e.push(new $e(jt,r)),e.push(xg("?"))}},Ke.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(He,"or");){var t=[];this.parseAndExpression(t),e.push(new $e(jt,t)),e.push(pn("or"))}},Ke.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(He,"and");){var t=[];this.parseComparison(t),e.push(new $e(jt,t)),e.push(pn("and"))}};var w$=["==","!=","<","<=",">=",">","in"];Ke.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(He,w$);){var t=this.current;this.parseAddSub(e),e.push(pn(t.value))}};var k$=["+","-","||"];Ke.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(He,k$);){var t=this.current;this.parseTerm(e),e.push(pn(t.value))}};var S$=["*","/","%"];Ke.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(He,S$);){var t=this.current;this.parseFactor(e),e.push(pn(t.value))}},Ke.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(He,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===vn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===ed||this.nextToken.type===Ko||this.nextToken.type===ca||this.nextToken.type===vn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ho(n.value))}else this.parseExponential(e)},Ke.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(He,"^");)this.parseFactor(e),e.push(pn("^"))},Ke.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(He,"!");)e.push(Ho("!"))},Ke.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(He,r)){var n=this.current;this.parseAtom(e),e.push(Ho(n.value))}else for(this.parseMemberExpression(e);this.accept(vn,"(");)if(this.accept(vn,")"))e.push(new $e(rs,0));else{var i=this.parseArgumentList(e);e.push(new $e(rs,i))}},Ke.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(vn,")");)for(this.parseExpression(e),++t;this.accept(Ko);)this.parseExpression(e),++t;return t},Ke.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(He,".")||this.accept(ss,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Xc),e.push(new $e(mi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ss,"]"),e.push(pn("["))}else throw new Error("unexpected symbol: "+t.value)}};function E$(e,t){return Number(e)+Number(t)}function x$(e,t){return e-t}function T$(e,t){return e*t}function A$(e,t){return e/t}function C$(e,t){return e%t}function O$(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function D$(e,t){return e===t}function I$(e,t){return e!==t}function P$(e,t){return e>t}function $$(e,t){return e<t}function M$(e,t){return e>=t}function F$(e,t){return e<=t}function N$(e,t){return!!(e&&t)}function R$(e,t){return!!(e||t)}function L$(e,t){return is(t,e)}function z$(e){return(Math.exp(e)-Math.exp(-e))/2}function q$(e){return(Math.exp(e)+Math.exp(-e))/2}function U$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function V$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function B$(e){return Math.log(e+Math.sqrt(e*e-1))}function j$(e){return Math.log((1+e)/(1-e))/2}function Dg(e){return Math.log(e)*Math.LOG10E}function Z$(e){return-e}function W$(e){return!e}function H$(e){return e<0?Math.ceil(e):Math.floor(e)}function G$(e){return Math.random()*(e||1)}function Ig(e){return rd(e+1)}function K$(e){return isFinite(e)&&e===Math.round(e)}var Y$=4.7421875,td=[.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 rd(e){var t,r;if(K$(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)*rd(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=td[0];for(var c=1;c<td.length;++c)r+=td[c]/(e+c);return t=e+Y$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function J$(e){return Array.isArray(e)?e.length:String(e).length}function Pg(){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 $g(e,t,r){return e?t:r}function Q$(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 X$(e,t,r){return r&&(r[e]=t),t}function eM(e,t){return e[t|0]}function tM(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function rM(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function nM(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 iM(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 sM(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 aM(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 oM(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function lM(e){return(e>0)-(e<0)||+e}var Mg=1/3;function uM(e){return e<0?-Math.pow(-e,Mg):Math.pow(e,Mg)}function cM(e){return Math.exp(e)-1}function dM(e){return Math.log(1+e)}function fM(e){return Math.log(e)/Math.LN2}function gi(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||z$,cosh:Math.cosh||q$,tanh:Math.tanh||U$,asinh:Math.asinh||V$,acosh:Math.acosh||B$,atanh:Math.atanh||j$,sqrt:Math.sqrt,cbrt:Math.cbrt||uM,log:Math.log,log2:Math.log2||fM,ln:Math.log,lg:Math.log10||Dg,log10:Math.log10||Dg,expm1:Math.expm1||cM,log1p:Math.log1p||dM,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||H$,"-":Z$,"+":Number,exp:Math.exp,not:W$,length:J$,"!":Ig,sign:Math.sign||lM},this.binaryOps={"+":E$,"-":x$,"*":T$,"/":A$,"%":C$,"^":Math.pow,"||":O$,"==":D$,"!=":I$,">":P$,"<":$$,">=":M$,"<=":F$,and:N$,or:R$,in:L$,"=":X$,"[":eM},this.ternaryOps={"?":$g},this.functions={random:G$,fac:Ig,min:rM,max:tM,hypot:Math.hypot||Pg,pyt:Math.hypot||Pg,pow:Math.pow,atan2:Math.atan2,if:$g,gamma:rd,roundTo:Q$,map:nM,fold:iM,filter:sM,indexOf:aM,join:oM},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}gi.prototype.parse=function(e){var t=[],r=new Ke(this,new it(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(ca,"EOF"),new Dr(t,this)},gi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Fg=new gi;gi.parse=function(e){return Fg.parse(e)},gi.evaluate=function(e,t){return Fg.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 hM(e){return Ng.hasOwnProperty(e)?Ng[e]:e}gi.prototype.isOperatorEnabled=function(e){var t=hM(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var pM=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,mM=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,vM=/(__optional\("[^"]+"\))\.length\b/g,gM=new gi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Rg=new Map;function yM(e){return e.replace(pM,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(mM,(t,r)=>`__length(${r})`).replace(vM,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function bM(e){const t=Rg.get(e);if(t)return t;const r=gM.parse(yM(e));return Rg.set(e,r),r}function _M(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=bM(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 Lg=["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"],wM=7200*1e3;async function gn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await C.asyncFetch(()=>C.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Yo(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Jo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+wM&&(i.seats?.available??0)>0})}async function Qo(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}));Yo(e,t)}var kM={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}));Yo(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=$n(Mn(r,t.selectedTime),t.selectedTime);await gn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:t.selectedTime}))}},SM={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,a=$n(Mn(r,s),s);await gn(e,a);for(const o of a)e.preCart.addItem(ot(o,{time:s}))}},EM={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})),n=Object.values(r).map(i=>oo(i));await gn(e,n);for(const i of n)e.preCart.addItem(ot(i))}},xM={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()}));Yo(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=$n(Mn(n,t.selectedTime),t.selectedTime);await gn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},TM={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],a=s?Object.keys(s.capacities)[0]:void 0,o=$n(Mn(n,a),a);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:a}))}},AM={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()}));Yo(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=$n(Mn(n,t.selectedTime),t.selectedTime);await gn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},CM={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=Fu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ot(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},OM={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(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:a}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(a);const o=$n(Mn(s,n.start_time),n.start_time);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},DM={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(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:a}=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(a);const o=Object.values(a)[0],l=o?Object.keys(o.capacities)[0]:n.start_time,c=$n(Mn(s,l),l);await gn(e,c);for(const d of c)e.preCart.addItem(ot(d,{time:l}))}}},IM={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(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:a}=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(a);const o=$n(Mn(s,n.start_time),n.start_time);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},PM={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qo(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Jo(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(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Fu(a,i.id,{event_title:i.event_title});e.preCart.addItem(ot(o,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},$M={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(ot(Sp(r)))}},MM={"ticket:timeslot":kM,"ticket:day":SM,"ticket:annual":EM,"event:admission":xM,"event:admission:day":TM,"event:admission:timeslot":AM,"event:price":CM,"events:admission":OM,"events:admission:day":DM,"events:admission:timeslot":IM,"events:price":PM,coupon:$M};function yi(e){const t=MM[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Lg.join(", ")}`),t}var zg=Lg,FM=0,NM=class{uid=FM++;#e=ie();get filters(){return f(this.#e)}set filters(e){M(this.#e,e,!0)}#t=ie();get eventIds(){return f(this.#t)}set eventIds(e){M(this.#t,e,!0)}#r=ie();get museumIds(){return f(this.#r)}set museumIds(e){M(this.#r,e,!0)}#n=ie();get exhibitionIds(){return f(this.#n)}set exhibitionIds(e){M(this.#n,e,!0)}#i=ie();get ticketIds(){return f(this.#i)}set ticketIds(e){M(this.#i,e,!0)}#s=ie();get ticketGroupIds(){return f(this.#s)}set ticketGroupIds(e){M(this.#s,e,!0)}#o=ie();get selectedDate(){return f(this.#o)}set selectedDate(e){M(this.#o,e,!0)}#a=ie();get selectedTimeslot(){return f(this.#a)}set selectedTimeslot(e){M(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return f(this.#l)}set selectedTime(e){M(this.#l,e)}#u=ie(Me([]));get ticketSegments(){return f(this.#u)}set ticketSegments(e){M(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return f(this.#c)}set preCarts(e){M(this.#c,e)}#d=ie();get timeslotDetails(){return f(this.#d)}set timeslotDetails(e){M(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>yi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>yi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>yi(e).isTicketsVisible(this))}},qg="go-ticket-selection",RM=Li(qg),yn=zi(qg);function LM(e,t){ee(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=yn(t.$$host),s=D(()=>i.value),a=_x(t.$$host),o=D(()=>a.value),l=qi(t.$$host),c=D(()=>l.value),d=Ui(t.$$host),u=D(()=>d.value);let p=D(()=>({ticketSelection:f(s),personalizationDetails:f(o),formData:f(c)?.formData,cart:C.cart,cartView:f(u)}));const h=k=>{M(p,k)},g=()=>f(p);let m=D(()=>_M(r(),f(p))),v=null;ge(()=>{const k=t.$$host;if(f(m)&&n()==="show")v&&(k.appendChild(v),v=null);else if(!v&&k.childNodes.length>0)for(v=document.createDocumentFragment();k.firstChild;)v.appendChild(k.firstChild)});var y={_setData:h,_getData:g,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return te(y)}customElements.define("go-if",re(LM,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Ug(e,t){ee(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ge(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),te({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",re(Ug,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function zM(e,t){ee(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return Ug(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),te(a)}customElements.define("go-init",re(zM,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function qM(e,t){ee(t,!0);const r=_(t,"to",7),n=D(()=>Je.config.urls[r()]),i=on(t.$$host,"a");return ge(()=>{if(!f(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",f(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Je.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}Je.config.navigateTo(Je.config.urls[r()]())}),te({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",re(qM,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function UM(e,t){ee(t,!0);let r=_(t,"custom",7,!1);Jt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await C.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[C.t("membership.activation.form.errors.requestFailed")]}return on(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),te({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",re(UM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var VM=class{#e=ie();get token(){return f(this.#e)}set token(e){M(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return pl(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?Je.config.urls.annualTicketPersonalizationList?.()?Je.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}}},Vg="go-order-details",BM=Li(Vg),Bg=zi(Vg);function jM(e,t){ee(t,!0);let r=_(t,"token",7);const n=new VM(r());BM(t.$$host,n),nn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return te(i)}customElements.define("go-order",re(jM,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var ZM=V('<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),WM=V('<br/> <span class="go-order-item-quantities"> </span>',1),HM=V('<a aria-label="iCal link"> </a>'),GM=V('<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 jg(e,t){ee(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(S){r(S),b()},get orderDetails(){return n()},set orderDetails(S){n(S),b()}},s=GM(),a=$(s),o=$(a),l=W($(o),2),c=$(l),d=$(c,!0);I(c);var u=W(c,2),p=S=>{var O=ZM(),P=z(O),R=$(P,!0);I(P);var j=W(P,2),N=$(j,!0);I(j),J((B,U)=>{K(R,B),K(N,U)},[()=>ni(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().attributes.start_time)]),E(S,O)};le(u,S=>{r().attributes.start_time&&S(p)});var h=W(u,2);Fe(h,17,()=>r().attributes.quantities,S=>S.id,(S,O)=>{var P=WM(),R=W(z(P),2),j=$(R);I(R),J(()=>K(j,`${f(O).quantity??""} x ${f(O).title??""}`)),E(S,P)});var g=W(h,2),m=$(g,!0);I(g),I(l);var v=W(l,2),y=$(v,!0);I(v);var k=W(v,4),x=$(k),T=S=>{var O=HM(),P=$(O,!0);I(O),J(R=>{ve(O,"href",C.apiUrl+r().attributes.ical_url),K(P,R)},[()=>C.t("common.calendar")]),E(S,O)};return le(x,S=>{r().attributes.ical_url&&S(T)}),I(k),I(o),I(a),I(s),J((S,O,P)=>{K(d,r().attributes.title),ve(g,"href",S),K(m,O),K(y,P)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>js(r().price_cents)]),E(e,s),te(i)}re(jg,{item:{},orderDetails:{}},[],[],{mode:"open"});var KM=V('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),YM=V('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),JM=V('<span class="go-cart-item-date"> </span>'),QM=V('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),XM=V('<br/> <a class="go-ticket-personalization"> </a>',1),e2=V('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),t2=V('<a aria-label="iCal link"> </a>'),r2=V('<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>'),n2=V('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),i2=V('<a class="go-ticket-personalization"> </a>'),s2=V('<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 Zg(e,t){ee(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=Q(),l=z(o),c=u=>{var p=Q(),h=z(p);Fe(h,17,()=>({length:n().attributes.quantity}),sn,(g,m,v)=>{var y=r2(),k=$(y),x=$(k),T=$(x);T.textContent="1";var S=W(T,2),O=$(S),P=$(O,!0);I(O);var R=W(O,2);Fe(R,17,()=>f(s),H=>H.id,(H,ne)=>{var de=KM(),F=W(z(de),2),he=$(F);I(F),J(()=>K(he,`${f(ne).quantity??""} x ${f(ne).title??""}`)),E(H,de)});var j=W(R,2),N=H=>{const ne=D(()=>n().attributes.barcodes[v]?.id);var de=QM(),F=z(de),he=w=>{var ke=YM(),Te=z(ke),je=$(Te,!0);I(Te);var Qe=W(Te,2),Ze=$(Qe,!0);I(Qe),J((Mt,st)=>{K(je,Mt),K(Ze,st)},[()=>ni(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(n().attributes.start_time)]),E(w,ke)},q=w=>{var ke=JM(),Te=$(ke,!0);I(ke),J(je=>K(Te,je),[()=>ni(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),E(w,ke)};le(F,w=>{n().attributes.ticket_type==="time_slot"?w(he):n().attributes.ticket_type==="normal"&&w(q,1)});var ce=W(F,4),se=$(ce,!0);I(ce),J((w,ke)=>{ve(ce,"href",w),K(se,ke)},[()=>i().downloadLink(n(),f(ne)),()=>C.t("common.download")]),E(H,de)},B=H=>{var ne=XM(),de=W(z(ne),2),F=$(de,!0);I(de),J((he,q)=>{ve(de,"href",he),K(F,q)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),E(H,ne)};le(j,H=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?H(N):H(B,-1)}),I(S);var U=W(S,2),oe=$(U,!0);I(U);var pe=W(U,2),Y=$(pe),ae=H=>{var ne=e2(),de=$(ne);I(ne),J(()=>{ve(ne,"href",C.apiUrl+n().attributes.barcodes[v]?.passbook_url),ve(de,"src",r)}),E(H,ne)};le(Y,H=>{n().attributes.barcodes[v]&&n().attributes.barcodes[v]?.passbook_url&&H(ae)}),I(pe);var X=W(pe,2),fe=$(X),ue=H=>{var ne=t2(),de=$(ne,!0);I(ne),J(F=>{ve(ne,"href",C.apiUrl+n().attributes.ical_url),K(de,F)},[()=>C.t("common.calendar")]),E(H,ne)};le(fe,H=>{n().attributes.ical_url&&H(ue)}),I(X),I(x),I(k),I(y),J(H=>{K(P,n().attributes.title),K(oe,H)},[()=>js(n().price_cents)]),E(g,y)}),E(u,p)},d=u=>{var p=s2(),h=$(p),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2),k=$(y),x=$(k,!0);I(k);var T=W(k,2),S=j=>{var N=n2(),B=$(N,!0);I(N),J((U,oe)=>{ve(N,"href",U),K(B,oe)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),E(j,N)},O=j=>{var N=i2(),B=$(N,!0);I(N),J((U,oe)=>{ve(N,"href",U),K(B,oe)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),E(j,N)};le(T,j=>{n().attributes.is_voucher?j(S):j(O,-1)}),I(y);var P=W(y,2),R=$(P,!0);I(P),At(2),I(g),I(h),I(p),J(j=>{K(v,n().attributes.quantity),K(x,n().attributes.title),K(R,j)},[()=>js(n().price_cents)]),E(u,p)};return le(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(d,-1)}),E(e,o),te(a)}re(Zg,{item:{},orderDetails:{}},[],[],{mode:"open"});var a2=V('<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),o2=V('<br/> <span class="go-order-item-quantities"> </span>',1),l2=V('<a aria-label="iCal link"> </a>'),u2=V('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </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>');function Wg(e,t){ee(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(S=>S.title&&S.quantity!=null));var i={get item(){return r()},set item(S){r(S),b()}},s=u2(),a=$(s),o=$(a),l=W($(o),2),c=$(l),d=$(c,!0);I(c);var u=W(c,2),p=$(u,!0);I(u);var h=W(u,2),g=S=>{var O=a2(),P=z(O),R=$(P,!0);I(P);var j=W(P,2),N=$(j,!0);I(j),J((B,U)=>{K(R,B),K(N,U)},[()=>ni(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().attributes.start_time)]),E(S,O)};le(h,S=>{r().attributes.start_time&&S(g)});var m=W(h,2);Fe(m,17,()=>f(n),S=>S.title,(S,O)=>{var P=o2(),R=W(z(P),2),j=$(R);I(R),J(()=>K(j,`${f(O).quantity??""} x ${f(O).title??""}`)),E(S,P)}),I(l);var v=W(l,2),y=$(v,!0);I(v);var k=W(v,4),x=$(k),T=S=>{var O=l2(),P=$(O,!0);I(O),J(R=>{ve(O,"href",C.apiUrl+r().attributes.ical_url),K(P,R)},[()=>C.t("common.calendar")]),E(S,O)};return le(x,S=>{r().attributes.ical_url&&S(T)}),I(k),I(o),I(a),I(s),J((S,O)=>{K(d,r().attributes.title),K(p,S),K(y,O)},[()=>C.t("cart.item.participants",{count:r().attributes.participants}),()=>js(r().price_cents)]),E(e,s),te(i)}re(Wg,{item:{}},[],[],{mode:"open"});var c2=V('<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 d2(e,t){ee(t,!0);const r=Bg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);var s=Q(),a=z(s),o=l=>{var c=c2(),d=$(c),u=$(d),p=$(u),h=$(p,!0);I(p);var g=W(p,2),m=$(g,!0);I(g);var v=W(g,2),y=$(v,!0);I(v),At(2),I(u),I(d);var k=W(d,2);Fe(k,17,()=>f(i).items,P=>P.id,(P,R)=>{var j=Q(),N=z(j),B=pe=>{Zg(pe,{get item(){return f(R)},get orderDetails(){return f(n)}})},U=pe=>{jg(pe,{get item(){return f(R)},get orderDetails(){return f(n)}})},oe=pe=>{Wg(pe,{get item(){return f(R)}})};le(N,pe=>{f(R).type==="Ticket"?pe(B):f(R).type==="Event"?pe(U,1):f(R).type==="Tour"&&pe(oe,2)}),E(P,j)});var x=W(k,2),T=$(x),S=W($(T),4),O=$(S,!0);I(S),At(2),I(T),I(x),I(c),J((P,R,j,N)=>{K(h,P),K(m,R),K(y,j),K(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:js(f(i).total_price_cents)})]),E(l,c)};le(a,l=>{f(i)&&f(n)&&l(o)}),E(e,s),te()}customElements.define("go-order-breakdown",re(d2,{},[],[]));function f2(e,t){ee(t,!0);const r=Bg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);At();var s=qt();J(()=>K(s,f(i)?.id)),E(e,s),te()}customElements.define("go-order-invoice-id",re(f2,{},[],[]));var h2=V("<go-form></go-form>",2);function p2(e,t){ee(t,!1),Jt.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,a=await C.updatePassword(s.formData);a.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Ql();var n=h2();Yn(n,"formId","passwordResetForm"),Na("submit",n,r),E(e,n),te()}customElements.define("go-profile-password",re(p2,{},[],[]));var m2=V("<go-form></go-form>",2);function v2(e,t){ee(t,!0),Jt.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=ie(void 0);const n=D(()=>C.getCustomer());nn(async()=>{await C.waitForAllFetches(),await Xl(()=>f(r).details),await Xl(()=>f(n).data),f(r).details.fill(f(n).data)});var i=m2();Yn(i,"formId","accountDetailsForm"),Jl(i,s=>M(r,s),()=>f(r)),E(e,i),te()}customElements.define("go-profile-details",re(v2,{},[],[]));var g2=V('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function y2(e,t){ee(t,!0);const r=D(()=>C.getCustomer()),n=D(()=>f(r)?.data);var i=Q(),s=z(i),a=l=>{var c=g2(),d=z(c),u=$(d);I(d);var p=W(d,2),h=$(p,!0);I(p),J(()=>{K(u,`${f(n).name??""}
85
- ${f(n).surname??""}`),K(h,f(n).email)}),E(l,c)},o=l=>{var c=qt();J(d=>K(c,d),[()=>C.t("user.login.desc.text")]),E(l,c)};le(s,l=>{f(n)?l(a):l(o,-1)}),E(e,i),te()}customElements.define("go-profile-overview",re(y2,{},[],[]));function b2(e,t){ee(t,!0);function r(h){if(!h)return;const g=[];for(const m of h.split(",")){const v=m.trim();v&&(zg.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${zg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),a=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),d=_(t,"ticketGroupIds",7);const u=new NM;ge(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ge(()=>{u.filters=r(n()),u.eventIds=ln(i()),u.museumIds=ln(s()),u.exhibitionIds=ln(a()),u.ticketIds=ln(c()),u.ticketGroupIds=ln(d()),u.selectedTimeslot=l(),o()&&(u.selectedDate=ao(o()))}),ge(()=>{u.selectedDate&&Le(()=>{o(u.selectedDate.toString())})}),ge(()=>{u.selectedTimeslot,Le(()=>{l(u.selectedTimeslot)})}),RM(t.$$host,u);var p={details:u,get filters(){return n()},set filters(h){n(h),b()},get eventIds(){return i()},set eventIds(h){i(h),b()},get museumIds(){return s()},set museumIds(h){s(h),b()},get exhibitionIds(){return a()},set exhibitionIds(h){a(h),b()},get selectedDate(){return o()},set selectedDate(h){o(h),b()},get selectedTimeslot(){return l()},set selectedTimeslot(h){l(h),b()},get ticketIds(){return c()},set ticketIds(h){c(h),b()},get ticketGroupIds(){return d()},set ticketGroupIds(h){d(h),b()}};return te(p)}customElements.define("go-ticket-selection",re(b2,{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 _2(e,t){ee(t,!0);const r=yn(t.$$host),n=D(()=>r.value);ge(()=>{t.$$host.style.display=f(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!f(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",f(n)?.isTicketsVisible)}),te()}customElements.define("go-tickets",re(_2,{},[],[]));function w2(e,t){ee(t,!0);const r=yn(t.$$host),n=D(()=>r.value),i=D(()=>qr(f(n)?.preCarts||[],a=>a.items.length)),s=D(()=>!f(n)?.isTicketsVisible||f(n)?.isTicketsVisible&&f(i)===0);ge(()=>{t.$$host.style.display=f(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!f(s)),t.$$host.classList.toggle("is-visible",f(s))}),te()}customElements.define("go-tickets-empty",re(w2,{},[],[]));function k2(e,t){ee(t,!0);const r=yn(t.$$host),n=D(()=>r.value);let i=D(()=>qr(f(n)?.preCarts||[],a=>a.totalPriceCents));At();var s=qt();J(a=>K(s,a),[()=>fr(f(i))]),E(e,s),te()}customElements.define("go-tickets-sum",re(k2,{},[],[]));var S2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}#t=ie(Me(Ni()));get preCart(){return f(this.#t)}set preCart(e){M(this.#t,e,!0)}#r=ie();get filters(){return f(this.#r)}set filters(e){M(this.#r,e,!0)}#n=ie();get dateId(){return f(this.#n)}set dateId(e){M(this.#n,e,!0)}#i=ie();get limit(){return f(this.#i)}set limit(e){M(this.#i,e,!0)}#s=ie();get query(){return f(this.#s)}set query(e){M(this.#s,e,!0)}#o=ie(Me([]));get ticketGroupIds(){return f(this.#o)}set ticketGroupIds(e){M(this.#o,e,!0)}#a=ie(Me([]));get languageIds(){return f(this.#a)}set languageIds(e){M(this.#a,e,!0)}#l=ie(Me([]));get catchWordIds(){return f(this.#l)}set catchWordIds(e){M(this.#l,e,!0)}#u=ie(Me([]));get museumIds(){return f(this.#u)}set museumIds(e){M(this.#u,e,!0)}#c=ie(!1);get withContent(){return f(this.#c)}set withContent(e){M(this.#c,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=Ni([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Ni();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>yi(t).loadProducts(this)))}},Hg="go-ticket-segment",E2=Li(Hg),nd=zi(Hg);function x2(e,t){ee(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),a=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),d=_(t,"withContent",7);function u(y){if(!y)return;const k=y.split(",").map(x=>x.trim()).filter(Boolean);return k.length?k:void 0}const p=yn(t.$$host),h=p.value,g=new S2(u(r()),p);E2(t.$$host,g),ge(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=ln(a()),g.languageIds=ln(o()),g.catchWordIds=ln(l()),g.museumIds=ln(c()),g.withContent=!!d()}),ge(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Le(()=>{g.loadTickets()})}),ge(()=>{h&&Le(()=>h?.addTicketSegment(g))});const m=D(()=>g.preCart.items.length);ge(()=>{t.$$host.classList.toggle("is-empty",f(m)===0)});var v={details:g,get filters(){return r()},set filters(y){r(y),b()},get dateId(){return n()},set dateId(y){n(y),b()},get query(){return i()},set query(y){i(y),b()},get limit(){return s()},set limit(y){s(y),b()},get ticketGroupIds(){return a()},set ticketGroupIds(y){a(y),b()},get languageIds(){return o()},set languageIds(y){o(y),b()},get catchWordIds(){return l()},set catchWordIds(y){l(y),b()},get museumIds(){return c()},set museumIds(y){c(y),b()},get withContent(){return d()},set withContent(y){d(y),b()}};return te(v)}customElements.define("go-ticket-segment",re(x2,{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"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function T2(e,t){ee(t,!0);const r=yn(t.$$host).value,n=nd(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&f(i)===0);ge(()=>{t.$$host.style.display=f(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!f(s)),t.$$host.classList.toggle("is-visible",f(s))}),te()}customElements.define("go-ticket-segment-empty",re(T2,{},[],[]));var A2=V('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),C2=V('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),O2=V('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),D2=V('<ul class="go-sub-tickets" role="list"></ul>'),I2=V('<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=""><!></li></ul></article> <!></li>');function Gg(e,t){const r=mt();ee(t,!0);const n=x=>{var T=A2(),S=z(T),O=$(S);I(S);var P=W(S,2),R=$(P,!0);I(P),J(j=>{K(O,`${s().product.event_title??""} - ${j??""}`),K(R,s().product.title)},[()=>ri(s().time)]),E(x,T)},i=x=>{At();var T=qt();J(()=>K(T,s().product.title)),E(x,T)};let s=_(t,"item",7),a=_(t,"details",7),o=ie(void 0),l=ie(Me({}));const c=D(()=>Br(s().product)?s().product:null);let d=ie(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ge(()=>{a().preCart.items.map(x=>x.quantity),a().preCart.items.forEach(x=>x.mantle&&Object.values(x.mantle.composition)),C.cart?.items.map(x=>x.quantity),C.cart?.items.forEach(x=>x.mantle&&Object.values(x.mantle.composition)),Le(()=>{M(o,C.capacityManager.capacity(C.cart,s(),a().preCart),!0),M(l,C.capacityManager.subTicketMaxes(C.cart,s(),a().preCart),!0)})});function h(x,T){s().mantle&&(s().mantle.composition[x]=T)}let g=i;lo(s().product)&&(g=n);var m={get item(){return s()},set item(x){s(x),b()},get details(){return a()},set details(x){a(x),b()}},v=Q(),y=z(v),k=x=>{var T=I2(),S=$(T),O=$(S),P=$(O),R=$(P);g(R),I(P);var j=W(P,2),N=ue=>{var H=C2(),ne=$(H);I(H),J(de=>{St(ne,1,ur(["go-ticket-info-icon",f(d)&&"is-active"])),ve(ne,"aria-expanded",f(d)),ve(ne,"aria-controls",p),ve(ne,"aria-label",de)},[()=>C.t("ticket.list.additionalInfo")]),pt("click",ne,()=>M(d,!f(d))),E(ue,H)};le(j,ue=>{f(u)&&ue(N)});var B=W(j,2);Af(B,()=>vm.sanitize(s().product.description),!0),I(B);var U=W(B,2),oe=ue=>{var H=O2(),ne=$(H,!0);I(H),J(de=>{ve(H,"id",p),ve(H,"hidden",!f(d)),K(ne,de)},[()=>C.t(f(u))]),E(ue,H)};le(U,ue=>{f(u)&&ue(oe)});var pe=W(U,2),Y=$(pe,!0);I(pe);var ae=W(pe,2);mo($(ae),{get value(){return s().quantity},get min(){return f(o).min},get max(){return f(o).max},get label(){return s().product.title},onChange:ue=>s().quantity=ue}),I(ae),I(O),I(S);var X=W(S,2),fe=ue=>{var H=D2();Fe(H,21,()=>Zs(f(c)),ne=>ne.id,(ne,de)=>{{let F=D(()=>s().mantle?.composition?.[f(de).id]??0);Gu(ne,{get sub(){return f(de)},get quantity(){return f(F)},get max(){return f(l)[f(de).id]},onChange:he=>h(f(de).id,he)})}}),I(H),J(()=>ve(H,"aria-label",f(c).title)),E(ue,H)};le(X,ue=>{f(c)&&s().quantity>0&&ue(fe)}),I(T),J(()=>{St(S,1,ur(["go-tickets-item",f(o).bookedOut&&"is-booked-out"])),ve(S,"data-testid",s().uuid),K(Y,s().price_formatted)}),E(x,T)};return le(y,x=>{f(o)&&!f(o).unavailable&&x(k)}),E(e,v),te(m)}lr(["click"]),re(Gg,{item:{},details:{}},[],[],{mode:"open"});var P2=V('<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 $2(e,t){ee(t,!0);const r=nd(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?.preCart?.items.length&&f(n)?.preCart?.items.length>0);var s=Q(),a=z(s),o=l=>{var c=P2(),d=$(c),u=$(d),p=$(u),h=$(p,!0);I(p);var g=W(p,2),m=$(g,!0);I(g);var v=W(g,2),y=$(v,!0);I(v);var k=W(v,2),x=$(k,!0);I(k),I(u),I(d);var T=W(d,2);Fe(T,17,()=>f(n).preCart.items,S=>S.uuid,(S,O)=>{Gg(S,{get item(){return f(O)},get details(){return f(n)}})}),I(c),J((S,O,P,R)=>{K(h,S),K(m,O),K(y,P),K(x,R)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),E(l,c)};le(a,l=>{f(i)&&f(n)&&l(o)}),E(e,s),te()}customElements.define("go-ticket-segment-body",re($2,{},[],[]));function M2(e,t){ee(t,!0);const r=nd(t.$$host),n=D(()=>r.value);At();var i=qt();J(()=>K(i,f(n)?.preCart.totalFormatted)),E(e,i),te()}customElements.define("go-ticket-segment-sum",re(M2,{},[],[]));var F2=class{#e;get tsd(){return f(this.#e)}set tsd(e){M(this.#e,e)}#t=ie(Me([]));get timeslots(){return f(this.#t)}set timeslots(e){M(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}const t=C.capacityManager.quotaManager;t.clearPrecart();for(const r of C.cart?.items??[]){const n=r.product;$u(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}},N2=V('<li><label> <input type="radio" name="timeslot"/></label></li>'),R2=V('<ul data-testid="timeslots"></ul>');function L2(e,t){ee(t,!0);const r=[],n=new F2(yn(t.$$host));ge(()=>{const d=n.tsd;if(!d)return;const u=d.filters,p=d.selectedDate;Le(async()=>{d.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>yi(h).loadTimeslots(d))),n.recalculateCapacities()})}),ge(()=>{C.cart?.items.map(d=>d.quantity),Le(()=>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)};ge(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var a={details:n},o=Q(),l=z(o),c=d=>{var u=R2();Fe(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=D(()=>h.totalCapacity===0),m=D(()=>!f(g)&&h.capacity===0),v=D(()=>f(g)||f(m)||!h.available),y=D(()=>n.tsd?.selectedTimeslot===h.startAt);var k=N2(),x=$(k),T=$(x),S=W(T);Ms(S);var O;I(x),I(k),J(()=>{St(k,1,ur({"go-timeslot":!0,"is-unavailable":f(g),"is-sold-out":f(m),"is-disabled":f(v),"is-selected":f(y)})),K(T,`${h.timeFormatted??""} `),S.disabled=f(v),ve(S,"aria-disabled",f(v)),O!==(O=h.startAt)&&(S.value=(S.__value=h.startAt)??"")}),pt("change",S,s),q_(r,[],S,()=>(h.startAt,n.tsd.selectedTimeslot),P=>n.tsd.selectedTimeslot=P),E(p,k)}),I(u),E(d,u)};return le(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),E(e,o),te(a)}lr(["change"]),customElements.define("go-timeslots",re(L2,{},[],["details"]));var z2=class{#e=ie();get details(){return f(this.#e)}set details(e){M(this.#e,e,!0)}#t=ie(Me(ei(Vt())));get startAt(){return f(this.#t)}set startAt(e){M(this.#t,e,!0)}#r=ie(void 0);get selected(){return f(this.#r)}set selected(e){M(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>yi(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(ei(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(ei(Vt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>yi(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)=>Et(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>Et(t,e(this.params(r))),{})}},q2=V("<!> <!> <!>",1),U2=V("<div> </div>"),Kg=V("<!> <!>",1),V2=V('<div data-calendar-wrapper=""><!></div>');function Yg(e,t){ee(t,!0);let r=_(t,"calendarClass",7),n=ie(void 0);const i=r();ge(()=>{f(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),b()}},a=V2(),o=$(a);{const l=(c,d)=>{let u=()=>d?.().months,p=()=>d?.().weekdays;var h=Kg(),g=z(h);Pe(g,()=>wc,(v,y)=>{y(v,{children:(k,x)=>{var T=q2(),S=z(T);Pe(S,()=>Ec,(R,j)=>{j(R,{class:"go-calendar-prev-button",children:(N,B)=>{At();var U=qt("Prev");E(N,U)},$$slots:{default:!0}})});var O=W(S,2);Pe(O,()=>kc,(R,j)=>{j(R,{class:"go-calendar-heading"})});var P=W(O,2);Pe(P,()=>Sc,(R,j)=>{j(R,{class:"go-calendar-next-button",children:(N,B)=>{At();var U=qt("Next");E(N,U)},$$slots:{default:!0}})}),E(k,T)},$$slots:{default:!0}})});var m=W(g,2);Fe(m,17,u,sn,(v,y)=>{var k=Q(),x=z(k);Pe(x,()=>vc,(T,S)=>{S(T,{class:"go-calendar-grid",children:(O,P)=>{var R=Kg(),j=z(R);Pe(j,()=>bc,(B,U)=>{U(B,{class:"go-calendar-grid-head",children:(oe,pe)=>{var Y=Q(),ae=z(Y);Pe(ae,()=>oa,(X,fe)=>{fe(X,{class:"go-calendar-grid-row",children:(ue,H)=>{var ne=Q(),de=z(ne);Fe(de,17,p,sn,(F,he,q,ce)=>{var se=Q(),w=z(se);Pe(w,()=>_c,(ke,Te)=>{Te(ke,{children:(je,Qe)=>{var Ze=U2(),Mt=$(Ze,!0);I(Ze),J(st=>K(Mt,st),[()=>f(he).slice(0,2)]),E(je,Ze)},$$slots:{default:!0}})}),E(F,se)}),E(ue,ne)},$$slots:{default:!0}})}),E(oe,Y)},$$slots:{default:!0}})});var N=W(j,2);Pe(N,()=>gc,(B,U)=>{U(B,{class:"go-calendar-grid-body",children:(oe,pe)=>{var Y=Q(),ae=z(Y);Fe(ae,17,()=>f(y).weeks,sn,(X,fe,ue,H)=>{var ne=Q(),de=z(ne);Pe(de,()=>oa,(F,he)=>{he(F,{class:"go-calendar-grid-row",children:(q,ce)=>{var se=Q(),w=z(se);Fe(w,17,()=>f(fe),sn,(ke,Te,je,Qe)=>{var Ze=Q(),Mt=z(Ze);Pe(Mt,()=>yc,(st,er)=>{er(st,{get date(){return f(Te)},get month(){return f(y).value},class:"go-calendar-cell",children:(Tt,Ft)=>{var tr=Q(),Zt=z(tr);{let mr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(f(Te)),"is-disabled":r().isDateDisabled(f(Te)),"is-selected":r().selected?.compare(f(Te))===0}));Pe(Zt,()=>mc,(Ir,Pr)=>{Pr(Ir,{get class(){return f(mr)},children:(bn,$r)=>{At();var vr=qt();J(()=>K(vr,f(Te).day)),E(bn,vr)},$$slots:{default:!0}})})}E(Tt,tr)},$$slots:{default:!0}})}),E(ke,Ze)}),E(q,se)},$$slots:{default:!0}})}),E(X,ne)}),E(oe,Y)},$$slots:{default:!0}})}),E(O,R)},$$slots:{default:!0}})}),E(v,k)}),E(c,h)};Pe(o,()=>Ov,(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 I(a),Jl(a,l=>M(n,l),()=>f(n)),E(e,a),te(s)}re(Yg,{calendarClass:{}},[],["details"],{mode:"open"});function B2(e,t){ee(t,!0);const r=new z2,n=r,i=yn(t.$$host),s=D(()=>i.value);ge(()=>{r.details=f(s)}),t.$$host.addEventListener("go-date-select",d=>{f(s)&&(f(s).selectedDate=d.detail.selected,f(s).selectedTimeslot=void 0)});var a={details:n},o=Q(),l=z(o),c=d=>{Yg(d,{get calendarClass(){return r}})};return le(l,d=>{f(s)?.isCalendarVisible&&d(c)}),E(e,o),te(a)}customElements.define("go-calendar",re(B2,{},[],["details"]));var j2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){M(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 ot(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Je.config.urls.cart&&Je.config.navigateTo(Je.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},Z2=V('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function W2(e,t){ee(t,!0);const r=new j2(yn(t.$$host));var n={details:r},i=Z2(),s=$(i,!0);return I(i),J((a,o,l)=>{i.disabled=a,ve(i,"data-x",o),K(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),pt("click",i,()=>r.addToCart()),E(e,i),te(n)}lr(["click"]),customElements.define("go-add-to-cart-button",re(W2,{},[],["details"]));function H2(e,t){ee(t,!0);let r=_(t,"custom",7,!1);Jt.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,a=await C.withdrawal(s.formData);a.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return on(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),te({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",re(H2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var G2=["id","time","participants","languageId","totalPriceCents","title"];function K2(e){for(const t of G2)if(e[t]==null||e[t]==="")throw new Error(`(go.cart.addTour) '${t}' is required`);if(!(e.participants>0))throw new Error("(go.cart.addTour) 'participants' must be a positive number");if(e.quantities){const t=qr(Object.values(e.quantities));if(t!==e.participants)throw new Error(`(go.cart.addTour) 'quantities' must sum to 'participants' (${t} !== ${e.participants})`)}}async function Y2(e){if(K2(e),!C.cart)throw new Error("(go.cart.addTour) shop not initialized — call go.init first");const{time:t,...r}=e,n=ot(wp(r),{quantity:1,time:t});return C.cart.addItem(n),n.uuid}var da=null;async function Xo(){if(da)return da;if(!C.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var J2=e=>e.split(".").reduce((t,r)=>t?.[r],Jg);async function Q2(e){const t=e.go;let r=t&&t._queue||[];t&&t._queue&&!t.cart&&console.warn("(go) the pasted go snippet predates go.cart — cart calls cannot be queued before load. Update the snippet or gate on window.go.loaded.");for(const n of r)if(n.method!=="load")try{const i=J2(n.method);if(typeof i!="function")throw new Error(`(go) unknown command: ${n.method}`);await i(n.options)}catch(i){console.error(i)}e.go=Jg,t&&(t._queue=null)}var Jg={loaded:!0,config:e=>{Je.define(e)},init:async e=>{try{da=C.load("https://"+e.api,e.shop,e.locale),await da}catch(t){throw da=null,t}},api:{getCustomer:async()=>(await Xo(),C.asyncFetch(()=>C.getCustomer())),getOrders:async e=>(await Xo(),C.asyncFetch(()=>C.getOrders(e))),getCustomerAddresses:async()=>(await Xo(),C.asyncFetch(()=>C.getCustomerAddresses()))},cart:{addTour:async e=>(await Xo(),Y2(e))}};(async()=>await Q2(window))()})();
75
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){s(a);continue}if(e.external){const l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(o.cycle){s(a);continue}if(o.count>1&&e.reused==="ref"){s(a);continue}}}function Ph(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const l=e.seen.get(o);if(l.ref===null)return;const c=l.def??l.schema,f={...c},u=l.ref;if(l.ref=null,u){n(u);const h=e.seen.get(u),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,f),o._zod.parent===u)for(const m in c)m==="$ref"||m==="allOf"||m in f||delete c[m];if(g.$ref&&h.def)for(const m in c)m==="$ref"||m==="allOf"||m in h.def&&JSON.stringify(c[m])===JSON.stringify(h.def[m])&&delete c[m]}const p=o._zod.parent;if(p&&p!==u){n(p);const h=e.seen.get(p);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:o,jsonSchema:c,path:l.path??[]})};for(const o of[...e.seen.entries()].reverse())n(o[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const a=e.external?.defs??{};for(const o of e.seen.entries()){const l=o[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:eo(t,"input",e.processors),output:eo(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Dt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Dt(n.element,r);if(n.type==="set")return Dt(n.valueType,r);if(n.type==="lazy")return Dt(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Dt(n.innerType,r);if(n.type==="intersection")return Dt(n.left,r)||Dt(n.right,r);if(n.type==="record"||n.type==="map")return Dt(n.keyType,r)||Dt(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Dt(n.in,r)||Dt(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Dt(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Dt(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Dt(i,r))return!0;return!!(n.rest&&Dt(n.rest,r))}return!1}var iS=(e,t={})=>r=>{const n=Dh({...r,processors:t});return _t(e,n),Ih(n,e),Ph(n,e)},eo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},a=Dh({...i??{},target:s,io:t,processors:r});return _t(e,a),Ih(a,e),Ph(a,e)},sS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},aS=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:a,format:o,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof a=="number"&&(i.maxLength=a),o&&(i.format=sS[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const f=[...l];f.length===1?i.pattern=f[0].source:f.length>1&&(i.allOf=[...f.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},oS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:a,format:o,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number";const u=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";u?h?(i.minimum=f,i.exclusiveMinimum=!0):i.exclusiveMinimum=f:typeof s=="number"&&(i.minimum=s),p?h?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof a=="number"&&(i.maximum=a),typeof l=="number"&&(i.multipleOf=l)},lS=(e,t,r,n)=>{r.not={}},uS=(e,t,r,n)=>{},cS=(e,t,r,n)=>{const i=e._zod.def,s=Gf(i.entries);s.every(a=>typeof a=="number")&&(r.type="number"),s.every(a=>typeof a=="string")&&(r.type="string"),r.enum=s},dS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},fS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},hS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=_t(s.element,t,{...n,path:[...n.path,"items"]})},pS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const a=s.shape;for(const c in a)i.properties[c]=_t(a[c],t,{...n,path:[...n.path,"properties",c]});const o=new Set(Object.keys(a)),l=new Set([...o].filter(c=>{const f=s.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(i.required=Array.from(l)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=_t(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},mS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,a=i.options.map((o,l)=>_t(o,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=a:r.anyOf=a},vS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.left,t,{...n,path:[...n.path,"allOf",0]}),a=_t(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...o(s)?s.allOf:[s],...o(a)?a.allOf:[a]]},gS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},yS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},bS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},_S=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},kS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?i.out:i.in:i.out;_t(a,t,n);const o=t.seen.get(e);o.ref=a},SS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},$h=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},ES=G("ZodISODateTime",(e,t)=>{P0.init(e,t),Xe.init(e,t)});function xS(e){return Fk(ES,e)}var TS=G("ZodISODate",(e,t)=>{$0.init(e,t),Xe.init(e,t)});function AS(e){return Nk(TS,e)}var CS=G("ZodISOTime",(e,t)=>{M0.init(e,t),Xe.init(e,t)});function OS(e){return Rk(CS,e)}var DS=G("ZodISODuration",(e,t)=>{F0.init(e,t),Xe.init(e,t)});function IS(e){return Lk(DS,e)}var PS=(e,t)=>{th.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Ew(e,r)},flatten:{value:r=>Sw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,nu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,nu,2)}},isEmpty:{get(){return e.issues.length===0}}})},cr=G("ZodError",PS,{Parent:Error}),$S=lu(cr),MS=uu(cr),FS=Ga(cr),NS=Ka(cr),RS=Aw(cr),LS=Cw(cr),zS=Ow(cr),qS=Dw(cr),US=Iw(cr),VS=Pw(cr),BS=$w(cr),jS=Mw(cr),Mh=new WeakMap;function Ls(e,t,r){const n=Object.getPrototypeOf(e);let i=Mh.get(n);if(i||(i=new Set,Mh.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const a=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const o=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o}),o},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:o})}})}}}var dt=G("ZodType",(e,t)=>(ct.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:eo(e,"input"),output:eo(e,"output")}}),e.toJSONSchema=iS(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>$S(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>FS(e,r,n),e.parseAsync=async(r,n)=>MS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>NS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>RS(e,r,n),e.decode=(r,n)=>LS(e,r,n),e.encodeAsync=async(r,n)=>zS(e,r,n),e.decodeAsync=async(r,n)=>qS(e,r,n),e.safeEncode=(r,n)=>US(e,r,n),e.safeDecode=(r,n)=>VS(e,r,n),e.safeEncodeAsync=async(r,n)=>BS(e,r,n),e.safeDecodeAsync=async(r,n)=>jS(e,r,n),Ls(e,"ZodType",{check(...r){const n=this.def;return this.clone(An(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Cn(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(F1(r,n))},superRefine(r,n){return this.check(N1(r,n))},overwrite(r){return this.check($i(r))},optional(){return Vh(this)},exactOptional(){return S1(this)},nullable(){return Bh(this)},nullish(){return Vh(Bh(this))},nonoptional(r){return O1(this,r)},array(){return qh(this)},or(r){return v1([this,r])},and(r){return y1(this,r)},transform(r){return Zh(this,w1(r))},default(r){return T1(this,r)},prefault(r){return C1(this,r)},catch(r){return I1(this,r)},pipe(r){return Zh(this,r)},readonly(){return M1(this)},describe(r){const n=this.clone();return Rs.add(n,{description:r}),n},meta(...r){if(r.length===0)return Rs.get(this);const n=this.clone();return Rs.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Rs.get(e)?.description},configurable:!0}),e)),Fh=G("_ZodString",(e,t)=>{cu.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>aS(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ls(e,"_ZodString",{regex(...n){return this.check(Bk(...n))},includes(...n){return this.check(Wk(...n))},startsWith(...n){return this.check(Hk(...n))},endsWith(...n){return this.check(Gk(...n))},min(...n){return this.check(Xa(...n))},max(...n){return this.check(Ch(...n))},length(...n){return this.check(Oh(...n))},nonempty(...n){return this.check(Xa(1,...n))},lowercase(n){return this.check(jk(n))},uppercase(n){return this.check(Zk(n))},trim(){return this.check(Yk())},normalize(...n){return this.check(Kk(...n))},toLowerCase(){return this.check(Jk())},toUpperCase(){return this.check(Qk())},slugify(){return this.check(Xk())}})}),ZS=G("ZodString",(e,t)=>{cu.init(e,t),Fh.init(e,t),e.email=r=>e.check(pk(WS,r)),e.url=r=>e.check(bk(HS,r)),e.jwt=r=>e.check(Mk(l1,r)),e.emoji=r=>e.check(_k(GS,r)),e.guid=r=>e.check(Eh(Nh,r)),e.uuid=r=>e.check(mk(to,r)),e.uuidv4=r=>e.check(vk(to,r)),e.uuidv6=r=>e.check(gk(to,r)),e.uuidv7=r=>e.check(yk(to,r)),e.nanoid=r=>e.check(wk(KS,r)),e.guid=r=>e.check(Eh(Nh,r)),e.cuid=r=>e.check(kk(YS,r)),e.cuid2=r=>e.check(Sk(JS,r)),e.ulid=r=>e.check(Ek(QS,r)),e.base64=r=>e.check(Ik(s1,r)),e.base64url=r=>e.check(Pk(a1,r)),e.xid=r=>e.check(xk(XS,r)),e.ksuid=r=>e.check(Tk(e1,r)),e.ipv4=r=>e.check(Ak(t1,r)),e.ipv6=r=>e.check(Ck(r1,r)),e.cidrv4=r=>e.check(Ok(n1,r)),e.cidrv6=r=>e.check(Dk(i1,r)),e.e164=r=>e.check($k(o1,r)),e.datetime=r=>e.check(xS(r)),e.date=r=>e.check(AS(r)),e.time=r=>e.check(OS(r)),e.duration=r=>e.check(IS(r))});function dr(e){return hk(ZS,e)}var Xe=G("ZodStringFormat",(e,t)=>{Je.init(e,t),Fh.init(e,t)}),WS=G("ZodEmail",(e,t)=>{S0.init(e,t),Xe.init(e,t)}),Nh=G("ZodGUID",(e,t)=>{w0.init(e,t),Xe.init(e,t)}),to=G("ZodUUID",(e,t)=>{k0.init(e,t),Xe.init(e,t)}),HS=G("ZodURL",(e,t)=>{E0.init(e,t),Xe.init(e,t)}),GS=G("ZodEmoji",(e,t)=>{x0.init(e,t),Xe.init(e,t)}),KS=G("ZodNanoID",(e,t)=>{T0.init(e,t),Xe.init(e,t)}),YS=G("ZodCUID",(e,t)=>{A0.init(e,t),Xe.init(e,t)}),JS=G("ZodCUID2",(e,t)=>{C0.init(e,t),Xe.init(e,t)}),QS=G("ZodULID",(e,t)=>{O0.init(e,t),Xe.init(e,t)}),XS=G("ZodXID",(e,t)=>{D0.init(e,t),Xe.init(e,t)}),e1=G("ZodKSUID",(e,t)=>{I0.init(e,t),Xe.init(e,t)}),t1=G("ZodIPv4",(e,t)=>{N0.init(e,t),Xe.init(e,t)}),r1=G("ZodIPv6",(e,t)=>{R0.init(e,t),Xe.init(e,t)}),n1=G("ZodCIDRv4",(e,t)=>{L0.init(e,t),Xe.init(e,t)}),i1=G("ZodCIDRv6",(e,t)=>{z0.init(e,t),Xe.init(e,t)}),s1=G("ZodBase64",(e,t)=>{q0.init(e,t),Xe.init(e,t)}),a1=G("ZodBase64URL",(e,t)=>{V0.init(e,t),Xe.init(e,t)}),o1=G("ZodE164",(e,t)=>{B0.init(e,t),Xe.init(e,t)}),l1=G("ZodJWT",(e,t)=>{Z0.init(e,t),Xe.init(e,t)}),Rh=G("ZodNumber",(e,t)=>{dh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>oS(e,n,i,s),Ls(e,"ZodNumber",{gt(n,i){return this.check(Th(n,i))},gte(n,i){return this.check(hu(n,i))},min(n,i){return this.check(hu(n,i))},lt(n,i){return this.check(xh(n,i))},lte(n,i){return this.check(fu(n,i))},max(n,i){return this.check(fu(n,i))},int(n){return this.check(Lh(n))},safe(n){return this.check(Lh(n))},positive(n){return this.check(Th(0,n))},nonnegative(n){return this.check(hu(0,n))},negative(n){return this.check(xh(0,n))},nonpositive(n){return this.check(fu(0,n))},multipleOf(n,i){return this.check(Ah(n,i))},step(n,i){return this.check(Ah(n,i))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function zs(e){return zk(Rh,e)}var u1=G("ZodNumberFormat",(e,t)=>{W0.init(e,t),Rh.init(e,t)});function Lh(e){return qk(u1,e)}var c1=G("ZodUnknown",(e,t)=>{H0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uS(e,r,n,i)});function zh(){return Uk(c1)}var d1=G("ZodNever",(e,t)=>{G0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lS(e,r,n,i)});function f1(e){return Vk(d1,e)}var h1=G("ZodArray",(e,t)=>{K0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hS(e,r,n,i),e.element=t.element,Ls(e,"ZodArray",{min(r,n){return this.check(Xa(r,n))},nonempty(r){return this.check(Xa(1,r))},max(r,n){return this.check(Ch(r,n))},length(r,n){return this.check(Oh(r,n))},unwrap(){return this.element}})});function qh(e,t){return eS(h1,e,t)}var p1=G("ZodObject",(e,t)=>{J0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i),Be(e,"shape",()=>t.shape),Ls(e,"ZodObject",{keyof(){return b1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:zh()})},loose(){return this.clone({...this._zod.def,catchall:zh()})},strict(){return this.clone({...this._zod.def,catchall:f1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return gw(this,r)},safeExtend(r){return yw(this,r)},merge(r){return bw(this,r)},pick(r){return mw(this,r)},omit(r){return vw(this,r)},partial(...r){return _w(Uh,this,r[0])},required(...r){return ww(jh,this,r[0])}})});function pu(e,t){return new p1({type:"object",shape:e??{},...be(t)})}var m1=G("ZodUnion",(e,t)=>{Q0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i),e.options=t.options});function v1(e,t){return new m1({type:"union",options:e,...be(t)})}var g1=G("ZodIntersection",(e,t)=>{X0.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vS(e,r,n,i)});function y1(e,t){return new g1({type:"intersection",left:e,right:t})}var mu=G("ZodEnum",(e,t)=>{ek.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>cS(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{const s={};for(const a of n)if(r.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new mu({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const a of n)if(r.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new mu({...t,checks:[],...be(i),entries:s})}});function b1(e,t){return new mu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var _1=G("ZodTransform",(e,t)=>{tk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Hf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ns(s,r.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Ns(a))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function w1(e){return new _1({type:"transform",transform:e})}var Uh=G("ZodOptional",(e,t)=>{yh.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Vh(e){return new Uh({type:"optional",innerType:e})}var k1=G("ZodExactOptional",(e,t)=>{rk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function S1(e){return new k1({type:"optional",innerType:e})}var E1=G("ZodNullable",(e,t)=>{nk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Bh(e){return new E1({type:"nullable",innerType:e})}var x1=G("ZodDefault",(e,t)=>{ik.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function T1(e,t){return new x1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Qf(t)}})}var A1=G("ZodPrefault",(e,t)=>{sk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_S(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function C1(e,t){return new A1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Qf(t)}})}var jh=G("ZodNonOptional",(e,t)=>{ak.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function O1(e,t){return new jh({type:"nonoptional",innerType:e,...be(t)})}var D1=G("ZodCatch",(e,t)=>{ok.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function I1(e,t){return new D1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var P1=G("ZodPipe",(e,t)=>{lk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kS(e,r,n,i),e.in=t.in,e.out=t.out});function Zh(e,t){return new P1({type:"pipe",in:e,out:t})}var $1=G("ZodReadonly",(e,t)=>{uk.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function M1(e){return new $1({type:"readonly",innerType:e})}var Wh=G("ZodCustom",(e,t)=>{ck.init(e,t),dt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dS(e,r,n,i)});function F1(e,t={}){return tS(Wh,e,t)}function N1(e,t){return rS(e,t)}function R1(e,t={}){const r=new Wh({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...be(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var L1=pu({id:zs(),customer:pu({customer_salutation_id:zs().positive({message:"user.fieldErrors.titleRequire"}),name:dr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:dr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:dr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:dr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:dr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:dr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:dr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:zs().positive().default(60),language_id:zs().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),QF=pu({ticket_sale_id:zs(),start_at:dr().date(),personalizations:qh(L1)});function vu(e,t){return e-t*Math.floor(e/t)}var Hh=1721426;function ro(e,t,r,n){t=gu(e,t);let i=t-1,s=-2;return r<=2?s=0:no(t)&&(s=-1),Hh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function no(e){return e%4===0&&(e%100!==0||e%400===0)}function gu(e,t){return e==="BC"?1-t:t}function z1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var q1={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Mi=class{fromJulianDay(e){let t=e,r=t-Hh,n=Math.floor(r/146097),i=vu(r,146097),s=Math.floor(i/36524),a=vu(i,36524),o=Math.floor(a/1461),l=vu(a,1461),c=Math.floor(l/365),[f,u]=z1(n*400+s*100+o*4+c+(s!==4&&c!==4?1:0)),p=t-ro(f,u,1,1),h=2;t<ro(f,u,3,1)?h=0:no(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new Bs(f,u,g,t-ro(f,u,g,1)+1)}toJulianDay(e){return ro(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return q1[no(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return no(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}},U1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function On(e,t){return t=Jt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function yu(e,t){return t=Jt(t,e.calendar),e=_u(e),t=_u(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function V1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function B1(e,t){return On(e,ei(t))}var j1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Gh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?j1[r]:K1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function Z1(e){return Vr(Date.now(),e)}function ei(e){return Q1(Z1(e))}function Kh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Yh(e,t){return Jh(e)-Jh(t)}function Jh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var bu=null,W1=!1;function Vt(){return bu==null&&(bu=new Intl.DateTimeFormat().resolvedOptions().timeZone),bu}function Qh(){return W1}function _u(e){return e.subtract({days:e.day-1})}function H1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Xh=new Map,wu=new Map;function G1(e){if(Intl.Locale){let r=Xh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Xh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function K1(e){let t=wu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return wu.set(e,t),t.firstDay}let r=G1(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&U1[r]||0};wu.set(e,t)}return t.firstDay}function Dn(e){return e=Jt(e,new Mi),ep(gu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ep(e,t,r,n,i,s,a){let o=new Date;return o.setUTCHours(n,i,s,a),o.setUTCFullYear(e,t-1,r),o.getTime()}function qs(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Qh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:a,second:o}=rp(e,t);return ep(r,n,i,s,a,o,0)-Math.floor(e/1e3)*1e3}var tp=new Map;function rp(e,t){let r=tp.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),tp.set(t,r));let n=r.formatToParts(new Date(e)),i={};for(let s of n)s.type!=="literal"&&(i[s.type]=s.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}var io=864e5;function Y1(e,t){let r=Dn(e);return np(e,t,r-qs(r-io,t),r-qs(r+io,t))}function np(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>J1(e,t,i))}function J1(e,t,r){let n=rp(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Ur(e,t,r="compatible"){let n=In(e);if(t==="UTC")return Dn(n);if(t===Vt()&&r==="compatible"&&!Qh()){n=Jt(n,new Mi);let l=new Date,c=gu(n.era,n.year);return l.setFullYear(c,n.month-1,n.day),l.setHours(n.hour,n.minute,n.second,n.millisecond),l.getTime()}let i=Dn(n),s=qs(i-io,t),a=qs(i+io,t),o=np(n,t,i-s,i-a);if(o.length===1)return o[0];if(o.length>1)switch(r){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-a);case"compatible":case"later":return Math.max(i-s,i-a);case"reject":throw new RangeError("No such absolute time found")}}function ip(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Vr(e,t){let r=qs(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,a=n.getUTCDate(),o=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),f=n.getUTCMilliseconds();return new Pn(i<1?"BC":"AD",i<1?-i+1:i,s,a,t,r,o,l,c,f)}function Q1(e){return new Bs(e.calendar,e.era,e.year,e.month,e.day)}function In(e,t){let r=0,n=0,i=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:i,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:i,millisecond:s}=t),new Fi(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function X1(e){return new hE(e.hour,e.minute,e.second,e.millisecond)}function Jt(e,t){if(V1(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,ti(n),n}function eE(e,t,r){return e instanceof Pn?e.timeZone===t?e:sp(e,t):Vr(Ur(e,t,r),t)}function tE(e){let t=Dn(e)-e.offset;return new Date(t)}function sp(e,t){return Jt(Vr(Dn(e)-e.offset,t),e.calendar)}var Us=36e5;function so(e,t){let r=e.copy(),n="hour"in r?up(r,t):0;ku(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,Su(r),ap(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,rE(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let i=r.calendar.getYearsInEra(r);if(r.year>i){let a=r.calendar.isInverseEra?.(r);r.year=i,r.month=a?1:r.calendar.getMonthsInYear(r),r.day=a?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let s=r.calendar.getMonthsInYear(r);return r.month>s&&(r.month=s,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function ku(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Su(e){for(;e.month<1;)ku(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,ku(e,1)}function rE(e){for(;e.day<1;)e.month--,Su(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Su(e)}function ap(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ti(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ap(e)}function Eu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function op(e,t){return so(e,Eu(t))}function xu(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),ti(r),r}function Vs(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),lp(r),r}function nE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ao(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ao(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ao(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ao(e.hour,24),t}function lp(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ao(e,t){let r=e%t;return r<0&&(r+=t),r}function up(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,nE(e)}function cp(e,t){let r=e.copy();return up(r,t),r}function iE(e,t){return cp(e,Eu(t))}function Tu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),a=s.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=on(a,r,0,s.length-1,n?.round),i.era=s[a],ti(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=on(e.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=on(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=on(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ti(i),i}function Au(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,a=0,o=23;if(n?.hourCycle===12){let l=s>=12;a=l?12:0,o=l?23:11}i.hour=on(s,r,a,o,n?.round);break}case"minute":i.minute=on(e.minute,r,0,59,n?.round);break;case"second":i.second=on(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=on(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function on(e,t,r,n,i=!1){if(i){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function dp(e,t){let r;return t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?r=Ur(so(In(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=Dn(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Jt(Vr(r,e.timeZone),e.calendar)}function sE(e,t){return dp(e,Eu(t))}function aE(e,t,r,n){switch(t){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let g=e.hour>=12;i=g?12:0,s=g?23:11}let a=In(e),o=Jt(Vs(a,{hour:i}),new Mi),l=[Ur(o,e.timeZone,"earlier"),Ur(o,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===o.day)[0],c=Jt(Vs(a,{hour:s}),new Mi),f=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=Dn(e)-e.offset,p=Math.floor(u/Us),h=u%Us;return u=on(p,r,Math.floor(l/Us),Math.floor(f/Us),n?.round)*Us+h,Jt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Au(e,t,r,n);case"era":case"year":case"month":case"day":return Jt(Vr(Ur(Tu(In(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function oE(e,t,r){let n=In(e),i=Vs(xu(n,t),t);return i.compare(n)===0?e:Jt(Vr(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var lE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,uE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,cE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Cu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,dE=["hours","minutes","seconds"],XF=["years","months","weeks","days",...dE];function oo(e){let t=e.match(lE);if(!t)throw Cu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Bs(qe(t[1],0,9999),qe(t[2],1,12),1);return r.day=qe(t[3],1,r.calendar.getDaysInMonth(r)),r}function fp(e){let t=e.match(uE);if(!t)throw Cu.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=qe(t[1],-9999,9999),n=new Fi(r<1?"BC":"AD",r<1?-r+1:r,qe(t[2],1,12),1,t[4]?qe(t[4],0,23):0,t[5]?qe(t[5],0,59):0,t[6]?qe(t[6],0,59):0,t[7]?qe(t[7],0,1/0)*1e3:0);return n.day=qe(t[3],0,n.calendar.getDaysInMonth(n)),n}function hp(e,t){let r=e.match(cE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new Pn(n<1?"BC":"AD",n<1?-n+1:n,qe(r[2],1,12),1,r[11],0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);i.day=qe(r[3],0,i.calendar.getDaysInMonth(i));let s=In(i),a;if(r[8]){let o=qe(r[8],-23,23);if(i.offset=Math.sign(o)*(Math.abs(o)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),a=Dn(i)-i.offset,!Y1(s,i.timeZone).includes(a))throw new Error(`Offset ${gp(i.offset)} is invalid for ${Ou(i)} in ${i.timeZone}`)}else a=Ur(In(s),i.timeZone,t);return Vr(a,i.timeZone)}function pp(e,t){let r=e.match(Cu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new Pn(n<1?"BC":"AD",n<1?-n+1:n,qe(r[2],1,12),1,t,0,r[4]?qe(r[4],0,23):0,r[5]?qe(r[5],0,59):0,r[6]?qe(r[6],0,59):0,r[7]?qe(r[7],0,1/0)*1e3:0);return i.day=qe(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=qe(r[8],-23,23)*36e5+qe(r[9]??"0",0,59)*6e4),sp(i,t)}function qe(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function mp(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function vp(e){let t=Jt(e,new Mi),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Ou(e){return`${vp(e)}T${mp(e)}`}function gp(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),s=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function fE(e){return`${Ou(e)}${gp(e.offset)}[${e.timeZone}]`}function Du(e){let t=typeof e[0]=="object"?e.shift():new Mi,r;if(typeof e[0]=="string")r=e.shift();else{let a=t.getEras();r=a[a.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Bs=class fd{#e;constructor(...t){let[r,n,i,s,a]=Du(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,ti(this)}copy(){return this.era?new fd(this.calendar,this.era,this.year,this.month,this.day):new fd(this.calendar,this.year,this.month,this.day)}add(t){return so(this,t)}subtract(t){return op(this,t)}set(t){return xu(this,t)}cycle(t,r,n){return Tu(this,t,r,n)}toDate(t){return ip(this,t)}toString(){return vp(this)}compare(t){return Kh(this,t)}},hE=class fy{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,lp(this)}copy(){return new fy(this.hour,this.minute,this.second,this.millisecond)}add(t){return cp(this,t)}subtract(t){return iE(this,t)}set(t){return Vs(this,t)}cycle(t,r,n){return Au(this,t,r,n)}toString(){return mp(this)}compare(t){return Yh(this,t)}},Fi=class hd{#e;constructor(...t){let[r,n,i,s,a]=Du(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ti(this)}copy(){return this.era?new hd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return so(this,t)}subtract(t){return op(this,t)}set(t){return xu(Vs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Tu(this,t,r,n);default:return Au(this,t,r,n)}}toDate(t,r){return ip(this,t,r)}toString(){return Ou(this)}compare(t){let r=Kh(this,t);return r===0?Yh(this,In(t)):r}},Pn=class pd{#e;constructor(...t){let[r,n,i,s,a]=Du(t),o=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=a,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ti(this)}copy(){return this.era?new pd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new pd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return dp(this,t)}subtract(t){return sE(this,t)}set(t,r){return oE(this,t,r)}cycle(t,r,n){return aE(this,t,r,n)}toDate(){return tE(this)}toString(){return fE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-eE(t,this.timeZone).toDate().getTime()}},Iu=new Map,kr=class{constructor(e,t={}){this.formatter=yp(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return vE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=gE(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}},pE={true:{ja:"h11"},false:{}};function yp(e,t={}){if(typeof t.hour12=="boolean"&&mE()){t={...t};let i=pE[String(t.hour12)][e.split("-")[0]],s=t.hour12?"h12":"h23";t.hourCycle=i??s,delete t.hour12}let r=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(Iu.has(r))return Iu.get(r);let n=new Intl.DateTimeFormat(e,t);return Iu.set(r,n),n}var Pu=null;function mE(){return Pu==null&&(Pu=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Pu}var $u=null;function vE(){return $u==null&&($u=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),$u}function gE(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=yp(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(s=>s.type==="hour").value,10),i=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(s=>s.type==="hour").value,10);if(n===0&&i===23)return"h23";if(n===24&&i===23)return"h24";if(n===0&&i===11)return"h11";if(n===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function ri(e){return X1(pp(e,"Europe/Berlin")).toString().slice(0,-3)}function ni(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=pp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function js(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function Mu(e){return e?.type==="Ticket"}function Br(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function Zs(e){return Object.entries(e.sub_tickets??{}).map(([t,r])=>({id:Number(t),title:r?.title??"",description:r?.description??null,min_persons:r?.min_persons??0,max_persons:r?.max_persons??0}))}function lo(e,t){return{...e,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0,content:void 0}}function $n(e,t=""){return iw(Object.values(e).map(r=>lo(r,{selectedTime:t})),r=>r.shop_order)}function Mn(e,t=""){let r=Object.entries(e);return t!==""&&(r=r.filter(([,n])=>n.total_capacities?.[t]&&n.total_capacities[t]>0)),Object.fromEntries(r)}var bp=e=>qr(Object.values(e.mantle?.composition??{}));function yE(e){const t=e.quantity??0;return Br(e.product)?t*bp(e):t}function Fu(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!Mu(s.product))continue;const a=yE(s);s===n&&(i=a),e.addPrecartItemQuantity(s.product.id,a)}return i}var bE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Mu(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,a=Fu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:l===0}},_E=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Br(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,a=Fu(s,t,n,r),o=s.ticketCapacity(i.id,i.selectedTime,a),l=s.totalCapacity(i.id,i.selectedTime),c=bp(r),f=c>1?Math.floor(o/c):o;return{max:Math.min(i.max_persons||100,f),min:i.min_persons||0,bookedOut:f===0,unavailable:l===0}},wE=e=>Object.fromEntries(Zs(e).map(t=>[t.id,t.max_persons]));function kE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Br(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let a=1/0;return s>0&&(Fu(e.quotaManager,t,n,r),a=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(Zs(i).map(o=>[o.id,Math.min(o.max_persons,(r.mantle?.composition?.[o.id]??0)+a)]))}function uo(e){return e?.type==="Event"}function SE(e){return uo(e)&&e.subtype==="scale"}function EE(e,t,r){const n={type:"Event",id:t,tax_included:!0,...e};if(r?.date){const i=r.date;r.date_title=i.title||"",r.date_description=i.description||"",r.event_title=i.event_title||"",r.event_subtitle=i.event_sub_title||"",r.price_title=e.title||"",r.price_description=e.description||""}return{dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function Nu(e,t,r){return EE(e,t,r)}var xE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!uo(r.product))throw new Error("(getMaxQuantitySeats) impossible");const i=r.product.dateId,s=e.allSeats[i];if(!s)return console.error("(getMaxQuantity) no seats found for dateId",i),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(s.max||100,s.max_per_registration||100,s.available??100),o={max_per_registration:a,available:100,overbook:!1,...s};let l=a;o.overbook&&(l=Math.min(o.max||100,o.max_per_registration||100));const c=n.totalQuantity,f=qr(t.items.filter(p=>n.items.some(h=>h.uuid===p.uuid)),p=>p.quantity),u=Math.max(l-f-c+r.quantity,0);return{max:u,min:o.min??0,unavailable:o.available===0,bookedOut:u===0}},TE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function AE(e){return{apiData:e,_timeslots:[],addQuotas(t){this._timeslots=[],this.apiData={...this.apiData,...t}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(t,r){this.precart[t]=r,this._timeslots=[]},addPrecartItemQuantity(t,r){this.precart[t]=(this.precart[t]??0)+r,this._timeslots=[]},getPrecartItemQuantity(t){return this.precart[t]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([t,r])=>Object.keys(r.capacities).map(n=>{const i=qr(r.ticket_ids.map(s=>this.getPrecartItemQuantity(s)));return{timeSlot:n,quota:t,capacity:r.capacities[n]-i,tickets:r.ticket_ids,totalCapacity:r.total_capacities[n]}}))),this._timeslots},filterBy({timeslot:t,ticketId:r,date:n}={}){let i=this.timeslots();return r&&(i=i.filter(s=>s.tickets.includes(r))),t&&(i=i.filter(s=>s.timeSlot===t)),n&&(i=i.filter(s=>s.timeSlot.startsWith(n))),i.flatMap(s=>s.tickets.map(a=>({timeslot:t,ticket:a,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=ru(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return ru(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t,r){let n=this.timeslots().filter(s=>s.timeSlot.startsWith(t.toString()));r&&(n=n.filter(s=>s.tickets.some(a=>r.includes(a))));const i=nw(n,s=>s.timeSlot);return Object.values(i).map(s=>sw(aw(s.flatMap(a=>a.tickets)).map(a=>ru(s.filter(o=>o.tickets.includes(a)),o=>o.capacity)).filter(a=>a!==null),a=>a.capacity)??s[0]).sort((s,a)=>s.timeSlot.localeCompare(a.timeSlot))}}}function CE(e){let t=0;Es(()=>{ve(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function _p(e){return e?.type==="Tour"}function wp(e,t){return{...e,type:"Tour",description:"",price_cents:e.totalPriceCents,tax_included:!0,vat_pct:0,instanceKey:t?.instanceKey??crypto.randomUUID(),wire:OE(e)}}function OE(e){const t={language_id:e.languageId};return e.quantities?t.quantities=e.quantities:t.quantity=e.participants,e.gradeId!=null&&(t.grade_id=e.gradeId),e.ageGroupId!=null&&(t.age_group_id=e.ageGroupId),e.surcharges&&(t.surcharges=e.surcharges),e.equipment&&(t.equipment=e.equipment),e.attendees&&(t.attendees=e.attendees),e.customs&&(t.customs=e.customs),t}function DE(e){const{type:t,description:r,price_cents:n,tax_included:i,vat_pct:s,instanceKey:a,wire:o,...l}=e;return wp({...l,totalPriceCents:n},{instanceKey:a})}var IE=0;function ot(e,t){const r={quantity:0,time:"",...t??{}};return Br(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(Zs(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${IE++}`}),{...r,type:e.type,product:e,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id,uuid:this.uuid};switch(e.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity,...Br(this.product)&&this.mantle?{sub_ticket_quantities:this.mantle.composition}:{}};case"Event":switch(e.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}case"Coupon":return{...n,quantity:this.quantity};case"Tour":return{...n,start_time:this.time,...e.wire};default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),SE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),_p(this.product)&&n.push(`tour: ${this.product.instanceKey}`),this.display?.discounted&&n.push("discounted"),Br(this.product)&&this.mantle?.key&&n.push(`mantle_key: ${this.mantle.key}`),this.voucher?.code&&n.push(`voucher_code: ${this.voucher.code}`),n.length>0?` (${n.join(", ")})`:""},toString(){return this.uuid+":"+this.quantity},get price_cents(){return this.time&&this.product.dynamic_prices?.[this.time]!=null?this.product.dynamic_prices[this.time]:this.product.price_cents},get price_formatted(){return fr(this.price_cents)},get final_price_cents(){const n=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*n},get final_price_formatted(){return fr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return fr(this.total_price_cents)}}}var eN=15*6e4;function co(){return typeof window<"u"&&typeof localStorage<"u"}function PE(e,t){if(co())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Ru(e){if(!co())return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`Failed to load from localStorage (${e}):`,t),null}}function kp(e){if(co())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function Sp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var Ep="go-cart",fo=(e,t)=>localStorage.setItem(Ep,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function $E(e){const t=e.product.type;switch(t){case"Ticket":return Lu(e)?ot(lo(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle,voucher:e.voucher}):void 0;case"Event":return Lu(e)?ot(Nu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Tour":return Lu(e)?ot(DE(e.product),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return ot(Sp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function ME(e){let t=[],r=[],n;try{const i=localStorage.getItem(Ep);if(!i)return[];const s=JSON.parse(i);if(Array.isArray(s))t=s,r=[];else if(typeof s=="object"&&s!==null)t=s.items||[],r=s.coupons||[],n=s.savedAt;else throw console.dir({parsed:s,content:i}),new Error("go-cart has invalid format");return n&&Date.now()-n>9e5?(e.clearItems(),e.clearCoupons(),fo([],[]),[]):(t.length===0?e.clearItems():e.items=t.map($E).filter(LE),e.clearCoupons(),r.forEach(a=>e.addCoupon(typeof a=="string"?{code:a,kind:"actionToken"}:a)),e.items)}catch(i){return console.error(i),fo([],[]),[]}}function FE(e){ME(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});fo(e.items||[],e.coupons||[]),Es(()=>{ve(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,fo(e.items||[],e.coupons||[]))})})}var NE=e=>new Date<new Date(e),RE=e=>oo(e.slice(0,10)).compare(ei(Vt()))>=0,Lu=e=>e.time?e.product.subtype==="day"?RE(e.time):NE(e.time):!0,LE=e=>e!==void 0,zE=0;function Ni(e,t=20){const r={items:Pe([]),coupons:Pe([]),paymentModeId:void 0,uid:`cart-${zE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,qr(this.items,n=>n.total_price_cents))},get totalQuantity(){return qr(this.items,n=>n.quantity)},get valueVoucherCents(){return qr(this.coupons.filter(n=>n.kind==="valueVoucher"),n=>n.valueCents??0)},get amountToPayCents(){return Math.max(0,this.totalPriceCents-this.valueVoucherCents)},toString(){return this.uid+" > ["+this.items.map(n=>n.uuid+":"+n.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(n=>({type:n.type,attributes:n.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??C.settings?.defaultPaymentModeId,coupons:this.coupons.map(n=>n.code),donations:[],affiliate:{},total:this.amountToPayCents}},get totalFormatted(){return fr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(n){for(let i=this.items.length-1;i>=0;i--)this.items[i].uuid===n.uuid&&this.items.splice(i,1);n?.voucher?.code&&!this.items.some(i=>i.voucher?.code===n.voucher.code)&&this.removeCoupon(n.voucher.code)},addItem(n){const i=this.items.find(s=>s.uuid===n.uuid);i?i.quantity+=n.quantity:this.items.push(n)},addItems(n){n.forEach(i=>this.addItem(i))},addCoupon(n){const i={...n,code:n.code.toUpperCase()};this.coupons.some(s=>s.code===i.code)||this.coupons.push(i)},removeCoupon(n){const i=n.toUpperCase(),s=this.coupons.findIndex(a=>a.code===i);if(s>-1){const[a]=this.coupons.splice(s,1);if(a.kind==="serviceVoucher")for(let o=this.items.length-1;o>=0;o--)this.items[o].voucher?.code===i&&this.items.splice(o,1)}},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(n=>r.addItem(ot(n))),r}function fr(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function qE(){const e=Pe(Ni());return FE(e),CE(e),e}var Ri="go-capacity";function xp(e,t){const r=Ru(Ri);PE(Ri,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function Tp(e){const t=Ru(Ri);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){kp(Ri);return}if(t.allSeats)for(const r in t.allSeats){const n=parseInt(r);e.addSeats(n,t.allSeats[n],!1)}t.allQuotas&&e.addQuotas(t.allQuotas,!1)}}function UE(e){co()&&window.addEventListener("storage",t=>{if(t.key===Ri&&Tp(e),t.key==="go-cart"){const r=Ru("go-cart");(!r||!r.items||r.items.length===0)&&kp(Ri)}})}function Ap(){const e={allSeats:{},allQuotas:{},quotaManager:AE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&xp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&xp(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product,i=n.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return Br(n)?"mantle":"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}case"Event":const s=t.product.subtype;switch(s){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${s}`)}case"Coupon":return"unlimited";case"Tour":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:bE,mantle:_E,seats:xE,unlimited:TE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Le(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Br(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Le(()=>i==="mantle"?kE(this,t,r,n):wE(r.product))}};return Tp(e),UE(e),e}function Cp(e){if(typeof document>"u"||!e)return;const t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){const r=t.pop()?.split(";").shift();return r?decodeURIComponent(r):void 0}}var Op=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},VE=class extends Op{constructor(){super()}get isLoggedIn(){try{const e=Cp("auth_headers");if(!e)return!1;const t=JSON.parse(e),r=Math.floor(Date.now()/1e3);return!t["access-token"]||parseInt(t.expiry,10)<r?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=Cp("auth_headers");if(!e)return!0;const t=JSON.parse(e);return typeof t.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.uid)}catch{return!0}}},BE=class extends Op{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},jE=e=>{switch(e){case"angular":return new VE;case"jmb":return new BE;default:throw new Error("Unhandled shop type: "+e)}};function ZE(e){return e==null||typeof e=="string"&&e.trim()===""}function WE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||ZE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function HE(e,t){return WE(e,t)}var GE={withStackTrace:!1},Dp=(e,t,r=GE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ii(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(f){try{c(n.next(f))}catch(u){a(u)}}function l(f){try{c(n.throw(f))}catch(u){a(u)}}function c(f){f.done?s(f.value):i(f.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Ip(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function Pp(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(h){return function(g){return Promise.resolve(g).then(h,u)}}function o(h,g){n[h]&&(i[h]=function(m){return new Promise(function(v,y){s.push([h,m,v,y])>1||l(h,m)})},g&&(i[h]=g(i[h])))}function l(h,g){try{c(n[h](g))}catch(m){p(s[0][3],m)}}function c(h){h.value instanceof jr?Promise.resolve(h.value.v).then(f,u):p(s[0][2],h)}function f(h){l("next",h)}function u(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function KE(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:jr(e[i](a)),done:!1}:s?s(a):a}:s}}function YE(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ip=="function"?Ip(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,l){a=e[s](a),i(o,l,a.done,a.value)})}}function i(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}var si=class yr{constructor(t){this._promise=t}static fromSafePromise(t){return new yr(t.then(r=>new Wr(r)))}static fromPromise(t,r){return new yr(t.then(n=>new Wr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new yr(ii(this,void 0,void 0,function*(){try{return new Wr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return JE(t)}static combineWithAllErrors(t){return QE(t)}map(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Wr(yield t(r.value))})))}andThrough(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);const n=yield t(r.value);return n.isErr()?new Sr(n.error):new Wr(r.value)})))}andTee(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Wr(r.value)})))}orTee(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){if(r.isOk())return new Wr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isOk()?new Wr(r.value):new Sr(yield t(r.error))})))}andThen(t){return new yr(this._promise.then(r=>{if(r.isErr())return new Sr(r.error);const n=t(r.value);return n instanceof yr?n._promise:n}))}orElse(t){return new yr(this._promise.then(r=>ii(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Wr(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Pp(this,arguments,function*(){return yield jr(yield jr(yield*KE(YE(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Pp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(ho(r.error))),yield jr(r.value)})}};function ho(e){return new si(Promise.resolve(new Sr(e)))}var tN=si.fromPromise,rN=si.fromSafePromise,nN=si.fromThrowable,$p=e=>{let t=Fn([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},JE=e=>si.fromSafePromise(Promise.all(e)).andThen($p),Mp=e=>{let t=Fn([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=Zr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},QE=e=>si.fromSafePromise(Promise.all(e)).andThen(Mp),zu;(function(e){function t(i,s){return(...a)=>{try{return Fn(i(...a))}catch(o){return Zr(s?s(o):o)}}}e.fromThrowable=t;function r(i){return $p(i)}e.combine=r;function n(i){return Mp(i)}e.combineWithAllErrors=n})(zu||(zu={}));function Fn(e){return new Wr(e)}function Zr(e){return new Sr(e)}var Wr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Fn(e(this.value))}mapErr(e){return Fn(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(t=>this.value)}andTee(e){try{e(this.value)}catch{}return Fn(this.value)}orTee(e){return Fn(this.value)}orElse(e){return Fn(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return si.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Dp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},Sr=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Zr(this.error)}mapErr(e){return Zr(e(this.error))}andThrough(e){return Zr(this.error)}andTee(e){return Zr(this.error)}orTee(e){try{e(this.error)}catch{}return Zr(this.error)}andThen(e){return Zr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return ho(this.error)}asyncAndThrough(e){return ho(this.error)}asyncMap(e){return ho(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Zr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Dp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},iN=zu.fromThrowable,XE=/\{[^{}]+\}/g,ex=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function tx(){return Math.random().toString(36).slice(2,11)}function rx(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:a,headers:o,requestInitExt:l=void 0,...c}={...e};l=ex()?l:void 0,t=zp(t);const f=[];async function u(p,h){const{baseUrl:g,fetch:m=n,Request:v=r,headers:y,params:x={},parseAs:k="json",querySerializer:T,bodySerializer:S=s??ix,pathSerializer:O,body:P,middleware:R=[],...j}=h||{};let N=t;g&&(N=zp(g)??t);let B=typeof i=="function"?i:Rp(i);T&&(B=typeof T=="function"?T:Rp({...typeof i=="object"?i:{},...T}));const U=O||a||nx,oe=P===void 0?void 0:S(P,Lp(o,y,x.header)),he=Lp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},o,y,x.header),J=[...f,...R],ae={redirect:"follow",...c,...j,body:oe,headers:he};let ee,de,ue=new v(sx(p,{baseUrl:N,params:x,querySerializer:B,pathSerializer:U}),ae),H;for(const F in j)F in ue||(ue[F]=j[F]);if(J.length){ee=tx(),de=Object.freeze({baseUrl:N,fetch:m,parseAs:k,querySerializer:B,bodySerializer:S,pathSerializer:U});for(const F of J)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const fe=await F.onRequest({request:ue,schemaPath:p,params:x,options:de,id:ee});if(fe)if(fe instanceof v)ue=fe;else if(fe instanceof Response){H=fe;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!H){try{H=await m(ue,l)}catch(F){let fe=F;if(J.length)for(let q=J.length-1;q>=0;q--){const ke=J[q];if(ke&&typeof ke=="object"&&typeof ke.onError=="function"){const K=await ke.onError({request:ue,error:fe,schemaPath:p,params:x,options:de,id:ee});if(K){if(K instanceof Response){fe=void 0,H=K;break}if(K instanceof Error){fe=K;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(fe)throw fe}if(J.length)for(let F=J.length-1;F>=0;F--){const fe=J[F];if(fe&&typeof fe=="object"&&typeof fe.onResponse=="function"){const q=await fe.onResponse({request:ue,response:H,schemaPath:p,params:x,options:de,id:ee});if(q){if(!(q instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");H=q}}}}const ie=H.headers.get("Content-Length");if(H.status===204||ue.method==="HEAD"||ie==="0"&&!H.headers.get("Transfer-Encoding")?.includes("chunked"))return H.ok?{data:void 0,response:H}:{error:void 0,response:H};if(H.ok)return{data:await(async()=>{if(k==="stream")return H.body;if(k==="json"&&!ie){const fe=await H.text();return fe?JSON.parse(fe):void 0}return await H[k]()})(),response:H};let ce=await H.text();try{ce=JSON.parse(ce)}catch{}return{error:ce,response:H}}return{request(p,h,g){return u(h,{...g,method:p.toUpperCase()})},GET(p,h){return u(p,{...h,method:"GET"})},PUT(p,h){return u(p,{...h,method:"PUT"})},POST(p,h){return u(p,{...h,method:"POST"})},DELETE(p,h){return u(p,{...h,method:"DELETE"})},OPTIONS(p,h){return u(p,{...h,method:"OPTIONS"})},HEAD(p,h){return u(p,{...h,method:"HEAD"})},PATCH(p,h){return u(p,{...h,method:"PATCH"})},TRACE(p,h){return u(p,{...h,method:"TRACE"})},use(...p){for(const h of p)if(h){if(typeof h!="object"||!("onRequest"in h||"onResponse"in h||"onError"in h))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");f.push(h)}},eject(...p){for(const h of p){const g=f.indexOf(h);g!==-1&&f.splice(g,1)}}}}function po(e,t,r){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function Fp(e,t,r){if(!t||typeof t!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const o in t)n.push(o,r.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const a=n.join(",");switch(r.style){case"form":return`${e}=${a}`;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return a}}for(const a in t){const o=r.style==="deepObject"?`${e}[${a}]`:a;n.push(po(o,t[a],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Np(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",a=(r.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(s);switch(r.style){case"simple":return a;case"label":return`.${a}`;case"matrix":return`;${e}=${a}`;default:return`${e}=${a}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of t)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(po(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Rp(e){return function(r){const n=[];if(r&&typeof r=="object")for(const i in r){const s=r[i];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;n.push(Np(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Fp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(po(i,s,e))}}return n.join("&")}}function nx(e,t){let r=e;for(const n of e.match(XE)??[]){let i=n.substring(1,n.length-1),s=!1,a="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(a="label",i=i.substring(1)):i.startsWith(";")&&(a="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){r=r.replace(n,Np(i,o,{style:a,explode:s}));continue}if(typeof o=="object"){r=r.replace(n,Fp(i,o,{style:a,explode:s}));continue}if(a==="matrix"){r=r.replace(n,`;${po(i,o)}`);continue}r=r.replace(n,a==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return r}function ix(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function sx(e,t){let r=`${t.baseUrl}${e}`;t.params?.path&&(r=t.pathSerializer(r,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function Lp(...e){const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n)if(s===null)t.delete(i);else if(Array.isArray(s))for(const a of s)t.append(i,a);else s!==void 0&&t.set(i,s)}return t}function zp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function ax(e,t){return rx({baseUrl:e,headers:{"X-Shop-Url":t}})}var ox="/api/v4/calendar",lx="/api/v4/tickets/calendar",ux="/api/v4/auth/validate_token",cx="/api/v4/tickets/list_and_quotas",dx="/api/v4/tickets",fx="/api/v4/auth/sign_in",hx="/api/v4/auth",px="/api/v4/orders/withdrawals",mx="/api/v4/customer/memberships/activate",vx="/api/v4/orders",gx="/api/v4/customer/customer_addresses",yx="/api/v4/customer/memberships",qp={SHOP_GUEST:10,SHOP:20},mo={error:{success:!1,errors:["Not signed in"]}},bx=class{type;#e=se(Pe({customerSalutations:[],countries:[],locales:[]}));#t={};constructor(e,t,r,n="angular"){this.type=n,e&&t&&r&&this.load(e,t,r,n)}async load(e,t,r,n="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),d(this.#e).urls=Y_(this.type),d(this.#e).currentUser=jE(this.type),d(this.#e).apiUrl=e,d(this.#e).shopDomain=t,d(this.#e).locale=r||"de",this.#t={},d(this.#e).client=ax(e,t),d(this.#e).capacityManager=Ap(),d(this.#e).cart=qE(),d(this.#e).auth=new Zf,d(this.#e).client.use(new lw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return d(this.#e).capacityManager||(d(this.#e).capacityManager=Ap()),d(this.#e).capacityManager}get cart(){return d(this.#e).cart}get auth(){return d(this.#e).auth||(d(this.#e).auth=new Zf),d(this.#e).auth}get currentUser(){return d(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return d(this.#e).client}get name(){return this.shop?.name}get config(){return this.shop?.config}get payment_modes(){return this.shop?.payment_modes}get content(){return this.shop?.content}get settings(){return this.shop?.settings}get donations(){return this.shop?.config.donations}get translations(){return this.shop?.translations}get currency(){return this.shop?.config.currency}t(e,t){return this.translate(e,t)}translate(e,t){if(!this.translations?.[e])return e;let r=this.translations[e];if(t&&r)for(const[n,i]of Object.entries(t))r=r.replace(`{{${n}}}`,i);return r||""}get apiUrl(){return d(this.#e).apiUrl}get shopDomain(){return d(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return d(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return d(this.#e)}getCustomer(){return this.auth.data.accessToken?this.fetchAndCache(ux,"getCustomer","",{cache:5}):mo}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(vx,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):mo}getCustomerAddresses(){return this.auth.data.accessToken?this.fetchAndCache(gx,"customerAddresses","",{cache:5}):mo}getCustomerMemberships(){return this.auth.data.accessToken?this.fetchAndCache(yx,"customerMemberships","",{cache:5}):mo}ticketsCalendar(e){return this.fetchAndCache(lx,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(ox,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(cx,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:xt({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(dx,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:xt({per_page:100},e??{})})}ticketsContent(e){return this.fetchAndCache("/api/v4/tickets/content",`ticketsContent-${JSON.stringify(e)}`,"data",{cache:300,query:xt({"ticket_ids[]":e},{per_page:100})})}signIn(e){return this.apiPost(fx,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=xt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?qp.SHOP_GUEST:qp.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(hx,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(px,{body:t,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query:xt({per_page:100},e),cache:60})}updatePassword(e){return this.apiPut("/api/v4/auth/password",{body:e,requiredFields:["current_password","password","password_confirmation"]})}passwordReset(e){return this.apiPost("/api/v4/auth/password",{body:e,requiredFields:["email"]})}activateMembership(e){return this.apiPost(mx,{body:e,requiredFields:["email"],parseAs:"text"})}checkout(e){return this.apiPost("/api/v4/orders",{body:e,requiredFields:["items","total"]})}#r=null;async createCart(e){const t=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===t)return this.#r.result;const r=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:t,result:r},r}order(e){return this.fetchAndCache("/api/v4/orders/{id}",`order-${e}`,"order",{path:{id:e}})}annualOrder(e){return this.fetchAndCache("/api/v4/annual/order",`annual-order-${e}`,"order",{query:{token:e}})}finalizePersonalizations(e,t){return this.apiPost("/api/v4/annual/personalization/finalize",{body:t,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,t,r){const n=new FormData;return n.append("file",r),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:n,params:{path:{id:t},query:{token:e}}})}fetchAndCache(e,t,r,n){if(n??={},n.query??={},n.cache??=1e3,n.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),d(this.#e)[t];const i=n.query,s=e+JSON.stringify(i),a=!this.#t[s],o=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(a||o)&&this.apiGet(e,i,n.path).then(l=>{l&&(d(this.#e)[t]=r===""?l:l[r])}),d(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums",{query:{per_page:100}})}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions",{query:{per_page:100}})}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,t){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:t},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale",{cache:0})}getCoupons(){return this.fetchAndCache("/api/v4/coupons","coupons","coupons",{query:{online_available:!0,per_page:100}})}getEventDetailsOnDate(e,t){return this.fetchAndCache(`/api/v4/events/${e}/dates/${t}`,`/api/v4/events/${e}/dates/${t}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events",{query:{per_page:100}})}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1,per_page:100}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours",{query:{per_page:100}})}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises",{query:{per_page:100}})}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries",{query:{per_page:100}})}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return d(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,t){return this.apiCall(e,{method:"POST",...t})}async apiPut(e,t){return this.apiCall(e,{method:"PUT",...t})}async apiDELETE(e,t){return this.apiCall(e,{method:"DELETE",...t})}async apiUpload(e,t){this.#s();const{body:r,params:n={}}=t;return await this.client.POST(e,{body:r,params:xt(this.#n,{params:n}).params,bodySerializer:i=>i})}async apiCall(e,t){this.#s();const{body:r,params:n={},requiredFields:i,parseAs:s}=t,a=HE(r,i);if(Object.keys(a).length>0)return{error:{errors:a}};const o=this.client[t.method];return await o(e,{body:r,params:xt(this.#n,{params:n}).params,parseAs:s})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(t=>t.status==="fetching").length;)await X_(10)}async apiGet(e,t={},r){this.#s();const n=e+JSON.stringify(t);this.#t[n]={status:"fetching",fetchedAt:Date.now()};let i=this.#n;t&&(i=xt(i,{params:{query:t}})),e&&(i=xt(i,{params:{path:r}}));const s=await this.client.GET(e,i);return this.#t[n]={status:"completed",fetchedAt:Date.now()},s.data||s}#i=()=>this.apiUrl!==void 0&&this.shopDomain!==void 0&&this.locale!==void 0&&this.client!==void 0;#s=()=>{if(this.apiUrl===void 0)throw new Error("Public API URL is not set");if(this.shopDomain===void 0)throw new Error("Shop Domain (X-Shop-Url) is not set");if(this.locale===void 0)throw new Error("Locale is not set");if(this.client===void 0)throw new Error("client is not set");if(!this.#i())throw new Error("Fetch is not possible.")}},C=new bx;function Li(e){return function(t,r){if(t)t.addEventListener(e,n=>{n.stopPropagation(),n.detail.value=r});else throw new Error("(createSetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var _x=class hy{host;KEY;pollDuration;#e=se(Pe({value:void 0}));error=!1;constructor(t,r,n=1e3){this.host=t,this.KEY=r,this.pollDuration=n}static static(t){const r=new hy(null,null);return r.value=t,r}load(){eu(()=>(this.host.dispatchEvent(new CustomEvent(this.KEY,{detail:this,bubbles:!0})),this.value),this.pollDuration).then(()=>{},()=>{this.error=!0,console.warn("(createGetDetails) could not load data for:",this.KEY)})}get value(){return d(this.#e).value}set value(t){d(this.#e).value=t}};function zi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new _x(t,e,r.pollDuration);return n.load(r.pollDuration),n}else throw new Error("(createGetDetails) Host is undefined, You are probably trying to use this in a non-web-component context.")}}var wx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},kx=class{defaultConfig=xt(wx,window.customOptions);override=this.defaultConfig;#e=se(Pe(this.defaultConfig));get options(){return d(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=xt(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((t,r)=>(t[r]={...this.defaultConfig.forms[r],...this.override.forms[r]},t),{}),this.options=e}get config(){return this.options}define(e){return this.override=xt(this.override,e),this.update(),this}default(e){return this.defaultConfig=xt(this.defaultConfig,e),this.update(),this}},Qe=new kx,Up=class{#e=se();get token(){return d(this.#e)}set token(e){M(this.#e,e,!0)}#t=se();get ticketSaleId(){return d(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){if(this.token)return ml(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return ml(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Qe.config.urls.annualTicketPersonalizationForm?Qe.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Vp="go-annual-ticket-personalization",Bp=Li(Vp),Sx=zi(Vp),Ex=V("<li><a> </a></li>"),xx=V('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function Tx(e,t){te(t,!0);let r=_(t,"token",7);const n=new Up;Bp(t.$$host,n),ve(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),b()}},a=X(),o=z(a),l=c=>{var f=X(),u=z(f);Fe(u,17,()=>d(i).ticket_sales,p=>p.id,(p,h)=>{var g=xx(),m=$(g),v=$(m,!0);I(m);var y=W(m,2),x=$(y,!0);I(y);var k=W(y,2),T=S=>{var O=Ex(),P=$(O),R=$(P,!0);I(P),I(O),Q((j,N)=>{me(P,"href",j),Y(R,N)},[()=>n.goToPersonalization(d(h)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),E(S,O)};le(k,S=>{d(h).status=="not_ready_to_send"&&S(T)}),I(g),Q(S=>{me(g,"data-ticket-sale-id",d(h).id),Y(v,d(h).title),Y(x,S)},[()=>C.t("ticket.annual.personalization.detail.title",{count:d(h).personalizations.length})]),E(p,g)}),E(c,f)};return le(o,c=>{d(i)&&c(l)}),E(e,a),re(s)}customElements.define("go-annual-ticket-personalization",ne(Tx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var Ax={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>C.customerSalutations.map(e=>({label:e.salutation,value:e.id}))},firstName:{key:"firstName",apiKey:"name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},lastName:{key:"lastName",apiKey:"surname",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},email:{key:"email",apiKey:"email",type:"email",label:"user.registration.form.email",placeholder:"",description:"",autocomplete:"email",validator:dr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:dr().email("user.fieldErrors.emailValid")},password:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},currentPassword:{key:"current_password",apiKey:"current_password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"current-password"},newPassword:{key:"password",apiKey:"password",type:"password",label:"user.registration.form.password",placeholder:"",description:"",autocomplete:"new-password",validator:dr().min(6,"user.fieldErrors.passwordTooShort")},confirmPassword:{key:"confirmPassword",apiKey:"password_confirmation",type:"password",label:"user.registration.form.confirmPassword",placeholder:"",description:"",autocomplete:"new-password"},addressee:{key:"addressee",apiKey:"addr_addressat",type:"text",label:"user.registration.form.adressat",placeholder:"",description:"",autocomplete:"name"},street:{key:"street",apiKey:"addr_street",type:"text",label:"user.registration.form.street",placeholder:"",description:"",autocomplete:"street-address"},postcode:{key:"postcode",apiKey:"addr_zip",type:"text",label:"user.registration.form.plz",placeholder:"",description:"",autocomplete:"postal-code"},city:{key:"city",apiKey:"addr_city",type:"text",label:"user.registration.form.city",placeholder:"",description:"",autocomplete:"address-level2"},country:{key:"country",apiKey:"addr_country_id",type:"select",label:"user.registration.form.country",placeholder:"",description:"",autocomplete:"country",options:()=>C.countries.map(e=>({label:e.name,value:e.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>C.locales.map(e=>({label:C.t(`languages.${e.locale}`),value:e.id}))},acceptTerms:{key:"acceptTerms",apiKey:"terms",type:"checkbox",label:"user.registration.form.accept",placeholder:"",description:"",autocomplete:"off"},startAt:{apiKey:"start_at",key:"startAt",type:"date",label:"ticket.annual.personalization.list.startAt.update",placeholder:"",description:"",autocomplete:"off",validator:dr().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:R1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(C.payment_modes?Object.values(C.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function Cx(e,t){return{...e,errors:e.errors||[],value:e.value??Ox(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){Dx(this)}}}function Ox(e){return e==="checkbox"?!1:e==="file"?null:""}function Dx(e){if(e.errors=[],!e.validator){e.required&&(e.value===!1||e.value===""||e.value===null||e.value===void 0)&&(e.errors=["common.fieldErrors.required"]);return}const t=e.validator.safeParse(e.value);t.success?e.errors=[]:e.errors=t.error.format()._errors}var Bt=class il{static#e={};static defineForm(t){Qe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Qe.default({fields:t})}static{il.defineFields(Ax)}static setRequiredApiKeys(t,r){il.#e[t]=r}static getFormOptions(t){return Qe.config.forms[t]}static createField(t,r){const n=il.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return Cx(n,r)}static getFormFields(t){return Ix(t)}static getFieldInit(t){return Qe.config.fields[t]}};function Ix(e){const t=Qe.config.forms[e];if(!t)throw new Error(`(formFields) Form ${e} not found`);const r=t.fields;return r||(console.warn("(formFields) No fields defined for form",e),[])}function qu(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function Px(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i;const s=new Up;Bp(t.$$host,s),ve(()=>{s.token=r(),s.ticketSaleId=n()}),Bt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function a(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=jf(m,(S,O)=>{const P=v[O-1].details;return S.push(P),S},[]);if(y.forEach(S=>{S.fields.forEach(O=>{S.validateField(O)})}),!jf(m,(S,O)=>y[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const S=y.map(async(P,R)=>{const j=s.ticketSale.personalizations[R].id,N=P.fields.find(U=>U.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const B=await C.uploadPersonalizationPhoto(r(),j,N);return B.error?{ok:!1,error:B.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(S)).find(P=>!P.ok);if(O){i.details.apiErrors=[O.error];return}}const x={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:y.map((S,O)=>{const P=ow(S.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:P}})}},k=await C.finalizePersonalizations(r(),x);if(k.error){i.details.apiErrors=[k.error.error];return}const T=Qe.config.forms.personalization?.beforeSubmit;T&&T(x),Qe.config.urls.annualTicketPersonalizationFormSubmit?.()&&Qe.config.navigateTo(Qe.config.urls.annualTicketPersonalizationFormSubmit())}let o=null,l=null,c=null,f=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return o?!0:(o=t.$$host.querySelector("go-personalization-form"),o?(l=o.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),o.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(m){if(!p()||!o||!l||!c)return;const v=o.parentElement;if(!v)return;const y=Math.max(m,1),x=Array.from(v.querySelectorAll("go-personalization-form"));for(;x.length<y;){const T=l.cloneNode(!0);u(T),v.insertBefore(T,c),x.push(T)}for(;x.length>y;){const T=x.pop();T&&T!==o&&T.remove()}const k=s.ticketSale?.personalizations??[];x.forEach((T,S)=>{const O=k[S];O&&(T.dataset.personalizationId=String(O.id))}),f=y}sn(()=>{p(),t.$$host.addEventListener("go-submit",a),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),ve(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==f&&h(m)});var g={details:s,get token(){return r()},set token(m){r(m),b()},get ticketSaleId(){return n()},set ticketSaleId(m){n(m),b()}};return re(g)}customElements.define("go-annual-ticket-personalization-form",ne(Px,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var $x=class{formId;form;#e=se(Pe([]));#t=D(()=>qu(this.fields)==0);get isValid(){return d(this.#t)}set isValid(e){M(this.#t,e)}#r=se();get successMessage(){return d(this.#r)}set successMessage(e){M(this.#r,e,!0)}get formData(){function e(r){return rw(r)||ew(r)?r:r==="true"||r==="false"?r==="true":!Number.isNaN(+r)&&r.trim()!==""?+r:r}const t=this.fields.filter(r=>r!==void 0).filter(r=>r.type!=="file").filter(r=>r.value!=="");return Object.fromEntries(t.map(r=>[r.apiKey,e(r.value)]))}fieldValue(e){return this.fields.find(t=>t.key===e)?.value}get apiErrors(){return d(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),tu(e)){M(this.#e,e,!0);return}if(e.errors&&tu(e.errors)&&M(this.#e,e.errors,!0),tw(e.error)){M(this.#e,[e.error],!0);return}for(const[t,r]of Object.entries(e)){if(t==="full_messages"||t==="success"||t==="errors")continue;const n=this.fields.find(i=>i.apiKey===t);if(!n){console.error(`(set apiErrors) Field with API key ${t} not found`);continue}n.apiErrors=r}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const t=this.fields.find(r=>r.apiKey==="password");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const t=this.fields.find(r=>r.apiKey==="email");(!t||t&&e.value!==t.value)&&e.errors.push("user.fieldErrors.emailMatch")}}get fields(){const e=this.form.closest("go-form");return Array.from(this.form.querySelectorAll("go-field")).filter(t=>t.closest("go-form")===e).map(t=>t.getField?.()).filter(t=>t)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const t=this.fields;Object.entries(e).forEach(([r,n])=>{const i=t.find(s=>s.apiKey===r);if(!i){console.warn(`(FormDetails.fill) Field with API key ${r} not found.`);return}if(i.type==="select"&&!i.options?.().find(s=>s.value===n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);if(i.type==="checkbox"&&![!0,!1].includes(n))throw new Error(`(FormDetails.fill) Field ${r} has invalid value: ${n}`);i.value=n})}constructor(e,t){this.formId=e,this.form=t}},jp="go-form-details",Mx=Li(jp),qi=zi(jp);function Hr(e,t,r){const n=e.firstElementChild||void 0;if(e.children?.length===1&&n?.tagName.toLowerCase()===t)return n;const i=document.createElement(t);r&&Object.entries(r).forEach(([a,o])=>{typeof o=="boolean"?o&&i.setAttribute(a,""):i.setAttribute(a,o)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var Fx=V("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function Nx(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new $x(r(),t.$$host);Mx(t.$$host,i);async function s(f){f.preventDefault(),f.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",f)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",f)),t.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}sn(()=>{const f=Hr(t.$$host,"form",{novalidate:!0});f.addEventListener("submit",s),i.form=f});var a={details:i,get formId(){return r()},set formId(f){r(f),b()},get custom(){return n()},set custom(f){n(f),b()}},o=X(),l=z(o),c=f=>{var u=Fx(),p=z(u),h=W(p,2),g=W(h,2),m=$(g,!0);I(g),Q(v=>Y(m,v),[()=>C.t(Bt.getFormOptions(r())?.submitLabel||"Submit")]),E(f,u)};return le(l,f=>{n()||f(c)}),E(e,o),re(a)}customElements.define("go-form",ne(Nx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Rx=V("<go-form></go-form>",2);function Lx(e,t){te(t,!0);let r=_(t,"custom",7,!1);Bt.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(a){const o=a.target.details,l=await C.passwordReset(o.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),o.successMessage=l.data.message,o.apiErrors=[]):o.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(a=!1){r(a),b()}},s=Rx();return Yn(s,"formId","passwordReset"),Q(()=>Yn(s,"custom",r())),Ra("submit",s,n),E(e,s),re(i)}customElements.define("go-password-reset",ne(Lx,{custom:{}},[],[]));function zx(e,t){te(t,!0),Bt.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(t,"custom",7,!1);async function n(i){const s=i.target.details,a=await C.signIn(s.formData);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signIn",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-in",ne(zx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function qx(e,t){te(t,!0);let r=_(t,"custom",7,!1);Bt.defineForm({id:"signUp",submitLabel:"common.actions.register",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"newPassword",required:!0},{key:"confirmPassword",required:!0},{key:"acceptTerms",required:!0}]});async function n(i){const s=i.target.details,a=await C.signUp(s.formData,!1);a.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error.errors}return Hr(t.$$host,"go-form",{"form-id":"signUp",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-sign-up",ne(qx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Ux(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function Vx(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function Bx(e){return Ux(Vx(e),0)}function jx(e,t){const r=Ni(),n=new Set(t.map(i=>i.attributes.coupon).filter(Boolean).map(i=>i.toUpperCase()));return e.coupons.forEach(i=>r.addCoupon({...i,applied:i.kind!=="actionToken"||n.has(i.code)})),t.forEach(i=>{const s=i.attributes,a=s.uuid,o=e.items.find(l=>l.uuid===a);if(!o){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(Zx(o,s))}),r}function Zx(e,t){const r=_p(e.product)?1:Bx(t),n=e.product.price_cents,i=n===0?0:t.price_cents??n,s=i<n;return ot({...e.product,price_cents:i},{quantity:r,time:e.time,voucher:e.voucher,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:n}})}var Wx=class{#e=se();get displayCart(){return d(this.#e)}set displayCart(e){M(this.#e,e,!0)}#t=se(!1);get preview(){return d(this.#t)}set preview(e){M(this.#t,e,!0)}get totalPriceCents(){return this.displayCart?.amountToPayCents??0}get subtotalPriceCents(){return C.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=C.cart;if(e)try{const{items:t,coupons:r}=e.orderData(),n=await C.createCart({items:t,coupons:r});if(n?.data){this.displayCart=jx(e,n.data.items??[]);return}console.error("(go-cart) Unable to fetch discounted cart data",n?.error),this.displayCart=e}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Zp="go-cart-details",Hx=Li(Zp),Ui=zi(Zp),Gx=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Wp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(a){r(a),b()}},i=Gx(),s=$(i,!0);return I(i),Q(()=>Y(s,r().product.title)),E(e,i),re(n)}ne(Wp,{cartItem:{}},[],[],{mode:"open"});var Kx=V('<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),Yx=V('<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>',1);function Hp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!uo(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(h){r(h),b()}},s=Yx(),a=z(s),o=$(a),l=$(o,!0);I(o);var c=W(o),f=$(c,!0);I(c),I(a);var u=W(a),p=h=>{var g=Kx(),m=z(g),v=$(m,!0);I(m);var y=W(m),x=$(y,!0);I(y),Q((k,T)=>{Y(v,k),Y(x,T)},[()=>ni(r().time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().time)]),E(h,g)};return le(u,h=>{r().time&&h(p)}),Q(()=>{Y(l,n.event_title),Y(f,n.title)}),E(e,s),re(i)}ne(Hp,{cartItem:{}},[],[],{mode:"open"});var Jx=V('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Qx=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Xx=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Gp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),b()}},i=Xx(),s=z(i),a=$(s,!0);I(s);var o=W(s,2),l=c=>{var f=Qx(),u=z(f),p=$(u,!0);I(u);var h=W(u,2),g=m=>{var v=Jx(),y=$(v,!0);I(v),Q(x=>Y(y,x),[()=>ri(r().time)]),E(m,v)};le(h,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),Q(m=>Y(p,m),[()=>ni(r().time,{month:"numeric",day:"numeric"},C.locale)]),E(c,f)};return le(o,c=>{r().time&&c(l)}),Q(()=>Y(a,r().product.title)),E(e,i),re(n)}ne(Gp,{cartItem:{}},[],[],{mode:"open"});var eT=V('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),tT=V('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),rT=V('<span class="go-cart-item-custom" data-testid="cart-item-custom"> </span>'),nT=V('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <span class="go-cart-item-participants" data-testid="cart-item-participants"> </span> <!> <!>',1);function Kp(e,t){te(t,!0);let r=_(t,"cartItem",7);const n=D(()=>r().product),i=D(()=>{if(!r().time)return null;try{return{date:ni(r().time,{year:"numeric",month:"numeric",day:"numeric"},C.locale),time:ri(r().time)}}catch{return{date:r().time,time:""}}}),s=v=>v==null?"":typeof v=="object"?JSON.stringify(v):String(v),a=D(()=>Object.entries(d(n).customs??{}).filter(([,v])=>v!=null&&v!==""));var o={get cartItem(){return r()},set cartItem(v){r(v),b()}},l=nT(),c=z(l),f=$(c,!0);I(c);var u=W(c,2),p=$(u,!0);I(u);var h=W(u,2),g=v=>{var y=tT(),x=z(y),k=$(x,!0);I(x);var T=W(x,2),S=O=>{var P=eT(),R=$(P,!0);I(P),Q(()=>Y(R,d(i).time)),E(O,P)};le(T,O=>{d(i).time&&O(S)}),Q(()=>Y(k,d(i).date)),E(v,y)};le(h,v=>{d(i)&&v(g)});var m=W(h,2);return Fe(m,17,()=>d(a),([v,y])=>v,(v,y)=>{var x=D(()=>Yy(d(y),2));let k=()=>d(x)[0],T=()=>d(x)[1];var S=rT(),O=$(S);I(S),Q(P=>Y(O,`${k()??""}: ${P??""}`),[()=>s(T())]),E(v,S)}),Q(v=>{Y(f,d(n).title),Y(p,v)},[()=>C.t("cart.item.participants",{count:d(n).participants})]),E(e,l),re(o)}ne(Kp,{cartItem:{}},[],[],{mode:"open"});function Yp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function iT(e,{min:t,floor:r=0}){return e<=t?r:e-1}function sT(e,{min:t,max:r,floor:n=0}){if(!Number.isFinite(e)||e<=0)return n;let i=Math.floor(e);return i<t&&(i=t),i>r&&(i=r),i}function aT(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Jp(e,t){return Yp(e,t)>e}function Qp(e,{floor:t=0}){return e>t}var oT=V('<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>');function Xp(e,t){const r=mt();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),a=_(t,"floor",7,0),o=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),f=_(t,"onChange",7);const u=D(()=>({min:i(),max:s(),floor:a()}));let p,h=se(!1);const g=D(()=>!Qp(n(),d(u))),m=D(()=>!Jp(n(),d(u)));function v(B){B!==n()&&f()(B)}function y(){Qp(n(),d(u))&&v(iT(n(),d(u)))}function x(){Jp(n(),d(u))&&v(Yp(n(),d(u)))}function k(){const B=sT(parseInt(p.value,10),d(u));M(h,!1),p.value=String(B),v(B)}function T(){const B=p.value.trim();M(h,!(/^\d+$/.test(B)&&aT(parseInt(B,10),d(u))))}function S(B){switch(B.key){case"ArrowUp":B.preventDefault(),x();break;case"ArrowDown":B.preventDefault(),y();break;case"Home":B.preventDefault(),v(a());break;case"End":B.preventDefault(),v(s());break;case"Enter":B.preventDefault(),k();break}}var O={get value(){return n()},set value(B){n(B),b()},get min(){return i()},set min(B){i(B),b()},get max(){return s()},set max(B){s(B),b()},get floor(){return a()},set floor(B=0){a(B),b()},get label(){return o()},set label(B){o(B),b()},get decreaseLabel(){return l()},set decreaseLabel(B){l(B),b()},get increaseLabel(){return c()},set increaseLabel(B){c(B),b()},get onChange(){return f()},set onChange(B){f(B),b()}},P=oT(),R=$(P),j=W(R,2);Ms(j),Ql(j,B=>p=B,()=>p);var N=W(j,2);return I(P),Q(()=>{me(P,"aria-label",o()),me(R,"title",l()),me(R,"aria-controls",r),me(R,"aria-disabled",d(g)),me(j,"id",r),me(j,"aria-label",o()),Bl(j,n()),me(j,"aria-valuenow",n()),me(j,"aria-valuemin",a()),me(j,"aria-valuemax",s()),me(j,"aria-invalid",d(h)?"true":void 0),me(N,"title",c()),me(N,"aria-controls",r),me(N,"aria-disabled",d(m))}),pt("click",R,y),pt("input",j,T),pt("change",j,k),Ra("blur",j,k),pt("keydown",j,S),pt("click",N,x),E(e,P),re(O)}lr(["click","input","change","keydown"]),ne(Xp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function lT(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[vo(n)];if(t<e)return e>n?[vo(e)]:[];const i=Math.max(e,n),s=[vo(n)];for(let a=i;a<=t;a++)a!==n&&s.push(vo(a));return s}function vo(e){return{value:e,label:e.toString()}}var uT=V("<option> </option>"),cT=V('<select class="go-quantity-select"></select>');function go(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),a=_(t,"floor",7,0),o=_(t,"deselectable",7,!0),l=_(t,"onChange",7);const c=D(()=>Qe.config.quantityStepper);var f={get value(){return r()},set value(m){r(m),b()},get min(){return n()},set min(m){n(m),b()},get max(){return i()},set max(m){i(m),b()},get label(){return s()},set label(m){s(m),b()},get floor(){return a()},set floor(m=0){a(m),b()},get deselectable(){return o()},set deselectable(m=!0){o(m),b()},get onChange(){return l()},set onChange(m){l(m),b()}},u=X(),p=z(u),h=m=>{{let v=D(()=>o()?0:n()),y=D(()=>C.t("quantity.decrease")),x=D(()=>C.t("quantity.increase"));Xp(m,{get value(){return r()},get min(){return n()},get max(){return i()},get floor(){return d(v)},get label(){return s()},get decreaseLabel(){return d(y)},get increaseLabel(){return d(x)},get onChange(){return l()}})}},g=m=>{var v=cT();Fe(v,21,()=>lT(n(),i(),{floor:o()?a():n()}),y=>y.value,(y,x)=>{var k=uT(),T=$(k,!0);I(k);var S={};Q(()=>{Ff(k,r()===d(x).value),Y(T,d(x).label),S!==(S=d(x).value)&&(k.value=(k.__value=d(x).value)??"")}),E(y,k)}),I(v),Q(()=>me(v,"aria-label",s())),pt("change",v,y=>l()(parseInt(y.target.value,10))),E(m,v)};return le(p,m=>{d(c)?m(h):m(g,-1)}),E(e,u),re(f)}lr(["change"]),ne(go,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onChange:{}},[],[],{mode:"open"});function em(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 dT(e){if(Array.isArray(e))return e}function fT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function hT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pT(e,t){return dT(e)||fT(e,t)||mT(e,t)||hT()}function mT(e,t){if(e){if(typeof e=="string")return em(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)?em(e,t):void 0}}var tm=Object.entries,rm=Object.setPrototypeOf,vT=Object.isFrozen,gT=Object.getPrototypeOf,yT=Object.getOwnPropertyDescriptor,It=Object.freeze,hr=Object.seal,Vi=Object.create,nm=typeof Reflect<"u"&&Reflect,Uu=nm.apply,Vu=nm.construct;It||(It=function(t){return t}),hr||(hr=function(t){return t}),Uu||(Uu=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)}),Vu||(Vu=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 Bi=ft(Array.prototype.forEach),bT=ft(Array.prototype.lastIndexOf),im=ft(Array.prototype.pop),ji=ft(Array.prototype.push),_T=ft(Array.prototype.splice),Pt=Array.isArray,Ws=ft(String.prototype.toLowerCase),Bu=ft(String.prototype.toString),sm=ft(String.prototype.match),Zi=ft(String.prototype.replace),am=ft(String.prototype.indexOf),wT=ft(String.prototype.trim),kT=ft(Number.prototype.toString),ST=ft(Boolean.prototype.toString),om=typeof BigInt>"u"?null:ft(BigInt.prototype.toString),lm=typeof Symbol>"u"?null:ft(Symbol.prototype.toString),rt=ft(Object.prototype.hasOwnProperty),Hs=ft(Object.prototype.toString),wt=ft(RegExp.prototype.test),Gs=ET(TypeError);function ft(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 Uu(e,t,n)}}function ET(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vu(e,r)}}function Ae(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ws;if(rm&&rm(e,null),!Pt(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(vT(t)||(t[n]=s),i=s)}e[i]=!0}return e}function xT(e){for(let t=0;t<e.length;t++)rt(e,t)||(e[t]=null);return e}function Tt(e){const t=Vi(null);for(const n of tm(e)){var r=pT(n,2);const i=r[0],s=r[1];rt(e,i)&&(Pt(s)?t[i]=xT(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=Tt(s):t[i]=s)}return t}function TT(e){switch(typeof e){case"string":return e;case"number":return kT(e);case"boolean":return ST(e);case"bigint":return om?om(e):"0";case"symbol":return lm?lm(e):"Symbol()";case"undefined":return Hs(e);case"function":case"object":{if(e===null)return Hs(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Hs(n)}return Hs(e)}default:return Hs(e)}}function Gr(e,t){for(;e!==null;){const n=yT(e,t);if(n){if(n.get)return ft(n.get);if(typeof n.value=="function")return ft(n.value)}e=gT(e)}function r(){return null}return r}function AT(e){try{return wt(e,""),!0}catch{return!1}}var um=It(["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"]),ju=It(["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"]),Zu=It(["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"]),CT=It(["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"]),Wu=It(["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"]),OT=It(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cm=It(["#text"]),dm=It(["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"]),Hu=It(["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"]),fm=It(["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"]),yo=It(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),DT=hr(/{{[\w\W]*|^[\w\W]*}}/g),IT=hr(/<%[\w\W]*|^[\w\W]*%>/g),PT=hr(/\${[\w\W]*/g),$T=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),MT=hr(/^aria-[\-\w]+$/),hm=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),FT=hr(/^(?:\w+script|data):/i),NT=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),RT=hr(/^html$/i),LT=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),Kr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zT=function(){return typeof window>"u"?null:window},qT=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(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},pm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zT();const t=ge=>mm(ge);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,u=o.prototype,p=Gr(u,"cloneNode"),h=Gr(u,"remove"),g=Gr(u,"nextSibling"),m=Gr(u,"childNodes"),v=Gr(u,"parentNode"),y=Gr(u,"shadowRoot"),x=Gr(u,"attributes"),k=a&&a.prototype?Gr(a.prototype,"nodeType"):null,T=a&&a.prototype?Gr(a.prototype,"nodeName"):null;if(typeof s=="function"){const ge=r.createElement("template");ge.content&&ge.content.ownerDocument&&(r=ge.content.ownerDocument)}let S,O="";const P=r,R=P.implementation,j=P.createNodeIterator,N=P.createDocumentFragment,B=P.getElementsByTagName,U=n.importNode;let oe=pm();t.isSupported=typeof tm=="function"&&typeof v=="function"&&R&&R.createHTMLDocument!==void 0;const he=DT,J=IT,ae=PT,ee=$T,de=MT,ue=FT,H=NT,ie=LT;let ce=hm,F=null;const fe=Ae({},[...um,...ju,...Zu,...Wu,...cm]);let q=null;const ke=Ae({},[...dm,...Hu,...fm,...yo]);let K=Object.seal(Vi(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,ye=null;const Se=Object.seal(Vi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,Ge=!0,Ze=!1,kt=!0,st=!1,er=!0,At=!1,Ft=!1,tr=!1,Wt=!1,mr=!1,Ir=!1,Pr=!0,bn=!1;const $r="user-content-";let vr=!0,Xr=!1,en={},St=null;const Un=Ae({},["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 as=null;const os=Ae({},["audio","video","img","source","image","track"]);let ha=null;const id=Ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bi="http://www.w3.org/1998/Math/MathML",ls="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let Vn=gr,sd=!1,ad=null;const aF=Ae({},[bi,ls,gr],Bu);let od=Ae({},["mi","mo","mn","ms","mtext"]),ld=Ae({},["annotation-xml"]);const oF=Ae({},["title","style","font","a","script"]);let pa=null;const lF=["application/xhtml+xml","text/html"],uF="text/html";let lt=null,us=null;const cF=r.createElement("form"),ey=function(A){return A instanceof RegExp||A instanceof Function},ud=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(us&&us===A)return;(!A||typeof A!="object")&&(A={}),A=Tt(A),pa=lF.indexOf(A.PARSER_MEDIA_TYPE)===-1?uF:A.PARSER_MEDIA_TYPE,lt=pa==="application/xhtml+xml"?Bu:Ws,F=rt(A,"ALLOWED_TAGS")&&Pt(A.ALLOWED_TAGS)?Ae({},A.ALLOWED_TAGS,lt):fe,q=rt(A,"ALLOWED_ATTR")&&Pt(A.ALLOWED_ATTR)?Ae({},A.ALLOWED_ATTR,lt):ke,ad=rt(A,"ALLOWED_NAMESPACES")&&Pt(A.ALLOWED_NAMESPACES)?Ae({},A.ALLOWED_NAMESPACES,Bu):aF,ha=rt(A,"ADD_URI_SAFE_ATTR")&&Pt(A.ADD_URI_SAFE_ATTR)?Ae(Tt(id),A.ADD_URI_SAFE_ATTR,lt):id,as=rt(A,"ADD_DATA_URI_TAGS")&&Pt(A.ADD_DATA_URI_TAGS)?Ae(Tt(os),A.ADD_DATA_URI_TAGS,lt):os,St=rt(A,"FORBID_CONTENTS")&&Pt(A.FORBID_CONTENTS)?Ae({},A.FORBID_CONTENTS,lt):Un,w=rt(A,"FORBID_TAGS")&&Pt(A.FORBID_TAGS)?Ae({},A.FORBID_TAGS,lt):Tt({}),ye=rt(A,"FORBID_ATTR")&&Pt(A.FORBID_ATTR)?Ae({},A.FORBID_ATTR,lt):Tt({}),en=rt(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?Tt(A.USE_PROFILES):A.USE_PROFILES:!1,je=A.ALLOW_ARIA_ATTR!==!1,Ge=A.ALLOW_DATA_ATTR!==!1,Ze=A.ALLOW_UNKNOWN_PROTOCOLS||!1,kt=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=A.SAFE_FOR_TEMPLATES||!1,er=A.SAFE_FOR_XML!==!1,At=A.WHOLE_DOCUMENT||!1,Wt=A.RETURN_DOM||!1,mr=A.RETURN_DOM_FRAGMENT||!1,Ir=A.RETURN_TRUSTED_TYPE||!1,tr=A.FORCE_BODY||!1,Pr=A.SANITIZE_DOM!==!1,bn=A.SANITIZE_NAMED_PROPS||!1,vr=A.KEEP_CONTENT!==!1,Xr=A.IN_PLACE||!1,ce=AT(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:hm,Vn=typeof A.NAMESPACE=="string"?A.NAMESPACE:gr,od=rt(A,"MATHML_TEXT_INTEGRATION_POINTS")&&A.MATHML_TEXT_INTEGRATION_POINTS&&typeof A.MATHML_TEXT_INTEGRATION_POINTS=="object"?Tt(A.MATHML_TEXT_INTEGRATION_POINTS):Ae({},["mi","mo","mn","ms","mtext"]),ld=rt(A,"HTML_INTEGRATION_POINTS")&&A.HTML_INTEGRATION_POINTS&&typeof A.HTML_INTEGRATION_POINTS=="object"?Tt(A.HTML_INTEGRATION_POINTS):Ae({},["annotation-xml"]);const Z=rt(A,"CUSTOM_ELEMENT_HANDLING")&&A.CUSTOM_ELEMENT_HANDLING&&typeof A.CUSTOM_ELEMENT_HANDLING=="object"?Tt(A.CUSTOM_ELEMENT_HANDLING):Vi(null);if(K=Vi(null),rt(Z,"tagNameCheck")&&ey(Z.tagNameCheck)&&(K.tagNameCheck=Z.tagNameCheck),rt(Z,"attributeNameCheck")&&ey(Z.attributeNameCheck)&&(K.attributeNameCheck=Z.attributeNameCheck),rt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),st&&(Ge=!1),mr&&(Wt=!0),en&&(F=Ae({},cm),q=Vi(null),en.html===!0&&(Ae(F,um),Ae(q,dm)),en.svg===!0&&(Ae(F,ju),Ae(q,Hu),Ae(q,yo)),en.svgFilters===!0&&(Ae(F,Zu),Ae(q,Hu),Ae(q,yo)),en.mathMl===!0&&(Ae(F,Wu),Ae(q,fm),Ae(q,yo))),Se.tagCheck=null,Se.attributeCheck=null,rt(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?Se.tagCheck=A.ADD_TAGS:Pt(A.ADD_TAGS)&&(F===fe&&(F=Tt(F)),Ae(F,A.ADD_TAGS,lt))),rt(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?Se.attributeCheck=A.ADD_ATTR:Pt(A.ADD_ATTR)&&(q===ke&&(q=Tt(q)),Ae(q,A.ADD_ATTR,lt))),rt(A,"ADD_URI_SAFE_ATTR")&&Pt(A.ADD_URI_SAFE_ATTR)&&Ae(ha,A.ADD_URI_SAFE_ATTR,lt),rt(A,"FORBID_CONTENTS")&&Pt(A.FORBID_CONTENTS)&&(St===Un&&(St=Tt(St)),Ae(St,A.FORBID_CONTENTS,lt)),rt(A,"ADD_FORBID_CONTENTS")&&Pt(A.ADD_FORBID_CONTENTS)&&(St===Un&&(St=Tt(St)),Ae(St,A.ADD_FORBID_CONTENTS,lt)),vr&&(F["#text"]=!0),At&&Ae(F,["html","head","body"]),F.table&&(Ae(F,["tbody"]),delete w.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=A.TRUSTED_TYPES_POLICY,O=S.createHTML("")}else S===void 0&&(S=qT(f,i)),S!==null&&typeof O=="string"&&(O=S.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===fe&&(F=Tt(F)),oe.uponSanitizeAttribute.length>0&&q===ke&&(q=Tt(q)),It&&It(A),us=A},ty=Ae({},[...ju,...Zu,...CT]),ry=Ae({},[...Wu,...OT]),dF=function(A){let Z=v(A);(!Z||!Z.tagName)&&(Z={namespaceURI:Vn,tagName:"template"});const pe=Ws(A.tagName),De=Ws(Z.tagName);return ad[A.namespaceURI]?A.namespaceURI===ls?Z.namespaceURI===gr?pe==="svg":Z.namespaceURI===bi?pe==="svg"&&(De==="annotation-xml"||od[De]):!!ty[pe]:A.namespaceURI===bi?Z.namespaceURI===gr?pe==="math":Z.namespaceURI===ls?pe==="math"&&ld[De]:!!ry[pe]:A.namespaceURI===gr?Z.namespaceURI===ls&&!ld[De]||Z.namespaceURI===bi&&!od[De]?!1:!ry[pe]&&(oF[pe]||!ty[pe]):!!(pa==="application/xhtml+xml"&&ad[A.namespaceURI]):!1},Mr=function(A){ji(t.removed,{element:A});try{v(A).removeChild(A)}catch{h(A)}},_i=function(A,Z){try{ji(t.removed,{attribute:Z.getAttributeNode(A),from:Z})}catch{ji(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(A),A==="is")if(Wt||mr)try{Mr(Z)}catch{}else try{Z.setAttribute(A,"")}catch{}},ny=function(A){let Z=null,pe=null;if(tr)A="<remove></remove>"+A;else{const tt=sm(A,/^[\r\n\t ]+/);pe=tt&&tt[0]}pa==="application/xhtml+xml"&&Vn===gr&&(A='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+A+"</body></html>");const De=S?S.createHTML(A):A;if(Vn===gr)try{Z=new c().parseFromString(De,pa)}catch{}if(!Z||!Z.documentElement){Z=R.createDocument(Vn,"template",null);try{Z.documentElement.innerHTML=sd?O:De}catch{}}const Ne=Z.body||Z.documentElement;return A&&pe&&Ne.insertBefore(r.createTextNode(pe),Ne.childNodes[0]||null),Vn===gr?B.call(Z,At?"html":"body")[0]:At?Z.documentElement:Ne},iy=function(A){return j.call(A.ownerDocument||A,A,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},sy=function(A){A.normalize();const Z=j.call(A.ownerDocument||A,A,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let pe=Z.nextNode();for(;pe;){let De=pe.data;Bi([he,J,ae],Ne=>{De=Zi(De,Ne," ")}),pe.data=De,pe=Z.nextNode()}},tl=function(A){const Z=T?T(A):null;return typeof Z!="string"||lt(Z)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==x(A)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==k(A)||A.childNodes!==m(A)},ma=function(A){if(!k||typeof A!="object"||A===null)return!1;try{return k(A)===Kr.documentFragment}catch{return!1}},rl=function(A){if(!k||typeof A!="object"||A===null)return!1;try{return typeof k(A)=="number"}catch{return!1}};function _n(ge,A,Z){Bi(ge,pe=>{pe.call(t,A,Z,us)})}const ay=function(A){let Z=null;if(_n(oe.beforeSanitizeElements,A,null),tl(A))return Mr(A),!0;const pe=lt(A.nodeName);if(_n(oe.uponSanitizeElement,A,{tagName:pe,allowedTags:F}),er&&A.hasChildNodes()&&!rl(A.firstElementChild)&&wt(/<[/\w!]/g,A.innerHTML)&&wt(/<[/\w!]/g,A.textContent)||er&&A.namespaceURI===gr&&pe==="style"&&rl(A.firstElementChild)||A.nodeType===Kr.progressingInstruction||er&&A.nodeType===Kr.comment&&wt(/<[/\w]/g,A.data))return Mr(A),!0;if(w[pe]||!(Se.tagCheck instanceof Function&&Se.tagCheck(pe))&&!F[pe]){if(!w[pe]&&ly(pe)&&(K.tagNameCheck instanceof RegExp&&wt(K.tagNameCheck,pe)||K.tagNameCheck instanceof Function&&K.tagNameCheck(pe)))return!1;if(vr&&!St[pe]){const De=v(A),Ne=m(A);if(Ne&&De){const tt=Ne.length;for(let Ht=tt-1;Ht>=0;--Ht){const Bn=p(Ne[Ht],!0);De.insertBefore(Bn,g(A))}}}return Mr(A),!0}return(k?k(A):A.nodeType)===Kr.element&&!dF(A)||(pe==="noscript"||pe==="noembed"||pe==="noframes")&&wt(/<\/no(script|embed|frames)/i,A.innerHTML)?(Mr(A),!0):(st&&A.nodeType===Kr.text&&(Z=A.textContent,Bi([he,J,ae],De=>{Z=Zi(Z,De," ")}),A.textContent!==Z&&(ji(t.removed,{element:A.cloneNode()}),A.textContent=Z)),_n(oe.afterSanitizeElements,A,null),!1)},oy=function(A,Z,pe){if(ye[Z]||Pr&&(Z==="id"||Z==="name")&&(pe in r||pe in cF))return!1;const De=q[Z]||Se.attributeCheck instanceof Function&&Se.attributeCheck(Z,A);if(!(Ge&&!ye[Z]&&wt(ee,Z))){if(!(je&&wt(de,Z))){if(!De||ye[Z]){if(!(ly(A)&&(K.tagNameCheck instanceof RegExp&&wt(K.tagNameCheck,A)||K.tagNameCheck instanceof Function&&K.tagNameCheck(A))&&(K.attributeNameCheck instanceof RegExp&&wt(K.attributeNameCheck,Z)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(Z,A))||Z==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&wt(K.tagNameCheck,pe)||K.tagNameCheck instanceof Function&&K.tagNameCheck(pe))))return!1}else if(!ha[Z]){if(!wt(ce,Zi(pe,H,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&A!=="script"&&am(pe,"data:")===0&&as[A])){if(!(Ze&&!wt(ue,Zi(pe,H,"")))){if(pe)return!1}}}}}}return!0},fF=Ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ly=function(A){return!fF[Ws(A)]&&wt(ie,A)},uy=function(A){_n(oe.beforeSanitizeAttributes,A,null);const Z=A.attributes;if(!Z||tl(A))return;const pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let De=Z.length;for(;De--;){const Ne=Z[De],tt=Ne.name,Ht=Ne.namespaceURI,Bn=Ne.value,wn=lt(tt),cd=Bn;let yt=tt==="value"?cd:wT(cd);if(pe.attrName=wn,pe.attrValue=yt,pe.keepAttr=!0,pe.forceKeepAttr=void 0,_n(oe.uponSanitizeAttribute,A,pe),yt=pe.attrValue,bn&&(wn==="id"||wn==="name")&&am(yt,$r)!==0&&(_i(tt,A),yt=$r+yt),er&&wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){_i(tt,A);continue}if(wn==="attributename"&&sm(yt,"href")){_i(tt,A);continue}if(pe.forceKeepAttr)continue;if(!pe.keepAttr){_i(tt,A);continue}if(!kt&&wt(/\/>/i,yt)){_i(tt,A);continue}st&&Bi([he,J,ae],dy=>{yt=Zi(yt,dy," ")});const cy=lt(A.nodeName);if(!oy(cy,wn,yt)){_i(tt,A);continue}if(S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ht)switch(f.getAttributeType(cy,wn)){case"TrustedHTML":yt=S.createHTML(yt);break;case"TrustedScriptURL":yt=S.createScriptURL(yt);break}if(yt!==cd)try{Ht?A.setAttributeNS(Ht,tt,yt):A.setAttribute(tt,yt),tl(A)?Mr(A):im(t.removed)}catch{_i(tt,A)}}_n(oe.afterSanitizeAttributes,A,null)},nl=function(A){let Z=null;const pe=iy(A);for(_n(oe.beforeSanitizeShadowDOM,A,null);Z=pe.nextNode();)if(_n(oe.uponSanitizeShadowNode,Z,null),ay(Z),uy(Z),ma(Z.content)&&nl(Z.content),(k?k(Z):Z.nodeType)===Kr.element){const De=y?y(Z):Z.shadowRoot;ma(De)&&(cs(De),nl(De))}_n(oe.afterSanitizeShadowDOM,A,null)},cs=function(A){const Z=k?k(A):A.nodeType;if(Z===Kr.element){const Ne=y?y(A):A.shadowRoot;ma(Ne)&&(cs(Ne),nl(Ne))}const pe=m?m(A):A.childNodes;if(!pe)return;const De=[];Bi(pe,Ne=>{ji(De,Ne)});for(const Ne of De)cs(Ne);if(Z===Kr.element){const Ne=T?T(A):null;if(typeof Ne=="string"&&lt(Ne)==="template"){const tt=A.content;ma(tt)&&cs(tt)}}};return t.sanitize=function(ge){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,pe=null,De=null,Ne=null;if(sd=!ge,sd&&(ge="<!-->"),typeof ge!="string"&&!rl(ge)&&(ge=TT(ge),typeof ge!="string"))throw Gs("dirty is not a string, aborting");if(!t.isSupported)return ge;if(Ft||ud(A),t.removed=[],typeof ge=="string"&&(Xr=!1),Xr){const Bn=T?T(ge):ge.nodeName;if(typeof Bn=="string"){const wn=lt(Bn);if(!F[wn]||w[wn])throw Gs("root node is forbidden and cannot be sanitized in-place")}if(tl(ge))throw Gs("root node is clobbered and cannot be sanitized in-place");cs(ge)}else if(rl(ge))Z=ny("<!---->"),pe=Z.ownerDocument.importNode(ge,!0),pe.nodeType===Kr.element&&pe.nodeName==="BODY"||pe.nodeName==="HTML"?Z=pe:Z.appendChild(pe),cs(pe);else{if(!Wt&&!st&&!At&&ge.indexOf("<")===-1)return S&&Ir?S.createHTML(ge):ge;if(Z=ny(ge),!Z)return Wt?null:Ir?O:""}Z&&tr&&Mr(Z.firstChild);const tt=iy(Xr?ge:Z);for(;De=tt.nextNode();)ay(De),uy(De),ma(De.content)&&nl(De.content);if(Xr)return st&&sy(ge),ge;if(Wt){if(st&&sy(Z),mr)for(Ne=N.call(Z.ownerDocument);Z.firstChild;)Ne.appendChild(Z.firstChild);else Ne=Z;return(q.shadowroot||q.shadowrootmode)&&(Ne=U.call(n,Ne,!0)),Ne}let Ht=At?Z.outerHTML:Z.innerHTML;return At&&F["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&wt(RT,Z.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
77
+ `+Ht),st&&Bi([he,J,ae],Bn=>{Ht=Zi(Ht,Bn," ")}),S&&Ir?S.createHTML(Ht):Ht},t.setConfig=function(){ud(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ft=!0},t.clearConfig=function(){us=null,Ft=!1},t.isValidAttribute=function(ge,A,Z){return us||ud({}),oy(lt(ge),lt(A),Z)},t.addHook=function(ge,A){typeof A=="function"&&ji(oe[ge],A)},t.removeHook=function(ge,A){if(A!==void 0){const Z=bT(oe[ge],A);return Z===-1?void 0:_T(oe[ge],Z,1)[0]}return im(oe[ge])},t.removeHooks=function(ge){oe[ge]=[]},t.removeAllHooks=function(){oe=pm()},t}var vm=mm(),UT=V('<span class="go-sub-ticket-description"></span>'),VT=V('<span class="go-sub-ticket-quantity"> </span>'),BT=V('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function Gu(e,t){te(t,!0);let r=_(t,"sub",7),n=_(t,"quantity",7),i=_(t,"max",23,()=>r().max_persons),s=_(t,"onChange",7),a=_(t,"preview",7,!1);const o=D(()=>r().min_persons===r().max_persons);var l={get sub(){return r()},set sub(y){r(y),b()},get quantity(){return n()},set quantity(y){n(y),b()},get max(){return i()},set max(y=r.max_persons){i(y),b()},get onChange(){return s()},set onChange(y){s(y),b()},get preview(){return a()},set preview(y=!1){a(y),b()}},c=BT(),f=$(c),u=$(f,!0);I(f);var p=W(f,2),h=y=>{var x=UT();Af(x,()=>vm.sanitize(r().description),!0),I(x),E(y,x)};le(p,y=>{r().description&&y(h)});var g=W(p,2),m=y=>{var x=VT(),k=$(x,!0);I(x),Q(()=>{me(x,"data-testid",`sub-ticket-${r().id??""}-quantity`),Y(k,n())}),E(y,x)},v=y=>{{let x=D(()=>r().title||C.t("cart.content.table.edit"));go(y,{get value(){return n()},get min(){return r().min_persons},get max(){return i()},get label(){return d(x)},deselectable:!1,get onChange(){return s()}})}};return le(g,y=>{a()||d(o)?y(m):y(v,-1)}),I(c),Q(()=>{Et(c,1,ur(["go-sub-ticket",d(o)&&"is-fixed",a()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),Y(u,r().title)}),E(e,c),re(l)}ne(Gu,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});var jT=V('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),ZT=V('<span class="go-cart-item-price-discounted"> </span>'),WT=V('<span data-testid="cart-item-participant-count"> </span>'),HT=V('<span data-testid="cart-item-voucher-quantity"> </span>'),GT=V("<span> </span>"),KT=V('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),YT=V('<ul class="go-sub-tickets" role="list"></ul>'),JT=V('<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>',1);function gm(e,t){te(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=se(void 0),a=se(Pe({}));const o=D(()=>C.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Br(r().product)?r().product:null),c=Ni();ve(()=>{C.cart?.items.map(y=>y.quantity),C.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Le(()=>{M(s,C.capacityManager.capacity(n(),r(),c),!0),M(a,d(o)?C.capacityManager.subTicketMaxes(C.cart,d(o),c):{},!0)})});function f(y){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).quantity=Math.max(0,d(o).quantity-r().quantity+y)}function u(){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,d(o).quantity-r().quantity);y===0?C.cart?.deleteItem(d(o)):d(o).quantity=y}function p(y,x){if(!d(o)){console.error("(CartItem) Could not find main item for line",r());return}d(o).mantle&&(d(o).mantle.composition[y]=x)}var h={get displayItem(){return r()},set displayItem(y){r(y),b()},get displayCart(){return n()},set displayCart(y){n(y),b()},get preview(){return i()},set preview(y){i(y),b()}},g=X(),m=z(g),v=y=>{var x=JT(),k=z(x),T=$(k),S=$(T),O=$(S),P=K=>{Gp(K,{get cartItem(){return r()}})},R=K=>{Hp(K,{get cartItem(){return r()}})},j=K=>{Wp(K,{get cartItem(){return r()}})},N=K=>{Kp(K,{get cartItem(){return r()}})};le(O,K=>{r().product.type==="Ticket"?K(P):r().product.type==="Event"?K(R,1):r().product.type==="Coupon"?K(j,2):r().product.type==="Tour"&&K(N,3)}),I(S);var B=W(S,2),U=$(B),oe=K=>{var w=jT(),ye=z(w),Se=$(ye,!0);I(ye);var je=W(ye,2),Ge=$(je,!0);I(je),Q((Ze,kt)=>{Y(Se,Ze),Y(Ge,kt)},[()=>fr(r().display.originalPrice),()=>fr(r().final_price_cents)]),E(K,w)},he=K=>{var w=ZT(),ye=$(w,!0);I(w),Q(Se=>Y(ye,Se),[()=>fr(r().final_price_cents)]),E(K,w)};le(U,K=>{r().display?.discounted?K(oe):K(he,-1)}),I(B);var J=W(B,2),ae=$(J),ee=K=>{var w=WT(),ye=$(w,!0);I(w),Q(()=>Y(ye,r().product.participants)),E(K,w)},de=K=>{var w=HT(),ye=$(w,!0);I(w),Q(()=>Y(ye,r().quantity)),E(K,w)},ue=K=>{var w=GT(),ye=$(w,!0);I(w),Q(()=>Y(ye,r().quantity)),E(K,w)},H=K=>{{let w=D(()=>r().quantity??0);go(K,{get value(){return d(w)},get min(){return d(s).min},get max(){return d(s).max},get label(){return r().product.title},floor:1,onChange:f})}};le(ae,K=>{r().product.type==="Tour"?K(ee):r().voucher?.code?K(de,1):i()?K(ue,2):K(H,-1)}),I(J);var ie=W(J,2),ce=K=>{var w=KT(),ye=$(w);I(w),Q(Se=>me(ye,"aria-label",Se),[()=>C.t("cart.item.remove")]),pt("click",ye,u),E(K,w)};le(ie,K=>{i()||K(ce)});var F=W(ie,2),fe=$(F,!0);I(F),I(T),I(k);var q=W(k,2),ke=K=>{var w=YT();Fe(w,21,()=>Zs(d(l)),ye=>ye.id,(ye,Se)=>{{let je=D(()=>r().mantle?.composition?.[d(Se).id]??0);Gu(ye,{get sub(){return d(Se)},get preview(){return i()},get quantity(){return d(je)},get max(){return d(a)[d(Se).id]},onChange:Ge=>p(d(Se).id,Ge)})}}),I(w),Q(()=>me(w,"aria-label",d(l).title)),E(K,w)};le(q,K=>{d(l)&&K(ke)}),Q(K=>Y(fe,K),[()=>fr(r().total_price_cents)]),E(y,x)};return le(m,y=>{d(s)&&y(v)}),E(e,g),re(h)}lr(["click"]),ne(gm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var QT=V('<li class="go-cart-header-remove"></li>'),XT=V('<li class="go-cart-item"><!></li>'),eA=V('<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>');function tA(e,t){te(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=eA(),c=$(l),f=$(c),u=$(f),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);I(h);var m=W(h,2),v=$(m,!0);I(m);var y=W(m,2),x=O=>{var P=QT();E(O,P)};le(y,O=>{d(n).preview||O(x)});var k=W(y,2),T=$(k,!0);I(k),I(f),I(c);var S=W(c,2);Fe(S,17,()=>d(n).displayCart.items,O=>O.uuid,(O,P)=>{var R=XT();gm($(R),{get displayItem(){return d(P)},get displayCart(){return d(n).displayCart},get preview(){return d(n).preview}}),I(R),E(O,R)}),I(l),Q((O,P,R,j)=>{Y(p,O),Y(g,P),Y(v,R),Y(T,j)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),E(o,l)};le(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),E(e,i),re()}customElements.define("go-cart-items",ne(tA,{},[],[]));var rA=V('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),nA=V('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),iA=V('<ol data-testid="cart-coupons"></ol>');function sA(e,t){te(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=iA();Fe(l,21,()=>d(n).displayCart.coupons,c=>c.code,(c,f)=>{var u=nA();let p;var h=$(u),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2),x=k=>{var T=rA(),S=$(T);I(T),Q(O=>me(S,"aria-label",O),[()=>C.t("cart.coupons.remove")]),pt("click",S,()=>C.cart?.removeCoupon(d(f).code)),E(k,T)};le(y,k=>{d(n).preview||k(x)}),I(g),I(h),I(u),Q(()=>{p=Et(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!d(f).applied}),Y(v,d(f).code)}),E(c,u)}),I(l),E(o,l)};le(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.coupons.length>0&&o(a)}),E(e,i),re()}lr(["click"]),customElements.define("go-cart-coupons",ne(sA,{},[],[]));var aA=V('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function oA(e,t){te(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=aA(),c=$(l,!0);I(l),Q(f=>Y(c,f),[()=>fr(d(n).totalPriceCents)]),E(o,l)};le(s,o=>{d(n)&&d(n).displayCart&&d(n).displayCart.items.length&&o(a)}),E(e,i),re()}customElements.define("go-cart-total-amount",ne(oA,{},[],[]));function lA(e,t){te(t,!0);const r=_(t,"preview",7,!1),n=new Wx;Hx(t.$$host,n),ve(()=>{n.preview=r()}),ve(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.map(s=>s.code).join("|"),C.cart.items.forEach(s=>s.mantle&&Object.values(s.mantle.composition)),Le(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const o of s){const l=await o.flush?.();l&&!l.success&&(a=!1)}return a}return t.$$host.addEventListener("click",async s=>{const a=s.target.closest("go-submit");if(!a)return;const o=a.closest("go-form");if(o&&t.$$host.contains(o))return;const l=await i();l&&t.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:l},bubbles:!0,composed:!0}))}),re({get preview(){return r()},set preview(s=!1){r(s),b()}})}customElements.define("go-cart",ne(lA,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var uA=V('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function cA(e,t){te(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=uA(),c=$(l,!0);I(l),Q(f=>Y(c,f),[()=>fr(d(n).subtotalPriceCents)]),E(o,l)};le(s,o=>{d(n)&&C.cart?.items.length&&o(a)}),E(e,i),re()}customElements.define("go-cart-subtotal-amount",ne(cA,{},[],[]));var dA=V('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function fA(e,t){te(t,!0);const r=Ui(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=dA(),c=W($(l),1,!0);I(l),Q(f=>Y(c,f),[()=>fr(d(n).discountedAmountCents)]),E(o,l)};le(s,o=>{d(n)&&d(n).discountedAmountCents>0&&o(a)}),E(e,i),re()}customElements.define("go-cart-discounted-amount",ne(fA,{},[],[]));function hA(e,t){te(t,!0),Hr(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(hA,{},[],[]));function pA(e,t){te(t,!0);let r=D(()=>C.cart?.items.length);Ct();var n=qt();Q(()=>Y(n,d(r))),E(e,n),re()}customElements.define("go-cart-counter",ne(pA,{},[],[]));async function ym(e,t){const r=C.cart;if(!r)return;const n=e.details.fieldValue("paymentMode");r.paymentModeId=n==null?void 0:String(n);const i=await C.checkout(r.orderData());if(i.error){e.details.apiErrors=i.error;return}const s=Qe.config.forms[t]?.beforeSubmit;s&&await s(e.details.formData);const a=i.data.meta.payment_url;Qe.config.navigateTo?.(a)}function bm(e,t){Bt.defineForm({id:"checkoutGuest",submitLabel:"cart.detail.actions.checkout",fields:[{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutGuest",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;if(!C.cart)return;const i=await C.signUp(n.details.formData,!0);if(i.error){n.details.apiErrors=i.error.errors;return}await ym(n,"checkoutGuest")})}function mA(e,t){Bt.defineForm({id:"checkoutUser",submitLabel:"cart.detail.actions.checkout",fields:[{key:"acceptTerms",required:!0},{key:"paymentMode",required:!0}]}),Hr(e,"go-form",{"form-id":"checkoutUser",custom:t}),e.addEventListener("submit",async r=>{const n=r.target;await ym(n,"checkoutUser")})}function vA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return bm(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-form",ne(vA,{custom:{}},[],[]));function gA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return bm(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-guest",ne(gA,{custom:{}},[],[]));function yA(e,t){te(t,!0);let r=_(t,"custom",7,!1);return mA(t.$$host,r()),re({get custom(){return r()},set custom(n=!1){r(n),b()}})}customElements.define("go-checkout-user",ne(yA,{custom:{}},[],[]));var bA="TokenActions::ApplyOrderDiscount";async function _A(e){if(!C.cart)throw new Error("(go-coupon-redemption): cart not found");const t=C.cart,r=await C.asyncFetch(()=>C.getCouponSaleByBarcode(e));return r?.is_valid?r.value_action===bA?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?kA(e,r):r.value_cents&&r.value_cents>0?wA(e,r.value_cents):Ku([C.t("cart.coupon.form.errors.notValid")]):Ku([C.t("cart.coupon.form.errors.notValid")])}function wA(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function kA(e,t){const r=e.toUpperCase();if(C.cart.coupons.some(a=>a.code===r))return{success:!0};const n=await C.asyncFetch(()=>C.tickets({"by_ticket_ids[]":[t.is_voucher_for]})),i=Array.isArray(n)?n.find(a=>a.id===t.is_voucher_for):void 0;if(!i)return Ku([C.t("cart.coupon.form.errors.error")]);const s={...i,price_cents:0};return C.cart.addItem(ot(lo(s),{quantity:1,voucher:{code:r}})),C.cart.addCoupon({code:r,kind:"serviceVoucher"}),{success:!0}}function Ku(e){return{success:!1,errors:e}}var SA=V("<go-form></go-form>",2);function EA(e,t){te(t,!0),Bt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(o){const l=o.details.fields.find(u=>u.key==="token"),c=(o.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const f=await _A(c);return f.success?(l&&(l.value=""),o.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),f):(o.details.apiErrors=f.errors,f)}async function n(o){await r(o.target)}async function i(){const o=t.$$host.querySelector("go-form");return o?.details?r(o):{success:!0}}var s={flush:i},a=SA();return Yn(a,"formId","couponRedemption"),Ra("submit",a,n),E(e,a),re(s)}customElements.define("go-coupon-redemption",ne(EA,{},[],["flush"])),wb();var xA=class{#e=se();get campaign(){return d(this.#e)}set campaign(e){M(this.#e,e,!0)}#t=se();get amount(){return d(this.#t)}set amount(e){M(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let t=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");qr(t.filter(r=>r.campaign_id=e.campaign_id),r=>r.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!C.currentUser?.isAuthenticated||C.currentUser.isGuest)?this.skipDonation():(t.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(t)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",C.urls.cart()),window.location.replace(C.urls.cart())}},$t=new xA,TA=V('<img alt="logo"/>'),AA=V('<div role="button" tabindex="0"><div class="donation-image"><!></div> <div class="donation-info"><p class="donation-info-title"> </p> <p class="donation-info-description"> </p></div></div>');function _m(e,t){te(t,!0);let r=_(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(m){r(m),b()}},s=AA();let a;var o=$(s),l=$(o),c=m=>{var v=TA();Q(y=>me(v,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),E(m,v)};le(l,m=>{r().picture.thumbnail&&m(c)}),I(o);var f=W(o,2),u=$(f),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);return I(h),I(f),I(s),Q(()=>{a=Et(s,1,"go-donation-campaign",null,a,{selected:$t.campaign?.id===r()?.id}),Y(p,d(n)["donations.headline"]),Y(g,d(n)["donations.shop.info"])}),pt("click",s,()=>$t.selectCampaign(r())),pt("keydown",s,m=>{m.key==="Enter"&&$t.selectCampaign(r())}),E(e,s),re(i)}lr(["click","keydown"]),ne(_m,{campaign:{}},[],[],{mode:"open"});function CA(e,t){return t=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:t}).format(e):new Intl.NumberFormat("de-DE",{style:"currency",currency:t}).format(e)}function ln(e){if(!e)return;const t=e.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return t.length>0?t:void 0}var OA=V("<button> </button>"),DA=V('<form id="donationForm" action="" novalidate=""><div class="donation-custom form-group"><label for="donation-custom-amount"> </label> <input class="form-control" id="donation-custom-amount" type="number" min="1"/></div></form>'),IA=V('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function wm(e,t){te(t,!0);const r=$t.campaign?.guest_limit/100;let n=se(void 0);function i(p){$t.amount=p,M(n,null)}function s(p){const h=document.getElementById("donationForm");h.checkValidity()?$t.amount=p.target.valueAsNumber*100:($t.amount=void 0,h.reportValidity())}var a=IA(),o=$(a),l=$(o,!0);I(o);var c=W(o,2);Fe(c,20,()=>$t.campaign?.options,p=>p,(p,h)=>{var g=OA();let m;var v=$(g,!0);I(g),Q(y=>{m=Et(g,1,"btn btn-default",null,m,{selected:$t.amount===h}),Y(v,y)},[()=>CA(h/100,C.currency)]),pt("click",g,()=>i(h)),E(p,g)}),I(c);var f=W(c,2),u=p=>{var h=DA(),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2);Ms(y),I(g),I(h),Q((x,k)=>{Y(v,x),me(y,"max",r),me(y,"placeholder",k),Bl(y,d(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),pt("input",y,s),E(p,h)};le(f,p=>{$t.campaign?.free_donations&&p(u)}),I(a),Q(p=>Y(l,p),[()=>C.t("donations.selection.title")]),E(e,a),re()}lr(["click","input"]),ne(wm,{},[],[],{mode:"open"});var PA=V('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function $A(e,t){te(t,!1),sn(()=>{C.donations?.campaigns?.length==1&&$t.selectCampaign(C.donations?.campaigns[0])}),Xl();var r=X(),n=z(r),i=s=>{var a=PA(),o=$(a);Fe(o,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{_m(m,{get campaign(){return d(v)}})});var l=W(o,2),c=m=>{wm(m,{})};le(l,m=>{$t.campaign&&m(c)});var f=W(l,2),u=$(f),p=$(u,!0);I(u);var h=W(u,2),g=$(h,!0);I(h),I(f),I(a),Q((m,v)=>{Y(p,m),h.disabled=!$t.amount,Y(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),pt("click",u,function(...m){$t.skipDonation?.apply(this,m)}),pt("click",h,function(...m){$t.addDonationToCart?.apply(this,m)}),E(s,a)};le(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),E(e,r),re()}lr(["click"]),customElements.define("go-donations",ne($A,{},[],[]));function MA(e){return typeof e=="function"}function Ks(e){return e!==null&&typeof e=="object"}var FA=["string","number","bigint","boolean"];function Yu(e){return e==null||FA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Yu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var bo=Symbol("box"),km=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[bo]:!0,[km]:!0,get current(){return d(r)},set current(n){t(n)}}:{[bo]:!0,get current(){return e()}}}function Sm(e){return Ks(e)&&bo in e}function NA(e){return Sm(e)?e:MA(e)?L(e):Er(e)}function Er(e){let t=se(Pe(e));return{[bo]:!0,[km]:!0,get current(){return d(t)},set current(r){M(t,r,!0)}}}function Em(...e){return function(t){for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):r.current?.call(this,t)}}}var xm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,RA=/\n/g,LA=/^\s*/,zA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,qA=/^:\s*/,UA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,VA=/^[;\s]*/,BA=/^\s+|\s+$/g,jA=`
78
+ `,Tm="/",Am="*",ai="",ZA="comment",WA="declaration";function HA(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var m=g.match(RA);m&&(r+=m.length);var v=g.lastIndexOf(jA);n=~v?g.length-v:n+g.length}function s(){var g={line:r,column:n};return function(m){return m.position=new a(g),c(),m}}function a(g){this.start=g,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function o(g){var m=new Error(t.source+":"+r+":"+n+": "+g);if(m.reason=g,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(g){var m=g.exec(e);if(m){var v=m[0];return i(v),e=e.slice(v.length),m}}function c(){l(LA)}function f(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(Tm!=e.charAt(0)||Am!=e.charAt(1))){for(var m=2;ai!=e.charAt(m)&&(Am!=e.charAt(m)||Tm!=e.charAt(m+1));)++m;if(m+=2,ai===e.charAt(m-1))return o("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,g({type:ZA,comment:v})}}function p(){var g=s(),m=l(zA);if(m){if(u(),!l(qA))return o("property missing ':'");var v=l(UA),y=g({type:WA,property:Cm(m[0].replace(xm,ai)),value:v?Cm(v[0].replace(xm,ai)):ai});return l(VA),y}}function h(){var g=[];f(g);for(var m;m=p();)m!==!1&&(g.push(m),f(g));return g}return c(),h()}function Cm(e){return e?e.replace(BA,ai):ai}function GA(e,t){let r=null;if(!e||typeof e!="string")return r;const n=HA(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(r=r||{},r[a]=o)}),r}var KA=/\d/,YA=["-","_","/","."];function JA(e=""){if(!KA.test(e))return e!==e.toLowerCase()}function QA(e){const t=[];let r="",n,i;for(const s of e){const a=YA.includes(s);if(a===!0){t.push(r),r="",n=void 0;continue}const o=JA(s);if(i===!1){if(n===!1&&o===!0){t.push(r),r=s,n=o;continue}if(n===!0&&o===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=o;continue}}r+=s,n=o,i=a}return t.push(r),t}function Om(e){return e?QA(e).map(t=>eC(t)).join(""):""}function XA(e){return tC(Om(e||""))}function eC(e){return e?e[0].toUpperCase()+e.slice(1):""}function tC(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ys(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Om(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[XA(n)]=i}return GA(e,r),t}function Js(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function rC(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}var nC=rC(/[A-Z]/,e=>`-${e.toLowerCase()}`);function iC(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${nC(t)}: ${e[t]};`).join(`
79
+ `)}function Qs(e={}){return iC(e).replace(`
80
+ `," ")}var sC=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],aC=new Set(sC);function oC(e){return aC.has(e)}function Ke(...e){const t={...e[0]};for(let r=1;r<e.length;r++){const n=e[r];if(n){for(const i of Object.keys(n)){const s=t[i],a=n[i],o=typeof s=="function",l=typeof a=="function";if(o&&oC(i))t[i]=Em(s,a);else if(o&&l)t[i]=Js(s,a);else if(i==="class"){const c=Yu(s),f=Yu(a);c&&f?t[i]=za(s,a):c?t[i]=za(s):f&&(t[i]=za(a))}else if(i==="style"){const c=typeof s=="object",f=typeof a=="object",u=typeof s=="string",p=typeof a=="string";if(c&&f)t[i]={...s,...a};else if(c&&p){const h=Ys(a);t[i]={...s,...h}}else if(u&&f)t[i]={...Ys(s),...a};else if(u&&p){const h=Ys(s),g=Ys(a);t[i]={...h,...g}}else c?t[i]=s:f?t[i]=a:u?t[i]=s:p&&(t[i]=a)}else t[i]=a!==void 0?a:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],a=n[i];t[i]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=Qs(t.style).replaceAll(`
81
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Dm={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%)"},lC=Qs(Dm),Im=typeof window<"u"?window:void 0,sN=typeof window<"u"?window.document:void 0,aN=typeof window<"u"?window.navigator:void 0,oN=typeof window<"u"?window.location:void 0;function uC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var cC=class extends Map{#e=new Map;#t=se(0);#r=se(0);#n=nn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return nn===this.#n?se(e):En(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 d(this.#t),!1;return d(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{d(this.#t);return}return d(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),a=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),M(this.#r,super.size),Lr(a);else if(i!==t){Lr(n);var o=a.reactions===null?null:new Set(a.reactions);(o===null||!n.reactions?.every(l=>o.has(l)))&&Lr(a)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),M(r,-1)),n&&(M(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#r,0);for(var t of e.values())M(t,-1);Lr(this.#t),e.clear()}}#s(){d(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)d(r)}keys(){return d(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#r),super.size}},dC=class{#e;#t;constructor(e={}){const{window:t=Im,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=Sl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?uC(this.#e):null}},lN=new dC;function fC(e){return typeof e=="function"}var Mt=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Ab(this.#t)}get(){const e=Id(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Id(this.#t);return t===void 0?e:t}set(e){return Tb(this.#t,e)}};function hC(e,t){switch(e){case"post":ve(t);break;case"pre":Il(t);break}}function Ju(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,a=Array.isArray(e)?[]:void 0;hC(t,()=>{const o=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,a=o;return}const l=Le(()=>r(o,a));return a=o,l})}function Pm(e,t,r){const n=Es(()=>{let i=!1;Ju(e,t,(s,a)=>{if(i){n();return}const o=r(s,a);return i=!0,o},{lazy:!0})});ve(()=>n)}function nt(e,t,r){Ju(e,"post",t,r)}function pC(e,t,r){Ju(e,"pre",t,r)}nt.pre=pC;function mC(e,t){Pm(e,"post",t)}function vC(e,t){Pm(e,"pre",t)}mC.pre=vC;function $m(e){return fC(e)?e():e}var gC=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(d(this.#a)?.(),this.getSize().width));#o=D(()=>(d(this.#a)?.(),this.getSize().height));#a=D(()=>{const e=$m(this.#n);if(e)return Sl(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,a=Array.isArray(s)?s:[s];this.#e.width=a.reduce((o,l)=>Math.max(o,l.inlineSize),0),this.#e.height=a.reduce((o,l)=>Math.max(o,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??Im,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=$m(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),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-a,height:r-s-o}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return d(this.#a)?.(),this.getSize()}get width(){return d(this.#s)}get height(){return d(this.#o)}};function yC(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const a=await e(...i);n&&(n(a),n=null)},t)})}function bC(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 Mm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:a,debounce:o,throttle:l}=r;let c=se(Pe(a)),f=se(!1),u=se(void 0),p=se(Pe([]));const h=()=>{d(p).forEach(k=>k()),M(p,[],!0)},g=k=>{M(p,[...d(p),k],!0)},m=async(k,T,S=!1)=>{try{M(f,!0),M(u,void 0),h();const O=new AbortController;g(()=>O.abort());const P=await t(k,T,{data:d(c),refetching:S,onCleanup:g,signal:O.signal});return M(c,P,!0),P}catch(O){O instanceof DOMException&&O.name==="AbortError"||M(u,O,!0);return}finally{M(f,!1)}},v=o?yC(m,o):l?bC(m,l):m,y=Array.isArray(e)?e:[e];let x;return n((k,T)=>{s&&x||(x=k,v(Array.isArray(e)?k:k[0],Array.isArray(e)?T:T?.[0]))},{lazy:i}),{get current(){return d(c)},get loading(){return d(f)},get error(){return d(u)},mutate:k=>{M(c,k,!0)},refetch:k=>{const T=y.map(S=>S());return v(Array.isArray(e)?T:T[0],Array.isArray(e)?T:T[0],k??!0)}}}function _C(e,t,r){return Mm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];nt(()=>s.map(o=>o()),(o,l)=>{n(o,l??[])},i)})}function wC(e,t,r){return Mm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],a=()=>s.map(o=>o());nt.pre(a,(o,l)=>{n(o,l??[])},i)})}_C.pre=wC;function oi(e){ve(()=>()=>{e()})}function kC(e,t){return setTimeout(t,e)}function Xs(e){gf().then(e)}var SC=1,EC=9,xC=11;function Qu(e){return Ks(e)&&e.nodeType===SC&&typeof e.nodeName=="string"}function Fm(e){return Ks(e)&&e.nodeType===EC}function TC(e){return Ks(e)&&e.constructor?.name==="VisualViewport"}function AC(e){return Ks(e)&&e.nodeType!==void 0}function Nm(e){return AC(e)&&e.nodeType===xC&&"host"in e}function CC(e,t){if(!e||!t||!Qu(e)||!Qu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Nm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function _o(e){return Fm(e)?e:TC(e)?e.document:e?.ownerDocument??document}function Rm(e){return Nm(e)?Rm(e.host):Fm(e)?e.defaultView??window:Qu(e)?e.ownerDocument?.defaultView??window:window}function OC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Wi=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e=="function"?this.element=L(e):this.element=e}getDocument=()=>_o(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>OC(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 et(e,t){return{[S_()]:r=>Sm(e)?(e.current=r,Le(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Le(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Xu(e){return e?"true":void 0}function Ue(e){return e?"":void 0}function Lm(e){return e?"open":"closed"}function DC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var IC=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 wo(e){const t=new IC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var ec="ArrowDown",zm="ArrowLeft",qm="ArrowRight",tc="ArrowUp",PC="Backspace",$C="Enter",uN="Escape",cN=" ",dN="Tab",fN="a",hN="P",pN="A",mN="p",un=typeof document<"u",Um=MC();function MC(){return un&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Tr(e){return e instanceof HTMLElement}function li(e){return e instanceof Element}function FC(e){return e instanceof Element||e instanceof SVGElement}function ko(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Nn(e){return e===null}function So(e){return e.pointerType==="touch"}function NC(e){return e!==null}var RC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,oi(()=>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 a=t.getAnimations();if(a.length===0){n();return}Promise.all(a.map(o=>o.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(o=>o.pending||o.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 a="data-starting-style";if(!t.hasAttribute(a)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(a)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[a]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Xs(t):t()}},Vm=class{#e;#t;#r;#n=se(!1);#i=se(void 0);#s=!1;#o=null;constructor(e){this.#e=e,M(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new RC({ref:this.#e.ref,afterTick:this.#e.open}),oi(()=>this.#a()),nt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#a(),!t&&this.#e.shouldSkipExitAnimation?.()){M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.();return}if(t&&M(this.#n,!0),M(this.#i,t?"starting":"ending",!0),t&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&M(this.#i,void 0)})),!this.#t){t||M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||M(this.#n,!1),M(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return d(this.#n)}get transitionStatus(){return d(this.#i)}#a(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function xe(){}function Ie(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var LC=new Mt("BitsConfig");function zC(){const e=new qC(null,{});return LC.getOr(e).opts}var qC=class{opts;constructor(e,t){const r=UC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function UC(e,t){return r=>L(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function Bm(e,t){return r=>{const n=zC();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var jm=Bm(e=>e.defaultLocale,"en"),vN=Bm(e=>e.defaultPortalTo,"body"),VC=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 gt(e,this.eventName,n,r)}};function Zm(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 Wm(e,t){return e===t||e.contains(t)}function Hm(e){return e?.ownerDocument??document}function BC(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 Gm=["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] *)"],Eo=Gm.join(","),Km=typeof Element>"u",ui=Km?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xo=!Km&&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},To=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]"):To(t.parentNode))},jC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Ym=function(t,r,n){if(To(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Eo));return r&&ui.call(t,Eo)&&i.unshift(t),i=i.filter(n),i},Ao=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var a=s.shift();if(!To(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),l=Ao(o.length?o:a.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{ui.call(a,Eo)&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var c=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),f=!To(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&f){var u=Ao(c===!0?a.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else s.unshift.apply(s,a.children)}}return i},Jm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||jC(t))&&!Jm(t)?0:t.tabIndex},ZC=function(t,r){var n=Qm(t);return n<0&&r&&!Jm(t)?0:n},WC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Xm=function(t){return t.tagName==="INPUT"},HC=function(t){return Xm(t)&&t.type==="hidden"},GC=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},KC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},YC=function(t){if(!t.name)return!0;var r=t.form||xo(t),n=function(o){return r.querySelectorAll('input[type="radio"][name="'+o+'"]')},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(a){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",a.message),!1}var s=KC(i,t.form);return!s||s===t},JC=function(t){return Xm(t)&&t.type==="radio"},QC=function(t){return JC(t)&&!YC(t)},XC=function(t){var r,n=t&&xo(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var a,o,l;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,f,u;n=xo(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},ev=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},eO=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=ui.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ui.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var o=t.parentElement,l=xo(t);if(o&&!o.shadowRoot&&i(o)===!0)return ev(t);t.assignedSlot?t=t.assignedSlot:!o&&l!==t.ownerDocument?t=l.host:t=o}t=a}if(XC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ev(t);return!1},tO=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 ui.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Co=function(t,r){return!(r.disabled||HC(r)||eO(r,t)||GC(r)||tO(r))},rc=function(t,r){return!(QC(r)||Qm(r)<0||!Co(t,r))},rO=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},tv=function(t){var r=[],n=[];return t.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,l=ZC(o,a),c=a?tv(i.candidates):o;l===0?a?r.push.apply(r,c):r.push(o):n.push({documentOrder:s,tabIndex:l,item:i,isScope:a,content:c})}),n.sort(WC).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},nO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ao([t],r.includeContainer,{filter:rc.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:rO}):n=Ym(t,r.includeContainer,rc.bind(null,r)),tv(n)},iO=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ao([t],r.includeContainer,{filter:Co.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Ym(t,r.includeContainer,Co.bind(null,r)),n},sO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ui.call(t,Eo)===!1?!1:rc(r,t)},aO=Gm.concat("iframe:not([inert]):not([inert] *)").join(","),oO=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ui.call(t,aO)===!1?!1:Co(r,t)};function lO(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 nc(e,t){return e>=0&&e<t.length}var uO="data-context-menu-trigger",cO="data-context-menu-content",gN=new Mt("Menu.Root"),yN=new Mt("Menu.Root | Menu.Sub"),bN=new Mt("Menu.Content"),_N=new Mt("Menu.Group | Menu.RadioGroup"),wN=new Mt("Menu.RadioGroup"),kN=new Mt("Menu.CheckboxGroup"),SN=new VC("bitsmenuopen",{bubbles:!1,cancelable:!0}),EN=wo({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 dO=class py{static create(t){return new py(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#o;#a=xe;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#o=t.onFocusOutside,ve(()=>{this.#s=Hm(this.opts.ref.current)});let r=xe;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};nt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return kC(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),oi(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#a(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Xs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#o.current?.(t)})};#u(){return Js(gt(this.#s,"pointerdown",Js(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Js(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=rv(t)),this.#e.current(t)};#d=Zm(t=>{if(!this.opts.ref.current){this.#a();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||pO(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#a();return}let n=t;if(n.defaultPrevented&&(n=rv(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#a();return}t.pointerType==="touch"?(this.#a(),this.#a=gt(this.#s,"click",this.#c,{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=hO(this.opts.ref.current))};#m=t=>this.opts.ref.current?Wm(this.opts.ref.current,t):!1;#v=Zm(()=>{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 fO(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function hO(e){const t=[...globalThis.bitsDismissableLayers],r=fO(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function pO(e,t){const r=e.target;if(!FC(r))return!1;const n=!!r.closest(`[${uO}]`),i=!!t.closest(`[${cO}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Hm(r).documentElement.contains(r)&&!Wm(t,r)&&BC(e,t)}function rv(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,a)=>a==="currentTarget"?t:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:a==="defaultPrevented"?i:a in s?s[a]:e[a]})}function nv(e,t){te(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,xe),i=_(t,"onFocusOutside",7,xe),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const f=dO.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>o()),onFocusOutside:L(()=>i()),isValidEvent:L(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),b()},get onInteractOutside(){return n()},set onInteractOutside(g=xe){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=xe){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return a()},set children(g){a(g),b()},get enabled(){return o()},set enabled(g){o(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=X(),h=z(p);return we(h,()=>a()??Re,()=>({props:f.props})),E(e,p),re(u)}ne(nv,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var mO=class my{static create(t){return new my(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Wi(this.opts.ref);let r=xe;nt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>gt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!vO(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 vO(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 iv(e,t){te(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,xe),i=_(t,"children",7),s=_(t,"enabled",7),a=_(t,"ref",7);mO.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:a()});var o={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(f="close"){r(f),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(f=xe){n(f),b()},get children(){return i()},set children(f){i(f),b()},get enabled(){return s()},set enabled(f){s(f),b()},get ref(){return a()},set ref(f){a(f),b()}},l=X(),c=z(l);return we(c,()=>i()??Re),E(e,l),re(o)}ne(iv,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var gO=class vy{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new vy),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)}},yO=class gy{#e=!1;#t=null;#r=gO.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.#o()}unmount(){this.#t&&(this.#s(),this.#a(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#o(){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.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#a(){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=a=>{if(this.#e||!this.#r.isActiveScope(this))return;const o=a.target;if(o)if(t.contains(o))this.#r.setFocusMemory(this,o);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&oO(l))a.preventDefault(),l.focus();else{const c=this.#c(),f=this.#d()[0];(c||f||t).focus()}}},i=a=>{if(!this.#i.loop||this.#e||a.key!=="Tab"||!this.#r.isActiveScope(this))return;const o=this.#u();if(o.length===0)return;const l=o[0],c=o[o.length-1];!a.shiftKey&&r.activeElement===c?(a.preventDefault(),l.focus()):a.shiftKey&&r.activeElement===l&&(a.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const a=this.#r.getFocusMemory(this);if(a&&!t.contains(a)){const o=this.#c(),l=this.#d()[0],c=o||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?nO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?iO(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return nt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new gy(t)),r.mount(n)):r&&(r.unmount(),r=null)}),oi(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function sv(e,t){te(t,!0);let r=_(t,"enabled",7,!1),n=_(t,"trapFocus",7,!1),i=_(t,"loop",7,!1),s=_(t,"onCloseAutoFocus",7,xe),a=_(t,"onOpenAutoFocus",7,xe),o=_(t,"focusScope",7),l=_(t,"ref",7);const c=yO.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>a()),ref:l()});var f={get enabled(){return r()},set enabled(h=!1){r(h),b()},get trapFocus(){return n()},set trapFocus(h=!1){n(h),b()},get loop(){return i()},set loop(h=!1){i(h),b()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(h=xe){s(h),b()},get onOpenAutoFocus(){return a()},set onOpenAutoFocus(h=xe){a(h),b()},get focusScope(){return o()},set focusScope(h){o(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=X(),p=z(u);return we(p,()=>o()??Re,()=>({props:c.props})),E(e,u),re(f)}ne(sv,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var av=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var bO=class yy{static create(t){return new yy(t)}opts;domContext;#e=xe;#t=!1;#r=av;#n=av;constructor(t){this.opts=t,this.domContext=new Wi(t.ref);let r=xe;nt(()=>[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.#a(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Js(gt(this.domContext.getDocument(),"pointerdown",this.#o),gt(this.domContext.getDocument(),"pointerup",Em(this.#a,this.#s)))}#s=t=>{this.#n(t)};#o=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!wO(this)||!CC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=_O(r,this.domContext.getDocument().body)))};#a=()=>{this.#e(),this.#e=xe}},ov=e=>e.style.userSelect||e.style.webkitUserSelect;function _O(e,t){const r=ov(t),n=ov(e);return Oo(t,"none"),Oo(e,"text"),()=>{Oo(t,r),Oo(e,n)}}function Oo(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function wO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function lv(e,t){te(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,xe),i=_(t,"onPointerUp",7,xe),s=_(t,"id",7),a=_(t,"children",7),o=_(t,"enabled",7),l=_(t,"ref",7);bO.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>o()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=xe){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=xe){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return a()},set children(p){a(p),b()},get enabled(){return o()},set enabled(p){o(p),b()},get ref(){return l()},set ref(p){l(p),b()}},f=X(),u=z(f);return we(u,()=>a()??Re),E(e,f),re(c)}ne(lv,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Rn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var kO=class{#e;#t=0;#r=se();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),M(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,d(this.#r)===void 0&&(this.#n=Es(()=>{M(this.#r,this.#e(...e),!0)})),ve(()=>()=>{this.#i()}),d(this.#r)}},Do=new cC,Io=se(null),ic=null,ea=null,ta=!1,uv=L(()=>{for(const e of Do.values())if(e)return!0;return!1}),sc=null,SO=new kO(()=>{function e(){document.body.setAttribute("style",d(Io)??""),document.body.style.removeProperty("--scrollbar-width"),Um&&ic?.(),M(Io,null)}function t(){ea!==null&&(window.clearTimeout(ea),ea=null)}function r(i,s){t(),ta=!0,sc=Date.now();const a=sc,o=()=>{ea=null,sc===a&&(cv(Do)?ta=!1:(ta=!1,s()))},l=i===null?24:i;ea=window.setTimeout(o,l)}function n(){d(Io)===null&&Do.size===0&&!ta&&M(Io,document.body.getAttribute("style"),!0)}return nt(()=>uv.current,()=>{if(!uv.current)return;n(),ta=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),a=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),o=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+o,margin:Number.parseInt(s.marginRight??"0",10)};o>0&&!a&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${o}px`)),document.body.style.overflow="hidden",Um&&(ic=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Xs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),oi(()=>()=>{ic?.()}),{get lockMap(){return Do},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),EO=class{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=SO.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=L(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),oi(()=>{if(this.#n.lockMap.delete(this.#e),cv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function cv(e){for(const[t,r]of e)if(r)return!0;return!1}function ac(e,t){te(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new EO(r(),()=>n()),re({get preventScroll(){return r()},set preventScroll(i=!0){r(i),b()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),b()}})}ne(ac,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function xO(e){if(!un||!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(!Tr(t)){const i=e.createElement("div");i.style.cssText=lC,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(!Tr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Tr(s)?s:null}}}function Po(e){const t=xO(e);function r(n,i="assertive",s=7500){if(!t||!un||!e)return;const a=t.getLog(i),o=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),o.innerText=n,i==="assertive"?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},s)}return{announce:r}}var TO={defaultValue:void 0,granularity:"day"};function dv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...TO,...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(Vt())?s=n.toDate(Vt()):i&&s>i.toDate(Vt())&&(s=i.toDate(Vt()));const a=s.getFullYear(),o=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Fi(a,o,l,0,0,0):new Bs(a,o,l)}}function fv(e,t){let r;return t instanceof Pn?r=hp(e):t instanceof Fi?r=fp(e):r=oo(e),r.calendar!==t.calendar?Jt(r,t.calendar):r}function jt(e,t=Vt()){return e instanceof Pn?e.toDate():e.toDate(t)}function AO(e){if(e instanceof Bs)return"date";if(e instanceof Fi)return"datetime";if(e instanceof Pn)return"zoneddatetime";throw new Error("Unknown date type")}function CO(e,t){switch(t){case"date":return oo(e);case"datetime":return fp(e);case"zoneddatetime":return hp(e);default:throw new Error(`Unknown date type: ${t}`)}}function OO(e){return e instanceof Fi}function oc(e){return e instanceof Pn}function $o(e){return OO(e)||oc(e)}function ra(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 ci(e,t){return e.compare(t)<0}function DO(e,t){return e.compare(t)>0}function hv(e,t,r){const n=Gh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function pv(e,t,r){const n=Gh(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 Mo=["day","month","year"],Fo=["hour","minute","second","dayPeriod"],mv=["literal","timeZoneName"],na=[...Mo,...Fo],vv=[...na,...mv],IO=[...Fo,...mv],xN=vv.filter(e=>e!=="literal"),TN=IO.filter(e=>e!=="literal"),PO=["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"],$O=["year","month","day"],lc={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 MO(e){if(gv(e))return lc[e];{const t=LO(e);return gv(t)?lc[t]:lc.en}}function uc(e,t,r){return FO(e)?MO(r)[e]:RO(e)?t:NO(e)?"––":""}function gv(e){return PO.includes(e)}function FO(e){return $O.includes(e)}function NO(e){return e==="hour"||e==="minute"||e==="second"}function RO(e){return e==="era"||e==="dayPeriod"}function LO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function cc(e){const t=["hour","minute","second"],r=na.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 zO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((o,l)=>{if(!bv(l))return o;if("hour"in t&&l==="dayPeriod"){const c=t[l];Nn(c)?o[l]=uc(l,"AM",n):o[l]=c}else o[l]=a(l);return o},{});function a(o){if("hour"in t){const l=t[o],c=typeof l=="string"&&l?.startsWith("0"),f=l!==null?Number.parseInt(l):null;if(l==="0"&&o!=="year")return"0";if(!Nn(l)&&!Nn(f)){const u=r.part(i.set({[o]:l}),o,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&wv(n)===12;if(o==="hour"&&p){if(f>12){const h=f-12;return h===0?"12":h<10?`0${h}`:`${h}`}return f===0?"12":f<10?`0${f}`:`${f}`}return o==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return uc(o,"",n)}else{if(No(o)){const l=t[o],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return uc(o,"",n);{const f=r.part(i.set({[o]:l}),o);return o==="year"?`${l}`:c&&f.length===1?`0${f}`:f}}return""}}return s}function qO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:a}=e;return n.toParts(r,VO(t,a)).map(o=>["literal","dayPeriod","timeZoneName",null].includes(o.type)||!bv(o.type)?{part:o.type,value:o.value}:{part:o.type,value:i[o.type]}).filter(o=>!(Nn(o.part)||Nn(o.value)||o.part==="timeZoneName"&&(!oc(r)||s)))}function UO(e){const t=zO(e);return{obj:t,arr:qO({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 yv(){return na.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function No(e){return Mo.includes(e)}function bv(e){return na.includes(e)}function BO(e){return vv.includes(e)}function _v(e){return!un||!e?[]:Ro(e).map(t=>t.dataset.segment).filter(t=>na.includes(t))}function jO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=_v(r);let s=n;for(const a of i)if("hour"in t){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}else if(No(a)){const o=t[a];if(Nn(o))continue;s=s.set({[a]:t[a]})}return s}function ZO(e,t){const r=_v(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(No(n)&&e[n]===null)return!1;return!0}function WO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Fo.includes(t)||Mo.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function HO(e,t){return t||($o(e)?"minute":"day")}function dc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ko(e))}function GO(e,t){if(!un)return!1;const r=Ro(t);return r.length?r[0].id===e:!1}function KO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!un)return;const s=r.selectedDate(n),a=i.getElementById(t);if(a)a.innerText=`Selected Date: ${s}`;else{const o=i.createElement("div");o.style.cssText=Qs({display:"none"}),o.id=t,o.innerText=`Selected Date: ${s}`,i.body.appendChild(o)}}function YO(e,t){if(!un)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function wv(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 ia(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=fc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function JO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function QO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function fc(e,t){const r=Ro(t);return r.length?{next:JO(e,r),prev:QO(e,r)}:{next:null,prev:null}}function kv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=fc(r,t);n&&n.focus()}function Sv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=fc(r,t);n&&n.focus()}function sa(e){return e==="ArrowRight"||e==="ArrowLeft"}function Ro(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Tr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!BO(r)||r==="literal")}):[]}function XO(e){return Ro(e)[0]}var eD={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Ev(e){let t=e.initialLocale;function r(h){t=h}function n(){return t}function i(h,g){return new kr(t,g).format(h)}function s(h,g=!0){return $o(h)&&g?i(jt(h),{dateStyle:"long",timeStyle:"long"}):i(jt(h),{dateStyle:"long"})}function a(h){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new kr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(h):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(h.getMonth()+1):new kr(t,{month:e.monthFormat.current}).format(h)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(h.getFullYear()):new kr(t,{year:e.yearFormat.current}).format(h)}`}function o(h){return new kr(t,{month:"long"}).format(h)}function l(h){return new kr(t,{year:"numeric"}).format(h)}function c(h,g){return oc(h)?new kr(t,{...g,timeZone:h.timeZone}).formatToParts(jt(h)):new kr(t,g).formatToParts(jt(h))}function f(h,g="narrow"){return new kr(t,{weekday:g}).format(h)}function u(h,g=void 0){return new kr(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(h).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function p(h,g,m={}){const v=c(h,{...eD,...m}).find(y=>y.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:o,fullYear:l,fullMonthAndYear:a,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:f}}function tD(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function xv(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 hc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=ra(t),a=Array.from({length:s},(m,v)=>t.set({day:v+1})),o=_u(t),l=H1(t),c=r!==void 0?hv(o,r,"en-US"):hv(o,0,i),f=r!==void 0?pv(l,r,"en-US"):pv(l,0,i),u=xv(c.subtract({days:1}),o),p=xv(l,f.add({days:1})),h=u.length+a.length+p.length;if(n&&h<42){const m=42-h;let v=p[p.length-1];v||(v=t.add({months:1}).set({day:1}));let y=m;p.length===0&&(y=m-1,p.push(v));const x=Array.from({length:y},(k,T)=>{const S=T+1;return v.add({days:S})});p.push(...x)}const g=u.concat(a,p);return{value:t,dates:g,weeks:lO(g,7)}}function aa(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(hc({...n,dateObj:r})),i;i.push(hc({...n,dateObj:r}));for(let s=1;s<t;s++){const a=r.add({months:s});i.push(hc({...n,dateObj:a}))}return i}function pc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function Tv(e,t){const r=e.getAttribute("data-value");r&&(t.current=fv(r,t.current))}function rD({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:a,numberOfMonths:o}){const l=pc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(nc(c,l)){const f=l[c];return Tv(f,r),f.focus()}if(c<0){if(i)return;const f=a[0]?.value;if(!f)return;r.current=f.subtract({months:o}),Xs(()=>{const u=pc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(nc(p,u)){const h=u[p];return Tv(h,r),h.focus()}})}if(c>=l.length){if(s)return;const f=a[0]?.value;if(!f)return;r.current=f.add({months:o}),Xs(()=>{const u=pc(n);if(!u.length)return;const p=c-l.length;if(nc(p,u))return u[p].focus()})}}var Av=[ec,tc,zm,qm],Cv=[$C," "];function nD({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!tD(i)||!Av.includes(e.key)&&!Cv.includes(e.key))return;e.preventDefault();const s={[ec]:7,[tc]:-7,[zm]:-1,[qm]:1};if(Av.includes(e.key)){const a=s[e.key];a!==void 0&&r(i,a)}if(Cv.includes(e.key)){const a=i.getAttribute("data-value");if(!a)return;t(e,fv(a,n))}}function iD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.add({months:r}));else{const c=l.add({months:1}),f=aa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function sD({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:a,setPlaceholder:o}){const l=e[0]?.value;if(l)if(n)o(l.subtract({months:r}));else{const c=l.subtract({months:1}),f=aa({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:a,numberOfMonths:r});o(c),t(f)}}function aD({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(jt(i),r)):[]}function oD(e){ve(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Le(()=>{const s=e.placeholder.current;if(!s)return;const a={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(aa({...a,dateObj:s}))})})}function lD({calendarNode:e,label:t,accessibleHeadingId:r}){const n=_o(e),i=n.createElement("div");i.style.cssText=Qs({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const a=n.getElementById(r);a&&(i.parentElement?.removeChild(i),a.remove())}}function uD({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:a}){ve(()=>{e.current,Le(()=>{t().some(o=>yu(o,e.current))||a(aa({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function cD({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?DO(n.add({months:1}).set({day:1}),e):!1}function dD({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?ci(n.subtract({months:1}).set({day:35}),e):!1}function fD({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=jt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=jt(e[0].value),i=jt(e[e.length-1].value),s=r.fullMonth(n),a=r.fullMonth(i),o=r.fullYear(n),l=r.fullYear(i);return o===l?`${s} - ${a} ${l}`:`${s} ${o} - ${a} ${l}`}function hD({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Ue(r),"data-disabled":Ue(n),"data-readonly":Ue(i)}}function pD(e){const t=_o(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function mD(e){if(!un)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 CO(n,i)}function vD({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function a(o){return!!(s.current(o)||n.current&&ci(o,n.current)||i.current&&ci(i.current,o))}nt(()=>e.current,()=>{e.current&&t.current&&On(t.current,r)&&a(r)&&(t.current=mD(e.current)??r)})}function gD(e,t){return!e||!t?e:$o(e)&&$o(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var yD=wo({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 bD(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const a=r-100;n=e.placeholderYear<a?e.placeholderYear-10:a}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(a,o)=>n+o)}var Ar=new Mt("Calendar.Root | RangeCalender.Root"),Ov=class by{static create(t){return Ar.set(new by(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return d(this.#e)}set visibleMonths(t){M(this.#e,t)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=se(Pe([]));get months(){return d(this.#t)}set months(t){M(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=et(this.opts.ref),this.domContext=new Wi(t.ref),this.announcer=Po(null),this.formatter=Ev({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),sn(()=>{this.announcer=Po(this.domContext.getDocument())}),this.months=aa({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.#o(),this.#a(),uD({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}),oD({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),nt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),nt(()=>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)}),vD({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(()=>aD({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return d(this.#r)}set weekdays(t){M(this.#r,t)}#n=D(()=>Le(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return d(this.#n)}set initialPlaceholderYear(t){M(this.#n,t)}#i=D(()=>bD({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return d(this.#i)}set defaultYears(t){M(this.#i,t)}#s(){ve(()=>{if(Le(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#o(){ve(()=>{if(this.opts.ref.current)return lD({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#a(){Il(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){iD({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(){sD({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(()=>cD({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return d(this.#l)}set isNextButtonDisabled(t){M(this.#l,t)}#u=D(()=>dD({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return d(this.#u)}set isPrevButtonDisabled(t){M(this.#u,t)}#c=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 d(this.#c)}set isInvalid(t){M(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,fD({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return d(this.#d)}set headingValue(t){M(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return d(this.#h)}set fullCalendarLabel(t){M(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>yu(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&&ci(t,r)||n&&ci(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>On(n,t)):r?On(r,t):!1}shiftFocus(t,r){return rD({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=gD(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=>On(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(a=>!On(a,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&&On(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){nD({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return d(this.#f)}set snippetProps(t){M(this.#f,t)}getBitsAttr=t=>yD.getAttr(t);#m=D(()=>({...hD({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 d(this.#m)}set props(t){M(this.#m,t)}},_D=class _y{static create(t){return new _y(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},Dv=new Mt("Calendar.Cell | RangeCalendar.Cell"),wD=class wy{static create(t){return Dv.set(new wy(t,Ar.get()))}opts;root;#e=D(()=>jt(this.opts.date.current));get cellDate(){return d(this.#e)}set cellDate(t){M(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return d(this.#t)}set isUnavailable(t){M(this.#t,t)}#r=D(()=>B1(this.opts.date.current,Vt()));get isDateToday(){return d(this.#r)}set isDateToday(t){M(this.#r,t)}#n=D(()=>!yu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return d(this.#n)}set isOutsideMonth(t){M(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return d(this.#i)}set isOutsideVisibleMonths(t){M(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return d(this.#s)}set isDisabled(t){M(this.#s,t)}#o=D(()=>On(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return d(this.#o)}set isFocusedDate(t){M(this.#o,t)}#a=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return d(this.#a)}set isSelectedDate(t){M(this.#a,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return d(this.#l)}set labelText(t){M(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return d(this.#u)}set snippetProps(t){M(this.#u,t)}#c=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return d(this.#c)}set ariaDisabled(t){M(this.#c,t)}#d=D(()=>({"data-unavailable":Ue(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":Ue(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":AO(this.opts.date.current),"data-disabled":Ue(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return d(this.#d)}set sharedDataAttrs(t){M(this.#d,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":xr(this.isSelectedDate),"aria-disabled":xr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return d(this.#h)}set props(t){M(this.#h,t)}},kD=class ky{static create(t){return new ky(t,Dv.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=et(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 d(this.#t)}set snippetProps(t){M(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":xr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:d(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#r)}set props(t){M(this.#r,t)}},SD=class Sy{static create(t){return new Sy(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){M(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(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":xr(this.isDisabled),"data-disabled":Ue(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){M(this.#t,t)}},ED=class Ey{static create(t){return new Ey(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return d(this.#e)}set isDisabled(t){M(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(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":xr(this.isDisabled),"data-disabled":Ue(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#t)}set props(t){M(this.#t,t)}},xD=class xy{static create(t){return new xy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":xr(this.root.opts.readonly.current),"aria-disabled":xr(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),"data-disabled":Ue(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},TD=class Ty{static create(t){return new Ty(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},AD=class Ay{static create(t){return new Ay(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},CD=class Cy{static create(t){return new Cy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},OD=class Oy{static create(t){return new Oy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},DD=class Dy{static create(t){return new Dy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Ue(this.root.opts.disabled.current),"data-readonly":Ue(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},ID=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"]),PD=V("<div><!></div>");function Iv(e,t){te(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Rn),s=_(t,"ref",15,null),a=_(t,"value",15),o=_(t,"onValueChange",7,xe),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,xe),f=_(t,"weekdayFormat",7,"narrow"),u=_(t,"weekStartsOn",7),p=_(t,"pagedNavigation",7,!1),h=_(t,"isDateDisabled",7,()=>!1),g=_(t,"isDateUnavailable",7,()=>!1),m=_(t,"fixedWeeks",7,!1),v=_(t,"numberOfMonths",7,1),y=_(t,"locale",7),x=_(t,"calendarLabel",7,"Event"),k=_(t,"disabled",7,!1),T=_(t,"readonly",7,!1),S=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),P=_(t,"preventDeselect",7,!1),R=_(t,"type",7),j=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),B=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),oe=_(t,"yearFormat",7,"numeric"),he=We(t,ID);const J=dv({defaultValue:a(),minValue:S(),maxValue:O()});function ae(){l()===void 0&&l(J)}ae(),nt.pre(()=>l(),()=>{ae()});function ee(){a()===void 0&&a(R()==="single"?void 0:[])}ee(),nt.pre(()=>a(),()=>{ee()});const de=Ov.create({id:L(()=>i()),ref:L(()=>s(),q=>s(q)),weekdayFormat:L(()=>f()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>h()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:jm(()=>y()),calendarLabel:L(()=>x()),readonly:L(()=>T()),disabled:L(()=>k()),minValue:L(()=>S()),maxValue:L(()=>O()),disableDaysOutsideMonth:L(()=>j()),initialFocus:L(()=>N()),maxDays:L(()=>B()),placeholder:L(()=>l(),q=>{l(q),c()(q)}),preventDeselect:L(()=>P()),value:L(()=>a(),q=>{a(q),o()(q)}),type:L(()=>R()),monthFormat:L(()=>U()),yearFormat:L(()=>oe()),defaultPlaceholder:J}),ue=D(()=>Ke(he,de.props));var H={get child(){return r()},set child(q){r(q),b()},get children(){return n()},set children(q){n(q),b()},get id(){return i()},set id(q=Rn()){i(q),b()},get ref(){return s()},set ref(q=null){s(q),b()},get value(){return a()},set value(q){a(q),b()},get onValueChange(){return o()},set onValueChange(q=xe){o(q),b()},get placeholder(){return l()},set placeholder(q){l(q),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(q=xe){c(q),b()},get weekdayFormat(){return f()},set weekdayFormat(q="narrow"){f(q),b()},get weekStartsOn(){return u()},set weekStartsOn(q){u(q),b()},get pagedNavigation(){return p()},set pagedNavigation(q=!1){p(q),b()},get isDateDisabled(){return h()},set isDateDisabled(q=()=>!1){h(q),b()},get isDateUnavailable(){return g()},set isDateUnavailable(q=()=>!1){g(q),b()},get fixedWeeks(){return m()},set fixedWeeks(q=!1){m(q),b()},get numberOfMonths(){return v()},set numberOfMonths(q=1){v(q),b()},get locale(){return y()},set locale(q){y(q),b()},get calendarLabel(){return x()},set calendarLabel(q="Event"){x(q),b()},get disabled(){return k()},set disabled(q=!1){k(q),b()},get readonly(){return T()},set readonly(q=!1){T(q),b()},get minValue(){return S()},set minValue(q=void 0){S(q),b()},get maxValue(){return O()},set maxValue(q=void 0){O(q),b()},get preventDeselect(){return P()},set preventDeselect(q=!1){P(q),b()},get type(){return R()},set type(q){R(q),b()},get disableDaysOutsideMonth(){return j()},set disableDaysOutsideMonth(q=!0){j(q),b()},get initialFocus(){return N()},set initialFocus(q=!1){N(q),b()},get maxDays(){return B()},set maxDays(q){B(q),b()},get monthFormat(){return U()},set monthFormat(q="long"){U(q),b()},get yearFormat(){return oe()},set yearFormat(q="numeric"){oe(q),b()}},ie=X(),ce=z(ie),F=q=>{var ke=X(),K=z(ke);{let w=D(()=>({props:d(ue),...de.snippetProps}));we(K,r,()=>d(w))}E(q,ke)},fe=q=>{var ke=PD();ze(ke,()=>({...d(ue)}));var K=$(ke);we(K,()=>n()??Re,()=>de.snippetProps),I(ke),E(q,ke)};return le(ce,q=>{r()?q(F):q(fe,-1)}),E(e,ie),re(H)}ne(Iv,{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 $D=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),MD=V("<div><!></div>");function mc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,$D);const l=kD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);{let x=D(()=>({props:d(c),...l.snippetProps}));we(y,i,()=>d(x))}E(m,v)},g=m=>{var v=MD();ze(v,()=>({...d(c)}));var y=$(v),x=T=>{var S=X(),O=z(S);we(O,()=>n()??Re,()=>l.snippetProps),E(T,S)},k=T=>{var S=qt();Q(()=>Y(S,l.cell.opts.date.current.day)),E(T,S)};le(y,T=>{n()?T(x):T(k,-1)}),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(mc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var FD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),ND=V("<table><!></table>");function vc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,FD);const l=xD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=ND();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var RD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),LD=V("<tbody><!></tbody>");function gc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,RD);const l=TD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=LD();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var zD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),qD=V("<td><!></td>");function yc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=_(t,"date",7),l=_(t,"month",7),c=We(t,zD);const f=wD.create({id:L(()=>a()),ref:L(()=>s(),y=>s(y)),date:L(()=>o()),month:L(()=>l())}),u=D(()=>Ke(c,f.props));var p={get children(){return n()},set children(y){n(y),b()},get child(){return i()},set child(y){i(y),b()},get ref(){return s()},set ref(y=null){s(y),b()},get id(){return a()},set id(y=Ie(r)){a(y),b()},get date(){return o()},set date(y){o(y),b()},get month(){return l()},set month(y){l(y),b()}},h=X(),g=z(h),m=y=>{var x=X(),k=z(x);{let T=D(()=>({props:d(u),...f.snippetProps}));we(k,i,()=>d(T))}E(y,x)},v=y=>{var x=qD();ze(x,()=>({...d(u)}));var k=$(x);we(k,()=>n()??Re,()=>f.snippetProps),I(x),E(y,x)};return le(g,y=>{i()?y(m):y(v,-1)}),E(e,h),re(p)}ne(yc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var UD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),VD=V("<thead><!></thead>");function bc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,UD);const l=AD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=VD();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(bc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var BD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),jD=V("<th><!></th>");function _c(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,BD);const l=OD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=jD();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(_c,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var ZD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),WD=V("<tr><!></tr>");function oa(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,ZD);const l=CD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=WD();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(oa,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var HD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),GD=V("<header><!></header>");function wc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,HD);const l=DD.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c)})),E(m,v)},g=m=>{var v=GD();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>n()??Re),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(wc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var KD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),YD=V("<div><!></div>");function kc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=We(t,KD);const l=_D.create({id:L(()=>a()),ref:L(()=>s(),m=>s(m))}),c=D(()=>Ke(o,l.props));var f={get children(){return n()},set children(m){n(m),b()},get child(){return i()},set child(m){i(m),b()},get ref(){return s()},set ref(m=null){s(m),b()},get id(){return a()},set id(m=Ie(r)){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,i,()=>({props:d(c),headingValue:l.root.headingValue})),E(m,v)},g=m=>{var v=YD();ze(v,()=>({...d(c)}));var y=$(v),x=T=>{var S=X(),O=z(S);we(O,()=>n()??Re,()=>({headingValue:l.root.headingValue})),E(T,S)},k=T=>{var S=qt();Q(()=>Y(S,l.root.headingValue)),E(T,S)};le(y,T=>{n()?T(x):T(k,-1)}),I(v),E(m,v)};return le(p,m=>{i()?m(h):m(g,-1)}),E(e,u),re(f)}ne(kc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var JD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),QD=V("<button><!></button>");function Sc(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=We(t,JD);const c=SD.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get tabindex(){return o()},set tabindex(v=0){o(v),b()}},p=X(),h=z(p),g=v=>{var y=X(),x=z(y);we(x,i,()=>({props:d(f)})),E(v,y)},m=v=>{var y=QD();ze(y,()=>({...d(f)}));var x=$(y);we(x,()=>n()??Re),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),re(u)}ne(Sc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var XD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),eI=V("<button><!></button>");function Ec(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"tabindex",7,0),l=We(t,XD);const c=ED.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v))}),f=D(()=>Ke(l,c.props,{tabindex:o()}));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get tabindex(){return o()},set tabindex(v=0){o(v),b()}},p=X(),h=z(p),g=v=>{var y=X(),x=z(y);we(x,i,()=>({props:d(f)})),E(v,y)},m=v=>{var y=eI();ze(y,()=>({...d(f)}));var x=$(y);we(x,()=>n()??Re),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),re(u)}ne(Ec,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Pv=V("<input/>");function $v(e,t){te(t,!0);let r=_(t,"value",15),n=We(t,tI);const i=D(()=>Ke(n,{"aria-hidden":"true",tabindex:-1,style:{...Dm,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(f){r(f),b()}},a=X(),o=z(a),l=f=>{var u=Pv();ze(u,()=>({...d(i),value:r()}),void 0,void 0,void 0,void 0,!0),E(f,u)},c=f=>{var u=Pv();ze(u,()=>({...d(i)}),void 0,void 0,void 0,void 0,!0),Va(u,r),E(f,u)};return le(o,f=>{d(i).type==="checkbox"?f(l):f(c,-1)}),E(e,a),re(s)}ne($v,{value:{}},[],[],{mode:"open"});var rI=["top","right","bottom","left"],Ln=Math.min,Qt=Math.max,Lo=Math.round,zo=Math.floor,Yr=e=>({x:e,y:e}),nI={left:"right",right:"left",bottom:"top",top:"bottom"};function xc(e,t,r){return Qt(e,Ln(t,r))}function cn(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function Hi(e){return e.split("-")[1]}function Tc(e){return e==="x"?"y":"x"}function Ac(e){return e==="y"?"height":"width"}function Jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cc(e){return Tc(Jr(e))}function iI(e,t,r){r===void 0&&(r=!1);const n=Hi(e),i=Cc(e),s=Ac(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=qo(a)),[a,qo(a)]}function sI(e){const t=qo(e);return[Oc(e),t,Oc(t)]}function Oc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Mv=["left","right"],Fv=["right","left"],aI=["top","bottom"],oI=["bottom","top"];function lI(e,t,r){switch(e){case"top":case"bottom":return r?t?Fv:Mv:t?Mv:Fv;case"left":case"right":return t?aI:oI;default:return[]}}function uI(e,t,r,n){const i=Hi(e);let s=lI(dn(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Oc)))),s}function qo(e){const t=dn(e);return nI[t]+e.slice(t.length)}function cI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nv(e){return typeof e!="number"?cI(e):{top:e,right:e,bottom:e,left:e}}function Uo(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=Jr(t),a=Cc(t),o=Ac(a),l=dn(t),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:n.y-i.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-i.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Hi(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1);break}return h}async function dI(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=cn(t,e),g=Nv(h),m=o[p?u==="floating"?"reference":"floating":u],v=Uo(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(o.floating)),boundary:c,rootBoundary:f,strategy:l})),y=u==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),k=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},T=Uo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-T.top+g.top)/k.y,bottom:(T.bottom-v.bottom+g.bottom)/k.y,left:(v.left-T.left+g.left)/k.x,right:(T.right-v.right+g.right)/k.x}}var fI=50,hI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=a.detectOverflow?a:{...a,detectOverflow:dI},l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=Rv(c,n,l),p=n,h=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:y,fn:x}=v,{x:k,y:T,data:S,reset:O}=await x({x:f,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});f=k??f,u=T??u,g[y]={...g[y],...S},O&&h<fI&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:f,y:u}=Rv(c,p,l)),m=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:g}},pI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=cn(e,t)||{};if(c==null)return{};const u=Nv(f),p={x:r,y:n},h=Cc(i),g=Ac(h),m=await a.getDimensions(c),v=h==="y",y=v?"top":"left",x=v?"bottom":"right",k=v?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[h]-p[h]-s.floating[g],S=p[h]-s.reference[h],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let P=O?O[k]:0;(!P||!await(a.isElement==null?void 0:a.isElement(O)))&&(P=o.floating[k]||s.floating[g]);const R=T/2-S/2,j=P/2-m[g]/2-1,N=Ln(u[y],j),B=Ln(u[x],j),U=N,oe=P-m[g]-B,he=P/2-m[g]/2+R,J=xc(U,he,oe),ae=!l.arrow&&Hi(i)!=null&&he!==J&&s.reference[g]/2-(he<U?N:B)-m[g]/2<0,ee=ae?he<U?he-U:he-oe:0;return{[h]:p[h]+ee,data:{[h]:J,centerOffset:he-J-ee,...ae&&{alignmentOffset:ee}},reset:ae}}}),mI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=cn(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=dn(i),x=Jr(o),k=dn(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(k||!m?[qo(o)]:sI(o)),O=g!=="none";!p&&O&&S.push(...uI(o,m,g,T));const P=[o,...S],R=await l.detectOverflow(t,v),j=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&j.push(R[y]),u){const he=iI(i,a,T);j.push(R[he[0]],R[he[1]])}if(N=[...N,{placement:i,overflows:j}],!j.every(he=>he<=0)){var B,U;const he=(((B=s.flip)==null?void 0:B.index)||0)+1,J=P[he];if(J&&(!(u==="alignment"&&x!==Jr(J))||N.every(ee=>Jr(ee.placement)===x?ee.overflows[0]>0:!0)))return{data:{index:he,overflows:N},reset:{placement:J}};let ae=(U=N.filter(ee=>ee.overflows[0]<=0).sort((ee,de)=>ee.overflows[1]-de.overflows[1])[0])==null?void 0:U.placement;if(!ae)switch(h){case"bestFit":{var oe;const ee=(oe=N.filter(de=>{if(O){const ue=Jr(de.placement);return ue===x||ue==="y"}return!0}).map(de=>[de.placement,de.overflows.filter(ue=>ue>0).reduce((ue,H)=>ue+H,0)]).sort((de,ue)=>de[1]-ue[1])[0])==null?void 0:oe[0];ee&&(ae=ee);break}case"initialPlacement":ae=o;break}if(i!==ae)return{reset:{placement:ae}}}return{}}}};function Lv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zv(e){return rI.some(t=>e[t]>=0)}var vI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=cn(e,t);switch(i){case"referenceHidden":{const a=Lv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:zv(a)}}}case"escaped":{const a=Lv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:zv(a)}}}default:return{}}}}},qv=new Set(["left","top"]);async function gI(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=dn(r),o=Hi(r),l=Jr(r)==="y",c=qv.has(a)?-1:1,f=s&&l?-1:1,u=cn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}var yI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await gI(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},bI=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:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x,y:k}=y;return{x,y:k}}},...c}=cn(e,t),f={x:r,y:n},u=await s.detectOverflow(t,c),p=Jr(dn(i)),h=Tc(p);let g=f[h],m=f[p];if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",k=g+u[y],T=g-u[x];g=xc(k,g,T)}if(o){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",k=m+u[y],T=m-u[x];m=xc(k,m,T)}const v=l.fn({...t,[h]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:a,[p]:o}}}}}},_I=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=cn(e,t),f={x:r,y:n},u=Jr(i),p=Tc(u);let h=f[p],g=f[u];const m=cn(o,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=p==="y"?"height":"width",T=s.reference[p]-s.floating[k]+v.mainAxis,S=s.reference[p]+s.reference[k]-v.mainAxis;h<T?h=T:h>S&&(h=S)}if(c){var y,x;const k=p==="y"?"width":"height",T=qv.has(dn(i)),S=s.reference[u]-s.floating[k]+(T&&((y=a.offset)==null?void 0:y[u])||0)+(T?0:v.crossAxis),O=s.reference[u]+s.reference[k]+(T?0:((x=a.offset)==null?void 0:x[u])||0)-(T?v.crossAxis:0);g<S?g=S:g>O&&(g=O)}return{[p]:h,[u]:g}}}},wI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=cn(e,t),f=await a.detectOverflow(t,c),u=dn(i),p=Hi(i),h=Jr(i)==="y",{width:g,height:m}=s.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,v=p==="end"?"top":"bottom");const x=m-f.top-f.bottom,k=g-f.left-f.right,T=Ln(m-f[v],x),S=Ln(g-f[y],k),O=!t.middlewareData.shift;let P=T,R=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=x),O&&!p){const N=Qt(f.left,0),B=Qt(f.right,0),U=Qt(f.top,0),oe=Qt(f.bottom,0);h?R=g-2*(N!==0||B!==0?N+B:Qt(f.left,f.right)):P=m-2*(U!==0||oe!==0?U+oe:Qt(f.top,f.bottom))}await l({...t,availableWidth:R,availableHeight:P});const j=await a.getDimensions(o.floating);return g!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Vo(){return typeof window<"u"}function Gi(e){return Uv(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Uv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Uv(e){return Vo()?e instanceof Node||e instanceof Xt(e).Node:!1}function Cr(e){return Vo()?e instanceof Element||e instanceof Xt(e).Element:!1}function fn(e){return Vo()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function Vv(e){return!Vo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function la(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function kI(e){return/^(table|td|th)$/.test(Gi(e))}function Bo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var SI=/transform|translate|scale|rotate|perspective|filter/,EI=/paint|layout|strict|content/,di=e=>!!e&&e!=="none",Dc;function Ic(e){const t=Cr(e)?Or(e):e;return di(t.transform)||di(t.translate)||di(t.scale)||di(t.rotate)||di(t.perspective)||!Pc()&&(di(t.backdropFilter)||di(t.filter))||SI.test(t.willChange||"")||EI.test(t.contain||"")}function xI(e){let t=zn(e);for(;fn(t)&&!Ki(t);){if(Ic(t))return t;if(Bo(t))return null;t=zn(t)}return null}function Pc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function Ki(e){return/^(html|body|#document)$/.test(Gi(e))}function Or(e){return Xt(e).getComputedStyle(e)}function jo(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Gi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vv(e)&&e.host||Qr(e);return Vv(t)?t.host:t}function Bv(e){const t=zn(e);return Ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&la(t)?t:Bv(t)}function ua(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Bv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=Xt(i);if(s){const o=$c(a);return t.concat(a,a.visualViewport||[],la(i)?i:[],o&&r?ua(o):[])}else return t.concat(i,ua(i,[],r))}function $c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=fn(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=Lo(r)!==s||Lo(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function Mc(e){return Cr(e)?e:e.contextElement}function Yi(e){const t=Mc(e);if(!fn(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=jv(t);let a=(s?Lo(r.width):r.width)/n,o=(s?Lo(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var TI=Yr(0);function Zv(e){const t=Xt(e);return!Pc()||!t.visualViewport?TI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Xt(e)?!1:t}function fi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Mc(e);let a=Yr(1);t&&(n?Cr(n)&&(a=Yi(n)):a=Yi(e));const o=AI(s,r,n)?Zv(s):Yr(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const p=Xt(s),h=n&&Cr(n)?Xt(n):n;let g=p,m=$c(g);for(;m&&n&&h!==g;){const v=Yi(m),y=m.getBoundingClientRect(),x=Or(m),k=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,T=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,f*=v.x,u*=v.y,l+=k,c+=T,g=Xt(m),m=$c(g)}}return Uo({width:f,height:u,x:l,y:c})}function Zo(e,t){const r=jo(e).scrollLeft;return t?t.left+r:fi(Qr(e)).left+r}function Wv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Zo(e,r),y:r.top+t.scrollTop}}function CI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Qr(n),o=t?Bo(t.floating):!1;if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const f=Yr(0),u=fn(n);if((u||!u&&!s)&&((Gi(n)!=="body"||la(a))&&(l=jo(n)),u)){const h=fi(n);c=Yi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=a&&!u&&!s?Wv(a,l):Yr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-l.scrollTop*c.y+f.y+p.y}}function OI(e){return Array.from(e.getClientRects())}function DI(e){const t=Qr(e),r=jo(e),n=e.ownerDocument.body,i=Qt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Qt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Zo(e);const o=-r.scrollTop;return Or(n).direction==="rtl"&&(a+=Qt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}var Hv=25;function II(e,t){const r=Xt(e),n=Qr(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=Pc();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=Zo(n);if(c<=0){const f=n.ownerDocument,u=f.body,p=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=Hv&&(s-=g)}else c<=Hv&&(s+=c);return{width:s,height:a,x:o,y:l}}function PI(e,t){const r=fi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=fn(e)?Yi(e):Yr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Gv(e,t,r){let n;if(t==="viewport")n=II(e,r);else if(t==="document")n=DI(Qr(e));else if(Cr(t))n=PI(t,r);else{const i=Zv(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Uo(n)}function Kv(e,t){const r=zn(e);return r===t||!Cr(r)||Ki(r)?!1:Or(r).position==="fixed"||Kv(r,t)}function $I(e,t){const r=t.get(e);if(r)return r;let n=ua(e,[],!1).filter(o=>Cr(o)&&Gi(o)!=="body"),i=null;const s=Or(e).position==="fixed";let a=s?zn(e):e;for(;Cr(a)&&!Ki(a);){const o=Or(a),l=Ic(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||la(a)&&!l&&Kv(e,a))?n=n.filter(c=>c!==a):i=o,a=zn(a)}return t.set(e,n),n}function MI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Bo(t)?[]:$I(t,this._c):[].concat(r),n],a=Gv(t,s[0],i);let o=a.top,l=a.right,c=a.bottom,f=a.left;for(let u=1;u<s.length;u++){const p=Gv(t,s[u],i);o=Qt(p.top,o),l=Ln(p.right,l),c=Ln(p.bottom,c),f=Qt(p.left,f)}return{width:l-f,height:c-o,x:f,y:o}}function FI(e){const{width:t,height:r}=jv(e);return{width:t,height:r}}function NI(e,t,r){const n=fn(t),i=Qr(t),s=r==="fixed",a=fi(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=Zo(i)}if(n||!n&&!s)if((Gi(t)!=="body"||la(i))&&(o=jo(t)),n){const u=fi(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const f=i&&!n&&!s?Wv(i,o):Yr(0);return{x:a.left+o.scrollLeft-l.x-f.x,y:a.top+o.scrollTop-l.y-f.y,width:a.width,height:a.height}}function Fc(e){return Or(e).position==="static"}function Yv(e,t){if(!fn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Qr(e)===r&&(r=r.ownerDocument.body),r}function Jv(e,t){const r=Xt(e);if(Bo(e))return r;if(!fn(e)){let i=zn(e);for(;i&&!Ki(i);){if(Cr(i)&&!Fc(i))return i;i=zn(i)}return r}let n=Yv(e,t);for(;n&&kI(n)&&Fc(n);)n=Yv(n,t);return n&&Ki(n)&&Fc(n)&&!Ic(n)?r:n||xI(e)||r}var RI=async function(e){const t=this.getOffsetParent||Jv,r=this.getDimensions,n=await r(e.floating);return{reference:NI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function LI(e){return Or(e).direction==="rtl"}var zI={convertOffsetParentRelativeRectToViewportRelativeRect:CI,getDocumentElement:Qr,getClippingRect:MI,getOffsetParent:Jv,getElementRects:RI,getClientRects:OI,getDimensions:FI,getScale:Yi,isElement:Cr,isRTL:LI};function Qv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qI(e,t){let r=null,n;const i=Qr(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(o||t(),!p||!h)return;const g=zo(u),m=zo(i.clientWidth-(f+p)),v=zo(i.clientHeight-(u+h)),y=zo(f),x={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Qt(0,Ln(1,l))||1};let k=!0;function T(S){const O=S[0].intersectionRatio;if(O!==l){if(!k)return a();O?a(!1,O):n=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Qv(c,e.getBoundingClientRect())&&a(),k=!1}try{r=new IntersectionObserver(T,{...x,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,x)}r.observe(e)}return a(!0),s}function UI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Mc(e),f=i||s?[...c?ua(c):[],...t?ua(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&o?qI(c,r):null;let p=-1,h=null;a&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,m=l?fi(e):null;l&&v();function v(){const y=fi(e);m&&!Qv(m,y)&&r(),m=y,g=requestAnimationFrame(v)}return r(),()=>{var y;f.forEach(x=>{i&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var VI=yI,BI=bI,jI=mI,ZI=wI,WI=vI,HI=pI,GI=_I,KI=(e,t,r)=>{const n=new Map,i={platform:zI,...r},s={...i.platform,_c:n};return hI(e,t,{...i,platform:s})};function hi(e){return typeof e=="function"?e():e}function Xv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eg(e,t){const r=Xv(e);return Math.round(t*r)/r}function tg(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 YI(e){const t=e.whileElementsMounted,r=D(()=>hi(e.open)??!0),n=D(()=>hi(e.middleware)),i=D(()=>hi(e.transform)??!0),s=D(()=>hi(e.placement)??"bottom"),a=D(()=>hi(e.strategy)??"absolute"),o=D(()=>hi(e.sideOffset)??0),l=D(()=>hi(e.alignOffset)??0),c=e.reference;let f=se(0),u=se(0);const p=Er(null);let h=se(Pe(d(a))),g=se(Pe(d(s))),m=se(Pe({})),v=se(!1),y=!1,x=0;const k=D(()=>{const N=p.current?eg(p.current,d(f)):d(f),B=p.current?eg(p.current,d(u)):d(u);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${N}px, ${B}px)`,...p.current&&Xv(p.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${N}px`,top:`${B}px`}});let T;function S(){if(c.current===null||p.current===null)return;const N=c.current,B=p.current,U=++x;KI(N,B,{middleware:d(n),placement:d(s),strategy:d(a)}).then(oe=>{if(U===x&&!(c.current!==N||p.current!==B)){if(JI(N)){M(m,{...d(m),hide:{...d(m).hide,referenceHidden:!0}},!0);return}if(!d(r)&&d(f)!==0&&d(u)!==0){const he=Math.max(Math.abs(d(o)),Math.abs(d(l)),15);if(oe.x<=he&&oe.y<=he)return}M(f,oe.x,!0),M(u,oe.y,!0),M(h,oe.strategy,!0),M(g,oe.placement,!0),M(m,oe.middlewareData,!0),M(v,!0)}})}function O(){typeof T=="function"&&(T(),T=void 0),x++}function P(){if(O(),t===void 0){S();return}d(r)&&(c.current===null||p.current===null||(T=t(c.current,p.current,S)))}function R(){!d(r)&&p.current===null&&M(v,!1)}function j(){return[d(n),d(s),d(a),d(o),d(l),d(r)]}return ve(()=>{t===void 0&&d(r)&&S()}),ve(P),ve(()=>{if(t!==void 0){if(j(),!d(r)){y=!1;return}if(!d(v)){y=!1;return}if(!y){y=!0;return}S()}}),ve(R),ve(()=>O),{floating:p,reference:c,get strategy(){return d(h)},get placement(){return d(g)},get middlewareData(){return d(m)},get isPositioned(){return d(v)},get floatingStyles(){return d(k)},get update(){return S}}}function JI(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var QI={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=new Mt("Floating.Root"),rg=new Mt("Floating.Content"),Rc=new Mt("Floating.Root"),XI=class md{static create(t=!1){return t?Rc.set(new md):Nc.set(new md)}anchorNode=Er(null);customAnchorNode=Er(null);triggerNode=Er(null);constructor(){ve(()=>{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})}},eP=class vd{static create(t,r=!1){return r?rg.set(new vd(t,Rc.get())):rg.set(new vd(t,Nc.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=et(this.contentRef);wrapperAttachment=et(this.wrapperRef);arrowAttachment=et(this.arrowRef);arrowId=Er(Rn());#e=D(()=>{if(typeof this.opts.style=="string")return Ys(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new gC(()=>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}`:""));#o=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#a=D(()=>d(this.#o).length>0);get hasExplicitBoundaries(){return d(this.#a)}set hasExplicitBoundaries(t){M(this.#a,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#o).filter(NC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#l)}set detectOverflowOptions(t){M(this.#l,t)}#u=se(void 0);#c=se(void 0);#d=se(void 0);#h=se(void 0);#p=D(()=>[VI({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&BI({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?GI():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&jI({...this.detectOverflowOptions}),ZI({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;M(this.#u,r,!0),M(this.#c,n,!0),M(this.#d,i,!0),M(this.#h,s,!0)}}),this.arrowRef.current&&HI({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),rP({arrowWidth:d(this.#n),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&WI({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#p)}set middleware(t){M(this.#p,t)}floating;#f=D(()=>nP(this.floating.placement));get placedSide(){return d(this.#f)}set placedSide(t){M(this.#f,t)}#m=D(()=>iP(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){M(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#v)}set arrowX(t){M(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#y)}set arrowY(t){M(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#w)}set cannotCenterArrow(t){M(this.#w,t)}#_=se();get contentZIndex(){return d(this.#_)}set contentZIndex(t){M(this.#_,t,!0)}#g=D(()=>QI[this.placedSide]);get arrowBaseSide(){return d(this.#g)}set arrowBaseSide(t){M(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":`${d(this.#u)}px`,"--bits-floating-available-height":`${d(this.#c)}px`,"--bits-floating-anchor-width":`${d(this.#d)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#k)}set wrapperProps(t){M(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Qs({...d(this.#e)}),...this.contentAttachment}));get props(){return d(this.#b)}set props(t){M(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 d(this.#S)}set arrowStyle(t){M(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),nt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=YI({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>UI(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),ve(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),nt(()=>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 a=i.getComputedStyle(n).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{i.cancelAnimationFrame(s)}}),ve(()=>{this.floating.floating.current=this.wrapperRef.current})}},tP=class gd{static create(t,r=!1){return r?new gd(t,Rc.get()):new gd(t,Nc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=NA(t.virtualEl.current):r.triggerNode=t.ref}};function rP(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,o=s?0:e.arrowHeight,[l,c]=Lc(r),f={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+o/2;let h="",g="";return l==="bottom"?(h=s?f:`${u}px`,g=`${-o}px`):l==="top"?(h=s?f:`${u}px`,g=`${n.floating.height+o}px`):l==="right"?(h=`${-o}px`,g=s?f:`${p}px`):l==="left"&&(h=`${n.floating.width+o}px`,g=s?f:`${p}px`),{data:{x:h,y:g}}}}}function Lc(e){const[t,r="center"]=e.split("-");return[t,r]}function nP(e){return Lc(e)[0]}function iP(e){return Lc(e)[1]}function ng(e,t){te(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);XI.create(n());var i={get children(){return r()},set children(o){r(o),b()},get tooltip(){return n()},set tooltip(o=!1){n(o),b()}},s=X(),a=z(s);return we(a,()=>r()??Re),E(e,s),re(i)}ne(ng,{children:{},tooltip:{}},[],[],{mode:"open"});function ig(e,t){te(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),a=_(t,"tooltip",7,!1);tP.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},a());var o={get id(){return r()},set id(f){r(f),b()},get children(){return n()},set children(f){n(f),b()},get virtualEl(){return i()},set virtualEl(f){i(f),b()},get ref(){return s()},set ref(f){s(f),b()},get tooltip(){return a()},set tooltip(f=!1){a(f),b()}},l=X(),c=z(l);return we(c,()=>n()??Re),E(e,l),re(o)}ne(ig,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function sg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"side",7,"bottom"),i=_(t,"sideOffset",7,0),s=_(t,"align",7,"center"),a=_(t,"alignOffset",7,0),o=_(t,"id",7),l=_(t,"arrowPadding",7,0),c=_(t,"avoidCollisions",7,!0),f=_(t,"collisionBoundary",23,()=>[]),u=_(t,"collisionPadding",7,0),p=_(t,"hideWhenDetached",7,!1),h=_(t,"onPlaced",7,()=>{}),g=_(t,"sticky",7,"partial"),m=_(t,"updatePositionStrategy",7,"optimized"),v=_(t,"strategy",7,"fixed"),y=_(t,"dir",7,"ltr"),x=_(t,"style",23,()=>({})),k=_(t,"wrapperId",23,Rn),T=_(t,"customAnchor",7,null),S=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const P=eP.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>a()),id:L(()=>o()),arrowPadding:L(()=>l()),avoidCollisions:L(()=>c()),collisionBoundary:L(()=>f()),collisionPadding:L(()=>u()),hideWhenDetached:L(()=>p()),onPlaced:L(()=>h()),sticky:L(()=>g()),updatePositionStrategy:L(()=>m()),strategy:L(()=>v()),dir:L(()=>y()),style:L(()=>x()),enabled:L(()=>S()),wrapperId:L(()=>k()),customAnchor:L(()=>T())},O()),R=D(()=>Ke(P.wrapperProps,{style:{pointerEvents:"auto"}}));var j={get content(){return r()},set content(U){r(U),b()},get side(){return n()},set side(U="bottom"){n(U),b()},get sideOffset(){return i()},set sideOffset(U=0){i(U),b()},get align(){return s()},set align(U="center"){s(U),b()},get alignOffset(){return a()},set alignOffset(U=0){a(U),b()},get id(){return o()},set id(U){o(U),b()},get arrowPadding(){return l()},set arrowPadding(U=0){l(U),b()},get avoidCollisions(){return c()},set avoidCollisions(U=!0){c(U),b()},get collisionBoundary(){return f()},set collisionBoundary(U=[]){f(U),b()},get collisionPadding(){return u()},set collisionPadding(U=0){u(U),b()},get hideWhenDetached(){return p()},set hideWhenDetached(U=!1){p(U),b()},get onPlaced(){return h()},set onPlaced(U=()=>{}){h(U),b()},get sticky(){return g()},set sticky(U="partial"){g(U),b()},get updatePositionStrategy(){return m()},set updatePositionStrategy(U="optimized"){m(U),b()},get strategy(){return v()},set strategy(U="fixed"){v(U),b()},get dir(){return y()},set dir(U="ltr"){y(U),b()},get style(){return x()},set style(U={}){x(U),b()},get wrapperId(){return k()},set wrapperId(U=Rn()){k(U),b()},get customAnchor(){return T()},set customAnchor(U=null){T(U),b()},get enabled(){return S()},set enabled(U){S(U),b()},get tooltip(){return O()},set tooltip(U=!1){O(U),b()}},N=X(),B=z(N);return we(B,()=>r()??Re,()=>({props:P.props,wrapperProps:d(R)})),E(e,N),re(j)}ne(sg,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function ag(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);sn(()=>{n()?.()});var i={get content(){return r()},set content(o){r(o),b()},get onPlaced(){return n()},set onPlaced(o){n(o),b()}},s=X(),a=z(s);return we(a,()=>r()??Re,()=>({props:{},wrapperProps:{}})),E(e,s),re(i)}ne(ag,{content:{},onPlaced:{}},[],[],{mode:"open"});var sP=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function og(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=We(t,sP);var a={get content(){return r()},set content(u){r(u),b()},get isStatic(){return n()},set isStatic(u=!1){n(u),b()},get onPlaced(){return i()},set onPlaced(u){i(u),b()}},o=X(),l=z(o),c=u=>{ag(u,{get content(){return r()},get onPlaced(){return i()}})},f=u=>{sg(u,Tn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return le(l,u=>{n()?u(c):u(f,-1)}),E(e,o),re(a)}ne(og,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var aP=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"]),oP=V("<!> <!>",1);function zc(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),v=_(t,"collisionPadding",7),y=_(t,"sticky",7),x=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),S=_(t,"dir",7),O=_(t,"preventScroll",7),P=_(t,"wrapperId",7),R=_(t,"style",7),j=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),B=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),J=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),ue=_(t,"isStatic",7,!1),H=_(t,"enabled",7),ie=_(t,"ref",7),ce=_(t,"tooltip",7,!1),F=_(t,"contentPointerEvents",7,"auto"),fe=We(t,aP);const q=D(()=>O()??!0),ke=D(()=>T()??(d(q)?"fixed":"absolute"));var K={get popper(){return r()},set popper(w){r(w),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),b()},get id(){return a()},set id(w){a(w),b()},get onPointerDown(){return o()},set onPointerDown(w){o(w),b()},get onPointerUp(){return l()},set onPointerUp(w){l(w),b()},get side(){return c()},set side(w){c(w),b()},get sideOffset(){return f()},set sideOffset(w){f(w),b()},get align(){return u()},set align(w){u(w),b()},get alignOffset(){return p()},set alignOffset(w){p(w),b()},get arrowPadding(){return h()},set arrowPadding(w){h(w),b()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),b()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),b()},get collisionPadding(){return v()},set collisionPadding(w){v(w),b()},get sticky(){return y()},set sticky(w){y(w),b()},get hideWhenDetached(){return x()},set hideWhenDetached(w){x(w),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(w){k(w),b()},get strategy(){return T()},set strategy(w){T(w),b()},get dir(){return S()},set dir(w){S(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return P()},set wrapperId(w){P(w),b()},get style(){return R()},set style(w){R(w),b()},get onPlaced(){return j()},set onPlaced(w){j(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return B()},set onCloseAutoFocus(w){B(w),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(w){U(w),b()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(w="close"){he(w),b()},get loop(){return J()},set loop(w){J(w),b()},get trapFocus(){return ae()},set trapFocus(w=!0){ae(w),b()},get isValidEvent(){return ee()},set isValidEvent(w=()=>!1){ee(w),b()},get customAnchor(){return de()},set customAnchor(w=null){de(w),b()},get isStatic(){return ue()},set isStatic(w=!1){ue(w),b()},get enabled(){return H()},set enabled(w){H(w),b()},get ref(){return ie()},set ref(w){ie(w),b()},get tooltip(){return ce()},set tooltip(w=!1){ce(w),b()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),b()}};return og(e,{get isStatic(){return ue()},get id(){return a()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return y()},get hideWhenDetached(){return x()},get updatePositionStrategy(){return k()},get strategy(){return d(ke)},get dir(){return S()},get wrapperId(){return P()},get style(){return R()},get onPlaced(){return j()},get customAnchor(){return de()},get enabled(){return H()},get tooltip(){return ce()},content:(ye,Se)=>{let je=()=>Se?.().props,Ge=()=>Se?.().wrapperProps;var Ze=oP(),kt=z(Ze),st=Ft=>{ac(Ft,{get preventScroll(){return d(q)}})},er=Ft=>{ac(Ft,{get preventScroll(){return d(q)}})};le(kt,Ft=>{t.forceMount&&H()?Ft(st):t.forceMount||Ft(er,1)});var At=W(kt,2);sv(At,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return B()},get loop(){return J()},get enabled(){return H()},get trapFocus(){return ae()},get forceMount(){return t.forceMount},get ref(){return ie()},focusScope:(tr,Wt)=>{let mr=()=>Wt?.().props;iv(tr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return H()},get ref(){return ie()},children:(Ir,Pr)=>{nv(Ir,{get id(){return a()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return he()},get isValidEvent(){return ee()},get enabled(){return H()},get ref(){return ie()},children:($r,vr)=>{let Xr=()=>vr?.().props;lv($r,{get id(){return a()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return o()},get onPointerUp(){return l()},get enabled(){return H()},get ref(){return ie()},children:(en,St)=>{var Un=X(),as=z(Un);{let os=D(()=>({props:Ke(fe,je(),Xr(),mr(),{style:{pointerEvents:F()}}),wrapperProps:Ge()}));we(as,()=>r()??Re,()=>d(os))}E(en,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),E(ye,Ze)},$$slots:{content:!0}}),re(K)}ne(zc,{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 lP=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 lg(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),a=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),l=_(t,"onPointerDown",7),c=_(t,"onPointerUp",7),f=_(t,"side",7),u=_(t,"sideOffset",7),p=_(t,"align",7),h=_(t,"alignOffset",7),g=_(t,"arrowPadding",7),m=_(t,"avoidCollisions",7),v=_(t,"collisionBoundary",7),y=_(t,"collisionPadding",7),x=_(t,"sticky",7),k=_(t,"hideWhenDetached",7),T=_(t,"updatePositionStrategy",7),S=_(t,"strategy",7),O=_(t,"dir",7),P=_(t,"preventScroll",7),R=_(t,"wrapperId",7),j=_(t,"style",7),N=_(t,"onPlaced",7),B=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),oe=_(t,"onOpenAutoFocus",7),he=_(t,"onFocusOutside",7),J=_(t,"interactOutsideBehavior",7,"close"),ae=_(t,"loop",7),ee=_(t,"trapFocus",7,!0),de=_(t,"isValidEvent",7,()=>!1),ue=_(t,"customAnchor",7,null),H=_(t,"isStatic",7,!1),ie=_(t,"ref",7),ce=_(t,"shouldRender",7),F=We(t,lP);var fe={get popper(){return r()},set popper(w){r(w),b()},get open(){return n()},set open(w){n(w),b()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),b()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),b()},get preventOverflowTextSelection(){return a()},set preventOverflowTextSelection(w){a(w),b()},get id(){return o()},set id(w){o(w),b()},get onPointerDown(){return l()},set onPointerDown(w){l(w),b()},get onPointerUp(){return c()},set onPointerUp(w){c(w),b()},get side(){return f()},set side(w){f(w),b()},get sideOffset(){return u()},set sideOffset(w){u(w),b()},get align(){return p()},set align(w){p(w),b()},get alignOffset(){return h()},set alignOffset(w){h(w),b()},get arrowPadding(){return g()},set arrowPadding(w){g(w),b()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),b()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),b()},get collisionPadding(){return y()},set collisionPadding(w){y(w),b()},get sticky(){return x()},set sticky(w){x(w),b()},get hideWhenDetached(){return k()},set hideWhenDetached(w){k(w),b()},get updatePositionStrategy(){return T()},set updatePositionStrategy(w){T(w),b()},get strategy(){return S()},set strategy(w){S(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return P()},set preventScroll(w){P(w),b()},get wrapperId(){return R()},set wrapperId(w){R(w),b()},get style(){return j()},set style(w){j(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return B()},set onInteractOutside(w){B(w),b()},get onCloseAutoFocus(){return U()},set onCloseAutoFocus(w){U(w),b()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),b()},get onFocusOutside(){return he()},set onFocusOutside(w){he(w),b()},get interactOutsideBehavior(){return J()},set interactOutsideBehavior(w="close"){J(w),b()},get loop(){return ae()},set loop(w){ae(w),b()},get trapFocus(){return ee()},set trapFocus(w=!0){ee(w),b()},get isValidEvent(){return de()},set isValidEvent(w=()=>!1){de(w),b()},get customAnchor(){return ue()},set customAnchor(w=null){ue(w),b()},get isStatic(){return H()},set isStatic(w=!1){H(w),b()},get ref(){return ie()},set ref(w){ie(w),b()},get shouldRender(){return ce()},set shouldRender(w){ce(w),b()}},q=X(),ke=z(q),K=w=>{zc(w,Tn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return a()},get id(){return o()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return f()},get sideOffset(){return u()},get align(){return p()},get alignOffset(){return h()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return y()},get sticky(){return x()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return T()},get strategy(){return S()},get dir(){return O()},get preventScroll(){return P()},get wrapperId(){return R()},get style(){return j()},get onPlaced(){return N()},get customAnchor(){return ue()},get isStatic(){return H()},get enabled(){return n()},get onInteractOutside(){return B()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return J()},get loop(){return ae()},get trapFocus(){return ee()},get isValidEvent(){return de()},get onFocusOutside(){return he()},forceMount:!1,get ref(){return ie()}},()=>F))};return le(ke,w=>{ce()&&w(K)}),E(e,q),re(fe)}ne(lg,{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 uP=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 ug(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),a=_(t,"id",7),o=_(t,"onPointerDown",7),l=_(t,"onPointerUp",7),c=_(t,"side",7),f=_(t,"sideOffset",7),u=_(t,"align",7),p=_(t,"alignOffset",7),h=_(t,"arrowPadding",7),g=_(t,"avoidCollisions",7),m=_(t,"collisionBoundary",7),v=_(t,"collisionPadding",7),y=_(t,"sticky",7),x=_(t,"hideWhenDetached",7),k=_(t,"updatePositionStrategy",7),T=_(t,"strategy",7),S=_(t,"dir",7),O=_(t,"preventScroll",7),P=_(t,"wrapperId",7),R=_(t,"style",7),j=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),B=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),he=_(t,"interactOutsideBehavior",7,"close"),J=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),ee=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),ue=_(t,"isStatic",7,!1),H=_(t,"enabled",7),ie=We(t,uP);var ce={get popper(){return r()},set popper(F){r(F),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),b()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),b()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),b()},get id(){return a()},set id(F){a(F),b()},get onPointerDown(){return o()},set onPointerDown(F){o(F),b()},get onPointerUp(){return l()},set onPointerUp(F){l(F),b()},get side(){return c()},set side(F){c(F),b()},get sideOffset(){return f()},set sideOffset(F){f(F),b()},get align(){return u()},set align(F){u(F),b()},get alignOffset(){return p()},set alignOffset(F){p(F),b()},get arrowPadding(){return h()},set arrowPadding(F){h(F),b()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),b()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),b()},get collisionPadding(){return v()},set collisionPadding(F){v(F),b()},get sticky(){return y()},set sticky(F){y(F),b()},get hideWhenDetached(){return x()},set hideWhenDetached(F){x(F),b()},get updatePositionStrategy(){return k()},set updatePositionStrategy(F){k(F),b()},get strategy(){return T()},set strategy(F){T(F),b()},get dir(){return S()},set dir(F){S(F),b()},get preventScroll(){return O()},set preventScroll(F){O(F),b()},get wrapperId(){return P()},set wrapperId(F){P(F),b()},get style(){return R()},set style(F){R(F),b()},get onPlaced(){return j()},set onPlaced(F){j(F),b()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),b()},get onCloseAutoFocus(){return B()},set onCloseAutoFocus(F){B(F),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(F){U(F),b()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),b()},get interactOutsideBehavior(){return he()},set interactOutsideBehavior(F="close"){he(F),b()},get loop(){return J()},set loop(F){J(F),b()},get trapFocus(){return ae()},set trapFocus(F=!0){ae(F),b()},get isValidEvent(){return ee()},set isValidEvent(F=()=>!1){ee(F),b()},get customAnchor(){return de()},set customAnchor(F=null){de(F),b()},get isStatic(){return ue()},set isStatic(F=!1){ue(F),b()},get enabled(){return H()},set enabled(F){H(F),b()}};return zc(e,Tn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return a()},get onPointerDown(){return o()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return f()},get align(){return u()},get alignOffset(){return p()},get arrowPadding(){return h()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return y()},get hideWhenDetached(){return x()},get updatePositionStrategy(){return k()},get strategy(){return T()},get dir(){return S()},get preventScroll(){return O()},get wrapperId(){return P()},get style(){return R()},get onPlaced(){return j()},get customAnchor(){return de()},get isStatic(){return ue()},get enabled(){return H()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return B()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return he()},get loop(){return J()},get trapFocus(){return ae()},get isValidEvent(){return ee()},get onFocusOutside(){return oe()}},()=>ie,{forceMount:!0})),re(ce)}ne(ug,{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 Wo=wo({component:"date-field",parts:["input","label","segment"]}),Ji={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return ra(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(jt(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||wv(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}},qn=new Mt("DateField.Root"),cP=class Iy{static create(t,r){return qn.set(new Iy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=se();get segmentValues(){return d(this.#e)}set segmentValues(t){M(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return d(this.#t)}set readonlySegmentsSet(t){M(this.#t,t)}segmentStates=yv();#r=se(null);#n=se(null);#i=se(null);get descriptionNode(){return d(this.#i)}set descriptionNode(t){M(this.#i,t,!0)}#s=se(null);get validationNode(){return d(this.#s)}set validationNode(t){M(this.#s,t,!0)}states=yv();#o=se(null);get dayPeriodNode(){return d(this.#o)}set dayPeriodNode(t){M(this.#o,t,!0)}rangeRoot=void 0;#a=se("");get name(){return d(this.#a)}set name(t){M(this.#a,t,!0)}domContext=new Wi(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?Er(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=Ev({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=cc(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Po(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),ve(()=>{Le(()=>{this.initialSegments=cc(this.inferredGranularity)})}),sn(()=>{this.announcer=Po(this.domContext.getDocument())}),oi(()=>{r||YO(this.descriptionId,this.domContext.getDocument())}),ve(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ve(()=>{if(r)return;this.value.current&&KO({id:Le(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Le(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Le(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),ve(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),ve(()=>{this.value.current===void 0&&(this.segmentValues=cc(this.inferredGranularity))}),nt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){M(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:d(this.#r)}setLabelNode(t){M(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:d(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=Mo.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=Fo.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(jt(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&&ci(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&ci(i,t)?{reason:"max"}:!1});get validationStatus(){return d(this.#u)}set validationStatus(t){M(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return d(this.#c)}set isInvalid(t){M(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||HO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return d(this.#d)}set inferredGranularity(t){M(this.#d,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return d(this.#h)}set dateRef(t){M(this.#h,t)}#p=D(()=>UO({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 d(this.#p)}set allSegmentContent(t){M(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return d(this.#f)}set segmentContents(t){M(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 a=this.segmentValues;let o=a;const l=this.placeholder.current;if(WO(a)){const c=a[t],f=r;if(t==="month"){const u=f(c);if(this.states.month.updating=u,u!==null&&a.day!==null){const p=ra(jt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`)}o={...a,[t]:u}}else if(t==="dayPeriod"){const u=f(c);this.states.dayPeriod.updating=u;const p=this.value.current;if(p&&"hour"in p){const h=p.hour;u==="AM"?h>=12&&(a.hour=`${h-12}`):u==="PM"&&h<12&&(a.hour=`${h+12}`)}o={...a,[t]:u}}else if(t==="hour"){const u=f(c);if(this.states.hour.updating=u,u!==null&&a.dayPeriod!==null){const p=this.formatter.dayPeriod(jt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(a.dayPeriod=p)}o={...a,[t]:u}}else if(t==="minute"){const u=f(c);this.states.minute.updating=u,o={...a,[t]:u}}else if(t==="second"){const u=f(c);this.states.second.updating=u,o={...a,[t]:u}}else if(t==="year"){const u=f(c);this.states.year.updating=u,o={...a,[t]:u}}else if(t==="day"){const u=f(c);this.states.day.updating=u,o={...a,[t]:u}}else{const u=f(c);o={...a,[t]:u}}}else if(No(t)){const c=a[t],f=r,u=f(c);if(t==="month"&&u!==null&&a.day!==null){this.states.month.updating=u;const p=ra(jt(l.set({month:Number.parseInt(u)})));Number.parseInt(a.day)>p&&(a.day=`${p}`),o={...a,[t]:u}}else if(t==="year"){const p=f(c);this.states.year.updating=p,o={...a,[t]:p}}else if(t==="day"){const p=f(c);this.states.day.updating=p,o={...a,[t]:p}}else o={...a,[t]:u}}this.segmentValues=o,ZO(o,d(this.#r))?this.setValue(jO({segmentObj:o,fieldNode:d(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=o)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Xu(this.isInvalid),"aria-disabled":xr(this.disabled.current),"aria-readonly":xr(this.readonly.current||n),"data-invalid":Ue(this.isInvalid),"data-disabled":Ue(this.disabled.current),"data-readonly":Ue(this.readonly.current||n),"data-segment":`${t}`,[Wo.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,a=GO(r,d(this.#r))&&s,o=this.errorMessageId?.current,l=a?`${s} ${this.isInvalid&&o?o:""}`: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}}},dP=class Py{static create(t){return new Py(t,qn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Wi(t.ref),this.root.domContext=this.domContext,this.attachment=et(t.ref,n=>this.root.setFieldNode(n)),nt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(un&&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":d(this.#e),"aria-disabled":xr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Ue(this.root.disabled.current),[Wo.input]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){M(this.#t,t)}},fP=class $y{static create(){return new $y(qn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return d(this.#e)}set shouldRender(t){M(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return d(this.#t)}set isoValue(t){M(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 d(this.#r)}set props(t){M(this.#r,t)}},hP=class My{static create(t){return new My(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=et(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=XO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Ue(this.root.isInvalid),"data-disabled":Ue(this.root.disabled.current),[Wo.label]:"",onclick:this.onclick,...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},Qi=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=et(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(),!!dc(e.key))){if(qc(e.key)){this.#i(t);return}if(Uc(e.key)){this.#s(t);return}if(ko(e.key)){this.#o(e);return}if(Vc(e.key)){this.#a(e);return}sa(e.key)&&ia(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)})}#o(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,a=this.part;this.root.updateSegment(this.part,o=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(o=null,this.root.states[a].hasLeftFocus=!1),o===null)return s?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||t>i)&&(r=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return t!==0?(r=!0,this.root.states[a].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[a].lastKeyZero=!1,"00"):o;const l=Number.parseInt(o+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&kv(e,this.root.getFieldNode())}#a(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&&Sv(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(),a=this.#e();let o=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(o=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o}}#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 d(this.#l)}set props(e){M(this.#l,e)}},pP=class extends Qi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Ji.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!dc(e.key))){if(qc(e.key)){this.#r(),super.onkeydown(e);return}if(Uc(e.key)){this.#r(),super.onkeydown(e);return}if(ko(e.key)){this.#i(e);return}if(Vc(e.key)){this.#s(e);return}sa(e.key)&&ia(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),cg(s));this.announcer.announce(s),t=!0;const a=`${s}`;return a.length>4?a.slice(0,4):a}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&kv(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&&Sv(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?cg(Number.parseInt(t)):t)}},mP=class extends Qi{constructor(e,t){super(e,t,"day",Ji.day)}},vP=class extends Qi{constructor(e,t){super(e,t,"month",Ji.month)}},gP=class extends Qi{constructor(e,t){super(e,t,"hour",Ji.hour)}onkeydown(e){if(ko(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)}},yP=class extends Qi{constructor(e,t){super(e,t,"minute",Ji.minute)}},bP=class extends Qi{constructor(e,t){super(e,t,"second",Ji.second)}},_P=class Fy{static create(t){return new Fy(t,qn.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=et(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!EP(t.key))){if(qc(t.key)||Uc(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}Vc(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}),sa(t.key)&&ia(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 d(this.#t)}set props(t){M(this.#t,t)}},wP=class Ny{static create(t){return new Ny(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Xu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},kP=class Ry{static create(t){return new Ry(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=et(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&sa(t.key)&&ia(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":Ue(!0),...this.attachment}));get props(){return d(this.#e)}set props(t){M(this.#e,t)}},SP=class{static create(e,t){const r=qn.get();switch(e){case"day":return new mP(t,r);case"month":return new vP(t,r);case"year":return new pP(t,r);case"hour":return new gP(t,r);case"minute":return new yP(t,r);case"second":return new bP(t,r);case"dayPeriod":return new _P(t,r);case"literal":return new wP(t,r);case"timeZoneName":return new kP(t,r)}}};function EP(e){return dc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function qc(e){return e===tc}function Uc(e){return e===ec}function Vc(e){return e===PC}function cg(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function dg(e,t){te(t,!1);const r=fP.create();Xl();var n=X(),i=z(n),s=a=>{$v(a,Tn(()=>r.props))};le(i,a=>{r.shouldRender&&a(s)}),E(e,n),re()}ne(dg,{},[],[],{mode:"open"});var xP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),TP=V("<div><!></div>"),AP=V("<!> <!>",1);function fg(e,t){const r=mt();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),a=_(t,"children",7),o=_(t,"child",7),l=We(t,xP);const c=dP.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(v=Ie(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get name(){return s()},set name(v=""){s(v),b()},get children(){return a()},set children(v){a(v),b()},get child(){return o()},set child(v){o(v),b()}},p=AP(),h=z(p),g=v=>{var y=X(),x=z(y);we(x,o,()=>({props:d(f),segments:c.root.segmentContents})),E(v,y)},m=v=>{var y=TP();ze(y,()=>({...d(f)}));var x=$(y);we(x,()=>a()??Re,()=>({segments:c.root.segmentContents})),I(y),E(v,y)};return le(h,v=>{o()?v(g):v(m,-1)}),dg(W(h,2),{}),E(e,p),re(u)}ne(fg,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var CP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),OP=V("<div><!></div>");function hg(e,t){const r=mt();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=We(t,CP);const l=hP.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>Ke(o,l.props));var f={get id(){return n()},set id(m=Ie(r)){n(m),b()},get ref(){return i()},set ref(m=null){i(m),b()},get children(){return s()},set children(m){s(m),b()},get child(){return a()},set child(m){a(m),b()}},u=X(),p=z(u),h=m=>{var v=X(),y=z(v);we(y,a,()=>({props:d(c)})),E(m,v)},g=m=>{var v=OP();ze(v,()=>({...d(c)}));var y=$(v);we(y,()=>s()??Re),I(v),E(m,v)};return le(p,m=>{a()?m(h):m(g,-1)}),E(e,u),re(f)}ne(hg,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var DP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),IP=V("<span><!></span>");function pg(e,t){const r=mt();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),a=_(t,"child",7),o=_(t,"part",7),l=We(t,DP);const c=SP.create(o(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),f=D(()=>Ke(l,c.props));var u={get id(){return n()},set id(v=Ie(r)){n(v),b()},get ref(){return i()},set ref(v=null){i(v),b()},get children(){return s()},set children(v){s(v),b()},get child(){return a()},set child(v){a(v),b()},get part(){return o()},set part(v){o(v),b()}},p=X(),h=z(p),g=v=>{var y=X(),x=z(y);we(x,a,()=>({props:d(f)})),E(v,y)},m=v=>{var y=IP();ze(y,()=>({...d(f)}));var x=$(y);we(x,()=>s()??Re),I(y),E(v,y)};return le(h,v=>{a()?v(g):v(m,-1)}),E(e,p),re(u)}ne(pg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var mg=new Mt("DatePicker.Root"),PP=class Ly{static create(t){return mg.set(new Ly(t))}opts;constructor(t){this.opts=t}};function Bc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let a=0,o=s-1;a<s;o=a++){const[l,c]=t[a]??[0,0],[f,u]=t[o]??[0,0];c>=n!=u>=n&&r<=(f-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function jc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function vg(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,a=i-r,o=s-n;return Math.abs(a)>Math.abs(o)?a>0?"right":"left":o>0?"bottom":"top"}var $P=class{#e;#t;#r;#n=null;#i=null;#s=[];#o=null;#a=null;#l=null;#u(){this.#a!==null&&(cancelAnimationFrame(this.#a),this.#a=null)}#c(){this.#u(),this.#a=requestAnimationFrame(()=>{this.#a=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#d(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#d(),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,nt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#o=null,this.#f();return}this.#o&&this.#o!==r&&this.#f(),this.#o=r;const s=_o(r),a=u=>{this.#p([u.clientX,u.clientY],r,n)},o=u=>{const p=u.relatedTarget;if(li(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];li(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=li(p)&&h.length>0?h.filter(g=>p.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#c())},l=()=>{this.#f()},c=()=>{this.#f()},f=u=>{const p=u.relatedTarget;li(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",a),gt(r,"pointerleave",o),gt(r,"pointerenter",l),gt(n,"pointerenter",c),gt(n,"pointerleave",f)].reduce((u,p)=>()=>{u(),p()},()=>{})})}#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"&&jc(e,i)){this.#f();return}if(this.#i==="trigger"&&jc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(jc(e,c))return;const f=vg(n,c),u=this.#m(n,c,f);if(u&&Bc(e,u))return}const s=vg(n,i),a=this.#m(n,i,s);if(a&&Bc(e,a))return;const o=this.#i==="content"?i:n;Bc(e,this.#v(this.#n,o,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#d()}#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,a]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,a+i],[s+i,a+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,a-i],[s+i,a-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,a-i],[s+i,a+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,a-i],[s-i,a+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"}}},Zc=wo({component:"popover",parts:["root","trigger","content","close","overlay"]}),Wc=new Mt("Popover.Root"),MP=class zy{static create(t){return Wc.set(new zy(t))}opts;#e=se(null);get contentNode(){return d(this.#e)}set contentNode(t){M(this.#e,t,!0)}contentPresence;#t=se(null);get triggerNode(){return d(this.#t)}set triggerNode(t){M(this.#t,t,!0)}#r=se(null);get overlayNode(){return d(this.#r)}set overlayNode(t){M(this.#r,t,!0)}overlayPresence;#n=se(!1);get openedViaHover(){return d(this.#n)}set openedViaHover(t){M(this.#n,t,!0)}#i=se(!1);get hasInteractedWithContent(){return d(this.#i)}set hasInteractedWithContent(t){M(this.#i,t,!0)}#s=se(!1);get hoverCooldown(){return d(this.#s)}set hoverCooldown(t){M(this.#s,t,!0)}#o=se(0);get closeDelay(){return d(this.#o)}set closeDelay(t){M(this.#o,t,!0)}#a=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Vm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Vm({ref:L(()=>this.overlayNode),open:this.opts.open}),nt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#a!==null&&this.#l&&(this.#l.clearTimeout(this.#a),this.#a=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.#a=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#a=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},FP=class qy{static create(t){return new qy(t,Wc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=se(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=et(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Wi(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),nt(()=>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||So(t)||(M(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&&(So(t)||(M(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),d(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}d(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())}#o(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#a=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":Lm(this.root.opts.open.current),"aria-controls":this.#o(),[Zc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#a)}set props(t){M(this.#a,t)}},NP=class Uy{static create(t){return new Uy(t,Wc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=et(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 $P({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;li(r)&&sO(r)&&this.root.markInteraction()}onpointerenter(t){So(t)||this.root.cancelDelayedClose()}onpointerleave(t){So(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!li(t.target))return;const r=t.target.closest(Zc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(li(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 d(this.#e)}set snippetProps(t){M(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Lm(this.root.opts.open.current),...DC(this.root.contentPresence.transitionStatus),[Zc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return d(this.#t)}set props(t){M(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function gg(e,t){te(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,xe),i=_(t,"onOpenChangeComplete",7,xe),s=_(t,"value",15),a=_(t,"onValueChange",7,xe),o=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,xe),c=_(t,"isDateUnavailable",7,()=>!1),f=_(t,"validate",7,xe),u=_(t,"onInvalid",7,xe),p=_(t,"minValue",7),h=_(t,"maxValue",7),g=_(t,"disabled",7,!1),m=_(t,"readonly",7,!1),v=_(t,"granularity",7),y=_(t,"readonlySegments",23,()=>[]),x=_(t,"hourCycle",7),k=_(t,"locale",7),T=_(t,"hideTimeZone",7,!1),S=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),P=_(t,"disableDaysOutsideMonth",7,!0),R=_(t,"preventDeselect",7,!1),j=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),B=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),oe=_(t,"fixedWeeks",7,!1),he=_(t,"numberOfMonths",7,1),J=_(t,"closeOnDateSelect",7,!0),ae=_(t,"initialFocus",7,!1),ee=_(t,"errorMessageId",7),de=_(t,"children",7),ue=_(t,"monthFormat",7,"long"),H=_(t,"yearFormat",7,"numeric");const ie=dv({granularity:v(),defaultValue:s(),minValue:p(),maxValue:h()});function ce(){o()===void 0&&o(ie)}ce(),nt.pre(()=>o(),()=>{ce()});function F(){J()&&r(!1)}const fe=PP.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),a()(w)}),placeholder:L(()=>o(),w=>{o(w),l()(w)}),isDateUnavailable:L(()=>c()),minValue:L(()=>p()),maxValue:L(()=>h()),disabled:L(()=>g()),readonly:L(()=>m()),granularity:L(()=>v()),readonlySegments:L(()=>y()),hourCycle:L(()=>x()),locale:jm(()=>k()),hideTimeZone:L(()=>T()),required:L(()=>S()),calendarLabel:L(()=>O()),disableDaysOutsideMonth:L(()=>P()),preventDeselect:L(()=>R()),pagedNavigation:L(()=>j()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>B()),isDateDisabled:L(()=>U()),fixedWeeks:L(()=>oe()),numberOfMonths:L(()=>he()),initialFocus:L(()=>ae()),onDateSelect:L(()=>F),defaultPlaceholder:ie,monthFormat:L(()=>ue()),yearFormat:L(()=>H())});MP.create({open:fe.opts.open,onOpenChangeComplete:L(()=>i())}),cP.create({value:fe.opts.value,disabled:fe.opts.disabled,readonly:fe.opts.readonly,readonlySegments:fe.opts.readonlySegments,validate:L(()=>f()),onInvalid:L(()=>u()),minValue:fe.opts.minValue,maxValue:fe.opts.maxValue,granularity:fe.opts.granularity,hideTimeZone:fe.opts.hideTimeZone,hourCycle:fe.opts.hourCycle,locale:fe.opts.locale,required:fe.opts.required,placeholder:fe.opts.placeholder,errorMessageId:L(()=>ee()),isInvalidProp:L(()=>{})});var q={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=xe){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=xe){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return a()},set onValueChange(w=xe){a(w),b()},get placeholder(){return o()},set placeholder(w){o(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=xe){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return f()},set validate(w=xe){f(w),b()},get onInvalid(){return u()},set onInvalid(w=xe){u(w),b()},get minValue(){return p()},set minValue(w){p(w),b()},get maxValue(){return h()},set maxValue(w){h(w),b()},get disabled(){return g()},set disabled(w=!1){g(w),b()},get readonly(){return m()},set readonly(w=!1){m(w),b()},get granularity(){return v()},set granularity(w){v(w),b()},get readonlySegments(){return y()},set readonlySegments(w=[]){y(w),b()},get hourCycle(){return x()},set hourCycle(w){x(w),b()},get locale(){return k()},set locale(w){k(w),b()},get hideTimeZone(){return T()},set hideTimeZone(w=!1){T(w),b()},get required(){return S()},set required(w=!1){S(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return P()},set disableDaysOutsideMonth(w=!0){P(w),b()},get preventDeselect(){return R()},set preventDeselect(w=!1){R(w),b()},get pagedNavigation(){return j()},set pagedNavigation(w=!1){j(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return B()},set weekdayFormat(w="narrow"){B(w),b()},get isDateDisabled(){return U()},set isDateDisabled(w=()=>!1){U(w),b()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),b()},get numberOfMonths(){return he()},set numberOfMonths(w=1){he(w),b()},get closeOnDateSelect(){return J()},set closeOnDateSelect(w=!0){J(w),b()},get initialFocus(){return ae()},set initialFocus(w=!1){ae(w),b()},get errorMessageId(){return ee()},set errorMessageId(w){ee(w),b()},get children(){return de()},set children(w){de(w),b()},get monthFormat(){return ue()},set monthFormat(w="long"){ue(w),b()},get yearFormat(){return H()},set yearFormat(w="numeric"){H(w),b()}},ke=X(),K=z(ke);return $e(K,()=>ng,(w,ye)=>{ye(w,{children:(Se,je)=>{var Ge=X(),Ze=z(Ge);we(Ze,()=>de()??Re),E(Se,Ge)},$$slots:{default:!0}})}),E(e,ke),re(q)}ne(gg,{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 RP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),LP=V("<div><!></div>");function yg(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=We(t,RP);const l=mg.get(),c=Ov.create({id:L(()=>s()),ref:L(()=>a(),v=>a(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:L(()=>"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:L(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),f=D(()=>Ke(o,c.props));var u={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()}},p=X(),h=z(p),g=v=>{var y=X(),x=z(y);{let k=D(()=>({props:d(f),...c.snippetProps}));we(x,i,()=>d(k))}E(v,y)},m=v=>{var y=LP();ze(y,()=>({...d(f)}));var x=$(y);we(x,()=>n()??Re,()=>c.snippetProps),I(y),E(v,y)};return le(h,v=>{i()?v(g):v(m,-1)}),E(e,p),re(u)}ne(yg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var zP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),bg=V("<div><div><!></div></div>");function _g(e,t){const r=mt();te(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),a=_(t,"id",23,()=>Ie(r)),o=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,xe),c=_(t,"onCloseAutoFocus",7,xe),f=_(t,"onEscapeKeydown",7,xe),u=_(t,"onInteractOutside",7,xe),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),m=_(t,"style",7),v=We(t,zP);const y=NP.create({id:L(()=>a()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>f()),customAnchor:L(()=>g())}),x=D(()=>Ke(v,y.props)),k=D(()=>p()&&y.shouldTrapFocus);function T(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var S={get child(){return n()},set child(N){n(N),b()},get children(){return i()},set children(N){i(N),b()},get ref(){return s()},set ref(N=null){s(N),b()},get id(){return a()},set id(N=Ie(r)){a(N),b()},get forceMount(){return o()},set forceMount(N=!1){o(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=xe){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=xe){c(N),b()},get onEscapeKeydown(){return f()},set onEscapeKeydown(N=xe){f(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=xe){u(N),b()},get trapFocus(){return p()},set trapFocus(N=!0){p(N),b()},get preventScroll(){return h()},set preventScroll(N=!1){h(N),b()},get customAnchor(){return g()},set customAnchor(N=null){g(N),b()},get style(){return m()},set style(N){m(N),b()}},O=X(),P=z(O),R=N=>{ug(N,Tn(()=>d(x),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let he=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ae=D(()=>Ke(he(),{style:tg("popover")},{style:m()}));var ee=X(),de=z(ee),ue=ie=>{var ce=X(),F=z(ce);{let fe=D(()=>({props:d(ae),wrapperProps:J(),...y.snippetProps}));we(F,n,()=>d(fe))}E(ie,ce)},H=ie=>{var ce=bg();ze(ce,()=>({...J()}));var F=$(ce);ze(F,()=>({...d(ae)}));var fe=$(F);we(fe,()=>i()??Re),I(F),I(ce),E(ie,ce)};le(de,ie=>{n()?ie(ue):ie(H,-1)}),E(U,ee)},$$slots:{popper:!0}}))},j=N=>{lg(N,Tn(()=>d(x),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return a()},get trapFocus(){return d(k)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:T,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let he=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ae=D(()=>Ke(he(),{style:tg("popover")},{style:m()}));var ee=X(),de=z(ee),ue=ie=>{var ce=X(),F=z(ce);{let fe=D(()=>({props:d(ae),wrapperProps:J(),...y.snippetProps}));we(F,n,()=>d(fe))}E(ie,ce)},H=ie=>{var ce=bg();ze(ce,()=>({...J()}));var F=$(ce);ze(F,()=>({...d(ae)}));var fe=$(F);we(fe,()=>i()??Re),I(F),I(ce),E(ie,ce)};le(de,ie=>{n()?ie(ue):ie(H,-1)}),E(U,ee)},$$slots:{popper:!0}}))};return le(P,N=>{o()?N(R):o()||N(j,1)}),E(e,O),re(S)}ne(_g,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var qP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function wg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=We(t,qP);const s=D(()=>Ke({onOpenAutoFocus:n()},{onOpenAutoFocus:pD}));var a={get ref(){return r()},set ref(o=null){r(o),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(o){n(o),b()}};return _g(e,Tn(()=>d(s),()=>i,{get ref(){return r()},set ref(o){r(o)}})),re(a)}ne(wg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var UP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),VP=V("<button><!></button>");function kg(e,t){const r=mt();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),a=_(t,"ref",15,null),o=_(t,"type",7,"button"),l=_(t,"disabled",7,!1),c=_(t,"openOnHover",7,!1),f=_(t,"openDelay",7,700),u=_(t,"closeDelay",7,300),p=We(t,UP);const h=FP.create({id:L(()=>s()),ref:L(()=>a(),v=>a(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>f()),closeDelay:L(()=>u())}),g=D(()=>Ke(p,h.props,{type:o()}));var m={get children(){return n()},set children(v){n(v),b()},get child(){return i()},set child(v){i(v),b()},get id(){return s()},set id(v=Ie(r)){s(v),b()},get ref(){return a()},set ref(v=null){a(v),b()},get type(){return o()},set type(v="button"){o(v),b()},get disabled(){return l()},set disabled(v=!1){l(v),b()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),b()},get openDelay(){return f()},set openDelay(v=700){f(v),b()},get closeDelay(){return u()},set closeDelay(v=300){u(v),b()}};return ig(e,{get id(){return s()},get ref(){return h.opts.ref},children:(v,y)=>{var x=X(),k=z(x),T=O=>{var P=X(),R=z(P);we(R,i,()=>({props:d(g)})),E(O,P)},S=O=>{var P=VP();ze(P,()=>({...d(g)}));var R=$(P);we(R,()=>n()??Re),I(P),E(O,P)};le(k,O=>{i()?O(T):O(S,-1)}),E(v,x)},$$slots:{default:!0}}),re(m)}ne(kg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var BP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Sg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=We(t,BP);function s(l){if(sa(l.key)){const c=l.currentTarget.closest(Wo.selector("input"));if(!c)return;ia(l,c)}}const a=D(()=>Ke({onkeydown:n()},{onkeydown:s}));var o={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return kg(e,Tn(()=>i,{"data-segment":"trigger"},()=>d(a),{get ref(){return r()},set ref(l){r(l)}})),re(o)}ne(Sg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Hc=V("<!> <!>",1),Eg=V("<!> <!> <!>",1);function xg(e,t){te(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),a=se(Pe(ei(Vt())));const o="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ve(()=>{r(d(a).toString())});var l={get dateString(){return r()},set dateString(u){r(u),b()},get labelClass(){return n()},set labelClass(u){n(u),b()},get inputClass(){return i()},set inputClass(u){i(u),b()},get labelText(){return s()},set labelText(u){s(u),b()}},c=X(),f=z(c);{let u=D(()=>C.locale||"de");$e(f,()=>gg,(p,h)=>{h(p,{get locale(){return d(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(ei(Vt()))<0,get value(){return d(a)},set value(g){M(a,g,!0)},children:(g,m)=>{var v=Eg(),y=z(v);$e(y,()=>hg,(T,S)=>{S(T,{get id(){return o},get class(){return`go-datepicker-label ${n()??""}`},children:(O,P)=>{var R=X(),j=z(R),N=B=>{var U=X(),oe=z(U);we(oe,s),E(B,U)};le(j,B=>{s()&&B(N)}),E(O,R)},$$slots:{default:!0}})});var x=W(y,2);{const T=(S,O)=>{let P=()=>O?.().segments;var R=Hc(),j=z(R);Fe(j,17,P,an,(B,U)=>{let oe=()=>d(U).part,he=()=>d(U).value;var J=X(),ae=z(J);$e(ae,()=>pg,(ee,de)=>{de(ee,{get part(){return oe()},children:(ue,H)=>{Ct();var ie=qt();Q(()=>Y(ie,he())),E(ue,ie)},$$slots:{default:!0}})}),E(B,J)});var N=W(j,2);$e(N,()=>Sg,(B,U)=>{U(B,{get"aria-labelledby"(){return o},class:"go-calendar-button"})}),E(S,R)};$e(x,()=>fg,(S,O)=>{O(S,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var k=W(x,2);$e(k,()=>wg,(T,S)=>{S(T,{children:(O,P)=>{var R=X(),j=z(R);{const N=(B,U)=>{let oe=()=>U?.().months,he=()=>U?.().weekdays;var J=Hc(),ae=z(J);$e(ae,()=>wc,(de,ue)=>{ue(de,{children:(H,ie)=>{var ce=Eg(),F=z(ce);$e(F,()=>Ec,(ke,K)=>{K(ke,{class:"go-datepicker-previous"})});var fe=W(F,2);$e(fe,()=>kc,(ke,K)=>{K(ke,{class:"go-datepicker-selected-month"})});var q=W(fe,2);$e(q,()=>Sc,(ke,K)=>{K(ke,{class:"go-datepicker-next"})}),E(H,ce)},$$slots:{default:!0}})});var ee=W(ae,2);Fe(ee,16,oe,de=>de,(de,ue)=>{var H=X(),ie=z(H);$e(ie,()=>vc,(ce,F)=>{F(ce,{children:(fe,q)=>{var ke=Hc(),K=z(ke);$e(K,()=>bc,(ye,Se)=>{Se(ye,{children:(je,Ge)=>{var Ze=X(),kt=z(Ze);$e(kt,()=>oa,(st,er)=>{er(st,{children:(At,Ft)=>{var tr=X(),Wt=z(tr);Fe(Wt,17,he,an,(mr,Ir)=>{var Pr=X(),bn=z(Pr);$e(bn,()=>_c,($r,vr)=>{vr($r,{children:(Xr,en)=>{Ct();var St=qt();Q(()=>Y(St,d(Ir))),E(Xr,St)},$$slots:{default:!0}})}),E(mr,Pr)}),E(At,tr)},$$slots:{default:!0}})}),E(je,Ze)},$$slots:{default:!0}})});var w=W(K,2);$e(w,()=>gc,(ye,Se)=>{Se(ye,{children:(je,Ge)=>{var Ze=X(),kt=z(Ze);Fe(kt,16,()=>ue.weeks,st=>st,(st,er)=>{var At=X(),Ft=z(At);$e(Ft,()=>oa,(tr,Wt)=>{Wt(tr,{children:(mr,Ir)=>{var Pr=X(),bn=z(Pr);Fe(bn,16,()=>er,$r=>$r,($r,vr,Xr,en)=>{var St=X(),Un=z(St);$e(Un,()=>yc,(as,os)=>{os(as,{get date(){return vr},get month(){return ue.value},children:(ha,id)=>{var bi=X(),ls=z(bi);$e(ls,()=>mc,(gr,Vn)=>{Vn(gr,{})}),E(ha,bi)},$$slots:{default:!0}})}),E($r,St)}),E(mr,Pr)},$$slots:{default:!0}})}),E(st,At)}),E(je,Ze)},$$slots:{default:!0}})}),E(fe,ke)},$$slots:{default:!0}})}),E(de,H)}),E(B,J)};$e(j,()=>yg,(B,U)=>{U(B,{children:N,$$slots:{default:!0}})})}E(O,R)},$$slots:{default:!0}})}),E(g,v)},$$slots:{default:!0}})})}return E(e,c),re(l)}ne(xg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var jP=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),ZP=V('<span class="go-field-star" aria-hidden="true">*</span>'),WP=V(" <!>",1),HP=V("<label><!></label> <input/>",1),GP=V("<label><!></label> <textarea></textarea>",1),KP=V('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),YP=V("<label><!></label> <input/> <!>",1),JP=V('<label><input/> <span class="go-checkbox-label"><!></span></label>'),QP=V('<img src="" alt=""/> <option> </option>',1),XP=V('<option disabled="" hidden="" selected=""> </option> <!>',1),e$=V("<!>",1),t$=V("<label><!></label> <select><!></select>",1),r$=V('<img style="width: 60px" aria-hidden="true"/>'),n$=V('<span class="go-payment-mode-icons"></span>'),i$=V('<span class="go-payment-mode-name"> </span>'),s$=V('<label><input type="radio"/> <!></label>'),a$=V('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),o$=V("<label> <input/></label>"),l$=V("<fieldset><legend><!></legend> <!></fieldset>");function Tg(e,t){te(t,!0);const r=J=>{Ct();var ae=WP(),ee=z(ae),de=W(ee),ue=H=>{var ie=ZP();E(H,ie)};le(de,H=>{u().required&&H(ue)}),Q(()=>Y(ee,`${d(R)??""} `)),E(J,ae)},n=J=>{var ae=HP(),ee=z(ae);r($(ee)),I(ee);var de=W(ee,2);ze(de,()=>({...d(P),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),Q(()=>{Et(ee,1,ur(h())),me(ee,"for",d(S))}),Va(de,()=>u().value,ue=>u(u().value=ue,!0)),E(J,ae)},i=J=>{var ae=GP(),ee=z(ae);r($(ee)),I(ee);var de=W(ee,2);Jb(de),ze(de,()=>({...d(P),...v,class:g(),placeholder:u().placeholder,name:u().key})),Q(()=>{Et(ee,1,ur(h())),me(ee,"for",d(S))}),Va(de,()=>u().value,ue=>u(u().value=ue,!0)),E(J,ae)},s=J=>{var ae=YP(),ee=z(ae);r($(ee)),I(ee);var de=W(ee,2),ue=ce=>{const F=ce.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),d(x)?d(x).validateField(u()):u().validate()};ze(de,()=>({...d(P),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:ue}),void 0,void 0,void 0,void 0,!0);var H=W(de,2),ie=ce=>{var F=KP(),fe=$(F),q=W(fe,2),ke=$(q,!0);I(q),I(F),Q(K=>{me(F,"data-field-preview",u().key),me(fe,"src",d(N)),me(fe,"alt",K),Y(ke,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),E(ce,F)};le(H,ce=>{d(N)&&u().value instanceof File&&ce(ie)}),Q(()=>{Et(ee,1,ur(h())),me(ee,"for",d(S))}),E(J,ae)},a=J=>{var ae=JP(),ee=$(ae);ze(ee,()=>({...d(P),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var de=W(ee,2);r($(de)),I(de),I(ae),Q(()=>{Et(ae,1,ur(h())),me(ae,"for",d(S))}),B_(ee,()=>u().value===!0,ue=>{u(u().value=ue,!0)}),E(J,ae)},o=J=>{var ae=t$(),ee=z(ae);r($(ee)),I(ee);var de=W(ee,2);ze(de,()=>({...d(P),...v,name:u().key,class:g()})),U_(de,()=>{var ue=$(de),H=e$(),ie=z(H),ce=F=>{var fe=XP(),q=z(fe),ke=$(q,!0);I(q),q.value=q.__value="";var K=W(q,2);Fe(K,17,()=>u().options(),w=>w.value,(w,ye)=>{var Se=QP(),je=W(z(Se),2),Ge=$(je,!0);I(je);var Ze={};Q(()=>{Y(Ge,d(ye).label),Ze!==(Ze=d(ye).value)&&(je.value=(je.__value=d(ye).value)??"")}),E(w,Se)}),Q(w=>Y(ke,w),[()=>C.t("common.choose")]),E(F,fe)};le(ie,F=>{u().options&&F(ce)}),E(ue,H)}),Q(()=>{Et(ee,1,ur(h())),me(ee,"for",d(S))}),P_(de,()=>u().value,ue=>u(u().value=ue,!0)),E(J,ae)},l=J=>{xg(J,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(ae){u(u().value=ae,!0)}})},c=J=>{const ae=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var ee=a$(),de=$(ee);r($(de)),I(de);var ue=W(de,2);Fe(ue,17,()=>d(ae),H=>H.id,(H,ie)=>{var ce=s$(),F=$(ce);Ms(F);var fe=W(F,2),q=K=>{var w=n$();Fe(w,20,()=>d(ie).icons,ye=>ye,(ye,Se)=>{const je=D(()=>j+Se+".svg");var Ge=r$();Q(()=>{Et(Ge,1,ur(Se)),me(Ge,"src",d(je)),me(Ge,"alt",Se+" icon")}),E(ye,Ge)}),I(w),E(K,w)},ke=K=>{var w=i$(),ye=$(w,!0);I(w),Q(()=>Y(ye,d(ie).name)),E(K,w)};le(fe,K=>{d(ie).icons.length>0?K(q):K(ke,-1)}),I(ce),Q((K,w,ye)=>{me(F,"name",u().key),Bl(F,K),R_(F,w),me(F,"hidden",d(ae).length===1),me(F,"aria-label",ye)},[()=>String(d(ie).id),()=>u().value===String(d(ie).id),()=>C.t(`cart.paymentMode.ariaLabel.${d(ie).name.toLowerCase()}`)]),pt("change",F,()=>{u(u().value=String(d(ie).id),!0)}),E(H,ce)}),I(ee),Q(()=>{me(ee,"aria-required",u().required),me(ee,"aria-invalid",u().errors.length>0)}),E(J,ee)},f=J=>{var ae=l$(),ee=$(ae);r($(ee)),I(ee);var de=W(ee,2),ue=H=>{var ie=X(),ce=z(ie);Fe(ce,17,()=>u().options(),F=>F.value,(F,fe)=>{var q=o$(),ke=$(q),K=W(ke);ze(K,()=>({...d(P),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(q),Q(()=>{Et(q,1,ur(h())),me(q,"for",d(S)+d(fe).value),Y(ke,`${d(fe).label??""} `)}),Va(K,()=>u().value,w=>u(u().value=w,!0)),E(F,q)}),E(H,ie)};le(de,H=>{u().options&&H(ue)}),I(ae),E(J,ae)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),m=_(t,"host",7),v=We(t,jP);const y=qi(m()),x=D(()=>y.value),k={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:a,select:o,radio:f,date:l,file:s,textarea:i,paymentMode:c},T=D(()=>k[u().type]);let S=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(d(x)?d(x).validateField(u()):u().validate())}const P=D(()=>({id:d(S),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let R=D(()=>C.t(u().label)||u().label);const j="https://cdn.shop.platform.gomus.de/";ve(()=>{if(u().type!=="paymentMode")return;const J=C.payment_modes?Object.values(C.payment_modes):[];J.length===1&&u().value===""&&u(u().value=String(J[0].id),!0)});let N=se(null);ve(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const ae=URL.createObjectURL(J);return M(N,ae,!0),()=>{URL.revokeObjectURL(ae),M(N,null)}}M(N,null)});var B={get field(){return u()},set field(J){u(J),b()},get describedByIds(){return p()},set describedByIds(J){p(J),b()},get labelClass(){return h()},set labelClass(J){h(J),b()},get inputClass(){return g()},set inputClass(J){g(J),b()},get host(){return m()},set host(J){m(J),b()}},U=X(),oe=z(U),he=J=>{var ae=X(),ee=z(ae);we(ee,()=>d(T)),E(J,ae)};return le(oe,J=>{d(T)&&J(he)}),E(e,U),re(B)}lr(["change"]),ne(Tg,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var u$=V("<span> </span>"),c$=V("<li> </li>"),d$=V('<ul class="go-field-errors"></ul>'),f$=V("<!> <!> <!>",1);function h$(e,t){te(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),a=se(Pe(Bt.createField(r(),n())));const o=qi(t.$$host),l=D(()=>o.value),c=()=>d(a);let f=D(()=>d(a)?[...d(a).errors,...d(a).apiErrors].map(P=>C.t(P)):[]),u=D(()=>d(a)?.description),p=D(()=>d(f).length>0),h=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[d(u)&&d(h),d(p)&&d(g)].filter(Boolean).join(" ")||void 0);ve(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",d(f).length>0)}),t.$$host.dataset.testid=r(),ve(()=>{d(a)&&(d(a).mounted=!0,d(a).value,Le(()=>{d(a)?.errors.length&&d(l).validateField(d(a))}))});var v={getField:c,get key(){return r()},set key(P){r(P),b()},get required(){return n()},set required(P=!1){n(P),b()},get labelClass(){return i()},set labelClass(P){i(P),b()},get inputClass(){return s()},set inputClass(P){s(P),b()}},y=f$(),x=z(y);Tg(x,{get describedByIds(){return d(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return d(a)},set field(P){M(a,P,!0)}});var k=W(x,2),T=P=>{var R=u$(),j=$(R,!0);I(R),Q(()=>{me(R,"id",d(h)),Y(j,d(a).description)}),E(P,R)};le(k,P=>{d(u)&&P(T)});var S=W(k,2),O=P=>{var R=d$();Fe(R,21,()=>d(f),an,(j,N)=>{var B=c$(),U=$(B,!0);I(B),Q(()=>Y(U,d(N))),E(j,B)}),I(R),Q(()=>me(R,"id",d(g))),E(P,R)};return le(S,P=>{d(p)&&P(O)}),E(e,y),re(v)}customElements.define("go-field",ne(h$,{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 p$=V("<go-field></go-field>",2);function m$(e,t){te(t,!0);let r=qi(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?Bt.getFormFields(d(n)?.formId):[]);var s=X(),a=z(s);Fe(a,17,()=>d(i),o=>o.key,(o,l)=>{var c=p$();Q(()=>Yn(c,"key",d(l).key)),Q(()=>Yn(c,"required",d(l).required)),E(o,c)}),E(e,s),re()}customElements.define("go-all-fields",ne(m$,{},[],[]));var v$=V('<p aria-hidden="true"> </p>'),g$=V("<li> </li>"),y$=V('<ul class="go-error-feedback-api-errors"></ul>'),b$=V('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function _$(e,t){te(t,!0);const r=qi(t.$$host),n=D(()=>r.value);ve(()=>{d(n)?.form?.addEventListener("go-after-validation",()=>{M(a,qu(d(n)?.fields),!0)})});let i=se(0);setInterval(()=>{M(i,qu(d(n)?.fields)||0,!0)},100);let s=D(()=>d(i)+(d(n)?.apiErrors?.length||0)),a=se(-1);ve(()=>{t.$$host.classList.toggle("is-invalid",d(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",d(s).toString())});var o=b$(),l=$(o),c=$(l),f=v=>{var y=qt();Q(x=>Y(y,x),[()=>C.t("forms.errorSummary",{count:d(a)})]),E(v,y)};le(c,v=>{d(a)>0&&v(f)}),I(l);var u=W(l,2),p=v=>{var y=v$(),x=$(y,!0);I(y),Q(k=>Y(x,k),[()=>C.t("forms.errorSummary",{count:d(i)})]),E(v,y)};le(u,v=>{d(i)>0&&v(p)});var h=W(u,2),g=v=>{var y=y$();Fe(y,21,()=>d(n)?.apiErrors,an,(x,k)=>{var T=g$(),S=$(T,!0);I(T),Q(()=>Y(S,d(k))),E(x,T)}),I(y),E(v,y)},m=D(()=>d(n)&&tu(d(n).apiErrors)&&d(n).apiErrors.length>0);le(h,v=>{d(m)&&v(g)}),I(o),E(e,o),re()}customElements.define("go-errors-feedback",ne(_$,{},[],[]));var w$=V('<div class="go-form-feedback"><!></div>');function k$(e,t){var r=w$(),n=$(r);A_(n,t,"default",{},null),I(r),E(e,r)}customElements.define("go-form-feedback",ne(k$,{},["default"],[]));function S$(e,t){te(t,!0);let r=_(t,"buttonClass",7,"");return sn(()=>{Hr(t.$$host,"button",{type:"submit",class:r()})}),re({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",ne(S$,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var E$=V('<div aria-live="assertive"> </div>');function x$(e,t){te(t,!0);const r=qi(t.$$host),n=D(()=>r.value);var i=X(),s=z(i),a=o=>{var l=E$();let c;var f=$(l,!0);I(l),Q(()=>{c=Et(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":d(n).successMessage}),Y(f,d(n)?.successMessage)}),E(o,l)};le(s,o=>{d(n)?.successMessage&&o(a)}),E(e,i),re()}customElements.define("go-success-feedback",ne(x$,{},[],[]));var pr="INUMBER",Xi="IOP1",es="IOP2",ts="IOP3",hn="IVAR",pi="IVARNAME",rs="IFUNCALL",Ho="IFUNDEF",Zt="IEXPR",Gc="IEXPREVAL",mi="IMEMBER",Go="IENDSTATEMENT",ns="IARRAY";function Me(e,t){this.type=e,this.value=t??0}Me.prototype.toString=function(){switch(this.type){case pr:case Xi:case es:case ts:case hn:case pi:case Go:return this.value;case rs:return"CALL "+this.value;case Ho:return"DEF "+this.value;case ns:return"ARRAY "+this.value;case mi:return"."+this.value;default:return"Invalid Instruction"}};function Ko(e){return new Me(Xi,e)}function pn(e){return new Me(es,e)}function Ag(e){return new Me(ts,e)}function Kc(e,t,r,n,i){for(var s=[],a=[],o,l,c,f,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===pr||h===pi)Array.isArray(p.value)?s.push.apply(s,Kc(p.value.map(function(g){return new Me(pr,g)}).concat(new Me(ns,p.value.length)),t,r,n,i)):s.push(p);else if(h===hn&&i.hasOwnProperty(p.value))p=new Me(pr,i[p.value]),s.push(p);else if(h===es&&s.length>1)l=s.pop(),o=s.pop(),f=r[p.value],p=new Me(pr,f(o.value,l.value)),s.push(p);else if(h===ts&&s.length>2)c=s.pop(),l=s.pop(),o=s.pop(),p.value==="?"?s.push(o.value?l.value:c.value):(f=n[p.value],p=new Me(pr,f(o.value,l.value,c.value)),s.push(p));else if(h===Xi&&s.length>0)o=s.pop(),f=t[p.value],p=new Me(pr,f(o.value)),s.push(p);else if(h===Zt){for(;s.length>0;)a.push(s.shift());a.push(new Me(Zt,Kc(p.value,t,r,n,i)))}else if(h===mi&&s.length>0)o=s.pop(),s.push(new Me(pr,o.value[p.value]));else{for(;s.length>0;)a.push(s.shift());a.push(p)}}for(;s.length>0;)a.push(s.shift());return a}function Cg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=s.type;if(a===hn&&s.value===t)for(var o=0;o<r.tokens.length;o++){var l=r.tokens[o],c;l.type===Xi?c=Ko(l.value):l.type===es?c=pn(l.value):l.type===ts?c=Ag(l.value):c=new Me(l.type,l.value),n.push(c)}else a===Zt?n.push(new Me(Zt,Cg(s.value,t,r))):n.push(s)}return n}function vi(e,t,r){var n=[],i,s,a,o,l,c;if(Yc(e))return mn(e,r);for(var f=e.length,u=0;u<f;u++){var p=e[u],h=p.type;if(h===pr||h===pi)n.push(p.value);else if(h===es)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!vi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!vi(s,t,r)):p.value==="="?(o=t.binaryOps[p.value],n.push(o(i,vi(s,t,r),r))):(o=t.binaryOps[p.value],n.push(o(mn(i,r),mn(s,r))));else if(h===ts)a=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(vi(i?s:a,t,r)):(o=t.ternaryOps[p.value],n.push(o(mn(i,r),mn(s,r),mn(a,r))));else if(h===hn)if(p.value in t.functions)n.push(t.functions[p.value]);else if(p.value in t.unaryOps&&t.parser.isOperatorEnabled(p.value))n.push(t.unaryOps[p.value]);else{var g=r[p.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+p.value)}else if(h===Xi)i=n.pop(),o=t.unaryOps[p.value],n.push(o(mn(i,r)));else if(h===rs){for(c=p.value,l=[];c-- >0;)l.unshift(mn(n.pop(),r));if(o=n.pop(),o.apply&&o.call)n.push(o.apply(void 0,l));else throw new Error(o+" is not a function")}else if(h===Ho)n.push((function(){for(var m=n.pop(),v=[],y=p.value;y-- >0;)v.unshift(n.pop());var x=n.pop(),k=function(){for(var T=Object.assign({},r),S=0,O=v.length;S<O;S++)T[v[S]]=arguments[S];return vi(m,t,T)};return Object.defineProperty(k,"name",{value:x,writable:!1}),r[x]=k,k})());else if(h===Zt)n.push(T$(p,t));else if(h===Gc)n.push(p);else if(h===mi)i=n.pop(),n.push(i[p.value]);else if(h===Go)n.pop();else if(h===ns){for(c=p.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:mn(n[0],r)}function T$(e,t,r){return Yc(e)?e:{type:Gc,value:function(n){return vi(e.value,t,n)}}}function Yc(e){return e&&e.type===Gc}function mn(e,t){return Yc(e)?e.value(t):e}function Jc(e,t){for(var r=[],n,i,s,a,o,l,c=0;c<e.length;c++){var f=e[c],u=f.type;if(u===pr)typeof f.value=="number"&&f.value<0?r.push("("+f.value+")"):Array.isArray(f.value)?r.push("["+f.value.map(Og).join(", ")+"]"):r.push(Og(f.value));else if(u===es)i=r.pop(),n=r.pop(),a=f.value,t?a==="^"?r.push("Math.pow("+n+", "+i+")"):a==="and"?r.push("(!!"+n+" && !!"+i+")"):a==="or"?r.push("(!!"+n+" || !!"+i+")"):a==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):a==="=="?r.push("("+n+" === "+i+")"):a==="!="?r.push("("+n+" !== "+i+")"):a==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+a+" "+i+")"):a==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+a+" "+i+")");else if(u===ts)if(s=r.pop(),i=r.pop(),n=r.pop(),a=f.value,a==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===hn||u===pi)r.push(f.value);else if(u===Xi)n=r.pop(),a=f.value,a==="-"||a==="+"?r.push("("+a+n+")"):t?a==="not"?r.push("(!"+n+")"):a==="!"?r.push("fac("+n+")"):r.push(a+"("+n+")"):a==="!"?r.push("("+n+"!)"):r.push("("+a+" "+n+")");else if(u===rs){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());a=r.pop(),r.push(a+"("+o.join(", ")+")")}else if(u===Ho){for(i=r.pop(),l=f.value,o=[];l-- >0;)o.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+o.join(", ")+") { return "+i+" })"):r.push("("+n+"("+o.join(", ")+") = "+i+")")}else if(u===mi)n=r.pop(),r.push(n+"."+f.value);else if(u===ns){for(l=f.value,o=[];l-- >0;)o.unshift(r.pop());r.push("["+o.join(", ")+"]")}else if(u===Zt)r.push("("+Jc(f.value,t)+")");else if(u!==Go)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Og(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function is(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Qc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var a=e[s];a.type===hn||a.type===pi?!n&&!is(t,a.value)?t.push(a.value):(i!==null&&(is(t,i)||t.push(i)),i=a.value):a.type===mi&&n&&i!==null?i+="."+a.value:a.type===Zt?Qc(a.value,t,r):i!==null&&(is(t,i)||t.push(i),i=null)}i!==null&&!is(t,i)&&t.push(i)}function Dr(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Dr.prototype.simplify=function(e){return e=e||{},new Dr(Kc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Dr.prototype.substitute=function(e,t){return t instanceof Dr||(t=this.parser.parse(String(t))),new Dr(Cg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},vi(this.tokens,this,e)},Dr.prototype.toString=function(){return Jc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Qc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Qc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Dr.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 "+Jc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var ca="TEOF",He="TOP",Yo="TNUMBER",Dg="TSTRING",vn="TPAREN",ss="TBRACKET",Jo="TCOMMA",Xc="TNAME",ed="TSEMICOLON";function Ig(e,t,r){this.type=e,this.value=t,this.index=r}Ig.prototype.toString=function(){return this.type+": "+this.value};function it(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}it.prototype.newToken=function(e,t,r){return new Ig(e,t,r??this.pos)},it.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},it.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},it.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(ca,"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)+'"')},it.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(Dg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},it.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(vn,e),this.pos++,!0):!1},it.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ss,e),this.pos++,!0):!1},it.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Jo,","),this.pos++,!0):!1},it.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(ed,";"),this.pos++,!0):!1},it.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(Yo,this.consts[n]),this.pos+=n.length,!0}return!1},it.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(He,n),this.pos+=n.length,!0}return!1},it.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(Xc,i),this.pos+=i.length,!0}return!1},it.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
82
+ `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var A$=/^[0-9a-f]{4}$/i;it.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+=`
83
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);A$.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},it.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},it.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(Yo,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},it.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,a;t<this.expression.length&&(a=this.expression.charAt(t),a>="0"&&a<="9"||!i&&a===".");)a==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),a==="e"||a==="E"){t++;for(var o=!0,l=!1;t<this.expression.length;){if(a=this.expression.charAt(t),o&&(a==="+"||a==="-"))o=!1;else if(a>="0"&&a<="9")l=!0,o=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Yo,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},it.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(He,t);else if(t==="∙"||t==="•")this.current=this.newToken(He,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,">="),this.pos++):this.current=this.newToken(He,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"<="),this.pos++):this.current=this.newToken(He,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(He,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"=="),this.pos++):this.current=this.newToken(He,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(He,"!="),this.pos++):this.current=this.newToken(He,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},it.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},it.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
84
+ `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},it.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ye(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}Ye.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ye.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?is(t,e.value):typeof t=="function"?t(e):e.value===t},Ye.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ye.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ye.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ye.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))}},Ye.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Xc)||this.accept(He,r))e.push(new Me(hn,this.current.value));else if(this.accept(Yo))e.push(new Me(pr,this.current.value));else if(this.accept(Dg))e.push(new Me(pr,this.current.value));else if(this.accept(vn,"("))this.parseExpression(e),this.expect(vn,")");else if(this.accept(ss,"["))if(this.accept(ss,"]"))e.push(new Me(ns,0));else{var n=this.parseArrayList(e);e.push(new Me(ns,n))}else throw new Error("unexpected "+this.nextToken)},Ye.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ye.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ye.prototype.parseUntilEndStatement=function(e,t){return this.accept(ed)?(this.nextToken&&this.nextToken.type!==ca&&!(this.nextToken.type===vn&&this.nextToken.value===")")&&t.push(new Me(Go)),this.nextToken.type!==ca&&this.parseExpression(t),e.push(new Me(Zt,t)),!0):!1},Ye.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ss,"]");)for(this.parseExpression(e),++t;this.accept(Jo);)this.parseExpression(e),++t;return t},Ye.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(He,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===rs){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var a=n-i;e[a].type===hn&&(e[a]=new Me(pi,e[a].value))}this.parseVariableAssignmentExpression(r),e.push(new Me(Zt,r)),e.push(new Me(Ho,t.value));continue}if(t.type!==hn&&t.type!==mi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Me(pi,t.value)),e.push(new Me(Zt,r)),e.push(pn("="))}},Ye.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(He,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(He,":"),this.parseConditionalExpression(r),e.push(new Me(Zt,t)),e.push(new Me(Zt,r)),e.push(Ag("?"))}},Ye.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(He,"or");){var t=[];this.parseAndExpression(t),e.push(new Me(Zt,t)),e.push(pn("or"))}},Ye.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(He,"and");){var t=[];this.parseComparison(t),e.push(new Me(Zt,t)),e.push(pn("and"))}};var C$=["==","!=","<","<=",">=",">","in"];Ye.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(He,C$);){var t=this.current;this.parseAddSub(e),e.push(pn(t.value))}};var O$=["+","-","||"];Ye.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(He,O$);){var t=this.current;this.parseTerm(e),e.push(pn(t.value))}};var D$=["*","/","%"];Ye.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(He,D$);){var t=this.current;this.parseFactor(e),e.push(pn(t.value))}},Ye.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(He,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===vn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===ed||this.nextToken.type===Jo||this.nextToken.type===ca||this.nextToken.type===vn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ko(n.value))}else this.parseExponential(e)},Ye.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(He,"^");)this.parseFactor(e),e.push(pn("^"))},Ye.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(He,"!");)e.push(Ko("!"))},Ye.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(He,r)){var n=this.current;this.parseAtom(e),e.push(Ko(n.value))}else for(this.parseMemberExpression(e);this.accept(vn,"(");)if(this.accept(vn,")"))e.push(new Me(rs,0));else{var i=this.parseArgumentList(e);e.push(new Me(rs,i))}},Ye.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(vn,")");)for(this.parseExpression(e),++t;this.accept(Jo);)this.parseExpression(e),++t;return t},Ye.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(He,".")||this.accept(ss,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Xc),e.push(new Me(mi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ss,"]"),e.push(pn("["))}else throw new Error("unexpected symbol: "+t.value)}};function I$(e,t){return Number(e)+Number(t)}function P$(e,t){return e-t}function $$(e,t){return e*t}function M$(e,t){return e/t}function F$(e,t){return e%t}function N$(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function R$(e,t){return e===t}function L$(e,t){return e!==t}function z$(e,t){return e>t}function q$(e,t){return e<t}function U$(e,t){return e>=t}function V$(e,t){return e<=t}function B$(e,t){return!!(e&&t)}function j$(e,t){return!!(e||t)}function Z$(e,t){return is(t,e)}function W$(e){return(Math.exp(e)-Math.exp(-e))/2}function H$(e){return(Math.exp(e)+Math.exp(-e))/2}function G$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function K$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function Y$(e){return Math.log(e+Math.sqrt(e*e-1))}function J$(e){return Math.log((1+e)/(1-e))/2}function Pg(e){return Math.log(e)*Math.LOG10E}function Q$(e){return-e}function X$(e){return!e}function eM(e){return e<0?Math.ceil(e):Math.floor(e)}function tM(e){return Math.random()*(e||1)}function $g(e){return rd(e+1)}function rM(e){return isFinite(e)&&e===Math.round(e)}var nM=4.7421875,td=[.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 rd(e){var t,r;if(rM(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)*rd(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,a=s*e,o=a*e,l=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*a)-571/(2488320*o)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=td[0];for(var c=1;c<td.length;++c)r+=td[c]/(e+c);return t=e+nM+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function iM(e){return Array.isArray(e)?e.length:String(e).length}function Mg(){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 Fg(e,t,r){return e?t:r}function sM(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 aM(e,t,r){return r&&(r[e]=t),t}function oM(e,t){return e[t|0]}function lM(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function uM(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function cM(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 dM(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 fM(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 hM(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 pM(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function mM(e){return(e>0)-(e<0)||+e}var Ng=1/3;function vM(e){return e<0?-Math.pow(-e,Ng):Math.pow(e,Ng)}function gM(e){return Math.exp(e)-1}function yM(e){return Math.log(1+e)}function bM(e){return Math.log(e)/Math.LN2}function gi(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||W$,cosh:Math.cosh||H$,tanh:Math.tanh||G$,asinh:Math.asinh||K$,acosh:Math.acosh||Y$,atanh:Math.atanh||J$,sqrt:Math.sqrt,cbrt:Math.cbrt||vM,log:Math.log,log2:Math.log2||bM,ln:Math.log,lg:Math.log10||Pg,log10:Math.log10||Pg,expm1:Math.expm1||gM,log1p:Math.log1p||yM,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||eM,"-":Q$,"+":Number,exp:Math.exp,not:X$,length:iM,"!":$g,sign:Math.sign||mM},this.binaryOps={"+":I$,"-":P$,"*":$$,"/":M$,"%":F$,"^":Math.pow,"||":N$,"==":R$,"!=":L$,">":z$,"<":q$,">=":U$,"<=":V$,and:B$,or:j$,in:Z$,"=":aM,"[":oM},this.ternaryOps={"?":Fg},this.functions={random:tM,fac:$g,min:uM,max:lM,hypot:Math.hypot||Mg,pyt:Math.hypot||Mg,pow:Math.pow,atan2:Math.atan2,if:Fg,gamma:rd,roundTo:sM,map:cM,fold:dM,filter:fM,indexOf:hM,join:pM},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}gi.prototype.parse=function(e){var t=[],r=new Ye(this,new it(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(ca,"EOF"),new Dr(t,this)},gi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Rg=new gi;gi.parse=function(e){return Rg.parse(e)},gi.evaluate=function(e,t){return Rg.parse(e).evaluate(t)};var Lg={"+":"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 _M(e){return Lg.hasOwnProperty(e)?Lg[e]:e}gi.prototype.isOperatorEnabled=function(e){var t=_M(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var wM=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,kM=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,SM=/(__optional\("[^"]+"\))\.length\b/g,EM=new gi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),zg=new Map;function xM(e){return e.replace(wM,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(kM,(t,r)=>`__length(${r})`).replace(SM,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function TM(e){const t=zg.get(e);if(t)return t;const r=EM.parse(xM(e));return zg.set(e,r),r}function AM(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=TM(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 qg=["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"],CM=7200*1e3;async function gn(e,t){if(!e.withContent)return;const r=t.map(n=>n.id).filter(n=>typeof n=="number");if(r.length)try{const n=await C.asyncFetch(()=>C.ticketsContent(r))??[],i=new Map(n.map(s=>[s.id,s.content]));for(const s of t){if(typeof s.id!="number")continue;const a=i.get(s.id);a&&(s.content=a)}}catch{}}function Qo(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Xo(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),a=Date.parse(i.start_time);return s===t&&a>=n&&a<=n+CM&&(i.seats?.available??0)>0})}async function el(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}));Qo(e,t)}var OM={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}));Qo(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=$n(Mn(r,t.selectedTime),t.selectedTime);await gn(e,i);for(const s of i)e.preCart.addItem(ot(s,{time:t.selectedTime}))}},DM={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,a=$n(Mn(r,s),s);await gn(e,a);for(const o of a)e.preCart.addItem(ot(o,{time:s}))}},IM={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})),n=Object.values(r).map(i=>lo(i));await gn(e,n);for(const i of n)e.preCart.addItem(ot(i))}},PM={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()}));Qo(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=$n(Mn(n,t.selectedTime),t.selectedTime);await gn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},$M={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],a=s?Object.keys(s.capacities)[0]:void 0,o=$n(Mn(n,a),a);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:a}))}},MM={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()}));Qo(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=$n(Mn(n,t.selectedTime),t.selectedTime);await gn(e,s);for(const a of s)e.preCart.addItem(ot(a,{time:t.selectedTime}))}},FM={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=Nu(n,r.id,{event_title:r.event_title});e.preCart.addItem(ot(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},NM={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(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:a}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(a);const o=$n(Mn(s,n.start_time),n.start_time);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},RM={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(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:a}=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(a);const o=Object.values(a)[0],l=o?Object.keys(o.capacities)[0]:n.start_time,c=$n(Mn(s,l),l);await gn(e,c);for(const f of c)e.preCart.addItem(ot(f,{time:l}))}}},LM={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(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:a}=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(a);const o=$n(Mn(s,n.start_time),n.start_time);await gn(e,o);for(const l of o)e.preCart.addItem(ot(l,{time:n.start_time}))}}},zM={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>el(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Xo(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(a=>a.title?.includes(n)):i.prices;for(const a of s){const o=Nu(a,i.id,{event_title:i.event_title});e.preCart.addItem(ot(o,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},qM={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(ot(Sp(r)))}},UM={"ticket:timeslot":OM,"ticket:day":DM,"ticket:annual":IM,"event:admission":PM,"event:admission:day":$M,"event:admission:timeslot":MM,"event:price":FM,"events:admission":NM,"events:admission:day":RM,"events:admission:timeslot":LM,"events:price":zM,coupon:qM};function yi(e){const t=UM[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${qg.join(", ")}`),t}var Ug=qg,VM=0,BM=class{uid=VM++;#e=se();get filters(){return d(this.#e)}set filters(e){M(this.#e,e,!0)}#t=se();get eventIds(){return d(this.#t)}set eventIds(e){M(this.#t,e,!0)}#r=se();get museumIds(){return d(this.#r)}set museumIds(e){M(this.#r,e,!0)}#n=se();get exhibitionIds(){return d(this.#n)}set exhibitionIds(e){M(this.#n,e,!0)}#i=se();get ticketIds(){return d(this.#i)}set ticketIds(e){M(this.#i,e,!0)}#s=se();get ticketGroupIds(){return d(this.#s)}set ticketGroupIds(e){M(this.#s,e,!0)}#o=se();get selectedDate(){return d(this.#o)}set selectedDate(e){M(this.#o,e,!0)}#a=se();get selectedTimeslot(){return d(this.#a)}set selectedTimeslot(e){M(this.#a,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return d(this.#l)}set selectedTime(e){M(this.#l,e)}#u=se(Pe([]));get ticketSegments(){return d(this.#u)}set ticketSegments(e){M(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return d(this.#c)}set preCarts(e){M(this.#c,e)}#d=se();get timeslotDetails(){return d(this.#d)}set timeslotDetails(e){M(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>yi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>yi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>yi(e).isTicketsVisible(this))}},Vg="go-ticket-selection",jM=Li(Vg),yn=zi(Vg);function ZM(e,t){te(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=yn(t.$$host),s=D(()=>i.value),a=Sx(t.$$host),o=D(()=>a.value),l=qi(t.$$host),c=D(()=>l.value),f=Ui(t.$$host),u=D(()=>f.value),p=C.auth;let h=D(()=>({ticketSelection:d(s),personalizationDetails:d(o),formData:d(c)?.formData,cart:C.cart,cartView:d(u),auth:{isAuthenticated:p.isAuthenticated(),isLoggedIn:p.isLoggedIn(),isGuest:p.isGuest()}}));const g=k=>{M(h,k)},m=()=>d(h);let v=D(()=>AM(r(),d(h))),y=null;ve(()=>{const k=t.$$host;if(d(v)&&n()==="show")y&&(k.appendChild(y),y=null);else if(!y&&k.childNodes.length>0)for(y=document.createDocumentFragment();k.firstChild;)y.appendChild(k.firstChild)});var x={_setData:g,_getData:m,get when(){return r()},set when(k){r(k),b()},get then(){return n()},set then(k="show"){n(k),b()}};return re(x)}customElements.define("go-if",ne(ZM,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Bg(e,t){te(t,!0);let r=_(t,"apiUrl",7),n=_(t,"shopDomain",7),i=_(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),ve(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),re({get apiUrl(){return r()},set apiUrl(s){r(s),b()},get shopDomain(){return n()},set shopDomain(s){n(s),b()},get locale(){return i()},set locale(s){i(s),b()}})}customElements.define("gomus-init",ne(Bg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function WM(e,t){te(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var a={get apiDomain(){return r()},set apiDomain(o){r(o),b()},get shopDomain(){return n()},set shopDomain(o){n(o),b()},get locale(){return i()},set locale(o){i(o),b()}};return Bg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),re(a)}customElements.define("go-init",ne(WM,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function HM(e,t){te(t,!0);const r=_(t,"to",7),n=D(()=>Qe.config.urls[r()]),i=Hr(t.$$host,"a");return ve(()=>{if(!d(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",d(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Qe.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}Qe.config.navigateTo(Qe.config.urls[r()]())}),re({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",ne(HM,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function GM(e,t){te(t,!0);let r=_(t,"custom",7,!1);Bt.defineForm({id:"membershipActivation",submitLabel:"membership.activation.actions.submit",fields:[{key:"email",required:!0}]});async function n(i){const s=i.target.details;(await C.activateMembership(s.formData)).response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=[C.t("membership.activation.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"membershipActivation",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-membership-activation",ne(GM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var KM=class{#e=se();get token(){return d(this.#e)}set token(e){M(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return ml(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?Qe.config.urls.annualTicketPersonalizationList?.()?Qe.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}}},jg="go-order-details",YM=Li(jg),Zg=zi(jg);function JM(e,t){te(t,!0);let r=_(t,"token",7);const n=new KM(r());YM(t.$$host,n),sn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return re(i)}customElements.define("go-order",ne(JM,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var QM=V('<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),XM=V('<br/> <span class="go-order-item-quantities"> </span>',1),e2=V('<a aria-label="iCal link"> </a>'),t2=V('<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 Wg(e,t){te(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(S){r(S),b()},get orderDetails(){return n()},set orderDetails(S){n(S),b()}},s=t2(),a=$(s),o=$(a),l=W($(o),2),c=$(l),f=$(c,!0);I(c);var u=W(c,2),p=S=>{var O=QM(),P=z(O),R=$(P,!0);I(P);var j=W(P,2),N=$(j,!0);I(j),Q((B,U)=>{Y(R,B),Y(N,U)},[()=>ni(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().attributes.start_time)]),E(S,O)};le(u,S=>{r().attributes.start_time&&S(p)});var h=W(u,2);Fe(h,17,()=>r().attributes.quantities,S=>S.id,(S,O)=>{var P=XM(),R=W(z(P),2),j=$(R);I(R),Q(()=>Y(j,`${d(O).quantity??""} x ${d(O).title??""}`)),E(S,P)});var g=W(h,2),m=$(g,!0);I(g),I(l);var v=W(l,2),y=$(v,!0);I(v);var x=W(v,4),k=$(x),T=S=>{var O=e2(),P=$(O,!0);I(O),Q(R=>{me(O,"href",C.apiUrl+r().attributes.ical_url),Y(P,R)},[()=>C.t("common.calendar")]),E(S,O)};return le(k,S=>{r().attributes.ical_url&&S(T)}),I(x),I(o),I(a),I(s),Q((S,O,P)=>{Y(f,r().attributes.title),me(g,"href",S),Y(m,O),Y(y,P)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>js(r().price_cents)]),E(e,s),re(i)}ne(Wg,{item:{},orderDetails:{}},[],[],{mode:"open"});var r2=V('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),n2=V('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),i2=V('<span class="go-cart-item-date"> </span>'),s2=V('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),a2=V('<br/> <a class="go-ticket-personalization"> </a>',1),o2=V('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),l2=V('<a aria-label="iCal link"> </a>'),u2=V('<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>'),c2=V('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),d2=V('<a class="go-ticket-personalization"> </a>'),f2=V('<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 Hg(e,t){te(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=_(t,"item",7),i=_(t,"orderDetails",7);const s=D(()=>(n().attributes.sub_ticket_sales??[]).filter(u=>u.quantity>0));var a={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},o=X(),l=z(o),c=u=>{var p=X(),h=z(p);Fe(h,17,()=>({length:n().attributes.quantity}),an,(g,m,v)=>{var y=u2(),x=$(y),k=$(x),T=$(k);T.textContent="1";var S=W(T,2),O=$(S),P=$(O,!0);I(O);var R=W(O,2);Fe(R,17,()=>d(s),H=>H.id,(H,ie)=>{var ce=r2(),F=W(z(ce),2),fe=$(F);I(F),Q(()=>Y(fe,`${d(ie).quantity??""} x ${d(ie).title??""}`)),E(H,ce)});var j=W(R,2),N=H=>{const ie=D(()=>n().attributes.barcodes[v]?.id);var ce=s2(),F=z(ce),fe=w=>{var ye=n2(),Se=z(ye),je=$(Se,!0);I(Se);var Ge=W(Se,2),Ze=$(Ge,!0);I(Ge),Q((kt,st)=>{Y(je,kt),Y(Ze,st)},[()=>ni(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(n().attributes.start_time)]),E(w,ye)},q=w=>{var ye=i2(),Se=$(ye,!0);I(ye),Q(je=>Y(Se,je),[()=>ni(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),E(w,ye)};le(F,w=>{n().attributes.ticket_type==="time_slot"?w(fe):n().attributes.ticket_type==="normal"&&w(q,1)});var ke=W(F,4),K=$(ke,!0);I(ke),Q((w,ye)=>{me(ke,"href",w),Y(K,ye)},[()=>i().downloadLink(n(),d(ie)),()=>C.t("common.download")]),E(H,ce)},B=H=>{var ie=a2(),ce=W(z(ie),2),F=$(ce,!0);I(ce),Q((fe,q)=>{me(ce,"href",fe),Y(F,q)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),E(H,ie)};le(j,H=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?H(N):H(B,-1)}),I(S);var U=W(S,2),oe=$(U,!0);I(U);var he=W(U,2),J=$(he),ae=H=>{var ie=o2(),ce=$(ie);I(ie),Q(()=>{me(ie,"href",C.apiUrl+n().attributes.barcodes[v]?.passbook_url),me(ce,"src",r)}),E(H,ie)};le(J,H=>{n().attributes.barcodes[v]&&n().attributes.barcodes[v]?.passbook_url&&H(ae)}),I(he);var ee=W(he,2),de=$(ee),ue=H=>{var ie=l2(),ce=$(ie,!0);I(ie),Q(F=>{me(ie,"href",C.apiUrl+n().attributes.ical_url),Y(ce,F)},[()=>C.t("common.calendar")]),E(H,ie)};le(de,H=>{n().attributes.ical_url&&H(ue)}),I(ee),I(k),I(x),I(y),Q(H=>{Y(P,n().attributes.title),Y(oe,H)},[()=>js(n().price_cents)]),E(g,y)}),E(u,p)},f=u=>{var p=f2(),h=$(p),g=$(h),m=$(g),v=$(m,!0);I(m);var y=W(m,2),x=$(y),k=$(x,!0);I(x);var T=W(x,2),S=j=>{var N=c2(),B=$(N,!0);I(N),Q((U,oe)=>{me(N,"href",U),Y(B,oe)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),E(j,N)},O=j=>{var N=d2(),B=$(N,!0);I(N),Q((U,oe)=>{me(N,"href",U),Y(B,oe)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),E(j,N)};le(T,j=>{n().attributes.is_voucher?j(S):j(O,-1)}),I(y);var P=W(y,2),R=$(P,!0);I(P),Ct(2),I(g),I(h),I(p),Q(j=>{Y(v,n().attributes.quantity),Y(k,n().attributes.title),Y(R,j)},[()=>js(n().price_cents)]),E(u,p)};return le(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(f,-1)}),E(e,o),re(a)}ne(Hg,{item:{},orderDetails:{}},[],[],{mode:"open"});var h2=V('<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),p2=V('<br/> <span class="go-order-item-quantities"> </span>',1),m2=V('<a aria-label="iCal link"> </a>'),v2=V('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <span class="go-order-item-participants" data-testid="order-item-participants"> </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>');function Gg(e,t){te(t,!0);let r=_(t,"item",7);const n=D(()=>(r().attributes.prices??[]).filter(S=>S.title&&S.quantity!=null));var i={get item(){return r()},set item(S){r(S),b()}},s=v2(),a=$(s),o=$(a),l=W($(o),2),c=$(l),f=$(c,!0);I(c);var u=W(c,2),p=$(u,!0);I(u);var h=W(u,2),g=S=>{var O=h2(),P=z(O),R=$(P,!0);I(P);var j=W(P,2),N=$(j,!0);I(j),Q((B,U)=>{Y(R,B),Y(N,U)},[()=>ni(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>ri(r().attributes.start_time)]),E(S,O)};le(h,S=>{r().attributes.start_time&&S(g)});var m=W(h,2);Fe(m,17,()=>d(n),S=>S.title,(S,O)=>{var P=p2(),R=W(z(P),2),j=$(R);I(R),Q(()=>Y(j,`${d(O).quantity??""} x ${d(O).title??""}`)),E(S,P)}),I(l);var v=W(l,2),y=$(v,!0);I(v);var x=W(v,4),k=$(x),T=S=>{var O=m2(),P=$(O,!0);I(O),Q(R=>{me(O,"href",C.apiUrl+r().attributes.ical_url),Y(P,R)},[()=>C.t("common.calendar")]),E(S,O)};return le(k,S=>{r().attributes.ical_url&&S(T)}),I(x),I(o),I(a),I(s),Q((S,O)=>{Y(f,r().attributes.title),Y(p,S),Y(y,O)},[()=>C.t("cart.item.participants",{count:r().attributes.participants}),()=>js(r().price_cents)]),E(e,s),re(i)}ne(Gg,{item:{}},[],[],{mode:"open"});var g2=V('<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 y2(e,t){te(t,!0);const r=Zg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);var s=X(),a=z(s),o=l=>{var c=g2(),f=$(c),u=$(f),p=$(u),h=$(p,!0);I(p);var g=W(p,2),m=$(g,!0);I(g);var v=W(g,2),y=$(v,!0);I(v),Ct(2),I(u),I(f);var x=W(f,2);Fe(x,17,()=>d(i).items,P=>P.id,(P,R)=>{var j=X(),N=z(j),B=he=>{Hg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},U=he=>{Wg(he,{get item(){return d(R)},get orderDetails(){return d(n)}})},oe=he=>{Gg(he,{get item(){return d(R)}})};le(N,he=>{d(R).type==="Ticket"?he(B):d(R).type==="Event"?he(U,1):d(R).type==="Tour"&&he(oe,2)}),E(P,j)});var k=W(x,2),T=$(k),S=W($(T),4),O=$(S,!0);I(S),Ct(2),I(T),I(k),I(c),Q((P,R,j,N)=>{Y(h,P),Y(m,R),Y(y,j),Y(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:js(d(i).total_price_cents)})]),E(l,c)};le(a,l=>{d(i)&&d(n)&&l(o)}),E(e,s),re()}customElements.define("go-order-breakdown",ne(y2,{},[],[]));function b2(e,t){te(t,!0);const r=Zg(t.$$host),n=D(()=>r.value);let i=D(()=>d(n)?.order);Ct();var s=qt();Q(()=>Y(s,d(i)?.id)),E(e,s),re()}customElements.define("go-order-invoice-id",ne(b2,{},[],[]));var _2=V("<go-form></go-form>",2);function w2(e,t){te(t,!1),Bt.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,a=await C.updatePassword(s.formData);a.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=a.error?.errors||a.error||a.errors}Xl();var n=_2();Yn(n,"formId","passwordResetForm"),Ra("submit",n,r),E(e,n),re()}customElements.define("go-profile-password",ne(w2,{},[],[]));var k2=V("<go-form></go-form>",2);function S2(e,t){te(t,!0),Bt.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=se(void 0);const n=D(()=>C.getCustomer());sn(async()=>{await C.waitForAllFetches(),await eu(()=>d(r).details),await eu(()=>d(n).data),d(r).details.fill(d(n).data)});var i=k2();Yn(i,"formId","accountDetailsForm"),Ql(i,s=>M(r,s),()=>d(r)),E(e,i),re()}customElements.define("go-profile-details",ne(S2,{},[],[]));var E2=V('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function x2(e,t){te(t,!0);const r=D(()=>C.getCustomer()),n=D(()=>d(r)?.data);var i=X(),s=z(i),a=l=>{var c=E2(),f=z(c),u=$(f);I(f);var p=W(f,2),h=$(p,!0);I(p),Q(()=>{Y(u,`${d(n).name??""}
85
+ ${d(n).surname??""}`),Y(h,d(n).email)}),E(l,c)},o=l=>{var c=qt();Q(f=>Y(c,f),[()=>C.t("user.login.desc.text")]),E(l,c)};le(s,l=>{d(n)?l(a):l(o,-1)}),E(e,i),re()}customElements.define("go-profile-overview",ne(x2,{},[],[]));function T2(e,t){te(t,!0);function r(h){if(!h)return;const g=[];for(const m of h.split(",")){const v=m.trim();v&&(Ug.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${Ug.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),a=_(t,"exhibitionIds",7),o=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),f=_(t,"ticketGroupIds",7);const u=new BM;ve(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),ve(()=>{u.filters=r(n()),u.eventIds=ln(i()),u.museumIds=ln(s()),u.exhibitionIds=ln(a()),u.ticketIds=ln(c()),u.ticketGroupIds=ln(f()),u.selectedTimeslot=l(),o()&&(u.selectedDate=oo(o()))}),ve(()=>{u.selectedDate&&Le(()=>{o(u.selectedDate.toString())})}),ve(()=>{u.selectedTimeslot,Le(()=>{l(u.selectedTimeslot)})}),jM(t.$$host,u);var p={details:u,get filters(){return n()},set filters(h){n(h),b()},get eventIds(){return i()},set eventIds(h){i(h),b()},get museumIds(){return s()},set museumIds(h){s(h),b()},get exhibitionIds(){return a()},set exhibitionIds(h){a(h),b()},get selectedDate(){return o()},set selectedDate(h){o(h),b()},get selectedTimeslot(){return l()},set selectedTimeslot(h){l(h),b()},get ticketIds(){return c()},set ticketIds(h){c(h),b()},get ticketGroupIds(){return f()},set ticketGroupIds(h){f(h),b()}};return re(p)}customElements.define("go-ticket-selection",ne(T2,{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 A2(e,t){te(t,!0);const r=yn(t.$$host),n=D(()=>r.value);ve(()=>{t.$$host.style.display=d(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!d(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",d(n)?.isTicketsVisible)}),re()}customElements.define("go-tickets",ne(A2,{},[],[]));function C2(e,t){te(t,!0);const r=yn(t.$$host),n=D(()=>r.value),i=D(()=>qr(d(n)?.preCarts||[],a=>a.items.length)),s=D(()=>!d(n)?.isTicketsVisible||d(n)?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),re()}customElements.define("go-tickets-empty",ne(C2,{},[],[]));function O2(e,t){te(t,!0);const r=yn(t.$$host),n=D(()=>r.value);let i=D(()=>qr(d(n)?.preCarts||[],a=>a.totalPriceCents));Ct();var s=qt();Q(a=>Y(s,a),[()=>fr(d(i))]),E(e,s),re()}customElements.define("go-tickets-sum",ne(O2,{},[],[]));var D2=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}#t=se(Pe(Ni()));get preCart(){return d(this.#t)}set preCart(e){M(this.#t,e,!0)}#r=se();get filters(){return d(this.#r)}set filters(e){M(this.#r,e,!0)}#n=se();get dateId(){return d(this.#n)}set dateId(e){M(this.#n,e,!0)}#i=se();get limit(){return d(this.#i)}set limit(e){M(this.#i,e,!0)}#s=se();get query(){return d(this.#s)}set query(e){M(this.#s,e,!0)}#o=se(Pe([]));get ticketGroupIds(){return d(this.#o)}set ticketGroupIds(e){M(this.#o,e,!0)}#a=se(Pe([]));get languageIds(){return d(this.#a)}set languageIds(e){M(this.#a,e,!0)}#l=se(Pe([]));get catchWordIds(){return d(this.#l)}set catchWordIds(e){M(this.#l,e,!0)}#u=se(Pe([]));get museumIds(){return d(this.#u)}set museumIds(e){M(this.#u,e,!0)}#c=se(!1);get withContent(){return d(this.#c)}set withContent(e){M(this.#c,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=Ni([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Ni();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>yi(t).loadProducts(this)))}},Kg="go-ticket-segment",I2=Li(Kg),nd=zi(Kg);function P2(e,t){te(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),a=_(t,"ticketGroupIds",7),o=_(t,"languageIds",7),l=_(t,"catchWordIds",7),c=_(t,"museumIds",7),f=_(t,"withContent",7);function u(y){if(!y)return;const x=y.split(",").map(k=>k.trim()).filter(Boolean);return x.length?x:void 0}const p=yn(t.$$host),h=p.value,g=new D2(u(r()),p);I2(t.$$host,g),ve(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=ln(a()),g.languageIds=ln(o()),g.catchWordIds=ln(l()),g.museumIds=ln(c()),g.withContent=!!f()}),ve(()=>{g.dateId,g.filters,g.ticketGroupIds,g.museumIds,g.languageIds,g.catchWordIds,g.query,g.limit,g.withContent,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,Le(()=>{g.loadTickets()})}),ve(()=>{h&&Le(()=>h?.addTicketSegment(g))});const m=D(()=>g.preCart.items.length);ve(()=>{t.$$host.classList.toggle("is-empty",d(m)===0)});var v={details:g,get filters(){return r()},set filters(y){r(y),b()},get dateId(){return n()},set dateId(y){n(y),b()},get query(){return i()},set query(y){i(y),b()},get limit(){return s()},set limit(y){s(y),b()},get ticketGroupIds(){return a()},set ticketGroupIds(y){a(y),b()},get languageIds(){return o()},set languageIds(y){o(y),b()},get catchWordIds(){return l()},set catchWordIds(y){l(y),b()},get museumIds(){return c()},set museumIds(y){c(y),b()},get withContent(){return f()},set withContent(y){f(y),b()}};return re(v)}customElements.define("go-ticket-segment",ne(P2,{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"},withContent:{attribute:"with-content",reflect:!0,type:"Boolean"}},[],["details"]));function $2(e,t){te(t,!0);const r=yn(t.$$host).value,n=nd(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&d(i)===0);ve(()=>{t.$$host.style.display=d(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!d(s)),t.$$host.classList.toggle("is-visible",d(s))}),re()}customElements.define("go-ticket-segment-empty",ne($2,{},[],[]));var M2=V('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),F2=V('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),N2=V('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),R2=V('<ul class="go-sub-tickets" role="list"></ul>'),L2=V('<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=""><!></li></ul></article> <!></li>');function Yg(e,t){const r=mt();te(t,!0);const n=k=>{var T=M2(),S=z(T),O=$(S);I(S);var P=W(S,2),R=$(P,!0);I(P),Q(j=>{Y(O,`${s().product.event_title??""} - ${j??""}`),Y(R,s().product.title)},[()=>ri(s().time)]),E(k,T)},i=k=>{Ct();var T=qt();Q(()=>Y(T,s().product.title)),E(k,T)};let s=_(t,"item",7),a=_(t,"details",7),o=se(void 0),l=se(Pe({}));const c=D(()=>Br(s().product)?s().product:null);let f=se(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ve(()=>{a().preCart.items.map(k=>k.quantity),a().preCart.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),C.cart?.items.map(k=>k.quantity),C.cart?.items.forEach(k=>k.mantle&&Object.values(k.mantle.composition)),Le(()=>{M(o,C.capacityManager.capacity(C.cart,s(),a().preCart),!0),M(l,C.capacityManager.subTicketMaxes(C.cart,s(),a().preCart),!0)})});function h(k,T){s().mantle&&(s().mantle.composition[k]=T)}let g=i;uo(s().product)&&(g=n);var m={get item(){return s()},set item(k){s(k),b()},get details(){return a()},set details(k){a(k),b()}},v=X(),y=z(v),x=k=>{var T=L2(),S=$(T),O=$(S),P=$(O),R=$(P);g(R),I(P);var j=W(P,2),N=ue=>{var H=F2(),ie=$(H);I(H),Q(ce=>{Et(ie,1,ur(["go-ticket-info-icon",d(f)&&"is-active"])),me(ie,"aria-expanded",d(f)),me(ie,"aria-controls",p),me(ie,"aria-label",ce)},[()=>C.t("ticket.list.additionalInfo")]),pt("click",ie,()=>M(f,!d(f))),E(ue,H)};le(j,ue=>{d(u)&&ue(N)});var B=W(j,2);Af(B,()=>vm.sanitize(s().product.description),!0),I(B);var U=W(B,2),oe=ue=>{var H=N2(),ie=$(H,!0);I(H),Q(ce=>{me(H,"id",p),me(H,"hidden",!d(f)),Y(ie,ce)},[()=>C.t(d(u))]),E(ue,H)};le(U,ue=>{d(u)&&ue(oe)});var he=W(U,2),J=$(he,!0);I(he);var ae=W(he,2);go($(ae),{get value(){return s().quantity},get min(){return d(o).min},get max(){return d(o).max},get label(){return s().product.title},onChange:ue=>s().quantity=ue}),I(ae),I(O),I(S);var ee=W(S,2),de=ue=>{var H=R2();Fe(H,21,()=>Zs(d(c)),ie=>ie.id,(ie,ce)=>{{let F=D(()=>s().mantle?.composition?.[d(ce).id]??0);Gu(ie,{get sub(){return d(ce)},get quantity(){return d(F)},get max(){return d(l)[d(ce).id]},onChange:fe=>h(d(ce).id,fe)})}}),I(H),Q(()=>me(H,"aria-label",d(c).title)),E(ue,H)};le(ee,ue=>{d(c)&&s().quantity>0&&ue(de)}),I(T),Q(()=>{Et(S,1,ur(["go-tickets-item",d(o).bookedOut&&"is-booked-out"])),me(S,"data-testid",s().uuid),Y(J,s().price_formatted)}),E(k,T)};return le(y,k=>{d(o)&&!d(o).unavailable&&k(x)}),E(e,v),re(m)}lr(["click"]),ne(Yg,{item:{},details:{}},[],[],{mode:"open"});var z2=V('<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 q2(e,t){te(t,!0);const r=nd(t.$$host),n=D(()=>r.value),i=D(()=>d(n)?.preCart?.items.length&&d(n)?.preCart?.items.length>0);var s=X(),a=z(s),o=l=>{var c=z2(),f=$(c),u=$(f),p=$(u),h=$(p,!0);I(p);var g=W(p,2),m=$(g,!0);I(g);var v=W(g,2),y=$(v,!0);I(v);var x=W(v,2),k=$(x,!0);I(x),I(u),I(f);var T=W(f,2);Fe(T,17,()=>d(n).preCart.items,S=>S.uuid,(S,O)=>{Yg(S,{get item(){return d(O)},get details(){return d(n)}})}),I(c),Q((S,O,P,R)=>{Y(h,S),Y(m,O),Y(y,P),Y(k,R)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),E(l,c)};le(a,l=>{d(i)&&d(n)&&l(o)}),E(e,s),re()}customElements.define("go-ticket-segment-body",ne(q2,{},[],[]));function U2(e,t){te(t,!0);const r=nd(t.$$host),n=D(()=>r.value);Ct();var i=qt();Q(()=>Y(i,d(n)?.preCart.totalFormatted)),E(e,i),re()}customElements.define("go-ticket-segment-sum",ne(U2,{},[],[]));var V2=class{#e;get tsd(){return d(this.#e)}set tsd(e){M(this.#e,e)}#t=se(Pe([]));get timeslots(){return d(this.#t)}set timeslots(e){M(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}const t=C.capacityManager.quotaManager;t.clearPrecart();for(const r of C.cart?.items??[]){const n=r.product;Mu(n)&&t.setPrecartItemQuantity(n.id,r.quantity??0)}this.timeslots=t.timeslotsOn(e,this.tsd?.timeslotTicketIds).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}},B2=V('<li><label> <input type="radio" name="timeslot"/></label></li>'),j2=V('<ul data-testid="timeslots"></ul>');function Z2(e,t){te(t,!0);const r=[],n=new V2(yn(t.$$host));ve(()=>{const f=n.tsd;if(!f)return;const u=f.filters,p=f.selectedDate;Le(async()=>{f.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>yi(h).loadTimeslots(f))),n.recalculateCapacities()})}),ve(()=>{C.cart?.items.map(f=>f.quantity),Le(()=>n.recalculateCapacities())});const i=(f,u)=>{!f||!("dispatchEvent"in f)||f.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=f=>{i(f.target,n.tsd?.selectedTimeslot)};ve(()=>{const f=n.tsd;if(!f)return;const u=n.timeslots;if(u.length!==1)return;const p=u[0];p.available&&f.selectedTimeslot!==p.startAt&&(f.selectedTimeslot=p.startAt,i(t.$$host,p.startAt))});var a={details:n},o=X(),l=z(o),c=f=>{var u=j2();Fe(u,20,()=>n.timeslots,p=>p,(p,h)=>{const g=D(()=>h.totalCapacity===0),m=D(()=>!d(g)&&h.capacity===0),v=D(()=>d(g)||d(m)||!h.available),y=D(()=>n.tsd?.selectedTimeslot===h.startAt);var x=B2(),k=$(x),T=$(k),S=W(T);Ms(S);var O;I(k),I(x),Q(()=>{Et(x,1,ur({"go-timeslot":!0,"is-unavailable":d(g),"is-sold-out":d(m),"is-disabled":d(v),"is-selected":d(y)})),Y(T,`${h.timeFormatted??""} `),S.disabled=d(v),me(S,"aria-disabled",d(v)),O!==(O=h.startAt)&&(S.value=(S.__value=h.startAt)??"")}),pt("change",S,s),V_(r,[],S,()=>(h.startAt,n.tsd.selectedTimeslot),P=>n.tsd.selectedTimeslot=P),E(p,x)}),I(u),E(f,u)};return le(l,f=>{n.tsd?.isTimeslotsVisible&&f(c)}),E(e,o),re(a)}lr(["change"]),customElements.define("go-timeslots",ne(Z2,{},[],["details"]));var W2=class{#e=se();get details(){return d(this.#e)}set details(e){M(this.#e,e,!0)}#t=se(Pe(ei(Vt())));get startAt(){return d(this.#t)}set startAt(e){M(this.#t,e,!0)}#r=se(void 0);get selected(){return d(this.#r)}set selected(e){M(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>yi(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(ei(Vt()))<0||this.dates[e.toString()]=="unavailable":e.compare(ei(Vt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>yi(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)=>xt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>xt(t,e(this.params(r))),{})}},H2=V("<!> <!> <!>",1),G2=V("<div> </div>"),Jg=V("<!> <!>",1),K2=V('<div data-calendar-wrapper=""><!></div>');function Qg(e,t){te(t,!0);let r=_(t,"calendarClass",7),n=se(void 0);const i=r();ve(()=>{d(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),b()}},a=K2(),o=$(a);{const l=(c,f)=>{let u=()=>f?.().months,p=()=>f?.().weekdays;var h=Jg(),g=z(h);$e(g,()=>wc,(v,y)=>{y(v,{children:(x,k)=>{var T=H2(),S=z(T);$e(S,()=>Ec,(R,j)=>{j(R,{class:"go-calendar-prev-button",children:(N,B)=>{Ct();var U=qt("Prev");E(N,U)},$$slots:{default:!0}})});var O=W(S,2);$e(O,()=>kc,(R,j)=>{j(R,{class:"go-calendar-heading"})});var P=W(O,2);$e(P,()=>Sc,(R,j)=>{j(R,{class:"go-calendar-next-button",children:(N,B)=>{Ct();var U=qt("Next");E(N,U)},$$slots:{default:!0}})}),E(x,T)},$$slots:{default:!0}})});var m=W(g,2);Fe(m,17,u,an,(v,y)=>{var x=X(),k=z(x);$e(k,()=>vc,(T,S)=>{S(T,{class:"go-calendar-grid",children:(O,P)=>{var R=Jg(),j=z(R);$e(j,()=>bc,(B,U)=>{U(B,{class:"go-calendar-grid-head",children:(oe,he)=>{var J=X(),ae=z(J);$e(ae,()=>oa,(ee,de)=>{de(ee,{class:"go-calendar-grid-row",children:(ue,H)=>{var ie=X(),ce=z(ie);Fe(ce,17,p,an,(F,fe,q,ke)=>{var K=X(),w=z(K);$e(w,()=>_c,(ye,Se)=>{Se(ye,{children:(je,Ge)=>{var Ze=G2(),kt=$(Ze,!0);I(Ze),Q(st=>Y(kt,st),[()=>d(fe).slice(0,2)]),E(je,Ze)},$$slots:{default:!0}})}),E(F,K)}),E(ue,ie)},$$slots:{default:!0}})}),E(oe,J)},$$slots:{default:!0}})});var N=W(j,2);$e(N,()=>gc,(B,U)=>{U(B,{class:"go-calendar-grid-body",children:(oe,he)=>{var J=X(),ae=z(J);Fe(ae,17,()=>d(y).weeks,an,(ee,de,ue,H)=>{var ie=X(),ce=z(ie);$e(ce,()=>oa,(F,fe)=>{fe(F,{class:"go-calendar-grid-row",children:(q,ke)=>{var K=X(),w=z(K);Fe(w,17,()=>d(de),an,(ye,Se,je,Ge)=>{var Ze=X(),kt=z(Ze);$e(kt,()=>yc,(st,er)=>{er(st,{get date(){return d(Se)},get month(){return d(y).value},class:"go-calendar-cell",children:(At,Ft)=>{var tr=X(),Wt=z(tr);{let mr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(d(Se)),"is-disabled":r().isDateDisabled(d(Se)),"is-selected":r().selected?.compare(d(Se))===0}));$e(Wt,()=>mc,(Ir,Pr)=>{Pr(Ir,{get class(){return d(mr)},children:(bn,$r)=>{Ct();var vr=qt();Q(()=>Y(vr,d(Se).day)),E(bn,vr)},$$slots:{default:!0}})})}E(At,tr)},$$slots:{default:!0}})}),E(ye,Ze)}),E(q,K)},$$slots:{default:!0}})}),E(ee,ie)}),E(oe,J)},$$slots:{default:!0}})}),E(O,R)},$$slots:{default:!0}})}),E(v,x)}),E(c,h)};$e(o,()=>Iv,(c,f)=>{f(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 I(a),Ql(a,l=>M(n,l),()=>d(n)),E(e,a),re(s)}ne(Qg,{calendarClass:{}},[],["details"],{mode:"open"});function Y2(e,t){te(t,!0);const r=new W2,n=r,i=yn(t.$$host),s=D(()=>i.value);ve(()=>{r.details=d(s)}),t.$$host.addEventListener("go-date-select",f=>{d(s)&&(d(s).selectedDate=f.detail.selected,d(s).selectedTimeslot=void 0)});var a={details:n},o=X(),l=z(o),c=f=>{Qg(f,{get calendarClass(){return r}})};return le(l,f=>{d(s)?.isCalendarVisible&&f(c)}),E(e,o),re(a)}customElements.define("go-calendar",ne(Y2,{},[],["details"]));var J2=class{#e;get ticketSelectionDetails(){return d(this.#e)}set ticketSelectionDetails(e){M(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 ot(n.product,{quantity:n.quantity,time:i,mantle:n.mantle&&{composition:{...n.mantle.composition}}})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Qe.config.urls.cart&&Qe.config.navigateTo(Qe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},Q2=V('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function X2(e,t){te(t,!0);const r=new J2(yn(t.$$host));var n={details:r},i=Q2(),s=$(i,!0);return I(i),Q((a,o,l)=>{i.disabled=a,me(i,"data-x",o),Y(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),pt("click",i,()=>r.addToCart()),E(e,i),re(n)}lr(["click"]),customElements.define("go-add-to-cart-button",ne(X2,{},[],["details"]));function eF(e,t){te(t,!0);let r=_(t,"custom",7,!1);Bt.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,a=await C.withdrawal(s.formData);a.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=a.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return Hr(t.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),t.$$host.addEventListener("submit",n),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-withdrawal-form",ne(eF,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var tF=["id","time","participants","languageId","totalPriceCents","title"];function rF(e){for(const t of tF)if(e[t]==null||e[t]==="")throw new Error(`(go.cart.addTour) '${t}' is required`);if(!(e.participants>0))throw new Error("(go.cart.addTour) 'participants' must be a positive number");if(e.quantities){const t=qr(Object.values(e.quantities));if(t!==e.participants)throw new Error(`(go.cart.addTour) 'quantities' must sum to 'participants' (${t} !== ${e.participants})`)}}async function nF(e){if(rF(e),!C.cart)throw new Error("(go.cart.addTour) shop not initialized — call go.init first");const{time:t,...r}=e,n=ot(wp(r),{quantity:1,time:t});return C.cart.addItem(n),n.uuid}var da=null;async function fa(){if(da)return da;if(!C.client)throw new Error("[go] Shop not initialized — call go.init({ shop, api, locale }) first.")}var iF=e=>e.split(".").reduce((t,r)=>t?.[r],Xg);async function sF(e){const t=e.go;let r=t&&t._queue||[];t&&t._queue&&!t.cart&&console.warn("(go) the pasted go snippet predates go.cart — cart calls cannot be queued before load. Update the snippet or gate on window.go.loaded.");for(const n of r)if(n.method!=="load")try{const i=iF(n.method);if(typeof i!="function")throw new Error(`(go) unknown command: ${n.method}`);await i(n.options)}catch(i){console.error(i)}e.go=Xg,t&&(t._queue=null)}var Xg={loaded:!0,config:e=>{Qe.define(e)},init:async e=>{try{da=C.load("https://"+e.api,e.shop,e.locale),await da}catch(t){throw da=null,t}},api:{getCustomer:async()=>(await fa(),C.asyncFetch(()=>C.getCustomer())),getOrders:async e=>(await fa(),C.asyncFetch(()=>C.getOrders(e))),getCustomerAddresses:async()=>(await fa(),C.asyncFetch(()=>C.getCustomerAddresses())),getCustomerMemberships:async()=>(await fa(),C.asyncFetch(()=>C.getCustomerMemberships()))},cart:{addTour:async e=>(await fa(),nF(e))}};(async()=>await sF(window))()})();