@gomusdev/web-components 4.1.0 → 4.2.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.
@@ -1,59 +1,59 @@
1
- (function(){var Ny=globalThis;(Ny.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var jn={},at=Symbol("uninitialized"),nl=Symbol("filename"),Ry="http://www.w3.org/1999/xhtml",Ly="http://www.w3.org/2000/svg",zy="http://www.w3.org/1998/Math/MathML",qy="@attach",mo=Array.isArray,Uy=Array.prototype.indexOf,vo=Array.prototype.includes,go=Array.from,yo=Object.keys,wn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,md=Object.getOwnPropertyDescriptors,vd=Object.prototype,Vy=Array.prototype,bo=Object.getPrototypeOf,gd=Object.isExtensible;function us(e){return typeof e=="function"}var Ne=()=>{};function By(e){return e()}function il(e){for(var t=0;t<e.length;t++)e[t]()}function yd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}var jy=1<<24,tr=1024,rr=2048,Zn=4096,sl=8192,Zy=16384,ol=32768,bd=1<<25,cs=65536,N2=1<<17,R2=1<<18,bi=1<<19,_d=1<<20,ds=1<<25,fs=65536,wd=1<<21,Wy=1<<22,_o=1<<23,Nr=Symbol("$state"),al=Symbol("legacy props"),Hy=Symbol(""),Gy=Symbol("proxy path"),kd=Symbol("attributes"),ll=Symbol("class"),ul=Symbol("style"),cl=Symbol("text"),hs=Symbol("form reset"),L2=Symbol("hmr anchor"),wo=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ps=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ky(e){throw new Error("https://svelte.dev/e/invariant_violation")}function Sd(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Yy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function z2(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function q2(){throw new Error("https://svelte.dev/e/derived_references_self")}function Ed(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function U2(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function Jy(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Qy(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Xy(e){throw new Error("https://svelte.dev/e/effect_orphan")}function eb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tb(){throw new Error("https://svelte.dev/e/hydration_failed")}function V2(){throw new Error("https://svelte.dev/e/invalid_snippet")}function rb(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function B2(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function j2(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function nb(){throw new Error("https://svelte.dev/e/set_context_after_init")}function ib(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ob(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ab(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Z2="font-weight: bold",W2="font-weight: normal";function H2(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function G2(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function lb(){console.warn("https://svelte.dev/e/derived_inert")}function ub(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function cb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function ms(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function K2(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function db(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function dl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Y2(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function fb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var _e=!1;function yt(e){_e=e}var Te;function dt(e){if(e===null)throw ms(),jn;return Te=e}function en(){return dt(br(Te))}function P(e){if(_e){if(br(Te)!==null)throw ms(),jn;Te=e}}function At(e=1){if(_e){for(var t=e,r=Te;t--;)r=br(r);Te=r}}function vs(e=!0){for(var t=0,r=Te;;){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 fl(e){if(!e||e.nodeType!==8)throw ms(),jn;return e.data}function xd(e){return e===this.v}function hb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Td(e){return!hb(e,this.v)}var Ht=!1,_i=!1,J2=!1;function pb(){_i=!0}var Q2="font-weight: bold",X2="font-weight: normal";function eF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var mb=[];function hl(e,t=!1,r=!1){return ko(e,new Map,"",mb,null,r)}function ko(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(mo(e)){var a=Array(e.length);t.set(e,a),i!==null&&t.set(i,a);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(a[l]=ko(c,t,r,n,null,s))}return a}if(bo(e)===vd){a={},t.set(e,a),i!==null&&t.set(i,a);for(var d of Object.keys(e))a[d]=ko(e[d],t,r,n,null,s);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return ko(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var tF=null;function Ad(e,t){return e.label=t,vb(e.v,t),e}function vb(e,t){return e?.[Gy]?.(t),e}function rF(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function nF(e){const t=new Error,r=gb();return r.length===0?null:(r.unshift(`
2
- `),wn(t,"stack",{value:r.join(`
3
- `)}),wn(t,"name",{value:e}),t)}function gb(){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],o=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||n.push(s)}}return n}function iF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ve=null;function wi(e){Ve=e}var yb=null;function sF(e){yb=e}var pl=null;function oF(e){pl=e}function Cd(e){return ml("getContext").get(e)}function bb(e,t){const r=ml("setContext");if(Ht){var n=Ee.f;!Ae&&(n&32)!==0&&!Ve.i||nb()}return r.set(e,t),t}function _b(e){return ml("hasContext").has(e)}function te(e,t=!1,r){Ve={p:Ve,i:!1,c:null,e:null,s:e,x:null,r:Ee,l:_i&&!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)Xd(n)}return e!==void 0&&(t.x=e),t.i=!0,Ve=t.p,e??{}}function gs(){return!_i||Ve!==null&&Ve.l===null}function ml(e){return Ve===null&&Sd(e),Ve.c??=new Map(wb(Ve)||void 0)}function wb(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 Od(){var e=Wn;Wn=[],il(e)}function nr(e){if(Wn.length===0&&!bs){var t=Wn;queueMicrotask(()=>{t===Wn&&Od()})}Wn.push(e)}function kb(){for(;Wn.length>0;)Od()}var Sb=new WeakMap;function Dd(e){var t=Ee;if(t===null)return Ae.f|=_o,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;kn(e,t)}function kn(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 aF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=xl?" ":" ",i=`
1
+ (function(){var Ny=globalThis;(Ny.__zod_globalConfig??={}).jitless=!0,typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var jn={},lt=Symbol("uninitialized"),nl=Symbol("filename"),Ry="http://www.w3.org/1999/xhtml",Ly="http://www.w3.org/2000/svg",zy="http://www.w3.org/1998/Math/MathML",qy="@attach",mo=Array.isArray,Uy=Array.prototype.indexOf,vo=Array.prototype.includes,go=Array.from,yo=Object.keys,kn=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,md=Object.getOwnPropertyDescriptors,vd=Object.prototype,Vy=Array.prototype,bo=Object.getPrototypeOf,gd=Object.isExtensible;function us(e){return typeof e=="function"}var Ne=()=>{};function By(e){return e()}function il(e){for(var t=0;t<e.length;t++)e[t]()}function yd(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}var jy=1<<24,rr=1024,nr=2048,Zn=4096,sl=8192,Zy=16384,ol=32768,bd=1<<25,cs=65536,z2=1<<17,q2=1<<18,bi=1<<19,_d=1<<20,ds=1<<25,fs=65536,wd=1<<21,Wy=1<<22,_o=1<<23,Nr=Symbol("$state"),al=Symbol("legacy props"),Hy=Symbol(""),Gy=Symbol("proxy path"),kd=Symbol("attributes"),ll=Symbol("class"),ul=Symbol("style"),cl=Symbol("text"),hs=Symbol("form reset"),U2=Symbol("hmr anchor"),wo=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ps=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ky(e){throw new Error("https://svelte.dev/e/invariant_violation")}function Sd(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Yy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function V2(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function B2(){throw new Error("https://svelte.dev/e/derived_references_self")}function Ed(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function j2(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function Jy(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Qy(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Xy(e){throw new Error("https://svelte.dev/e/effect_orphan")}function eb(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tb(){throw new Error("https://svelte.dev/e/hydration_failed")}function Z2(){throw new Error("https://svelte.dev/e/invalid_snippet")}function rb(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function W2(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function H2(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function nb(){throw new Error("https://svelte.dev/e/set_context_after_init")}function ib(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sb(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ob(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ab(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var G2="font-weight: bold",K2="font-weight: normal";function Y2(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function J2(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function lb(){console.warn("https://svelte.dev/e/derived_inert")}function ub(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function cb(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function ms(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Q2(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function db(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function dl(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function X2(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function fb(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var _e=!1;function bt(e){_e=e}var Ae;function ft(e){if(e===null)throw ms(),jn;return Ae=e}function Xr(){return ft(br(Ae))}function P(e){if(_e){if(br(Ae)!==null)throw ms(),jn;Ae=e}}function At(e=1){if(_e){for(var t=e,r=Ae;t--;)r=br(r);Ae=r}}function vs(e=!0){for(var t=0,r=Ae;;){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 fl(e){if(!e||e.nodeType!==8)throw ms(),jn;return e.data}function xd(e){return e===this.v}function hb(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Td(e){return!hb(e,this.v)}var Ht=!1,_i=!1,eF=!1;function pb(){_i=!0}var tF="font-weight: bold",rF="font-weight: normal";function nF(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var mb=[];function hl(e,t=!1,r=!1){return ko(e,new Map,"",mb,null,r)}function ko(e,t,r,n,i=null,s=!1){if(typeof e=="object"&&e!==null){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(mo(e)){var a=Array(e.length);t.set(e,a),i!==null&&t.set(i,a);for(var l=0;l<e.length;l+=1){var c=e[l];l in e&&(a[l]=ko(c,t,r,n,null,s))}return a}if(bo(e)===vd){a={},t.set(e,a),i!==null&&t.set(i,a);for(var d of Object.keys(e))a[d]=ko(e[d],t,r,n,null,s);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return ko(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var iF=null;function Ad(e,t){return e.label=t,vb(e.v,t),e}function vb(e,t){return e?.[Gy]?.(t),e}function sF(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function oF(e){const t=new Error,r=gb();return r.length===0?null:(r.unshift(`
2
+ `),kn(t,"stack",{value:r.join(`
3
+ `)}),kn(t,"name",{value:e}),t)}function gb(){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],o=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||n.push(s)}}return n}function aF(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var Ve=null;function wi(e){Ve=e}var yb=null;function lF(e){yb=e}var pl=null;function uF(e){pl=e}function Cd(e){return ml("getContext").get(e)}function bb(e,t){const r=ml("setContext");if(Ht){var n=Ee.f;!Oe&&(n&32)!==0&&!Ve.i||nb()}return r.set(e,t),t}function _b(e){return ml("hasContext").has(e)}function ee(e,t=!1,r){Ve={p:Ve,i:!1,c:null,e:null,s:e,x:null,r:Ee,l:_i&&!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)Xd(n)}return e!==void 0&&(t.x=e),t.i=!0,Ve=t.p,e??{}}function gs(){return!_i||Ve!==null&&Ve.l===null}function ml(e){return Ve===null&&Sd(e),Ve.c??=new Map(wb(Ve)||void 0)}function wb(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 Od(){var e=Wn;Wn=[],il(e)}function ir(e){if(Wn.length===0&&!bs){var t=Wn;queueMicrotask(()=>{t===Wn&&Od()})}Wn.push(e)}function kb(){for(;Wn.length>0;)Od()}var Sb=new WeakMap;function Dd(e){var t=Ee;if(t===null)return Oe.f|=_o,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 cF(e,t){const r=Fr(e,"message");if(!(r&&!r.configurable)){for(var n=xl?" ":" ",i=`
5
5
  ${n}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;s!==null;)i+=`
6
6
  ${n}in ${s.function?.[nl].split("/").pop()}`,s=s.p;return{message:e.message+`
7
7
  ${i}
8
8
  `,stack:e.stack?.split(`
9
9
  `).filter(o=>!o.includes("svelte/src/internal")).join(`
10
- `)}}}function lF(e){const t=Sb.get(e);t&&(wn(e,"message",{value:t.message}),wn(e,"stack",{value:t.stack}))}var Eb=~(rr|Zn|tr);function st(e,t){e.f=e.f&Eb|t}function vl(e){(e.f&512)!==0||e.deps===null?st(e,tr):st(e,Zn)}function Id(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=fs,Id(t.deps))}function Pd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Id(e.deps),st(e,tr)}var xb=!1,So=!1;function Tb(e){var t=So;try{return So=!1,[e(),So]}finally{So=t}}var Eo=null,ki=null,ke=null,ys=null,Ct=null,gl=null,bs=!1,yl=!1,Si=null,xo=null,$d=0,uF=new Set,Ab=1,Ei=class ld{id=Ab++;#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;#a=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){ki===null?Eo=ki=this:(ki.#r=this,this.#t=ki),ki=this}#m(){if(this.is_fork)return!0;for(const n of this.#a.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)st(i,rr),r(i);for(i of n.m)st(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,$d++>1e3&&(this.#b(),Cb());for(const l of this.#c)this.#d.delete(l),st(l,rr),this.schedule(l);for(const l of this.#d)st(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=Si=[],n=[],i=xo=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Rd(l),this.#m()||this.discard(),c}if(ke=null,i.length>0){var s=ld.ensure();for(const l of i)s.schedule(l)}if(Si=null,xo=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Nd(l,c);i.length>0&&ke.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),ys=this,Md(n),Md(r),ys=null,this.#o?.resolve();var a=ke;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Ht&&(this.#k(),ke=a)),this.#l.length>0)if(a!==null){const l=a;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else a=this;a!==null&&a.#v()}#y(t,r,n){t.f^=tr;for(var i=t.first;i!==null;){var s=i.f,o=(s&96)!==0;if(!(o&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){o?i.f^=tr:(s&4)!==0?r.push(i):Ht&&(s&16777224)!==0?n.push(i):Es(i)&&((s&16)!==0&&this.#d.add(i),Ci(i));var a=i.first;if(a!==null){i=a;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 a of i){var s=a.f;if((s&2)!==0)r(a);else{var o=a;s&4194320&&!this.async_deriveds.has(o)&&(this.#d.delete(o),st(o,rr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),ke=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Pd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==at&&!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(){ke=this}deactivate(){ke=null,Ct=null}flush(){try{yl=!0,ke=this,this.#v()}finally{$d=0,gl=null,Si=null,xo=null,yl=!1,ke=null,Ct=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let d=Eo;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,o=new Map;for(var a of r)Fd(a,i,s,o);o=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&&bl(u,l,o)&&((u.f&4194320)!==0?(st(u,rr),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.#a.get(r)??0;this.#a.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#a.get(r)??0;n===1?this.#a.delete(r):this.#a.set(r,n-1)}this.#f||(this.#f=!0,nr(()=>{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.#o??=yd()).promise}static ensure(){if(ke===null){const t=ke=new ld;!yl&&!bs&&nr(()=>{t.#e||t.flush()})}return ke}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=Eo;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(gl=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(Si!==null&&r===Ee&&(Ht||(Ae===null||(Ae.f&2)===0)&&!xb))return;if((n&96)!==0){if((n&1024)===0)return;r.f^=tr}}this.#l.push(r)}#b(){if(this.linked){var t=this.#t,r=this.#r;t===null?Eo=r:t.#r=r,r===null?ki=t:r.#t=t,this.linked=!1}}};function b(e){var t=bs;bs=!0;try{var r;for(e&&(ke!==null&&!ke.is_fork&&ke.flush(),r=e());;){if(kb(),ke===null)return r;ke.flush()}}finally{bs=t}}function Cb(){if(0){var e;for(const r of ke.current.keys())for(const[n,i]of r.updated??[])var t}try{eb()}catch(r){kn(r,gl)}}var Rr=null;function Md(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Es(n)&&(Rr=new Set,Ci(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&nf(n),Rr?.size>0)){Hn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Rr.has(o)&&(Rr.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&24576)===0&&Ci(l)}}Rr.clear()}}Rr=null}}function Fd(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?Fd(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&bl(i,t,n)&&(st(i,rr),_l(i))}}function bl(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(vo.call(t,i))return!0;if((i.f&2)!==0&&bl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function _l(e){ke.schedule(e)}function Nd(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),st(e,tr);for(var r=e.first;r!==null;)Nd(r,t),r=r.next}}function Rd(e){st(e,tr);for(var t=e.first;t!==null;)Rd(t),t=t.next}function wl(e){let t=0,r=Sn(0),n;return()=>{Cl()&&(f(r),Ai(()=>(t===0&&(n=Re(()=>e(()=>Lr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var Ob=cs|bi;function Db(e,t,r,n){new Ib(e,t,r,n)}var Ib=class{parent;is_pending=!1;transform_error;#e;#t=_e?Te:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=wl(()=>(this.#f=Sn(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Ee;s.b=this,s.f|=128,r(i)},this.parent=Ee.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=Ss(()=>{if(_e){const i=this.#t;en();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));this.#y(o)}else s?this.#w():this.#v()}else this.#_()},Ob),_e&&(this.#e=Te)}#v(){try{this.#s=Rt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=Rt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=Rt(()=>e(this.#e)),nr(()=>{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.#a,()=>{this.#a=null}),this.#g(ke))}))}#_(){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();Il(this.#s,e);const t=this.#r.pending;this.#a=Rt(()=>t(this.#e))}else this.#g(ke)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Pd(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=Ee,r=Ae,n=Ve;sr(this.#i),Lt(this.#i),wi(this.#i.ctx);try{return Ei.ensure(),e()}catch(i){return Dd(i),null}finally{sr(t),Lt(r),wi(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.#a&&Gn(this.#a,()=>{this.#a=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,nr(()=>{this.#d=!1,this.#f&&Ti(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),f(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;ke?.is_fork?(this.#s&&ke.skip_effect(this.#s),this.#a&&ke.skip_effect(this.#a),this.#o&&ke.skip_effect(this.#o),ke.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(mt(this.#s),this.#s=null),this.#a&&(mt(this.#a),this.#a=null),this.#o&&(mt(this.#o),this.#o=null),_e&&(dt(this.#t),At(),dt(vs()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){fb();return}n=!0,i&&ab(),this.#o!==null&&Gn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){kn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return Rt(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return kn(l,this.#i.parent),null}}))};nr(()=>{var a;try{a=this.transform_error(e)}catch(l){kn(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>kn(l,this.#i&&this.#i.parent)):o(a)})}};function Ld(e,t,r,n){const i=gs()?xi:kl;var s=e.filter(h=>!h.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=Ee,l=Pb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function d(h){if((a.f&16384)===0){l();try{n([...o,...h])}catch(g){kn(g,a)}To()}}var u=zd();if(r.length===0){c.then(()=>d([])).finally(u);return}function p(){Promise.all(r.map(h=>Mb(h))).then(d).catch(h=>kn(h,a)).finally(u)}c?c.then(()=>{l(),p(),To()}):p()}function Pb(){var e=Ee,t=Ae,r=Ve,n=ke;if(0)var i;return function(o=!0){sr(e),Lt(t),wi(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function To(e=!0){sr(null),Lt(null),wi(null),e&&ke?.deactivate()}function zd(){var e=Ee,t=e.b,r=ke,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 $b=null;function cF(e){$b=e}var dF=new Set;function xi(e){var t=2|rr;return Ee!==null&&(Ee.f|=bi),{ctx:Ve,deps:null,effects:null,equals:xd,f:t,fn:e,reactions:null,rv:0,v:at,wv:0,parent:Ee,ac:null}}var Ao=Symbol("obsolete");function Mb(e,t,r){let n=Ee;n===null&&Yy();var i=void 0,s=Sn(at),o=!Ae,a=new Set;return Hb(()=>{var l=Ee,c=yd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==wo&&c.reject(h)}).finally(To)}catch(h){c.reject(h),To()}var d=ke;if(o){if((l.f&32768)!==0)var u=zd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(Ao);else for(const h of a.values())h.reject(Ao);a.add(c),d.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),a.delete(c),g!==Ao&&(d.activate(),g?(s.f|=_o,Ti(s,g)):((s.f&8388608)!==0&&(s.f^=_o),Ti(s,h)),d.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Po(()=>{for(const l of a)l.reject(Ao)}),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=xi(e);return Ht||lf(t),t}function kl(e){const t=xi(e);return t.equals=Td,t}function Fb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)mt(t[r])}}var fF=[];function Sl(e){var t,r=Ee,n=e.parent;if(!tn&&n!==null&&e.v!==at&&(n.f&24576)!==0)return lb(),e.v;sr(n);try{e.f&=~fs,Fb(e),t=hf(e)}finally{sr(r)}return t}function qd(e){var t=Sl(e);if(!e.equals(t)&&(e.wv=df(),(!ke?.is_fork||e.deps===null)&&(ke!==null?(ke.capture(e,t,!0),ys?.capture(e,t,!0)):e.v=t,e.deps===null))){st(e,tr);return}tn||(Ct!==null?(Cl()||ke?.is_fork)&&Ct.set(e,t):vl(e))}function Nb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(wo),t.fn!==null&&(t.teardown=Ne),t.ac=null,xs(t,0),Dl(t))}function Ud(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ci(t)}var _s=new Set,Hn=new Map;function hF(e){_s=e}var El=!1;function Rb(){El=!0}function Sn(e,t){var r={f:0,v:e,reactions:null,equals:xd,rv:0,wv:0};return r}function X(e,t){const r=Sn(e,t);return lf(r),r}function Vd(e,t=!1,r=!0){const n=Sn(e);return t||(n.equals=Td),_i&&r&&Ve!==null&&Ve.l!==null&&(Ve.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!_r||(Ae.f&131072)!==0)&&gs()&&(Ae.f&4325394)!==0&&(zr===null||!zr.has(e))&&ob();let n=r?Me(t):t;return Ti(e,n,xo)}function Ti(e,t,r=null){if(!e.equals(t)){Hn.set(e,tn?t:e.v);var n=Ei.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&Sl(i),Ct===null&&vl(i)}e.wv=df(),jd(e,rr,r),gs()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?Yb([e]):or.push(e)),!n.is_fork&&_s.size>0&&!El&&Bd()}return t}function Bd(){El=!1;for(const e of _s){(e.f&1024)!==0&&st(e,Zn);let t;try{t=Es(e)}catch{t=!0}t&&Ci(e)}_s.clear()}function Lr(e){I(e,e.v+1)}function jd(e,t,r){var n=e.reactions;if(n!==null)for(var i=gs(),s=n.length,o=0;o<s;o++){var a=n[o],l=a.f;if(!(!i&&a===Ee)){var c=(l&rr)===0;if(c&&st(a,t),(l&131072)!==0)_s.add(a);else if((l&2)!==0){var d=a;Ct?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=fs),jd(d,Zn,r))}else if(c){var u=a;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):_l(u)}}}}var Lb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Me(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=bo(e);if(t!==vd&&t!==Vy)return e;var r=new Map,n=mo(e),i=X(0),s=null,o=rn,a=u=>{if(rn===o)return u();var p=Ae,h=rn;Lt(null),cf(o);var g=u();return Lt(p),cf(h),g};n&&r.set("length",X(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,Ad(i,`${l} version`);for(const[p,h]of r)Ad(h,zb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&ib();var g=r.get(p);return g===void 0?a(()=>{var m=X(h.value,s);return r.set(p,m),m}):I(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=a(()=>X(at,s));r.set(p,g),Lr(i)}}else I(h,at),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=a(()=>{var y=X(Me(m?u[p]:at),s);return y}),r.set(p,g)),g!==void 0){var v=f(g);return v===at?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!==at)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!==at||Reflect.has(u,p);return(h!==void 0||Ee!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=a(()=>{var m=X(g?Me(u[p]):at,s);return m}),r.set(p,h)),f(h)===at)?!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?I(k,at):y in u&&(k=a(()=>X(at,s)),r.set(y+"",k))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=a(()=>X(void 0,s)),I(m,Me(h)),r.set(p,m));else{v=m.v!==at;var S=a(()=>Me(h));I(m,S)}var E=Reflect.getOwnPropertyDescriptor(u,p);if(E?.set&&E.set.call(g,h),!v){if(n&&typeof p=="string"){var A=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=A.v&&I(A,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!==at});for(var[h,g]of r)g.v!==at&&!(h in u)&&p.push(h);return p},setPrototypeOf(){sb()}})}function zb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Lb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function ws(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Zd(e,t){return Object.is(ws(e),ws(t))}var qb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function pF(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return qb.has(r)?function(...s){Rb();var o=i.apply(this,s);return Bd(),o}:i}})}function mF(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,o){const a=r.call(this,s,o);if(a===-1){for(let l=o??0;l<this.length;l+=1)if(ws(this[l])===s){dl("array.indexOf(...)");break}}return a},e.lastIndexOf=function(s,o){const a=n.call(this,s,o??this.length-1);if(a===-1){for(let l=0;l<=(o??this.length-1);l+=1)if(ws(this[l])===s){dl("array.lastIndexOf(...)");break}}return a},e.includes=function(s,o){const a=i.call(this,s,o);if(!a){for(let l=0;l<this.length;l+=1)if(ws(this[l])===s){dl("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Wd,Ub,xl,Hd,Gd;function Tl(){if(Wd===void 0){Wd=window,Ub=document,xl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Hd=Fr(t,"firstChild").get,Gd=Fr(t,"nextSibling").get,gd(e)&&(e[ll]=void 0,e[kd]=null,e[ul]=void 0,e.__e=void 0),gd(r)&&(r[cl]=void 0)}}function Nt(e=""){return document.createTextNode(e)}function Gt(e){return Hd.call(e)}function br(e){return Gd.call(e)}function M(e,t){if(!_e)return Gt(e);var r=Gt(Te);if(r===null)r=Te.appendChild(Nt());else if(t&&r.nodeType!==3){var n=Nt();return r?.before(n),dt(n),n}return t&&Oo(r),dt(r),r}function q(e,t=!1){if(!_e){var r=Gt(e);return r instanceof Comment&&r.data===""?br(r):r}if(t){if(Te?.nodeType!==3){var n=Nt();return Te?.before(n),dt(n),n}Oo(Te)}return Te}function K(e,t=1,r=!1){let n=_e?Te: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),dt(s),s}Oo(n)}return dt(n),n}function Al(e){e.textContent=""}function Kd(){return!Ht||Rr!==null?!1:(Ee.f&ol)!==0}function Co(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 Vb(e=""){return document.createComment(e)}function Oo(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 Bb(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function jb(e){_e&&Gt(e)!==null&&Al(e)}var Yd=!1;function Jd(){Yd||(Yd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[hs]?.()})},{capture:!0}))}function Do(e){var t=Ae,r=Ee;Lt(null),sr(null);try{return e()}finally{Lt(t),sr(r)}}function Io(e,t,r,n=r){e.addEventListener(t,()=>Do(r));const i=e[hs];i?e[hs]=()=>{i(),n(!0)}:e[hs]=()=>n(!0),Jd()}function Qd(e){Ee===null&&(Ae===null&&Xy(e),Qy()),tn&&Jy(e)}function Zb(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ir(e,t){var r=Ee;r!==null&&(r.f&8192)!==0&&(e|=sl);var n={ctx:Ve,deps:null,nodes:null,f:e|rr|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};ke?.register_created_effect(n);var i=n;if((e&4)!==0)Si!==null?Si.push(n):Ei.ensure().schedule(n);else if(t!==null){try{Ci(n)}catch(o){throw mt(n),o}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|=cs))}if(i!==null&&(i.parent=r,r!==null&&Zb(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function Cl(){return Ae!==null&&!_r}function Po(e){const t=ir(8,null);return st(t,tr),t.teardown=e,t}function ge(e){Qd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&Ve!==null&&!Ve.i){var r=Ve;(r.e??=[]).push(e)}else return Xd(e)}function Xd(e){return ir(4|_d,e)}function Ol(e){return Qd("$effect.pre"),ir(8|_d,e)}function ks(e){Ei.ensure();const t=ir(64|bi,e);return()=>{mt(t)}}function Wb(e){Ei.ensure();const t=ir(64|bi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{mt(t),n(void 0)}):(mt(t),n(void 0))})}function $o(e){return ir(4,e)}function Hb(e){return ir(Wy|bi,e)}function Ai(e,t=0){return ir(8|t,e)}function ae(e,t=[],r=[],n=[]){Ld(n,t,r,i=>{ir(8,()=>{e(...i.map(f))})})}function Ss(e,t=0){var r=ir(16|t,e);return r}function ef(e,t=0){var r=ir(jy|t,e);return r}function Rt(e){return ir(32|bi,e)}function tf(e){var t=e.teardown;if(t!==null){const r=tn,n=Ae;af(!0),Lt(null);try{t.call(null)}finally{af(r),Lt(n)}}}function Dl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Do(()=>{i.abort(wo)});var n=r.next;(r.f&64)!==0?r.parent=null:mt(r,t),r=n}}function Gb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&mt(t),t=r}}function mt(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(rf(e.nodes.start,e.nodes.end),r=!0),e.f|=bd,Dl(e,t&&!r),xs(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();tf(e),e.f^=bd,e.f|=Zy;var i=e.parent;i!==null&&i.first!==null&&nf(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function rf(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function nf(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=[];sf(e,n,!0);var i=()=>{r&&mt(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function sf(e,t,r){if((e.f&8192)===0){e.f^=sl;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;sf(i,t,o?r:!1)}i=s}}}function Mo(e){of(e,!0)}function of(e,t){if((e.f&8192)!==0){e.f^=sl,(e.f&1024)===0&&(st(e,rr),Ei.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;of(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Il(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 Kb=null,Fo=!1,tn=!1;function af(e){tn=e}var Ae=null,_r=!1;function Lt(e){Ae=e}var Ee=null;function sr(e){Ee=e}var zr=null;function lf(e){Ae!==null&&(!Ht||(Ae.f&2)!==0)&&(zr??=new Set).add(e)}var zt=null,Kt=0,or=null;function Yb(e){or=e}var uf=1,Kn=0,rn=Kn;function cf(e){rn=e}function df(){return++uf}function Es(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~fs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Es(s)&&qd(s),s.wv>e.wv)return!0}(t&512)!==0&&Ct===null&&st(e,tr)}return!1}function ff(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?ff(s,t,!1):t===s&&(r?st(s,rr):(s.f&1024)!==0&&st(s,Zn),_l(s))}}function hf(e){var t=zt,r=Kt,n=or,i=Ae,s=zr,o=Ve,a=_r,l=rn,c=e.f;zt=null,Kt=0,or=null,Ae=(c&96)===0?e:null,zr=null,wi(e.ctx),_r=!1,rn=++Kn,e.ac!==null&&(Do(()=>{e.ac.abort(wo)}),e.ac=null);try{e.f|=wd;var d=e.fn,u=d();e.f|=ol;var p=e.deps,h=ke?.is_fork;if(zt!==null){var g;if(h||xs(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(Cl()&&(e.f&512)!==0)for(g=Kt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Kt<p.length&&(xs(e,Kt),p.length=Kt);if(gs()&&or!==null&&!_r&&p!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)ff(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^=_o),u}catch(m){return Dd(m)}finally{e.f^=wd,zt=t,Kt=r,or=n,Ae=i,zr=s,wi(o),_r=a,rn=l}}function Jb(e,t){let r=t.reactions;if(r!==null){var n=Uy.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||!vo.call(zt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~fs),s.v!==at&&vl(s),Nb(s),xs(s,0)}}function xs(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Jb(e,r[n])}function Ci(e){var t=e.f;if((t&16384)===0){st(e,tr);var r=Ee,n=Fo;if(Ee=e,Fo=!0,0)var i,s;try{(t&16777232)!==0?Gb(e):Dl(e),tf(e);var o=hf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=uf,0)for(var a of e.deps);}finally{Fo=n,Ee=r}}}async function pf(){if(Ht)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function f(e){var t=(e.f&2)!==0;if(Kb?.add(e),Ae!==null&&!_r&&!(Ee!==null&&(Ee.f&16384)!==0)&&(zr===null||!zr.has(e))){var r=Ae.deps;if((Ae.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{Ae.deps??=[],vo.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:vo.call(n,Ae)||n.push(Ae)}}if(0){if(!_r&&$b&&!$b.warned&&($b.effect.f&2097152)===0&&!$b.effect_deps.has(e))var i;if(J2&&!_r&&tF!==null&&Ae!==null&&tF.reaction===Ae&&!e.trace){if(i)var s,o}}if(tn&&Hn.has(e))return Hn.get(e);if(t){var a=e;if(tn){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||vf(a))&&(l=Sl(a)),Hn.set(a,l),l}var c=(a.f&512)===0&&!_r&&Ae!==null&&(Fo||(Ae.f&512)!==0),d=(a.f&ol)===0;Es(a)&&(c&&(a.f|=512),qd(a)),c&&!d&&(Ud(a),mf(a))}if(Ct?.has(e))return Ct.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function mf(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&&(Ud(t),mf(t))}function vf(e){if(e.v===at)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&vf(t))return!0;return!1}function Re(e){var t=_r;try{return _r=!0,e()}finally{_r=t}}function Qb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Pl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Pl(r)}}}function Pl(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{Pl(e[n],t)}catch{}const r=bo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=md(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Ts=Symbol("events"),gf=new Set,$l=new Set;function Ml(e,t,r,n={}){function i(s){if(n.capture||Fl.call(t,s),!s.cancelBubble)return Do(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?nr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function vt(e,t,r,n={}){var i=Ml(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function No(e,t,r,n,i){var s={capture:n,passive:i},o=Ml(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Po(()=>{t.removeEventListener(e,o,s)})}function ft(e,t,r){(t[Ts]??={})[e]=r}function ar(e){for(var t=0;t<e.length;t++)gf.add(e[t]);for(var r of $l)r(e)}var yf=null;function Fl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;yf=e;var o=0,a=yf===e&&e[Ts];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Ts]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){wn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Ae,u=Ee;Lt(null),sr(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Ts]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?h.push(m):p=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let m of h)queueMicrotask(()=>{throw m});throw p}}finally{e[Ts]=t,delete e.currentTarget,Lt(d),sr(u)}}}var Xb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function bf(e){return Xb?.createHTML(e)??e}function e_(e){var t=Co("template");return t.innerHTML=bf(e.replaceAll("<!>","<!---->")),t.content}function wr(e,t){var r=Ee;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function j(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return wr(Te,null),Te;i===void 0&&(i=e_(s?e:"<!>"+e),r||(i=Gt(i)));var o=n||xl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Gt(o),l=o.lastChild;wr(a,l)}else wr(o,o);return o}}function qt(e=""){if(!_e){var t=Nt(e+"");return wr(t,t),t}var r=Te;return r.nodeType!==3?(r.before(r=Nt()),dt(r)):Oo(r),wr(r,r),r}function Y(){if(_e)return wr(Te,null),Te;var e=document.createDocumentFragment(),t=document.createComment(""),r=Nt();return e.append(t,r),wr(t,r),e}function x(e,t){if(_e){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Te),en();return}e!==null&&e.before(t)}function ht(){if(_e&&Te&&Te.nodeType===8&&Te.textContent?.startsWith("$")){const e=Te.textContent.substring(1);return en(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var t_=/\r/g;function r_(e){e=e.replace(t_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function n_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var i_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function s_(e){return i_.includes(e)}var o_=["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"],a_={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 l_(e){return e=e.toLowerCase(),a_[e]??e}var vF=[...o_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],u_=["touchstart","touchmove"];function c_(e){return u_.includes(e)}var d_=["$state","$state.raw","$derived","$derived.by"],gF=[...d_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function f_(e){return e?.replace(/\//g,"/​")}var _f=!0;function ie(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[cl]??=e.nodeValue)&&(e[cl]=r,e.nodeValue=`${r}`)}function wf(e,t){return kf(e,t)}function h_(e,t){Tl(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Te;try{for(var s=Gt(r);s&&(s.nodeType!==8||s.data!=="[");)s=br(s);if(!s)throw jn;yt(!0),dt(s);const o=kf(e,{...t,anchor:s});return yt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
11
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==jn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&tb(),Tl(),Al(r),yt(!1),wf(e,t)}finally{yt(n),dt(i)}}var Ro=new Map;function kf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){Tl();var l=void 0,c=Wb(()=>{var d=r??t.appendChild(Nt());Db(d,{pending:()=>{}},h=>{te({});var g=Ve;if(s&&(g.c=s),i&&(n.$$events=i),_e&&wr(h,null),_f=o,l=e(h,n)||{},_f=!0,_e&&(Ee.nodes.end=Te,Te===null||Te.nodeType!==8||Te.data!=="]"))throw ms(),jn;re()},a);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=c_(m);for(const S of[t,document]){var y=Ro.get(S);y===void 0&&(y=new Map,Ro.set(S,y));var k=y.get(m);k===void 0?(S.addEventListener(m,Fl,{passive:v}),y.set(m,1)):y.set(m,k+1)}}}};return p(go(gf)),$l.add(p),()=>{for(var h of u)for(const v of[t,document]){var g=Ro.get(v),m=g.get(h);--m==0?(v.removeEventListener(h,Fl),g.delete(h),g.size===0&&Ro.delete(v)):g.set(h,m)}$l.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return Nl.set(l,c),l}var Nl=new WeakMap;function p_(e,t){const r=Nl.get(e);return r?(Nl.delete(e),r(t)):Promise.resolve()}var Rl=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)Mo(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Mo(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 o=this.#r.get(s);o&&(mt(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var a=document.createDocumentFragment();Il(s,a),a.append(Nt()),this.#r.set(i,{effect:s,fragment:a})}else mt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(s,o,!1)):o()}}};#a=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,n]of this.#r)t.includes(r)||(mt(n.effect),this.#r.delete(r))};ensure(e,t){var r=ke,n=Kd();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[o,a]of this.#t)o===e?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of this.#r)o===e?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#s),r.ondiscard(this.#a)}else _e&&(this.anchor=Te),this.#s(r)}};function we(e,t,...r){var n=new Rl(e);Ss(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},cs)}if(0)var YF;function nn(e){Ve===null&&Sd("onMount"),_i&&Ve.l!==null?m_(Ve).m.push(e):ge(()=>{const t=Re(e);if(typeof t=="function")return t})}function m_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function v_(){return Symbol(qy)}function ce(e,t,r=!1){var n;_e&&(n=Te,en());var i=new Rl(e),s=r?cs:0;function o(a,l){if(_e){var c=fl(n);if(a!==parseInt(c.substring(1))){var d=vs();dt(d),i.anchor=d,yt(!1),i.ensure(a,l),yt(!0);return}}i.ensure(a,l)}Ss(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function qr(e,t){return t}function g_(e,t,r){for(var n=[],i=t.length,s,o=t.length,a=0;a<i;a++){let u=t[a];Gn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;Ll(e,go(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,d=c.parentNode;Al(d),d.append(c),e.items.clear()}Ll(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ll(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const o of e.pending.values())for(const a of o)n.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=ds,Il(s,document.createDocumentFragment())):mt(t[i],r)}}var Sf;function Le(e,t,r,n,i,s=null){var o=e,a=new Map;if((t&4)!==0){var l=e;o=_e?dt(Gt(l)):l.appendChild(Nt())}_e&&en();var c=null,d=kl(()=>{var y=r();return mo(y)?y:y==null?[]:go(y)}),u,p=new Map,h=!0;function g(y){(v.effect.f&16384)===0&&(v.pending.delete(y),v.fallback=c,y_(v,u,o,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Mo(c):(c.f^=ds,Cs(c,null,o)):Gn(c,()=>{c=null})))}function m(y){v.pending.delete(y)}var v={effect:Ss(()=>{u=f(d);var y=u.length;let k=!1;_e&&fl(o)==="[!"!=(y===0)&&(o=vs(),dt(o),yt(!1),k=!0);for(var S=new Set,E=ke,A=Kd(),O=0;O<y;O+=1){_e&&Te.nodeType===8&&Te.data==="]"&&(o=Te,k=!0,yt(!1));var $=u[O],z=n($,O);if(0)var B;var N=h?null:a.get(z);N?(N.v&&Ti(N.v,$),N.i&&Ti(N.i,O),A&&E.unskip_effect(N.e)):(N=b_(a,h?o:Sf??=Nt(),$,z,O,i,t,r),h||(N.e.f|=ds),a.set(z,N)),S.add(z)}if(y===0&&s&&!c&&(h?c=Rt(()=>s(o)):(c=Rt(()=>s(Sf??=Nt())),c.f|=ds)),y>S.size&&Ed("","",""),_e&&y>0&&dt(vs()),!h)if(p.set(E,S),A){for(const[V,U]of a)S.has(V)||E.skip_effect(U.e);E.oncommit(g),E.ondiscard(m)}else g(E);k&&yt(!0),f(d)}),flags:t,items:a,pending:p,outrogroups:null,fallback:c};h=!1,_e&&(o=Te)}function As(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function y_(e,t,r,n,i){var s=(n&8)!==0,o=t.length,a=e.items,l=As(e.effect.first),c,d=null,u,p=[],h=[],g,m,v,y;if(s)for(y=0;y<o;y+=1)g=t[y],m=i(g,y),v=a.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(y=0;y<o;y+=1){if(g=t[y],m=i(g,y),v=a.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&&(Mo(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=ds,v===l)Cs(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),En(e,d,v),En(e,v,k),Cs(v,k,r),d=v,p=[],h=[],l=As(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(p.length<h.length){var S=h[0],E;d=S.prev;var A=p[0],O=p[p.length-1];for(E=0;E<p.length;E+=1)Cs(p[E],S,r);for(E=0;E<h.length;E+=1)c.delete(h[E]);En(e,A.prev,O.next),En(e,d,A),En(e,O,S),l=S,d=O,y-=1,p=[],h=[]}else c.delete(v),Cs(v,l,r),En(e,v.prev,v.next),En(e,v,d===null?e.effect.first:d.next),En(e,d,v),d=v;continue}for(p=[],h=[];l!==null&&l!==v;)(c??=new Set).add(l),h.push(l),l=As(l.next);if(l===null)continue}(v.f&33554432)===0&&p.push(v),d=v,l=As(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Ll(e,go(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var $=[];if(c!==void 0)for(v of c)(v.f&8192)===0&&$.push(v);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&$.push(l),l=As(l.next);var z=$.length;if(z>0){var B=(n&4)!==0&&o===0?r:null;if(s){for(y=0;y<z;y+=1)$[y].nodes?.a?.measure();for(y=0;y<z;y+=1)$[y].nodes?.a?.fix()}g_(e,$,B)}}s&&nr(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function b_(e,t,r,n,i,s,o,a){var l=(o&1)!==0?(o&16)===0?Vd(r,!1,!1):Sn(r):null,c=(o&2)!==0?Sn(i):null;return{v:l,i:c,e:Rt(()=>(s(t,l??r,c??i,a),()=>{e.delete(n)}))}}function Cs(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 o=br(n);if(s.before(n),n===i)return;n=o}}function En(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function yF(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 o=String(r.get(s)),a=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Ed(o,a,l)}r.set(s,i)}}function bF(e,t,r){if(!t||t===r_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:pl?.[nl]&&(n=`in ${pl[nl]}`),cb(f_(n))}function Ef(e,t,r=!1,n=!1,i=!1,s=!1){var o=e,a="";if(r){var l=e;_e&&(o=dt(Gt(l)))}ae(()=>{var c=Ee;if(a===(a=t()??"")){_e&&en();return}if(r&&!_e){c.nodes=null,l.innerHTML=a,a!==""&&wr(Gt(l),l.lastChild);return}if(c.nodes!==null&&(rf(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(_e){for(var d=Te.data,u=en(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=br(u);if(u===null)throw ms(),jn;wr(Te,p),o=dt(u);return}var h=Co(n?"svg":i?"math":"template",n?Ly:i?zy:void 0);h.innerHTML=a;var g=n||i?h:h.content;if(wr(Gt(g),g.lastChild),n||i)for(;Gt(g);)o.before(Gt(g));else o.before(g)}})}function __(e,t,r,n,i){_e&&en();var s=t.$$slots?.[r],o=!1;s===!0&&(s=t[r==="default"?"children":r],o=!0),s===void 0?i!==null&&i(e):s(e,o?()=>n:n)}function Pe(e,t,r){var n;_e&&(n=Te,en());var i=new Rl(e);Ss(()=>{var s=t()??null;if(_e&&fl(n)==="["!=(s!==null)){var o=vs();dt(o),i.anchor=o,yt(!1),i.ensure(s,s&&(a=>r(a,s))),yt(!0);return}i.ensure(s,s&&(a=>r(a,s)))},cs)}function w_(e,t){var r=void 0,n;ef(()=>{r!==(r=t())&&(n&&(mt(n),n=null),r&&(n=Rt(()=>{$o(()=>r(e))})))})}function xf(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=xf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Lo(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=xf(e))&&(n&&(n+=" "),n+=t);return n}function lr(e){return typeof e=="object"?Lo(e):e??""}var Tf=[...`
12
- \r\f \v\uFEFF`];function k_(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,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||Tf.includes(n[o-1]))&&(a===n.length||Tf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Af(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 zl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function S_(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,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(zl)),i&&l.push(...Object.keys(i).map(zl));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(a?p==="/"&&e[u-1]==="*"&&(a=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?a=!0:p==='"'||p==="'"?s=p:p==="("?o++:p===")"&&o--,!a&&s===!1&&o===0){if(p===":"&&d===-1)d=u;else if(p===";"||u===m-1){if(d!==-1){var h=zl(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+=Af(n)),i&&(r+=Af(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function St(e,t,r,n,i,s){var o=e[ll];if(_e||o!==r||o===void 0){var a=k_(r,n,s);(!_e||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[ll]=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 ql(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 E_(e,t,r,n){var i=e[ul];if(_e||i!==t){var s=S_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[ul]=t}else n&&(Array.isArray(n)?(ql(e,r?.[0],n[0]),ql(e,r?.[1],n[1],"important")):ql(e,r,n));return n}function zo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!mo(t))return db();for(var n of e.options)n.selected=t.includes(Os(n));return}for(n of e.options)if(Zd(Os(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Cf(e){var t=new MutationObserver(()=>{zo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Po(()=>{t.disconnect()})}function x_(e,t,r=t){var n=new WeakSet,i=!0;Io(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Os);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Os(l)}r(a),e.__value=a,ke!==null&&n.add(ke)}),$o(()=>{var s=t();if(e===document.activeElement){var o=Ht?ys:ke;if(n.has(o))return}if(zo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=Os(a),r(s))}e.__value=s,i=!1}),Cf(e)}function Os(e){return"__value"in e?e.__value:e.value}var Ds=Symbol("class"),Is=Symbol("style"),Of=Symbol("is custom element"),Df=Symbol("is html"),T_=ps?"link":"LINK",If=ps?"input":"INPUT",A_=ps?"option":"OPTION",C_=ps?"select":"SELECT",O_=ps?"progress":"PROGRESS";function Ps(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[hs]=r,nr(r),Jd()}}function Ul(e,t){var r=qo(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==O_)||(e.value=t??"")}function D_(e,t){var r=qo(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Pf(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function me(e,t,r,n){var i=qo(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===T_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Hy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Bl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Yn(e,t,r){var n=Ae,i=Ee;let s=_e;_e&&yt(!1),Lt(null),sr(null);try{t!=="style"&&(Vl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Bl(e).includes(t):r&&typeof r=="object")?e[t]=r:me(e,t,r==null?r:String(r))}finally{Lt(n),sr(i),s&&yt(!0)}}function I_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===If){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ps(o)}var a=qo(e),l=a[Of],c=!a[Df];let d=_e&&l;d&&yt(!1);var u=t||{},p=e.nodeName===A_;for(var h in t)h in r||(r[h]=null);r.class?r.class=lr(r.class):(n||r[Ds])&&(r.class=null),r[Is]&&(r.style??=null);var g=Bl(e);if(e.nodeName===If&&"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 $=r[O];if(p&&O==="value"&&$==null){e.value=e.__value="",u[O]=$;continue}if(O==="class"){St(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Ds],r[Ds]),u[O]=$,u[Ds]=r[Ds];continue}if(O==="style"){E_(e,$,t?.[Is],r[Is]),u[O]=$,u[Is]=r[Is];continue}var v=u[O];if(!($===v&&!($===void 0&&e.hasAttribute(O)))){u[O]=$;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const z={},B="$$"+O;let N=O.slice(2);var k=s_(N);if(n_(N)&&(N=N.slice(0,-7),z.capture=!0),!k&&v){if($!=null)continue;e.removeEventListener(N,u[B],z),u[B]=null}if(k)ft(N,e,$),ar([N]);else if($!=null){let V=function(U){u[O].call(this,U)};var A=V;u[B]=Ml(N,e,V,z)}}else if(O==="style")me(e,O,$);else if(O==="autofocus")Bb(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&p)Pf(e,$);else{var S=O;c||(S=l_(S));var E=S==="defaultValue"||S==="defaultChecked";if($==null&&!l&&!E)if(a[O]=null,S==="value"||S==="checked"){let z=e;const B=t===void 0;if(S==="value"){let N=z.defaultValue;z.removeAttribute(S),z.defaultValue=N,z.value=z.__value=B?N:null}else{let N=z.defaultChecked;z.removeAttribute(S),z.defaultChecked=N,z.checked=B?N:!1}}else e.removeAttribute(O);else E||g.includes(S)&&(l||typeof $!="string")?(e[S]=$,S in a&&(a[S]=at)):typeof $!="function"&&me(e,S,$,s)}}}return d&&yt(!0),u}function ze(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Ld(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===C_,p=!1;if(ef(()=>{var g=t(...l.map(f)),m=I_(e,c,g,s,o,a);p&&u&&"value"in g&&zo(e,g.value);for(let y of Object.getOwnPropertySymbols(d))g[y]||mt(d[y]);for(let y of Object.getOwnPropertySymbols(g)){var v=g[y];y.description==="@attach"&&(!c||v!==c[y])&&(d[y]&&mt(d[y]),d[y]=Rt(()=>w_(e,()=>v))),m[y]=v}c=m}),u){var h=e;$o(()=>{zo(h,c.value,!0),Cf(h)})}p=!0})}function qo(e){return e[kd]??={[Of]:e.nodeName.includes("-"),[Df]:e.namespaceURI===Ry}}var Vl=new Map;function Bl(e){var t=e.getAttribute("is")||e.nodeName,r=Vl.get(t);if(r)return r;Vl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=md(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=bo(i)}return r}function _F(e,t,r){}function jl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function $f(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function P_(e,t){var r=$f(e.srcset),n=$f(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(jl(r[o][0],i)||jl(i,r[o][0])))}var Zl=null;function $_(){if(Zl===null){var e=Co("select");e.innerHTML=bf("<option><span>t</span></option>"),Zl=e.firstChild?.firstChild?.nodeType===1}return Zl}function M_(e,t){var r=_e;$_()||(yt(!1),e.textContent="",e.append(Vb("")));try{t()}finally{r&&(_e?P(e):(yt(!0),dt(e)))}}function Uo(e,t,r=t){var n=new WeakSet;Io(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Hl(e)?Gl(s):s,r(s),ke!==null&&n.add(ke),await pf(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var c=e.value.length;o===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(a,c))}}}),(_e&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Hl(e)?Gl(e.value):e.value),ke!==null&&n.add(ke)),Ai(()=>{var i=t();if(e===document.activeElement){var s=Ht?ys:ke;if(n.has(s))return}Hl(e)&&i===Gl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Wl=new Set;function F_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=e;let a=!1;if(t!==null)for(var l of t)o=o[l]??=[];o.push(r),Io(r,"change",()=>{var c=r.__value;s&&(c=Mf(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Ai(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Zd(r.__value,c)}),Po(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Wl.has(o)||(Wl.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Wl.delete(o)})),nr(()=>{if(a){var c;s?c=Mf(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function N_(e,t,r=t){Io(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),Ai(()=>{var n=t();e.checked=!!n})}function Mf(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 Hl(e){var t=e.type;return t==="number"||t==="range"}function Gl(e){return e===""?null:+e}function Kl(e,t){return e===t||e?.[Nr]===t}function Yl(e={},t,r,n){var i=Ve.r,s=Ee;return $o(()=>{var o,a;return Ai(()=>{o=a,a=n?.()||[],Re(()=>{Kl(r(...a),e)||(t(e,...a),o&&Kl(r(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{a&&Kl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Jl(e=!1){const t=Ve,r=t.l.u;if(!r)return;let n=()=>Qb(t.s);if(e){let i=0,s={};const o=xi(()=>{let a=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>f(o)}r.b.length&&Ol(()=>{Ff(t,n),il(r.b)}),ge(()=>{const i=Re(()=>r.m.map(By));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ge(()=>{Ff(t,n),il(r.a)})}function Ff(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}var R_={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 Ze(e,t,r){return new Proxy({props:e,exclude:t},R_)}var L_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(us(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];us(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(us(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===al)return!1;for(let r of e.props)if(us(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(us(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 xn(...e){return new Proxy({props:e},L_)}function _(e,t,r,n){var i=!_i||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=xi(n),f(c)):(l&&(l=!1,a=o?Re(n):n),a);let u;if(s){var p=Nr in e||al in e;u=Fr(e,t)?.set??(p&&t in e?E=>e[t]=E:void 0)}var h,g=!1;s?[h,g]=Tb(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=d(),u&&(i&&rb(t),u(h)));var m;if(i?m=()=>{var E=e[t];return E===void 0?d():(l=!0,E)}:m=()=>{var E=e[t];return E!==void 0&&(a=void 0),E===void 0?a:E},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(E,A){return arguments.length>0?((!i||!A||v||g)&&u(A?m():E),E):m()})}var y=!1,k=((r&1)!==0?xi:kl)(()=>(y=!1,m()));s&&f(k);var S=Ee;return(function(E,A){if(arguments.length>0){const O=A?f(k):i&&s?Me(E):E;return I(k,O),y=!0,a!==void 0&&(a=O),E}return tn&&y||(S.f&16384)!==0?k.v:f(k)})}function z_(e){return new q_(e)}var q_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=Vd(s,!1,!1);return t.set(i,o),o};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===al?!0:(f(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return I(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?h_:wf)(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"||wn(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=()=>{p_(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()}},Nf;typeof HTMLElement=="function"&&(Nf=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 o=Co("slot");i!=="default"&&(o.name=i),x(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=U_(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]=Vo(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=z_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ks(()=>{Ai(()=>{this.$$r=!0;for(const i of yo(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Vo(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 o=this.$$c.$on(i,s);this.$$l_u.set(s,o)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Vo(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 yo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Vo(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 U_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ne(e,t,r,n,i,s){let o=class extends Nf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return yo(t).map(a=>(t[a].attribute||a).toLowerCase())}};return yo(t).forEach(a=>{wn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Vo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Fr(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{wn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var Rf={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:Z_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},V_={...Rf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function B_(e){return e==="angular"?Rf:V_}function j_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function Z_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function W_(e){return new Promise(t=>setTimeout(t,e))}function Lf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function H_(e){return typeof e=="boolean"}function Ql(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=e();if(a){r(a);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}var Xl=Array.isArray,zf=e=>!!e&&e.constructor===Object,G_=e=>typeof e=="string"||e instanceof String,K_=e=>{try{return Number(e)===e}catch{return!1}},Y_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),qf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function sn(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var J_=(e,t,r=!1)=>{if(!e)return[];const n=(s,o)=>t(s)-t(o),i=(s,o)=>t(o)-t(s);return e.slice().sort(r===!0?i:n)};function Q_(e,t){const r=t??(n=>n);return qf(e,(n,i)=>r(n)>r(i)?n:i)}function eu(e,t){const r=t??(n=>n);return qf(e,(n,i)=>r(n)<r(i)?n:i)}var X_=(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)},Uf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},ew=(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]:zf(e[n])?Et(e[n],i):i}),{}),Vf=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&&Lf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Lf(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(!(zf(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)}},tw=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}},Bf;function G(e,t,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const c=o.prototype,d=Object.keys(c);for(let u=0;u<d.length;u++){const p=d[u];p in a||(a[p]=c[p].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Oi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Bf=globalThis).__zod_globalConfig??(Bf.__zod_globalConfig={});var Bo=globalThis.__zod_globalConfig;function Jn(e){return e&&Object.assign(Bo,e),Bo}function Zf(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 tu(e,t){return typeof t=="bigint"?t.toString():t}function ru(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function nu(e){return e==null}function iu(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rw(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 Wf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Wf)return n===void 0&&(n=Wf,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 Tn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Hf(e){return JSON.stringify(e)}function nw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Gf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var iw=ru(()=>{if(Bo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function $s(e){if(jo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(jo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Kf(e){return $s(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var sw=new Set(["string","number","symbol"]);function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function An(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 ow(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var aw={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 lw(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 An(e,Tn(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 uw(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 An(e,Tn(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 cw(e,t){if(!$s(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 An(e,Tn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Qn(this,"shape",n),n}}))}function dw(e,t){if(!$s(t))throw new Error("Invalid input to safeExtend: expected a plain object");return An(e,Tn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Qn(this,"shape",r),r}}))}function fw(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return An(e,Tn(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 hw(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 An(t,Tn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)s[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Qn(this,"shape",s),s},checks:[]}))}function pw(e,t,r){return An(t,Tn(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 Di(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 mw(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 Yf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Wo(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Wo(e.inst?._zod.def?.error?.(e))??Wo(t?.error?.(e))??Wo(r.customError?.(e))??Wo(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:o,...a}=e;return a.path??(a.path=[]),a.message=n,t?.reportInput&&(a.input=o),a}function su(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ms(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Jf=(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,tu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qf=G("$ZodError",Jf),Xf=G("$ZodError",Jf,{Parent:Error});function vw(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 gw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{const a=[...s,...o.path];if(a.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<a.length;){const d=a[c];c!==a.length-1?l[d]=l[d]||{_errors:[]}:(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))),l=l[d],c++}}}};return n(e),r}var ou=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Oi;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Jn())));throw Gf(a,i?.callee),a}return o.value},au=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Jn())));throw Gf(a,i?.callee),a}return o.value},Ho=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 Oi;return s.issues.length?{success:!1,error:new(e??Qf)(s.issues.map(o=>Xn(o,i,Jn())))}:{success:!0,data:s.value}},yw=Ho(Xf),Go=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(o=>Xn(o,i,Jn())))}:{success:!0,data:s.value}},bw=Go(Xf),_w=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},ww=e=>(t,r,n)=>ou(e)(t,r,n),kw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return au(e)(t,r,i)},Sw=e=>async(t,r,n)=>au(e)(t,r,n),Ew=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ho(e)(t,r,i)},xw=e=>(t,r,n)=>Ho(e)(t,r,n),Tw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Go(e)(t,r,i)},Aw=e=>async(t,r,n)=>Go(e)(t,r,n),Cw=/^[cC][0-9a-z]{6,}$/,Ow=/^[0-9a-z]+$/,Dw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Iw=/^[0-9a-vA-V]{20}$/,Pw=/^[A-Za-z0-9]{27}$/,$w=/^[a-zA-Z0-9_-]{21}$/,Mw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fw=/^([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})$/,eh=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)$/,Nw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Rw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Lw(){return new RegExp(Rw,"u")}var zw=/^(?:(?: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])$/,qw=/^(([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}|:))$/,Uw=/^((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])$/,Vw=/^(([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])$/,Bw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,th=/^[A-Za-z0-9_-]*$/,jw=/^https?$/,Zw=/^\+[1-9]\d{6,14}$/,rh="(?:(?:\\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])))",Ww=new RegExp(`^${rh}$`);function nh(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 Hw(e){return new RegExp(`^${nh(e)}$`)}function Gw(e){const t=nh({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(`^${rh}T(?:${n})$`)}var Kw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Yw=/^-?\d+$/,Jw=/^-?\d+(?:\.\d+)?$/,Qw=/^[^A-Z]*$/,Xw=/^[^a-z]*$/,Ut=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ih={number:"number",bigint:"bigint",object:"date"},sh=G("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=ih[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})}}),oh=G("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=ih[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})}}),e0=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):rw(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})}}),t0=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]=aw[t.format];e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=Yw)}),e._zod.check=o=>{const a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,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}):o.issues.push({input:a,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}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>s&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),r0=G("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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=su(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),n0=G("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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=su(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),i0=G("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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 o=su(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ko=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=()=>{})}),s0=G("$ZodCheckRegex",(e,t)=>{Ko.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})}}),o0=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qw),Ko.init(e,t)}),a0=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xw),Ko.init(e,t)}),l0=G("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Zo(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})}}),u0=G("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Zo(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})}}),c0=G("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Zo(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})}}),d0=G("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),f0=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 dF(e){const t=Sb.get(e);t&&(kn(e,"message",{value:t.message}),kn(e,"stack",{value:t.stack}))}var Eb=~(nr|Zn|rr);function ot(e,t){e.f=e.f&Eb|t}function vl(e){(e.f&512)!==0||e.deps===null?ot(e,rr):ot(e,Zn)}function Id(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=fs,Id(t.deps))}function Pd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),Id(e.deps),ot(e,rr)}var xb=!1,So=!1;function Tb(e){var t=So;try{return So=!1,[e(),So]}finally{So=t}}var Eo=null,ki=null,ke=null,ys=null,Ct=null,gl=null,bs=!1,yl=!1,Si=null,xo=null,$d=0,fF=new Set,Ab=1,Ei=class ld{id=Ab++;#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;#a=new Map;#o=null;#l=[];#u=[];#c=new Set;#d=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){ki===null?Eo=ki=this:(ki.#r=this,this.#t=ki),ki=this}#m(){if(this.is_fork)return!0;for(const n of this.#a.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)ot(i,nr),r(i);for(i of n.m)ot(i,Zn),r(i)}this.#p.add(t)}#v(){this.#e=!0,$d++>1e3&&(this.#b(),Cb());for(const l of this.#c)this.#d.delete(l),ot(l,nr),this.schedule(l);for(const l of this.#d)ot(l,Zn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=Si=[],n=[],i=xo=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Rd(l),this.#m()||this.discard(),c}if(ke=null,i.length>0){var s=ld.ensure();for(const l of i)s.schedule(l)}if(Si=null,xo=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Nd(l,c);i.length>0&&ke.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#c.clear(),this.#d.clear();for(const l of this.#n)l(this);this.#n.clear(),ys=this,Md(n),Md(r),ys=null,this.#o?.resolve();var a=ke;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Ht&&(this.#k(),ke=a)),this.#l.length>0)if(a!==null){const l=a;l.#l.push(...this.#l.filter(c=>!l.#l.includes(c)))}else a=this;a!==null&&a.#v()}#y(t,r,n){t.f^=rr;for(var i=t.first;i!==null;){var s=i.f,o=(s&96)!==0;if(!(o&&(s&1024)!==0||(s&8192)!==0||this.#h.has(i))&&i.fn!==null){o?i.f^=rr:(s&4)!==0?r.push(i):Ht&&(s&16777224)!==0?n.push(i):Es(i)&&((s&16)!==0&&this.#d.add(i),Ci(i));var a=i.first;if(a!==null){i=a;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 a of i){var s=a.f;if((s&2)!==0)r(a);else{var o=a;s&4194320&&!this.async_deriveds.has(o)&&(this.#d.delete(o),ot(o,nr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),ke=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)Pd(t[r],this.#c,this.#d)}capture(t,r,n=!1){t.v!==lt&&!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(){ke=this}deactivate(){ke=null,Ct=null}flush(){try{yl=!0,ke=this,this.#v()}finally{$d=0,gl=null,Si=null,xo=null,yl=!1,ke=null,Ct=null,Hn.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#b(),this.#o?.resolve()}register_created_effect(t){this.#u.push(t)}#k(){for(let d=Eo;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,o=new Map;for(var a of r)Fd(a,i,s,o);o=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&&bl(u,l,o)&&((u.f&4194320)!==0?(ot(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.#a.get(r)??0;this.#a.set(r,n+1)}}decrement(t,r){if(this.#s-=1,t){let n=this.#a.get(r)??0;n===1?this.#a.delete(r):this.#a.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.#o??=yd()).promise}static ensure(){if(ke===null){const t=ke=new ld;!yl&&!bs&&ir(()=>{t.#e||t.flush()})}return ke}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=Eo;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(gl=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(Si!==null&&r===Ee&&(Ht||(Oe===null||(Oe.f&2)===0)&&!xb))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?Eo=r:t.#r=r,r===null?ki=t:r.#t=t,this.linked=!1}}};function b(e){var t=bs;bs=!0;try{var r;for(e&&(ke!==null&&!ke.is_fork&&ke.flush(),r=e());;){if(kb(),ke===null)return r;ke.flush()}}finally{bs=t}}function Cb(){if(0){var e;for(const r of ke.current.keys())for(const[n,i]of r.updated??[])var t}try{eb()}catch(r){Sn(r,gl)}}var Rr=null;function Md(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&Es(n)&&(Rr=new Set,Ci(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&nf(n),Rr?.size>0)){Hn.clear();for(const i of Rr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Rr.has(o)&&(Rr.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&24576)===0&&Ci(l)}}Rr.clear()}}Rr=null}}function Fd(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?Fd(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&bl(i,t,n)&&(ot(i,nr),_l(i))}}function bl(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(vo.call(t,i))return!0;if((i.f&2)!==0&&bl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function _l(e){ke.schedule(e)}function Nd(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),ot(e,rr);for(var r=e.first;r!==null;)Nd(r,t),r=r.next}}function Rd(e){ot(e,rr);for(var t=e.first;t!==null;)Rd(t),t=t.next}function wl(e){let t=0,r=En(0),n;return()=>{Cl()&&(f(r),Ai(()=>(t===0&&(n=Re(()=>e(()=>Lr(r)))),t+=1,()=>{ir(()=>{t-=1,t===0&&(n?.(),n=void 0,Lr(r))})})))}}var Ob=cs|bi;function Db(e,t,r,n){new Ib(e,t,r,n)}var Ib=class{parent;is_pending=!1;transform_error;#e;#t=_e?Ae:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#c=0;#d=!1;#h=new Set;#p=new Set;#f=null;#m=wl(()=>(this.#f=En(this.#u),()=>{this.#f=null}));constructor(e,t,r,n){this.#e=e,this.#r=t,this.#n=i=>{var s=Ee;s.b=this,s.f|=128,r(i)},this.parent=Ee.b,this.transform_error=n??this.parent?.transform_error??(i=>i),this.#i=Ss(()=>{if(_e){const i=this.#t;Xr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));this.#y(o)}else s?this.#w():this.#v()}else this.#_()},Ob),_e&&(this.#e=Ae)}#v(){try{this.#s=Rt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=Rt(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=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.#a,()=>{this.#a=null}),this.#g(ke))}))}#_(){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();Il(this.#s,e);const t=this.#r.pending;this.#a=Rt(()=>t(this.#e))}else this.#g(ke)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){Pd(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=Ee,r=Oe,n=Ve;or(this.#i),Lt(this.#i),wi(this.#i.ctx);try{return Ei.ensure(),e()}catch(i){return Dd(i),null}finally{or(t),Lt(r),wi(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.#a&&Gn(this.#a,()=>{this.#a=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&&Ti(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),f(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;ke?.is_fork?(this.#s&&ke.skip_effect(this.#s),this.#a&&ke.skip_effect(this.#a),this.#o&&ke.skip_effect(this.#o),ke.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(vt(this.#s),this.#s=null),this.#a&&(vt(this.#a),this.#a=null),this.#o&&(vt(this.#o),this.#o=null),_e&&(ft(this.#t),At(),ft(vs()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){fb();return}n=!0,i&&ab(),this.#o!==null&&Gn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){Sn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return Rt(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return Sn(l,this.#i.parent),null}}))};ir(()=>{var a;try{a=this.transform_error(e)}catch(l){Sn(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>Sn(l,this.#i&&this.#i.parent)):o(a)})}};function Ld(e,t,r,n){const i=gs()?xi:kl;var s=e.filter(h=>!h.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=Ee,l=Pb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function d(h){if((a.f&16384)===0){l();try{n([...o,...h])}catch(g){Sn(g,a)}To()}}var u=zd();if(r.length===0){c.then(()=>d([])).finally(u);return}function p(){Promise.all(r.map(h=>Mb(h))).then(d).catch(h=>Sn(h,a)).finally(u)}c?c.then(()=>{l(),p(),To()}):p()}function Pb(){var e=Ee,t=Oe,r=Ve,n=ke;if(0)var i;return function(o=!0){or(e),Lt(t),wi(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function To(e=!0){or(null),Lt(null),wi(null),e&&ke?.deactivate()}function zd(){var e=Ee,t=e.b,r=ke,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 $b=null;function hF(e){$b=e}var pF=new Set;function xi(e){var t=2|nr;return Ee!==null&&(Ee.f|=bi),{ctx:Ve,deps:null,effects:null,equals:xd,f:t,fn:e,reactions:null,rv:0,v:lt,wv:0,parent:Ee,ac:null}}var Ao=Symbol("obsolete");function Mb(e,t,r){let n=Ee;n===null&&Yy();var i=void 0,s=En(lt),o=!Oe,a=new Set;return Hb(()=>{var l=Ee,c=yd();i=c.promise;try{Promise.resolve(e()).then(c.resolve,h=>{h!==wo&&c.reject(h)}).finally(To)}catch(h){c.reject(h),To()}var d=ke;if(o){if((l.f&32768)!==0)var u=zd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(Ao);else for(const h of a.values())h.reject(Ao);a.add(c),d.async_deriveds.set(l,c)}const p=(h,g=void 0)=>{u?.(),a.delete(c),g!==Ao&&(d.activate(),g?(s.f|=_o,Ti(s,g)):((s.f&8388608)!==0&&(s.f^=_o),Ti(s,h)),d.deactivate())};c.promise.then(p,h=>p(null,h||"unknown"))}),Po(()=>{for(const l of a)l.reject(Ao)}),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=xi(e);return Ht||lf(t),t}function kl(e){const t=xi(e);return t.equals=Td,t}function Fb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)vt(t[r])}}var mF=[];function Sl(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==lt&&(n.f&24576)!==0)return lb(),e.v;or(n);try{e.f&=~fs,Fb(e),t=hf(e)}finally{or(r)}return t}function qd(e){var t=Sl(e);if(!e.equals(t)&&(e.wv=df(),(!ke?.is_fork||e.deps===null)&&(ke!==null?(ke.capture(e,t,!0),ys?.capture(e,t,!0)):e.v=t,e.deps===null))){ot(e,rr);return}en||(Ct!==null?(Cl()||ke?.is_fork)&&Ct.set(e,t):vl(e))}function Nb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(wo),t.fn!==null&&(t.teardown=Ne),t.ac=null,xs(t,0),Dl(t))}function Ud(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ci(t)}var _s=new Set,Hn=new Map;function vF(e){_s=e}var El=!1;function Rb(){El=!0}function En(e,t){var r={f:0,v:e,reactions:null,equals:xd,rv:0,wv:0};return r}function re(e,t){const r=En(e,t);return lf(r),r}function Vd(e,t=!1,r=!0){const n=En(e);return t||(n.equals=Td),_i&&r&&Ve!==null&&Ve.l!==null&&(Ve.l.s??=[]).push(n),n}function I(e,t,r=!1){Oe!==null&&(!_r||(Oe.f&131072)!==0)&&gs()&&(Oe.f&4325394)!==0&&(zr===null||!zr.has(e))&&ob();let n=r?Me(t):t;return Ti(e,n,xo)}function Ti(e,t,r=null){if(!e.equals(t)){Hn.set(e,en?t:e.v);var n=Ei.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&Sl(i),Ct===null&&vl(i)}e.wv=df(),jd(e,nr,r),gs()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(ar===null?Yb([e]):ar.push(e)),!n.is_fork&&_s.size>0&&!El&&Bd()}return t}function Bd(){El=!1;for(const e of _s){(e.f&1024)!==0&&ot(e,Zn);let t;try{t=Es(e)}catch{t=!0}t&&Ci(e)}_s.clear()}function Lr(e){I(e,e.v+1)}function jd(e,t,r){var n=e.reactions;if(n!==null)for(var i=gs(),s=n.length,o=0;o<s;o++){var a=n[o],l=a.f;if(!(!i&&a===Ee)){var c=(l&nr)===0;if(c&&ot(a,t),(l&131072)!==0)_s.add(a);else if((l&2)!==0){var d=a;Ct?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=fs),jd(d,Zn,r))}else if(c){var u=a;(l&16)!==0&&Rr!==null&&Rr.add(u),r!==null?r.push(u):_l(u)}}}}var Lb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Me(e){if(typeof e!="object"||e===null||Nr in e)return e;const t=bo(e);if(t!==vd&&t!==Vy)return e;var r=new Map,n=mo(e),i=re(0),s=null,o=tn,a=u=>{if(tn===o)return u();var p=Oe,h=tn;Lt(null),cf(o);var g=u();return Lt(p),cf(h),g};n&&r.set("length",re(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,Ad(i,`${l} version`);for(const[p,h]of r)Ad(h,zb(l,p));c=!1}}return new Proxy(e,{defineProperty(u,p,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&ib();var g=r.get(p);return g===void 0?a(()=>{var m=re(h.value,s);return r.set(p,m),m}):I(g,h.value,!0),!0},deleteProperty(u,p){var h=r.get(p);if(h===void 0){if(p in u){const g=a(()=>re(lt,s));r.set(p,g),Lr(i)}}else I(h,lt),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=a(()=>{var y=re(Me(m?u[p]:lt),s);return y}),r.set(p,g)),g!==void 0){var v=f(g);return v===lt?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!==lt)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!==lt||Reflect.has(u,p);return(h!==void 0||Ee!==null&&(!g||Fr(u,p)?.writable))&&(h===void 0&&(h=a(()=>{var m=re(g?Me(u[p]):lt,s);return m}),r.set(p,h)),f(h)===lt)?!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?I(k,lt):y in u&&(k=a(()=>re(lt,s)),r.set(y+"",k))}if(m===void 0)(!v||Fr(u,p)?.writable)&&(m=a(()=>re(void 0,s)),I(m,Me(h)),r.set(p,m));else{v=m.v!==lt;var E=a(()=>Me(h));I(m,E)}var x=Reflect.getOwnPropertyDescriptor(u,p);if(x?.set&&x.set.call(g,h),!v){if(n&&typeof p=="string"){var A=r.get("length"),O=Number(p);Number.isInteger(O)&&O>=A.v&&I(A,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!==lt});for(var[h,g]of r)g.v!==lt&&!(h in u)&&p.push(h);return p},setPrototypeOf(){sb()}})}function zb(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Lb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function ws(e){try{if(e!==null&&typeof e=="object"&&Nr in e)return e[Nr]}catch{}return e}function Zd(e,t){return Object.is(ws(e),ws(t))}var qb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function gF(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return qb.has(r)?function(...s){Rb();var o=i.apply(this,s);return Bd(),o}:i}})}function yF(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(s,o){const a=r.call(this,s,o);if(a===-1){for(let l=o??0;l<this.length;l+=1)if(ws(this[l])===s){dl("array.indexOf(...)");break}}return a},e.lastIndexOf=function(s,o){const a=n.call(this,s,o??this.length-1);if(a===-1){for(let l=0;l<=(o??this.length-1);l+=1)if(ws(this[l])===s){dl("array.lastIndexOf(...)");break}}return a},e.includes=function(s,o){const a=i.call(this,s,o);if(!a){for(let l=0;l<this.length;l+=1)if(ws(this[l])===s){dl("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Wd,Ub,xl,Hd,Gd;function Tl(){if(Wd===void 0){Wd=window,Ub=document,xl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Hd=Fr(t,"firstChild").get,Gd=Fr(t,"nextSibling").get,gd(e)&&(e[ll]=void 0,e[kd]=null,e[ul]=void 0,e.__e=void 0),gd(r)&&(r[cl]=void 0)}}function Nt(e=""){return document.createTextNode(e)}function Gt(e){return Hd.call(e)}function br(e){return Gd.call(e)}function M(e,t){if(!_e)return Gt(e);var r=Gt(Ae);if(r===null)r=Ae.appendChild(Nt());else if(t&&r.nodeType!==3){var n=Nt();return r?.before(n),ft(n),n}return t&&Oo(r),ft(r),r}function q(e,t=!1){if(!_e){var r=Gt(e);return r instanceof Comment&&r.data===""?br(r):r}if(t){if(Ae?.nodeType!==3){var n=Nt();return Ae?.before(n),ft(n),n}Oo(Ae)}return Ae}function K(e,t=1,r=!1){let n=_e?Ae: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),ft(s),s}Oo(n)}return ft(n),n}function Al(e){e.textContent=""}function Kd(){return!Ht||Rr!==null?!1:(Ee.f&ol)!==0}function Co(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 Vb(e=""){return document.createComment(e)}function Oo(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 Bb(e,t){if(t){const r=document.body;e.autofocus=!0,ir(()=>{document.activeElement===r&&e.focus()})}}function jb(e){_e&&Gt(e)!==null&&Al(e)}var Yd=!1;function Jd(){Yd||(Yd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[hs]?.()})},{capture:!0}))}function Do(e){var t=Oe,r=Ee;Lt(null),or(null);try{return e()}finally{Lt(t),or(r)}}function Io(e,t,r,n=r){e.addEventListener(t,()=>Do(r));const i=e[hs];i?e[hs]=()=>{i(),n(!0)}:e[hs]=()=>n(!0),Jd()}function Qd(e){Ee===null&&(Oe===null&&Xy(e),Qy()),en&&Jy(e)}function Zb(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=Ee;r!==null&&(r.f&8192)!==0&&(e|=sl);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};ke?.register_created_effect(n);var i=n;if((e&4)!==0)Si!==null?Si.push(n):Ei.ensure().schedule(n);else if(t!==null){try{Ci(n)}catch(o){throw vt(n),o}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|=cs))}if(i!==null&&(i.parent=r,r!==null&&Zb(i,r),Oe!==null&&(Oe.f&2)!==0&&(e&64)===0)){var s=Oe;(s.effects??=[]).push(i)}return n}function Cl(){return Oe!==null&&!_r}function Po(e){const t=sr(8,null);return ot(t,rr),t.teardown=e,t}function ge(e){Qd("$effect");var t=Ee.f;if(!Oe&&(t&32)!==0&&Ve!==null&&!Ve.i){var r=Ve;(r.e??=[]).push(e)}else return Xd(e)}function Xd(e){return sr(4|_d,e)}function Ol(e){return Qd("$effect.pre"),sr(8|_d,e)}function ks(e){Ei.ensure();const t=sr(64|bi,e);return()=>{vt(t)}}function Wb(e){Ei.ensure();const t=sr(64|bi,e);return(r={})=>new Promise(n=>{r.outro?Gn(t,()=>{vt(t),n(void 0)}):(vt(t),n(void 0))})}function $o(e){return sr(4,e)}function Hb(e){return sr(Wy|bi,e)}function Ai(e,t=0){return sr(8|t,e)}function se(e,t=[],r=[],n=[]){Ld(n,t,r,i=>{sr(8,()=>{e(...i.map(f))})})}function Ss(e,t=0){var r=sr(16|t,e);return r}function ef(e,t=0){var r=sr(jy|t,e);return r}function Rt(e){return sr(32|bi,e)}function tf(e){var t=e.teardown;if(t!==null){const r=en,n=Oe;af(!0),Lt(null);try{t.call(null)}finally{af(r),Lt(n)}}}function Dl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Do(()=>{i.abort(wo)});var n=r.next;(r.f&64)!==0?r.parent=null:vt(r,t),r=n}}function Gb(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&&(rf(e.nodes.start,e.nodes.end),r=!0),e.f|=bd,Dl(e,t&&!r),xs(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();tf(e),e.f^=bd,e.f|=Zy;var i=e.parent;i!==null&&i.first!==null&&nf(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function rf(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function nf(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=[];sf(e,n,!0);var i=()=>{r&&vt(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function sf(e,t,r){if((e.f&8192)===0){e.f^=sl;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;sf(i,t,o?r:!1)}i=s}}}function Mo(e){of(e,!0)}function of(e,t){if((e.f&8192)!==0){e.f^=sl,(e.f&1024)===0&&(ot(e,nr),Ei.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;of(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Il(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 Kb=null,Fo=!1,en=!1;function af(e){en=e}var Oe=null,_r=!1;function Lt(e){Oe=e}var Ee=null;function or(e){Ee=e}var zr=null;function lf(e){Oe!==null&&(!Ht||(Oe.f&2)!==0)&&(zr??=new Set).add(e)}var zt=null,Kt=0,ar=null;function Yb(e){ar=e}var uf=1,Kn=0,tn=Kn;function cf(e){tn=e}function df(){return++uf}function Es(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~fs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Es(s)&&qd(s),s.wv>e.wv)return!0}(t&512)!==0&&Ct===null&&ot(e,rr)}return!1}function ff(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?ff(s,t,!1):t===s&&(r?ot(s,nr):(s.f&1024)!==0&&ot(s,Zn),_l(s))}}function hf(e){var t=zt,r=Kt,n=ar,i=Oe,s=zr,o=Ve,a=_r,l=tn,c=e.f;zt=null,Kt=0,ar=null,Oe=(c&96)===0?e:null,zr=null,wi(e.ctx),_r=!1,tn=++Kn,e.ac!==null&&(Do(()=>{e.ac.abort(wo)}),e.ac=null);try{e.f|=wd;var d=e.fn,u=d();e.f|=ol;var p=e.deps,h=ke?.is_fork;if(zt!==null){var g;if(h||xs(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(Cl()&&(e.f&512)!==0)for(g=Kt;g<p.length;g++)(p[g].reactions??=[]).push(e)}else!h&&p!==null&&Kt<p.length&&(xs(e,Kt),p.length=Kt);if(gs()&&ar!==null&&!_r&&p!==null&&(e.f&6146)===0)for(g=0;g<ar.length;g++)ff(ar[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;ar!==null&&(n===null?n=ar:n.push(...ar))}return(e.f&8388608)!==0&&(e.f^=_o),u}catch(m){return Dd(m)}finally{e.f^=wd,zt=t,Kt=r,ar=n,Oe=i,zr=s,wi(o),_r=a,tn=l}}function Jb(e,t){let r=t.reactions;if(r!==null){var n=Uy.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||!vo.call(zt,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~fs),s.v!==lt&&vl(s),Nb(s),xs(s,0)}}function xs(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Jb(e,r[n])}function Ci(e){var t=e.f;if((t&16384)===0){ot(e,rr);var r=Ee,n=Fo;if(Ee=e,Fo=!0,0)var i,s;try{(t&16777232)!==0?Gb(e):Dl(e),tf(e);var o=hf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=uf,0)for(var a of e.deps);}finally{Fo=n,Ee=r}}}async function pf(){if(Ht)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),b()}function f(e){var t=(e.f&2)!==0;if(Kb?.add(e),Oe!==null&&!_r&&!(Ee!==null&&(Ee.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??=[],vo.call(Oe.deps,e)||Oe.deps.push(e);var n=e.reactions;n===null?e.reactions=[Oe]:vo.call(n,Oe)||n.push(Oe)}}if(0){if(!_r&&$b&&!$b.warned&&($b.effect.f&2097152)===0&&!$b.effect_deps.has(e))var i;if(eF&&!_r&&iF!==null&&Oe!==null&&iF.reaction===Oe&&!e.trace){if(i)var s,o}}if(en&&Hn.has(e))return Hn.get(e);if(t){var a=e;if(en){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||vf(a))&&(l=Sl(a)),Hn.set(a,l),l}var c=(a.f&512)===0&&!_r&&Oe!==null&&(Fo||(Oe.f&512)!==0),d=(a.f&ol)===0;Es(a)&&(c&&(a.f|=512),qd(a)),c&&!d&&(Ud(a),mf(a))}if(Ct?.has(e))return Ct.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function mf(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&&(Ud(t),mf(t))}function vf(e){if(e.v===lt)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Hn.has(t)||(t.f&2)!==0&&vf(t))return!0;return!1}function Re(e){var t=_r;try{return _r=!0,e()}finally{_r=t}}function Qb(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Nr in e)Pl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Nr in r&&Pl(r)}}}function Pl(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{Pl(e[n],t)}catch{}const r=bo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=md(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Ts=Symbol("events"),gf=new Set,$l=new Set;function Ml(e,t,r,n={}){function i(s){if(n.capture||Fl.call(t,s),!s.cancelBubble)return Do(()=>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=Ml(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function No(e,t,r,n,i){var s={capture:n,passive:i},o=Ml(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Po(()=>{t.removeEventListener(e,o,s)})}function ht(e,t,r){(t[Ts]??={})[e]=r}function lr(e){for(var t=0;t<e.length;t++)gf.add(e[t]);for(var r of $l)r(e)}var yf=null;function Fl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;yf=e;var o=0,a=yf===e&&e[Ts];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Ts]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){kn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Oe,u=Ee;Lt(null),or(null);try{for(var p,h=[];s!==null&&s!==t;){try{var g=s[Ts]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){p?h.push(m):p=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let m of h)queueMicrotask(()=>{throw m});throw p}}finally{e[Ts]=t,delete e.currentTarget,Lt(d),or(u)}}}var Xb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function bf(e){return Xb?.createHTML(e)??e}function e_(e){var t=Co("template");return t.innerHTML=bf(e.replaceAll("<!>","<!---->")),t.content}function wr(e,t){var r=Ee;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function j(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(_e)return wr(Ae,null),Ae;i===void 0&&(i=e_(s?e:"<!>"+e),r||(i=Gt(i)));var o=n||xl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Gt(o),l=o.lastChild;wr(a,l)}else wr(o,o);return o}}function qt(e=""){if(!_e){var t=Nt(e+"");return wr(t,t),t}var r=Ae;return r.nodeType!==3?(r.before(r=Nt()),ft(r)):Oo(r),wr(r,r),r}function Y(){if(_e)return wr(Ae,null),Ae;var e=document.createDocumentFragment(),t=document.createComment(""),r=Nt();return e.append(t,r),wr(t,r),e}function S(e,t){if(_e){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Ae),Xr();return}e!==null&&e.before(t)}function pt(){if(_e&&Ae&&Ae.nodeType===8&&Ae.textContent?.startsWith("$")){const e=Ae.textContent.substring(1);return Xr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var t_=/\r/g;function r_(e){e=e.replace(t_,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function n_(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var i_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function s_(e){return i_.includes(e)}var o_=["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"],a_={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 l_(e){return e=e.toLowerCase(),a_[e]??e}var bF=[...o_,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],u_=["touchstart","touchmove"];function c_(e){return u_.includes(e)}var d_=["$state","$state.raw","$derived","$derived.by"],_F=[...d_,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function f_(e){return e?.replace(/\//g,"/​")}var _f=!0;function ie(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[cl]??=e.nodeValue)&&(e[cl]=r,e.nodeValue=`${r}`)}function wf(e,t){return kf(e,t)}function h_(e,t){Tl(),t.intro=t.intro??!1;const r=t.target,n=_e,i=Ae;try{for(var s=Gt(r);s&&(s.nodeType!==8||s.data!=="[");)s=br(s);if(!s)throw jn;bt(!0),ft(s);const o=kf(e,{...t,anchor:s});return bt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
11
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==jn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&tb(),Tl(),Al(r),bt(!1),wf(e,t)}finally{bt(n),ft(i)}}var Ro=new Map;function kf(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){Tl();var l=void 0,c=Wb(()=>{var d=r??t.appendChild(Nt());Db(d,{pending:()=>{}},h=>{ee({});var g=Ve;if(s&&(g.c=s),i&&(n.$$events=i),_e&&wr(h,null),_f=o,l=e(h,n)||{},_f=!0,_e&&(Ee.nodes.end=Ae,Ae===null||Ae.nodeType!==8||Ae.data!=="]"))throw ms(),jn;te()},a);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=c_(m);for(const E of[t,document]){var y=Ro.get(E);y===void 0&&(y=new Map,Ro.set(E,y));var k=y.get(m);k===void 0?(E.addEventListener(m,Fl,{passive:v}),y.set(m,1)):y.set(m,k+1)}}}};return p(go(gf)),$l.add(p),()=>{for(var h of u)for(const v of[t,document]){var g=Ro.get(v),m=g.get(h);--m==0?(v.removeEventListener(h,Fl),g.delete(h),g.size===0&&Ro.delete(v)):g.set(h,m)}$l.delete(p),d!==r&&d.parentNode?.removeChild(d)}});return Nl.set(l,c),l}var Nl=new WeakMap;function p_(e,t){const r=Nl.get(e);return r?(Nl.delete(e),r(t)):Promise.resolve()}var Rl=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)Mo(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Mo(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 o=this.#r.get(s);o&&(vt(o.effect),this.#r.delete(s))}for(const[i,s]of this.#t){if(i===t||this.#n.has(i))continue;const o=()=>{if(Array.from(this.#e.values()).includes(i)){var a=document.createDocumentFragment();Il(s,a),a.append(Nt()),this.#r.set(i,{effect:s,fragment:a})}else vt(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Gn(s,o,!1)):o()}}};#a=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=ke,n=Kd();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[o,a]of this.#t)o===e?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of this.#r)o===e?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#s),r.ondiscard(this.#a)}else _e&&(this.anchor=Ae),this.#s(r)}};function we(e,t,...r){var n=new Rl(e);Ss(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},cs)}if(0)var XF;function rn(e){Ve===null&&Sd("onMount"),_i&&Ve.l!==null?m_(Ve).m.push(e):ge(()=>{const t=Re(e);if(typeof t=="function")return t})}function m_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function v_(){return Symbol(qy)}function ce(e,t,r=!1){var n;_e&&(n=Ae,Xr());var i=new Rl(e),s=r?cs:0;function o(a,l){if(_e){var c=fl(n);if(a!==parseInt(c.substring(1))){var d=vs();ft(d),i.anchor=d,bt(!1),i.ensure(a,l),bt(!0);return}}i.ensure(a,l)}Ss(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function nn(e,t){return t}function g_(e,t,r){for(var n=[],i=t.length,s,o=t.length,a=0;a<i;a++){let u=t[a];Gn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var p=e.outrogroups;Ll(e,go(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,d=c.parentNode;Al(d),d.append(c),e.items.clear()}Ll(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ll(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const o of e.pending.values())for(const a of o)n.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];n?.has(s)?(s.f|=ds,Il(s,document.createDocumentFragment())):vt(t[i],r)}}var Sf;function Le(e,t,r,n,i,s=null){var o=e,a=new Map;if((t&4)!==0){var l=e;o=_e?ft(Gt(l)):l.appendChild(Nt())}_e&&Xr();var c=null,d=kl(()=>{var y=r();return mo(y)?y:y==null?[]:go(y)}),u,p=new Map,h=!0;function g(y){(v.effect.f&16384)===0&&(v.pending.delete(y),v.fallback=c,y_(v,u,o,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Mo(c):(c.f^=ds,Cs(c,null,o)):Gn(c,()=>{c=null})))}function m(y){v.pending.delete(y)}var v={effect:Ss(()=>{u=f(d);var y=u.length;let k=!1;_e&&fl(o)==="[!"!=(y===0)&&(o=vs(),ft(o),bt(!1),k=!0);for(var E=new Set,x=ke,A=Kd(),O=0;O<y;O+=1){_e&&Ae.nodeType===8&&Ae.data==="]"&&(o=Ae,k=!0,bt(!1));var $=u[O],z=n($,O);if(0)var B;var N=h?null:a.get(z);N?(N.v&&Ti(N.v,$),N.i&&Ti(N.i,O),A&&x.unskip_effect(N.e)):(N=b_(a,h?o:Sf??=Nt(),$,z,O,i,t,r),h||(N.e.f|=ds),a.set(z,N)),E.add(z)}if(y===0&&s&&!c&&(h?c=Rt(()=>s(o)):(c=Rt(()=>s(Sf??=Nt())),c.f|=ds)),y>E.size&&Ed("","",""),_e&&y>0&&ft(vs()),!h)if(p.set(x,E),A){for(const[V,U]of a)E.has(V)||x.skip_effect(U.e);x.oncommit(g),x.ondiscard(m)}else g(x);k&&bt(!0),f(d)}),flags:t,items:a,pending:p,outrogroups:null,fallback:c};h=!1,_e&&(o=Ae)}function As(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function y_(e,t,r,n,i){var s=(n&8)!==0,o=t.length,a=e.items,l=As(e.effect.first),c,d=null,u,p=[],h=[],g,m,v,y;if(s)for(y=0;y<o;y+=1)g=t[y],m=i(g,y),v=a.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(y=0;y<o;y+=1){if(g=t[y],m=i(g,y),v=a.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&&(Mo(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=ds,v===l)Cs(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),Cs(v,k,r),d=v,p=[],h=[],l=As(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(p.length<h.length){var E=h[0],x;d=E.prev;var A=p[0],O=p[p.length-1];for(x=0;x<p.length;x+=1)Cs(p[x],E,r);for(x=0;x<h.length;x+=1)c.delete(h[x]);xn(e,A.prev,O.next),xn(e,d,A),xn(e,O,E),l=E,d=O,y-=1,p=[],h=[]}else c.delete(v),Cs(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=As(l.next);if(l===null)continue}(v.f&33554432)===0&&p.push(v),d=v,l=As(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Ll(e,go(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||c!==void 0){var $=[];if(c!==void 0)for(v of c)(v.f&8192)===0&&$.push(v);for(;l!==null;)(l.f&8192)===0&&l!==e.fallback&&$.push(l),l=As(l.next);var z=$.length;if(z>0){var B=(n&4)!==0&&o===0?r:null;if(s){for(y=0;y<z;y+=1)$[y].nodes?.a?.measure();for(y=0;y<z;y+=1)$[y].nodes?.a?.fix()}g_(e,$,B)}}s&&ir(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function b_(e,t,r,n,i,s,o,a){var l=(o&1)!==0?(o&16)===0?Vd(r,!1,!1):En(r):null,c=(o&2)!==0?En(i):null;return{v:l,i:c,e:Rt(()=>(s(t,l??r,c??i,a),()=>{e.delete(n)}))}}function Cs(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 o=br(n);if(s.before(n),n===i)return;n=o}}function xn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function wF(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 o=String(r.get(s)),a=String(i);let l=String(s);l.startsWith("[object ")&&(l=null),Ed(o,a,l)}r.set(s,i)}}function kF(e,t,r){if(!t||t===r_(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:pl?.[nl]&&(n=`in ${pl[nl]}`),cb(f_(n))}function Ef(e,t,r=!1,n=!1,i=!1,s=!1){var o=e,a="";if(r){var l=e;_e&&(o=ft(Gt(l)))}se(()=>{var c=Ee;if(a===(a=t()??"")){_e&&Xr();return}if(r&&!_e){c.nodes=null,l.innerHTML=a,a!==""&&wr(Gt(l),l.lastChild);return}if(c.nodes!==null&&(rf(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(_e){for(var d=Ae.data,u=Xr(),p=u;u!==null&&(u.nodeType!==8||u.data!=="");)p=u,u=br(u);if(u===null)throw ms(),jn;wr(Ae,p),o=ft(u);return}var h=Co(n?"svg":i?"math":"template",n?Ly:i?zy:void 0);h.innerHTML=a;var g=n||i?h:h.content;if(wr(Gt(g),g.lastChild),n||i)for(;Gt(g);)o.before(Gt(g));else o.before(g)}})}function __(e,t,r,n,i){_e&&Xr();var s=t.$$slots?.[r],o=!1;s===!0&&(s=t[r==="default"?"children":r],o=!0),s===void 0?i!==null&&i(e):s(e,o?()=>n:n)}function Pe(e,t,r){var n;_e&&(n=Ae,Xr());var i=new Rl(e);Ss(()=>{var s=t()??null;if(_e&&fl(n)==="["!=(s!==null)){var o=vs();ft(o),i.anchor=o,bt(!1),i.ensure(s,s&&(a=>r(a,s))),bt(!0);return}i.ensure(s,s&&(a=>r(a,s)))},cs)}function w_(e,t){var r=void 0,n;ef(()=>{r!==(r=t())&&(n&&(vt(n),n=null),r&&(n=Rt(()=>{$o(()=>r(e))})))})}function xf(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=xf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Lo(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=xf(e))&&(n&&(n+=" "),n+=t);return n}function ur(e){return typeof e=="object"?Lo(e):e??""}var Tf=[...`
12
+ \r\f \v\uFEFF`];function k_(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,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||Tf.includes(n[o-1]))&&(a===n.length||Tf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Af(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 zl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function S_(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,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(zl)),i&&l.push(...Object.keys(i).map(zl));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var p=e[u];if(a?p==="/"&&e[u-1]==="*"&&(a=!1):s?s===p&&(s=!1):p==="/"&&e[u+1]==="*"?a=!0:p==='"'||p==="'"?s=p:p==="("?o++:p===")"&&o--,!a&&s===!1&&o===0){if(p===":"&&d===-1)d=u;else if(p===";"||u===m-1){if(d!==-1){var h=zl(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+=Af(n)),i&&(r+=Af(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function St(e,t,r,n,i,s){var o=e[ll];if(_e||o!==r||o===void 0){var a=k_(r,n,s);(!_e||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[ll]=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 ql(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 E_(e,t,r,n){var i=e[ul];if(_e||i!==t){var s=S_(t,n);(!_e||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[ul]=t}else n&&(Array.isArray(n)?(ql(e,r?.[0],n[0]),ql(e,r?.[1],n[1],"important")):ql(e,r,n));return n}function zo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!mo(t))return db();for(var n of e.options)n.selected=t.includes(Os(n));return}for(n of e.options)if(Zd(Os(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Cf(e){var t=new MutationObserver(()=>{zo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Po(()=>{t.disconnect()})}function x_(e,t,r=t){var n=new WeakSet,i=!0;Io(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Os);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Os(l)}r(a),e.__value=a,ke!==null&&n.add(ke)}),$o(()=>{var s=t();if(e===document.activeElement){var o=Ht?ys:ke;if(n.has(o))return}if(zo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=Os(a),r(s))}e.__value=s,i=!1}),Cf(e)}function Os(e){return"__value"in e?e.__value:e.value}var Ds=Symbol("class"),Is=Symbol("style"),Of=Symbol("is custom element"),Df=Symbol("is html"),T_=ps?"link":"LINK",If=ps?"input":"INPUT",A_=ps?"option":"OPTION",C_=ps?"select":"SELECT",O_=ps?"progress":"PROGRESS";function Ps(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[hs]=r,ir(r),Jd()}}function Ul(e,t){var r=qo(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==O_)||(e.value=t??"")}function D_(e,t){var r=qo(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Pf(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function me(e,t,r,n){var i=qo(e);if(_e&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===T_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Hy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Bl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Yn(e,t,r){var n=Oe,i=Ee;let s=_e;_e&&bt(!1),Lt(null),or(null);try{t!=="style"&&(Vl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Bl(e).includes(t):r&&typeof r=="object")?e[t]=r:me(e,t,r==null?r:String(r))}finally{Lt(n),or(i),s&&bt(!0)}}function I_(e,t,r,n,i=!1,s=!1){if(_e&&i&&e.nodeName===If){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Ps(o)}var a=qo(e),l=a[Of],c=!a[Df];let d=_e&&l;d&&bt(!1);var u=t||{},p=e.nodeName===A_;for(var h in t)h in r||(r[h]=null);r.class?r.class=ur(r.class):(n||r[Ds])&&(r.class=null),r[Is]&&(r.style??=null);var g=Bl(e);if(e.nodeName===If&&"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 $=r[O];if(p&&O==="value"&&$==null){e.value=e.__value="",u[O]=$;continue}if(O==="class"){St(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Ds],r[Ds]),u[O]=$,u[Ds]=r[Ds];continue}if(O==="style"){E_(e,$,t?.[Is],r[Is]),u[O]=$,u[Is]=r[Is];continue}var v=u[O];if(!($===v&&!($===void 0&&e.hasAttribute(O)))){u[O]=$;var y=O[0]+O[1];if(y!=="$$")if(y==="on"){const z={},B="$$"+O;let N=O.slice(2);var k=s_(N);if(n_(N)&&(N=N.slice(0,-7),z.capture=!0),!k&&v){if($!=null)continue;e.removeEventListener(N,u[B],z),u[B]=null}if(k)ht(N,e,$),lr([N]);else if($!=null){let V=function(U){u[O].call(this,U)};var A=V;u[B]=Ml(N,e,V,z)}}else if(O==="style")me(e,O,$);else if(O==="autofocus")Bb(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&p)Pf(e,$);else{var E=O;c||(E=l_(E));var x=E==="defaultValue"||E==="defaultChecked";if($==null&&!l&&!x)if(a[O]=null,E==="value"||E==="checked"){let z=e;const B=t===void 0;if(E==="value"){let N=z.defaultValue;z.removeAttribute(E),z.defaultValue=N,z.value=z.__value=B?N:null}else{let N=z.defaultChecked;z.removeAttribute(E),z.defaultChecked=N,z.checked=B?N:!1}}else e.removeAttribute(O);else x||g.includes(E)&&(l||typeof $!="string")?(e[E]=$,E in a&&(a[E]=lt)):typeof $!="function"&&me(e,E,$,s)}}}return d&&bt(!0),u}function ze(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Ld(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===C_,p=!1;if(ef(()=>{var g=t(...l.map(f)),m=I_(e,c,g,s,o,a);p&&u&&"value"in g&&zo(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(()=>w_(e,()=>v))),m[y]=v}c=m}),u){var h=e;$o(()=>{zo(h,c.value,!0),Cf(h)})}p=!0})}function qo(e){return e[kd]??={[Of]:e.nodeName.includes("-"),[Df]:e.namespaceURI===Ry}}var Vl=new Map;function Bl(e){var t=e.getAttribute("is")||e.nodeName,r=Vl.get(t);if(r)return r;Vl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=md(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=bo(i)}return r}function SF(e,t,r){}function jl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function $f(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function P_(e,t){var r=$f(e.srcset),n=$f(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(jl(r[o][0],i)||jl(i,r[o][0])))}var Zl=null;function $_(){if(Zl===null){var e=Co("select");e.innerHTML=bf("<option><span>t</span></option>"),Zl=e.firstChild?.firstChild?.nodeType===1}return Zl}function M_(e,t){var r=_e;$_()||(bt(!1),e.textContent="",e.append(Vb("")));try{t()}finally{r&&(_e?P(e):(bt(!0),ft(e)))}}function Uo(e,t,r=t){var n=new WeakSet;Io(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Hl(e)?Gl(s):s,r(s),ke!==null&&n.add(ke),await pf(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var c=e.value.length;o===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(a,c))}}}),(_e&&e.defaultValue!==e.value||Re(t)==null&&e.value)&&(r(Hl(e)?Gl(e.value):e.value),ke!==null&&n.add(ke)),Ai(()=>{var i=t();if(e===document.activeElement){var s=Ht?ys:ke;if(n.has(s))return}Hl(e)&&i===Gl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Wl=new Set;function F_(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=e;let a=!1;if(t!==null)for(var l of t)o=o[l]??=[];o.push(r),Io(r,"change",()=>{var c=r.__value;s&&(c=Mf(o,c,r.checked)),i(c)},()=>i(s?[]:null)),Ai(()=>{var c=n();if(_e&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Zd(r.__value,c)}),Po(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Wl.has(o)||(Wl.add(o),ir(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Wl.delete(o)})),ir(()=>{if(a){var c;s?c=Mf(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function N_(e,t,r=t){Io(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(_e&&e.defaultChecked!==e.checked||Re(t)==null)&&r(e.checked),Ai(()=>{var n=t();e.checked=!!n})}function Mf(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 Hl(e){var t=e.type;return t==="number"||t==="range"}function Gl(e){return e===""?null:+e}function Kl(e,t){return e===t||e?.[Nr]===t}function Yl(e={},t,r,n){var i=Ve.r,s=Ee;return $o(()=>{var o,a;return Ai(()=>{o=a,a=n?.()||[],Re(()=>{Kl(r(...a),e)||(t(e,...a),o&&Kl(r(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const c=()=>{a&&Kl(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function Jl(e=!1){const t=Ve,r=t.l.u;if(!r)return;let n=()=>Qb(t.s);if(e){let i=0,s={};const o=xi(()=>{let a=!1;const l=t.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>f(o)}r.b.length&&Ol(()=>{Ff(t,n),il(r.b)}),ge(()=>{const i=Re(()=>r.m.map(By));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ge(()=>{Ff(t,n),il(r.a)})}function Ff(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}var R_={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 je(e,t,r){return new Proxy({props:e,exclude:t},R_)}var L_={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(us(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];us(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(us(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===al)return!1;for(let r of e.props)if(us(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(us(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},L_)}function _(e,t,r,n){var i=!_i||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=xi(n),f(c)):(l&&(l=!1,a=o?Re(n):n),a);let u;if(s){var p=Nr in e||al in e;u=Fr(e,t)?.set??(p&&t in e?x=>e[t]=x:void 0)}var h,g=!1;s?[h,g]=Tb(()=>e[t]):h=e[t],h===void 0&&n!==void 0&&(h=d(),u&&(i&&rb(t),u(h)));var m;if(i?m=()=>{var x=e[t];return x===void 0?d():(l=!0,x)}:m=()=>{var x=e[t];return x!==void 0&&(a=void 0),x===void 0?a:x},i&&(r&4)===0)return m;if(u){var v=e.$$legacy;return(function(x,A){return arguments.length>0?((!i||!A||v||g)&&u(A?m():x),x):m()})}var y=!1,k=((r&1)!==0?xi:kl)(()=>(y=!1,m()));s&&f(k);var E=Ee;return(function(x,A){if(arguments.length>0){const O=A?f(k):i&&s?Me(x):x;return I(k,O),y=!0,a!==void 0&&(a=O),x}return en&&y||(E.f&16384)!==0?k.v:f(k)})}function z_(e){return new q_(e)}var q_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=Vd(s,!1,!1);return t.set(i,o),o};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===al?!0:(f(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return I(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});this.#t=(e.hydrate?h_:wf)(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=()=>{p_(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()}},Nf;typeof HTMLElement=="function"&&(Nf=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 o=Co("slot");i!=="default"&&(o.name=i),S(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=U_(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]=Vo(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=z_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ks(()=>{Ai(()=>{this.$$r=!0;for(const i of yo(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Vo(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 o=this.$$c.$on(i,s);this.$$l_u.set(s,o)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Vo(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 yo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Vo(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 U_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ne(e,t,r,n,i,s){let o=class extends Nf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return yo(t).map(a=>(t[a].attribute||a).toLowerCase())}};return yo(t).forEach(a=>{kn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Vo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Fr(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{kn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var Rf={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:Z_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},V_={...Rf,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function B_(e){return e==="angular"?Rf:V_}function j_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function Z_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function W_(e){return new Promise(t=>setTimeout(t,e))}function Lf(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function H_(e){return typeof e=="boolean"}function Ql(e,t=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=e();if(a){r(a);return}if(Date.now()-i>=t){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}var Xl=Array.isArray,zf=e=>!!e&&e.constructor===Object,G_=e=>typeof e=="string"||e instanceof String,K_=e=>{try{return Number(e)===e}catch{return!1}},Y_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),qf=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function sn(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var J_=(e,t,r=!1)=>{if(!e)return[];const n=(s,o)=>t(s)-t(o),i=(s,o)=>t(o)-t(s);return e.slice().sort(r===!0?i:n)};function Q_(e,t){const r=t??(n=>n);return qf(e,(n,i)=>r(n)>r(i)?n:i)}function eu(e,t){const r=t??(n=>n);return qf(e,(n,i)=>r(n)<r(i)?n:i)}var X_=(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)},Uf=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},ew=(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]:zf(e[n])?Et(e[n],i):i}),{}),Vf=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&&Lf(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Lf(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(!(zf(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)}},tw=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}},Bf;function G(e,t,r){function n(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const c=o.prototype,d=Object.keys(c);for(let u=0;u<d.length;u++){const p=d[u];p in a||(a[p]=c[p].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Oi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Bf=globalThis).__zod_globalConfig??(Bf.__zod_globalConfig={});var Bo=globalThis.__zod_globalConfig;function Jn(e){return e&&Object.assign(Bo,e),Bo}function Zf(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 tu(e,t){return typeof t=="bigint"?t.toString():t}function ru(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function nu(e){return e==null}function iu(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rw(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 Wf=Symbol("evaluating");function Be(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Wf)return n===void 0&&(n=Wf,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 Hf(e){return JSON.stringify(e)}function nw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Gf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var iw=ru(()=>{if(Bo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function $s(e){if(jo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(jo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Kf(e){return $s(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var sw=new Set(["string","number","symbol"]);function Zo(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 ow(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var aw={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 lw(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 uw(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 cw(e,t){if(!$s(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 dw(e,t){if(!$s(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 fw(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 hw(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 o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)s[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Qn(this,"shape",s),s},checks:[]}))}function pw(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 Di(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 mw(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 Yf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Wo(e){return typeof e=="string"?e:e?.message}function Xn(e,t,r){const n=e.message?e.message:Wo(e.inst?._zod.def?.error?.(e))??Wo(t?.error?.(e))??Wo(r.customError?.(e))??Wo(r.localeError?.(e))??"Invalid input",{inst:i,continue:s,input:o,...a}=e;return a.path??(a.path=[]),a.message=n,t?.reportInput&&(a.input=o),a}function su(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ms(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Jf=(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,tu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qf=G("$ZodError",Jf),Xf=G("$ZodError",Jf,{Parent:Error});function vw(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 gw(e,t=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{const a=[...s,...o.path];if(a.length===0)r._errors.push(t(o));else{let l=r,c=0;for(;c<a.length;){const d=a[c];c!==a.length-1?l[d]=l[d]||{_errors:[]}:(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(o))),l=l[d],c++}}}};return n(e),r}var ou=e=>(t,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Oi;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Jn())));throw Gf(a,i?.callee),a}return o.value},au=e=>async(t,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Xn(l,s,Jn())));throw Gf(a,i?.callee),a}return o.value},Ho=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 Oi;return s.issues.length?{success:!1,error:new(e??Qf)(s.issues.map(o=>Xn(o,i,Jn())))}:{success:!0,data:s.value}},yw=Ho(Xf),Go=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(o=>Xn(o,i,Jn())))}:{success:!0,data:s.value}},bw=Go(Xf),_w=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,i)},ww=e=>(t,r,n)=>ou(e)(t,r,n),kw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return au(e)(t,r,i)},Sw=e=>async(t,r,n)=>au(e)(t,r,n),Ew=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ho(e)(t,r,i)},xw=e=>(t,r,n)=>Ho(e)(t,r,n),Tw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Go(e)(t,r,i)},Aw=e=>async(t,r,n)=>Go(e)(t,r,n),Cw=/^[cC][0-9a-z]{6,}$/,Ow=/^[0-9a-z]+$/,Dw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Iw=/^[0-9a-vA-V]{20}$/,Pw=/^[A-Za-z0-9]{27}$/,$w=/^[a-zA-Z0-9_-]{21}$/,Mw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fw=/^([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})$/,eh=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)$/,Nw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Rw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Lw(){return new RegExp(Rw,"u")}var zw=/^(?:(?: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])$/,qw=/^(([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}|:))$/,Uw=/^((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])$/,Vw=/^(([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])$/,Bw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,th=/^[A-Za-z0-9_-]*$/,jw=/^https?$/,Zw=/^\+[1-9]\d{6,14}$/,rh="(?:(?:\\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])))",Ww=new RegExp(`^${rh}$`);function nh(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 Hw(e){return new RegExp(`^${nh(e)}$`)}function Gw(e){const t=nh({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(`^${rh}T(?:${n})$`)}var Kw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Yw=/^-?\d+$/,Jw=/^-?\d+(?:\.\d+)?$/,Qw=/^[^A-Z]*$/,Xw=/^[^a-z]*$/,Ut=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ih={number:"number",bigint:"bigint",object:"date"},sh=G("$ZodCheckLessThan",(e,t)=>{Ut.init(e,t);const r=ih[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})}}),oh=G("$ZodCheckGreaterThan",(e,t)=>{Ut.init(e,t);const r=ih[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})}}),e0=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):rw(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})}}),t0=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]=aw[t.format];e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=Yw)}),e._zod.check=o=>{const a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,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}):o.issues.push({input:a,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}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>s&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),r0=G("$ZodCheckMaxLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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=su(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),n0=G("$ZodCheckMinLength",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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=su(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),i0=G("$ZodCheckLengthEquals",(e,t)=>{var r;Ut.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!nu(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 o=su(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ko=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=()=>{})}),s0=G("$ZodCheckRegex",(e,t)=>{Ko.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})}}),o0=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qw),Ko.init(e,t)}),a0=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xw),Ko.init(e,t)}),l0=G("$ZodCheckIncludes",(e,t)=>{Ut.init(e,t);const r=Zo(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})}}),u0=G("$ZodCheckStartsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`^${Zo(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})}}),c0=G("$ZodCheckEndsWith",(e,t)=>{Ut.init(e,t);const r=new RegExp(`.*${Zo(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})}}),d0=G("$ZodCheckOverwrite",(e,t)=>{Ut.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),f0=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
- `))}},h0={major:4,minor:4,patch:3},lt=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=h0;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=(o,a,l)=>{let c=Di(o),d;for(const u of a){if(u._zod.def.when){if(mw(o)||!u._zod.def.when(o))continue}else if(c)continue;const p=o.issues.length,h=u._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new Oi;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,o.issues.length!==p&&(c||(c=Di(o,p)))});else{if(o.issues.length===p)continue;c||(c=Di(o,p))}}return d?d.then(()=>o):o},s=(o,a,l)=>{if(Di(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new Oi;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(d=>s(d,o,a)):s(c,o,a)}const l=e._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new Oi;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Be(e,"~standard",()=>({validate:i=>{try{const s=yw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return bw(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),lu=G("$ZodString",(e,t)=>{lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Kw(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)=>{Ko.init(e,t),lu.init(e,t)}),p0=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fw),Ye.init(e,t)}),m0=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=eh(r))}else t.pattern??(t.pattern=eh());Ye.init(e,t)}),v0=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Nw),Ye.init(e,t)}),g0=G("$ZodURL",(e,t)=>{Ye.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})}}}),y0=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Lw()),Ye.init(e,t)}),b0=G("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$w),Ye.init(e,t)}),_0=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Cw),Ye.init(e,t)}),w0=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ow),Ye.init(e,t)}),k0=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dw),Ye.init(e,t)}),S0=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Iw),Ye.init(e,t)}),E0=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pw),Ye.init(e,t)}),x0=G("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Gw(t)),Ye.init(e,t)}),T0=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ww),Ye.init(e,t)}),A0=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Hw(t)),Ye.init(e,t)}),C0=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mw),Ye.init(e,t)}),O0=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zw),Ye.init(e,t),e._zod.bag.format="ipv4"}),D0=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qw),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})}}}),I0=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Uw),Ye.init(e,t)}),P0=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Vw),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 o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>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 ah(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $0=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bw),Ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ah(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function M0(e){if(!th.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return ah(t.padEnd(Math.ceil(t.length/4)*4,"="))}var F0=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=th),Ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{M0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),N0=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Zw),Ye.init(e,t)});function R0(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 L0=G("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{R0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),lh=G("$ZodNumber",(e,t)=>{lt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Jw,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}}),z0=G("$ZodNumberFormat",(e,t)=>{t0.init(e,t),lh.init(e,t)}),q0=G("$ZodUnknown",(e,t)=>{lt.init(e,t),e._zod.parse=r=>r}),U0=G("$ZodNever",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function uh(e,t,r){e.issues.length&&t.issues.push(...Yf(r,e.issues)),t.value[r]=e.value}var V0=G("$ZodArray",(e,t)=>{lt.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 o=0;o<i.length;o++){const a=i[o],l=t.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>uh(c,r,o))):uh(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function Yo(e,t,r,n,i,s){const o=r in n;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...Yf(r,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?o&&(t.value[r]=void 0):t.value[r]=e.value}function ch(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=ow(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dh(e,t,r,n,i,s){const o=[],a=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__"||a.has(p))continue;if(c==="never"){o.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Yo(g,r,p,t,d,u))):Yo(h,r,p,t,d,u)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var B0=G("$ZodObject",(e,t)=>{if(lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...o};return Object.defineProperty(t,"shape",{value:a}),a}})}const r=ru(()=>ch(t));Be(e._zod,"propValues",()=>{const o=t.shape,a={};for(const l in o){const c=o[l]._zod;if(c.values){a[l]??(a[l]=new Set);for(const d of c.values)a[l].add(d)}}return a});const n=jo,i=t.catchall;let s;e._zod.parse=(o,a)=>{s??(s=r.value);const l=o.value;if(!n(l))return o.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),o;o.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:[]},a);m instanceof Promise?c.push(m.then(v=>Yo(v,o,u,l,h,g))):Yo(m,o,u,l,h,g)}return i?dh(c,l,o,a,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),j0=G("$ZodObjectJIT",(e,t)=>{B0.init(e,t);const r=e._zod.parse,n=ru(()=>ch(t)),i=p=>{const h=new f0(["shape","payload","ctx"]),g=n.value,m=S=>{const E=Hf(S);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const S of g.keys)v[S]=`key_${y++}`;h.write("const newResult = {};");for(const S of g.keys){const E=v[S],A=Hf(S),O=p[S],$=O?._zod?.optin==="optional",z=O?._zod?.optout==="optional";h.write(`const ${E} = ${m(S)};`),$&&z?h.write(`
15
- if (${E}.issues.length) {
14
+ `))}},h0={major:4,minor:4,patch:3},ut=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=h0;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=(o,a,l)=>{let c=Di(o),d;for(const u of a){if(u._zod.def.when){if(mw(o)||!u._zod.def.when(o))continue}else if(c)continue;const p=o.issues.length,h=u._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new Oi;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,o.issues.length!==p&&(c||(c=Di(o,p)))});else{if(o.issues.length===p)continue;c||(c=Di(o,p))}}return d?d.then(()=>o):o},s=(o,a,l)=>{if(Di(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new Oi;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(d=>s(d,o,a)):s(c,o,a)}const l=e._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new Oi;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Be(e,"~standard",()=>({validate:i=>{try{const s=yw(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return bw(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),lu=G("$ZodString",(e,t)=>{ut.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Kw(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)=>{Ko.init(e,t),lu.init(e,t)}),p0=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fw),Ye.init(e,t)}),m0=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=eh(r))}else t.pattern??(t.pattern=eh());Ye.init(e,t)}),v0=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Nw),Ye.init(e,t)}),g0=G("$ZodURL",(e,t)=>{Ye.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})}}}),y0=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Lw()),Ye.init(e,t)}),b0=G("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$w),Ye.init(e,t)}),_0=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Cw),Ye.init(e,t)}),w0=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ow),Ye.init(e,t)}),k0=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dw),Ye.init(e,t)}),S0=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Iw),Ye.init(e,t)}),E0=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pw),Ye.init(e,t)}),x0=G("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Gw(t)),Ye.init(e,t)}),T0=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ww),Ye.init(e,t)}),A0=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Hw(t)),Ye.init(e,t)}),C0=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mw),Ye.init(e,t)}),O0=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zw),Ye.init(e,t),e._zod.bag.format="ipv4"}),D0=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qw),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})}}}),I0=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Uw),Ye.init(e,t)}),P0=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Vw),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 o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>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 ah(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $0=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bw),Ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ah(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function M0(e){if(!th.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return ah(t.padEnd(Math.ceil(t.length/4)*4,"="))}var F0=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=th),Ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{M0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),N0=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Zw),Ye.init(e,t)});function R0(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 L0=G("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{R0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),lh=G("$ZodNumber",(e,t)=>{ut.init(e,t),e._zod.pattern=e._zod.bag.pattern??Jw,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}}),z0=G("$ZodNumberFormat",(e,t)=>{t0.init(e,t),lh.init(e,t)}),q0=G("$ZodUnknown",(e,t)=>{ut.init(e,t),e._zod.parse=r=>r}),U0=G("$ZodNever",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function uh(e,t,r){e.issues.length&&t.issues.push(...Yf(r,e.issues)),t.value[r]=e.value}var V0=G("$ZodArray",(e,t)=>{ut.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 o=0;o<i.length;o++){const a=i[o],l=t.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>uh(c,r,o))):uh(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function Yo(e,t,r,n,i,s){const o=r in n;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...Yf(r,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?o&&(t.value[r]=void 0):t.value[r]=e.value}function ch(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=ow(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dh(e,t,r,n,i,s){const o=[],a=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__"||a.has(p))continue;if(c==="never"){o.push(p);continue}const h=l.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(g=>Yo(g,r,p,t,d,u))):Yo(h,r,p,t,d,u)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var B0=G("$ZodObject",(e,t)=>{if(ut.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...o};return Object.defineProperty(t,"shape",{value:a}),a}})}const r=ru(()=>ch(t));Be(e._zod,"propValues",()=>{const o=t.shape,a={};for(const l in o){const c=o[l]._zod;if(c.values){a[l]??(a[l]=new Set);for(const d of c.values)a[l].add(d)}}return a});const n=jo,i=t.catchall;let s;e._zod.parse=(o,a)=>{s??(s=r.value);const l=o.value;if(!n(l))return o.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),o;o.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:[]},a);m instanceof Promise?c.push(m.then(v=>Yo(v,o,u,l,h,g))):Yo(m,o,u,l,h,g)}return i?dh(c,l,o,a,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),j0=G("$ZodObjectJIT",(e,t)=>{B0.init(e,t);const r=e._zod.parse,n=ru(()=>ch(t)),i=p=>{const h=new f0(["shape","payload","ctx"]),g=n.value,m=E=>{const x=Hf(E);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};h.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const E of g.keys)v[E]=`key_${y++}`;h.write("const newResult = {};");for(const E of g.keys){const x=v[E],A=Hf(E),O=p[E],$=O?._zod?.optin==="optional",z=O?._zod?.optout==="optional";h.write(`const ${x} = ${m(E)};`),$&&z?h.write(`
15
+ if (${x}.issues.length) {
16
16
  if (${A} in input) {
17
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
17
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
18
18
  ...iss,
19
19
  path: iss.path ? [${A}, ...iss.path] : [${A}]
20
20
  })));
21
21
  }
22
22
  }
23
23
 
24
- if (${E}.value === undefined) {
24
+ if (${x}.value === undefined) {
25
25
  if (${A} in input) {
26
26
  newResult[${A}] = undefined;
27
27
  }
28
28
  } else {
29
- newResult[${A}] = ${E}.value;
29
+ newResult[${A}] = ${x}.value;
30
30
  }
31
31
 
32
32
  `):$?h.write(`
33
- if (${E}.issues.length) {
34
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
33
+ if (${x}.issues.length) {
34
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
35
35
  ...iss,
36
36
  path: iss.path ? [${A}, ...iss.path] : [${A}]
37
37
  })));
38
38
  }
39
39
 
40
- if (${E}.value === undefined) {
40
+ if (${x}.value === undefined) {
41
41
  if (${A} in input) {
42
42
  newResult[${A}] = undefined;
43
43
  }
44
44
  } else {
45
- newResult[${A}] = ${E}.value;
45
+ newResult[${A}] = ${x}.value;
46
46
  }
47
47
 
48
48
  `):h.write(`
49
- const ${E}_present = ${A} in input;
50
- if (${E}.issues.length) {
51
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
49
+ const ${x}_present = ${A} in input;
50
+ if (${x}.issues.length) {
51
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
52
52
  ...iss,
53
53
  path: iss.path ? [${A}, ...iss.path] : [${A}]
54
54
  })));
55
55
  }
56
- if (!${E}_present && !${E}.issues.length) {
56
+ if (!${x}_present && !${x}.issues.length) {
57
57
  payload.issues.push({
58
58
  code: "invalid_type",
59
59
  expected: "nonoptional",
@@ -62,24 +62,24 @@ ${i}
62
62
  });
63
63
  }
64
64
 
65
- if (${E}_present) {
66
- if (${E}.value === undefined) {
65
+ if (${x}_present) {
66
+ if (${x}.value === undefined) {
67
67
  newResult[${A}] = undefined;
68
68
  } else {
69
- newResult[${A}] = ${E}.value;
69
+ newResult[${A}] = ${x}.value;
70
70
  }
71
71
  }
72
72
 
73
- `)}h.write("payload.value = newResult;"),h.write("return payload;");const k=h.compile();return(S,E)=>k(p,S,E)};let s;const o=jo,a=!Bo.jitless,c=a&&iw.value,d=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return o(g)?a&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),d?dh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function fh(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=>!Di(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(o=>Xn(o,n,Jn())))}),t)}var Z0=G("$ZodUnion",(e,t)=>{lt.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=>iu(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 o=[];for(const a of t.options){const l=a._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>fh(a,n,e,i)):fh(o,n,e,i)}}),W0=G("$ZodIntersection",(e,t)=>{lt.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([a,l])=>hh(r,a,l)):hh(r,s,o)}});function uu(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($s(e)&&$s(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 o=uu(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.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],o=uu(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hh(e,t,r){const n=new Map;let i;for(const a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),Di(e))return e;const o=uu(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var H0=G("$ZodEnum",(e,t)=>{lt.init(e,t);const r=Zf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>sw.has(typeof i)).map(i=>typeof i=="string"?Zo(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),G0=G("$ZodTransform",(e,t)=>{lt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(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 Oi;return r.value=i,r.fallback=!0,r}});function ph(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var mh=G("$ZodOptional",(e,t)=>{lt.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(`^(${iu(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(o=>ph(o,i)):ph(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),K0=G("$ZodExactOptional",(e,t)=>{mh.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)}),Y0=G("$ZodNullable",(e,t)=>{lt.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(`^(${iu(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)}),J0=G("$ZodDefault",(e,t)=>{lt.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=>vh(s,t)):vh(i,t)}});function vh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Q0=G("$ZodPrefault",(e,t)=>{lt.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))}),X0=G("$ZodNonOptional",(e,t)=>{lt.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=>gh(s,e)):gh(i,e)}});function gh(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 ek=G("$ZodCatch",(e,t)=>{lt.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(o=>Xn(o,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)}}),tk=G("$ZodPipe",(e,t)=>{lt.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(o=>Jo(o,t.in,n)):Jo(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Jo(s,t.out,n)):Jo(i,t.out,n)}});function Jo(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 rk=G("$ZodReadonly",(e,t)=>{lt.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(yh):yh(i)}});function yh(e){return e.value=Object.freeze(e.value),e}var nk=G("$ZodCustom",(e,t)=>{Ut.init(e,t),lt.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=>bh(s,r,n,e));bh(i,r,n,e)}});function bh(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(Ms(i))}}var _h,ik=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 sk(){return new ik}(_h=globalThis).__zod_globalRegistry??(_h.__zod_globalRegistry=sk());var Fs=globalThis.__zod_globalRegistry;function ok(e,t){return new e({type:"string",...be(t)})}function ak(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function wh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function lk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function uk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function dk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function fk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function hk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function pk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function mk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function vk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function gk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function yk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function bk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function wk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function kk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function Sk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function Ek(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function xk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function Tk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function Ak(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function Ck(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function Ok(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function Dk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Ik(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function Pk(e,t){return new e({type:"number",checks:[],...be(t)})}function $k(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function Mk(e){return new e({type:"unknown"})}function Fk(e,t){return new e({type:"never",...be(t)})}function kh(e,t){return new sh({check:"less_than",...be(t),value:e,inclusive:!1})}function cu(e,t){return new sh({check:"less_than",...be(t),value:e,inclusive:!0})}function Sh(e,t){return new oh({check:"greater_than",...be(t),value:e,inclusive:!1})}function du(e,t){return new oh({check:"greater_than",...be(t),value:e,inclusive:!0})}function Eh(e,t){return new e0({check:"multiple_of",...be(t),value:e})}function xh(e,t){return new r0({check:"max_length",...be(t),maximum:e})}function Qo(e,t){return new n0({check:"min_length",...be(t),minimum:e})}function Th(e,t){return new i0({check:"length_equals",...be(t),length:e})}function Nk(e,t){return new s0({check:"string_format",format:"regex",...be(t),pattern:e})}function Rk(e){return new o0({check:"string_format",format:"lowercase",...be(e)})}function Lk(e){return new a0({check:"string_format",format:"uppercase",...be(e)})}function zk(e,t){return new l0({check:"string_format",format:"includes",...be(t),includes:e})}function qk(e,t){return new u0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function Uk(e,t){return new c0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Ii(e){return new d0({check:"overwrite",tx:e})}function Vk(e){return Ii(t=>t.normalize(e))}function Bk(){return Ii(e=>e.trim())}function jk(){return Ii(e=>e.toLowerCase())}function Zk(){return Ii(e=>e.toUpperCase())}function Wk(){return Ii(e=>nw(e))}function Hk(e,t,r){return new e({type:"array",element:t,...be(r)})}function Gk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function Kk(e,t){const r=Yk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ms(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(Ms(s))}},e(n.value,n)),t);return r}function Yk(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function Ah(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??Fs,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 bt(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 o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,c);else{const u=o.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&&(o.ref||(o.ref=d),bt(d,t,c),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&&Ot(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ch(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 o of e.seen.entries()){const a=e.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(o[0])?.id,u=e.external.uri??(h=>h);if(d)return{ref:u(d)};const p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${u("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const l=`#/${a}/`,c=o[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const d=a.schema;for(const u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(const o of e.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
73
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");const k=h.compile();return(E,x)=>k(p,E,x)};let s;const o=jo,a=!Bo.jitless,c=a&&iw.value,d=t.catchall;let u;e._zod.parse=(p,h)=>{u??(u=n.value);const g=p.value;return o(g)?a&&c&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),p=s(p,h),d?dh([],g,p,h,u,e):p):r(p,h):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});function fh(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=>!Di(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(o=>Xn(o,n,Jn())))}),t)}var Z0=G("$ZodUnion",(e,t)=>{ut.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=>iu(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 o=[];for(const a of t.options){const l=a._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>fh(a,n,e,i)):fh(o,n,e,i)}}),W0=G("$ZodIntersection",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{const i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([a,l])=>hh(r,a,l)):hh(r,s,o)}});function uu(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($s(e)&&$s(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 o=uu(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.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],o=uu(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hh(e,t,r){const n=new Map;let i;for(const a of t.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),Di(e))return e;const o=uu(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var H0=G("$ZodEnum",(e,t)=>{ut.init(e,t);const r=Zf(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>sw.has(typeof i)).map(i=>typeof i=="string"?Zo(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),G0=G("$ZodTransform",(e,t)=>{ut.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(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 Oi;return r.value=i,r.fallback=!0,r}});function ph(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var mh=G("$ZodOptional",(e,t)=>{ut.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(`^(${iu(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(o=>ph(o,i)):ph(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),K0=G("$ZodExactOptional",(e,t)=>{mh.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)}),Y0=G("$ZodNullable",(e,t)=>{ut.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(`^(${iu(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)}),J0=G("$ZodDefault",(e,t)=>{ut.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=>vh(s,t)):vh(i,t)}});function vh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Q0=G("$ZodPrefault",(e,t)=>{ut.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))}),X0=G("$ZodNonOptional",(e,t)=>{ut.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=>gh(s,e)):gh(i,e)}});function gh(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 ek=G("$ZodCatch",(e,t)=>{ut.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(o=>Xn(o,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)}}),tk=G("$ZodPipe",(e,t)=>{ut.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(o=>Jo(o,t.in,n)):Jo(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Jo(s,t.out,n)):Jo(i,t.out,n)}});function Jo(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 rk=G("$ZodReadonly",(e,t)=>{ut.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(yh):yh(i)}});function yh(e){return e.value=Object.freeze(e.value),e}var nk=G("$ZodCustom",(e,t)=>{Ut.init(e,t),ut.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=>bh(s,r,n,e));bh(i,r,n,e)}});function bh(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(Ms(i))}}var _h,ik=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 sk(){return new ik}(_h=globalThis).__zod_globalRegistry??(_h.__zod_globalRegistry=sk());var Fs=globalThis.__zod_globalRegistry;function ok(e,t){return new e({type:"string",...be(t)})}function ak(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function wh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function lk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function uk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function dk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function fk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function hk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function pk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function mk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function vk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function gk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function yk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function bk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function _k(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function wk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function kk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function Sk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function Ek(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function xk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function Tk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function Ak(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function Ck(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function Ok(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function Dk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function Ik(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function Pk(e,t){return new e({type:"number",checks:[],...be(t)})}function $k(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function Mk(e){return new e({type:"unknown"})}function Fk(e,t){return new e({type:"never",...be(t)})}function kh(e,t){return new sh({check:"less_than",...be(t),value:e,inclusive:!1})}function cu(e,t){return new sh({check:"less_than",...be(t),value:e,inclusive:!0})}function Sh(e,t){return new oh({check:"greater_than",...be(t),value:e,inclusive:!1})}function du(e,t){return new oh({check:"greater_than",...be(t),value:e,inclusive:!0})}function Eh(e,t){return new e0({check:"multiple_of",...be(t),value:e})}function xh(e,t){return new r0({check:"max_length",...be(t),maximum:e})}function Qo(e,t){return new n0({check:"min_length",...be(t),minimum:e})}function Th(e,t){return new i0({check:"length_equals",...be(t),length:e})}function Nk(e,t){return new s0({check:"string_format",format:"regex",...be(t),pattern:e})}function Rk(e){return new o0({check:"string_format",format:"lowercase",...be(e)})}function Lk(e){return new a0({check:"string_format",format:"uppercase",...be(e)})}function zk(e,t){return new l0({check:"string_format",format:"includes",...be(t),includes:e})}function qk(e,t){return new u0({check:"string_format",format:"starts_with",...be(t),prefix:e})}function Uk(e,t){return new c0({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Ii(e){return new d0({check:"overwrite",tx:e})}function Vk(e){return Ii(t=>t.normalize(e))}function Bk(){return Ii(e=>e.trim())}function jk(){return Ii(e=>e.toLowerCase())}function Zk(){return Ii(e=>e.toUpperCase())}function Wk(){return Ii(e=>nw(e))}function Hk(e,t,r){return new e({type:"array",element:t,...be(r)})}function Gk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...be(r)})}function Kk(e,t){const r=Yk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ms(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(Ms(s))}},e(n.value,n)),t);return r}function Yk(e,t){const r=new Ut({check:"custom",...be(t)});return r._zod.check=e,r}function Ah(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??Fs,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 o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,c);else{const u=o.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&&(o.ref||(o.ref=d),_t(d,t,c),t.seen.get(d).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),t.io==="input"&&Ot(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ch(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 o of e.seen.entries()){const a=e.metadataRegistry.get(o[0])?.id;if(a){const l=n.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}const i=o=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(o[0])?.id,u=e.external.uri??(h=>h);if(d)return{ref:u(d)};const p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${u("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const l=`#/${a}/`,c=o[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:l+c}},s=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const d=a.schema;for(const u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(const o of e.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
74
74
 
75
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const a=o[1];if(t===o[0]){s(o);continue}if(e.external){const l=e.external.registry.get(o[0])?.id;if(t!==o[0]&&l){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Oh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);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),a._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=a._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:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[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 a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(a)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const o=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xo(t,"input",e.processors),output:Xo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}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 Jk=(e,t={})=>r=>{const n=Ah({...r,processors:t});return bt(e,n),Ch(n,e),Oh(n,e)},Xo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=Ah({...i??{},target:s,io:t,processors:r});return bt(e,o),Ch(o,e),Oh(o,e)},Qk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xk=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Qk[a]??a,i.format===""&&delete i.format,a==="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}))])}},eS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(o??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 o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},tS=(e,t,r,n)=>{r.not={}},rS=(e,t,r,n)=>{},nS=(e,t,r,n)=>{const i=e._zod.def,s=Zf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},iS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},sS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=bt(s.element,t,{...n,path:[...n.path,"items"]})},aS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=bt(o[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].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=bt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},lS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>bt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},uS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=bt(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]]},cS=(e,t,r,n)=>{const i=e._zod.def,s=bt(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},dS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},fS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},hS=(e,t,r,n)=>{const i=e._zod.def;bt(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)))},pS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},mS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?s?i.out:i.in:i.out;bt(o,t,n);const a=t.seen.get(e);a.ref=o},vS=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},Dh=(e,t,r,n)=>{const i=e._zod.def;bt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},gS=G("ZodISODateTime",(e,t)=>{x0.init(e,t),Qe.init(e,t)});function yS(e){return Ck(gS,e)}var bS=G("ZodISODate",(e,t)=>{T0.init(e,t),Qe.init(e,t)});function _S(e){return Ok(bS,e)}var wS=G("ZodISOTime",(e,t)=>{A0.init(e,t),Qe.init(e,t)});function kS(e){return Dk(wS,e)}var SS=G("ZodISODuration",(e,t)=>{C0.init(e,t),Qe.init(e,t)});function ES(e){return Ik(SS,e)}var xS=(e,t)=>{Qf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>gw(e,r)},flatten:{value:r=>vw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},ur=G("ZodError",xS,{Parent:Error}),TS=ou(ur),AS=au(ur),CS=Ho(ur),OS=Go(ur),DS=_w(ur),IS=ww(ur),PS=kw(ur),$S=Sw(ur),MS=Ew(ur),FS=xw(ur),NS=Tw(ur),RS=Aw(ur),Ih=new WeakMap;function Ns(e,t,r){const n=Object.getPrototypeOf(e);let i=Ih.get(n);if(i||(i=new Set,Ih.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const o=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const a=o.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var ut=G("ZodType",(e,t)=>(lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xo(e,"input"),output:Xo(e,"output")}}),e.toJSONSchema=Jk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>TS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>CS(e,r,n),e.parseAsync=async(r,n)=>AS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>OS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>DS(e,r,n),e.decode=(r,n)=>IS(e,r,n),e.encodeAsync=async(r,n)=>PS(e,r,n),e.decodeAsync=async(r,n)=>$S(e,r,n),e.safeEncode=(r,n)=>MS(e,r,n),e.safeDecode=(r,n)=>FS(e,r,n),e.safeEncodeAsync=async(r,n)=>NS(e,r,n),e.safeDecodeAsync=async(r,n)=>RS(e,r,n),Ns(e,"ZodType",{check(...r){const n=this.def;return this.clone(Tn(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 An(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(C1(r,n))},superRefine(r,n){return this.check(O1(r,n))},overwrite(r){return this.check(Ii(r))},optional(){return zh(this)},exactOptional(){return v1(this)},nullable(){return qh(this)},nullish(){return zh(qh(this))},nonoptional(r){return k1(this,r)},array(){return Rh(this)},or(r){return u1([this,r])},and(r){return d1(this,r)},transform(r){return Vh(this,p1(r))},default(r){return b1(this,r)},prefault(r){return w1(this,r)},catch(r){return E1(this,r)},pipe(r){return Vh(this,r)},readonly(){return A1(this)},describe(r){const n=this.clone();return Fs.add(n,{description:r}),n},meta(...r){if(r.length===0)return Fs.get(this);const n=this.clone();return Fs.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 Fs.get(e)?.description},configurable:!0}),e)),Ph=G("_ZodString",(e,t)=>{lu.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Xk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ns(e,"_ZodString",{regex(...n){return this.check(Nk(...n))},includes(...n){return this.check(zk(...n))},startsWith(...n){return this.check(qk(...n))},endsWith(...n){return this.check(Uk(...n))},min(...n){return this.check(Qo(...n))},max(...n){return this.check(xh(...n))},length(...n){return this.check(Th(...n))},nonempty(...n){return this.check(Qo(1,...n))},lowercase(n){return this.check(Rk(n))},uppercase(n){return this.check(Lk(n))},trim(){return this.check(Bk())},normalize(...n){return this.check(Vk(...n))},toLowerCase(){return this.check(jk())},toUpperCase(){return this.check(Zk())},slugify(){return this.check(Wk())}})}),LS=G("ZodString",(e,t)=>{lu.init(e,t),Ph.init(e,t),e.email=r=>e.check(ak(zS,r)),e.url=r=>e.check(fk(qS,r)),e.jwt=r=>e.check(Ak(t1,r)),e.emoji=r=>e.check(hk(US,r)),e.guid=r=>e.check(wh($h,r)),e.uuid=r=>e.check(lk(ea,r)),e.uuidv4=r=>e.check(uk(ea,r)),e.uuidv6=r=>e.check(ck(ea,r)),e.uuidv7=r=>e.check(dk(ea,r)),e.nanoid=r=>e.check(pk(VS,r)),e.guid=r=>e.check(wh($h,r)),e.cuid=r=>e.check(mk(BS,r)),e.cuid2=r=>e.check(vk(jS,r)),e.ulid=r=>e.check(gk(ZS,r)),e.base64=r=>e.check(Ek(QS,r)),e.base64url=r=>e.check(xk(XS,r)),e.xid=r=>e.check(yk(WS,r)),e.ksuid=r=>e.check(bk(HS,r)),e.ipv4=r=>e.check(_k(GS,r)),e.ipv6=r=>e.check(wk(KS,r)),e.cidrv4=r=>e.check(kk(YS,r)),e.cidrv6=r=>e.check(Sk(JS,r)),e.e164=r=>e.check(Tk(e1,r)),e.datetime=r=>e.check(yS(r)),e.date=r=>e.check(_S(r)),e.time=r=>e.check(kS(r)),e.duration=r=>e.check(ES(r))});function cr(e){return ok(LS,e)}var Qe=G("ZodStringFormat",(e,t)=>{Ye.init(e,t),Ph.init(e,t)}),zS=G("ZodEmail",(e,t)=>{v0.init(e,t),Qe.init(e,t)}),$h=G("ZodGUID",(e,t)=>{p0.init(e,t),Qe.init(e,t)}),ea=G("ZodUUID",(e,t)=>{m0.init(e,t),Qe.init(e,t)}),qS=G("ZodURL",(e,t)=>{g0.init(e,t),Qe.init(e,t)}),US=G("ZodEmoji",(e,t)=>{y0.init(e,t),Qe.init(e,t)}),VS=G("ZodNanoID",(e,t)=>{b0.init(e,t),Qe.init(e,t)}),BS=G("ZodCUID",(e,t)=>{_0.init(e,t),Qe.init(e,t)}),jS=G("ZodCUID2",(e,t)=>{w0.init(e,t),Qe.init(e,t)}),ZS=G("ZodULID",(e,t)=>{k0.init(e,t),Qe.init(e,t)}),WS=G("ZodXID",(e,t)=>{S0.init(e,t),Qe.init(e,t)}),HS=G("ZodKSUID",(e,t)=>{E0.init(e,t),Qe.init(e,t)}),GS=G("ZodIPv4",(e,t)=>{O0.init(e,t),Qe.init(e,t)}),KS=G("ZodIPv6",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),YS=G("ZodCIDRv4",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),JS=G("ZodCIDRv6",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),QS=G("ZodBase64",(e,t)=>{$0.init(e,t),Qe.init(e,t)}),XS=G("ZodBase64URL",(e,t)=>{F0.init(e,t),Qe.init(e,t)}),e1=G("ZodE164",(e,t)=>{N0.init(e,t),Qe.init(e,t)}),t1=G("ZodJWT",(e,t)=>{L0.init(e,t),Qe.init(e,t)}),Mh=G("ZodNumber",(e,t)=>{lh.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>eS(e,n,i,s),Ns(e,"ZodNumber",{gt(n,i){return this.check(Sh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(kh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Fh(n))},safe(n){return this.check(Fh(n))},positive(n){return this.check(Sh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(kh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Eh(n,i))},step(n,i){return this.check(Eh(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 Rs(e){return Pk(Mh,e)}var r1=G("ZodNumberFormat",(e,t)=>{z0.init(e,t),Mh.init(e,t)});function Fh(e){return $k(r1,e)}var n1=G("ZodUnknown",(e,t)=>{q0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i)});function Nh(){return Mk(n1)}var i1=G("ZodNever",(e,t)=>{U0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i)});function s1(e){return Fk(i1,e)}var o1=G("ZodArray",(e,t)=>{V0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oS(e,r,n,i),e.element=t.element,Ns(e,"ZodArray",{min(r,n){return this.check(Qo(r,n))},nonempty(r){return this.check(Qo(1,r))},max(r,n){return this.check(xh(r,n))},length(r,n){return this.check(Th(r,n))},unwrap(){return this.element}})});function Rh(e,t){return Hk(o1,e,t)}var a1=G("ZodObject",(e,t)=>{j0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aS(e,r,n,i),Be(e,"shape",()=>t.shape),Ns(e,"ZodObject",{keyof(){return f1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Nh()})},loose(){return this.clone({...this._zod.def,catchall:Nh()})},strict(){return this.clone({...this._zod.def,catchall:s1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return cw(this,r)},safeExtend(r){return dw(this,r)},merge(r){return fw(this,r)},pick(r){return lw(this,r)},omit(r){return uw(this,r)},partial(...r){return hw(Lh,this,r[0])},required(...r){return pw(Uh,this,r[0])}})});function fu(e,t){return new a1({type:"object",shape:e??{},...be(t)})}var l1=G("ZodUnion",(e,t)=>{Z0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lS(e,r,n,i),e.options=t.options});function u1(e,t){return new l1({type:"union",options:e,...be(t)})}var c1=G("ZodIntersection",(e,t)=>{W0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uS(e,r,n,i)});function d1(e,t){return new c1({type:"intersection",left:e,right:t})}var hu=G("ZodEnum",(e,t)=>{H0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(n,i,s)=>nS(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 o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new hu({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new hu({...t,checks:[],...be(i),entries:s})}});function f1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var h1=G("ZodTransform",(e,t)=>{G0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>sS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ms(s,r.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(Ms(o))}};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 p1(e){return new h1({type:"transform",transform:e})}var Lh=G("ZodOptional",(e,t)=>{mh.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function zh(e){return new Lh({type:"optional",innerType:e})}var m1=G("ZodExactOptional",(e,t)=>{K0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function v1(e){return new m1({type:"optional",innerType:e})}var g1=G("ZodNullable",(e,t)=>{Y0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new g1({type:"nullable",innerType:e})}var y1=G("ZodDefault",(e,t)=>{J0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function b1(e,t){return new y1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var _1=G("ZodPrefault",(e,t)=>{Q0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function w1(e,t){return new _1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var Uh=G("ZodNonOptional",(e,t)=>{X0.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function k1(e,t){return new Uh({type:"nonoptional",innerType:e,...be(t)})}var S1=G("ZodCatch",(e,t)=>{ek.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function E1(e,t){return new S1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var x1=G("ZodPipe",(e,t)=>{tk.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i),e.in=t.in,e.out=t.out});function Vh(e,t){return new x1({type:"pipe",in:e,out:t})}var T1=G("ZodReadonly",(e,t)=>{rk.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function A1(e){return new T1({type:"readonly",innerType:e})}var Bh=G("ZodCustom",(e,t)=>{nk.init(e,t),ut.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iS(e,r,n,i)});function C1(e,t={}){return Gk(Bh,e,t)}function O1(e,t){return Kk(e,t)}function D1(e,t={}){const r=new Bh({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 I1=fu({id:Rs(),customer:fu({customer_salutation_id:Rs().positive({message:"user.fieldErrors.titleRequire"}),name:cr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:cr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:cr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:cr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:cr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:cr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:cr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Rs().positive().default(60),language_id:Rs().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),wF=fu({ticket_sale_id:Rs(),start_at:cr().date(),personalizations:Rh(I1)});function pu(e,t){return e-t*Math.floor(e/t)}var jh=1721426;function ta(e,t,r,n){t=mu(e,t);let i=t-1,s=-2;return r<=2?s=0:ra(t)&&(s=-1),jh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function ra(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function P1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var $1={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]},Pi=class{fromJulianDay(e){let t=e,r=t-jh,n=Math.floor(r/146097),i=pu(r,146097),s=Math.floor(i/36524),o=pu(i,36524),a=Math.floor(o/1461),l=pu(o,1461),c=Math.floor(l/365),[d,u]=P1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),p=t-ta(d,u,1,1),h=2;t<ta(d,u,3,1)?h=0:ra(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new Us(d,u,g,t-ta(d,u,g,1)+1)}toJulianDay(e){return ta(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return $1[ra(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ra(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"}},M1={"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 Cn(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 vu(e,t){return t=Yt(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function F1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function N1(e,t){return Cn(e,ei(t))}var R1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Zh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?R1[r]:V1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function L1(e){return Vr(Date.now(),e)}function ei(e){return Z1(L1(e))}function Wh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Hh(e,t){return Gh(e)-Gh(t)}function Gh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,z1=!1;function Vt(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Kh(){return z1}function yu(e){return e.subtract({days:e.day-1})}function q1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Yh=new Map,bu=new Map;function U1(e){if(Intl.Locale){let r=Yh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Yh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function V1(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=U1(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&&M1[r]||0};bu.set(e,t)}return t.firstDay}function On(e){return e=Yt(e,new Pi),Jh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Jh(e,t,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(e,t-1,r),a.getTime()}function Ls(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Kh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=Xh(e,t);return Jh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var Qh=new Map;function Xh(e,t){let r=Qh.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"}),Qh.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 na=864e5;function B1(e,t){let r=On(e);return ep(e,t,r-Ls(r-na,t),r-Ls(r+na,t))}function ep(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>j1(e,t,i))}function j1(e,t,r){let n=Xh(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=Dn(e);if(t==="UTC")return On(n);if(t===Vt()&&r==="compatible"&&!Kh()){n=Yt(n,new Pi);let l=new Date,c=mu(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=On(n),s=Ls(i-na,t),o=Ls(i+na,t),a=ep(n,t,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function tp(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Vr(e,t){let r=Ls(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new In(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function Z1(e){return new Us(e.calendar,e.era,e.year,e.month,e.day)}function Dn(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 $i(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function W1(e){return new oE(e.hour,e.minute,e.second,e.millisecond)}function Yt(e,t){if(F1(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 H1(e,t,r){return e instanceof In?e.timeZone===t?e:rp(e,t):Vr(Ur(e,t,r),t)}function G1(e){let t=On(e)-e.offset;return new Date(t)}function rp(e,t){return Yt(Vr(On(e)-e.offset,t),e.calendar)}var zs=36e5;function ia(e,t){let r=e.copy(),n="hour"in r?op(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),np(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,K1(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 o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?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 _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function K1(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function np(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)),np(e)}function ku(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function ip(e,t){return ia(e,ku(t))}function Su(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 qs(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),sp(r),r}function Y1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=sa(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=sa(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=sa(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=sa(e.hour,24),t}function sp(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 sa(e,t){let r=e%t;return r<0&&(r+=t),r}function op(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Y1(e)}function ap(e,t){let r=e.copy();return op(r,t),r}function J1(e,t){return ap(e,ku(t))}function Eu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),o=s.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=on(o,r,0,s.length-1,n?.round),i.era=s[o],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 xu(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=on(s,r,o,a,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 lp(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(ia(Dn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=On(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 Q1(e,t){return lp(e,ku(t))}function X1(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 o=Dn(e),a=Yt(qs(o,{hour:i}),new Pi),l=[Ur(a,e.timeZone,"earlier"),Ur(a,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===a.day)[0],c=Yt(qs(o,{hour:s}),new Pi),d=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=On(e)-e.offset,p=Math.floor(u/zs),h=u%zs;return u=on(p,r,Math.floor(l/zs),Math.floor(d/zs),n?.round)*zs+h,Yt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return xu(e,t,r,n);case"era":case"year":case"month":case"day":return Yt(Vr(Ur(Eu(Dn(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function eE(e,t,r){let n=Dn(e),i=qs(Su(n,t),t);return i.compare(n)===0?e:Yt(Vr(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var tE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,rE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,nE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Tu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,iE=["hours","minutes","seconds"],kF=["years","months","weeks","days",...iE];function oa(e){let t=e.match(tE);if(!t)throw Tu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Us(qe(t[1],0,9999),qe(t[2],1,12),1);return r.day=qe(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(rE);if(!t)throw Tu.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 $i(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 cp(e,t){let r=e.match(nE);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new In(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=Dn(i),o;if(r[8]){let a=qe(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),o=On(i)-i.offset,!B1(s,i.timeZone).includes(o))throw new Error(`Offset ${pp(i.offset)} is invalid for ${Au(i)} in ${i.timeZone}`)}else o=Ur(Dn(s),i.timeZone,t);return Vr(o,i.timeZone)}function dp(e,t){let r=e.match(Tu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=qe(r[1],-9999,9999),i=new In(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),rp(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 fp(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 hp(e){let t=Yt(e,new Pi),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 Au(e){return`${hp(e)}T${fp(e)}`}function pp(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 sE(e){return`${Au(e)}${pp(e.offset)}[${e.timeZone}]`}function Cu(e){let t=typeof e[0]=="object"?e.shift():new Pi,r;if(typeof e[0]=="string")r=e.shift();else{let o=t.getEras();r=o[o.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Us=class ud{#e;constructor(...t){let[r,n,i,s,o]=Cu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ti(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return ia(this,t)}subtract(t){return ip(this,t)}set(t){return Su(this,t)}cycle(t,r,n){return Eu(this,t,r,n)}toDate(t){return tp(this,t)}toString(){return hp(this)}compare(t){return Wh(this,t)}},oE=class oy{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,sp(this)}copy(){return new oy(this.hour,this.minute,this.second,this.millisecond)}add(t){return ap(this,t)}subtract(t){return J1(this,t)}set(t){return qs(this,t)}cycle(t,r,n){return xu(this,t,r,n)}toString(){return fp(this)}compare(t){return Hh(this,t)}},$i=class cd{#e;constructor(...t){let[r,n,i,s,o]=Cu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,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 cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ia(this,t)}subtract(t){return ip(this,t)}set(t){return Su(qs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Eu(this,t,r,n);default:return xu(this,t,r,n)}}toDate(t,r){return tp(this,t,r)}toString(){return Au(this)}compare(t){let r=Wh(this,t);return r===0?Hh(this,Dn(t)):r}},In=class dd{#e;constructor(...t){let[r,n,i,s,o]=Cu(t),a=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,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 dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return Q1(this,t)}set(t,r){return eE(this,t,r)}cycle(t,r,n){return X1(this,t,r,n)}toDate(){return G1(this)}toString(){return sE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-H1(t,this.timeZone).toDate().getTime()}},Ou=new Map,kr=class{constructor(e,t={}){this.formatter=mp(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 uE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=cE(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}},aE={true:{ja:"h11"},false:{}};function mp(e,t={}){if(typeof t.hour12=="boolean"&&lE()){t={...t};let i=aE[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(Ou.has(r))return Ou.get(r);let n=new Intl.DateTimeFormat(e,t);return Ou.set(r,n),n}var Du=null;function lE(){return Du==null&&(Du=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Du}var Iu=null;function uE(){return Iu==null&&(Iu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Iu}function cE(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=mp(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 Vs(e){return W1(dp(e,"Europe/Berlin")).toString().slice(0,-3)}function Bs(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function aa(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function Pu(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 js(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 la(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 Pn(e,t=""){return J_(Object.values(e).map(r=>la(r,{selectedTime:t})),r=>r.shop_order)}function $n(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 vp=e=>sn(Object.values(e.mantle?.composition??{}));function dE(e){const t=e.quantity??0;return Br(e.product)?t*vp(e):t}function $u(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!Pu(s.product))continue;const o=dE(s);s===n&&(i=o),e.addPrecartItemQuantity(s.product.id,o)}return i}var fE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Pu(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,o=$u(s,t,n,r),a=s.ticketCapacity(i.id,i.selectedTime,o),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,a),min:i.min_persons||0,bookedOut:a===0,unavailable:l===0}},hE=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,o=$u(s,t,n,r),a=s.ticketCapacity(i.id,i.selectedTime,o),l=s.totalCapacity(i.id,i.selectedTime),c=vp(r),d=c>1?Math.floor(a/c):a;return{max:Math.min(i.max_persons||100,d),min:i.min_persons||0,bookedOut:d===0,unavailable:l===0}},pE=e=>Object.fromEntries(js(e).map(t=>[t.id,t.max_persons]));function mE(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 o=1/0;return s>0&&($u(e.quotaManager,t,n,r),o=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(js(i).map(a=>[a.id,Math.min(a.max_persons,(r.mantle?.composition?.[a.id]??0)+o)]))}function ua(e){return e?.type==="Event"}function vE(e){return ua(e)&&e.subtype==="scale"}function gE(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 Mu(e,t,r){return gE(e,t,r)}var yE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ua(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 o=Math.min(s.max||100,s.max_per_registration||100,s.available??100),a={max_per_registration:o,available:100,overbook:!1,...s};let l=o;a.overbook&&(l=Math.min(a.max||100,a.max_per_registration||100));const c=n.totalQuantity,d=sn(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:a.min??0,unavailable:a.available===0,bookedOut:u===0}},bE=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 _E(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=sn(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(o=>({timeslot:t,ticket:o,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(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(o=>r.includes(o))));const i=Y_(n,s=>s.timeSlot);return Object.values(i).map(s=>Q_(X_(s.flatMap(o=>o.tickets)).map(o=>eu(s.filter(a=>a.tickets.includes(o)),a=>a.capacity)).filter(o=>o!==null),o=>o.capacity)??s[0]).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function wE(e){let t=0;ks(()=>{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}))})})}var kE=0;function pt(e,t){const r={quantity:0,time:"",...t??{}};return Br(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(js(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${kE++}`}),{...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};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}`),vE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),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 dr(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 dr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return dr(this.total_price_cents)}}}var SF=15*6e4;function ca(){return typeof window<"u"&&typeof localStorage<"u"}function SE(e,t){if(ca())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Fu(e){if(!ca())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 gp(e){if(ca())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function yp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var bp="go-cart",da=(e,t)=>localStorage.setItem(bp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function EE(e){const t=e.product.type;switch(t){case"Ticket":return _p(e)?pt(la(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle}):void 0;case"Event":return _p(e)?pt(Mu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return pt(yp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function xE(e){let t=[],r=[],n;try{const i=localStorage.getItem(bp);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(),da([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(EE).filter(OE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),da([],[]),[]}}function TE(e){xE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});da(e.items||[],e.coupons||[]),ks(()=>{ge(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,da(e.items||[],e.coupons||[]))})})}var AE=e=>new Date<new Date(e),CE=e=>oa(e.slice(0,10)).compare(ei(Vt()))>=0,_p=e=>e.time?e.product.subtype==="day"?CE(e.time):AE(e.time):!0,OE=e=>e!==void 0,DE=0;function Mi(e,t=20){const r={items:Me([]),coupons:Me([]),paymentModeId:void 0,uid:`cart-${DE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,sn(this.items,n=>n.total_price_cents))},get totalQuantity(){return sn(this.items,n=>n.quantity)},get valueVoucherCents(){return sn(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 dr(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(o=>o.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(pt(n))),r}function dr(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function IE(){const e=Me(Mi());return TE(e),wE(e),e}var Fi="go-capacity";function wp(e,t){const r=Fu(Fi);SE(Fi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function kp(e){const t=Fu(Fi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){gp(Fi);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 PE(e){ca()&&window.addEventListener("storage",t=>{if(t.key===Fi&&kp(e),t.key==="go-cart"){const r=Fu("go-cart");(!r||!r.items||r.items.length===0)&&gp(Fi)}})}function Sp(){const e={allSeats:{},allQuotas:{},quotaManager:_E({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&wp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&wp(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";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:fE,mantle:hE,seats:yE,unlimited:bE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>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 Re(()=>i==="mantle"?mE(this,t,r,n):pE(r.product))}};return kp(e),PE(e),e}function Ep(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 xp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},$E=class extends xp{constructor(){super()}get isLoggedIn(){try{const e=Ep("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=Ep("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}}},ME=class extends xp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},FE=e=>{switch(e){case"angular":return new $E;case"jmb":return new ME;default:throw new Error("Unhandled shop type: "+e)}};function NE(e){return e==null||typeof e=="string"&&e.trim()===""}function RE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||NE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function LE(e,t){return RE(e,t)}var zE={withStackTrace:!1},Tp=(e,t,r=zE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ri(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(u){o(u)}}function l(d){try{c(n.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function Ap(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 Cp(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),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(g){return Promise.resolve(g).then(h,u)}}function a(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 qE(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(o){return(r=!r)?{value:jr(e[i](o)),done:!1}:s?s(o):o}:s}}function UE(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 Ap=="function"?Ap(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(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var ni=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(ri(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 VE(t)}static combineWithAllErrors(t){return BE(t)}map(t){return new yr(this._promise.then(r=>ri(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=>ri(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=>ri(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=>ri(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=>ri(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=>ri(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 Cp(this,arguments,function*(){return yield jr(yield jr(yield*qE(UE(yield jr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Cp(this,arguments,function*(){const r=yield jr(this._promise);return r.isErr()&&(yield yield jr(fa(r.error))),yield jr(r.value)})}};function fa(e){return new ni(Promise.resolve(new Sr(e)))}var EF=ni.fromPromise,xF=ni.fromSafePromise,TF=ni.fromThrowable,Op=e=>{let t=Mn([]);for(const r of e)if(r.isErr()){t=Zr(r.error);break}else t.map(n=>n.push(r.value));return t},VE=e=>ni.fromSafePromise(Promise.all(e)).andThen(Op),Dp=e=>{let t=Mn([]);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},BE=e=>ni.fromSafePromise(Promise.all(e)).andThen(Dp),Nu;(function(e){function t(i,s){return(...o)=>{try{return Mn(i(...o))}catch(a){return Zr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return Op(i)}e.combine=r;function n(i){return Dp(i)}e.combineWithAllErrors=n})(Nu||(Nu={}));function Mn(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 Mn(e(this.value))}mapErr(e){return Mn(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 Mn(this.value)}orTee(e){return Mn(this.value)}orElse(e){return Mn(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ni.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 Tp("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 fa(this.error)}asyncAndThrough(e){return fa(this.error)}asyncMap(e){return fa(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 Tp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},AF=Nu.fromThrowable,jE=/\{[^{}]+\}/g,ZE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function WE(){return Math.random().toString(36).slice(2,11)}function HE(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:o,headers:a,requestInitExt:l=void 0,...c}={...e};l=ZE()?l:void 0,t=Fp(t);const d=[];async function u(p,h){const{baseUrl:g,fetch:m=n,Request:v=r,headers:y,params:k={},parseAs:S="json",querySerializer:E,bodySerializer:A=s??KE,pathSerializer:O,body:$,middleware:z=[],...B}=h||{};let N=t;g&&(N=Fp(g)??t);let V=typeof i=="function"?i:$p(i);E&&(V=typeof E=="function"?E:$p({...typeof i=="object"?i:{},...E}));const U=O||o||GE,se=$===void 0?void 0:A($,Mp(a,y,k.header)),pe=Mp(se===void 0||se instanceof FormData?{}:{"Content-Type":"application/json"},a,y,k.header),Q=[...d,...z],oe={redirect:"follow",...c,...B,body:se,headers:pe};let J,de,le=new v(YE(p,{baseUrl:N,params:k,querySerializer:V,pathSerializer:U}),oe),W;for(const F in B)F in le||(le[F]=B[F]);if(Q.length){J=WE(),de=Object.freeze({baseUrl:N,fetch:m,parseAs:S,querySerializer:V,bodySerializer:A,pathSerializer:U});for(const F of Q)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const H=await F.onRequest({request:le,schemaPath:p,params:k,options:de,id:J});if(H)if(H instanceof v)le=H;else if(H instanceof Response){W=H;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!W){try{W=await m(le,l)}catch(F){let H=F;if(Q.length)for(let R=Q.length-1;R>=0;R--){const ve=Q[R];if(ve&&typeof ve=="object"&&typeof ve.onError=="function"){const fe=await ve.onError({request:le,error:H,schemaPath:p,params:k,options:de,id:J});if(fe){if(fe instanceof Response){H=void 0,W=fe;break}if(fe instanceof Error){H=fe;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(H)throw H}if(Q.length)for(let F=Q.length-1;F>=0;F--){const H=Q[F];if(H&&typeof H=="object"&&typeof H.onResponse=="function"){const R=await H.onResponse({request:le,response:W,schemaPath:p,params:k,options:de,id:J});if(R){if(!(R instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");W=R}}}}const ee=W.headers.get("Content-Length");if(W.status===204||le.method==="HEAD"||ee==="0"&&!W.headers.get("Transfer-Encoding")?.includes("chunked"))return W.ok?{data:void 0,response:W}:{error:void 0,response:W};if(W.ok)return{data:await(async()=>{if(S==="stream")return W.body;if(S==="json"&&!ee){const H=await W.text();return H?JSON.parse(H):void 0}return await W[S]()})(),response:W};let ue=await W.text();try{ue=JSON.parse(ue)}catch{}return{error:ue,response:W}}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 ha(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 Ip(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 a in t)n.push(a,r.allowReserved===!0?t[a]:encodeURIComponent(t[a]));const o=n.join(",");switch(r.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const a=r.style==="deepObject"?`${e}[${o}]`:o;n.push(ha(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Pp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?t:t.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}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(ha(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(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(Pp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Ip(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ha(i,s,e))}}return n.join("&")}}function GE(e,t){let r=e;for(const n of e.match(jE)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const a=t[i];if(Array.isArray(a)){r=r.replace(n,Pp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,Ip(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${ha(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function KE(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 YE(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 Mp(...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 o of s)t.append(i,o);else s!==void 0&&t.set(i,s)}return t}function Fp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function JE(e,t){return HE({baseUrl:e,headers:{"X-Shop-Url":t}})}var QE="/api/v4/calendar",XE="/api/v4/tickets/calendar",ex="/api/v4/auth/validate_token",tx="/api/v4/tickets/list_and_quotas",rx="/api/v4/tickets",nx="/api/v4/auth/sign_in",ix="/api/v4/auth",sx="/api/v4/orders/withdrawals",ox="/api/v4/orders",Np={SHOP_GUEST:10,SHOP:20},Rp={error:{success:!1,errors:["Not signed in"]}},ax=class{type;#e=X(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=B_(this.type),f(this.#e).currentUser=FE(this.type),f(this.#e).apiUrl=e,f(this.#e).shopDomain=t,f(this.#e).locale=r||"de",this.#t={},f(this.#e).client=JE(e,t),f(this.#e).capacityManager=Sp(),f(this.#e).cart=IE(),f(this.#e).auth=new Vf,f(this.#e).client.use(new tw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return f(this.#e).capacityManager||(f(this.#e).capacityManager=Sp()),f(this.#e).capacityManager}get cart(){return f(this.#e).cart}get auth(){return f(this.#e).auth||(f(this.#e).auth=new Vf),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(ex,"getCustomer","",{cache:5}):Rp}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(ox,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):Rp}ticketsCalendar(e){return this.fetchAndCache(XE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(QE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(tx,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Et({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(rx,`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(nx,{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?Np.SHOP_GUEST:Np.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(ix,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(sx,{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"]})}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),o=!this.#t[s],a=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(o||a)&&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,o=LE(r,i);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[t.method];return await a(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 W_(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 ax;function Ni(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 lx=class ay{host;KEY;pollDuration;#e=X(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 ay(null,null);return r.value=t,r}load(){Ql(()=>(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 Ri(e){return function(t,r={pollDuration:1e3}){if(t){const n=new lx(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 ux={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},cx=class{defaultConfig=Et(ux,window.customOptions);override=this.defaultConfig;#e=X(Me(this.defaultConfig));get options(){return f(this.#e)}set options(e){I(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 cx,Lp=class{#e=X();get token(){return f(this.#e)}set token(e){I(this.#e,e,!0)}#t=X();get ticketSaleId(){return f(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return hl(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return hl(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)}},zp="go-annual-ticket-personalization",qp=Ni(zp),dx=Ri(zp),fx=j("<li><a> </a></li>"),hx=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function px(e,t){te(t,!0);let r=_(t,"token",7);const n=new Lp;qp(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()}},o=Y(),a=q(o),l=c=>{var d=Y(),u=q(d);Le(u,17,()=>f(i).ticket_sales,p=>p.id,(p,h)=>{var g=hx(),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=M(y,!0);P(y);var S=K(y,2),E=A=>{var O=fx(),$=M(O),z=M($,!0);P($),P(O),ae((B,N)=>{me($,"href",B),ie(z,N)},[()=>n.goToPersonalization(f(h)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),x(A,O)};ce(S,A=>{f(h).status=="not_ready_to_send"&&A(E)}),P(g),ae(A=>{me(g,"data-ticket-sale-id",f(h).id),ie(v,f(h).title),ie(k,A)},[()=>C.t("ticket.annual.personalization.detail.title",{count:f(h).personalizations.length})]),x(p,g)}),x(c,d)};return ce(a,c=>{f(i)&&c(l)}),x(e,o),re(s)}customElements.define("go-annual-ticket-personalization",ne(px,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var mx={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:cr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:cr().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:cr().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:cr().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:D1(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 vx(e,t){return{...e,errors:e.errors||[],value:e.value??gx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){yx(this)}}}function gx(e){return e==="checkbox"?!1:e==="file"?null:""}function yx(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 fr=class rl{static#e={};static defineForm(t){Je.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Je.default({fields:t})}static{rl.defineFields(mx)}static setRequiredApiKeys(t,r){rl.#e[t]=r}static getFormOptions(t){return Je.config.forms[t]}static createField(t,r){const n=rl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return vx(n,r)}static getFormFields(t){return bx(t)}static getFieldInit(t){return Je.config.fields[t]}};function bx(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 Ru(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function _x(e,t){te(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i;const s=new Lp;qp(t.$$host,s),ge(()=>{s.token=r(),s.ticketSaleId=n()}),fr.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Uf(m,(A,O)=>{const $=v[O-1].details;return A.push($),A},[]);if(y.forEach(A=>{A.fields.forEach(O=>{A.validateField(O)})}),!Uf(m,(A,O)=>y[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const A=y.map(async($,z)=>{const B=s.ticketSale.personalizations[z].id,N=$.fields.find(U=>U.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const V=await C.uploadPersonalizationPhoto(r(),B,N);return V.error?{ok:!1,error:V.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(A)).find($=>!$.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((A,O)=>{const $=ew(A.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},S=await C.finalizePersonalizations(r(),k);if(S.error){i.details.apiErrors=[S.error.error];return}const E=Je.config.forms.personalization?.beforeSubmit;E&&E(k),Je.config.urls.annualTicketPersonalizationFormSubmit?.()&&Je.config.navigateTo(Je.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return a?!0:(a=t.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(m){if(!p()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const y=Math.max(m,1),k=Array.from(v.querySelectorAll("go-personalization-form"));for(;k.length<y;){const E=l.cloneNode(!0);u(E),v.insertBefore(E,c),k.push(E)}for(;k.length>y;){const E=k.pop();E&&E!==a&&E.remove()}const S=s.ticketSale?.personalizations??[];k.forEach((E,A)=>{const O=S[A];O&&(E.dataset.personalizationId=String(O.id))}),d=y}nn(()=>{p(),t.$$host.addEventListener("go-submit",o),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 re(g)}customElements.define("go-annual-ticket-personalization-form",ne(_x,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var wx=class{formId;form;#e=X(Me([]));#t=D(()=>Ru(this.fields)==0);get isValid(){return f(this.#t)}set isValid(e){I(this.#t,e)}#r=X();get successMessage(){return f(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return K_(r)||H_(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=[]),Xl(e)){I(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&I(this.#e,e.errors,!0),G_(e.error)){I(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}},Up="go-form-details",kx=Ni(Up),Li=Ri(Up);function Fn(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(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var Sx=j("<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 Ex(e,t){te(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new wx(r(),t.$$host);kx(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=Fn(t.$$host,"form",{novalidate:!0});d.addEventListener("submit",s),i.form=d});var o={details:i,get formId(){return r()},set formId(d){r(d),b()},get custom(){return n()},set custom(d){n(d),b()}},a=Y(),l=q(a),c=d=>{var u=Sx(),p=q(u),h=K(p,2),g=K(h,2),m=M(g,!0);P(g),ae(v=>ie(m,v),[()=>C.t(fr.getFormOptions(r())?.submitLabel||"Submit")]),x(d,u)};return ce(l,d=>{n()||d(c)}),x(e,a),re(o)}customElements.define("go-form",ne(Ex,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var xx=j("<go-form></go-form>",2);function Tx(e,t){te(t,!0);let r=_(t,"custom",7,!1);fr.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const a=o.target.details,l=await C.passwordReset(a.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),a.successMessage=l.data.message,a.apiErrors=[]):a.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),b()}},s=xx();return Yn(s,"formId","passwordReset"),ae(()=>Yn(s,"custom",r())),No("submit",s,n),x(e,s),re(i)}customElements.define("go-password-reset",ne(Tx,{custom:{}},[],[]));function Ax(e,t){te(t,!0),fr.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,o=await C.signIn(s.formData);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Fn(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(Ax,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Cx(e,t){te(t,!0);let r=_(t,"custom",7,!1);fr.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,o=await C.signUp(s.formData,!1);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return Fn(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(Cx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Ox(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 Dx(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function Ix(e){return Ox(Dx(e),0)}function Px(e,t){const r=Mi(),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,o=s.uuid,a=e.items.find(l=>l.uuid===o);if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem($x(a,s))}),r}function $x(e,t){const r=Ix(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return pt({...e.product,price_cents:n},{quantity:r,time:e.time,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var Mx=class{#e=X();get displayCart(){return f(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=X(!1);get preview(){return f(this.#t)}set preview(e){I(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=Px(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}}},Vp="go-cart-details",Fx=Ni(Vp),zi=Ri(Vp),Nx=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Bp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),b()}},i=Nx(),s=M(i,!0);return P(i),ae(()=>ie(s,r().product.title)),x(e,i),re(n)}ne(Bp,{cartItem:{}},[],[],{mode:"open"});var Rx=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),Lx=j('<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 jp(e,t){te(t,!0);let r=_(t,"cartItem",7);if(!ua(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=Lx(),o=q(s),a=M(o),l=M(a,!0);P(a);var c=K(a),d=M(c,!0);P(c),P(o);var u=K(o),p=h=>{var g=Rx(),m=q(g),v=M(m,!0);P(m);var y=K(m),k=M(y,!0);P(y),ae((S,E)=>{ie(v,S),ie(k,E)},[()=>Bs(r().time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(r().time)]),x(h,g)};return ce(u,h=>{r().time&&h(p)}),ae(()=>{ie(l,n.event_title),ie(d,n.title)}),x(e,s),re(i)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var zx=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),qx=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Ux=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Zp(e,t){te(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),b()}},i=Ux(),s=q(i),o=M(s,!0);P(s);var a=K(s,2),l=c=>{var d=qx(),u=q(d),p=M(u,!0);P(u);var h=K(u,2),g=m=>{var v=zx(),y=M(v,!0);P(v),ae(k=>ie(y,k),[()=>Vs(r().time)]),x(m,v)};ce(h,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),ae(m=>ie(p,m),[()=>Bs(r().time,{month:"numeric",day:"numeric"},C.locale)]),x(c,d)};return ce(a,c=>{r().time&&c(l)}),ae(()=>ie(o,r().product.title)),x(e,i),re(n)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});function Wp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function Vx(e,{min:t,floor:r=0}){return e<=t?r:e-1}function Bx(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 jx(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Hp(e,t){return Wp(e,t)>e}function Gp(e,{floor:t=0}){return e>t}var Zx=j('<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 Kp(e,t){const r=ht();te(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),o=_(t,"floor",7,0),a=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),d=_(t,"onChange",7);const u=D(()=>({min:i(),max:s(),floor:o()}));let p,h=X(!1);const g=D(()=>!Gp(n(),f(u))),m=D(()=>!Hp(n(),f(u)));function v(V){V!==n()&&d()(V)}function y(){Gp(n(),f(u))&&v(Vx(n(),f(u)))}function k(){Hp(n(),f(u))&&v(Wp(n(),f(u)))}function S(){const V=Bx(parseInt(p.value,10),f(u));I(h,!1),p.value=String(V),v(V)}function E(){const V=p.value.trim();I(h,!(/^\d+$/.test(V)&&jx(parseInt(V,10),f(u))))}function A(V){switch(V.key){case"ArrowUp":V.preventDefault(),k();break;case"ArrowDown":V.preventDefault(),y();break;case"Home":V.preventDefault(),v(o());break;case"End":V.preventDefault(),v(s());break;case"Enter":V.preventDefault(),S();break}}var O={get value(){return n()},set value(V){n(V),b()},get min(){return i()},set min(V){i(V),b()},get max(){return s()},set max(V){s(V),b()},get floor(){return o()},set floor(V=0){o(V),b()},get label(){return a()},set label(V){a(V),b()},get decreaseLabel(){return l()},set decreaseLabel(V){l(V),b()},get increaseLabel(){return c()},set increaseLabel(V){c(V),b()},get onChange(){return d()},set onChange(V){d(V),b()}},$=Zx(),z=M($),B=K(z,2);Ps(B),Yl(B,V=>p=V,()=>p);var N=K(B,2);return P($),ae(()=>{me($,"aria-label",a()),me(z,"title",l()),me(z,"aria-controls",r),me(z,"aria-disabled",f(g)),me(B,"id",r),me(B,"aria-label",a()),Ul(B,n()),me(B,"aria-valuenow",n()),me(B,"aria-valuemin",o()),me(B,"aria-valuemax",s()),me(B,"aria-invalid",f(h)?"true":void 0),me(N,"title",c()),me(N,"aria-controls",r),me(N,"aria-disabled",f(m))}),ft("click",z,y),ft("input",B,E),ft("change",B,S),No("blur",B,S),ft("keydown",B,A),ft("click",N,k),x(e,$),re(O)}ar(["click","input","change","keydown"]),ne(Kp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function Wx(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[pa(n)];if(t<e)return e>n?[pa(e)]:[];const i=Math.max(e,n),s=[pa(n)];for(let o=i;o<=t;o++)o!==n&&s.push(pa(o));return s}function pa(e){return{value:e,label:e.toString()}}var Hx=j("<option> </option>"),Gx=j('<select class="go-quantity-select"></select>');function ma(e,t){te(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),o=_(t,"floor",7,0),a=_(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 o()},set floor(m=0){o(m),b()},get deselectable(){return a()},set deselectable(m=!0){a(m),b()},get onChange(){return l()},set onChange(m){l(m),b()}},u=Y(),p=q(u),h=m=>{{let v=D(()=>a()?0:n()),y=D(()=>C.t("quantity.decrease")),k=D(()=>C.t("quantity.increase"));Kp(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=Gx();Le(v,21,()=>Wx(n(),i(),{floor:a()?o():n()}),y=>y.value,(y,k)=>{var S=Hx(),E=M(S,!0);P(S);var A={};ae(()=>{Pf(S,r()===f(k).value),ie(E,f(k).label),A!==(A=f(k).value)&&(S.value=(S.__value=f(k).value)??"")}),x(y,S)}),P(v),ae(()=>me(v,"aria-label",s())),ft("change",v,y=>l()(parseInt(y.target.value,10))),x(m,v)};return ce(p,m=>{f(c)?m(h):m(g,-1)}),x(e,u),re(d)}ar(["change"]),ne(ma,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onChange:{}},[],[],{mode:"open"});function Yp(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 Kx(e){if(Array.isArray(e))return e}function Yx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function Jx(){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 Qx(e,t){return Kx(e)||Yx(e,t)||Xx(e,t)||Jx()}function Xx(e,t){if(e){if(typeof e=="string")return Yp(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)?Yp(e,t):void 0}}var Jp=Object.entries,Qp=Object.setPrototypeOf,eT=Object.isFrozen,tT=Object.getPrototypeOf,rT=Object.getOwnPropertyDescriptor,Dt=Object.freeze,hr=Object.seal,qi=Object.create,Xp=typeof Reflect<"u"&&Reflect,Lu=Xp.apply,zu=Xp.construct;Dt||(Dt=function(t){return t}),hr||(hr=function(t){return t}),Lu||(Lu=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)}),zu||(zu=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 Ui=ct(Array.prototype.forEach),nT=ct(Array.prototype.lastIndexOf),em=ct(Array.prototype.pop),Vi=ct(Array.prototype.push),iT=ct(Array.prototype.splice),It=Array.isArray,Zs=ct(String.prototype.toLowerCase),qu=ct(String.prototype.toString),tm=ct(String.prototype.match),Bi=ct(String.prototype.replace),rm=ct(String.prototype.indexOf),sT=ct(String.prototype.trim),oT=ct(Number.prototype.toString),aT=ct(Boolean.prototype.toString),nm=typeof BigInt>"u"?null:ct(BigInt.prototype.toString),im=typeof Symbol>"u"?null:ct(Symbol.prototype.toString),tt=ct(Object.prototype.hasOwnProperty),Ws=ct(Object.prototype.toString),_t=ct(RegExp.prototype.test),Hs=lT(TypeError);function ct(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 Lu(e,t,n)}}function lT(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zu(e,r)}}function xe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zs;if(Qp&&Qp(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&&(eT(t)||(t[n]=s),i=s)}e[i]=!0}return e}function uT(e){for(let t=0;t<e.length;t++)tt(e,t)||(e[t]=null);return e}function xt(e){const t=qi(null);for(const n of Jp(e)){var r=Qx(n,2);const i=r[0],s=r[1];tt(e,i)&&(It(s)?t[i]=uT(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=xt(s):t[i]=s)}return t}function cT(e){switch(typeof e){case"string":return e;case"number":return oT(e);case"boolean":return aT(e);case"bigint":return nm?nm(e):"0";case"symbol":return im?im(e):"Symbol()";case"undefined":return Ws(e);case"function":case"object":{if(e===null)return Ws(e);const t=e,r=Hr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ws(n)}return Ws(e)}default:return Ws(e)}}function Hr(e,t){for(;e!==null;){const n=rT(e,t);if(n){if(n.get)return ct(n.get);if(typeof n.value=="function")return ct(n.value)}e=tT(e)}function r(){return null}return r}function dT(e){try{return _t(e,""),!0}catch{return!1}}var sm=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"]),Uu=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"]),Vu=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"]),fT=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"]),Bu=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"]),hT=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),om=Dt(["#text"]),am=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"]),ju=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"]),lm=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"]),va=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pT=hr(/{{[\w\W]*|^[\w\W]*}}/g),mT=hr(/<%[\w\W]*|^[\w\W]*%>/g),vT=hr(/\${[\w\W]*/g),gT=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),yT=hr(/^aria-[\-\w]+$/),um=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bT=hr(/^(?:\w+script|data):/i),_T=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wT=hr(/^html$/i),kT=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},ST=function(){return typeof window>"u"?null:window},ET=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},cm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ST();const t=ye=>dm(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,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,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"),S=o&&o.prototype?Hr(o.prototype,"nodeType"):null,E=o&&o.prototype?Hr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let A,O="";const $=r,z=$.implementation,B=$.createNodeIterator,N=$.createDocumentFragment,V=$.getElementsByTagName,U=n.importNode;let se=cm();t.isSupported=typeof Jp=="function"&&typeof v=="function"&&z&&z.createHTMLDocument!==void 0;const pe=pT,Q=mT,oe=vT,J=gT,de=yT,le=bT,W=_T,ee=kT;let ue=um,F=null;const H=xe({},[...sm,...Uu,...Vu,...Bu,...om]);let R=null;const ve=xe({},[...am,...ju,...lm,...va]);let fe=Object.seal(qi(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,Oe=null;const Ce=Object.seal(qi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,wt=!0,Ke=!1,Mt=!0,it=!1,Xt=!0,Tt=!1,Ft=!1,er=!1,Zt=!1,mr=!1,Ir=!1,Pr=!0,yn=!1;const $r="user-content-";let vr=!0,Qr=!1,Xr={},kt=null;const Un=xe({},["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 is=null;const ss=xe({},["audio","video","img","source","image","track"]);let fo=null;const td=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gi="http://www.w3.org/1998/Math/MathML",os="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let Vn=gr,rd=!1,nd=null;const O2=xe({},[gi,os,gr],qu);let id=xe({},["mi","mo","mn","ms","mtext"]),sd=xe({},["annotation-xml"]);const D2=xe({},["title","style","font","a","script"]);let ho=null;const I2=["application/xhtml+xml","text/html"],P2="text/html";let ot=null,as=null;const $2=r.createElement("form"),Gg=function(T){return T instanceof RegExp||T instanceof Function},od=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(as&&as===T)return;(!T||typeof T!="object")&&(T={}),T=xt(T),ho=I2.indexOf(T.PARSER_MEDIA_TYPE)===-1?P2:T.PARSER_MEDIA_TYPE,ot=ho==="application/xhtml+xml"?qu:Zs,F=tt(T,"ALLOWED_TAGS")&&It(T.ALLOWED_TAGS)?xe({},T.ALLOWED_TAGS,ot):H,R=tt(T,"ALLOWED_ATTR")&&It(T.ALLOWED_ATTR)?xe({},T.ALLOWED_ATTR,ot):ve,nd=tt(T,"ALLOWED_NAMESPACES")&&It(T.ALLOWED_NAMESPACES)?xe({},T.ALLOWED_NAMESPACES,qu):O2,fo=tt(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)?xe(xt(td),T.ADD_URI_SAFE_ATTR,ot):td,is=tt(T,"ADD_DATA_URI_TAGS")&&It(T.ADD_DATA_URI_TAGS)?xe(xt(ss),T.ADD_DATA_URI_TAGS,ot):ss,kt=tt(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)?xe({},T.FORBID_CONTENTS,ot):Un,w=tt(T,"FORBID_TAGS")&&It(T.FORBID_TAGS)?xe({},T.FORBID_TAGS,ot):xt({}),Oe=tt(T,"FORBID_ATTR")&&It(T.FORBID_ATTR)?xe({},T.FORBID_ATTR,ot):xt({}),Xr=tt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?xt(T.USE_PROFILES):T.USE_PROFILES:!1,je=T.ALLOW_ARIA_ATTR!==!1,wt=T.ALLOW_DATA_ATTR!==!1,Ke=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=T.SAFE_FOR_TEMPLATES||!1,Xt=T.SAFE_FOR_XML!==!1,Tt=T.WHOLE_DOCUMENT||!1,Zt=T.RETURN_DOM||!1,mr=T.RETURN_DOM_FRAGMENT||!1,Ir=T.RETURN_TRUSTED_TYPE||!1,er=T.FORCE_BODY||!1,Pr=T.SANITIZE_DOM!==!1,yn=T.SANITIZE_NAMED_PROPS||!1,vr=T.KEEP_CONTENT!==!1,Qr=T.IN_PLACE||!1,ue=dT(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:um,Vn=typeof T.NAMESPACE=="string"?T.NAMESPACE:gr,id=tt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?xt(T.MATHML_TEXT_INTEGRATION_POINTS):xe({},["mi","mo","mn","ms","mtext"]),sd=tt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?xt(T.HTML_INTEGRATION_POINTS):xe({},["annotation-xml"]);const Z=tt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?xt(T.CUSTOM_ELEMENT_HANDLING):qi(null);if(fe=qi(null),tt(Z,"tagNameCheck")&&Gg(Z.tagNameCheck)&&(fe.tagNameCheck=Z.tagNameCheck),tt(Z,"attributeNameCheck")&&Gg(Z.attributeNameCheck)&&(fe.attributeNameCheck=Z.attributeNameCheck),tt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),it&&(wt=!1),mr&&(Zt=!0),Xr&&(F=xe({},om),R=qi(null),Xr.html===!0&&(xe(F,sm),xe(R,am)),Xr.svg===!0&&(xe(F,Uu),xe(R,ju),xe(R,va)),Xr.svgFilters===!0&&(xe(F,Vu),xe(R,ju),xe(R,va)),Xr.mathMl===!0&&(xe(F,Bu),xe(R,lm),xe(R,va))),Ce.tagCheck=null,Ce.attributeCheck=null,tt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?Ce.tagCheck=T.ADD_TAGS:It(T.ADD_TAGS)&&(F===H&&(F=xt(F)),xe(F,T.ADD_TAGS,ot))),tt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?Ce.attributeCheck=T.ADD_ATTR:It(T.ADD_ATTR)&&(R===ve&&(R=xt(R)),xe(R,T.ADD_ATTR,ot))),tt(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)&&xe(fo,T.ADD_URI_SAFE_ATTR,ot),tt(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),xe(kt,T.FORBID_CONTENTS,ot)),tt(T,"ADD_FORBID_CONTENTS")&&It(T.ADD_FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),xe(kt,T.ADD_FORBID_CONTENTS,ot)),vr&&(F["#text"]=!0),Tt&&xe(F,["html","head","body"]),F.table&&(xe(F,["tbody"]),delete w.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=T.TRUSTED_TYPES_POLICY,O=A.createHTML("")}else A===void 0&&(A=ET(d,i)),A!==null&&typeof O=="string"&&(O=A.createHTML(""));(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&F===H&&(F=xt(F)),se.uponSanitizeAttribute.length>0&&R===ve&&(R=xt(R)),Dt&&Dt(T),as=T},Kg=xe({},[...Uu,...Vu,...fT]),Yg=xe({},[...Bu,...hT]),M2=function(T){let Z=v(T);(!Z||!Z.tagName)&&(Z={namespaceURI:Vn,tagName:"template"});const he=Zs(T.tagName),De=Zs(Z.tagName);return nd[T.namespaceURI]?T.namespaceURI===os?Z.namespaceURI===gr?he==="svg":Z.namespaceURI===gi?he==="svg"&&(De==="annotation-xml"||id[De]):!!Kg[he]:T.namespaceURI===gi?Z.namespaceURI===gr?he==="math":Z.namespaceURI===os?he==="math"&&sd[De]:!!Yg[he]:T.namespaceURI===gr?Z.namespaceURI===os&&!sd[De]||Z.namespaceURI===gi&&!id[De]?!1:!Yg[he]&&(D2[he]||!Kg[he]):!!(ho==="application/xhtml+xml"&&nd[T.namespaceURI]):!1},Mr=function(T){Vi(t.removed,{element:T});try{v(T).removeChild(T)}catch{h(T)}},yi=function(T,Z){try{Vi(t.removed,{attribute:Z.getAttributeNode(T),from:Z})}catch{Vi(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(T),T==="is")if(Zt||mr)try{Mr(Z)}catch{}else try{Z.setAttribute(T,"")}catch{}},Jg=function(T){let Z=null,he=null;if(er)T="<remove></remove>"+T;else{const et=tm(T,/^[\r\n\t ]+/);he=et&&et[0]}ho==="application/xhtml+xml"&&Vn===gr&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const De=A?A.createHTML(T):T;if(Vn===gr)try{Z=new c().parseFromString(De,ho)}catch{}if(!Z||!Z.documentElement){Z=z.createDocument(Vn,"template",null);try{Z.documentElement.innerHTML=rd?O:De}catch{}}const Fe=Z.body||Z.documentElement;return T&&he&&Fe.insertBefore(r.createTextNode(he),Fe.childNodes[0]||null),Vn===gr?V.call(Z,Tt?"html":"body")[0]:Tt?Z.documentElement:Fe},Qg=function(T){return B.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Xg=function(T){T.normalize();const Z=B.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=Z.nextNode();for(;he;){let De=he.data;Ui([pe,Q,oe],Fe=>{De=Bi(De,Fe," ")}),he.data=De,he=Z.nextNode()}},Xa=function(T){const Z=E?E(T):null;return typeof Z!="string"||ot(Z)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==m(T)},po=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===Gr.documentFragment}catch{return!1}},el=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function bn(ye,T,Z){Ui(ye,he=>{he.call(t,T,Z,as)})}const ey=function(T){let Z=null;if(bn(se.beforeSanitizeElements,T,null),Xa(T))return Mr(T),!0;const he=ot(T.nodeName);if(bn(se.uponSanitizeElement,T,{tagName:he,allowedTags:F}),Xt&&T.hasChildNodes()&&!el(T.firstElementChild)&&_t(/<[/\w!]/g,T.innerHTML)&&_t(/<[/\w!]/g,T.textContent)||Xt&&T.namespaceURI===gr&&he==="style"&&el(T.firstElementChild)||T.nodeType===Gr.progressingInstruction||Xt&&T.nodeType===Gr.comment&&_t(/<[/\w]/g,T.data))return Mr(T),!0;if(w[he]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(he))&&!F[he]){if(!w[he]&&ry(he)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(vr&&!kt[he]){const De=v(T),Fe=m(T);if(Fe&&De){const et=Fe.length;for(let Wt=et-1;Wt>=0;--Wt){const Bn=p(Fe[Wt],!0);De.insertBefore(Bn,g(T))}}}return Mr(T),!0}return(S?S(T):T.nodeType)===Gr.element&&!M2(T)||(he==="noscript"||he==="noembed"||he==="noframes")&&_t(/<\/no(script|embed|frames)/i,T.innerHTML)?(Mr(T),!0):(it&&T.nodeType===Gr.text&&(Z=T.textContent,Ui([pe,Q,oe],De=>{Z=Bi(Z,De," ")}),T.textContent!==Z&&(Vi(t.removed,{element:T.cloneNode()}),T.textContent=Z)),bn(se.afterSanitizeElements,T,null),!1)},ty=function(T,Z,he){if(Oe[Z]||Pr&&(Z==="id"||Z==="name")&&(he in r||he in $2))return!1;const De=R[Z]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(Z,T);if(!(wt&&!Oe[Z]&&_t(J,Z))){if(!(je&&_t(de,Z))){if(!De||Oe[Z]){if(!(ry(T)&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,T)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(T))&&(fe.attributeNameCheck instanceof RegExp&&_t(fe.attributeNameCheck,Z)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(Z,T))||Z==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&_t(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!fo[Z]){if(!_t(ue,Bi(he,W,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&T!=="script"&&rm(he,"data:")===0&&is[T])){if(!(Ke&&!_t(le,Bi(he,W,"")))){if(he)return!1}}}}}}return!0},F2=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ry=function(T){return!F2[Zs(T)]&&_t(ee,T)},ny=function(T){bn(se.beforeSanitizeAttributes,T,null);const Z=T.attributes;if(!Z||Xa(T))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let De=Z.length;for(;De--;){const Fe=Z[De],et=Fe.name,Wt=Fe.namespaceURI,Bn=Fe.value,_n=ot(et),ad=Bn;let gt=et==="value"?ad:sT(ad);if(he.attrName=_n,he.attrValue=gt,he.keepAttr=!0,he.forceKeepAttr=void 0,bn(se.uponSanitizeAttribute,T,he),gt=he.attrValue,yn&&(_n==="id"||_n==="name")&&rm(gt,$r)!==0&&(yi(et,T),gt=$r+gt),Xt&&_t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){yi(et,T);continue}if(_n==="attributename"&&tm(gt,"href")){yi(et,T);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){yi(et,T);continue}if(!Mt&&_t(/\/>/i,gt)){yi(et,T);continue}it&&Ui([pe,Q,oe],sy=>{gt=Bi(gt,sy," ")});const iy=ot(T.nodeName);if(!ty(iy,_n,gt)){yi(et,T);continue}if(A&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Wt)switch(d.getAttributeType(iy,_n)){case"TrustedHTML":gt=A.createHTML(gt);break;case"TrustedScriptURL":gt=A.createScriptURL(gt);break}if(gt!==ad)try{Wt?T.setAttributeNS(Wt,et,gt):T.setAttribute(et,gt),Xa(T)?Mr(T):em(t.removed)}catch{yi(et,T)}}bn(se.afterSanitizeAttributes,T,null)},tl=function(T){let Z=null;const he=Qg(T);for(bn(se.beforeSanitizeShadowDOM,T,null);Z=he.nextNode();)if(bn(se.uponSanitizeShadowNode,Z,null),ey(Z),ny(Z),po(Z.content)&&tl(Z.content),(S?S(Z):Z.nodeType)===Gr.element){const De=y?y(Z):Z.shadowRoot;po(De)&&(ls(De),tl(De))}bn(se.afterSanitizeShadowDOM,T,null)},ls=function(T){const Z=S?S(T):T.nodeType;if(Z===Gr.element){const Fe=y?y(T):T.shadowRoot;po(Fe)&&(ls(Fe),tl(Fe))}const he=m?m(T):T.childNodes;if(!he)return;const De=[];Ui(he,Fe=>{Vi(De,Fe)});for(const Fe of De)ls(Fe);if(Z===Gr.element){const Fe=E?E(T):null;if(typeof Fe=="string"&&ot(Fe)==="template"){const et=T.content;po(et)&&ls(et)}}};return t.sanitize=function(ye){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,he=null,De=null,Fe=null;if(rd=!ye,rd&&(ye="<!-->"),typeof ye!="string"&&!el(ye)&&(ye=cT(ye),typeof ye!="string"))throw Hs("dirty is not a string, aborting");if(!t.isSupported)return ye;if(Ft||od(T),t.removed=[],typeof ye=="string"&&(Qr=!1),Qr){const Bn=E?E(ye):ye.nodeName;if(typeof Bn=="string"){const _n=ot(Bn);if(!F[_n]||w[_n])throw Hs("root node is forbidden and cannot be sanitized in-place")}if(Xa(ye))throw Hs("root node is clobbered and cannot be sanitized in-place");ls(ye)}else if(el(ye))Z=Jg("<!---->"),he=Z.ownerDocument.importNode(ye,!0),he.nodeType===Gr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?Z=he:Z.appendChild(he),ls(he);else{if(!Zt&&!it&&!Tt&&ye.indexOf("<")===-1)return A&&Ir?A.createHTML(ye):ye;if(Z=Jg(ye),!Z)return Zt?null:Ir?O:""}Z&&er&&Mr(Z.firstChild);const et=Qg(Qr?ye:Z);for(;De=et.nextNode();)ey(De),ny(De),po(De.content)&&tl(De.content);if(Qr)return it&&Xg(ye),ye;if(Zt){if(it&&Xg(Z),mr)for(Fe=N.call(Z.ownerDocument);Z.firstChild;)Fe.appendChild(Z.firstChild);else Fe=Z;return(R.shadowroot||R.shadowrootmode)&&(Fe=U.call(n,Fe,!0)),Fe}let Wt=Tt?Z.outerHTML:Z.innerHTML;return Tt&&F["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&_t(wT,Z.ownerDocument.doctype.name)&&(Wt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
77
- `+Wt),it&&Ui([pe,Q,oe],Bn=>{Wt=Bi(Wt,Bn," ")}),A&&Ir?A.createHTML(Wt):Wt},t.setConfig=function(){od(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ft=!0},t.clearConfig=function(){as=null,Ft=!1},t.isValidAttribute=function(ye,T,Z){return as||od({}),ty(ot(ye),ot(T),Z)},t.addHook=function(ye,T){typeof T=="function"&&Vi(se[ye],T)},t.removeHook=function(ye,T){if(T!==void 0){const Z=nT(se[ye],T);return Z===-1?void 0:iT(se[ye],Z,1)[0]}return em(se[ye])},t.removeHooks=function(ye){se[ye]=[]},t.removeAllHooks=function(){se=cm()},t}var fm=dm(),xT=j('<span class="go-sub-ticket-description"></span>'),TT=j('<span class="go-sub-ticket-quantity"> </span>'),AT=j('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function Zu(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),o=_(t,"preview",7,!1);const a=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 o()},set preview(y=!1){o(y),b()}},c=AT(),d=M(c),u=M(d,!0);P(d);var p=K(d,2),h=y=>{var k=xT();Ef(k,()=>fm.sanitize(r().description),!0),P(k),x(y,k)};ce(p,y=>{r().description&&y(h)});var g=K(p,2),m=y=>{var k=TT(),S=M(k,!0);P(k),ae(()=>{me(k,"data-testid",`sub-ticket-${r().id??""}-quantity`),ie(S,n())}),x(y,k)},v=y=>{{let k=D(()=>r().title||C.t("cart.content.table.edit"));ma(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 ce(g,y=>{o()||f(a)?y(m):y(v,-1)}),P(c),ae(()=>{St(c,1,lr(["go-sub-ticket",f(a)&&"is-fixed",o()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),ie(u,r().title)}),x(e,c),re(l)}ne(Zu,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});var CT=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),OT=j('<span class="go-cart-item-price-discounted"> </span>'),DT=j("<span> </span>"),IT=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),PT=j('<ul class="go-sub-tickets" role="list"></ul>'),$T=j('<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 hm(e,t){te(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=X(void 0),o=X(Me({}));const a=D(()=>C.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Br(r().product)?r().product:null),c=Mi();ge(()=>{C.cart?.items.map(y=>y.quantity),C.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{I(s,C.capacityManager.capacity(n(),r(),c),!0),I(o,f(a)?C.capacityManager.subTicketMaxes(C.cart,f(a),c):{},!0)})});function d(y){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}f(a).quantity=Math.max(0,f(a).quantity-r().quantity+y)}function u(){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,f(a).quantity-r().quantity);y===0?C.cart?.deleteItem(f(a)):f(a).quantity=y}function p(y,k){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}f(a).mantle&&(f(a).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=Y(),m=q(g),v=y=>{var k=$T(),S=q(k),E=M(S),A=M(E),O=M(A),$=H=>{Zp(H,{get cartItem(){return r()}})},z=H=>{jp(H,{get cartItem(){return r()}})},B=H=>{Bp(H,{get cartItem(){return r()}})};ce(O,H=>{r().product.type==="Ticket"?H($):r().product.type==="Event"?H(z,1):r().product.type==="Coupon"&&H(B,2)}),P(A);var N=K(A,2),V=M(N),U=H=>{var R=CT(),ve=q(R),fe=M(ve,!0);P(ve);var w=K(ve,2),Oe=M(w,!0);P(w),ae((Ce,je)=>{ie(fe,Ce),ie(Oe,je)},[()=>dr(r().display.originalPrice),()=>dr(r().final_price_cents)]),x(H,R)},se=H=>{var R=OT(),ve=M(R,!0);P(R),ae(fe=>ie(ve,fe),[()=>dr(r().final_price_cents)]),x(H,R)};ce(V,H=>{r().display?.discounted?H(U):H(se,-1)}),P(N);var pe=K(N,2),Q=M(pe),oe=H=>{var R=DT(),ve=M(R,!0);P(R),ae(()=>ie(ve,r().quantity)),x(H,R)},J=H=>{{let R=D(()=>r().quantity??0);ma(H,{get value(){return f(R)},get min(){return f(s).min},get max(){return f(s).max},get label(){return r().product.title},floor:1,onChange:d})}};ce(Q,H=>{i()?H(oe):H(J,-1)}),P(pe);var de=K(pe,2),le=H=>{var R=IT(),ve=M(R);P(R),ae(fe=>me(ve,"aria-label",fe),[()=>C.t("cart.item.remove")]),ft("click",ve,u),x(H,R)};ce(de,H=>{i()||H(le)});var W=K(de,2),ee=M(W,!0);P(W),P(E),P(S);var ue=K(S,2),F=H=>{var R=PT();Le(R,21,()=>js(f(l)),ve=>ve.id,(ve,fe)=>{{let w=D(()=>r().mantle?.composition?.[f(fe).id]??0);Zu(ve,{get sub(){return f(fe)},get preview(){return i()},get quantity(){return f(w)},get max(){return f(o)[f(fe).id]},onChange:Oe=>p(f(fe).id,Oe)})}}),P(R),ae(()=>me(R,"aria-label",f(l).title)),x(H,R)};ce(ue,H=>{f(l)&&H(F)}),ae(H=>ie(ee,H),[()=>dr(r().total_price_cents)]),x(y,k)};return ce(m,y=>{f(s)&&y(v)}),x(e,g),re(h)}ar(["click"]),ne(hm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var MT=j('<li class="go-cart-header-remove"></li>'),FT=j('<li class="go-cart-item"><!></li>'),NT=j('<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 RT(e,t){te(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=NT(),c=M(l),d=M(c),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);P(h);var m=K(h,2),v=M(m,!0);P(m);var y=K(m,2),k=O=>{var $=MT();x(O,$)};ce(y,O=>{f(n).preview||O(k)});var S=K(y,2),E=M(S,!0);P(S),P(d),P(c);var A=K(c,2);Le(A,17,()=>f(n).displayCart.items,O=>O.uuid,(O,$)=>{var z=FT();hm(M(z),{get displayItem(){return f($)},get displayCart(){return f(n).displayCart},get preview(){return f(n).preview}}),P(z),x(O,z)}),P(l),ae((O,$,z,B)=>{ie(p,O),ie(g,$),ie(v,z),ie(E,B)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),x(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&a(o)}),x(e,i),re()}customElements.define("go-cart-items",ne(RT,{},[],[]));var LT=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),zT=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),qT=j('<ol data-testid="cart-coupons"></ol>');function UT(e,t){te(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=qT();Le(l,21,()=>f(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=zT();let p;var h=M(u),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=S=>{var E=LT(),A=M(E);P(E),ae(O=>me(A,"aria-label",O),[()=>C.t("cart.coupons.remove")]),ft("click",A,()=>C.cart?.removeCoupon(f(d).code)),x(S,E)};ce(y,S=>{f(n).preview||S(k)}),P(g),P(h),P(u),ae(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!f(d).applied}),ie(v,f(d).code)}),x(c,u)}),P(l),x(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.coupons.length>0&&a(o)}),x(e,i),re()}ar(["click"]),customElements.define("go-cart-coupons",ne(UT,{},[],[]));var VT=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function BT(e,t){te(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=VT(),c=M(l,!0);P(l),ae(d=>ie(c,d),[()=>dr(f(n).totalPriceCents)]),x(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&a(o)}),x(e,i),re()}customElements.define("go-cart-total-amount",ne(BT,{},[],[]));function jT(e,t){te(t,!0);const r=_(t,"preview",7,!1),n=new Mx;Fx(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)),Re(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let o=!0;for(const a of s){const l=await a.flush?.();l&&!l.success&&(o=!1)}return o}return t.$$host.addEventListener("click",async s=>{const o=s.target.closest("go-submit");if(!o)return;const a=o.closest("go-form");if(a&&t.$$host.contains(a))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(jT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var ZT=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function WT(e,t){te(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=ZT(),c=M(l,!0);P(l),ae(d=>ie(c,d),[()=>dr(f(n).subtotalPriceCents)]),x(a,l)};ce(s,a=>{f(n)&&C.cart?.items.length&&a(o)}),x(e,i),re()}customElements.define("go-cart-subtotal-amount",ne(WT,{},[],[]));var HT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function GT(e,t){te(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=HT(),c=K(M(l),1,!0);P(l),ae(d=>ie(c,d),[()=>dr(f(n).discountedAmountCents)]),x(a,l)};ce(s,a=>{f(n)&&f(n).discountedAmountCents>0&&a(o)}),x(e,i),re()}customElements.define("go-cart-discounted-amount",ne(GT,{},[],[]));function KT(e,t){te(t,!0),Fn(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(KT,{},[],[]));function YT(e,t){te(t,!0);let r=D(()=>C.cart?.items.length);At();var n=qt();ae(()=>ie(n,f(r))),x(e,n),re()}customElements.define("go-cart-counter",ne(YT,{},[],[]));function JT(e,t){te(t,!0);let r=_(t,"custom",7,!1),n=D(()=>C.cart);return fr.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}]}),Fn(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!f(n))return;const o=await C.signUp(s.details.formData,!0);if(o.error){s.details.apiErrors=o.error.errors;return}const a=s.details.fieldValue("paymentMode");f(n).paymentModeId=a==null?void 0:String(a);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)}),re({get custom(){return r()},set custom(i=!1){r(i),b()}})}customElements.define("go-checkout-form",ne(JT,{custom:{}},[],[]));var QT="TokenActions::ApplyOrderDiscount";async function XT(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===QT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?tA(e,r):r.value_cents&&r.value_cents>0?eA(e,r.value_cents):Wu([C.t("cart.coupon.form.errors.notValid")]):Wu([C.t("cart.coupon.form.errors.notValid")])}function eA(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function tA(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 Wu([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(pt(la(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Wu(e){return{success:!1,errors:e}}var rA=j("<go-form></go-form>",2);function nA(e,t){te(t,!0),fr.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(u=>u.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const d=await XT(c);return d.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),d):(a.details.apiErrors=d.errors,d)}async function n(a){await r(a.target)}async function i(){const a=t.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=rA();return Yn(o,"formId","couponRedemption"),No("submit",o,n),x(e,o),re(s)}customElements.define("go-coupon-redemption",ne(nA,{},[],["flush"])),pb();var iA=class{#e=X();get campaign(){return f(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=X();get amount(){return f(this.#t)}set amount(e){I(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")||"[]");sn(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 iA,sA=j('<img alt="logo"/>'),oA=j('<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 pm(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=oA();let o;var a=M(s),l=M(a),c=m=>{var v=sA();ae(y=>me(v,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),x(m,v)};ce(l,m=>{r().picture.thumbnail&&m(c)}),P(a);var d=K(a,2),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);return P(h),P(d),P(s),ae(()=>{o=St(s,1,"go-donation-campaign",null,o,{selected:Pt.campaign?.id===r()?.id}),ie(p,f(n)["donations.headline"]),ie(g,f(n)["donations.shop.info"])}),ft("click",s,()=>Pt.selectCampaign(r())),ft("keydown",s,m=>{m.key==="Enter"&&Pt.selectCampaign(r())}),x(e,s),re(i)}ar(["click","keydown"]),ne(pm,{campaign:{}},[],[],{mode:"open"});function aA(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 an(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 lA=j("<button> </button>"),uA=j('<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>'),cA=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function mm(e,t){te(t,!0);const r=Pt.campaign?.guest_limit/100;let n=X(void 0);function i(p){Pt.amount=p,I(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 o=cA(),a=M(o),l=M(a,!0);P(a);var c=K(a,2);Le(c,20,()=>Pt.campaign?.options,p=>p,(p,h)=>{var g=lA();let m;var v=M(g,!0);P(g),ae(y=>{m=St(g,1,"btn btn-default",null,m,{selected:Pt.amount===h}),ie(v,y)},[()=>aA(h/100,C.currency)]),ft("click",g,()=>i(h)),x(p,g)}),P(c);var d=K(c,2),u=p=>{var h=uA(),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2);Ps(y),P(g),P(h),ae((k,S)=>{ie(v,k),me(y,"max",r),me(y,"placeholder",S),Ul(y,f(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),ft("input",y,s),x(p,h)};ce(d,p=>{Pt.campaign?.free_donations&&p(u)}),P(o),ae(p=>ie(l,p),[()=>C.t("donations.selection.title")]),x(e,o),re()}ar(["click","input"]),ne(mm,{},[],[],{mode:"open"});var dA=j('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function fA(e,t){te(t,!1),nn(()=>{C.donations?.campaigns?.length==1&&Pt.selectCampaign(C.donations?.campaigns[0])}),Jl();var r=Y(),n=q(r),i=s=>{var o=dA(),a=M(o);Le(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{pm(m,{get campaign(){return f(v)}})});var l=K(a,2),c=m=>{mm(m,{})};ce(l,m=>{Pt.campaign&&m(c)});var d=K(l,2),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);P(h),P(d),P(o),ae((m,v)=>{ie(p,m),h.disabled=!Pt.amount,ie(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),ft("click",u,function(...m){Pt.skipDonation?.apply(this,m)}),ft("click",h,function(...m){Pt.addDonationToCart?.apply(this,m)}),x(s,o)};ce(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),x(e,r),re()}ar(["click"]),customElements.define("go-donations",ne(fA,{},[],[]));function hA(e){return typeof e=="function"}function Gs(e){return e!==null&&typeof e=="object"}var pA=["string","number","bigint","boolean"];function Hu(e){return e==null||pA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Hu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var ga=Symbol("box"),vm=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[ga]:!0,[vm]:!0,get current(){return f(r)},set current(n){t(n)}}:{[ga]:!0,get current(){return e()}}}function gm(e){return Gs(e)&&ga in e}function mA(e){return gm(e)?e:hA(e)?L(e):Er(e)}function Er(e){let t=X(Me(e));return{[ga]:!0,[vm]:!0,get current(){return f(t)},set current(r){I(t,r,!0)}}}function ym(...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 bm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vA=/\n/g,gA=/^\s*/,yA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bA=/^:\s*/,_A=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,wA=/^[;\s]*/,kA=/^\s+|\s+$/g,SA=`
78
- `,_m="/",wm="*",ii="",EA="comment",xA="declaration";function TA(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(vA);m&&(r+=m.length);var v=g.lastIndexOf(SA);n=~v?g.length-v:n+g.length}function s(){var g={line:r,column:n};return function(m){return m.position=new o(g),c(),m}}function o(g){this.start=g,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(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(gA)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(_m!=e.charAt(0)||wm!=e.charAt(1))){for(var m=2;ii!=e.charAt(m)&&(wm!=e.charAt(m)||_m!=e.charAt(m+1));)++m;if(m+=2,ii===e.charAt(m-1))return a("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,g({type:EA,comment:v})}}function p(){var g=s(),m=l(yA);if(m){if(u(),!l(bA))return a("property missing ':'");var v=l(_A),y=g({type:xA,property:km(m[0].replace(bm,ii)),value:v?km(v[0].replace(bm,ii)):ii});return l(wA),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 km(e){return e?e.replace(kA,ii):ii}function AA(e,t){let r=null;if(!e||typeof e!="string")return r;const n=TA(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(r=r||{},r[o]=a)}),r}var CA=/\d/,OA=["-","_","/","."];function DA(e=""){if(!CA.test(e))return e!==e.toLowerCase()}function IA(e){const t=[];let r="",n,i;for(const s of e){const o=OA.includes(s);if(o===!0){t.push(r),r="",n=void 0;continue}const a=DA(s);if(i===!1){if(n===!1&&a===!0){t.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return t.push(r),t}function Sm(e){return e?IA(e).map(t=>$A(t)).join(""):""}function PA(e){return MA(Sm(e||""))}function $A(e){return e?e[0].toUpperCase()+e.slice(1):""}function MA(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ks(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Sm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[PA(n)]=i}return AA(e,r),t}function Ys(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function FA(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 NA=FA(/[A-Z]/,e=>`-${e.toLowerCase()}`);function RA(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=>`${NA(t)}: ${e[t]};`).join(`
79
- `)}function Js(e={}){return RA(e).replace(`
80
- `," ")}var LA=["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"],zA=new Set(LA);function qA(e){return zA.has(e)}function He(...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],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&qA(i))t[i]=ym(s,o);else if(a&&l)t[i]=Ys(s,o);else if(i==="class"){const c=Hu(s),d=Hu(o);c&&d?t[i]=Lo(s,o):c?t[i]=Lo(s):d&&(t[i]=Lo(o))}else if(i==="style"){const c=typeof s=="object",d=typeof o=="object",u=typeof s=="string",p=typeof o=="string";if(c&&d)t[i]={...s,...o};else if(c&&p){const h=Ks(o);t[i]={...s,...h}}else if(u&&d)t[i]={...Ks(s),...o};else if(u&&p){const h=Ks(s),g=Ks(o);t[i]={...h,...g}}else c?t[i]=s:d?t[i]=o:u?t[i]=s:p&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],o=n[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=Js(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 Em={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%)"},UA=Js(Em),xm=typeof window<"u"?window:void 0,CF=typeof window<"u"?window.document:void 0,OF=typeof window<"u"?window.navigator:void 0,DF=typeof window<"u"?window.location:void 0;function VA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var BA=class extends Map{#e=new Map;#t=X(0);#r=X(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?X(e):Sn(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),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Lr(o);else if(i!==t){Lr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Lr(o)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),I(r,-1)),n&&(I(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var t of e.values())I(t,-1);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}},jA=class{#e;#t;constructor(e={}){const{window:t=xm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=wl(n=>{const i=vt(t,"focusin",n),s=vt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?VA(this.#e):null}},IF=new jA;function ZA(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 _b(this.#t)}get(){const e=Cd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Cd(this.#t);return t===void 0?e:t}set(e){return bb(this.#t,e)}};function WA(e,t){switch(e){case"post":ge(t);break;case"pre":Ol(t);break}}function Gu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;WA(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Re(()=>r(a,o));return o=a,l})}function Tm(e,t,r){const n=ks(()=>{let i=!1;Gu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});ge(()=>n)}function rt(e,t,r){Gu(e,"post",t,r)}function HA(e,t,r){Gu(e,"pre",t,r)}rt.pre=HA;function GA(e,t){Tm(e,"post",t)}function KA(e,t){Tm(e,"pre",t)}GA.pre=KA;function Am(e){return ZA(e)?e():e}var YA=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(f(this.#o)?.(),this.getSize().width));#a=D(()=>(f(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Am(this.#n);if(e)return wl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((a,l)=>Math.max(a,l.inlineSize),0),this.#e.height=o.reduce((a,l)=>Math.max(a,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??xm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Am(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return f(this.#o)?.(),this.getSize()}get width(){return f(this.#s)}get height(){return f(this.#a)}};function JA(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const o=await e(...i);n&&(n(o),n=null)},t)})}function QA(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 Cm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=X(Me(o)),d=X(!1),u=X(void 0),p=X(Me([]));const h=()=>{f(p).forEach(S=>S()),I(p,[],!0)},g=S=>{I(p,[...f(p),S],!0)},m=async(S,E,A=!1)=>{try{I(d,!0),I(u,void 0),h();const O=new AbortController;g(()=>O.abort());const $=await t(S,E,{data:f(c),refetching:A,onCleanup:g,signal:O.signal});return I(c,$,!0),$}catch(O){O instanceof DOMException&&O.name==="AbortError"||I(u,O,!0);return}finally{I(d,!1)}},v=a?JA(m,a):l?QA(m,l):m,y=Array.isArray(e)?e:[e];let k;return n((S,E)=>{s&&k||(k=S,v(Array.isArray(e)?S:S[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return f(c)},get loading(){return f(d)},get error(){return f(u)},mutate:S=>{I(c,S,!0)},refetch:S=>{const E=y.map(A=>A());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],S??!0)}}}function XA(e,t,r){return Cm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];rt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function eC(e,t,r){return Cm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());rt.pre(o,(a,l)=>{n(a,l??[])},i)})}XA.pre=eC;function si(e){ge(()=>()=>{e()})}function tC(e,t){return setTimeout(t,e)}function Qs(e){pf().then(e)}var rC=1,nC=9,iC=11;function Ku(e){return Gs(e)&&e.nodeType===rC&&typeof e.nodeName=="string"}function Om(e){return Gs(e)&&e.nodeType===nC}function sC(e){return Gs(e)&&e.constructor?.name==="VisualViewport"}function oC(e){return Gs(e)&&e.nodeType!==void 0}function Dm(e){return oC(e)&&e.nodeType===iC&&"host"in e}function aC(e,t){if(!e||!t||!Ku(e)||!Ku(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Dm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ya(e){return Om(e)?e:sC(e)?e.document:e?.ownerDocument??document}function Im(e){return Dm(e)?Im(e.host):Om(e)?e.defaultView??window:Ku(e)?e.ownerDocument?.defaultView??window:window}function lC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var ji=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return f(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=L(e):this.element=e}getDocument=()=>ya(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>lC(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 Xe(e,t){return{[v_()]:r=>gm(e)?(e.current=r,Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Yu(e){return e?"true":void 0}function Ue(e){return e?"":void 0}function Pm(e){return e?"open":"closed"}function uC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var cC=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 ba(e){const t=new cC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Ju="ArrowDown",$m="ArrowLeft",Mm="ArrowRight",Qu="ArrowUp",dC="Backspace",fC="Enter",PF="Escape",$F=" ",MF="Tab",FF="a",NF="P",RF="A",LF="p",ln=typeof document<"u",Fm=hC();function hC(){return ln&&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 oi(e){return e instanceof Element}function pC(e){return e instanceof Element||e instanceof SVGElement}function _a(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Nn(e){return e===null}function wa(e){return e.pointerType==="touch"}function mC(e){return e!==null}var vC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,si(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Qs(t):t()}},Nm=class{#e;#t;#r;#n=X(!1);#i=X(void 0);#s=!1;#a=null;constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new vC({ref:this.#e.ref,afterTick:this.#e.open}),si(()=>this.#o()),rt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return f(this.#n)}get transitionStatus(){return f(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ie(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var gC=new $t("BitsConfig");function yC(){const e=new bC(null,{});return gC.getOr(e).opts}var bC=class{opts;constructor(e,t){const r=_C(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function _C(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 Rm(e,t){return r=>{const n=yC();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Lm=Rm(e=>e.defaultLocale,"en"),zF=Rm(e=>e.defaultPortalTo,"body"),wC=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 vt(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 qm(e,t){return e===t||e.contains(t)}function Um(e){return e?.ownerDocument??document}function kC(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 Vm=["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] *)"],ka=Vm.join(","),Bm=typeof Element>"u",ai=Bm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Sa=!Bm&&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},Ea=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]"):Ea(t.parentNode))},SC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},jm=function(t,r,n){if(Ea(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ka));return r&&ai.call(t,ka)&&i.unshift(t),i=i.filter(n),i},xa=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!Ea(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=xa(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{ai.call(o,ka)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!Ea(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=xa(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},Zm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||SC(t))&&!Zm(t)?0:t.tabIndex},EC=function(t,r){var n=Wm(t);return n<0&&r&&!Zm(t)?0:n},xC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Hm=function(t){return t.tagName==="INPUT"},TC=function(t){return Hm(t)&&t.type==="hidden"},AC=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},CC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},OC=function(t){if(!t.name)return!0;var r=t.form||Sa(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=CC(i,t.form);return!s||s===t},DC=function(t){return Hm(t)&&t.type==="radio"},IC=function(t){return DC(t)&&!OC(t)},PC=function(t){var r,n=t&&Sa(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=Sa(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},Gm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},$C=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=ai.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ai.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=Sa(t);if(a&&!a.shadowRoot&&i(a)===!0)return Gm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(PC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Gm(t);return!1},MC=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 ai.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Ta=function(t,r){return!(r.disabled||TC(r)||$C(r,t)||AC(r)||MC(r))},Xu=function(t,r){return!(IC(r)||Wm(r)<0||!Ta(t,r))},FC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Km=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=EC(a,o),c=o?Km(i.candidates):a;l===0?o?r.push.apply(r,c):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:c})}),n.sort(xC).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},NC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xa([t],r.includeContainer,{filter:Xu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:FC}):n=jm(t,r.includeContainer,Xu.bind(null,r)),Km(n)},RC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xa([t],r.includeContainer,{filter:Ta.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=jm(t,r.includeContainer,Ta.bind(null,r)),n},LC=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,ka)===!1?!1:Xu(r,t)},zC=Vm.concat("iframe:not([inert]):not([inert] *)").join(","),qC=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,zC)===!1?!1:Ta(r,t)};function UC(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 ec(e,t){return e>=0&&e<t.length}var VC="data-context-menu-trigger",BC="data-context-menu-content",qF=new $t("Menu.Root"),UF=new $t("Menu.Root | Menu.Sub"),VF=new $t("Menu.Content"),BF=new $t("Menu.Group | Menu.RadioGroup"),jF=new $t("Menu.RadioGroup"),ZF=new $t("Menu.CheckboxGroup"),WF=new wC("bitsmenuopen",{bubbles:!1,cancelable:!0}),HF=ba({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 jC=class ly{static create(t){return new ly(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,ge(()=>{this.#s=Um(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};rt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return tC(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),si(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return Ys(vt(this.#s,"pointerdown",Ys(this.#h,this.#f),{capture:!0}),vt(this.#s,"pointerdown",Ys(this.#p,this.#d)),vt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=Ym(t)),this.#e.current(t)};#d=zm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||HC(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=Ym(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=vt(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=WC(this.opts.ref.current))};#m=t=>this.opts.ref.current?qm(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 ZC(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function WC(e){const t=[...globalThis.bitsDismissableLayers],r=ZC(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function HC(e,t){const r=e.target;if(!pC(r))return!1;const n=!!r.closest(`[${VC}]`),i=!!t.closest(`[${BC}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Um(r).documentElement.contains(r)&&!qm(t,r)&&kC(e,t)}function Ym(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?t:o==="target"?r:o==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?i:o in s?s[o]:e[o]})}function Jm(e,t){te(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,Se),i=_(t,"onFocusOutside",7,Se),s=_(t,"id",7),o=_(t,"children",7),a=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const d=jC.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>a()),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=Se){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return o()},set children(g){o(g),b()},get enabled(){return a()},set enabled(g){a(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=Y(),h=q(p);return we(h,()=>o()??Ne,()=>({props:d.props})),x(e,p),re(u)}ne(Jm,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var GC=class uy{static create(t){return new uy(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ji(this.opts.ref);let r=Se;rt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>vt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!KC(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 KC(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 Qm(e,t){te(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,Se),i=_(t,"children",7),s=_(t,"enabled",7),o=_(t,"ref",7);GC.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){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 o()},set ref(d){o(d),b()}},l=Y(),c=q(l);return we(c,()=>i()??Ne),x(e,l),re(a)}ne(Qm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var YC=class cy{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new cy),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)}},JC=class dy{#e=!1;#t=null;#r=YC.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&qC(l))o.preventDefault(),l.focus();else{const c=this.#c(),d=this.#d()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)return;const l=a[0],c=a[a.length-1];!o.shiftKey&&r.activeElement===c?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),c.focus())};this.#n.push(vt(r,"focusin",n,{capture:!0}),vt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#c(),l=this.#d()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?NC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?RC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return rt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new dy(t)),r.mount(n)):r&&(r.unmount(),r=null)}),si(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Xm(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,Se),o=_(t,"onOpenAutoFocus",7,Se),a=_(t,"focusScope",7),l=_(t,"ref",7);const c=JC.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>o()),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=Se){s(h),b()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(h=Se){o(h),b()},get focusScope(){return a()},set focusScope(h){a(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=Y(),p=q(u);return we(p,()=>a()??Ne,()=>({props:c.props})),x(e,u),re(d)}ne(Xm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var ev=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var QC=class fy{static create(t){return new fy(t)}opts;domContext;#e=Se;#t=!1;#r=ev;#n=ev;constructor(t){this.opts=t,this.domContext=new ji(t.ref);let r=Se;rt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ys(vt(this.domContext.getDocument(),"pointerdown",this.#a),vt(this.domContext.getDocument(),"pointerup",ym(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!eO(this)||!aC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=XC(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},tv=e=>e.style.userSelect||e.style.webkitUserSelect;function XC(e,t){const r=tv(t),n=tv(e);return Aa(t,"none"),Aa(e,"text"),()=>{Aa(t,r),Aa(e,n)}}function Aa(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function eO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function rv(e,t){te(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,Se),i=_(t,"onPointerUp",7,Se),s=_(t,"id",7),o=_(t,"children",7),a=_(t,"enabled",7),l=_(t,"ref",7);QC.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=Se){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=Se){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return o()},set children(p){o(p),b()},get enabled(){return a()},set enabled(p){a(p),b()},get ref(){return l()},set ref(p){l(p),b()}},d=Y(),u=q(d);return we(u,()=>o()??Ne),x(e,d),re(c)}ne(rv,{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 tO=class{#e;#t=0;#r=X();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),I(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,f(this.#r)===void 0&&(this.#n=ks(()=>{I(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),f(this.#r)}},Ca=new BA,Oa=X(null),tc=null,Xs=null,eo=!1,nv=L(()=>{for(const e of Ca.values())if(e)return!0;return!1}),rc=null,rO=new tO(()=>{function e(){document.body.setAttribute("style",f(Oa)??""),document.body.style.removeProperty("--scrollbar-width"),Fm&&tc?.(),I(Oa,null)}function t(){Xs!==null&&(window.clearTimeout(Xs),Xs=null)}function r(i,s){t(),eo=!0,rc=Date.now();const o=rc,a=()=>{Xs=null,rc===o&&(iv(Ca)?eo=!1:(eo=!1,s()))},l=i===null?24:i;Xs=window.setTimeout(a,l)}function n(){f(Oa)===null&&Ca.size===0&&!eo&&I(Oa,document.body.getAttribute("style"),!0)}return rt(()=>nv.current,()=>{if(!nv.current)return;n(),eo=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",Fm&&(tc=vt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),si(()=>()=>{tc?.()}),{get lockMap(){return Ca},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),nO=class{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=rO.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)),si(()=>{if(this.#n.lockMap.delete(this.#e),iv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function iv(e){for(const[t,r]of e)if(r)return!0;return!1}function nc(e,t){te(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new nO(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(nc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function iO(e){if(!ln||!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=UA,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 Da(e){const t=iO(e);function r(n,i="assertive",s=7500){if(!t||!ln||!e)return;const o=t.getLog(i),a=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}var sO={defaultValue:void 0,granularity:"day"};function sv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...sO,...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 o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new $i(o,a,l,0,0,0):new Us(o,a,l)}}function ov(e,t){let r;return t instanceof In?r=cp(e):t instanceof $i?r=up(e):r=oa(e),r.calendar!==t.calendar?Yt(r,t.calendar):r}function Bt(e,t=Vt()){return e instanceof In?e.toDate():e.toDate(t)}function oO(e){if(e instanceof Us)return"date";if(e instanceof $i)return"datetime";if(e instanceof In)return"zoneddatetime";throw new Error("Unknown date type")}function aO(e,t){switch(t){case"date":return oa(e);case"datetime":return up(e);case"zoneddatetime":return cp(e);default:throw new Error(`Unknown date type: ${t}`)}}function lO(e){return e instanceof $i}function ic(e){return e instanceof In}function Ia(e){return lO(e)||ic(e)}function to(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 li(e,t){return e.compare(t)<0}function uO(e,t){return e.compare(t)>0}function av(e,t,r){const n=Zh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function lv(e,t,r){const n=Zh(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 Pa=["day","month","year"],$a=["hour","minute","second","dayPeriod"],uv=["literal","timeZoneName"],ro=[...Pa,...$a],cv=[...ro,...uv],cO=[...$a,...uv],GF=cv.filter(e=>e!=="literal"),KF=cO.filter(e=>e!=="literal"),dO=["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"],fO=["year","month","day"],sc={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 hO(e){if(dv(e))return sc[e];{const t=gO(e);return dv(t)?sc[t]:sc.en}}function oc(e,t,r){return pO(e)?hO(r)[e]:vO(e)?t:mO(e)?"––":""}function dv(e){return dO.includes(e)}function pO(e){return fO.includes(e)}function mO(e){return e==="hour"||e==="minute"||e==="second"}function vO(e){return e==="era"||e==="dayPeriod"}function gO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function ac(e){const t=["hour","minute","second"],r=ro.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 yO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!hv(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Nn(c)?a[l]=oc(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in t){const l=t[a],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Nn(l)&&!Nn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&mv(n)===12;if(a==="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 a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return oc(a,"",n)}else{if(Ma(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return oc(a,"",n);{const d=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function bO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,wO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!hv(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Nn(a.part)||Nn(a.value)||a.part==="timeZoneName"&&(!ic(r)||s)))}function _O(e){const t=yO(e);return{obj:t,arr:bO({contentObj:t,...e})}}function wO(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 fv(){return ro.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Ma(e){return Pa.includes(e)}function hv(e){return ro.includes(e)}function kO(e){return cv.includes(e)}function pv(e){return!ln||!e?[]:Fa(e).map(t=>t.dataset.segment).filter(t=>ro.includes(t))}function SO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=pv(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if(Nn(a))continue;s=s.set({[o]:t[o]})}else if(Ma(o)){const a=t[o];if(Nn(a))continue;s=s.set({[o]:t[o]})}return s}function EO(e,t){const r=pv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Ma(n)&&e[n]===null)return!1;return!0}function xO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>($a.includes(t)||Pa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function TO(e,t){return t||(Ia(e)?"minute":"day")}function lc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||_a(e))}function AO(e,t){if(!ln)return!1;const r=Fa(t);return r.length?r[0].id===e:!1}function CO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!ln)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Js({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function OO(e,t){if(!ln)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function mv(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 no(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=uc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function DO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function IO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function uc(e,t){const r=Fa(t);return r.length?{next:DO(e,r),prev:IO(e,r)}:{next:null,prev:null}}function vv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=uc(r,t);n&&n.focus()}function gv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=uc(r,t);n&&n.focus()}function io(e){return e==="ArrowRight"||e==="ArrowLeft"}function Fa(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:!(!kO(r)||r==="literal")}):[]}function PO(e){return Fa(e)[0]}var $O={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function yv(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 Ia(h)&&g?i(Bt(h),{dateStyle:"long",timeStyle:"long"}):i(Bt(h),{dateStyle:"long"})}function o(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 a(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 ic(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,{...$O,...m}).find(y=>y.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function MO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function bv(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 cc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=to(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=yu(t),l=q1(t),c=r!==void 0?av(a,r,"en-US"):av(a,0,i),d=r!==void 0?lv(l,r,"en-US"):lv(l,0,i),u=bv(c.subtract({days:1}),a),p=bv(l,d.add({days:1})),h=u.length+o.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},(S,E)=>{const A=E+1;return v.add({days:A})});p.push(...k)}const g=u.concat(o,p);return{value:t,dates:g,weeks:UC(g,7)}}function so(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(cc({...n,dateObj:r})),i;i.push(cc({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(cc({...n,dateObj:o}))}return i}function dc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function _v(e,t){const r=e.getAttribute("data-value");r&&(t.current=ov(r,t.current))}function FO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=dc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(ec(c,l)){const d=l[c];return _v(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Qs(()=>{const u=dc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(ec(p,u)){const h=u[p];return _v(h,r),h.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Qs(()=>{const u=dc(n);if(!u.length)return;const p=c-l.length;if(ec(p,u))return u[p].focus()})}}var wv=[Ju,Qu,$m,Mm],kv=[fC," "];function NO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!MO(i)||!wv.includes(e.key)&&!kv.includes(e.key))return;e.preventDefault();const s={[Ju]:7,[Qu]:-7,[$m]:-1,[Mm]:1};if(wv.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(kv.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,ov(o,n))}}function RO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=so({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function LO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=so({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function zO({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 qO(e){ge(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(so({...o,dateObj:s}))})})}function UO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=ya(e),i=n.createElement("div");i.style.cssText=Js({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function VO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){ge(()=>{e.current,Re(()=>{t().some(a=>vu(a,e.current))||o(so({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function BO({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?uO(n.add({months:1}).set({day:1}),e):!1}function jO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?li(n.subtract({months:1}).set({day:35}),e):!1}function ZO({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),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function WO({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 HO(e){const t=ya(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function GO(e){if(!ln)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 aO(n,i)}function KO({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&li(a,n.current)||i.current&&li(i.current,a))}rt(()=>e.current,()=>{e.current&&t.current&&Cn(t.current,r)&&o(r)&&(t.current=GO(e.current)??r)})}function YO(e,t){return!e||!t?e:Ia(e)&&Ia(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var JO=ba({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 QO(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const o=r-100;n=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}var Ar=new $t("Calendar.Root | RangeCalender.Root"),Sv=class hy{static create(t){return Ar.set(new hy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return f(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=X(Me([]));get months(){return f(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Xe(this.opts.ref),this.domContext=new ji(t.ref),this.announcer=Da(null),this.formatter=yv({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=Da(this.domContext.getDocument())}),this.months=so({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),VO({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}),qO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),rt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),rt(()=>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)}),KO({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(()=>zO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return f(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return f(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>QO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return f(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){ge(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){ge(()=>{if(this.opts.ref.current)return UO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Ol(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){RO({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(){LO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder: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(()=>BO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return f(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>jO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return f(this.#u)}set isPrevButtonDisabled(t){I(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){I(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,ZO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return f(this.#d)}set headingValue(t){I(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return f(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>vu(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&&li(t,r)||n&&li(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>Cn(n,t)):r?Cn(r,t):!1}shiftFocus(t,r){return FO({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=YO(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=>Cn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(o=>!Cn(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&Cn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){NO({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){I(this.#f,t)}getBitsAttr=t=>JO.getAttr(t);#m=D(()=>({...WO({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){I(this.#m,t)}},XO=class py{static create(t){return new py(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Yu(!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){I(this.#e,t)}},Ev=new $t("Calendar.Cell | RangeCalendar.Cell"),eD=class my{static create(t){return Ev.set(new my(t,Ar.get()))}opts;root;#e=D(()=>Bt(this.opts.date.current));get cellDate(){return f(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return f(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>N1(this.opts.date.current,Vt()));get isDateToday(){return f(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return f(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return f(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return f(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>Cn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return f(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return f(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return f(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(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){I(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":oO(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){I(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){I(this.#h,t)}},tD=class vy{static create(t){return new vy(t,Ev.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(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){I(this.#r,t)}},rD=class gy{static create(t){return new gy(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(this.#t,t)}},nD=class yy{static create(t){return new yy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(this.#t,t)}},iD=class by{static create(t){return new by(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},sD=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=Xe(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){I(this.#e,t)}},oD=class wy{static create(t){return new wy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},aD=class ky{static create(t){return new ky(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},lD=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=Xe(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){I(this.#e,t)}},uD=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=Xe(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){I(this.#e,t)}},cD=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"]),dD=j("<div><!></div>");function xv(e,t){te(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Rn),s=_(t,"ref",15,null),o=_(t,"value",15),a=_(t,"onValueChange",7,Se),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,Se),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"),S=_(t,"disabled",7,!1),E=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),$=_(t,"preventDeselect",7,!1),z=_(t,"type",7),B=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),V=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),se=_(t,"yearFormat",7,"numeric"),pe=Ze(t,cD);const Q=sv({defaultValue:o(),minValue:A(),maxValue:O()});function oe(){l()===void 0&&l(Q)}oe(),rt.pre(()=>l(),()=>{oe()});function J(){o()===void 0&&o(z()==="single"?void 0:[])}J(),rt.pre(()=>o(),()=>{J()});const de=Sv.create({id:L(()=>i()),ref:L(()=>s(),R=>s(R)),weekdayFormat:L(()=>d()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>h()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:Lm(()=>y()),calendarLabel:L(()=>k()),readonly:L(()=>E()),disabled:L(()=>S()),minValue:L(()=>A()),maxValue:L(()=>O()),disableDaysOutsideMonth:L(()=>B()),initialFocus:L(()=>N()),maxDays:L(()=>V()),placeholder:L(()=>l(),R=>{l(R),c()(R)}),preventDeselect:L(()=>$()),value:L(()=>o(),R=>{o(R),a()(R)}),type:L(()=>z()),monthFormat:L(()=>U()),yearFormat:L(()=>se()),defaultPlaceholder:Q}),le=D(()=>He(pe,de.props));var W={get child(){return r()},set child(R){r(R),b()},get children(){return n()},set children(R){n(R),b()},get id(){return i()},set id(R=Rn()){i(R),b()},get ref(){return s()},set ref(R=null){s(R),b()},get value(){return o()},set value(R){o(R),b()},get onValueChange(){return a()},set onValueChange(R=Se){a(R),b()},get placeholder(){return l()},set placeholder(R){l(R),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(R=Se){c(R),b()},get weekdayFormat(){return d()},set weekdayFormat(R="narrow"){d(R),b()},get weekStartsOn(){return u()},set weekStartsOn(R){u(R),b()},get pagedNavigation(){return p()},set pagedNavigation(R=!1){p(R),b()},get isDateDisabled(){return h()},set isDateDisabled(R=()=>!1){h(R),b()},get isDateUnavailable(){return g()},set isDateUnavailable(R=()=>!1){g(R),b()},get fixedWeeks(){return m()},set fixedWeeks(R=!1){m(R),b()},get numberOfMonths(){return v()},set numberOfMonths(R=1){v(R),b()},get locale(){return y()},set locale(R){y(R),b()},get calendarLabel(){return k()},set calendarLabel(R="Event"){k(R),b()},get disabled(){return S()},set disabled(R=!1){S(R),b()},get readonly(){return E()},set readonly(R=!1){E(R),b()},get minValue(){return A()},set minValue(R=void 0){A(R),b()},get maxValue(){return O()},set maxValue(R=void 0){O(R),b()},get preventDeselect(){return $()},set preventDeselect(R=!1){$(R),b()},get type(){return z()},set type(R){z(R),b()},get disableDaysOutsideMonth(){return B()},set disableDaysOutsideMonth(R=!0){B(R),b()},get initialFocus(){return N()},set initialFocus(R=!1){N(R),b()},get maxDays(){return V()},set maxDays(R){V(R),b()},get monthFormat(){return U()},set monthFormat(R="long"){U(R),b()},get yearFormat(){return se()},set yearFormat(R="numeric"){se(R),b()}},ee=Y(),ue=q(ee),F=R=>{var ve=Y(),fe=q(ve);{let w=D(()=>({props:f(le),...de.snippetProps}));we(fe,r,()=>f(w))}x(R,ve)},H=R=>{var ve=dD();ze(ve,()=>({...f(le)}));var fe=M(ve);we(fe,()=>n()??Ne,()=>de.snippetProps),P(ve),x(R,ve)};return ce(ue,R=>{r()?R(F):R(H,-1)}),x(e,ee),re(W)}ne(xv,{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 fD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),hD=j("<div><!></div>");function fc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,fD);const l=tD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);{let k=D(()=>({props:f(c),...l.snippetProps}));we(y,i,()=>f(k))}x(m,v)},g=m=>{var v=hD();ze(v,()=>({...f(c)}));var y=M(v),k=E=>{var A=Y(),O=q(A);we(O,()=>n()??Ne,()=>l.snippetProps),x(E,A)},S=E=>{var A=qt();ae(()=>ie(A,l.cell.opts.date.current.day)),x(E,A)};ce(y,E=>{n()?E(k):E(S,-1)}),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var pD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),mD=j("<table><!></table>");function hc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,pD);const l=iD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=mD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var vD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),gD=j("<tbody><!></tbody>");function pc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,vD);const l=sD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=gD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(pc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var yD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),bD=j("<td><!></td>");function mc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=_(t,"date",7),l=_(t,"month",7),c=Ze(t,yD);const d=eD.create({id:L(()=>o()),ref:L(()=>s(),y=>s(y)),date:L(()=>a()),month:L(()=>l())}),u=D(()=>He(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 o()},set id(y=Ie(r)){o(y),b()},get date(){return a()},set date(y){a(y),b()},get month(){return l()},set month(y){l(y),b()}},h=Y(),g=q(h),m=y=>{var k=Y(),S=q(k);{let E=D(()=>({props:f(u),...d.snippetProps}));we(S,i,()=>f(E))}x(y,k)},v=y=>{var k=bD();ze(k,()=>({...f(u)}));var S=M(k);we(S,()=>n()??Ne,()=>d.snippetProps),P(k),x(y,k)};return ce(g,y=>{i()?y(m):y(v,-1)}),x(e,h),re(p)}ne(mc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var _D=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),wD=j("<thead><!></thead>");function vc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,_D);const l=oD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=wD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var kD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),SD=j("<th><!></th>");function gc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,kD);const l=lD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=SD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var ED=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),xD=j("<tr><!></tr>");function oo(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,ED);const l=aD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=xD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(oo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var TD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),AD=j("<header><!></header>");function yc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,TD);const l=uD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),x(m,v)},g=m=>{var v=AD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var CD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),OD=j("<div><!></div>");function bc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=Ze(t,CD);const l=XO.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>He(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c),headingValue:l.root.headingValue})),x(m,v)},g=m=>{var v=OD();ze(v,()=>({...f(c)}));var y=M(v),k=E=>{var A=Y(),O=q(A);we(O,()=>n()??Ne,()=>({headingValue:l.root.headingValue})),x(E,A)},S=E=>{var A=qt();ae(()=>ie(A,l.root.headingValue)),x(E,A)};ce(y,E=>{n()?E(k):E(S,-1)}),P(v),x(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),x(e,u),re(d)}ne(bc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var DD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),ID=j("<button><!></button>");function _c(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(t,"tabindex",7,0),l=Ze(t,DD);const c=rD.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));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 o()},set ref(v=null){o(v),b()},get tabindex(){return a()},set tabindex(v=0){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,i,()=>({props:f(d)})),x(v,y)},m=v=>{var y=ID();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne),P(y),x(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),x(e,p),re(u)}ne(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var PD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),$D=j("<button><!></button>");function wc(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(t,"tabindex",7,0),l=Ze(t,PD);const c=nD.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>He(l,c.props,{tabindex:a()}));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 o()},set ref(v=null){o(v),b()},get tabindex(){return a()},set tabindex(v=0){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,i,()=>({props:f(d)})),x(v,y)},m=v=>{var y=$D();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne),P(y),x(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),x(e,p),re(u)}ne(wc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var MD=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Tv=j("<input/>");function Av(e,t){te(t,!0);let r=_(t,"value",15),n=Ze(t,MD);const i=D(()=>He(n,{"aria-hidden":"true",tabindex:-1,style:{...Em,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),b()}},o=Y(),a=q(o),l=d=>{var u=Tv();ze(u,()=>({...f(i),value:r()}),void 0,void 0,void 0,void 0,!0),x(d,u)},c=d=>{var u=Tv();ze(u,()=>({...f(i)}),void 0,void 0,void 0,void 0,!0),Uo(u,r),x(d,u)};return ce(a,d=>{f(i).type==="checkbox"?d(l):d(c,-1)}),x(e,o),re(s)}ne(Av,{value:{}},[],[],{mode:"open"});var FD=["top","right","bottom","left"],Ln=Math.min,Jt=Math.max,Na=Math.round,Ra=Math.floor,Kr=e=>({x:e,y:e}),ND={left:"right",right:"left",bottom:"top",top:"bottom"};function kc(e,t,r){return Jt(e,Ln(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function Zi(e){return e.split("-")[1]}function Sc(e){return e==="x"?"y":"x"}function Ec(e){return e==="y"?"height":"width"}function Yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xc(e){return Sc(Yr(e))}function RD(e,t,r){r===void 0&&(r=!1);const n=Zi(e),i=xc(e),s=Ec(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=La(o)),[o,La(o)]}function LD(e){const t=La(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Cv=["left","right"],Ov=["right","left"],zD=["top","bottom"],qD=["bottom","top"];function UD(e,t,r){switch(e){case"top":case"bottom":return r?t?Ov:Cv:t?Cv:Ov;case"left":case"right":return t?zD:qD;default:return[]}}function VD(e,t,r,n){const i=Zi(e);let s=UD(cn(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Tc)))),s}function La(e){const t=cn(e);return ND[t]+e.slice(t.length)}function BD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dv(e){return typeof e!="number"?BD(e):{top:e,right:e,bottom:e,left:e}}function za(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 Iv(e,t,r){let{reference:n,floating:i}=e;const s=Yr(t),o=xc(t),a=Ec(o),l=cn(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/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(Zi(t)){case"start":h[o]-=p*(r&&c?-1:1);break;case"end":h[o]+=p*(r&&c?-1:1);break}return h}async function jD(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=un(t,e),g=Dv(h),m=a[p?u==="floating"?"reference":"floating":u],v=za(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=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},E=za(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:k,strategy:l}):y);return{top:(v.top-E.top+g.top)/S.y,bottom:(E.bottom-v.bottom+g.bottom)/S.y,left:(v.left-E.left+g.left)/S.x,right:(E.right-v.right+g.right)/S.x}}var ZD=50,WD=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:jD},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Iv(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:S,y:E,data:A,reset:O}=await k({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=S??d,u=E??u,g[y]={...g[y],...A},O&&h<ZD&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=Iv(c,p,l)),m=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:g}},HD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=un(e,t)||{};if(c==null)return{};const u=Dv(d),p={x:r,y:n},h=xc(i),g=Ec(h),m=await o.getDimensions(c),v=h==="y",y=v?"top":"left",k=v?"bottom":"right",S=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[h]-p[h]-s.floating[g],A=p[h]-s.reference[h],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=O?O[S]:0;(!$||!await(o.isElement==null?void 0:o.isElement(O)))&&($=a.floating[S]||s.floating[g]);const z=E/2-A/2,B=$/2-m[g]/2-1,N=Ln(u[y],B),V=Ln(u[k],B),U=N,se=$-m[g]-V,pe=$/2-m[g]/2+z,Q=kc(U,pe,se),oe=!l.arrow&&Zi(i)!=null&&pe!==Q&&s.reference[g]/2-(pe<U?N:V)-m[g]/2<0,J=oe?pe<U?pe-U:pe-se:0;return{[h]:p[h]+J,data:{[h]:Q,centerOffset:pe-Q-J,...oe&&{alignmentOffset:J}},reset:oe}}}),GD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=un(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=cn(i),k=Yr(a),S=cn(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(S||!m?[La(a)]:LD(a)),O=g!=="none";!p&&O&&A.push(...VD(a,m,g,E));const $=[a,...A],z=await l.detectOverflow(t,v),B=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&B.push(z[y]),u){const pe=RD(i,o,E);B.push(z[pe[0]],z[pe[1]])}if(N=[...N,{placement:i,overflows:B}],!B.every(pe=>pe<=0)){var V,U;const pe=(((V=s.flip)==null?void 0:V.index)||0)+1,Q=$[pe];if(Q&&(!(u==="alignment"&&k!==Yr(Q))||N.every(J=>Yr(J.placement)===k?J.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:Q}};let oe=(U=N.filter(J=>J.overflows[0]<=0).sort((J,de)=>J.overflows[1]-de.overflows[1])[0])==null?void 0:U.placement;if(!oe)switch(h){case"bestFit":{var se;const J=(se=N.filter(de=>{if(O){const le=Yr(de.placement);return le===k||le==="y"}return!0}).map(de=>[de.placement,de.overflows.filter(le=>le>0).reduce((le,W)=>le+W,0)]).sort((de,le)=>de[1]-le[1])[0])==null?void 0:se[0];J&&(oe=J);break}case"initialPlacement":oe=a;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};function Pv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $v(e){return FD.some(t=>e[t]>=0)}var KD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=un(e,t);switch(i){case"referenceHidden":{const o=Pv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$v(o)}}}case"escaped":{const o=Pv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:$v(o)}}}default:return{}}}}},Mv=new Set(["left","top"]);async function YD(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=cn(r),a=Zi(r),l=Yr(r)==="y",c=Mv.has(o)?-1:1,d=s&&l?-1:1,u=un(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 a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}var JD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await YD(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},QD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:k,y:S}=y;return{x:k,y:S}}},...c}=un(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),p=Yr(cn(i)),h=Sc(p);let g=d[h],m=d[p];if(o){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",S=g+u[y],E=g-u[k];g=kc(S,g,E)}if(a){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",S=m+u[y],E=m-u[k];m=kc(S,m,E)}const v=l.fn({...t,[h]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[p]:a}}}}}},XD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=un(e,t),d={x:r,y:n},u=Yr(i),p=Sc(u);let h=d[p],g=d[u];const m=un(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const S=p==="y"?"height":"width",E=s.reference[p]-s.floating[S]+v.mainAxis,A=s.reference[p]+s.reference[S]-v.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var y,k;const S=p==="y"?"width":"height",E=Mv.has(cn(i)),A=s.reference[u]-s.floating[S]+(E&&((y=o.offset)==null?void 0:y[u])||0)+(E?0:v.crossAxis),O=s.reference[u]+s.reference[S]+(E?0:((k=o.offset)==null?void 0:k[u])||0)-(E?v.crossAxis:0);g<A?g=A:g>O&&(g=O)}return{[p]:h,[u]:g}}}},eI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=un(e,t),d=await o.detectOverflow(t,c),u=cn(i),p=Zi(i),h=Yr(i)==="y",{width:g,height:m}=s.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,v=p==="end"?"top":"bottom");const k=m-d.top-d.bottom,S=g-d.left-d.right,E=Ln(m-d[v],k),A=Ln(g-d[y],S),O=!t.middlewareData.shift;let $=E,z=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=S),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=k),O&&!p){const N=Jt(d.left,0),V=Jt(d.right,0),U=Jt(d.top,0),se=Jt(d.bottom,0);h?z=g-2*(N!==0||V!==0?N+V:Jt(d.left,d.right)):$=m-2*(U!==0||se!==0?U+se:Jt(d.top,d.bottom))}await l({...t,availableWidth:z,availableHeight:$});const B=await o.getDimensions(a.floating);return g!==B.width||m!==B.height?{reset:{rects:!0}}:{}}}};function qa(){return typeof window<"u"}function Wi(e){return Fv(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(Fv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fv(e){return qa()?e instanceof Node||e instanceof Qt(e).Node:!1}function Cr(e){return qa()?e instanceof Element||e instanceof Qt(e).Element:!1}function dn(e){return qa()?e instanceof HTMLElement||e instanceof Qt(e).HTMLElement:!1}function Nv(e){return!qa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}function ao(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 tI(e){return/^(table|td|th)$/.test(Wi(e))}function Ua(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var rI=/transform|translate|scale|rotate|perspective|filter/,nI=/paint|layout|strict|content/,ui=e=>!!e&&e!=="none",Ac;function Cc(e){const t=Cr(e)?Or(e):e;return ui(t.transform)||ui(t.translate)||ui(t.scale)||ui(t.rotate)||ui(t.perspective)||!Oc()&&(ui(t.backdropFilter)||ui(t.filter))||rI.test(t.willChange||"")||nI.test(t.contain||"")}function iI(e){let t=zn(e);for(;dn(t)&&!Hi(t);){if(Cc(t))return t;if(Ua(t))return null;t=zn(t)}return null}function Oc(){return Ac==null&&(Ac=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ac}function Hi(e){return/^(html|body|#document)$/.test(Wi(e))}function Or(e){return Qt(e).getComputedStyle(e)}function Va(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Wi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nv(e)&&e.host||Jr(e);return Nv(t)?t.host:t}function Rv(e){const t=zn(e);return Hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&ao(t)?t:Rv(t)}function lo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Rv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Qt(i);if(s){const a=Dc(o);return t.concat(o,o.visualViewport||[],ao(i)?i:[],a&&r?lo(a):[])}else return t.concat(i,lo(i,[],r))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lv(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=dn(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=Na(r)!==s||Na(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Ic(e){return Cr(e)?e:e.contextElement}function Gi(e){const t=Ic(e);if(!dn(t))return Kr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Lv(t);let o=(s?Na(r.width):r.width)/n,a=(s?Na(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var sI=Kr(0);function zv(e){const t=Qt(e);return!Oc()||!t.visualViewport?sI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Qt(e)?!1:t}function ci(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Ic(e);let o=Kr(1);t&&(n?Cr(n)&&(o=Gi(n)):o=Gi(e));const a=oI(s,r,n)?zv(s):Kr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const p=Qt(s),h=n&&Cr(n)?Qt(n):n;let g=p,m=Dc(g);for(;m&&n&&h!==g;){const v=Gi(m),y=m.getBoundingClientRect(),k=Or(m),S=y.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,E=y.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=S,c+=E,g=Qt(m),m=Dc(g)}}return za({width:d,height:u,x:l,y:c})}function Ba(e,t){const r=Va(e).scrollLeft;return t?t.left+r:ci(Jr(e)).left+r}function qv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ba(e,r),y:r.top+t.scrollTop}}function aI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Jr(n),a=t?Ua(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Kr(1);const d=Kr(0),u=dn(n);if((u||!u&&!s)&&((Wi(n)!=="body"||ao(o))&&(l=Va(n)),u)){const h=ci(n);c=Gi(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=o&&!u&&!s?qv(o,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 lI(e){return Array.from(e.getClientRects())}function uI(e){const t=Jr(e),r=Va(e),n=e.ownerDocument.body,i=Jt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Jt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Ba(e);const a=-r.scrollTop;return Or(n).direction==="rtl"&&(o+=Jt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var Uv=25;function cI(e,t){const r=Qt(e),n=Jr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=Oc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Ba(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<=Uv&&(s-=g)}else c<=Uv&&(s+=c);return{width:s,height:o,x:a,y:l}}function dI(e,t){const r=ci(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=dn(e)?Gi(e):Kr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Vv(e,t,r){let n;if(t==="viewport")n=cI(e,r);else if(t==="document")n=uI(Jr(e));else if(Cr(t))n=dI(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 za(n)}function Bv(e,t){const r=zn(e);return r===t||!Cr(r)||Hi(r)?!1:Or(r).position==="fixed"||Bv(r,t)}function fI(e,t){const r=t.get(e);if(r)return r;let n=lo(e,[],!1).filter(a=>Cr(a)&&Wi(a)!=="body"),i=null;const s=Or(e).position==="fixed";let o=s?zn(e):e;for(;Cr(o)&&!Hi(o);){const a=Or(o),l=Cc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||ao(o)&&!l&&Bv(e,o))?n=n.filter(c=>c!==o):i=a,o=zn(o)}return t.set(e,n),n}function hI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ua(t)?[]:fI(t,this._c):[].concat(r),n],o=Vv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const p=Vv(t,s[u],i);a=Jt(p.top,a),l=Ln(p.right,l),c=Ln(p.bottom,c),d=Jt(p.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function pI(e){const{width:t,height:r}=Lv(e);return{width:t,height:r}}function mI(e,t,r){const n=dn(t),i=Jr(t),s=r==="fixed",o=ci(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Kr(0);function c(){l.x=Ba(i)}if(n||!n&&!s)if((Wi(t)!=="body"||ao(i))&&(a=Va(t)),n){const u=ci(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?qv(i,a):Kr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function Pc(e){return Or(e).position==="static"}function jv(e,t){if(!dn(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 Zv(e,t){const r=Qt(e);if(Ua(e))return r;if(!dn(e)){let i=zn(e);for(;i&&!Hi(i);){if(Cr(i)&&!Pc(i))return i;i=zn(i)}return r}let n=jv(e,t);for(;n&&tI(n)&&Pc(n);)n=jv(n,t);return n&&Hi(n)&&Pc(n)&&!Cc(n)?r:n||iI(e)||r}var vI=async function(e){const t=this.getOffsetParent||Zv,r=this.getDimensions,n=await r(e.floating);return{reference:mI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gI(e){return Or(e).direction==="rtl"}var yI={convertOffsetParentRelativeRectToViewportRelativeRect:aI,getDocumentElement:Jr,getClippingRect:hI,getOffsetParent:Zv,getElementRects:vI,getClientRects:lI,getDimensions:pI,getScale:Gi,isElement:Cr,isRTL:gI};function Wv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bI(e,t){let r=null,n;const i=Jr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(a||t(),!p||!h)return;const g=Ra(u),m=Ra(i.clientWidth-(d+p)),v=Ra(i.clientHeight-(u+h)),y=Ra(d),k={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Jt(0,Ln(1,l))||1};let S=!0;function E(A){const O=A[0].intersectionRatio;if(O!==l){if(!S)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!Wv(c,e.getBoundingClientRect())&&o(),S=!1}try{r=new IntersectionObserver(E,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,k)}r.observe(e)}return o(!0),s}function _I(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ic(e),d=i||s?[...c?lo(c):[],...t?lo(t):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&a?bI(c,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(y=>{let[k]=y;k&&k.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,m=l?ci(e):null;l&&v();function v(){const y=ci(e);m&&!Wv(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 wI=JD,kI=QD,SI=GD,EI=eI,xI=KD,TI=HD,AI=XD,CI=(e,t,r)=>{const n=new Map,i={platform:yI,...r},s={...i.platform,_c:n};return WD(e,t,{...i,platform:s})};function di(e){return typeof e=="function"?e():e}function Hv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gv(e,t){const r=Hv(e);return Math.round(t*r)/r}function Kv(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 OI(e){const t=e.whileElementsMounted,r=D(()=>di(e.open)??!0),n=D(()=>di(e.middleware)),i=D(()=>di(e.transform)??!0),s=D(()=>di(e.placement)??"bottom"),o=D(()=>di(e.strategy)??"absolute"),a=D(()=>di(e.sideOffset)??0),l=D(()=>di(e.alignOffset)??0),c=e.reference;let d=X(0),u=X(0);const p=Er(null);let h=X(Me(f(o))),g=X(Me(f(s))),m=X(Me({})),v=X(!1),y=!1,k=0;const S=D(()=>{const N=p.current?Gv(p.current,f(d)):f(d),V=p.current?Gv(p.current,f(u)):f(u);return f(i)?{position:f(h),left:"0",top:"0",transform:`translate(${N}px, ${V}px)`,...p.current&&Hv(p.current)>=1.5&&{willChange:"transform"}}:{position:f(h),left:`${N}px`,top:`${V}px`}});let E;function A(){if(c.current===null||p.current===null)return;const N=c.current,V=p.current,U=++k;CI(N,V,{middleware:f(n),placement:f(s),strategy:f(o)}).then(se=>{if(U===k&&!(c.current!==N||p.current!==V)){if(DI(N)){I(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(a)),Math.abs(f(l)),15);if(se.x<=pe&&se.y<=pe)return}I(d,se.x,!0),I(u,se.y,!0),I(h,se.strategy,!0),I(g,se.placement,!0),I(m,se.middlewareData,!0),I(v,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),k++}function $(){if(O(),t===void 0){A();return}f(r)&&(c.current===null||p.current===null||(E=t(c.current,p.current,A)))}function z(){!f(r)&&p.current===null&&I(v,!1)}function B(){return[f(n),f(s),f(o),f(a),f(l),f(r)]}return ge(()=>{t===void 0&&f(r)&&A()}),ge($),ge(()=>{if(t!==void 0){if(B(),!f(r)){y=!1;return}if(!f(v)){y=!1;return}if(!y){y=!0;return}A()}}),ge(z),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(S)},get update(){return A}}}function DI(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var II={top:"bottom",right:"left",bottom:"top",left:"right"},$c=new $t("Floating.Root"),Yv=new $t("Floating.Content"),Mc=new $t("Floating.Root"),PI=class fd{static create(t=!1){return t?Mc.set(new fd):$c.set(new fd)}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})}},$I=class hd{static create(t,r=!1){return r?Yv.set(new hd(t,Mc.get())):Yv.set(new hd(t,$c.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=Xe(this.contentRef);wrapperAttachment=Xe(this.wrapperRef);arrowAttachment=Xe(this.arrowRef);arrowId=Er(Rn());#e=D(()=>{if(typeof this.opts.style=="string")return Ks(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new YA(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>f(this.#a).length>0);get hasExplicitBoundaries(){return f(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:f(this.#a).filter(mC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return f(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=X(void 0);#c=X(void 0);#d=X(void 0);#h=X(void 0);#p=D(()=>[wI({mainAxis:this.opts.sideOffset.current+f(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&kI({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?AI():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&SI({...this.detectOverflowOptions}),EI({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#c,n,!0),I(this.#d,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&TI({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),FI({arrowWidth:f(this.#n),arrowHeight:f(this.#i)}),this.opts.hideWhenDetached.current&&xI({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return f(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>NI(this.floating.placement));get placedSide(){return f(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>RI(this.floating.placement));get placedAlign(){return f(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return f(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return f(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return f(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=X();get contentZIndex(){return f(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>II[this.placedSide]);get arrowBaseSide(){return f(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${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){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Js({...f(this.#e)}),...this.contentAttachment}));get props(){return f(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return f(this.#S)}set arrowStyle(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),rt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=OI({strategy:()=>this.opts.strategy.current,placement:()=>f(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>_I(...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()}),rt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Im(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}},MI=class pd{static create(t,r=!1){return r?new pd(t,Mc.get()):new pd(t,$c.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=mA(t.virtualEl.current):r.triggerNode=t.ref}};function FI(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=Fc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+a/2;let h="",g="";return l==="bottom"?(h=s?d:`${u}px`,g=`${-a}px`):l==="top"?(h=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}}}function Fc(e){const[t,r="center"]=e.split("-");return[t,r]}function NI(e){return Fc(e)[0]}function RI(e){return Fc(e)[1]}function Jv(e,t){te(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);PI.create(n());var i={get children(){return r()},set children(a){r(a),b()},get tooltip(){return n()},set tooltip(a=!1){n(a),b()}},s=Y(),o=q(s);return we(o,()=>r()??Ne),x(e,s),re(i)}ne(Jv,{children:{},tooltip:{}},[],[],{mode:"open"});function Qv(e,t){te(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),o=_(t,"tooltip",7,!1);MI.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},o());var a={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 o()},set tooltip(d=!1){o(d),b()}},l=Y(),c=q(l);return we(c,()=>n()??Ne),x(e,l),re(a)}ne(Qv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Xv(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"),o=_(t,"alignOffset",7,0),a=_(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,()=>({})),S=_(t,"wrapperId",23,Rn),E=_(t,"customAnchor",7,null),A=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const $=$I.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>o()),id:L(()=>a()),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(()=>A()),wrapperId:L(()=>S()),customAnchor:L(()=>E())},O()),z=D(()=>He($.wrapperProps,{style:{pointerEvents:"auto"}}));var B={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 o()},set alignOffset(U=0){o(U),b()},get id(){return a()},set id(U){a(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 S()},set wrapperId(U=Rn()){S(U),b()},get customAnchor(){return E()},set customAnchor(U=null){E(U),b()},get enabled(){return A()},set enabled(U){A(U),b()},get tooltip(){return O()},set tooltip(U=!1){O(U),b()}},N=Y(),V=q(N);return we(V,()=>r()??Ne,()=>({props:$.props,wrapperProps:f(z)})),x(e,N),re(B)}ne(Xv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function eg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);nn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),b()},get onPlaced(){return n()},set onPlaced(a){n(a),b()}},s=Y(),o=q(s);return we(o,()=>r()??Ne,()=>({props:{},wrapperProps:{}})),x(e,s),re(i)}ne(eg,{content:{},onPlaced:{}},[],[],{mode:"open"});var LI=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function tg(e,t){te(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=Ze(t,LI);var o={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()}},a=Y(),l=q(a),c=u=>{eg(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Xv(u,xn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),x(e,a),re(o)}ne(tg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var zI=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"]),qI=j("<!> <!>",1);function Nc(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),a=_(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),S=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),$=_(t,"wrapperId",7),z=_(t,"style",7),B=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),V=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),se=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),Q=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),J=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),le=_(t,"isStatic",7,!1),W=_(t,"enabled",7),ee=_(t,"ref",7),ue=_(t,"tooltip",7,!1),F=_(t,"contentPointerEvents",7,"auto"),H=Ze(t,zI);const R=D(()=>O()??!0),ve=D(()=>E()??(f(R)?"fixed":"absolute"));var fe={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 o()},set id(w){o(w),b()},get onPointerDown(){return a()},set onPointerDown(w){a(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 S()},set updatePositionStrategy(w){S(w),b()},get strategy(){return E()},set strategy(w){E(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return $()},set wrapperId(w){$(w),b()},get style(){return z()},set style(w){z(w),b()},get onPlaced(){return B()},set onPlaced(w){B(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(w){U(w),b()},get onFocusOutside(){return se()},set onFocusOutside(w){se(w),b()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),b()},get loop(){return Q()},set loop(w){Q(w),b()},get trapFocus(){return oe()},set trapFocus(w=!0){oe(w),b()},get isValidEvent(){return J()},set isValidEvent(w=()=>!1){J(w),b()},get customAnchor(){return de()},set customAnchor(w=null){de(w),b()},get isStatic(){return le()},set isStatic(w=!1){le(w),b()},get enabled(){return W()},set enabled(w){W(w),b()},get ref(){return ee()},set ref(w){ee(w),b()},get tooltip(){return ue()},set tooltip(w=!1){ue(w),b()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),b()}};return tg(e,{get isStatic(){return le()},get id(){return o()},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 S()},get strategy(){return f(ve)},get dir(){return A()},get wrapperId(){return $()},get style(){return z()},get onPlaced(){return B()},get customAnchor(){return de()},get enabled(){return W()},get tooltip(){return ue()},content:(Oe,Ce)=>{let je=()=>Ce?.().props,wt=()=>Ce?.().wrapperProps;var Ke=qI(),Mt=q(Ke),it=Ft=>{nc(Ft,{get preventScroll(){return f(R)}})},Xt=Ft=>{nc(Ft,{get preventScroll(){return f(R)}})};ce(Mt,Ft=>{t.forceMount&&W()?Ft(it):t.forceMount||Ft(Xt,1)});var Tt=K(Mt,2);Xm(Tt,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return V()},get loop(){return Q()},get enabled(){return W()},get trapFocus(){return oe()},get forceMount(){return t.forceMount},get ref(){return ee()},focusScope:(er,Zt)=>{let mr=()=>Zt?.().props;Qm(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return W()},get ref(){return ee()},children:(Ir,Pr)=>{Jm(Ir,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return se()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return J()},get enabled(){return W()},get ref(){return ee()},children:($r,vr)=>{let Qr=()=>vr?.().props;rv($r,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return W()},get ref(){return ee()},children:(Xr,kt)=>{var Un=Y(),is=q(Un);{let ss=D(()=>({props:He(H,je(),Qr(),mr(),{style:{pointerEvents:F()}}),wrapperProps:wt()}));we(is,()=>r()??Ne,()=>f(ss))}x(Xr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),x(Oe,Ke)},$$slots:{content:!0}}),re(fe)}ne(Nc,{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 UI=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 rg(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),o=_(t,"preventOverflowTextSelection",7),a=_(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),S=_(t,"hideWhenDetached",7),E=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),O=_(t,"dir",7),$=_(t,"preventScroll",7),z=_(t,"wrapperId",7),B=_(t,"style",7),N=_(t,"onPlaced",7),V=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),se=_(t,"onOpenAutoFocus",7),pe=_(t,"onFocusOutside",7),Q=_(t,"interactOutsideBehavior",7,"close"),oe=_(t,"loop",7),J=_(t,"trapFocus",7,!0),de=_(t,"isValidEvent",7,()=>!1),le=_(t,"customAnchor",7,null),W=_(t,"isStatic",7,!1),ee=_(t,"ref",7),ue=_(t,"shouldRender",7),F=Ze(t,UI);var H={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 o()},set preventOverflowTextSelection(w){o(w),b()},get id(){return a()},set id(w){a(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 S()},set hideWhenDetached(w){S(w),b()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return $()},set preventScroll(w){$(w),b()},get wrapperId(){return z()},set wrapperId(w){z(w),b()},get style(){return B()},set style(w){B(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return V()},set onInteractOutside(w){V(w),b()},get onCloseAutoFocus(){return U()},set onCloseAutoFocus(w){U(w),b()},get onOpenAutoFocus(){return se()},set onOpenAutoFocus(w){se(w),b()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),b()},get interactOutsideBehavior(){return Q()},set interactOutsideBehavior(w="close"){Q(w),b()},get loop(){return oe()},set loop(w){oe(w),b()},get trapFocus(){return J()},set trapFocus(w=!0){J(w),b()},get isValidEvent(){return de()},set isValidEvent(w=()=>!1){de(w),b()},get customAnchor(){return le()},set customAnchor(w=null){le(w),b()},get isStatic(){return W()},set isStatic(w=!1){W(w),b()},get ref(){return ee()},set ref(w){ee(w),b()},get shouldRender(){return ue()},set shouldRender(w){ue(w),b()}},R=Y(),ve=q(R),fe=w=>{Nc(w,xn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return 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 S()},get updatePositionStrategy(){return E()},get strategy(){return A()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return z()},get style(){return B()},get onPlaced(){return N()},get customAnchor(){return le()},get isStatic(){return W()},get enabled(){return n()},get onInteractOutside(){return V()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return se()},get interactOutsideBehavior(){return Q()},get loop(){return oe()},get trapFocus(){return J()},get isValidEvent(){return de()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return ee()}},()=>F))};return ce(ve,w=>{ue()&&w(fe)}),x(e,R),re(H)}ne(rg,{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 VI=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 ng(e,t){te(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),a=_(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),S=_(t,"updatePositionStrategy",7),E=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),$=_(t,"wrapperId",7),z=_(t,"style",7),B=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),V=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),se=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),Q=_(t,"loop",7),oe=_(t,"trapFocus",7,!0),J=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),le=_(t,"isStatic",7,!1),W=_(t,"enabled",7),ee=Ze(t,VI);var ue={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 o()},set id(F){o(F),b()},get onPointerDown(){return a()},set onPointerDown(F){a(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 S()},set updatePositionStrategy(F){S(F),b()},get strategy(){return E()},set strategy(F){E(F),b()},get dir(){return A()},set dir(F){A(F),b()},get preventScroll(){return O()},set preventScroll(F){O(F),b()},get wrapperId(){return $()},set wrapperId(F){$(F),b()},get style(){return z()},set style(F){z(F),b()},get onPlaced(){return B()},set onPlaced(F){B(F),b()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),b()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(F){V(F),b()},get onOpenAutoFocus(){return U()},set onOpenAutoFocus(F){U(F),b()},get onFocusOutside(){return se()},set onFocusOutside(F){se(F),b()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),b()},get loop(){return Q()},set loop(F){Q(F),b()},get trapFocus(){return oe()},set trapFocus(F=!0){oe(F),b()},get isValidEvent(){return J()},set isValidEvent(F=()=>!1){J(F),b()},get customAnchor(){return de()},set customAnchor(F=null){de(F),b()},get isStatic(){return le()},set isStatic(F=!1){le(F),b()},get enabled(){return W()},set enabled(F){W(F),b()}};return Nc(e,xn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return 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 S()},get strategy(){return E()},get dir(){return A()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return z()},get onPlaced(){return B()},get customAnchor(){return de()},get isStatic(){return le()},get enabled(){return W()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return pe()},get loop(){return Q()},get trapFocus(){return oe()},get isValidEvent(){return J()},get onFocusOutside(){return se()}},()=>ee,{forceMount:!0})),re(ue)}ne(ng,{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 ja=ba({component:"date-field",parts:["input","label","segment"]}),Ki={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return to(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||mv(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"),BI=class xy{static create(t,r){return qn.set(new xy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=X();get segmentValues(){return f(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return f(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=fv();#r=X(null);#n=X(null);#i=X(null);get descriptionNode(){return f(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=X(null);get validationNode(){return f(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=fv();#a=X(null);get dayPeriodNode(){return f(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=X("");get name(){return f(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new ji(()=>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=yv({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=ac(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Da(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(()=>{Re(()=>{this.initialSegments=ac(this.inferredGranularity)})}),nn(()=>{this.announcer=Da(this.domContext.getDocument())}),si(()=>{r||OO(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&&CO({id:Re(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Re(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Re(()=>{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=ac(this.inferredGranularity))}),rt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:f(this.#r)}setLabelNode(t){I(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=Pa.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=$a.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&&li(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&li(i,t)?{reason:"max"}:!1});get validationStatus(){return f(this.#u)}set validationStatus(t){I(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return f(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||TO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return f(this.#d)}set inferredGranularity(t){I(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){I(this.#h,t)}#p=D(()=>_O({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){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return f(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(xO(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const p=to(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[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&&(o.hour=`${h-12}`):u==="PM"&&h<12&&(o.hour=`${h+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const p=this.formatter.dayPeriod(Bt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(o.dayPeriod=p)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Ma(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const p=to(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[t]:u}}else if(t==="year"){const p=d(c);this.states.year.updating=p,a={...o,[t]:p}}else if(t==="day"){const p=d(c);this.states.day.updating=p,a={...o,[t]:p}}else a={...o,[t]:u}}this.segmentValues=a,EO(a,f(this.#r))?this.setValue(SO({segmentObj:a,fieldNode:f(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Yu(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}`,[ja.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=AO(r,f(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},jI=class Ty{static create(t){return new Ty(t,qn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new ji(t.ref),this.root.domContext=this.domContext,this.attachment=Xe(t.ref,n=>this.root.setFieldNode(n)),rt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(ln&&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),[ja.input]:"",...this.attachment}));get props(){return f(this.#t)}set props(t){I(this.#t,t)}},ZI=class Ay{static create(){return new Ay(qn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return f(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return f(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return f(this.#r)}set props(t){I(this.#r,t)}},WI=class Cy{static create(t){return new Cy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=PO(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),[ja.label]:"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#e)}set props(t){I(this.#e,t)}},Yi=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=Xe(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(),!!lc(e.key))){if(Rc(e.key)){this.#i(t);return}if(Lc(e.key)){this.#s(t);return}if(_a(e.key)){this.#a(e);return}if(zc(e.key)){this.#o(e);return}io(e.key)&&no(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&vv(e,this.root.getFieldNode())}#o(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&gv(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return f(this.#l)}set props(e){I(this.#l,e)}},HI=class extends Yi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Ki.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!lc(e.key))){if(Rc(e.key)){this.#r(),super.onkeydown(e);return}if(Lc(e.key)){this.#r(),super.onkeydown(e);return}if(_a(e.key)){this.#i(e);return}if(zc(e.key)){this.#s(e);return}io(e.key)&&no(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),ig(s));this.announcer.announce(s),t=!0;const o=`${s}`;return o.length>4?o.slice(0,4):o}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&vv(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&&gv(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?ig(Number.parseInt(t)):t)}},GI=class extends Yi{constructor(e,t){super(e,t,"day",Ki.day)}},KI=class extends Yi{constructor(e,t){super(e,t,"month",Ki.month)}},YI=class extends Yi{constructor(e,t){super(e,t,"hour",Ki.hour)}onkeydown(e){if(_a(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)}},JI=class extends Yi{constructor(e,t){super(e,t,"minute",Ki.minute)}},QI=class extends Yi{constructor(e,t){super(e,t,"second",Ki.second)}},XI=class Oy{static create(t){return new Oy(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=Xe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!nP(t.key))){if(Rc(t.key)||Lc(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}zc(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}),io(t.key)&&no(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){I(this.#t,t)}},eP=class Dy{static create(t){return new Dy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Yu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return f(this.#e)}set props(t){I(this.#e,t)}},tP=class Iy{static create(t){return new Iy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Xe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&io(t.key)&&no(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){I(this.#e,t)}},rP=class{static create(e,t){const r=qn.get();switch(e){case"day":return new GI(t,r);case"month":return new KI(t,r);case"year":return new HI(t,r);case"hour":return new YI(t,r);case"minute":return new JI(t,r);case"second":return new QI(t,r);case"dayPeriod":return new XI(t,r);case"literal":return new eP(t,r);case"timeZoneName":return new tP(t,r)}}};function nP(e){return lc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Rc(e){return e===Qu}function Lc(e){return e===Ju}function zc(e){return e===dC}function ig(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function sg(e,t){te(t,!1);const r=ZI.create();Jl();var n=Y(),i=q(n),s=o=>{Av(o,xn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),x(e,n),re()}ne(sg,{},[],[],{mode:"open"});var iP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),sP=j("<div><!></div>"),oP=j("<!> <!>",1);function og(e,t){const r=ht();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),o=_(t,"children",7),a=_(t,"child",7),l=Ze(t,iP);const c=jI.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),d=D(()=>He(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 o()},set children(v){o(v),b()},get child(){return a()},set child(v){a(v),b()}},p=oP(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,a,()=>({props:f(d),segments:c.root.segmentContents})),x(v,y)},m=v=>{var y=sP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>o()??Ne,()=>({segments:c.root.segmentContents})),P(y),x(v,y)};return ce(h,v=>{a()?v(g):v(m,-1)}),sg(K(h,2),{}),x(e,p),re(u)}ne(og,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var aP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),lP=j("<div><!></div>");function ag(e,t){const r=ht();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),o=_(t,"child",7),a=Ze(t,aP);const l=WI.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>He(a,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 o()},set child(m){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,o,()=>({props:f(c)})),x(m,v)},g=m=>{var v=lP();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>s()??Ne),P(v),x(m,v)};return ce(p,m=>{o()?m(h):m(g,-1)}),x(e,u),re(d)}ne(ag,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var uP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),cP=j("<span><!></span>");function lg(e,t){const r=ht();te(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),o=_(t,"child",7),a=_(t,"part",7),l=Ze(t,uP);const c=rP.create(a(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),d=D(()=>He(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 o()},set child(v){o(v),b()},get part(){return a()},set part(v){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,o,()=>({props:f(d)})),x(v,y)},m=v=>{var y=cP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>s()??Ne),P(y),x(v,y)};return ce(h,v=>{o()?v(g):v(m,-1)}),x(e,p),re(u)}ne(lg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var ug=new $t("DatePicker.Root"),dP=class Py{static create(t){return ug.set(new Py(t))}opts;constructor(t){this.opts=t}};function qc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=t[o]??[0,0],[d,u]=t[a]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function Uc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function cg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}var fP=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=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,rt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=ya(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const p=u.relatedTarget;if(oi(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];oi(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=oi(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;oi(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[vt(s,"pointermove",o),vt(r,"pointerleave",a),vt(r,"pointerenter",l),vt(n,"pointerenter",c),vt(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"&&Uc(e,i)){this.#f();return}if(this.#i==="trigger"&&Uc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Uc(e,c))return;const d=cg(n,c),u=this.#m(n,c,d);if(u&&qc(e,u))return}const s=cg(n,i),o=this.#m(n,i,s);if(o&&qc(e,o))return;const a=this.#i==="content"?i:n;qc(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#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,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Vc=ba({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new $t("Popover.Root"),hP=class $y{static create(t){return Bc.set(new $y(t))}opts;#e=X(null);get contentNode(){return f(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=X(null);get triggerNode(){return f(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=X(null);get overlayNode(){return f(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=X(!1);get openedViaHover(){return f(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=X(!1);get hasInteractedWithContent(){return f(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=X(!1);get hoverCooldown(){return f(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=X(0);get closeDelay(){return f(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Nm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Nm({ref:L(()=>this.overlayNode),open:this.opts.open}),rt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},pP=class My{static create(t){return new My(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=X(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new ji(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),rt(()=>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||wa(t)||(I(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(wa(t)||(I(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())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":Pm(this.root.opts.open.current),"aria-controls":this.#a(),[Vc.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.#o)}set props(t){I(this.#o,t)}},mP=class Fy{static create(t){return new Fy(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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 fP({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;oi(r)&&LC(r)&&this.root.markInteraction()}onpointerenter(t){wa(t)||this.root.cancelDelayedClose()}onpointerleave(t){wa(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!oi(t.target))return;const r=t.target.closest(Vc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(oi(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){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Pm(this.root.opts.open.current),...uC(this.root.contentPresence.transitionStatus),[Vc.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){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function dg(e,t){te(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,Se),i=_(t,"onOpenChangeComplete",7,Se),s=_(t,"value",15),o=_(t,"onValueChange",7,Se),a=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,Se),c=_(t,"isDateUnavailable",7,()=>!1),d=_(t,"validate",7,Se),u=_(t,"onInvalid",7,Se),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),S=_(t,"locale",7),E=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),$=_(t,"disableDaysOutsideMonth",7,!0),z=_(t,"preventDeselect",7,!1),B=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),V=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),se=_(t,"fixedWeeks",7,!1),pe=_(t,"numberOfMonths",7,1),Q=_(t,"closeOnDateSelect",7,!0),oe=_(t,"initialFocus",7,!1),J=_(t,"errorMessageId",7),de=_(t,"children",7),le=_(t,"monthFormat",7,"long"),W=_(t,"yearFormat",7,"numeric");const ee=sv({granularity:v(),defaultValue:s(),minValue:p(),maxValue:h()});function ue(){a()===void 0&&a(ee)}ue(),rt.pre(()=>a(),()=>{ue()});function F(){Q()&&r(!1)}const H=dP.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),o()(w)}),placeholder:L(()=>a(),w=>{a(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:Lm(()=>S()),hideTimeZone:L(()=>E()),required:L(()=>A()),calendarLabel:L(()=>O()),disableDaysOutsideMonth:L(()=>$()),preventDeselect:L(()=>z()),pagedNavigation:L(()=>B()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>V()),isDateDisabled:L(()=>U()),fixedWeeks:L(()=>se()),numberOfMonths:L(()=>pe()),initialFocus:L(()=>oe()),onDateSelect:L(()=>F),defaultPlaceholder:ee,monthFormat:L(()=>le()),yearFormat:L(()=>W())});hP.create({open:H.opts.open,onOpenChangeComplete:L(()=>i())}),BI.create({value:H.opts.value,disabled:H.opts.disabled,readonly:H.opts.readonly,readonlySegments:H.opts.readonlySegments,validate:L(()=>d()),onInvalid:L(()=>u()),minValue:H.opts.minValue,maxValue:H.opts.maxValue,granularity:H.opts.granularity,hideTimeZone:H.opts.hideTimeZone,hourCycle:H.opts.hourCycle,locale:H.opts.locale,required:H.opts.required,placeholder:H.opts.placeholder,errorMessageId:L(()=>J()),isInvalidProp:L(()=>{})});var R={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),b()},get placeholder(){return a()},set placeholder(w){a(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return d()},set validate(w=Se){d(w),b()},get onInvalid(){return u()},set onInvalid(w=Se){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 S()},set locale(w){S(w),b()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),b()},get preventDeselect(){return z()},set preventDeselect(w=!1){z(w),b()},get pagedNavigation(){return B()},set pagedNavigation(w=!1){B(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return V()},set weekdayFormat(w="narrow"){V(w),b()},get isDateDisabled(){return U()},set isDateDisabled(w=()=>!1){U(w),b()},get fixedWeeks(){return se()},set fixedWeeks(w=!1){se(w),b()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),b()},get closeOnDateSelect(){return Q()},set closeOnDateSelect(w=!0){Q(w),b()},get initialFocus(){return oe()},set initialFocus(w=!1){oe(w),b()},get errorMessageId(){return J()},set errorMessageId(w){J(w),b()},get children(){return de()},set children(w){de(w),b()},get monthFormat(){return le()},set monthFormat(w="long"){le(w),b()},get yearFormat(){return W()},set yearFormat(w="numeric"){W(w),b()}},ve=Y(),fe=q(ve);return Pe(fe,()=>Jv,(w,Oe)=>{Oe(w,{children:(Ce,je)=>{var wt=Y(),Ke=q(wt);we(Ke,()=>de()??Ne),x(Ce,wt)},$$slots:{default:!0}})}),x(e,ve),re(R)}ne(dg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var vP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),gP=j("<div><!></div>");function fg(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=Ze(t,vP);const l=ug.get(),c=Sv.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type: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(()=>He(a,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 o()},set ref(v=null){o(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);{let S=D(()=>({props:f(d),...c.snippetProps}));we(k,i,()=>f(S))}x(v,y)},m=v=>{var y=gP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne,()=>c.snippetProps),P(y),x(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),x(e,p),re(u)}ne(fg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var yP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),hg=j("<div><div><!></div></div>");function pg(e,t){const r=ht();te(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,Se),c=_(t,"onCloseAutoFocus",7,Se),d=_(t,"onEscapeKeydown",7,Se),u=_(t,"onInteractOutside",7,Se),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),m=_(t,"style",7),v=Ze(t,yP);const y=mP.create({id:L(()=>o()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>d()),customAnchor:L(()=>g())}),k=D(()=>He(v,y.props)),S=D(()=>p()&&y.shouldTrapFocus);function E(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var A={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 o()},set id(N=Ie(r)){o(N),b()},get forceMount(){return a()},set forceMount(N=!1){a(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),b()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){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=Y(),$=q(O),z=N=>{ng(N,xn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return o()},get trapFocus(){return f(S)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,se)=>{let pe=()=>se?.().props,Q=()=>se?.().wrapperProps;const oe=D(()=>He(pe(),{style:Kv("popover")},{style:m()}));var J=Y(),de=q(J),le=ee=>{var ue=Y(),F=q(ue);{let H=D(()=>({props:f(oe),wrapperProps:Q(),...y.snippetProps}));we(F,n,()=>f(H))}x(ee,ue)},W=ee=>{var ue=hg();ze(ue,()=>({...Q()}));var F=M(ue);ze(F,()=>({...f(oe)}));var H=M(F);we(H,()=>i()??Ne),P(F),P(ue),x(ee,ue)};ce(de,ee=>{n()?ee(le):ee(W,-1)}),x(U,J)},$$slots:{popper:!0}}))},B=N=>{rg(N,xn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return o()},get trapFocus(){return f(S)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,se)=>{let pe=()=>se?.().props,Q=()=>se?.().wrapperProps;const oe=D(()=>He(pe(),{style:Kv("popover")},{style:m()}));var J=Y(),de=q(J),le=ee=>{var ue=Y(),F=q(ue);{let H=D(()=>({props:f(oe),wrapperProps:Q(),...y.snippetProps}));we(F,n,()=>f(H))}x(ee,ue)},W=ee=>{var ue=hg();ze(ue,()=>({...Q()}));var F=M(ue);ze(F,()=>({...f(oe)}));var H=M(F);we(H,()=>i()??Ne),P(F),P(ue),x(ee,ue)};ce(de,ee=>{n()?ee(le):ee(W,-1)}),x(U,J)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(z):a()||N(B,1)}),x(e,O),re(A)}ne(pg,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var bP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function mg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=Ze(t,bP);const s=D(()=>He({onOpenAutoFocus:n()},{onOpenAutoFocus:HO}));var o={get ref(){return r()},set ref(a=null){r(a),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),b()}};return pg(e,xn(()=>f(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),re(o)}ne(mg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var _P=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),wP=j("<button><!></button>");function vg(e,t){const r=ht();te(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(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=Ze(t,_P);const h=pP.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>d()),closeDelay:L(()=>u())}),g=D(()=>He(p,h.props,{type:a()}));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 o()},set ref(v=null){o(v),b()},get type(){return a()},set type(v="button"){a(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 Qv(e,{get id(){return s()},get ref(){return h.opts.ref},children:(v,y)=>{var k=Y(),S=q(k),E=O=>{var $=Y(),z=q($);we(z,i,()=>({props:f(g)})),x(O,$)},A=O=>{var $=wP();ze($,()=>({...f(g)}));var z=M($);we(z,()=>n()??Ne),P($),x(O,$)};ce(S,O=>{i()?O(E):O(A,-1)}),x(v,k)},$$slots:{default:!0}}),re(m)}ne(vg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var kP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function gg(e,t){te(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=Ze(t,kP);function s(l){if(io(l.key)){const c=l.currentTarget.closest(ja.selector("input"));if(!c)return;no(l,c)}}const o=D(()=>He({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return vg(e,xn(()=>i,{"data-segment":"trigger"},()=>f(o),{get ref(){return r()},set ref(l){r(l)}})),re(a)}ne(gg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var jc=j("<!> <!>",1),yg=j("<!> <!> <!>",1);function bg(e,t){te(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),o=X(Me(ei(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(f(o).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=Y(),d=q(c);{let u=D(()=>C.locale||"de");Pe(d,()=>dg,(p,h)=>{h(p,{get locale(){return f(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(ei(Vt()))<0,get value(){return f(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=yg(),y=q(v);Pe(y,()=>ag,(E,A)=>{A(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var z=Y(),B=q(z),N=V=>{var U=Y(),se=q(U);we(se,s),x(V,U)};ce(B,V=>{s()&&V(N)}),x(O,z)},$$slots:{default:!0}})});var k=K(y,2);{const E=(A,O)=>{let $=()=>O?.().segments;var z=jc(),B=q(z);Le(B,17,$,qr,(V,U)=>{let se=()=>f(U).part,pe=()=>f(U).value;var Q=Y(),oe=q(Q);Pe(oe,()=>lg,(J,de)=>{de(J,{get part(){return se()},children:(le,W)=>{At();var ee=qt();ae(()=>ie(ee,pe())),x(le,ee)},$$slots:{default:!0}})}),x(V,Q)});var N=K(B,2);Pe(N,()=>gg,(V,U)=>{U(V,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),x(A,z)};Pe(k,()=>og,(A,O)=>{O(A,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var S=K(k,2);Pe(S,()=>mg,(E,A)=>{A(E,{children:(O,$)=>{var z=Y(),B=q(z);{const N=(V,U)=>{let se=()=>U?.().months,pe=()=>U?.().weekdays;var Q=jc(),oe=q(Q);Pe(oe,()=>yc,(de,le)=>{le(de,{children:(W,ee)=>{var ue=yg(),F=q(ue);Pe(F,()=>wc,(ve,fe)=>{fe(ve,{class:"go-datepicker-previous"})});var H=K(F,2);Pe(H,()=>bc,(ve,fe)=>{fe(ve,{class:"go-datepicker-selected-month"})});var R=K(H,2);Pe(R,()=>_c,(ve,fe)=>{fe(ve,{class:"go-datepicker-next"})}),x(W,ue)},$$slots:{default:!0}})});var J=K(oe,2);Le(J,16,se,de=>de,(de,le)=>{var W=Y(),ee=q(W);Pe(ee,()=>hc,(ue,F)=>{F(ue,{children:(H,R)=>{var ve=jc(),fe=q(ve);Pe(fe,()=>vc,(Oe,Ce)=>{Ce(Oe,{children:(je,wt)=>{var Ke=Y(),Mt=q(Ke);Pe(Mt,()=>oo,(it,Xt)=>{Xt(it,{children:(Tt,Ft)=>{var er=Y(),Zt=q(er);Le(Zt,17,pe,qr,(mr,Ir)=>{var Pr=Y(),yn=q(Pr);Pe(yn,()=>gc,($r,vr)=>{vr($r,{children:(Qr,Xr)=>{At();var kt=qt();ae(()=>ie(kt,f(Ir))),x(Qr,kt)},$$slots:{default:!0}})}),x(mr,Pr)}),x(Tt,er)},$$slots:{default:!0}})}),x(je,Ke)},$$slots:{default:!0}})});var w=K(fe,2);Pe(w,()=>pc,(Oe,Ce)=>{Ce(Oe,{children:(je,wt)=>{var Ke=Y(),Mt=q(Ke);Le(Mt,16,()=>le.weeks,it=>it,(it,Xt)=>{var Tt=Y(),Ft=q(Tt);Pe(Ft,()=>oo,(er,Zt)=>{Zt(er,{children:(mr,Ir)=>{var Pr=Y(),yn=q(Pr);Le(yn,16,()=>Xt,$r=>$r,($r,vr,Qr,Xr)=>{var kt=Y(),Un=q(kt);Pe(Un,()=>mc,(is,ss)=>{ss(is,{get date(){return vr},get month(){return le.value},children:(fo,td)=>{var gi=Y(),os=q(gi);Pe(os,()=>fc,(gr,Vn)=>{Vn(gr,{})}),x(fo,gi)},$$slots:{default:!0}})}),x($r,kt)}),x(mr,Pr)},$$slots:{default:!0}})}),x(it,Tt)}),x(je,Ke)},$$slots:{default:!0}})}),x(H,ve)},$$slots:{default:!0}})}),x(de,W)}),x(V,Q)};Pe(B,()=>fg,(V,U)=>{U(V,{children:N,$$slots:{default:!0}})})}x(O,z)},$$slots:{default:!0}})}),x(g,v)},$$slots:{default:!0}})})}return x(e,c),re(l)}ne(bg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var SP=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),EP=j('<span class="go-field-star" aria-hidden="true">*</span>'),xP=j(" <!>",1),TP=j("<label><!></label> <input/>",1),AP=j("<label><!></label> <textarea></textarea>",1),CP=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),OP=j("<label><!></label> <input/> <!>",1),DP=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),IP=j('<img src="" alt=""/> <option> </option>',1),PP=j('<option disabled="" hidden="" selected=""> </option> <!>',1),$P=j("<!>",1),MP=j("<label><!></label> <select><!></select>",1),FP=j('<img style="width: 60px" aria-hidden="true"/>'),NP=j('<span class="go-payment-mode-icons"></span>'),RP=j('<label><input type="radio"/> <!></label>'),LP=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),zP=j("<label> <input/></label>"),qP=j("<fieldset><legend><!></legend> <!></fieldset>");function _g(e,t){te(t,!0);const r=Q=>{At();var oe=xP(),J=q(oe),de=K(J),le=W=>{var ee=EP();x(W,ee)};ce(de,W=>{u().required&&W(le)}),ae(()=>ie(J,`${f(z)??""} `)),x(Q,oe)},n=Q=>{var oe=TP(),J=q(oe);r(M(J)),P(J);var de=K(J,2);ze(de,()=>({...f($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ae(()=>{St(J,1,lr(h())),me(J,"for",f(A))}),Uo(de,()=>u().value,le=>u(u().value=le,!0)),x(Q,oe)},i=Q=>{var oe=AP(),J=q(oe);r(M(J)),P(J);var de=K(J,2);jb(de),ze(de,()=>({...f($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ae(()=>{St(J,1,lr(h())),me(J,"for",f(A))}),Uo(de,()=>u().value,le=>u(u().value=le,!0)),x(Q,oe)},s=Q=>{var oe=OP(),J=q(oe);r(M(J)),P(J);var de=K(J,2),le=ue=>{const F=ue.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),f(k)?f(k).validateField(u()):u().validate()};ze(de,()=>({...f($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:le}),void 0,void 0,void 0,void 0,!0);var W=K(de,2),ee=ue=>{var F=CP(),H=M(F),R=K(H,2),ve=M(R,!0);P(R),P(F),ae(fe=>{me(F,"data-field-preview",u().key),me(H,"src",f(N)),me(H,"alt",fe),ie(ve,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),x(ue,F)};ce(W,ue=>{f(N)&&u().value instanceof File&&ue(ee)}),ae(()=>{St(J,1,lr(h())),me(J,"for",f(A))}),x(Q,oe)},o=Q=>{var oe=DP(),J=M(oe);ze(J,()=>({...f($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var de=K(J,2);r(M(de)),P(de),P(oe),ae(()=>{St(oe,1,lr(h())),me(oe,"for",f(A))}),N_(J,()=>u().value===!0,le=>{u(u().value=le,!0)}),x(Q,oe)},a=Q=>{var oe=MP(),J=q(oe);r(M(J)),P(J);var de=K(J,2);ze(de,()=>({...f($),...v,name:u().key,class:g()})),M_(de,()=>{var le=M(de),W=$P(),ee=q(W),ue=F=>{var H=PP(),R=q(H),ve=M(R,!0);P(R),R.value=R.__value="";var fe=K(R,2);Le(fe,17,()=>u().options(),w=>w.value,(w,Oe)=>{var Ce=IP(),je=K(q(Ce),2),wt=M(je,!0);P(je);var Ke={};ae(()=>{ie(wt,f(Oe).label),Ke!==(Ke=f(Oe).value)&&(je.value=(je.__value=f(Oe).value)??"")}),x(w,Ce)}),ae(w=>ie(ve,w),[()=>C.t("common.choose")]),x(F,H)};ce(ee,F=>{u().options&&F(ue)}),x(le,W)}),ae(()=>{St(J,1,lr(h())),me(J,"for",f(A))}),x_(de,()=>u().value,le=>u(u().value=le,!0)),x(Q,oe)},l=Q=>{bg(Q,{get labelClass(){return h()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(oe){u(u().value=oe,!0)}})},c=Q=>{const oe=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var J=LP(),de=M(J);r(M(de)),P(de);var le=K(de,2);Le(le,17,()=>f(oe),W=>W.id,(W,ee)=>{var ue=RP(),F=M(ue);Ps(F);var H=K(F,2),R=ve=>{var fe=NP();Le(fe,20,()=>f(ee).icons,w=>w,(w,Oe)=>{const Ce=D(()=>B+Oe+".svg");var je=FP();ae(()=>{St(je,1,lr(Oe)),me(je,"src",f(Ce)),me(je,"alt",Oe+" icon")}),x(w,je)}),P(fe),x(ve,fe)};ce(H,ve=>{f(ee).icons.length>0&&ve(R)}),P(ue),ae((ve,fe,w)=>{me(F,"name",u().key),Ul(F,ve),D_(F,fe),me(F,"hidden",f(oe).length===1),me(F,"aria-label",w)},[()=>String(f(ee).id),()=>f(oe).length===1||String(f(ee).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${f(ee).name.toLowerCase()}`)]),ft("change",F,()=>{u(u().value=String(f(ee).id),!0)}),x(W,ue)}),P(J),ae(()=>{me(J,"aria-required",u().required),me(J,"aria-invalid",u().errors.length>0)}),x(Q,J)},d=Q=>{var oe=qP(),J=M(oe);r(M(J)),P(J);var de=K(J,2),le=W=>{var ee=Y(),ue=q(ee);Le(ue,17,()=>u().options,qr,(F,H)=>{var R=zP(),ve=M(R),fe=K(ve);ze(fe,()=>({...f($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(R),ae(()=>{St(R,1,lr(h())),me(R,"for",f(A)+f(H)),ie(ve,`${f(H)??""} `)}),Uo(fe,()=>u().value,w=>u(u().value=w,!0)),x(F,R)}),x(W,ee)};ce(de,W=>{u().options&&W(le)}),P(oe),x(Q,oe)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),m=_(t,"host",7),v=Ze(t,SP);const y=Li(m()),k=D(()=>y.value),S={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>S[u().type]);let A=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 $=D(()=>({id:f(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let z=D(()=>C.t(u().label)||u().label);const B="https://cdn.shop.platform.gomus.de/";let N=X(null);ge(()=>{const Q=u().value;if(Q instanceof File&&Q.type.startsWith("image/")){const oe=URL.createObjectURL(Q);return I(N,oe,!0),()=>{URL.revokeObjectURL(oe),I(N,null)}}I(N,null)});var V={get field(){return u()},set field(Q){u(Q),b()},get describedByIds(){return p()},set describedByIds(Q){p(Q),b()},get labelClass(){return h()},set labelClass(Q){h(Q),b()},get inputClass(){return g()},set inputClass(Q){g(Q),b()},get host(){return m()},set host(Q){m(Q),b()}},U=Y(),se=q(U),pe=Q=>{var oe=Y(),J=q(oe);we(J,()=>f(E)),x(Q,oe)};return ce(se,Q=>{f(E)&&Q(pe)}),x(e,U),re(V)}ar(["change"]),ne(_g,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var UP=j("<span> </span>"),VP=j("<li> </li>"),BP=j('<ul class="go-field-errors"></ul>'),jP=j("<!> <!> <!>",1);function ZP(e,t){te(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),o=X(Me(fr.createField(r(),n())));const a=Li(t.$$host),l=D(()=>a.value),c=()=>f(o);let d=D(()=>f(o)?[...f(o).errors,...f(o).apiErrors].map($=>C.t($)):[]),u=D(()=>f(o)?.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(o)&&(f(o).mounted=!0,f(o).value,Re(()=>{f(o)?.errors.length&&f(l).validateField(f(o))}))});var v={getField:c,get key(){return r()},set key($){r($),b()},get required(){return n()},set required($=!1){n($),b()},get labelClass(){return i()},set labelClass($){i($),b()},get inputClass(){return s()},set inputClass($){s($),b()}},y=jP(),k=q(y);_g(k,{get describedByIds(){return f(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return f(o)},set field($){I(o,$,!0)}});var S=K(k,2),E=$=>{var z=UP(),B=M(z,!0);P(z),ae(()=>{me(z,"id",f(h)),ie(B,f(o).description)}),x($,z)};ce(S,$=>{f(u)&&$(E)});var A=K(S,2),O=$=>{var z=BP();Le(z,21,()=>f(d),qr,(B,N)=>{var V=VP(),U=M(V,!0);P(V),ae(()=>ie(U,f(N))),x(B,V)}),P(z),ae(()=>me(z,"id",f(g))),x($,z)};return ce(A,$=>{f(p)&&$(O)}),x(e,y),re(v)}customElements.define("go-field",ne(ZP,{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 WP=j("<go-field></go-field>",2);function HP(e,t){te(t,!0);let r=Li(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?fr.getFormFields(f(n)?.formId):[]);var s=Y(),o=q(s);Le(o,17,()=>f(i),a=>a.key,(a,l)=>{var c=WP();ae(()=>Yn(c,"key",f(l).key)),ae(()=>Yn(c,"required",f(l).required)),x(a,c)}),x(e,s),re()}customElements.define("go-all-fields",ne(HP,{},[],[]));var GP=j('<p aria-hidden="true"> </p>'),KP=j("<li> </li>"),YP=j('<ul class="go-error-feedback-api-errors"></ul>'),JP=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function QP(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);ge(()=>{f(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Ru(f(n)?.fields),!0)})});let i=X(0);setInterval(()=>{I(i,Ru(f(n)?.fields)||0,!0)},100);let s=D(()=>f(i)+(f(n)?.apiErrors?.length||0)),o=X(-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 a=JP(),l=M(a),c=M(l),d=v=>{var y=qt();ae(k=>ie(y,k),[()=>C.t("forms.errorSummary",{count:f(o)})]),x(v,y)};ce(c,v=>{f(o)>0&&v(d)}),P(l);var u=K(l,2),p=v=>{var y=GP(),k=M(y,!0);P(y),ae(S=>ie(k,S),[()=>C.t("forms.errorSummary",{count:f(i)})]),x(v,y)};ce(u,v=>{f(i)>0&&v(p)});var h=K(u,2),g=v=>{var y=YP();Le(y,21,()=>f(n)?.apiErrors,qr,(k,S)=>{var E=KP(),A=M(E,!0);P(E),ae(()=>ie(A,f(S))),x(k,E)}),P(y),x(v,y)},m=D(()=>f(n)&&Xl(f(n).apiErrors)&&f(n).apiErrors.length>0);ce(h,v=>{f(m)&&v(g)}),P(a),x(e,a),re()}customElements.define("go-errors-feedback",ne(QP,{},[],[]));var XP=j('<div class="go-form-feedback"><!></div>');function e$(e,t){var r=XP(),n=M(r);__(n,t,"default",{},null),P(r),x(e,r)}customElements.define("go-form-feedback",ne(e$,{},["default"],[]));function t$(e,t){te(t,!0);let r=_(t,"buttonClass",7,"");return nn(()=>{Fn(t.$$host,"button",{type:"submit",class:r()})}),re({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",ne(t$,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var r$=j('<div aria-live="assertive"> </div>');function n$(e,t){te(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=r$();let c;var d=M(l,!0);P(l),ae(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":f(n).successMessage}),ie(d,f(n)?.successMessage)}),x(a,l)};ce(s,a=>{f(n)?.successMessage&&a(o)}),x(e,i),re()}customElements.define("go-success-feedback",ne(n$,{},[],[]));var pr="INUMBER",Ji="IOP1",Qi="IOP2",Xi="IOP3",fn="IVAR",fi="IVARNAME",es="IFUNCALL",Za="IFUNDEF",jt="IEXPR",Zc="IEXPREVAL",hi="IMEMBER",Wa="IENDSTATEMENT",ts="IARRAY";function $e(e,t){this.type=e,this.value=t??0}$e.prototype.toString=function(){switch(this.type){case pr:case Ji:case Qi:case Xi:case fn:case fi:case Wa:return this.value;case es:return"CALL "+this.value;case Za:return"DEF "+this.value;case ts:return"ARRAY "+this.value;case hi:return"."+this.value;default:return"Invalid Instruction"}};function Ha(e){return new $e(Ji,e)}function hn(e){return new $e(Qi,e)}function wg(e){return new $e(Xi,e)}function Wc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===pr||h===fi)Array.isArray(p.value)?s.push.apply(s,Wc(p.value.map(function(g){return new $e(pr,g)}).concat(new $e(ts,p.value.length)),t,r,n,i)):s.push(p);else if(h===fn&&i.hasOwnProperty(p.value))p=new $e(pr,i[p.value]),s.push(p);else if(h===Qi&&s.length>1)l=s.pop(),a=s.pop(),d=r[p.value],p=new $e(pr,d(a.value,l.value)),s.push(p);else if(h===Xi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),p.value==="?"?s.push(a.value?l.value:c.value):(d=n[p.value],p=new $e(pr,d(a.value,l.value,c.value)),s.push(p));else if(h===Ji&&s.length>0)a=s.pop(),d=t[p.value],p=new $e(pr,d(a.value)),s.push(p);else if(h===jt){for(;s.length>0;)o.push(s.shift());o.push(new $e(jt,Wc(p.value,t,r,n,i)))}else if(h===hi&&s.length>0)a=s.pop(),s.push(new $e(pr,a.value[p.value]));else{for(;s.length>0;)o.push(s.shift());o.push(p)}}for(;s.length>0;)o.push(s.shift());return o}function kg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===fn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Ji?c=Ha(l.value):l.type===Qi?c=hn(l.value):l.type===Xi?c=wg(l.value):c=new $e(l.type,l.value),n.push(c)}else o===jt?n.push(new $e(jt,kg(s.value,t,r))):n.push(s)}return n}function pi(e,t,r){var n=[],i,s,o,a,l,c;if(Hc(e))return pn(e,r);for(var d=e.length,u=0;u<d;u++){var p=e[u],h=p.type;if(h===pr||h===fi)n.push(p.value);else if(h===Qi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!pi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!pi(s,t,r)):p.value==="="?(a=t.binaryOps[p.value],n.push(a(i,pi(s,t,r),r))):(a=t.binaryOps[p.value],n.push(a(pn(i,r),pn(s,r))));else if(h===Xi)o=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(pi(i?s:o,t,r)):(a=t.ternaryOps[p.value],n.push(a(pn(i,r),pn(s,r),pn(o,r))));else if(h===fn)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===Ji)i=n.pop(),a=t.unaryOps[p.value],n.push(a(pn(i,r)));else if(h===es){for(c=p.value,l=[];c-- >0;)l.unshift(pn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(h===Za)n.push((function(){for(var m=n.pop(),v=[],y=p.value;y-- >0;)v.unshift(n.pop());var k=n.pop(),S=function(){for(var E=Object.assign({},r),A=0,O=v.length;A<O;A++)E[v[A]]=arguments[A];return pi(m,t,E)};return Object.defineProperty(S,"name",{value:k,writable:!1}),r[k]=S,S})());else if(h===jt)n.push(i$(p,t));else if(h===Zc)n.push(p);else if(h===hi)i=n.pop(),n.push(i[p.value]);else if(h===Wa)n.pop();else if(h===ts){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:pn(n[0],r)}function i$(e,t,r){return Hc(e)?e:{type:Zc,value:function(n){return pi(e.value,t,n)}}}function Hc(e){return e&&e.type===Zc}function pn(e,t){return Hc(e)?e.value(t):e}function Gc(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===pr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(Sg).join(", ")+"]"):r.push(Sg(d.value));else if(u===Qi)i=r.pop(),n=r.pop(),o=d.value,t?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(u===Xi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===fn||u===fi)r.push(d.value);else if(u===Ji)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===es){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===Za){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===hi)n=r.pop(),r.push(n+"."+d.value);else if(u===ts){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===jt)r.push("("+Gc(d.value,t)+")");else if(u!==Wa)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Sg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function rs(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Kc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===fn||o.type===fi?!n&&!rs(t,o.value)?t.push(o.value):(i!==null&&(rs(t,i)||t.push(i)),i=o.value):o.type===hi&&n&&i!==null?i+="."+o.value:o.type===jt?Kc(o.value,t,r):i!==null&&(rs(t,i)||t.push(i),i=null)}i!==null&&!rs(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(Wc(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(kg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},pi(this.tokens,this,e)},Dr.prototype.toString=function(){return Gc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Kc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Kc(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 "+Gc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var uo="TEOF",We="TOP",Ga="TNUMBER",Eg="TSTRING",mn="TPAREN",ns="TBRACKET",Ka="TCOMMA",Yc="TNAME",Jc="TSEMICOLON";function xg(e,t,r){this.type=e,this.value=t,this.index=r}xg.prototype.toString=function(){return this.type+": "+this.value};function nt(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}nt.prototype.newToken=function(e,t,r){return new xg(e,t,r??this.pos)},nt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},nt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},nt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(uo,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},nt.prototype.isString=function(){var 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(Eg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},nt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(mn,e),this.pos++,!0):!1},nt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ns,e),this.pos++,!0):!1},nt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ka,","),this.pos++,!0):!1},nt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Jc,";"),this.pos++,!0):!1},nt.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(Ga,this.consts[n]),this.pos+=n.length,!0}return!1},nt.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(We,n),this.pos+=n.length,!0}return!1},nt.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(Yc,i),this.pos+=i.length,!0}return!1},nt.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 s$=/^[0-9a-f]{4}$/i;nt.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);s$.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},nt.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},nt.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(Ga,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},nt.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),o==="e"||o==="E"){t++;for(var a=!0,l=!1;t<this.expression.length;){if(o=this.expression.charAt(t),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Ga,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},nt.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(We,t);else if(t==="∙"||t==="•")this.current=this.newToken(We,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(We,">="),this.pos++):this.current=this.newToken(We,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(We,"<="),this.pos++):this.current=this.newToken(We,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(We,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(We,"=="),this.pos++):this.current=this.newToken(We,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(We,"!="),this.pos++):this.current=this.newToken(We,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},nt.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},nt.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}},nt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function Ge(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}Ge.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},Ge.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?rs(t,e.value):typeof t=="function"?t(e):e.value===t},Ge.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},Ge.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},Ge.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},Ge.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))}},Ge.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Yc)||this.accept(We,r))e.push(new $e(fn,this.current.value));else if(this.accept(Ga))e.push(new $e(pr,this.current.value));else if(this.accept(Eg))e.push(new $e(pr,this.current.value));else if(this.accept(mn,"("))this.parseExpression(e),this.expect(mn,")");else if(this.accept(ns,"["))if(this.accept(ns,"]"))e.push(new $e(ts,0));else{var n=this.parseArrayList(e);e.push(new $e(ts,n))}else throw new Error("unexpected "+this.nextToken)},Ge.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},Ge.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},Ge.prototype.parseUntilEndStatement=function(e,t){return this.accept(Jc)?(this.nextToken&&this.nextToken.type!==uo&&!(this.nextToken.type===mn&&this.nextToken.value===")")&&t.push(new $e(Wa)),this.nextToken.type!==uo&&this.parseExpression(t),e.push(new $e(jt,t)),!0):!1},Ge.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ns,"]");)for(this.parseExpression(e),++t;this.accept(Ka);)this.parseExpression(e),++t;return t},Ge.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(We,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===es){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===fn&&(e[o]=new $e(fi,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new $e(jt,r)),e.push(new $e(Za,t.value));continue}if(t.type!==fn&&t.type!==hi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new $e(fi,t.value)),e.push(new $e(jt,r)),e.push(hn("="))}},Ge.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(We,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(We,":"),this.parseConditionalExpression(r),e.push(new $e(jt,t)),e.push(new $e(jt,r)),e.push(wg("?"))}},Ge.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(We,"or");){var t=[];this.parseAndExpression(t),e.push(new $e(jt,t)),e.push(hn("or"))}},Ge.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(We,"and");){var t=[];this.parseComparison(t),e.push(new $e(jt,t)),e.push(hn("and"))}};var o$=["==","!=","<","<=",">=",">","in"];Ge.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(We,o$);){var t=this.current;this.parseAddSub(e),e.push(hn(t.value))}};var a$=["+","-","||"];Ge.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(We,a$);){var t=this.current;this.parseTerm(e),e.push(hn(t.value))}};var l$=["*","/","%"];Ge.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(We,l$);){var t=this.current;this.parseFactor(e),e.push(hn(t.value))}},Ge.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(We,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===mn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Jc||this.nextToken.type===Ka||this.nextToken.type===uo||this.nextToken.type===mn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ha(n.value))}else this.parseExponential(e)},Ge.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(We,"^");)this.parseFactor(e),e.push(hn("^"))},Ge.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(We,"!");)e.push(Ha("!"))},Ge.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(We,r)){var n=this.current;this.parseAtom(e),e.push(Ha(n.value))}else for(this.parseMemberExpression(e);this.accept(mn,"(");)if(this.accept(mn,")"))e.push(new $e(es,0));else{var i=this.parseArgumentList(e);e.push(new $e(es,i))}},Ge.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(mn,")");)for(this.parseExpression(e),++t;this.accept(Ka);)this.parseExpression(e),++t;return t},Ge.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(We,".")||this.accept(ns,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Yc),e.push(new $e(hi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ns,"]"),e.push(hn("["))}else throw new Error("unexpected symbol: "+t.value)}};function u$(e,t){return Number(e)+Number(t)}function c$(e,t){return e-t}function d$(e,t){return e*t}function f$(e,t){return e/t}function h$(e,t){return e%t}function p$(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function m$(e,t){return e===t}function v$(e,t){return e!==t}function g$(e,t){return e>t}function y$(e,t){return e<t}function b$(e,t){return e>=t}function _$(e,t){return e<=t}function w$(e,t){return!!(e&&t)}function k$(e,t){return!!(e||t)}function S$(e,t){return rs(t,e)}function E$(e){return(Math.exp(e)-Math.exp(-e))/2}function x$(e){return(Math.exp(e)+Math.exp(-e))/2}function T$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function A$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function C$(e){return Math.log(e+Math.sqrt(e*e-1))}function O$(e){return Math.log((1+e)/(1-e))/2}function Tg(e){return Math.log(e)*Math.LOG10E}function D$(e){return-e}function I$(e){return!e}function P$(e){return e<0?Math.ceil(e):Math.floor(e)}function $$(e){return Math.random()*(e||1)}function Ag(e){return Xc(e+1)}function M$(e){return isFinite(e)&&e===Math.round(e)}var F$=4.7421875,Qc=[.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 Xc(e){var t,r;if(M$(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)*Xc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Qc[0];for(var c=1;c<Qc.length;++c)r+=Qc[c]/(e+c);return t=e+F$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function N$(e){return Array.isArray(e)?e.length:String(e).length}function Cg(){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 Og(e,t,r){return e?t:r}function R$(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 L$(e,t,r){return r&&(r[e]=t),t}function z$(e,t){return e[t|0]}function q$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function U$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function V$(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 B$(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 j$(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 Z$(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 W$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function H$(e){return(e>0)-(e<0)||+e}var Dg=1/3;function G$(e){return e<0?-Math.pow(-e,Dg):Math.pow(e,Dg)}function K$(e){return Math.exp(e)-1}function Y$(e){return Math.log(1+e)}function J$(e){return Math.log(e)/Math.LN2}function mi(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||E$,cosh:Math.cosh||x$,tanh:Math.tanh||T$,asinh:Math.asinh||A$,acosh:Math.acosh||C$,atanh:Math.atanh||O$,sqrt:Math.sqrt,cbrt:Math.cbrt||G$,log:Math.log,log2:Math.log2||J$,ln:Math.log,lg:Math.log10||Tg,log10:Math.log10||Tg,expm1:Math.expm1||K$,log1p:Math.log1p||Y$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||P$,"-":D$,"+":Number,exp:Math.exp,not:I$,length:N$,"!":Ag,sign:Math.sign||H$},this.binaryOps={"+":u$,"-":c$,"*":d$,"/":f$,"%":h$,"^":Math.pow,"||":p$,"==":m$,"!=":v$,">":g$,"<":y$,">=":b$,"<=":_$,and:w$,or:k$,in:S$,"=":L$,"[":z$},this.ternaryOps={"?":Og},this.functions={random:$$,fac:Ag,min:U$,max:q$,hypot:Math.hypot||Cg,pyt:Math.hypot||Cg,pow:Math.pow,atan2:Math.atan2,if:Og,gamma:Xc,roundTo:R$,map:V$,fold:B$,filter:j$,indexOf:Z$,join:W$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}mi.prototype.parse=function(e){var t=[],r=new Ge(this,new nt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(uo,"EOF"),new Dr(t,this)},mi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Ig=new mi;mi.parse=function(e){return Ig.parse(e)},mi.evaluate=function(e,t){return Ig.parse(e).evaluate(t)};var Pg={"+":"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 Q$(e){return Pg.hasOwnProperty(e)?Pg[e]:e}mi.prototype.isOperatorEnabled=function(e){var t=Q$(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var X$=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,eM=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,tM=/(__optional\("[^"]+"\))\.length\b/g,rM=new mi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),$g=new Map;function nM(e){return e.replace(X$,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(eM,(t,r)=>`__length(${r})`).replace(tM,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function iM(e){const t=$g.get(e);if(t)return t;const r=rM.parse(nM(e));return $g.set(e,r),r}function sM(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=iM(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 Mg=["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"],oM=7200*1e3;async function vn(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 o=i.get(s.id);o&&(s.content=o)}}catch{}}function Ya(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Ja(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+oM&&(i.seats?.available??0)>0})}async function Qa(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}));Ya(e,t)}var aM={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}));Ya(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=Pn($n(r,t.selectedTime),t.selectedTime);await vn(e,i);for(const s of i)e.preCart.addItem(pt(s,{time:t.selectedTime}))}},lM={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=Pn($n(r,s),s);await vn(e,o);for(const a of o)e.preCart.addItem(pt(a,{time:s}))}},uM={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=>la(i));await vn(e,n);for(const i of n)e.preCart.addItem(pt(i))}},cM={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()}));Ya(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=Pn($n(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},dM={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=Pn($n(n,o),o);await vn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:o}))}},fM={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()}));Ya(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=Pn($n(n,t.selectedTime),t.selectedTime);await vn(e,s);for(const o of s)e.preCart.addItem(pt(o,{time:t.selectedTime}))}},hM={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=Mu(n,r.id,{event_title:r.event_title});e.preCart.addItem(pt(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},pM={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Pn($n(s,n.start_time),n.start_time);await vn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},mM={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=Pn($n(s,l),l);await vn(e,c);for(const d of c)e.preCart.addItem(pt(d,{time:l}))}}},vM={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Pn($n(s,n.start_time),n.start_time);await vn(e,a);for(const l of a)e.preCart.addItem(pt(l,{time:n.start_time}))}}},gM={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=Mu(o,i.id,{event_title:i.event_title});e.preCart.addItem(pt(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},yM={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(pt(yp(r)))}},bM={"ticket:timeslot":aM,"ticket:day":lM,"ticket:annual":uM,"event:admission":cM,"event:admission:day":dM,"event:admission:timeslot":fM,"event:price":hM,"events:admission":pM,"events:admission:day":mM,"events:admission:timeslot":vM,"events:price":gM,coupon:yM};function vi(e){const t=bM[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Mg.join(", ")}`),t}var Fg=Mg,_M=0,wM=class{uid=_M++;#e=X();get filters(){return f(this.#e)}set filters(e){I(this.#e,e,!0)}#t=X();get eventIds(){return f(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=X();get museumIds(){return f(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=X();get exhibitionIds(){return f(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=X();get ticketIds(){return f(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=X();get ticketGroupIds(){return f(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=X();get selectedDate(){return f(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=X();get selectedTimeslot(){return f(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return f(this.#l)}set selectedTime(e){I(this.#l,e)}#u=X(Me([]));get ticketSegments(){return f(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return f(this.#c)}set preCarts(e){I(this.#c,e)}#d=X();get timeslotDetails(){return f(this.#d)}set timeslotDetails(e){I(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>vi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>vi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>vi(e).isTicketsVisible(this))}},Ng="go-ticket-selection",kM=Ni(Ng),gn=Ri(Ng);function SM(e,t){te(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=gn(t.$$host),s=D(()=>i.value),o=dx(t.$$host),a=D(()=>o.value),l=Li(t.$$host),c=D(()=>l.value),d=zi(t.$$host),u=D(()=>d.value);let p=D(()=>({ticketSelection:f(s),personalizationDetails:f(a),formData:f(c)?.formData,cart:C.cart,cartView:f(u)}));const h=k=>{I(p,k)},g=()=>f(p);let m=D(()=>sM(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 re(y)}customElements.define("go-if",ne(SM,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Rg(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"),ge(()=>{(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(Rg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function EM(e,t){te(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),b()},get shopDomain(){return n()},set shopDomain(a){n(a),b()},get locale(){return i()},set locale(a){i(a),b()}};return Rg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),re(o)}customElements.define("go-init",ne(EM,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function xM(e,t){te(t,!0);const r=_(t,"to",7),n=D(()=>Je.config.urls[r()]),i=Fn(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()]())}),re({get to(){return r()},set to(s){r(s),b()}})}customElements.define("go-link",ne(xM,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var TM=class{#e=X();get token(){return f(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return hl(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}}},Lg="go-order-details",AM=Ni(Lg),zg=Ri(Lg);function CM(e,t){te(t,!0);let r=_(t,"token",7);const n=new TM(r());AM(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 re(i)}customElements.define("go-order",ne(CM,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var OM=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),DM=j('<br/> <span class="go-order-item-quantities"> </span>',1),IM=j('<a aria-label="iCal link"> </a>'),PM=j('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function qg(e,t){te(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(A){r(A),b()},get orderDetails(){return n()},set orderDetails(A){n(A),b()}},s=PM(),o=M(s),a=M(o),l=K(M(a),2),c=M(l),d=M(c,!0);P(c);var u=K(c,2),p=A=>{var O=OM(),$=q(O),z=M($,!0);P($);var B=K($,2),N=M(B,!0);P(B),ae((V,U)=>{ie(z,V),ie(N,U)},[()=>Bs(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(r().attributes.start_time)]),x(A,O)};ce(u,A=>{r().attributes.start_time&&A(p)});var h=K(u,2);Le(h,17,()=>r().attributes.quantities,A=>A.id,(A,O)=>{var $=DM(),z=K(q($),2),B=M(z);P(z),ae(()=>ie(B,`${f(O).quantity??""} x ${f(O).title??""}`)),x(A,$)});var g=K(h,2),m=M(g,!0);P(g),P(l);var v=K(l,2),y=M(v,!0);P(v);var k=K(v,4),S=M(k),E=A=>{var O=IM(),$=M(O,!0);P(O),ae(z=>{me(O,"href",C.apiUrl+r().attributes.ical_url),ie($,z)},[()=>C.t("common.calendar")]),x(A,O)};return ce(S,A=>{r().attributes.ical_url&&A(E)}),P(k),P(a),P(o),P(s),ae((A,O,$)=>{ie(d,r().attributes.title),me(g,"href",A),ie(m,O),ie(y,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>aa(r().price_cents)]),x(e,s),re(i)}ne(qg,{item:{},orderDetails:{}},[],[],{mode:"open"});var $M=j('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),MM=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),FM=j('<span class="go-cart-item-date"> </span>'),NM=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),RM=j('<br/> <a class="go-ticket-personalization"> </a>',1),LM=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),zM=j('<a aria-label="iCal link"> </a>'),qM=j('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),UM=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),VM=j('<a class="go-ticket-personalization"> </a>'),BM=j('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Ug(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 o={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},a=Y(),l=q(a),c=u=>{var p=Y(),h=q(p);Le(h,17,()=>({length:n().attributes.quantity}),qr,(g,m,v)=>{var y=qM(),k=M(y),S=M(k),E=M(S);E.textContent="1";var A=K(E,2),O=M(A),$=M(O,!0);P(O);var z=K(O,2);Le(z,17,()=>f(s),W=>W.id,(W,ee)=>{var ue=$M(),F=K(q(ue),2),H=M(F);P(F),ae(()=>ie(H,`${f(ee).quantity??""} x ${f(ee).title??""}`)),x(W,ue)});var B=K(z,2),N=W=>{const ee=D(()=>n().attributes.barcodes[v]?.id);var ue=NM(),F=q(ue),H=w=>{var Oe=MM(),Ce=q(Oe),je=M(Ce,!0);P(Ce);var wt=K(Ce,2),Ke=M(wt,!0);P(wt),ae((Mt,it)=>{ie(je,Mt),ie(Ke,it)},[()=>Bs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(n().attributes.start_time)]),x(w,Oe)},R=w=>{var Oe=FM(),Ce=M(Oe,!0);P(Oe),ae(je=>ie(Ce,je),[()=>Bs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),x(w,Oe)};ce(F,w=>{n().attributes.ticket_type==="time_slot"?w(H):n().attributes.ticket_type==="normal"&&w(R,1)});var ve=K(F,4),fe=M(ve,!0);P(ve),ae((w,Oe)=>{me(ve,"href",w),ie(fe,Oe)},[()=>i().downloadLink(n(),f(ee)),()=>C.t("common.download")]),x(W,ue)},V=W=>{var ee=RM(),ue=K(q(ee),2),F=M(ue,!0);P(ue),ae((H,R)=>{me(ue,"href",H),ie(F,R)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),x(W,ee)};ce(B,W=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?W(N):W(V,-1)}),P(A);var U=K(A,2),se=M(U,!0);P(U);var pe=K(U,2),Q=M(pe),oe=W=>{var ee=LM(),ue=M(ee);P(ee),ae(()=>{me(ee,"href",C.apiUrl+n().attributes.barcodes[v]?.passbook_url),me(ue,"src",r)}),x(W,ee)};ce(Q,W=>{n().attributes.barcodes[v]&&n().attributes.barcodes[v]?.passbook_url&&W(oe)}),P(pe);var J=K(pe,2),de=M(J),le=W=>{var ee=zM(),ue=M(ee,!0);P(ee),ae(F=>{me(ee,"href",C.apiUrl+n().attributes.ical_url),ie(ue,F)},[()=>C.t("common.calendar")]),x(W,ee)};ce(de,W=>{n().attributes.ical_url&&W(le)}),P(J),P(S),P(k),P(y),ae(W=>{ie($,n().attributes.title),ie(se,W)},[()=>aa(n().price_cents)]),x(g,y)}),x(u,p)},d=u=>{var p=BM(),h=M(p),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=M(y),S=M(k,!0);P(k);var E=K(k,2),A=B=>{var N=UM(),V=M(N,!0);P(N),ae((U,se)=>{me(N,"href",U),ie(V,se)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),x(B,N)},O=B=>{var N=VM(),V=M(N,!0);P(N),ae((U,se)=>{me(N,"href",U),ie(V,se)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),x(B,N)};ce(E,B=>{n().attributes.is_voucher?B(A):B(O,-1)}),P(y);var $=K(y,2),z=M($,!0);P($),At(2),P(g),P(h),P(p),ae(B=>{ie(v,n().attributes.quantity),ie(S,n().attributes.title),ie(z,B)},[()=>aa(n().price_cents)]),x(u,p)};return ce(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(d,-1)}),x(e,a),re(o)}ne(Ug,{item:{},orderDetails:{}},[],[],{mode:"open"});var jM=j('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function ZM(e,t){te(t,!0);const r=zg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);var s=Y(),o=q(s),a=l=>{var c=jM(),d=M(c),u=M(d),p=M(u),h=M(p,!0);P(p);var g=K(p,2),m=M(g,!0);P(g);var v=K(g,2),y=M(v,!0);P(v),At(2),P(u),P(d);var k=K(d,2);Le(k,17,()=>f(i).items,$=>$.id,($,z)=>{var B=Y(),N=q(B),V=se=>{Ug(se,{get item(){return f(z)},get orderDetails(){return f(n)}})},U=se=>{qg(se,{get item(){return f(z)},get orderDetails(){return f(n)}})};ce(N,se=>{f(z).type==="Ticket"?se(V):f(z).type==="Event"&&se(U,1)}),x($,B)});var S=K(k,2),E=M(S),A=K(M(E),4),O=M(A,!0);P(A),At(2),P(E),P(S),P(c),ae(($,z,B,N)=>{ie(h,$),ie(m,z),ie(y,B),ie(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:aa(f(i).total_price_cents)})]),x(l,c)};ce(o,l=>{f(i)&&f(n)&&l(a)}),x(e,s),re()}customElements.define("go-order-breakdown",ne(ZM,{},[],[]));function WM(e,t){te(t,!0);const r=zg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);At();var s=qt();ae(()=>ie(s,f(i)?.id)),x(e,s),re()}customElements.define("go-order-invoice-id",ne(WM,{},[],[]));var HM=j("<go-form></go-form>",2);function GM(e,t){te(t,!1),fr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Jl();var n=HM();Yn(n,"formId","passwordResetForm"),No("submit",n,r),x(e,n),re()}customElements.define("go-profile-password",ne(GM,{},[],[]));var KM=j("<go-form></go-form>",2);function YM(e,t){te(t,!0),fr.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=X(void 0);const n=D(()=>C.getCustomer());nn(async()=>{await C.waitForAllFetches(),await Ql(()=>f(r).details),await Ql(()=>f(n).data),f(r).details.fill(f(n).data)});var i=KM();Yn(i,"formId","accountDetailsForm"),Yl(i,s=>I(r,s),()=>f(r)),x(e,i),re()}customElements.define("go-profile-details",ne(YM,{},[],[]));var JM=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function QM(e,t){te(t,!0);const r=D(()=>C.getCustomer()),n=D(()=>f(r)?.data);var i=Y(),s=q(i),o=l=>{var c=JM(),d=q(c),u=M(d);P(d);var p=K(d,2),h=M(p,!0);P(p),ae(()=>{ie(u,`${f(n).name??""}
85
- ${f(n).surname??""}`),ie(h,f(n).email)}),x(l,c)},a=l=>{var c=qt();ae(d=>ie(c,d),[()=>C.t("user.login.desc.text")]),x(l,c)};ce(s,l=>{f(n)?l(o):l(a,-1)}),x(e,i),re()}customElements.define("go-profile-overview",ne(QM,{},[],[]));function XM(e,t){te(t,!0);function r(h){if(!h)return;const g=[];for(const m of h.split(",")){const v=m.trim();v&&(Fg.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${Fg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),o=_(t,"exhibitionIds",7),a=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),d=_(t,"ticketGroupIds",7);const u=new wM;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=an(i()),u.museumIds=an(s()),u.exhibitionIds=an(o()),u.ticketIds=an(c()),u.ticketGroupIds=an(d()),u.selectedTimeslot=l(),a()&&(u.selectedDate=oa(a()))}),ge(()=>{u.selectedDate&&Re(()=>{a(u.selectedDate.toString())})}),ge(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),kM(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 o()},set exhibitionIds(h){o(h),b()},get selectedDate(){return a()},set selectedDate(h){a(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 re(p)}customElements.define("go-ticket-selection",ne(XM,{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 e2(e,t){te(t,!0);const r=gn(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)}),re()}customElements.define("go-tickets",ne(e2,{},[],[]));function t2(e,t){te(t,!0);const r=gn(t.$$host),n=D(()=>r.value),i=D(()=>sn(f(n)?.preCarts||[],o=>o.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))}),re()}customElements.define("go-tickets-empty",ne(t2,{},[],[]));function r2(e,t){te(t,!0);const r=gn(t.$$host),n=D(()=>r.value);let i=D(()=>sn(f(n)?.preCarts||[],o=>o.totalPriceCents));At();var s=qt();ae(o=>ie(s,o),[()=>dr(f(i))]),x(e,s),re()}customElements.define("go-tickets-sum",ne(r2,{},[],[]));var n2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=X(Me(Mi()));get preCart(){return f(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=X();get filters(){return f(this.#r)}set filters(e){I(this.#r,e,!0)}#n=X();get dateId(){return f(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=X();get limit(){return f(this.#i)}set limit(e){I(this.#i,e,!0)}#s=X();get query(){return f(this.#s)}set query(e){I(this.#s,e,!0)}#a=X(Me([]));get ticketGroupIds(){return f(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=X(Me([]));get languageIds(){return f(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=X(Me([]));get catchWordIds(){return f(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=X(Me([]));get museumIds(){return f(this.#u)}set museumIds(e){I(this.#u,e,!0)}#c=X(!1);get withContent(){return f(this.#c)}set withContent(e){I(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=Mi([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Mi();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>vi(t).loadProducts(this)))}},Vg="go-ticket-segment",i2=Ni(Vg),ed=Ri(Vg);function s2(e,t){te(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),o=_(t,"ticketGroupIds",7),a=_(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(S=>S.trim()).filter(Boolean);return k.length?k:void 0}const p=gn(t.$$host),h=p.value,g=new n2(u(r()),p);i2(t.$$host,g),ge(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=an(o()),g.languageIds=an(a()),g.catchWordIds=an(l()),g.museumIds=an(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,Re(()=>{g.loadTickets()})}),ge(()=>{h&&Re(()=>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 o()},set ticketGroupIds(y){o(y),b()},get languageIds(){return a()},set languageIds(y){a(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 re(v)}customElements.define("go-ticket-segment",ne(s2,{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 o2(e,t){te(t,!0);const r=gn(t.$$host).value,n=ed(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))}),re()}customElements.define("go-ticket-segment-empty",ne(o2,{},[],[]));var a2=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),l2=j('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),u2=j('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),c2=j('<ul class="go-sub-tickets" role="list"></ul>'),d2=j('<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>');function Bg(e,t){const r=ht();te(t,!0);const n=S=>{var E=a2(),A=q(E),O=M(A);P(A);var $=K(A,2),z=M($,!0);P($),ae(B=>{ie(O,`${s().product.event_title??""} - ${B??""}`),ie(z,s().product.title)},[()=>Vs(s().time)]),x(S,E)},i=S=>{At();var E=qt();ae(()=>ie(E,s().product.title)),x(S,E)};let s=_(t,"item",7),o=_(t,"details",7),a=X(void 0),l=X(Me({}));const c=D(()=>Br(s().product)?s().product:null);let d=X(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ge(()=>{o().preCart.items.map(S=>S.quantity),o().preCart.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),C.cart?.items.map(S=>S.quantity),C.cart?.items.forEach(S=>S.mantle&&Object.values(S.mantle.composition)),Re(()=>{I(a,C.capacityManager.capacity(C.cart,s(),o().preCart),!0),I(l,C.capacityManager.subTicketMaxes(C.cart,s(),o().preCart),!0)})});function h(S,E){s().mantle&&(s().mantle.composition[S]=E)}let g=i;ua(s().product)&&(g=n);var m={get item(){return s()},set item(S){s(S),b()},get details(){return o()},set details(S){o(S),b()}},v=Y(),y=q(v),k=S=>{var E=d2(),A=M(E),O=M(A),$=M(O),z=M($);g(z),P($);var B=K($,2),N=le=>{var W=l2(),ee=M(W);P(W),ae(ue=>{St(ee,1,lr(["go-ticket-info-icon",f(d)&&"is-active"])),me(ee,"aria-expanded",f(d)),me(ee,"aria-controls",p),me(ee,"aria-label",ue)},[()=>C.t("ticket.list.additionalInfo")]),ft("click",ee,()=>I(d,!f(d))),x(le,W)};ce(B,le=>{f(u)&&le(N)});var V=K(B,2);Ef(V,()=>fm.sanitize(s().product.description),!0),P(V);var U=K(V,2),se=le=>{var W=u2(),ee=M(W,!0);P(W),ae(ue=>{me(W,"id",p),me(W,"hidden",!f(d)),ie(ee,ue)},[()=>C.t(f(u))]),x(le,W)};ce(U,le=>{f(u)&&le(se)});var pe=K(U,2),Q=M(pe,!0);P(pe);var oe=K(pe,2);ma(M(oe),{get value(){return s().quantity},get min(){return f(a).min},get max(){return f(a).max},get label(){return s().product.title},onChange:le=>s().quantity=le}),P(oe),P(O),P(A);var J=K(A,2),de=le=>{var W=c2();Le(W,21,()=>js(f(c)),ee=>ee.id,(ee,ue)=>{{let F=D(()=>s().mantle?.composition?.[f(ue).id]??0);Zu(ee,{get sub(){return f(ue)},get quantity(){return f(F)},get max(){return f(l)[f(ue).id]},onChange:H=>h(f(ue).id,H)})}}),P(W),ae(()=>me(W,"aria-label",f(c).title)),x(le,W)};ce(J,le=>{f(c)&&s().quantity>0&&le(de)}),P(E),ae(()=>{St(A,1,lr(["go-tickets-item",f(a).bookedOut&&"is-booked-out"])),me(A,"data-testid",s().uuid),ie(Q,s().price_formatted)}),x(S,E)};return ce(y,S=>{f(a)&&!f(a).unavailable&&S(k)}),x(e,v),re(m)}ar(["click"]),ne(Bg,{item:{},details:{}},[],[],{mode:"open"});var f2=j('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function h2(e,t){te(t,!0);const r=ed(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?.preCart?.items.length&&f(n)?.preCart?.items.length>0);var s=Y(),o=q(s),a=l=>{var c=f2(),d=M(c),u=M(d),p=M(u),h=M(p,!0);P(p);var g=K(p,2),m=M(g,!0);P(g);var v=K(g,2),y=M(v,!0);P(v);var k=K(v,2),S=M(k,!0);P(k),P(u),P(d);var E=K(d,2);Le(E,17,()=>f(n).preCart.items,A=>A.uuid,(A,O)=>{Bg(A,{get item(){return f(O)},get details(){return f(n)}})}),P(c),ae((A,O,$,z)=>{ie(h,A),ie(m,O),ie(y,$),ie(S,z)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),x(l,c)};ce(o,l=>{f(i)&&f(n)&&l(a)}),x(e,s),re()}customElements.define("go-ticket-segment-body",ne(h2,{},[],[]));function p2(e,t){te(t,!0);const r=ed(t.$$host),n=D(()=>r.value);At();var i=qt();ae(()=>ie(i,f(n)?.preCart.totalFormatted)),x(e,i),re()}customElements.define("go-ticket-segment-sum",ne(p2,{},[],[]));var m2=class{#e;get tsd(){return f(this.#e)}set tsd(e){I(this.#e,e)}#t=X(Me([]));get timeslots(){return f(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}const t=C.capacityManager.quotaManager;t.clearPrecart();for(const r of C.cart?.items??[]){const n=r.product;Pu(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}))}},v2=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),g2=j('<ul data-testid="timeslots"></ul>');function y2(e,t){te(t,!0);const r=[],n=new m2(gn(t.$$host));ge(()=>{const d=n.tsd;if(!d)return;const u=d.filters,p=d.selectedDate;Re(async()=>{d.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>vi(h).loadTimeslots(d))),n.recalculateCapacities()})}),ge(()=>{C.cart?.items.map(d=>d.quantity),Re(()=>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 o={details:n},a=Y(),l=q(a),c=d=>{var u=g2();Le(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=v2(),S=M(k),E=M(S),A=K(E);Ps(A);var O;P(S),P(k),ae(()=>{St(k,1,lr({"go-timeslot":!0,"is-unavailable":f(g),"is-sold-out":f(m),"is-disabled":f(v),"is-selected":f(y)})),ie(E,`${h.timeFormatted??""} `),A.disabled=f(v),me(A,"aria-disabled",f(v)),O!==(O=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),ft("change",A,s),F_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),x(p,k)}),P(u),x(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),x(e,a),re(o)}ar(["change"]),customElements.define("go-timeslots",ne(y2,{},[],["details"]));var b2=class{#e=X();get details(){return f(this.#e)}set details(e){I(this.#e,e,!0)}#t=X(Me(ei(Vt())));get startAt(){return f(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=X(void 0);get selected(){return f(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>vi(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=>vi(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))),{})}},_2=j("<!> <!> <!>",1),w2=j("<div> </div>"),jg=j("<!> <!>",1),k2=j('<div data-calendar-wrapper=""><!></div>');function Zg(e,t){te(t,!0);let r=_(t,"calendarClass",7),n=X(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()}},o=k2(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,p=()=>d?.().weekdays;var h=jg(),g=q(h);Pe(g,()=>yc,(v,y)=>{y(v,{children:(k,S)=>{var E=_2(),A=q(E);Pe(A,()=>wc,(z,B)=>{B(z,{class:"go-calendar-prev-button",children:(N,V)=>{At();var U=qt("Prev");x(N,U)},$$slots:{default:!0}})});var O=K(A,2);Pe(O,()=>bc,(z,B)=>{B(z,{class:"go-calendar-heading"})});var $=K(O,2);Pe($,()=>_c,(z,B)=>{B(z,{class:"go-calendar-next-button",children:(N,V)=>{At();var U=qt("Next");x(N,U)},$$slots:{default:!0}})}),x(k,E)},$$slots:{default:!0}})});var m=K(g,2);Le(m,17,u,qr,(v,y)=>{var k=Y(),S=q(k);Pe(S,()=>hc,(E,A)=>{A(E,{class:"go-calendar-grid",children:(O,$)=>{var z=jg(),B=q(z);Pe(B,()=>vc,(V,U)=>{U(V,{class:"go-calendar-grid-head",children:(se,pe)=>{var Q=Y(),oe=q(Q);Pe(oe,()=>oo,(J,de)=>{de(J,{class:"go-calendar-grid-row",children:(le,W)=>{var ee=Y(),ue=q(ee);Le(ue,17,p,qr,(F,H,R,ve)=>{var fe=Y(),w=q(fe);Pe(w,()=>gc,(Oe,Ce)=>{Ce(Oe,{children:(je,wt)=>{var Ke=w2(),Mt=M(Ke,!0);P(Ke),ae(it=>ie(Mt,it),[()=>f(H).slice(0,2)]),x(je,Ke)},$$slots:{default:!0}})}),x(F,fe)}),x(le,ee)},$$slots:{default:!0}})}),x(se,Q)},$$slots:{default:!0}})});var N=K(B,2);Pe(N,()=>pc,(V,U)=>{U(V,{class:"go-calendar-grid-body",children:(se,pe)=>{var Q=Y(),oe=q(Q);Le(oe,17,()=>f(y).weeks,qr,(J,de,le,W)=>{var ee=Y(),ue=q(ee);Pe(ue,()=>oo,(F,H)=>{H(F,{class:"go-calendar-grid-row",children:(R,ve)=>{var fe=Y(),w=q(fe);Le(w,17,()=>f(de),qr,(Oe,Ce,je,wt)=>{var Ke=Y(),Mt=q(Ke);Pe(Mt,()=>mc,(it,Xt)=>{Xt(it,{get date(){return f(Ce)},get month(){return f(y).value},class:"go-calendar-cell",children:(Tt,Ft)=>{var er=Y(),Zt=q(er);{let mr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(f(Ce)),"is-disabled":r().isDateDisabled(f(Ce)),"is-selected":r().selected?.compare(f(Ce))===0}));Pe(Zt,()=>fc,(Ir,Pr)=>{Pr(Ir,{get class(){return f(mr)},children:(yn,$r)=>{At();var vr=qt();ae(()=>ie(vr,f(Ce).day)),x(yn,vr)},$$slots:{default:!0}})})}x(Tt,er)},$$slots:{default:!0}})}),x(Oe,Ke)}),x(R,fe)},$$slots:{default:!0}})}),x(J,ee)}),x(se,Q)},$$slots:{default:!0}})}),x(O,z)},$$slots:{default:!0}})}),x(v,k)}),x(c,h)};Pe(a,()=>xv,(c,d)=>{d(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return C.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return P(o),Yl(o,l=>I(n,l),()=>f(n)),x(e,o),re(s)}ne(Zg,{calendarClass:{}},[],["details"],{mode:"open"});function S2(e,t){te(t,!0);const r=new b2,n=r,i=gn(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 o={details:n},a=Y(),l=q(a),c=d=>{Zg(d,{get calendarClass(){return r}})};return ce(l,d=>{f(s)?.isCalendarVisible&&d(c)}),x(e,a),re(o)}customElements.define("go-calendar",ne(S2,{},[],["details"]));var E2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!C.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return pt(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}},x2=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function T2(e,t){te(t,!0);const r=new E2(gn(t.$$host));var n={details:r},i=x2(),s=M(i,!0);return P(i),ae((o,a,l)=>{i.disabled=o,me(i,"data-x",a),ie(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),ft("click",i,()=>r.addToCart()),x(e,i),re(n)}ar(["click"]),customElements.define("go-add-to-cart-button",ne(T2,{},[],["details"]));function A2(e,t){te(t,!0);let r=_(t,"custom",7,!1);fr.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,o=await C.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return Fn(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(A2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var co=null;async function Wg(){if(co)return co;if(!C.client)throw new Error("[go.api] Shop not initialized — call go.init({ shop, api, locale }) first.")}async function C2(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)if(n.method!=="load")try{await Hg[n.method](n.options)}catch(i){console.error(i)}e.go=Hg,t&&(t._queue=null)}var Hg={loaded:!0,config:e=>{Je.define(e)},init:async e=>{try{co=C.load("https://"+e.api,e.shop,e.locale),await co}catch(t){throw co=null,t}},api:{getCustomer:async()=>(await Wg(),C.asyncFetch(()=>C.getCustomer())),getOrders:async e=>(await Wg(),C.asyncFetch(()=>C.getOrders(e)))}};(async()=>await C2(window))()})();
75
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const a=o[1];if(t===o[0]){s(o);continue}if(e.external){const l=e.external.registry.get(o[0])?.id;if(t!==o[0]&&l){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Oh(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const l=e.seen.get(a);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),a._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=a._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:a,jsonSchema:c,path:l.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[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 a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(a)}Object.assign(i,r.def??r.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&i.id===s&&delete i.id;const o=e.external?.defs??{};for(const a of e.seen.entries()){const l=a[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Xo(t,"input",e.processors),output:Xo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}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 Jk=(e,t={})=>r=>{const n=Ah({...r,processors:t});return _t(e,n),Ch(n,e),Oh(n,e)},Xo=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=Ah({...i??{},target:s,io:t,processors:r});return _t(e,o),Ch(o,e),Oh(o,e)},Qk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xk=(e,t,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Qk[a]??a,i.format===""&&delete i.format,a==="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}))])}},eS=(e,t,r,n)=>{const i=r,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(o??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 o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},tS=(e,t,r,n)=>{r.not={}},rS=(e,t,r,n)=>{},nS=(e,t,r,n)=>{const i=e._zod.def,s=Zf(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},iS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},sS=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oS=(e,t,r,n)=>{const i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=_t(s.element,t,{...n,path:[...n.path,"items"]})},aS=(e,t,r,n)=>{const i=r,s=e._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=_t(o[c],t,{...n,path:[...n.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].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)},lS=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>_t(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},uS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=_t(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1;r.allOf=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]]},cS=(e,t,r,n)=>{const i=e._zod.def,s=_t(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},dS=(e,t,r,n)=>{const i=e._zod.def;_t(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},fS=(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))},hS=(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)))},pS=(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 o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},mS=(e,t,r,n)=>{const i=e._zod.def,s=i.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?s?i.out:i.in:i.out;_t(o,t,n);const a=t.seen.get(e);a.ref=o},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,r.readOnly=!0},Dh=(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=G("ZodISODateTime",(e,t)=>{x0.init(e,t),Qe.init(e,t)});function yS(e){return Ck(gS,e)}var bS=G("ZodISODate",(e,t)=>{T0.init(e,t),Qe.init(e,t)});function _S(e){return Ok(bS,e)}var wS=G("ZodISOTime",(e,t)=>{A0.init(e,t),Qe.init(e,t)});function kS(e){return Dk(wS,e)}var SS=G("ZodISODuration",(e,t)=>{C0.init(e,t),Qe.init(e,t)});function ES(e){return Ik(SS,e)}var xS=(e,t)=>{Qf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>gw(e,r)},flatten:{value:r=>vw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tu,2)}},isEmpty:{get(){return e.issues.length===0}}})},cr=G("ZodError",xS,{Parent:Error}),TS=ou(cr),AS=au(cr),CS=Ho(cr),OS=Go(cr),DS=_w(cr),IS=ww(cr),PS=kw(cr),$S=Sw(cr),MS=Ew(cr),FS=xw(cr),NS=Tw(cr),RS=Aw(cr),Ih=new WeakMap;function Ns(e,t,r){const n=Object.getPrototypeOf(e);let i=Ih.get(n);if(i||(i=new Set,Ih.set(n,i)),!i.has(t)){i.add(t);for(const s in r){const o=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const a=o.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var ct=G("ZodType",(e,t)=>(ut.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Xo(e,"input"),output:Xo(e,"output")}}),e.toJSONSchema=Jk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>TS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>CS(e,r,n),e.parseAsync=async(r,n)=>AS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>OS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>DS(e,r,n),e.decode=(r,n)=>IS(e,r,n),e.encodeAsync=async(r,n)=>PS(e,r,n),e.decodeAsync=async(r,n)=>$S(e,r,n),e.safeEncode=(r,n)=>MS(e,r,n),e.safeDecode=(r,n)=>FS(e,r,n),e.safeEncodeAsync=async(r,n)=>NS(e,r,n),e.safeDecodeAsync=async(r,n)=>RS(e,r,n),Ns(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(C1(r,n))},superRefine(r,n){return this.check(O1(r,n))},overwrite(r){return this.check(Ii(r))},optional(){return zh(this)},exactOptional(){return v1(this)},nullable(){return qh(this)},nullish(){return zh(qh(this))},nonoptional(r){return k1(this,r)},array(){return Rh(this)},or(r){return u1([this,r])},and(r){return d1(this,r)},transform(r){return Vh(this,p1(r))},default(r){return b1(this,r)},prefault(r){return w1(this,r)},catch(r){return E1(this,r)},pipe(r){return Vh(this,r)},readonly(){return A1(this)},describe(r){const n=this.clone();return Fs.add(n,{description:r}),n},meta(...r){if(r.length===0)return Fs.get(this);const n=this.clone();return Fs.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 Fs.get(e)?.description},configurable:!0}),e)),Ph=G("_ZodString",(e,t)=>{lu.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Xk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ns(e,"_ZodString",{regex(...n){return this.check(Nk(...n))},includes(...n){return this.check(zk(...n))},startsWith(...n){return this.check(qk(...n))},endsWith(...n){return this.check(Uk(...n))},min(...n){return this.check(Qo(...n))},max(...n){return this.check(xh(...n))},length(...n){return this.check(Th(...n))},nonempty(...n){return this.check(Qo(1,...n))},lowercase(n){return this.check(Rk(n))},uppercase(n){return this.check(Lk(n))},trim(){return this.check(Bk())},normalize(...n){return this.check(Vk(...n))},toLowerCase(){return this.check(jk())},toUpperCase(){return this.check(Zk())},slugify(){return this.check(Wk())}})}),LS=G("ZodString",(e,t)=>{lu.init(e,t),Ph.init(e,t),e.email=r=>e.check(ak(zS,r)),e.url=r=>e.check(fk(qS,r)),e.jwt=r=>e.check(Ak(t1,r)),e.emoji=r=>e.check(hk(US,r)),e.guid=r=>e.check(wh($h,r)),e.uuid=r=>e.check(lk(ea,r)),e.uuidv4=r=>e.check(uk(ea,r)),e.uuidv6=r=>e.check(ck(ea,r)),e.uuidv7=r=>e.check(dk(ea,r)),e.nanoid=r=>e.check(pk(VS,r)),e.guid=r=>e.check(wh($h,r)),e.cuid=r=>e.check(mk(BS,r)),e.cuid2=r=>e.check(vk(jS,r)),e.ulid=r=>e.check(gk(ZS,r)),e.base64=r=>e.check(Ek(QS,r)),e.base64url=r=>e.check(xk(XS,r)),e.xid=r=>e.check(yk(WS,r)),e.ksuid=r=>e.check(bk(HS,r)),e.ipv4=r=>e.check(_k(GS,r)),e.ipv6=r=>e.check(wk(KS,r)),e.cidrv4=r=>e.check(kk(YS,r)),e.cidrv6=r=>e.check(Sk(JS,r)),e.e164=r=>e.check(Tk(e1,r)),e.datetime=r=>e.check(yS(r)),e.date=r=>e.check(_S(r)),e.time=r=>e.check(kS(r)),e.duration=r=>e.check(ES(r))});function dr(e){return ok(LS,e)}var Qe=G("ZodStringFormat",(e,t)=>{Ye.init(e,t),Ph.init(e,t)}),zS=G("ZodEmail",(e,t)=>{v0.init(e,t),Qe.init(e,t)}),$h=G("ZodGUID",(e,t)=>{p0.init(e,t),Qe.init(e,t)}),ea=G("ZodUUID",(e,t)=>{m0.init(e,t),Qe.init(e,t)}),qS=G("ZodURL",(e,t)=>{g0.init(e,t),Qe.init(e,t)}),US=G("ZodEmoji",(e,t)=>{y0.init(e,t),Qe.init(e,t)}),VS=G("ZodNanoID",(e,t)=>{b0.init(e,t),Qe.init(e,t)}),BS=G("ZodCUID",(e,t)=>{_0.init(e,t),Qe.init(e,t)}),jS=G("ZodCUID2",(e,t)=>{w0.init(e,t),Qe.init(e,t)}),ZS=G("ZodULID",(e,t)=>{k0.init(e,t),Qe.init(e,t)}),WS=G("ZodXID",(e,t)=>{S0.init(e,t),Qe.init(e,t)}),HS=G("ZodKSUID",(e,t)=>{E0.init(e,t),Qe.init(e,t)}),GS=G("ZodIPv4",(e,t)=>{O0.init(e,t),Qe.init(e,t)}),KS=G("ZodIPv6",(e,t)=>{D0.init(e,t),Qe.init(e,t)}),YS=G("ZodCIDRv4",(e,t)=>{I0.init(e,t),Qe.init(e,t)}),JS=G("ZodCIDRv6",(e,t)=>{P0.init(e,t),Qe.init(e,t)}),QS=G("ZodBase64",(e,t)=>{$0.init(e,t),Qe.init(e,t)}),XS=G("ZodBase64URL",(e,t)=>{F0.init(e,t),Qe.init(e,t)}),e1=G("ZodE164",(e,t)=>{N0.init(e,t),Qe.init(e,t)}),t1=G("ZodJWT",(e,t)=>{L0.init(e,t),Qe.init(e,t)}),Mh=G("ZodNumber",(e,t)=>{lh.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(n,i,s)=>eS(e,n,i,s),Ns(e,"ZodNumber",{gt(n,i){return this.check(Sh(n,i))},gte(n,i){return this.check(du(n,i))},min(n,i){return this.check(du(n,i))},lt(n,i){return this.check(kh(n,i))},lte(n,i){return this.check(cu(n,i))},max(n,i){return this.check(cu(n,i))},int(n){return this.check(Fh(n))},safe(n){return this.check(Fh(n))},positive(n){return this.check(Sh(0,n))},nonnegative(n){return this.check(du(0,n))},negative(n){return this.check(kh(0,n))},nonpositive(n){return this.check(cu(0,n))},multipleOf(n,i){return this.check(Eh(n,i))},step(n,i){return this.check(Eh(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 Rs(e){return Pk(Mh,e)}var r1=G("ZodNumberFormat",(e,t)=>{z0.init(e,t),Mh.init(e,t)});function Fh(e){return $k(r1,e)}var n1=G("ZodUnknown",(e,t)=>{q0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>rS(e,r,n,i)});function Nh(){return Mk(n1)}var i1=G("ZodNever",(e,t)=>{U0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>tS(e,r,n,i)});function s1(e){return Fk(i1,e)}var o1=G("ZodArray",(e,t)=>{V0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oS(e,r,n,i),e.element=t.element,Ns(e,"ZodArray",{min(r,n){return this.check(Qo(r,n))},nonempty(r){return this.check(Qo(1,r))},max(r,n){return this.check(xh(r,n))},length(r,n){return this.check(Th(r,n))},unwrap(){return this.element}})});function Rh(e,t){return Hk(o1,e,t)}var a1=G("ZodObject",(e,t)=>{j0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aS(e,r,n,i),Be(e,"shape",()=>t.shape),Ns(e,"ZodObject",{keyof(){return f1(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Nh()})},loose(){return this.clone({...this._zod.def,catchall:Nh()})},strict(){return this.clone({...this._zod.def,catchall:s1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return cw(this,r)},safeExtend(r){return dw(this,r)},merge(r){return fw(this,r)},pick(r){return lw(this,r)},omit(r){return uw(this,r)},partial(...r){return hw(Lh,this,r[0])},required(...r){return pw(Uh,this,r[0])}})});function fu(e,t){return new a1({type:"object",shape:e??{},...be(t)})}var l1=G("ZodUnion",(e,t)=>{Z0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lS(e,r,n,i),e.options=t.options});function u1(e,t){return new l1({type:"union",options:e,...be(t)})}var c1=G("ZodIntersection",(e,t)=>{W0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uS(e,r,n,i)});function d1(e,t){return new c1({type:"intersection",left:e,right:t})}var hu=G("ZodEnum",(e,t)=>{H0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(n,i,s)=>nS(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 o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new hu({...t,checks:[],...be(i),entries:s})},e.exclude=(n,i)=>{const s={...t.entries};for(const o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new hu({...t,checks:[],...be(i),entries:s})}});function f1(e,t){return new hu({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...be(t)})}var h1=G("ZodTransform",(e,t)=>{G0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>sS(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ms(s,r.value,t));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(Ms(o))}};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 p1(e){return new h1({type:"transform",transform:e})}var Lh=G("ZodOptional",(e,t)=>{mh.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function zh(e){return new Lh({type:"optional",innerType:e})}var m1=G("ZodExactOptional",(e,t)=>{K0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Dh(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function v1(e){return new m1({type:"optional",innerType:e})}var g1=G("ZodNullable",(e,t)=>{Y0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new g1({type:"nullable",innerType:e})}var y1=G("ZodDefault",(e,t)=>{J0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function b1(e,t){return new y1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var _1=G("ZodPrefault",(e,t)=>{Q0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function w1(e,t){return new _1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Kf(t)}})}var Uh=G("ZodNonOptional",(e,t)=>{X0.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function k1(e,t){return new Uh({type:"nonoptional",innerType:e,...be(t)})}var S1=G("ZodCatch",(e,t)=>{ek.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function E1(e,t){return new S1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var x1=G("ZodPipe",(e,t)=>{tk.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mS(e,r,n,i),e.in=t.in,e.out=t.out});function Vh(e,t){return new x1({type:"pipe",in:e,out:t})}var T1=G("ZodReadonly",(e,t)=>{rk.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vS(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function A1(e){return new T1({type:"readonly",innerType:e})}var Bh=G("ZodCustom",(e,t)=>{nk.init(e,t),ct.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iS(e,r,n,i)});function C1(e,t={}){return Gk(Bh,e,t)}function O1(e,t){return Kk(e,t)}function D1(e,t={}){const r=new Bh({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 I1=fu({id:Rs(),customer:fu({customer_salutation_id:Rs().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:Rs().positive().default(60),language_id:Rs().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),EF=fu({ticket_sale_id:Rs(),start_at:dr().date(),personalizations:Rh(I1)});function pu(e,t){return e-t*Math.floor(e/t)}var jh=1721426;function ta(e,t,r,n){t=mu(e,t);let i=t-1,s=-2;return r<=2?s=0:ra(t)&&(s=-1),jh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function ra(e){return e%4===0&&(e%100!==0||e%400===0)}function mu(e,t){return e==="BC"?1-t:t}function P1(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}var $1={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]},Pi=class{fromJulianDay(e){let t=e,r=t-jh,n=Math.floor(r/146097),i=pu(r,146097),s=Math.floor(i/36524),o=pu(i,36524),a=Math.floor(o/1461),l=pu(o,1461),c=Math.floor(l/365),[d,u]=P1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),p=t-ta(d,u,1,1),h=2;t<ta(d,u,3,1)?h=0:ra(u)&&(h=1);let g=Math.floor(((p+h)*12+373)/367);return new Us(d,u,g,t-ta(d,u,g,1)+1)}toJulianDay(e){return ta(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return $1[ra(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ra(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"}},M1={"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 vu(e,t){return t=Yt(t,e.calendar),e=yu(e),t=yu(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function F1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function N1(e,t){return On(e,ei(t))}var R1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Zh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?R1[r]:V1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function L1(e){return Ur(Date.now(),e)}function ei(e){return Z1(L1(e))}function Wh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Hh(e,t){return Gh(e)-Gh(t)}function Gh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var gu=null,z1=!1;function Vt(){return gu==null&&(gu=new Intl.DateTimeFormat().resolvedOptions().timeZone),gu}function Kh(){return z1}function yu(e){return e.subtract({days:e.day-1})}function q1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Yh=new Map,bu=new Map;function U1(e){if(Intl.Locale){let r=Yh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Yh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function V1(e){let t=bu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return bu.set(e,t),t.firstDay}let r=U1(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&&M1[r]||0};bu.set(e,t)}return t.firstDay}function Dn(e){return e=Yt(e,new Pi),Jh(mu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Jh(e,t,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(e,t-1,r),a.getTime()}function Ls(e,t){if(t==="UTC")return 0;if(e>0&&t===Vt()&&!Kh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=Xh(e,t);return Jh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var Qh=new Map;function Xh(e,t){let r=Qh.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"}),Qh.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 na=864e5;function B1(e,t){let r=Dn(e);return ep(e,t,r-Ls(r-na,t),r-Ls(r+na,t))}function ep(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>j1(e,t,i))}function j1(e,t,r){let n=Xh(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 qr(e,t,r="compatible"){let n=In(e);if(t==="UTC")return Dn(n);if(t===Vt()&&r==="compatible"&&!Kh()){n=Yt(n,new Pi);let l=new Date,c=mu(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=Ls(i-na,t),o=Ls(i+na,t),a=ep(n,t,i-s,i-o);if(a.length===1)return a[0];if(a.length>1)switch(r){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(i-s,i-o);case"compatible":case"later":return Math.max(i-s,i-o);case"reject":throw new RangeError("No such absolute time found")}}function tp(e,t,r="compatible"){return new Date(qr(e,t,r))}function Ur(e,t){let r=Ls(e,t),n=new Date(e+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new Pn(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function Z1(e){return new Us(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 $i(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function W1(e){return new oE(e.hour,e.minute,e.second,e.millisecond)}function Yt(e,t){if(F1(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 H1(e,t,r){return e instanceof Pn?e.timeZone===t?e:rp(e,t):Ur(qr(e,t,r),t)}function G1(e){let t=Dn(e)-e.offset;return new Date(t)}function rp(e,t){return Yt(Ur(Dn(e)-e.offset,t),e.calendar)}var zs=36e5;function ia(e,t){let r=e.copy(),n="hour"in r?op(r,t):0;_u(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,wu(r),np(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,K1(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 o=r.calendar.isInverseEra?.(r);r.year=i,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?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 _u(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function wu(e){for(;e.month<1;)_u(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,_u(e,1)}function K1(e){for(;e.day<1;)e.month--,wu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,wu(e)}function np(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)),np(e)}function ku(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function ip(e,t){return ia(e,ku(t))}function Su(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 qs(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),sp(r),r}function Y1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=sa(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=sa(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=sa(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=sa(e.hour,24),t}function sp(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 sa(e,t){let r=e%t;return r<0&&(r+=t),r}function op(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Y1(e)}function ap(e,t){let r=e.copy();return op(r,t),r}function J1(e,t){return ap(e,ku(t))}function Eu(e,t,r,n){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),o=s.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=on(o,r,0,s.length-1,n?.round),i.era=s[o],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 xu(e,t,r,n){let i=e.copy();switch(t){case"hour":{let s=e.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=on(s,r,o,a,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 lp(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=qr(ia(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(Ur(r,e.timeZone),e.calendar)}function Q1(e,t){return lp(e,ku(t))}function X1(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 o=In(e),a=Yt(qs(o,{hour:i}),new Pi),l=[qr(a,e.timeZone,"earlier"),qr(a,e.timeZone,"later")].filter(g=>Ur(g,e.timeZone).day===a.day)[0],c=Yt(qs(o,{hour:s}),new Pi),d=[qr(c,e.timeZone,"earlier"),qr(c,e.timeZone,"later")].filter(g=>Ur(g,e.timeZone).day===c.day).pop(),u=Dn(e)-e.offset,p=Math.floor(u/zs),h=u%zs;return u=on(p,r,Math.floor(l/zs),Math.floor(d/zs),n?.round)*zs+h,Yt(Ur(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return xu(e,t,r,n);case"era":case"year":case"month":case"day":return Yt(Ur(qr(Eu(In(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function eE(e,t,r){let n=In(e),i=qs(Su(n,t),t);return i.compare(n)===0?e:Yt(Ur(qr(i,e.timeZone,r),e.timeZone),e.calendar)}var tE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,rE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,nE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Tu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,iE=["hours","minutes","seconds"],xF=["years","months","weeks","days",...iE];function oa(e){let t=e.match(tE);if(!t)throw Tu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Us(qe(t[1],0,9999),qe(t[2],1,12),1);return r.day=qe(t[3],1,r.calendar.getDaysInMonth(r)),r}function up(e){let t=e.match(rE);if(!t)throw Tu.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 $i(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 cp(e,t){let r=e.match(nE);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),o;if(r[8]){let a=qe(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),o=Dn(i)-i.offset,!B1(s,i.timeZone).includes(o))throw new Error(`Offset ${pp(i.offset)} is invalid for ${Au(i)} in ${i.timeZone}`)}else o=qr(In(s),i.timeZone,t);return Ur(o,i.timeZone)}function dp(e,t){let r=e.match(Tu);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),rp(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 fp(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 hp(e){let t=Yt(e,new Pi),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 Au(e){return`${hp(e)}T${fp(e)}`}function pp(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 sE(e){return`${Au(e)}${pp(e.offset)}[${e.timeZone}]`}function Cu(e){let t=typeof e[0]=="object"?e.shift():new Pi,r;if(typeof e[0]=="string")r=e.shift();else{let o=t.getEras();r=o[o.length-1]}let n=e.shift(),i=e.shift(),s=e.shift();return[t,r,n,i,s]}var Us=class ud{#e;constructor(...t){let[r,n,i,s,o]=Cu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,ti(this)}copy(){return this.era?new ud(this.calendar,this.era,this.year,this.month,this.day):new ud(this.calendar,this.year,this.month,this.day)}add(t){return ia(this,t)}subtract(t){return ip(this,t)}set(t){return Su(this,t)}cycle(t,r,n){return Eu(this,t,r,n)}toDate(t){return tp(this,t)}toString(){return hp(this)}compare(t){return Wh(this,t)}},oE=class oy{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,sp(this)}copy(){return new oy(this.hour,this.minute,this.second,this.millisecond)}add(t){return ap(this,t)}subtract(t){return J1(this,t)}set(t){return qs(this,t)}cycle(t,r,n){return xu(this,t,r,n)}toString(){return fp(this)}compare(t){return Hh(this,t)}},$i=class cd{#e;constructor(...t){let[r,n,i,s,o]=Cu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,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 cd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new cd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ia(this,t)}subtract(t){return ip(this,t)}set(t){return Su(qs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Eu(this,t,r,n);default:return xu(this,t,r,n)}}toDate(t,r){return tp(this,t,r)}toString(){return Au(this)}compare(t){let r=Wh(this,t);return r===0?Hh(this,In(t)):r}},Pn=class dd{#e;constructor(...t){let[r,n,i,s,o]=Cu(t),a=t.shift(),l=t.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,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 dd(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dd(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return lp(this,t)}subtract(t){return Q1(this,t)}set(t,r){return eE(this,t,r)}cycle(t,r,n){return X1(this,t,r,n)}toDate(){return G1(this)}toString(){return sE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-H1(t,this.timeZone).toDate().getTime()}},Ou=new Map,kr=class{constructor(e,t={}){this.formatter=mp(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 uE()&&(this.resolvedHourCycle||(this.resolvedHourCycle=cE(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}},aE={true:{ja:"h11"},false:{}};function mp(e,t={}){if(typeof t.hour12=="boolean"&&lE()){t={...t};let i=aE[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(Ou.has(r))return Ou.get(r);let n=new Intl.DateTimeFormat(e,t);return Ou.set(r,n),n}var Du=null;function lE(){return Du==null&&(Du=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Du}var Iu=null;function uE(){return Iu==null&&(Iu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Iu}function cE(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=mp(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 Vs(e){return W1(dp(e,"Europe/Berlin")).toString().slice(0,-3)}function Bs(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){const n=dp(e instanceof Date?e.toISOString():e,"Europe/Berlin");return new kr(r,{timeZone:n.timeZone,...t}).format(n.toDate())}function aa(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function Pu(e){return e?.type==="Ticket"}function Vr(e){const t=e;return!!t&&t.type==="Ticket"&&t.is_mantle===!0&&!!t.sub_tickets&&Object.keys(t.sub_tickets).length>0}function js(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 la(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 J_(Object.values(e).map(r=>la(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 vp=e=>sn(Object.values(e.mantle?.composition??{}));function dE(e){const t=e.quantity??0;return Vr(e.product)?t*vp(e):t}function $u(e,t,r,n){e.clearPrecart();let i=0;for(const s of[...r.items,...t.items]){if(!Pu(s.product))continue;const o=dE(s);s===n&&(i=o),e.addPrecartItemQuantity(s.product.id,o)}return i}var fE=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!Pu(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager,o=$u(s,t,n,r),a=s.ticketCapacity(i.id,i.selectedTime,o),l=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,a),min:i.min_persons||0,bookedOut:a===0,unavailable:l===0}},hE=function(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxQuantity_Mantle) impossible");if(!Vr(r.product))throw new Error("(maxQuantity_Mantle) impossible");const i=r.product,s=e.quotaManager,o=$u(s,t,n,r),a=s.ticketCapacity(i.id,i.selectedTime,o),l=s.totalCapacity(i.id,i.selectedTime),c=vp(r),d=c>1?Math.floor(a/c):a;return{max:Math.min(i.max_persons||100,d),min:i.min_persons||0,bookedOut:d===0,unavailable:l===0}},pE=e=>Object.fromEntries(js(e).map(t=>[t.id,t.max_persons]));function mE(e,t,r,n){if(e.capacityPolicy(r)!=="mantle")throw new Error("(maxSubQuantities) impossible");if(!Vr(r.product))throw new Error("(maxSubQuantities) impossible");const i=r.product,s=r.quantity??0;let o=1/0;return s>0&&($u(e.quotaManager,t,n,r),o=Math.floor(e.quotaManager.ticketCapacity(i.id,i.selectedTime,0)/s)),Object.fromEntries(js(i).map(a=>[a.id,Math.min(a.max_persons,(r.mantle?.composition?.[a.id]??0)+o)]))}function ua(e){return e?.type==="Event"}function vE(e){return ua(e)&&e.subtype==="scale"}function gE(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 Mu(e,t,r){return gE(e,t,r)}var yE=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!ua(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 o=Math.min(s.max||100,s.max_per_registration||100,s.available??100),a={max_per_registration:o,available:100,overbook:!1,...s};let l=o;a.overbook&&(l=Math.min(a.max||100,a.max_per_registration||100));const c=n.totalQuantity,d=sn(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:a.min??0,unavailable:a.available===0,bookedOut:u===0}},bE=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 _E(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=sn(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(o=>({timeslot:t,ticket:o,quota:s.quota,capacity:s.capacity,totalCapacity:s.totalCapacity})))},ticketCapacity(t,r,n=this.getPrecartItemQuantity(t)){const i=eu(this.filterBy({timeslot:r,ticketId:t}).map(s=>s.capacity))??0;return Math.max(0,i+n)},totalCapacity(t,r){return eu(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(o=>r.includes(o))));const i=Y_(n,s=>s.timeSlot);return Object.values(i).map(s=>Q_(X_(s.flatMap(o=>o.tickets)).map(o=>eu(s.filter(a=>a.tickets.includes(o)),a=>a.capacity)).filter(o=>o!==null),o=>o.capacity)??s[0]).sort((s,o)=>s.timeSlot.localeCompare(o.timeSlot))}}}function wE(e){let t=0;ks(()=>{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}))})})}var kE=0;function mt(e,t){const r={quantity:0,time:"",...t??{}};return Vr(e)&&(r.mantle={composition:r.mantle?.composition??Object.fromEntries(js(e).map(n=>[n.id,n.max_persons])),key:r.mantle?.key??`mantle-${kE++}`}),{...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,...Vr(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};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}`),vE(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),Vr(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 TF=15*6e4;function ca(){return typeof window<"u"&&typeof localStorage<"u"}function SE(e,t){if(ca())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Fu(e){if(!ca())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 gp(e){if(ca())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}function yp(e){return{...e,description:"",tax_included:!0,type:"Coupon"}}var bp="go-cart",da=(e,t)=>localStorage.setItem(bp,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function EE(e){const t=e.product.type;switch(t){case"Ticket":return _p(e)?mt(la(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity,mantle:e.mantle}):void 0;case"Event":return _p(e)?mt(Mu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;case"Coupon":return mt(yp(e.product),{quantity:e.quantity});default:throw new Error(`Unhandled case: ${t}`)}}function xE(e){let t=[],r=[],n;try{const i=localStorage.getItem(bp);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(),da([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(EE).filter(OE),e.clearCoupons(),r.forEach(o=>e.addCoupon(typeof o=="string"?{code:o,kind:"actionToken"}:o)),e.items)}catch(i){return console.error(i),da([],[]),[]}}function TE(e){xE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});da(e.items||[],e.coupons||[]),ks(()=>{ge(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,da(e.items||[],e.coupons||[]))})})}var AE=e=>new Date<new Date(e),CE=e=>oa(e.slice(0,10)).compare(ei(Vt()))>=0,_p=e=>e.time?e.product.subtype==="day"?CE(e.time):AE(e.time):!0,OE=e=>e!==void 0,DE=0;function Mi(e,t=20){const r={items:Me([]),coupons:Me([]),paymentModeId:void 0,uid:`cart-${DE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,sn(this.items,n=>n.total_price_cents))},get totalQuantity(){return sn(this.items,n=>n.quantity)},get valueVoucherCents(){return sn(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(o=>o.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(mt(n))),r}function fr(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function IE(){const e=Me(Mi());return TE(e),wE(e),e}var Fi="go-capacity";function wp(e,t){const r=Fu(Fi);SE(Fi,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function kp(e){const t=Fu(Fi);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){gp(Fi);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 PE(e){ca()&&window.addEventListener("storage",t=>{if(t.key===Fi&&kp(e),t.key==="go-cart"){const r=Fu("go-cart");(!r||!r.items||r.items.length===0)&&gp(Fi)}})}function Sp(){const e={allSeats:{},allQuotas:{},quotaManager:_E({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&wp(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&wp(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 Vr(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";default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:fE,mantle:hE,seats:yE,unlimited:bE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Re(()=>s(this,t,r,n))},subTicketMaxes(t,r,n){if(!Vr(r.product))return{};const i=this.capacityPolicy(r);if(i!=="mantle"&&i!=="unlimited")throw new Error(`(subTicketMaxes) impossible: ${i}`);return Re(()=>i==="mantle"?mE(this,t,r,n):pE(r.product))}};return kp(e),PE(e),e}function Ep(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 xp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},$E=class extends xp{constructor(){super()}get isLoggedIn(){try{const e=Ep("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=Ep("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}}},ME=class extends xp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},FE=e=>{switch(e){case"angular":return new $E;case"jmb":return new ME;default:throw new Error("Unhandled shop type: "+e)}};function NE(e){return e==null||typeof e=="string"&&e.trim()===""}function RE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||NE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function LE(e,t){return RE(e,t)}var zE={withStackTrace:!1},Tp=(e,t,r=zE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ri(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{c(n.next(d))}catch(u){o(u)}}function l(d){try{c(n.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):i(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function Ap(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 Br(e){return this instanceof Br?(this.v=e,this):new Br(e)}function Cp(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),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(g){return Promise.resolve(g).then(h,u)}}function a(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 Br?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 qE(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(o){return(r=!r)?{value:Br(e[i](o)),done:!1}:s?s(o):o}:s}}function UE(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 Ap=="function"?Ap(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(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var ni=class yr{constructor(t){this._promise=t}static fromSafePromise(t){return new yr(t.then(r=>new Zr(r)))}static fromPromise(t,r){return new yr(t.then(n=>new Zr(n)).catch(n=>new Sr(r(n))))}static fromThrowable(t,r){return(...n)=>new yr(ri(this,void 0,void 0,function*(){try{return new Zr(yield t(...n))}catch(i){return new Sr(r?r(i):i)}}))}static combine(t){return VE(t)}static combineWithAllErrors(t){return BE(t)}map(t){return new yr(this._promise.then(r=>ri(this,void 0,void 0,function*(){return r.isErr()?new Sr(r.error):new Zr(yield t(r.value))})))}andThrough(t){return new yr(this._promise.then(r=>ri(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 Zr(r.value)})))}andTee(t){return new yr(this._promise.then(r=>ri(this,void 0,void 0,function*(){if(r.isErr())return new Sr(r.error);try{yield t(r.value)}catch{}return new Zr(r.value)})))}orTee(t){return new yr(this._promise.then(r=>ri(this,void 0,void 0,function*(){if(r.isOk())return new Zr(r.value);try{yield t(r.error)}catch{}return new Sr(r.error)})))}mapErr(t){return new yr(this._promise.then(r=>ri(this,void 0,void 0,function*(){return r.isOk()?new Zr(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=>ri(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new Zr(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 Cp(this,arguments,function*(){return yield Br(yield Br(yield*qE(UE(yield Br(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Cp(this,arguments,function*(){const r=yield Br(this._promise);return r.isErr()&&(yield yield Br(fa(r.error))),yield Br(r.value)})}};function fa(e){return new ni(Promise.resolve(new Sr(e)))}var AF=ni.fromPromise,CF=ni.fromSafePromise,OF=ni.fromThrowable,Op=e=>{let t=Fn([]);for(const r of e)if(r.isErr()){t=jr(r.error);break}else t.map(n=>n.push(r.value));return t},VE=e=>ni.fromSafePromise(Promise.all(e)).andThen(Op),Dp=e=>{let t=Fn([]);for(const r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=jr([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},BE=e=>ni.fromSafePromise(Promise.all(e)).andThen(Dp),Nu;(function(e){function t(i,s){return(...o)=>{try{return Fn(i(...o))}catch(a){return jr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return Op(i)}e.combine=r;function n(i){return Dp(i)}e.combineWithAllErrors=n})(Nu||(Nu={}));function Fn(e){return new Zr(e)}function jr(e){return new Sr(e)}var Zr=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 ni.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 Tp("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 jr(this.error)}mapErr(e){return jr(e(this.error))}andThrough(e){return jr(this.error)}andTee(e){return jr(this.error)}orTee(e){try{e(this.error)}catch{}return jr(this.error)}andThen(e){return jr(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return fa(this.error)}asyncAndThrough(e){return fa(this.error)}asyncMap(e){return fa(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield jr(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Tp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},DF=Nu.fromThrowable,jE=/\{[^{}]+\}/g,ZE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function WE(){return Math.random().toString(36).slice(2,11)}function HE(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,pathSerializer:o,headers:a,requestInitExt:l=void 0,...c}={...e};l=ZE()?l:void 0,t=Fp(t);const d=[];async function u(p,h){const{baseUrl:g,fetch:m=n,Request:v=r,headers:y,params:k={},parseAs:E="json",querySerializer:x,bodySerializer:A=s??KE,pathSerializer:O,body:$,middleware:z=[],...B}=h||{};let N=t;g&&(N=Fp(g)??t);let V=typeof i=="function"?i:$p(i);x&&(V=typeof x=="function"?x:$p({...typeof i=="object"?i:{},...x}));const U=O||o||GE,oe=$===void 0?void 0:A($,Mp(a,y,k.header)),pe=Mp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},a,y,k.header),J=[...d,...z],ae={redirect:"follow",...c,...B,body:oe,headers:pe};let Q,de,le=new v(YE(p,{baseUrl:N,params:k,querySerializer:V,pathSerializer:U}),ae),W;for(const F in B)F in le||(le[F]=B[F]);if(J.length){Q=WE(),de=Object.freeze({baseUrl:N,fetch:m,parseAs:E,querySerializer:V,bodySerializer:A,pathSerializer:U});for(const F of J)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const H=await F.onRequest({request:le,schemaPath:p,params:k,options:de,id:Q});if(H)if(H instanceof v)le=H;else if(H instanceof Response){W=H;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!W){try{W=await m(le,l)}catch(F){let H=F;if(J.length)for(let R=J.length-1;R>=0;R--){const ve=J[R];if(ve&&typeof ve=="object"&&typeof ve.onError=="function"){const fe=await ve.onError({request:le,error:H,schemaPath:p,params:k,options:de,id:Q});if(fe){if(fe instanceof Response){H=void 0,W=fe;break}if(fe instanceof Error){H=fe;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(H)throw H}if(J.length)for(let F=J.length-1;F>=0;F--){const H=J[F];if(H&&typeof H=="object"&&typeof H.onResponse=="function"){const R=await H.onResponse({request:le,response:W,schemaPath:p,params:k,options:de,id:Q});if(R){if(!(R instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");W=R}}}}const X=W.headers.get("Content-Length");if(W.status===204||le.method==="HEAD"||X==="0"&&!W.headers.get("Transfer-Encoding")?.includes("chunked"))return W.ok?{data:void 0,response:W}:{error:void 0,response:W};if(W.ok)return{data:await(async()=>{if(E==="stream")return W.body;if(E==="json"&&!X){const H=await W.text();return H?JSON.parse(H):void 0}return await W[E]()})(),response:W};let ue=await W.text();try{ue=JSON.parse(ue)}catch{}return{error:ue,response:W}}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 ha(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 Ip(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 a in t)n.push(a,r.allowReserved===!0?t[a]:encodeURIComponent(t[a]));const o=n.join(",");switch(r.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const a=r.style==="deepObject"?`${e}[${o}]`:o;n.push(ha(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Pp(e,t,r){if(!Array.isArray(t))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?t:t.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}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(ha(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function $p(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(Pp(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(Ip(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(ha(i,s,e))}}return n.join("&")}}function GE(e,t){let r=e;for(const n of e.match(jE)??[]){let i=n.substring(1,n.length-1),s=!1,o="simple";if(i.endsWith("*")&&(s=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const a=t[i];if(Array.isArray(a)){r=r.replace(n,Pp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,Ip(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${ha(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function KE(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 YE(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 Mp(...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 o of s)t.append(i,o);else s!==void 0&&t.set(i,s)}return t}function Fp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function JE(e,t){return HE({baseUrl:e,headers:{"X-Shop-Url":t}})}var QE="/api/v4/calendar",XE="/api/v4/tickets/calendar",ex="/api/v4/auth/validate_token",tx="/api/v4/tickets/list_and_quotas",rx="/api/v4/tickets",nx="/api/v4/auth/sign_in",ix="/api/v4/auth",sx="/api/v4/orders/withdrawals",ox="/api/v4/customer/memberships/activate",ax="/api/v4/orders",Np={SHOP_GUEST:10,SHOP:20},Rp={error:{success:!1,errors:["Not signed in"]}},lx=class{type;#e=re(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=B_(this.type),f(this.#e).currentUser=FE(this.type),f(this.#e).apiUrl=e,f(this.#e).shopDomain=t,f(this.#e).locale=r||"de",this.#t={},f(this.#e).client=JE(e,t),f(this.#e).capacityManager=Sp(),f(this.#e).cart=IE(),f(this.#e).auth=new Vf,f(this.#e).client.use(new tw(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return f(this.#e).capacityManager||(f(this.#e).capacityManager=Sp()),f(this.#e).capacityManager}get cart(){return f(this.#e).cart}get auth(){return f(this.#e).auth||(f(this.#e).auth=new Vf),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(ex,"getCustomer","",{cache:5}):Rp}getOrders(e={}){return this.auth.data.accessToken?this.fetchAndCache(ax,`orders-${JSON.stringify(e)}`,"",{cache:5,query:e}):Rp}ticketsCalendar(e){return this.fetchAndCache(XE,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(QE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(tx,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:Et({per_page:100},e??{})})}tickets(e){return this.fetchAndCache(rx,`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(nx,{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?Np.SHOP_GUEST:Np.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(ix,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(sx,{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(ox,{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),o=!this.#t[s],a=this.#t[s]?.fetchedAt<Date.now()-n.cache*1e3;return(o||a)&&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,o=LE(r,i);if(Object.keys(o).length>0)return{error:{errors:o}};const a=this.client[t.method];return await a(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 W_(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 lx;function Ni(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 ux=class ay{host;KEY;pollDuration;#e=re(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 ay(null,null);return r.value=t,r}load(){Ql(()=>(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 Ri(e){return function(t,r={pollDuration:1e3}){if(t){const n=new ux(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 cx={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{},quantityStepper:!0},dx=class{defaultConfig=Et(cx,window.customOptions);override=this.defaultConfig;#e=re(Me(this.defaultConfig));get options(){return f(this.#e)}set options(e){I(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 dx,Lp=class{#e=re();get token(){return f(this.#e)}set token(e){I(this.#e,e,!0)}#t=re();get ticketSaleId(){return f(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return hl(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return hl(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)}},zp="go-annual-ticket-personalization",qp=Ni(zp),fx=Ri(zp),hx=j("<li><a> </a></li>"),px=j('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function mx(e,t){ee(t,!0);let r=_(t,"token",7);const n=new Lp;qp(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()}},o=Y(),a=q(o),l=c=>{var d=Y(),u=q(d);Le(u,17,()=>f(i).ticket_sales,p=>p.id,(p,h)=>{var g=px(),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=M(y,!0);P(y);var E=K(y,2),x=A=>{var O=hx(),$=M(O),z=M($,!0);P($),P(O),se((B,N)=>{me($,"href",B),ie(z,N)},[()=>n.goToPersonalization(f(h)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),S(A,O)};ce(E,A=>{f(h).status=="not_ready_to_send"&&A(x)}),P(g),se(A=>{me(g,"data-ticket-sale-id",f(h).id),ie(v,f(h).title),ie(k,A)},[()=>C.t("ticket.annual.personalization.detail.title",{count:f(h).personalizations.length})]),S(p,g)}),S(c,d)};return ce(a,c=>{f(i)&&c(l)}),S(e,o),te(s)}customElements.define("go-annual-ticket-personalization",ne(mx,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var vx={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:D1(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 gx(e,t){return{...e,errors:e.errors||[],value:e.value??yx(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){bx(this)}}}function yx(e){return e==="checkbox"?!1:e==="file"?null:""}function bx(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 rl{static#e={};static defineForm(t){Je.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Je.default({fields:t})}static{rl.defineFields(vx)}static setRequiredApiKeys(t,r){rl.#e[t]=r}static getFormOptions(t){return Je.config.forms[t]}static createField(t,r){const n=rl.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return gx(n,r)}static getFormFields(t){return _x(t)}static getFieldInit(t){return Je.config.fields[t]}};function _x(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 Ru(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function wx(e,t){ee(t,!0);let r=_(t,"token",7),n=_(t,"ticketSaleId",7),i;const s=new Lp;qp(t.$$host,s),ge(()=>{s.token=r(),s.ticketSaleId=n()}),Jt.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const m=s.ticketSale.personalizations.length,v=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),y=Uf(m,(A,O)=>{const $=v[O-1].details;return A.push($),A},[]);if(y.forEach(A=>{A.fields.forEach(O=>{A.validateField(O)})}),!Uf(m,(A,O)=>y[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const A=y.map(async($,z)=>{const B=s.ticketSale.personalizations[z].id,N=$.fields.find(U=>U.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const V=await C.uploadPersonalizationPhoto(r(),B,N);return V.error?{ok:!1,error:V.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(A)).find($=>!$.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((A,O)=>{const $=ew(A.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},E=await C.finalizePersonalizations(r(),k);if(E.error){i.details.apiErrors=[E.error.error];return}const x=Je.config.forms.personalization?.beforeSubmit;x&&x(k),Je.config.urls.annualTicketPersonalizationFormSubmit?.()&&Je.config.navigateTo(Je.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function p(){return a?!0:(a=t.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),u(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function h(m){if(!p()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const y=Math.max(m,1),k=Array.from(v.querySelectorAll("go-personalization-form"));for(;k.length<y;){const x=l.cloneNode(!0);u(x),v.insertBefore(x,c),k.push(x)}for(;k.length>y;){const x=k.pop();x&&x!==a&&x.remove()}const E=s.ticketSale?.personalizations??[];k.forEach((x,A)=>{const O=E[A];O&&(x.dataset.personalizationId=String(O.id))}),d=y}rn(()=>{p(),t.$$host.addEventListener("go-submit",o),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",ne(wx,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var kx=class{formId;form;#e=re(Me([]));#t=D(()=>Ru(this.fields)==0);get isValid(){return f(this.#t)}set isValid(e){I(this.#t,e)}#r=re();get successMessage(){return f(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return K_(r)||H_(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=[]),Xl(e)){I(this.#e,e,!0);return}if(e.errors&&Xl(e.errors)&&I(this.#e,e.errors,!0),G_(e.error)){I(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}},Up="go-form-details",Sx=Ni(Up),Li=Ri(Up);function an(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(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.firstChild);return i.appendChild(s),e.replaceChildren(i),i}var Ex=j("<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 xx(e,t){ee(t,!0);let r=_(t,"formId",7),n=_(t,"custom",7);const i=new kx(r(),t.$$host);Sx(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})))}rn(()=>{const d=an(t.$$host,"form",{novalidate:!0});d.addEventListener("submit",s),i.form=d});var o={details:i,get formId(){return r()},set formId(d){r(d),b()},get custom(){return n()},set custom(d){n(d),b()}},a=Y(),l=q(a),c=d=>{var u=Ex(),p=q(u),h=K(p,2),g=K(h,2),m=M(g,!0);P(g),se(v=>ie(m,v),[()=>C.t(Jt.getFormOptions(r())?.submitLabel||"Submit")]),S(d,u)};return ce(l,d=>{n()||d(c)}),S(e,a),te(o)}customElements.define("go-form",ne(xx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var Tx=j("<go-form></go-form>",2);function Ax(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(o){const a=o.target.details,l=await C.passwordReset(a.formData);l.data?(t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),a.successMessage=l.data.message,a.apiErrors=[]):a.apiErrors=l.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),b()}},s=Tx();return Yn(s,"formId","passwordReset"),se(()=>Yn(s,"custom",r())),No("submit",s,n),S(e,s),te(i)}customElements.define("go-password-reset",ne(Ax,{custom:{}},[],[]));function Cx(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,o=await C.signIn(s.formData);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return an(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",ne(Cx,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Ox(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,o=await C.signUp(s.formData,!1);o.data?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error.errors}return an(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",ne(Ox,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function Dx(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 Ix(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function Px(e){return Dx(Ix(e),0)}function $x(e,t){const r=Mi(),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,o=s.uuid,a=e.items.find(l=>l.uuid===o);if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}r.addItem(Mx(a,s))}),r}function Mx(e,t){const r=Px(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return mt({...e.product,price_cents:n},{quantity:r,time:e.time,mantle:e.mantle,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var Fx=class{#e=re();get displayCart(){return f(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=re(!1);get preview(){return f(this.#t)}set preview(e){I(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=$x(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}}},Vp="go-cart-details",Nx=Ni(Vp),zi=Ri(Vp),Rx=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span>');function Bp(e,t){ee(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(o){r(o),b()}},i=Rx(),s=M(i,!0);return P(i),se(()=>ie(s,r().product.title)),S(e,i),te(n)}ne(Bp,{cartItem:{}},[],[],{mode:"open"});var Lx=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),zx=j('<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 jp(e,t){ee(t,!0);let r=_(t,"cartItem",7);if(!ua(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=zx(),o=q(s),a=M(o),l=M(a,!0);P(a);var c=K(a),d=M(c,!0);P(c),P(o);var u=K(o),p=h=>{var g=Lx(),m=q(g),v=M(m,!0);P(m);var y=K(m),k=M(y,!0);P(y),se((E,x)=>{ie(v,E),ie(k,x)},[()=>Bs(r().time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(r().time)]),S(h,g)};return ce(u,h=>{r().time&&h(p)}),se(()=>{ie(l,n.event_title),ie(d,n.title)}),S(e,s),te(i)}ne(jp,{cartItem:{}},[],[],{mode:"open"});var qx=j('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),Ux=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),Vx=j('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Zp(e,t){ee(t,!0);let r=_(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),b()}},i=Vx(),s=q(i),o=M(s,!0);P(s);var a=K(s,2),l=c=>{var d=Ux(),u=q(d),p=M(u,!0);P(u);var h=K(u,2),g=m=>{var v=qx(),y=M(v,!0);P(v),se(k=>ie(y,k),[()=>Vs(r().time)]),S(m,v)};ce(h,m=>{r().product.type==="Ticket"&&r().product.subtype==="timeslot"&&m(g)}),se(m=>ie(p,m),[()=>Bs(r().time,{month:"numeric",day:"numeric"},C.locale)]),S(c,d)};return ce(a,c=>{r().time&&c(l)}),se(()=>ie(o,r().product.title)),S(e,i),te(n)}ne(Zp,{cartItem:{}},[],[],{mode:"open"});function Wp(e,{min:t,max:r}){const n=e<t?Math.max(t,1):e+1;return n>r?e:n}function Bx(e,{min:t,floor:r=0}){return e<=t?r:e-1}function jx(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 Zx(e,{min:t,max:r,floor:n=0}){return e<0||e>r?!1:e===n||e>=t}function Hp(e,t){return Wp(e,t)>e}function Gp(e,{floor:t=0}){return e>t}var Wx=j('<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 Kp(e,t){const r=pt();ee(t,!0);let n=_(t,"value",7),i=_(t,"min",7),s=_(t,"max",7),o=_(t,"floor",7,0),a=_(t,"label",7),l=_(t,"decreaseLabel",7),c=_(t,"increaseLabel",7),d=_(t,"onChange",7);const u=D(()=>({min:i(),max:s(),floor:o()}));let p,h=re(!1);const g=D(()=>!Gp(n(),f(u))),m=D(()=>!Hp(n(),f(u)));function v(V){V!==n()&&d()(V)}function y(){Gp(n(),f(u))&&v(Bx(n(),f(u)))}function k(){Hp(n(),f(u))&&v(Wp(n(),f(u)))}function E(){const V=jx(parseInt(p.value,10),f(u));I(h,!1),p.value=String(V),v(V)}function x(){const V=p.value.trim();I(h,!(/^\d+$/.test(V)&&Zx(parseInt(V,10),f(u))))}function A(V){switch(V.key){case"ArrowUp":V.preventDefault(),k();break;case"ArrowDown":V.preventDefault(),y();break;case"Home":V.preventDefault(),v(o());break;case"End":V.preventDefault(),v(s());break;case"Enter":V.preventDefault(),E();break}}var O={get value(){return n()},set value(V){n(V),b()},get min(){return i()},set min(V){i(V),b()},get max(){return s()},set max(V){s(V),b()},get floor(){return o()},set floor(V=0){o(V),b()},get label(){return a()},set label(V){a(V),b()},get decreaseLabel(){return l()},set decreaseLabel(V){l(V),b()},get increaseLabel(){return c()},set increaseLabel(V){c(V),b()},get onChange(){return d()},set onChange(V){d(V),b()}},$=Wx(),z=M($),B=K(z,2);Ps(B),Yl(B,V=>p=V,()=>p);var N=K(B,2);return P($),se(()=>{me($,"aria-label",a()),me(z,"title",l()),me(z,"aria-controls",r),me(z,"aria-disabled",f(g)),me(B,"id",r),me(B,"aria-label",a()),Ul(B,n()),me(B,"aria-valuenow",n()),me(B,"aria-valuemin",o()),me(B,"aria-valuemax",s()),me(B,"aria-invalid",f(h)?"true":void 0),me(N,"title",c()),me(N,"aria-controls",r),me(N,"aria-disabled",f(m))}),ht("click",z,y),ht("input",B,x),ht("change",B,E),No("blur",B,E),ht("keydown",B,A),ht("click",N,k),S(e,$),te(O)}lr(["click","input","change","keydown"]),ne(Kp,{value:{},min:{},max:{},floor:{},label:{},decreaseLabel:{},increaseLabel:{},onChange:{}},[],[],{mode:"open"});function Hx(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[pa(n)];if(t<e)return e>n?[pa(e)]:[];const i=Math.max(e,n),s=[pa(n)];for(let o=i;o<=t;o++)o!==n&&s.push(pa(o));return s}function pa(e){return{value:e,label:e.toString()}}var Gx=j("<option> </option>"),Kx=j('<select class="go-quantity-select"></select>');function ma(e,t){ee(t,!0);let r=_(t,"value",7),n=_(t,"min",7),i=_(t,"max",7),s=_(t,"label",7),o=_(t,"floor",7,0),a=_(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 o()},set floor(m=0){o(m),b()},get deselectable(){return a()},set deselectable(m=!0){a(m),b()},get onChange(){return l()},set onChange(m){l(m),b()}},u=Y(),p=q(u),h=m=>{{let v=D(()=>a()?0:n()),y=D(()=>C.t("quantity.decrease")),k=D(()=>C.t("quantity.increase"));Kp(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=Kx();Le(v,21,()=>Hx(n(),i(),{floor:a()?o():n()}),y=>y.value,(y,k)=>{var E=Gx(),x=M(E,!0);P(E);var A={};se(()=>{Pf(E,r()===f(k).value),ie(x,f(k).label),A!==(A=f(k).value)&&(E.value=(E.__value=f(k).value)??"")}),S(y,E)}),P(v),se(()=>me(v,"aria-label",s())),ht("change",v,y=>l()(parseInt(y.target.value,10))),S(m,v)};return ce(p,m=>{f(c)?m(h):m(g,-1)}),S(e,u),te(d)}lr(["change"]),ne(ma,{value:{},min:{},max:{},label:{},floor:{},deselectable:{},onChange:{}},[],[],{mode:"open"});function Yp(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 Yx(e){if(Array.isArray(e))return e}function Jx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function Qx(){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 Xx(e,t){return Yx(e)||Jx(e,t)||eT(e,t)||Qx()}function eT(e,t){if(e){if(typeof e=="string")return Yp(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)?Yp(e,t):void 0}}var Jp=Object.entries,Qp=Object.setPrototypeOf,tT=Object.isFrozen,rT=Object.getPrototypeOf,nT=Object.getOwnPropertyDescriptor,Dt=Object.freeze,hr=Object.seal,qi=Object.create,Xp=typeof Reflect<"u"&&Reflect,Lu=Xp.apply,zu=Xp.construct;Dt||(Dt=function(t){return t}),hr||(hr=function(t){return t}),Lu||(Lu=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)}),zu||(zu=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 Ui=dt(Array.prototype.forEach),iT=dt(Array.prototype.lastIndexOf),em=dt(Array.prototype.pop),Vi=dt(Array.prototype.push),sT=dt(Array.prototype.splice),It=Array.isArray,Zs=dt(String.prototype.toLowerCase),qu=dt(String.prototype.toString),tm=dt(String.prototype.match),Bi=dt(String.prototype.replace),rm=dt(String.prototype.indexOf),oT=dt(String.prototype.trim),aT=dt(Number.prototype.toString),lT=dt(Boolean.prototype.toString),nm=typeof BigInt>"u"?null:dt(BigInt.prototype.toString),im=typeof Symbol>"u"?null:dt(Symbol.prototype.toString),tt=dt(Object.prototype.hasOwnProperty),Ws=dt(Object.prototype.toString),wt=dt(RegExp.prototype.test),Hs=uT(TypeError);function dt(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 Lu(e,t,n)}}function uT(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zu(e,r)}}function xe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zs;if(Qp&&Qp(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&&(tT(t)||(t[n]=s),i=s)}e[i]=!0}return e}function cT(e){for(let t=0;t<e.length;t++)tt(e,t)||(e[t]=null);return e}function xt(e){const t=qi(null);for(const n of Jp(e)){var r=Xx(n,2);const i=r[0],s=r[1];tt(e,i)&&(It(s)?t[i]=cT(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=xt(s):t[i]=s)}return t}function dT(e){switch(typeof e){case"string":return e;case"number":return aT(e);case"boolean":return lT(e);case"bigint":return nm?nm(e):"0";case"symbol":return im?im(e):"Symbol()";case"undefined":return Ws(e);case"function":case"object":{if(e===null)return Ws(e);const t=e,r=Wr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ws(n)}return Ws(e)}default:return Ws(e)}}function Wr(e,t){for(;e!==null;){const n=nT(e,t);if(n){if(n.get)return dt(n.get);if(typeof n.value=="function")return dt(n.value)}e=rT(e)}function r(){return null}return r}function fT(e){try{return wt(e,""),!0}catch{return!1}}var sm=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"]),Uu=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"]),Vu=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"]),hT=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"]),Bu=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"]),pT=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),om=Dt(["#text"]),am=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"]),ju=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"]),lm=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"]),va=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mT=hr(/{{[\w\W]*|^[\w\W]*}}/g),vT=hr(/<%[\w\W]*|^[\w\W]*%>/g),gT=hr(/\${[\w\W]*/g),yT=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),bT=hr(/^aria-[\-\w]+$/),um=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_T=hr(/^(?:\w+script|data):/i),wT=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kT=hr(/^html$/i),ST=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),Hr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ET=function(){return typeof window>"u"?null:window},xT=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},cm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ET();const t=ye=>dm(ye);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Hr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,p=Wr(u,"cloneNode"),h=Wr(u,"remove"),g=Wr(u,"nextSibling"),m=Wr(u,"childNodes"),v=Wr(u,"parentNode"),y=Wr(u,"shadowRoot"),k=Wr(u,"attributes"),E=o&&o.prototype?Wr(o.prototype,"nodeType"):null,x=o&&o.prototype?Wr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ye=r.createElement("template");ye.content&&ye.content.ownerDocument&&(r=ye.content.ownerDocument)}let A,O="";const $=r,z=$.implementation,B=$.createNodeIterator,N=$.createDocumentFragment,V=$.getElementsByTagName,U=n.importNode;let oe=cm();t.isSupported=typeof Jp=="function"&&typeof v=="function"&&z&&z.createHTMLDocument!==void 0;const pe=mT,J=vT,ae=gT,Q=yT,de=bT,le=_T,W=wT,X=ST;let ue=um,F=null;const H=xe({},[...sm,...Uu,...Vu,...Bu,...om]);let R=null;const ve=xe({},[...am,...ju,...lm,...va]);let fe=Object.seal(qi(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,Te=null;const Ce=Object.seal(qi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ge=!0,it=!0,Ke=!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,Jr=!1,Qr={},kt=null;const Un=xe({},["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 is=null;const ss=xe({},["audio","video","img","source","image","track"]);let fo=null;const td=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gi="http://www.w3.org/1998/Math/MathML",os="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let Vn=gr,rd=!1,nd=null;const P2=xe({},[gi,os,gr],qu);let id=xe({},["mi","mo","mn","ms","mtext"]),sd=xe({},["annotation-xml"]);const $2=xe({},["title","style","font","a","script"]);let ho=null;const M2=["application/xhtml+xml","text/html"],F2="text/html";let at=null,as=null;const N2=r.createElement("form"),Gg=function(T){return T instanceof RegExp||T instanceof Function},od=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(as&&as===T)return;(!T||typeof T!="object")&&(T={}),T=xt(T),ho=M2.indexOf(T.PARSER_MEDIA_TYPE)===-1?F2:T.PARSER_MEDIA_TYPE,at=ho==="application/xhtml+xml"?qu:Zs,F=tt(T,"ALLOWED_TAGS")&&It(T.ALLOWED_TAGS)?xe({},T.ALLOWED_TAGS,at):H,R=tt(T,"ALLOWED_ATTR")&&It(T.ALLOWED_ATTR)?xe({},T.ALLOWED_ATTR,at):ve,nd=tt(T,"ALLOWED_NAMESPACES")&&It(T.ALLOWED_NAMESPACES)?xe({},T.ALLOWED_NAMESPACES,qu):P2,fo=tt(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)?xe(xt(td),T.ADD_URI_SAFE_ATTR,at):td,is=tt(T,"ADD_DATA_URI_TAGS")&&It(T.ADD_DATA_URI_TAGS)?xe(xt(ss),T.ADD_DATA_URI_TAGS,at):ss,kt=tt(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)?xe({},T.FORBID_CONTENTS,at):Un,w=tt(T,"FORBID_TAGS")&&It(T.FORBID_TAGS)?xe({},T.FORBID_TAGS,at):xt({}),Te=tt(T,"FORBID_ATTR")&&It(T.FORBID_ATTR)?xe({},T.FORBID_ATTR,at):xt({}),Qr=tt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?xt(T.USE_PROFILES):T.USE_PROFILES:!1,Ge=T.ALLOW_ARIA_ATTR!==!1,it=T.ALLOW_DATA_ATTR!==!1,Ke=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=T.SAFE_FOR_TEMPLATES||!1,er=T.SAFE_FOR_XML!==!1,Tt=T.WHOLE_DOCUMENT||!1,Zt=T.RETURN_DOM||!1,mr=T.RETURN_DOM_FRAGMENT||!1,Ir=T.RETURN_TRUSTED_TYPE||!1,tr=T.FORCE_BODY||!1,Pr=T.SANITIZE_DOM!==!1,bn=T.SANITIZE_NAMED_PROPS||!1,vr=T.KEEP_CONTENT!==!1,Jr=T.IN_PLACE||!1,ue=fT(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:um,Vn=typeof T.NAMESPACE=="string"?T.NAMESPACE:gr,id=tt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?xt(T.MATHML_TEXT_INTEGRATION_POINTS):xe({},["mi","mo","mn","ms","mtext"]),sd=tt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?xt(T.HTML_INTEGRATION_POINTS):xe({},["annotation-xml"]);const Z=tt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?xt(T.CUSTOM_ELEMENT_HANDLING):qi(null);if(fe=qi(null),tt(Z,"tagNameCheck")&&Gg(Z.tagNameCheck)&&(fe.tagNameCheck=Z.tagNameCheck),tt(Z,"attributeNameCheck")&&Gg(Z.attributeNameCheck)&&(fe.attributeNameCheck=Z.attributeNameCheck),tt(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),st&&(it=!1),mr&&(Zt=!0),Qr&&(F=xe({},om),R=qi(null),Qr.html===!0&&(xe(F,sm),xe(R,am)),Qr.svg===!0&&(xe(F,Uu),xe(R,ju),xe(R,va)),Qr.svgFilters===!0&&(xe(F,Vu),xe(R,ju),xe(R,va)),Qr.mathMl===!0&&(xe(F,Bu),xe(R,lm),xe(R,va))),Ce.tagCheck=null,Ce.attributeCheck=null,tt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?Ce.tagCheck=T.ADD_TAGS:It(T.ADD_TAGS)&&(F===H&&(F=xt(F)),xe(F,T.ADD_TAGS,at))),tt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?Ce.attributeCheck=T.ADD_ATTR:It(T.ADD_ATTR)&&(R===ve&&(R=xt(R)),xe(R,T.ADD_ATTR,at))),tt(T,"ADD_URI_SAFE_ATTR")&&It(T.ADD_URI_SAFE_ATTR)&&xe(fo,T.ADD_URI_SAFE_ATTR,at),tt(T,"FORBID_CONTENTS")&&It(T.FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),xe(kt,T.FORBID_CONTENTS,at)),tt(T,"ADD_FORBID_CONTENTS")&&It(T.ADD_FORBID_CONTENTS)&&(kt===Un&&(kt=xt(kt)),xe(kt,T.ADD_FORBID_CONTENTS,at)),vr&&(F["#text"]=!0),Tt&&xe(F,["html","head","body"]),F.table&&(xe(F,["tbody"]),delete w.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Hs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=T.TRUSTED_TYPES_POLICY,O=A.createHTML("")}else A===void 0&&(A=xT(d,i)),A!==null&&typeof O=="string"&&(O=A.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===H&&(F=xt(F)),oe.uponSanitizeAttribute.length>0&&R===ve&&(R=xt(R)),Dt&&Dt(T),as=T},Kg=xe({},[...Uu,...Vu,...hT]),Yg=xe({},[...Bu,...pT]),R2=function(T){let Z=v(T);(!Z||!Z.tagName)&&(Z={namespaceURI:Vn,tagName:"template"});const he=Zs(T.tagName),De=Zs(Z.tagName);return nd[T.namespaceURI]?T.namespaceURI===os?Z.namespaceURI===gr?he==="svg":Z.namespaceURI===gi?he==="svg"&&(De==="annotation-xml"||id[De]):!!Kg[he]:T.namespaceURI===gi?Z.namespaceURI===gr?he==="math":Z.namespaceURI===os?he==="math"&&sd[De]:!!Yg[he]:T.namespaceURI===gr?Z.namespaceURI===os&&!sd[De]||Z.namespaceURI===gi&&!id[De]?!1:!Yg[he]&&($2[he]||!Kg[he]):!!(ho==="application/xhtml+xml"&&nd[T.namespaceURI]):!1},Mr=function(T){Vi(t.removed,{element:T});try{v(T).removeChild(T)}catch{h(T)}},yi=function(T,Z){try{Vi(t.removed,{attribute:Z.getAttributeNode(T),from:Z})}catch{Vi(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(T),T==="is")if(Zt||mr)try{Mr(Z)}catch{}else try{Z.setAttribute(T,"")}catch{}},Jg=function(T){let Z=null,he=null;if(tr)T="<remove></remove>"+T;else{const et=tm(T,/^[\r\n\t ]+/);he=et&&et[0]}ho==="application/xhtml+xml"&&Vn===gr&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const De=A?A.createHTML(T):T;if(Vn===gr)try{Z=new c().parseFromString(De,ho)}catch{}if(!Z||!Z.documentElement){Z=z.createDocument(Vn,"template",null);try{Z.documentElement.innerHTML=rd?O:De}catch{}}const Fe=Z.body||Z.documentElement;return T&&he&&Fe.insertBefore(r.createTextNode(he),Fe.childNodes[0]||null),Vn===gr?V.call(Z,Tt?"html":"body")[0]:Tt?Z.documentElement:Fe},Qg=function(T){return B.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Xg=function(T){T.normalize();const Z=B.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let he=Z.nextNode();for(;he;){let De=he.data;Ui([pe,J,ae],Fe=>{De=Bi(De,Fe," ")}),he.data=De,he=Z.nextNode()}},Xa=function(T){const Z=x?x(T):null;return typeof Z!="string"||at(Z)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==E(T)||T.childNodes!==m(T)},po=function(T){if(!E||typeof T!="object"||T===null)return!1;try{return E(T)===Hr.documentFragment}catch{return!1}},el=function(T){if(!E||typeof T!="object"||T===null)return!1;try{return typeof E(T)=="number"}catch{return!1}};function _n(ye,T,Z){Ui(ye,he=>{he.call(t,T,Z,as)})}const ey=function(T){let Z=null;if(_n(oe.beforeSanitizeElements,T,null),Xa(T))return Mr(T),!0;const he=at(T.nodeName);if(_n(oe.uponSanitizeElement,T,{tagName:he,allowedTags:F}),er&&T.hasChildNodes()&&!el(T.firstElementChild)&&wt(/<[/\w!]/g,T.innerHTML)&&wt(/<[/\w!]/g,T.textContent)||er&&T.namespaceURI===gr&&he==="style"&&el(T.firstElementChild)||T.nodeType===Hr.progressingInstruction||er&&T.nodeType===Hr.comment&&wt(/<[/\w]/g,T.data))return Mr(T),!0;if(w[he]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(he))&&!F[he]){if(!w[he]&&ry(he)&&(fe.tagNameCheck instanceof RegExp&&wt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he)))return!1;if(vr&&!kt[he]){const De=v(T),Fe=m(T);if(Fe&&De){const et=Fe.length;for(let Wt=et-1;Wt>=0;--Wt){const Bn=p(Fe[Wt],!0);De.insertBefore(Bn,g(T))}}}return Mr(T),!0}return(E?E(T):T.nodeType)===Hr.element&&!R2(T)||(he==="noscript"||he==="noembed"||he==="noframes")&&wt(/<\/no(script|embed|frames)/i,T.innerHTML)?(Mr(T),!0):(st&&T.nodeType===Hr.text&&(Z=T.textContent,Ui([pe,J,ae],De=>{Z=Bi(Z,De," ")}),T.textContent!==Z&&(Vi(t.removed,{element:T.cloneNode()}),T.textContent=Z)),_n(oe.afterSanitizeElements,T,null),!1)},ty=function(T,Z,he){if(Te[Z]||Pr&&(Z==="id"||Z==="name")&&(he in r||he in N2))return!1;const De=R[Z]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(Z,T);if(!(it&&!Te[Z]&&wt(Q,Z))){if(!(Ge&&wt(de,Z))){if(!De||Te[Z]){if(!(ry(T)&&(fe.tagNameCheck instanceof RegExp&&wt(fe.tagNameCheck,T)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(T))&&(fe.attributeNameCheck instanceof RegExp&&wt(fe.attributeNameCheck,Z)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(Z,T))||Z==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&wt(fe.tagNameCheck,he)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(he))))return!1}else if(!fo[Z]){if(!wt(ue,Bi(he,W,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&T!=="script"&&rm(he,"data:")===0&&is[T])){if(!(Ke&&!wt(le,Bi(he,W,"")))){if(he)return!1}}}}}}return!0},L2=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ry=function(T){return!L2[Zs(T)]&&wt(X,T)},ny=function(T){_n(oe.beforeSanitizeAttributes,T,null);const Z=T.attributes;if(!Z||Xa(T))return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let De=Z.length;for(;De--;){const Fe=Z[De],et=Fe.name,Wt=Fe.namespaceURI,Bn=Fe.value,wn=at(et),ad=Bn;let yt=et==="value"?ad:oT(ad);if(he.attrName=wn,he.attrValue=yt,he.keepAttr=!0,he.forceKeepAttr=void 0,_n(oe.uponSanitizeAttribute,T,he),yt=he.attrValue,bn&&(wn==="id"||wn==="name")&&rm(yt,$r)!==0&&(yi(et,T),yt=$r+yt),er&&wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){yi(et,T);continue}if(wn==="attributename"&&tm(yt,"href")){yi(et,T);continue}if(he.forceKeepAttr)continue;if(!he.keepAttr){yi(et,T);continue}if(!Mt&&wt(/\/>/i,yt)){yi(et,T);continue}st&&Ui([pe,J,ae],sy=>{yt=Bi(yt,sy," ")});const iy=at(T.nodeName);if(!ty(iy,wn,yt)){yi(et,T);continue}if(A&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Wt)switch(d.getAttributeType(iy,wn)){case"TrustedHTML":yt=A.createHTML(yt);break;case"TrustedScriptURL":yt=A.createScriptURL(yt);break}if(yt!==ad)try{Wt?T.setAttributeNS(Wt,et,yt):T.setAttribute(et,yt),Xa(T)?Mr(T):em(t.removed)}catch{yi(et,T)}}_n(oe.afterSanitizeAttributes,T,null)},tl=function(T){let Z=null;const he=Qg(T);for(_n(oe.beforeSanitizeShadowDOM,T,null);Z=he.nextNode();)if(_n(oe.uponSanitizeShadowNode,Z,null),ey(Z),ny(Z),po(Z.content)&&tl(Z.content),(E?E(Z):Z.nodeType)===Hr.element){const De=y?y(Z):Z.shadowRoot;po(De)&&(ls(De),tl(De))}_n(oe.afterSanitizeShadowDOM,T,null)},ls=function(T){const Z=E?E(T):T.nodeType;if(Z===Hr.element){const Fe=y?y(T):T.shadowRoot;po(Fe)&&(ls(Fe),tl(Fe))}const he=m?m(T):T.childNodes;if(!he)return;const De=[];Ui(he,Fe=>{Vi(De,Fe)});for(const Fe of De)ls(Fe);if(Z===Hr.element){const Fe=x?x(T):null;if(typeof Fe=="string"&&at(Fe)==="template"){const et=T.content;po(et)&&ls(et)}}};return t.sanitize=function(ye){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,he=null,De=null,Fe=null;if(rd=!ye,rd&&(ye="<!-->"),typeof ye!="string"&&!el(ye)&&(ye=dT(ye),typeof ye!="string"))throw Hs("dirty is not a string, aborting");if(!t.isSupported)return ye;if(Ft||od(T),t.removed=[],typeof ye=="string"&&(Jr=!1),Jr){const Bn=x?x(ye):ye.nodeName;if(typeof Bn=="string"){const wn=at(Bn);if(!F[wn]||w[wn])throw Hs("root node is forbidden and cannot be sanitized in-place")}if(Xa(ye))throw Hs("root node is clobbered and cannot be sanitized in-place");ls(ye)}else if(el(ye))Z=Jg("<!---->"),he=Z.ownerDocument.importNode(ye,!0),he.nodeType===Hr.element&&he.nodeName==="BODY"||he.nodeName==="HTML"?Z=he:Z.appendChild(he),ls(he);else{if(!Zt&&!st&&!Tt&&ye.indexOf("<")===-1)return A&&Ir?A.createHTML(ye):ye;if(Z=Jg(ye),!Z)return Zt?null:Ir?O:""}Z&&tr&&Mr(Z.firstChild);const et=Qg(Jr?ye:Z);for(;De=et.nextNode();)ey(De),ny(De),po(De.content)&&tl(De.content);if(Jr)return st&&Xg(ye),ye;if(Zt){if(st&&Xg(Z),mr)for(Fe=N.call(Z.ownerDocument);Z.firstChild;)Fe.appendChild(Z.firstChild);else Fe=Z;return(R.shadowroot||R.shadowrootmode)&&(Fe=U.call(n,Fe,!0)),Fe}let Wt=Tt?Z.outerHTML:Z.innerHTML;return Tt&&F["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&wt(kT,Z.ownerDocument.doctype.name)&&(Wt="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
77
+ `+Wt),st&&Ui([pe,J,ae],Bn=>{Wt=Bi(Wt,Bn," ")}),A&&Ir?A.createHTML(Wt):Wt},t.setConfig=function(){od(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ft=!0},t.clearConfig=function(){as=null,Ft=!1},t.isValidAttribute=function(ye,T,Z){return as||od({}),ty(at(ye),at(T),Z)},t.addHook=function(ye,T){typeof T=="function"&&Vi(oe[ye],T)},t.removeHook=function(ye,T){if(T!==void 0){const Z=iT(oe[ye],T);return Z===-1?void 0:sT(oe[ye],Z,1)[0]}return em(oe[ye])},t.removeHooks=function(ye){oe[ye]=[]},t.removeAllHooks=function(){oe=cm()},t}var fm=dm(),TT=j('<span class="go-sub-ticket-description"></span>'),AT=j('<span class="go-sub-ticket-quantity"> </span>'),CT=j('<li><span class="go-sub-ticket-title"> </span> <!> <!></li>');function Zu(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),o=_(t,"preview",7,!1);const a=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 o()},set preview(y=!1){o(y),b()}},c=CT(),d=M(c),u=M(d,!0);P(d);var p=K(d,2),h=y=>{var k=TT();Ef(k,()=>fm.sanitize(r().description),!0),P(k),S(y,k)};ce(p,y=>{r().description&&y(h)});var g=K(p,2),m=y=>{var k=AT(),E=M(k,!0);P(k),se(()=>{me(k,"data-testid",`sub-ticket-${r().id??""}-quantity`),ie(E,n())}),S(y,k)},v=y=>{{let k=D(()=>r().title||C.t("cart.content.table.edit"));ma(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 ce(g,y=>{o()||f(a)?y(m):y(v,-1)}),P(c),se(()=>{St(c,1,ur(["go-sub-ticket",f(a)&&"is-fixed",o()&&"is-preview",n()===0&&"is-empty"])),me(c,"data-testid",`sub-ticket-${r().id??""}`),ie(u,r().title)}),S(e,c),te(l)}ne(Zu,{sub:{},quantity:{},max:{},onChange:{},preview:{}},[],[],{mode:"open"});var OT=j('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),DT=j('<span class="go-cart-item-price-discounted"> </span>'),IT=j("<span> </span>"),PT=j('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),$T=j('<ul class="go-sub-tickets" role="list"></ul>'),MT=j('<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 hm(e,t){ee(t,!0);let r=_(t,"displayItem",7),n=_(t,"displayCart",7),i=_(t,"preview",7),s=re(void 0),o=re(Me({}));const a=D(()=>C.cart?.items.find(y=>y.uuid===(r().display?.reference_uuid??r().uuid))),l=D(()=>Vr(r().product)?r().product:null),c=Mi();ge(()=>{C.cart?.items.map(y=>y.quantity),C.cart?.items.forEach(y=>y.mantle&&Object.values(y.mantle.composition)),Re(()=>{I(s,C.capacityManager.capacity(n(),r(),c),!0),I(o,f(a)?C.capacityManager.subTicketMaxes(C.cart,f(a),c):{},!0)})});function d(y){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}f(a).quantity=Math.max(0,f(a).quantity-r().quantity+y)}function u(){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}const y=Math.max(0,f(a).quantity-r().quantity);y===0?C.cart?.deleteItem(f(a)):f(a).quantity=y}function p(y,k){if(!f(a)){console.error("(CartItem) Could not find main item for line",r());return}f(a).mantle&&(f(a).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=Y(),m=q(g),v=y=>{var k=MT(),E=q(k),x=M(E),A=M(x),O=M(A),$=H=>{Zp(H,{get cartItem(){return r()}})},z=H=>{jp(H,{get cartItem(){return r()}})},B=H=>{Bp(H,{get cartItem(){return r()}})};ce(O,H=>{r().product.type==="Ticket"?H($):r().product.type==="Event"?H(z,1):r().product.type==="Coupon"&&H(B,2)}),P(A);var N=K(A,2),V=M(N),U=H=>{var R=OT(),ve=q(R),fe=M(ve,!0);P(ve);var w=K(ve,2),Te=M(w,!0);P(w),se((Ce,Ge)=>{ie(fe,Ce),ie(Te,Ge)},[()=>fr(r().display.originalPrice),()=>fr(r().final_price_cents)]),S(H,R)},oe=H=>{var R=DT(),ve=M(R,!0);P(R),se(fe=>ie(ve,fe),[()=>fr(r().final_price_cents)]),S(H,R)};ce(V,H=>{r().display?.discounted?H(U):H(oe,-1)}),P(N);var pe=K(N,2),J=M(pe),ae=H=>{var R=IT(),ve=M(R,!0);P(R),se(()=>ie(ve,r().quantity)),S(H,R)},Q=H=>{{let R=D(()=>r().quantity??0);ma(H,{get value(){return f(R)},get min(){return f(s).min},get max(){return f(s).max},get label(){return r().product.title},floor:1,onChange:d})}};ce(J,H=>{i()?H(ae):H(Q,-1)}),P(pe);var de=K(pe,2),le=H=>{var R=PT(),ve=M(R);P(R),se(fe=>me(ve,"aria-label",fe),[()=>C.t("cart.item.remove")]),ht("click",ve,u),S(H,R)};ce(de,H=>{i()||H(le)});var W=K(de,2),X=M(W,!0);P(W),P(x),P(E);var ue=K(E,2),F=H=>{var R=$T();Le(R,21,()=>js(f(l)),ve=>ve.id,(ve,fe)=>{{let w=D(()=>r().mantle?.composition?.[f(fe).id]??0);Zu(ve,{get sub(){return f(fe)},get preview(){return i()},get quantity(){return f(w)},get max(){return f(o)[f(fe).id]},onChange:Te=>p(f(fe).id,Te)})}}),P(R),se(()=>me(R,"aria-label",f(l).title)),S(H,R)};ce(ue,H=>{f(l)&&H(F)}),se(H=>ie(X,H),[()=>fr(r().total_price_cents)]),S(y,k)};return ce(m,y=>{f(s)&&y(v)}),S(e,g),te(h)}lr(["click"]),ne(hm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var FT=j('<li class="go-cart-header-remove"></li>'),NT=j('<li class="go-cart-item"><!></li>'),RT=j('<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 LT(e,t){ee(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=RT(),c=M(l),d=M(c),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);P(h);var m=K(h,2),v=M(m,!0);P(m);var y=K(m,2),k=O=>{var $=FT();S(O,$)};ce(y,O=>{f(n).preview||O(k)});var E=K(y,2),x=M(E,!0);P(E),P(d),P(c);var A=K(c,2);Le(A,17,()=>f(n).displayCart.items,O=>O.uuid,(O,$)=>{var z=NT();hm(M(z),{get displayItem(){return f($)},get displayCart(){return f(n).displayCart},get preview(){return f(n).preview}}),P(z),S(O,z)}),P(l),se((O,$,z,B)=>{ie(p,O),ie(g,$),ie(v,z),ie(x,B)},[()=>C.t("cart.content.table.desc"),()=>C.t("cart.content.table.price"),()=>C.t("cart.content.table.quantity"),()=>C.t("cart.content.table.total")]),S(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-items",ne(LT,{},[],[]));var zT=j('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),qT=j('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),UT=j('<ol data-testid="cart-coupons"></ol>');function VT(e,t){ee(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=UT();Le(l,21,()=>f(n).displayCart.coupons,c=>c.code,(c,d)=>{var u=qT();let p;var h=M(u),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=E=>{var x=zT(),A=M(x);P(x),se(O=>me(A,"aria-label",O),[()=>C.t("cart.coupons.remove")]),ht("click",A,()=>C.cart?.removeCoupon(f(d).code)),S(E,x)};ce(y,E=>{f(n).preview||E(k)}),P(g),P(h),P(u),se(()=>{p=St(u,1,"go-cart-coupon",null,p,{"go-cart-coupon-inactive":!f(d).applied}),ie(v,f(d).code)}),S(c,u)}),P(l),S(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.coupons.length>0&&a(o)}),S(e,i),te()}lr(["click"]),customElements.define("go-cart-coupons",ne(VT,{},[],[]));var BT=j('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function jT(e,t){ee(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=BT(),c=M(l,!0);P(l),se(d=>ie(c,d),[()=>fr(f(n).totalPriceCents)]),S(a,l)};ce(s,a=>{f(n)&&f(n).displayCart&&f(n).displayCart.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-total-amount",ne(jT,{},[],[]));function ZT(e,t){ee(t,!0);const r=_(t,"preview",7,!1),n=new Fx;Nx(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)),Re(()=>n.calculateDisplayCart()))});async function i(){const s=t.$$host.querySelectorAll("go-coupon-redemption");let o=!0;for(const a of s){const l=await a.flush?.();l&&!l.success&&(o=!1)}return o}return t.$$host.addEventListener("click",async s=>{const o=s.target.closest("go-submit");if(!o)return;const a=o.closest("go-form");if(a&&t.$$host.contains(a))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",ne(ZT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var WT=j('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function HT(e,t){ee(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=WT(),c=M(l,!0);P(l),se(d=>ie(c,d),[()=>fr(f(n).subtotalPriceCents)]),S(a,l)};ce(s,a=>{f(n)&&C.cart?.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-subtotal-amount",ne(HT,{},[],[]));var GT=j('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function KT(e,t){ee(t,!0);const r=zi(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=GT(),c=K(M(l),1,!0);P(l),se(d=>ie(c,d),[()=>fr(f(n).discountedAmountCents)]),S(a,l)};ce(s,a=>{f(n)&&f(n).discountedAmountCents>0&&a(o)}),S(e,i),te()}customElements.define("go-cart-discounted-amount",ne(KT,{},[],[]));function YT(e,t){ee(t,!0),an(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),te()}customElements.define("go-cart-empty",ne(YT,{},[],[]));function JT(e,t){ee(t,!0);let r=D(()=>C.cart?.items.length);At();var n=qt();se(()=>ie(n,f(r))),S(e,n),te()}customElements.define("go-cart-counter",ne(JT,{},[],[]));function QT(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}]}),an(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!f(n))return;const o=await C.signUp(s.details.formData,!0);if(o.error){s.details.apiErrors=o.error.errors;return}const a=s.details.fieldValue("paymentMode");f(n).paymentModeId=a==null?void 0:String(a);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",ne(QT,{custom:{}},[],[]));var XT="TokenActions::ApplyOrderDiscount";async function eA(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===XT?(t.addCoupon({code:e,kind:"actionToken"}),{success:!0}):r.is_voucher_for?rA(e,r):r.value_cents&&r.value_cents>0?tA(e,r.value_cents):Wu([C.t("cart.coupon.form.errors.notValid")]):Wu([C.t("cart.coupon.form.errors.notValid")])}function tA(e,t){return C.cart.addCoupon({code:e,kind:"valueVoucher",valueCents:t}),{success:!0}}async function rA(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 Wu([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(mt(la(n),{quantity:1})),C.cart.addCoupon({code:e,kind:"serviceVoucher"}),{success:!0}}function Wu(e){return{success:!1,errors:e}}var nA=j("<go-form></go-form>",2);function iA(e,t){ee(t,!0),Jt.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(u=>u.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const d=await eA(c);return d.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),d):(a.details.apiErrors=d.errors,d)}async function n(a){await r(a.target)}async function i(){const a=t.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=nA();return Yn(o,"formId","couponRedemption"),No("submit",o,n),S(e,o),te(s)}customElements.define("go-coupon-redemption",ne(iA,{},[],["flush"])),pb();var sA=class{#e=re();get campaign(){return f(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=re();get amount(){return f(this.#t)}set amount(e){I(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")||"[]");sn(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 sA,oA=j('<img alt="logo"/>'),aA=j('<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 pm(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=aA();let o;var a=M(s),l=M(a),c=m=>{var v=oA();se(y=>me(v,"src",y),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),S(m,v)};ce(l,m=>{r().picture.thumbnail&&m(c)}),P(a);var d=K(a,2),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);return P(h),P(d),P(s),se(()=>{o=St(s,1,"go-donation-campaign",null,o,{selected:Pt.campaign?.id===r()?.id}),ie(p,f(n)["donations.headline"]),ie(g,f(n)["donations.shop.info"])}),ht("click",s,()=>Pt.selectCampaign(r())),ht("keydown",s,m=>{m.key==="Enter"&&Pt.selectCampaign(r())}),S(e,s),te(i)}lr(["click","keydown"]),ne(pm,{campaign:{}},[],[],{mode:"open"});function lA(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 uA=j("<button> </button>"),cA=j('<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>'),dA=j('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function mm(e,t){ee(t,!0);const r=Pt.campaign?.guest_limit/100;let n=re(void 0);function i(p){Pt.amount=p,I(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 o=dA(),a=M(o),l=M(a,!0);P(a);var c=K(a,2);Le(c,20,()=>Pt.campaign?.options,p=>p,(p,h)=>{var g=uA();let m;var v=M(g,!0);P(g),se(y=>{m=St(g,1,"btn btn-default",null,m,{selected:Pt.amount===h}),ie(v,y)},[()=>lA(h/100,C.currency)]),ht("click",g,()=>i(h)),S(p,g)}),P(c);var d=K(c,2),u=p=>{var h=cA(),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2);Ps(y),P(g),P(h),se((k,E)=>{ie(v,k),me(y,"max",r),me(y,"placeholder",E),Ul(y,f(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),ht("input",y,s),S(p,h)};ce(d,p=>{Pt.campaign?.free_donations&&p(u)}),P(o),se(p=>ie(l,p),[()=>C.t("donations.selection.title")]),S(e,o),te()}lr(["click","input"]),ne(mm,{},[],[],{mode:"open"});var fA=j('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function hA(e,t){ee(t,!1),rn(()=>{C.donations?.campaigns?.length==1&&Pt.selectCampaign(C.donations?.campaigns[0])}),Jl();var r=Y(),n=q(r),i=s=>{var o=fA(),a=M(o);Le(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{pm(m,{get campaign(){return f(v)}})});var l=K(a,2),c=m=>{mm(m,{})};ce(l,m=>{Pt.campaign&&m(c)});var d=K(l,2),u=M(d),p=M(u,!0);P(u);var h=K(u,2),g=M(h,!0);P(h),P(d),P(o),se((m,v)=>{ie(p,m),h.disabled=!Pt.amount,ie(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),ht("click",u,function(...m){Pt.skipDonation?.apply(this,m)}),ht("click",h,function(...m){Pt.addDonationToCart?.apply(this,m)}),S(s,o)};ce(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),S(e,r),te()}lr(["click"]),customElements.define("go-donations",ne(hA,{},[],[]));function pA(e){return typeof e=="function"}function Gs(e){return e!==null&&typeof e=="object"}var mA=["string","number","bigint","boolean"];function Hu(e){return e==null||mA.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Hu(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var ga=Symbol("box"),vm=Symbol("is-writable");function L(e,t){const r=D(e);return t?{[ga]:!0,[vm]:!0,get current(){return f(r)},set current(n){t(n)}}:{[ga]:!0,get current(){return e()}}}function gm(e){return Gs(e)&&ga in e}function vA(e){return gm(e)?e:pA(e)?L(e):Er(e)}function Er(e){let t=re(Me(e));return{[ga]:!0,[vm]:!0,get current(){return f(t)},set current(r){I(t,r,!0)}}}function ym(...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 bm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gA=/\n/g,yA=/^\s*/,bA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,_A=/^:\s*/,wA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,kA=/^[;\s]*/,SA=/^\s+|\s+$/g,EA=`
78
+ `,_m="/",wm="*",ii="",xA="comment",TA="declaration";function AA(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(gA);m&&(r+=m.length);var v=g.lastIndexOf(EA);n=~v?g.length-v:n+g.length}function s(){var g={line:r,column:n};return function(m){return m.position=new o(g),c(),m}}function o(g){this.start=g,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(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(yA)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(_m!=e.charAt(0)||wm!=e.charAt(1))){for(var m=2;ii!=e.charAt(m)&&(wm!=e.charAt(m)||_m!=e.charAt(m+1));)++m;if(m+=2,ii===e.charAt(m-1))return a("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,g({type:xA,comment:v})}}function p(){var g=s(),m=l(bA);if(m){if(u(),!l(_A))return a("property missing ':'");var v=l(wA),y=g({type:TA,property:km(m[0].replace(bm,ii)),value:v?km(v[0].replace(bm,ii)):ii});return l(kA),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 km(e){return e?e.replace(SA,ii):ii}function CA(e,t){let r=null;if(!e||typeof e!="string")return r;const n=AA(e),i=typeof t=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(r=r||{},r[o]=a)}),r}var OA=/\d/,DA=["-","_","/","."];function IA(e=""){if(!OA.test(e))return e!==e.toLowerCase()}function PA(e){const t=[];let r="",n,i;for(const s of e){const o=DA.includes(s);if(o===!0){t.push(r),r="",n=void 0;continue}const a=IA(s);if(i===!1){if(n===!1&&a===!0){t.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);t.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return t.push(r),t}function Sm(e){return e?PA(e).map(t=>MA(t)).join(""):""}function $A(e){return FA(Sm(e||""))}function MA(e){return e?e[0].toUpperCase()+e.slice(1):""}function FA(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ks(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[Sm(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[$A(n)]=i}return CA(e,r),t}function Ys(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function NA(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 RA=NA(/[A-Z]/,e=>`-${e.toLowerCase()}`);function LA(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=>`${RA(t)}: ${e[t]};`).join(`
79
+ `)}function Js(e={}){return LA(e).replace(`
80
+ `," ")}var zA=["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"],qA=new Set(zA);function UA(e){return qA.has(e)}function We(...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],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&UA(i))t[i]=ym(s,o);else if(a&&l)t[i]=Ys(s,o);else if(i==="class"){const c=Hu(s),d=Hu(o);c&&d?t[i]=Lo(s,o):c?t[i]=Lo(s):d&&(t[i]=Lo(o))}else if(i==="style"){const c=typeof s=="object",d=typeof o=="object",u=typeof s=="string",p=typeof o=="string";if(c&&d)t[i]={...s,...o};else if(c&&p){const h=Ks(o);t[i]={...s,...h}}else if(u&&d)t[i]={...Ks(s),...o};else if(u&&p){const h=Ks(s),g=Ks(o);t[i]={...h,...g}}else c?t[i]=s:d?t[i]=o:u?t[i]=s:p&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=t[i],o=n[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=Js(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 Em={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%)"},VA=Js(Em),xm=typeof window<"u"?window:void 0,IF=typeof window<"u"?window.document:void 0,PF=typeof window<"u"?window.navigator:void 0,$F=typeof window<"u"?window.location:void 0;function BA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var jA=class extends Map{#e=new Map;#t=re(0);#r=re(0);#n=tn||-1;constructor(e){if(super(),e){for(var[t,r]of e)super.set(t,r);this.#r.v=super.size}}#i(e){return tn===this.#n?re(e):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),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Lr(o);else if(i!==t){Lr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Lr(o)}return s}delete(e){var t=this.#e,r=t.get(e),n=super.delete(e);return r!==void 0&&(t.delete(e),I(r,-1)),n&&(I(this.#r,super.size),Lr(this.#t)),n}clear(){if(super.size!==0){super.clear();var e=this.#e;I(this.#r,0);for(var t of e.values())I(t,-1);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}},ZA=class{#e;#t;constructor(e={}){const{window:t=xm,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=wl(n=>{const i=gt(t,"focusin",n),s=gt(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?BA(this.#e):null}},MF=new ZA;function WA(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 _b(this.#t)}get(){const e=Cd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=Cd(this.#t);return t===void 0?e:t}set(e){return bb(this.#t,e)}};function HA(e,t){switch(e){case"post":ge(t);break;case"pre":Ol(t);break}}function Gu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;HA(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=Re(()=>r(a,o));return o=a,l})}function Tm(e,t,r){const n=ks(()=>{let i=!1;Gu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});ge(()=>n)}function rt(e,t,r){Gu(e,"post",t,r)}function GA(e,t,r){Gu(e,"pre",t,r)}rt.pre=GA;function KA(e,t){Tm(e,"post",t)}function YA(e,t){Tm(e,"pre",t)}KA.pre=YA;function Am(e){return WA(e)?e():e}var JA=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(f(this.#o)?.(),this.getSize().width));#a=D(()=>(f(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Am(this.#n);if(e)return wl(t=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(n=>{this.#t=!0;for(const i of n){const s=this.#r.box==="content-box"?i.contentBoxSize:i.borderBoxSize,o=Array.isArray(s)?s:[s];this.#e.width=o.reduce((a,l)=>Math.max(a,l.inlineSize),0),this.#e.height=o.reduce((a,l)=>Math.max(a,l.blockSize),0)}t()});return r.observe(e),()=>{this.#t=!1,r.disconnect()}})});constructor(e,t={box:"border-box"}){this.#i=t.window??xm,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Am(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return f(this.#o)?.(),this.getSize()}get width(){return f(this.#s)}get height(){return f(this.#a)}};function QA(e,t){let r,n=null;return(...i)=>new Promise(s=>{n&&n(void 0),n=s,clearTimeout(r),r=setTimeout(async()=>{const o=await e(...i);n&&(n(o),n=null)},t)})}function XA(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 Cm(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=re(Me(o)),d=re(!1),u=re(void 0),p=re(Me([]));const h=()=>{f(p).forEach(E=>E()),I(p,[],!0)},g=E=>{I(p,[...f(p),E],!0)},m=async(E,x,A=!1)=>{try{I(d,!0),I(u,void 0),h();const O=new AbortController;g(()=>O.abort());const $=await t(E,x,{data:f(c),refetching:A,onCleanup:g,signal:O.signal});return I(c,$,!0),$}catch(O){O instanceof DOMException&&O.name==="AbortError"||I(u,O,!0);return}finally{I(d,!1)}},v=a?QA(m,a):l?XA(m,l):m,y=Array.isArray(e)?e:[e];let k;return n((E,x)=>{s&&k||(k=E,v(Array.isArray(e)?E:E[0],Array.isArray(e)?x:x?.[0]))},{lazy:i}),{get current(){return f(c)},get loading(){return f(d)},get error(){return f(u)},mutate:E=>{I(c,E,!0)},refetch:E=>{const x=y.map(A=>A());return v(Array.isArray(e)?x:x[0],Array.isArray(e)?x:x[0],E??!0)}}}function eC(e,t,r){return Cm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];rt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function tC(e,t,r){return Cm(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());rt.pre(o,(a,l)=>{n(a,l??[])},i)})}eC.pre=tC;function si(e){ge(()=>()=>{e()})}function rC(e,t){return setTimeout(t,e)}function Qs(e){pf().then(e)}var nC=1,iC=9,sC=11;function Ku(e){return Gs(e)&&e.nodeType===nC&&typeof e.nodeName=="string"}function Om(e){return Gs(e)&&e.nodeType===iC}function oC(e){return Gs(e)&&e.constructor?.name==="VisualViewport"}function aC(e){return Gs(e)&&e.nodeType!==void 0}function Dm(e){return aC(e)&&e.nodeType===sC&&"host"in e}function lC(e,t){if(!e||!t||!Ku(e)||!Ku(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Dm(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ya(e){return Om(e)?e:oC(e)?e.document:e?.ownerDocument??document}function Im(e){return Dm(e)?Im(e.host):Om(e)?e.defaultView??window:Ku(e)?e.ownerDocument?.defaultView??window:window}function uC(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var ji=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return f(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=L(e):this.element=e}getDocument=()=>ya(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>uC(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 Xe(e,t){return{[v_()]:r=>gm(e)?(e.current=r,Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),Re(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function xr(e){return e?"true":"false"}function Yu(e){return e?"true":void 0}function Ue(e){return e?"":void 0}function Pm(e){return e?"open":"closed"}function cC(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var dC=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 ba(e){const t=new dC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Ju="ArrowDown",$m="ArrowLeft",Mm="ArrowRight",Qu="ArrowUp",fC="Backspace",hC="Enter",FF="Escape",NF=" ",RF="Tab",LF="a",zF="P",qF="A",UF="p",un=typeof document<"u",Fm=pC();function pC(){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 oi(e){return e instanceof Element}function mC(e){return e instanceof Element||e instanceof SVGElement}function _a(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function Nn(e){return e===null}function wa(e){return e.pointerType==="touch"}function vC(e){return e!==null}var gC=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,si(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Qs(t):t()}},Nm=class{#e;#t;#r;#n=re(!1);#i=re(void 0);#s=!1;#a=null;constructor(e){this.#e=e,I(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new gC({ref:this.#e.ref,afterTick:this.#e.open}),si(()=>this.#o()),rt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return f(this.#n)}get transitionStatus(){return f(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ie(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var yC=new $t("BitsConfig");function bC(){const e=new _C(null,{});return yC.getOr(e).opts}var _C=class{opts;constructor(e,t){const r=wC(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function wC(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 Rm(e,t){return r=>{const n=bC();return L(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var Lm=Rm(e=>e.defaultLocale,"en"),VF=Rm(e=>e.defaultPortalTo,"body"),kC=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 qm(e,t){return e===t||e.contains(t)}function Um(e){return e?.ownerDocument??document}function SC(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 Vm=["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] *)"],ka=Vm.join(","),Bm=typeof Element>"u",ai=Bm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Sa=!Bm&&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},Ea=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]"):Ea(t.parentNode))},EC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},jm=function(t,r,n){if(Ea(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ka));return r&&ai.call(t,ka)&&i.unshift(t),i=i.filter(n),i},xa=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!Ea(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=xa(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{ai.call(o,ka)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!Ea(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=xa(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},Zm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EC(t))&&!Zm(t)?0:t.tabIndex},xC=function(t,r){var n=Wm(t);return n<0&&r&&!Zm(t)?0:n},TC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Hm=function(t){return t.tagName==="INPUT"},AC=function(t){return Hm(t)&&t.type==="hidden"},CC=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},OC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},DC=function(t){if(!t.name)return!0;var r=t.form||Sa(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=OC(i,t.form);return!s||s===t},IC=function(t){return Hm(t)&&t.type==="radio"},PC=function(t){return IC(t)&&!DC(t)},$C=function(t){var r,n=t&&Sa(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=Sa(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},Gm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},MC=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=ai.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ai.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=Sa(t);if(a&&!a.shadowRoot&&i(a)===!0)return Gm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if($C(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Gm(t);return!1},FC=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 ai.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Ta=function(t,r){return!(r.disabled||AC(r)||MC(r,t)||CC(r)||FC(r))},Xu=function(t,r){return!(PC(r)||Wm(r)<0||!Ta(t,r))},NC=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Km=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=xC(a,o),c=o?Km(i.candidates):a;l===0?o?r.push.apply(r,c):r.push(a):n.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:c})}),n.sort(TC).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},RC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xa([t],r.includeContainer,{filter:Xu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:NC}):n=jm(t,r.includeContainer,Xu.bind(null,r)),Km(n)},LC=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xa([t],r.includeContainer,{filter:Ta.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=jm(t,r.includeContainer,Ta.bind(null,r)),n},zC=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,ka)===!1?!1:Xu(r,t)},qC=Vm.concat("iframe:not([inert]):not([inert] *)").join(","),UC=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ai.call(t,qC)===!1?!1:Ta(r,t)};function VC(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 ec(e,t){return e>=0&&e<t.length}var BC="data-context-menu-trigger",jC="data-context-menu-content",BF=new $t("Menu.Root"),jF=new $t("Menu.Root | Menu.Sub"),ZF=new $t("Menu.Content"),WF=new $t("Menu.Group | Menu.RadioGroup"),HF=new $t("Menu.RadioGroup"),GF=new $t("Menu.CheckboxGroup"),KF=new kC("bitsmenuopen",{bubbles:!1,cancelable:!0}),YF=ba({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 ZC=class ly{static create(t){return new ly(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,ge(()=>{this.#s=Um(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),r()};rt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return rC(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),si(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Qs(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return Ys(gt(this.#s,"pointerdown",Ys(this.#h,this.#f),{capture:!0}),gt(this.#s,"pointerdown",Ys(this.#p,this.#d)),gt(this.#s,"focusin",this.#l))}#c=t=>{let r=t;r.defaultPrevented&&(r=Ym(t)),this.#e.current(t)};#d=zm(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||GC(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=Ym(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=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=HC(this.opts.ref.current))};#m=t=>this.opts.ref.current?qm(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 WC(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function HC(e){const t=[...globalThis.bitsDismissableLayers],r=WC(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function GC(e,t){const r=e.target;if(!mC(r))return!1;const n=!!r.closest(`[${BC}]`),i=!!t.closest(`[${jC}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:Um(r).documentElement.contains(r)&&!qm(t,r)&&SC(e,t)}function Ym(e){const t=e.currentTarget,r=e.target;let n;e instanceof PointerEvent?n=new PointerEvent(e.type,e):n=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(n,{get:(s,o)=>o==="currentTarget"?t:o==="target"?r:o==="preventDefault"?()=>{i=!0,typeof s.preventDefault=="function"&&s.preventDefault()}:o==="defaultPrevented"?i:o in s?s[o]:e[o]})}function Jm(e,t){ee(t,!0);let r=_(t,"interactOutsideBehavior",7,"close"),n=_(t,"onInteractOutside",7,Se),i=_(t,"onFocusOutside",7,Se),s=_(t,"id",7),o=_(t,"children",7),a=_(t,"enabled",7),l=_(t,"isValidEvent",7,()=>!1),c=_(t,"ref",7);const d=ZC.create({id:L(()=>s()),interactOutsideBehavior:L(()=>r()),onInteractOutside:L(()=>n()),enabled:L(()=>a()),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=Se){n(g),b()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),b()},get id(){return s()},set id(g){s(g),b()},get children(){return o()},set children(g){o(g),b()},get enabled(){return a()},set enabled(g){a(g),b()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),b()},get ref(){return c()},set ref(g){c(g),b()}},p=Y(),h=q(p);return we(h,()=>o()??Ne,()=>({props:d.props})),S(e,p),te(u)}ne(Jm,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var KC=class uy{static create(t){return new uy(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ji(this.opts.ref);let r=Se;rt(()=>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"||!YC(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 YC(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 Qm(e,t){ee(t,!0);let r=_(t,"escapeKeydownBehavior",7,"close"),n=_(t,"onEscapeKeydown",7,Se),i=_(t,"children",7),s=_(t,"enabled",7),o=_(t,"ref",7);KC.create({escapeKeydownBehavior:L(()=>r()),onEscapeKeydown:L(()=>n()),enabled:L(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),b()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){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 o()},set ref(d){o(d),b()}},l=Y(),c=q(l);return we(c,()=>i()??Ne),S(e,l),te(a)}ne(Qm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var JC=class cy{static instance;#e=Er([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new cy),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)}},QC=class dy{#e=!1;#t=null;#r=JC.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#c();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&UC(l))o.preventDefault(),l.focus();else{const c=this.#c(),d=this.#d()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)return;const l=a[0],c=a[a.length-1];!o.shiftKey&&r.activeElement===c?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),c.focus())};this.#n.push(gt(r,"focusin",n,{capture:!0}),gt(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#c(),l=this.#d()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?RC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#c(){return this.#u()[0]||null}#d(){return this.#t?LC(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return rt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new dy(t)),r.mount(n)):r&&(r.unmount(),r=null)}),si(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function Xm(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,Se),o=_(t,"onOpenAutoFocus",7,Se),a=_(t,"focusScope",7),l=_(t,"ref",7);const c=QC.use({enabled:L(()=>r()),trap:L(()=>n()),loop:i(),onCloseAutoFocus:L(()=>s()),onOpenAutoFocus:L(()=>o()),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=Se){s(h),b()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(h=Se){o(h),b()},get focusScope(){return a()},set focusScope(h){a(h),b()},get ref(){return l()},set ref(h){l(h),b()}},u=Y(),p=q(u);return we(p,()=>a()??Ne,()=>({props:c.props})),S(e,u),te(d)}ne(Xm,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var ev=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var XC=class fy{static create(t){return new fy(t)}opts;domContext;#e=Se;#t=!1;#r=ev;#n=ev;constructor(t){this.opts=t,this.domContext=new ji(t.ref);let r=Se;rt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Ys(gt(this.domContext.getDocument(),"pointerdown",this.#a),gt(this.domContext.getDocument(),"pointerup",ym(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Tr(r)||!Tr(n)||!this.#t||!tO(this)||!lC(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=eO(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},tv=e=>e.style.userSelect||e.style.webkitUserSelect;function eO(e,t){const r=tv(t),n=tv(e);return Aa(t,"none"),Aa(e,"text"),()=>{Aa(t,r),Aa(e,n)}}function Aa(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function tO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function rv(e,t){ee(t,!0);let r=_(t,"preventOverflowTextSelection",7,!0),n=_(t,"onPointerDown",7,Se),i=_(t,"onPointerUp",7,Se),s=_(t,"id",7),o=_(t,"children",7),a=_(t,"enabled",7),l=_(t,"ref",7);XC.create({id:L(()=>s()),onPointerDown:L(()=>n()),onPointerUp:L(()=>i()),enabled:L(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(p=!0){r(p),b()},get onPointerDown(){return n()},set onPointerDown(p=Se){n(p),b()},get onPointerUp(){return i()},set onPointerUp(p=Se){i(p),b()},get id(){return s()},set id(p){s(p),b()},get children(){return o()},set children(p){o(p),b()},get enabled(){return a()},set enabled(p){a(p),b()},get ref(){return l()},set ref(p){l(p),b()}},d=Y(),u=q(d);return we(u,()=>o()??Ne),S(e,d),te(c)}ne(rv,{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 rO=class{#e;#t=0;#r=re();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),I(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,f(this.#r)===void 0&&(this.#n=ks(()=>{I(this.#r,this.#e(...e),!0)})),ge(()=>()=>{this.#i()}),f(this.#r)}},Ca=new jA,Oa=re(null),tc=null,Xs=null,eo=!1,nv=L(()=>{for(const e of Ca.values())if(e)return!0;return!1}),rc=null,nO=new rO(()=>{function e(){document.body.setAttribute("style",f(Oa)??""),document.body.style.removeProperty("--scrollbar-width"),Fm&&tc?.(),I(Oa,null)}function t(){Xs!==null&&(window.clearTimeout(Xs),Xs=null)}function r(i,s){t(),eo=!0,rc=Date.now();const o=rc,a=()=>{Xs=null,rc===o&&(iv(Ca)?eo=!1:(eo=!1,s()))},l=i===null?24:i;Xs=window.setTimeout(a,l)}function n(){f(Oa)===null&&Ca.size===0&&!eo&&I(Oa,document.body.getAttribute("style"),!0)}return rt(()=>nv.current,()=>{if(!nv.current)return;n(),eo=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",Fm&&(tc=gt(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Qs(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),si(()=>()=>{tc?.()}),{get lockMap(){return Ca},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),iO=class{#e=Rn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=nO.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)),si(()=>{if(this.#n.lockMap.delete(this.#e),iv(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function iv(e){for(const[t,r]of e)if(r)return!0;return!1}function nc(e,t){ee(t,!0);let r=_(t,"preventScroll",7,!0),n=_(t,"restoreScrollDelay",7,null);return r()&&new iO(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()}})}ne(nc,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function sO(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=VA,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 Da(e){const t=sO(e);function r(n,i="assertive",s=7500){if(!t||!un||!e)return;const o=t.getLog(i),a=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}var oO={defaultValue:void 0,granularity:"day"};function sv(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...oO,...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 o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new $i(o,a,l,0,0,0):new Us(o,a,l)}}function ov(e,t){let r;return t instanceof Pn?r=cp(e):t instanceof $i?r=up(e):r=oa(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 aO(e){if(e instanceof Us)return"date";if(e instanceof $i)return"datetime";if(e instanceof Pn)return"zoneddatetime";throw new Error("Unknown date type")}function lO(e,t){switch(t){case"date":return oa(e);case"datetime":return up(e);case"zoneddatetime":return cp(e);default:throw new Error(`Unknown date type: ${t}`)}}function uO(e){return e instanceof $i}function ic(e){return e instanceof Pn}function Ia(e){return uO(e)||ic(e)}function to(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 li(e,t){return e.compare(t)<0}function cO(e,t){return e.compare(t)>0}function av(e,t,r){const n=Zh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function lv(e,t,r){const n=Zh(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 Pa=["day","month","year"],$a=["hour","minute","second","dayPeriod"],uv=["literal","timeZoneName"],ro=[...Pa,...$a],cv=[...ro,...uv],dO=[...$a,...uv],JF=cv.filter(e=>e!=="literal"),QF=dO.filter(e=>e!=="literal"),fO=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],hO=["year","month","day"],sc={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function pO(e){if(dv(e))return sc[e];{const t=yO(e);return dv(t)?sc[t]:sc.en}}function oc(e,t,r){return mO(e)?pO(r)[e]:gO(e)?t:vO(e)?"––":""}function dv(e){return fO.includes(e)}function mO(e){return hO.includes(e)}function vO(e){return e==="hour"||e==="minute"||e==="second"}function gO(e){return e==="era"||e==="dayPeriod"}function yO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function ac(e){const t=["hour","minute","second"],r=ro.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 bO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!hv(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];Nn(c)?a[l]=oc(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in t){const l=t[a],c=typeof l=="string"&&l?.startsWith("0"),d=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!Nn(l)&&!Nn(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),p=e.hourCycle===12||e.hourCycle===void 0&&mv(n)===12;if(a==="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 a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return oc(a,"",n)}else{if(Ma(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(Nn(l))return oc(a,"",n);{const d=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}}return""}}return s}function _O(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,kO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!hv(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!(Nn(a.part)||Nn(a.value)||a.part==="timeZoneName"&&(!ic(r)||s)))}function wO(e){const t=bO(e);return{obj:t,arr:_O({contentObj:t,...e})}}function kO(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 fv(){return ro.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Ma(e){return Pa.includes(e)}function hv(e){return ro.includes(e)}function SO(e){return cv.includes(e)}function pv(e){return!un||!e?[]:Fa(e).map(t=>t.dataset.segment).filter(t=>ro.includes(t))}function EO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=pv(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if(Nn(a))continue;s=s.set({[o]:t[o]})}else if(Ma(o)){const a=t[o];if(Nn(a))continue;s=s.set({[o]:t[o]})}return s}function xO(e,t){const r=pv(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Ma(n)&&e[n]===null)return!1;return!0}function TO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>($a.includes(t)||Pa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function AO(e,t){return t||(Ia(e)?"minute":"day")}function lc(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||_a(e))}function CO(e,t){if(!un)return!1;const r=Fa(t);return r.length?r[0].id===e:!1}function OO(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!un)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Js({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function DO(e,t){if(!un)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function mv(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 no(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n,next:i}=uc(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function IO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function PO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function uc(e,t){const r=Fa(t);return r.length?{next:IO(e,r),prev:PO(e,r)}:{next:null,prev:null}}function vv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{next:n}=uc(r,t);n&&n.focus()}function gv(e,t){const r=e.currentTarget;if(!Tr(r))return;const{prev:n}=uc(r,t);n&&n.focus()}function io(e){return e==="ArrowRight"||e==="ArrowLeft"}function Fa(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:!(!SO(r)||r==="literal")}):[]}function $O(e){return Fa(e)[0]}var MO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function yv(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 Ia(h)&&g?i(Bt(h),{dateStyle:"long",timeStyle:"long"}):i(Bt(h),{dateStyle:"long"})}function o(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 a(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 ic(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,{...MO,...m}).find(y=>y.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:p,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function FO(e){return!(!Tr(e)||!e.hasAttribute("data-bits-day"))}function bv(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 cc(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=to(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=yu(t),l=q1(t),c=r!==void 0?av(a,r,"en-US"):av(a,0,i),d=r!==void 0?lv(l,r,"en-US"):lv(l,0,i),u=bv(c.subtract({days:1}),a),p=bv(l,d.add({days:1})),h=u.length+o.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},(E,x)=>{const A=x+1;return v.add({days:A})});p.push(...k)}const g=u.concat(o,p);return{value:t,dates:g,weeks:VC(g,7)}}function so(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(cc({...n,dateObj:r})),i;i.push(cc({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(cc({...n,dateObj:o}))}return i}function dc(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Tr(t)):[]}function _v(e,t){const r=e.getAttribute("data-value");r&&(t.current=ov(r,t.current))}function NO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=dc(n);if(!l.length)return;const c=l.indexOf(e)+t;if(ec(c,l)){const d=l[c];return _v(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Qs(()=>{const u=dc(n);if(!u.length)return;const p=u.length-Math.abs(c);if(ec(p,u)){const h=u[p];return _v(h,r),h.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Qs(()=>{const u=dc(n);if(!u.length)return;const p=c-l.length;if(ec(p,u))return u[p].focus()})}}var wv=[Ju,Qu,$m,Mm],kv=[hC," "];function RO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!FO(i)||!wv.includes(e.key)&&!kv.includes(e.key))return;e.preventDefault();const s={[Ju]:7,[Qu]:-7,[$m]:-1,[Mm]:1};if(wv.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(kv.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,ov(o,n))}}function LO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=so({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function zO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=so({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function qO({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 UO(e){ge(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;Re(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(so({...o,dateObj:s}))})})}function VO({calendarNode:e,label:t,accessibleHeadingId:r}){const n=ya(e),i=n.createElement("div");i.style.cssText=Js({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function BO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){ge(()=>{e.current,Re(()=>{t().some(a=>vu(a,e.current))||o(so({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function jO({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?cO(n.add({months:1}).set({day:1}),e):!1}function ZO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?li(n.subtract({months:1}).set({day:35}),e):!1}function WO({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),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function HO({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 GO(e){const t=ya(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function KO(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 lO(n,i)}function YO({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&li(a,n.current)||i.current&&li(i.current,a))}rt(()=>e.current,()=>{e.current&&t.current&&On(t.current,r)&&o(r)&&(t.current=KO(e.current)??r)})}function JO(e,t){return!e||!t?e:Ia(e)&&Ia(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var QO=ba({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function XO(e){const t=new Date().getFullYear(),r=Math.max(e.placeholderYear,t);let n,i;if(e.minValue)n=e.minValue.year;else{const o=r-100;n=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}var Ar=new $t("Calendar.Root | RangeCalender.Root"),Sv=class hy{static create(t){return Ar.set(new hy(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return f(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Rn();domContext;attachment;#t=re(Me([]));get months(){return f(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Xe(this.opts.ref),this.domContext=new ji(t.ref),this.announcer=Da(null),this.formatter=yv({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),rn(()=>{this.announcer=Da(this.domContext.getDocument())}),this.months=so({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),BO({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:r=>this.months=r}),UO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),rt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),rt(()=>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)}),YO({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(()=>qO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return f(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>Re(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return f(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>XO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return f(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){ge(()=>{if(Re(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){ge(()=>{if(this.opts.ref.current)return VO({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){Ol(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){LO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){zO({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder: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(()=>jO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return f(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>ZO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return f(this.#u)}set isPrevButtonDisabled(t){I(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){I(this.#c,t)}#d=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,WO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return f(this.#d)}set headingValue(t){I(this.#d,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return f(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>vu(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&&li(t,r)||n&&li(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 NO({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=JO(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(o=>!On(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&On(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){RO({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){I(this.#f,t)}getBitsAttr=t=>QO.getAttr(t);#m=D(()=>({...HO({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){I(this.#m,t)}},eD=class py{static create(t){return new py(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Yu(!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){I(this.#e,t)}},Ev=new $t("Calendar.Cell | RangeCalendar.Cell"),tD=class my{static create(t){return Ev.set(new my(t,Ar.get()))}opts;root;#e=D(()=>Bt(this.opts.date.current));get cellDate(){return f(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return f(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>N1(this.opts.date.current,Vt()));get isDateToday(){return f(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!vu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return f(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return f(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return f(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>On(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return f(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return f(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return f(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(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){I(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 f(this.#d)}set sharedDataAttrs(t){I(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){I(this.#h,t)}},rD=class vy{static create(t){return new vy(t,Ev.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(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){I(this.#r,t)}},nD=class gy{static create(t){return new gy(t,Ar.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(this.#t,t)}},iD=class yy{static create(t){return new yy(t,Ar.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return f(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(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){I(this.#t,t)}},sD=class by{static create(t){return new by(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},oD=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=Xe(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){I(this.#e,t)}},aD=class wy{static create(t){return new wy(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},lD=class ky{static create(t){return new ky(t,Ar.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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){I(this.#e,t)}},uD=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=Xe(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){I(this.#e,t)}},cD=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=Xe(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){I(this.#e,t)}},dD=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"]),fD=j("<div><!></div>");function xv(e,t){ee(t,!0);let r=_(t,"child",7),n=_(t,"children",7),i=_(t,"id",23,Rn),s=_(t,"ref",15,null),o=_(t,"value",15),a=_(t,"onValueChange",7,Se),l=_(t,"placeholder",15),c=_(t,"onPlaceholderChange",7,Se),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"),E=_(t,"disabled",7,!1),x=_(t,"readonly",7,!1),A=_(t,"minValue",7,void 0),O=_(t,"maxValue",7,void 0),$=_(t,"preventDeselect",7,!1),z=_(t,"type",7),B=_(t,"disableDaysOutsideMonth",7,!0),N=_(t,"initialFocus",7,!1),V=_(t,"maxDays",7),U=_(t,"monthFormat",7,"long"),oe=_(t,"yearFormat",7,"numeric"),pe=je(t,dD);const J=sv({defaultValue:o(),minValue:A(),maxValue:O()});function ae(){l()===void 0&&l(J)}ae(),rt.pre(()=>l(),()=>{ae()});function Q(){o()===void 0&&o(z()==="single"?void 0:[])}Q(),rt.pre(()=>o(),()=>{Q()});const de=Sv.create({id:L(()=>i()),ref:L(()=>s(),R=>s(R)),weekdayFormat:L(()=>d()),weekStartsOn:L(()=>u()),pagedNavigation:L(()=>p()),isDateDisabled:L(()=>h()),isDateUnavailable:L(()=>g()),fixedWeeks:L(()=>m()),numberOfMonths:L(()=>v()),locale:Lm(()=>y()),calendarLabel:L(()=>k()),readonly:L(()=>x()),disabled:L(()=>E()),minValue:L(()=>A()),maxValue:L(()=>O()),disableDaysOutsideMonth:L(()=>B()),initialFocus:L(()=>N()),maxDays:L(()=>V()),placeholder:L(()=>l(),R=>{l(R),c()(R)}),preventDeselect:L(()=>$()),value:L(()=>o(),R=>{o(R),a()(R)}),type:L(()=>z()),monthFormat:L(()=>U()),yearFormat:L(()=>oe()),defaultPlaceholder:J}),le=D(()=>We(pe,de.props));var W={get child(){return r()},set child(R){r(R),b()},get children(){return n()},set children(R){n(R),b()},get id(){return i()},set id(R=Rn()){i(R),b()},get ref(){return s()},set ref(R=null){s(R),b()},get value(){return o()},set value(R){o(R),b()},get onValueChange(){return a()},set onValueChange(R=Se){a(R),b()},get placeholder(){return l()},set placeholder(R){l(R),b()},get onPlaceholderChange(){return c()},set onPlaceholderChange(R=Se){c(R),b()},get weekdayFormat(){return d()},set weekdayFormat(R="narrow"){d(R),b()},get weekStartsOn(){return u()},set weekStartsOn(R){u(R),b()},get pagedNavigation(){return p()},set pagedNavigation(R=!1){p(R),b()},get isDateDisabled(){return h()},set isDateDisabled(R=()=>!1){h(R),b()},get isDateUnavailable(){return g()},set isDateUnavailable(R=()=>!1){g(R),b()},get fixedWeeks(){return m()},set fixedWeeks(R=!1){m(R),b()},get numberOfMonths(){return v()},set numberOfMonths(R=1){v(R),b()},get locale(){return y()},set locale(R){y(R),b()},get calendarLabel(){return k()},set calendarLabel(R="Event"){k(R),b()},get disabled(){return E()},set disabled(R=!1){E(R),b()},get readonly(){return x()},set readonly(R=!1){x(R),b()},get minValue(){return A()},set minValue(R=void 0){A(R),b()},get maxValue(){return O()},set maxValue(R=void 0){O(R),b()},get preventDeselect(){return $()},set preventDeselect(R=!1){$(R),b()},get type(){return z()},set type(R){z(R),b()},get disableDaysOutsideMonth(){return B()},set disableDaysOutsideMonth(R=!0){B(R),b()},get initialFocus(){return N()},set initialFocus(R=!1){N(R),b()},get maxDays(){return V()},set maxDays(R){V(R),b()},get monthFormat(){return U()},set monthFormat(R="long"){U(R),b()},get yearFormat(){return oe()},set yearFormat(R="numeric"){oe(R),b()}},X=Y(),ue=q(X),F=R=>{var ve=Y(),fe=q(ve);{let w=D(()=>({props:f(le),...de.snippetProps}));we(fe,r,()=>f(w))}S(R,ve)},H=R=>{var ve=fD();ze(ve,()=>({...f(le)}));var fe=M(ve);we(fe,()=>n()??Ne,()=>de.snippetProps),P(ve),S(R,ve)};return ce(ue,R=>{r()?R(F):R(H,-1)}),S(e,X),te(W)}ne(xv,{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 hD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),pD=j("<div><!></div>");function fc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,hD);const l=rD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);{let k=D(()=>({props:f(c),...l.snippetProps}));we(y,i,()=>f(k))}S(m,v)},g=m=>{var v=pD();ze(v,()=>({...f(c)}));var y=M(v),k=x=>{var A=Y(),O=q(A);we(O,()=>n()??Ne,()=>l.snippetProps),S(x,A)},E=x=>{var A=qt();se(()=>ie(A,l.cell.opts.date.current.day)),S(x,A)};ce(y,x=>{n()?x(k):x(E,-1)}),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(fc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var mD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),vD=j("<table><!></table>");function hc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,mD);const l=sD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=vD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(hc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var gD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),yD=j("<tbody><!></tbody>");function pc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,gD);const l=oD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=yD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(pc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var bD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),_D=j("<td><!></td>");function mc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=_(t,"date",7),l=_(t,"month",7),c=je(t,bD);const d=tD.create({id:L(()=>o()),ref:L(()=>s(),y=>s(y)),date:L(()=>a()),month:L(()=>l())}),u=D(()=>We(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 o()},set id(y=Ie(r)){o(y),b()},get date(){return a()},set date(y){a(y),b()},get month(){return l()},set month(y){l(y),b()}},h=Y(),g=q(h),m=y=>{var k=Y(),E=q(k);{let x=D(()=>({props:f(u),...d.snippetProps}));we(E,i,()=>f(x))}S(y,k)},v=y=>{var k=_D();ze(k,()=>({...f(u)}));var E=M(k);we(E,()=>n()??Ne,()=>d.snippetProps),P(k),S(y,k)};return ce(g,y=>{i()?y(m):y(v,-1)}),S(e,h),te(p)}ne(mc,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var wD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),kD=j("<thead><!></thead>");function vc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,wD);const l=aD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=kD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(vc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var SD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),ED=j("<th><!></th>");function gc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,SD);const l=uD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=ED();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(gc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var xD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),TD=j("<tr><!></tr>");function oo(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,xD);const l=lD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=TD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(oo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var AD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),CD=j("<header><!></header>");function yc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,AD);const l=cD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c)})),S(m,v)},g=m=>{var v=CD();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>n()??Ne),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(yc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var OD=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),DD=j("<div><!></div>");function bc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=je(t,OD);const l=eD.create({id:L(()=>o()),ref:L(()=>s(),m=>s(m))}),c=D(()=>We(a,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 o()},set id(m=Ie(r)){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,i,()=>({props:f(c),headingValue:l.root.headingValue})),S(m,v)},g=m=>{var v=DD();ze(v,()=>({...f(c)}));var y=M(v),k=x=>{var A=Y(),O=q(A);we(O,()=>n()??Ne,()=>({headingValue:l.root.headingValue})),S(x,A)},E=x=>{var A=qt();se(()=>ie(A,l.root.headingValue)),S(x,A)};ce(y,x=>{n()?x(k):x(E,-1)}),P(v),S(m,v)};return ce(p,m=>{i()?m(h):m(g,-1)}),S(e,u),te(d)}ne(bc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var ID=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),PD=j("<button><!></button>");function _c(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(t,"tabindex",7,0),l=je(t,ID);const c=nD.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));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 o()},set ref(v=null){o(v),b()},get tabindex(){return a()},set tabindex(v=0){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,i,()=>({props:f(d)})),S(v,y)},m=v=>{var y=PD();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne),P(y),S(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),S(e,p),te(u)}ne(_c,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var $D=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),MD=j("<button><!></button>");function wc(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(t,"tabindex",7,0),l=je(t,$D);const c=iD.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));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 o()},set ref(v=null){o(v),b()},get tabindex(){return a()},set tabindex(v=0){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,i,()=>({props:f(d)})),S(v,y)},m=v=>{var y=MD();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne),P(y),S(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),S(e,p),te(u)}ne(wc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var FD=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Tv=j("<input/>");function Av(e,t){ee(t,!0);let r=_(t,"value",15),n=je(t,FD);const i=D(()=>We(n,{"aria-hidden":"true",tabindex:-1,style:{...Em,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),b()}},o=Y(),a=q(o),l=d=>{var u=Tv();ze(u,()=>({...f(i),value:r()}),void 0,void 0,void 0,void 0,!0),S(d,u)},c=d=>{var u=Tv();ze(u,()=>({...f(i)}),void 0,void 0,void 0,void 0,!0),Uo(u,r),S(d,u)};return ce(a,d=>{f(i).type==="checkbox"?d(l):d(c,-1)}),S(e,o),te(s)}ne(Av,{value:{}},[],[],{mode:"open"});var ND=["top","right","bottom","left"],Ln=Math.min,Qt=Math.max,Na=Math.round,Ra=Math.floor,Gr=e=>({x:e,y:e}),RD={left:"right",right:"left",bottom:"top",top:"bottom"};function kc(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 Zi(e){return e.split("-")[1]}function Sc(e){return e==="x"?"y":"x"}function Ec(e){return e==="y"?"height":"width"}function Kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xc(e){return Sc(Kr(e))}function LD(e,t,r){r===void 0&&(r=!1);const n=Zi(e),i=xc(e),s=Ec(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=La(o)),[o,La(o)]}function zD(e){const t=La(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Cv=["left","right"],Ov=["right","left"],qD=["top","bottom"],UD=["bottom","top"];function VD(e,t,r){switch(e){case"top":case"bottom":return r?t?Ov:Cv:t?Cv:Ov;case"left":case"right":return t?qD:UD;default:return[]}}function BD(e,t,r,n){const i=Zi(e);let s=VD(dn(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Tc)))),s}function La(e){const t=dn(e);return RD[t]+e.slice(t.length)}function jD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dv(e){return typeof e!="number"?jD(e):{top:e,right:e,bottom:e,left:e}}function za(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 Iv(e,t,r){let{reference:n,floating:i}=e;const s=Kr(t),o=xc(t),a=Ec(o),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[a]/2-i[a]/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(Zi(t)){case"start":h[o]-=p*(r&&c?-1:1);break;case"end":h[o]+=p*(r&&c?-1:1);break}return h}async function ZD(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=cn(t,e),g=Dv(h),m=a[p?u==="floating"?"reference":"floating":u],v=za(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=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},x=za(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:k,strategy:l}):y);return{top:(v.top-x.top+g.top)/E.y,bottom:(x.bottom-v.bottom+g.bottom)/E.y,left:(v.left-x.left+g.left)/E.x,right:(x.right-v.right+g.right)/E.x}}var WD=50,HD=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:ZD},l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Iv(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:E,y:x,data:A,reset:O}=await k({x:d,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=E??d,u=x??u,g[y]={...g[y],...A},O&&h<WD&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=Iv(c,p,l)),m=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:g}},GD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=cn(e,t)||{};if(c==null)return{};const u=Dv(d),p={x:r,y:n},h=xc(i),g=Ec(h),m=await o.getDimensions(c),v=h==="y",y=v?"top":"left",k=v?"bottom":"right",E=v?"clientHeight":"clientWidth",x=s.reference[g]+s.reference[h]-p[h]-s.floating[g],A=p[h]-s.reference[h],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=O?O[E]:0;(!$||!await(o.isElement==null?void 0:o.isElement(O)))&&($=a.floating[E]||s.floating[g]);const z=x/2-A/2,B=$/2-m[g]/2-1,N=Ln(u[y],B),V=Ln(u[k],B),U=N,oe=$-m[g]-V,pe=$/2-m[g]/2+z,J=kc(U,pe,oe),ae=!l.arrow&&Zi(i)!=null&&pe!==J&&s.reference[g]/2-(pe<U?N:V)-m[g]/2<0,Q=ae?pe<U?pe-U:pe-oe:0;return{[h]:p[h]+Q,data:{[h]:J,centerOffset:pe-J-Q,...ae&&{alignmentOffset:Q}},reset:ae}}}),KD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements: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=Kr(a),E=dn(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(E||!m?[La(a)]:zD(a)),O=g!=="none";!p&&O&&A.push(...BD(a,m,g,x));const $=[a,...A],z=await l.detectOverflow(t,v),B=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&B.push(z[y]),u){const pe=LD(i,o,x);B.push(z[pe[0]],z[pe[1]])}if(N=[...N,{placement:i,overflows:B}],!B.every(pe=>pe<=0)){var V,U;const pe=(((V=s.flip)==null?void 0:V.index)||0)+1,J=$[pe];if(J&&(!(u==="alignment"&&k!==Kr(J))||N.every(Q=>Kr(Q.placement)===k?Q.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:J}};let ae=(U=N.filter(Q=>Q.overflows[0]<=0).sort((Q,de)=>Q.overflows[1]-de.overflows[1])[0])==null?void 0:U.placement;if(!ae)switch(h){case"bestFit":{var oe;const Q=(oe=N.filter(de=>{if(O){const le=Kr(de.placement);return le===k||le==="y"}return!0}).map(de=>[de.placement,de.overflows.filter(le=>le>0).reduce((le,W)=>le+W,0)]).sort((de,le)=>de[1]-le[1])[0])==null?void 0:oe[0];Q&&(ae=Q);break}case"initialPlacement":ae=a;break}if(i!==ae)return{reset:{placement:ae}}}return{}}}};function Pv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $v(e){return ND.some(t=>e[t]>=0)}var YD=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 o=Pv(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$v(o)}}}case"escaped":{const o=Pv(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:$v(o)}}}default:return{}}}}},Mv=new Set(["left","top"]);async function JD(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=dn(r),a=Zi(r),l=Kr(r)==="y",c=Mv.has(o)?-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 a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}var QD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await JD(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},XD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:k,y:E}=y;return{x:k,y:E}}},...c}=cn(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),p=Kr(dn(i)),h=Sc(p);let g=d[h],m=d[p];if(o){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",E=g+u[y],x=g-u[k];g=kc(E,g,x)}if(a){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",E=m+u[y],x=m-u[k];m=kc(E,m,x)}const v=l.fn({...t,[h]:g,[p]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[p]:a}}}}}},eI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=cn(e,t),d={x:r,y:n},u=Kr(i),p=Sc(u);let h=d[p],g=d[u];const m=cn(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const E=p==="y"?"height":"width",x=s.reference[p]-s.floating[E]+v.mainAxis,A=s.reference[p]+s.reference[E]-v.mainAxis;h<x?h=x:h>A&&(h=A)}if(c){var y,k;const E=p==="y"?"width":"height",x=Mv.has(dn(i)),A=s.reference[u]-s.floating[E]+(x&&((y=o.offset)==null?void 0:y[u])||0)+(x?0:v.crossAxis),O=s.reference[u]+s.reference[E]+(x?0:((k=o.offset)==null?void 0:k[u])||0)-(x?v.crossAxis:0);g<A?g=A:g>O&&(g=O)}return{[p]:h,[u]:g}}}},tI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=cn(e,t),d=await o.detectOverflow(t,c),u=dn(i),p=Zi(i),h=Kr(i)==="y",{width:g,height:m}=s.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,v=p==="end"?"top":"bottom");const k=m-d.top-d.bottom,E=g-d.left-d.right,x=Ln(m-d[v],k),A=Ln(g-d[y],E),O=!t.middlewareData.shift;let $=x,z=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=k),O&&!p){const N=Qt(d.left,0),V=Qt(d.right,0),U=Qt(d.top,0),oe=Qt(d.bottom,0);h?z=g-2*(N!==0||V!==0?N+V:Qt(d.left,d.right)):$=m-2*(U!==0||oe!==0?U+oe:Qt(d.top,d.bottom))}await l({...t,availableWidth:z,availableHeight:$});const B=await o.getDimensions(a.floating);return g!==B.width||m!==B.height?{reset:{rects:!0}}:{}}}};function qa(){return typeof window<"u"}function Wi(e){return Fv(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yr(e){var t;return(t=(Fv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fv(e){return qa()?e instanceof Node||e instanceof Xt(e).Node:!1}function Cr(e){return qa()?e instanceof Element||e instanceof Xt(e).Element:!1}function fn(e){return qa()?e instanceof HTMLElement||e instanceof Xt(e).HTMLElement:!1}function Nv(e){return!qa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function ao(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 rI(e){return/^(table|td|th)$/.test(Wi(e))}function Ua(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var nI=/transform|translate|scale|rotate|perspective|filter/,iI=/paint|layout|strict|content/,ui=e=>!!e&&e!=="none",Ac;function Cc(e){const t=Cr(e)?Or(e):e;return ui(t.transform)||ui(t.translate)||ui(t.scale)||ui(t.rotate)||ui(t.perspective)||!Oc()&&(ui(t.backdropFilter)||ui(t.filter))||nI.test(t.willChange||"")||iI.test(t.contain||"")}function sI(e){let t=zn(e);for(;fn(t)&&!Hi(t);){if(Cc(t))return t;if(Ua(t))return null;t=zn(t)}return null}function Oc(){return Ac==null&&(Ac=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ac}function Hi(e){return/^(html|body|#document)$/.test(Wi(e))}function Or(e){return Xt(e).getComputedStyle(e)}function Va(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(Wi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nv(e)&&e.host||Yr(e);return Nv(t)?t.host:t}function Rv(e){const t=zn(e);return Hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&ao(t)?t:Rv(t)}function lo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Rv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Xt(i);if(s){const a=Dc(o);return t.concat(o,o.visualViewport||[],ao(i)?i:[],a&&r?lo(a):[])}else return t.concat(i,lo(i,[],r))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lv(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,o=i?e.offsetHeight:n,a=Na(r)!==s||Na(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Ic(e){return Cr(e)?e:e.contextElement}function Gi(e){const t=Ic(e);if(!fn(t))return Gr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=Lv(t);let o=(s?Na(r.width):r.width)/n,a=(s?Na(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var oI=Gr(0);function zv(e){const t=Xt(e);return!Oc()||!t.visualViewport?oI:{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 ci(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=Ic(e);let o=Gr(1);t&&(n?Cr(n)&&(o=Gi(n)):o=Gi(e));const a=aI(s,r,n)?zv(s):Gr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const p=Xt(s),h=n&&Cr(n)?Xt(n):n;let g=p,m=Dc(g);for(;m&&n&&h!==g;){const v=Gi(m),y=m.getBoundingClientRect(),k=Or(m),E=y.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,x=y.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=E,c+=x,g=Xt(m),m=Dc(g)}}return za({width:d,height:u,x:l,y:c})}function Ba(e,t){const r=Va(e).scrollLeft;return t?t.left+r:ci(Yr(e)).left+r}function qv(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ba(e,r),y:r.top+t.scrollTop}}function lI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Yr(n),a=t?Ua(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Gr(1);const d=Gr(0),u=fn(n);if((u||!u&&!s)&&((Wi(n)!=="body"||ao(o))&&(l=Va(n)),u)){const h=ci(n);c=Gi(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=o&&!u&&!s?qv(o,l):Gr(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 uI(e){return Array.from(e.getClientRects())}function cI(e){const t=Yr(e),r=Va(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 o=-r.scrollLeft+Ba(e);const a=-r.scrollTop;return Or(n).direction==="rtl"&&(o+=Qt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var Uv=25;function dI(e,t){const r=Xt(e),n=Yr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=Oc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Ba(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<=Uv&&(s-=g)}else c<=Uv&&(s+=c);return{width:s,height:o,x:a,y:l}}function fI(e,t){const r=ci(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=fn(e)?Gi(e):Gr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function Vv(e,t,r){let n;if(t==="viewport")n=dI(e,r);else if(t==="document")n=cI(Yr(e));else if(Cr(t))n=fI(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 za(n)}function Bv(e,t){const r=zn(e);return r===t||!Cr(r)||Hi(r)?!1:Or(r).position==="fixed"||Bv(r,t)}function hI(e,t){const r=t.get(e);if(r)return r;let n=lo(e,[],!1).filter(a=>Cr(a)&&Wi(a)!=="body"),i=null;const s=Or(e).position==="fixed";let o=s?zn(e):e;for(;Cr(o)&&!Hi(o);){const a=Or(o),l=Cc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||ao(o)&&!l&&Bv(e,o))?n=n.filter(c=>c!==o):i=a,o=zn(o)}return t.set(e,n),n}function pI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ua(t)?[]:hI(t,this._c):[].concat(r),n],o=Vv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const p=Vv(t,s[u],i);a=Qt(p.top,a),l=Ln(p.right,l),c=Ln(p.bottom,c),d=Qt(p.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function mI(e){const{width:t,height:r}=Lv(e);return{width:t,height:r}}function vI(e,t,r){const n=fn(t),i=Yr(t),s=r==="fixed",o=ci(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Gr(0);function c(){l.x=Ba(i)}if(n||!n&&!s)if((Wi(t)!=="body"||ao(i))&&(a=Va(t)),n){const u=ci(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?qv(i,a):Gr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function Pc(e){return Or(e).position==="static"}function jv(e,t){if(!fn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Yr(e)===r&&(r=r.ownerDocument.body),r}function Zv(e,t){const r=Xt(e);if(Ua(e))return r;if(!fn(e)){let i=zn(e);for(;i&&!Hi(i);){if(Cr(i)&&!Pc(i))return i;i=zn(i)}return r}let n=jv(e,t);for(;n&&rI(n)&&Pc(n);)n=jv(n,t);return n&&Hi(n)&&Pc(n)&&!Cc(n)?r:n||sI(e)||r}var gI=async function(e){const t=this.getOffsetParent||Zv,r=this.getDimensions,n=await r(e.floating);return{reference:vI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function yI(e){return Or(e).direction==="rtl"}var bI={convertOffsetParentRelativeRectToViewportRelativeRect:lI,getDocumentElement:Yr,getClippingRect:pI,getOffsetParent:Zv,getElementRects:gI,getClientRects:uI,getDimensions:mI,getScale:Gi,isElement:Cr,isRTL:yI};function Wv(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=Yr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(a||t(),!p||!h)return;const g=Ra(u),m=Ra(i.clientWidth-(d+p)),v=Ra(i.clientHeight-(u+h)),y=Ra(d),k={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Qt(0,Ln(1,l))||1};let E=!0;function x(A){const O=A[0].intersectionRatio;if(O!==l){if(!E)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!Wv(c,e.getBoundingClientRect())&&o(),E=!1}try{r=new IntersectionObserver(x,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(x,k)}r.observe(e)}return o(!0),s}function wI(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ic(e),d=i||s?[...c?lo(c):[],...t?lo(t):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const u=c&&a?_I(c,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(y=>{let[k]=y;k&&k.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),r()}),c&&!l&&h.observe(c),t&&h.observe(t));let g,m=l?ci(e):null;l&&v();function v(){const y=ci(e);m&&!Wv(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 kI=QD,SI=XD,EI=KD,xI=tI,TI=YD,AI=GD,CI=eI,OI=(e,t,r)=>{const n=new Map,i={platform:bI,...r},s={...i.platform,_c:n};return HD(e,t,{...i,platform:s})};function di(e){return typeof e=="function"?e():e}function Hv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gv(e,t){const r=Hv(e);return Math.round(t*r)/r}function Kv(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 DI(e){const t=e.whileElementsMounted,r=D(()=>di(e.open)??!0),n=D(()=>di(e.middleware)),i=D(()=>di(e.transform)??!0),s=D(()=>di(e.placement)??"bottom"),o=D(()=>di(e.strategy)??"absolute"),a=D(()=>di(e.sideOffset)??0),l=D(()=>di(e.alignOffset)??0),c=e.reference;let d=re(0),u=re(0);const p=Er(null);let h=re(Me(f(o))),g=re(Me(f(s))),m=re(Me({})),v=re(!1),y=!1,k=0;const E=D(()=>{const N=p.current?Gv(p.current,f(d)):f(d),V=p.current?Gv(p.current,f(u)):f(u);return f(i)?{position:f(h),left:"0",top:"0",transform:`translate(${N}px, ${V}px)`,...p.current&&Hv(p.current)>=1.5&&{willChange:"transform"}}:{position:f(h),left:`${N}px`,top:`${V}px`}});let x;function A(){if(c.current===null||p.current===null)return;const N=c.current,V=p.current,U=++k;OI(N,V,{middleware:f(n),placement:f(s),strategy:f(o)}).then(oe=>{if(U===k&&!(c.current!==N||p.current!==V)){if(II(N)){I(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(a)),Math.abs(f(l)),15);if(oe.x<=pe&&oe.y<=pe)return}I(d,oe.x,!0),I(u,oe.y,!0),I(h,oe.strategy,!0),I(g,oe.placement,!0),I(m,oe.middlewareData,!0),I(v,!0)}})}function O(){typeof x=="function"&&(x(),x=void 0),k++}function $(){if(O(),t===void 0){A();return}f(r)&&(c.current===null||p.current===null||(x=t(c.current,p.current,A)))}function z(){!f(r)&&p.current===null&&I(v,!1)}function B(){return[f(n),f(s),f(o),f(a),f(l),f(r)]}return ge(()=>{t===void 0&&f(r)&&A()}),ge($),ge(()=>{if(t!==void 0){if(B(),!f(r)){y=!1;return}if(!f(v)){y=!1;return}if(!y){y=!0;return}A()}}),ge(z),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(E)},get update(){return A}}}function II(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var PI={top:"bottom",right:"left",bottom:"top",left:"right"},$c=new $t("Floating.Root"),Yv=new $t("Floating.Content"),Mc=new $t("Floating.Root"),$I=class fd{static create(t=!1){return t?Mc.set(new fd):$c.set(new fd)}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})}},MI=class hd{static create(t,r=!1){return r?Yv.set(new hd(t,Mc.get())):Yv.set(new hd(t,$c.get()))}opts;root;contentRef=Er(null);wrapperRef=Er(null);arrowRef=Er(null);contentAttachment=Xe(this.contentRef);wrapperAttachment=Xe(this.wrapperRef);arrowAttachment=Xe(this.arrowRef);arrowId=Er(Rn());#e=D(()=>{if(typeof this.opts.style=="string")return Ks(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new JA(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>f(this.#a).length>0);get hasExplicitBoundaries(){return f(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:f(this.#a).filter(vC),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return f(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=re(void 0);#c=re(void 0);#d=re(void 0);#h=re(void 0);#p=D(()=>[kI({mainAxis:this.opts.sideOffset.current+f(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&SI({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?CI():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&EI({...this.detectOverflowOptions}),xI({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#c,n,!0),I(this.#d,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&AI({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),NI({arrowWidth:f(this.#n),arrowHeight:f(this.#i)}),this.opts.hideWhenDetached.current&&TI({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return f(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>RI(this.floating.placement));get placedSide(){return f(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>LI(this.floating.placement));get placedAlign(){return f(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return f(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return f(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return f(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=re();get contentZIndex(){return f(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>PI[this.placedSide]);get arrowBaseSide(){return f(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${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){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Js({...f(this.#e)}),...this.contentAttachment}));get props(){return f(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return f(this.#S)}set arrowStyle(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),rt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=DI({strategy:()=>this.opts.strategy.current,placement:()=>f(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>wI(...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()}),rt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Im(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),ge(()=>{this.floating.floating.current=this.wrapperRef.current})}},FI=class pd{static create(t,r=!1){return r?new pd(t,Mc.get()):new pd(t,$c.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=vA(t.virtualEl.current):r.triggerNode=t.ref}};function NI(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,c]=Fc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+a/2;let h="",g="";return l==="bottom"?(h=s?d:`${u}px`,g=`${-a}px`):l==="top"?(h=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}}}function Fc(e){const[t,r="center"]=e.split("-");return[t,r]}function RI(e){return Fc(e)[0]}function LI(e){return Fc(e)[1]}function Jv(e,t){ee(t,!0);let r=_(t,"children",7),n=_(t,"tooltip",7,!1);$I.create(n());var i={get children(){return r()},set children(a){r(a),b()},get tooltip(){return n()},set tooltip(a=!1){n(a),b()}},s=Y(),o=q(s);return we(o,()=>r()??Ne),S(e,s),te(i)}ne(Jv,{children:{},tooltip:{}},[],[],{mode:"open"});function Qv(e,t){ee(t,!0);let r=_(t,"id",7),n=_(t,"children",7),i=_(t,"virtualEl",7),s=_(t,"ref",7),o=_(t,"tooltip",7,!1);FI.create({id:L(()=>r()),virtualEl:L(()=>i()),ref:s()},o());var a={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 o()},set tooltip(d=!1){o(d),b()}},l=Y(),c=q(l);return we(c,()=>n()??Ne),S(e,l),te(a)}ne(Qv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function Xv(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"),o=_(t,"alignOffset",7,0),a=_(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,()=>({})),E=_(t,"wrapperId",23,Rn),x=_(t,"customAnchor",7,null),A=_(t,"enabled",7),O=_(t,"tooltip",7,!1);const $=MI.create({side:L(()=>n()),sideOffset:L(()=>i()),align:L(()=>s()),alignOffset:L(()=>o()),id:L(()=>a()),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(()=>A()),wrapperId:L(()=>E()),customAnchor:L(()=>x())},O()),z=D(()=>We($.wrapperProps,{style:{pointerEvents:"auto"}}));var B={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 o()},set alignOffset(U=0){o(U),b()},get id(){return a()},set id(U){a(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 E()},set wrapperId(U=Rn()){E(U),b()},get customAnchor(){return x()},set customAnchor(U=null){x(U),b()},get enabled(){return A()},set enabled(U){A(U),b()},get tooltip(){return O()},set tooltip(U=!1){O(U),b()}},N=Y(),V=q(N);return we(V,()=>r()??Ne,()=>({props:$.props,wrapperProps:f(z)})),S(e,N),te(B)}ne(Xv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function eg(e,t){ee(t,!0);let r=_(t,"content",7),n=_(t,"onPlaced",7);rn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),b()},get onPlaced(){return n()},set onPlaced(a){n(a),b()}},s=Y(),o=q(s);return we(o,()=>r()??Ne,()=>({props:{},wrapperProps:{}})),S(e,s),te(i)}ne(eg,{content:{},onPlaced:{}},[],[],{mode:"open"});var zI=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function tg(e,t){ee(t,!0);let r=_(t,"content",7),n=_(t,"isStatic",7,!1),i=_(t,"onPlaced",7),s=je(t,zI);var o={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()}},a=Y(),l=q(a),c=u=>{eg(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{Xv(u,Tn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),S(e,a),te(o)}ne(tg,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var qI=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"]),UI=j("<!> <!>",1);function Nc(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),a=_(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),E=_(t,"updatePositionStrategy",7),x=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),$=_(t,"wrapperId",7),z=_(t,"style",7),B=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),V=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),J=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),Q=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),le=_(t,"isStatic",7,!1),W=_(t,"enabled",7),X=_(t,"ref",7),ue=_(t,"tooltip",7,!1),F=_(t,"contentPointerEvents",7,"auto"),H=je(t,qI);const R=D(()=>O()??!0),ve=D(()=>x()??(f(R)?"fixed":"absolute"));var fe={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 o()},set id(w){o(w),b()},get onPointerDown(){return a()},set onPointerDown(w){a(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 E()},set updatePositionStrategy(w){E(w),b()},get strategy(){return x()},set strategy(w){x(w),b()},get dir(){return A()},set dir(w){A(w),b()},get preventScroll(){return O()},set preventScroll(w){O(w),b()},get wrapperId(){return $()},set wrapperId(w){$(w),b()},get style(){return z()},set style(w){z(w),b()},get onPlaced(){return B()},set onPlaced(w){B(w),b()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),b()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(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 J()},set loop(w){J(w),b()},get trapFocus(){return ae()},set trapFocus(w=!0){ae(w),b()},get isValidEvent(){return Q()},set isValidEvent(w=()=>!1){Q(w),b()},get customAnchor(){return de()},set customAnchor(w=null){de(w),b()},get isStatic(){return le()},set isStatic(w=!1){le(w),b()},get enabled(){return W()},set enabled(w){W(w),b()},get ref(){return X()},set ref(w){X(w),b()},get tooltip(){return ue()},set tooltip(w=!1){ue(w),b()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),b()}};return tg(e,{get isStatic(){return le()},get id(){return o()},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 E()},get strategy(){return f(ve)},get dir(){return A()},get wrapperId(){return $()},get style(){return z()},get onPlaced(){return B()},get customAnchor(){return de()},get enabled(){return W()},get tooltip(){return ue()},content:(Te,Ce)=>{let Ge=()=>Ce?.().props,it=()=>Ce?.().wrapperProps;var Ke=UI(),Mt=q(Ke),st=Ft=>{nc(Ft,{get preventScroll(){return f(R)}})},er=Ft=>{nc(Ft,{get preventScroll(){return f(R)}})};ce(Mt,Ft=>{t.forceMount&&W()?Ft(st):t.forceMount||Ft(er,1)});var Tt=K(Mt,2);Xm(Tt,{get onOpenAutoFocus(){return U()},get onCloseAutoFocus(){return V()},get loop(){return J()},get enabled(){return W()},get trapFocus(){return ae()},get forceMount(){return t.forceMount},get ref(){return X()},focusScope:(tr,Zt)=>{let mr=()=>Zt?.().props;Qm(tr,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return W()},get ref(){return X()},children:(Ir,Pr)=>{Jm(Ir,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return Q()},get enabled(){return W()},get ref(){return X()},children:($r,vr)=>{let Jr=()=>vr?.().props;rv($r,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return W()},get ref(){return X()},children:(Qr,kt)=>{var Un=Y(),is=q(Un);{let ss=D(()=>({props:We(H,Ge(),Jr(),mr(),{style:{pointerEvents:F()}}),wrapperProps:it()}));we(is,()=>r()??Ne,()=>f(ss))}S(Qr,Un)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(Te,Ke)},$$slots:{content:!0}}),te(fe)}ne(Nc,{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 VI=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 rg(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"open",7),i=_(t,"onEscapeKeydown",7),s=_(t,"escapeKeydownBehavior",7),o=_(t,"preventOverflowTextSelection",7),a=_(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),E=_(t,"hideWhenDetached",7),x=_(t,"updatePositionStrategy",7),A=_(t,"strategy",7),O=_(t,"dir",7),$=_(t,"preventScroll",7),z=_(t,"wrapperId",7),B=_(t,"style",7),N=_(t,"onPlaced",7),V=_(t,"onInteractOutside",7),U=_(t,"onCloseAutoFocus",7),oe=_(t,"onOpenAutoFocus",7),pe=_(t,"onFocusOutside",7),J=_(t,"interactOutsideBehavior",7,"close"),ae=_(t,"loop",7),Q=_(t,"trapFocus",7,!0),de=_(t,"isValidEvent",7,()=>!1),le=_(t,"customAnchor",7,null),W=_(t,"isStatic",7,!1),X=_(t,"ref",7),ue=_(t,"shouldRender",7),F=je(t,VI);var H={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 o()},set preventOverflowTextSelection(w){o(w),b()},get id(){return a()},set id(w){a(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 E()},set hideWhenDetached(w){E(w),b()},get updatePositionStrategy(){return x()},set updatePositionStrategy(w){x(w),b()},get strategy(){return A()},set strategy(w){A(w),b()},get dir(){return O()},set dir(w){O(w),b()},get preventScroll(){return $()},set preventScroll(w){$(w),b()},get wrapperId(){return z()},set wrapperId(w){z(w),b()},get style(){return B()},set style(w){B(w),b()},get onPlaced(){return N()},set onPlaced(w){N(w),b()},get onInteractOutside(){return V()},set onInteractOutside(w){V(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 J()},set interactOutsideBehavior(w="close"){J(w),b()},get loop(){return ae()},set loop(w){ae(w),b()},get trapFocus(){return Q()},set trapFocus(w=!0){Q(w),b()},get isValidEvent(){return de()},set isValidEvent(w=()=>!1){de(w),b()},get customAnchor(){return le()},set customAnchor(w=null){le(w),b()},get isStatic(){return W()},set isStatic(w=!1){W(w),b()},get ref(){return X()},set ref(w){X(w),b()},get shouldRender(){return ue()},set shouldRender(w){ue(w),b()}},R=Y(),ve=q(R),fe=w=>{Nc(w,Tn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return d()},get sideOffset(){return u()},get align(){return 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 E()},get updatePositionStrategy(){return x()},get strategy(){return A()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return z()},get style(){return B()},get onPlaced(){return N()},get customAnchor(){return le()},get isStatic(){return W()},get enabled(){return n()},get onInteractOutside(){return V()},get onCloseAutoFocus(){return U()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return J()},get loop(){return ae()},get trapFocus(){return Q()},get isValidEvent(){return de()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return X()}},()=>F))};return ce(ve,w=>{ue()&&w(fe)}),S(e,R),te(H)}ne(rg,{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 BI=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 ng(e,t){ee(t,!0);let r=_(t,"popper",7),n=_(t,"onEscapeKeydown",7),i=_(t,"escapeKeydownBehavior",7),s=_(t,"preventOverflowTextSelection",7),o=_(t,"id",7),a=_(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),E=_(t,"updatePositionStrategy",7),x=_(t,"strategy",7),A=_(t,"dir",7),O=_(t,"preventScroll",7),$=_(t,"wrapperId",7),z=_(t,"style",7),B=_(t,"onPlaced",7),N=_(t,"onInteractOutside",7),V=_(t,"onCloseAutoFocus",7),U=_(t,"onOpenAutoFocus",7),oe=_(t,"onFocusOutside",7),pe=_(t,"interactOutsideBehavior",7,"close"),J=_(t,"loop",7),ae=_(t,"trapFocus",7,!0),Q=_(t,"isValidEvent",7,()=>!1),de=_(t,"customAnchor",7,null),le=_(t,"isStatic",7,!1),W=_(t,"enabled",7),X=je(t,BI);var ue={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 o()},set id(F){o(F),b()},get onPointerDown(){return a()},set onPointerDown(F){a(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 E()},set updatePositionStrategy(F){E(F),b()},get strategy(){return x()},set strategy(F){x(F),b()},get dir(){return A()},set dir(F){A(F),b()},get preventScroll(){return O()},set preventScroll(F){O(F),b()},get wrapperId(){return $()},set wrapperId(F){$(F),b()},get style(){return z()},set style(F){z(F),b()},get onPlaced(){return B()},set onPlaced(F){B(F),b()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),b()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(F){V(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 J()},set loop(F){J(F),b()},get trapFocus(){return ae()},set trapFocus(F=!0){ae(F),b()},get isValidEvent(){return Q()},set isValidEvent(F=()=>!1){Q(F),b()},get customAnchor(){return de()},set customAnchor(F=null){de(F),b()},get isStatic(){return le()},set isStatic(F=!1){le(F),b()},get enabled(){return W()},set enabled(F){W(F),b()}};return Nc(e,Tn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return 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 E()},get strategy(){return x()},get dir(){return A()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return z()},get onPlaced(){return B()},get customAnchor(){return de()},get isStatic(){return le()},get enabled(){return W()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return U()},get interactOutsideBehavior(){return pe()},get loop(){return J()},get trapFocus(){return ae()},get isValidEvent(){return Q()},get onFocusOutside(){return oe()}},()=>X,{forceMount:!0})),te(ue)}ne(ng,{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 ja=ba({component:"date-field",parts:["input","label","segment"]}),Ki={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return to(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||mv(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"),jI=class xy{static create(t,r){return qn.set(new xy(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Rn();formatter;initialSegments;#e=re();get segmentValues(){return f(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return f(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=fv();#r=re(null);#n=re(null);#i=re(null);get descriptionNode(){return f(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=re(null);get validationNode(){return f(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=fv();#a=re(null);get dayPeriodNode(){return f(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=re("");get name(){return f(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new ji(()=>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=yv({initialLocale:this.locale.current,monthFormat:L(()=>"long"),yearFormat:L(()=>"numeric")}),this.initialSegments=ac(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Da(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(()=>{Re(()=>{this.initialSegments=ac(this.inferredGranularity)})}),rn(()=>{this.announcer=Da(this.domContext.getDocument())}),si(()=>{r||DO(this.descriptionId,this.domContext.getDocument())}),ge(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),ge(()=>{if(r)return;this.value.current&&OO({id:Re(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=Re(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Re(()=>{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=ac(this.inferredGranularity))}),rt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:f(this.#r)}setLabelNode(t){I(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=Pa.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=$a.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&&li(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&li(i,t)?{reason:"max"}:!1});get validationStatus(){return f(this.#u)}set validationStatus(t){I(this.#u,t)}#c=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return f(this.#c)}set isInvalid(t){I(this.#c,t)}#d=D(()=>{const t=this.granularity.current;return t||AO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return f(this.#d)}set inferredGranularity(t){I(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){I(this.#h,t)}#p=D(()=>wO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return f(this.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return f(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(TO(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const p=to(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[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&&(o.hour=`${h-12}`):u==="PM"&&h<12&&(o.hour=`${h+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const p=this.formatter.dayPeriod(Bt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(p==="AM"||p==="PM")&&(o.dayPeriod=p)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Ma(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const p=to(Bt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[t]:u}}else if(t==="year"){const p=d(c);this.states.year.updating=p,a={...o,[t]:p}}else if(t==="day"){const p=d(c);this.states.day.updating=p,a={...o,[t]:p}}else a={...o,[t]:u}}this.segmentValues=a,xO(a,f(this.#r))?this.setValue(EO({segmentObj:a,fieldNode:f(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":Yu(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}`,[ja.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=CO(r,f(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},ZI=class Ty{static create(t){return new Ty(t,qn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new ji(t.ref),this.root.domContext=this.domContext,this.attachment=Xe(t.ref,n=>this.root.setFieldNode(n)),rt(()=>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),[ja.input]:"",...this.attachment}));get props(){return f(this.#t)}set props(t){I(this.#t,t)}},WI=class Ay{static create(){return new Ay(qn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return f(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return f(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return f(this.#r)}set props(t){I(this.#r,t)}},HI=class Cy{static create(t){return new Cy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Xe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=$O(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),[ja.label]:"",onclick:this.onclick,...this.attachment}));get props(){return f(this.#e)}set props(t){I(this.#e,t)}},Yi=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=Xe(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(),!!lc(e.key))){if(Rc(e.key)){this.#i(t);return}if(Lc(e.key)){this.#s(t);return}if(_a(e.key)){this.#a(e);return}if(zc(e.key)){this.#o(e);return}io(e.key)&&no(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&vv(e,this.root.getFieldNode())}#o(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1);let r=!1;this.root.updateSegment(this.part,n=>{if(n===null)return r=!0,this.announcer.announce(null),null;if(n.length===2&&n.startsWith("0"))return this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=Number.parseInt(i.slice(0,-1));return this.announcer.announce(this.#r(s)),`${s}`}),r&&gv(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return f(this.#l)}set props(e){I(this.#l,e)}},GI=class extends Yi{#e=[];#t=0;constructor(e,t){super(e,t,"year",Ki.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!lc(e.key))){if(Rc(e.key)){this.#r(),super.onkeydown(e);return}if(Lc(e.key)){this.#r(),super.onkeydown(e);return}if(_a(e.key)){this.#i(e);return}if(zc(e.key)){this.#s(e);return}io(e.key)&&no(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),ig(s));this.announcer.announce(s),t=!0;const o=`${s}`;return o.length>4?o.slice(0,4):o}),(this.#e.length===4||this.#e.length===this.#t)&&(t=!0),t&&vv(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&&gv(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?ig(Number.parseInt(t)):t)}},KI=class extends Yi{constructor(e,t){super(e,t,"day",Ki.day)}},YI=class extends Yi{constructor(e,t){super(e,t,"month",Ki.month)}},JI=class extends Yi{constructor(e,t){super(e,t,"hour",Ki.hour)}onkeydown(e){if(_a(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)}},QI=class extends Yi{constructor(e,t){super(e,t,"minute",Ki.minute)}},XI=class extends Yi{constructor(e,t){super(e,t,"second",Ki.second)}},eP=class Oy{static create(t){return new Oy(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=Xe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!iP(t.key))){if(Rc(t.key)||Lc(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}zc(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}),io(t.key)&&no(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){I(this.#t,t)}},tP=class Dy{static create(t){return new Dy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":Yu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return f(this.#e)}set props(t){I(this.#e,t)}},rP=class Iy{static create(t){return new Iy(t,qn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Xe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&io(t.key)&&no(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){I(this.#e,t)}},nP=class{static create(e,t){const r=qn.get();switch(e){case"day":return new KI(t,r);case"month":return new YI(t,r);case"year":return new GI(t,r);case"hour":return new JI(t,r);case"minute":return new QI(t,r);case"second":return new XI(t,r);case"dayPeriod":return new eP(t,r);case"literal":return new tP(t,r);case"timeZoneName":return new rP(t,r)}}};function iP(e){return lc(e)||e==="A"||e==="P"||e==="a"||e==="p"}function Rc(e){return e===Qu}function Lc(e){return e===Ju}function zc(e){return e===fC}function ig(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function sg(e,t){ee(t,!1);const r=WI.create();Jl();var n=Y(),i=q(n),s=o=>{Av(o,Tn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),S(e,n),te()}ne(sg,{},[],[],{mode:"open"});var sP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),oP=j("<div><!></div>"),aP=j("<!> <!>",1);function og(e,t){const r=pt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"name",7,""),o=_(t,"children",7),a=_(t,"child",7),l=je(t,sP);const c=ZI.create({id:L(()=>n()),ref:L(()=>i(),v=>i(v)),name:L(()=>s())}),d=D(()=>We(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 o()},set children(v){o(v),b()},get child(){return a()},set child(v){a(v),b()}},p=aP(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,a,()=>({props:f(d),segments:c.root.segmentContents})),S(v,y)},m=v=>{var y=oP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>o()??Ne,()=>({segments:c.root.segmentContents})),P(y),S(v,y)};return ce(h,v=>{a()?v(g):v(m,-1)}),sg(K(h,2),{}),S(e,p),te(u)}ne(og,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var lP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),uP=j("<div><!></div>");function ag(e,t){const r=pt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),o=_(t,"child",7),a=je(t,lP);const l=HI.create({id:L(()=>n()),ref:L(()=>i(),m=>i(m))}),c=D(()=>We(a,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 o()},set child(m){o(m),b()}},u=Y(),p=q(u),h=m=>{var v=Y(),y=q(v);we(y,o,()=>({props:f(c)})),S(m,v)},g=m=>{var v=uP();ze(v,()=>({...f(c)}));var y=M(v);we(y,()=>s()??Ne),P(v),S(m,v)};return ce(p,m=>{o()?m(h):m(g,-1)}),S(e,u),te(d)}ne(ag,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var cP=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),dP=j("<span><!></span>");function lg(e,t){const r=pt();ee(t,!0);let n=_(t,"id",23,()=>Ie(r)),i=_(t,"ref",15,null),s=_(t,"children",7),o=_(t,"child",7),a=_(t,"part",7),l=je(t,cP);const c=nP.create(a(),{id:L(()=>n()),ref:L(()=>i(),v=>i(v))}),d=D(()=>We(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 o()},set child(v){o(v),b()},get part(){return a()},set part(v){a(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);we(k,o,()=>({props:f(d)})),S(v,y)},m=v=>{var y=dP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>s()??Ne),P(y),S(v,y)};return ce(h,v=>{o()?v(g):v(m,-1)}),S(e,p),te(u)}ne(lg,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var ug=new $t("DatePicker.Root"),fP=class Py{static create(t){return ug.set(new Py(t))}opts;constructor(t){this.opts=t}};function qc(e,t){const[r,n]=e;let i=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=t[o]??[0,0],[d,u]=t[a]??[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(i=!i)}return i}function Uc(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function cg(e,t){const r=e.left+e.width/2,n=e.top+e.height/2,i=t.left+t.width/2,s=t.top+t.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}var hP=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#c(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=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,rt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=ya(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const p=u.relatedTarget;if(oi(p)&&n.contains(p))return;const h=this.#e.ignoredTargets?.()??[];oi(p)&&h.some(g=>g===p||g.contains(p))||(this.#s=oi(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;oi(p)&&r.contains(p)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#c())};return[gt(s,"pointermove",o),gt(r,"pointerleave",a),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"&&Uc(e,i)){this.#f();return}if(this.#i==="trigger"&&Uc(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Uc(e,c))return;const d=cg(n,c),u=this.#m(n,c,d);if(u&&qc(e,u))return}const s=cg(n,i),o=this.#m(n,i,s);if(o&&qc(e,o))return;const a=this.#i==="content"?i:n;qc(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#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,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},Vc=ba({component:"popover",parts:["root","trigger","content","close","overlay"]}),Bc=new $t("Popover.Root"),pP=class $y{static create(t){return Bc.set(new $y(t))}opts;#e=re(null);get contentNode(){return f(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=re(null);get triggerNode(){return f(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=re(null);get overlayNode(){return f(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=re(!1);get openedViaHover(){return f(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=re(!1);get hasInteractedWithContent(){return f(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=re(!1);get hoverCooldown(){return f(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=re(0);get closeDelay(){return f(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Nm({ref:L(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Nm({ref:L(()=>this.overlayNode),open:this.opts.open}),rt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},mP=class My{static create(t){return new My(t,Bc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=re(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new ji(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),rt(()=>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||wa(t)||(I(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(wa(t)||(I(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())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":xr(this.root.opts.open.current),"data-state":Pm(this.root.opts.open.current),"aria-controls":this.#a(),[Vc.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.#o)}set props(t){I(this.#o,t)}},vP=class Fy{static create(t){return new Fy(t,Bc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Xe(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 hP({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;oi(r)&&zC(r)&&this.root.markInteraction()}onpointerenter(t){wa(t)||this.root.cancelDelayedClose()}onpointerleave(t){wa(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!oi(t.target))return;const r=t.target.closest(Vc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(oi(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){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Pm(this.root.opts.open.current),...cC(this.root.contentPresence.transitionStatus),[Vc.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){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function dg(e,t){ee(t,!0);let r=_(t,"open",15,!1),n=_(t,"onOpenChange",7,Se),i=_(t,"onOpenChangeComplete",7,Se),s=_(t,"value",15),o=_(t,"onValueChange",7,Se),a=_(t,"placeholder",15),l=_(t,"onPlaceholderChange",7,Se),c=_(t,"isDateUnavailable",7,()=>!1),d=_(t,"validate",7,Se),u=_(t,"onInvalid",7,Se),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),E=_(t,"locale",7),x=_(t,"hideTimeZone",7,!1),A=_(t,"required",7,!1),O=_(t,"calendarLabel",7,"Event"),$=_(t,"disableDaysOutsideMonth",7,!0),z=_(t,"preventDeselect",7,!1),B=_(t,"pagedNavigation",7,!1),N=_(t,"weekStartsOn",7),V=_(t,"weekdayFormat",7,"narrow"),U=_(t,"isDateDisabled",7,()=>!1),oe=_(t,"fixedWeeks",7,!1),pe=_(t,"numberOfMonths",7,1),J=_(t,"closeOnDateSelect",7,!0),ae=_(t,"initialFocus",7,!1),Q=_(t,"errorMessageId",7),de=_(t,"children",7),le=_(t,"monthFormat",7,"long"),W=_(t,"yearFormat",7,"numeric");const X=sv({granularity:v(),defaultValue:s(),minValue:p(),maxValue:h()});function ue(){a()===void 0&&a(X)}ue(),rt.pre(()=>a(),()=>{ue()});function F(){J()&&r(!1)}const H=fP.create({open:L(()=>r(),w=>{r(w),n()(w)}),value:L(()=>s(),w=>{s(w),o()(w)}),placeholder:L(()=>a(),w=>{a(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:Lm(()=>E()),hideTimeZone:L(()=>x()),required:L(()=>A()),calendarLabel:L(()=>O()),disableDaysOutsideMonth:L(()=>$()),preventDeselect:L(()=>z()),pagedNavigation:L(()=>B()),weekStartsOn:L(()=>N()),weekdayFormat:L(()=>V()),isDateDisabled:L(()=>U()),fixedWeeks:L(()=>oe()),numberOfMonths:L(()=>pe()),initialFocus:L(()=>ae()),onDateSelect:L(()=>F),defaultPlaceholder:X,monthFormat:L(()=>le()),yearFormat:L(()=>W())});pP.create({open:H.opts.open,onOpenChangeComplete:L(()=>i())}),jI.create({value:H.opts.value,disabled:H.opts.disabled,readonly:H.opts.readonly,readonlySegments:H.opts.readonlySegments,validate:L(()=>d()),onInvalid:L(()=>u()),minValue:H.opts.minValue,maxValue:H.opts.maxValue,granularity:H.opts.granularity,hideTimeZone:H.opts.hideTimeZone,hourCycle:H.opts.hourCycle,locale:H.opts.locale,required:H.opts.required,placeholder:H.opts.placeholder,errorMessageId:L(()=>Q()),isInvalidProp:L(()=>{})});var R={get open(){return r()},set open(w=!1){r(w),b()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),b()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),b()},get value(){return s()},set value(w){s(w),b()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),b()},get placeholder(){return a()},set placeholder(w){a(w),b()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),b()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),b()},get validate(){return d()},set validate(w=Se){d(w),b()},get onInvalid(){return u()},set onInvalid(w=Se){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 E()},set locale(w){E(w),b()},get hideTimeZone(){return x()},set hideTimeZone(w=!1){x(w),b()},get required(){return A()},set required(w=!1){A(w),b()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),b()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),b()},get preventDeselect(){return z()},set preventDeselect(w=!1){z(w),b()},get pagedNavigation(){return B()},set pagedNavigation(w=!1){B(w),b()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),b()},get weekdayFormat(){return V()},set weekdayFormat(w="narrow"){V(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 J()},set closeOnDateSelect(w=!0){J(w),b()},get initialFocus(){return ae()},set initialFocus(w=!1){ae(w),b()},get errorMessageId(){return Q()},set errorMessageId(w){Q(w),b()},get children(){return de()},set children(w){de(w),b()},get monthFormat(){return le()},set monthFormat(w="long"){le(w),b()},get yearFormat(){return W()},set yearFormat(w="numeric"){W(w),b()}},ve=Y(),fe=q(ve);return Pe(fe,()=>Jv,(w,Te)=>{Te(w,{children:(Ce,Ge)=>{var it=Y(),Ke=q(it);we(Ke,()=>de()??Ne),S(Ce,it)},$$slots:{default:!0}})}),S(e,ve),te(R)}ne(dg,{open:{},onOpenChange:{},onOpenChangeComplete:{},value:{},onValueChange:{},placeholder:{},onPlaceholderChange:{},isDateUnavailable:{},validate:{},onInvalid:{},minValue:{},maxValue:{},disabled:{},readonly:{},granularity:{},readonlySegments:{},hourCycle:{},locale:{},hideTimeZone:{},required:{},calendarLabel:{},disableDaysOutsideMonth:{},preventDeselect:{},pagedNavigation:{},weekStartsOn:{},weekdayFormat:{},isDateDisabled:{},fixedWeeks:{},numberOfMonths:{},closeOnDateSelect:{},initialFocus:{},errorMessageId:{},children:{},monthFormat:{},yearFormat:{}},[],[],{mode:"open"});var gP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),yP=j("<div><!></div>");function fg(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=je(t,gP);const l=ug.get(),c=Sv.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type: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(()=>We(a,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 o()},set ref(v=null){o(v),b()}},p=Y(),h=q(p),g=v=>{var y=Y(),k=q(y);{let E=D(()=>({props:f(d),...c.snippetProps}));we(k,i,()=>f(E))}S(v,y)},m=v=>{var y=yP();ze(y,()=>({...f(d)}));var k=M(y);we(k,()=>n()??Ne,()=>c.snippetProps),P(y),S(v,y)};return ce(h,v=>{i()?v(g):v(m,-1)}),S(e,p),te(u)}ne(fg,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var bP=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),hg=j("<div><div><!></div></div>");function pg(e,t){const r=pt();ee(t,!0);let n=_(t,"child",7),i=_(t,"children",7),s=_(t,"ref",15,null),o=_(t,"id",23,()=>Ie(r)),a=_(t,"forceMount",7,!1),l=_(t,"onOpenAutoFocus",7,Se),c=_(t,"onCloseAutoFocus",7,Se),d=_(t,"onEscapeKeydown",7,Se),u=_(t,"onInteractOutside",7,Se),p=_(t,"trapFocus",7,!0),h=_(t,"preventScroll",7,!1),g=_(t,"customAnchor",7,null),m=_(t,"style",7),v=je(t,bP);const y=vP.create({id:L(()=>o()),ref:L(()=>s(),N=>s(N)),onInteractOutside:L(()=>u()),onEscapeKeydown:L(()=>d()),customAnchor:L(()=>g())}),k=D(()=>We(v,y.props)),E=D(()=>p()&&y.shouldTrapFocus);function x(N){y.shouldTrapFocus||N.preventDefault(),l()(N)}var A={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 o()},set id(N=Ie(r)){o(N),b()},get forceMount(){return a()},set forceMount(N=!1){a(N),b()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),b()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),b()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),b()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){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=Y(),$=q(O),z=N=>{ng(N,Tn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get enabled(){return y.root.opts.open.current},get id(){return o()},get trapFocus(){return f(E)},get preventScroll(){return h()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:x,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ae=D(()=>We(pe(),{style:Kv("popover")},{style:m()}));var Q=Y(),de=q(Q),le=X=>{var ue=Y(),F=q(ue);{let H=D(()=>({props:f(ae),wrapperProps:J(),...y.snippetProps}));we(F,n,()=>f(H))}S(X,ue)},W=X=>{var ue=hg();ze(ue,()=>({...J()}));var F=M(ue);ze(F,()=>({...f(ae)}));var H=M(F);we(H,()=>i()??Ne),P(F),P(ue),S(X,ue)};ce(de,X=>{n()?X(le):X(W,-1)}),S(U,Q)},$$slots:{popper:!0}}))},B=N=>{rg(N,Tn(()=>f(k),()=>y.popperProps,{get ref(){return y.opts.ref},get open(){return y.root.opts.open.current},get id(){return o()},get trapFocus(){return f(E)},get preventScroll(){return h()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:x,get onCloseAutoFocus(){return c()},get shouldRender(){return y.shouldRender},popper:(U,oe)=>{let pe=()=>oe?.().props,J=()=>oe?.().wrapperProps;const ae=D(()=>We(pe(),{style:Kv("popover")},{style:m()}));var Q=Y(),de=q(Q),le=X=>{var ue=Y(),F=q(ue);{let H=D(()=>({props:f(ae),wrapperProps:J(),...y.snippetProps}));we(F,n,()=>f(H))}S(X,ue)},W=X=>{var ue=hg();ze(ue,()=>({...J()}));var F=M(ue);ze(F,()=>({...f(ae)}));var H=M(F);we(H,()=>i()??Ne),P(F),P(ue),S(X,ue)};ce(de,X=>{n()?X(le):X(W,-1)}),S(U,Q)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(z):a()||N(B,1)}),S(e,O),te(A)}ne(pg,{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 mg(e,t){ee(t,!0);let r=_(t,"ref",15,null),n=_(t,"onOpenAutoFocus",7),i=je(t,_P);const s=D(()=>We({onOpenAutoFocus:n()},{onOpenAutoFocus:GO}));var o={get ref(){return r()},set ref(a=null){r(a),b()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),b()}};return pg(e,Tn(()=>f(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),te(o)}ne(mg,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var wP=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),kP=j("<button><!></button>");function vg(e,t){const r=pt();ee(t,!0);let n=_(t,"children",7),i=_(t,"child",7),s=_(t,"id",23,()=>Ie(r)),o=_(t,"ref",15,null),a=_(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=je(t,wP);const h=mP.create({id:L(()=>s()),ref:L(()=>o(),v=>o(v)),disabled:L(()=>!!l()),openOnHover:L(()=>c()),openDelay:L(()=>d()),closeDelay:L(()=>u())}),g=D(()=>We(p,h.props,{type:a()}));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 o()},set ref(v=null){o(v),b()},get type(){return a()},set type(v="button"){a(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 Qv(e,{get id(){return s()},get ref(){return h.opts.ref},children:(v,y)=>{var k=Y(),E=q(k),x=O=>{var $=Y(),z=q($);we(z,i,()=>({props:f(g)})),S(O,$)},A=O=>{var $=kP();ze($,()=>({...f(g)}));var z=M($);we(z,()=>n()??Ne),P($),S(O,$)};ce(E,O=>{i()?O(x):O(A,-1)}),S(v,k)},$$slots:{default:!0}}),te(m)}ne(vg,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var SP=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function gg(e,t){ee(t,!0);let r=_(t,"ref",15,null),n=_(t,"onkeydown",7),i=je(t,SP);function s(l){if(io(l.key)){const c=l.currentTarget.closest(ja.selector("input"));if(!c)return;no(l,c)}}const o=D(()=>We({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),b()},get onkeydown(){return n()},set onkeydown(l){n(l),b()}};return vg(e,Tn(()=>i,{"data-segment":"trigger"},()=>f(o),{get ref(){return r()},set ref(l){r(l)}})),te(a)}ne(gg,{ref:{},onkeydown:{}},[],[],{mode:"open"});var jc=j("<!> <!>",1),yg=j("<!> <!> <!>",1);function bg(e,t){ee(t,!0);let r=_(t,"dateString",15),n=_(t,"labelClass",7),i=_(t,"inputClass",7),s=_(t,"labelText",7),o=re(Me(ei(Vt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);ge(()=>{r(f(o).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=Y(),d=q(c);{let u=D(()=>C.locale||"de");Pe(d,()=>dg,(p,h)=>{h(p,{get locale(){return f(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(ei(Vt()))<0,get value(){return f(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=yg(),y=q(v);Pe(y,()=>ag,(x,A)=>{A(x,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var z=Y(),B=q(z),N=V=>{var U=Y(),oe=q(U);we(oe,s),S(V,U)};ce(B,V=>{s()&&V(N)}),S(O,z)},$$slots:{default:!0}})});var k=K(y,2);{const x=(A,O)=>{let $=()=>O?.().segments;var z=jc(),B=q(z);Le(B,17,$,nn,(V,U)=>{let oe=()=>f(U).part,pe=()=>f(U).value;var J=Y(),ae=q(J);Pe(ae,()=>lg,(Q,de)=>{de(Q,{get part(){return oe()},children:(le,W)=>{At();var X=qt();se(()=>ie(X,pe())),S(le,X)},$$slots:{default:!0}})}),S(V,J)});var N=K(B,2);Pe(N,()=>gg,(V,U)=>{U(V,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),S(A,z)};Pe(k,()=>og,(A,O)=>{O(A,{get class(){return`go-datepicker-input ${i()??""}`},children:x,$$slots:{default:!0}})})}var E=K(k,2);Pe(E,()=>mg,(x,A)=>{A(x,{children:(O,$)=>{var z=Y(),B=q(z);{const N=(V,U)=>{let oe=()=>U?.().months,pe=()=>U?.().weekdays;var J=jc(),ae=q(J);Pe(ae,()=>yc,(de,le)=>{le(de,{children:(W,X)=>{var ue=yg(),F=q(ue);Pe(F,()=>wc,(ve,fe)=>{fe(ve,{class:"go-datepicker-previous"})});var H=K(F,2);Pe(H,()=>bc,(ve,fe)=>{fe(ve,{class:"go-datepicker-selected-month"})});var R=K(H,2);Pe(R,()=>_c,(ve,fe)=>{fe(ve,{class:"go-datepicker-next"})}),S(W,ue)},$$slots:{default:!0}})});var Q=K(ae,2);Le(Q,16,oe,de=>de,(de,le)=>{var W=Y(),X=q(W);Pe(X,()=>hc,(ue,F)=>{F(ue,{children:(H,R)=>{var ve=jc(),fe=q(ve);Pe(fe,()=>vc,(Te,Ce)=>{Ce(Te,{children:(Ge,it)=>{var Ke=Y(),Mt=q(Ke);Pe(Mt,()=>oo,(st,er)=>{er(st,{children:(Tt,Ft)=>{var tr=Y(),Zt=q(tr);Le(Zt,17,pe,nn,(mr,Ir)=>{var Pr=Y(),bn=q(Pr);Pe(bn,()=>gc,($r,vr)=>{vr($r,{children:(Jr,Qr)=>{At();var kt=qt();se(()=>ie(kt,f(Ir))),S(Jr,kt)},$$slots:{default:!0}})}),S(mr,Pr)}),S(Tt,tr)},$$slots:{default:!0}})}),S(Ge,Ke)},$$slots:{default:!0}})});var w=K(fe,2);Pe(w,()=>pc,(Te,Ce)=>{Ce(Te,{children:(Ge,it)=>{var Ke=Y(),Mt=q(Ke);Le(Mt,16,()=>le.weeks,st=>st,(st,er)=>{var Tt=Y(),Ft=q(Tt);Pe(Ft,()=>oo,(tr,Zt)=>{Zt(tr,{children:(mr,Ir)=>{var Pr=Y(),bn=q(Pr);Le(bn,16,()=>er,$r=>$r,($r,vr,Jr,Qr)=>{var kt=Y(),Un=q(kt);Pe(Un,()=>mc,(is,ss)=>{ss(is,{get date(){return vr},get month(){return le.value},children:(fo,td)=>{var gi=Y(),os=q(gi);Pe(os,()=>fc,(gr,Vn)=>{Vn(gr,{})}),S(fo,gi)},$$slots:{default:!0}})}),S($r,kt)}),S(mr,Pr)},$$slots:{default:!0}})}),S(st,Tt)}),S(Ge,Ke)},$$slots:{default:!0}})}),S(H,ve)},$$slots:{default:!0}})}),S(de,W)}),S(V,J)};Pe(B,()=>fg,(V,U)=>{U(V,{children:N,$$slots:{default:!0}})})}S(O,z)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})})}return S(e,c),te(l)}ne(bg,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var EP=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),xP=j('<span class="go-field-star" aria-hidden="true">*</span>'),TP=j(" <!>",1),AP=j("<label><!></label> <input/>",1),CP=j("<label><!></label> <textarea></textarea>",1),OP=j('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),DP=j("<label><!></label> <input/> <!>",1),IP=j('<label><input/> <span class="go-checkbox-label"><!></span></label>'),PP=j('<img src="" alt=""/> <option> </option>',1),$P=j('<option disabled="" hidden="" selected=""> </option> <!>',1),MP=j("<!>",1),FP=j("<label><!></label> <select><!></select>",1),NP=j('<img style="width: 60px" aria-hidden="true"/>'),RP=j('<span class="go-payment-mode-icons"></span>'),LP=j('<span class="go-payment-mode-name"> </span>'),zP=j('<label><input type="radio"/> <!></label>'),qP=j('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),UP=j("<label> <input/></label>"),VP=j("<fieldset><legend><!></legend> <!></fieldset>");function _g(e,t){ee(t,!0);const r=J=>{At();var ae=TP(),Q=q(ae),de=K(Q),le=W=>{var X=xP();S(W,X)};ce(de,W=>{u().required&&W(le)}),se(()=>ie(Q,`${f(z)??""} `)),S(J,ae)},n=J=>{var ae=AP(),Q=q(ae);r(M(Q)),P(Q);var de=K(Q,2);ze(de,()=>({...f($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),se(()=>{St(Q,1,ur(h())),me(Q,"for",f(A))}),Uo(de,()=>u().value,le=>u(u().value=le,!0)),S(J,ae)},i=J=>{var ae=CP(),Q=q(ae);r(M(Q)),P(Q);var de=K(Q,2);jb(de),ze(de,()=>({...f($),...v,class:g(),placeholder:u().placeholder,name:u().key})),se(()=>{St(Q,1,ur(h())),me(Q,"for",f(A))}),Uo(de,()=>u().value,le=>u(u().value=le,!0)),S(J,ae)},s=J=>{var ae=DP(),Q=q(ae);r(M(Q)),P(Q);var de=K(Q,2),le=ue=>{const F=ue.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),f(k)?f(k).validateField(u()):u().validate()};ze(de,()=>({...f($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:le}),void 0,void 0,void 0,void 0,!0);var W=K(de,2),X=ue=>{var F=OP(),H=M(F),R=K(H,2),ve=M(R,!0);P(R),P(F),se(fe=>{me(F,"data-field-preview",u().key),me(H,"src",f(N)),me(H,"alt",fe),ie(ve,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),S(ue,F)};ce(W,ue=>{f(N)&&u().value instanceof File&&ue(X)}),se(()=>{St(Q,1,ur(h())),me(Q,"for",f(A))}),S(J,ae)},o=J=>{var ae=IP(),Q=M(ae);ze(Q,()=>({...f($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var de=K(Q,2);r(M(de)),P(de),P(ae),se(()=>{St(ae,1,ur(h())),me(ae,"for",f(A))}),N_(Q,()=>u().value===!0,le=>{u(u().value=le,!0)}),S(J,ae)},a=J=>{var ae=FP(),Q=q(ae);r(M(Q)),P(Q);var de=K(Q,2);ze(de,()=>({...f($),...v,name:u().key,class:g()})),M_(de,()=>{var le=M(de),W=MP(),X=q(W),ue=F=>{var H=$P(),R=q(H),ve=M(R,!0);P(R),R.value=R.__value="";var fe=K(R,2);Le(fe,17,()=>u().options(),w=>w.value,(w,Te)=>{var Ce=PP(),Ge=K(q(Ce),2),it=M(Ge,!0);P(Ge);var Ke={};se(()=>{ie(it,f(Te).label),Ke!==(Ke=f(Te).value)&&(Ge.value=(Ge.__value=f(Te).value)??"")}),S(w,Ce)}),se(w=>ie(ve,w),[()=>C.t("common.choose")]),S(F,H)};ce(X,F=>{u().options&&F(ue)}),S(le,W)}),se(()=>{St(Q,1,ur(h())),me(Q,"for",f(A))}),x_(de,()=>u().value,le=>u(u().value=le,!0)),S(J,ae)},l=J=>{bg(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 Q=qP(),de=M(Q);r(M(de)),P(de);var le=K(de,2);Le(le,17,()=>f(ae),W=>W.id,(W,X)=>{var ue=zP(),F=M(ue);Ps(F);var H=K(F,2),R=fe=>{var w=RP();Le(w,20,()=>f(X).icons,Te=>Te,(Te,Ce)=>{const Ge=D(()=>B+Ce+".svg");var it=NP();se(()=>{St(it,1,ur(Ce)),me(it,"src",f(Ge)),me(it,"alt",Ce+" icon")}),S(Te,it)}),P(w),S(fe,w)},ve=fe=>{var w=LP(),Te=M(w,!0);P(w),se(()=>ie(Te,f(X).name)),S(fe,w)};ce(H,fe=>{f(X).icons.length>0?fe(R):fe(ve,-1)}),P(ue),se((fe,w,Te)=>{me(F,"name",u().key),Ul(F,fe),D_(F,w),me(F,"hidden",f(ae).length===1),me(F,"aria-label",Te)},[()=>String(f(X).id),()=>u().value===String(f(X).id),()=>C.t(`cart.paymentMode.ariaLabel.${f(X).name.toLowerCase()}`)]),ht("change",F,()=>{u(u().value=String(f(X).id),!0)}),S(W,ue)}),P(Q),se(()=>{me(Q,"aria-required",u().required),me(Q,"aria-invalid",u().errors.length>0)}),S(J,Q)},d=J=>{var ae=VP(),Q=M(ae);r(M(Q)),P(Q);var de=K(Q,2),le=W=>{var X=Y(),ue=q(X);Le(ue,17,()=>u().options(),F=>F.value,(F,H)=>{var R=UP(),ve=M(R),fe=K(ve);ze(fe,()=>({...f($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(R),se(()=>{St(R,1,ur(h())),me(R,"for",f(A)+f(H).value),ie(ve,`${f(H).label??""} `)}),Uo(fe,()=>u().value,w=>u(u().value=w,!0)),S(F,R)}),S(W,X)};ce(de,W=>{u().options&&W(le)}),P(ae),S(J,ae)};let u=_(t,"field",15),p=_(t,"describedByIds",7),h=_(t,"labelClass",7),g=_(t,"inputClass",7),m=_(t,"host",7),v=je(t,EP);const y=Li(m()),k=D(()=>y.value),E={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},x=D(()=>E[u().type]);let A=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 $=D(()=>({id:f(A),"aria-describedby":p(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let z=D(()=>C.t(u().label)||u().label);const B="https://cdn.shop.platform.gomus.de/";ge(()=>{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=re(null);ge(()=>{const J=u().value;if(J instanceof File&&J.type.startsWith("image/")){const ae=URL.createObjectURL(J);return I(N,ae,!0),()=>{URL.revokeObjectURL(ae),I(N,null)}}I(N,null)});var V={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=Y(),oe=q(U),pe=J=>{var ae=Y(),Q=q(ae);we(Q,()=>f(x)),S(J,ae)};return ce(oe,J=>{f(x)&&J(pe)}),S(e,U),te(V)}lr(["change"]),ne(_g,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var BP=j("<span> </span>"),jP=j("<li> </li>"),ZP=j('<ul class="go-field-errors"></ul>'),WP=j("<!> <!> <!>",1);function HP(e,t){ee(t,!0);let r=_(t,"key",7),n=_(t,"required",7,!1),i=_(t,"labelClass",7),s=_(t,"inputClass",7),o=re(Me(Jt.createField(r(),n())));const a=Li(t.$$host),l=D(()=>a.value),c=()=>f(o);let d=D(()=>f(o)?[...f(o).errors,...f(o).apiErrors].map($=>C.t($)):[]),u=D(()=>f(o)?.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(o)&&(f(o).mounted=!0,f(o).value,Re(()=>{f(o)?.errors.length&&f(l).validateField(f(o))}))});var v={getField:c,get key(){return r()},set key($){r($),b()},get required(){return n()},set required($=!1){n($),b()},get labelClass(){return i()},set labelClass($){i($),b()},get inputClass(){return s()},set inputClass($){s($),b()}},y=WP(),k=q(y);_g(k,{get describedByIds(){return f(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return f(o)},set field($){I(o,$,!0)}});var E=K(k,2),x=$=>{var z=BP(),B=M(z,!0);P(z),se(()=>{me(z,"id",f(h)),ie(B,f(o).description)}),S($,z)};ce(E,$=>{f(u)&&$(x)});var A=K(E,2),O=$=>{var z=ZP();Le(z,21,()=>f(d),nn,(B,N)=>{var V=jP(),U=M(V,!0);P(V),se(()=>ie(U,f(N))),S(B,V)}),P(z),se(()=>me(z,"id",f(g))),S($,z)};return ce(A,$=>{f(p)&&$(O)}),S(e,y),te(v)}customElements.define("go-field",ne(HP,{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 GP=j("<go-field></go-field>",2);function KP(e,t){ee(t,!0);let r=Li(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?Jt.getFormFields(f(n)?.formId):[]);var s=Y(),o=q(s);Le(o,17,()=>f(i),a=>a.key,(a,l)=>{var c=GP();se(()=>Yn(c,"key",f(l).key)),se(()=>Yn(c,"required",f(l).required)),S(a,c)}),S(e,s),te()}customElements.define("go-all-fields",ne(KP,{},[],[]));var YP=j('<p aria-hidden="true"> </p>'),JP=j("<li> </li>"),QP=j('<ul class="go-error-feedback-api-errors"></ul>'),XP=j('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function e$(e,t){ee(t,!0);const r=Li(t.$$host),n=D(()=>r.value);ge(()=>{f(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Ru(f(n)?.fields),!0)})});let i=re(0);setInterval(()=>{I(i,Ru(f(n)?.fields)||0,!0)},100);let s=D(()=>f(i)+(f(n)?.apiErrors?.length||0)),o=re(-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 a=XP(),l=M(a),c=M(l),d=v=>{var y=qt();se(k=>ie(y,k),[()=>C.t("forms.errorSummary",{count:f(o)})]),S(v,y)};ce(c,v=>{f(o)>0&&v(d)}),P(l);var u=K(l,2),p=v=>{var y=YP(),k=M(y,!0);P(y),se(E=>ie(k,E),[()=>C.t("forms.errorSummary",{count:f(i)})]),S(v,y)};ce(u,v=>{f(i)>0&&v(p)});var h=K(u,2),g=v=>{var y=QP();Le(y,21,()=>f(n)?.apiErrors,nn,(k,E)=>{var x=JP(),A=M(x,!0);P(x),se(()=>ie(A,f(E))),S(k,x)}),P(y),S(v,y)},m=D(()=>f(n)&&Xl(f(n).apiErrors)&&f(n).apiErrors.length>0);ce(h,v=>{f(m)&&v(g)}),P(a),S(e,a),te()}customElements.define("go-errors-feedback",ne(e$,{},[],[]));var t$=j('<div class="go-form-feedback"><!></div>');function r$(e,t){var r=t$(),n=M(r);__(n,t,"default",{},null),P(r),S(e,r)}customElements.define("go-form-feedback",ne(r$,{},["default"],[]));function n$(e,t){ee(t,!0);let r=_(t,"buttonClass",7,"");return rn(()=>{an(t.$$host,"button",{type:"submit",class:r()})}),te({get buttonClass(){return r()},set buttonClass(n=""){r(n),b()}})}customElements.define("go-submit",ne(n$,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var i$=j('<div aria-live="assertive"> </div>');function s$(e,t){ee(t,!0);const r=Li(t.$$host),n=D(()=>r.value);var i=Y(),s=q(i),o=a=>{var l=i$();let c;var d=M(l,!0);P(l),se(()=>{c=St(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":f(n).successMessage}),ie(d,f(n)?.successMessage)}),S(a,l)};ce(s,a=>{f(n)?.successMessage&&a(o)}),S(e,i),te()}customElements.define("go-success-feedback",ne(s$,{},[],[]));var pr="INUMBER",Ji="IOP1",Qi="IOP2",Xi="IOP3",hn="IVAR",fi="IVARNAME",es="IFUNCALL",Za="IFUNDEF",jt="IEXPR",Zc="IEXPREVAL",hi="IMEMBER",Wa="IENDSTATEMENT",ts="IARRAY";function $e(e,t){this.type=e,this.value=t??0}$e.prototype.toString=function(){switch(this.type){case pr:case Ji:case Qi:case Xi:case hn:case fi:case Wa:return this.value;case es:return"CALL "+this.value;case Za:return"DEF "+this.value;case ts:return"ARRAY "+this.value;case hi:return"."+this.value;default:return"Invalid Instruction"}};function Ha(e){return new $e(Ji,e)}function pn(e){return new $e(Qi,e)}function wg(e){return new $e(Xi,e)}function Wc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var p=e[u],h=p.type;if(h===pr||h===fi)Array.isArray(p.value)?s.push.apply(s,Wc(p.value.map(function(g){return new $e(pr,g)}).concat(new $e(ts,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===Qi&&s.length>1)l=s.pop(),a=s.pop(),d=r[p.value],p=new $e(pr,d(a.value,l.value)),s.push(p);else if(h===Xi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),p.value==="?"?s.push(a.value?l.value:c.value):(d=n[p.value],p=new $e(pr,d(a.value,l.value,c.value)),s.push(p));else if(h===Ji&&s.length>0)a=s.pop(),d=t[p.value],p=new $e(pr,d(a.value)),s.push(p);else if(h===jt){for(;s.length>0;)o.push(s.shift());o.push(new $e(jt,Wc(p.value,t,r,n,i)))}else if(h===hi&&s.length>0)a=s.pop(),s.push(new $e(pr,a.value[p.value]));else{for(;s.length>0;)o.push(s.shift());o.push(p)}}for(;s.length>0;)o.push(s.shift());return o}function kg(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===hn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Ji?c=Ha(l.value):l.type===Qi?c=pn(l.value):l.type===Xi?c=wg(l.value):c=new $e(l.type,l.value),n.push(c)}else o===jt?n.push(new $e(jt,kg(s.value,t,r))):n.push(s)}return n}function pi(e,t,r){var n=[],i,s,o,a,l,c;if(Hc(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===fi)n.push(p.value);else if(h===Qi)s=n.pop(),i=n.pop(),p.value==="and"?n.push(i?!!pi(s,t,r):!1):p.value==="or"?n.push(i?!0:!!pi(s,t,r)):p.value==="="?(a=t.binaryOps[p.value],n.push(a(i,pi(s,t,r),r))):(a=t.binaryOps[p.value],n.push(a(mn(i,r),mn(s,r))));else if(h===Xi)o=n.pop(),s=n.pop(),i=n.pop(),p.value==="?"?n.push(pi(i?s:o,t,r)):(a=t.ternaryOps[p.value],n.push(a(mn(i,r),mn(s,r),mn(o,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===Ji)i=n.pop(),a=t.unaryOps[p.value],n.push(a(mn(i,r)));else if(h===es){for(c=p.value,l=[];c-- >0;)l.unshift(mn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(h===Za)n.push((function(){for(var m=n.pop(),v=[],y=p.value;y-- >0;)v.unshift(n.pop());var k=n.pop(),E=function(){for(var x=Object.assign({},r),A=0,O=v.length;A<O;A++)x[v[A]]=arguments[A];return pi(m,t,x)};return Object.defineProperty(E,"name",{value:k,writable:!1}),r[k]=E,E})());else if(h===jt)n.push(o$(p,t));else if(h===Zc)n.push(p);else if(h===hi)i=n.pop(),n.push(i[p.value]);else if(h===Wa)n.pop();else if(h===ts){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 o$(e,t,r){return Hc(e)?e:{type:Zc,value:function(n){return pi(e.value,t,n)}}}function Hc(e){return e&&e.type===Zc}function mn(e,t){return Hc(e)?e.value(t):e}function Gc(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===pr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(Sg).join(", ")+"]"):r.push(Sg(d.value));else if(u===Qi)i=r.pop(),n=r.pop(),o=d.value,t?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(u===Xi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===hn||u===fi)r.push(d.value);else if(u===Ji)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===es){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===Za){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===hi)n=r.pop(),r.push(n+"."+d.value);else if(u===ts){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===jt)r.push("("+Gc(d.value,t)+")");else if(u!==Wa)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Sg(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function rs(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Kc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===hn||o.type===fi?!n&&!rs(t,o.value)?t.push(o.value):(i!==null&&(rs(t,i)||t.push(i)),i=o.value):o.type===hi&&n&&i!==null?i+="."+o.value:o.type===jt?Kc(o.value,t,r):i!==null&&(rs(t,i)||t.push(i),i=null)}i!==null&&!rs(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(Wc(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(kg(this.tokens,e,t),this.parser)},Dr.prototype.evaluate=function(e){return e=e||{},pi(this.tokens,this,e)},Dr.prototype.toString=function(){return Gc(this.tokens,!1)},Dr.prototype.symbols=function(e){e=e||{};var t=[];return Kc(this.tokens,t,e),t},Dr.prototype.variables=function(e){e=e||{};var t=[];Kc(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 "+Gc(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var uo="TEOF",Ze="TOP",Ga="TNUMBER",Eg="TSTRING",vn="TPAREN",ns="TBRACKET",Ka="TCOMMA",Yc="TNAME",Jc="TSEMICOLON";function xg(e,t,r){this.type=e,this.value=t,this.index=r}xg.prototype.toString=function(){return this.type+": "+this.value};function nt(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}nt.prototype.newToken=function(e,t,r){return new xg(e,t,r??this.pos)},nt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},nt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},nt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(uo,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},nt.prototype.isString=function(){var 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(Eg,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},nt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(vn,e),this.pos++,!0):!1},nt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(ns,e),this.pos++,!0):!1},nt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ka,","),this.pos++,!0):!1},nt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Jc,";"),this.pos++,!0):!1},nt.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(Ga,this.consts[n]),this.pos+=n.length,!0}return!1},nt.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ze,n),this.pos+=n.length,!0}return!1},nt.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(Yc,i),this.pos+=i.length,!0}return!1},nt.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;nt.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},nt.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},nt.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(Ga,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},nt.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),o==="e"||o==="E"){t++;for(var a=!0,l=!1;t<this.expression.length;){if(o=this.expression.charAt(t),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Ga,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},nt.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ze,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ze,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},nt.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},nt.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}},nt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function He(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?rs(t,e.value):typeof t=="function"?t(e):e.value===t},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept(Yc)||this.accept(Ze,r))e.push(new $e(hn,this.current.value));else if(this.accept(Ga))e.push(new $e(pr,this.current.value));else if(this.accept(Eg))e.push(new $e(pr,this.current.value));else if(this.accept(vn,"("))this.parseExpression(e),this.expect(vn,")");else if(this.accept(ns,"["))if(this.accept(ns,"]"))e.push(new $e(ts,0));else{var n=this.parseArrayList(e);e.push(new $e(ts,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Jc)?(this.nextToken&&this.nextToken.type!==uo&&!(this.nextToken.type===vn&&this.nextToken.value===")")&&t.push(new $e(Wa)),this.nextToken.type!==uo&&this.parseExpression(t),e.push(new $e(jt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(ns,"]");)for(this.parseExpression(e),++t;this.accept(Ka);)this.parseExpression(e),++t;return t},He.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===es){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===hn&&(e[o]=new $e(fi,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new $e(jt,r)),e.push(new $e(Za,t.value));continue}if(t.type!==hn&&t.type!==hi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new $e(fi,t.value)),e.push(new $e(jt,r)),e.push(pn("="))}},He.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new $e(jt,t)),e.push(new $e(jt,r)),e.push(wg("?"))}},He.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new $e(jt,t)),e.push(pn("or"))}},He.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new $e(jt,t)),e.push(pn("and"))}};var l$=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,l$);){var t=this.current;this.parseAddSub(e),e.push(pn(t.value))}};var u$=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,u$);){var t=this.current;this.parseTerm(e),e.push(pn(t.value))}};var c$=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,c$);){var t=this.current;this.parseFactor(e),e.push(pn(t.value))}},He.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===vn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Jc||this.nextToken.type===Ka||this.nextToken.type===uo||this.nextToken.type===vn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ha(n.value))}else this.parseExponential(e)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(pn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ha("!"))},He.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Ha(n.value))}else for(this.parseMemberExpression(e);this.accept(vn,"(");)if(this.accept(vn,")"))e.push(new $e(es,0));else{var i=this.parseArgumentList(e);e.push(new $e(es,i))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(vn,")");)for(this.parseExpression(e),++t;this.accept(Ka);)this.parseExpression(e),++t;return t},He.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(ns,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(Yc),e.push(new $e(hi,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(ns,"]"),e.push(pn("["))}else throw new Error("unexpected symbol: "+t.value)}};function d$(e,t){return Number(e)+Number(t)}function f$(e,t){return e-t}function h$(e,t){return e*t}function p$(e,t){return e/t}function m$(e,t){return e%t}function v$(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function g$(e,t){return e===t}function y$(e,t){return e!==t}function b$(e,t){return e>t}function _$(e,t){return e<t}function w$(e,t){return e>=t}function k$(e,t){return e<=t}function S$(e,t){return!!(e&&t)}function E$(e,t){return!!(e||t)}function x$(e,t){return rs(t,e)}function T$(e){return(Math.exp(e)-Math.exp(-e))/2}function A$(e){return(Math.exp(e)+Math.exp(-e))/2}function C$(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function O$(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function D$(e){return Math.log(e+Math.sqrt(e*e-1))}function I$(e){return Math.log((1+e)/(1-e))/2}function Tg(e){return Math.log(e)*Math.LOG10E}function P$(e){return-e}function $$(e){return!e}function M$(e){return e<0?Math.ceil(e):Math.floor(e)}function F$(e){return Math.random()*(e||1)}function Ag(e){return Xc(e+1)}function N$(e){return isFinite(e)&&e===Math.round(e)}var R$=4.7421875,Qc=[.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 Xc(e){var t,r;if(N$(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)*Xc(1-e));if(e>=171.35)return 1/0;if(e>85){var s=e*e,o=s*e,a=o*e,l=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*e))}--e,r=Qc[0];for(var c=1;c<Qc.length;++c)r+=Qc[c]/(e+c);return t=e+R$+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function L$(e){return Array.isArray(e)?e.length:String(e).length}function Cg(){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 Og(e,t,r){return e?t:r}function z$(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 q$(e,t,r){return r&&(r[e]=t),t}function U$(e,t){return e[t|0]}function V$(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function B$(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function j$(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 Z$(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 W$(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 H$(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 G$(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function K$(e){return(e>0)-(e<0)||+e}var Dg=1/3;function Y$(e){return e<0?-Math.pow(-e,Dg):Math.pow(e,Dg)}function J$(e){return Math.exp(e)-1}function Q$(e){return Math.log(1+e)}function X$(e){return Math.log(e)/Math.LN2}function mi(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||T$,cosh:Math.cosh||A$,tanh:Math.tanh||C$,asinh:Math.asinh||O$,acosh:Math.acosh||D$,atanh:Math.atanh||I$,sqrt:Math.sqrt,cbrt:Math.cbrt||Y$,log:Math.log,log2:Math.log2||X$,ln:Math.log,lg:Math.log10||Tg,log10:Math.log10||Tg,expm1:Math.expm1||J$,log1p:Math.log1p||Q$,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||M$,"-":P$,"+":Number,exp:Math.exp,not:$$,length:L$,"!":Ag,sign:Math.sign||K$},this.binaryOps={"+":d$,"-":f$,"*":h$,"/":p$,"%":m$,"^":Math.pow,"||":v$,"==":g$,"!=":y$,">":b$,"<":_$,">=":w$,"<=":k$,and:S$,or:E$,in:x$,"=":q$,"[":U$},this.ternaryOps={"?":Og},this.functions={random:F$,fac:Ag,min:B$,max:V$,hypot:Math.hypot||Cg,pyt:Math.hypot||Cg,pow:Math.pow,atan2:Math.atan2,if:Og,gamma:Xc,roundTo:z$,map:j$,fold:Z$,filter:W$,indexOf:H$,join:G$},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}mi.prototype.parse=function(e){var t=[],r=new He(this,new nt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(uo,"EOF"),new Dr(t,this)},mi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Ig=new mi;mi.parse=function(e){return Ig.parse(e)},mi.evaluate=function(e,t){return Ig.parse(e).evaluate(t)};var Pg={"+":"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 eM(e){return Pg.hasOwnProperty(e)?Pg[e]:e}mi.prototype.isOperatorEnabled=function(e){var t=eM(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var tM=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,rM=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,nM=/(__optional\("[^"]+"\))\.length\b/g,iM=new mi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),$g=new Map;function sM(e){return e.replace(tM,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(rM,(t,r)=>`__length(${r})`).replace(nM,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function oM(e){const t=$g.get(e);if(t)return t;const r=iM.parse(sM(e));return $g.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=oM(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 Mg=["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"],lM=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 o=i.get(s.id);o&&(s.content=o)}}catch{}}function Ya(e,t){C.capacityManager.addQuotas(t),e.timeslotTicketIds=[...e.timeslotTicketIds,...Object.values(t).flatMap(r=>r.ticket_ids)]}function Ja(e,t,r){const n=Date.parse(r);return e.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===t&&o>=n&&o<=n+lM&&(i.seats?.available??0)>0})}async function Qa(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}));Ya(e,t)}var uM={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}));Ya(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(mt(s,{time:t.selectedTime}))}},cM={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));C.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=$n(Mn(r,s),s);await gn(e,o);for(const a of o)e.preCart.addItem(mt(a,{time:s}))}},dM={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=>la(i));await gn(e,n);for(const i of n)e.preCart.addItem(mt(i))}},fM={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()}));Ya(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 o of s)e.preCart.addItem(mt(o,{time:t.selectedTime}))}},hM={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.selectedDate,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate)return;const r=await C.asyncFetch(()=>C.getEvent(t.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:t.selectedDate.toString()}));C.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=$n(Mn(n,o),o);await gn(e,a);for(const l of a)e.preCart.addItem(mt(l,{time:o}))}},pM={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()}));Ya(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 o of s)e.preCart.addItem(mt(o,{time:t.selectedTime}))}},mM={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=Mu(n,r.id,{event_title:r.event_title});e.preCart.addItem(mt(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},vM={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=$n(Mn(s,n.start_time),n.start_time);await gn(e,a);for(const l of a)e.preCart.addItem(mt(l,{time:n.start_time}))}}},gM={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=Object.values(o)[0],l=a?Object.keys(a.capacities)[0]:n.start_time,c=$n(Mn(s,l),l);await gn(e,c);for(const d of c)e.preCart.addItem(mt(d,{time:l}))}}},yM={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime);for(const n of r){if(!n.event_id||!n.start_time)continue;const i=await C.asyncFetch(()=>C.getEvent(n.event_id));if(!i?.tickets?.length)continue;const{tickets:s,quotas:o}=await C.asyncFetch(()=>C.ticketsAndQuotas({"by_ticket_ids[]":i.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:n.start_time.slice(0,10)}));C.capacityManager.addQuotas(o);const a=$n(Mn(s,n.start_time),n.start_time);await gn(e,a);for(const l of a)e.preCart.addItem(mt(l,{time:n.start_time}))}}},bM={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>Qa(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=Ja(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=Mu(o,i.id,{event_title:i.event_title});e.preCart.addItem(mt(a,{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(mt(yp(r)))}},wM={"ticket:timeslot":uM,"ticket:day":cM,"ticket:annual":dM,"event:admission":fM,"event:admission:day":hM,"event:admission:timeslot":pM,"event:price":mM,"events:admission":vM,"events:admission:day":gM,"events:admission:timeslot":yM,"events:price":bM,coupon:_M};function vi(e){const t=wM[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${Mg.join(", ")}`),t}var Fg=Mg,kM=0,SM=class{uid=kM++;#e=re();get filters(){return f(this.#e)}set filters(e){I(this.#e,e,!0)}#t=re();get eventIds(){return f(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=re();get museumIds(){return f(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=re();get exhibitionIds(){return f(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=re();get ticketIds(){return f(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=re();get ticketGroupIds(){return f(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=re();get selectedDate(){return f(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=re();get selectedTimeslot(){return f(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}timeslotTicketIds=[];#l=D(()=>this.selectedTimeslot);get selectedTime(){return f(this.#l)}set selectedTime(e){I(this.#l,e)}#u=re(Me([]));get ticketSegments(){return f(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#c=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return f(this.#c)}set preCarts(e){I(this.#c,e)}#d=re();get timeslotDetails(){return f(this.#d)}set timeslotDetails(e){I(this.#d,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>vi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>vi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>vi(e).isTicketsVisible(this))}},Ng="go-ticket-selection",EM=Ni(Ng),yn=Ri(Ng);function xM(e,t){ee(t,!0);let r=_(t,"when",7),n=_(t,"then",7,"show");const i=yn(t.$$host),s=D(()=>i.value),o=fx(t.$$host),a=D(()=>o.value),l=Li(t.$$host),c=D(()=>l.value),d=zi(t.$$host),u=D(()=>d.value);let p=D(()=>({ticketSelection:f(s),personalizationDetails:f(a),formData:f(c)?.formData,cart:C.cart,cartView:f(u)}));const h=k=>{I(p,k)},g=()=>f(p);let m=D(()=>aM(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",ne(xM,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function Rg(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",ne(Rg,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function TM(e,t){ee(t,!0);let r=_(t,"apiDomain",7),n=_(t,"shopDomain",7),i=_(t,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),b()},get shopDomain(){return n()},set shopDomain(a){n(a),b()},get locale(){return i()},set locale(a){i(a),b()}};return Rg(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),te(o)}customElements.define("go-init",ne(TM,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function AM(e,t){ee(t,!0);const r=_(t,"to",7),n=D(()=>Je.config.urls[r()]),i=an(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",ne(AM,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));function CM(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 an(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",ne(CM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var OM=class{#e=re();get token(){return f(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return hl(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}}},Lg="go-order-details",DM=Ni(Lg),zg=Ri(Lg);function IM(e,t){ee(t,!0);let r=_(t,"token",7);const n=new OM(r());DM(t.$$host,n),rn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),b()}};return te(i)}customElements.define("go-order",ne(IM,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var PM=j('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <span class="go-cart-item-time" data-testid="cart-item-time"> </span>',1),$M=j('<br/> <span class="go-order-item-quantities"> </span>',1),MM=j('<a aria-label="iCal link"> </a>'),FM=j('<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>');function qg(e,t){ee(t,!0);let r=_(t,"item",7),n=_(t,"orderDetails",7);var i={get item(){return r()},set item(A){r(A),b()},get orderDetails(){return n()},set orderDetails(A){n(A),b()}},s=FM(),o=M(s),a=M(o),l=K(M(a),2),c=M(l),d=M(c,!0);P(c);var u=K(c,2),p=A=>{var O=PM(),$=q(O),z=M($,!0);P($);var B=K($,2),N=M(B,!0);P(B),se((V,U)=>{ie(z,V),ie(N,U)},[()=>Bs(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(r().attributes.start_time)]),S(A,O)};ce(u,A=>{r().attributes.start_time&&A(p)});var h=K(u,2);Le(h,17,()=>r().attributes.quantities,A=>A.id,(A,O)=>{var $=$M(),z=K(q($),2),B=M(z);P(z),se(()=>ie(B,`${f(O).quantity??""} x ${f(O).title??""}`)),S(A,$)});var g=K(h,2),m=M(g,!0);P(g),P(l);var v=K(l,2),y=M(v,!0);P(v);var k=K(v,4),E=M(k),x=A=>{var O=MM(),$=M(O,!0);P(O),se(z=>{me(O,"href",C.apiUrl+r().attributes.ical_url),ie($,z)},[()=>C.t("common.calendar")]),S(A,O)};return ce(E,A=>{r().attributes.ical_url&&A(x)}),P(k),P(a),P(o),P(s),se((A,O,$)=>{ie(d,r().attributes.title),me(g,"href",A),ie(m,O),ie(y,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>aa(r().price_cents)]),S(e,s),te(i)}ne(qg,{item:{},orderDetails:{}},[],[],{mode:"open"});var NM=j('<br/> <span class="go-order-item-quantities" data-testid="order-sub-ticket"> </span>',1),RM=j('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),LM=j('<span class="go-cart-item-date"> </span>'),zM=j('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),qM=j('<br/> <a class="go-ticket-personalization"> </a>',1),UM=j('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),VM=j('<a aria-label="iCal link"> </a>'),BM=j('<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>'),jM=j('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),ZM=j('<a class="go-ticket-personalization"> </a>'),WM=j('<li><article><ul><li class="go-order-breakdown-count"> </li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li></ul></article></li>');function Ug(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 o={get item(){return n()},set item(u){n(u),b()},get orderDetails(){return i()},set orderDetails(u){i(u),b()}},a=Y(),l=q(a),c=u=>{var p=Y(),h=q(p);Le(h,17,()=>({length:n().attributes.quantity}),nn,(g,m,v)=>{var y=BM(),k=M(y),E=M(k),x=M(E);x.textContent="1";var A=K(x,2),O=M(A),$=M(O,!0);P(O);var z=K(O,2);Le(z,17,()=>f(s),W=>W.id,(W,X)=>{var ue=NM(),F=K(q(ue),2),H=M(F);P(F),se(()=>ie(H,`${f(X).quantity??""} x ${f(X).title??""}`)),S(W,ue)});var B=K(z,2),N=W=>{const X=D(()=>n().attributes.barcodes[v]?.id);var ue=zM(),F=q(ue),H=w=>{var Te=RM(),Ce=q(Te),Ge=M(Ce,!0);P(Ce);var it=K(Ce,2),Ke=M(it,!0);P(it),se((Mt,st)=>{ie(Ge,Mt),ie(Ke,st)},[()=>Bs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>Vs(n().attributes.start_time)]),S(w,Te)},R=w=>{var Te=LM(),Ce=M(Te,!0);P(Te),se(Ge=>ie(Ce,Ge),[()=>Bs(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(w,Te)};ce(F,w=>{n().attributes.ticket_type==="time_slot"?w(H):n().attributes.ticket_type==="normal"&&w(R,1)});var ve=K(F,4),fe=M(ve,!0);P(ve),se((w,Te)=>{me(ve,"href",w),ie(fe,Te)},[()=>i().downloadLink(n(),f(X)),()=>C.t("common.download")]),S(W,ue)},V=W=>{var X=qM(),ue=K(q(X),2),F=M(ue,!0);P(ue),se((H,R)=>{me(ue,"href",H),ie(F,R)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(W,X)};ce(B,W=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?W(N):W(V,-1)}),P(A);var U=K(A,2),oe=M(U,!0);P(U);var pe=K(U,2),J=M(pe),ae=W=>{var X=UM(),ue=M(X);P(X),se(()=>{me(X,"href",C.apiUrl+n().attributes.barcodes[v]?.passbook_url),me(ue,"src",r)}),S(W,X)};ce(J,W=>{n().attributes.barcodes[v]&&n().attributes.barcodes[v]?.passbook_url&&W(ae)}),P(pe);var Q=K(pe,2),de=M(Q),le=W=>{var X=VM(),ue=M(X,!0);P(X),se(F=>{me(X,"href",C.apiUrl+n().attributes.ical_url),ie(ue,F)},[()=>C.t("common.calendar")]),S(W,X)};ce(de,W=>{n().attributes.ical_url&&W(le)}),P(Q),P(E),P(k),P(y),se(W=>{ie($,n().attributes.title),ie(oe,W)},[()=>aa(n().price_cents)]),S(g,y)}),S(u,p)},d=u=>{var p=WM(),h=M(p),g=M(h),m=M(g),v=M(m,!0);P(m);var y=K(m,2),k=M(y),E=M(k,!0);P(k);var x=K(k,2),A=B=>{var N=jM(),V=M(N,!0);P(N),se((U,oe)=>{me(N,"href",U),ie(V,oe)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(B,N)},O=B=>{var N=ZM(),V=M(N,!0);P(N),se((U,oe)=>{me(N,"href",U),ie(V,oe)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(B,N)};ce(x,B=>{n().attributes.is_voucher?B(A):B(O,-1)}),P(y);var $=K(y,2),z=M($,!0);P($),At(2),P(g),P(h),P(p),se(B=>{ie(v,n().attributes.quantity),ie(E,n().attributes.title),ie(z,B)},[()=>aa(n().price_cents)]),S(u,p)};return ce(l,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(c):u(d,-1)}),S(e,a),te(o)}ne(Ug,{item:{},orderDetails:{}},[],[],{mode:"open"});var HM=j('<ol><li class="data-go-order-breakdown-header"><ul><li class="go-order-breakdown-header-count"> </li> <li class="go-order-breakdown-header-product"> </li> <li class="go-order-breakdown-header-price"> </li> <li class="go-order-breakdown-header-passbook"></li></ul></li> <!> <li class="go-order-breakdown-footer"><ul><li class="go-cart-footer-title"></li> <li class="go-cart-footer-count"></li> <li class="go-cart-footer-price"> </li> <li class="go-cart-footer-passbook"></li></ul></li></ol>');function GM(e,t){ee(t,!0);const r=zg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);var s=Y(),o=q(s),a=l=>{var c=HM(),d=M(c),u=M(d),p=M(u),h=M(p,!0);P(p);var g=K(p,2),m=M(g,!0);P(g);var v=K(g,2),y=M(v,!0);P(v),At(2),P(u),P(d);var k=K(d,2);Le(k,17,()=>f(i).items,$=>$.id,($,z)=>{var B=Y(),N=q(B),V=oe=>{Ug(oe,{get item(){return f(z)},get orderDetails(){return f(n)}})},U=oe=>{qg(oe,{get item(){return f(z)},get orderDetails(){return f(n)}})};ce(N,oe=>{f(z).type==="Ticket"?oe(V):f(z).type==="Event"&&oe(U,1)}),S($,B)});var E=K(k,2),x=M(E),A=K(M(x),4),O=M(A,!0);P(A),At(2),P(x),P(E),P(c),se(($,z,B,N)=>{ie(h,$),ie(m,z),ie(y,B),ie(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:aa(f(i).total_price_cents)})]),S(l,c)};ce(o,l=>{f(i)&&f(n)&&l(a)}),S(e,s),te()}customElements.define("go-order-breakdown",ne(GM,{},[],[]));function KM(e,t){ee(t,!0);const r=zg(t.$$host),n=D(()=>r.value);let i=D(()=>f(n)?.order);At();var s=qt();se(()=>ie(s,f(i)?.id)),S(e,s),te()}customElements.define("go-order-invoice-id",ne(KM,{},[],[]));var YM=j("<go-form></go-form>",2);function JM(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,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}Jl();var n=YM();Yn(n,"formId","passwordResetForm"),No("submit",n,r),S(e,n),te()}customElements.define("go-profile-password",ne(JM,{},[],[]));var QM=j("<go-form></go-form>",2);function XM(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=re(void 0);const n=D(()=>C.getCustomer());rn(async()=>{await C.waitForAllFetches(),await Ql(()=>f(r).details),await Ql(()=>f(n).data),f(r).details.fill(f(n).data)});var i=QM();Yn(i,"formId","accountDetailsForm"),Yl(i,s=>I(r,s),()=>f(r)),S(e,i),te()}customElements.define("go-profile-details",ne(XM,{},[],[]));var e2=j('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function t2(e,t){ee(t,!0);const r=D(()=>C.getCustomer()),n=D(()=>f(r)?.data);var i=Y(),s=q(i),o=l=>{var c=e2(),d=q(c),u=M(d);P(d);var p=K(d,2),h=M(p,!0);P(p),se(()=>{ie(u,`${f(n).name??""}
85
+ ${f(n).surname??""}`),ie(h,f(n).email)}),S(l,c)},a=l=>{var c=qt();se(d=>ie(c,d),[()=>C.t("user.login.desc.text")]),S(l,c)};ce(s,l=>{f(n)?l(o):l(a,-1)}),S(e,i),te()}customElements.define("go-profile-overview",ne(t2,{},[],[]));function r2(e,t){ee(t,!0);function r(h){if(!h)return;const g=[];for(const m of h.split(",")){const v=m.trim();v&&(Fg.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${Fg.join(", ")}`))}return g.length?g:void 0}let n=_(t,"filters",7),i=_(t,"eventIds",7),s=_(t,"museumIds",7),o=_(t,"exhibitionIds",7),a=_(t,"selectedDate",7),l=_(t,"selectedTimeslot",7),c=_(t,"ticketIds",7),d=_(t,"ticketGroupIds",7);const u=new SM;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(o()),u.ticketIds=ln(c()),u.ticketGroupIds=ln(d()),u.selectedTimeslot=l(),a()&&(u.selectedDate=oa(a()))}),ge(()=>{u.selectedDate&&Re(()=>{a(u.selectedDate.toString())})}),ge(()=>{u.selectedTimeslot,Re(()=>{l(u.selectedTimeslot)})}),EM(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 o()},set exhibitionIds(h){o(h),b()},get selectedDate(){return a()},set selectedDate(h){a(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",ne(r2,{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 n2(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",ne(n2,{},[],[]));function i2(e,t){ee(t,!0);const r=yn(t.$$host),n=D(()=>r.value),i=D(()=>sn(f(n)?.preCarts||[],o=>o.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",ne(i2,{},[],[]));function s2(e,t){ee(t,!0);const r=yn(t.$$host),n=D(()=>r.value);let i=D(()=>sn(f(n)?.preCarts||[],o=>o.totalPriceCents));At();var s=qt();se(o=>ie(s,o),[()=>fr(f(i))]),S(e,s),te()}customElements.define("go-tickets-sum",ne(s2,{},[],[]));var o2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=re(Me(Mi()));get preCart(){return f(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=re();get filters(){return f(this.#r)}set filters(e){I(this.#r,e,!0)}#n=re();get dateId(){return f(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=re();get limit(){return f(this.#i)}set limit(e){I(this.#i,e,!0)}#s=re();get query(){return f(this.#s)}set query(e){I(this.#s,e,!0)}#a=re(Me([]));get ticketGroupIds(){return f(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=re(Me([]));get languageIds(){return f(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=re(Me([]));get catchWordIds(){return f(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=re(Me([]));get museumIds(){return f(this.#u)}set museumIds(e){I(this.#u,e,!0)}#c=re(!1);get withContent(){return f(this.#c)}set withContent(e){I(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=Mi([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Mi();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>vi(t).loadProducts(this)))}},Vg="go-ticket-segment",a2=Ni(Vg),ed=Ri(Vg);function l2(e,t){ee(t,!0);const r=_(t,"filters",7),n=_(t,"dateId",7),i=_(t,"query",7),s=_(t,"limit",7),o=_(t,"ticketGroupIds",7),a=_(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(E=>E.trim()).filter(Boolean);return k.length?k:void 0}const p=yn(t.$$host),h=p.value,g=new o2(u(r()),p);a2(t.$$host,g),ge(()=>{g.filters=u(r()),g.dateId=n(),g.query=i(),g.limit=s(),g.ticketGroupIds=ln(o()),g.languageIds=ln(a()),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,Re(()=>{g.loadTickets()})}),ge(()=>{h&&Re(()=>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 o()},set ticketGroupIds(y){o(y),b()},get languageIds(){return a()},set languageIds(y){a(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",ne(l2,{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 u2(e,t){ee(t,!0);const r=yn(t.$$host).value,n=ed(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",ne(u2,{},[],[]));var c2=j('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),d2=j('<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>'),f2=j('<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>'),h2=j('<ul class="go-sub-tickets" role="list"></ul>'),p2=j('<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><!></li></ul></article> <!></li>');function Bg(e,t){const r=pt();ee(t,!0);const n=E=>{var x=c2(),A=q(x),O=M(A);P(A);var $=K(A,2),z=M($,!0);P($),se(B=>{ie(O,`${s().product.event_title??""} - ${B??""}`),ie(z,s().product.title)},[()=>Vs(s().time)]),S(E,x)},i=E=>{At();var x=qt();se(()=>ie(x,s().product.title)),S(E,x)};let s=_(t,"item",7),o=_(t,"details",7),a=re(void 0),l=re(Me({}));const c=D(()=>Vr(s().product)?s().product:null);let d=re(!1);const u=D(()=>s().product?.content?.reduction_reason),p=`go-ticket-info-${r}`;ge(()=>{o().preCart.items.map(E=>E.quantity),o().preCart.items.forEach(E=>E.mantle&&Object.values(E.mantle.composition)),C.cart?.items.map(E=>E.quantity),C.cart?.items.forEach(E=>E.mantle&&Object.values(E.mantle.composition)),Re(()=>{I(a,C.capacityManager.capacity(C.cart,s(),o().preCart),!0),I(l,C.capacityManager.subTicketMaxes(C.cart,s(),o().preCart),!0)})});function h(E,x){s().mantle&&(s().mantle.composition[E]=x)}let g=i;ua(s().product)&&(g=n);var m={get item(){return s()},set item(E){s(E),b()},get details(){return o()},set details(E){o(E),b()}},v=Y(),y=q(v),k=E=>{var x=p2(),A=M(x),O=M(A),$=M(O),z=M($);g(z),P($);var B=K($,2),N=le=>{var W=d2(),X=M(W);P(W),se(ue=>{St(X,1,ur(["go-ticket-info-icon",f(d)&&"is-active"])),me(X,"aria-expanded",f(d)),me(X,"aria-controls",p),me(X,"aria-label",ue)},[()=>C.t("ticket.list.additionalInfo")]),ht("click",X,()=>I(d,!f(d))),S(le,W)};ce(B,le=>{f(u)&&le(N)});var V=K(B,2);Ef(V,()=>fm.sanitize(s().product.description),!0),P(V);var U=K(V,2),oe=le=>{var W=f2(),X=M(W,!0);P(W),se(ue=>{me(W,"id",p),me(W,"hidden",!f(d)),ie(X,ue)},[()=>C.t(f(u))]),S(le,W)};ce(U,le=>{f(u)&&le(oe)});var pe=K(U,2),J=M(pe,!0);P(pe);var ae=K(pe,2);ma(M(ae),{get value(){return s().quantity},get min(){return f(a).min},get max(){return f(a).max},get label(){return s().product.title},onChange:le=>s().quantity=le}),P(ae),P(O),P(A);var Q=K(A,2),de=le=>{var W=h2();Le(W,21,()=>js(f(c)),X=>X.id,(X,ue)=>{{let F=D(()=>s().mantle?.composition?.[f(ue).id]??0);Zu(X,{get sub(){return f(ue)},get quantity(){return f(F)},get max(){return f(l)[f(ue).id]},onChange:H=>h(f(ue).id,H)})}}),P(W),se(()=>me(W,"aria-label",f(c).title)),S(le,W)};ce(Q,le=>{f(c)&&s().quantity>0&&le(de)}),P(x),se(()=>{St(A,1,ur(["go-tickets-item",f(a).bookedOut&&"is-booked-out"])),me(A,"data-testid",s().uuid),ie(J,s().price_formatted)}),S(E,x)};return ce(y,E=>{f(a)&&!f(a).unavailable&&E(k)}),S(e,v),te(m)}lr(["click"]),ne(Bg,{item:{},details:{}},[],[],{mode:"open"});var m2=j('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function v2(e,t){ee(t,!0);const r=ed(t.$$host),n=D(()=>r.value),i=D(()=>f(n)?.preCart?.items.length&&f(n)?.preCart?.items.length>0);var s=Y(),o=q(s),a=l=>{var c=m2(),d=M(c),u=M(d),p=M(u),h=M(p,!0);P(p);var g=K(p,2),m=M(g,!0);P(g);var v=K(g,2),y=M(v,!0);P(v);var k=K(v,2),E=M(k,!0);P(k),P(u),P(d);var x=K(d,2);Le(x,17,()=>f(n).preCart.items,A=>A.uuid,(A,O)=>{Bg(A,{get item(){return f(O)},get details(){return f(n)}})}),P(c),se((A,O,$,z)=>{ie(h,A),ie(m,O),ie(y,$),ie(E,z)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),S(l,c)};ce(o,l=>{f(i)&&f(n)&&l(a)}),S(e,s),te()}customElements.define("go-ticket-segment-body",ne(v2,{},[],[]));function g2(e,t){ee(t,!0);const r=ed(t.$$host),n=D(()=>r.value);At();var i=qt();se(()=>ie(i,f(n)?.preCart.totalFormatted)),S(e,i),te()}customElements.define("go-ticket-segment-sum",ne(g2,{},[],[]));var y2=class{#e;get tsd(){return f(this.#e)}set tsd(e){I(this.#e,e)}#t=re(Me([]));get timeslots(){return f(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}const t=C.capacityManager.quotaManager;t.clearPrecart();for(const r of C.cart?.items??[]){const n=r.product;Pu(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=j('<li><label> <input type="radio" name="timeslot"/></label></li>'),_2=j('<ul data-testid="timeslots"></ul>');function w2(e,t){ee(t,!0);const r=[],n=new y2(yn(t.$$host));ge(()=>{const d=n.tsd;if(!d)return;const u=d.filters,p=d.selectedDate;Re(async()=>{d.timeslotTicketIds=[],u?.length&&p&&await Promise.all(u.map(h=>vi(h).loadTimeslots(d))),n.recalculateCapacities()})}),ge(()=>{C.cart?.items.map(d=>d.quantity),Re(()=>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 o={details:n},a=Y(),l=q(a),c=d=>{var u=_2();Le(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=b2(),E=M(k),x=M(E),A=K(x);Ps(A);var O;P(E),P(k),se(()=>{St(k,1,ur({"go-timeslot":!0,"is-unavailable":f(g),"is-sold-out":f(m),"is-disabled":f(v),"is-selected":f(y)})),ie(x,`${h.timeFormatted??""} `),A.disabled=f(v),me(A,"aria-disabled",f(v)),O!==(O=h.startAt)&&(A.value=(A.__value=h.startAt)??"")}),ht("change",A,s),F_(r,[],A,()=>(h.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),S(p,k)}),P(u),S(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),S(e,a),te(o)}lr(["change"]),customElements.define("go-timeslots",ne(w2,{},[],["details"]));var k2=class{#e=re();get details(){return f(this.#e)}set details(e){I(this.#e,e,!0)}#t=re(Me(ei(Vt())));get startAt(){return f(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=re(void 0);get selected(){return f(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>vi(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=>vi(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))),{})}},S2=j("<!> <!> <!>",1),E2=j("<div> </div>"),jg=j("<!> <!>",1),x2=j('<div data-calendar-wrapper=""><!></div>');function Zg(e,t){ee(t,!0);let r=_(t,"calendarClass",7),n=re(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()}},o=x2(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,p=()=>d?.().weekdays;var h=jg(),g=q(h);Pe(g,()=>yc,(v,y)=>{y(v,{children:(k,E)=>{var x=S2(),A=q(x);Pe(A,()=>wc,(z,B)=>{B(z,{class:"go-calendar-prev-button",children:(N,V)=>{At();var U=qt("Prev");S(N,U)},$$slots:{default:!0}})});var O=K(A,2);Pe(O,()=>bc,(z,B)=>{B(z,{class:"go-calendar-heading"})});var $=K(O,2);Pe($,()=>_c,(z,B)=>{B(z,{class:"go-calendar-next-button",children:(N,V)=>{At();var U=qt("Next");S(N,U)},$$slots:{default:!0}})}),S(k,x)},$$slots:{default:!0}})});var m=K(g,2);Le(m,17,u,nn,(v,y)=>{var k=Y(),E=q(k);Pe(E,()=>hc,(x,A)=>{A(x,{class:"go-calendar-grid",children:(O,$)=>{var z=jg(),B=q(z);Pe(B,()=>vc,(V,U)=>{U(V,{class:"go-calendar-grid-head",children:(oe,pe)=>{var J=Y(),ae=q(J);Pe(ae,()=>oo,(Q,de)=>{de(Q,{class:"go-calendar-grid-row",children:(le,W)=>{var X=Y(),ue=q(X);Le(ue,17,p,nn,(F,H,R,ve)=>{var fe=Y(),w=q(fe);Pe(w,()=>gc,(Te,Ce)=>{Ce(Te,{children:(Ge,it)=>{var Ke=E2(),Mt=M(Ke,!0);P(Ke),se(st=>ie(Mt,st),[()=>f(H).slice(0,2)]),S(Ge,Ke)},$$slots:{default:!0}})}),S(F,fe)}),S(le,X)},$$slots:{default:!0}})}),S(oe,J)},$$slots:{default:!0}})});var N=K(B,2);Pe(N,()=>pc,(V,U)=>{U(V,{class:"go-calendar-grid-body",children:(oe,pe)=>{var J=Y(),ae=q(J);Le(ae,17,()=>f(y).weeks,nn,(Q,de,le,W)=>{var X=Y(),ue=q(X);Pe(ue,()=>oo,(F,H)=>{H(F,{class:"go-calendar-grid-row",children:(R,ve)=>{var fe=Y(),w=q(fe);Le(w,17,()=>f(de),nn,(Te,Ce,Ge,it)=>{var Ke=Y(),Mt=q(Ke);Pe(Mt,()=>mc,(st,er)=>{er(st,{get date(){return f(Ce)},get month(){return f(y).value},class:"go-calendar-cell",children:(Tt,Ft)=>{var tr=Y(),Zt=q(tr);{let mr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(f(Ce)),"is-disabled":r().isDateDisabled(f(Ce)),"is-selected":r().selected?.compare(f(Ce))===0}));Pe(Zt,()=>fc,(Ir,Pr)=>{Pr(Ir,{get class(){return f(mr)},children:(bn,$r)=>{At();var vr=qt();se(()=>ie(vr,f(Ce).day)),S(bn,vr)},$$slots:{default:!0}})})}S(Tt,tr)},$$slots:{default:!0}})}),S(Te,Ke)}),S(R,fe)},$$slots:{default:!0}})}),S(Q,X)}),S(oe,J)},$$slots:{default:!0}})}),S(O,z)},$$slots:{default:!0}})}),S(v,k)}),S(c,h)};Pe(a,()=>xv,(c,d)=>{d(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return C.locale},isDateDisabled:u=>r().isDateDisabled(u),isDateUnavailable:u=>r().isDateUnavailable(u),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(u){r().selected=u},get placeholder(){return r().startAt},set placeholder(u){r().startAt=u},children:l,$$slots:{default:!0}})})}return P(o),Yl(o,l=>I(n,l),()=>f(n)),S(e,o),te(s)}ne(Zg,{calendarClass:{}},[],["details"],{mode:"open"});function T2(e,t){ee(t,!0);const r=new k2,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 o={details:n},a=Y(),l=q(a),c=d=>{Zg(d,{get calendarClass(){return r}})};return ce(l,d=>{f(s)?.isCalendarVisible&&d(c)}),S(e,a),te(o)}customElements.define("go-calendar",ne(T2,{},[],["details"]));var A2=class{#e;get ticketSelectionDetails(){return f(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!C.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return mt(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}},C2=j('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function O2(e,t){ee(t,!0);const r=new A2(yn(t.$$host));var n={details:r},i=C2(),s=M(i,!0);return P(i),se((o,a,l)=>{i.disabled=o,me(i,"data-x",a),ie(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),ht("click",i,()=>r.addToCart()),S(e,i),te(n)}lr(["click"]),customElements.define("go-add-to-cart-button",ne(O2,{},[],["details"]));function D2(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,o=await C.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return an(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",ne(D2,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));var co=null;async function Wg(){if(co)return co;if(!C.client)throw new Error("[go.api] Shop not initialized — call go.init({ shop, api, locale }) first.")}async function I2(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)if(n.method!=="load")try{await Hg[n.method](n.options)}catch(i){console.error(i)}e.go=Hg,t&&(t._queue=null)}var Hg={loaded:!0,config:e=>{Je.define(e)},init:async e=>{try{co=C.load("https://"+e.api,e.shop,e.locale),await co}catch(t){throw co=null,t}},api:{getCustomer:async()=>(await Wg(),C.asyncFetch(()=>C.getCustomer())),getOrders:async e=>(await Wg(),C.asyncFetch(()=>C.getOrders(e)))}};(async()=>await I2(window))()})();