@gomusdev/web-components 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,85 @@
1
- var Fy=gr=>{throw TypeError(gr)};var o$=(gr,Cr,Bn)=>Cr.has(gr)||Fy("Cannot "+Bn);var Ry=(gr,Cr,Bn)=>(o$(gr,Cr,"read from private field"),Bn?Bn.call(gr):Cr.get(gr)),Ly=(gr,Cr,Bn)=>Cr.has(gr)?Fy("Cannot add the same private member more than once"):Cr instanceof WeakSet?Cr.add(gr):Cr.set(gr,Bn);(function(){"use strict";var Gl;typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Cr=1,Bn=2,kf=4,zy=8,Zy=16,Vy=1,Uy=2,By=4,jy=8,qy=16,Wy=1,Hy=2,Sf="[",na="[!",ec="]",_i={},gt=Symbol(),Ky="http://www.w3.org/1999/xhtml",xf="@attach",tc=!1;var ia=Array.isArray,Gy=Array.prototype.indexOf,Ki=Array.prototype.includes,sa=Array.from,oa=Object.keys,aa=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Ef=Object.getOwnPropertyDescriptors,Tf=Object.prototype,Yy=Array.prototype,la=Object.getPrototypeOf,Af=Object.isExtensible;function zs(t){return typeof t=="function"}const Ue=()=>{};function Jy(t){return t()}function rc(t){for(var e=0;e<t.length;e++)t[e]()}function Cf(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const _t=2,ca=4,Zs=8,nc=1<<24,pn=16,Or=32,jn=64,ic=128,vr=512,vt=1024,Pt=2048,mn=4096,ar=8192,gn=16384,ua=32768,qn=65536,Of=1<<17,Df=1<<18,bi=1<<19,If=1<<20,vn=1<<25,wi=32768,sc=1<<21,oc=1<<22,Wn=1<<23,qr=Symbol("$state"),ac=Symbol("legacy props"),Qy=Symbol(""),Gi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},da=3,Hn=8;function Pf(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Xy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function e_(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function t_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function r_(t){throw new Error("https://svelte.dev/e/effect_orphan")}function n_(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function i_(){throw new Error("https://svelte.dev/e/hydration_failed")}function s_(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function o_(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function a_(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function l_(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function c_(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Vs(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function u_(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function d_(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let xe=!1;function Mt(t){xe=t}let Pe;function bt(t){if(t===null)throw Vs(),_i;return Pe=t}function yn(){return bt(Ir(Pe))}function I(t){if(xe){if(Ir(Pe)!==null)throw Vs(),_i;Pe=t}}function $t(t=1){if(xe){for(var e=t,r=Pe;e--;)r=Ir(r);Pe=r}}function fa(t=!0){for(var e=0,r=Pe;;){if(r.nodeType===Hn){var n=r.data;if(n===ec){if(e===0)return r;e-=1}else(n===Sf||n===na)&&(e+=1)}var i=Ir(r);t&&r.remove(),r=i}}function Mf(t){if(!t||t.nodeType!==Hn)throw Vs(),_i;return t.data}function $f(t){return t===this.v}function f_(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Nf(t){return!f_(t,this.v)}let Yi=!1,h_=!1;function p_(){Yi=!0}const m_=[];function lc(t,e=!1,r=!1){return ha(t,new Map,"",m_,null,r)}function ha(t,e,r,n,i=null,s=!1){if(typeof t=="object"&&t!==null){var o=e.get(t);if(o!==void 0)return o;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(ia(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var l=0;l<t.length;l+=1){var c=t[l];l in t&&(a[l]=ha(c,e,r,n,null,s))}return a}if(la(t)===Tf){a={},e.set(t,a),i!==null&&e.set(i,a);for(var u in t)a[u]=ha(t[u],e,r,n,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return ha(t.toJSON(),e,r,n,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let rt=null;function Ji(t){rt=t}function Ff(t){return cc().get(t)}function g_(t,e){return cc().set(t,e),e}function v_(t){return cc().has(t)}function te(t,e=!1,r){rt={p:rt,i:!1,c:null,e:null,s:t,x:null,l:Yi&&!e?{s:null,u:null,$:[]}:null}}function re(t){var e=rt,r=e.e;if(r!==null){e.e=null;for(var n of r)lh(n)}return t!==void 0&&(e.x=t),e.i=!0,rt=e.p,t??{}}function Us(){return!Yi||rt!==null&&rt.l===null}function cc(t){return rt===null&&Pf(),rt.c??=new Map(y_(rt)||void 0)}function y_(t){let e=t.p;for(;e!==null;){const r=e.c;if(r!==null)return r;e=e.p}return null}let ki=[];function Rf(){var t=ki;ki=[],rc(t)}function lr(t){if(ki.length===0&&!Bs){var e=ki;queueMicrotask(()=>{e===ki&&Rf()})}ki.push(t)}function __(){for(;ki.length>0;)Rf()}function Lf(t){var e=$e;if(e===null)return Me.f|=Wn,t;if((e.f&ua)===0){if((e.f&ic)===0)throw t;e.b.error(t)}else Qi(t,e)}function Qi(t,e){for(;e!==null;){if((e.f&ic)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t}const b_=-7169;function ht(t,e){t.f=t.f&b_|e}function uc(t){(t.f&vr)!==0||t.deps===null?ht(t,vt):ht(t,mn)}function zf(t){if(t!==null)for(const e of t)(e.f&_t)===0||(e.f&wi)===0||(e.f^=wi,zf(e.deps))}function Zf(t,e,r){(t.f&Pt)!==0?e.add(t):(t.f&mn)!==0&&r.add(t),zf(t.deps),ht(t,vt)}const pa=new Set;let Ze=null,ma=null,Dr=null,cr=[],ga=null,dc=!1,Bs=!1;class _n{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#i=null;#s=new Set;#a=new Set;skipped_effects=new Set;is_fork=!1;#o=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){cr=[],this.apply();var r=[],n=[];for(const i of e)this.#l(i,r,n);if(this.is_deferred()){this.#c(n),this.#c(r);for(const i of this.skipped_effects)qf(i)}else{for(const i of this.#e)i();this.#e.clear(),this.#r===0&&this.#d(),ma=this,Ze=null,Uf(n),Uf(r),ma=null,this.#i?.resolve()}Dr=null}#l(e,r,n){e.f^=vt;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(Or|jn))!==0,l=a&&(o&vt)!==0,c=l||(o&ar)!==0||this.skipped_effects.has(i);if(!c&&i.fn!==null){a?i.f^=vt:s!==null&&(o&(ca|Zs|nc))!==0?s.b.defer_effect(i):(o&ca)!==0?r.push(i):Ws(i)&&((o&pn)!==0&&this.#a.add(i),Hs(i));var u=i.first;if(u!==null){i=u;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)d===s&&(s=null),i=d.next,d=d.parent}}#c(e){for(var r=0;r<e.length;r+=1)Zf(e[r],this.#s,this.#a)}capture(e,r){r!==gt&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&Wn)===0&&(this.current.set(e,e.v),Dr?.set(e,e.v))}activate(){Ze=this,this.apply()}deactivate(){Ze===this&&(Ze=null,Dr=null)}flush(){if(this.activate(),cr.length>0){if(Vf(),Ze!==null&&Ze!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(pa.size>1){this.previous.clear();var e=Dr,r=!0;for(const i of pa){if(i===this){r=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(r&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var n=cr;cr=[];const a=new Set,l=new Map;for(const c of s)Bf(c,o,a,l);if(cr.length>0){Ze=i,i.apply();for(const c of cr)i.#l(c,[],[]);i.deactivate()}cr=n}}Ze=null,Dr=e}this.committed=!0,pa.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),!this.#o&&(this.#o=!0,lr(()=>{this.#o=!1,this.is_deferred()?cr.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#a.delete(e),ht(e,Pt),wn(e);for(const e of this.#a)ht(e,mn),wn(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=Cf()).promise}static ensure(){if(Ze===null){const e=Ze=new _n;pa.add(Ze),Bs||lr(()=>{Ze===e&&e.flush()})}return Ze}apply(){}}function y(t){var e=Bs;Bs=!0;try{for(var r;;){if(__(),cr.length===0&&(Ze?.flush(),cr.length===0))return ga=null,r;Vf()}}finally{Bs=e}}function Vf(){dc=!0;var t=null;try{for(var e=0;cr.length>0;){var r=_n.ensure();if(e++>1e3){var n,i;w_()}r.process(cr),Kn.clear()}}finally{dc=!1,ga=null}}function w_(){try{n_()}catch(t){Qi(t,ga)}}let bn=null;function Uf(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(gn|ar))===0&&Ws(n)&&(bn=new Set,Hs(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?hh(n):n.fn=null),bn?.size>0)){Kn.clear();for(const i of bn){if((i.f&(gn|ar))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)bn.has(o)&&(bn.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(gn|ar))===0&&Hs(l)}}bn.clear()}}bn=null}}function Bf(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&_t)!==0?Bf(i,e,r,n):(s&(oc|pn))!==0&&(s&Pt)===0&&jf(i,e,n)&&(ht(i,Pt),wn(i))}}function jf(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const i of t.deps){if(Ki.call(e,i))return!0;if((i.f&_t)!==0&&jf(i,e,r))return r.set(i,!0),!0}return r.set(t,!1),!1}function wn(t){for(var e=ga=t;e.parent!==null;){e=e.parent;var r=e.f;if(dc&&e===$e&&(r&pn)!==0&&(r&Df)===0)return;if((r&(jn|Or))!==0){if((r&vt)===0)return;e.f^=vt}}cr.push(e)}function qf(t){if(!((t.f&Or)!==0&&(t.f&vt)!==0)){ht(t,vt);for(var e=t.first;e!==null;)qf(e),e=e.next}}function fc(t){let e=0,r=Gn(0),n;return()=>{_c()&&(h(r),es(()=>(e===0&&(n=Ge(()=>t(()=>Wr(r)))),e+=1,()=>{lr(()=>{e-=1,e===0&&(n?.(),n=void 0,Wr(r))})})))}}var k_=qn|bi|ic;function S_(t,e,r){new x_(t,e,r)}class x_{parent;is_pending=!1;#e;#t=xe?Pe:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#c=null;#d=0;#u=0;#f=!1;#h=!1;#p=new Set;#m=new Set;#g=null;#v=fc(()=>(this.#g=Gn(this.#d),()=>{this.#g=null}));constructor(e,r,n){this.#e=e,this.#r=r,this.#n=n,this.parent=$e.b,this.is_pending=!!this.#r.pending,this.#i=qs(()=>{if($e.b=this,xe){const s=this.#t;yn(),s.nodeType===Hn&&s.data===na?this.#_():(this.#y(),this.#u===0&&(this.is_pending=!1))}else{var i=this.#k();try{this.#s=Kt(()=>n(i))}catch(s){this.error(s)}this.#u>0?this.#w():this.is_pending=!1}return()=>{this.#c?.remove()}},k_),xe&&(this.#e=Pe)}#y(){try{this.#s=Kt(()=>this.#n(this.#e))}catch(e){this.error(e)}}#_(){const e=this.#r.pending;e&&(this.#a=Kt(()=>e(this.#e)),lr(()=>{var r=this.#k();this.#s=this.#b(()=>(_n.ensure(),Kt(()=>this.#n(r)))),this.#u>0?this.#w():(Si(this.#a,()=>{this.#a=null}),this.is_pending=!1)}))}#k(){var e=this.#e;return this.is_pending&&(this.#c=Ht(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){Zf(e,this.#p,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#b(e){var r=$e,n=Me,i=rt;br(this.#i),Gt(this.#i),Ji(this.#i.ctx);try{return e()}catch(s){return Lf(s),null}finally{br(r),Gt(n),Ji(i)}}#w(){const e=this.#r.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),gh(this.#s,this.#l)),this.#a===null&&(this.#a=Kt(()=>e(this.#e)))}#S(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e);return}if(this.#u+=e,this.#u===0){this.is_pending=!1;for(const r of this.#p)ht(r,Pt),wn(r);for(const r of this.#m)ht(r,mn),wn(r);this.#p.clear(),this.#m.clear(),this.#a&&Si(this.#a,()=>{this.#a=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#S(e),this.#d+=e,!(!this.#g||this.#f)&&(this.#f=!0,lr(()=>{this.#f=!1,this.#g&&Xi(this.#g,this.#d)}))}get_effect_pending(){return this.#v(),h(this.#g)}error(e){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw e;this.#s&&(yt(this.#s),this.#s=null),this.#a&&(yt(this.#a),this.#a=null),this.#o&&(yt(this.#o),this.#o=null),xe&&(bt(this.#t),$t(),bt(fa()));var i=!1,s=!1;const o=()=>{if(i){d_();return}i=!0,s&&c_(),_n.ensure(),this.#d=0,this.#o!==null&&Si(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#b(()=>(this.#h=!1,Kt(()=>this.#n(this.#e)))),this.#u>0?this.#w():this.is_pending=!1};lr(()=>{try{s=!0,r?.(e,o),s=!1}catch(a){Qi(a,this.#i&&this.#i.parent)}n&&(this.#o=this.#b(()=>{_n.ensure(),this.#h=!0;try{return Kt(()=>{n(this.#e,()=>e,()=>o)})}catch(a){return Qi(a,this.#i.parent),null}finally{this.#h=!1}}))})}}function Wf(t,e,r,n){const i=Us()?js:pc;var s=t.filter(f=>!f.settled);if(r.length===0&&s.length===0){n(e.map(i));return}var o=Ze,a=$e,l=E_(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function u(f){l();try{n(f)}catch(p){(a.f&gn)===0&&Qi(p,a)}o?.deactivate(),hc()}if(r.length===0){c.then(()=>u(e.map(i)));return}function d(){l(),Promise.all(r.map(f=>T_(f))).then(f=>u([...e.map(i),...f])).catch(f=>Qi(f,a))}c?c.then(d):d()}function E_(){var t=$e,e=Me,r=rt,n=Ze;return function(s=!0){br(t),Gt(e),Ji(r),s&&n?.activate()}}function hc(){br(null),Gt(null),Ji(null)}function js(t){var e=_t|Pt,r=Me!==null&&(Me.f&_t)!==0?Me:null;return $e!==null&&($e.f|=bi),{ctx:rt,deps:null,effects:null,equals:$f,f:e,fn:t,reactions:null,rv:0,v:gt,wv:0,parent:r??$e,ac:null}}function T_(t,e,r){let n=$e;n===null&&Xy();var i=n.b,s=void 0,o=Gn(gt),a=!Me,l=new Map;return $_(()=>{var c=Cf();s=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===Ze&&u.committed&&u.deactivate(),hc()})}catch(p){c.reject(p),hc()}var u=Ze;if(a){var d=i.is_rendered();i.update_pending_count(1),u.increment(d),l.get(u)?.reject(Gi),l.delete(u),l.set(u,c)}const f=(p,v=void 0)=>{if(u.activate(),v)v!==Gi&&(o.f|=Wn,Xi(o,v));else{(o.f&Wn)!==0&&(o.f^=Wn),Xi(o,p);for(const[g,m]of l){if(l.delete(g),g===u)break;m.reject(Gi)}}a&&(i.update_pending_count(-1),u.decrement(d))};c.promise.then(f,p=>f(null,p||"unknown"))}),_a(()=>{for(const c of l.values())c.reject(Gi)}),new Promise(c=>{function u(d){function f(){d===s?c(o):u(s)}d.then(f,f)}u(s)})}function C(t){const e=js(t);return yh(e),e}function pc(t){const e=js(t);return e.equals=Nf,e}function Hf(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)yt(e[r])}}function A_(t){for(var e=t.parent;e!==null;){if((e.f&_t)===0)return(e.f&gn)===0?e:null;e=e.parent}return null}function mc(t){var e,r=$e;br(A_(t));try{t.f&=~wi,Hf(t),e=Sh(t)}finally{br(r)}return e}function Kf(t){var e=mc(t);if(!t.equals(e)&&(t.wv=wh(),(!Ze?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){ht(t,vt);return}Yn||(Dr!==null?(_c()||Ze?.is_fork)&&Dr.set(t,e):uc(t))}let gc=new Set;const Kn=new Map;let Gf=!1;function Gn(t,e){var r={f:0,v:t,reactions:null,equals:$f,rv:0,wv:0};return r}function le(t,e){const r=Gn(t);return yh(r),r}function Yf(t,e=!1,r=!0){const n=Gn(t);return e||(n.equals=Nf),Yi&&r&&rt!==null&&rt.l!==null&&(rt.l.s??=[]).push(n),n}function M(t,e,r=!1){Me!==null&&(!Pr||(Me.f&Of)!==0)&&Us()&&(Me.f&(_t|pn|oc|Of))!==0&&(wr===null||!Ki.call(wr,t))&&l_();let n=r?Be(e):e;return Xi(t,n)}function Xi(t,e){if(!t.equals(e)){var r=t.v;Yn?Kn.set(t,e):Kn.set(t,r),t.v=e;var n=_n.ensure();if(n.capture(t,r),(t.f&_t)!==0){const i=t;(t.f&Pt)!==0&&mc(i),uc(i)}t.wv=wh(),Jf(t,Pt),Us()&&$e!==null&&($e.f&vt)!==0&&($e.f&(Or|jn))===0&&(kr===null?F_([t]):kr.push(t)),!n.is_fork&&gc.size>0&&!Gf&&C_()}return e}function C_(){Gf=!1;for(const t of gc)(t.f&vt)!==0&&ht(t,mn),Ws(t)&&Hs(t);gc.clear()}function Wr(t){M(t,t.v+1)}function Jf(t,e){var r=t.reactions;if(r!==null)for(var n=Us(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;if(!(!n&&o===$e)){var l=(a&Pt)===0;if(l&&ht(o,e),(a&_t)!==0){var c=o;Dr?.delete(c),(a&wi)===0&&(a&vr&&(o.f|=wi),Jf(c,mn))}else l&&((a&pn)!==0&&bn!==null&&bn.add(o),wn(o))}}}function Be(t){if(typeof t!="object"||t===null||qr in t)return t;const e=la(t);if(e!==Tf&&e!==Yy)return t;var r=new Map,n=ia(t),i=le(0),s=kn,o=a=>{if(kn===s)return a();var l=Me,c=kn;Gt(null),bh(s);var u=a();return Gt(l),bh(c),u};return n&&r.set("length",le(t.length)),new Proxy(t,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&o_();var u=r.get(l);return u===void 0?u=o(()=>{var d=le(c.value);return r.set(l,d),d}):M(u,c.value,!0),!0},deleteProperty(a,l){var c=r.get(l);if(c===void 0){if(l in a){const u=o(()=>le(gt));r.set(l,u),Wr(i)}}else M(c,gt),Wr(i);return!0},get(a,l,c){if(l===qr)return t;var u=r.get(l),d=l in a;if(u===void 0&&(!d||hn(a,l)?.writable)&&(u=o(()=>{var p=Be(d?a[l]:gt),v=le(p);return v}),r.set(l,u)),u!==void 0){var f=h(u);return f===gt?void 0:f}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=r.get(l);u&&(c.value=h(u))}else if(c===void 0){var d=r.get(l),f=d?.v;if(d!==void 0&&f!==gt)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(a,l){if(l===qr)return!0;var c=r.get(l),u=c!==void 0&&c.v!==gt||Reflect.has(a,l);if(c!==void 0||$e!==null&&(!u||hn(a,l)?.writable)){c===void 0&&(c=o(()=>{var f=u?Be(a[l]):gt,p=le(f);return p}),r.set(l,c));var d=h(c);if(d===gt)return!1}return u},set(a,l,c,u){var d=r.get(l),f=l in a;if(n&&l==="length")for(var p=c;p<d.v;p+=1){var v=r.get(p+"");v!==void 0?M(v,gt):p in a&&(v=o(()=>le(gt)),r.set(p+"",v))}if(d===void 0)(!f||hn(a,l)?.writable)&&(d=o(()=>le(void 0)),M(d,Be(c)),r.set(l,d));else{f=d.v!==gt;var g=o(()=>Be(c));M(d,g)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(u,c),!f){if(n&&typeof l=="string"){var b=r.get("length"),k=Number(l);Number.isInteger(k)&&k>=b.v&&M(b,k+1)}Wr(i)}return!0},ownKeys(a){h(i);var l=Reflect.ownKeys(a).filter(d=>{var f=r.get(d);return f===void 0||f.v!==gt});for(var[c,u]of r)u.v!==gt&&!(c in a)&&l.push(c);return l},setPrototypeOf(){a_()}})}function Qf(t){try{if(t!==null&&typeof t=="object"&&qr in t)return t[qr]}catch{}return t}function Xf(t,e){return Object.is(Qf(t),Qf(e))}var eh,th,rh,nh;function vc(){if(eh===void 0){eh=window,th=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;rh=hn(e,"firstChild").get,nh=hn(e,"nextSibling").get,Af(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Af(r)&&(r.__t=void 0)}}function Ht(t=""){return document.createTextNode(t)}function yr(t){return rh.call(t)}function Ir(t){return nh.call(t)}function $(t,e){if(!xe)return yr(t);var r=yr(Pe);if(r===null)r=Pe.appendChild(Ht());else if(e&&r.nodeType!==da){var n=Ht();return r?.before(n),bt(n),n}return bt(r),r}function L(t,e=!1){if(!xe){var r=yr(t);return r instanceof Comment&&r.data===""?Ir(r):r}if(e&&Pe?.nodeType!==da){var n=Ht();return Pe?.before(n),bt(n),n}return Pe}function ee(t,e=1,r=!1){let n=xe?Pe:t;for(var i;e--;)i=n,n=Ir(n);if(!xe)return n;if(r&&n?.nodeType!==da){var s=Ht();return n===null?i?.after(s):n.before(s),bt(s),s}return bt(n),n}function yc(t){t.textContent=""}function ih(){return!1}function O_(t=""){return document.createComment(t)}function D_(t,e){if(e){const r=document.body;t.autofocus=!0,lr(()=>{document.activeElement===r&&t.focus()})}}function I_(t){xe&&yr(t)!==null&&yc(t)}let sh=!1;function oh(){sh||(sh=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function va(t){var e=Me,r=$e;Gt(null),br(null);try{return t()}finally{Gt(e),br(r)}}function ya(t,e,r,n=r){t.addEventListener(e,()=>va(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),oh()}function ah(t){$e===null&&(Me===null&&r_(),t_()),Yn&&e_()}function P_(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function _r(t,e,r){var n=$e;n!==null&&(n.f&ar)!==0&&(t|=ar);var i={ctx:rt,deps:null,nodes:null,f:t|Pt|vr,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Hs(i),i.f|=ua}catch(a){throw yt(i),a}else e!==null&&wn(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&bi)===0&&(s=s.first,(t&pn)!==0&&(t&qn)!==0&&s!==null&&(s.f|=qn)),s!==null&&(s.parent=n,n!==null&&P_(s,n),Me!==null&&(Me.f&_t)!==0&&(t&jn)===0)){var o=Me;(o.effects??=[]).push(s)}return i}function _c(){return Me!==null&&!Pr}function _a(t){const e=_r(Zs,null,!1);return ht(e,vt),e.teardown=t,e}function _e(t){ah();var e=$e.f,r=!Me&&(e&Or)!==0&&(e&ua)===0;if(r){var n=rt;(n.e??=[]).push(t)}else return lh(t)}function lh(t){return _r(ca|If,t,!1)}function bc(t){return ah(),_r(Zs|If,t,!0)}function ba(t){_n.ensure();const e=_r(jn|bi,t,!0);return()=>{yt(e)}}function M_(t){_n.ensure();const e=_r(jn|bi,t,!0);return(r={})=>new Promise(n=>{r.outro?Si(e,()=>{yt(e),n(void 0)}):(yt(e),n(void 0))})}function wa(t){return _r(ca,t,!1)}function $_(t){return _r(oc|bi,t,!0)}function es(t,e=0){return _r(Zs|e,t,!0)}function ce(t,e=[],r=[],n=[]){Wf(n,e,r,i=>{_r(Zs,()=>t(...i.map(h)),!0)})}function qs(t,e=0){var r=_r(pn|e,t,!0);return r}function ch(t,e=0){var r=_r(nc|e,t,!0);return r}function Kt(t){return _r(Or|bi,t,!0)}function uh(t){var e=t.teardown;if(e!==null){const r=Yn,n=Me;vh(!0),Gt(null);try{e.call(null)}finally{vh(r),Gt(n)}}}function dh(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&va(()=>{i.abort(Gi)});var n=r.next;(r.f&jn)!==0?r.parent=null:yt(r,e),r=n}}function N_(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Or)===0&&yt(e),e=r}}function yt(t,e=!0){var r=!1;(e||(t.f&Df)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(fh(t.nodes.start,t.nodes.end),r=!0),dh(t,e&&!r),Sa(t,0),ht(t,gn);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();uh(t);var i=t.parent;i!==null&&i.first!==null&&hh(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function fh(t,e){for(;t!==null;){var r=t===e?null:Ir(t);t.remove(),t=r}}function hh(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Si(t,e,r=!0){var n=[];ph(t,n,!0);var i=()=>{r&&yt(t),e&&e()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function ph(t,e,r){if((t.f&ar)===0){t.f^=ar;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next,o=(i.f&qn)!==0||(i.f&Or)!==0&&(t.f&pn)!==0;ph(i,e,o?r:!1),i=s}}}function wc(t){mh(t,!0)}function mh(t,e){if((t.f&ar)!==0){t.f^=ar,(t.f&vt)===0&&(ht(t,Pt),wn(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&qn)!==0||(r.f&Or)!==0;mh(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function gh(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Ir(r);e.append(r),r=i}}let ka=!1,Yn=!1;function vh(t){Yn=t}let Me=null,Pr=!1;function Gt(t){Me=t}let $e=null;function br(t){$e=t}let wr=null;function yh(t){Me!==null&&(wr===null?wr=[t]:wr.push(t))}let Yt=null,ur=0,kr=null;function F_(t){kr=t}let _h=1,xi=0,kn=xi;function bh(t){kn=t}function wh(){return++_h}function Ws(t){var e=t.f;if((e&Pt)!==0)return!0;if(e&_t&&(t.f&=~wi),(e&mn)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Ws(s)&&Kf(s),s.wv>t.wv)return!0}(e&vr)!==0&&Dr===null&&ht(t,vt)}return!1}function kh(t,e,r=!0){var n=t.reactions;if(n!==null&&!(wr!==null&&Ki.call(wr,t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&_t)!==0?kh(s,e,!1):e===s&&(r?ht(s,Pt):(s.f&vt)!==0&&ht(s,mn),wn(s))}}function Sh(t){var e=Yt,r=ur,n=kr,i=Me,s=wr,o=rt,a=Pr,l=kn,c=t.f;Yt=null,ur=0,kr=null,Me=(c&(Or|jn))===0?t:null,wr=null,Ji(t.ctx),Pr=!1,kn=++xi,t.ac!==null&&(va(()=>{t.ac.abort(Gi)}),t.ac=null);try{t.f|=sc;var u=t.fn,d=u(),f=t.deps,p=Ze?.is_fork;if(Yt!==null){var v;if(p||Sa(t,ur),f!==null&&ur>0)for(f.length=ur+Yt.length,v=0;v<Yt.length;v++)f[ur+v]=Yt[v];else t.deps=f=Yt;if(_c()&&(t.f&vr)!==0)for(v=ur;v<f.length;v++)(f[v].reactions??=[]).push(t)}else!p&&f!==null&&ur<f.length&&(Sa(t,ur),f.length=ur);if(Us()&&kr!==null&&!Pr&&f!==null&&(t.f&(_t|mn|Pt))===0)for(v=0;v<kr.length;v++)kh(kr[v],t);if(i!==null&&i!==t){if(xi++,i.deps!==null)for(let g=0;g<r;g+=1)i.deps[g].rv=xi;if(e!==null)for(const g of e)g.rv=xi;kr!==null&&(n===null?n=kr:n.push(...kr))}return(t.f&Wn)!==0&&(t.f^=Wn),d}catch(g){return Lf(g)}finally{t.f^=sc,Yt=e,ur=r,kr=n,Me=i,wr=s,Ji(o),Pr=a,kn=l}}function R_(t,e){let r=e.reactions;if(r!==null){var n=Gy.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&_t)!==0&&(Yt===null||!Ki.call(Yt,e))){var s=e;(s.f&vr)!==0&&(s.f^=vr,s.f&=~wi),uc(s),Hf(s),Sa(s,0)}}function Sa(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)R_(t,r[n])}function Hs(t){var e=t.f;if((e&gn)===0){ht(t,vt);var r=$e,n=ka;$e=t,ka=!0;try{(e&(pn|nc))!==0?N_(t):dh(t),uh(t);var i=Sh(t);t.teardown=typeof i=="function"?i:null,t.wv=_h;var s;tc&&h_&&(t.f&Pt)!==0&&t.deps}finally{ka=n,$e=r}}}async function xh(){await Promise.resolve(),y()}function h(t){var e=t.f,r=(e&_t)!==0;if(Me!==null&&!Pr){var n=$e!==null&&($e.f&gn)!==0;if(!n&&(wr===null||!Ki.call(wr,t))){var i=Me.deps;if((Me.f&sc)!==0)t.rv<xi&&(t.rv=xi,Yt===null&&i!==null&&i[ur]===t?ur++:Yt===null?Yt=[t]:Yt.push(t));else{(Me.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[Me]:Ki.call(s,Me)||s.push(Me)}}}if(Yn&&Kn.has(t))return Kn.get(t);if(r){var o=t;if(Yn){var a=o.v;return((o.f&vt)===0&&o.reactions!==null||Th(o))&&(a=mc(o)),Kn.set(o,a),a}var l=(o.f&vr)===0&&!Pr&&Me!==null&&(ka||(Me.f&vr)!==0),c=o.deps===null;Ws(o)&&(l&&(o.f|=vr),Kf(o)),l&&!c&&Eh(o)}if(Dr?.has(t))return Dr.get(t);if((t.f&Wn)!==0)throw t.v;return t.v}function Eh(t){if(t.deps!==null){t.f|=vr;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&_t)!==0&&(e.f&vr)===0&&Eh(e)}}function Th(t){if(t.v===gt)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Kn.has(e)||(e.f&_t)!==0&&Th(e))return!0;return!1}function Ge(t){var e=Pr;try{return Pr=!0,t()}finally{Pr=e}}function L_(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qr in t)kc(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&qr in r&&kc(r)}}}function kc(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{kc(t[n],e)}catch{}const r=la(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Ef(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}const Ah=new Set,Sc=new Set;function xc(t,e,r,n={}){function i(s){if(n.capture||Ks.call(e,s),!s.cancelBubble)return va(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?lr(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function wt(t,e,r,n={}){var i=xc(e,t,r,n);return()=>{t.removeEventListener(e,i,n)}}function Ec(t,e,r,n,i){var s={capture:n,passive:i},o=xc(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_a(()=>{e.removeEventListener(t,o,s)})}function Hr(t){for(var e=0;e<t.length;e++)Ah.add(t[e]);for(var r of Sc)r(t)}let Ch=null;function Ks(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Ch=t;var o=0,a=Ch===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||t.target,s!==e){aa(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Me,d=$e;Gt(null),br(null);try{for(var f,p=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];g!=null&&(!s.disabled||t.target===s)&&g.call(s,t)}catch(m){f?p.push(m):f=m}if(t.cancelBubble||v===e||v===null)break;s=v}if(f){for(let m of p)queueMicrotask(()=>{throw m});throw f}}finally{t.__root=e,delete t.currentTarget,Gt(u),br(d)}}}function Oh(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Kr(t,e){var r=$e;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function q(t,e){var r=(e&Wy)!==0,n=(e&Hy)!==0,i,s=!t.startsWith("<!>");return()=>{if(xe)return Kr(Pe,null),Pe;i===void 0&&(i=Oh(s?t:"<!>"+t),r||(i=yr(i)));var o=n||th?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=yr(o),l=o.lastChild;Kr(a,l)}else Kr(o,o);return o}}function Jt(t=""){if(!xe){var e=Ht(t+"");return Kr(e,e),e}var r=Pe;return r.nodeType!==da&&(r.before(r=Ht()),bt(r)),Kr(r,r),r}function H(){if(xe)return Kr(Pe,null),Pe;var t=document.createDocumentFragment(),e=document.createComment(""),r=Ht();return t.append(e,r),Kr(e,r),t}function w(t,e){if(xe){var r=$e;((r.f&ua)===0||r.nodes.end===null)&&(r.nodes.end=Pe),yn();return}t!==null&&t.before(e)}function kt(){if(xe&&Pe&&Pe.nodeType===Hn&&Pe.textContent?.startsWith("$")){const t=Pe.textContent.substring(1);return yn(),t}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function z_(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Z_=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function V_(t){return Z_.includes(t)}const U_={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 B_(t){return t=t.toLowerCase(),U_[t]??t}const j_=["touchstart","touchmove"];function q_(t){return j_.includes(t)}function se(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Dh(t,e){return Ih(t,e)}function W_(t,e){vc(),e.intro=e.intro??!1;const r=e.target,n=xe,i=Pe;try{for(var s=yr(r);s&&(s.nodeType!==Hn||s.data!==Sf);)s=Ir(s);if(!s)throw _i;Mt(!0),bt(s);const o=Ih(t,{...e,anchor:s});return Mt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==_i&&console.warn("Failed to hydrate: ",o),e.recover===!1&&i_(),vc(),yc(r),Mt(!1),Dh(t,e)}finally{Mt(n),bt(i)}}const ts=new Map;function Ih(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){vc();var a=new Set,l=d=>{for(var f=0;f<d.length;f++){var p=d[f];if(!a.has(p)){a.add(p);var v=q_(p);e.addEventListener(p,Ks,{passive:v});var g=ts.get(p);g===void 0?(document.addEventListener(p,Ks,{passive:v}),ts.set(p,1)):ts.set(p,g+1)}}};l(sa(Ah)),Sc.add(l);var c=void 0,u=M_(()=>{var d=r??e.appendChild(Ht());return S_(d,{pending:()=>{}},f=>{if(s){te({});var p=rt;p.c=s}if(i&&(n.$$events=i),xe&&Kr(f,null),c=t(f,n)||{},xe&&($e.nodes.end=Pe,Pe===null||Pe.nodeType!==Hn||Pe.data!==ec))throw Vs(),_i;s&&re()}),()=>{for(var f of a){e.removeEventListener(f,Ks);var p=ts.get(f);--p===0?(document.removeEventListener(f,Ks),ts.delete(f)):ts.set(f,p)}Sc.delete(l),d!==r&&d.parentNode?.removeChild(d)}});return Tc.set(c,u),c}let Tc=new WeakMap;function H_(t,e){const r=Tc.get(t);return r?(Tc.delete(t),r(e)):Promise.resolve()}class Ac{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#i=!0;constructor(e,r=!0){this.anchor=e,this.#i=r}#s=()=>{var e=Ze;if(this.#e.has(e)){var r=this.#e.get(e),n=this.#t.get(r);if(n)wc(n),this.#n.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#r.get(o);a&&(yt(a.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===r||this.#n.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();gh(o,c),c.append(Ht()),this.#r.set(s,{effect:o,fragment:c})}else yt(o);this.#n.delete(s),this.#t.delete(s)};this.#i||!n?(this.#n.add(s),Si(o,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(yt(i.effect),this.#r.delete(n))};ensure(e,r){var n=Ze,i=ih();if(r&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),o=Ht();s.append(o),this.#r.set(e,{effect:Kt(()=>r(o)),fragment:s})}else this.#t.set(e,Kt(()=>r(this.anchor)));if(this.#e.set(n,e),i){for(const[a,l]of this.#t)a===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[a,l]of this.#r)a===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#a)}else xe&&(this.anchor=Pe),this.#s()}}function ke(t,e,...r){var n=new Ac(t);qs(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...r)))},qn)}function Sn(t){rt===null&&Pf(),Yi&&rt.l!==null?K_(rt).m.push(t):_e(()=>{const e=Ge(t);if(typeof e=="function")return e})}function K_(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function G_(){return Symbol(xf)}function de(t,e,r=!1){xe&&yn();var n=new Ac(t),i=r?qn:0;function s(o,a){if(xe){const c=Mf(t)===na;if(o===c){var l=fa();bt(l),n.anchor=l,Mt(!1),n.ensure(o,a),Mt(!0);return}}n.ensure(o,a)}qs(()=>{var o=!1;e((a,l=!0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}function Gr(t,e){return e}function Y_(t,e,r){for(var n=[],i=e.length,s,o=e.length,a=0;a<i;a++){let d=e[a];Si(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var f=t.outrogroups;Cc(sa(s.done)),f.delete(s),f.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=n.length===0&&r!==null;if(l){var c=r,u=c.parentNode;yc(u),u.append(c),t.items.clear()}Cc(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function Cc(t,e=!0){for(var r=0;r<t.length;r++)yt(t[r],e)}var Ph;function Ke(t,e,r,n,i,s=null){var o=t,a=new Map,l=(e&kf)!==0;if(l){var c=t;o=xe?bt(yr(c)):c.appendChild(Ht())}xe&&yn();var u=null,d=pc(()=>{var b=r();return ia(b)?b:b==null?[]:sa(b)}),f,p=!0;function v(){m.fallback=u,J_(m,f,o,e,n),u!==null&&(f.length===0?(u.f&vn)===0?wc(u):(u.f^=vn,Ys(u,null,o)):Si(u,()=>{u=null}))}var g=qs(()=>{f=h(d);var b=f.length;let k=!1;if(xe){var D=Mf(o)===na;D!==(b===0)&&(o=fa(),bt(o),Mt(!1),k=!0)}for(var T=new Set,P=Ze,A=ih(),O=0;O<b;O+=1){xe&&Pe.nodeType===Hn&&Pe.data===ec&&(o=Pe,k=!0,Mt(!1));var F=f[O],N=n(F,O),j=p?null:a.get(N);j?(j.v&&Xi(j.v,F),j.i&&Xi(j.i,O),A&&P.skipped_effects.delete(j.e)):(j=Q_(a,p?o:Ph??=Ht(),F,N,O,i,e,r),p||(j.e.f|=vn),a.set(N,j)),T.add(N)}if(b===0&&s&&!u&&(p?u=Kt(()=>s(o)):(u=Kt(()=>s(Ph??=Ht())),u.f|=vn)),xe&&b>0&&bt(fa()),!p)if(A){for(const[G,Z]of a)T.has(G)||P.skipped_effects.add(Z.e);P.oncommit(v),P.ondiscard(()=>{})}else v();k&&Mt(!0),h(d)}),m={effect:g,items:a,outrogroups:null,fallback:u};p=!1,xe&&(o=Pe)}function Gs(t){for(;t!==null&&(t.f&Or)===0;)t=t.next;return t}function J_(t,e,r,n,i){var s=(n&zy)!==0,o=e.length,a=t.items,l=Gs(t.effect.first),c,u=null,d,f=[],p=[],v,g,m,b;if(s)for(b=0;b<o;b+=1)v=e[b],g=i(v,b),m=a.get(g).e,(m.f&vn)===0&&(m.nodes?.a?.measure(),(d??=new Set).add(m));for(b=0;b<o;b+=1){if(v=e[b],g=i(v,b),m=a.get(g).e,t.outrogroups!==null)for(const j of t.outrogroups)j.pending.delete(m),j.done.delete(m);if((m.f&vn)!==0)if(m.f^=vn,m===l)Ys(m,null,r);else{var k=u?u.next:l;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Jn(t,u,m),Jn(t,m,k),Ys(m,k,r),u=m,f=[],p=[],l=Gs(u.next);continue}if((m.f&ar)!==0&&(wc(m),s&&(m.nodes?.a?.unfix(),(d??=new Set).delete(m))),m!==l){if(c!==void 0&&c.has(m)){if(f.length<p.length){var D=p[0],T;u=D.prev;var P=f[0],A=f[f.length-1];for(T=0;T<f.length;T+=1)Ys(f[T],D,r);for(T=0;T<p.length;T+=1)c.delete(p[T]);Jn(t,P.prev,A.next),Jn(t,u,P),Jn(t,A,D),l=D,u=A,b-=1,f=[],p=[]}else c.delete(m),Ys(m,l,r),Jn(t,m.prev,m.next),Jn(t,m,u===null?t.effect.first:u.next),Jn(t,u,m),u=m;continue}for(f=[],p=[];l!==null&&l!==m;)(c??=new Set).add(l),p.push(l),l=Gs(l.next);if(l===null)continue}(m.f&vn)===0&&f.push(m),u=m,l=Gs(m.next)}if(t.outrogroups!==null){for(const j of t.outrogroups)j.pending.size===0&&(Cc(sa(j.done)),t.outrogroups?.delete(j));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||c!==void 0){var O=[];if(c!==void 0)for(m of c)(m.f&ar)===0&&O.push(m);for(;l!==null;)(l.f&ar)===0&&l!==t.fallback&&O.push(l),l=Gs(l.next);var F=O.length;if(F>0){var N=(n&kf)!==0&&o===0?r:null;if(s){for(b=0;b<F;b+=1)O[b].nodes?.a?.measure();for(b=0;b<F;b+=1)O[b].nodes?.a?.fix()}Y_(t,O,N)}}s&&lr(()=>{if(d!==void 0)for(m of d)m.nodes?.a?.apply()})}function Q_(t,e,r,n,i,s,o,a){var l=(o&Cr)!==0?(o&Zy)===0?Yf(r,!1,!1):Gn(r):null,c=(o&Bn)!==0?Gn(i):null;return{v:l,i:c,e:Kt(()=>(s(e,l??r,c??i,a),()=>{t.delete(n)}))}}function Ys(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,s=e&&(e.f&vn)===0?e.nodes.start:r;n!==null;){var o=Ir(n);if(s.before(n),n===i)return;n=o}}function Jn(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function X_(t,e,r=!1,n=!1,i=!1){var s=t,o="";ce(()=>{var a=$e;if(o===(o=e()??"")){xe&&yn();return}if(a.nodes!==null&&(fh(a.nodes.start,a.nodes.end),a.nodes=null),o!==""){if(xe){Pe.data;for(var l=yn(),c=l;l!==null&&(l.nodeType!==Hn||l.data!=="");)c=l,l=Ir(l);if(l===null)throw Vs(),_i;Kr(Pe,c),s=bt(l);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=Oh(u);if((r||n)&&(d=yr(d)),Kr(yr(d),d.lastChild),r||n)for(;yr(d);)s.before(yr(d));else s.before(d)}})}function eb(t,e,r,n,i){xe&&yn();var s=e.$$slots?.[r],o=!1;s===!0&&(s=e.children,o=!0),s===void 0||s(t,o?()=>n:n)}function Le(t,e,r){xe&&yn();var n=new Ac(t);qs(()=>{var i=e()??null;n.ensure(i,i&&(s=>r(s,i)))},qn)}function tb(t,e){var r=void 0,n;ch(()=>{r!==(r=e())&&(n&&(yt(n),n=null),r&&(n=Kt(()=>{wa(()=>r(t))})))})}function Mh(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Mh(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function xa(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Mh(t))&&(n&&(n+=" "),n+=e);return n}function Yr(t){return typeof t=="object"?xa(t):t??""}const $h=[...`
3
- \r\f \v\uFEFF`];function rb(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in 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||$h.includes(n[o-1]))&&(a===n.length||$h.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function Nh(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Oc(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function nb(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Oc)),i&&l.push(...Object.keys(i).map(Oc));var c=0,u=-1;const g=t.length;for(var d=0;d<g;d++){var f=t[d];if(a?f==="/"&&t[d-1]==="*"&&(a=!1):s?s===f&&(s=!1):f==="/"&&t[d+1]==="*"?a=!0:f==='"'||f==="'"?s=f:f==="("?o++:f===")"&&o--,!a&&s===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===g-1){if(u!==-1){var p=Oc(t.substring(c,u).trim());if(!l.includes(p)){f!==";"&&d++;var v=t.substring(c,d).trim();r+=" "+v+";"}}c=d+1,u=-1}}}}return n&&(r+=Nh(n)),i&&(r+=Nh(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Qt(t,e,r,n,i,s){var o=t.__className;if(xe||o!==r||o===void 0){var a=rb(r,n,s);(!xe||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&t.classList.toggle(l,c)}return s}function Dc(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function ib(t,e,r,n){var i=t.__style;if(xe||i!==e){var s=nb(e,n);(!xe||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Dc(t,r?.[0],n[0]),Dc(t,r?.[1],n[1],"important")):Dc(t,r,n));return n}function Ea(t,e,r=!1){if(t.multiple){if(e==null)return;if(!ia(e))return u_();for(var n of t.options)n.selected=e.includes(Js(n));return}for(n of t.options){var i=Js(n);if(Xf(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Fh(t){var e=new MutationObserver(()=>{Ea(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),_a(()=>{e.disconnect()})}function sb(t,e,r=e){var n=new WeakSet,i=!0;ya(t,"change",s=>{var o=s?"[selected]":":checked",a;if(t.multiple)a=[].map.call(t.querySelectorAll(o),Js);else{var l=t.querySelector(o)??t.querySelector("option:not([disabled])");a=l&&Js(l)}r(a),Ze!==null&&n.add(Ze)}),wa(()=>{var s=e();if(t===document.activeElement){var o=ma??Ze;if(n.has(o))return}if(Ea(t,s,i),i&&s===void 0){var a=t.querySelector(":checked");a!==null&&(s=Js(a),r(s))}t.__value=s,i=!1}),Fh(t)}function Js(t){return"__value"in t?t.__value:t.value}const Qs=Symbol("class"),Xs=Symbol("style"),Rh=Symbol("is custom element"),Lh=Symbol("is html");function Ta(t){if(xe){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;Te(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;Te(t,"checked",null),t.checked=i}}};t.__on_r=r,lr(r),oh()}}function zh(t,e){var r=Aa(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function ob(t,e){var r=Aa(t);r.checked!==(r.checked=e??void 0)&&(t.checked=e)}function Ic(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Te(t,e,r,n){var i=Aa(t);xe&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Qy]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Mc(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Ei(t,e,r){var n=Me,i=$e;let s=xe;xe&&Mt(!1),Gt(null),br(null);try{e!=="style"&&(Pc.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.tagName.toLowerCase())?Mc(t).includes(e):r&&typeof r=="object")?t[e]=r:Te(t,e,r==null?r:String(r))}finally{Gt(n),br(i),s&&Mt(!0)}}function ab(t,e,r,n,i=!1,s=!1){if(xe&&i&&t.tagName==="INPUT"){var o=t,a=o.type==="checkbox"?"defaultChecked":"defaultValue";a in r||Ta(o)}var l=Aa(t),c=l[Rh],u=!l[Lh];let d=xe&&c;d&&Mt(!1);var f=e||{},p=t.tagName==="OPTION";for(var v in e)v in r||(r[v]=null);r.class?r.class=Yr(r.class):r[Qs]&&(r.class=null),r[Xs]&&(r.style??=null);var g=Mc(t);for(const A in r){let O=r[A];if(p&&A==="value"&&O==null){t.value=t.__value="",f[A]=O;continue}if(A==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";Qt(t,m,O,n,e?.[Qs],r[Qs]),f[A]=O,f[Qs]=r[Qs];continue}if(A==="style"){ib(t,O,e?.[Xs],r[Xs]),f[A]=O,f[Xs]=r[Xs];continue}var b=f[A];if(!(O===b&&!(O===void 0&&t.hasAttribute(A)))){f[A]=O;var k=A[0]+A[1];if(k!=="$$")if(k==="on"){const F={},N="$$"+A;let j=A.slice(2);var D=V_(j);if(z_(j)&&(j=j.slice(0,-7),F.capture=!0),!D&&b){if(O!=null)continue;t.removeEventListener(j,f[N],F),f[N]=null}if(O!=null)if(D)t[`__${j}`]=O,Hr([j]);else{let G=function(Z){f[A].call(this,Z)};f[N]=xc(j,t,G,F)}else D&&(t[`__${j}`]=void 0)}else if(A==="style")Te(t,A,O);else if(A==="autofocus")D_(t,!!O);else if(!c&&(A==="__value"||A==="value"&&O!=null))t.value=t.__value=O;else if(A==="selected"&&p)Ic(t,O);else{var T=A;u||(T=B_(T));var P=T==="defaultValue"||T==="defaultChecked";if(O==null&&!c&&!P)if(l[A]=null,T==="value"||T==="checked"){let F=t;const N=e===void 0;if(T==="value"){let j=F.defaultValue;F.removeAttribute(T),F.defaultValue=j,F.value=F.__value=N?j:null}else{let j=F.defaultChecked;F.removeAttribute(T),F.defaultChecked=j,F.checked=N?j:!1}}else t.removeAttribute(A);else P||g.includes(T)&&(c||typeof O!="string")?(t[T]=O,T in l&&(l[T]=gt)):typeof O!="function"&&Te(t,T,O)}}}return d&&Mt(!0),f}function je(t,e,r=[],n=[],i=[],s,o=!1,a=!1){Wf(i,r,n,l=>{var c=void 0,u={},d=t.nodeName==="SELECT",f=!1;if(ch(()=>{var v=e(...l.map(h)),g=ab(t,c,v,s,o,a);f&&d&&"value"in v&&Ea(t,v.value);for(let b of Object.getOwnPropertySymbols(u))v[b]||yt(u[b]);for(let b of Object.getOwnPropertySymbols(v)){var m=v[b];b.description===xf&&(!c||m!==c[b])&&(u[b]&&yt(u[b]),u[b]=Kt(()=>tb(t,()=>m))),g[b]=m}c=g}),d){var p=t;wa(()=>{Ea(p,c.value,!0),Fh(p)})}f=!0})}function Aa(t){return t.__attributes??={[Rh]:t.nodeName.includes("-"),[Lh]:t.namespaceURI===Ky}}var Pc=new Map;function Mc(t){var e=t.getAttribute("is")||t.nodeName,r=Pc.get(e);if(r)return r;Pc.set(e,r=[]);for(var n,i=t,s=Element.prototype;s!==i;){n=Ef(i);for(var o in n)n[o].set&&r.push(o);i=la(i)}return r}let $c=null;function lb(){if($c===null){var t=document.createElement("select");t.innerHTML="<option><span>t</span></option>",$c=t.firstChild?.firstChild?.nodeType===1}return $c}function cb(t,e){var r=xe;lb()||(Mt(!1),t.textContent="",t.append(O_("")));try{e()}finally{r&&(xe?I(t):(Mt(!0),bt(t)))}}function Ca(t,e,r=e){var n=new WeakSet;ya(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Fc(t)?Rc(s):s,r(s),Ze!==null&&n.add(Ze),await xh(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var c=t.value.length;o===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(xe&&t.defaultValue!==t.value||Ge(e)==null&&t.value)&&(r(Fc(t)?Rc(t.value):t.value),Ze!==null&&n.add(Ze)),es(()=>{var i=e();if(t===document.activeElement){var s=ma??Ze;if(n.has(s))return}Fc(t)&&i===Rc(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}const Nc=new Set;function ub(t,e,r,n,i=n){var s=r.getAttribute("type")==="checkbox",o=t;let a=!1;if(e!==null)for(var l of e)o=o[l]??=[];o.push(r),ya(r,"change",()=>{var c=r.__value;s&&(c=Zh(o,c,r.checked)),i(c)},()=>i(s?[]:null)),es(()=>{var c=n();if(xe&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Xf(r.__value,c)}),_a(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Nc.has(o)||(Nc.add(o),lr(()=>{o.sort((c,u)=>c.compareDocumentPosition(u)===4?-1:1),Nc.delete(o)})),lr(()=>{if(a){var c;if(s)c=Zh(o,c,r.checked);else{var u=o.find(d=>d.checked);c=u?.__value}i(c)}})}function db(t,e,r=e){ya(t,"change",n=>{var i=n?t.defaultChecked:t.checked;r(i)}),(xe&&t.defaultChecked!==t.checked||Ge(e)==null)&&r(t.checked),es(()=>{var n=e();t.checked=!!n})}function Zh(t,e,r){for(var n=new Set,i=0;i<t.length;i+=1)t[i].checked&&n.add(t[i].__value);return r||n.delete(e),Array.from(n)}function Fc(t){var e=t.type;return e==="number"||e==="range"}function Rc(t){return t===""?null:+t}function Vh(t,e){return t===e||t?.[qr]===e}function Uh(t={},e,r,n){return wa(()=>{var i,s;return es(()=>{i=s,s=[],Ge(()=>{t!==r(...s)&&(e(t,...s),i&&Vh(r(...i),t)&&e(null,...i))})}),()=>{lr(()=>{s&&Vh(r(...s),t)&&e(null,...s)})}}),t}function Lc(t=!1){const e=rt,r=e.l.u;if(!r)return;let n=()=>L_(e.s);if(t){let i=0,s={};const o=js(()=>{let a=!1;const l=e.s;for(const c in l)l[c]!==s[c]&&(s[c]=l[c],a=!0);return a&&i++,i});n=()=>h(o)}r.b.length&&bc(()=>{Bh(e,n),rc(r.b)}),_e(()=>{const i=Ge(()=>r.m.map(Jy));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&_e(()=>{Bh(e,n),rc(r.a)})}function Bh(t,e){if(t.l.s)for(const r of t.l.s)h(r);e()}let Oa=!1;function fb(t){var e=Oa;try{return Oa=!1,[t(),Oa]}finally{Oa=e}}const hb={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Je(t,e,r){return new Proxy({props:t,exclude:e},hb)}const pb={get(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(t,e,r){let n=t.props.length;for(;n--;){let i=t.props[n];zs(i)&&(i=i());const s=hn(i,e);if(s&&s.set)return s.set(r),!0}return!1},getOwnPropertyDescriptor(t,e){let r=t.props.length;for(;r--;){let n=t.props[r];if(zs(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=hn(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===qr||e===ac)return!1;for(let r of t.props)if(zs(r)&&(r=r()),r!=null&&e in r)return!0;return!1},ownKeys(t){const e=[];for(let r of t.props)if(zs(r)&&(r=r()),!!r){for(const n in r)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(r))e.includes(n)||e.push(n)}return e}};function Qn(...t){return new Proxy({props:t},pb)}function _(t,e,r,n){var i=!Yi||(r&Uy)!==0,s=(r&jy)!==0,o=(r&qy)!==0,a=n,l=!0,c=()=>(l&&(l=!1,a=o?Ge(n):n),a),u;if(s){var d=qr in t||ac in t;u=hn(t,e)?.set??(d&&e in t?D=>t[e]=D:void 0)}var f,p=!1;s?[f,p]=fb(()=>t[e]):f=t[e],f===void 0&&n!==void 0&&(f=c(),u&&(i&&s_(),u(f)));var v;if(i?v=()=>{var D=t[e];return D===void 0?c():(l=!0,D)}:v=()=>{var D=t[e];return D!==void 0&&(a=void 0),D===void 0?a:D},i&&(r&By)===0)return v;if(u){var g=t.$$legacy;return(function(D,T){return arguments.length>0?((!i||!T||g||p)&&u(T?v():D),D):v()})}var m=!1,b=((r&Vy)!==0?js:pc)(()=>(m=!1,v()));s&&h(b);var k=$e;return(function(D,T){if(arguments.length>0){const P=T?h(b):i&&s?Be(D):D;return M(b,P),m=!0,a!==void 0&&(a=P),D}return Yn&&m||(k.f&gn)!==0?b.v:h(b)})}function mb(t){return new gb(t)}class gb{#e;#t;constructor(e){var r=new Map,n=(s,o)=>{var a=Yf(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,o){return h(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===ac?!0:(h(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return M(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(e.hydrate?W_:Dh)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||aa(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{H_(this.#t)}}$set(e){this.#t.$set(e)}$on(e,r){this.#e[e]=this.#e[e]||[];const n=(...i)=>r.call(this,...i);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let jh;typeof HTMLElement=="function"&&(jh=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(t,e,r){super(),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),w(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=vb(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Da(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=mb({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=ba(()=>{es(()=>{this.$$r=!0;for(const n of oa(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Da(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Da(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return oa(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Da(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function vb(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ne(t,e,r,n,i,s){let o=class extends jh{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return oa(e).map(a=>(e[a].attribute||a).toLowerCase())}};return oa(e).forEach(a=>{aa(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Da(a,l,e),this.$$d[a]=l;var c=this.$$c;if(c){var u=hn(c,a)?.get;u?c[a]=l:c.$set({[a]:l})}}})}),n.forEach(a=>{aa(o.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=o,o}const qh={account:()=>"/#/user/account",annualTickets:()=>"/#/tickets/annual",checkoutFailure:t=>`/#/checkout/failure?payment_error=${t}`,checkoutSuccess:t=>`/#/checkout/success?ORDERID=${t}`,checkoutForm:()=>"/#/checkout",coupons:()=>"/#/coupons",combiTickets:()=>"/#/tickets/combi",combiTicketGroup:t=>"/#/tickets/combi?group="+t,dayTickets:()=>"/#/tickets/day",eventGroup:bb,event:t=>"/#/product/event/"+t,events:()=>"/#/products/events",exhibition:t=>"/#/exhibition/"+t,exhibitions:()=>"/#/exhibitions",home:()=>"/#/start",login:()=>"/#/login",merchandise:t=>"/#/merchandise/detail/"+t,merchandises:()=>"/#/merchandise/list",museum:t=>"/#/museum/"+t,museums:()=>"/#/museums",publicTours:()=>"/#/products/public-tours",register:()=>"/#/registration",tickets:()=>"/#/tickets/filters",ticketGroup:t=>"/#/tickets/filters?group="+t,tour:t=>"/#/product/tour/"+t,tours:()=>"/#/products/tours",toursGroup:wb,cart:()=>"/#/cart",annualTicketPersonalizationForm:(t,e)=>`/#/tickets/annual/personalisation/${t}/${e}`,annualTicketPersonalizationList:t=>`/#/tickets/annual/personalisation/${t}`,annualTicketPersonalizationFormSubmit:t=>`/#/tickets/annual/personalisation/${t}`},yb={...qh,checkoutSuccess:t=>`/checkout/success/?token=${t}`,checkoutFailure:t=>`/checkout/failure?error=${t}`};function _b(t){return t==="angular"?qh:yb}function bb(t){return`/#/products/events?category_id=${(S.settings?.multipleEventsMenuItems.event_groups[t]||[]).join("&category_id=")}`}function wb(t){return`/#/products/tours?category_id=${(S.settings?.multipleToursMenuItems.tour_groups[t]||[]).join("&category_id=")}`}function kb(t){return new Promise(e=>setTimeout(e,t))}function Wh(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function Sb(t){return typeof t=="boolean"}function zc(t,e=1e3){return new Promise((r,n)=>{const i=Date.now(),s=20,o=()=>{try{const a=t();if(a){r(a);return}if(Date.now()-i>=e){n(new Error("Timeout reached without truthy value"));return}setTimeout(o,s)}catch(a){n(a)}};o()})}const Zc=Array.isArray,Hh=t=>!!t&&t.constructor===Object,xb=t=>typeof t=="string"||t instanceof String,Eb=t=>{try{return Number(t)===t}catch{return!1}},Tb=(t,e)=>t.reduce((r,n)=>{const i=e(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Kh=(t,e)=>!t||(t.length??0)===0?null:t.reduce(e);function Ti(t,e){return(t||[]).reduce((r,n)=>r+(e?e(n):n),0)}const Ab=(t,e,r=!1)=>{if(!t)return[];const n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function Cb(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)>r(i)?n:i)}function Vc(t,e){const r=e??(n=>n);return Kh(t,(n,i)=>r(n)<r(i)?n:i)}const Ob=(t,e)=>{const r=t.reduce((n,i)=>{const s=i;return n[s]||(n[s]=i),n},{});return Object.values(r)},Gh=(t,e,r)=>{let n=r;for(let i=1;i<=t;i++)n=e(n,i);return n},Db=(t,e)=>t?!e||e.length===0?t:e.reduce((r,n)=>(delete r[n],r),{...t}):{},dr=(t,e)=>!t||!e?t??e??{}:Object.entries({...t,...e}).reduce((r,[n,i])=>({...r,[n]:Hh(t[n])?dr(t[n],i):i}),{});class Yh{#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&&Wh(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Wh(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 r=JSON.parse(e);if(!(Hh(r)&&"uid"in r&&"client"in r&&"accessToken"in r&&"expiry"in r))throw new Error(`(Auth.loadFromString) invalid auth json ${e}`);this.signIn(r)}}class Ib{constructor(e){this.auth=e}onRequest({request:e}){const{uid:r,client:n,accessToken:i,expiry:s}=this.auth.data,o=e.headers;r&&!o.has("uid")&&o.set("uid",r),n&&!o.has("client")&&o.set("client",n),i&&!o.has("access-token")&&o.set("access-token",i),s&&!o.has("expiry")&&o.set("expiry",String(s)),i&&!o.has("token-type")&&o.set("token-type","Bearer")}onResponse({response:e}){const r=e.headers.get("access-token"),n=e.headers.get("client"),i=e.headers.get("uid"),s=parseInt(e.headers.get("expiry")||"");return r&&n&&i&&s&&this.auth.signIn({uid:i,client:n,accessToken:r,expiry:s}),e}}var Ne;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Ne||(Ne={}));var Uc;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Uc||(Uc={}));const he=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xn=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},ie=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pb=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class fr extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),n}static assert(e){if(!(e instanceof fr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}fr.create=t=>new fr(t);const rs=(t,e)=>{let r;switch(t.code){case ie.invalid_type:t.received===he.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ne.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(t.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(t.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ne.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ie.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ie.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ne.assertNever(t)}return{message:r}};let Jh=rs;function Mb(t){Jh=t}function Ia(){return Jh}const Pa=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},$b=[];function fe(t,e){const r=Ia(),n=Pa({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===rs?void 0:rs].filter(i=>!!i)});t.common.issues.push(n)}class Ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return Ee;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r){const s=await i.key,o=await i.value;n.push({key:s,value:o})}return Ct.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Ee;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const Ee=Object.freeze({status:"aborted"}),ns=t=>({status:"dirty",value:t}),Nt=t=>({status:"valid",value:t}),Bc=t=>t.status==="aborted",jc=t=>t.status==="dirty",eo=t=>t.status==="valid",to=t=>typeof Promise<"u"&&t instanceof Promise;function Ma(t,e,r,n){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Qh(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}typeof SuppressedError=="function"&&SuppressedError;var ve;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ve||(ve={}));var ro,no;class Jr{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xh=(t,e)=>{if(eo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new fr(t.common.issues);return this._error=r,this._error}}};function Ce(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var l,c;const{message:u}=t;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}},description:i}}let De=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Xn(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:Xn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(to(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Xh(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xn(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(to(i)?i:Promise.resolve(i));return Xh(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:ie.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Mr({schema:this,typeName:Se.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Xr.create(this,this._def)}nullable(){return ni.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oi.create(this,this._def)}promise(){return ls.create(this,this._def)}or(e){return ao.create([this,e],this._def)}and(e){return lo.create(this,e,this._def)}transform(e){return new Mr({...Ce(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new po({...Ce(this._def),innerType:this,defaultValue:r,typeName:Se.ZodDefault})}brand(){return new Hc({typeName:Se.ZodBranded,type:this,...Ce(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new mo({...Ce(this._def),innerType:this,catchValue:r,typeName:Se.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return go.create(this,e)}readonly(){return vo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Nb=/^c[^\s-]{8,}$/i,Fb=/^[0-9a-z]+$/,Rb=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lb=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zb=/^[a-z0-9_-]{21}$/i,Zb=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ub="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qc;const Bb=/^(?:(?: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])$/,jb=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qb=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ep="((\\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])))",Wb=new RegExp(`^${ep}$`);function tp(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Hb(t){return new RegExp(`^${tp(t)}$`)}function rp(t){let e=`${ep}T${tp(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Kb(t,e){return!!((e==="v4"||!e)&&Bb.test(t)||(e==="v6"||!e)&&jb.test(t))}let is=class ra extends De{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==he.string){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.string,received:s.parsedType}),Ee}const n=new Ct;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?fe(i,{code:ie.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&fe(i,{code:ie.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Vb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")qc||(qc=new RegExp(Ub,"u")),qc.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Lb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Nb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Fb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Rb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:ie.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:ie.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:ie.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?rp(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Wb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Hb(s).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Zb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Kb(e.data,s.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:ie.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?qb.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:ie.invalid_string,message:s.message}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ie.invalid_string,...ve.errToObj(n)})}_addCheck(e){return new ra({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ve.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ve.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ve.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ve.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ve.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ve.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ve.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ve.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ve.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ve.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...ve.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ve.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ve.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ve.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ve.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ve.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ve.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ve.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ve.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ve.errToObj(r)})}nonempty(e){return this.min(1,ve.errToObj(e))}trim(){return new ra({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ra({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};is.create=t=>{var e;return new is({checks:[],typeName:Se.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function Gb(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class ei extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==he.number){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.number,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="int"?Ne.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Gb(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_finite,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ei({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ve.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ve.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ve.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ve.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ei.create=t=>new ei({checks:[],typeName:Se.ZodNumber,coerce:t?.coerce||!1,...Ce(t)});class ti extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==he.bigint){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.bigint,received:s.parsedType}),Ee}let n;const i=new Ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),fe(n,{code:ie.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Ne.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ve.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ve.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ve.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ve.toString(r))}setLimit(e,r,n,i){return new ti({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ve.toString(i)}]})}_addCheck(e){return new ti({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ve.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ve.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ti.create=t=>{var e;return new ti({checks:[],typeName:Se.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class io extends De{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==he.boolean){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.boolean,received:n.parsedType}),Ee}return Nt(e.data)}}io.create=t=>new io({typeName:Se.ZodBoolean,coerce:t?.coerce||!1,...Ce(t)});class Ai extends De{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==he.date){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_type,expected:he.date,received:s.parsedType}),Ee}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return fe(s,{code:ie.invalid_date}),Ee}const n=new Ct;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ne.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ai({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ve.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ve.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Ai.create=t=>new Ai({checks:[],coerce:t?.coerce||!1,typeName:Se.ZodDate,...Ce(t)});class $a extends De{_parse(e){if(this._getType(e)!==he.symbol){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.symbol,received:n.parsedType}),Ee}return Nt(e.data)}}$a.create=t=>new $a({typeName:Se.ZodSymbol,...Ce(t)});class so extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.undefined,received:n.parsedType}),Ee}return Nt(e.data)}}so.create=t=>new so({typeName:Se.ZodUndefined,...Ce(t)});class oo extends De{_parse(e){if(this._getType(e)!==he.null){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.null,received:n.parsedType}),Ee}return Nt(e.data)}}oo.create=t=>new oo({typeName:Se.ZodNull,...Ce(t)});class ss extends De{constructor(){super(...arguments),this._any=!0}_parse(e){return Nt(e.data)}}ss.create=t=>new ss({typeName:Se.ZodAny,...Ce(t)});class Ci extends De{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Nt(e.data)}}Ci.create=t=>new Ci({typeName:Se.ZodUnknown,...Ce(t)});class xn extends De{_parse(e){const r=this._getOrReturnCtx(e);return fe(r,{code:ie.invalid_type,expected:he.never,received:r.parsedType}),Ee}}xn.create=t=>new xn({typeName:Se.ZodNever,...Ce(t)});class Na extends De{_parse(e){if(this._getType(e)!==he.undefined){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.void,received:n.parsedType}),Ee}return Nt(e.data)}}Na.create=t=>new Na({typeName:Se.ZodVoid,...Ce(t)});let Oi=class Xl extends De{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==he.array)return fe(r,{code:ie.invalid_type,expected:he.array,received:r.parsedType}),Ee;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(fe(r,{code:o?ie.too_big:ie.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(fe(r,{code:ie.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(fe(r,{code:ie.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new Jr(r,o,r.path,a)))).then(o=>Ct.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new Jr(r,o,r.path,a)));return Ct.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Xl({...this._def,minLength:{value:e,message:ve.toString(r)}})}max(e,r){return new Xl({...this._def,maxLength:{value:e,message:ve.toString(r)}})}length(e,r){return new Xl({...this._def,exactLength:{value:e,message:ve.toString(r)}})}nonempty(e){return this.min(1,e)}};Oi.create=(t,e)=>new Oi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Ce(e)});function os(t){if(t instanceof ot){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Xr.create(os(n))}return new ot({...t._def,shape:()=>e})}else return t instanceof Oi?new Oi({...t._def,type:os(t.element)}):t instanceof Xr?Xr.create(os(t.unwrap())):t instanceof ni?ni.create(os(t.unwrap())):t instanceof Qr?Qr.create(t.items.map(e=>os(e))):t}class ot extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ne.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==he.object){const c=this._getOrReturnCtx(e);return fe(c,{code:ie.invalid_type,expected:he.object,received:c.parsedType}),Ee}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xn&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jr(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof xn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")a.length>0&&(fe(i,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Ct.mergeObjectSync(n,c)):Ct.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return ve.errToObj,new ot({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ve.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ot({...this._def,unknownKeys:"strip"})}passthrough(){return new ot({...this._def,unknownKeys:"passthrough"})}extend(e){return new ot({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ot({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Se.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new ot({...this._def,catchall:e})}pick(e){const r={};return Ne.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}omit(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new ot({...this._def,shape:()=>r})}deepPartial(){return os(this)}partial(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new ot({...this._def,shape:()=>r})}required(e){const r={};return Ne.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Xr;)s=s._def.innerType;r[n]=s}}),new ot({...this._def,shape:()=>r})}keyof(){return np(Ne.objectKeys(this.shape))}}ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)}),ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:xn.create(),typeName:Se.ZodObject,...Ce(e)});let ao=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new fr(a.ctx.common.issues));return fe(r,{code:ie.invalid_union,unionErrors:o}),Ee}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new fr(l));return fe(r,{code:ie.invalid_union,unionErrors:a}),Ee}}get options(){return this._def.options}};ao.create=(t,e)=>new ao({options:t,typeName:Se.ZodUnion,...Ce(e)});const En=t=>t instanceof uo?En(t.schema):t instanceof Mr?En(t.innerType()):t instanceof fo?[t.value]:t instanceof ri?t.options:t instanceof ho?Ne.objectValues(t.enum):t instanceof po?En(t._def.innerType):t instanceof so?[void 0]:t instanceof oo?[null]:t instanceof Xr?[void 0,...En(t.unwrap())]:t instanceof ni?[null,...En(t.unwrap())]:t instanceof Hc||t instanceof vo?En(t.unwrap()):t instanceof mo?En(t._def.innerType):[];class Fa extends De{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.object)return fe(r,{code:ie.invalid_type,expected:he.object,received:r.parsedType}),Ee;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(fe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=En(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Fa({typeName:Se.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ce(n)})}}function Wc(t,e){const r=Xn(t),n=Xn(e);if(t===e)return{valid:!0,data:t};if(r===he.object&&n===he.object){const i=Ne.objectKeys(e),s=Ne.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const l=Wc(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===he.array&&n===he.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],l=Wc(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===he.date&&n===he.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let lo=class extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Bc(s)||Bc(o))return Ee;const a=Wc(s.value,o.value);return a.valid?((jc(s)||jc(o))&&r.dirty(),{status:r.value,value:a.data}):(fe(n,{code:ie.invalid_intersection_types}),Ee)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lo.create=(t,e,r)=>new lo({left:t,right:e,typeName:Se.ZodIntersection,...Ce(r)});class Qr extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.array)return fe(n,{code:ie.invalid_type,expected:he.array,received:n.parsedType}),Ee;if(n.data.length<this._def.items.length)return fe(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&n.data.length>this._def.items.length&&(fe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Jr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>Ct.mergeArray(r,o)):Ct.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Qr({...this._def,rest:e})}}Qr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qr({items:t,typeName:Se.ZodTuple,rest:null,...Ce(e)})};class co extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.object)return fe(n,{code:ie.invalid_type,expected:he.object,received:n.parsedType}),Ee;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Jr(n,a,n.path,a)),value:o._parse(new Jr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ct.mergeObjectAsync(r,i):Ct.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof De?new co({keyType:e,valueType:r,typeName:Se.ZodRecord,...Ce(n)}):new co({keyType:is.create(),valueType:e,typeName:Se.ZodRecord,...Ce(r)})}}class Ra extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.map)return fe(n,{code:ie.invalid_type,expected:he.map,received:n.parsedType}),Ee;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:i._parse(new Jr(n,a,n.path,[c,"key"])),value:s._parse(new Jr(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}Ra.create=(t,e,r)=>new Ra({valueType:e,keyType:t,typeName:Se.ZodMap,...Ce(r)});class Di extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.set)return fe(n,{code:ie.invalid_type,expected:he.set,received:n.parsedType}),Ee;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(fe(n,{code:ie.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(fe(n,{code:ie.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>s._parse(new Jr(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Di({...this._def,minSize:{value:e,message:ve.toString(r)}})}max(e,r){return new Di({...this._def,maxSize:{value:e,message:ve.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Di.create=(t,e)=>new Di({valueType:t,minSize:null,maxSize:null,typeName:Se.ZodSet,...Ce(e)});class as extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.function)return fe(r,{code:ie.invalid_type,expected:he.function,received:r.parsedType}),Ee;function n(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function i(a,l){return Pa({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ia(),rs].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ls){const a=this;return Nt(async function(...l){const c=new fr([]),u=await a._def.args.parseAsync(l,s).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{const a=this;return Nt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new fr([n(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new fr([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new as({...this._def,args:Qr.create(e).rest(Ci.create())})}returns(e){return new as({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new as({args:e||Qr.create([]).rest(Ci.create()),returns:r||Ci.create(),typeName:Se.ZodFunction,...Ce(n)})}}class uo extends De{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}uo.create=(t,e)=>new uo({getter:t,typeName:Se.ZodLazy,...Ce(e)});class fo extends De{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return fe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:e.data}}get value(){return this._def.value}}fo.create=(t,e)=>new fo({value:t,typeName:Se.ZodLiteral,...Ce(e)});function np(t,e){return new ri({values:t,typeName:Se.ZodEnum,...Ce(e)})}class ri extends De{constructor(){super(...arguments),ro.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{expected:Ne.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,ro)||Qh(this,ro,new Set(this._def.values)),!Ma(this,ro).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return fe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Ee}return Nt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return ri.create(e,{...this._def,...r})}exclude(e,r=this._def){return ri.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}ro=new WeakMap,ri.create=np;class ho extends De{constructor(){super(...arguments),no.set(this,void 0)}_parse(e){const r=Ne.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==he.string&&n.parsedType!==he.number){const i=Ne.objectValues(r);return fe(n,{expected:Ne.joinValues(i),received:n.parsedType,code:ie.invalid_type}),Ee}if(Ma(this,no)||Qh(this,no,new Set(Ne.getValidEnumValues(this._def.values))),!Ma(this,no).has(e.data)){const i=Ne.objectValues(r);return fe(n,{received:n.data,code:ie.invalid_enum_value,options:i}),Ee}return Nt(e.data)}get enum(){return this._def.values}}no=new WeakMap,ho.create=(t,e)=>new ho({values:t,typeName:Se.ZodNativeEnum,...Ce(e)});class ls extends De{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.promise&&r.common.async===!1)return fe(r,{code:ie.invalid_type,expected:he.promise,received:r.parsedType}),Ee;const n=r.parsedType===he.promise?r.data:Promise.resolve(r.data);return Nt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ls.create=(t,e)=>new ls({type:t,typeName:Se.ZodPromise,...Ce(e)});class Mr extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{fe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Ee:l.status==="dirty"||r.value==="dirty"?ns(l.value):l});{if(r.value==="aborted")return Ee;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Ee:a.status==="dirty"||r.value==="dirty"?ns(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Ee:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!eo(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>eo(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);Ne.assertNever(i)}}Mr.create=(t,e,r)=>new Mr({schema:t,typeName:Se.ZodEffects,effect:e,...Ce(r)}),Mr.createWithPreprocess=(t,e,r)=>new Mr({schema:e,effect:{type:"preprocess",transform:t},typeName:Se.ZodEffects,...Ce(r)});let Xr=class extends De{_parse(e){return this._getType(e)===he.undefined?Nt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Xr.create=(t,e)=>new Xr({innerType:t,typeName:Se.ZodOptional,...Ce(e)});let ni=class extends De{_parse(e){return this._getType(e)===he.null?Nt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ni.create=(t,e)=>new ni({innerType:t,typeName:Se.ZodNullable,...Ce(e)});let po=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===he.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};po.create=(t,e)=>new po({innerType:t,typeName:Se.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});let mo=class extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return to(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:Se.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class La extends De{_parse(e){if(this._getType(e)!==he.nan){const n=this._getOrReturnCtx(e);return fe(n,{code:ie.invalid_type,expected:he.nan,received:n.parsedType}),Ee}return{status:"valid",value:e.data}}}La.create=t=>new La({typeName:Se.ZodNaN,...Ce(t)});const Yb=Symbol("zod_brand");class Hc extends De{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class go extends De{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ee:s.status==="dirty"?(r.dirty(),ns(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ee:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new go({in:e,out:r,typeName:Se.ZodPipeline})}}let vo=class extends De{_parse(e){const r=this._def.innerType._parse(e),n=i=>(eo(i)&&(i.value=Object.freeze(i.value)),i);return to(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};vo.create=(t,e)=>new vo({innerType:t,typeName:Se.ZodReadonly,...Ce(e)});function ip(t,e={},r){return t?ss.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:l})}}):ss.create()}const Jb={object:ot.lazycreate};var Se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Se||(Se={}));const Qb=(t,e={message:`Input not instance of ${t.name}`})=>ip(r=>r instanceof t,e),sp=is.create,op=ei.create,Xb=La.create,ew=ti.create,ap=io.create,tw=Ai.create,rw=$a.create,nw=so.create,iw=oo.create,sw=ss.create,ow=Ci.create,aw=xn.create,lw=Na.create,cw=Oi.create,uw=ot.create,dw=ot.strictCreate,fw=ao.create,hw=Fa.create,pw=lo.create,mw=Qr.create,gw=co.create,vw=Ra.create,yw=Di.create,_w=as.create,bw=uo.create,ww=fo.create,kw=ri.create,Sw=ho.create,xw=ls.create,lp=Mr.create,Ew=Xr.create,Tw=ni.create,Aw=Mr.createWithPreprocess,Cw=go.create;var St=Object.freeze({__proto__:null,defaultErrorMap:rs,setErrorMap:Mb,getErrorMap:Ia,makeIssue:Pa,EMPTY_PATH:$b,addIssueToContext:fe,ParseStatus:Ct,INVALID:Ee,DIRTY:ns,OK:Nt,isAborted:Bc,isDirty:jc,isValid:eo,isAsync:to,get util(){return Ne},get objectUtil(){return Uc},ZodParsedType:he,getParsedType:Xn,ZodType:De,datetimeRegex:rp,ZodString:is,ZodNumber:ei,ZodBigInt:ti,ZodBoolean:io,ZodDate:Ai,ZodSymbol:$a,ZodUndefined:so,ZodNull:oo,ZodAny:ss,ZodUnknown:Ci,ZodNever:xn,ZodVoid:Na,ZodArray:Oi,ZodObject:ot,ZodUnion:ao,ZodDiscriminatedUnion:Fa,ZodIntersection:lo,ZodTuple:Qr,ZodRecord:co,ZodMap:Ra,ZodSet:Di,ZodFunction:as,ZodLazy:uo,ZodLiteral:fo,ZodEnum:ri,ZodNativeEnum:ho,ZodPromise:ls,ZodEffects:Mr,ZodTransformer:Mr,ZodOptional:Xr,ZodNullable:ni,ZodDefault:po,ZodCatch:mo,ZodNaN:La,BRAND:Yb,ZodBranded:Hc,ZodPipeline:go,ZodReadonly:vo,custom:ip,Schema:De,ZodSchema:De,late:Jb,get ZodFirstPartyTypeKind(){return Se},coerce:{string:(t=>is.create({...t,coerce:!0})),number:(t=>ei.create({...t,coerce:!0})),boolean:(t=>io.create({...t,coerce:!0})),bigint:(t=>ti.create({...t,coerce:!0})),date:(t=>Ai.create({...t,coerce:!0}))},any:sw,array:cw,bigint:ew,boolean:ap,date:tw,discriminatedUnion:hw,effect:lp,enum:kw,function:_w,instanceof:Qb,intersection:pw,lazy:bw,literal:ww,map:vw,nan:Xb,nativeEnum:Sw,never:aw,null:iw,nullable:Tw,number:op,object:uw,oboolean:()=>ap().optional(),onumber:()=>op().optional(),optional:Ew,ostring:()=>sp().optional(),pipeline:Cw,preprocess:Aw,promise:xw,record:gw,set:yw,strictObject:dw,string:sp,symbol:rw,transformer:lp,tuple:mw,undefined:nw,union:fw,unknown:ow,void:lw,NEVER:Ee,ZodIssueCode:ie,quotelessJson:Pb,ZodError:fr});const Ow=St.object({id:St.number(),customer:St.object({customer_salutation_id:St.number().positive({message:"user.fieldErrors.titleRequire"}),name:St.string().min(1,{message:"user.fieldErrors.nameRequire"}),surname:St.string().min(1,{message:"user.fieldErrors.surnameRequire"}),email:St.string().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:St.string().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:St.string().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:St.string().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:St.string().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:St.number().positive().default(60),language_id:St.number().positive({message:"user.fieldErrors.languageRequire"}).default(1)})});St.object({ticket_sale_id:St.number(),start_at:St.string().date(),personalizations:St.array(Ow)});function Kc(t,e){return t-e*Math.floor(t/e)}const cp=1721426;function za(t,e,r,n){e=Gc(t,e);let i=e-1,s=-2;return r<=2?s=0:Za(e)&&(s=-1),cp-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Za(t){return t%4===0&&(t%100!==0||t%400===0)}function Gc(t,e){return t==="BC"?1-e:e}function Dw(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Iw={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]};class cs{fromJulianDay(e){let r=e,n=r-cp,i=Math.floor(n/146097),s=Kc(n,146097),o=Math.floor(s/36524),a=Kc(s,36524),l=Math.floor(a/1461),c=Kc(a,1461),u=Math.floor(c/365),d=i*400+o*100+l*4+u+(o!==4&&u!==4?1:0),[f,p]=Dw(d),v=r-za(f,p,1,1),g=2;r<za(f,p,3,1)?g=0:Za(p)&&(g=1);let m=Math.floor(((v+g)*12+373)/367),b=r-za(f,p,m,1)+1;return new ai(f,p,m,b)}toJulianDay(e){return za(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Iw[Za(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Za(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"}}const Pw={"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 ii(t,e){return e=hr(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Yc(t,e){return e=hr(e,t.calendar),t=Qc(t),e=Qc(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Mw(t,e){return t.isEqual?.(e)??e.isEqual?.(t)??t.identifier===e.identifier}function $w(t,e){return ii(t,Ii(e))}function up(t,e,r){let n=t.calendar.toJulianDay(t),i=zw(e),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function Nw(t){return tn(Date.now(),t)}function Ii(t){return Uw(Nw(t))}function dp(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function fp(t,e){return hp(t)-hp(e)}function hp(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Jc=null,Fw=!1;function Xt(){return Jc==null&&(Jc=new Intl.DateTimeFormat().resolvedOptions().timeZone),Jc}function pp(){return Fw}function Qc(t){return t.subtract({days:t.day-1})}function Rw(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const mp=new Map,Xc=new Map;function Lw(t){if(Intl.Locale){let r=mp.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&mp.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function zw(t){let e=Xc.get(t);if(!e){if(Intl.Locale){let n=new Intl.Locale(t);if("getWeekInfo"in n&&(e=n.getWeekInfo(),e))return Xc.set(t,e),e.firstDay}let r=Lw(t);if(t.includes("-fw-")){let n=t.split("-fw-")[1].split("-")[0];n==="mon"?e={firstDay:1}:n==="tue"?e={firstDay:2}:n==="wed"?e={firstDay:3}:n==="thu"?e={firstDay:4}:n==="fri"?e={firstDay:5}:n==="sat"?e={firstDay:6}:e={firstDay:0}}else t.includes("-ca-iso8601")?e={firstDay:1}:e={firstDay:r&&Pw[r]||0};Xc.set(t,e)}return e.firstDay}function si(t){t=hr(t,new cs);let e=Gc(t.era,t.year);return gp(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function gp(t,e,r,n,i,s,o){let a=new Date;return a.setUTCHours(n,i,s,o),a.setUTCFullYear(t,e-1,r),a.getTime()}function yo(t,e){if(e==="UTC")return 0;if(t>0&&e===Xt()&&!pp())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=yp(t,e);return gp(r,n,i,s,o,a,0)-Math.floor(t/1e3)*1e3}const vp=new Map;function yp(t,e){let r=vp.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),vp.set(e,r));let n=r.formatToParts(new Date(t)),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}}const Va=864e5;function Zw(t,e){let r=si(t),n=r-yo(r-Va,e),i=r-yo(r+Va,e);return _p(t,e,n,i)}function _p(t,e,r,n){return(r===n?[r]:[r,n]).filter(s=>Vw(t,e,s))}function Vw(t,e,r){let n=yp(r,e);return t.year===n.year&&t.month===n.month&&t.day===n.day&&t.hour===n.hour&&t.minute===n.minute&&t.second===n.second}function en(t,e,r="compatible"){let n=oi(t);if(e==="UTC")return si(n);if(e===Xt()&&r==="compatible"&&!pp()){n=hr(n,new cs);let l=new Date,c=Gc(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=si(n),s=yo(i-Va,e),o=yo(i+Va,e),a=_p(n,e,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 bp(t,e,r="compatible"){return new Date(en(t,e,r))}function tn(t,e){let r=yo(t,e),n=new Date(t+r),i=n.getUTCFullYear(),s=n.getUTCMonth()+1,o=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes(),c=n.getUTCSeconds(),u=n.getUTCMilliseconds();return new $r(i<1?"BC":"AD",i<1?-i+1:i,s,o,e,r,a,l,c,u)}function Uw(t){return new ai(t.calendar,t.era,t.year,t.month,t.day)}function oi(t,e){let r=0,n=0,i=0,s=0;if("timeZone"in t)({hour:r,minute:n,second:i,millisecond:s}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:n,second:i,millisecond:s}=e),new An(t.calendar,t.era,t.year,t.month,t.day,r,n,i,s)}function Bw(t){return new cu(t.hour,t.minute,t.second,t.millisecond)}function hr(t,e){if(Mw(t.calendar,e))return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),n=t.copy();return n.calendar=e,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,Pi(n),n}function jw(t,e,r){if(t instanceof $r)return t.timeZone===e?t:wp(t,e);let n=en(t,e,r);return tn(n,e)}function qw(t){let e=si(t)-t.offset;return new Date(e)}function wp(t,e){let r=si(t)-t.offset;return hr(tn(r,e),t.calendar)}const _o=36e5;function Ua(t,e){let r=t.copy(),n="hour"in r?Ep(r,e):0;eu(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,tu(r),kp(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=n,Ww(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 eu(t,e){t.calendar.isInverseEra?.(t)&&(e=-e),t.year+=e}function tu(t){for(;t.month<1;)eu(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,eu(t,1)}function Ww(t){for(;t.day<1;)t.month--,tu(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,tu(t)}function kp(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function Pi(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),kp(t)}function ru(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function Sp(t,e){return Ua(t,ru(e))}function nu(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),Pi(r),r}function bo(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),xp(r),r}function Hw(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ba(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ba(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ba(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ba(t.hour,24),e}function xp(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ba(t,e){let r=t%e;return r<0&&(r+=e),r}function Ep(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,Hw(t)}function Tp(t,e){let r=t.copy();return Ep(r,e),r}function Kw(t,e){return Tp(t,ru(e))}function iu(t,e,r,n){let i=t.copy();switch(e){case"era":{let s=t.calendar.getEras(),o=s.indexOf(t.era);if(o<0)throw new Error("Invalid era: "+t.era);o=Tn(o,r,0,s.length-1,n?.round),i.era=s[o],Pi(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=Tn(t.year,r,-1/0,9999,n?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Tn(t.month,r,1,t.calendar.getMonthsInYear(t),n?.round);break;case"day":i.day=Tn(t.day,r,1,t.calendar.getDaysInMonth(t),n?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),Pi(i),i}function su(t,e,r,n){let i=t.copy();switch(e){case"hour":{let s=t.hour,o=0,a=23;if(n?.hourCycle===12){let l=s>=12;o=l?12:0,a=l?23:11}i.hour=Tn(s,r,o,a,n?.round);break}case"minute":i.minute=Tn(t.minute,r,0,59,n?.round);break;case"second":i.second=Tn(t.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=Tn(t.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Tn(t,e,r,n,i=!1){if(i){t+=Math.sign(e),t<r&&(t=n);let s=Math.abs(e);e>0?t=Math.ceil(t/s)*s:t=Math.floor(t/s)*s,t>n&&(t=r)}else t+=e,t<r?t=n-(r-t-1):t>n&&(t=r+(t-n-1));return t}function Ap(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=Ua(oi(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=en(i,t.timeZone)}else r=si(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let n=tn(r,t.timeZone);return hr(n,t.calendar)}function Gw(t,e){return Ap(t,ru(e))}function Yw(t,e,r,n){switch(e){case"hour":{let i=0,s=23;if(n?.hourCycle===12){let v=t.hour>=12;i=v?12:0,s=v?23:11}let o=oi(t),a=hr(bo(o,{hour:i}),new cs),l=[en(a,t.timeZone,"earlier"),en(a,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===a.day)[0],c=hr(bo(o,{hour:s}),new cs),u=[en(c,t.timeZone,"earlier"),en(c,t.timeZone,"later")].filter(v=>tn(v,t.timeZone).day===c.day).pop(),d=si(t)-t.offset,f=Math.floor(d/_o),p=d%_o;return d=Tn(f,r,Math.floor(l/_o),Math.floor(u/_o),n?.round)*_o+p,hr(tn(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return su(t,e,r,n);case"era":case"year":case"month":case"day":{let i=iu(oi(t),e,r,n),s=en(i,t.timeZone);return hr(tn(s,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function Jw(t,e,r){let n=oi(t),i=bo(nu(n,e),e);if(i.compare(n)===0)return t;let s=en(i,t.timeZone,r);return hr(tn(s,t.timeZone),t.calendar)}const Qw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Xw=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,e0=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,ou=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function ja(t){let e=t.match(Qw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+t);let r=new ai(qe(e[1],0,9999),qe(e[2],1,12),1);return r.day=qe(e[3],1,r.calendar.getDaysInMonth(r)),r}function Cp(t){let e=t.match(Xw);if(!e)throw ou.test(t)?new Error(`Invalid ISO 8601 date time string: ${t}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+t);let r=qe(e[1],-9999,9999),n=r<1?"BC":"AD",i=new An(n,r<1?-r+1:r,qe(e[2],1,12),1,e[4]?qe(e[4],0,23):0,e[5]?qe(e[5],0,59):0,e[6]?qe(e[6],0,59):0,e[7]?qe(e[7],0,1/0)*1e3:0);return i.day=qe(e[3],0,i.calendar.getDaysInMonth(i)),i}function Op(t,e){let r=t.match(e0);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,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);s.day=qe(r[3],0,s.calendar.getDaysInMonth(s));let o=oi(s),a;if(r[8]){let l=qe(r[8],-23,23);if(s.offset=Math.sign(l)*(Math.abs(l)*36e5+qe(r[9]??"0",0,59)*6e4+qe(r[10]??"0",0,59)*1e3),a=si(s)-s.offset,!Zw(o,s.timeZone).includes(a))throw new Error(`Offset ${Pp(s.offset)} is invalid for ${au(s)} in ${s.timeZone}`)}else a=en(oi(o),s.timeZone,e);return tn(a,s.timeZone)}function t0(t,e){let r=t.match(ou);if(!r)throw new Error("Invalid ISO 8601 date time string: "+t);let n=qe(r[1],-9999,9999),i=n<1?"BC":"AD",s=new $r(i,n<1?-n+1:n,qe(r[2],1,12),1,e,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 s.day=qe(r[3],0,s.calendar.getDaysInMonth(s)),r[8]&&(s.offset=qe(r[8],-23,23)*36e5+qe(r[9]??"0",0,59)*6e4),wp(s,e)}function qe(t,e,r){let n=Number(t);if(n<e||n>r)throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);return n}function Dp(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function Ip(t){let e=hr(t,new cs),r;return e.era==="BC"?r=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):r=String(e.year).padStart(4,"0"),`${r}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function au(t){return`${Ip(t)}T${Dp(t)}`}function Pp(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),n=Math.floor(t%36e5/6e4),i=Math.floor(t%36e5%6e4/1e3),s=`${e}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return i!==0&&(s+=`:${String(i).padStart(2,"0")}`),s}function r0(t){return`${au(t)}${Pp(t.offset)}[${t.timeZone}]`}function lu(t){let e=typeof t[0]=="object"?t.shift():new cs,r;if(typeof t[0]=="string")r=t.shift();else{let o=e.getEras();r=o[o.length-1]}let n=t.shift(),i=t.shift(),s=t.shift();return[e,r,n,i,s]}class ai{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Pi(this)}copy(){return this.era?new ai(this.calendar,this.era,this.year,this.month,this.day):new ai(this.calendar,this.year,this.month,this.day)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(this,e)}cycle(e,r,n){return iu(this,e,r,n)}toDate(e){return bp(this,e)}toString(){return Ip(this)}compare(e){return dp(this,e)}}class cu{#e;constructor(e=0,r=0,n=0,i=0){this.hour=e,this.minute=r,this.second=n,this.millisecond=i,xp(this)}copy(){return new cu(this.hour,this.minute,this.second,this.millisecond)}add(e){return Tp(this,e)}subtract(e){return Kw(this,e)}set(e){return bo(this,e)}cycle(e,r,n){return su(this,e,r,n)}toString(){return Dp(this)}compare(e){return fp(this,e)}}class An{#e;constructor(...e){let[r,n,i,s,o]=lu(e);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new An(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new An(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ua(this,e)}subtract(e){return Sp(this,e)}set(e){return nu(bo(this,e),e)}cycle(e,r,n){switch(e){case"era":case"year":case"month":case"day":return iu(this,e,r,n);default:return su(this,e,r,n)}}toDate(e,r){return bp(this,e,r)}toString(){return au(this)}compare(e){let r=dp(this,e);return r===0?fp(this,oi(e)):r}}class $r{#e;constructor(...e){let[r,n,i,s,o]=lu(e),a=e.shift(),l=e.shift();this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,this.timeZone=a,this.offset=l,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pi(this)}copy(){return this.era?new $r(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $r(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ap(this,e)}subtract(e){return Gw(this,e)}set(e,r){return Jw(this,e,r)}cycle(e,r,n){return Yw(this,e,r,n)}toDate(){return qw(this)}toString(){return r0(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-jw(e,this.timeZone).toDate().getTime()}}let uu=new Map;class rn{constructor(e,r={}){this.formatter=Mp(e,r),this.options=r}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),i=this.formatter.formatToParts(r);return[...n.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return s0()&&(this.resolvedHourCycle||(this.resolvedHourCycle=o0(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}}const n0={true:{ja:"h11"},false:{}};function Mp(t,e={}){if(typeof e.hour12=="boolean"&&i0()){e={...e};let i=n0[String(e.hour12)][t.split("-")[0]],s=e.hour12?"h12":"h23";e.hourCycle=i??s,delete e.hour12}let r=t+(e?Object.entries(e).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(uu.has(r))return uu.get(r);let n=new Intl.DateTimeFormat(t,e);return uu.set(r,n),n}let du=null;function i0(){return du==null&&(du=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),du}let fu=null;function s0(){return fu==null&&(fu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),fu}function o0(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=Mp(t,{...e,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 wo(t){return Bw(t0(t,"Europe/Berlin")).toString().slice(0,-3)}function ko(t,e={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return e={...e},new Date(t).toLocaleDateString(r,e)}function qa(t){if(t===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}let a0=1;function $p(t){return t.type==="Ticket"}function Wa(t,e){return{...t,uid:a0++,selectedTime:e?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[t.ticket_type],shop_order:t.shop_order??0}}function li(t,e=""){return Ab(Object.values(t).map(r=>Wa(r,{selectedTime:e})),r=>r.shop_order)}function ci(t,e=""){let r=Object.entries(t);return e!==""&&(r=r.filter(([,n])=>n.total_capacities?.[e]&&n.total_capacities[e]>0)),Object.fromEntries(r)}const l0=function(t,e,r,n){if(t.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!$p(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=t.quotaManager;s.clearPrecart();for(const l of[...n.items,...e.items]){const c=l.product;$p(c)&&s.setPrecartItemQuantity(c.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function So(t){return t.type==="Event"}function c0(t){return So(t)&&t.subtype==="scale"}let u0=1;function d0(t,e,r){const n={type:"Event",id:e,tax_included:!0,...t};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=t.title||"",r.price_description=t.description||""}return{uid:u0++,dateId:e,minAvailableCapacity:0,selectedTime:"",...r,...n,...t,type:"Event",subtype:t.scale_price_id===void 0?"flat":"scale"}}function hu(t,e,r){return d0(t,e,r)}const f0=function(t,e,r,n){if(t.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!So(r.product))throw new Error("(getMaxQuantitySeats) impossible");const s=r.product.dateId,o=t.allSeats[s];if(!o)return console.error("(getMaxQuantity) no seats found for dateId",s),{max:0,min:0,unavailable:!0,bookedOut:!1};const a=Math.min(o.max||100,o.max_per_registration||100,o.available??100),l={max_per_registration:a,available:100,overbook:!1,...o};let c=a;l.overbook&&(c=Math.min(l.max||100,l.max_per_registration||100));const u=n.totalQuantity,d=Ti(e.items.filter(v=>n.items.some(g=>g.uuid===v.uuid)),v=>v.quantity),f=Math.max(c-d-u+r.quantity,0);return{max:f,min:l.min??0,unavailable:l.available===0,bookedOut:f===0}},h0=function(t,e,r,n){if(t.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 p0(t){return{apiData:t,_timeslots:[],addQuotas(n){this._timeslots=[],this.apiData={...this.apiData,...n}},precart:{},clearPrecart(){this.precart={},this._timeslots=[]},setPrecartItemQuantity(n,i){this.precart[n]=i,this._timeslots=[]},getPrecartItemQuantity(n){return this.precart[n]??0},timeslots(){return this._timeslots.length===0&&(this._timeslots=Object.entries(this.apiData).flatMap(([n,i])=>Object.keys(i.capacities).map(s=>{const o=Ti(i.ticket_ids.map(a=>this.getPrecartItemQuantity(a)));return{timeSlot:s,quota:n,capacity:i.capacities[s]-o,tickets:i.ticket_ids,totalCapacity:i.total_capacities[s]}}))),this._timeslots},filterBy({timeslot:n,ticketId:i,date:s}={}){let o=this.timeslots();return i&&(o=o.filter(a=>a.tickets.includes(i))),n&&(o=o.filter(a=>a.timeSlot===n)),s&&(o=o.filter(a=>a.timeSlot.startsWith(s))),o.flatMap(a=>a.tickets.map(l=>({timeslot:n,ticket:l,quota:a.quota,capacity:a.capacity,totalCapacity:a.totalCapacity})))},ticketCapacity(n,i){return(Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.capacity))??0)+this.getPrecartItemQuantity(n)},totalCapacity(n,i){return Vc(this.filterBy({timeslot:i,ticketId:n}).map(o=>o.totalCapacity))??0},timeslotsOn(n){const i=this.timeslots().filter(a=>a.timeSlot.startsWith(n.toString())),s=Tb(i,a=>a.timeSlot);return Object.values(s).map(a=>{const c=Ob(a.flatMap(u=>u.tickets)).map(u=>Vc(a.filter(d=>d.tickets.includes(u)),d=>d.capacity)).filter(u=>u!==null);return Cb(c,u=>u.capacity)??a[0]}).sort((a,l)=>a.timeSlot.localeCompare(l.timeSlot))}}}function m0(t){let e=0;ba(()=>{_e(()=>{if(t.items.length===e)return;const r=t.items.length>e?"go-cart-item-added":"go-cart-item-removed";e=t.items.length,document.dispatchEvent(new CustomEvent(r,{detail:t.items.length}))})})}function xt(t,e){return{...{quantity:0,time:"",...e??{}},type:t.type,product:t,orderAttributes(){const n={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(t.type){case"Ticket":return{...n,time:this.time,quantity:this.quantity};case"Event":switch(t.subtype){case"flat":return{...n,quantity:this.quantity};case"scale":return{...n,quantities:{[t.scale_price_id]:this.quantity}};default:const s=t;throw new Error(`(orderAttributes) Unhandled Event subtype: ${s}`)}default:const i=t;throw new Error(`(orderAttributes) Unhandled product type: ${i}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const n=[];return this.time&&n.push(`time: ${this.time}`),c0(this.product)&&n.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&n.push("discounted"),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 Sr(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 Sr(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return Sr(this.total_price_cents)}}}function g0(t){const e=t.product.type;switch(e){case"Ticket":if(!Np(t))return;const r=Wa(t.product,{selectedTime:t.product.selectedTime});return xt(r,{time:t.time,quantity:t.quantity});case"Event":if(!Np(t))return;const n=hu(t.product,t.id);return xt(n,{time:t.time,quantity:t.quantity});default:const i=e;throw new Error(`Unhandled case: ${i}`)}}function v0(t){let e=[],r=[];try{const n=localStorage.getItem("go-cart");if(!n)return[];const i=JSON.parse(n);if(Array.isArray(i))e=i,r=[];else if(typeof i=="object"&&i!==null)e=i.items||[],r=i.coupons||[];else throw console.dir({parsed:i,content:n}),new Error("go-cart has invalid format");return e.length===0?t.clearItems():t.items=e.map(g0).filter(w0),t.clearCoupons(),r.forEach(s=>t.addCoupon(s)),t.items}catch(n){return console.error(n),localStorage.setItem("go-cart",JSON.stringify({items:[],coupons:[]})),[]}}function y0(t){v0(t);let e=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});localStorage.setItem("go-cart",e),ba(()=>{_e(()=>{const r=JSON.stringify({items:t.items||[],coupons:t.coupons||[]});r!==e&&(e=r,localStorage.setItem("go-cart",r))})})}const _0=t=>{const e=new Date,r=new Date(t);return e<r},b0=t=>ja(t.slice(0,10)).compare(Ii(Xt()))>=0,Np=t=>t.time?t.product.subtype==="day"?b0(t.time):_0(t.time):!0,w0=t=>t!==void 0;let k0=0;function us(t,e=20){const r=Be([]),n=Be([]),s={items:r,coupons:n,paymentModeId:void 0,uid:`cart-${k0++}`,get nonEmptyItems(){return this.items.filter(o=>o.quantity>0)},get totalPriceCents(){return Math.max(0,Ti(this.items,o=>o.total_price_cents))},get totalQuantity(){return Ti(this.items,o=>o.quantity)},toString(){return this.uid+" > ["+this.items.map(o=>o.uuid+":"+o.quantity).join(", ")+"]"},orderData(){return{items:this.items.map(o=>({type:o.type,attributes:o.orderAttributes()})),shipping_address_id:null,comment:null,reference:null,payment_mode_id:this.paymentModeId??S.settings?.defaultPaymentModeId,coupons:this.coupons,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return Sr(this.totalPriceCents)},clearItems(){for(;this.items.length>0;)this.items.pop()},deleteItem(o){for(let a=this.items.length-1;a>=0;a--)this.items[a].uuid===o.uuid&&this.items.splice(a,1)},addItem(o){const a=this.items.find(l=>l.uuid===o.uuid);a?a.quantity+=o.quantity:this.items.push(o)},addItems(o){o.forEach(a=>this.addItem(a))},addCoupon(o){this.coupons.includes(o)||this.coupons.push(o)},removeCoupon(o){const a=this.coupons.indexOf(o);a>-1&&this.coupons.splice(a,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return t&&t.forEach(o=>s.addItem(xt(o))),s}function Sr(t){return t=t??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(t/100)}function S0(){const t=Be(us());return y0(t),m0(t),t}function Ha(){return typeof window<"u"&&typeof localStorage<"u"}function x0(t,e){if(Ha())try{localStorage.setItem(t,JSON.stringify(e))}catch(r){console.warn(`Failed to save to localStorage (${t}):`,r)}}function pu(t){if(!Ha())return null;try{const e=localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Failed to load from localStorage (${t}):`,e),null}}function E0(t){if(Ha())try{localStorage.removeItem(t)}catch(e){console.warn(`Failed to remove from localStorage (${t}):`,e)}}const xo="go-capacity";function Fp(t,e){const r=pu(xo),n={allSeats:{...r?.allSeats||{},...t},allQuotas:{...r?.allQuotas||{},...e}};x0(xo,n)}function Rp(t){const e=pu(xo);if(e){if(e.allSeats)for(const r in e.allSeats){const n=parseInt(r);t.addSeats(n,e.allSeats[n],!1)}e.allQuotas&&t.addQuotas(e.allQuotas,!1)}}function T0(t){Ha()&&window.addEventListener("storage",e=>{if(e.key===xo&&Rp(t),e.key==="go-cart"){const r=pu("go-cart");(!r||!r.items||r.items.length===0)&&E0(xo)}})}function Lp(){const t={allSeats:{},allQuotas:{},quotaManager:p0({}),addQuotas(e,r=!0){this.allQuotas={...this.allQuotas,...e},this.quotaManager.addQuotas(e),r&&Fp(this.allSeats,this.allQuotas)},addSeats(e,r,n=!0){this.allSeats[e]=r,n&&Fp(this.allSeats,this.allQuotas)},capacityPolicy(e){const r=e.product.type;switch(r){case"Ticket":const i=e.product.subtype;switch(i){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:const l=i;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}case"Event":const o=e.product.subtype;switch(o){case"flat":case"scale":return"seats";default:const l=o;throw new Error(`(getMaxAvailability) Unhandled case: ${l}`)}default:const a=r;throw new Error(`(getMaxAvailability) Unhandled case: ${a}`)}},capacity(e,r,n){const i=this.capacityPolicy(r),s={quotas:l0,seats:f0,unlimited:h0}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return Ge(()=>s(this,e,r,n))}};return Rp(t),T0(t),t}function zp(t){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${t}=`);if(r.length===2){const n=r.pop()?.split(";").shift();return n?decodeURIComponent(n):void 0}}class Zp{get isAuthenticated(){return this.isLoggedIn||this.isGuest}}class A0 extends Zp{constructor(){super()}get isLoggedIn(){try{const e=zp("auth_headers");if(!e)return!1;const r=JSON.parse(e),n=Math.floor(Date.now()/1e3);return!r["access-token"]||parseInt(r.expiry,10)<n?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!1}}get isGuest(){if(this.isLoggedIn)return!1;try{const e=zp("auth_headers");if(!e)return!0;const r=JSON.parse(e);return typeof r.uid=="string"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.uid)}catch{return!0}}}class C0 extends Zp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}}const O0=t=>{switch(t){case"angular":return new A0;case"jmb":return new C0;default:let e=t;throw new Error("Unhandled shop type: "+e)}};function D0(t){return t==null||typeof t=="string"&&t.trim()===""}function I0(t,e){const r={};if(!e||e.length===0)return r;for(const n of e)(!(n in t)||D0(t[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function P0(t,e){return I0(t,e)}const M0={withStackTrace:!1},Vp=(t,e,r=M0)=>{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function ds(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}function Up(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mi(t){return this instanceof Mi?(this.v=t,this):new Mi(t)}function $0(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(p){return new Promise(function(v,g){s.push([f,p,v,g])>1||a(f,p)})})}function a(f,p){try{l(n[f](p))}catch(v){d(s[0][3],v)}}function l(f){f.value instanceof Mi?Promise.resolve(f.value.v).then(c,u):d(s[0][2],f)}function c(f){a("next",f)}function u(f){a("throw",f)}function d(f,p){f(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function N0(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Mi(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function F0(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Up=="function"?Up(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[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)}}class Ft{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new On(n));return new Ft(r)}static fromPromise(e,r){const n=e.then(i=>new On(i)).catch(i=>new nn(r(i)));return new Ft(n)}static fromThrowable(e,r){return(...n)=>new Ft(ds(this,void 0,void 0,function*(){try{return new On(yield e(...n))}catch(i){return new nn(r?r(i):i)}}))}static combine(e){return R0(e)}static combineWithAllErrors(e){return L0(e)}map(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?new nn(r.error):new On(yield e(r.value))})))}andThrough(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);const n=yield e(r.value);return n.isErr()?new nn(n.error):new On(r.value)})))}andTee(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){if(r.isErr())return new nn(r.error);try{yield e(r.value)}catch{}return new On(r.value)})))}mapErr(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isOk()?new On(r.value):new nn(yield e(r.error))})))}andThen(e){return new Ft(this._promise.then(r=>{if(r.isErr())return new nn(r.error);const n=e(r.value);return n instanceof Ft?n._promise:n}))}orElse(e){return new Ft(this._promise.then(r=>ds(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new On(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return $0(this,arguments,function*(){return yield Mi(yield Mi(yield*N0(F0(yield Mi(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const mu=t=>new Ft(Promise.resolve(new nn(t))),Bp=t=>{let e=$i([]);for(const r of t)if(r.isErr()){e=Cn(r.error);break}else e.map(n=>n.push(r.value));return e},R0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(Bp),jp=t=>{let e=$i([]);for(const r of t)r.isErr()&&e.isErr()?e.error.push(r.error):r.isErr()&&e.isOk()?e=Cn([r.error]):r.isOk()&&e.isOk()&&e.value.push(r.value);return e},L0=t=>Ft.fromSafePromise(Promise.all(t)).andThen(jp);var gu;(function(t){function e(i,s){return(...o)=>{try{const a=i(...o);return $i(a)}catch(a){return Cn(s?s(a):a)}}}t.fromThrowable=e;function r(i){return Bp(i)}t.combine=r;function n(i){return jp(i)}t.combineWithAllErrors=n})(gu||(gu={}));const $i=t=>new On(t);function Cn(t){return new nn(t)}class On{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return $i(e(this.value))}mapErr(e){return $i(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(r=>this.value)}andTee(e){try{e(this.value)}catch{}return $i(this.value)}orElse(e){return $i(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return Ft.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Vp("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class nn{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Cn(this.error)}mapErr(e){return Cn(e(this.error))}andThrough(e){return Cn(this.error)}andTee(e){return Cn(this.error)}andThen(e){return Cn(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return mu(this.error)}asyncAndThrough(e){return mu(this.error)}asyncMap(e){return mu(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return(function*(){throw yield Cn(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw Vp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}gu.fromThrowable;const z0=/\{[^{}]+\}/g;function Z0(){return Math.random().toString(36).slice(2,11)}function V0(t){let{baseUrl:e="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:i,bodySerializer:s,headers:o,...a}={...t};e=Kp(e);const l=[];async function c(u,d){const{baseUrl:f,fetch:p=n,Request:v=r,headers:g,params:m={},parseAs:b="json",querySerializer:k,bodySerializer:D=s??B0,body:T,...P}=d||{};f&&(e=Kp(f));let A=typeof i=="function"?i:Hp(i);k&&(A=typeof k=="function"?k:Hp({...typeof i=="object"?i:{},...k}));const O=T===void 0?void 0:D(T),F=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...a,...P,body:O,headers:q0(F,o,g,m.header)};let j,G,Z=new r(j0(u,{baseUrl:e,params:m,querySerializer:A}),N);for(const K in P)K in Z||(Z[K]=P[K]);if(l.length){j=Z0(),G=Object.freeze({baseUrl:e,fetch:p,parseAs:b,querySerializer:A,bodySerializer:D});for(const K of l)if(K&&typeof K=="object"&&typeof K.onRequest=="function"){const J=await K.onRequest({request:Z,schemaPath:u,params:m,options:G,id:j});if(J){if(!(J instanceof r))throw new Error("onRequest: must return new Request() when modifying the request");Z=J}}}let ue=await p(Z);if(l.length)for(let K=l.length-1;K>=0;K--){const J=l[K];if(J&&typeof J=="object"&&typeof J.onResponse=="function"){const B=await J.onResponse({request:Z,response:ue,schemaPath:u,params:m,options:G,id:j});if(B){if(!(B instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");ue=B}}}if(ue.status===204||ue.headers.get("Content-Length")==="0")return ue.ok?{data:{},response:ue}:{error:{},response:ue};if(ue.ok)return b==="stream"?{data:ue.body,response:ue}:{data:await ue[b](),response:ue};let me=await ue.text();try{me=JSON.parse(me)}catch{}return{error:me,response:ue}}return{GET(u,d){return c(u,{...d,method:"GET"})},PUT(u,d){return c(u,{...d,method:"PUT"})},POST(u,d){return c(u,{...d,method:"POST"})},DELETE(u,d){return c(u,{...d,method:"DELETE"})},OPTIONS(u,d){return c(u,{...d,method:"OPTIONS"})},HEAD(u,d){return c(u,{...d,method:"HEAD"})},PATCH(u,d){return c(u,{...d,method:"PATCH"})},TRACE(u,d){return c(u,{...d,method:"TRACE"})},use(...u){for(const d of u)if(d){if(typeof d!="object"||!("onRequest"in d||"onResponse"in d))throw new Error("Middleware must be an object with one of `onRequest()` or `onResponse()`");l.push(d)}},eject(...u){for(const d of u){const f=l.indexOf(d);f!==-1&&l.splice(f,1)}}}}function Ka(t,e,r){if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${r?.allowReserved===!0?e:encodeURIComponent(e)}`}function qp(t,e,r){if(!e||typeof e!="object")return"";const n=[],i={simple:",",label:".",matrix:";"}[r.style]||"&";if(r.style!=="deepObject"&&r.explode===!1){for(const a in e)n.push(a,r.allowReserved===!0?e[a]:encodeURIComponent(e[a]));const o=n.join(",");switch(r.style){case"form":return`${t}=${o}`;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return o}}for(const o in e){const a=r.style==="deepObject"?`${t}[${o}]`:o;n.push(Ka(a,e[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function Wp(t,e,r){if(!Array.isArray(e))return"";if(r.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",o=(r.allowReserved===!0?e:e.map(a=>encodeURIComponent(a))).join(s);switch(r.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;default:return`${t}=${o}`}}const n={simple:",",label:".",matrix:";"}[r.style]||"&",i=[];for(const s of e)r.style==="simple"||r.style==="label"?i.push(r.allowReserved===!0?s:encodeURIComponent(s)):i.push(Ka(t,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function Hp(t){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)){n.push(Wp(i,s,{style:"form",explode:!0,...t?.array,allowReserved:t?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(qp(i,s,{style:"deepObject",explode:!0,...t?.object,allowReserved:t?.allowReserved||!1}));continue}n.push(Ka(i,s,t))}}return n.join("&")}}function U0(t,e){let r=t;for(const n of t.match(z0)??[]){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)),!e||e[i]===void 0||e[i]===null)continue;const a=e[i];if(Array.isArray(a)){r=r.replace(n,Wp(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,qp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${Ka(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function B0(t){return t instanceof FormData?t:JSON.stringify(t)}function j0(t,e){let r=`${e.baseUrl}${t}`;e.params?.path&&(r=U0(r,e.params.path));let n=e.querySerializer(e.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(r+=`?${n}`),r}function q0(...t){const e=new Headers;for(const r of t){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)e.delete(i);else if(Array.isArray(s))for(const o of s)e.append(i,o);else s!==void 0&&e.set(i,s)}return e}function Kp(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function W0(t,e){return V0({baseUrl:t,headers:{"X-Shop-Url":e}})}const H0="/api/v4/calendar",K0="/api/v4/tickets/calendar",G0="/api/v4/auth/validate_token",Y0="/api/v4/tickets/list_and_quotas",J0="/api/v4/tickets",Q0="/api/v4/auth/sign_in",X0="/api/v4/auth",ek="/api/v4/orders/withdrawals",Gp={SHOP_GUEST:10,SHOP:20};class tk{constructor(e,r,n,i="angular"){this.type=i,e&&r&&n&&this.load(e,r,n,i)}#e=le(Be({customerSalutations:[],countries:[],locales:[]}));#t={};async load(e,r,n,i="angular"){(e.includes("jmb-staging.gomus.de")||e.includes("jmb.gomus.de"))&&(this.type="jmb"),h(this.#e).urls=_b(this.type),h(this.#e).currentUser=O0(this.type),h(this.#e).apiUrl=e,h(this.#e).shopDomain=r,h(this.#e).locale=n||"de",this.#t={},h(this.#e).client=W0(e,r),h(this.#e).capacityManager=Lp(),h(this.#e).cart=S0(),h(this.#e).auth=new Yh,h(this.#e).client.use(new Ib(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return h(this.#e).capacityManager||(h(this.#e).capacityManager=Lp()),h(this.#e).capacityManager}get cart(){return h(this.#e).cart}get auth(){return h(this.#e).auth||(h(this.#e).auth=new Yh),h(this.#e).auth}get currentUser(){return h(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return h(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,r){return this.translate(e,r)}translate(e,r){if(!this.translations?.[e])return e;let n=this.translations[e];if(r&&n)for(const[i,s]of Object.entries(r))n=n.replace(`{{${i}}}`,s);return n||""}get apiUrl(){return h(this.#e).apiUrl}get shopDomain(){return h(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return h(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return h(this.#e)}validateToken(){return this.fetchAndCache(G0,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache(K0,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(H0,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(Y0,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(J0,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(Q0,{body:e,requiredFields:["email","password"]})}signUp(e,r=!1){const n={addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:r?Gp.SHOP_GUEST:Gp.SHOP};e=dr(n,e);let i=["name","surname","email","email_confirmation","terms"];return r||i.push("password","password_confirmation"),this.apiPost(X0,{body:e,requiredFields:i})}withdrawal(e){const r={...e,order_id:String(e.order_id)};return r.note||delete r.note,this.apiPost(ek,{body:r,requiredFields:["order_id","first_name","last_name","email"],parseAs:"text"})}getDates(e){return this.fetchAndCache("/api/v4/dates",`dates-${JSON.stringify(e)}`,"dates",{query: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 r=JSON.stringify({items:e.items??[],coupons:e.coupons??[]});if(this.#r?.key===r)return this.#r.result;const n=await this.apiPost("/api/v4/cart",{body:e,requiredFields:["items"]});return this.#r={key:r,result:n},n}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,r){return this.apiPost("/api/v4/annual/personalization/finalize",{body:r,params:{query:{token:e}}})}uploadPersonalizationPhoto(e,r,n){const i=new FormData;return i.append("file",n),this.apiUpload("/api/v4/annual/personalizations/{id}/upload",{body:i,params:{path:{id:r},query:{token:e}}})}fetchAndCache(e,r,n,i){if(i??={},i.query??={},i.cache??=1e3,i.path??={},!this.#i())return console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!"),h(this.#e)[r];const s=dr({per_page:1e3},i.query),o=e+JSON.stringify(s),a=!this.#t[o],l=this.#t[o]?.fetchedAt<Date.now()-i.cache*1e3;return(a||l)&&this.apiGet(e,s,i.path).then(c=>{c&&(h(this.#e)[r]=n===""?c:c[n])}),h(this.#e)[r]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}getEvent(e){return this.fetchAndCache(`/api/v4/events/${e}`,`single_event_${e}`,"event")}getTicketCapacities(e,r){return this.apiPost("/api/v4/tickets/capacities",{body:{date:e,ticket_ids:r},requiredFields:["date","ticket_ids"]})}getCouponSaleByBarcode(e){return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${e}`,`coupon_sale_barcode_${e}`,"coupon_sale")}getEventDetailsOnDate(e,r){return this.fetchAndCache(`/api/v4/events/${e}/dates/${r}`,`/api/v4/events/${e}/dates/${r}`,"date")}get events(){return this.fetchAndCache("/api/v4/events","events","events")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return h(this.#e).urls}get#n(){return{params:{query:{locale:this.locale},header:{"X-Shop-Url":this.shopDomain}}}}async apiPost(e,r){return this.apiCall(e,{method:"POST",...r})}async apiPut(e,r){return this.apiCall(e,{method:"PUT",...r})}async apiDELETE(e,r){return this.apiCall(e,{method:"DELETE",...r})}async apiUpload(e,r){this.#s();const{body:n,params:i={}}=r;return await this.client.POST(e,{body:n,params:dr(this.#n,{params:i}).params,bodySerializer:o=>o})}async apiCall(e,r){this.#s();const{body:n,params:i={},requiredFields:s,parseAs:o}=r,a=P0(n,s);if(Object.keys(a).length>0)return{error:{errors:a}};const l=this.client[r.method];return await l(e,{body:n,params:dr(this.#n,{params:i}).params,parseAs:o})}async asyncFetch(e){return await this.waitForAllFetches(e()),e()}async waitForAllFetches(...e){for(;Object.values(this.#t).filter(r=>r.status==="fetching").length;)await kb(10)}async apiGet(e,r={},n){this.#s();const i=e+JSON.stringify(r);this.#t[i]={status:"fetching",fetchedAt:Date.now()};let s=this.#n;r&&(s=dr(s,{params:{query:r}})),e&&(s=dr(s,{params:{path:n}}));const o=await this.client.GET(e,s);return this.#t[i]={status:"completed",fetchedAt:Date.now()},o.data||o}#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.")}}const S=new tk;function fs(t){return function(e,r){if(e)e.addEventListener(t,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.")}}class vu{constructor(e,r,n=1e3){this.host=e,this.KEY=r,this.pollDuration=n}#e=le(Be({value:void 0}));error=!1;static static(e){const r=new vu(null,null);return r.value=e,r}load(){zc(()=>(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 h(this.#e).value}set value(e){h(this.#e).value=e}}function hs(t){return function(e,r={pollDuration:1e3}){if(e){const n=new vu(e,t,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.")}}let rk={urls:{},navigateTo:t=>{window.location.assign(t)},forms:{},fields:{}};class nk{defaultConfig=dr(rk,window.customOptions);override=this.defaultConfig;#e=le(Be({}));get options(){return h(this.#e)}set options(e){M(this.#e,e,!0)}constructor(){this.update()}update(){const e=dr(this.defaultConfig,this.override);e.forms=Object.keys({...this.defaultConfig.forms,...this.override.forms}).reduce((r,n)=>(r[n]={...this.defaultConfig.forms[n],...this.override.forms[n]},r),{}),this.options=e}get config(){return this.options}define(e){return this.override=dr(this.override,e),this.update(),this}default(e){return this.defaultConfig=dr(this.defaultConfig,e),this.update(),this}}const at=new nk;class Yp{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}#t=le();get ticketSaleId(){return h(this.#t)}set ticketSaleId(e){M(this.#t,e,!0)}get order(){return this.token?lc(S.annualOrder(this.token)):void 0}get ticketSale(){if(this.ticketSaleId)return lc(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return at.config.urls.annualTicketPersonalizationForm?at.config.urls.annualTicketPersonalizationForm(this.token,e.id):S.urls.annualTicketPersonalizationForm(this.token,e.id)}}const Jp="go-annual-ticket-personalization",Qp=fs(Jp),ik=hs(Jp);var sk=q("<li><a> </a></li>"),ok=q('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function ak(t,e){te(e,!0);let r=_(e,"token",7);const n=new Yp;Qp(e.$$host,n),_e(()=>{n.token=r()});let i=C(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=H(),a=L(o);{var l=c=>{var u=H(),d=L(u);Ke(d,17,()=>h(i).ticket_sales,f=>f.id,(f,p)=>{var v=ok(),g=$(v),m=$(g,!0);I(g);var b=ee(g,2),k=$(b,!0);I(b);var D=ee(b,2);{var T=P=>{var A=sk(),O=$(A),F=$(O,!0);I(O),I(A),ce((N,j)=>{Te(O,"href",N),se(F,j)},[()=>n.goToPersonalization(h(p)),()=>S.t("ticket.annual.personalization.list.personalize.add")]),w(P,A)};de(D,P=>{h(p).status=="not_ready_to_send"&&P(T)})}I(v),ce(P=>{Te(v,"data-ticket-sale-id",h(p).id),se(m,h(p).title),se(k,P)},[()=>S.t("ticket.annual.personalization.detail.title",{count:h(p).personalizations.length})]),w(f,v)}),w(c,u)};de(a,c=>{h(i)&&c(l)})}return w(t,o),re(s)}customElements.define("go-annual-ticket-personalization",ne(ak,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));function Q(t,e,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(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const c=r?.Parent?new s:this;n(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();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(t)}),Object.defineProperty(o,"name",{value:t}),o}class ps extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const lk={};function Ni(t){return lk}function yu(t,e){return typeof e=="bigint"?e.toString():e}function _u(t){return t==null}function bu(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}const em=Symbol("evaluating");function Ye(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==em)return n===void 0&&(n=em,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ck(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function uk(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function rm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function wu(t){if(rm(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(rm(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nm(t){return wu(t)?{...t}:Array.isArray(t)?[...t]:t}function ku(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dk(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Oe(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ms(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function fk(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ga(t){return typeof t=="string"?t:t?.message}function Fi(t,e,r){const n={...t,path:t.path??[]};if(!t.message){const i=Ga(t.inst?._zod.def?.error?.(t))??Ga(e?.error?.(t))??Ga(r.customError?.(t))??Ga(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Su(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eo(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}const im=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,yu,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},sm=Q("$ZodError",im),om=Q("$ZodError",im,{Parent:Error});function hk(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function pk(t,e=r=>r.message){const r={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(e(s));else{let o=r,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return n(t),r}const xu=t=>(e,r,n,i)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new ps;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Eu=t=>async(e,r,n,i)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Fi(l,s,Ni())));throw tm(a,i?.callee),a}return o.value},Ya=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ps;return s.issues.length?{success:!1,error:new(t??sm)(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},mk=Ya(om),Ja=t=>async(e,r,n)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>Fi(o,i,Ni())))}:{success:!0,data:s.value}},gk=Ja(om),vk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xu(t)(e,r,i)},yk=t=>(e,r,n)=>xu(t)(e,r,n),_k=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Eu(t)(e,r,i)},bk=t=>async(e,r,n)=>Eu(t)(e,r,n),wk=t=>(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ya(t)(e,r,i)},kk=t=>(e,r,n)=>Ya(t)(e,r,n),Sk=t=>async(e,r,n)=>{const i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ja(t)(e,r,i)},xk=t=>async(e,r,n)=>Ja(t)(e,r,n),Ek=/^[cC][^\s-]{8,}$/,Tk=/^[0-9a-z]+$/,Ak=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ck=/^[0-9a-vA-V]{20}$/,Ok=/^[A-Za-z0-9]{27}$/,Dk=/^[a-zA-Z0-9_-]{21}$/,Ik=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pk=/^([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})$/,am=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,Mk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$k="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Nk(){return new RegExp($k,"u")}const Fk=/^(?:(?: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])$/,Rk=/^(([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}|:))$/,Lk=/^((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])$/,zk=/^(([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])$/,Zk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lm=/^[A-Za-z0-9_-]*$/,Vk=/^\+[1-9]\d{6,14}$/,cm="(?:(?:\\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])))",Uk=new RegExp(`^${cm}$`);function um(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Bk(t){return new RegExp(`^${um(t)}$`)}function jk(t){const e=um({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${cm}T(?:${n})$`)}const qk=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Wk=/^[^A-Z]*$/,Hk=/^[^a-z]*$/,sn=Q("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Kk=Q("$ZodCheckMaxLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const o=Su(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Gk=Q("$ZodCheckMinLength",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const o=Su(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Yk=Q("$ZodCheckLengthEquals",(t,e)=>{var r;sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!_u(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const o=Su(i),a=s>e.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Qa=Q("$ZodCheckStringFormat",(t,e)=>{var r,n;sn.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Jk=Q("$ZodCheckRegex",(t,e)=>{Qa.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Qk=Q("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Wk),Qa.init(t,e)}),Xk=Q("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Hk),Qa.init(t,e)}),eS=Q("$ZodCheckIncludes",(t,e)=>{sn.init(t,e);const r=ku(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),tS=Q("$ZodCheckStartsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`^${ku(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),rS=Q("$ZodCheckEndsWith",(t,e)=>{sn.init(t,e);const r=new RegExp(`.*${ku(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}}),nS=Q("$ZodCheckOverwrite",(t,e)=>{sn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),iS={major:4,minor:3,patch:6},Rt=Q("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=iS;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=ms(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&l?.async===!1)throw new ps;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(c||(c=ms(o,f)))});else{if(o.issues.length===f)continue;c||(c=ms(o,f))}}return u?u.then(()=>o):o},s=(o,a,l)=>{if(ms(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new ps;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>s(u,o,a)):s(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new ps;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ye(t,"~standard",()=>({validate:i=>{try{const s=mk(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return gk(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Tu=Q("$ZodString",(t,e)=>{Rt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??qk(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),nt=Q("$ZodStringFormat",(t,e)=>{Qa.init(t,e),Tu.init(t,e)}),sS=Q("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Pk),nt.init(t,e)}),oS=Q("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=am(n))}else e.pattern??(e.pattern=am());nt.init(t,e)}),aS=Q("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Mk),nt.init(t,e)}),lS=Q("$ZodURL",(t,e)=>{nt.init(t,e),t._zod.check=r=>{try{const n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),cS=Q("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Nk()),nt.init(t,e)}),uS=Q("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Dk),nt.init(t,e)}),dS=Q("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Ek),nt.init(t,e)}),fS=Q("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Tk),nt.init(t,e)}),hS=Q("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ak),nt.init(t,e)}),pS=Q("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Ck),nt.init(t,e)}),mS=Q("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ok),nt.init(t,e)}),gS=Q("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=jk(e)),nt.init(t,e)}),vS=Q("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Uk),nt.init(t,e)}),yS=Q("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Bk(e)),nt.init(t,e)}),_S=Q("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ik),nt.init(t,e)}),bS=Q("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Fk),nt.init(t,e),t._zod.bag.format="ipv4"}),wS=Q("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Rk),nt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),kS=Q("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Lk),nt.init(t,e)}),SS=Q("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=zk),nt.init(t,e),t._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:t,continue:!e.abort})}}});function dm(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const xS=Q("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Zk),nt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{dm(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function ES(t){if(!lm.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return dm(r)}const TS=Q("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=lm),nt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{ES(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),AS=Q("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Vk),nt.init(t,e)});function CS(t,e=null){try{const r=t.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||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const OS=Q("$ZodJWT",(t,e)=>{nt.init(t,e),t._zod.check=r=>{CS(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});function fm(t,e,r){t.issues.length&&e.issues.push(...fk(r,t.issues)),e.value[r]=t.value}const DS=Q("$ZodArray",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},n);l instanceof Promise?s.push(l.then(c=>fm(c,r,o))):fm(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function hm(t,e,r,n){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ms(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>Fi(o,n,Ni())))}),e)}const IS=Q("$ZodUnion",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>bu(s.source)).join("|")})$`)}});const r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},s);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>hm(l,i,t,s)):hm(a,i,t,s)}}),PS=Q("$ZodIntersection",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{const i=r.value,s=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,c])=>pm(r,l,c)):pm(r,s,o)}});function Au(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(wu(t)&&wu(e)){const r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(const s of n){const o=Au(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<t.length;n++){const i=t[n],s=e[n],o=Au(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 pm(t,e,r){const n=new Map;let i;for(const a of e.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 t.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 t.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ms(t))return t;const o=Au(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const MS=Q("$ZodTransform",(t,e)=>{Rt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xp(t.constructor.name);const i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new ps;return r.value=i,r}});function mm(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const gm=Q("$ZodOptional",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>mm(s,r.value)):mm(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),$S=Q("$ZodExactOptional",(t,e)=>{gm.init(t,e),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),NS=Q("$ZodNullable",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${bu(r.source)}|null)$`):void 0}),Ye(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),FS=Q("$ZodDefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vm(s,e)):vm(i,e)}});function vm(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const RS=Q("$ZodPrefault",(t,e)=>{Rt.init(t,e),t._zod.optin="optional",Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),LS=Q("$ZodNonOptional",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>ym(s,t)):ym(i,t)}});function ym(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const zS=Q("$ZodCatch",(t,e)=>{Rt.init(t,e),Ye(t._zod,"optin",()=>e.innerType._zod.optin),Ye(t._zod,"optout",()=>e.innerType._zod.optout),Ye(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=e.catchValue({...r,error:{issues:s.issues.map(o=>Fi(o,n,Ni()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(s=>Fi(s,n,Ni()))},input:r.value}),r.issues=[]),r)}}),ZS=Q("$ZodPipe",(t,e)=>{Rt.init(t,e),Ye(t._zod,"values",()=>e.in._zod.values),Ye(t._zod,"optin",()=>e.in._zod.optin),Ye(t._zod,"optout",()=>e.out._zod.optout),Ye(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(r,n);return s instanceof Promise?s.then(o=>Xa(o,e.in,n)):Xa(s,e.in,n)}const i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Xa(s,e.out,n)):Xa(i,e.out,n)}});function Xa(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}const VS=Q("$ZodReadonly",(t,e)=>{Rt.init(t,e),Ye(t._zod,"propValues",()=>e.innerType._zod.propValues),Ye(t._zod,"values",()=>e.innerType._zod.values),Ye(t._zod,"optin",()=>e.innerType?._zod?.optin),Ye(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);const i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(_m):_m(i)}});function _m(t){return t.value=Object.freeze(t.value),t}const US=Q("$ZodCustom",(t,e)=>{sn.init(t,e),Rt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{const n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>bm(s,r,n,t));bm(i,r,n,t)}});function bm(t,e,r,n){if(!t){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),e.issues.push(Eo(i))}}var wm;class BS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){const n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function jS(){return new BS}(wm=globalThis).__zod_globalRegistry??(wm.__zod_globalRegistry=jS());const To=globalThis.__zod_globalRegistry;function qS(t,e){return new t({type:"string",...Oe(e)})}function WS(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Oe(e)})}function km(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(e)})}function HS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(e)})}function KS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(e)})}function GS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(e)})}function YS(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(e)})}function JS(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Oe(e)})}function QS(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(e)})}function XS(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(e)})}function ex(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(e)})}function tx(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(e)})}function rx(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(e)})}function nx(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(e)})}function ix(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(e)})}function sx(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(e)})}function ox(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(e)})}function ax(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(e)})}function lx(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(e)})}function cx(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(e)})}function ux(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(e)})}function dx(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(e)})}function fx(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(e)})}function hx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(e)})}function px(t,e){return new t({type:"string",format:"date",check:"string_format",...Oe(e)})}function mx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Oe(e)})}function gx(t,e){return new t({type:"string",format:"duration",check:"string_format",...Oe(e)})}function Sm(t,e){return new Kk({check:"max_length",...Oe(e),maximum:t})}function el(t,e){return new Gk({check:"min_length",...Oe(e),minimum:t})}function xm(t,e){return new Yk({check:"length_equals",...Oe(e),length:t})}function vx(t,e){return new Jk({check:"string_format",format:"regex",...Oe(e),pattern:t})}function yx(t){return new Qk({check:"string_format",format:"lowercase",...Oe(t)})}function _x(t){return new Xk({check:"string_format",format:"uppercase",...Oe(t)})}function bx(t,e){return new eS({check:"string_format",format:"includes",...Oe(e),includes:t})}function wx(t,e){return new tS({check:"string_format",format:"starts_with",...Oe(e),prefix:t})}function kx(t,e){return new rS({check:"string_format",format:"ends_with",...Oe(e),suffix:t})}function gs(t){return new nS({check:"overwrite",tx:t})}function Sx(t){return gs(e=>e.normalize(t))}function xx(){return gs(t=>t.trim())}function Ex(){return gs(t=>t.toLowerCase())}function Tx(){return gs(t=>t.toUpperCase())}function Ax(){return gs(t=>uk(t))}function Cx(t,e,r){return new t({type:"array",element:e,...Oe(r)})}function Ox(t,e,r){return new t({type:"custom",check:"custom",fn:e,...Oe(r)})}function Dx(t){const e=Ix(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Eo(n,r.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Eo(i))}},t(r.value,r)));return e}function Ix(t,e){const r=new sn({check:"custom",...Oe(e)});return r._zod.check=t,r}function Em(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??To,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Lt(t,e,r={path:[],schemaPath:[]}){var n;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),Lt(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&zt(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Tm(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of t.seen.entries()){const a=t.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=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(v=>v);if(d)return{ref:f(d)};const p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},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 u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
1
+ (function(){typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var Vn={},ot=Symbol("uninitialized"),Ya=Symbol("filename"),yy="http://www.w3.org/1999/xhtml",by="http://www.w3.org/2000/svg",_y="http://www.w3.org/1998/Math/MathML",wy="@attach",co=Array.isArray,ky=Array.prototype.indexOf,fo=Array.prototype.includes,ho=Array.from,po=Object.keys,yn=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,sd=Object.getOwnPropertyDescriptors,od=Object.prototype,Sy=Array.prototype,mo=Object.getPrototypeOf,ad=Object.isExtensible;function as(e){return typeof e=="function"}var Fe=()=>{};function Ey(e){return e()}function Ja(e){for(var t=0;t<e.length;t++)e[t]()}function ld(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}var xy=1<<24,tr=1024,rr=2048,Bn=4096,Xa=8192,Ty=16384,Qa=32768,ud=1<<25,ls=65536,t2=1<<17,r2=1<<18,gi=1<<19,cd=1<<20,us=1<<25,cs=65536,dd=1<<21,Ay=1<<22,vo=1<<23,$r=Symbol("$state"),el=Symbol("legacy props"),Oy=Symbol(""),Cy=Symbol("proxy path"),fd=Symbol("attributes"),tl=Symbol("class"),rl=Symbol("style"),nl=Symbol("text"),ds=Symbol("form reset"),n2=Symbol("hmr anchor"),go=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},fs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Dy(e){throw new Error("https://svelte.dev/e/invariant_violation")}function hd(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Iy(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function i2(){throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function s2(){throw new Error("https://svelte.dev/e/derived_references_self")}function pd(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function o2(e,t,r){throw new Error("https://svelte.dev/e/each_key_volatile")}function Py(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $y(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function My(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Fy(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ny(){throw new Error("https://svelte.dev/e/hydration_failed")}function a2(){throw new Error("https://svelte.dev/e/invalid_snippet")}function Ry(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function l2(e){throw new Error("https://svelte.dev/e/props_rest_readonly")}function u2(e){throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Ly(){throw new Error("https://svelte.dev/e/set_context_after_init")}function zy(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Uy(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Vy(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function By(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var c2="font-weight: bold",d2="font-weight: normal";function f2(e){console.warn("https://svelte.dev/e/await_reactivity_loss")}function h2(e,t){console.warn("https://svelte.dev/e/await_waterfall")}function qy(){console.warn("https://svelte.dev/e/derived_inert")}function jy(e,t,r){console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Zy(e){console.warn("https://svelte.dev/e/hydration_html_changed")}function hs(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function p2(){console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Wy(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function il(e){console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function m2(){console.warn("https://svelte.dev/e/state_proxy_unmount")}function Hy(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var be=!1;function mt(e){be=e}var Te;function dt(e){if(e===null)throw hs(),Vn;return Te=e}function Qr(){return dt(gr(Te))}function P(e){if(be){if(gr(Te)!==null)throw hs(),Vn;Te=e}}function Et(e=1){if(be){for(var t=e,r=Te;t--;)r=gr(r);Te=r}}function ps(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=gr(r);e&&r.remove(),r=i}}function sl(e){if(!e||e.nodeType!==8)throw hs(),Vn;return e.data}function md(e){return e===this.v}function Gy(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vd(e){return!Gy(e,this.v)}var Zt=!1,yi=!1,v2=!1;function Ky(){yi=!0}var g2="font-weight: bold",y2="font-weight: normal";function b2(e){console.warn("https://svelte.dev/e/state_snapshot_uncloneable")}var Yy=[];function ol(e,t=!1,r=!1){return yo(e,new Map,"",Yy,null,r)}function yo(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(co(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]=yo(c,t,r,n,null,s))}return a}if(mo(e)===od){a={},t.set(e,a),i!==null&&t.set(i,a);for(var d of Object.keys(e))a[d]=yo(e[d],t,r,n,null,s);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!s)return yo(e.toJSON(),t,r,n,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var _2=null;function gd(e,t){return e.label=t,Jy(e.v,t),e}function Jy(e,t){return e?.[Cy]?.(t),e}function w2(e){return typeof e=="symbol"?`Symbol(${e.description})`:typeof e=="function"?"<function>":typeof e=="object"&&e?"<object>":String(e)}function k2(e){const t=new Error,r=Xy();return r.length===0?null:(r.unshift(`
2
+ `),yn(t,"stack",{value:r.join(`
3
+ `)}),yn(t,"name",{value:e}),t)}function Xy(){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 S2(e,t){throw new Error("invariant(...) was not guarded by if (DEV)")}var ze=null;function bi(e){ze=e}var Qy=null;function E2(e){Qy=e}var al=null;function x2(e){al=e}function yd(e){return ll("getContext").get(e)}function eb(e,t){const r=ll("setContext");if(Zt){var n=Ee.f;!Ae&&(n&32)!==0&&!ze.i||Ly()}return r.set(e,t),t}function tb(e){return ll("hasContext").has(e)}function ee(e,t=!1,r){ze={p:ze,i:!1,c:null,e:null,s:e,x:null,r:Ee,l:yi&&!t?{s:null,u:null,$:[]}:null}}function te(e){var t=ze,r=t.e;if(r!==null){t.e=null;for(var n of r)qd(n)}return e!==void 0&&(t.x=e),t.i=!0,ze=t.p,e??{}}function ms(){return!yi||ze!==null&&ze.l===null}function ll(e){return ze===null&&hd(e),ze.c??=new Map(rb(ze)||void 0)}function rb(e){let t=e.p;for(;t!==null;){const r=t.c;if(r!==null)return r;t=t.p}return null}var qn=[];function bd(){var e=qn;qn=[],Ja(e)}function nr(e){if(qn.length===0&&!gs){var t=qn;queueMicrotask(()=>{t===qn&&bd()})}qn.push(e)}function nb(){for(;qn.length>0;)bd()}var ib=new WeakMap;function _d(e){var t=Ee;if(t===null)return Ae.f|=vo,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;bn(e,t)}function bn(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 T2(e,t){const r=Pr(e,"message");if(!(r&&!r.configurable)){for(var n=yl?" ":" ",i=`
5
+ ${n}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;s!==null;)i+=`
6
+ ${n}in ${s.function?.[Ya].split("/").pop()}`,s=s.p;return{message:e.message+`
7
+ ${i}
8
+ `,stack:e.stack?.split(`
9
+ `).filter(o=>!o.includes("svelte/src/internal")).join(`
10
+ `)}}}function A2(e){const t=ib.get(e);t&&(yn(e,"message",{value:t.message}),yn(e,"stack",{value:t.stack}))}var sb=~(rr|Bn|tr);function it(e,t){e.f=e.f&sb|t}function ul(e){(e.f&512)!==0||e.deps===null?it(e,tr):it(e,Bn)}function wd(e){if(e!==null)for(const t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=cs,wd(t.deps))}function kd(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),wd(e.deps),it(e,tr)}var ob=!1,bo=!1;function ab(e){var t=bo;try{return bo=!1,[e(),bo]}finally{bo=t}}var _o=null,_i=null,we=null,vs=null,xt=null,cl=null,gs=!1,dl=!1,wi=null,wo=null,Sd=0,O2=new Set,lb=1,ki=class Xc{id=lb++;#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=[];#d=new Set;#c=new Set;#h=new Map;#p=new Set;is_fork=!1;#f=!1;constructor(){_i===null?_o=_i=this:(_i.#r=this,this.#t=_i),_i=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)it(i,rr),r(i);for(i of n.m)it(i,Bn),r(i)}this.#p.add(t)}#v(){this.#e=!0,Sd++>1e3&&(this.#b(),ub());for(const l of this.#d)this.#c.delete(l),it(l,rr),this.schedule(l);for(const l of this.#c)it(l,Bn),this.schedule(l);const t=this.#l;this.#l=[],this.apply();var r=wi=[],n=[],i=wo=[];for(const l of t)try{this.#y(l,r,n)}catch(c){throw Ad(l),this.#m()||this.discard(),c}if(we=null,i.length>0){var s=Xc.ensure();for(const l of i)s.schedule(l)}if(wi=null,wo=null,this.#m()){this.#g(n),this.#g(r);for(const[l,c]of this.#h)Td(l,c);i.length>0&&we.#v();return}const o=this.#w();if(o){this.#g(n),this.#g(r),o.#_(this);return}this.#d.clear(),this.#c.clear();for(const l of this.#n)l(this);this.#n.clear(),vs=this,Ed(n),Ed(r),vs=null,this.#o?.resolve();var a=we;if(this.#s===0&&(this.#l.length===0||a!==null)&&(this.#b(),Zt&&(this.#k(),we=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):Zt&&(s&16777224)!==0?n.push(i):ks(i)&&((s&16)!==0&&this.#c.add(i),Ti(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.#d,t.#c);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.#c.delete(o),it(o,rr),this.schedule(o))}}};for(const n of this.current.keys())r(n);this.oncommit(()=>t.discard()),t.#b(),we=this,this.#v()}#g(t){for(var r=0;r<t.length;r+=1)kd(t[r],this.#d,this.#c)}capture(t,r,n=!1){t.v!==ot&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,n]),xt?.set(t,r)),this.is_fork||(t.v=r)}activate(){we=this}deactivate(){we=null,xt=null}flush(){try{dl=!0,we=this,this.#v()}finally{Sd=0,cl=null,wi=null,wo=null,dl=!1,we=null,xt=null,jn.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=_o;d!==null;d=d.#r){var t=d.id<this.id,r=[];for(const[u,[h,f]]of this.current){if(d.current.has(u)){var n=d.current.get(u)[0];if(t&&h!==n)d.current.set(u,[h,f]);else continue}r.push(u)}if(t)for(const[u,h]of this.async_deriveds){const f=d.async_deriveds.get(u);f&&h.promise.then(f.resolve).catch(f.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,h=>{(h.f&4194320)!==0?d.schedule(h):d.#g([h])});d.activate();var s=new Set,o=new Map;for(var a of r)xd(a,i,s,o);o=new Map;var l=[...d.current].filter(([u,h])=>{const f=this.current.get(u);return f?f[0]!==h[0]||f[1]!==h[1]:!0}).map(([u])=>u);if(l.length>0)for(const u of this.#u)(u.f&155648)===0&&fl(u,l,o)&&((u.f&4194320)!==0?(it(u,rr),d.schedule(u)):d.#d.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.#d.add(n);for(const n of r)this.#c.add(n);t.clear(),r.clear()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#i.add(t)}settled(){return(this.#o??=ld()).promise}static ensure(){if(we===null){const t=we=new Xc;!dl&&!gs&&nr(()=>{t.#e||t.flush()})}return we}apply(){if(!Zt||!this.is_fork&&this.#t===null&&this.#r===null){xt=null;return}xt=new Map;for(const[r,[n]]of this.current)xt.set(r,n);for(let r=_o;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)xt.has(n)||xt.set(n,i)}}schedule(t){if(cl=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(wi!==null&&r===Ee&&(Zt||(Ae===null||(Ae.f&2)===0)&&!ob))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?_o=r:t.#r=r,r===null?_i=t:r.#t=t,this.linked=!1}}};function y(e){var t=gs;gs=!0;try{var r;for(e&&(we!==null&&!we.is_fork&&we.flush(),r=e());;){if(nb(),we===null)return r;we.flush()}}finally{gs=t}}function ub(){if(0){var e;for(const r of we.current.keys())for(const[n,i]of r.updated??[])var t}try{Fy()}catch(r){bn(r,cl)}}var Mr=null;function Ed(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&ks(n)&&(Mr=new Set,Ti(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Hd(n),Mr?.size>0)){jn.clear();for(const i of Mr){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Mr.has(o)&&(Mr.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&&Ti(l)}}Mr.clear()}}Mr=null}}function xd(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?xd(i,t,r,n):(s&4194320)!==0&&(s&2048)===0&&fl(i,t,n)&&(it(i,rr),hl(i))}}function fl(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(fo.call(t,i))return!0;if((i.f&2)!==0&&fl(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function hl(e){we.schedule(e)}function Td(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),it(e,tr);for(var r=e.first;r!==null;)Td(r,t),r=r.next}}function Ad(e){it(e,tr);for(var t=e.first;t!==null;)Ad(t),t=t.next}function pl(e){let t=0,r=_n(0),n;return()=>{wl()&&(p(r),xi(()=>(t===0&&(n=qe(()=>e(()=>Fr(r)))),t+=1,()=>{nr(()=>{t-=1,t===0&&(n?.(),n=void 0,Fr(r))})})))}}var cb=ls|gi;function db(e,t,r,n){new fb(e,t,r,n)}var fb=class{parent;is_pending=!1;transform_error;#e;#t=be?Te:null;#r;#n;#i;#s=null;#a=null;#o=null;#l=null;#u=0;#d=0;#c=!1;#h=new Set;#p=new Set;#f=null;#m=pl(()=>(this.#f=_n(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=ws(()=>{if(be){const i=this.#t;Qr();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.#_()},cb),be&&(this.#e=Te)}#v(){try{this.#s=$t(()=>this.#n(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#r.failed;t&&(this.#o=$t(()=>{t(this.#e,()=>e,()=>()=>{})}))}#w(){const e=this.#r.pending;e&&(this.is_pending=!0,this.#a=$t(()=>e(this.#e)),nr(()=>{var t=this.#l=document.createDocumentFragment(),r=Pt();t.append(r),this.#s=this.#k(()=>$t(()=>this.#n(r))),this.#d===0&&(this.#e.before(t),this.#l=null,Zn(this.#a,()=>{this.#a=null}),this.#g(we))}))}#_(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#u=0,this.#s=$t(()=>{this.#n(this.#e)}),this.#d>0){var e=this.#l=document.createDocumentFragment();El(this.#s,e);const t=this.#r.pending;this.#a=$t(()=>t(this.#e))}else this.#g(we)}catch(t){this.error(t)}}#g(e){this.is_pending=!1,e.transfer_effects(this.#h,this.#p)}defer_effect(e){kd(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=ze;sr(this.#i),Mt(this.#i),bi(this.#i.ctx);try{return ki.ensure(),e()}catch(i){return _d(i),null}finally{sr(t),Mt(r),bi(n)}}#b(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e,t);return}this.#d+=e,this.#d===0&&(this.#g(t),this.#a&&Zn(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.#c)&&(this.#c=!0,nr(()=>{this.#c=!1,this.#f&&Ei(this.#f,this.#u)}))}get_effect_pending(){return this.#m(),p(this.#f)}error(e){if(!this.#r.onerror&&!this.#r.failed)throw e;we?.is_fork?(this.#s&&we.skip_effect(this.#s),this.#a&&we.skip_effect(this.#a),this.#o&&we.skip_effect(this.#o),we.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#s&&(ft(this.#s),this.#s=null),this.#a&&(ft(this.#a),this.#a=null),this.#o&&(ft(this.#o),this.#o=null),be&&(dt(this.#t),Et(),dt(ps()));var t=this.#r.onerror;let r=this.#r.failed;var n=!1,i=!1;const s=()=>{if(n){Hy();return}n=!0,i&&By(),this.#o!==null&&Zn(this.#o,()=>{this.#o=null}),this.#k(()=>{this.#_()})},o=a=>{try{i=!0,t?.(a,s),i=!1}catch(l){bn(l,this.#i&&this.#i.parent)}r&&(this.#o=this.#k(()=>{try{return $t(()=>{var l=Ee;l.b=this,l.f|=128,r(this.#e,()=>a,()=>s)})}catch(l){return bn(l,this.#i.parent),null}}))};nr(()=>{var a;try{a=this.transform_error(e)}catch(l){bn(l,this.#i&&this.#i.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,l=>bn(l,this.#i&&this.#i.parent)):o(a)})}};function Od(e,t,r,n){const i=ms()?Si:ml;var s=e.filter(f=>!f.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=Ee,l=hb(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(f=>f.promise)):null;function d(f){if((a.f&16384)===0){l();try{n([...o,...f])}catch(g){bn(g,a)}ko()}}var u=Cd();if(r.length===0){c.then(()=>d([])).finally(u);return}function h(){Promise.all(r.map(f=>mb(f))).then(d).catch(f=>bn(f,a)).finally(u)}c?c.then(()=>{l(),h(),ko()}):h()}function hb(){var e=Ee,t=Ae,r=ze,n=we;if(0)var i;return function(o=!0){sr(e),Mt(t),bi(r),o&&(e.f&16384)===0&&(n?.activate(),n?.apply())}}function ko(e=!0){sr(null),Mt(null),bi(null),e&&we?.deactivate()}function Cd(){var e=Ee,t=e.b,r=we,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 pb=null;function C2(e){pb=e}var D2=new Set;function Si(e){var t=2|rr;return Ee!==null&&(Ee.f|=gi),{ctx:ze,deps:null,effects:null,equals:md,f:t,fn:e,reactions:null,rv:0,v:ot,wv:0,parent:Ee,ac:null}}var So=Symbol("obsolete");function mb(e,t,r){let n=Ee;n===null&&Iy();var i=void 0,s=_n(ot),o=!Ae,a=new Set;return Ob(()=>{var l=Ee,c=ld();i=c.promise;try{Promise.resolve(e()).then(c.resolve,f=>{f!==go&&c.reject(f)}).finally(ko)}catch(f){c.reject(f),ko()}var d=we;if(o){if((l.f&32768)!==0)var u=Cd();if(n.b?.is_rendered())d.async_deriveds.get(l)?.reject(So);else for(const f of a.values())f.reject(So);a.add(c),d.async_deriveds.set(l,c)}const h=(f,g=void 0)=>{u?.(),a.delete(c),g!==So&&(d.activate(),g?(s.f|=vo,Ei(s,g)):((s.f&8388608)!==0&&(s.f^=vo),Ei(s,f)),d.deactivate())};c.promise.then(h,f=>h(null,f||"unknown"))}),Oo(()=>{for(const l of a)l.reject(So)}),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=Si(e);return Zt||Jd(t),t}function ml(e){const t=Si(e);return t.equals=vd,t}function vb(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ft(t[r])}}var I2=[];function vl(e){var t,r=Ee,n=e.parent;if(!en&&n!==null&&e.v!==ot&&(n.f&24576)!==0)return qy(),e.v;sr(n);try{e.f&=~cs,vb(e),t=rf(e)}finally{sr(r)}return t}function Dd(e){var t=vl(e);if(!e.equals(t)&&(e.wv=ef(),(!we?.is_fork||e.deps===null)&&(we!==null?(we.capture(e,t,!0),vs?.capture(e,t,!0)):e.v=t,e.deps===null))){it(e,tr);return}en||(xt!==null?(wl()||we?.is_fork)&&xt.set(e,t):ul(e))}function gb(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(go),t.fn!==null&&(t.teardown=Fe),t.ac=null,Ss(t,0),Sl(t))}function Id(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Ti(t)}var ys=new Set,jn=new Map;function P2(e){ys=e}var gl=!1;function yb(){gl=!0}function _n(e,t){var r={f:0,v:e,reactions:null,equals:md,rv:0,wv:0};return r}function Q(e,t){const r=_n(e,t);return Jd(r),r}function Pd(e,t=!1,r=!0){const n=_n(e);return t||(n.equals=vd),yi&&r&&ze!==null&&ze.l!==null&&(ze.l.s??=[]).push(n),n}function I(e,t,r=!1){Ae!==null&&(!yr||(Ae.f&131072)!==0)&&ms()&&(Ae.f&4325394)!==0&&(Nr===null||!Nr.has(e))&&Vy();let n=r?$e(t):t;return Ei(e,n,wo)}function Ei(e,t,r=null){if(!e.equals(t)){jn.set(e,en?t:e.v);var n=ki.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&vl(i),xt===null&&ul(i)}e.wv=ef(),Md(e,rr,r),ms()&&Ee!==null&&(Ee.f&1024)!==0&&(Ee.f&96)===0&&(or===null?Ib([e]):or.push(e)),!n.is_fork&&ys.size>0&&!gl&&$d()}return t}function $d(){gl=!1;for(const e of ys){(e.f&1024)!==0&&it(e,Bn);let t;try{t=ks(e)}catch{t=!0}t&&Ti(e)}ys.clear()}function Fr(e){I(e,e.v+1)}function Md(e,t,r){var n=e.reactions;if(n!==null)for(var i=ms(),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&&it(a,t),(l&131072)!==0)ys.add(a);else if((l&2)!==0){var d=a;xt?.delete(d),(l&65536)===0&&(l&512&&(Ee===null||(Ee.f&2097152)===0)&&(a.f|=cs),Md(d,Bn,r))}else if(c){var u=a;(l&16)!==0&&Mr!==null&&Mr.add(u),r!==null?r.push(u):hl(u)}}}}var bb=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function $e(e){if(typeof e!="object"||e===null||$r in e)return e;const t=mo(e);if(t!==od&&t!==Sy)return e;var r=new Map,n=co(e),i=Q(0),s=null,o=tn,a=u=>{if(tn===o)return u();var h=Ae,f=tn;Mt(null),Qd(o);var g=u();return Mt(h),Qd(f),g};n&&r.set("length",Q(e.length,s));var l="";let c=!1;function d(u){if(!c){c=!0,l=u,gd(i,`${l} version`);for(const[h,f]of r)gd(f,_b(l,h));c=!1}}return new Proxy(e,{defineProperty(u,h,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&zy();var g=r.get(h);return g===void 0?a(()=>{var m=Q(f.value,s);return r.set(h,m),m}):I(g,f.value,!0),!0},deleteProperty(u,h){var f=r.get(h);if(f===void 0){if(h in u){const g=a(()=>Q(ot,s));r.set(h,g),Fr(i)}}else I(f,ot),Fr(i);return!0},get(u,h,f){if(h===$r)return e;var g=r.get(h),m=h in u;if(g===void 0&&(!m||Pr(u,h)?.writable)&&(g=a(()=>{var _=Q($e(m?u[h]:ot),s);return _}),r.set(h,g)),g!==void 0){var v=p(g);return v===ot?void 0:v}return Reflect.get(u,h,f)},getOwnPropertyDescriptor(u,h){var f=Reflect.getOwnPropertyDescriptor(u,h);if(f&&"value"in f){var g=r.get(h);g&&(f.value=p(g))}else if(f===void 0){var m=r.get(h),v=m?.v;if(m!==void 0&&v!==ot)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(u,h){if(h===$r)return!0;var f=r.get(h),g=f!==void 0&&f.v!==ot||Reflect.has(u,h);return(f!==void 0||Ee!==null&&(!g||Pr(u,h)?.writable))&&(f===void 0&&(f=a(()=>{var m=Q(g?$e(u[h]):ot,s);return m}),r.set(h,f)),p(f)===ot)?!1:g},set(u,h,f,g){var m=r.get(h),v=h in u;if(n&&h==="length")for(var _=f;_<m.v;_+=1){var x=r.get(_+"");x!==void 0?I(x,ot):_ in u&&(x=a(()=>Q(ot,s)),r.set(_+"",x))}if(m===void 0)(!v||Pr(u,h)?.writable)&&(m=a(()=>Q(void 0,s)),I(m,$e(f)),r.set(h,m));else{v=m.v!==ot;var A=a(()=>$e(f));I(m,A)}var E=Reflect.getOwnPropertyDescriptor(u,h);if(E?.set&&E.set.call(g,f),!v){if(n&&typeof h=="string"){var T=r.get("length"),O=Number(h);Number.isInteger(O)&&O>=T.v&&I(T,O+1)}Fr(i)}return!0},ownKeys(u){p(i);var h=Reflect.ownKeys(u).filter(m=>{var v=r.get(m);return v===void 0||v.v!==ot});for(var[f,g]of r)g.v!==ot&&!(f in u)&&h.push(f);return h},setPrototypeOf(){Uy()}})}function _b(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:bb.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function bs(e){try{if(e!==null&&typeof e=="object"&&$r in e)return e[$r]}catch{}return e}function Fd(e,t){return Object.is(bs(e),bs(t))}var wb=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function $2(e){return new Proxy(e,{get(t,r,n){var i=Reflect.get(t,r,n);return wb.has(r)?function(...s){yb();var o=i.apply(this,s);return $d(),o}:i}})}function M2(){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(bs(this[l])===s){il("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(bs(this[l])===s){il("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(bs(this[l])===s){il("array.includes(...)");break}}return a},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Nd,kb,yl,Rd,Ld;function bl(){if(Nd===void 0){Nd=window,kb=document,yl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Rd=Pr(t,"firstChild").get,Ld=Pr(t,"nextSibling").get,ad(e)&&(e[tl]=void 0,e[fd]=null,e[rl]=void 0,e.__e=void 0),ad(r)&&(r[nl]=void 0)}}function Pt(e=""){return document.createTextNode(e)}function Wt(e){return Rd.call(e)}function gr(e){return Ld.call(e)}function M(e,t){if(!be)return Wt(e);var r=Wt(Te);if(r===null)r=Te.appendChild(Pt());else if(t&&r.nodeType!==3){var n=Pt();return r?.before(n),dt(n),n}return t&&xo(r),dt(r),r}function z(e,t=!1){if(!be){var r=Wt(e);return r instanceof Comment&&r.data===""?gr(r):r}if(t){if(Te?.nodeType!==3){var n=Pt();return Te?.before(n),dt(n),n}xo(Te)}return Te}function X(e,t=1,r=!1){let n=be?Te:e;for(var i;t--;)i=n,n=gr(n);if(!be)return n;if(r){if(n?.nodeType!==3){var s=Pt();return n===null?i?.after(s):n.before(s),dt(s),s}xo(n)}return dt(n),n}function _l(e){e.textContent=""}function zd(){return!Zt||Mr!==null?!1:(Ee.f&Qa)!==0}function Eo(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 Sb(e=""){return document.createComment(e)}function xo(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 Eb(e,t){if(t){const r=document.body;e.autofocus=!0,nr(()=>{document.activeElement===r&&e.focus()})}}function xb(e){be&&Wt(e)!==null&&_l(e)}var Ud=!1;function Vd(){Ud||(Ud=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[ds]?.()})},{capture:!0}))}function To(e){var t=Ae,r=Ee;Mt(null),sr(null);try{return e()}finally{Mt(t),sr(r)}}function Ao(e,t,r,n=r){e.addEventListener(t,()=>To(r));const i=e[ds];i?e[ds]=()=>{i(),n(!0)}:e[ds]=()=>n(!0),Vd()}function Bd(e){Ee===null&&(Ae===null&&My(e),$y()),en&&Py(e)}function Tb(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|=Xa);var n={ctx:ze,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};we?.register_created_effect(n);var i=n;if((e&4)!==0)wi!==null?wi.push(n):ki.ensure().schedule(n);else if(t!==null){try{Ti(n)}catch(o){throw ft(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|=ls))}if(i!==null&&(i.parent=r,r!==null&&Tb(i,r),Ae!==null&&(Ae.f&2)!==0&&(e&64)===0)){var s=Ae;(s.effects??=[]).push(i)}return n}function wl(){return Ae!==null&&!yr}function Oo(e){const t=ir(8,null);return it(t,tr),t.teardown=e,t}function me(e){Bd("$effect");var t=Ee.f;if(!Ae&&(t&32)!==0&&ze!==null&&!ze.i){var r=ze;(r.e??=[]).push(e)}else return qd(e)}function qd(e){return ir(4|cd,e)}function kl(e){return Bd("$effect.pre"),ir(8|cd,e)}function _s(e){ki.ensure();const t=ir(64|gi,e);return()=>{ft(t)}}function Ab(e){ki.ensure();const t=ir(64|gi,e);return(r={})=>new Promise(n=>{r.outro?Zn(t,()=>{ft(t),n(void 0)}):(ft(t),n(void 0))})}function Co(e){return ir(4,e)}function Ob(e){return ir(Ay|gi,e)}function xi(e,t=0){return ir(8|t,e)}function ae(e,t=[],r=[],n=[]){Od(n,t,r,i=>{ir(8,()=>{e(...i.map(p))})})}function ws(e,t=0){var r=ir(16|t,e);return r}function jd(e,t=0){var r=ir(xy|t,e);return r}function $t(e){return ir(32|gi,e)}function Zd(e){var t=e.teardown;if(t!==null){const r=en,n=Ae;Yd(!0),Mt(null);try{t.call(null)}finally{Yd(r),Mt(n)}}}function Sl(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&To(()=>{i.abort(go)});var n=r.next;(r.f&64)!==0?r.parent=null:ft(r,t),r=n}}function Cb(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&ft(t),t=r}}function ft(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Wd(e.nodes.start,e.nodes.end),r=!0),e.f|=ud,Sl(e,t&&!r),Ss(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Zd(e),e.f^=ud,e.f|=Ty;var i=e.parent;i!==null&&i.first!==null&&Hd(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Wd(e,t){for(;e!==null;){var r=e===t?null:gr(e);e.remove(),e=r}}function Hd(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 Zn(e,t,r=!0){var n=[];Gd(e,n,!0);var i=()=>{r&&ft(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function Gd(e,t,r){if((e.f&8192)===0){e.f^=Xa;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;Gd(i,t,o?r:!1)}i=s}}}function Do(e){Kd(e,!0)}function Kd(e,t){if((e.f&8192)!==0){e.f^=Xa,(e.f&1024)===0&&(it(e,rr),ki.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Kd(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 El(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:gr(r);t.append(r),r=i}}var Db=null,Io=!1,en=!1;function Yd(e){en=e}var Ae=null,yr=!1;function Mt(e){Ae=e}var Ee=null;function sr(e){Ee=e}var Nr=null;function Jd(e){Ae!==null&&(!Zt||(Ae.f&2)!==0)&&(Nr??=new Set).add(e)}var Ft=null,Ht=0,or=null;function Ib(e){or=e}var Xd=1,Wn=0,tn=Wn;function Qd(e){tn=e}function ef(){return++Xd}function ks(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=~cs),(t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(ks(s)&&Dd(s),s.wv>e.wv)return!0}(t&512)!==0&&xt===null&&it(e,tr)}return!1}function tf(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Zt&&Nr!==null&&Nr.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?tf(s,t,!1):t===s&&(r?it(s,rr):(s.f&1024)!==0&&it(s,Bn),hl(s))}}function rf(e){var t=Ft,r=Ht,n=or,i=Ae,s=Nr,o=ze,a=yr,l=tn,c=e.f;Ft=null,Ht=0,or=null,Ae=(c&96)===0?e:null,Nr=null,bi(e.ctx),yr=!1,tn=++Wn,e.ac!==null&&(To(()=>{e.ac.abort(go)}),e.ac=null);try{e.f|=dd;var d=e.fn,u=d();e.f|=Qa;var h=e.deps,f=we?.is_fork;if(Ft!==null){var g;if(f||Ss(e,Ht),h!==null&&Ht>0)for(h.length=Ht+Ft.length,g=0;g<Ft.length;g++)h[Ht+g]=Ft[g];else e.deps=h=Ft;if(wl()&&(e.f&512)!==0)for(g=Ht;g<h.length;g++)(h[g].reactions??=[]).push(e)}else!f&&h!==null&&Ht<h.length&&(Ss(e,Ht),h.length=Ht);if(ms()&&or!==null&&!yr&&h!==null&&(e.f&6146)===0)for(g=0;g<or.length;g++)tf(or[g],e);if(i!==null&&i!==e){if(Wn++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=Wn;if(t!==null)for(const m of t)m.rv=Wn;or!==null&&(n===null?n=or:n.push(...or))}return(e.f&8388608)!==0&&(e.f^=vo),u}catch(m){return _d(m)}finally{e.f^=dd,Ft=t,Ht=r,or=n,Ae=i,Nr=s,bi(o),yr=a,tn=l}}function Pb(e,t){let r=t.reactions;if(r!==null){var n=ky.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&&(Ft===null||!fo.call(Ft,t))){var s=t;(s.f&512)!==0&&(s.f^=512,s.f&=~cs),s.v!==ot&&ul(s),gb(s),Ss(s,0)}}function Ss(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Pb(e,r[n])}function Ti(e){var t=e.f;if((t&16384)===0){it(e,tr);var r=Ee,n=Io;if(Ee=e,Io=!0,0)var i,s;try{(t&16777232)!==0?Cb(e):Sl(e),Zd(e);var o=rf(e);if(e.teardown=typeof o=="function"?o:null,e.wv=Xd,0)for(var a of e.deps);}finally{Io=n,Ee=r}}}async function nf(){if(Zt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),y()}function p(e){var t=(e.f&2)!==0;if(Db?.add(e),Ae!==null&&!yr&&!(Ee!==null&&(Ee.f&16384)!==0)&&(Nr===null||!Nr.has(e))){var r=Ae.deps;if((Ae.f&2097152)!==0)e.rv<Wn&&(e.rv=Wn,Ft===null&&r!==null&&r[Ht]===e?Ht++:Ft===null?Ft=[e]:Ft.push(e));else{Ae.deps??=[],fo.call(Ae.deps,e)||Ae.deps.push(e);var n=e.reactions;n===null?e.reactions=[Ae]:fo.call(n,Ae)||n.push(Ae)}}if(0){if(!yr&&pb&&!pb.warned&&(pb.effect.f&2097152)===0&&!pb.effect_deps.has(e))var i;if(v2&&!yr&&_2!==null&&Ae!==null&&_2.reaction===Ae&&!e.trace){if(i)var s,o}}if(en&&jn.has(e))return jn.get(e);if(t){var a=e;if(en){var l=a.v;return((a.f&1024)===0&&a.reactions!==null||of(a))&&(l=vl(a)),jn.set(a,l),l}var c=(a.f&512)===0&&!yr&&Ae!==null&&(Io||(Ae.f&512)!==0),d=(a.f&Qa)===0;ks(a)&&(c&&(a.f|=512),Dd(a)),c&&!d&&(Id(a),sf(a))}if(xt?.has(e))return xt.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function sf(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&&(Id(t),sf(t))}function of(e){if(e.v===ot)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(jn.has(t)||(t.f&2)!==0&&of(t))return!0;return!1}function qe(e){var t=yr;try{return yr=!0,e()}finally{yr=t}}function $b(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if($r in e)xl(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&$r in r&&xl(r)}}}function xl(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{xl(e[n],t)}catch{}const r=mo(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=sd(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}var Es=Symbol("events"),af=new Set,Tl=new Set;function Al(e,t,r,n={}){function i(s){if(n.capture||Cl.call(t,s),!s.cancelBubble)return To(()=>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 ht(e,t,r,n={}){var i=Al(t,e,r,n);return()=>{e.removeEventListener(t,i,n)}}function Ol(e,t,r,n,i){var s={capture:n,passive:i},o=Al(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Oo(()=>{t.removeEventListener(e,o,s)})}function Nt(e,t,r){(t[Es]??={})[e]=r}function Rr(e){for(var t=0;t<e.length;t++)af.add(e[t]);for(var r of Tl)r(e)}var lf=null;function Cl(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;lf=e;var o=0,a=lf===e&&e[Es];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[Es]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){yn(e,"currentTarget",{configurable:!0,get(){return s||r}});var d=Ae,u=Ee;Mt(null),sr(null);try{for(var h,f=[];s!==null&&s!==t;){try{var g=s[Es]?.[n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(m){h?f.push(m):h=m}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(h){for(let m of f)queueMicrotask(()=>{throw m});throw h}}finally{e[Es]=t,delete e.currentTarget,Mt(d),sr(u)}}}var Mb=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function uf(e){return Mb?.createHTML(e)??e}function Fb(e){var t=Eo("template");return t.innerHTML=uf(e.replaceAll("<!>","<!---->")),t.content}function br(e,t){var r=Ee;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(be)return br(Te,null),Te;i===void 0&&(i=Fb(s?e:"<!>"+e),r||(i=Wt(i)));var o=n||yl?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Wt(o),l=o.lastChild;br(a,l)}else br(o,o);return o}}function Rt(e=""){if(!be){var t=Pt(e+"");return br(t,t),t}var r=Te;return r.nodeType!==3?(r.before(r=Pt()),dt(r)):xo(r),br(r,r),r}function K(){if(be)return br(Te,null),Te;var e=document.createDocumentFragment(),t=document.createComment(""),r=Pt();return e.append(t,r),br(t,r),e}function S(e,t){if(be){var r=Ee;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=Te),Qr();return}e!==null&&e.before(t)}function vt(){if(be&&Te&&Te.nodeType===8&&Te.textContent?.startsWith("$")){const e=Te.textContent.substring(1);return Qr(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}var Nb=/\r/g;function Rb(e){e=e.replace(Nb,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function Lb(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}var zb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ub(e){return zb.includes(e)}var Vb=["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"],Bb={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 qb(e){return e=e.toLowerCase(),Bb[e]??e}var F2=[...Vb,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],jb=["touchstart","touchmove"];function Zb(e){return jb.includes(e)}var Wb=["$state","$state.raw","$derived","$derived.by"],N2=[...Wb,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function Hb(e){return e?.replace(/\//g,"/​")}var cf=!0;function ne(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[nl]??=e.nodeValue)&&(e[nl]=r,e.nodeValue=`${r}`)}function df(e,t){return ff(e,t)}function Gb(e,t){bl(),t.intro=t.intro??!1;const r=t.target,n=be,i=Te;try{for(var s=Wt(r);s&&(s.nodeType!==8||s.data!=="[");)s=gr(s);if(!s)throw Vn;mt(!0),dt(s);const o=ff(e,{...t,anchor:s});return mt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
11
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Vn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Ny(),bl(),_l(r),mt(!1),df(e,t)}finally{mt(n),dt(i)}}var Po=new Map;function ff(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){bl();var l=void 0,c=Ab(()=>{var d=r??t.appendChild(Pt());db(d,{pending:()=>{}},f=>{ee({});var g=ze;if(s&&(g.c=s),i&&(n.$$events=i),be&&br(f,null),cf=o,l=e(f,n)||{},cf=!0,be&&(Ee.nodes.end=Te,Te===null||Te.nodeType!==8||Te.data!=="]"))throw hs(),Vn;te()},a);var u=new Set,h=f=>{for(var g=0;g<f.length;g++){var m=f[g];if(!u.has(m)){u.add(m);var v=Zb(m);for(const A of[t,document]){var _=Po.get(A);_===void 0&&(_=new Map,Po.set(A,_));var x=_.get(m);x===void 0?(A.addEventListener(m,Cl,{passive:v}),_.set(m,1)):_.set(m,x+1)}}}};return h(ho(af)),Tl.add(h),()=>{for(var f of u)for(const v of[t,document]){var g=Po.get(v),m=g.get(f);--m==0?(v.removeEventListener(f,Cl),g.delete(f),g.size===0&&Po.delete(v)):g.set(f,m)}Tl.delete(h),d!==r&&d.parentNode?.removeChild(d)}});return Dl.set(l,c),l}var Dl=new WeakMap;function Kb(e,t){const r=Dl.get(e);return r?(Dl.delete(e),r(t)):Promise.resolve()}var Il=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)Do(r),this.#n.delete(t);else{var n=this.#r.get(t);n&&(Do(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&&(ft(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();El(s,a),a.append(Pt()),this.#r.set(i,{effect:s,fragment:a})}else ft(s);this.#n.delete(i),this.#t.delete(i)};this.#i||!r?(this.#n.add(i),Zn(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)||(ft(n.effect),this.#r.delete(r))};ensure(e,t){var r=we,n=zd();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(n){var i=document.createDocumentFragment(),s=Pt();i.append(s),this.#r.set(e,{effect:$t(()=>t(s)),fragment:i})}else this.#t.set(e,$t(()=>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 be&&(this.anchor=Te),this.#s(r)}};function _e(e,t,...r){var n=new Il(e);ws(()=>{const i=t()??null;n.ensure(i,i&&(s=>i(s,...r)))},ls)}if(0)var mF;function rn(e){ze===null&&hd("onMount"),yi&&ze.l!==null?Yb(ze).m.push(e):me(()=>{const t=qe(e);if(typeof t=="function")return t})}function Yb(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Jb(){return Symbol(wy)}function ce(e,t,r=!1){var n;be&&(n=Te,Qr());var i=new Il(e),s=r?ls:0;function o(a,l){if(be){var c=sl(n);if(a!==parseInt(c.substring(1))){var d=ps();dt(d),i.anchor=d,mt(!1),i.ensure(a,l),mt(!0);return}}i.ensure(a,l)}ws(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function Lr(e,t){return t}function Xb(e,t,r){for(var n=[],i=t.length,s,o=t.length,a=0;a<i;a++){let u=t[a];Zn(u,()=>{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var h=e.outrogroups;Pl(e,ho(s.done)),h.delete(s),h.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;_l(d),d.append(c),e.items.clear()}Pl(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Pl(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|=us,El(s,document.createDocumentFragment())):ft(t[i],r)}}var hf;function Ue(e,t,r,n,i,s=null){var o=e,a=new Map;if((t&4)!==0){var l=e;o=be?dt(Wt(l)):l.appendChild(Pt())}be&&Qr();var c=null,d=ml(()=>{var _=r();return co(_)?_:_==null?[]:ho(_)}),u,h=new Map,f=!0;function g(_){(v.effect.f&16384)===0&&(v.pending.delete(_),v.fallback=c,Qb(v,u,o,t,n),c!==null&&(u.length===0?(c.f&33554432)===0?Do(c):(c.f^=us,Ts(c,null,o)):Zn(c,()=>{c=null})))}function m(_){v.pending.delete(_)}var v={effect:ws(()=>{u=p(d);var _=u.length;let x=!1;be&&sl(o)==="[!"!=(_===0)&&(o=ps(),dt(o),mt(!1),x=!0);for(var A=new Set,E=we,T=zd(),O=0;O<_;O+=1){be&&Te.nodeType===8&&Te.data==="]"&&(o=Te,x=!0,mt(!1));var $=u[O],L=n($,O);if(0)var H;var N=f?null:a.get(L);N?(N.v&&Ei(N.v,$),N.i&&Ei(N.i,O),T&&E.unskip_effect(N.e)):(N=e_(a,f?o:hf??=Pt(),$,L,O,i,t,r),f||(N.e.f|=us),a.set(L,N)),A.add(L)}if(_===0&&s&&!c&&(f?c=$t(()=>s(o)):(c=$t(()=>s(hf??=Pt())),c.f|=us)),_>A.size&&pd("","",""),be&&_>0&&dt(ps()),!f)if(h.set(E,A),T){for(const[se,V]of a)A.has(se)||E.skip_effect(V.e);E.oncommit(g),E.ondiscard(m)}else g(E);x&&mt(!0),p(d)}),flags:t,items:a,pending:h,outrogroups:null,fallback:c};f=!1,be&&(o=Te)}function xs(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Qb(e,t,r,n,i){var s=(n&8)!==0,o=t.length,a=e.items,l=xs(e.effect.first),c,d=null,u,h=[],f=[],g,m,v,_;if(s)for(_=0;_<o;_+=1)g=t[_],m=i(g,_),v=a.get(m).e,(v.f&33554432)===0&&(v.nodes?.a?.measure(),(u??=new Set).add(v));for(_=0;_<o;_+=1){if(g=t[_],m=i(g,_),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&&(Do(v),s&&(v.nodes?.a?.unfix(),(u??=new Set).delete(v))),(v.f&33554432)!==0)if(v.f^=us,v===l)Ts(v,null,r);else{var x=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),wn(e,d,v),wn(e,v,x),Ts(v,x,r),d=v,h=[],f=[],l=xs(d.next);continue}if(v!==l){if(c!==void 0&&c.has(v)){if(h.length<f.length){var A=f[0],E;d=A.prev;var T=h[0],O=h[h.length-1];for(E=0;E<h.length;E+=1)Ts(h[E],A,r);for(E=0;E<f.length;E+=1)c.delete(f[E]);wn(e,T.prev,O.next),wn(e,d,T),wn(e,O,A),l=A,d=O,_-=1,h=[],f=[]}else c.delete(v),Ts(v,l,r),wn(e,v.prev,v.next),wn(e,v,d===null?e.effect.first:d.next),wn(e,d,v),d=v;continue}for(h=[],f=[];l!==null&&l!==v;)(c??=new Set).add(l),f.push(l),l=xs(l.next);if(l===null)continue}(v.f&33554432)===0&&h.push(v),d=v,l=xs(v.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Pl(e,ho(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=xs(l.next);var L=$.length;if(L>0){var H=(n&4)!==0&&o===0?r:null;if(s){for(_=0;_<L;_+=1)$[_].nodes?.a?.measure();for(_=0;_<L;_+=1)$[_].nodes?.a?.fix()}Xb(e,$,H)}}s&&nr(()=>{if(u!==void 0)for(v of u)v.nodes?.a?.apply()})}function e_(e,t,r,n,i,s,o,a){var l=(o&1)!==0?(o&16)===0?Pd(r,!1,!1):_n(r):null,c=(o&2)!==0?_n(i):null;return{v:l,i:c,e:$t(()=>(s(t,l??r,c??i,a),()=>{e.delete(n)}))}}function Ts(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=gr(n);if(s.before(n),n===i)return;n=o}}function wn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function R2(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),pd(o,a,l)}r.set(s,i)}}function L2(e,t,r){if(!t||t===Rb(String(r??"")))return;let n;const i=e.__svelte_meta?.loc;i?n=`near ${i.file}:${i.line}:${i.column}`:al?.[Ya]&&(n=`in ${al[Ya]}`),Zy(Hb(n))}function t_(e,t,r=!1,n=!1,i=!1,s=!1){var o=e,a="";if(r){var l=e;be&&(o=dt(Wt(l)))}ae(()=>{var c=Ee;if(a===(a=t()??"")){be&&Qr();return}if(r&&!be){c.nodes=null,l.innerHTML=a,a!==""&&br(Wt(l),l.lastChild);return}if(c.nodes!==null&&(Wd(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(be){for(var d=Te.data,u=Qr(),h=u;u!==null&&(u.nodeType!==8||u.data!=="");)h=u,u=gr(u);if(u===null)throw hs(),Vn;br(Te,h),o=dt(u);return}var f=Eo(n?"svg":i?"math":"template",n?by:i?_y:void 0);f.innerHTML=a;var g=n||i?f:f.content;if(br(Wt(g),g.lastChild),n||i)for(;Wt(g);)o.before(Wt(g));else o.before(g)}})}function r_(e,t,r,n,i){be&&Qr();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 De(e,t,r){var n;be&&(n=Te,Qr());var i=new Il(e);ws(()=>{var s=t()??null;if(be&&sl(n)==="["!=(s!==null)){var o=ps();dt(o),i.anchor=o,mt(!1),i.ensure(s,s&&(a=>r(a,s))),mt(!0);return}i.ensure(s,s&&(a=>r(a,s)))},ls)}function n_(e,t){var r=void 0,n;jd(()=>{r!==(r=t())&&(n&&(ft(n),n=null),r&&(n=$t(()=>{Co(()=>r(e))})))})}function pf(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=pf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $o(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=pf(e))&&(n&&(n+=" "),n+=t);return n}function zr(e){return typeof e=="object"?$o(e):e??""}var mf=[...`
12
+ \r\f \v\uFEFF`];function i_(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||mf.includes(n[o-1]))&&(a===n.length||mf.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function vf(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 $l(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($l)),i&&l.push(...Object.keys(i).map($l));var c=0,d=-1;const m=e.length;for(var u=0;u<m;u++){var h=e[u];if(a?h==="/"&&e[u-1]==="*"&&(a=!1):s?s===h&&(s=!1):h==="/"&&e[u+1]==="*"?a=!0:h==='"'||h==="'"?s=h:h==="("?o++:h===")"&&o--,!a&&s===!1&&o===0){if(h===":"&&d===-1)d=u;else if(h===";"||u===m-1){if(d!==-1){var f=$l(e.substring(c,d).trim());if(!l.includes(f)){h!==";"&&u++;var g=e.substring(c,u).trim();r+=" "+g+";"}}c=u+1,d=-1}}}}return n&&(r+=vf(n)),i&&(r+=vf(i,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Lt(e,t,r,n,i,s){var o=e[tl];if(be||o!==r||o===void 0){var a=i_(r,n,s);(!be||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[tl]=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 Ml(e,t={},r,n){for(var i in r){var s=r[i];t[i]!==s&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,s,n))}}function o_(e,t,r,n){var i=e[rl];if(be||i!==t){var s=s_(t,n);(!be||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[rl]=t}else n&&(Array.isArray(n)?(Ml(e,r?.[0],n[0]),Ml(e,r?.[1],n[1],"important")):Ml(e,r,n));return n}function Mo(e,t,r=!1){if(e.multiple){if(t==null)return;if(!co(t))return Wy();for(var n of e.options)n.selected=t.includes(As(n));return}for(n of e.options)if(Fd(As(n),t)){n.selected=!0;return}(!r||t!==void 0)&&(e.selectedIndex=-1)}function gf(e){var t=new MutationObserver(()=>{Mo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Oo(()=>{t.disconnect()})}function a_(e,t,r=t){var n=new WeakSet,i=!0;Ao(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),As);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&As(l)}r(a),e.__value=a,we!==null&&n.add(we)}),Co(()=>{var s=t();if(e===document.activeElement){var o=Zt?vs:we;if(n.has(o))return}if(Mo(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=As(a),r(s))}e.__value=s,i=!1}),gf(e)}function As(e){return"__value"in e?e.__value:e.value}var Os=Symbol("class"),Cs=Symbol("style"),yf=Symbol("is custom element"),bf=Symbol("is html"),l_=fs?"link":"LINK",_f=fs?"input":"INPUT",u_=fs?"option":"OPTION",c_=fs?"select":"SELECT",d_=fs?"progress":"PROGRESS";function Fo(e){if(be){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;ke(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;ke(e,"checked",null),e.checked=i}}};e[ds]=r,nr(r),Vd()}}function wf(e,t){var r=No(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==d_)||(e.value=t??"")}function f_(e,t){var r=No(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function Fl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ke(e,t,r,n){var i=No(e);if(be&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===l_)){n||void 0;return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[Oy]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Rl(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Hn(e,t,r){var n=Ae,i=Ee;let s=be;be&&mt(!1),Mt(null),sr(null);try{t!=="style"&&(Nl.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Rl(e).includes(t):r&&typeof r=="object")?e[t]=r:ke(e,t,r==null?r:String(r))}finally{Mt(n),sr(i),s&&mt(!0)}}function h_(e,t,r,n,i=!1,s=!1){if(be&&i&&e.nodeName===_f){var o=e;(o.type==="checkbox"?"defaultChecked":"defaultValue")in r||Fo(o)}var a=No(e),l=a[yf],c=!a[bf];let d=be&&l;d&&mt(!1);var u=t||{},h=e.nodeName===u_;for(var f in t)f in r||(r[f]=null);r.class?r.class=zr(r.class):(n||r[Os])&&(r.class=null),r[Cs]&&(r.style??=null);var g=Rl(e);if(e.nodeName===_f&&"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,ke(e,"type",m,s))}for(const O in r){let $=r[O];if(h&&O==="value"&&$==null){e.value=e.__value="",u[O]=$;continue}if(O==="class"){Lt(e,e.namespaceURI==="http://www.w3.org/1999/xhtml",$,n,t?.[Os],r[Os]),u[O]=$,u[Os]=r[Os];continue}if(O==="style"){o_(e,$,t?.[Cs],r[Cs]),u[O]=$,u[Cs]=r[Cs];continue}var v=u[O];if(!($===v&&!($===void 0&&e.hasAttribute(O)))){u[O]=$;var _=O[0]+O[1];if(_!=="$$")if(_==="on"){const L={},H="$$"+O;let N=O.slice(2);var x=Ub(N);if(Lb(N)&&(N=N.slice(0,-7),L.capture=!0),!x&&v){if($!=null)continue;e.removeEventListener(N,u[H],L),u[H]=null}if(x)Nt(N,e,$),Rr([N]);else if($!=null){let se=function(V){u[O].call(this,V)};var T=se;u[H]=Al(N,e,se,L)}}else if(O==="style")ke(e,O,$);else if(O==="autofocus")Eb(e,!!$);else if(!l&&(O==="__value"||O==="value"&&$!=null))e.value=e.__value=$;else if(O==="selected"&&h)Fl(e,$);else{var A=O;c||(A=qb(A));var E=A==="defaultValue"||A==="defaultChecked";if($==null&&!l&&!E)if(a[O]=null,A==="value"||A==="checked"){let L=e;const H=t===void 0;if(A==="value"){let N=L.defaultValue;L.removeAttribute(A),L.defaultValue=N,L.value=L.__value=H?N:null}else{let N=L.defaultChecked;L.removeAttribute(A),L.defaultChecked=N,L.checked=H?N:!1}}else e.removeAttribute(O);else E||g.includes(A)&&(l||typeof $!="string")?(e[A]=$,A in a&&(a[A]=ot)):typeof $!="function"&&ke(e,A,$,s)}}}return d&&mt(!0),u}function Ne(e,t,r=[],n=[],i=[],s,o=!1,a=!1){Od(i,r,n,l=>{var c=void 0,d={},u=e.nodeName===c_,h=!1;if(jd(()=>{var g=t(...l.map(p)),m=h_(e,c,g,s,o,a);h&&u&&"value"in g&&Mo(e,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||ft(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description==="@attach"&&(!c||v!==c[_])&&(d[_]&&ft(d[_]),d[_]=$t(()=>n_(e,()=>v))),m[_]=v}c=m}),u){var f=e;Co(()=>{Mo(f,c.value,!0),gf(f)})}h=!0})}function No(e){return e[fd]??={[yf]:e.nodeName.includes("-"),[bf]:e.namespaceURI===yy}}var Nl=new Map;function Rl(e){var t=e.getAttribute("is")||e.nodeName,r=Nl.get(t);if(r)return r;Nl.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=sd(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=mo(i)}return r}function z2(e,t,r){}function Ll(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function kf(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function p_(e,t){var r=kf(e.srcset),n=kf(t);return n.length===r.length&&n.every(([i,s],o)=>s===r[o][1]&&(Ll(r[o][0],i)||Ll(i,r[o][0])))}var zl=null;function m_(){if(zl===null){var e=Eo("select");e.innerHTML=uf("<option><span>t</span></option>"),zl=e.firstChild?.firstChild?.nodeType===1}return zl}function v_(e,t){var r=be;m_()||(mt(!1),e.textContent="",e.append(Sb("")));try{t()}finally{r&&(be?P(e):(mt(!0),dt(e)))}}function Ro(e,t,r=t){var n=new WeakSet;Ao(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Vl(e)?Bl(s):s,r(s),we!==null&&n.add(we),await nf(),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))}}}),(be&&e.defaultValue!==e.value||qe(t)==null&&e.value)&&(r(Vl(e)?Bl(e.value):e.value),we!==null&&n.add(we)),xi(()=>{var i=t();if(e===document.activeElement){var s=Zt?vs:we;if(n.has(s))return}Vl(e)&&i===Bl(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}var Ul=new Set;function g_(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),Ao(r,"change",()=>{var c=r.__value;s&&(c=Sf(o,c,r.checked)),i(c)},()=>i(s?[]:null)),xi(()=>{var c=n();if(be&&r.defaultChecked!==r.checked){a=!0;return}s?(c=c||[],r.checked=c.includes(r.__value)):r.checked=Fd(r.__value,c)}),Oo(()=>{var c=o.indexOf(r);c!==-1&&o.splice(c,1)}),Ul.has(o)||(Ul.add(o),nr(()=>{o.sort((c,d)=>c.compareDocumentPosition(d)===4?-1:1),Ul.delete(o)})),nr(()=>{if(a){var c;s?c=Sf(o,c,r.checked):c=o.find(d=>d.checked)?.__value,i(c)}})}function y_(e,t,r=t){Ao(e,"change",n=>{r(n?e.defaultChecked:e.checked)}),(be&&e.defaultChecked!==e.checked||qe(t)==null)&&r(e.checked),xi(()=>{var n=t();e.checked=!!n})}function Sf(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 Vl(e){var t=e.type;return t==="number"||t==="range"}function Bl(e){return e===""?null:+e}function ql(e,t){return e===t||e?.[$r]===t}function Ef(e={},t,r,n){var i=ze.r,s=Ee;return Co(()=>{var o,a;return xi(()=>{o=a,a=n?.()||[],qe(()=>{ql(r(...a),e)||(t(e,...a),o&&ql(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&&ql(r(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{c(),d?.()}}}),e}function jl(e=!1){const t=ze,r=t.l.u;if(!r)return;let n=()=>$b(t.s);if(e){let i=0,s={};const o=Si(()=>{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=()=>p(o)}r.b.length&&kl(()=>{xf(t,n),Ja(r.b)}),me(()=>{const i=qe(()=>r.m.map(Ey));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&me(()=>{xf(t,n),Ja(r.a)})}function xf(e,t){if(e.l.s)for(const r of e.l.s)p(r);t()}var b_={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},b_)}var __={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(as(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];as(i)&&(i=i());const s=Pr(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(as(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const i=Pr(n,t);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,t){if(t===$r||t===el)return!1;for(let r of e.props)if(as(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(as(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 kn(...e){return new Proxy({props:e},__)}function b(e,t,r,n){var i=!yi||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,a=n,l=!0,c=void 0,d=()=>o&&i?(c??=Si(n),p(c)):(l&&(l=!1,a=o?qe(n):n),a);let u;if(s){var h=$r in e||el in e;u=Pr(e,t)?.set??(h&&t in e?E=>e[t]=E:void 0)}var f,g=!1;s?[f,g]=ab(()=>e[t]):f=e[t],f===void 0&&n!==void 0&&(f=d(),u&&(i&&Ry(t),u(f)));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,T){return arguments.length>0?((!i||!T||v||g)&&u(T?m():E),E):m()})}var _=!1,x=((r&1)!==0?Si:ml)(()=>(_=!1,m()));s&&p(x);var A=Ee;return(function(E,T){if(arguments.length>0){const O=T?p(x):i&&s?$e(E):E;return I(x,O),_=!0,a!==void 0&&(a=O),E}return en&&_||(A.f&16384)!==0?x.v:p(x)})}function w_(e){return new k_(e)}var k_=class{#e;#t;constructor(e){var t=new Map,r=(i,s)=>{var o=Pd(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return p(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===el?!0:(p(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?Gb:df)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Zt&&(!e?.props?.$$host||e.sync===!1)&&y(),this.#e=n.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||yn(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=()=>{Kb(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()}},Tf;typeof HTMLElement=="function"&&(Tf=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=Eo("slot");i!=="default"&&(o.name=i),S(s,o)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=S_(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]=Lo(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=w_({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=_s(()=>{xi(()=>{this.$$r=!0;for(const i of po(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Lo(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]=Lo(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 po(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Lo(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 S_(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function re(e,t,r,n,i,s){let o=class extends Tf{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return po(t).map(a=>(t[a].attribute||a).toLowerCase())}};return po(t).forEach(a=>{yn(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Lo(a,l,t),this.$$d[a]=l;var c=this.$$c;c&&(Pr(c,a)?.get?c[a]=l:c.$set({[a]:l}))}})}),n.forEach(a=>{yn(o.prototype,a,{get(){return this.$$c?.[a]}})}),s&&(o=s(o)),e.element=o,o}var Af={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:T_,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:A_,cart:()=>"/#/cart",annualTicketPersonalizationForm:(e,t)=>`/#/tickets/annual/personalisation/${e}/${t}`,annualTicketPersonalizationList:e=>`/#/tickets/annual/personalisation/${e}`,annualTicketPersonalizationFormSubmit:e=>`/#/tickets/annual/personalisation/${e}`},E_={...Af,checkoutSuccess:e=>`/checkout/success/?token=${e}`,checkoutFailure:e=>`/checkout/failure?error=${e}`};function x_(e){return e==="angular"?Af:E_}function T_(e){return`/#/products/events?category_id=${(C.settings?.multipleEventsMenuItems.event_groups[e]||[]).join("&category_id=")}`}function A_(e){return`/#/products/tours?category_id=${(C.settings?.multipleToursMenuItems.tour_groups[e]||[]).join("&category_id=")}`}function O_(e){return new Promise(t=>setTimeout(t,e))}function Of(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function C_(e){return typeof e=="boolean"}function Zl(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 Wl=Array.isArray,Cf=e=>!!e&&e.constructor===Object,D_=e=>typeof e=="string"||e instanceof String,I_=e=>{try{return Number(e)===e}catch{return!1}},P_=(e,t)=>e.reduce((r,n)=>{const i=t(n);return r[i]||(r[i]=[]),r[i].push(n),r},{}),Df=(e,t)=>!e||(e.length??0)===0?null:e.reduce(t);function Gn(e,t){return(e||[]).reduce((r,n)=>r+(t?t(n):n),0)}var $_=(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 M_(e,t){const r=t??(n=>n);return Df(e,(n,i)=>r(n)>r(i)?n:i)}function Hl(e,t){const r=t??(n=>n);return Df(e,(n,i)=>r(n)<r(i)?n:i)}var F_=(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)},If=(e,t,r)=>{let n=r;for(let i=1;i<=e;i++)n=t(n,i);return n},N_=(e,t)=>e?!t||t.length===0?e:t.reduce((r,n)=>(delete r[n],r),{...e}):{},Gt=(e,t)=>!e||!t?e??t??{}:Object.entries({...e,...t}).reduce((r,[n,i])=>({...r,[n]:Cf(e[n])?Gt(e[n],i):i}),{}),Pf=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&&Of(this.#e.uid))}isGuest(){return!!(this.#e.uid&&!Of(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(!(Cf(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)}},R_=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}},$f;function Z(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 h=d[u];h in a||(a[h]=c[h].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 Ai=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Mf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};($f=globalThis).__zod_globalConfig??($f.__zod_globalConfig={});var zo=globalThis.__zod_globalConfig;function Kn(e){return e&&Object.assign(zo,e),zo}function Ff(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 Gl(e,t){return typeof t=="bigint"?t.toString():t}function Kl(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function Yl(e){return e==null}function Jl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function L_(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 Nf=Symbol("evaluating");function Ve(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Nf)return n===void 0&&(n=Nf,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Yn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Sn(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Rf(e){return JSON.stringify(e)}function z_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Lf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Uo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var U_=Kl(()=>{if(zo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function Ds(e){if(Uo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Uo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function zf(e){return Ds(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var V_=new Set(["string","number","symbol"]);function Vo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function En(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ye(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 B_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var q_={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 j_(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 En(e,Sn(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 Yn(this,"shape",i),i},checks:[]}))}function Z_(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 En(e,Sn(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 Yn(this,"shape",i),i},checks:[]}))}function W_(e,t){if(!Ds(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 En(e,Sn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Yn(this,"shape",n),n}}))}function H_(e,t){if(!Ds(t))throw new Error("Invalid input to safeExtend: expected a plain object");return En(e,Sn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Yn(this,"shape",r),r}}))}function G_(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return En(e,Sn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Yn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function K_(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 En(t,Sn(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 Yn(this,"shape",s),s},checks:[]}))}function Y_(e,t,r){return En(t,Sn(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 Yn(this,"shape",i),i}}))}function Oi(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 J_(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 Uf(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Bo(e){return typeof e=="string"?e:e?.message}function Jn(e,t,r){const n=e.message?e.message:Bo(e.inst?._zod.def?.error?.(e))??Bo(t?.error?.(e))??Bo(r.customError?.(e))??Bo(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 Xl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Is(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}var Vf=(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,Gl,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Bf=Z("$ZodError",Vf),qf=Z("$ZodError",Vf,{Parent:Error});function X_(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 Q_(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 Ql=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 Ai;if(o.issues.length){const a=new(i?.Err??e)(o.issues.map(l=>Jn(l,s,Kn())));throw Lf(a,i?.callee),a}return o.value},eu=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=>Jn(l,s,Kn())));throw Lf(a,i?.callee),a}return o.value},qo=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 Ai;return s.issues.length?{success:!1,error:new(e??Bf)(s.issues.map(o=>Jn(o,i,Kn())))}:{success:!0,data:s.value}},ew=qo(qf),jo=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=>Jn(o,i,Kn())))}:{success:!0,data:s.value}},tw=jo(qf),rw=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return Ql(e)(t,r,i)},nw=e=>(t,r,n)=>Ql(e)(t,r,n),iw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return eu(e)(t,r,i)},sw=e=>async(t,r,n)=>eu(e)(t,r,n),ow=e=>(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return qo(e)(t,r,i)},aw=e=>(t,r,n)=>qo(e)(t,r,n),lw=e=>async(t,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return jo(e)(t,r,i)},uw=e=>async(t,r,n)=>jo(e)(t,r,n),cw=/^[cC][0-9a-z]{6,}$/,dw=/^[0-9a-z]+$/,fw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hw=/^[0-9a-vA-V]{20}$/,pw=/^[A-Za-z0-9]{27}$/,mw=/^[a-zA-Z0-9_-]{21}$/,vw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gw=/^([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})$/,jf=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)$/,yw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function _w(){return new RegExp(bw,"u")}var ww=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kw=/^(([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}|:))$/,Sw=/^((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])$/,Ew=/^(([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])$/,xw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Zf=/^[A-Za-z0-9_-]*$/,Tw=/^https?$/,Aw=/^\+[1-9]\d{6,14}$/,Wf="(?:(?:\\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])))",Ow=new RegExp(`^${Wf}$`);function Hf(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 Cw(e){return new RegExp(`^${Hf(e)}$`)}function Dw(e){const t=Hf({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(`^${Wf}T(?:${n})$`)}var Iw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Pw=/^-?\d+$/,$w=/^-?\d+(?:\.\d+)?$/,Mw=/^[^A-Z]*$/,Fw=/^[^a-z]*$/,zt=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Gf={number:"number",bigint:"bigint",object:"date"},Kf=Z("$ZodCheckLessThan",(e,t)=>{zt.init(e,t);const r=Gf[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})}}),Yf=Z("$ZodCheckGreaterThan",(e,t)=>{zt.init(e,t);const r=Gf[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})}}),Nw=Z("$ZodCheckMultipleOf",(e,t)=>{zt.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):L_(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})}}),Rw=Z("$ZodCheckNumberFormat",(e,t)=>{zt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[i,s]=q_[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=Pw)}),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})}}),Lw=Z("$ZodCheckMaxLength",(e,t)=>{var r;zt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Yl(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=Xl(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),zw=Z("$ZodCheckMinLength",(e,t)=>{var r;zt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Yl(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=Xl(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Uw=Z("$ZodCheckLengthEquals",(e,t)=>{var r;zt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const i=n.value;return!Yl(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=Xl(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})}}),Zo=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;zt.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=()=>{})}),Vw=Z("$ZodCheckRegex",(e,t)=>{Zo.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})}}),Bw=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Mw),Zo.init(e,t)}),qw=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Fw),Zo.init(e,t)}),jw=Z("$ZodCheckIncludes",(e,t)=>{zt.init(e,t);const r=Vo(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})}}),Zw=Z("$ZodCheckStartsWith",(e,t)=>{zt.init(e,t);const r=new RegExp(`^${Vo(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})}}),Ww=Z("$ZodCheckEndsWith",(e,t)=>{zt.init(e,t);const r=new RegExp(`.*${Vo(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})}}),Hw=Z("$ZodCheckOverwrite",(e,t)=>{zt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),Gw=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
+ `).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
+ `))}},Kw={major:4,minor:4,patch:3},at=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Kw;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=Oi(o),d;for(const u of a){if(u._zod.def.when){if(J_(o)||!u._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,f=u._zod.check(o);if(f instanceof Promise&&l?.async===!1)throw new Ai;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,o.issues.length!==h&&(c||(c=Oi(o,h)))});else{if(o.issues.length===h)continue;c||(c=Oi(o,h))}}return d?d.then(()=>o):o},s=(o,a,l)=>{if(Oi(o))return o.aborted=!0,o;const c=i(a,n,l);if(c instanceof Promise){if(l.async===!1)throw new Ai;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 Ai;return l.then(c=>i(c,n,a))}return i(l,n,a)}}Ve(e,"~standard",()=>({validate:i=>{try{const s=ew(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return tw(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),tu=Z("$ZodString",(e,t)=>{at.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Iw(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}}),Ke=Z("$ZodStringFormat",(e,t)=>{Zo.init(e,t),tu.init(e,t)}),Yw=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gw),Ke.init(e,t)}),Jw=Z("$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=jf(r))}else t.pattern??(t.pattern=jf());Ke.init(e,t)}),Xw=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yw),Ke.init(e,t)}),Qw=Z("$ZodURL",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{try{const n=r.value.trim();if(!t.normalize&&t.protocol?.source===Tw.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})}}}),e0=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=_w()),Ke.init(e,t)}),t0=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mw),Ke.init(e,t)}),r0=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cw),Ke.init(e,t)}),n0=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=dw),Ke.init(e,t)}),i0=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=fw),Ke.init(e,t)}),s0=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=hw),Ke.init(e,t)}),o0=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pw),Ke.init(e,t)}),a0=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Dw(t)),Ke.init(e,t)}),l0=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ow),Ke.init(e,t)}),u0=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Cw(t)),Ke.init(e,t)}),c0=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=vw),Ke.init(e,t)}),d0=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ww),Ke.init(e,t),e._zod.bag.format="ipv4"}),f0=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kw),Ke.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})}}}),h0=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Sw),Ke.init(e,t)}),p0=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ew),Ke.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 Jf(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var m0=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=xw),Ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Jf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function v0(e){if(!Zf.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return Jf(t.padEnd(Math.ceil(t.length/4)*4,"="))}var g0=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Zf),Ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{v0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),y0=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Aw),Ke.init(e,t)});function b0(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 _0=Z("$ZodJWT",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{b0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Xf=Z("$ZodNumber",(e,t)=>{at.init(e,t),e._zod.pattern=e._zod.bag.pattern??$w,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),w0=Z("$ZodNumberFormat",(e,t)=>{Rw.init(e,t),Xf.init(e,t)}),k0=Z("$ZodUnknown",(e,t)=>{at.init(e,t),e._zod.parse=r=>r}),S0=Z("$ZodNever",(e,t)=>{at.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Qf(e,t,r){e.issues.length&&t.issues.push(...Uf(r,e.issues)),t.value[r]=e.value}var E0=Z("$ZodArray",(e,t)=>{at.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=>Qf(c,r,o))):Qf(l,r,o)}return s.length?Promise.all(s).then(()=>r):r}});function Wo(e,t,r,n,i,s){const o=r in n;if(e.issues.length){if(i&&s&&!o)return;t.issues.push(...Uf(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 eh(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=B_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function th(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 h in t){if(h==="__proto__"||a.has(h))continue;if(c==="never"){o.push(h);continue}const f=l.run({value:t[h],issues:[]},n);f instanceof Promise?e.push(f.then(g=>Wo(g,r,h,t,d,u))):Wo(f,r,h,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 x0=Z("$ZodObject",(e,t)=>{if(at.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=Kl(()=>eh(t));Ve(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=Uo,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 h=d[u],f=h._zod.optin==="optional",g=h._zod.optout==="optional",m=h._zod.run({value:l[u],issues:[]},a);m instanceof Promise?c.push(m.then(v=>Wo(v,o,u,l,f,g))):Wo(m,o,u,l,f,g)}return i?th(c,l,o,a,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),T0=Z("$ZodObjectJIT",(e,t)=>{x0.init(e,t);const r=e._zod.parse,n=Kl(()=>eh(t)),i=h=>{const f=new Gw(["shape","payload","ctx"]),g=n.value,m=A=>{const E=Rf(A);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};f.write("const input = payload.value;");const v=Object.create(null);let _=0;for(const A of g.keys)v[A]=`key_${_++}`;f.write("const newResult = {};");for(const A of g.keys){const E=v[A],T=Rf(A),O=h[A],$=O?._zod?.optin==="optional",L=O?._zod?.optout==="optional";f.write(`const ${E} = ${m(A)};`),$&&L?f.write(`
15
+ if (${E}.issues.length) {
16
+ if (${T} in input) {
17
+ payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
18
+ ...iss,
19
+ path: iss.path ? [${T}, ...iss.path] : [${T}]
20
+ })));
21
+ }
22
+ }
23
+
24
+ if (${E}.value === undefined) {
25
+ if (${T} in input) {
26
+ newResult[${T}] = undefined;
27
+ }
28
+ } else {
29
+ newResult[${T}] = ${E}.value;
30
+ }
31
+
32
+ `):$?f.write(`
33
+ if (${E}.issues.length) {
34
+ payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
35
+ ...iss,
36
+ path: iss.path ? [${T}, ...iss.path] : [${T}]
37
+ })));
38
+ }
39
+
40
+ if (${E}.value === undefined) {
41
+ if (${T} in input) {
42
+ newResult[${T}] = undefined;
43
+ }
44
+ } else {
45
+ newResult[${T}] = ${E}.value;
46
+ }
47
+
48
+ `):f.write(`
49
+ const ${E}_present = ${T} in input;
50
+ if (${E}.issues.length) {
51
+ payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
52
+ ...iss,
53
+ path: iss.path ? [${T}, ...iss.path] : [${T}]
54
+ })));
55
+ }
56
+ if (!${E}_present && !${E}.issues.length) {
57
+ payload.issues.push({
58
+ code: "invalid_type",
59
+ expected: "nonoptional",
60
+ input: undefined,
61
+ path: [${T}]
62
+ });
63
+ }
4
64
 
5
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){s(o);continue}if(t.external){const c=t.external.registry.get(o[0])?.id;if(e!==o[0]&&c){s(o);continue}}if(t.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&t.reused==="ref"){s(o);continue}}}function Am(t,e){const r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){n(u);const f=t.seen.get(u),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,c),o._zod.parent===u)for(const g in l)g==="$ref"||g==="allOf"||g in c||delete l[g];if(p.$ref&&f.def)for(const g in l)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g])&&delete l[g]}const d=o._zod.parent;if(d&&d!==u){n(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())n(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);const s=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:tl(e,"input",t.processors),output:tl(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function zt(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return zt(n.element,r);if(n.type==="set")return zt(n.valueType,r);if(n.type==="lazy")return zt(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 zt(n.innerType,r);if(n.type==="intersection")return zt(n.left,r)||zt(n.right,r);if(n.type==="record"||n.type==="map")return zt(n.keyType,r)||zt(n.valueType,r);if(n.type==="pipe")return zt(n.in,r)||zt(n.out,r);if(n.type==="object"){for(const i in n.shape)if(zt(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(zt(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(zt(i,r))return!0;return!!(n.rest&&zt(n.rest,r))}return!1}const Px=(t,e={})=>r=>{const n=Em({...r,processors:e});return Lt(t,n),Tm(n,t),Am(n,t)},tl=(t,e,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=Em({...i??{},target:s,io:e,processors:r});return Lt(t,o),Tm(o,t),Am(o,t)},Mx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$x=(t,e,r,n)=>{const i=r;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Mx[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Nx=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Fx=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Rx=(t,e,r,n)=>{const i=r,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Lt(s.element,e,{...n,path:[...n.path,"items"]})},Lx=(t,e,r,n)=>{const i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>Lt(a,e,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},zx=(t,e,r,n)=>{const i=t._zod.def,s=Lt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=Lt(i.right,e,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=l},Zx=(t,e,r,n)=>{const i=t._zod.def,s=Lt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},Vx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Ux=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Bx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},jx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);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},qx=(t,e,r,n)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Lt(s,e,n);const o=e.seen.get(t);o.ref=s},Wx=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType,r.readOnly=!0},Cm=(t,e,r,n)=>{const i=t._zod.def;Lt(i.innerType,e,n);const s=e.seen.get(t);s.ref=i.innerType},Hx=Q("ZodISODateTime",(t,e)=>{gS.init(t,e),lt.init(t,e)});function Kx(t){return hx(Hx,t)}const Gx=Q("ZodISODate",(t,e)=>{vS.init(t,e),lt.init(t,e)});function Yx(t){return px(Gx,t)}const Jx=Q("ZodISOTime",(t,e)=>{yS.init(t,e),lt.init(t,e)});function Qx(t){return mx(Jx,t)}const Xx=Q("ZodISODuration",(t,e)=>{_S.init(t,e),lt.init(t,e)});function eE(t){return gx(Xx,t)}const xr=Q("ZodError",(t,e)=>{sm.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>pk(t,r)},flatten:{value:r=>hk(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,yu,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,yu,2)}},isEmpty:{get(){return t.issues.length===0}}})},{Parent:Error}),tE=xu(xr),rE=Eu(xr),nE=Ya(xr),iE=Ja(xr),sE=vk(xr),oE=yk(xr),aE=_k(xr),lE=bk(xr),cE=wk(xr),uE=kk(xr),dE=Sk(xr),fE=xk(xr),Zt=Q("ZodType",(t,e)=>(Rt.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:tl(t,"input"),output:tl(t,"output")}}),t.toJSONSchema=Px(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(ck(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>dk(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>tE(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>nE(t,r,n),t.parseAsync=async(r,n)=>rE(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>iE(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>sE(t,r,n),t.decode=(r,n)=>oE(t,r,n),t.encodeAsync=async(r,n)=>aE(t,r,n),t.decodeAsync=async(r,n)=>lE(t,r,n),t.safeEncode=(r,n)=>cE(t,r,n),t.safeDecode=(r,n)=>uE(t,r,n),t.safeEncodeAsync=async(r,n)=>dE(t,r,n),t.safeDecodeAsync=async(r,n)=>fE(t,r,n),t.refine=(r,n)=>t.check(eT(r,n)),t.superRefine=r=>t.check(tT(r)),t.overwrite=r=>t.check(gs(r)),t.optional=()=>Im(t),t.exactOptional=()=>VE(t),t.nullable=()=>Pm(t),t.nullish=()=>Im(Pm(t)),t.nonoptional=r=>KE(t,r),t.array=()=>PE(t),t.or=r=>$E([t,r]),t.and=r=>FE(t,r),t.transform=r=>Mm(t,LE(r)),t.default=r=>jE(t,r),t.prefault=r=>WE(t,r),t.catch=r=>YE(t,r),t.pipe=r=>Mm(t,r),t.readonly=()=>XE(t),t.describe=r=>{const n=t.clone();return To.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return To.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return To.get(t);const n=t.clone();return To.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),Om=Q("_ZodString",(t,e)=>{Tu.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(n,i,s)=>$x(t,n,i);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(vx(...n)),t.includes=(...n)=>t.check(bx(...n)),t.startsWith=(...n)=>t.check(wx(...n)),t.endsWith=(...n)=>t.check(kx(...n)),t.min=(...n)=>t.check(el(...n)),t.max=(...n)=>t.check(Sm(...n)),t.length=(...n)=>t.check(xm(...n)),t.nonempty=(...n)=>t.check(el(1,...n)),t.lowercase=n=>t.check(yx(n)),t.uppercase=n=>t.check(_x(n)),t.trim=()=>t.check(xx()),t.normalize=(...n)=>t.check(Sx(...n)),t.toLowerCase=()=>t.check(Ex()),t.toUpperCase=()=>t.check(Tx()),t.slugify=()=>t.check(Ax())}),hE=Q("ZodString",(t,e)=>{Tu.init(t,e),Om.init(t,e),t.email=r=>t.check(WS(pE,r)),t.url=r=>t.check(JS(mE,r)),t.jwt=r=>t.check(fx(DE,r)),t.emoji=r=>t.check(QS(gE,r)),t.guid=r=>t.check(km(Dm,r)),t.uuid=r=>t.check(HS(nl,r)),t.uuidv4=r=>t.check(KS(nl,r)),t.uuidv6=r=>t.check(GS(nl,r)),t.uuidv7=r=>t.check(YS(nl,r)),t.nanoid=r=>t.check(XS(vE,r)),t.guid=r=>t.check(km(Dm,r)),t.cuid=r=>t.check(ex(yE,r)),t.cuid2=r=>t.check(tx(_E,r)),t.ulid=r=>t.check(rx(bE,r)),t.base64=r=>t.check(cx(AE,r)),t.base64url=r=>t.check(ux(CE,r)),t.xid=r=>t.check(nx(wE,r)),t.ksuid=r=>t.check(ix(kE,r)),t.ipv4=r=>t.check(sx(SE,r)),t.ipv6=r=>t.check(ox(xE,r)),t.cidrv4=r=>t.check(ax(EE,r)),t.cidrv6=r=>t.check(lx(TE,r)),t.e164=r=>t.check(dx(OE,r)),t.datetime=r=>t.check(Kx(r)),t.date=r=>t.check(Yx(r)),t.time=r=>t.check(Qx(r)),t.duration=r=>t.check(eE(r))});function rl(t){return qS(hE,t)}const lt=Q("ZodStringFormat",(t,e)=>{nt.init(t,e),Om.init(t,e)}),pE=Q("ZodEmail",(t,e)=>{aS.init(t,e),lt.init(t,e)}),Dm=Q("ZodGUID",(t,e)=>{sS.init(t,e),lt.init(t,e)}),nl=Q("ZodUUID",(t,e)=>{oS.init(t,e),lt.init(t,e)}),mE=Q("ZodURL",(t,e)=>{lS.init(t,e),lt.init(t,e)}),gE=Q("ZodEmoji",(t,e)=>{cS.init(t,e),lt.init(t,e)}),vE=Q("ZodNanoID",(t,e)=>{uS.init(t,e),lt.init(t,e)}),yE=Q("ZodCUID",(t,e)=>{dS.init(t,e),lt.init(t,e)}),_E=Q("ZodCUID2",(t,e)=>{fS.init(t,e),lt.init(t,e)}),bE=Q("ZodULID",(t,e)=>{hS.init(t,e),lt.init(t,e)}),wE=Q("ZodXID",(t,e)=>{pS.init(t,e),lt.init(t,e)}),kE=Q("ZodKSUID",(t,e)=>{mS.init(t,e),lt.init(t,e)}),SE=Q("ZodIPv4",(t,e)=>{bS.init(t,e),lt.init(t,e)}),xE=Q("ZodIPv6",(t,e)=>{wS.init(t,e),lt.init(t,e)}),EE=Q("ZodCIDRv4",(t,e)=>{kS.init(t,e),lt.init(t,e)}),TE=Q("ZodCIDRv6",(t,e)=>{SS.init(t,e),lt.init(t,e)}),AE=Q("ZodBase64",(t,e)=>{xS.init(t,e),lt.init(t,e)}),CE=Q("ZodBase64URL",(t,e)=>{TS.init(t,e),lt.init(t,e)}),OE=Q("ZodE164",(t,e)=>{AS.init(t,e),lt.init(t,e)}),DE=Q("ZodJWT",(t,e)=>{OS.init(t,e),lt.init(t,e)}),IE=Q("ZodArray",(t,e)=>{DS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Rx(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(el(r,n)),t.nonempty=r=>t.check(el(1,r)),t.max=(r,n)=>t.check(Sm(r,n)),t.length=(r,n)=>t.check(xm(r,n)),t.unwrap=()=>t.element});function PE(t,e){return Cx(IE,t,e)}const ME=Q("ZodUnion",(t,e)=>{IS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Lx(t,r,n,i),t.options=e.options});function $E(t,e){return new ME({type:"union",options:t,...Oe(e)})}const NE=Q("ZodIntersection",(t,e)=>{PS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>zx(t,r,n,i)});function FE(t,e){return new NE({type:"intersection",left:t,right:e})}const RE=Q("ZodTransform",(t,e)=>{MS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Fx(t,r),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Xp(t.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Eo(s,r.value,e));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(Eo(o))}};const i=e.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});function LE(t){return new RE({type:"transform",transform:t})}const zE=Q("ZodOptional",(t,e)=>{gm.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Cm(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Im(t){return new zE({type:"optional",innerType:t})}const ZE=Q("ZodExactOptional",(t,e)=>{$S.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Cm(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function VE(t){return new ZE({type:"optional",innerType:t})}const UE=Q("ZodNullable",(t,e)=>{NS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Zx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Pm(t){return new UE({type:"nullable",innerType:t})}const BE=Q("ZodDefault",(t,e)=>{FS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ux(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function jE(t,e){return new BE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():nm(e)}})}const qE=Q("ZodPrefault",(t,e)=>{RS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Bx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function WE(t,e){return new qE({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():nm(e)}})}const HE=Q("ZodNonOptional",(t,e)=>{LS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Vx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function KE(t,e){return new HE({type:"nonoptional",innerType:t,...Oe(e)})}const GE=Q("ZodCatch",(t,e)=>{zS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>jx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function YE(t,e){return new GE({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const JE=Q("ZodPipe",(t,e)=>{ZS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>qx(t,r,n,i),t.in=e.in,t.out=e.out});function Mm(t,e){return new JE({type:"pipe",in:t,out:e})}const QE=Q("ZodReadonly",(t,e)=>{VS.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Wx(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function XE(t){return new QE({type:"readonly",innerType:t})}const $m=Q("ZodCustom",(t,e)=>{US.init(t,e),Zt.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Nx(t,r)});function eT(t,e={}){return Ox($m,t,e)}function tT(t){return Dx(t)}function rT(t,e={}){const r=new $m({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...Oe(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var nT={salutation:{key:"salutation",apiKey:"customer_salutation_id",type:"select",label:"user.registration.form.customer_salutation_id",placeholder:"",description:"",autocomplete:"honorific-prefix",options:()=>S.customerSalutations.map(t=>({label:t.salutation,value:t.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:rl().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:rl().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:rl().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:()=>S.countries.map(t=>({label:t.name,value:t.id}))},language:{key:"language",apiKey:"language_id",type:"select",label:"user.registration.form.language",placeholder:"",description:"",autocomplete:"language",options:()=>S.locales.map(t=>({label:S.t(`languages.${t.locale}`),value:t.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:rl().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:rT(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:()=>(S.payment_modes?Object.values(S.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function iT(t,e){return{...t,errors:t.errors||[],value:t.value??sT(t.type),options:t.options,autocomplete:t.autocomplete??"",placeholder:t.placeholder??"",description:t.description,apiErrors:t.apiErrors??[],mounted:t.mounted??!1,required:e,validate(){oT(this)}}}function sT(t){return t==="checkbox"?!1:t==="file"?null:""}function oT(t){if(t.errors=[],!t.validator){t.required&&(t.value===!1||t.value===""||t.value===null||t.value===void 0)&&(t.errors=["common.fieldErrors.required"]);return}const e=t.validator.safeParse(t.value);e.success?t.errors=[]:t.errors=e.error.format()._errors}const $s=class $s{static defineForm(e){at.default({forms:{[e.id]:{fields:e.fields,submitLabel:e.submitLabel}}})}static defineFields(e){at.default({fields:e})}static setRequiredApiKeys(e,r){Ry($s,Gl)[e]=r}static getFormOptions(e){return at.config.forms[e]}static createField(e,r){const n=$s.getFieldInit(e);if(!n)throw new Error(`(formFields) Field "${e}" not found`);return iT(n,r)}static getFormFields(e){return aT(e)}static getFieldInit(e){return at.config.fields[e]}};Gl=new WeakMap,Ly($s,Gl,{}),$s.defineFields(nT);let er=$s;function aT(t){const e=at.config.forms[t];if(!e)throw new Error(`(formFields) Form ${t} not found`);const r=e.fields;return r||(console.warn("(formFields) No fields defined for form",t),[])}function Cu(t){return t?t.filter(r=>r.mounted&&(r.errors?.length||r.apiErrors?.length)).length:0}function lT(t,e){te(e,!0);let r=_(e,"token",7),n=_(e,"ticketSaleId",7),i;const s=new Yp;Qp(e.$$host,s),_e(()=>{s.token=r(),s.ticketSaleId=n()}),er.defineForm({id:"ticketPersonalization",fields:[{key:"startAt",required:!0}]});async function o(){if(!i)return;const g=s.ticketSale.personalizations.length,m=document.querySelectorAll('go-form:not([form-id="ticketPersonalization"])'),b=Gh(g,(A,O)=>{const F=m[O-1].details;return A.push(F),A},[]);if(b.forEach(A=>{A.fields.forEach(O=>{A.validateField(O)})}),!Gh(g,(A,O)=>b[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const A=b.map(async(N,j)=>{const G=s.ticketSale.personalizations[j].id,ue=N.fields.find(K=>K.key==="photo")?.value;if(!(ue instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const me=await S.uploadPersonalizationPhoto(r(),G,ue);return me.error?{ok:!1,error:me.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),F=(await Promise.all(A)).find(N=>!N.ok);if(F){i.details.apiErrors=[F.error];return}}const D={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:b.map((A,O)=>{const F=Db(A.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:F}})}},T=await S.finalizePersonalizations(r(),D);if(T.error){i.details.apiErrors=[T.error.error];return}const P=at.config.forms.personalization?.beforeSubmit;P&&P(D),at.config.urls.annualTicketPersonalizationFormSubmit?.()&&at.config.navigateTo(at.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,u=0;function d(g){g.querySelectorAll("go-field").forEach(m=>m.replaceChildren())}function f(){return a?!0:(a=e.$$host.querySelector("go-personalization-form"),a?(l=a.cloneNode(!0),d(l),c=new Comment("go-personalization-form-anchor"),a.after(c),!0):(console.warn("[personalization] No <go-personalization-form> supplied"),!1))}function p(g){if(!f()||!a||!l||!c)return;const m=a.parentElement;if(!m)return;const b=Math.max(g,1),k=Array.from(m.querySelectorAll("go-personalization-form"));for(;k.length<b;){const T=l.cloneNode(!0);d(T),m.insertBefore(T,c),k.push(T)}for(;k.length>b;){const T=k.pop();T&&T!==a&&T.remove()}const D=s.ticketSale?.personalizations??[];k.forEach((T,P)=>{const A=D[P];A&&(T.dataset.personalizationId=String(A.id))}),u=b}Sn(()=>{f(),e.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),_e(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==u&&p(m)});var v={details:s,get token(){return r()},set token(g){r(g),y()},get ticketSaleId(){return n()},set ticketSaleId(g){n(g),y()}};return re(v)}customElements.define("go-annual-ticket-personalization-form",ne(lT,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));class cT{constructor(e,r){this.formId=e,this.form=r}#e=le(Be([]));#t=C(()=>Cu(this.fields)==0);get isValid(){return h(this.#t)}set isValid(e){M(this.#t,e)}#r=le();get successMessage(){return h(this.#r)}set successMessage(e){M(this.#r,e,!0)}get formData(){function e(i){return Eb(i)||Sb(i)?i:i==="true"||i==="false"?i==="true":!Number.isNaN(+i)&&i.trim()!==""?+i:i}const r=this.fields.filter(i=>i!==void 0).filter(i=>i.type!=="file").filter(i=>i.value!=="");return Object.fromEntries(r.map(i=>[i.apiKey,e(i.value)]))}fieldValue(e){return this.fields.find(r=>r.key===e)?.value}get apiErrors(){return h(this.#e)}set apiErrors(e){if(this.fields.forEach(r=>r.apiErrors=[]),Zc(e)){M(this.#e,e,!0);return}if(e.errors&&Zc(e.errors)&&M(this.#e,e.errors,!0),xb(e.error)){M(this.#e,[e.error],!0);return}for(const[r,n]of Object.entries(e)){if(r==="full_messages"||r==="success"||r==="errors")continue;const i=this.fields.find(s=>s.apiKey===r);if(!i){console.error(`(set apiErrors) Field with API key ${r} not found`);continue}i.apiErrors=n}}validateForm(){this.fields.forEach(e=>this.validateField(e))}validateField(e){if(e.validate(),e.apiKey==="password_confirmation"){const r=this.fields.find(n=>n.apiKey==="password");(!r||r&&e.value!==r.value)&&e.errors.push("user.fieldErrors.passwordMatch")}else if(e.apiKey==="email_confirmation"){const r=this.fields.find(n=>n.apiKey==="email");(!r||r&&e.value!==r.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(r=>r.closest("go-form")===e).map(r=>r.getField?.()).filter(r=>r)}toString(){return`Form: ${this.formId}, Fields: [${this.fields.map(e=>e.key).join(", ")}], Data: ${JSON.stringify(this.formData)}`}fill(e){const r=this.fields;Object.entries(e).forEach(([n,i])=>{const s=r.find(o=>o.apiKey===n);if(!s){console.warn(`(FormDetails.fill) Field with API key ${n} not found.`);return}if(s.type==="select"&&!s.options?.().find(o=>o.value===i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);if(s.type==="checkbox"&&![!0,!1].includes(i))throw new Error(`(FormDetails.fill) Field ${n} has invalid value: ${i}`);s.value=i})}}const Nm="go-form-details",uT=fs(Nm),vs=hs(Nm);function ui(t,e,r){const n=t.firstElementChild||void 0;if(t.children?.length===1&&n?.tagName.toLowerCase()===e)return n;const i=document.createElement(e);r&&Object.entries(r).forEach(([o,a])=>{typeof a=="boolean"?a&&i.setAttribute(o,""):i.setAttribute(o,a)});const s=document.createDocumentFragment();for(;t.firstChild;)s.appendChild(t.firstChild);return i.appendChild(s),t.replaceChildren(i),i}var dT=q("<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 fT(t,e){te(e,!0);let r=_(e,"formId",7),n=_(e,"custom",7);const i=new cT(r(),e.$$host);uT(e.$$host,i);async function s(u){u.preventDefault(),u.stopPropagation(),i.validateForm(),i?.form?.dispatchEvent(new Event("go-after-validation",u)),i.isValid&&(i.apiErrors={},i?.form?.dispatchEvent(new Event("go-submit",u)),e.$$host.dispatchEvent(new Event("submit",{bubbles:!0,composed:!0})))}Sn(()=>{const u=ui(e.$$host,"form",{novalidate:!0});u.addEventListener("submit",s),i.form=u});var o={details:i,get formId(){return r()},set formId(u){r(u),y()},get custom(){return n()},set custom(u){n(u),y()}},a=H(),l=L(a);{var c=u=>{var d=dT(),f=L(d),p=ee(f,2),v=ee(p,2),g=$(v,!0);I(v),ce(m=>se(g,m),[()=>S.t(er.getFormOptions(r())?.submitLabel||"Submit")]),w(u,d)};de(l,u=>{n()||u(c)})}return w(t,a),re(o)}customElements.define("go-form",ne(fT,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var hT=q("<go-form></go-form>",2);function pT(t,e){te(e,!0);let r=_(e,"custom",7,!1);er.defineForm({id:"passwordReset",submitLabel:"user.passwordReset.actions.requestPasswordReset",fields:[{key:"email",required:!0}]});async function n(o){const l=o.target.details,c=await S.passwordReset(l.formData);c.data?(e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),l.successMessage=c.data.message,l.apiErrors=[]):l.apiErrors=c.error.errors}var i={get custom(){return r()},set custom(o=!1){r(o),y()}},s=hT();return Ei(s,"formId","passwordReset"),ce(()=>Ei(s,"custom",r())),Ec("submit",s,n),w(t,s),re(i)}customElements.define("go-password-reset",ne(pT,{custom:{}},[],[]));function mT(t,e){te(e,!0),er.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=_(e,"custom",7,!1);async function n(s){const a=s.target.details,l=await S.signIn(a.formData);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}ui(e.$$host,"go-form",{"form-id":"signIn",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-sign-in",ne(mT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function gT(t,e){te(e,!0);let r=_(e,"custom",7,!1);er.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(s){const a=s.target.details,l=await S.signUp(a.formData,!1);l.data?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error.errors}ui(e.$$host,"go-form",{"form-id":"signUp",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-sign-up",ne(gT,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function vT(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(t&&typeof t=="object"){const r=Object.values(t).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return e}function Fm(t){return"quantity"in t&&t.quantity!==void 0?t.quantity:t.quantities}function yT(t){return vT(Fm(t),0)}function _T(t){const e=Fm(t);if(e&&typeof e=="object"){const r=Object.keys(e);if(r.length>0)return Number(r[0])}}function bT(t,e){const r=us(),n=new Set;return t.coupons.forEach(i=>r.addCoupon(i)),e.forEach(i=>{const s=i.attributes,o=_T(s),a=t.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||So(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}s.coupon&&(r.addCoupon(s.coupon),n.add(s.coupon)),r.addItem(wT(a,s))}),{cart:r,appliedCoupons:n}}function wT(t,e){const r=yT(e),n=e.price_cents??t.product.price_cents,i=t.product.price_cents,s=n<i,o={...t.product,price_cents:n};return xt(o,{quantity:r,time:t.time,display:{discounted:s,reference_uuid:t.uuid,originalPrice:i}})}class kT{#e=le();get displayCart(){return h(this.#e)}set displayCart(e){M(this.#e,e,!0)}#t=le(Be(new Set));get appliedCoupons(){return h(this.#t)}set appliedCoupons(e){M(this.#t,e,!0)}#r=le(!1);get preview(){return h(this.#r)}set preview(e){M(this.#r,e,!0)}get totalPriceCents(){return this.displayCart?.totalPriceCents??0}get subtotalPriceCents(){return S.cart?.totalPriceCents??0}get discountedAmountCents(){return Math.max(0,this.subtotalPriceCents-this.totalPriceCents)}get isDiscounted(){return this.discountedAmountCents>0}async calculateDisplayCart(){const e=S.cart;if(e)try{const{items:r,coupons:n}=e.orderData(),i=await S.createCart({items:r,coupons:n});if(!i||"error"in i){i&&"error"in i&&console.error("(go-cart) Unable to fetch discounted cart data",i.error),this.displayCart=e;return}const s=bT(e,i.data.items??[]);this.displayCart=s.cart,this.appliedCoupons=s.appliedCoupons}catch(r){console.error("(go-cart) Unable to fetch discounted cart data",r),this.displayCart=e}}}const Rm="go-cart-details",ST=fs(Rm),ys=hs(Rm);var xT=q('<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),ET=q('<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 Lm(t,e){te(e,!0);let r=_(e,"cartItem",7);if(!So(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(p){r(p),y()}},s=ET(),o=L(s),a=$(o),l=$(a,!0);I(a);var c=ee(a),u=$(c,!0);I(c),I(o);var d=ee(o);{var f=p=>{var v=xT(),g=L(v),m=$(g,!0);I(g);var b=ee(g),k=$(b,!0);I(b),ce((D,T)=>{se(m,D),se(k,T)},[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale),()=>wo(r().time)]),w(p,v)};de(d,p=>{r().time&&p(f)})}return ce(()=>{se(l,n.event_title),se(u,n.title)}),w(t,s),re(i)}ne(Lm,{cartItem:{}},[],[],{mode:"open"});var TT=q('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),AT=q('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),CT=q('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function zm(t,e){te(e,!0);let r=_(e,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=CT(),s=L(i),o=$(s,!0);I(s);var a=ee(s,2);{var l=c=>{var u=AT(),d=L(u),f=$(d,!0);I(d);var p=ee(d,2);{var v=g=>{var m=TT(),b=$(m,!0);I(m),ce(k=>se(b,k),[()=>wo(r().time)]),w(g,m)};de(p,g=>{r().product.subtype==="timeslot"&&g(v)})}ce(g=>se(f,g),[()=>ko(r().time,{month:"numeric",day:"numeric"},S.locale)]),w(c,u)};de(a,c=>{r().time&&c(l)})}return ce(()=>se(o,r().product.title)),w(t,i),re(n)}ne(zm,{cartItem:{}},[],[],{mode:"open"});function Zm(t,e,r={floor:0}){const{floor:n}=r;if(e===0||e===n)return[il(n)];if(e<t)return t>n?[il(t)]:[];const i=Math.max(t,n),s=[il(n)];for(let o=i;o<=e;o++)o!==n&&s.push(il(o));return s}function il(t){return{value:t,label:t.toString()}}var OT=q('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),DT=q('<span class="go-cart-item-price-discounted"> </span>'),IT=q("<span> </span>"),PT=q("<option> </option>"),MT=q('<select class="go-cart-item-select"></select>'),$T=q('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),NT=q('<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>');function Vm(t,e){te(e,!0);let r=_(e,"displayItem",7),n=_(e,"displayCart",7),i=_(e,"preview",7),s=le(void 0);const o=C(()=>S.cart?.items.find(v=>v.uuid===(r().display?.reference_uuid??r().uuid))),a=us();_e(()=>{S.cart?.items.map(v=>v.quantity),Ge(()=>{M(s,S.capacityManager.capacity(n(),r(),a),!0)})});function l(v){const g=v;if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const m=parseInt(g.value,10);h(o).quantity=Math.max(0,h(o).quantity-r().quantity+m)}function c(){if(!h(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=Math.max(0,h(o).quantity-r().quantity);v===0?S.cart?.deleteItem(h(o)):h(o).quantity=v}var u={get displayItem(){return r()},set displayItem(v){r(v),y()},get displayCart(){return n()},set displayCart(v){n(v),y()},get preview(){return i()},set preview(v){i(v),y()}},d=H(),f=L(d);{var p=v=>{var g=NT(),m=$(g),b=$(m),k=$(b);{var D=B=>{zm(B,{get cartItem(){return r()}})},T=B=>{var W=H(),Y=L(W);{var ae=X=>{Lm(X,{get cartItem(){return r()}})};de(Y,X=>{r().product.type==="Event"&&X(ae)},!0)}w(B,W)};de(k,B=>{r().product.type==="Ticket"?B(D):B(T,!1)})}I(b);var P=ee(b,2),A=$(P);{var O=B=>{var W=OT(),Y=L(W),ae=$(Y,!0);I(Y);var X=ee(Y,2),ye=$(X,!0);I(X),ce((V,pe)=>{se(ae,V),se(ye,pe)},[()=>Sr(r().display.originalPrice),()=>Sr(r().final_price_cents)]),w(B,W)},F=B=>{var W=DT(),Y=$(W,!0);I(W),ce(ae=>se(Y,ae),[()=>Sr(r().final_price_cents)]),w(B,W)};de(A,B=>{r().display?.discounted?B(O):B(F,!1)})}I(P);var N=ee(P,2),j=$(N);{var G=B=>{var W=IT(),Y=$(W,!0);I(W),ce(()=>se(Y,r().quantity)),w(B,W)},Z=B=>{var W=MT();W.__change=Y=>l(Y.target),Ke(W,21,()=>Zm(h(s).min,h(s).max,{floor:1}),Y=>Y.value,(Y,ae)=>{var X=PT(),ye=$(X,!0);I(X);var V={};ce(()=>{Ic(X,r().quantity===h(ae).value),se(ye,h(ae).label),V!==(V=h(ae).value)&&(X.value=(X.__value=h(ae).value)??"")}),w(Y,X)}),I(W),ce(Y=>Te(W,"aria-label",Y),[()=>S.t("cart.content.table.edit")]),w(B,W)};de(j,B=>{i()?B(G):B(Z,!1)})}I(N);var ue=ee(N,2);{var me=B=>{var W=$T(),Y=$(W);Y.__click=c,I(W),ce(ae=>Te(Y,"aria-label",ae),[()=>S.t("cart.item.remove")]),w(B,W)};de(ue,B=>{i()||B(me)})}var K=ee(ue,2),J=$(K,!0);I(K),I(m),I(g),ce(B=>se(J,B),[()=>Sr(r().total_price_cents)]),w(v,g)};de(f,v=>{h(s)&&v(p)})}return w(t,d),re(u)}Hr(["change","click"]),ne(Vm,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var FT=q('<li class="go-cart-header-remove"></li>'),RT=q('<li class="go-cart-item"><!></li>'),LT=q('<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 zT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=LT(),c=$(l),u=$(c),d=$(u),f=$(d,!0);I(d);var p=ee(d,2),v=$(p,!0);I(p);var g=ee(p,2),m=$(g,!0);I(g);var b=ee(g,2);{var k=A=>{var O=FT();w(A,O)};de(b,A=>{h(n).preview||A(k)})}var D=ee(b,2),T=$(D,!0);I(D),I(u),I(c);var P=ee(c,2);Ke(P,17,()=>h(n).displayCart.items,A=>A.uuid,(A,O)=>{var F=RT(),N=$(F);Vm(N,{get displayItem(){return h(O)},get displayCart(){return h(n).displayCart},get preview(){return h(n).preview}}),I(F),w(A,F)}),I(l),ce((A,O,F,N)=>{se(f,A),se(v,O),se(m,F),se(T,N)},[()=>S.t("cart.content.table.desc"),()=>S.t("cart.content.table.price"),()=>S.t("cart.content.table.quantity"),()=>S.t("cart.content.table.total")]),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-items",ne(zT,{},[],[]));var ZT=q('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),VT=q('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),UT=q('<ol data-testid="cart-coupons"></ol>');function BT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=UT();Ke(l,20,()=>h(n).displayCart.coupons,c=>c,(c,u)=>{var d=VT();let f;var p=$(d),v=$(p),g=$(v),m=$(g,!0);I(g);var b=ee(g,2);{var k=D=>{var T=ZT(),P=$(T);P.__click=()=>S.cart?.removeCoupon(u),I(T),ce(A=>Te(P,"aria-label",A),[()=>S.t("cart.coupons.remove")]),w(D,T)};de(b,D=>{h(n).preview||D(k)})}I(v),I(p),I(d),ce(D=>{f=Qt(d,1,"go-cart-coupon",null,f,D),se(m,u)},[()=>({"go-cart-coupon-inactive":!h(n).appliedCoupons.has(u)})]),w(c,d)}),I(l),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.coupons.length>0&&a(o)})}w(t,i),re()}Hr(["click"]),customElements.define("go-cart-coupons",ne(BT,{},[],[]));var jT=q('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function qT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=jT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).totalPriceCents)]),w(a,l)};de(s,a=>{h(n)&&h(n).displayCart&&h(n).displayCart.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-total-amount",ne(qT,{},[],[]));function WT(t,e){te(e,!0);const r=_(e,"preview",7,!1),n=new kT;ST(e.$$host,n),_e(()=>{n.preview=r()}),_e(()=>{S.cart&&(S.cart.items.map(o=>o.uuid+":"+o.quantity+":"+o.time),S.cart.coupons.join("|"),Ge(()=>n.calculateDisplayCart()))});async function i(){const o=e.$$host.querySelectorAll("go-coupon-redemption");let a=!0;for(const l of o){const c=await l.flush?.();c&&!c.success&&(a=!1)}return a}e.$$host.addEventListener("click",async o=>{const a=o.target.closest("go-submit");if(!a)return;const l=a.closest("go-form");if(l&&e.$$host.contains(l))return;const c=await i();e.$$host.dispatchEvent(new CustomEvent("go-submit",{detail:{ok:c},bubbles:!0,composed:!0}))});var s={get preview(){return r()},set preview(o=!1){r(o),y()}};return re(s)}customElements.define("go-cart",ne(WT,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var HT=q('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function KT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=HT(),c=$(l,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).subtotalPriceCents)]),w(a,l)};de(s,a=>{h(n)&&S.cart?.items.length&&a(o)})}w(t,i),re()}customElements.define("go-cart-subtotal-amount",ne(KT,{},[],[]));var GT=q('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function YT(t,e){te(e,!0);const r=ys(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=GT(),c=ee($(l),1,!0);I(l),ce(u=>se(c,u),[()=>Sr(h(n).discountedAmountCents)]),w(a,l)};de(s,a=>{h(n)&&h(n).discountedAmountCents>0&&a(o)})}w(t,i),re()}customElements.define("go-cart-discounted-amount",ne(YT,{},[],[]));function JT(t,e){te(e,!0),ui(e.$$host,"go-if",{when:"data.cart.items.length === 0"}),re()}customElements.define("go-cart-empty",ne(JT,{},[],[]));function QT(t,e){te(e,!0);let r=C(()=>S.cart?.items.length);$t();var n=Jt();ce(()=>se(n,h(r))),w(t,n),re()}customElements.define("go-cart-counter",ne(QT,{},[],[]));function XT(t,e){te(e,!0);let r=_(e,"custom",7,!1),n=C(()=>S.cart);er.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}]}),ui(e.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),e.$$host.addEventListener("submit",async s=>{const o=s.target;if(!h(n))return;const a=await S.signUp(o.details.formData,!0);if(a.error){o.details.apiErrors=a.error.errors;return}const l=o.details.fieldValue("paymentMode");h(n).paymentModeId=l==null?void 0:String(l);const c=await S.checkout(h(n).orderData());if(c.error){o.details.apiErrors=c.error;return}const u=at.config.forms.checkoutGuest?.beforeSubmit;u&&await u(o.details.formData);const d=c.data.meta.payment_url;at.config.navigateTo?.(d)});var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-checkout-form",ne(XT,{custom:{}},[],[]));const e1="TokenActions::ApplyOrderDiscount";async function t1(t){if(!S.cart)throw new Error("(go-coupon-redemption): cart not found");const e=await S.asyncFetch(()=>S.getCouponSaleByBarcode(t));return e?.is_valid?e.value_action===e1?(S.cart.addCoupon(t),{success:!0}):e.is_voucher_for?r1(t,e):Ou([S.t("cart.coupon.form.errors.notValid")]):Ou([S.t("cart.coupon.form.errors.notValid")])}async function r1(t,e){const n=(await S.asyncFetch(()=>S.tickets({"by_ticket_ids[]":[e.is_voucher_for]}))).find(s=>s.id===e.is_voucher_for);if(!n)return Ou([S.t("cart.coupon.form.errors.error")]);const i={...n,price_cents:0};return S.cart.addItem(xt(Wa(i),{quantity:1})),S.cart.addCoupon(t),{success:!0}}function Ou(t){return{success:!1,errors:t}}var n1=q("<go-form></go-form>",2);function i1(t,e){te(e,!0),er.defineForm({id:"couponRedemption",submitLabel:"cart.coupon.form.submit",fields:[{key:"token",required:!0}]});async function r(a){const l=a.details.fields.find(d=>d.key==="token"),c=(a.details.fieldValue("token")??"").trim().toUpperCase();if(!c)return{success:!0};const u=await t1(c);return u.success?(l&&(l.value=""),a.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})),u):(a.details.apiErrors=u.errors,u)}async function n(a){await r(a.target)}async function i(){const a=e.$$host.querySelector("go-form");return a?.details?r(a):{success:!0}}var s={flush:i},o=n1();return Ei(o,"formId","couponRedemption"),Ec("submit",o,n),w(t,o),re(s)}customElements.define("go-coupon-redemption",ne(i1,{},[],["flush"])),p_();class s1{#e=le();get campaign(){return h(this.#e)}set campaign(e){M(this.#e,e,!0)}#t=le();get amount(){return h(this.#t)}set amount(e){M(this.#t,e,!0)}selectCampaign=e=>{this.campaign=e,document.getElementsByClassName("donation-actions")[0]?.scrollIntoView()};addDonationToCart=()=>{if(this.amount===void 0||this.campaign===void 0)return;const e={value:this.amount,campaign_id:this.campaign.id};let r=JSON.parse(localStorage.getItem("201600627v4donations")||"[]");Ti(r.filter(i=>i.campaign_id=e.campaign_id),i=>i.value)+e.value>this.campaign.guest_limit&&this.campaign.guest_limit>0&&(!S.currentUser?.isAuthenticated||S.currentUser.isGuest)?this.skipDonation():(r.push(e),localStorage.setItem("201600627v4donations",JSON.stringify(r)),localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart()))};skipDonation=()=>{localStorage.setItem("skipDonation","true"),window.history.pushState(null,"",S.urls.cart()),window.location.replace(S.urls.cart())}}const Vt=new s1;var o1=q('<img alt="logo"/>'),a1=q('<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 Um(t,e){te(e,!0);let r=_(e,"campaign",7);const n=C(()=>r().translations);var i={get campaign(){return r()},set campaign(g){r(g),y()}},s=a1();let o;s.__click=()=>Vt.selectCampaign(r()),s.__keydown=g=>{g.key==="Enter"&&Vt.selectCampaign(r())};var a=$(s),l=$(a);{var c=g=>{var m=o1();ce(b=>Te(m,"src",b),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),w(g,m)};de(l,g=>{r().picture.thumbnail&&g(c)})}I(a);var u=ee(a,2),d=$(u),f=$(d,!0);I(d);var p=ee(d,2),v=$(p,!0);return I(p),I(u),I(s),ce(()=>{o=Qt(s,1,"go-donation-campaign",null,o,{selected:Vt.campaign?.id===r()?.id}),se(f,h(n)["donations.headline"]),se(v,h(n)["donations.shop.info"])}),w(t,s),re(i)}Hr(["click","keydown"]),ne(Um,{campaign:{}},[],[],{mode:"open"});function l1(t,e){return e=="CHF"?new Intl.NumberFormat("de-CH",{style:"currency",currency:e}).format(t):new Intl.NumberFormat("de-DE",{style:"currency",currency:e}).format(t)}function Dn(t){if(!t)return;const e=t.split(",").map(r=>r.trim()).map(Number).filter(r=>!isNaN(r)&&r>0);return e.length>0?e:void 0}var c1=q("<button> </button>"),u1=q('<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>'),d1=q('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Bm(t,e){te(e,!0);const r=Vt.campaign?.guest_limit/100;let n=le(void 0);function i(f){Vt.amount=f,M(n,null)}function s(f){const p=document.getElementById("donationForm");p.checkValidity()?Vt.amount=f.target.valueAsNumber*100:(Vt.amount=void 0,p.reportValidity())}var o=d1(),a=$(o),l=$(a,!0);I(a);var c=ee(a,2);Ke(c,20,()=>Vt.campaign?.options,f=>f,(f,p)=>{var v=c1();let g;v.__click=()=>i(p);var m=$(v,!0);I(v),ce(b=>{g=Qt(v,1,"btn btn-default",null,g,{selected:Vt.amount===p}),se(m,b)},[()=>l1(p/100,S.currency)]),w(f,v)}),I(c);var u=ee(c,2);{var d=f=>{var p=u1(),v=$(p),g=$(v),m=$(g,!0);I(g);var b=ee(g,2);Ta(b),b.__input=s,I(v),I(p),ce((k,D)=>{se(m,k),Te(b,"max",r),Te(b,"placeholder",D),zh(b,h(n))},[()=>S.t("donations.selection.custom.label"),()=>S.t("donations.selection.custom.input.placeholder")]),w(f,p)};de(u,f=>{Vt.campaign?.free_donations&&f(d)})}I(o),ce(f=>se(l,f),[()=>S.t("donations.selection.title")]),w(t,o),re()}Hr(["click","input"]),ne(Bm,{},[],[],{mode:"open"});var f1=q('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function h1(t,e){te(e,!1),Sn(()=>{S.donations?.campaigns?.length==1&&Vt.selectCampaign(S.donations?.campaigns[0])}),Lc();var r=H(),n=L(r);{var i=s=>{var o=f1(),a=$(o);Ke(a,1,()=>S?.donations?.campaigns,g=>g.id,(g,m)=>{Um(g,{get campaign(){return h(m)}})});var l=ee(a,2);{var c=g=>{Bm(g,{})};de(l,g=>{Vt.campaign&&g(c)})}var u=ee(l,2),d=$(u);d.__click=function(...g){Vt.skipDonation?.apply(this,g)};var f=$(d,!0);I(d);var p=ee(d,2);p.__click=function(...g){Vt.addDonationToCart?.apply(this,g)};var v=$(p,!0);I(p),I(u),I(o),ce((g,m)=>{se(f,g),p.disabled=!Vt.amount,se(v,m)},[()=>S.t("donations.actions.continueWithoutDonation"),()=>S.t("donations.actions.addToCart")]),w(s,o)};de(n,s=>{S.donations&&S.donations.campaigns&&s(i)})}w(t,r),re()}Hr(["click"]),customElements.define("go-donations",ne(h1,{},[],[]));function p1(t){return typeof t=="function"}function Ao(t){return t!==null&&typeof t=="object"}const m1=["string","number","bigint","boolean"];function Du(t){return t==null||m1.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>Du(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const sl=Symbol("box"),jm=Symbol("is-writable");function R(t,e){const r=C(t);return e?{[sl]:!0,[jm]:!0,get current(){return h(r)},set current(n){e(n)}}:{[sl]:!0,get current(){return t()}}}function qm(t){return Ao(t)&&sl in t}function g1(t){return qm(t)?t:p1(t)?R(t):Nr(t)}function Nr(t){let e=le(Be(t));return{[sl]:!0,[jm]:!0,get current(){return h(e)},set current(r){M(e,r,!0)}}}function Wm(...t){return function(e){for(const r of t)if(r){if(e.defaultPrevented)return;typeof r=="function"?r.call(this,e):r.current?.call(this,e)}}}var Hm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,v1=/\n/g,y1=/^\s*/,_1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,b1=/^:\s*/,w1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,k1=/^[;\s]*/,S1=/^\s+|\s+$/g,x1=`
6
- `,Km="/",Gm="*",Ri="",E1="comment",T1="declaration";function A1(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(v1);g&&(r+=g.length);var m=v.lastIndexOf(x1);n=~m?v.length-m:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new o(v),c(),g}}function o(v){this.start=v,this.end={line:r,column:n},this.source=e.source}o.prototype.content=t;function a(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function l(v){var g=v.exec(t);if(g){var m=g[0];return i(m),t=t.slice(m.length),g}}function c(){l(y1)}function u(v){var g;for(v=v||[];g=d();)g!==!1&&v.push(g);return v}function d(){var v=s();if(!(Km!=t.charAt(0)||Gm!=t.charAt(1))){for(var g=2;Ri!=t.charAt(g)&&(Gm!=t.charAt(g)||Km!=t.charAt(g+1));)++g;if(g+=2,Ri===t.charAt(g-1))return a("End of comment missing");var m=t.slice(2,g-2);return n+=2,i(m),t=t.slice(g),n+=2,v({type:E1,comment:m})}}function f(){var v=s(),g=l(_1);if(g){if(d(),!l(b1))return a("property missing ':'");var m=l(w1),b=v({type:T1,property:Ym(g[0].replace(Hm,Ri)),value:m?Ym(m[0].replace(Hm,Ri)):Ri});return l(k1),b}}function p(){var v=[];u(v);for(var g;g=f();)g!==!1&&(v.push(g),u(v));return v}return c(),p()}function Ym(t){return t?t.replace(S1,Ri):Ri}function C1(t,e){let r=null;if(!t||typeof t!="string")return r;const n=A1(t),i=typeof e=="function";return n.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(r=r||{},r[o]=a)}),r}const O1=/\d/,D1=["-","_","/","."];function I1(t=""){if(!O1.test(t))return t!==t.toLowerCase()}function P1(t){const e=[];let r="",n,i;for(const s of t){const o=D1.includes(s);if(o===!0){e.push(r),r="",n=void 0;continue}const a=I1(s);if(i===!1){if(n===!1&&a===!0){e.push(r),r=s,n=a;continue}if(n===!0&&a===!1&&r.length>1){const l=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=l+s,n=a;continue}}r+=s,n=a,i=o}return e.push(r),e}function Jm(t){return t?P1(t).map(e=>$1(e)).join(""):""}function M1(t){return N1(Jm(t||""))}function $1(t){return t?t[0].toUpperCase()+t.slice(1):""}function N1(t){return t?t[0].toLowerCase()+t.slice(1):""}function Co(t){if(!t)return{};const e={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[Jm(n)]=i;return}if(n.startsWith("--")){e[n]=i;return}e[M1(n)]=i}return C1(t,r),e}function Oo(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function F1(t,e){const r=RegExp(t,"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,e):n}}const R1=F1(/[A-Z]/,t=>`-${t.toLowerCase()}`);function L1(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${R1(e)}: ${t[e]};`).join(`
7
- `)}function Do(t={}){return L1(t).replace(`
8
- `," ")}const z1=["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"],Z1=new Set(z1);function V1(t){return Z1.has(t)}function et(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];if(n){for(const i of Object.keys(n)){const s=e[i],o=n[i],a=typeof s=="function",l=typeof o=="function";if(a&&V1(i)){const c=s,u=o;e[i]=Wm(c,u)}else if(a&&l)e[i]=Oo(s,o);else if(i==="class"){const c=Du(s),u=Du(o);c&&u?e[i]=xa(s,o):c?e[i]=xa(s):u&&(e[i]=xa(o))}else if(i==="style"){const c=typeof s=="object",u=typeof o=="object",d=typeof s=="string",f=typeof o=="string";if(c&&u)e[i]={...s,...o};else if(c&&f){const p=Co(o);e[i]={...s,...p}}else if(d&&u){const p=Co(s);e[i]={...p,...o}}else if(d&&f){const p=Co(s),v=Co(o);e[i]={...p,...v}}else c?e[i]=s:u?e[i]=o:d?e[i]=s:f&&(e[i]=o)}else e[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(n)){const s=e[i],o=n[i];e[i]=o!==void 0?o:s}}}return typeof e.style=="object"&&(e.style=Do(e.style).replaceAll(`
9
- `," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}const Qm=Do({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%)"}),Xm=typeof window<"u"?window:void 0;function U1(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class B1 extends Map{#e=new Map;#t=le(0);#r=le(0);#n=kn||-1;constructor(e){if(super(),e){for(var[r,n]of e)super.set(r,n);this.#r.v=super.size}}#i(e){return kn===this.#n?le(e):Gn(e)}has(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else return h(this.#t),!1}return h(n),!0}forEach(e,r){this.#s(),super.forEach(e,r)}get(e){var r=this.#e,n=r.get(e);if(n===void 0){var i=super.get(e);if(i!==void 0)n=this.#i(0),r.set(e,n);else{h(this.#t);return}}return h(n),super.get(e)}set(e,r){var n=this.#e,i=n.get(e),s=super.get(e),o=super.set(e,r),a=this.#t;if(i===void 0)i=this.#i(0),n.set(e,i),M(this.#r,super.size),Wr(a);else if(s!==r){Wr(i);var l=a.reactions===null?null:new Set(a.reactions),c=l===null||!i.reactions?.every(u=>l.has(u));c&&Wr(a)}return o}delete(e){var r=this.#e,n=r.get(e),i=super.delete(e);return n!==void 0&&(r.delete(e),M(this.#r,super.size),M(n,-1),Wr(this.#t)),i}clear(){if(super.size!==0){super.clear();var e=this.#e;M(this.#r,0);for(var r of e.values())M(r,-1);Wr(this.#t),e.clear()}}#s(){h(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var n=this.#i(0);e.set(r,n)}}for([,n]of this.#e)h(n)}keys(){return h(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return h(this.#r),super.size}}class j1{#e;#t;constructor(e={}){const{window:r=Xm,document:n=r?.document}=e;r!==void 0&&(this.#e=n,this.#t=fc(i=>{const s=wt(r,"focusin",i),o=wt(r,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#t?.(),this.#e?U1(this.#e):null}}new j1;function q1(t){return typeof t=="function"}class In{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return v_(this.#t)}get(){const e=Ff(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const r=Ff(this.#t);return r===void 0?e:r}set(e){return g_(this.#t,e)}}function W1(t,e){switch(t){case"post":_e(e);break;case"pre":bc(e);break}}function eg(t,e,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(t)?[]:void 0;W1(e,()=>{const a=Array.isArray(t)?t.map(c=>c()):t();if(!s){s=!0,o=a;return}const l=Ge(()=>r(a,o));return o=a,l})}function dt(t,e,r){eg(t,"post",e,r)}function H1(t,e,r){eg(t,"pre",e,r)}dt.pre=H1;function tg(t){return q1(t)?t():t}class K1{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=C(()=>(h(this.#o)?.(),this.getSize().width));#a=C(()=>(h(this.#o)?.(),this.getSize().height));#o=C(()=>{const e=tg(this.#n);if(e)return fc(r=>{if(!this.#i)return;const n=new this.#i.ResizeObserver(i=>{this.#t=!0;for(const s of i){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#e.width=a.reduce((l,c)=>Math.max(l,c.inlineSize),0),this.#e.height=a.reduce((l,c)=>Math.max(l,c.blockSize),0)}r()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,r={box:"border-box"}){this.#i=r.window??Xm,this.#r=r,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=tg(this.#n);if(!e||!this.#i)return;const r=e.offsetWidth,n=e.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:n};const i=this.#i.getComputedStyle(e),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),l=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),c=r-s-a,u=n-o-l;return{width:c,height:u}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return h(this.#o)?.(),this.getSize()}get width(){return h(this.#s)}get height(){return h(this.#a)}}function _s(t){_e(()=>()=>{t()})}function G1(t,e){return setTimeout(e,t)}function Io(t){xh().then(t)}const Y1=1,J1=9,Q1=11;function Iu(t){return Ao(t)&&t.nodeType===Y1&&typeof t.nodeName=="string"}function rg(t){return Ao(t)&&t.nodeType===J1}function X1(t){return Ao(t)&&t.constructor?.name==="VisualViewport"}function eA(t){return Ao(t)&&t.nodeType!==void 0}function ng(t){return eA(t)&&t.nodeType===Q1&&"host"in t}function tA(t,e){if(!t||!e||!Iu(t)||!Iu(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&ng(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ol(t){return rg(t)?t:X1(t)?t.document:t?.ownerDocument??document}function ig(t){return ng(t)?ig(t.host):rg(t)?t.defaultView??window:Iu(t)?t.ownerDocument?.defaultView??window:window}function rA(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class bs{element;#e=C(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return h(this.#e)}set root(e){M(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>ol(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>rA(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,r)=>this.getWindow().setTimeout(e,r);clearTimeout=e=>this.getWindow().clearTimeout(e)}function ct(t,e){return{[G_()]:r=>qm(t)?(t.current=r,Ge(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e?.(null))}):(t(r),Ge(()=>e?.(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e?.(null))})}}function Fr(t){return t?"true":"false"}function Pu(t){return t?"true":void 0}function We(t){return t?"":void 0}function sg(t){return t?"open":"closed"}class nA{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${this.#t}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}function al(t){const e=new nA(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}const ll="ArrowDown",Po="ArrowLeft",Mo="ArrowRight",cl="ArrowUp",og="Backspace",Mu="Enter",iA="Escape",$u=" ",ul="Tab",Nu="a",ag="P",Fu="A",sA="p",Pn=typeof document<"u",lg=oA();function oA(){return Pn&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Rr(t){return t instanceof HTMLElement}function $o(t){return t instanceof Element}function aA(t){return t instanceof Element||t instanceof SVGElement}function dl(t){return!Number.isNaN(Number(t))&&!Number.isNaN(Number.parseFloat(t))}function di(t){return t===null}function fl(t){return t.pointerType==="touch"}function lA(t){return t!==null}class cA{#e;#t=null;constructor(e){this.#e=e,_s(()=>this.#r())}#r(){this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null)}run(e){this.#r();const r=this.#e.ref.current;if(r){if(typeof r.getAnimations!="function"){this.#n(e);return}this.#t=window.requestAnimationFrame(()=>{const n=r.getAnimations();if(n.length===0){this.#n(e);return}Promise.allSettled(n.map(i=>i.finished)).then(()=>{this.#n(e)})})}}#n(e){const r=()=>{e()};this.#e.afterTick?Io(r):r()}}class cg{#e;#t;#r;#n=le(!1);constructor(e){this.#e=e,M(this.#n,e.open.current,!0),this.#t=e.enabled??!0,this.#r=new cA({ref:this.#e.ref,afterTick:this.#e.open}),dt(()=>this.#e.open.current,r=>{r&&M(this.#n,!0),this.#t&&this.#r.run(()=>{r===this.#e.open.current&&(this.#e.open.current||M(this.#n,!1),this.#e.onComplete?.())})})}get shouldRender(){return h(this.#n)}}function Ae(){}function Fe(t,e){return`bits-${t}`}const uA=new In("BitsConfig");function dA(){const t=new fA(null,{});return uA.getOr(t).opts}class fA{opts;constructor(e,r){const n=hA(e,r);this.opts={defaultPortalTo:n(i=>i.defaultPortalTo),defaultLocale:n(i=>i.defaultLocale)}}}function hA(t,e){return r=>R(()=>{const i=r(e)?.current;if(i!==void 0)return i;if(t!==null)return r(t.opts)?.current})}function pA(t,e){return r=>{const n=dA();return R(()=>{const i=r();if(i!==void 0)return i;const s=t(n).current;return s!==void 0?s:e})}}const ug=pA(t=>t.defaultLocale,"en");function dg(t,e=500){let r=null;const n=(...i)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...i)},e)};return n.destroy=()=>{r!==null&&(clearTimeout(r),r=null)},n}function fg(t,e){return t===e||t.contains(e)}function hg(t){return t?.ownerDocument??document}function mA(t,e){const{clientX:r,clientY:n}=t,i=e.getBoundingClientRect();return r<i.left||r>i.right||n<i.top||n>i.bottom}var pg=["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] *)"],hl=pg.join(","),mg=typeof Element>"u",Li=mg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pl=!mg&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},ml=function(e,r){var n;r===void 0&&(r=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=i===""||i==="true",o=s||r&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ml(e.parentNode));return o},gA=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},gg=function(e,r,n){if(ml(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(hl));return r&&Li.call(e,hl)&&i.unshift(e),i=i.filter(n),i},gl=function(e,r,n){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!ml(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=gl(l,!0,n);n.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{var u=Li.call(o,hl);u&&n.filter(o)&&(r||!e.includes(o))&&i.push(o);var d=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),f=!ml(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(d&&f){var p=gl(d===!0?o.children:d.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},vg=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},yg=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||gA(e))&&!vg(e)?0:e.tabIndex},vA=function(e,r){var n=yg(e);return n<0&&r&&!vg(e)?0:n},yA=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},_g=function(e){return e.tagName==="INPUT"},_A=function(e){return _g(e)&&e.type==="hidden"},bA=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},wA=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},kA=function(e){if(!e.name)return!0;var r=e.form||pl(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=wA(i,e.form);return!s||s===e},SA=function(e){return _g(e)&&e.type==="radio"},xA=function(e){return SA(e)&&!kA(e)},EA=function(e){var r,n=e&&pl(e),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==e){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var c,u,d;n=pl(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((u=i)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return s},bg=function(e){var r=e.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},TA=function(e,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var o=Li.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Li.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var c=e.parentElement,u=pl(e);if(c&&!c.shadowRoot&&i(c)===!0)return bg(e);e.assignedSlot?e=e.assignedSlot:!c&&u!==e.ownerDocument?e=u.host:e=c}e=l}if(EA(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return bg(e);return!1},AA=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return Li.call(r,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}r=r.parentElement}return!1},vl=function(e,r){return!(r.disabled||_A(r)||TA(r,e)||bA(r)||AA(r))},Ru=function(e,r){return!(xA(r)||yg(r)<0||!vl(e,r))},CA=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},wg=function(e){var r=[],n=[];return e.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=vA(a,o),c=o?wg(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(yA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},OA=function(e,r){r=r||{};var n;return r.getShadowRoot?n=gl([e],r.includeContainer,{filter:Ru.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:CA}):n=gg(e,r.includeContainer,Ru.bind(null,r)),wg(n)},DA=function(e,r){r=r||{};var n;return r.getShadowRoot?n=gl([e],r.includeContainer,{filter:vl.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=gg(e,r.includeContainer,vl.bind(null,r)),n},IA=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Li.call(e,hl)===!1?!1:Ru(r,e)},PA=pg.concat("iframe:not([inert]):not([inert] *)").join(","),MA=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Li.call(e,PA)===!1?!1:vl(r,e)};function $A(t,e){const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}function Lu(t,e){return t>=0&&t<e.length}const NA="data-context-menu-trigger",FA="data-context-menu-content";al({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]}),globalThis.bitsDismissableLayers??=new Map;class zu{static create(e){return new zu(e)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Ae;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#a=e.onFocusOutside,_e(()=>{this.#s=hg(this.opts.ref.current)});let r=Ae;const n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),r()};dt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return G1(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#c())}),n}),_s(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#o(),r()})}#l=e=>{e.defaultPrevented||this.opts.ref.current&&Io(()=>{!this.opts.ref.current||this.#m(e.target)||e.target&&!this.#i&&this.#a.current?.(e)})};#c(){return Oo(wt(this.#s,"pointerdown",Oo(this.#f,this.#p),{capture:!0}),wt(this.#s,"pointerdown",Oo(this.#h,this.#u)),wt(this.#s,"focusin",this.#l))}#d=e=>{let r=e;r.defaultPrevented&&(r=kg(e)),this.#e.current(e)};#u=dg(e=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(e,this.opts.ref.current)||zA(e,this.opts.ref.current);if(!this.#n||this.#v()||!r){this.#o();return}let n=e;if(n.defaultPrevented&&(n=kg(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}e.pointerType==="touch"?(this.#o(),this.#o=wt(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#r[e.type]=!0};#h=e=>{this.#r[e.type]=!1};#p=()=>{this.opts.ref.current&&(this.#n=LA(this.opts.ref.current))};#m=e=>this.opts.ref.current?fg(this.opts.ref.current,e):!1;#g=dg(()=>{for(const e in this.#r)this.#r[e]=!1;this.#n=!1},20);#v(){return Object.values(this.#r).some(Boolean)}#y=()=>{this.#i=!0};#_=()=>{this.#i=!1};props={onfocuscapture:this.#y,onblurcapture:this.#_}}function RA(t=[...globalThis.bitsDismissableLayers]){return t.findLast(([e,{current:r}])=>r==="close"||r==="ignore")}function LA(t){const e=[...globalThis.bitsDismissableLayers],r=RA(e);if(r)return r[0].opts.ref.current===t;const[n]=e[0];return n.opts.ref.current===t}function zA(t,e){const r=t.target;if(!aA(r))return!1;const n=!!r.closest(`[${NA}]`);if("button"in t&&t.button>0&&!n)return!1;if("button"in t&&t.button===0&&n)return!0;const i=!!e.closest(`[${FA}]`);return n&&i?!1:hg(r).documentElement.contains(r)&&!fg(e,r)&&mA(t,e)}function kg(t){const e=t.currentTarget,r=t.target;let n;t instanceof PointerEvent?n=new PointerEvent(t.type,t):n=new PointerEvent("pointerdown",t);let i=!1;return new Proxy(n,{get:(o,a)=>a==="currentTarget"?e:a==="target"?r:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:t[a]})}function Sg(t,e){te(e,!0);let r=_(e,"interactOutsideBehavior",7,"close"),n=_(e,"onInteractOutside",7,Ae),i=_(e,"onFocusOutside",7,Ae),s=_(e,"id",7),o=_(e,"children",7),a=_(e,"enabled",7),l=_(e,"isValidEvent",7,()=>!1),c=_(e,"ref",7);const u=zu.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>l()),ref:c()});var d={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(v="close"){r(v),y()},get onInteractOutside(){return n()},set onInteractOutside(v=Ae){n(v),y()},get onFocusOutside(){return i()},set onFocusOutside(v=Ae){i(v),y()},get id(){return s()},set id(v){s(v),y()},get children(){return o()},set children(v){o(v),y()},get enabled(){return a()},set enabled(v){a(v),y()},get isValidEvent(){return l()},set isValidEvent(v=()=>!1){l(v),y()},get ref(){return c()},set ref(v){c(v),y()}},f=H(),p=L(f);return ke(p,()=>o()??Ue,()=>({props:u.props})),w(t,f),re(d)}ne(Sg,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;class Zu{static create(e){return new Zu(e)}opts;domContext;constructor(e){this.opts=e,this.domContext=new bs(this.opts.ref);let r=Ae;dt(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>wt(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=e=>{if(e.key!==iA||!ZA(this))return;const r=new KeyboardEvent(e.type,e);e.preventDefault();const n=this.opts.escapeKeydownBehavior.current;n!=="close"&&n!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(r)}}function ZA(t){const e=[...globalThis.bitsEscapeLayers],r=e.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(r)return r[0]===t;const[n]=e[0];return n===t}function xg(t,e){te(e,!0);let r=_(e,"escapeKeydownBehavior",7,"close"),n=_(e,"onEscapeKeydown",7,Ae),i=_(e,"children",7),s=_(e,"enabled",7),o=_(e,"ref",7);Zu.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(u="close"){r(u),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(u=Ae){n(u),y()},get children(){return i()},set children(u){i(u),y()},get enabled(){return s()},set enabled(u){s(u),y()},get ref(){return o()},set ref(u){o(u),y()}},l=H(),c=L(l);return ke(c,()=>i()??Ue),w(t,l),re(a)}ne(xg,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});class Vu{static instance;#e=Nr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Vu),this.instance}register(e){const r=this.getActive();r&&r!==e&&r.pause();const n=document.activeElement;n&&n!==document.body&&this.#r.set(e,n),this.#e.current=this.#e.current.filter(i=>i!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(n=>n!==e);const r=this.getActive();r&&r.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,r){this.#t.set(e,r)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,r){this.#r.set(e,r)}getPreFocusMemory(e){return this.#r.get(e)}clearPreFocusMemory(e){this.#r.delete(e)}}class Uu{#e=!1;#t=null;#r=Vu.getInstance();#n=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const e of this.#n)e();this.#n=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const e=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const e=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const e=this.#t,r=e.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(!a)return;if(e.contains(a))this.#r.setFocusMemory(this,a);else{const c=this.#r.getFocusMemory(this);if(c&&e.contains(c)&&MA(c))o.preventDefault(),c.focus();else{const u=this.#d(),d=this.#u()[0];(u||d||e).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#c();if(a.length<2)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(wt(r,"focusin",n,{capture:!0}),wt(e,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!e.contains(o)){const a=this.#d(),l=this.#u()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):e.focus()}});s.observe(e,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#c(){return this.#t?OA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#c()[0]||null}#u(){return this.#t?DA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(e){let r=null;return dt([()=>e.ref.current,()=>e.enabled.current],([n,i])=>{n&&i?(r||(r=new Uu(e)),r.mount(n)):r&&(r.unmount(),r=null)}),_s(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}}function Eg(t,e){te(e,!0);let r=_(e,"enabled",7,!1),n=_(e,"trapFocus",7,!1),i=_(e,"loop",7,!1),s=_(e,"onCloseAutoFocus",7,Ae),o=_(e,"onOpenAutoFocus",7,Ae),a=_(e,"focusScope",7),l=_(e,"ref",7);const c=Uu.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>o()),ref:l()});var u={get enabled(){return r()},set enabled(p=!1){r(p),y()},get trapFocus(){return n()},set trapFocus(p=!1){n(p),y()},get loop(){return i()},set loop(p=!1){i(p),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(p=Ae){s(p),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(p=Ae){o(p),y()},get focusScope(){return a()},set focusScope(p){a(p),y()},get ref(){return l()},set ref(p){l(p),y()}},d=H(),f=L(d);return ke(f,()=>a()??Ue,()=>({props:c.props})),w(t,d),re(u)}ne(Eg,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsTextSelectionLayers??=new Map;class Bu{static create(e){return new Bu(e)}opts;domContext;#e=Ae;constructor(e){this.opts=e,this.domContext=new bs(e.ref);let r=Ae;dt(()=>this.opts.enabled.current,n=>(n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#t()),()=>{r(),this.#n(),globalThis.bitsTextSelectionLayers.delete(this)}))}#t(){return Oo(wt(this.domContext.getDocument(),"pointerdown",this.#r),wt(this.domContext.getDocument(),"pointerup",Wm(this.#n,this.opts.onPointerUp.current)))}#r=e=>{const r=this.opts.ref.current,n=e.target;!Rr(r)||!Rr(n)||!this.opts.enabled.current||!UA(this)||!tA(r,n)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#e=VA(r,this.domContext.getDocument().body)))};#n=()=>{this.#e(),this.#e=Ae}}const Tg=t=>t.style.userSelect||t.style.webkitUserSelect;function VA(t,e){const r=Tg(e),n=Tg(t);return yl(e,"none"),yl(t,"text"),()=>{yl(e,r),yl(t,n)}}function yl(t,e){t.style.userSelect=e,t.style.webkitUserSelect=e}function UA(t){const e=[...globalThis.bitsTextSelectionLayers];if(!e.length)return!1;const r=e.at(-1);return r?r[0]===t:!1}function Ag(t,e){te(e,!0);let r=_(e,"preventOverflowTextSelection",7,!0),n=_(e,"onPointerDown",7,Ae),i=_(e,"onPointerUp",7,Ae),s=_(e,"id",7),o=_(e,"children",7),a=_(e,"enabled",7),l=_(e,"ref",7);Bu.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(f=!0){r(f),y()},get onPointerDown(){return n()},set onPointerDown(f=Ae){n(f),y()},get onPointerUp(){return i()},set onPointerUp(f=Ae){i(f),y()},get id(){return s()},set id(f){s(f),y()},get children(){return o()},set children(f){o(f),y()},get enabled(){return a()},set enabled(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=H(),d=L(u);return ke(d,()=>o()??Ue),w(t,u),re(c)}ne(Ag,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function fi(t="bits"){return globalThis.bitsIdCounter.current++,`${t}-${globalThis.bitsIdCounter.current}`}class BA{#e;#t=0;#r=le();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),M(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,h(this.#r)===void 0&&(this.#n=ba(()=>{M(this.#r,this.#e(...e),!0)})),_e(()=>()=>{this.#i()}),h(this.#r)}}const _l=new B1;let bl=le(null),ju=null,No=null,Fo=!1;const Cg=R(()=>{for(const t of _l.values())if(t)return!0;return!1});let qu=null;const jA=new BA(()=>{function t(){document.body.setAttribute("style",h(bl)??""),document.body.style.removeProperty("--scrollbar-width"),lg&&ju?.(),M(bl,null)}function e(){No!==null&&(window.clearTimeout(No),No=null)}function r(i,s){e(),Fo=!0,qu=Date.now();const o=qu,a=()=>{No=null,qu===o&&(Og(_l)?Fo=!1:(Fo=!1,s()))},l=i===null?24:i;No=window.setTimeout(a,l)}function n(){h(bl)===null&&_l.size===0&&!Fo&&M(bl,document.body.getAttribute("style"),!0)}return dt(()=>Cg.current,()=>{if(!Cg.current)return;n(),Fo=!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,c={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${c.padding}px`,document.body.style.marginRight=`${c.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",lg&&(ju=wt(document,"touchmove",u=>{u.target===document.documentElement&&(u.touches.length>1||u.preventDefault())},{passive:!1})),Io(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),_s(()=>()=>{ju?.()}),{get lockMap(){return _l},resetBodyStyle:t,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:e,ensureInitialStyleCaptured:n}});class qA{#e=fi();#t;#r=()=>null;#n;locked;constructor(e,r=()=>null){this.#t=e,this.#r=r,this.#n=jA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,n=>this.#n.lockMap.set(this.#e,n)),_s(()=>{if(this.#n.lockMap.delete(this.#e),Og(this.#n.lockMap))return;const n=this.#r();this.#n.scheduleCleanupIfNoNewLocks(n,()=>{this.#n.resetBodyStyle()})}))}}function Og(t){for(const[e,r]of t)if(r)return!0;return!1}function Wu(t,e){te(e,!0);let r=_(e,"preventScroll",7,!0),n=_(e,"restoreScrollDelay",7,null);r()&&new qA(r(),()=>n());var i={get preventScroll(){return r()},set preventScroll(s=!0){r(s),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(s=null){n(s),y()}};return re(i)}ne(Wu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function WA(t){if(!Pn||!t)return null;let e=t.querySelector("[data-bits-announcer]");const r=i=>{const s=t.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Rr(e)){const i=t.createElement("div");i.style.cssText=Qm,i.setAttribute("data-bits-announcer",""),i.appendChild(r("assertive")),i.appendChild(r("polite")),e=i,t.body.insertBefore(e,t.body.firstChild)}return{getLog:i=>{if(!Rr(e))return null;const s=e.querySelector(`[aria-live="${i}"]`);return Rr(s)?s:null}}}function wl(t){const e=WA(t);function r(n,i="assertive",s=7500){if(!e||!Pn||!t)return;const o=e.getLog(i),a=t.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}const HA={defaultValue:void 0,granularity:"day"};function Dg(t){const e={...HA,...t},{defaultValue:r,granularity:n,minValue:i,maxValue:s}=e;if(Array.isArray(r)&&r.length)return r[r.length-1];if(r&&!Array.isArray(r))return r;{let o=new Date;i&&o<i.toDate(Xt())?o=i.toDate(Xt()):s&&o>s.toDate(Xt())&&(o=s.toDate(Xt()));const a=o.getFullYear(),l=o.getMonth()+1,c=o.getDate();return["hour","minute","second"].includes(n??"day")?new An(a,l,c,0,0,0):new ai(a,l,c)}}function Ig(t,e){let r;return e instanceof $r?r=Op(t):e instanceof An?r=Cp(t):r=ja(t),r.calendar!==e.calendar?hr(r,e.calendar):r}function tr(t,e=Xt()){return t instanceof $r?t.toDate():t.toDate(e)}function KA(t){if(t instanceof ai)return"date";if(t instanceof An)return"datetime";if(t instanceof $r)return"zoneddatetime";throw new Error("Unknown date type")}function GA(t,e){switch(e){case"date":return ja(t);case"datetime":return Cp(t);case"zoneddatetime":return Op(t);default:throw new Error(`Unknown date type: ${e}`)}}function YA(t){return t instanceof An}function Hu(t){return t instanceof $r}function kl(t){return YA(t)||Hu(t)}function Ro(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function zi(t,e){return t.compare(e)<0}function JA(t,e){return t.compare(e)>0}function Pg(t,e,r){const n=up(t,r);return e>n?t.subtract({days:n+7-e}):e===n?t:t.subtract({days:n-e})}function Mg(t,e,r){const n=up(t,r),i=e===0?6:e-1;return n===i?t:n>i?t.add({days:7-n+i}):t.add({days:i-n})}const Sl=["day","month","year"],Ku=["hour","minute","second","dayPeriod"],QA=["literal","timeZoneName"],Lo=[...Sl,...Ku],XA=[...Lo,...QA],eC=["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"],tC=["year","month","day"],Gu={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 rC(t){if($g(t))return Gu[t];{const e=oC(t);return $g(e)?Gu[e]:Gu.en}}function Yu(t,e,r){return nC(t)?rC(r)[t]:sC(t)?e:iC(t)?"––":""}function $g(t){return eC.includes(t)}function nC(t){return tC.includes(t)}function iC(t){return t==="hour"||t==="minute"||t==="second"}function sC(t){return t==="era"||t==="dayPeriod"}function oC(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function Ju(t){const e=["hour","minute","second"],r=Lo.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:t==="day"?!e.includes(n):!0);return Object.fromEntries(r)}function aC(t){const{segmentValues:e,formatter:r,locale:n,dateRef:i}=t,s=Object.keys(e).reduce((a,l)=>{if(!Fg(l))return a;if("hour"in e&&l==="dayPeriod"){const c=e[l];di(c)?a[l]=Yu(l,"AM",n):a[l]=c}else a[l]=o(l);return a},{});function o(a){if("hour"in e){const l=e[a],c=typeof l=="string"&&l?.startsWith("0"),u=l!==null?Number.parseInt(l):null;if(l==="0"&&a!=="year")return"0";if(!di(l)&&!di(u)){const d=r.part(i.set({[a]:l}),a,{hourCycle:t.hourCycle===24?"h23":void 0}),f=t.hourCycle===12||t.hourCycle===void 0&&Lg(n)===12;if(a==="hour"&&f){if(u>12){const p=u-12;return p===0?"12":p<10?`0${p}`:`${p}`}return u===0?"12":u<10?`0${u}`:`${u}`}return a==="year"?`${l}`:c&&d.length===1?`0${d}`:d}else return Yu(a,"",n)}else{if(xl(a)){const l=e[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if(di(l))return Yu(a,"",n);{const u=r.part(i.set({[a]:l}),a);return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}}return""}}return s}function lC(t){const{granularity:e,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=t;return n.toParts(r,uC(e,o)).map(c=>["literal","dayPeriod","timeZoneName",null].includes(c.type)||!Fg(c.type)?{part:c.type,value:c.value}:{part:c.type,value:i[c.type]}).filter(c=>!(di(c.part)||di(c.value)||c.part==="timeZoneName"&&(!Hu(r)||s)))}function cC(t){const e=aC(t),r=lC({contentObj:e,...t});return{obj:e,arr:r}}function uC(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h23":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&delete r.minute,t==="minute"&&delete r.second,r}function Ng(){return Lo.reduce((t,e)=>(t[e]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},t),{})}function xl(t){return Sl.includes(t)}function Fg(t){return Lo.includes(t)}function dC(t){return XA.includes(t)}function Rg(t){return!Pn||!t?[]:El(t).map(r=>r.dataset.segment).filter(r=>Lo.includes(r))}function fC(t){const{segmentObj:e,fieldNode:r,dateRef:n}=t,i=Rg(r);let s=n;for(const o of i)if("hour"in e){const a=e[o];if(di(a))continue;s=s.set({[o]:e[o]})}else if(xl(o)){const a=e[o];if(di(a))continue;s=s.set({[o]:e[o]})}return s}function hC(t,e){const r=Rg(e);for(const n of r)if("hour"in t){if(t[n]===null)return!1}else if(xl(n)&&t[n]===null)return!1;return!0}function pC(t){return typeof t!="object"||t===null?!1:Object.entries(t).every(([e,r])=>(Ku.includes(e)||Sl.includes(e))&&(e==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function mC(t,e){return e||(kl(t)?"minute":"day")}function Qu(t){return!!([Mu,cl,ll,Po,Mo,og,$u].includes(t)||dl(t))}function gC(t,e){if(!Pn)return!1;const r=El(e);return r.length?r[0].id===t:!1}function vC(t){const{id:e,formatter:r,value:n,doc:i}=t;if(!Pn)return;const s=r.selectedDate(n),o=i.getElementById(e);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Do({display:"none"}),a.id=e,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function yC(t,e){if(!Pn)return;const r=e.getElementById(t);r&&e.body.removeChild(r)}function Lg(t){return new Intl.DateTimeFormat(t,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(i=>i.type==="hour")?.value==="1"?12:24}function zo(t,e){const r=t.currentTarget;if(!Rr(r))return;const{prev:n,next:i}=Xu(r,e);if(t.key===Po){if(!n)return;n.focus()}else if(t.key===Mo){if(!i)return;i.focus()}}function _C(t,e){const r=e.indexOf(t);if(r===e.length-1||r===-1)return null;const n=r+1;return e[n]}function bC(t,e){const r=e.indexOf(t);if(r===0||r===-1)return null;const n=r-1;return e[n]}function Xu(t,e){const r=El(e);return r.length?{next:_C(t,r),prev:bC(t,r)}:{next:null,prev:null}}function zg(t,e){const r=t.currentTarget;if(!Rr(r))return;const{next:n}=Xu(r,e);n&&n.focus()}function Zg(t,e){const r=t.currentTarget;if(!Rr(r))return;const{prev:n}=Xu(r,e);n&&n.focus()}function Zo(t){return t===Mo||t===Po}function El(t){return t?Array.from(t.querySelectorAll("[data-segment]")).filter(r=>{if(!Rr(r))return!1;const n=r.dataset.segment;return n==="trigger"?!0:!(!dC(n)||n==="literal")}):[]}function wC(t){return El(t)[0]}const kC={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Vg(t){let e=t.initialLocale;function r(p){e=p}function n(){return e}function i(p,v){return new rn(e,v).format(p)}function s(p,v=!0){return kl(p)&&v?i(tr(p),{dateStyle:"long",timeStyle:"long"}):i(tr(p),{dateStyle:"long"})}function o(p){if(typeof t.monthFormat.current!="function"&&typeof t.yearFormat.current!="function")return new rn(e,{month:t.monthFormat.current,year:t.yearFormat.current}).format(p);const v=typeof t.monthFormat.current=="function"?t.monthFormat.current(p.getMonth()+1):new rn(e,{month:t.monthFormat.current}).format(p),g=typeof t.yearFormat.current=="function"?t.yearFormat.current(p.getFullYear()):new rn(e,{year:t.yearFormat.current}).format(p);return`${v} ${g}`}function a(p){return new rn(e,{month:"long"}).format(p)}function l(p){return new rn(e,{year:"numeric"}).format(p)}function c(p,v){return Hu(p)?new rn(e,{...v,timeZone:p.timeZone}).formatToParts(tr(p)):new rn(e,v).formatToParts(tr(p))}function u(p,v="narrow"){return new rn(e,{weekday:v}).format(p)}function d(p,v=void 0){return new rn(e,{hour:"numeric",minute:"numeric",hourCycle:v===24?"h23":void 0}).formatToParts(p).find(b=>b.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function f(p,v,g={}){const m={...kC,...g},k=c(p,m).find(D=>D.type===v);return k?k.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:f,dayPeriod:d,selectedDate:s,dayOfWeek:u}}function SC(t){return!(!Rr(t)||!t.hasAttribute("data-bits-day"))}function Ug(t,e){const r=[];let n=t.add({days:1});const i=e;for(;n.compare(i)<0;)r.push(n),n=n.add({days:1});return r}function ed(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:n,locale:i}=t,s=Ro(e),o=Array.from({length:s},(m,b)=>e.set({day:b+1})),a=Qc(e),l=Rw(e),c=r!==void 0?Pg(a,r,"en-US"):Pg(a,0,i),u=r!==void 0?Mg(l,r,"en-US"):Mg(l,0,i),d=Ug(c.subtract({days:1}),a),f=Ug(l,u.add({days:1})),p=d.length+o.length+f.length;if(n&&p<42){const m=42-p;let b=f[f.length-1];b||(b=e.add({months:1}).set({day:1}));let k=m;f.length===0&&(k=m-1,f.push(b));const D=Array.from({length:k},(T,P)=>{const A=P+1;return b.add({days:A})});f.push(...D)}const v=d.concat(o,f),g=$A(v,7);return{value:e,dates:v,weeks:g}}function Vo(t){const{numberOfMonths:e,dateObj:r,...n}=t,i=[];if(!e||e===1)return i.push(ed({...n,dateObj:r})),i;i.push(ed({...n,dateObj:r}));for(let s=1;s<e;s++){const o=r.add({months:s});i.push(ed({...n,dateObj:o}))}return i}function td(t){return t?Array.from(t.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(r=>Rr(r)):[]}function Bg(t,e){const r=t.getAttribute("data-value");r&&(e.current=Ig(r,e.current))}function xC({node:t,add:e,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=td(n);if(!l.length)return;const u=l.indexOf(t)+e;if(Lu(u,l)){const d=l[u];return Bg(d,r),d.focus()}if(u<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Io(()=>{const f=td(n);if(!f.length)return;const p=f.length-Math.abs(u);if(Lu(p,f)){const v=f[p];return Bg(v,r),v.focus()}})}if(u>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Io(()=>{const f=td(n);if(!f.length)return;const p=u-l.length;if(Lu(p,f))return f[p].focus()})}}const jg=[ll,cl,Po,Mo],qg=[Mu,$u];function EC({event:t,handleCellClick:e,shiftFocus:r,placeholderValue:n}){const i=t.target;if(!SC(i)||!jg.includes(t.key)&&!qg.includes(t.key))return;t.preventDefault();const s={[ll]:7,[cl]:-7,[Po]:-1,[Mo]:1};if(jg.includes(t.key)){const o=s[t.key];o!==void 0&&r(i,o)}if(qg.includes(t.key)){const o=i.getAttribute("data-value");if(!o)return;e(t,Ig(o,n))}}function TC({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),u=Vo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),e(u)}}function AC({months:t,setMonths:e,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=t[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),u=Vo({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),e(u)}}function CC({months:t,formatter:e,weekdayFormat:r}){if(!t.length)return[];const i=t[0].weeks[0];return i?i.map(s=>e.dayOfWeek(tr(s),r)):[]}function OC(t){_e(()=>{const e=t.weekStartsOn.current,r=t.locale.current,n=t.fixedWeeks.current,i=t.numberOfMonths.current;Ge(()=>{const s=t.placeholder.current;if(!s)return;const o={weekStartsOn:e,locale:r,fixedWeeks:n,numberOfMonths:i};t.setMonths(Vo({...o,dateObj:s}))})})}function DC({calendarNode:t,label:e,accessibleHeadingId:r}){const n=ol(t),i=n.createElement("div");i.style.cssText=Do({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=e,s.id=r,s.role="heading",s.ariaLevel="2",t.insertBefore(i,t.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function IC({placeholder:t,getVisibleMonths:e,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){_e(()=>{t.current,Ge(()=>{if(e().some(l=>Yc(l,t.current)))return;const a={weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current};o(Vo({...a,dateObj:t.current}))})})}function PC({maxValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[e.length-1]?.value;if(!n)return!1;const i=n.add({months:1}).set({day:1});return JA(i,t)}function MC({minValue:t,months:e,disabled:r}){if(!t||!e.length)return!1;if(r)return!0;const n=e[0]?.value;if(!n)return!1;const i=n.subtract({months:1}).set({day:35});return zi(i,t)}function $C({months:t,locale:e,formatter:r}){if(!t.length)return"";if(e!==r.getLocale()&&r.setLocale(e),t.length===1){const u=tr(t[0].value);return`${r.fullMonthAndYear(u)}`}const n=tr(t[0].value),i=tr(t[t.length-1].value),s=r.fullMonth(n),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function NC({fullCalendarLabel:t,id:e,isInvalid:r,disabled:n,readonly:i}){return{id:e,role:"application","aria-label":t,"data-invalid":We(r),"data-disabled":We(n),"data-readonly":We(i)}}function FC(t){const r=ol(t.target).querySelector("[data-bits-day][data-focused]");r&&(t.preventDefault(),r?.focus())}function RC(t){if(!Pn)return;const e=Array.from(t.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(e.length===0)return;const r=e[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return GA(n,i)}function LC({ref:t,placeholder:e,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&zi(a,n.current)||i.current&&zi(i.current,a))}dt(()=>t.current,()=>{t.current&&e.current&&ii(e.current,r)&&o(r)&&(e.current=RC(t.current)??r)})}function zC(t,e){return!t||!e?t:kl(t)&&kl(e)?t.set({hour:e.hour,minute:e.minute,millisecond:e.millisecond,second:e.second}):t}const ZC=al({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 VC(t){const e=new Date().getFullYear(),r=Math.max(t.placeholderYear,e);let n,i;if(t.minValue)n=t.minValue.year;else{const o=r-100;n=t.placeholderYear<o?t.placeholderYear-10:o}t.maxValue?i=t.maxValue.year:i=r+10,n>i&&(n=i);const s=i-n+1;return Array.from({length:s},(o,a)=>n+a)}const Lr=new In("Calendar.Root | RangeCalender.Root");class Tl{static create(e){return Lr.set(new Tl(e))}opts;#e=C(()=>this.months.map(e=>e.value));get visibleMonths(){return h(this.#e)}set visibleMonths(e){M(this.#e,e)}formatter;accessibleHeadingId=fi();domContext;attachment;#t=le(Be([]));get months(){return h(this.#t)}set months(e){M(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=ct(this.opts.ref),this.domContext=new bs(e.ref),this.announcer=wl(null),this.formatter=Vg({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),Sn(()=>{this.announcer=wl(this.domContext.getDocument())}),this.months=Vo({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(),IC({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}),OC({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),dt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),dt(()=>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)}),LC({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#r=C(()=>CC({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return h(this.#r)}set weekdays(e){M(this.#r,e)}#n=C(()=>Ge(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return h(this.#n)}set initialPlaceholderYear(e){M(this.#n,e)}#i=C(()=>VC({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return h(this.#i)}set defaultYears(e){M(this.#i,e)}#s(){_e(()=>{if(Ge(()=>this.opts.initialFocus.current)){const r=this.opts.ref.current?.querySelector("[data-focused]");r&&r.focus()}})}#a(){_e(()=>this.opts.ref.current?DC({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)}#o(){bc(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){TC({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){AC({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#l=C(()=>PC({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return h(this.#l)}set isNextButtonDisabled(e){M(this.#l,e)}#c=C(()=>MC({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return h(this.#c)}set isPrevButtonDisabled(e){M(this.#c,e)}#d=C(()=>{const e=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(const i of e)if(r(i)||n(i))return!0}else{if(!e)return!1;if(r(e)||n(e))return!0}return!1});get isInvalid(){return h(this.#d)}set isInvalid(e){M(this.#d,e)}#u=C(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,$C({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return h(this.#u)}set headingValue(e){M(this.#u,e)}#f=C(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return h(this.#f)}set fullCalendarLabel(e){M(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(r=>Yc(e,r))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&zi(e,r)||n&&zi(n,e))}isDateSelected(e){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>ii(n,e)):r?ii(r,e):!1}shiftFocus(e,r){return xC({node:e,add:r,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#h(e){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const r=e.length;return!(this.opts.maxDays.current&&r>this.opts.maxDays.current)}handleCellClick(e,r){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(r)||this.opts.isDateUnavailable.current?.(r))return;const n=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,r));else if(!Array.isArray(n)){const s=this.handleSingleUpdate(n,r);s?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(s,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=zC(s,n),s!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,r){if(!e){const s=[r];return this.#h(s)?s:[r]}if(!Array.isArray(e))return;const n=e.findIndex(s=>ii(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...e,r];return this.#h(s)?s:[r]}else{if(i)return e;{const s=e.filter(o=>!ii(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(e,r){if(!e)return r;if(!this.opts.preventDeselect.current&&ii(e,r)){this.opts.placeholder.current=r;return}return r}onkeydown(e){EC({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#p=C(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return h(this.#p)}set snippetProps(e){M(this.#p,e)}getBitsAttr=e=>ZC.getAttr(e);#m=C(()=>({...NC({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return h(this.#m)}set props(e){M(this.#m,e)}}class rd{static create(e){return new rd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"aria-hidden":Pu(!0),"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}const Wg=new In("Calendar.Cell | RangeCalendar.Cell");class nd{static create(e){return Wg.set(new nd(e,Lr.get()))}opts;root;#e=C(()=>tr(this.opts.date.current));get cellDate(){return h(this.#e)}set cellDate(e){M(this.#e,e)}#t=C(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return h(this.#t)}set isUnavailable(e){M(this.#t,e)}#r=C(()=>$w(this.opts.date.current,Xt()));get isDateToday(){return h(this.#r)}set isDateToday(e){M(this.#r,e)}#n=C(()=>!Yc(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return h(this.#n)}set isOutsideMonth(e){M(this.#n,e)}#i=C(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return h(this.#i)}set isOutsideVisibleMonths(e){M(this.#i,e)}#s=C(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return h(this.#s)}set isDisabled(e){M(this.#s,e)}#a=C(()=>ii(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return h(this.#a)}set isFocusedDate(e){M(this.#a,e)}#o=C(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return h(this.#o)}set isSelectedDate(e){M(this.#o,e)}#l=C(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return h(this.#l)}set labelText(e){M(this.#l,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#c=C(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return h(this.#c)}set snippetProps(e){M(this.#c,e)}#d=C(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return h(this.#d)}set ariaDisabled(e){M(this.#d,e)}#u=C(()=>({"data-unavailable":We(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":We(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":KA(this.opts.date.current),"data-disabled":We(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return h(this.#u)}set sharedDataAttrs(e){M(this.#u,e)}#f=C(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":Fr(this.isSelectedDate),"aria-disabled":Fr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return h(this.#f)}set props(e){M(this.#f,e)}}class id{static create(e){return new id(e,Wg.get())}opts;cell;attachment;constructor(e,r){this.opts=e,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=ct(this.opts.ref)}#e=C(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=C(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return h(this.#t)}set snippetProps(e){M(this.#t,e)}#r=C(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":Fr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:h(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#r)}set props(e){M(this.#r,e)}}class sd{static create(e){return new sd(e,Lr.get())}opts;root;#e=C(()=>this.root.isNextButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){M(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=ct(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=C(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":Fr(this.isDisabled),"data-disabled":We(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class od{static create(e){return new od(e,Lr.get())}opts;root;#e=C(()=>this.root.isPrevButtonDisabled);get isDisabled(){return h(this.#e)}set isDisabled(e){M(this.#e,e)}attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=ct(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=C(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":Fr(this.isDisabled),"data-disabled":We(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class ad{static create(e){return new ad(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":Fr(this.root.opts.readonly.current),"aria-disabled":Fr(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),"data-disabled":We(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class ld{static create(e){return new ld(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class cd{static create(e){return new cd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class ud{static create(e){return new ud(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class dd{static create(e){return new dd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class fd{static create(e){return new fd(e,Lr.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref)}#e=C(()=>({id:this.opts.id.current,"data-disabled":We(this.root.opts.disabled.current),"data-readonly":We(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}var UC=q("<div><!></div>");function Hg(t,e){te(e,!0);let r=_(e,"child",7),n=_(e,"children",7),i=_(e,"id",23,fi),s=_(e,"ref",15,null),o=_(e,"value",15),a=_(e,"onValueChange",7,Ae),l=_(e,"placeholder",15),c=_(e,"onPlaceholderChange",7,Ae),u=_(e,"weekdayFormat",7,"narrow"),d=_(e,"weekStartsOn",7),f=_(e,"pagedNavigation",7,!1),p=_(e,"isDateDisabled",7,()=>!1),v=_(e,"isDateUnavailable",7,()=>!1),g=_(e,"fixedWeeks",7,!1),m=_(e,"numberOfMonths",7,1),b=_(e,"locale",7),k=_(e,"calendarLabel",7,"Event"),D=_(e,"disabled",7,!1),T=_(e,"readonly",7,!1),P=_(e,"minValue",7,void 0),A=_(e,"maxValue",7,void 0),O=_(e,"preventDeselect",7,!1),F=_(e,"type",7),N=_(e,"disableDaysOutsideMonth",7,!0),j=_(e,"initialFocus",7,!1),G=_(e,"maxDays",7),Z=_(e,"monthFormat",7,"long"),ue=_(e,"yearFormat",7,"numeric"),me=Je(e,["$$slots","$$events","$$legacy","$$host","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]);const K=Dg({defaultValue:o(),minValue:P(),maxValue:A()});function J(){l()===void 0&&l(K)}J(),dt.pre(()=>l(),()=>{J()});function B(){o()===void 0&&o(F()==="single"?void 0:[])}B(),dt.pre(()=>o(),()=>{B()});const W=Tl.create({id:R(()=>i()),ref:R(()=>s(),U=>s(U)),weekdayFormat:R(()=>u()),weekStartsOn:R(()=>d()),pagedNavigation:R(()=>f()),isDateDisabled:R(()=>p()),isDateUnavailable:R(()=>v()),fixedWeeks:R(()=>g()),numberOfMonths:R(()=>m()),locale:ug(()=>b()),calendarLabel:R(()=>k()),readonly:R(()=>T()),disabled:R(()=>D()),minValue:R(()=>P()),maxValue:R(()=>A()),disableDaysOutsideMonth:R(()=>N()),initialFocus:R(()=>j()),maxDays:R(()=>G()),placeholder:R(()=>l(),U=>{l(U),c()(U)}),preventDeselect:R(()=>O()),value:R(()=>o(),U=>{o(U),a()(U)}),type:R(()=>F()),monthFormat:R(()=>Z()),yearFormat:R(()=>ue()),defaultPlaceholder:K}),Y=C(()=>et(me,W.props));var ae={get child(){return r()},set child(U){r(U),y()},get children(){return n()},set children(U){n(U),y()},get id(){return i()},set id(U=fi()){i(U),y()},get ref(){return s()},set ref(U=null){s(U),y()},get value(){return o()},set value(U){o(U),y()},get onValueChange(){return a()},set onValueChange(U=Ae){a(U),y()},get placeholder(){return l()},set placeholder(U){l(U),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(U=Ae){c(U),y()},get weekdayFormat(){return u()},set weekdayFormat(U="narrow"){u(U),y()},get weekStartsOn(){return d()},set weekStartsOn(U){d(U),y()},get pagedNavigation(){return f()},set pagedNavigation(U=!1){f(U),y()},get isDateDisabled(){return p()},set isDateDisabled(U=()=>!1){p(U),y()},get isDateUnavailable(){return v()},set isDateUnavailable(U=()=>!1){v(U),y()},get fixedWeeks(){return g()},set fixedWeeks(U=!1){g(U),y()},get numberOfMonths(){return m()},set numberOfMonths(U=1){m(U),y()},get locale(){return b()},set locale(U){b(U),y()},get calendarLabel(){return k()},set calendarLabel(U="Event"){k(U),y()},get disabled(){return D()},set disabled(U=!1){D(U),y()},get readonly(){return T()},set readonly(U=!1){T(U),y()},get minValue(){return P()},set minValue(U=void 0){P(U),y()},get maxValue(){return A()},set maxValue(U=void 0){A(U),y()},get preventDeselect(){return O()},set preventDeselect(U=!1){O(U),y()},get type(){return F()},set type(U){F(U),y()},get disableDaysOutsideMonth(){return N()},set disableDaysOutsideMonth(U=!0){N(U),y()},get initialFocus(){return j()},set initialFocus(U=!1){j(U),y()},get maxDays(){return G()},set maxDays(U){G(U),y()},get monthFormat(){return Z()},set monthFormat(U="long"){Z(U),y()},get yearFormat(){return ue()},set yearFormat(U="numeric"){ue(U),y()}},X=H(),ye=L(X);{var V=U=>{var z=H(),we=L(z);{let E=C(()=>({props:h(Y),...W.snippetProps}));ke(we,r,()=>h(E))}w(U,z)},pe=U=>{var z=UC();je(z,()=>({...h(Y)}));var we=$(z);ke(we,()=>n()??Ue,()=>W.snippetProps),I(z),w(U,z)};de(ye,U=>{r()?U(V):U(pe,!1)})}return w(t,X),re(ae)}ne(Hg,{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 BC=q("<div><!></div>");function hd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=id.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);{let k=C(()=>({props:h(c),...l.snippetProps}));ke(b,i,()=>h(k))}w(g,m)},v=g=>{var m=BC();je(m,()=>({...h(c)}));var b=$(m);{var k=T=>{var P=H(),A=L(P);ke(A,()=>n()??Ue,()=>l.snippetProps),w(T,P)},D=T=>{var P=Jt();ce(()=>se(P,l.cell.opts.date.current.day)),w(T,P)};de(b,T=>{n()?T(k):T(D,!1)})}I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(hd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var jC=q("<table><!></table>");function pd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ad.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=jC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(pd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var qC=q("<tbody><!></tbody>");function md(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ld.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=qC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(md,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var WC=q("<td><!></td>");function gd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=_(e,"date",7),l=_(e,"month",7),c=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]);const u=nd.create({id:R(()=>o()),ref:R(()=>s(),b=>s(b)),date:R(()=>a()),month:R(()=>l())}),d=C(()=>et(c,u.props));var f={get children(){return n()},set children(b){n(b),y()},get child(){return i()},set child(b){i(b),y()},get ref(){return s()},set ref(b=null){s(b),y()},get id(){return o()},set id(b=Fe(r)){o(b),y()},get date(){return a()},set date(b){a(b),y()},get month(){return l()},set month(b){l(b),y()}},p=H(),v=L(p);{var g=b=>{var k=H(),D=L(k);{let T=C(()=>({props:h(d),...u.snippetProps}));ke(D,i,()=>h(T))}w(b,k)},m=b=>{var k=WC();je(k,()=>({...h(d)}));var D=$(k);ke(D,()=>n()??Ue,()=>u.snippetProps),I(k),w(b,k)};de(v,b=>{i()?b(g):b(m,!1)})}return w(t,p),re(f)}ne(gd,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var HC=q("<thead><!></thead>");function vd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=cd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=HC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(vd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var KC=q("<th><!></th>");function yd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=dd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=KC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(yd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var GC=q("<tr><!></tr>");function Uo(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=ud.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=GC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(Uo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var YC=q("<header><!></header>");function _d(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=fd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c)})),w(g,m)},v=g=>{var m=YC();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>n()??Ue),I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(_d,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var JC=q("<div><!></div>");function bd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]);const l=rd.create({id:R(()=>o()),ref:R(()=>s(),g=>s(g))}),c=C(()=>et(a,l.props));var u={get children(){return n()},set children(g){n(g),y()},get child(){return i()},set child(g){i(g),y()},get ref(){return s()},set ref(g=null){s(g),y()},get id(){return o()},set id(g=Fe(r)){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,i,()=>({props:h(c),headingValue:l.root.headingValue})),w(g,m)},v=g=>{var m=JC();je(m,()=>({...h(c)}));var b=$(m);{var k=T=>{var P=H(),A=L(P);ke(A,()=>n()??Ue,()=>({headingValue:l.root.headingValue})),w(T,P)},D=T=>{var P=Jt();ce(()=>se(P,l.root.headingValue)),w(T,P)};de(b,T=>{n()?T(k):T(D,!1)})}I(m),w(g,m)};de(f,g=>{i()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(bd,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var QC=q("<button><!></button>");function wd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"tabindex",7,0),l=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const c=sd.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m))}),u=C(()=>et(l,c.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=H(),p=L(f);{var v=m=>{var b=H(),k=L(b);ke(k,i,()=>({props:h(u)})),w(m,b)},g=m=>{var b=QC();je(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue),I(b),w(m,b)};de(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),re(d)}ne(wd,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var XC=q("<button><!></button>");function kd(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"tabindex",7,0),l=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]);const c=od.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m))}),u=C(()=>et(l,c.props,{tabindex:a()}));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get tabindex(){return a()},set tabindex(m=0){a(m),y()}},f=H(),p=L(f);{var v=m=>{var b=H(),k=L(b);ke(k,i,()=>({props:h(u)})),w(m,b)},g=m=>{var b=XC();je(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue),I(b),w(m,b)};de(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),re(d)}ne(kd,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var eO=q("<input/>"),tO=q("<input/>");function Kg(t,e){te(e,!0);let r=_(e,"value",15),n=Je(e,["$$slots","$$events","$$legacy","$$host","value"]);const i=C(()=>et(n,{"aria-hidden":"true",tabindex:-1,style:Qm}));var s={get value(){return r()},set value(u){r(u),y()}},o=H(),a=L(o);{var l=u=>{var d=eO();je(d,()=>({...h(i),value:r()}),void 0,void 0,void 0,void 0,!0),w(u,d)},c=u=>{var d=tO();je(d,()=>({...h(i)}),void 0,void 0,void 0,void 0,!0),Ca(d,r),w(u,d)};de(a,u=>{h(i).type==="checkbox"?u(l):u(c,!1)})}return w(t,o),re(s)}ne(Kg,{value:{}},[],[],{mode:"open"});const rO=["top","right","bottom","left"],hi=Math.min,pr=Math.max,Al=Math.round,Cl=Math.floor,on=t=>({x:t,y:t}),nO={left:"right",right:"left",bottom:"top",top:"bottom"},iO={start:"end",end:"start"};function Sd(t,e,r){return pr(t,hi(e,r))}function Mn(t,e){return typeof t=="function"?t(e):t}function $n(t){return t.split("-")[0]}function ws(t){return t.split("-")[1]}function xd(t){return t==="x"?"y":"x"}function Ed(t){return t==="y"?"height":"width"}const sO=new Set(["top","bottom"]);function an(t){return sO.has($n(t))?"y":"x"}function Td(t){return xd(an(t))}function oO(t,e,r){r===void 0&&(r=!1);const n=ws(t),i=Td(t),s=Ed(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Ol(o)),[o,Ol(o)]}function aO(t){const e=Ol(t);return[Ad(t),e,Ad(e)]}function Ad(t){return t.replace(/start|end/g,e=>iO[e])}const Gg=["left","right"],Yg=["right","left"],lO=["top","bottom"],cO=["bottom","top"];function uO(t,e,r){switch(t){case"top":case"bottom":return r?e?Yg:Gg:e?Gg:Yg;case"left":case"right":return e?lO:cO;default:return[]}}function dO(t,e,r,n){const i=ws(t);let s=uO($n(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Ad)))),s}function Ol(t){return t.replace(/left|right|bottom|top/g,e=>nO[e])}function fO(t){return{top:0,right:0,bottom:0,left:0,...t}}function Jg(t){return typeof t!="number"?fO(t):{top:t,right:t,bottom:t,left:t}}function Dl(t){const{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Qg(t,e,r){let{reference:n,floating:i}=t;const s=an(e),o=Td(e),a=Ed(o),l=$n(e),c=s==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-i.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ws(e)){case"start":p[o]-=f*(r&&c?-1:1);break;case"end":p[o]+=f*(r&&c?-1:1);break}return p}async function hO(t,e){var r;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Mn(e,t),v=Jg(p),m=a[f?d==="floating"?"reference":"floating":d],b=Dl(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:u,strategy:l})),k=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},P=Dl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:D,strategy:l}):k);return{top:(b.top-P.top+v.top)/T.y,bottom:(P.bottom-b.bottom+v.bottom)/T.y,left:(b.left-P.left+v.left)/T.x,right:(P.right-b.right+v.right)/T.x}}const pO=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=Qg(c,n,l),f=n,p={},v=0;for(let m=0;m<a.length;m++){var g;const{name:b,fn:k}=a[m],{x:D,y:T,data:P,reset:A}=await k({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:p,rects:c,platform:{...o,detectOverflow:(g=o.detectOverflow)!=null?g:hO},elements:{reference:t,floating:e}});u=D??u,d=T??d,p={...p,[b]:{...p[b],...P}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(c=A.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:u,y:d}=Qg(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},mO=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Mn(t,e)||{};if(c==null)return{};const d=Jg(u),f={x:r,y:n},p=Td(i),v=Ed(p),g=await o.getDimensions(c),m=p==="y",b=m?"top":"left",k=m?"bottom":"right",D=m?"clientHeight":"clientWidth",T=s.reference[v]+s.reference[p]-f[p]-s.floating[v],P=f[p]-s.reference[p],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let O=A?A[D]:0;(!O||!await(o.isElement==null?void 0:o.isElement(A)))&&(O=a.floating[D]||s.floating[v]);const F=T/2-P/2,N=O/2-g[v]/2-1,j=hi(d[b],N),G=hi(d[k],N),Z=j,ue=O-g[v]-G,me=O/2-g[v]/2+F,K=Sd(Z,me,ue),J=!l.arrow&&ws(i)!=null&&me!==K&&s.reference[v]/2-(me<Z?j:G)-g[v]/2<0,B=J?me<Z?me-Z:me-ue:0;return{[p]:f[p]+B,data:{[p]:K,centerOffset:me-K-B,...J&&{alignmentOffset:B}},reset:J}}}),gO=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=Mn(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=$n(i),k=an(a),D=$n(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=f||(D||!g?[Ol(a)]:aO(a)),A=v!=="none";!f&&A&&P.push(...dO(a,g,v,T));const O=[a,...P],F=await l.detectOverflow(e,m),N=[];let j=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&N.push(F[b]),d){const me=oO(i,o,T);N.push(F[me[0]],F[me[1]])}if(j=[...j,{placement:i,overflows:N}],!N.every(me=>me<=0)){var G,Z;const me=(((G=s.flip)==null?void 0:G.index)||0)+1,K=O[me];if(K&&(!(d==="alignment"?k!==an(K):!1)||j.every(W=>an(W.placement)===k?W.overflows[0]>0:!0)))return{data:{index:me,overflows:j},reset:{placement:K}};let J=(Z=j.filter(B=>B.overflows[0]<=0).sort((B,W)=>B.overflows[1]-W.overflows[1])[0])==null?void 0:Z.placement;if(!J)switch(p){case"bestFit":{var ue;const B=(ue=j.filter(W=>{if(A){const Y=an(W.placement);return Y===k||Y==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Y=>Y>0).reduce((Y,ae)=>Y+ae,0)]).sort((W,Y)=>W[1]-Y[1])[0])==null?void 0:ue[0];B&&(J=B);break}case"initialPlacement":J=a;break}if(i!==J)return{reset:{placement:J}}}return{}}}};function Xg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ev(t){return rO.some(e=>t[e]>=0)}const vO=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r,platform:n}=e,{strategy:i="referenceHidden",...s}=Mn(t,e);switch(i){case"referenceHidden":{const o=await n.detectOverflow(e,{...s,elementContext:"reference"}),a=Xg(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ev(a)}}}case"escaped":{const o=await n.detectOverflow(e,{...s,altBoundary:!0}),a=Xg(o,r.floating);return{data:{escapedOffsets:a,escaped:ev(a)}}}default:return{}}}}},tv=new Set(["left","top"]);async function yO(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=$n(r),a=ws(r),l=an(r)==="y",c=tv.has(o)?-1:1,u=s&&l?-1:1,d=Mn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const _O=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await yO(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},bO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:k,y:D}=b;return{x:k,y:D}}},...c}=Mn(t,e),u={x:r,y:n},d=await s.detectOverflow(e,c),f=an($n(i)),p=xd(f);let v=u[p],g=u[f];if(o){const b=p==="y"?"top":"left",k=p==="y"?"bottom":"right",D=v+d[b],T=v-d[k];v=Sd(D,v,T)}if(a){const b=f==="y"?"top":"left",k=f==="y"?"bottom":"right",D=g+d[b],T=g-d[k];g=Sd(D,g,T)}const m=l.fn({...e,[p]:v,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[f]:a}}}}}},wO=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Mn(t,e),u={x:r,y:n},d=an(i),f=xd(d);let p=u[f],v=u[d];const g=Mn(a,e),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const D=f==="y"?"height":"width",T=s.reference[f]-s.floating[D]+m.mainAxis,P=s.reference[f]+s.reference[D]-m.mainAxis;p<T?p=T:p>P&&(p=P)}if(c){var b,k;const D=f==="y"?"width":"height",T=tv.has($n(i)),P=s.reference[d]-s.floating[D]+(T&&((b=o.offset)==null?void 0:b[d])||0)+(T?0:m.crossAxis),A=s.reference[d]+s.reference[D]+(T?0:((k=o.offset)==null?void 0:k[d])||0)-(T?m.crossAxis:0);v<P?v=P:v>A&&(v=A)}return{[f]:p,[d]:v}}}},kO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Mn(t,e),u=await o.detectOverflow(e,c),d=$n(i),f=ws(i),p=an(i)==="y",{width:v,height:g}=s.floating;let m,b;d==="top"||d==="bottom"?(m=d,b=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,m=f==="end"?"top":"bottom");const k=g-u.top-u.bottom,D=v-u.left-u.right,T=hi(g-u[m],k),P=hi(v-u[b],D),A=!e.middlewareData.shift;let O=T,F=P;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(F=D),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(O=k),A&&!f){const j=pr(u.left,0),G=pr(u.right,0),Z=pr(u.top,0),ue=pr(u.bottom,0);p?F=v-2*(j!==0||G!==0?j+G:pr(u.left,u.right)):O=g-2*(Z!==0||ue!==0?Z+ue:pr(u.top,u.bottom))}await l({...e,availableWidth:F,availableHeight:O});const N=await o.getDimensions(a.floating);return v!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Il(){return typeof window<"u"}function ks(t){return rv(t)?(t.nodeName||"").toLowerCase():"#document"}function mr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ln(t){var e;return(e=(rv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rv(t){return Il()?t instanceof Node||t instanceof mr(t).Node:!1}function zr(t){return Il()?t instanceof Element||t instanceof mr(t).Element:!1}function cn(t){return Il()?t instanceof HTMLElement||t instanceof mr(t).HTMLElement:!1}function nv(t){return!Il()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof mr(t).ShadowRoot}const SO=new Set(["inline","contents"]);function Bo(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Zr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!SO.has(i)}const xO=new Set(["table","td","th"]);function EO(t){return xO.has(ks(t))}const TO=[":popover-open",":modal"];function Pl(t){return TO.some(e=>{try{return t.matches(e)}catch{return!1}})}const AO=["transform","translate","scale","rotate","perspective"],CO=["transform","translate","scale","rotate","perspective","filter"],OO=["paint","layout","strict","content"];function Cd(t){const e=Od(),r=zr(t)?Zr(t):t;return AO.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||CO.some(n=>(r.willChange||"").includes(n))||OO.some(n=>(r.contain||"").includes(n))}function DO(t){let e=pi(t);for(;cn(e)&&!Ss(e);){if(Cd(e))return e;if(Pl(e))return null;e=pi(e)}return null}function Od(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const IO=new Set(["html","body","#document"]);function Ss(t){return IO.has(ks(t))}function Zr(t){return mr(t).getComputedStyle(t)}function Ml(t){return zr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pi(t){if(ks(t)==="html")return t;const e=t.assignedSlot||t.parentNode||nv(t)&&t.host||ln(t);return nv(e)?e.host:e}function iv(t){const e=pi(t);return Ss(e)?t.ownerDocument?t.ownerDocument.body:t.body:cn(e)&&Bo(e)?e:iv(e)}function jo(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=iv(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=mr(i);if(s){const a=Dd(o);return e.concat(o,o.visualViewport||[],Bo(i)?i:[],a&&r?jo(a):[])}return e.concat(i,jo(i,[],r))}function Dd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function sv(t){const e=Zr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=cn(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Al(r)!==s||Al(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Id(t){return zr(t)?t:t.contextElement}function xs(t){const e=Id(t);if(!cn(e))return on(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=sv(e);let o=(s?Al(r.width):r.width)/n,a=(s?Al(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const PO=on(0);function ov(t){const e=mr(t);return!Od()||!e.visualViewport?PO:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function MO(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==mr(t)?!1:e}function Zi(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Id(t);let o=on(1);e&&(n?zr(n)&&(o=xs(n)):o=xs(t));const a=MO(s,r,n)?ov(s):on(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=mr(s),p=n&&zr(n)?mr(n):n;let v=f,g=Dd(v);for(;g&&n&&p!==v;){const m=xs(g),b=g.getBoundingClientRect(),k=Zr(g),D=b.left+(g.clientLeft+parseFloat(k.paddingLeft))*m.x,T=b.top+(g.clientTop+parseFloat(k.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=D,c+=T,v=mr(g),g=Dd(v)}}return Dl({width:u,height:d,x:l,y:c})}function $l(t,e){const r=Ml(t).scrollLeft;return e?e.left+r:Zi(ln(t)).left+r}function av(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-$l(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function $O(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=ln(n),a=e?Pl(e.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=on(1);const u=on(0),d=cn(n);if((d||!d&&!s)&&((ks(n)!=="body"||Bo(o))&&(l=Ml(n)),cn(n))){const p=Zi(n);c=xs(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const f=o&&!d&&!s?av(o,l):on(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function NO(t){return Array.from(t.getClientRects())}function FO(t){const e=ln(t),r=Ml(t),n=t.ownerDocument.body,i=pr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=pr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+$l(t);const a=-r.scrollTop;return Zr(n).direction==="rtl"&&(o+=pr(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}const lv=25;function RO(t,e){const r=mr(t),n=ln(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Od();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=$l(n);if(c<=0){const u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(n.clientWidth-d.clientWidth-p);v<=lv&&(s-=v)}else c<=lv&&(s+=c);return{width:s,height:o,x:a,y:l}}const LO=new Set(["absolute","fixed"]);function zO(t,e){const r=Zi(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=cn(t)?xs(t):on(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function cv(t,e,r){let n;if(e==="viewport")n=RO(t,r);else if(e==="document")n=FO(ln(t));else if(zr(e))n=zO(e,r);else{const i=ov(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Dl(n)}function uv(t,e){const r=pi(t);return r===e||!zr(r)||Ss(r)?!1:Zr(r).position==="fixed"||uv(r,e)}function ZO(t,e){const r=e.get(t);if(r)return r;let n=jo(t,[],!1).filter(a=>zr(a)&&ks(a)!=="body"),i=null;const s=Zr(t).position==="fixed";let o=s?pi(t):t;for(;zr(o)&&!Ss(o);){const a=Zr(o),l=Cd(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&LO.has(i.position)||Bo(o)&&!l&&uv(t,o))?n=n.filter(u=>u!==o):i=a,o=pi(o)}return e.set(t,n),n}function VO(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?Pl(e)?[]:ZO(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const d=cv(e,u,i);return c.top=pr(d.top,c.top),c.right=hi(d.right,c.right),c.bottom=hi(d.bottom,c.bottom),c.left=pr(d.left,c.left),c},cv(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function UO(t){const{width:e,height:r}=sv(t);return{width:e,height:r}}function BO(t,e,r){const n=cn(e),i=ln(e),s=r==="fixed",o=Zi(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=on(0);function c(){l.x=$l(i)}if(n||!n&&!s)if((ks(e)!=="body"||Bo(i))&&(a=Ml(e)),n){const p=Zi(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else i&&c();s&&!n&&i&&c();const u=i&&!n&&!s?av(i,a):on(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Pd(t){return Zr(t).position==="static"}function dv(t,e){if(!cn(t)||Zr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return ln(t)===r&&(r=r.ownerDocument.body),r}function fv(t,e){const r=mr(t);if(Pl(t))return r;if(!cn(t)){let i=pi(t);for(;i&&!Ss(i);){if(zr(i)&&!Pd(i))return i;i=pi(i)}return r}let n=dv(t,e);for(;n&&EO(n)&&Pd(n);)n=dv(n,e);return n&&Ss(n)&&Pd(n)&&!Cd(n)?r:n||DO(t)||r}const jO=async function(t){const e=this.getOffsetParent||fv,r=this.getDimensions,n=await r(t.floating);return{reference:BO(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qO(t){return Zr(t).direction==="rtl"}const WO={convertOffsetParentRelativeRectToViewportRelativeRect:$O,getDocumentElement:ln,getClippingRect:VO,getOffsetParent:fv,getElementRects:jO,getClientRects:NO,getDimensions:UO,getScale:xs,isElement:zr,isRTL:qO};function hv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function HO(t,e){let r=null,n;const i=ln(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const v=Cl(d),g=Cl(i.clientWidth-(u+f)),m=Cl(i.clientHeight-(d+p)),b=Cl(u),D={rootMargin:-v+"px "+-g+"px "+-m+"px "+-b+"px",threshold:pr(0,hi(1,l))||1};let T=!0;function P(A){const O=A[0].intersectionRatio;if(O!==l){if(!T)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!hv(c,t.getBoundingClientRect())&&o(),T=!1}try{r=new IntersectionObserver(P,{...D,root:i.ownerDocument})}catch{r=new IntersectionObserver(P,D)}r.observe(t)}return o(!0),s}function KO(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Id(t),u=i||s?[...c?jo(c):[],...jo(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const d=c&&a?HO(c,r):null;let f=-1,p=null;o&&(p=new ResizeObserver(b=>{let[k]=b;k&&k.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(e)})),r()}),c&&!l&&p.observe(c),p.observe(e));let v,g=l?Zi(t):null;l&&m();function m(){const b=Zi(t);g&&!hv(g,b)&&r(),g=b,v=requestAnimationFrame(m)}return r(),()=>{var b;u.forEach(k=>{i&&k.removeEventListener("scroll",r),s&&k.removeEventListener("resize",r)}),d?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const GO=_O,YO=bO,JO=gO,QO=kO,XO=vO,eD=mO,tD=wO,rD=(t,e,r)=>{const n=new Map,i={platform:WO,...r},s={...i.platform,_c:n};return pO(t,e,{...i,platform:s})};function Vi(t){return typeof t=="function"?t():t}function pv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function mv(t,e){const r=pv(t);return Math.round(e*r)/r}function gv(t){return{[`--bits-${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${t}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${t}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${t}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function nD(t){const e=t.whileElementsMounted,r=C(()=>Vi(t.open)??!0),n=C(()=>Vi(t.middleware)),i=C(()=>Vi(t.transform)??!0),s=C(()=>Vi(t.placement)??"bottom"),o=C(()=>Vi(t.strategy)??"absolute"),a=C(()=>Vi(t.sideOffset)??0),l=C(()=>Vi(t.alignOffset)??0),c=t.reference;let u=le(0),d=le(0);const f=Nr(null);let p=le(Be(h(o))),v=le(Be(h(s))),g=le(Be({})),m=le(!1);const b=C(()=>{const O=f.current?mv(f.current,h(u)):h(u),F=f.current?mv(f.current,h(d)):h(d);return h(i)?{position:h(p),left:"0",top:"0",transform:`translate(${O}px, ${F}px)`,...f.current&&pv(f.current)>=1.5&&{willChange:"transform"}}:{position:h(p),left:`${O}px`,top:`${F}px`}});let k;function D(){c.current===null||f.current===null||rD(c.current,f.current,{middleware:h(n),placement:h(s),strategy:h(o)}).then(O=>{if(!h(r)&&h(u)!==0&&h(d)!==0){const F=Math.max(Math.abs(h(a)),Math.abs(h(l)),15);if(O.x<=F&&O.y<=F)return}M(u,O.x,!0),M(d,O.y,!0),M(p,O.strategy,!0),M(v,O.placement,!0),M(g,O.middlewareData,!0),M(m,!0)})}function T(){typeof k=="function"&&(k(),k=void 0)}function P(){if(T(),e===void 0){D();return}c.current===null||f.current===null||(k=e(c.current,f.current,D))}function A(){h(r)||M(m,!1)}return _e(D),_e(P),_e(A),_e(()=>T),{floating:f,reference:c,get strategy(){return h(p)},get placement(){return h(v)},get middlewareData(){return h(g)},get isPositioned(){return h(m)},get floatingStyles(){return h(b)},get update(){return D}}}const iD={top:"bottom",right:"left",bottom:"top",left:"right"},Md=new In("Floating.Root"),vv=new In("Floating.Content"),$d=new In("Floating.Root");class Nl{static create(e=!1){return e?$d.set(new Nl):Md.set(new Nl)}anchorNode=Nr(null);customAnchorNode=Nr(null);triggerNode=Nr(null);constructor(){_e(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Fl{static create(e,r=!1){return r?vv.set(new Fl(e,$d.get())):vv.set(new Fl(e,Md.get()))}opts;root;contentRef=Nr(null);wrapperRef=Nr(null);arrowRef=Nr(null);contentAttachment=ct(this.contentRef);wrapperAttachment=ct(this.wrapperRef);arrowAttachment=ct(this.arrowRef);arrowId=Nr(fi());#e=C(()=>{if(typeof this.opts.style=="string")return Co(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new K1(()=>this.arrowRef.current??void 0);#n=C(()=>this.#r?.width??0);#i=C(()=>this.#r?.height??0);#s=C(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=C(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=C(()=>h(this.#a).length>0);get hasExplicitBoundaries(){return h(this.#o)}set hasExplicitBoundaries(e){M(this.#o,e)}#l=C(()=>({padding:this.opts.collisionPadding.current,boundary:h(this.#a).filter(lA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return h(this.#l)}set detectOverflowOptions(e){M(this.#l,e)}#c=le(void 0);#d=le(void 0);#u=le(void 0);#f=le(void 0);#h=C(()=>[GO({mainAxis:this.opts.sideOffset.current+h(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&YO({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?tD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&JO({...this.detectOverflowOptions}),QO({...this.detectOverflowOptions,apply:({rects:e,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=e.reference;M(this.#c,r,!0),M(this.#d,n,!0),M(this.#u,i,!0),M(this.#f,s,!0)}}),this.arrowRef.current&&eD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),sD({arrowWidth:h(this.#n),arrowHeight:h(this.#i)}),this.opts.hideWhenDetached.current&&XO({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return h(this.#h)}set middleware(e){M(this.#h,e)}floating;#p=C(()=>oD(this.floating.placement));get placedSide(){return h(this.#p)}set placedSide(e){M(this.#p,e)}#m=C(()=>aD(this.floating.placement));get placedAlign(){return h(this.#m)}set placedAlign(e){M(this.#m,e)}#g=C(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return h(this.#g)}set arrowX(e){M(this.#g,e)}#v=C(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return h(this.#v)}set arrowY(e){M(this.#v,e)}#y=C(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return h(this.#y)}set cannotCenterArrow(e){M(this.#y,e)}#_=le();get contentZIndex(){return h(this.#_)}set contentZIndex(e){M(this.#_,e,!0)}#k=C(()=>iD[this.placedSide]);get arrowBaseSide(){return h(this.#k)}set arrowBaseSide(e){M(this.#k,e)}#b=C(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${h(this.#c)}px`,"--bits-floating-available-height":`${h(this.#d)}px`,"--bits-floating-anchor-width":`${h(this.#u)}px`,"--bits-floating-anchor-height":`${h(this.#f)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...h(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return h(this.#b)}set wrapperProps(e){M(this.#b,e)}#w=C(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Do({...h(this.#e)}),...this.contentAttachment}));get props(){return h(this.#w)}set props(e){M(this.#w,e)}#S=C(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return h(this.#S)}set arrowStyle(e){M(this.#S,e)}constructor(e,r){this.opts=e,this.root=r,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),dt(()=>e.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=nD({strategy:()=>this.opts.strategy.current,placement:()=>h(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>KO(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),_e(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),dt(()=>this.contentRef.current,n=>{if(!n)return;const i=ig(n);this.contentZIndex=i.getComputedStyle(n).zIndex}),_e(()=>{this.floating.floating.current=this.wrapperRef.current})}}class Rl{static create(e,r=!1){return r?new Rl(e,$d.get()):new Rl(e,Md.get())}opts;root;constructor(e,r){this.opts=e,this.root=r,e.virtualEl&&e.virtualEl.current?r.triggerNode=g1(e.virtualEl.current):r.triggerNode=e.ref}}function sD(t){return{name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:i}=e,o=i.arrow?.centerOffset!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=Nd(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(i.arrow?.x??0)+a/2,p=(i.arrow?.y??0)+l/2;let v="",g="";return c==="bottom"?(v=o?d:`${f}px`,g=`${-l}px`):c==="top"?(v=o?d:`${f}px`,g=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?d:`${p}px`):c==="left"&&(v=`${n.floating.width+l}px`,g=o?d:`${p}px`),{data:{x:v,y:g}}}}}function Nd(t){const[e,r="center"]=t.split("-");return[e,r]}function oD(t){return Nd(t)[0]}function aD(t){return Nd(t)[1]}function yv(t,e){te(e,!0);let r=_(e,"children",7),n=_(e,"tooltip",7,!1);Nl.create(n());var i={get children(){return r()},set children(a){r(a),y()},get tooltip(){return n()},set tooltip(a=!1){n(a),y()}},s=H(),o=L(s);return ke(o,()=>r()??Ue),w(t,s),re(i)}ne(yv,{children:{},tooltip:{}},[],[],{mode:"open"});function _v(t,e){te(e,!0);let r=_(e,"id",7),n=_(e,"children",7),i=_(e,"virtualEl",7),s=_(e,"ref",7),o=_(e,"tooltip",7,!1);Rl.create({id:R(()=>r()),virtualEl:R(()=>i()),ref:s()},o());var a={get id(){return r()},set id(u){r(u),y()},get children(){return n()},set children(u){n(u),y()},get virtualEl(){return i()},set virtualEl(u){i(u),y()},get ref(){return s()},set ref(u){s(u),y()},get tooltip(){return o()},set tooltip(u=!1){o(u),y()}},l=H(),c=L(l);return ke(c,()=>n()??Ue),w(t,l),re(a)}ne(_v,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function bv(t,e){te(e,!0);let r=_(e,"content",7),n=_(e,"side",7,"bottom"),i=_(e,"sideOffset",7,0),s=_(e,"align",7,"center"),o=_(e,"alignOffset",7,0),a=_(e,"id",7),l=_(e,"arrowPadding",7,0),c=_(e,"avoidCollisions",7,!0),u=_(e,"collisionBoundary",23,()=>[]),d=_(e,"collisionPadding",7,0),f=_(e,"hideWhenDetached",7,!1),p=_(e,"onPlaced",7,()=>{}),v=_(e,"sticky",7,"partial"),g=_(e,"updatePositionStrategy",7,"optimized"),m=_(e,"strategy",7,"fixed"),b=_(e,"dir",7,"ltr"),k=_(e,"style",23,()=>({})),D=_(e,"wrapperId",23,fi),T=_(e,"customAnchor",7,null),P=_(e,"enabled",7),A=_(e,"tooltip",7,!1);const O=Fl.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>u()),collisionPadding:R(()=>d()),hideWhenDetached:R(()=>f()),onPlaced:R(()=>p()),sticky:R(()=>v()),updatePositionStrategy:R(()=>g()),strategy:R(()=>m()),dir:R(()=>b()),style:R(()=>k()),enabled:R(()=>P()),wrapperId:R(()=>D()),customAnchor:R(()=>T())},A()),F=C(()=>et(O.wrapperProps,{style:{pointerEvents:"auto"}}));var N={get content(){return r()},set content(Z){r(Z),y()},get side(){return n()},set side(Z="bottom"){n(Z),y()},get sideOffset(){return i()},set sideOffset(Z=0){i(Z),y()},get align(){return s()},set align(Z="center"){s(Z),y()},get alignOffset(){return o()},set alignOffset(Z=0){o(Z),y()},get id(){return a()},set id(Z){a(Z),y()},get arrowPadding(){return l()},set arrowPadding(Z=0){l(Z),y()},get avoidCollisions(){return c()},set avoidCollisions(Z=!0){c(Z),y()},get collisionBoundary(){return u()},set collisionBoundary(Z=[]){u(Z),y()},get collisionPadding(){return d()},set collisionPadding(Z=0){d(Z),y()},get hideWhenDetached(){return f()},set hideWhenDetached(Z=!1){f(Z),y()},get onPlaced(){return p()},set onPlaced(Z=()=>{}){p(Z),y()},get sticky(){return v()},set sticky(Z="partial"){v(Z),y()},get updatePositionStrategy(){return g()},set updatePositionStrategy(Z="optimized"){g(Z),y()},get strategy(){return m()},set strategy(Z="fixed"){m(Z),y()},get dir(){return b()},set dir(Z="ltr"){b(Z),y()},get style(){return k()},set style(Z={}){k(Z),y()},get wrapperId(){return D()},set wrapperId(Z=fi()){D(Z),y()},get customAnchor(){return T()},set customAnchor(Z=null){T(Z),y()},get enabled(){return P()},set enabled(Z){P(Z),y()},get tooltip(){return A()},set tooltip(Z=!1){A(Z),y()}},j=H(),G=L(j);return ke(G,()=>r()??Ue,()=>({props:O.props,wrapperProps:h(F)})),w(t,j),re(N)}ne(bv,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function wv(t,e){te(e,!0);let r=_(e,"content",7),n=_(e,"onPlaced",7);Sn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=H(),o=L(s);return ke(o,()=>r()??Ue,()=>({props:{},wrapperProps:{}})),w(t,s),re(i)}ne(wv,{content:{},onPlaced:{}},[],[],{mode:"open"});function kv(t,e){te(e,!0);let r=_(e,"content",7),n=_(e,"isStatic",7,!1),i=_(e,"onPlaced",7),s=Je(e,["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);var o={get content(){return r()},set content(d){r(d),y()},get isStatic(){return n()},set isStatic(d=!1){n(d),y()},get onPlaced(){return i()},set onPlaced(d){i(d),y()}},a=H(),l=L(a);{var c=d=>{wv(d,{get content(){return r()},get onPlaced(){return i()}})},u=d=>{bv(d,Qn({get content(){return r()},get onPlaced(){return i()}},()=>s))};de(l,d=>{n()?d(c):d(u,!1)})}return w(t,a),re(o)}ne(kv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var lD=q("<!> <!>",1);function Fd(t,e){te(e,!0);let r=_(e,"popper",7),n=_(e,"onEscapeKeydown",7),i=_(e,"escapeKeydownBehavior",7),s=_(e,"preventOverflowTextSelection",7),o=_(e,"id",7),a=_(e,"onPointerDown",7),l=_(e,"onPointerUp",7),c=_(e,"side",7),u=_(e,"sideOffset",7),d=_(e,"align",7),f=_(e,"alignOffset",7),p=_(e,"arrowPadding",7),v=_(e,"avoidCollisions",7),g=_(e,"collisionBoundary",7),m=_(e,"collisionPadding",7),b=_(e,"sticky",7),k=_(e,"hideWhenDetached",7),D=_(e,"updatePositionStrategy",7),T=_(e,"strategy",7),P=_(e,"dir",7),A=_(e,"preventScroll",7),O=_(e,"wrapperId",7),F=_(e,"style",7),N=_(e,"onPlaced",7),j=_(e,"onInteractOutside",7),G=_(e,"onCloseAutoFocus",7),Z=_(e,"onOpenAutoFocus",7),ue=_(e,"onFocusOutside",7),me=_(e,"interactOutsideBehavior",7,"close"),K=_(e,"loop",7),J=_(e,"trapFocus",7,!0),B=_(e,"isValidEvent",7,()=>!1),W=_(e,"customAnchor",7,null),Y=_(e,"isStatic",7,!1),ae=_(e,"enabled",7),X=_(e,"ref",7),ye=_(e,"tooltip",7,!1),V=_(e,"contentPointerEvents",7,"auto"),pe=Je(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);var U={get popper(){return r()},set popper(z){r(z),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(z){n(z),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(z){i(z),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(z){s(z),y()},get id(){return o()},set id(z){o(z),y()},get onPointerDown(){return a()},set onPointerDown(z){a(z),y()},get onPointerUp(){return l()},set onPointerUp(z){l(z),y()},get side(){return c()},set side(z){c(z),y()},get sideOffset(){return u()},set sideOffset(z){u(z),y()},get align(){return d()},set align(z){d(z),y()},get alignOffset(){return f()},set alignOffset(z){f(z),y()},get arrowPadding(){return p()},set arrowPadding(z){p(z),y()},get avoidCollisions(){return v()},set avoidCollisions(z){v(z),y()},get collisionBoundary(){return g()},set collisionBoundary(z){g(z),y()},get collisionPadding(){return m()},set collisionPadding(z){m(z),y()},get sticky(){return b()},set sticky(z){b(z),y()},get hideWhenDetached(){return k()},set hideWhenDetached(z){k(z),y()},get updatePositionStrategy(){return D()},set updatePositionStrategy(z){D(z),y()},get strategy(){return T()},set strategy(z){T(z),y()},get dir(){return P()},set dir(z){P(z),y()},get preventScroll(){return A()},set preventScroll(z){A(z),y()},get wrapperId(){return O()},set wrapperId(z){O(z),y()},get style(){return F()},set style(z){F(z),y()},get onPlaced(){return N()},set onPlaced(z){N(z),y()},get onInteractOutside(){return j()},set onInteractOutside(z){j(z),y()},get onCloseAutoFocus(){return G()},set onCloseAutoFocus(z){G(z),y()},get onOpenAutoFocus(){return Z()},set onOpenAutoFocus(z){Z(z),y()},get onFocusOutside(){return ue()},set onFocusOutside(z){ue(z),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(z="close"){me(z),y()},get loop(){return K()},set loop(z){K(z),y()},get trapFocus(){return J()},set trapFocus(z=!0){J(z),y()},get isValidEvent(){return B()},set isValidEvent(z=()=>!1){B(z),y()},get customAnchor(){return W()},set customAnchor(z=null){W(z),y()},get isStatic(){return Y()},set isStatic(z=!1){Y(z),y()},get enabled(){return ae()},set enabled(z){ae(z),y()},get ref(){return X()},set ref(z){X(z),y()},get tooltip(){return ye()},set tooltip(z=!1){ye(z),y()},get contentPointerEvents(){return V()},set contentPointerEvents(z="auto"){V(z),y()}};return kv(t,{get isStatic(){return Y()},get id(){return o()},get side(){return c()},get sideOffset(){return u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return b()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return D()},get strategy(){return T()},get dir(){return P()},get wrapperId(){return O()},get style(){return F()},get onPlaced(){return N()},get customAnchor(){return W()},get enabled(){return ae()},get tooltip(){return ye()},content:(we,E)=>{let Ve=()=>E?.().props,Re=()=>E?.().wrapperProps;var it=lD(),Xe=L(it);{var He=Tt=>{Wu(Tt,{get preventScroll(){return A()}})},Et=Tt=>{var qt=H(),nr=L(qt);{var Ot=Dt=>{Wu(Dt,{get preventScroll(){return A()}})};de(nr,Dt=>{e.forceMount||Dt(Ot)},!0)}w(Tt,qt)};de(Xe,Tt=>{e.forceMount&&ae()?Tt(He):Tt(Et,!1)})}var pt=ee(Xe,2);Eg(pt,{get onOpenAutoFocus(){return Z()},get onCloseAutoFocus(){return G()},get loop(){return K()},get enabled(){return ae()},get trapFocus(){return J()},get forceMount(){return e.forceMount},get ref(){return X()},focusScope:(qt,nr)=>{let Ot=()=>nr?.().props;xg(qt,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return ae()},get ref(){return X()},children:(Dt,Zn)=>{Sg(Dt,{get id(){return o()},get onInteractOutside(){return j()},get onFocusOutside(){return ue()},get interactOutsideBehavior(){return me()},get isValidEvent(){return B()},get enabled(){return ae()},get ref(){return X()},children:(Br,jr)=>{let ir=()=>jr?.().props;Ag(Br,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return ae()},get ref(){return X()},children:(Wt,sr)=>{var vi=H(),dn=L(vi);{let Ns=C(()=>({props:et(pe,Ve(),ir(),Ot(),{style:{pointerEvents:V()}}),wrapperProps:Re()}));ke(dn,()=>r()??Ue,()=>h(Ns))}w(Wt,vi)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),w(we,it)},$$slots:{content:!0}}),re(U)}ne(Fd,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});function Sv(t,e){te(e,!0);let r=_(e,"popper",7),n=_(e,"open",7),i=_(e,"onEscapeKeydown",7),s=_(e,"escapeKeydownBehavior",7),o=_(e,"preventOverflowTextSelection",7),a=_(e,"id",7),l=_(e,"onPointerDown",7),c=_(e,"onPointerUp",7),u=_(e,"side",7),d=_(e,"sideOffset",7),f=_(e,"align",7),p=_(e,"alignOffset",7),v=_(e,"arrowPadding",7),g=_(e,"avoidCollisions",7),m=_(e,"collisionBoundary",7),b=_(e,"collisionPadding",7),k=_(e,"sticky",7),D=_(e,"hideWhenDetached",7),T=_(e,"updatePositionStrategy",7),P=_(e,"strategy",7),A=_(e,"dir",7),O=_(e,"preventScroll",7),F=_(e,"wrapperId",7),N=_(e,"style",7),j=_(e,"onPlaced",7),G=_(e,"onInteractOutside",7),Z=_(e,"onCloseAutoFocus",7),ue=_(e,"onOpenAutoFocus",7),me=_(e,"onFocusOutside",7),K=_(e,"interactOutsideBehavior",7,"close"),J=_(e,"loop",7),B=_(e,"trapFocus",7,!0),W=_(e,"isValidEvent",7,()=>!1),Y=_(e,"customAnchor",7,null),ae=_(e,"isStatic",7,!1),X=_(e,"ref",7),ye=_(e,"shouldRender",7),V=Je(e,["$$slots","$$events","$$legacy","$$host","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var pe={get popper(){return r()},set popper(E){r(E),y()},get open(){return n()},set open(E){n(E),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(E){i(E),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(E){s(E),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(E){o(E),y()},get id(){return a()},set id(E){a(E),y()},get onPointerDown(){return l()},set onPointerDown(E){l(E),y()},get onPointerUp(){return c()},set onPointerUp(E){c(E),y()},get side(){return u()},set side(E){u(E),y()},get sideOffset(){return d()},set sideOffset(E){d(E),y()},get align(){return f()},set align(E){f(E),y()},get alignOffset(){return p()},set alignOffset(E){p(E),y()},get arrowPadding(){return v()},set arrowPadding(E){v(E),y()},get avoidCollisions(){return g()},set avoidCollisions(E){g(E),y()},get collisionBoundary(){return m()},set collisionBoundary(E){m(E),y()},get collisionPadding(){return b()},set collisionPadding(E){b(E),y()},get sticky(){return k()},set sticky(E){k(E),y()},get hideWhenDetached(){return D()},set hideWhenDetached(E){D(E),y()},get updatePositionStrategy(){return T()},set updatePositionStrategy(E){T(E),y()},get strategy(){return P()},set strategy(E){P(E),y()},get dir(){return A()},set dir(E){A(E),y()},get preventScroll(){return O()},set preventScroll(E){O(E),y()},get wrapperId(){return F()},set wrapperId(E){F(E),y()},get style(){return N()},set style(E){N(E),y()},get onPlaced(){return j()},set onPlaced(E){j(E),y()},get onInteractOutside(){return G()},set onInteractOutside(E){G(E),y()},get onCloseAutoFocus(){return Z()},set onCloseAutoFocus(E){Z(E),y()},get onOpenAutoFocus(){return ue()},set onOpenAutoFocus(E){ue(E),y()},get onFocusOutside(){return me()},set onFocusOutside(E){me(E),y()},get interactOutsideBehavior(){return K()},set interactOutsideBehavior(E="close"){K(E),y()},get loop(){return J()},set loop(E){J(E),y()},get trapFocus(){return B()},set trapFocus(E=!0){B(E),y()},get isValidEvent(){return W()},set isValidEvent(E=()=>!1){W(E),y()},get customAnchor(){return Y()},set customAnchor(E=null){Y(E),y()},get isStatic(){return ae()},set isStatic(E=!1){ae(E),y()},get ref(){return X()},set ref(E){X(E),y()},get shouldRender(){return ye()},set shouldRender(E){ye(E),y()}},U=H(),z=L(U);{var we=E=>{Fd(E,Qn({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 u()},get sideOffset(){return d()},get align(){return f()},get alignOffset(){return p()},get arrowPadding(){return v()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return b()},get sticky(){return k()},get hideWhenDetached(){return D()},get updatePositionStrategy(){return T()},get strategy(){return P()},get dir(){return A()},get preventScroll(){return O()},get wrapperId(){return F()},get style(){return N()},get onPlaced(){return j()},get customAnchor(){return Y()},get isStatic(){return ae()},get enabled(){return n()},get onInteractOutside(){return G()},get onCloseAutoFocus(){return Z()},get onOpenAutoFocus(){return ue()},get interactOutsideBehavior(){return K()},get loop(){return J()},get trapFocus(){return B()},get isValidEvent(){return W()},get onFocusOutside(){return me()},forceMount:!1,get ref(){return X()}},()=>V))};de(z,E=>{ye()&&E(we)})}return w(t,U),re(pe)}ne(Sv,{popper:{},open:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},ref:{},shouldRender:{}},[],[],{mode:"open"});function xv(t,e){te(e,!0);let r=_(e,"popper",7),n=_(e,"onEscapeKeydown",7),i=_(e,"escapeKeydownBehavior",7),s=_(e,"preventOverflowTextSelection",7),o=_(e,"id",7),a=_(e,"onPointerDown",7),l=_(e,"onPointerUp",7),c=_(e,"side",7),u=_(e,"sideOffset",7),d=_(e,"align",7),f=_(e,"alignOffset",7),p=_(e,"arrowPadding",7),v=_(e,"avoidCollisions",7),g=_(e,"collisionBoundary",7),m=_(e,"collisionPadding",7),b=_(e,"sticky",7),k=_(e,"hideWhenDetached",7),D=_(e,"updatePositionStrategy",7),T=_(e,"strategy",7),P=_(e,"dir",7),A=_(e,"preventScroll",7),O=_(e,"wrapperId",7),F=_(e,"style",7),N=_(e,"onPlaced",7),j=_(e,"onInteractOutside",7),G=_(e,"onCloseAutoFocus",7),Z=_(e,"onOpenAutoFocus",7),ue=_(e,"onFocusOutside",7),me=_(e,"interactOutsideBehavior",7,"close"),K=_(e,"loop",7),J=_(e,"trapFocus",7,!0),B=_(e,"isValidEvent",7,()=>!1),W=_(e,"customAnchor",7,null),Y=_(e,"isStatic",7,!1),ae=_(e,"enabled",7),X=Je(e,["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);var ye={get popper(){return r()},set popper(V){r(V),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(V){n(V),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(V){i(V),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(V){s(V),y()},get id(){return o()},set id(V){o(V),y()},get onPointerDown(){return a()},set onPointerDown(V){a(V),y()},get onPointerUp(){return l()},set onPointerUp(V){l(V),y()},get side(){return c()},set side(V){c(V),y()},get sideOffset(){return u()},set sideOffset(V){u(V),y()},get align(){return d()},set align(V){d(V),y()},get alignOffset(){return f()},set alignOffset(V){f(V),y()},get arrowPadding(){return p()},set arrowPadding(V){p(V),y()},get avoidCollisions(){return v()},set avoidCollisions(V){v(V),y()},get collisionBoundary(){return g()},set collisionBoundary(V){g(V),y()},get collisionPadding(){return m()},set collisionPadding(V){m(V),y()},get sticky(){return b()},set sticky(V){b(V),y()},get hideWhenDetached(){return k()},set hideWhenDetached(V){k(V),y()},get updatePositionStrategy(){return D()},set updatePositionStrategy(V){D(V),y()},get strategy(){return T()},set strategy(V){T(V),y()},get dir(){return P()},set dir(V){P(V),y()},get preventScroll(){return A()},set preventScroll(V){A(V),y()},get wrapperId(){return O()},set wrapperId(V){O(V),y()},get style(){return F()},set style(V){F(V),y()},get onPlaced(){return N()},set onPlaced(V){N(V),y()},get onInteractOutside(){return j()},set onInteractOutside(V){j(V),y()},get onCloseAutoFocus(){return G()},set onCloseAutoFocus(V){G(V),y()},get onOpenAutoFocus(){return Z()},set onOpenAutoFocus(V){Z(V),y()},get onFocusOutside(){return ue()},set onFocusOutside(V){ue(V),y()},get interactOutsideBehavior(){return me()},set interactOutsideBehavior(V="close"){me(V),y()},get loop(){return K()},set loop(V){K(V),y()},get trapFocus(){return J()},set trapFocus(V=!0){J(V),y()},get isValidEvent(){return B()},set isValidEvent(V=()=>!1){B(V),y()},get customAnchor(){return W()},set customAnchor(V=null){W(V),y()},get isStatic(){return Y()},set isStatic(V=!1){Y(V),y()},get enabled(){return ae()},set enabled(V){ae(V),y()}};return Fd(t,Qn({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 u()},get align(){return d()},get alignOffset(){return f()},get arrowPadding(){return p()},get avoidCollisions(){return v()},get collisionBoundary(){return g()},get collisionPadding(){return m()},get sticky(){return b()},get hideWhenDetached(){return k()},get updatePositionStrategy(){return D()},get strategy(){return T()},get dir(){return P()},get preventScroll(){return A()},get wrapperId(){return O()},get style(){return F()},get onPlaced(){return N()},get customAnchor(){return W()},get isStatic(){return Y()},get enabled(){return ae()},get onInteractOutside(){return j()},get onCloseAutoFocus(){return G()},get onOpenAutoFocus(){return Z()},get interactOutsideBehavior(){return me()},get loop(){return K()},get trapFocus(){return J()},get isValidEvent(){return B()},get onFocusOutside(){return ue()}},()=>X,{forceMount:!0})),re(ye)}ne(xv,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});const Ll=al({component:"date-field",parts:["input","label","segment"]}),Es={day:{min:1,max:t=>{const e=t.segmentValues.month,r=t.value.current??t.placeholder.current;return Ro(e?r.set({month:Number.parseInt(e)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(t,e)=>e.placeholder.current?`${t} - ${e.formatter.fullMonth(tr(e.placeholder.current.set({month:t})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:t=>t.hourCycle.current===12?1:0,max:t=>t.hourCycle.current===24?23:t.hourCycle.current===12||Lg(t.locale.current)===12?12:23,cycle:1,canBeZero:!0,padZero:!0},minute:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0},second:{min:0,max:59,cycle:1,canBeZero:!0,padZero:!0}},mi=new In("DateField.Root");class Rd{static create(e,r){return mi.set(new Rd(e,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=fi();formatter;initialSegments;#e=le();get segmentValues(){return h(this.#e)}set segmentValues(e){M(this.#e,e,!0)}announcer;#t=C(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return h(this.#t)}set readonlySegmentsSet(e){M(this.#t,e)}segmentStates=Ng();#r=le(null);#n=le(null);#i=le(null);get descriptionNode(){return h(this.#i)}set descriptionNode(e){M(this.#i,e,!0)}#s=le(null);get validationNode(){return h(this.#s)}set validationNode(e){M(this.#s,e,!0)}states=Ng();#a=le(null);get dayPeriodNode(){return h(this.#a)}set dayPeriodNode(e){M(this.#a,e,!0)}rangeRoot=void 0;#o=le("");get name(){return h(this.#o)}set name(e){M(this.#o,e,!0)}domContext=new bs(()=>null);constructor(e,r){this.rangeRoot=r,this.value=e.value,this.placeholder=r?r.opts.placeholder:e.placeholder,this.validate=r?Nr(void 0):e.validate,this.minValue=r?r.opts.minValue:e.minValue,this.maxValue=r?r.opts.maxValue:e.maxValue,this.disabled=r?r.opts.disabled:e.disabled,this.readonly=r?r.opts.readonly:e.readonly,this.granularity=r?r.opts.granularity:e.granularity,this.readonlySegments=r?r.opts.readonlySegments:e.readonlySegments,this.hourCycle=r?r.opts.hourCycle:e.hourCycle,this.locale=r?r.opts.locale:e.locale,this.hideTimeZone=r?r.opts.hideTimeZone:e.hideTimeZone,this.required=r?r.opts.required:e.required,this.onInvalid=r?r.opts.onInvalid:e.onInvalid,this.errorMessageId=r?r.opts.errorMessageId:e.errorMessageId,this.isInvalidProp=e.isInvalidProp,this.formatter=Vg({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=Ju(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=wl(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),_e(()=>{Ge(()=>{this.initialSegments=Ju(this.inferredGranularity)})}),Sn(()=>{this.announcer=wl(this.domContext.getDocument())}),_s(()=>{r||yC(this.descriptionId,this.domContext.getDocument())}),_e(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),_e(()=>{if(r)return;if(this.value.current){const i=Ge(()=>this.descriptionId);vC({id:i,formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()})}const n=Ge(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&Ge(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),_e(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),_e(()=>{this.value.current===void 0&&(this.segmentValues=Ju(this.inferredGranularity))}),dt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(e){this.name=e}setFieldNode(e){M(this.#r,e,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:h(this.#r)}setLabelNode(e){M(this.#n,e,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:h(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(e){this.value.current=e}syncSegmentValues(e){const r=Sl.map(n=>{const i=e[n];if(n==="month"){if(this.states.month.updating)return[n,this.states.month.updating];if(i<10)return[n,`0${i}`]}if(n==="day"){if(this.states.day.updating)return[n,this.states.day.updating];if(i<10)return[n,`0${i}`]}if(n==="year"){if(this.states.year.updating)return[n,this.states.year.updating];const o=4-`${i}`.length;if(o>0)return[n,`${"0".repeat(o)}${i}`]}return[n,`${i}`]});if("hour"in e){const n=Ku.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(tr(e))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`];if(e[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(e[s]!==void 0&&e[s]<10)return[s,`0${e[s]}`]}return[s,`${e[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#c=C(()=>{const e=this.value.current;if(!e)return!1;const r=this.validate.current?.(e);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&zi(e,n))return{reason:"min"};const i=this.maxValue.current;return i&&zi(i,e)?{reason:"max"}:!1});get validationStatus(){return h(this.#c)}set validationStatus(e){M(this.#c,e)}#d=C(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return h(this.#d)}set isInvalid(e){M(this.#d,e)}#u=C(()=>{const e=this.granularity.current;return e||mC(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return h(this.#u)}set inferredGranularity(e){M(this.#u,e)}#f=C(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return h(this.#f)}set dateRef(e){M(this.#f,e)}#h=C(()=>cC({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return h(this.#h)}set allSegmentContent(e){M(this.#h,e)}#p=C(()=>this.allSegmentContent.arr);get segmentContents(){return h(this.#p)}set segmentContents(e){M(this.#p,e)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"}};#m(e){return`${e} ${this.getLabelNode()?.id??""}`}updateSegment(e,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(e))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(pC(o)){const c=o[e],u=r;if(e==="month"){const d=u(c);if(this.states.month.updating=d,d!==null&&o.day!==null){const f=l.set({month:Number.parseInt(d)}),p=Ro(tr(f));Number.parseInt(o.day)>p&&(o.day=`${p}`)}a={...o,[e]:d}}else if(e==="dayPeriod"){const d=u(c);this.states.dayPeriod.updating=d;const f=this.value.current;if(f&&"hour"in f){const p=f.hour;d==="AM"?p>=12&&(o.hour=`${p-12}`):d==="PM"&&p<12&&(o.hour=`${p+12}`)}a={...o,[e]:d}}else if(e==="hour"){const d=u(c);if(this.states.hour.updating=d,d!==null&&o.dayPeriod!==null){const f=this.formatter.dayPeriod(tr(l.set({hour:Number.parseInt(d)})),this.hourCycle.current);(f==="AM"||f==="PM")&&(o.dayPeriod=f)}a={...o,[e]:d}}else if(e==="minute"){const d=u(c);this.states.minute.updating=d,a={...o,[e]:d}}else if(e==="second"){const d=u(c);this.states.second.updating=d,a={...o,[e]:d}}else if(e==="year"){const d=u(c);this.states.year.updating=d,a={...o,[e]:d}}else if(e==="day"){const d=u(c);this.states.day.updating=d,a={...o,[e]:d}}else{const d=u(c);a={...o,[e]:d}}}else if(xl(e)){const c=o[e],u=r,d=u(c);if(e==="month"&&d!==null&&o.day!==null){this.states.month.updating=d;const f=l.set({month:Number.parseInt(d)}),p=Ro(tr(f));Number.parseInt(o.day)>p&&(o.day=`${p}`),a={...o,[e]:d}}else if(e==="year"){const f=u(c);this.states.year.updating=f,a={...o,[e]:f}}else if(e==="day"){const f=u(c);this.states.day.updating=f,a={...o,[e]:f}}else a={...o,[e]:d}}this.segmentValues=a,hC(a,h(this.#r))?this.setValue(fC({segmentObj:a,fieldNode:h(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(e){this.disabled.current&&e.preventDefault()}getBaseSegmentAttrs(e,r){const n=this.readonlySegmentsSet.has(e),i={"aria-invalid":Pu(this.isInvalid),"aria-disabled":Fr(this.disabled.current),"aria-readonly":Fr(this.readonly.current||n),"data-invalid":We(this.isInvalid),"data-disabled":We(this.disabled.current),"data-readonly":We(this.readonly.current||n),"data-segment":`${e}`,[Ll.segment]:""};if(e==="literal")return i;const s=this.descriptionNode?.id,o=gC(r,h(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}}}class Ld{static create(e){return new Ld(e,mi.get())}opts;root;domContext;attachment;constructor(e,r){this.opts=e,this.root=r,this.domContext=new bs(e.ref),this.root.domContext=this.domContext,this.attachment=ct(e.ref,n=>this.root.setFieldNode(n)),dt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=C(()=>{if(!(!Pn||!this.domContext.getElementById(this.root.descriptionId)))return this.root.descriptionId});#t=C(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":h(this.#e),"aria-disabled":Fr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":We(this.root.disabled.current),[Ll.input]:"",...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class zd{static create(){return new zd(mi.get())}root;#e=C(()=>this.root.name!=="");get shouldRender(){return h(this.#e)}set shouldRender(e){M(this.#e,e)}#t=C(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return h(this.#t)}set isoValue(e){M(this.#t,e)}constructor(e){this.root=e}#r=C(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return h(this.#r)}set props(e){M(this.#r,e)}}class Zd{static create(e){return new Zd(e,mi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=ct(e.ref,n=>this.root.setLabelNode(n))}onclick(e){if(this.root.disabled.current)return;const r=wC(this.root.getFieldNode());r&&r.focus()}#e=C(()=>({id:this.opts.id.current,"data-invalid":We(this.root.isInvalid),"data-disabled":We(this.root.disabled.current),[Ll.label]:"",onclick:this.onclick,...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class Ts{opts;root;announcer;part;config;attachment;constructor(e,r,n,i){this.opts=e,this.root=r,this.part=n,this.config=i,this.announcer=r.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=ct(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,r=!0){const n=String(e);return r&&this.config.padZero&&n.length===1?`0${e}`:n}onkeydown(e){const r=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in r))&&(e.key!==ul&&e.preventDefault(),!!Qu(e.key))){if(jd(e.key)){this.#i(r);return}if(qd(e.key)){this.#s(r);return}if(dl(e.key)){this.#a(e);return}if(Wd(e.key)){this.#o(e);return}Zo(e.key)&&zo(e,this.root.getFieldNode())}}#i(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#s(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1),this.root.updateSegment(this.part,n=>{if(n===null){const o=e[this.part];return this.announcer.announce(this.#r(o)),this.#n(o)}const s=e.set({[this.part]:Number.parseInt(n)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(s)),this.#n(s)})}#a(e){const r=Number.parseInt(e.key);let n=!1;const i=this.#e(),s=Math.floor(i/10),o=r===0,a=this.part;this.root.updateSegment(this.part,l=>{if(a in this.root.states&&this.root.states[a].hasLeftFocus&&(l=null,this.root.states[a].hasLeftFocus=!1),l===null)return o?(a in this.root.states&&(this.root.states[a].lastKeyZero=!0),this.announcer.announce("0"),"0"):(a in this.root.states&&(this.root.states[a].lastKeyZero||r>s)&&(n=!0),a in this.root.states&&(this.root.states[a].lastKeyZero=!1),n&&String(r).length===1?(this.announcer.announce(r),`0${r}`):`${r}`);if(a in this.root.states&&this.root.states[a].lastKeyZero)return r!==0?(n=!0,this.root.states[a].lastKeyZero=!1,`0${r}`):this.part==="hour"&&r===0&&this.root.hourCycle.current===24?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&r===0?(n=!0,this.root.states[a].lastKeyZero=!1,"00"):l;const c=Number.parseInt(l+r.toString());return c>i?(n=!0,`0${r}`):(n=!0,`${c}`)}),n&&zg(e,this.root.getFieldNode())}#o(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!1);let n=!1;this.root.updateSegment(this.part,i=>{if(i===null)return n=!0,this.announcer.announce(null),null;if(i.length===2&&i.startsWith("0"))return this.announcer.announce(null),null;const s=i.toString();if(s.length===1)return this.announcer.announce(null),null;const o=Number.parseInt(s.slice(0,-1));return this.announcer.announce(this.#r(o)),`${o}`}),n&&Zg(e,this.root.getFieldNode())}onfocusout(e){const r=this.part;r in this.root.states&&(this.root.states[r].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,n=>n&&n.length===1?`0${n}`:n)}getSegmentProps(){const e=this.root.segmentValues,r=this.root.placeholder.current,n=e[this.part]===null;let i=r;e[this.part]&&(i=r.set({[this.part]:Number.parseInt(e[this.part])}));const s=i[this.part],o=this.#t(),a=this.#e();let l=n?"Empty":`${s}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(l=n?"Empty":`${s} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-valuetext":l}}#l=C(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return h(this.#l)}set props(e){M(this.#l,e)}}class cD extends Ts{#e=[];#t=0;constructor(e,r){super(e,r,"year",Es.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==ul&&e.preventDefault(),!!Qu(e.key))){if(jd(e.key)){this.#r(),super.onkeydown(e);return}if(qd(e.key)){this.#r(),super.onkeydown(e);return}if(dl(e.key)){this.#i(e);return}if(Wd(e.key)){this.#s(e);return}Zo(e.key)&&zo(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let r=!1;const n=Number.parseInt(e.key);this.root.updateSegment("year",i=>{if(this.root.states.year.hasLeftFocus&&(i=null,this.root.states.year.hasLeftFocus=!1),i===null)return this.announcer.announce(n),`000${n}`;const s=i.toString()+n.toString(),o=Number.parseInt(s);if(String(o).length<4)return this.#t>0&&this.#e.length<=this.#t&&s.length<=4?(this.announcer.announce(o),s):(this.announcer.announce(o),Ev(o));this.announcer.announce(o),r=!0;const l=`${o}`;return l.length>4?l.slice(0,4):l}),(this.#e.length===4||this.#e.length===this.#t)&&(r=!0),r&&zg(e,this.root.getFieldNode())}#s(e){this.#e=[],this.#n();let r=!1;this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus=!1,n===null)return r=!0,this.announcer.announce(null),null;const i=n.toString();if(i.length===1)return this.announcer.announce(null),null;const s=i.slice(0,-1);return this.announcer.announce(s),`${s}`}),r&&Zg(e,this.root.getFieldNode())}onfocusout(e){this.root.states.year.hasLeftFocus=!0,this.#e=[],this.#r(),this.root.updateSegment("year",r=>r&&r.length!==4?Ev(Number.parseInt(r)):r)}}class uD extends Ts{constructor(e,r){super(e,r,"day",Es.day)}}class dD extends Ts{constructor(e,r){super(e,r,"month",Es.month)}}class fD extends Ts{constructor(e,r){super(e,r,"hour",Es.hour)}onkeydown(e){if(dl(e.key)){const r=this.root.updateSegment.bind(this.root);this.root.updateSegment=(n,i)=>{const s=r(n,i);return n==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),s}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}}class hD extends Ts{constructor(e,r){super(e,r,"minute",Es.minute)}}class pD extends Ts{constructor(e,r){super(e,r,"second",Es.second)}}class Vd{static create(e){return new Vd(e,mi.get())}opts;root;attachment;#e;constructor(e,r){this.opts=e,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=ct(e.ref,n=>this.root.dayPeriodNode=n)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!==ul&&e.preventDefault(),!!gD(e.key))){if(jd(e.key)||qd(e.key)){this.root.updateSegment("dayPeriod",r=>{if(r==="AM")return this.#e.announce("PM"),"PM";const n="AM";return this.#e.announce(n),n});return}Wd(e.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),(e.key===Fu||e.key===ag||Nu)&&this.root.updateSegment("dayPeriod",()=>{const r=e.key===Fu||e.key===Nu?"AM":"PM";return this.#e.announce(r),r}),Zo(e.key)&&zo(e,this.root.getFieldNode())}}#t=C(()=>{const e=this.root.segmentValues;if(!("dayPeriod"in e))return;const r=0,n=12,i=e.dayPeriod==="AM"?0:12,s=e.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return h(this.#t)}set props(e){M(this.#t,e)}}class Ud{static create(e){return new Ud(e,mi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(e.ref)}#e=C(()=>({id:this.opts.id.current,"aria-hidden":Pu(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class Bd{static create(e){return new Bd(e,mi.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=ct(e.ref)}onkeydown(e){e.key!==ul&&e.preventDefault(),!this.root.disabled.current&&Zo(e.key)&&zo(e,this.root.getFieldNode())}#e=C(()=>({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":We(!0),...this.attachment}));get props(){return h(this.#e)}set props(e){M(this.#e,e)}}class mD{static create(e,r){const n=mi.get();switch(e){case"day":return new uD(r,n);case"month":return new dD(r,n);case"year":return new cD(r,n);case"hour":return new fD(r,n);case"minute":return new hD(r,n);case"second":return new pD(r,n);case"dayPeriod":return new Vd(r,n);case"literal":return new Ud(r,n);case"timeZoneName":return new Bd(r,n)}}}function gD(t){return Qu(t)||t===Fu||t===ag||t===Nu||t===sA}function jd(t){return t===cl}function qd(t){return t===ll}function Wd(t){return t===og}function Ev(t){const r=4-String(t).length;return`${"0".repeat(r)}${t}`}function Tv(t,e){te(e,!1);const r=zd.create();Lc();var n=H(),i=L(n);{var s=o=>{Kg(o,Qn(()=>r.props))};de(i,o=>{r.shouldRender&&o(s)})}w(t,n),re()}ne(Tv,{},[],[],{mode:"open"});var vD=q("<div><!></div>"),yD=q("<!> <!>",1);function Av(t,e){const r=kt();te(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"name",7,""),o=_(e,"children",7),a=_(e,"child",7),l=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]);const c=Ld.create({id:R(()=>n()),ref:R(()=>i(),b=>i(b)),name:R(()=>s())}),u=C(()=>et(l,c.props));var d={get id(){return n()},set id(b=Fe(r)){n(b),y()},get ref(){return i()},set ref(b=null){i(b),y()},get name(){return s()},set name(b=""){s(b),y()},get children(){return o()},set children(b){o(b),y()},get child(){return a()},set child(b){a(b),y()}},f=yD(),p=L(f);{var v=b=>{var k=H(),D=L(k);ke(D,a,()=>({props:h(u),segments:c.root.segmentContents})),w(b,k)},g=b=>{var k=vD();je(k,()=>({...h(u)}));var D=$(k);ke(D,()=>o()??Ue,()=>({segments:c.root.segmentContents})),I(k),w(b,k)};de(p,b=>{a()?b(v):b(g,!1)})}var m=ee(p,2);return Tv(m,{}),w(t,f),re(d)}ne(Av,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var _D=q("<div><!></div>");function Cv(t,e){const r=kt();te(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"children",7),o=_(e,"child",7),a=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]);const l=Zd.create({id:R(()=>n()),ref:R(()=>i(),g=>i(g))}),c=C(()=>et(a,l.props));var u={get id(){return n()},set id(g=Fe(r)){n(g),y()},get ref(){return i()},set ref(g=null){i(g),y()},get children(){return s()},set children(g){s(g),y()},get child(){return o()},set child(g){o(g),y()}},d=H(),f=L(d);{var p=g=>{var m=H(),b=L(m);ke(b,o,()=>({props:h(c)})),w(g,m)},v=g=>{var m=_D();je(m,()=>({...h(c)}));var b=$(m);ke(b,()=>s()??Ue),I(m),w(g,m)};de(f,g=>{o()?g(p):g(v,!1)})}return w(t,d),re(u)}ne(Cv,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var bD=q("<span><!></span>");function Ov(t,e){const r=kt();te(e,!0);let n=_(e,"id",23,()=>Fe(r)),i=_(e,"ref",15,null),s=_(e,"children",7),o=_(e,"child",7),a=_(e,"part",7),l=Je(e,["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]);const c=mD.create(a(),{id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),u=C(()=>et(l,c.props));var d={get id(){return n()},set id(m=Fe(r)){n(m),y()},get ref(){return i()},set ref(m=null){i(m),y()},get children(){return s()},set children(m){s(m),y()},get child(){return o()},set child(m){o(m),y()},get part(){return a()},set part(m){a(m),y()}},f=H(),p=L(f);{var v=m=>{var b=H(),k=L(b);ke(k,o,()=>({props:h(u)})),w(m,b)},g=m=>{var b=bD();je(b,()=>({...h(u)}));var k=$(b);ke(k,()=>s()??Ue),I(b),w(m,b)};de(p,m=>{o()?m(v):m(g,!1)})}return w(t,f),re(d)}ne(Ov,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});const Dv=new In("DatePicker.Root");class Hd{static create(e){return Dv.set(new Hd(e))}opts;constructor(e){this.opts=e}}function Iv(t,e){const[r,n]=t;let i=!1;const s=e.length;for(let o=0,a=s-1;o<s;a=o++){const[l,c]=e[o]??[0,0],[u,d]=e[a]??[0,0];c>=n!=d>=n&&r<=(u-l)*(n-c)/(d-c)+l&&(i=!i)}return i}function Pv(t,e){return t[0]>=e.left&&t[0]<=e.right&&t[1]>=e.top&&t[1]<=e.bottom}function wD(t,e){const r=t.left+t.width/2,n=t.top+t.height/2,i=e.left+e.width/2,s=e.top+e.height/2,o=i-r,a=s-n;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class kD{#e;#t;#r=null;#n=null;constructor(e){this.#e=e,this.#t=e.buffer??1,dt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#r=null,this.#n=null;return}const s=ol(r),o=d=>{this.#i(d,r,n)},a=d=>{const f=d.relatedTarget;$o(f)&&n.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="content")},l=()=>{this.#r=null,this.#n=null},c=()=>{this.#r=null,this.#n=null},u=d=>{const f=d.relatedTarget;$o(f)&&r.contains(f)||(this.#r=[d.clientX,d.clientY],this.#n="trigger")};return[wt(s,"pointermove",o),wt(r,"pointerleave",a),wt(r,"pointerenter",l),wt(n,"pointerenter",c),wt(n,"pointerleave",u)].reduce((d,f)=>()=>{d(),f()},()=>{})})}#i(e,r,n){if(!this.#r||!this.#n)return;const i=[e.clientX,e.clientY],s=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(this.#n==="content"&&Pv(i,o)){this.#r=null,this.#n=null;return}if(this.#n==="trigger"&&Pv(i,s)){this.#r=null,this.#n=null;return}const a=wD(s,o),l=this.#s(s,o,a);if(l&&Iv(i,l))return;const c=this.#n==="content"?o:s,u=this.#a(this.#r,c,a,this.#n);Iv(i,u)||(this.#r=null,this.#n=null,this.#e.onPointerExit())}#s(e,r,n){const i=this.#t;switch(n){case"top":return[[Math.min(e.left,r.left)-i,e.top],[Math.min(e.left,r.left)-i,r.bottom],[Math.max(e.right,r.right)+i,r.bottom],[Math.max(e.right,r.right)+i,e.top]];case"bottom":return[[Math.min(e.left,r.left)-i,e.bottom],[Math.min(e.left,r.left)-i,r.top],[Math.max(e.right,r.right)+i,r.top],[Math.max(e.right,r.right)+i,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-i],[r.right,Math.min(e.top,r.top)-i],[r.right,Math.max(e.bottom,r.bottom)+i],[e.left,Math.max(e.bottom,r.bottom)+i]];case"right":return[[e.right,Math.min(e.top,r.top)-i],[r.left,Math.min(e.top,r.top)-i],[r.left,Math.max(e.bottom,r.bottom)+i],[e.right,Math.max(e.bottom,r.bottom)+i]]}}#a(e,r,n,i){const s=this.#t*4,[o,a]=e;switch(i==="trigger"?this.#o(n):n){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#o(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const Kd=al({component:"popover",parts:["root","trigger","content","close","overlay"]}),Gd=new In("Popover.Root");class Yd{static create(e){return Gd.set(new Yd(e))}opts;#e=le(null);get contentNode(){return h(this.#e)}set contentNode(e){M(this.#e,e,!0)}contentPresence;#t=le(null);get triggerNode(){return h(this.#t)}set triggerNode(e){M(this.#t,e,!0)}#r=le(null);get overlayNode(){return h(this.#r)}set overlayNode(e){M(this.#r,e,!0)}overlayPresence;#n=le(!1);get openedViaHover(){return h(this.#n)}set openedViaHover(e){M(this.#n,e,!0)}#i=le(!1);get hasInteractedWithContent(){return h(this.#i)}set hasInteractedWithContent(e){M(this.#i,e,!0)}#s=le(!1);get hoverCooldown(){return h(this.#s)}set hoverCooldown(e){M(this.#s,e,!0)}#a=le(0);get closeDelay(){return h(this.#a)}set closeDelay(e){M(this.#a,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new cg({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new cg({ref:R(()=>this.overlayNode),open:this.opts.open}),dt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(e){this.#l=e}#c(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!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.#c(),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.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class Jd{static create(e){return new Jd(e,Gd.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=le(!1);constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new bs(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),dt(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||fl(e)||(M(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(fl(e)||(M(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#s(),h(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}h(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Mu||e.key===$u)&&(e.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=C(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Fr(this.root.opts.open.current),"data-state":sg(this.root.opts.open.current),"aria-controls":this.#a(),[Kd.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#o)}set props(e){M(this.#o,e)}}class Qd{static create(e){return new Qd(e,Gd.get())}opts;root;attachment;constructor(e,r){this.opts=e,this.root=r,this.attachment=ct(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 kD({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;$o(r)&&IA(r)&&this.root.markInteraction()}onpointerenter(e){fl(e)||this.root.cancelDelayedClose()}onpointerleave(e){fl(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!$o(e.target))return;const r=e.target.closest(Kd.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if($o(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=C(()=>({open:this.root.opts.open.current}));get snippetProps(){return h(this.#e)}set snippetProps(e){M(this.#e,e)}#t=C(()=>({id:this.opts.id.current,tabindex:-1,"data-state":sg(this.root.opts.open.current),[Kd.content]:"",style:{pointerEvents:"auto"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return h(this.#t)}set props(e){M(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}function Mv(t,e){te(e,!0);let r=_(e,"open",15,!1),n=_(e,"onOpenChange",7,Ae),i=_(e,"onOpenChangeComplete",7,Ae),s=_(e,"value",15),o=_(e,"onValueChange",7,Ae),a=_(e,"placeholder",15),l=_(e,"onPlaceholderChange",7,Ae),c=_(e,"isDateUnavailable",7,()=>!1),u=_(e,"validate",7,Ae),d=_(e,"onInvalid",7,Ae),f=_(e,"minValue",7),p=_(e,"maxValue",7),v=_(e,"disabled",7,!1),g=_(e,"readonly",7,!1),m=_(e,"granularity",7),b=_(e,"readonlySegments",23,()=>[]),k=_(e,"hourCycle",7),D=_(e,"locale",7),T=_(e,"hideTimeZone",7,!1),P=_(e,"required",7,!1),A=_(e,"calendarLabel",7,"Event"),O=_(e,"disableDaysOutsideMonth",7,!0),F=_(e,"preventDeselect",7,!1),N=_(e,"pagedNavigation",7,!1),j=_(e,"weekStartsOn",7),G=_(e,"weekdayFormat",7,"narrow"),Z=_(e,"isDateDisabled",7,()=>!1),ue=_(e,"fixedWeeks",7,!1),me=_(e,"numberOfMonths",7,1),K=_(e,"closeOnDateSelect",7,!0),J=_(e,"initialFocus",7,!1),B=_(e,"errorMessageId",7),W=_(e,"children",7),Y=_(e,"monthFormat",7,"long"),ae=_(e,"yearFormat",7,"numeric");const X=Dg({granularity:m(),defaultValue:s(),minValue:f(),maxValue:p()});function ye(){a()===void 0&&a(X)}ye(),dt.pre(()=>a(),()=>{ye()});function V(){K()&&r(!1)}const pe=Hd.create({open:R(()=>r(),E=>{r(E),n()(E)}),value:R(()=>s(),E=>{s(E),o()(E)}),placeholder:R(()=>a(),E=>{a(E),l()(E)}),isDateUnavailable:R(()=>c()),minValue:R(()=>f()),maxValue:R(()=>p()),disabled:R(()=>v()),readonly:R(()=>g()),granularity:R(()=>m()),readonlySegments:R(()=>b()),hourCycle:R(()=>k()),locale:ug(()=>D()),hideTimeZone:R(()=>T()),required:R(()=>P()),calendarLabel:R(()=>A()),disableDaysOutsideMonth:R(()=>O()),preventDeselect:R(()=>F()),pagedNavigation:R(()=>N()),weekStartsOn:R(()=>j()),weekdayFormat:R(()=>G()),isDateDisabled:R(()=>Z()),fixedWeeks:R(()=>ue()),numberOfMonths:R(()=>me()),initialFocus:R(()=>J()),onDateSelect:R(()=>V),defaultPlaceholder:X,monthFormat:R(()=>Y()),yearFormat:R(()=>ae())});Yd.create({open:pe.opts.open,onOpenChangeComplete:R(()=>i())}),Rd.create({value:pe.opts.value,disabled:pe.opts.disabled,readonly:pe.opts.readonly,readonlySegments:pe.opts.readonlySegments,validate:R(()=>u()),onInvalid:R(()=>d()),minValue:pe.opts.minValue,maxValue:pe.opts.maxValue,granularity:pe.opts.granularity,hideTimeZone:pe.opts.hideTimeZone,hourCycle:pe.opts.hourCycle,locale:pe.opts.locale,required:pe.opts.required,placeholder:pe.opts.placeholder,errorMessageId:R(()=>B()),isInvalidProp:R(()=>{})});var U={get open(){return r()},set open(E=!1){r(E),y()},get onOpenChange(){return n()},set onOpenChange(E=Ae){n(E),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(E=Ae){i(E),y()},get value(){return s()},set value(E){s(E),y()},get onValueChange(){return o()},set onValueChange(E=Ae){o(E),y()},get placeholder(){return a()},set placeholder(E){a(E),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(E=Ae){l(E),y()},get isDateUnavailable(){return c()},set isDateUnavailable(E=()=>!1){c(E),y()},get validate(){return u()},set validate(E=Ae){u(E),y()},get onInvalid(){return d()},set onInvalid(E=Ae){d(E),y()},get minValue(){return f()},set minValue(E){f(E),y()},get maxValue(){return p()},set maxValue(E){p(E),y()},get disabled(){return v()},set disabled(E=!1){v(E),y()},get readonly(){return g()},set readonly(E=!1){g(E),y()},get granularity(){return m()},set granularity(E){m(E),y()},get readonlySegments(){return b()},set readonlySegments(E=[]){b(E),y()},get hourCycle(){return k()},set hourCycle(E){k(E),y()},get locale(){return D()},set locale(E){D(E),y()},get hideTimeZone(){return T()},set hideTimeZone(E=!1){T(E),y()},get required(){return P()},set required(E=!1){P(E),y()},get calendarLabel(){return A()},set calendarLabel(E="Event"){A(E),y()},get disableDaysOutsideMonth(){return O()},set disableDaysOutsideMonth(E=!0){O(E),y()},get preventDeselect(){return F()},set preventDeselect(E=!1){F(E),y()},get pagedNavigation(){return N()},set pagedNavigation(E=!1){N(E),y()},get weekStartsOn(){return j()},set weekStartsOn(E){j(E),y()},get weekdayFormat(){return G()},set weekdayFormat(E="narrow"){G(E),y()},get isDateDisabled(){return Z()},set isDateDisabled(E=()=>!1){Z(E),y()},get fixedWeeks(){return ue()},set fixedWeeks(E=!1){ue(E),y()},get numberOfMonths(){return me()},set numberOfMonths(E=1){me(E),y()},get closeOnDateSelect(){return K()},set closeOnDateSelect(E=!0){K(E),y()},get initialFocus(){return J()},set initialFocus(E=!1){J(E),y()},get errorMessageId(){return B()},set errorMessageId(E){B(E),y()},get children(){return W()},set children(E){W(E),y()},get monthFormat(){return Y()},set monthFormat(E="long"){Y(E),y()},get yearFormat(){return ae()},set yearFormat(E="numeric"){ae(E),y()}},z=H(),we=L(z);return Le(we,()=>yv,(E,Ve)=>{Ve(E,{children:(Re,it)=>{var Xe=H(),He=L(Xe);ke(He,()=>W()??Ue),w(Re,Xe)},$$slots:{default:!0}})}),w(t,z),re(U)}ne(Mv,{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 SD=q("<div><!></div>");function $v(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]);const l=Dv.get(),c=Tl.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:R(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),u=C(()=>et(a,c.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()}},f=H(),p=L(f);{var v=m=>{var b=H(),k=L(b);{let D=C(()=>({props:h(u),...c.snippetProps}));ke(k,i,()=>h(D))}w(m,b)},g=m=>{var b=SD();je(b,()=>({...h(u)}));var k=$(b);ke(k,()=>n()??Ue,()=>c.snippetProps),I(b),w(m,b)};de(p,m=>{i()?m(v):m(g,!1)})}return w(t,f),re(d)}ne($v,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var xD=q("<div><div><!></div></div>"),ED=q("<div><div><!></div></div>");function Nv(t,e){const r=kt();te(e,!0);let n=_(e,"child",7),i=_(e,"children",7),s=_(e,"ref",15,null),o=_(e,"id",23,()=>Fe(r)),a=_(e,"forceMount",7,!1),l=_(e,"onOpenAutoFocus",7,Ae),c=_(e,"onCloseAutoFocus",7,Ae),u=_(e,"onEscapeKeydown",7,Ae),d=_(e,"onInteractOutside",7,Ae),f=_(e,"trapFocus",7,!0),p=_(e,"preventScroll",7,!1),v=_(e,"customAnchor",7,null),g=Je(e,["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor"]);const m=Qd.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>d()),onEscapeKeydown:R(()=>u()),customAnchor:R(()=>v())}),b=C(()=>et(g,m.props)),k=C(()=>f()&&m.shouldTrapFocus);function D(N){m.shouldTrapFocus||N.preventDefault(),l()(N)}var T={get child(){return n()},set child(N){n(N),y()},get children(){return i()},set children(N){i(N),y()},get ref(){return s()},set ref(N=null){s(N),y()},get id(){return o()},set id(N=Fe(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Ae){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Ae){c(N),y()},get onEscapeKeydown(){return u()},set onEscapeKeydown(N=Ae){u(N),y()},get onInteractOutside(){return d()},set onInteractOutside(N=Ae){d(N),y()},get trapFocus(){return f()},set trapFocus(N=!0){f(N),y()},get preventScroll(){return p()},set preventScroll(N=!1){p(N),y()},get customAnchor(){return v()},set customAnchor(N=null){v(N),y()}},P=H(),A=L(P);{var O=N=>{xv(N,Qn(()=>h(b),()=>m.popperProps,{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return v()},onOpenAutoFocus:D,get onCloseAutoFocus(){return c()},get shouldRender(){return m.shouldRender},popper:(G,Z)=>{let ue=()=>Z?.().props,me=()=>Z?.().wrapperProps;const K=C(()=>et(ue(),{style:gv("popover")}));var J=H(),B=L(J);{var W=ae=>{var X=H(),ye=L(X);{let V=C(()=>({props:h(K),wrapperProps:me(),...m.snippetProps}));ke(ye,n,()=>h(V))}w(ae,X)},Y=ae=>{var X=xD();je(X,()=>({...me()}));var ye=$(X);je(ye,()=>({...h(K)}));var V=$(ye);ke(V,()=>i()??Ue),I(ye),I(X),w(ae,X)};de(B,ae=>{n()?ae(W):ae(Y,!1)})}w(G,J)},$$slots:{popper:!0}}))},F=N=>{var j=H(),G=L(j);{var Z=ue=>{Sv(ue,Qn(()=>h(b),()=>m.popperProps,{get ref(){return m.opts.ref},get open(){return m.root.opts.open.current},get id(){return o()},get trapFocus(){return h(k)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return v()},onOpenAutoFocus:D,get onCloseAutoFocus(){return c()},get shouldRender(){return m.shouldRender},popper:(K,J)=>{let B=()=>J?.().props,W=()=>J?.().wrapperProps;const Y=C(()=>et(B(),{style:gv("popover")}));var ae=H(),X=L(ae);{var ye=pe=>{var U=H(),z=L(U);{let we=C(()=>({props:h(Y),wrapperProps:W(),...m.snippetProps}));ke(z,n,()=>h(we))}w(pe,U)},V=pe=>{var U=ED();je(U,()=>({...W()}));var z=$(U);je(z,()=>({...h(Y)}));var we=$(z);ke(we,()=>i()??Ue),I(z),I(U),w(pe,U)};de(X,pe=>{n()?pe(ye):pe(V,!1)})}w(K,ae)},$$slots:{popper:!0}}))};de(G,ue=>{a()||ue(Z)},!0)}w(N,j)};de(A,N=>{a()?N(O):N(F,!1)})}return w(t,P),re(T)}ne(Nv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{}},[],[],{mode:"open"});function Fv(t,e){te(e,!0);let r=_(e,"ref",15,null),n=_(e,"onOpenAutoFocus",7),i=Je(e,["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);const s=C(()=>et({onOpenAutoFocus:n()},{onOpenAutoFocus:FC}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return Nv(t,Qn(()=>h(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),re(o)}ne(Fv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var TD=q("<button><!></button>");function Rv(t,e){const r=kt();te(e,!0);let n=_(e,"children",7),i=_(e,"child",7),s=_(e,"id",23,()=>Fe(r)),o=_(e,"ref",15,null),a=_(e,"type",7,"button"),l=_(e,"disabled",7,!1),c=_(e,"openOnHover",7,!1),u=_(e,"openDelay",7,700),d=_(e,"closeDelay",7,300),f=Je(e,["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const p=Jd.create({id:R(()=>s()),ref:R(()=>o(),m=>o(m)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>u()),closeDelay:R(()=>d())}),v=C(()=>et(f,p.props,{type:a()}));var g={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get id(){return s()},set id(m=Fe(r)){s(m),y()},get ref(){return o()},set ref(m=null){o(m),y()},get type(){return a()},set type(m="button"){a(m),y()},get disabled(){return l()},set disabled(m=!1){l(m),y()},get openOnHover(){return c()},set openOnHover(m=!1){c(m),y()},get openDelay(){return u()},set openDelay(m=700){u(m),y()},get closeDelay(){return d()},set closeDelay(m=300){d(m),y()}};return _v(t,{get id(){return s()},get ref(){return p.opts.ref},children:(m,b)=>{var k=H(),D=L(k);{var T=A=>{var O=H(),F=L(O);ke(F,i,()=>({props:h(v)})),w(A,O)},P=A=>{var O=TD();je(O,()=>({...h(v)}));var F=$(O);ke(F,()=>n()??Ue),I(O),w(A,O)};de(D,A=>{i()?A(T):A(P,!1)})}w(m,k)},$$slots:{default:!0}}),re(g)}ne(Rv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});function Lv(t,e){te(e,!0);let r=_(e,"ref",15,null),n=_(e,"onkeydown",7),i=Je(e,["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function s(l){if(Zo(l.key)){const u=l.currentTarget.closest(Ll.selector("input"));if(!u)return;zo(l,u)}}const o=C(()=>et({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),y()},get onkeydown(){return n()},set onkeydown(l){n(l),y()}};return Rv(t,Qn(()=>i,{"data-segment":"trigger"},()=>h(o),{get ref(){return r()},set ref(l){r(l)}})),re(a)}ne(Lv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var AD=q("<!> <!>",1),CD=q("<!> <!> <!>",1),OD=q("<!> <!>",1),DD=q("<!> <!>",1),ID=q("<!> <!> <!>",1);function zv(t,e){te(e,!0);let r=_(e,"dateString",15),n=_(e,"labelClass",7),i=_(e,"inputClass",7),s=_(e,"labelText",7),o=le(Be(Ii(Xt())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);_e(()=>{r(h(o).toString())});var l={get dateString(){return r()},set dateString(d){r(d),y()},get labelClass(){return n()},set labelClass(d){n(d),y()},get inputClass(){return i()},set inputClass(d){i(d),y()},get labelText(){return s()},set labelText(d){s(d),y()}},c=H(),u=L(c);{let d=C(()=>S.locale||"de");Le(u,()=>Mv,(f,p)=>{p(f,{get locale(){return h(d)},weekStartsOn:1,isDateDisabled:v=>v.compare(Ii(Xt()))<0,get value(){return h(o)},set value(v){M(o,v,!0)},children:(v,g)=>{var m=ID(),b=L(m);Le(b,()=>Cv,(T,P)=>{P(T,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(A,O)=>{var F=H(),N=L(F);{var j=G=>{var Z=H(),ue=L(Z);ke(ue,s),w(G,Z)};de(N,G=>{s()&&G(j)})}w(A,F)},$$slots:{default:!0}})});var k=ee(b,2);{const T=(P,A)=>{let O=()=>A?.().segments;var F=AD(),N=L(F);Ke(N,17,O,Gr,(G,Z)=>{let ue=()=>h(Z).part,me=()=>h(Z).value;var K=H(),J=L(K);Le(J,()=>Ov,(B,W)=>{W(B,{get part(){return ue()},children:(Y,ae)=>{$t();var X=Jt();ce(()=>se(X,me())),w(Y,X)},$$slots:{default:!0}})}),w(G,K)});var j=ee(N,2);Le(j,()=>Lv,(G,Z)=>{Z(G,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),w(P,F)};Le(k,()=>Av,(P,A)=>{A(P,{get class(){return`go-datepicker-input ${i()??""}`},children:T,$$slots:{default:!0}})})}var D=ee(k,2);Le(D,()=>Fv,(T,P)=>{P(T,{children:(A,O)=>{var F=H(),N=L(F);{const j=(G,Z)=>{let ue=()=>Z?.().months,me=()=>Z?.().weekdays;var K=DD(),J=L(K);Le(J,()=>_d,(W,Y)=>{Y(W,{children:(ae,X)=>{var ye=CD(),V=L(ye);Le(V,()=>kd,(z,we)=>{we(z,{class:"go-datepicker-previous"})});var pe=ee(V,2);Le(pe,()=>bd,(z,we)=>{we(z,{class:"go-datepicker-selected-month"})});var U=ee(pe,2);Le(U,()=>wd,(z,we)=>{we(z,{class:"go-datepicker-next"})}),w(ae,ye)},$$slots:{default:!0}})});var B=ee(J,2);Ke(B,16,ue,W=>W,(W,Y)=>{var ae=H(),X=L(ae);Le(X,()=>pd,(ye,V)=>{V(ye,{children:(pe,U)=>{var z=OD(),we=L(z);Le(we,()=>vd,(Ve,Re)=>{Re(Ve,{children:(it,Xe)=>{var He=H(),Et=L(He);Le(Et,()=>Uo,(pt,Tt)=>{Tt(pt,{children:(qt,nr)=>{var Ot=H(),Dt=L(Ot);Ke(Dt,17,me,Gr,(Zn,gi)=>{var Br=H(),jr=L(Br);Le(jr,()=>yd,(ir,Wt)=>{Wt(ir,{children:(sr,vi)=>{$t();var dn=Jt();ce(()=>se(dn,h(gi))),w(sr,dn)},$$slots:{default:!0}})}),w(Zn,Br)}),w(qt,Ot)},$$slots:{default:!0}})}),w(it,He)},$$slots:{default:!0}})});var E=ee(we,2);Le(E,()=>md,(Ve,Re)=>{Re(Ve,{children:(it,Xe)=>{var He=H(),Et=L(He);Ke(Et,16,()=>Y.weeks,pt=>pt,(pt,Tt)=>{var qt=H(),nr=L(qt);Le(nr,()=>Uo,(Ot,Dt)=>{Dt(Ot,{children:(Zn,gi)=>{var Br=H(),jr=L(Br);Ke(jr,16,()=>Tt,ir=>ir,(ir,Wt,sr,vi)=>{var dn=H(),Ns=L(dn);Le(Ns,()=>gd,(Jo,Yl)=>{Yl(Jo,{get date(){return Wt},get month(){return Y.value},children:(Fs,Qo)=>{var Ar=H(),yi=L(Ar);Le(yi,()=>hd,(Xo,ea)=>{ea(Xo,{})}),w(Fs,Ar)},$$slots:{default:!0}})}),w(ir,dn)}),w(Zn,Br)},$$slots:{default:!0}})}),w(pt,qt)}),w(it,He)},$$slots:{default:!0}})}),w(pe,z)},$$slots:{default:!0}})}),w(W,ae)}),w(G,K)};Le(N,()=>$v,(G,Z)=>{Z(G,{children:j,$$slots:{default:!0}})})}w(A,F)},$$slots:{default:!0}})}),w(v,m)},$$slots:{default:!0}})})}return w(t,c),re(l)}ne(zv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var PD=q('<span class="go-field-star" aria-hidden="true">*</span>'),MD=q(" <!>",1),$D=q("<label><!></label> <input/>",1),ND=q("<label><!></label> <textarea></textarea>",1),FD=q('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),RD=q("<label><!></label> <input/> <!>",1),LD=q('<label><input/> <span class="go-checkbox-label"><!></span></label>'),zD=q('<img src="" alt=""/> <option> </option>',1),ZD=q('<option disabled hidden="" selected> </option> <!>',1),VD=q("<!>",1),UD=q("<label><!></label> <select><!></select>",1),BD=q('<img style="width: 60px" aria-hidden="true"/>'),jD=q('<span class="go-payment-mode-icons"></span>'),qD=q('<label><input type="radio"/> <!></label>'),WD=q('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),HD=q("<label> <input/></label>"),KD=q("<fieldset><legend><!></legend> <!></fieldset>");function Zv(t,e){te(e,!0);const r=K=>{$t();var J=MD(),B=L(J),W=ee(B);{var Y=ae=>{var X=PD();w(ae,X)};de(W,ae=>{d().required&&ae(Y)})}ce(()=>se(B,`${h(F)??""} `)),w(K,J)},n=K=>{var J=$D(),B=L(J),W=$(B);r(W),I(B);var Y=ee(B,2);je(Y,()=>({...h(O),...m,class:v(),placeholder:d().placeholder,type:d().type,name:d().key}),void 0,void 0,void 0,void 0,!0),ce(()=>{Qt(B,1,Yr(p())),Te(B,"for",h(P))}),Ca(Y,()=>d().value,ae=>d(d().value=ae,!0)),w(K,J)},i=K=>{var J=ND(),B=L(J),W=$(B);r(W),I(B);var Y=ee(B,2);I_(Y),je(Y,()=>({...h(O),...m,class:v(),placeholder:d().placeholder,name:d().key})),ce(()=>{Qt(B,1,Yr(p())),Te(B,"for",h(P))}),Ca(Y,()=>d().value,ae=>d(d().value=ae,!0)),w(K,J)},s=K=>{var J=RD(),B=L(J),W=$(B);r(W),I(B);var Y=ee(B,2),ae=V=>{const pe=V.currentTarget.files;d(d().value=pe&&pe[0]?pe[0]:null,!0),h(k)?h(k).validateField(d()):d().validate()};je(Y,()=>({...h(O),...m,class:v(),type:"file",accept:"image/*",name:d().key,onchange:ae}),void 0,void 0,void 0,void 0,!0);var X=ee(Y,2);{var ye=V=>{var pe=FD(),U=$(pe),z=ee(U,2),we=$(z,!0);I(z),I(pe),ce(E=>{Te(pe,"data-field-preview",d().key),Te(U,"src",h(j)),Te(U,"alt",E),se(we,d().value.name)},[()=>S.t("forms.file.preview_alt")||"User uploaded photo"]),w(V,pe)};de(X,V=>{h(j)&&d().value instanceof File&&V(ye)})}ce(()=>{Qt(B,1,Yr(p())),Te(B,"for",h(P))}),w(K,J)},o=K=>{var J=LD(),B=$(J);je(B,()=>({...h(O),...m,name:d().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var W=ee(B,2),Y=$(W);r(Y),I(W),I(J),ce(()=>{Qt(J,1,Yr(p())),Te(J,"for",h(P))}),db(B,()=>d().value===!0,ae=>{d(d().value=ae,!0)}),w(K,J)},a=K=>{var J=UD(),B=L(J),W=$(B);r(W),I(B);var Y=ee(B,2);je(Y,()=>({...h(O),...m,name:d().key,class:v()})),cb(Y,()=>{var ae=$(Y),X=VD(),ye=L(X);{var V=pe=>{var U=ZD(),z=L(U),we=$(z,!0);I(z),z.value=z.__value="";var E=ee(z,2);Ke(E,17,()=>d().options(),Ve=>Ve.value,(Ve,Re)=>{var it=zD(),Xe=ee(L(it),2),He=$(Xe,!0);I(Xe);var Et={};ce(()=>{se(He,h(Re).label),Et!==(Et=h(Re).value)&&(Xe.value=(Xe.__value=h(Re).value)??"")}),w(Ve,it)}),ce(Ve=>se(we,Ve),[()=>S.t("common.choose")]),w(pe,U)};de(ye,pe=>{d().options&&pe(V)})}w(ae,X)}),ce(()=>{Qt(B,1,Yr(p())),Te(B,"for",h(P))}),sb(Y,()=>d().value,ae=>d(d().value=ae,!0)),w(K,J)},l=K=>{zv(K,{get labelClass(){return p()},get inputClass(){return v()},get labelText(){return r},get dateString(){return d().value},set dateString(J){d(d().value=J,!0)}})},c=K=>{const J=C(()=>S.payment_modes?Object.values(S.payment_modes):[]);var B=WD(),W=$(B),Y=$(W);r(Y),I(W);var ae=ee(W,2);Ke(ae,17,()=>h(J),X=>X.id,(X,ye)=>{var V=qD(),pe=$(V);Ta(pe),pe.__change=()=>{d(d().value=String(h(ye).id),!0)};var U=ee(pe,2);{var z=we=>{var E=jD();Ke(E,20,()=>h(ye).icons,Ve=>Ve,(Ve,Re)=>{const it=C(()=>N+Re+".svg");var Xe=BD();ce(()=>{Qt(Xe,1,Yr(Re)),Te(Xe,"src",h(it)),Te(Xe,"alt",Re+" icon")}),w(Ve,Xe)}),I(E),w(we,E)};de(U,we=>{h(ye).icons.length>0&&we(z)})}I(V),ce((we,E,Ve)=>{Te(pe,"name",d().key),zh(pe,we),ob(pe,E),Te(pe,"hidden",h(J).length===1),Te(pe,"aria-label",Ve)},[()=>String(h(ye).id),()=>h(J).length===1||String(h(ye).id)===String(d().value),()=>S.t(`cart.paymentMode.ariaLabel.${h(ye).name.toLowerCase()}`)]),w(X,V)}),I(B),ce(()=>{Te(B,"aria-required",d().required),Te(B,"aria-invalid",d().errors.length>0)}),w(K,B)},u=K=>{var J=KD(),B=$(J),W=$(B);r(W),I(B);var Y=ee(B,2);{var ae=X=>{var ye=H(),V=L(ye);Ke(V,17,()=>d().options,Gr,(pe,U)=>{var z=HD(),we=$(z),E=ee(we);je(E,()=>({...h(O),...m,class:v(),type:"radio"}),void 0,void 0,void 0,void 0,!0),I(z),ce(()=>{Qt(z,1,Yr(p())),Te(z,"for",h(P)+h(U)),se(we,`${h(U)??""} `)}),Ca(E,()=>d().value,Ve=>d(d().value=Ve,!0)),w(pe,z)}),w(X,ye)};de(Y,X=>{d().options&&X(ae)})}I(J),w(K,J)};let d=_(e,"field",15),f=_(e,"describedByIds",7),p=_(e,"labelClass",7),v=_(e,"inputClass",7),g=_(e,"host",7),m=Je(e,["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]);const b=vs(g()),k=C(()=>b.value),D={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:u,date:l,file:s,textarea:i,paymentMode:c},T=C(()=>D[d().type]);let P=C(()=>e.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function A(){d().type!=="checkbox"&&d().value&&(h(k)?h(k).validateField(d()):d().validate())}const O=C(()=>({id:h(P),"aria-describedby":f(),"aria-required":d().required,"aria-invalid":d().errors.length>0,autocomplete:d().autocomplete,onblur:A}));let F=C(()=>S.t(d().label)||d().label);const N="https://cdn.shop.platform.gomus.de/";let j=le(null);_e(()=>{const K=d().value;if(K instanceof File&&K.type.startsWith("image/")){const J=URL.createObjectURL(K);return M(j,J,!0),()=>{URL.revokeObjectURL(J),M(j,null)}}M(j,null)});var G={get field(){return d()},set field(K){d(K),y()},get describedByIds(){return f()},set describedByIds(K){f(K),y()},get labelClass(){return p()},set labelClass(K){p(K),y()},get inputClass(){return v()},set inputClass(K){v(K),y()},get host(){return g()},set host(K){g(K),y()}},Z=H(),ue=L(Z);{var me=K=>{var J=H(),B=L(J);ke(B,()=>h(T)),w(K,J)};de(ue,K=>{h(T)&&K(me)})}return w(t,Z),re(G)}Hr(["change"]),ne(Zv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var GD=q("<span> </span>"),YD=q("<li> </li>"),JD=q('<ul class="go-field-errors"></ul>'),QD=q("<!> <!> <!>",1);function XD(t,e){te(e,!0);let r=_(e,"key",7),n=_(e,"required",7,!1),i=_(e,"labelClass",7),s=_(e,"inputClass",7),o=le(Be(er.createField(r(),n())));const a=vs(e.$$host),l=C(()=>a.value),c=()=>h(o);let u=C(()=>h(o)?[...h(o).errors,...h(o).apiErrors].map(O=>S.t(O)):[]),d=C(()=>h(o)?.description),f=C(()=>h(u).length>0),p=C(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),v=C(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),g=C(()=>[h(d)&&h(p),h(f)&&h(v)].filter(Boolean).join(" ")||void 0);_e(()=>{e.$$host.classList.toggle("go-field",!0),e.$$host.classList.toggle("is-invalid",h(u).length>0)}),e.$$host.dataset.testid=r(),_e(()=>{h(o)&&(h(o).mounted=!0,h(o).value,Ge(()=>{h(o)?.errors.length&&h(l).validateField(h(o))}))});var m={getField:c,get key(){return r()},set key(O){r(O),y()},get required(){return n()},set required(O=!1){n(O),y()},get labelClass(){return i()},set labelClass(O){i(O),y()},get inputClass(){return s()},set inputClass(O){s(O),y()}},b=QD(),k=L(b);Zv(k,{get describedByIds(){return h(g)},get labelClass(){return i()},get inputClass(){return s()},host:e.$$host,get field(){return h(o)},set field(O){M(o,O,!0)}});var D=ee(k,2);{var T=O=>{var F=GD(),N=$(F,!0);I(F),ce(()=>{Te(F,"id",h(p)),se(N,h(o).description)}),w(O,F)};de(D,O=>{h(d)&&O(T)})}var P=ee(D,2);{var A=O=>{var F=JD();Ke(F,21,()=>h(u),Gr,(N,j)=>{var G=YD(),Z=$(G,!0);I(G),ce(()=>se(Z,h(j))),w(N,G)}),I(F),ce(()=>Te(F,"id",h(v))),w(O,F)};de(P,O=>{h(f)&&O(A)})}return w(t,b),re(m)}customElements.define("go-field",ne(XD,{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 eI=q("<go-field></go-field>",2);function tI(t,e){te(e,!0);let r=vs(e.$$host),n=C(()=>r.value),i=C(()=>h(n)?er.getFormFields(h(n)?.formId):[]);var s=H(),o=L(s);Ke(o,17,()=>h(i),a=>a.key,(a,l)=>{var c=eI();ce(()=>Ei(c,"key",h(l).key)),ce(()=>Ei(c,"required",h(l).required)),w(a,c)}),w(t,s),re()}customElements.define("go-all-fields",ne(tI,{},[],[]));var rI=q('<p aria-hidden="true"> </p>'),nI=q("<li> </li>"),iI=q('<ul class="go-error-feedback-api-errors"></ul>'),sI=q('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function oI(t,e){te(e,!0);const r=vs(e.$$host),n=C(()=>r.value);_e(()=>{h(n)?.form?.addEventListener("go-after-validation",()=>{M(o,Cu(h(n)?.fields),!0)})});let i=le(0);setInterval(()=>{M(i,Cu(h(n)?.fields)||0,!0)},100);let s=C(()=>h(i)+(h(n)?.apiErrors?.length||0)),o=le(-1);_e(()=>{e.$$host.classList.toggle("is-invalid",h(s)>0),e.$$host.classList.toggle("go-feedback",!0),e.$$host.setAttribute("data-num-errors",h(s).toString())});var a=sI(),l=$(a),c=$(l);{var u=g=>{var m=Jt();ce(b=>se(m,b),[()=>S.t("forms.errorSummary",{count:h(o)})]),w(g,m)};de(c,g=>{h(o)>0&&g(u)})}I(l);var d=ee(l,2);{var f=g=>{var m=rI(),b=$(m,!0);I(m),ce(k=>se(b,k),[()=>S.t("forms.errorSummary",{count:h(i)})]),w(g,m)};de(d,g=>{h(i)>0&&g(f)})}var p=ee(d,2);{var v=g=>{var m=iI();Ke(m,21,()=>h(n)?.apiErrors,Gr,(b,k)=>{var D=nI(),T=$(D,!0);I(D),ce(()=>se(T,h(k))),w(b,D)}),I(m),w(g,m)};de(p,g=>{h(n)&&Zc(h(n).apiErrors)&&h(n).apiErrors.length>0&&g(v)})}I(a),w(t,a),re()}customElements.define("go-errors-feedback",ne(oI,{},[],[]));var aI=q('<div class="go-form-feedback"><!></div>');function lI(t,e){var r=aI(),n=$(r);eb(n,e,"default",{}),I(r),w(t,r)}customElements.define("go-form-feedback",ne(lI,{},["default"],[]));function cI(t,e){te(e,!0);let r=_(e,"buttonClass",7,"");Sn(()=>{ui(e.$$host,"button",{type:"submit",class:r()})});var n={get buttonClass(){return r()},set buttonClass(i=""){r(i),y()}};return re(n)}customElements.define("go-submit",ne(cI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var uI=q('<div aria-live="assertive"> </div>');function dI(t,e){te(e,!0);const r=vs(e.$$host),n=C(()=>r.value);var i=H(),s=L(i);{var o=a=>{var l=uI();let c;var u=$(l,!0);I(l),ce(()=>{c=Qt(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":h(n).successMessage}),se(u,h(n)?.successMessage)}),w(a,l)};de(s,a=>{h(n)?.successMessage&&a(o)})}w(t,i),re()}customElements.define("go-success-feedback",ne(dI,{},[],[]));var Er="INUMBER",As="IOP1",Cs="IOP2",Os="IOP3",Nn="IVAR",Ui="IVARNAME",Ds="IFUNCALL",zl="IFUNDEF",rr="IEXPR",Xd="IEXPREVAL",Bi="IMEMBER",Zl="IENDSTATEMENT",Is="IARRAY";function ze(t,e){this.type=t,this.value=e??0}ze.prototype.toString=function(){switch(this.type){case Er:case As:case Cs:case Os:case Nn:case Ui:case Zl:return this.value;case Ds:return"CALL "+this.value;case zl:return"DEF "+this.value;case Is:return"ARRAY "+this.value;case Bi:return"."+this.value;default:return"Invalid Instruction"}};function Vl(t){return new ze(As,t)}function Fn(t){return new ze(Cs,t)}function Vv(t){return new ze(Os,t)}function ef(t,e,r,n,i){for(var s=[],o=[],a,l,c,u,d=0;d<t.length;d++){var f=t[d],p=f.type;if(p===Er||p===Ui)Array.isArray(f.value)?s.push.apply(s,ef(f.value.map(function(v){return new ze(Er,v)}).concat(new ze(Is,f.value.length)),e,r,n,i)):s.push(f);else if(p===Nn&&i.hasOwnProperty(f.value))f=new ze(Er,i[f.value]),s.push(f);else if(p===Cs&&s.length>1)l=s.pop(),a=s.pop(),u=r[f.value],f=new ze(Er,u(a.value,l.value)),s.push(f);else if(p===Os&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),f.value==="?"?s.push(a.value?l.value:c.value):(u=n[f.value],f=new ze(Er,u(a.value,l.value,c.value)),s.push(f));else if(p===As&&s.length>0)a=s.pop(),u=e[f.value],f=new ze(Er,u(a.value)),s.push(f);else if(p===rr){for(;s.length>0;)o.push(s.shift());o.push(new ze(rr,ef(f.value,e,r,n,i)))}else if(p===Bi&&s.length>0)a=s.pop(),s.push(new ze(Er,a.value[f.value]));else{for(;s.length>0;)o.push(s.shift());o.push(f)}}for(;s.length>0;)o.push(s.shift());return o}function Uv(t,e,r){for(var n=[],i=0;i<t.length;i++){var s=t[i],o=s.type;if(o===Nn&&s.value===e)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===As?c=Vl(l.value):l.type===Cs?c=Fn(l.value):l.type===Os?c=Vv(l.value):c=new ze(l.type,l.value),n.push(c)}else o===rr?n.push(new ze(rr,Uv(s.value,e,r))):n.push(s)}return n}function ji(t,e,r){var n=[],i,s,o,a,l,c;if(tf(t))return Rn(t,r);for(var u=t.length,d=0;d<u;d++){var f=t[d],p=f.type;if(p===Er||p===Ui)n.push(f.value);else if(p===Cs)s=n.pop(),i=n.pop(),f.value==="and"?n.push(i?!!ji(s,e,r):!1):f.value==="or"?n.push(i?!0:!!ji(s,e,r)):f.value==="="?(a=e.binaryOps[f.value],n.push(a(i,ji(s,e,r),r))):(a=e.binaryOps[f.value],n.push(a(Rn(i,r),Rn(s,r))));else if(p===Os)o=n.pop(),s=n.pop(),i=n.pop(),f.value==="?"?n.push(ji(i?s:o,e,r)):(a=e.ternaryOps[f.value],n.push(a(Rn(i,r),Rn(s,r),Rn(o,r))));else if(p===Nn)if(f.value in e.functions)n.push(e.functions[f.value]);else if(f.value in e.unaryOps&&e.parser.isOperatorEnabled(f.value))n.push(e.unaryOps[f.value]);else{var v=r[f.value];if(v!==void 0)n.push(v);else throw new Error("undefined variable: "+f.value)}else if(p===As)i=n.pop(),a=e.unaryOps[f.value],n.push(a(Rn(i,r)));else if(p===Ds){for(c=f.value,l=[];c-- >0;)l.unshift(Rn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(p===zl)n.push((function(){for(var g=n.pop(),m=[],b=f.value;b-- >0;)m.unshift(n.pop());var k=n.pop(),D=function(){for(var T=Object.assign({},r),P=0,A=m.length;P<A;P++)T[m[P]]=arguments[P];return ji(g,e,T)};return Object.defineProperty(D,"name",{value:k,writable:!1}),r[k]=D,D})());else if(p===rr)n.push(fI(f,e));else if(p===Xd)n.push(f);else if(p===Bi)i=n.pop(),n.push(i[f.value]);else if(p===Zl)n.pop();else if(p===Is){for(c=f.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:Rn(n[0],r)}function fI(t,e,r){return tf(t)?t:{type:Xd,value:function(n){return ji(t.value,e,n)}}}function tf(t){return t&&t.type===Xd}function Rn(t,e){return tf(t)?t.value(e):t}function rf(t,e){for(var r=[],n,i,s,o,a,l,c=0;c<t.length;c++){var u=t[c],d=u.type;if(d===Er)typeof u.value=="number"&&u.value<0?r.push("("+u.value+")"):Array.isArray(u.value)?r.push("["+u.value.map(Bv).join(", ")+"]"):r.push(Bv(u.value));else if(d===Cs)i=r.pop(),n=r.pop(),o=u.value,e?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(d===Os)if(s=r.pop(),i=r.pop(),n=r.pop(),o=u.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(d===Nn||d===Ui)r.push(u.value);else if(d===As)n=r.pop(),o=u.value,o==="-"||o==="+"?r.push("("+o+n+")"):e?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(d===Ds){for(l=u.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(d===zl){for(i=r.pop(),l=u.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),e?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(d===Bi)n=r.pop(),r.push(n+"."+u.value);else if(d===Is){for(l=u.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(d===rr)r.push("("+rf(u.value,e)+")");else if(d!==Zl)throw new Error("invalid Expression")}return r.length>1&&(e?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function Bv(t){return typeof t=="string"?JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):t}function Ps(t,e){for(var r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}function nf(t,e,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<t.length;s++){var o=t[s];o.type===Nn||o.type===Ui?!n&&!Ps(e,o.value)?e.push(o.value):(i!==null&&(Ps(e,i)||e.push(i)),i=o.value):o.type===Bi&&n&&i!==null?i+="."+o.value:o.type===rr?nf(o.value,e,r):i!==null&&(Ps(e,i)||e.push(i),i=null)}i!==null&&!Ps(e,i)&&e.push(i)}function Vr(t,e){this.tokens=t,this.parser=e,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.functions=e.functions}Vr.prototype.simplify=function(t){return t=t||{},new Vr(ef(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,t),this.parser)},Vr.prototype.substitute=function(t,e){return e instanceof Vr||(e=this.parser.parse(String(e))),new Vr(Uv(this.tokens,t,e),this.parser)},Vr.prototype.evaluate=function(t){return t=t||{},ji(this.tokens,this,t)},Vr.prototype.toString=function(){return rf(this.tokens,!1)},Vr.prototype.symbols=function(t){t=t||{};var e=[];return nf(this.tokens,e,t),e},Vr.prototype.variables=function(t){t=t||{};var e=[];nf(this.tokens,e,t);var r=this.functions;return e.filter(function(n){return!(n in r)})},Vr.prototype.toJSFunction=function(t,e){var r=this,n=new Function(t,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+rf(this.simplify(e).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var qo="TEOF",Qe="TOP",Ul="TNUMBER",jv="TSTRING",Ln="TPAREN",Ms="TBRACKET",Bl="TCOMMA",sf="TNAME",of="TSEMICOLON";function qv(t,e,r){this.type=t,this.value=e,this.index=r}qv.prototype.toString=function(){return this.type+": "+this.value};function ut(t,e){this.pos=0,this.current=null,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.consts=t.consts,this.expression=e,this.savedPosition=0,this.savedCurrent=null,this.options=t.options,this.parser=t}ut.prototype.newToken=function(t,e,r){return new qv(t,e,r??this.pos)},ut.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},ut.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},ut.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(qo,"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)+'"')},ut.prototype.isString=function(){var t=!1,e=this.pos,r=this.expression.charAt(e);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,e+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(e+1,n);this.current=this.newToken(jv,this.unescape(i),e),t=!0;break}n=this.expression.indexOf(r,n+1)}return t},ut.prototype.isParen=function(){var t=this.expression.charAt(this.pos);return t==="("||t===")"?(this.current=this.newToken(Ln,t),this.pos++,!0):!1},ut.prototype.isBracket=function(){var t=this.expression.charAt(this.pos);return(t==="["||t==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Ms,t),this.pos++,!0):!1},ut.prototype.isComma=function(){var t=this.expression.charAt(this.pos);return t===","?(this.current=this.newToken(Bl,","),this.pos++,!0):!1},ut.prototype.isSemicolon=function(){var t=this.expression.charAt(this.pos);return t===";"?(this.current=this.newToken(of,";"),this.pos++,!0):!1},ut.prototype.isConst=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(n in this.consts)return this.current=this.newToken(Ul,this.consts[n]),this.pos+=n.length,!0}return!1},ut.prototype.isNamedOp=function(){for(var t=this.pos,e=t;e<this.expression.length;e++){var r=this.expression.charAt(e);if(r.toUpperCase()===r.toLowerCase()&&(e===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(e>t){var n=this.expression.substring(t,e);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Qe,n),this.pos+=n.length,!0}return!1},ut.prototype.isName=function(){for(var t=this.pos,e=t,r=!1;e<this.expression.length;e++){var n=this.expression.charAt(e);if(n.toUpperCase()===n.toLowerCase()){if(e===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(e===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(t,e);return this.current=this.newToken(sf,i),this.pos+=i.length,!0}return!1},ut.prototype.isWhitespace=function(){for(var t=!1,e=this.expression.charAt(this.pos);(e===" "||e===" "||e===`
10
- `||e==="\r")&&(t=!0,this.pos++,!(this.pos>=this.expression.length));)e=this.expression.charAt(this.pos);return t};var hI=/^[0-9a-f]{4}$/i;ut.prototype.unescape=function(t){var e=t.indexOf("\\");if(e<0)return t;for(var r=t.substring(0,e);e>=0;){var n=t.charAt(++e);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
11
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=t.substring(e+1,e+5);hI.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),e+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++e;var s=t.indexOf("\\",e);r+=t.substring(e,s<0?t.length:s),e=s}return r},ut.prototype.isComment=function(){var t=this.expression.charAt(this.pos);return t==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},ut.prototype.isRadixInteger=function(){var t=this.pos;if(t>=this.expression.length-2||this.expression.charAt(t)!=="0")return!1;++t;var e,r;if(this.expression.charAt(t)==="x")e=16,r=/^[0-9a-f]$/i,++t;else if(this.expression.charAt(t)==="b")e=2,r=/^[01]$/i,++t;else return!1;for(var n=!1,i=t;t<this.expression.length;){var s=this.expression.charAt(t);if(r.test(s))t++,n=!0;else break}return n&&(this.current=this.newToken(Ul,parseInt(this.expression.substring(i,t),e)),this.pos=t),n},ut.prototype.isNumber=function(){for(var t=!1,e=this.pos,r=e,n=e,i=!1,s=!1,o;e<this.expression.length&&(o=this.expression.charAt(e),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,e++,t=s;if(t&&(n=e),o==="e"||o==="E"){e++;for(var a=!0,l=!1;e<this.expression.length;){if(o=this.expression.charAt(e),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;e++}l||(e=n)}return t?(this.current=this.newToken(Ul,parseFloat(this.expression.substring(r,e))),this.pos=e):this.pos=n,t},ut.prototype.isOperator=function(){var t=this.pos,e=this.expression.charAt(this.pos);if(e==="+"||e==="-"||e==="*"||e==="/"||e==="%"||e==="^"||e==="?"||e===":"||e===".")this.current=this.newToken(Qe,e);else if(e==="∙"||e==="•")this.current=this.newToken(Qe,"*");else if(e===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,">="),this.pos++):this.current=this.newToken(Qe,">");else if(e==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"<="),this.pos++):this.current=this.newToken(Qe,"<");else if(e==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Qe,"||"),this.pos++;else return!1;else if(e==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"=="),this.pos++):this.current=this.newToken(Qe,e);else if(e==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Qe,"!="),this.pos++):this.current=this.newToken(Qe,e);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=t,!1)},ut.prototype.isOperatorEnabled=function(t){return this.parser.isOperatorEnabled(t)},ut.prototype.getCoordinates=function(){var t=0,e,r=-1;do t++,e=this.pos-r,r=this.expression.indexOf(`
12
- `,r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},ut.prototype.parseError=function(t){var e=this.getCoordinates();throw new Error("parse error ["+e.line+":"+e.column+"]: "+t)};function tt(t,e,r){this.parser=t,this.tokens=e,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}tt.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},tt.prototype.tokenMatches=function(t,e){return typeof e>"u"?!0:Array.isArray(e)?Ps(e,t.value):typeof e=="function"?e(t):t.value===e},tt.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},tt.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},tt.prototype.accept=function(t,e){return this.nextToken.type===t&&this.tokenMatches(this.nextToken,e)?(this.next(),!0):!1},tt.prototype.expect=function(t,e){if(!this.accept(t,e)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(e||t))}},tt.prototype.parseAtom=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.accept(sf)||this.accept(Qe,r))t.push(new ze(Nn,this.current.value));else if(this.accept(Ul))t.push(new ze(Er,this.current.value));else if(this.accept(jv))t.push(new ze(Er,this.current.value));else if(this.accept(Ln,"("))this.parseExpression(t),this.expect(Ln,")");else if(this.accept(Ms,"["))if(this.accept(Ms,"]"))t.push(new ze(Is,0));else{var n=this.parseArrayList(t);t.push(new ze(Is,n))}else throw new Error("unexpected "+this.nextToken)},tt.prototype.parseExpression=function(t){var e=[];this.parseUntilEndStatement(t,e)||(this.parseVariableAssignmentExpression(e),!this.parseUntilEndStatement(t,e)&&this.pushExpression(t,e))},tt.prototype.pushExpression=function(t,e){for(var r=0,n=e.length;r<n;r++)t.push(e[r])},tt.prototype.parseUntilEndStatement=function(t,e){return this.accept(of)?(this.nextToken&&this.nextToken.type!==qo&&!(this.nextToken.type===Ln&&this.nextToken.value===")")&&e.push(new ze(Zl)),this.nextToken.type!==qo&&this.parseExpression(e),t.push(new ze(rr,e)),!0):!1},tt.prototype.parseArrayList=function(t){for(var e=0;!this.accept(Ms,"]");)for(this.parseExpression(t),++e;this.accept(Bl);)this.parseExpression(t),++e;return e},tt.prototype.parseVariableAssignmentExpression=function(t){for(this.parseConditionalExpression(t);this.accept(Qe,"=");){var e=t.pop(),r=[],n=t.length-1;if(e.type===Ds){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=e.value+1;i<s;i++){var o=n-i;t[o].type===Nn&&(t[o]=new ze(Ui,t[o].value))}this.parseVariableAssignmentExpression(r),t.push(new ze(rr,r)),t.push(new ze(zl,e.value));continue}if(e.type!==Nn&&e.type!==Bi)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),t.push(new ze(Ui,e.value)),t.push(new ze(rr,r)),t.push(Fn("="))}},tt.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(Qe,"?");){var e=[],r=[];this.parseConditionalExpression(e),this.expect(Qe,":"),this.parseConditionalExpression(r),t.push(new ze(rr,e)),t.push(new ze(rr,r)),t.push(Vv("?"))}},tt.prototype.parseOrExpression=function(t){for(this.parseAndExpression(t);this.accept(Qe,"or");){var e=[];this.parseAndExpression(e),t.push(new ze(rr,e)),t.push(Fn("or"))}},tt.prototype.parseAndExpression=function(t){for(this.parseComparison(t);this.accept(Qe,"and");){var e=[];this.parseComparison(e),t.push(new ze(rr,e)),t.push(Fn("and"))}};var pI=["==","!=","<","<=",">=",">","in"];tt.prototype.parseComparison=function(t){for(this.parseAddSub(t);this.accept(Qe,pI);){var e=this.current;this.parseAddSub(t),t.push(Fn(e.value))}};var mI=["+","-","||"];tt.prototype.parseAddSub=function(t){for(this.parseTerm(t);this.accept(Qe,mI);){var e=this.current;this.parseTerm(t),t.push(Fn(e.value))}};var gI=["*","/","%"];tt.prototype.parseTerm=function(t){for(this.parseFactor(t);this.accept(Qe,gI);){var e=this.current;this.parseFactor(t),t.push(Fn(e.value))}},tt.prototype.parseFactor=function(t){var e=this.tokens.unaryOps;function r(i){return i.value in e}if(this.save(),this.accept(Qe,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===Ln&&this.nextToken.value==="("){this.restore(),this.parseExponential(t);return}else if(this.nextToken.type===of||this.nextToken.type===Bl||this.nextToken.type===qo||this.nextToken.type===Ln&&this.nextToken.value===")"){this.restore(),this.parseAtom(t);return}}var n=this.current;this.parseFactor(t),t.push(Vl(n.value))}else this.parseExponential(t)},tt.prototype.parseExponential=function(t){for(this.parsePostfixExpression(t);this.accept(Qe,"^");)this.parseFactor(t),t.push(Fn("^"))},tt.prototype.parsePostfixExpression=function(t){for(this.parseFunctionCall(t);this.accept(Qe,"!");)t.push(Vl("!"))},tt.prototype.parseFunctionCall=function(t){var e=this.tokens.unaryOps;function r(s){return s.value in e}if(this.accept(Qe,r)){var n=this.current;this.parseAtom(t),t.push(Vl(n.value))}else for(this.parseMemberExpression(t);this.accept(Ln,"(");)if(this.accept(Ln,")"))t.push(new ze(Ds,0));else{var i=this.parseArgumentList(t);t.push(new ze(Ds,i))}},tt.prototype.parseArgumentList=function(t){for(var e=0;!this.accept(Ln,")");)for(this.parseExpression(t),++e;this.accept(Bl);)this.parseExpression(t),++e;return e},tt.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(Qe,".")||this.accept(Ms,"[");){var e=this.current;if(e.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(sf),t.push(new ze(Bi,this.current.value))}else if(e.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(t),this.expect(Ms,"]"),t.push(Fn("["))}else throw new Error("unexpected symbol: "+e.value)}};function vI(t,e){return Number(t)+Number(e)}function yI(t,e){return t-e}function _I(t,e){return t*e}function bI(t,e){return t/e}function wI(t,e){return t%e}function kI(t,e){return Array.isArray(t)&&Array.isArray(e)?t.concat(e):""+t+e}function SI(t,e){return t===e}function xI(t,e){return t!==e}function EI(t,e){return t>e}function TI(t,e){return t<e}function AI(t,e){return t>=e}function CI(t,e){return t<=e}function OI(t,e){return!!(t&&e)}function DI(t,e){return!!(t||e)}function II(t,e){return Ps(e,t)}function PI(t){return(Math.exp(t)-Math.exp(-t))/2}function MI(t){return(Math.exp(t)+Math.exp(-t))/2}function $I(t){return t===1/0?1:t===-1/0?-1:(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function NI(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))}function FI(t){return Math.log(t+Math.sqrt(t*t-1))}function RI(t){return Math.log((1+t)/(1-t))/2}function Wv(t){return Math.log(t)*Math.LOG10E}function LI(t){return-t}function zI(t){return!t}function ZI(t){return t<0?Math.ceil(t):Math.floor(t)}function VI(t){return Math.random()*(t||1)}function Hv(t){return lf(t+1)}function UI(t){return isFinite(t)&&t===Math.round(t)}var BI=4.7421875,af=[.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 lf(t){var e,r;if(UI(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var n=t-2,i=t-1;n>1;)i*=n,n--;return i===0&&(i=1),i}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*lf(1-t));if(t>=171.35)return 1/0;if(t>85){var s=t*t,o=s*t,a=o*t,l=a*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*s)-139/(51840*o)-571/(2488320*a)+163879/(209018880*l)+5246819/(75246796800*l*t))}--t,r=af[0];for(var c=1;c<af.length;++c)r+=af[c]/(t+c);return e=t+BI+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*r}function jI(t){return Array.isArray(t)?t.length:String(t).length}function Kv(){for(var t=0,e=0,r=0;r<arguments.length;r++){var n=Math.abs(arguments[r]),i;e<n?(i=e/n,t=t*i*i+1,e=n):n>0?(i=n/e,t+=i*i):t+=n}return e===1/0?1/0:e*Math.sqrt(t)}function Gv(t,e,r){return t?e:r}function qI(t,e){return typeof e>"u"||+e==0?Math.round(t):(t=+t,e=-+e,isNaN(t)||!(typeof e=="number"&&e%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function WI(t,e,r){return r&&(r[t]=e),e}function HI(t,e){return t[e|0]}function KI(t){return arguments.length===1&&Array.isArray(t)?Math.max.apply(Math,t):Math.max.apply(Math,arguments)}function GI(t){return arguments.length===1&&Array.isArray(t)?Math.min.apply(Math,t):Math.min.apply(Math,arguments)}function YI(t,e){if(typeof t!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(e))throw new Error("Second argument to map is not an array");return e.map(function(r,n){return t(r,n)})}function JI(t,e,r){if(typeof t!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(r))throw new Error("Second argument to fold is not an array");return r.reduce(function(n,i,s){return t(n,i,s)},e)}function QI(t,e){if(typeof t!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(e))throw new Error("Second argument to filter is not an array");return e.filter(function(r,n){return t(r,n)})}function XI(t,e){if(!(Array.isArray(e)||typeof e=="string"))throw new Error("Second argument to indexOf is not a string or array");return e.indexOf(t)}function eP(t,e){if(!Array.isArray(e))throw new Error("Second argument to join is not an array");return e.join(t)}function tP(t){return(t>0)-(t<0)||+t}var Yv=1/3;function rP(t){return t<0?-Math.pow(-t,Yv):Math.pow(t,Yv)}function nP(t){return Math.exp(t)-1}function iP(t){return Math.log(1+t)}function sP(t){return Math.log(t)/Math.LN2}function qi(t){this.options=t||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||PI,cosh:Math.cosh||MI,tanh:Math.tanh||$I,asinh:Math.asinh||NI,acosh:Math.acosh||FI,atanh:Math.atanh||RI,sqrt:Math.sqrt,cbrt:Math.cbrt||rP,log:Math.log,log2:Math.log2||sP,ln:Math.log,lg:Math.log10||Wv,log10:Math.log10||Wv,expm1:Math.expm1||nP,log1p:Math.log1p||iP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||ZI,"-":LI,"+":Number,exp:Math.exp,not:zI,length:jI,"!":Hv,sign:Math.sign||tP},this.binaryOps={"+":vI,"-":yI,"*":_I,"/":bI,"%":wI,"^":Math.pow,"||":kI,"==":SI,"!=":xI,">":EI,"<":TI,">=":AI,"<=":CI,and:OI,or:DI,in:II,"=":WI,"[":HI},this.ternaryOps={"?":Gv},this.functions={random:VI,fac:Hv,min:GI,max:KI,hypot:Math.hypot||Kv,pyt:Math.hypot||Kv,pow:Math.pow,atan2:Math.atan2,if:Gv,gamma:lf,roundTo:qI,map:YI,fold:JI,filter:QI,indexOf:XI,join:eP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}qi.prototype.parse=function(t){var e=[],r=new tt(this,new ut(this,t),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(e),r.expect(qo,"EOF"),new Vr(e,this)},qi.prototype.evaluate=function(t,e){return this.parse(t).evaluate(e)};var Jv=new qi;qi.parse=function(t){return Jv.parse(t)},qi.evaluate=function(t,e){return Jv.parse(t).evaluate(e)};var Qv={"+":"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 oP(t){return Qv.hasOwnProperty(t)?Qv[t]:t}qi.prototype.isOperatorEnabled=function(t){var e=oP(t),r=this.options.operators||{};return!(e in r)||!!r[e]};const aP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,lP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,cP=/(__optional\("[^"]+"\))\.length\b/g,uP=new qi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),Xv=new Map;function dP(t){return t.replace(aP,e=>e.includes("?.")?`__optional("${e.replace(/\?\./g,".")}")`:e).replace(lP,(e,r)=>`__length(${r})`).replace(cP,(e,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function fP(t){const e=Xv.get(t);if(e)return e;const r=uP.parse(dP(t));return Xv.set(t,r),r}function hP(t,e){if(t==null||typeof t!="string")return t;const r={data:e,undefined:void 0,null:null};r.__optional=n=>n.split(".").reduce((i,s)=>{if(i!=null)return i[s]},r),r.__length=n=>{if(n!=null){if(typeof n=="string"||Array.isArray(n))return n.length;if(typeof n=="object"&&"length"in n){const i=n.length;return typeof i=="number"?i:void 0}}};try{const n=fP(t);for(const i of n.symbols()){if(r[i]!==void 0)continue;const s=globalThis[i];typeof s=="function"&&(r[i]=s)}return n.evaluate(r)}catch(n){console.error(`Error while evaluating when (${t}) in go-if: ${n.message}`)}}const ey=["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"],pP={name:"ticket:timeslot",calendarEndpoint:"tickets",apiToken:"time_slot",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTimeslot)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),by_ticket_type:"time_slot","by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=ci(r,e.selectedTime),s=li(i,e.selectedTime);for(const o of s)t.preCart.addItem(xt(o,{time:e.selectedTime}))}},mP={name:"ticket:day",calendarEndpoint:"tickets",apiToken:"normal",requires:[{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate)return;const{tickets:r,quotas:n}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),"by_ticket_types[]":["normal"],"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));S.capacityManager.addQuotas(n);const i=Object.values(n)[0],s=i?Object.keys(i.capacities)[0]:void 0,o=ci(r,s),a=li(o,s);for(const l of a)t.preCart.addItem(xt(l,{time:s}))}},gP={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e)return;const r=await S.asyncFetch(()=>S.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":e.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds??e.ticketGroupIds}));for(const n of Object.values(r))t.preCart.addItem(xt(Wa(n)))}},vP={name:"event:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!(await S.asyncFetch(()=>S.getEvent(e.eventIds[0]))).tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:e.selectedDate.toString(),date_id:t.dateId}));S.capacityManager.addQuotas(i);const s=ci(n,e.selectedTime),o=li(s,e.selectedTime);for(const a of o)t.preCart.addItem(xt(a,{time:e.selectedTime}))}},yP={name:"event:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.selectedDate,async loadTimeslots(){},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=Object.values(i)[0],o=s?Object.keys(s.capacities)[0]:void 0,a=ci(n,o),l=li(a,o);for(const c of l)t.preCart.addItem(xt(c,{time:o}))}},_P={name:"event:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:t=>!!t.selectedDate,isTicketsVisible:t=>!!(t.selectedDate&&t.selectedTimeslot),async loadTimeslots(t){if(!t?.eventIds?.length||!t.selectedDate)return;const e=await S.asyncFetch(()=>S.getEvent(t.eventIds[0]));if(!e.tickets?.length)return;const{quotas:r}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":e.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:t.selectedDate.toString()}));S.capacityManager.addQuotas(r)},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||!e.selectedDate||!e.selectedTimeslot)return;const r=await S.asyncFetch(()=>S.getEvent(e.eventIds[0]));if(!r.tickets?.length)return;const{tickets:n,quotas:i}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":r.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:e.selectedDate.toString()}));S.capacityManager.addQuotas(i);const s=ci(n,e.selectedTime),o=li(s,e.selectedTime);for(const a of o)t.preCart.addItem(xt(a,{time:e.selectedTime}))}},bP={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:t=>!!t.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.eventIds?.length||t.dateId===void 0)return;const r=await S.asyncFetch(()=>S.getEventDetailsOnDate(e.eventIds[0],t.dateId));if(r.prices?.length){for(const n of r.prices){const i=hu(n,r.id,{event_title:r.event_title});t.preCart.addItem(xt(i,{time:r.start_time}))}r.seats&&S.capacityManager.addSeats(r.id,r.seats)}}},wP=7200*1e3;function jl(t,e,r){const n=Date.parse(r);return t.filter(i=>{const s=i.start_time.slice(0,10),o=Date.parse(i.start_time);return s===e&&o>=n&&o<=n+wP&&(i.seats?.available??0)>0})}async function ql(t){if(!t?.selectedDate)return;const{quotas:e}=await S.asyncFetch(()=>S.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),"by_ticket_types[]":["time_slot"],"by_museum_ids[]":t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":t.ticketGroupIds}));S.capacityManager.addQuotas(e)}const kP={"ticket:timeslot":pP,"ticket:day":mP,"ticket:annual":gP,"event:admission":vP,"event:admission:day":yP,"event:admission:timeslot":_P,"event:price":bP,"events:admission":{name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>ql(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=jl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=ci(o,i.start_time),c=li(l,i.start_time);for(const u of c)t.preCart.addItem(xt(u,{time:i.start_time}))}}},"events:admission:day":{name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>ql(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=jl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,"by_ticket_types[]":["normal"],by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=Object.values(a)[0],c=l?Object.keys(l.capacities)[0]:i.start_time,u=ci(o,c),d=li(u,c);for(const f of d)t.preCart.addItem(xt(f,{time:c}))}}},"events:admission:timeslot":{name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>ql(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=jl(r,e.selectedDate.toString(),e.selectedTime);for(const i of n){if(!i.event_id||!i.start_time)continue;const s=await S.asyncFetch(()=>S.getEvent(i.event_id));if(!s?.tickets?.length)continue;const{tickets:o,quotas:a}=await S.asyncFetch(()=>S.ticketsAndQuotas({"by_ticket_ids[]":s.tickets,by_ticket_type:"time_slot",by_bookable:!0,valid_at:i.start_time.slice(0,10)}));S.capacityManager.addQuotas(a);const l=ci(o,i.start_time),c=li(l,i.start_time);for(const u of c)t.preCart.addItem(xt(u,{time:i.start_time}))}}},"events:price":{name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:t=>ql(t),async loadProducts(t){const e=t.ticketSelectionDetails;if(!e?.selectedDate||!e.selectedTime)return;const r=await S.asyncFetch(()=>S.getDates({by_bookable:!0,"by_museum_ids[]":t.museumIds??e.museumIds,"by_exhibition_ids[]":e.exhibitionIds,"by_event_ids[]":e.eventIds,"by_language_ids[]":t.languageIds,"by_catch_word_ids[]":t.catchWordIds,start_at:e.selectedDate.toString(),per_page:t.limit||30})),n=jl(r,e.selectedDate.toString(),e.selectedTime),i=t.query;for(const s of n){if(!s.prices?.length)continue;const o=i?s.prices.filter(a=>a.title?.includes(i)):s.prices;for(const a of o){const l=hu(a,s.id,{event_title:s.event_title});t.preCart.addItem(xt(l,{time:s.start_time}))}s.seats&&S.capacityManager.addSeats(s.id,s.seats)}}}};function Wi(t){const e=kP[t];return e||console.warn(`[ticket-selection] Unknown filter "${t}". Valid filters: ${ey.join(", ")}`),e}const ty=ey;let SP=0;class xP{uid=SP++;#e=le();get filters(){return h(this.#e)}set filters(e){M(this.#e,e,!0)}#t=le();get eventIds(){return h(this.#t)}set eventIds(e){M(this.#t,e,!0)}#r=le();get museumIds(){return h(this.#r)}set museumIds(e){M(this.#r,e,!0)}#n=le();get exhibitionIds(){return h(this.#n)}set exhibitionIds(e){M(this.#n,e,!0)}#i=le();get ticketIds(){return h(this.#i)}set ticketIds(e){M(this.#i,e,!0)}#s=le();get ticketGroupIds(){return h(this.#s)}set ticketGroupIds(e){M(this.#s,e,!0)}#a=le();get selectedDate(){return h(this.#a)}set selectedDate(e){M(this.#a,e,!0)}#o=le();get selectedTimeslot(){return h(this.#o)}set selectedTimeslot(e){M(this.#o,e,!0)}#l=C(()=>this.selectedTimeslot);get selectedTime(){return h(this.#l)}set selectedTime(e){M(this.#l,e)}#c=le(Be([]));get ticketSegments(){return h(this.#c)}set ticketSegments(e){M(this.#c,e,!0)}#d=C(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return h(this.#d)}set preCarts(e){M(this.#d,e)}#u=le();get timeslotDetails(){return h(this.#u)}set timeslotDetails(e){M(this.#u,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>Wi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>Wi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>Wi(e).isTicketsVisible(this))}}const ry="go-ticket-selection",EP=fs(ry),zn=hs(ry);function TP(t,e){te(e,!0);let r=_(e,"when",7),n=_(e,"then",7,"show");const i=zn(e.$$host),s=C(()=>i.value),o=ik(e.$$host),a=C(()=>o.value),l=vs(e.$$host),c=C(()=>l.value),u=ys(e.$$host),d=C(()=>u.value);let f=C(()=>({ticketSelection:h(s),personalizationDetails:h(a),formData:h(c)?.formData,cart:S.cart,cartView:h(d)}));const p=k=>{M(f,k)},v=()=>h(f);let g=C(()=>hP(r(),h(f))),m=null;_e(()=>{const k=e.$$host;if(h(g)&&n()==="show")m&&(k.appendChild(m),m=null);else if(!m&&k.childNodes.length>0)for(m=document.createDocumentFragment();k.firstChild;)m.appendChild(k.firstChild)});var b={_setData:p,_getData:v,get when(){return r()},set when(k){r(k),y()},get then(){return n()},set then(k="show"){n(k),y()}};return re(b)}customElements.define("go-if",ne(TP,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ny(t,e){te(e,!0);let r=_(e,"apiUrl",7),n=_(e,"shopDomain",7),i=_(e,"locale",7);i(i()||localStorage.getItem("lang")||"en"),_e(()=>{(n()!==S.shopDomain||r()!==S.apiUrl||i()!==S.locale)&&(S.load(r(),n(),i()),console.warn("shop loaded due to prop change"))});var s={get apiUrl(){return r()},set apiUrl(o){r(o),y()},get shopDomain(){return n()},set shopDomain(o){n(o),y()},get locale(){return i()},set locale(o){i(o),y()}};return re(s)}customElements.define("gomus-init",ne(ny,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function AP(t,e){te(e,!0);let r=_(e,"apiDomain",7),n=_(e,"shopDomain",7),i=_(e,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return ny(t,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),re(o)}customElements.define("go-init",ne(AP,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function CP(t,e){te(e,!0);const r=_(e,"to",7),n=C(()=>at.config.urls[r()]),i=ui(e.$$host,"a");_e(()=>{if(!h(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",h(n)())}),i.addEventListener("click",o=>{if(o.preventDefault(),!at.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}at.config.navigateTo(at.config.urls[r()]())});var s={get to(){return r()},set to(o){r(o),y()}};return re(s)}customElements.define("go-link",ne(CP,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));class OP{#e=le();get token(){return h(this.#e)}set token(e){M(this.#e,e,!0)}constructor(e){this.token=e}get order(){return this.token?lc(S.order(this.token)):void 0}downloadLink(e,r){if(this.order?.is_valid)switch(e.type){case"Event":return`${S.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?at.config.urls.annualTicketPersonalizationList?.()?at.config.urls.annualTicketPersonalizationList(this.token):S.urls?.annualTicketPersonalizationList(this.token):`${S.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${S.locale}&token=${this.token}&barcode_id=${r}`}}}const iy="go-order-details",DP=fs(iy),sy=hs(iy);function IP(t,e){te(e,!0);let r=_(e,"token",7);const n=new OP(r());DP(e.$$host,n),Sn(()=>{S.cart.clearItems(),S.auth.isGuest()&&S.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return re(i)}customElements.define("go-order",ne(IP,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var PP=q('<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),MP=q('<br/> <span class="go-order-item-quantities"> </span>',1),$P=q('<a aria-label="iCal link"> </a>'),NP=q('<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 oy(t,e){te(e,!0);let r=_(e,"item",7),n=_(e,"orderDetails",7);var i={get item(){return r()},set item(P){r(P),y()},get orderDetails(){return n()},set orderDetails(P){n(P),y()}},s=NP(),o=$(s),a=$(o),l=ee($(a),2),c=$(l),u=$(c,!0);I(c);var d=ee(c,2);{var f=P=>{var A=PP(),O=L(A),F=$(O,!0);I(O);var N=ee(O,2),j=$(N,!0);I(N),ce((G,Z)=>{se(F,G),se(j,Z)},[()=>ko(r().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>wo(r().attributes.start_time)]),w(P,A)};de(d,P=>{r().attributes.start_time&&P(f)})}var p=ee(d,2);Ke(p,17,()=>r().attributes.quantities,P=>P.id,(P,A)=>{var O=MP(),F=ee(L(O),2),N=$(F);I(F),ce(()=>se(N,`${h(A).quantity??""} x ${h(A).title??""}`)),w(P,O)});var v=ee(p,2),g=$(v,!0);I(v),I(l);var m=ee(l,2),b=$(m,!0);I(m);var k=ee(m,4),D=$(k);{var T=P=>{var A=$P(),O=$(A,!0);I(A),ce(F=>{Te(A,"href",S.apiUrl+r().attributes.ical_url),se(O,F)},[()=>S.t("common.calendar")]),w(P,A)};de(D,P=>{r().attributes.ical_url&&P(T)})}return I(k),I(a),I(o),I(s),ce((P,A,O)=>{se(u,r().attributes.title),Te(v,"href",P),se(g,A),se(b,O)},[()=>n().downloadLink(r()),()=>S.t("common.download"),()=>qa(r().price_cents)]),w(t,s),re(i)}ne(oy,{item:{},orderDetails:{}},[],[],{mode:"open"});var FP=q('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),RP=q('<span class="go-cart-item-date"> </span>'),LP=q('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),zP=q('<br/> <a class="go-ticket-personalization"> </a>',1),ZP=q('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),VP=q('<a aria-label="iCal link"> </a>'),UP=q('<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>'),BP=q('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),jP=q('<a class="go-ticket-personalization"> </a>'),qP=q('<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 ay(t,e){te(e,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${S.locale}.svg`;let n=_(e,"item",7),i=_(e,"orderDetails",7);var s={get item(){return n()},set item(u){n(u),y()},get orderDetails(){return i()},set orderDetails(u){i(u),y()}},o=H(),a=L(o);{var l=u=>{var d=H(),f=L(d);Ke(f,17,()=>({length:n().attributes.quantity}),Gr,(p,v,g)=>{var m=UP(),b=$(m),k=$(b),D=$(k);D.textContent="1";var T=ee(D,2),P=$(T),A=$(P,!0);I(P);var O=ee(P,2);{var F=W=>{const Y=C(()=>n().attributes.barcodes[g]?.id);var ae=LP(),X=L(ae);{var ye=z=>{var we=FP(),E=L(we),Ve=$(E,!0);I(E);var Re=ee(E,2),it=$(Re,!0);I(Re),ce((Xe,He)=>{se(Ve,Xe),se(it,He)},[()=>ko(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale),()=>wo(n().attributes.start_time)]),w(z,we)},V=z=>{var we=H(),E=L(we);{var Ve=Re=>{var it=RP(),Xe=$(it,!0);I(it),ce(He=>se(Xe,He),[()=>ko(n().attributes.start_time,{month:"numeric",day:"numeric"},S.locale)]),w(Re,it)};de(E,Re=>{n().attributes.ticket_type==="normal"&&Re(Ve)},!0)}w(z,we)};de(X,z=>{n().attributes.ticket_type==="time_slot"?z(ye):z(V,!1)})}var pe=ee(X,4),U=$(pe,!0);I(pe),ce((z,we)=>{Te(pe,"href",z),se(U,we)},[()=>i().downloadLink(n(),h(Y)),()=>S.t("common.download")]),w(W,ae)},N=W=>{var Y=zP(),ae=ee(L(Y),2),X=$(ae,!0);I(ae),ce((ye,V)=>{Te(ae,"href",ye),se(X,V)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(W,Y)};de(O,W=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?W(F):W(N,!1)})}I(T);var j=ee(T,2),G=$(j,!0);I(j);var Z=ee(j,2),ue=$(Z);{var me=W=>{var Y=ZP(),ae=$(Y);I(Y),ce(()=>{Te(Y,"href",S.apiUrl+n().attributes.barcodes[g]?.passbook_url),Te(ae,"src",r)}),w(W,Y)};de(ue,W=>{n().attributes.barcodes[g]&&n().attributes.barcodes[g]?.passbook_url&&W(me)})}I(Z);var K=ee(Z,2),J=$(K);{var B=W=>{var Y=VP(),ae=$(Y,!0);I(Y),ce(X=>{Te(Y,"href",S.apiUrl+n().attributes.ical_url),se(ae,X)},[()=>S.t("common.calendar")]),w(W,Y)};de(J,W=>{n().attributes.ical_url&&W(B)})}I(K),I(k),I(b),I(m),ce(W=>{se(A,n().attributes.title),se(G,W)},[()=>qa(n().price_cents)]),w(p,m)}),w(u,d)},c=u=>{var d=qP(),f=$(d),p=$(f),v=$(p),g=$(v,!0);I(v);var m=ee(v,2),b=$(m),k=$(b,!0);I(b);var D=ee(b,2);{var T=F=>{var N=BP(),j=$(N,!0);I(N),ce((G,Z)=>{Te(N,"href",G),se(j,Z)},[()=>i().downloadLink(n()),()=>S.t("common.download")]),w(F,N)},P=F=>{var N=jP(),j=$(N,!0);I(N),ce((G,Z)=>{Te(N,"href",G),se(j,Z)},[()=>i().downloadLink(n()),()=>S.t("common.personalize")]),w(F,N)};de(D,F=>{n().attributes.is_voucher?F(T):F(P,!1)})}I(m);var A=ee(m,2),O=$(A,!0);I(A),$t(2),I(p),I(f),I(d),ce(F=>{se(g,n().attributes.quantity),se(k,n().attributes.title),se(O,F)},[()=>qa(n().price_cents)]),w(u,d)};de(a,u=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?u(l):u(c,!1)})}return w(t,o),re(s)}ne(ay,{item:{},orderDetails:{}},[],[],{mode:"open"});var WP=q('<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 HP(t,e){te(e,!0);const r=sy(e.$$host),n=C(()=>r.value);let i=C(()=>h(n)?.order);var s=H(),o=L(s);{var a=l=>{var c=WP(),u=$(c),d=$(u),f=$(d),p=$(f,!0);I(f);var v=ee(f,2),g=$(v,!0);I(v);var m=ee(v,2),b=$(m,!0);I(m),$t(2),I(d),I(u);var k=ee(u,2);Ke(k,17,()=>h(i).items,O=>O.id,(O,F)=>{var N=H(),j=L(N);{var G=ue=>{ay(ue,{get item(){return h(F)},get orderDetails(){return h(n)}})},Z=ue=>{var me=H(),K=L(me);{var J=B=>{oy(B,{get item(){return h(F)},get orderDetails(){return h(n)}})};de(K,B=>{h(F).type==="Event"&&B(J)},!0)}w(ue,me)};de(j,ue=>{h(F).type==="Ticket"?ue(G):ue(Z,!1)})}w(O,N)});var D=ee(k,2),T=$(D),P=ee($(T),4),A=$(P,!0);I(P),$t(2),I(T),I(D),I(c),ce((O,F,N,j)=>{se(p,O),se(g,F),se(b,N),se(A,j)},[()=>S.t("common.table.count"),()=>S.t("common.table.product"),()=>S.t("common.table.price"),()=>S.t("common.table.total",{value:qa(h(i).total_price_cents)})]),w(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),re()}customElements.define("go-order-breakdown",ne(HP,{},[],[]));function KP(t,e){te(e,!0);const r=sy(e.$$host),n=C(()=>r.value);let i=C(()=>h(n)?.order);$t();var s=Jt();ce(()=>se(s,h(i)?.id)),w(t,s),re()}customElements.define("go-order-invoice-id",ne(KP,{},[],[]));var GP=q("<go-form></go-form>",2);function YP(t,e){te(e,!1),er.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const o=i.target.details,a=await S.updatePassword(o.formData);a.data?(o.successMessage=S.t("user.passwordSuccess.desc.title"),o.apiErrors=[]):o.apiErrors=a.error?.errors||a.error||a.errors}Lc();var n=GP();Ei(n,"formId","passwordResetForm"),Ec("submit",n,r),w(t,n),re()}customElements.define("go-profile-password",ne(YP,{},[],[]));var JP=q("<go-form></go-form>",2);function QP(t,e){te(e,!0),er.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=le(void 0);const n=C(()=>S.validateToken());Sn(async()=>{await S.waitForAllFetches(),await zc(()=>h(r).details),await zc(()=>h(n).data),h(r).details.fill(h(n).data)});var i=JP();Ei(i,"formId","accountDetailsForm"),Uh(i,s=>M(r,s),()=>h(r)),w(t,i),re()}customElements.define("go-profile-details",ne(QP,{},[],[]));var XP=q('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function eM(t,e){te(e,!0);const r=C(()=>S.validateToken()),n=C(()=>h(r)?.data);var i=H(),s=L(i);{var o=l=>{var c=XP(),u=L(c),d=$(u);I(u);var f=ee(u,2),p=$(f,!0);I(f),ce(()=>{se(d,`${h(n).name??""}
13
- ${h(n).surname??""}`),se(p,h(n).email)}),w(l,c)},a=l=>{var c=Jt();ce(u=>se(c,u),[()=>S.t("user.login.desc.text")]),w(l,c)};de(s,l=>{h(n)?l(o):l(a,!1)})}w(t,i),re()}customElements.define("go-profile-overview",ne(eM,{},[],[]));function tM(t,e){te(e,!0);function r(p){if(!p)return;const v=[];for(const g of p.split(",")){const m=g.trim();m&&(ty.includes(m)?v.push(m):console.warn(`[go-ticket-selection] Unknown filter "${m}". Valid filters: ${ty.join(", ")}`))}return v.length?v:void 0}let n=_(e,"filters",7),i=_(e,"eventIds",7),s=_(e,"museumIds",7),o=_(e,"exhibitionIds",7),a=_(e,"selectedDate",7),l=_(e,"selectedTimeslot",7),c=_(e,"ticketIds",7),u=_(e,"ticketGroupIds",7);const d=new xP;_e(()=>{e.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),_e(()=>{d.filters=r(n()),d.eventIds=Dn(i()),d.museumIds=Dn(s()),d.exhibitionIds=Dn(o()),d.ticketIds=Dn(c()),d.ticketGroupIds=Dn(u()),d.selectedTimeslot=l(),a()&&(d.selectedDate=ja(a()))}),_e(()=>{d.selectedDate&&Ge(()=>{a(d.selectedDate.toString())})}),EP(e.$$host,d);var f={details:d,get filters(){return n()},set filters(p){n(p),y()},get eventIds(){return i()},set eventIds(p){i(p),y()},get museumIds(){return s()},set museumIds(p){s(p),y()},get exhibitionIds(){return o()},set exhibitionIds(p){o(p),y()},get selectedDate(){return a()},set selectedDate(p){a(p),y()},get selectedTimeslot(){return l()},set selectedTimeslot(p){l(p),y()},get ticketIds(){return c()},set ticketIds(p){c(p),y()},get ticketGroupIds(){return u()},set ticketGroupIds(p){u(p),y()}};return re(f)}customElements.define("go-ticket-selection",ne(tM,{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 rM(t,e){te(e,!0);const r=zn(e.$$host),n=C(()=>r.value);_e(()=>{e.$$host.style.display=h(n)?.isTicketsVisible?"block":"none",e.$$host.classList.toggle("is-hidden",!h(n)?.isTicketsVisible),e.$$host.classList.toggle("is-visible",h(n)?.isTicketsVisible)}),re()}customElements.define("go-tickets",ne(rM,{},[],[]));function nM(t,e){te(e,!0);const r=zn(e.$$host),n=C(()=>r.value),i=C(()=>Ti(h(n)?.preCarts||[],o=>o.items.length)),s=C(()=>!h(n)?.isTicketsVisible||h(n)?.isTicketsVisible&&h(i)===0);_e(()=>{e.$$host.style.display=h(s)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(s)),e.$$host.classList.toggle("is-visible",h(s))}),re()}customElements.define("go-tickets-empty",ne(nM,{},[],[]));function iM(t,e){te(e,!0);const r=zn(e.$$host),n=C(()=>r.value);let i=C(()=>Ti(h(n)?.preCarts||[],o=>o.totalPriceCents));$t();var s=Jt();ce(o=>se(s,o),[()=>Sr(h(i))]),w(t,s),re()}customElements.define("go-tickets-sum",ne(iM,{},[],[]));class sM{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}#t=le(Be(us()));get preCart(){return h(this.#t)}set preCart(e){M(this.#t,e,!0)}#r=le();get filters(){return h(this.#r)}set filters(e){M(this.#r,e,!0)}#n=le();get dateId(){return h(this.#n)}set dateId(e){M(this.#n,e,!0)}#i=le();get limit(){return h(this.#i)}set limit(e){M(this.#i,e,!0)}#s=le();get query(){return h(this.#s)}set query(e){M(this.#s,e,!0)}#a=le(Be([]));get ticketGroupIds(){return h(this.#a)}set ticketGroupIds(e){M(this.#a,e,!0)}#o=le(Be([]));get languageIds(){return h(this.#o)}set languageIds(e){M(this.#o,e,!0)}#l=le(Be([]));get catchWordIds(){return h(this.#l)}set catchWordIds(e){M(this.#l,e,!0)}#c=le(Be([]));get museumIds(){return h(this.#c)}set museumIds(e){M(this.#c,e,!0)}constructor(e,r){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=C(()=>r.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=us([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=us();const e=this.effectiveFilters.filter(r=>r!=="custom");await Promise.all(e.map(r=>Wi(r).loadProducts(this)))}}const ly="go-ticket-segment",oM=fs(ly),cf=hs(ly);function aM(t,e){te(e,!0);const r=_(e,"filters",7),n=_(e,"dateId",7),i=_(e,"query",7),s=_(e,"limit",7),o=_(e,"ticketGroupIds",7),a=_(e,"languageIds",7),l=_(e,"catchWordIds",7),c=_(e,"museumIds",7);function u(m){if(!m)return;const b=m.split(",").map(k=>k.trim()).filter(Boolean);return b.length?b:void 0}const d=zn(e.$$host),f=d.value,p=new sM(u(r()),d);oM(e.$$host,p),_e(()=>{p.filters=u(r()),p.dateId=n(),p.query=i(),p.limit=s(),p.ticketGroupIds=Dn(o()),p.languageIds=Dn(a()),p.catchWordIds=Dn(l()),p.museumIds=Dn(c())}),_e(()=>{p.dateId,p.filters,p.ticketGroupIds,p.museumIds,p.languageIds,p.catchWordIds,p.query,p.limit,f?.filters,f?.selectedTimeslot,f?.selectedTime,f?.selectedDate,f?.museumIds,Ge(()=>{p.loadTickets()})}),_e(()=>{f&&Ge(()=>f?.addTicketSegment(p))});const v=C(()=>p.preCart.items.length);_e(()=>{e.$$host.classList.toggle("is-empty",h(v)===0)});var g={details:p,get filters(){return r()},set filters(m){r(m),y()},get dateId(){return n()},set dateId(m){n(m),y()},get query(){return i()},set query(m){i(m),y()},get limit(){return s()},set limit(m){s(m),y()},get ticketGroupIds(){return o()},set ticketGroupIds(m){o(m),y()},get languageIds(){return a()},set languageIds(m){a(m),y()},get catchWordIds(){return l()},set catchWordIds(m){l(m),y()},get museumIds(){return c()},set museumIds(m){c(m),y()}};return re(g)}customElements.define("go-ticket-segment",ne(aM,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"}},[],["details"]));function lM(t,e){te(e,!0);const n=zn(e.$$host).value,s=cf(e.$$host).value,o=C(()=>s?.preCart.items.length),a=C(()=>!n?.isTicketsVisible||n?.isTicketsVisible&&h(o)===0);_e(()=>{e.$$host.style.display=h(a)?"block":"none",e.$$host.classList.toggle("is-hidden",!h(a)),e.$$host.classList.toggle("is-visible",h(a))}),re()}customElements.define("go-ticket-segment-empty",ne(lM,{},[],[]));const{entries:cy,setPrototypeOf:uy,isFrozen:cM,getPrototypeOf:uM,getOwnPropertyDescriptor:dM}=Object;let{freeze:Ut,seal:Tr,create:uf}=Object,{apply:df,construct:ff}=typeof Reflect<"u"&&Reflect;Ut||(Ut=function(e){return e}),Tr||(Tr=function(e){return e}),df||(df=function(e,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 e.apply(r,i)}),ff||(ff=function(e){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 e(...n)});const Wl=jt(Array.prototype.forEach),fM=jt(Array.prototype.lastIndexOf),dy=jt(Array.prototype.pop),Wo=jt(Array.prototype.push),hM=jt(Array.prototype.splice),Hl=jt(String.prototype.toLowerCase),hf=jt(String.prototype.toString),pf=jt(String.prototype.match),Ho=jt(String.prototype.replace),pM=jt(String.prototype.indexOf),mM=jt(String.prototype.trim),Ur=jt(Object.prototype.hasOwnProperty),Bt=jt(RegExp.prototype.test),Ko=gM(TypeError);function jt(t){return function(e){e instanceof RegExp&&(e.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 df(t,e,n)}}function gM(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return ff(t,r)}}function Ie(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hl;uy&&uy(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const s=r(i);s!==i&&(cM(e)||(e[n]=s),i=s)}t[i]=!0}return t}function vM(t){for(let e=0;e<t.length;e++)Ur(t,e)||(t[e]=null);return t}function un(t){const e=uf(null);for(const[r,n]of cy(t))Ur(t,r)&&(Array.isArray(n)?e[r]=vM(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=un(n):e[r]=n);return e}function Go(t,e){for(;t!==null;){const n=dM(t,e);if(n){if(n.get)return jt(n.get);if(typeof n.value=="function")return jt(n.value)}t=uM(t)}function r(){return null}return r}const fy=Ut(["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"]),mf=Ut(["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"]),gf=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yM=Ut(["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"]),vf=Ut(["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"]),_M=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hy=Ut(["#text"]),py=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),yf=Ut(["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"]),my=Ut(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Kl=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bM=Tr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wM=Tr(/<%[\w\W]*|[\w\W]*%>/gm),kM=Tr(/\$\{[\w\W]*/gm),SM=Tr(/^data-[\-\w.\u00B7-\uFFFF]+$/),xM=Tr(/^aria-[\-\w]+$/),gy=Tr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),EM=Tr(/^(?:\w+script|data):/i),TM=Tr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vy=Tr(/^html$/i),AM=Tr(/^[a-z][.\w]*(-[.\w]+)+$/i);var yy=Object.freeze({__proto__:null,ARIA_ATTR:xM,ATTR_WHITESPACE:TM,CUSTOM_ELEMENT:AM,DATA_ATTR:SM,DOCTYPE_NAME:vy,ERB_EXPR:wM,IS_ALLOWED_URI:gy,IS_SCRIPT_OR_DATA:EM,MUSTACHE_EXPR:bM,TMPLIT_EXPR:kM});const Yo={element:1,text:3,progressingInstruction:7,comment:8,document:9},CM=function(){return typeof window>"u"?null:window},OM=function(e,r){if(typeof e!="object"||typeof e.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 e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},_y=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function by(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CM();const e=be=>by(be);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Yo.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=t,v=l.prototype,g=Go(v,"cloneNode"),m=Go(v,"remove"),b=Go(v,"nextSibling"),k=Go(v,"childNodes"),D=Go(v,"parentNode");if(typeof o=="function"){const be=r.createElement("template");be.content&&be.content.ownerDocument&&(r=be.content.ownerDocument)}let T,P="";const{implementation:A,createNodeIterator:O,createDocumentFragment:F,getElementsByTagName:N}=r,{importNode:j}=n;let G=_y();e.isSupported=typeof cy=="function"&&typeof D=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Z,ERB_EXPR:ue,TMPLIT_EXPR:me,DATA_ATTR:K,ARIA_ATTR:J,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:Y}=yy;let{IS_ALLOWED_URI:ae}=yy,X=null;const ye=Ie({},[...fy,...mf,...gf,...vf,...hy]);let V=null;const pe=Ie({},[...py,...yf,...my,...Kl]);let U=Object.seal(uf(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}})),z=null,we=null;const E=Object.seal(uf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,Re=!0,it=!1,Xe=!0,He=!1,Et=!0,pt=!1,Tt=!1,qt=!1,nr=!1,Ot=!1,Dt=!1,Zn=!0,gi=!1;const Br="user-content-";let jr=!0,ir=!1,Wt={},sr=null;const vi=Ie({},["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 dn=null;const Ns=Ie({},["audio","video","img","source","image","track"]);let Jo=null;const Yl=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fs="http://www.w3.org/1998/Math/MathML",Qo="http://www.w3.org/2000/svg",Ar="http://www.w3.org/1999/xhtml";let yi=Ar,Xo=!1,ea=null;const XM=Ie({},[Fs,Qo,Ar],hf);let Jl=Ie({},["mi","mo","mn","ms","mtext"]),Ql=Ie({},["annotation-xml"]);const e$=Ie({},["title","style","font","a","script"]);let ta=null;const t$=["application/xhtml+xml","text/html"],r$="text/html";let mt=null,Rs=null;const n$=r.createElement("form"),xy=function(x){return x instanceof RegExp||x instanceof Function},_f=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rs&&Rs===x)){if((!x||typeof x!="object")&&(x={}),x=un(x),ta=t$.indexOf(x.PARSER_MEDIA_TYPE)===-1?r$:x.PARSER_MEDIA_TYPE,mt=ta==="application/xhtml+xml"?hf:Hl,X=Ur(x,"ALLOWED_TAGS")?Ie({},x.ALLOWED_TAGS,mt):ye,V=Ur(x,"ALLOWED_ATTR")?Ie({},x.ALLOWED_ATTR,mt):pe,ea=Ur(x,"ALLOWED_NAMESPACES")?Ie({},x.ALLOWED_NAMESPACES,hf):XM,Jo=Ur(x,"ADD_URI_SAFE_ATTR")?Ie(un(Yl),x.ADD_URI_SAFE_ATTR,mt):Yl,dn=Ur(x,"ADD_DATA_URI_TAGS")?Ie(un(Ns),x.ADD_DATA_URI_TAGS,mt):Ns,sr=Ur(x,"FORBID_CONTENTS")?Ie({},x.FORBID_CONTENTS,mt):vi,z=Ur(x,"FORBID_TAGS")?Ie({},x.FORBID_TAGS,mt):un({}),we=Ur(x,"FORBID_ATTR")?Ie({},x.FORBID_ATTR,mt):un({}),Wt=Ur(x,"USE_PROFILES")?x.USE_PROFILES:!1,Ve=x.ALLOW_ARIA_ATTR!==!1,Re=x.ALLOW_DATA_ATTR!==!1,it=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=x.SAFE_FOR_TEMPLATES||!1,Et=x.SAFE_FOR_XML!==!1,pt=x.WHOLE_DOCUMENT||!1,nr=x.RETURN_DOM||!1,Ot=x.RETURN_DOM_FRAGMENT||!1,Dt=x.RETURN_TRUSTED_TYPE||!1,qt=x.FORCE_BODY||!1,Zn=x.SANITIZE_DOM!==!1,gi=x.SANITIZE_NAMED_PROPS||!1,jr=x.KEEP_CONTENT!==!1,ir=x.IN_PLACE||!1,ae=x.ALLOWED_URI_REGEXP||gy,yi=x.NAMESPACE||Ar,Jl=x.MATHML_TEXT_INTEGRATION_POINTS||Jl,Ql=x.HTML_INTEGRATION_POINTS||Ql,U=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&xy(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&xy(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),He&&(Re=!1),Ot&&(nr=!0),Wt&&(X=Ie({},hy),V=[],Wt.html===!0&&(Ie(X,fy),Ie(V,py)),Wt.svg===!0&&(Ie(X,mf),Ie(V,yf),Ie(V,Kl)),Wt.svgFilters===!0&&(Ie(X,gf),Ie(V,yf),Ie(V,Kl)),Wt.mathMl===!0&&(Ie(X,vf),Ie(V,my),Ie(V,Kl))),x.ADD_TAGS&&(typeof x.ADD_TAGS=="function"?E.tagCheck=x.ADD_TAGS:(X===ye&&(X=un(X)),Ie(X,x.ADD_TAGS,mt))),x.ADD_ATTR&&(typeof x.ADD_ATTR=="function"?E.attributeCheck=x.ADD_ATTR:(V===pe&&(V=un(V)),Ie(V,x.ADD_ATTR,mt))),x.ADD_URI_SAFE_ATTR&&Ie(Jo,x.ADD_URI_SAFE_ATTR,mt),x.FORBID_CONTENTS&&(sr===vi&&(sr=un(sr)),Ie(sr,x.FORBID_CONTENTS,mt)),x.ADD_FORBID_CONTENTS&&(sr===vi&&(sr=un(sr)),Ie(sr,x.ADD_FORBID_CONTENTS,mt)),jr&&(X["#text"]=!0),pt&&Ie(X,["html","head","body"]),X.table&&(Ie(X,["tbody"]),delete z.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=x.TRUSTED_TYPES_POLICY,P=T.createHTML("")}else T===void 0&&(T=OM(p,i)),T!==null&&typeof P=="string"&&(P=T.createHTML(""));Ut&&Ut(x),Rs=x}},Ey=Ie({},[...mf,...gf,...yM]),Ty=Ie({},[...vf,..._M]),i$=function(x){let oe=D(x);(!oe||!oe.tagName)&&(oe={namespaceURI:yi,tagName:"template"});const ge=Hl(x.tagName),st=Hl(oe.tagName);return ea[x.namespaceURI]?x.namespaceURI===Qo?oe.namespaceURI===Ar?ge==="svg":oe.namespaceURI===Fs?ge==="svg"&&(st==="annotation-xml"||Jl[st]):!!Ey[ge]:x.namespaceURI===Fs?oe.namespaceURI===Ar?ge==="math":oe.namespaceURI===Qo?ge==="math"&&Ql[st]:!!Ty[ge]:x.namespaceURI===Ar?oe.namespaceURI===Qo&&!Ql[st]||oe.namespaceURI===Fs&&!Jl[st]?!1:!Ty[ge]&&(e$[ge]||!Ey[ge]):!!(ta==="application/xhtml+xml"&&ea[x.namespaceURI]):!1},fn=function(x){Wo(e.removed,{element:x});try{D(x).removeChild(x)}catch{m(x)}},Hi=function(x,oe){try{Wo(e.removed,{attribute:oe.getAttributeNode(x),from:oe})}catch{Wo(e.removed,{attribute:null,from:oe})}if(oe.removeAttribute(x),x==="is")if(nr||Ot)try{fn(oe)}catch{}else try{oe.setAttribute(x,"")}catch{}},Ay=function(x){let oe=null,ge=null;if(qt)x="<remove></remove>"+x;else{const ft=pf(x,/^[\r\n\t ]+/);ge=ft&&ft[0]}ta==="application/xhtml+xml"&&yi===Ar&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const st=T?T.createHTML(x):x;if(yi===Ar)try{oe=new f().parseFromString(st,ta)}catch{}if(!oe||!oe.documentElement){oe=A.createDocument(yi,"template",null);try{oe.documentElement.innerHTML=Xo?P:st}catch{}}const It=oe.body||oe.documentElement;return x&&ge&&It.insertBefore(r.createTextNode(ge),It.childNodes[0]||null),yi===Ar?N.call(oe,pt?"html":"body")[0]:pt?oe.documentElement:It},Cy=function(x){return O.call(x.ownerDocument||x,x,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bf=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof u)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},Oy=function(x){return typeof a=="function"&&x instanceof a};function Vn(be,x,oe){Wl(be,ge=>{ge.call(e,x,oe,Rs)})}const Dy=function(x){let oe=null;if(Vn(G.beforeSanitizeElements,x,null),bf(x))return fn(x),!0;const ge=mt(x.nodeName);if(Vn(G.uponSanitizeElement,x,{tagName:ge,allowedTags:X}),Et&&x.hasChildNodes()&&!Oy(x.firstElementChild)&&Bt(/<[/\w!]/g,x.innerHTML)&&Bt(/<[/\w!]/g,x.textContent)||x.nodeType===Yo.progressingInstruction||Et&&x.nodeType===Yo.comment&&Bt(/<[/\w]/g,x.data))return fn(x),!0;if(!(E.tagCheck instanceof Function&&E.tagCheck(ge))&&(!X[ge]||z[ge])){if(!z[ge]&&Py(ge)&&(U.tagNameCheck instanceof RegExp&&Bt(U.tagNameCheck,ge)||U.tagNameCheck instanceof Function&&U.tagNameCheck(ge)))return!1;if(jr&&!sr[ge]){const st=D(x)||x.parentNode,It=k(x)||x.childNodes;if(It&&st){const ft=It.length;for(let or=ft-1;or>=0;--or){const Un=g(It[or],!0);Un.__removalCount=(x.__removalCount||0)+1,st.insertBefore(Un,b(x))}}}return fn(x),!0}return x instanceof l&&!i$(x)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&Bt(/<\/no(script|embed|frames)/i,x.innerHTML)?(fn(x),!0):(He&&x.nodeType===Yo.text&&(oe=x.textContent,Wl([Z,ue,me],st=>{oe=Ho(oe,st," ")}),x.textContent!==oe&&(Wo(e.removed,{element:x.cloneNode()}),x.textContent=oe)),Vn(G.afterSanitizeElements,x,null),!1)},Iy=function(x,oe,ge){if(Zn&&(oe==="id"||oe==="name")&&(ge in r||ge in n$))return!1;if(!(Re&&!we[oe]&&Bt(K,oe))){if(!(Ve&&Bt(J,oe))){if(!(E.attributeCheck instanceof Function&&E.attributeCheck(oe,x))){if(!V[oe]||we[oe]){if(!(Py(x)&&(U.tagNameCheck instanceof RegExp&&Bt(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))&&(U.attributeNameCheck instanceof RegExp&&Bt(U.attributeNameCheck,oe)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(oe,x))||oe==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Bt(U.tagNameCheck,ge)||U.tagNameCheck instanceof Function&&U.tagNameCheck(ge))))return!1}else if(!Jo[oe]){if(!Bt(ae,Ho(ge,W,""))){if(!((oe==="src"||oe==="xlink:href"||oe==="href")&&x!=="script"&&pM(ge,"data:")===0&&dn[x])){if(!(it&&!Bt(B,Ho(ge,W,"")))){if(ge)return!1}}}}}}}return!0},Py=function(x){return x!=="annotation-xml"&&pf(x,Y)},My=function(x){Vn(G.beforeSanitizeAttributes,x,null);const{attributes:oe}=x;if(!oe||bf(x))return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let st=oe.length;for(;st--;){const It=oe[st],{name:ft,namespaceURI:or,value:Un}=It,Ls=mt(ft),wf=Un;let At=ft==="value"?wf:mM(wf);if(ge.attrName=Ls,ge.attrValue=At,ge.keepAttr=!0,ge.forceKeepAttr=void 0,Vn(G.uponSanitizeAttribute,x,ge),At=ge.attrValue,gi&&(Ls==="id"||Ls==="name")&&(Hi(ft,x),At=Br+At),Et&&Bt(/((--!?|])>)|<\/(style|title|textarea)/i,At)){Hi(ft,x);continue}if(Ls==="attributename"&&pf(At,"href")){Hi(ft,x);continue}if(ge.forceKeepAttr)continue;if(!ge.keepAttr){Hi(ft,x);continue}if(!Xe&&Bt(/\/>/i,At)){Hi(ft,x);continue}He&&Wl([Z,ue,me],Ny=>{At=Ho(At,Ny," ")});const $y=mt(x.nodeName);if(!Iy($y,Ls,At)){Hi(ft,x);continue}if(T&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!or)switch(p.getAttributeType($y,Ls)){case"TrustedHTML":{At=T.createHTML(At);break}case"TrustedScriptURL":{At=T.createScriptURL(At);break}}if(At!==wf)try{or?x.setAttributeNS(or,ft,At):x.setAttribute(ft,At),bf(x)?fn(x):dy(e.removed)}catch{Hi(ft,x)}}Vn(G.afterSanitizeAttributes,x,null)},s$=function be(x){let oe=null;const ge=Cy(x);for(Vn(G.beforeSanitizeShadowDOM,x,null);oe=ge.nextNode();)Vn(G.uponSanitizeShadowNode,oe,null),Dy(oe),My(oe),oe.content instanceof s&&be(oe.content);Vn(G.afterSanitizeShadowDOM,x,null)};return e.sanitize=function(be){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=null,ge=null,st=null,It=null;if(Xo=!be,Xo&&(be="<!-->"),typeof be!="string"&&!Oy(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw Ko("dirty is not a string, aborting")}else throw Ko("toString is not a function");if(!e.isSupported)return be;if(Tt||_f(x),e.removed=[],typeof be=="string"&&(ir=!1),ir){if(be.nodeName){const Un=mt(be.nodeName);if(!X[Un]||z[Un])throw Ko("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof a)oe=Ay("<!---->"),ge=oe.ownerDocument.importNode(be,!0),ge.nodeType===Yo.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?oe=ge:oe.appendChild(ge);else{if(!nr&&!He&&!pt&&be.indexOf("<")===-1)return T&&Dt?T.createHTML(be):be;if(oe=Ay(be),!oe)return nr?null:Dt?P:""}oe&&qt&&fn(oe.firstChild);const ft=Cy(ir?be:oe);for(;st=ft.nextNode();)Dy(st),My(st),st.content instanceof s&&s$(st.content);if(ir)return be;if(nr){if(Ot)for(It=F.call(oe.ownerDocument);oe.firstChild;)It.appendChild(oe.firstChild);else It=oe;return(V.shadowroot||V.shadowrootmode)&&(It=j.call(n,It,!0)),It}let or=pt?oe.outerHTML:oe.innerHTML;return pt&&X["!doctype"]&&oe.ownerDocument&&oe.ownerDocument.doctype&&oe.ownerDocument.doctype.name&&Bt(vy,oe.ownerDocument.doctype.name)&&(or="<!DOCTYPE "+oe.ownerDocument.doctype.name+`>
14
- `+or),He&&Wl([Z,ue,me],Un=>{or=Ho(or,Un," ")}),T&&Dt?T.createHTML(or):or},e.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_f(be),Tt=!0},e.clearConfig=function(){Rs=null,Tt=!1},e.isValidAttribute=function(be,x,oe){Rs||_f({});const ge=mt(be),st=mt(x);return Iy(ge,st,oe)},e.addHook=function(be,x){typeof x=="function"&&Wo(G[be],x)},e.removeHook=function(be,x){if(x!==void 0){const oe=fM(G[be],x);return oe===-1?void 0:hM(G[be],oe,1)[0]}return dy(G[be])},e.removeHooks=function(be){G[be]=[]},e.removeAllHooks=function(){G=_y()},e}var DM=by(),IM=q('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),PM=q("<option> </option>"),MM=q('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function wy(t,e){te(e,!0);const r=p=>{var v=IM(),g=L(v),m=$(g);I(g);var b=ee(g,2),k=$(b,!0);I(b),ce(D=>{se(m,`${i().product.event_title??""} - ${D??""}`),se(k,i().product.title)},[()=>wo(i().time)]),w(p,v)},n=p=>{$t();var v=Jt();ce(()=>se(v,i().product.title)),w(p,v)};let i=_(e,"item",7),s=_(e,"details",7),o=le(void 0);_e(()=>{s().preCart.items.map(p=>p.quantity),Ge(()=>{M(o,S.capacityManager.capacity(S.cart,i(),s().preCart),!0)})});function a(p,v,g){const m=v;p.quantity=parseInt(m.value)}let l=n;So(i().product)&&(l=r);var c={get item(){return i()},set item(p){i(p),y()},get details(){return s()},set details(p){s(p),y()}},u=H(),d=L(u);{var f=p=>{var v=MM(),g=$(v),m=$(g),b=$(m),k=$(b);l(k),I(b);var D=ee(b,2),T=$(D);X_(T,()=>DM.sanitize(i().product.description)),I(D);var P=ee(D,2),A=$(P,!0);I(P);var O=ee(P,2),F=$(O);F.__change=N=>a(i(),N.target,s()?.ticketSelectionDetails),Ke(F,21,()=>Zm(h(o).min,h(o).max),N=>N.value,(N,j)=>{var G=PM(),Z=$(G,!0);I(G);var ue={};ce(()=>{Ic(G,i().quantity===h(j).value),se(Z,h(j).label),ue!==(ue=h(j).value)&&(G.value=(G.__value=h(j).value)??"")}),w(N,G)}),I(F),I(O),I(m),I(g),I(v),ce(N=>{Qt(g,1,Yr(["go-tickets-item",h(o).bookedOut&&"is-booked-out"])),Te(g,"data-testid",i().uuid),se(A,i().price_formatted),Te(F,"aria-label",N)},[()=>S.t("cart.content.table.edit")]),w(p,v)};de(d,p=>{h(o)&&!h(o).unavailable&&p(f)})}return w(t,u),re(c)}Hr(["change"]),ne(wy,{item:{},details:{}},[],[],{mode:"open"});var $M=q('<ol class="go-tickets" data-testid="tickets"><li class="go-tickets-header" data-go-tickets-header="" data-testid="tickets-header"><ul><li class="go-tickets-header-title" data-go-tickets-title=""> </li> <li class="go-tickets-header-description" data-go-tickets-description=""> </li> <li class="go-tickets-header-price" data-go-tickets-price=""> </li> <li class="go-tickets-header-quality" data-go-tickets-quality=""> </li></ul></li> <!></ol>');function NM(t,e){te(e,!0);const r=cf(e.$$host),n=C(()=>r.value),i=C(()=>h(n)?.preCart?.items.length&&h(n)?.preCart?.items.length>0);var s=H(),o=L(s);{var a=l=>{var c=$M(),u=$(c),d=$(u),f=$(d),p=$(f,!0);I(f);var v=ee(f,2),g=$(v,!0);I(v);var m=ee(v,2),b=$(m,!0);I(m);var k=ee(m,2),D=$(k,!0);I(k),I(d),I(u);var T=ee(u,2);Ke(T,17,()=>h(n).preCart.items,P=>P.uuid,(P,A)=>{wy(P,{get item(){return h(A)},get details(){return h(n)}})}),I(c),ce((P,A,O,F)=>{se(p,P),se(g,A),se(b,O),se(D,F)},[()=>S.t("product.detail.table.title"),()=>S.t("product.detail.table.desc"),()=>S.t("product.detail.table.price"),()=>S.t("product.detail.table.quantity")]),w(l,c)};de(o,l=>{h(i)&&h(n)&&l(a)})}w(t,s),re()}customElements.define("go-ticket-segment-body",ne(NM,{},[],[]));function FM(t,e){te(e,!0);const r=cf(e.$$host),n=C(()=>r.value);$t();var i=Jt();ce(()=>se(i,h(n)?.preCart.totalFormatted)),w(t,i),re()}customElements.define("go-ticket-segment-sum",ne(FM,{},[],[]));let RM=class{#e;get tsd(){return h(this.#e)}set tsd(e){M(this.#e,e)}#t=le(Be([]));get timeslots(){return h(this.#t)}set timeslots(e){M(this.#t,e,!0)}constructor(e){e&&(this.#e=C(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}this.timeslots=S.capacityManager.quotaManager.timeslotsOn(e).map(r=>({...r,startAt:r.timeSlot,timeFormatted:r.timeSlot.substring(11,16),available:r.capacity>0}))}};var LM=q('<li><label> <input type="radio" name="timeslot"/></label></li>'),zM=q('<ul data-testid="timeslots"></ul>');function ZM(t,e){te(e,!0);const r=[],n=zn(e.$$host),i=new RM(n);_e(()=>{const d=i.tsd;if(!d)return;const f=d.filters,p=d.selectedDate;Ge(async()=>{f?.length&&p&&await Promise.all(f.map(v=>Wi(v).loadTimeslots(d))),i.recalculateCapacities()})});const s=(d,f)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:f},bubbles:!0,composed:!0}))},o=d=>{s(d.target,i.tsd?.selectedTimeslot)};_e(()=>{const d=i.tsd;if(!d)return;const f=i.timeslots;if(f.length!==1)return;const p=f[0];p.available&&d.selectedTimeslot!==p.startAt&&(d.selectedTimeslot=p.startAt,s(e.$$host,p.startAt))});var a={details:i},l=H(),c=L(l);{var u=d=>{var f=zM();Ke(f,20,()=>i.timeslots,p=>p,(p,v)=>{const g=C(()=>v.totalCapacity===0),m=C(()=>!h(g)&&v.capacity===0),b=C(()=>h(g)||h(m)||!v.available),k=C(()=>i.tsd?.selectedTimeslot===v.startAt);var D=LM(),T=$(D),P=$(T),A=ee(P);Ta(A),A.__change=o;var O;I(T),I(D),ce(()=>{Qt(D,1,Yr({"go-timeslot":!0,"is-unavailable":h(g),"is-sold-out":h(m),"is-disabled":h(b),"is-selected":h(k)})),se(P,`${v.timeFormatted??""} `),A.disabled=h(b),Te(A,"aria-disabled",h(b)),O!==(O=v.startAt)&&(A.value=(A.__value=v.startAt)??"")}),ub(r,[],A,()=>(v.startAt,i.tsd.selectedTimeslot),F=>i.tsd.selectedTimeslot=F),w(p,D)}),I(f),w(d,f)};de(c,d=>{i.tsd?.isTimeslotsVisible&&d(u)})}return w(t,l),re(a)}Hr(["change"]),customElements.define("go-timeslots",ne(ZM,{},[],["details"]));class VM{#e=le();get details(){return h(this.#e)}set details(e){M(this.#e,e,!0)}#t=le(Be(Ii(Xt())));get startAt(){return h(this.#t)}set startAt(e){M(this.#t,e,!0)}#r=le(void 0);get selected(){return h(this.#r)}set selected(e){M(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(r=>Wi(r).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}isDateDisabled(e){return this.dates?e.compare(Ii(Xt()))<0||this.dates[e.toString()]=="unavailable":e.compare(Ii(Xt()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>Wi(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=S.calendar.bind(S);return this.fetchPeriod().reduce((r,n)=>dr(r,e(this.params(n))),{})}ticketsDates(){const e=S.ticketsCalendar.bind(S);return this.fetchPeriod().reduce((r,n)=>dr(r,e(this.params(n))),{})}}var UM=q("<!> <!> <!>",1),BM=q("<div> </div>"),jM=q("<!> <!>",1),qM=q("<!> <!>",1),WM=q('<div data-calendar-wrapper=""><!></div>');function ky(t,e){te(e,!0);let r=_(e,"calendarClass",7),n=le(void 0);const i=r();_e(()=>{h(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),y()}},o=WM(),a=$(o);{const l=(c,u)=>{let d=()=>u?.().months,f=()=>u?.().weekdays;var p=qM(),v=L(p);Le(v,()=>_d,(m,b)=>{b(m,{children:(k,D)=>{var T=UM(),P=L(T);Le(P,()=>kd,(F,N)=>{N(F,{class:"go-calendar-prev-button",children:(j,G)=>{$t();var Z=Jt("Prev");w(j,Z)},$$slots:{default:!0}})});var A=ee(P,2);Le(A,()=>bd,(F,N)=>{N(F,{class:"go-calendar-heading"})});var O=ee(A,2);Le(O,()=>wd,(F,N)=>{N(F,{class:"go-calendar-next-button",children:(j,G)=>{$t();var Z=Jt("Next");w(j,Z)},$$slots:{default:!0}})}),w(k,T)},$$slots:{default:!0}})});var g=ee(v,2);Ke(g,17,d,Gr,(m,b)=>{var k=H(),D=L(k);Le(D,()=>pd,(T,P)=>{P(T,{class:"go-calendar-grid",children:(A,O)=>{var F=jM(),N=L(F);Le(N,()=>vd,(G,Z)=>{Z(G,{class:"go-calendar-grid-head",children:(ue,me)=>{var K=H(),J=L(K);Le(J,()=>Uo,(B,W)=>{W(B,{class:"go-calendar-grid-row",children:(Y,ae)=>{var X=H(),ye=L(X);Ke(ye,17,f,Gr,(V,pe,U,z)=>{var we=H(),E=L(we);Le(E,()=>yd,(Ve,Re)=>{Re(Ve,{children:(it,Xe)=>{var He=BM(),Et=$(He,!0);I(He),ce(pt=>se(Et,pt),[()=>h(pe).slice(0,2)]),w(it,He)},$$slots:{default:!0}})}),w(V,we)}),w(Y,X)},$$slots:{default:!0}})}),w(ue,K)},$$slots:{default:!0}})});var j=ee(N,2);Le(j,()=>md,(G,Z)=>{Z(G,{class:"go-calendar-grid-body",children:(ue,me)=>{var K=H(),J=L(K);Ke(J,17,()=>h(b).weeks,Gr,(B,W,Y,ae)=>{var X=H(),ye=L(X);Le(ye,()=>Uo,(V,pe)=>{pe(V,{class:"go-calendar-grid-row",children:(U,z)=>{var we=H(),E=L(we);Ke(E,17,()=>h(W),Gr,(Ve,Re,it,Xe)=>{var He=H(),Et=L(He);Le(Et,()=>gd,(pt,Tt)=>{Tt(pt,{get date(){return h(Re)},get month(){return h(b).value},class:"go-calendar-cell",children:(qt,nr)=>{var Ot=H(),Dt=L(Ot);{let Zn=C(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(h(Re)),"is-disabled":r().isDateDisabled(h(Re)),"is-selected":r().selected?.compare(h(Re))===0}));Le(Dt,()=>hd,(gi,Br)=>{Br(gi,{get class(){return h(Zn)},children:(jr,ir)=>{$t();var Wt=Jt();ce(()=>se(Wt,h(Re).day)),w(jr,Wt)},$$slots:{default:!0}})})}w(qt,Ot)},$$slots:{default:!0}})}),w(Ve,He)}),w(U,we)},$$slots:{default:!0}})}),w(B,X)}),w(ue,K)},$$slots:{default:!0}})}),w(A,F)},$$slots:{default:!0}})}),w(m,k)}),w(c,p)};Le(a,()=>Hg,(c,u)=>{u(c,{weekdayFormat:"long",fixedWeeks:!0,preventDeselect:!0,type:"single",get locale(){return S.locale},isDateDisabled:d=>r().isDateDisabled(d),isDateUnavailable:d=>r().isDateUnavailable(d),disableDaysOutsideMonth:!1,class:"go-calendar-root",get value(){return r().selected},set value(d){r().selected=d},get placeholder(){return r().startAt},set placeholder(d){r().startAt=d},children:l,$$slots:{default:!0}})})}return I(o),Uh(o,l=>M(n,l),()=>h(n)),w(t,o),re(s)}ne(ky,{calendarClass:{}},[],["details"],{mode:"open"});function HM(t,e){te(e,!0);const r=new VM,n=r,i=zn(e.$$host),s=C(()=>i.value);_e(()=>{r.details=h(s)}),e.$$host.addEventListener("go-date-select",u=>{h(s)&&(h(s).selectedDate=u.detail.selected,h(s).selectedTimeslot=void 0)});var o={details:n},a=H(),l=L(a);{var c=u=>{ky(u,{get calendarClass(){return r}})};de(l,u=>{h(s)?.isCalendarVisible&&u(c)})}return w(t,a),re(o)}customElements.define("go-calendar",ne(HM,{},[],["details"]));class KM{#e;get ticketSelectionDetails(){return h(this.#e)}set ticketSelectionDetails(e){M(this.#e,e)}constructor(e){e&&(this.#e=C(()=>e.value))}addToCart(){if(!S.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,r=e.flatMap(n=>n.nonEmptyItems.map(i=>{const s=i.product.ticket_type!="annual"?i.time:void 0;return xt(i.product,{quantity:i.quantity,time:s})}));S.cart.addItems(r),e.forEach(n=>n.items.forEach(i=>i.quantity=0)),at.config.urls.cart&&at.config.navigateTo(at.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(r=>r.items.some(n=>n.quantity>0)):!1}}var GM=q('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function YM(t,e){te(e,!0);const r=zn(e.$$host),n=new KM(r);var i={details:n},s=GM();s.__click=()=>n.addToCart();var o=$(s,!0);return I(s),ce((a,l,c)=>{s.disabled=a,Te(s,"data-x",l),se(o,c)},[()=>!n.anyTicketsSelected(),()=>!n.anyTicketsSelected(),()=>S.t("common.actions.cart")]),w(t,s),re(i)}Hr(["click"]),customElements.define("go-add-to-cart-button",ne(YM,{},[],["details"]));function JM(t,e){te(e,!0);let r=_(e,"custom",7,!1);er.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(s){const a=s.target.details,l=await S.withdrawal(a.formData);l.response?.ok?e.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):a.apiErrors=l.error?.errors??[S.t("withdrawal.form.errors.requestFailed")]}ui(e.$$host,"go-form",{"form-id":"withdrawal",custom:r()}),e.$$host.addEventListener("submit",n);var i={get custom(){return r()},set custom(s=!1){r(s),y()}};return re(i)}customElements.define("go-withdrawal-form",ne(JM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function QM(t){const e=t.go;let r=e&&e._queue||[];console.log(r);for(const n of r)try{await Sy[n.method](n.options)}catch(i){console.error(i)}t.go=Sy,e&&(e._queue=null)}const Sy={loaded:!0,config:t=>{at.define(t)},init:async t=>{await S.load("https://"+t.api,t.shop,t.locale)}};(async()=>await QM(window))()})();
65
+ if (${E}_present) {
66
+ if (${E}.value === undefined) {
67
+ newResult[${T}] = undefined;
68
+ } else {
69
+ newResult[${T}] = ${E}.value;
70
+ }
71
+ }
72
+
73
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");const x=f.compile();return(A,E)=>x(h,A,E)};let s;const o=Uo,a=!zo.jitless,c=a&&U_.value,d=t.catchall;let u;e._zod.parse=(h,f)=>{u??(u=n.value);const g=h.value;return o(g)?a&&c&&f?.async===!1&&f.jitless!==!0?(s||(s=i(t.shape)),h=s(h,f),d?th([],g,h,f,u,e):h):r(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function rh(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=>!Oi(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=>Jn(o,n,Kn())))}),t)}var A0=Z("$ZodUnion",(e,t)=>{at.init(e,t),Ve(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ve(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ve(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ve(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=>Jl(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=>rh(a,n,e,i)):rh(o,n,e,i)}}),O0=Z("$ZodIntersection",(e,t)=>{at.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])=>nh(r,a,l)):nh(r,s,o)}});function ru(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(Ds(e)&&Ds(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=ru(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=ru(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 nh(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}),Oi(e))return e;const o=ru(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 C0=Z("$ZodEnum",(e,t)=>{at.init(e,t);const r=Ff(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>V_.has(typeof i)).map(i=>typeof i=="string"?Vo(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}}),D0=Z("$ZodTransform",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mf(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 Ai;return r.value=i,r.fallback=!0,r}});function ih(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var sh=Z("$ZodOptional",(e,t)=>{at.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Jl(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=>ih(o,i)):ih(s,i)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),I0=Z("$ZodExactOptional",(e,t)=>{sh.init(e,t),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),P0=Z("$ZodNullable",(e,t)=>{at.init(e,t),Ve(e._zod,"optin",()=>t.innerType._zod.optin),Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Jl(r.source)}|null)$`):void 0}),Ve(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)}),$0=Z("$ZodDefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",Ve(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=>oh(s,t)):oh(i,t)}});function oh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var M0=Z("$ZodPrefault",(e,t)=>{at.init(e,t),e._zod.optin="optional",Ve(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))}),F0=Z("$ZodNonOptional",(e,t)=>{at.init(e,t),Ve(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=>ah(s,e)):ah(i,e)}});function ah(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 N0=Z("$ZodCatch",(e,t)=>{at.init(e,t),e._zod.optin="optional",Ve(e._zod,"optout",()=>t.innerType._zod.optout),Ve(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=>Jn(o,n,Kn()))},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=>Jn(s,n,Kn()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),R0=Z("$ZodPipe",(e,t)=>{at.init(e,t),Ve(e._zod,"values",()=>t.in._zod.values),Ve(e._zod,"optin",()=>t.in._zod.optin),Ve(e._zod,"optout",()=>t.out._zod.optout),Ve(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=>Ho(o,t.in,n)):Ho(s,t.in,n)}const i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Ho(s,t.out,n)):Ho(i,t.out,n)}});function Ho(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 L0=Z("$ZodReadonly",(e,t)=>{at.init(e,t),Ve(e._zod,"propValues",()=>t.innerType._zod.propValues),Ve(e._zod,"values",()=>t.innerType._zod.values),Ve(e._zod,"optin",()=>t.innerType?._zod?.optin),Ve(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(lh):lh(i)}});function lh(e){return e.value=Object.freeze(e.value),e}var z0=Z("$ZodCustom",(e,t)=>{zt.init(e,t),at.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=>uh(s,r,n,e));uh(i,r,n,e)}});function uh(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(Is(i))}}var ch,U0=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 V0(){return new U0}(ch=globalThis).__zod_globalRegistry??(ch.__zod_globalRegistry=V0());var Ps=globalThis.__zod_globalRegistry;function B0(e,t){return new e({type:"string",...ye(t)})}function q0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ye(t)})}function dh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ye(t)})}function j0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(t)})}function Z0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(t)})}function W0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(t)})}function H0(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(t)})}function G0(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ye(t)})}function K0(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(t)})}function Y0(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(t)})}function J0(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(t)})}function X0(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(t)})}function Q0(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(t)})}function ek(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ye(t)})}function tk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(t)})}function rk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(t)})}function nk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(t)})}function ik(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(t)})}function sk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(t)})}function ok(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ye(t)})}function ak(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(t)})}function lk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ye(t)})}function uk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(t)})}function ck(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(t)})}function dk(e,t){return new e({type:"string",format:"date",check:"string_format",...ye(t)})}function fk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ye(t)})}function hk(e,t){return new e({type:"string",format:"duration",check:"string_format",...ye(t)})}function pk(e,t){return new e({type:"number",checks:[],...ye(t)})}function mk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(t)})}function vk(e){return new e({type:"unknown"})}function gk(e,t){return new e({type:"never",...ye(t)})}function fh(e,t){return new Kf({check:"less_than",...ye(t),value:e,inclusive:!1})}function nu(e,t){return new Kf({check:"less_than",...ye(t),value:e,inclusive:!0})}function hh(e,t){return new Yf({check:"greater_than",...ye(t),value:e,inclusive:!1})}function iu(e,t){return new Yf({check:"greater_than",...ye(t),value:e,inclusive:!0})}function ph(e,t){return new Nw({check:"multiple_of",...ye(t),value:e})}function mh(e,t){return new Lw({check:"max_length",...ye(t),maximum:e})}function Go(e,t){return new zw({check:"min_length",...ye(t),minimum:e})}function vh(e,t){return new Uw({check:"length_equals",...ye(t),length:e})}function yk(e,t){return new Vw({check:"string_format",format:"regex",...ye(t),pattern:e})}function bk(e){return new Bw({check:"string_format",format:"lowercase",...ye(e)})}function _k(e){return new qw({check:"string_format",format:"uppercase",...ye(e)})}function wk(e,t){return new jw({check:"string_format",format:"includes",...ye(t),includes:e})}function kk(e,t){return new Zw({check:"string_format",format:"starts_with",...ye(t),prefix:e})}function Sk(e,t){return new Ww({check:"string_format",format:"ends_with",...ye(t),suffix:e})}function Ci(e){return new Hw({check:"overwrite",tx:e})}function Ek(e){return Ci(t=>t.normalize(e))}function xk(){return Ci(e=>e.trim())}function Tk(){return Ci(e=>e.toLowerCase())}function Ak(){return Ci(e=>e.toUpperCase())}function Ok(){return Ci(e=>z_(e))}function Ck(e,t,r){return new e({type:"array",element:t,...ye(r)})}function Dk(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ye(r)})}function Ik(e,t){const r=Pk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Is(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(Is(s))}},e(n.value,n)),t);return r}function Pk(e,t){const r=new zt({check:"custom",...ye(t)});return r._zod.check=e,r}function gh(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??Ps,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 gt(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,h=t.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(e,t,u,c)}const d=e._zod.parent;d&&(o.ref||(o.ref=d),gt(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"&&Tt(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 yh(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??(f=>f);if(d)return{ref:u(d)};const h=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=h,{defId:h,ref:`${u("__shared")}#/${a}/${h}`}}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
+
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 bh(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 f=e.seen.get(u),g=f.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&&f.def)for(const m in c)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(c[m])===JSON.stringify(f.def[m])&&delete c[m]}const h=a._zod.parent;if(h&&h!==u){n(h);const f=e.seen.get(h);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(const g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.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:Ko(t,"input",e.processors),output:Ko(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Tt(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 Tt(n.element,r);if(n.type==="set")return Tt(n.valueType,r);if(n.type==="lazy")return Tt(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 Tt(n.innerType,r);if(n.type==="intersection")return Tt(n.left,r)||Tt(n.right,r);if(n.type==="record"||n.type==="map")return Tt(n.keyType,r)||Tt(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Tt(n.in,r)||Tt(n.out,r);if(n.type==="object"){for(const i in n.shape)if(Tt(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(const i of n.options)if(Tt(i,r))return!0;return!1}if(n.type==="tuple"){for(const i of n.items)if(Tt(i,r))return!0;return!!(n.rest&&Tt(n.rest,r))}return!1}var $k=(e,t={})=>r=>{const n=gh({...r,processors:t});return gt(e,n),yh(n,e),bh(n,e)},Ko=(e,t,r={})=>n=>{const{libraryOptions:i,target:s}=n??{},o=gh({...i??{},target:s,io:t,processors:r});return gt(e,o),yh(o,e),bh(o,e)},Mk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fk=(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=Mk[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}))])}},Nk=(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),h=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";u?f?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d:typeof s=="number"&&(i.minimum=s),h?f?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o=="number"&&(i.maximum=o),typeof l=="number"&&(i.multipleOf=l)},Rk=(e,t,r,n)=>{r.not={}},Lk=(e,t,r,n)=>{},zk=(e,t,r,n)=>{const i=e._zod.def,s=Ff(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},Uk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vk=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Bk=(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=gt(s.element,t,{...n,path:[...n.path,"items"]})},qk=(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]=gt(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=gt(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},jk=(e,t,r,n)=>{const i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>gt(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",l]}));s?r.oneOf=o:r.anyOf=o},Zk=(e,t,r,n)=>{const i=e._zod.def,s=gt(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=gt(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]]},Wk=(e,t,r,n)=>{const i=e._zod.def,s=gt(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"}]},Hk=(e,t,r,n)=>{const i=e._zod.def;gt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},Gk=(e,t,r,n)=>{const i=e._zod.def;gt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},Kk=(e,t,r,n)=>{const i=e._zod.def;gt(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)))},Yk=(e,t,r,n)=>{const i=e._zod.def;gt(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},Jk=(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;gt(o,t,n);const a=t.seen.get(e);a.ref=o},Xk=(e,t,r,n)=>{const i=e._zod.def;gt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},_h=(e,t,r,n)=>{const i=e._zod.def;gt(i.innerType,t,n);const s=t.seen.get(e);s.ref=i.innerType},Qk=Z("ZodISODateTime",(e,t)=>{a0.init(e,t),Je.init(e,t)});function eS(e){return ck(Qk,e)}var tS=Z("ZodISODate",(e,t)=>{l0.init(e,t),Je.init(e,t)});function rS(e){return dk(tS,e)}var nS=Z("ZodISOTime",(e,t)=>{u0.init(e,t),Je.init(e,t)});function iS(e){return fk(nS,e)}var sS=Z("ZodISODuration",(e,t)=>{c0.init(e,t),Je.init(e,t)});function oS(e){return hk(sS,e)}var aS=(e,t)=>{Bf.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Q_(e,r)},flatten:{value:r=>X_(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Gl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Gl,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=Z("ZodError",aS,{Parent:Error}),lS=Ql(ar),uS=eu(ar),cS=qo(ar),dS=jo(ar),fS=rw(ar),hS=nw(ar),pS=iw(ar),mS=sw(ar),vS=ow(ar),gS=aw(ar),yS=lw(ar),bS=uw(ar),wh=new WeakMap;function $s(e,t,r){const n=Object.getPrototypeOf(e);let i=wh.get(n);if(i||(i=new Set,wh.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 lt=Z("ZodType",(e,t)=>(at.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ko(e,"input"),output:Ko(e,"output")}}),e.toJSONSchema=$k(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>lS(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>cS(e,r,n),e.parseAsync=async(r,n)=>uS(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>dS(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>fS(e,r,n),e.decode=(r,n)=>hS(e,r,n),e.encodeAsync=async(r,n)=>pS(e,r,n),e.decodeAsync=async(r,n)=>mS(e,r,n),e.safeEncode=(r,n)=>vS(e,r,n),e.safeDecode=(r,n)=>gS(e,r,n),e.safeEncodeAsync=async(r,n)=>yS(e,r,n),e.safeDecodeAsync=async(r,n)=>bS(e,r,n),$s(e,"ZodType",{check(...r){const n=this.def;return this.clone(Sn(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 En(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(d1(r,n))},overwrite(r){return this.check(Ci(r))},optional(){return Ch(this)},exactOptional(){return XS(this)},nullable(){return Dh(this)},nullish(){return Ch(Dh(this))},nonoptional(r){return i1(this,r)},array(){return Ah(this)},or(r){return ZS([this,r])},and(r){return HS(this,r)},transform(r){return Ph(this,YS(r))},default(r){return t1(this,r)},prefault(r){return n1(this,r)},catch(r){return o1(this,r)},pipe(r){return Ph(this,r)},readonly(){return u1(this)},describe(r){const n=this.clone();return Ps.add(n,{description:r}),n},meta(...r){if(r.length===0)return Ps.get(this);const n=this.clone();return Ps.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 Ps.get(e)?.description},configurable:!0}),e)),kh=Z("_ZodString",(e,t)=>{tu.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Fk(e,n,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,$s(e,"_ZodString",{regex(...n){return this.check(yk(...n))},includes(...n){return this.check(wk(...n))},startsWith(...n){return this.check(kk(...n))},endsWith(...n){return this.check(Sk(...n))},min(...n){return this.check(Go(...n))},max(...n){return this.check(mh(...n))},length(...n){return this.check(vh(...n))},nonempty(...n){return this.check(Go(1,...n))},lowercase(n){return this.check(bk(n))},uppercase(n){return this.check(_k(n))},trim(){return this.check(xk())},normalize(...n){return this.check(Ek(...n))},toLowerCase(){return this.check(Tk())},toUpperCase(){return this.check(Ak())},slugify(){return this.check(Ok())}})}),_S=Z("ZodString",(e,t)=>{tu.init(e,t),kh.init(e,t),e.email=r=>e.check(q0(wS,r)),e.url=r=>e.check(G0(kS,r)),e.jwt=r=>e.check(uk(RS,r)),e.emoji=r=>e.check(K0(SS,r)),e.guid=r=>e.check(dh(Sh,r)),e.uuid=r=>e.check(j0(Yo,r)),e.uuidv4=r=>e.check(Z0(Yo,r)),e.uuidv6=r=>e.check(W0(Yo,r)),e.uuidv7=r=>e.check(H0(Yo,r)),e.nanoid=r=>e.check(Y0(ES,r)),e.guid=r=>e.check(dh(Sh,r)),e.cuid=r=>e.check(J0(xS,r)),e.cuid2=r=>e.check(X0(TS,r)),e.ulid=r=>e.check(Q0(AS,r)),e.base64=r=>e.check(ok(MS,r)),e.base64url=r=>e.check(ak(FS,r)),e.xid=r=>e.check(ek(OS,r)),e.ksuid=r=>e.check(tk(CS,r)),e.ipv4=r=>e.check(rk(DS,r)),e.ipv6=r=>e.check(nk(IS,r)),e.cidrv4=r=>e.check(ik(PS,r)),e.cidrv6=r=>e.check(sk($S,r)),e.e164=r=>e.check(lk(NS,r)),e.datetime=r=>e.check(eS(r)),e.date=r=>e.check(rS(r)),e.time=r=>e.check(iS(r)),e.duration=r=>e.check(oS(r))});function lr(e){return B0(_S,e)}var Je=Z("ZodStringFormat",(e,t)=>{Ke.init(e,t),kh.init(e,t)}),wS=Z("ZodEmail",(e,t)=>{Xw.init(e,t),Je.init(e,t)}),Sh=Z("ZodGUID",(e,t)=>{Yw.init(e,t),Je.init(e,t)}),Yo=Z("ZodUUID",(e,t)=>{Jw.init(e,t),Je.init(e,t)}),kS=Z("ZodURL",(e,t)=>{Qw.init(e,t),Je.init(e,t)}),SS=Z("ZodEmoji",(e,t)=>{e0.init(e,t),Je.init(e,t)}),ES=Z("ZodNanoID",(e,t)=>{t0.init(e,t),Je.init(e,t)}),xS=Z("ZodCUID",(e,t)=>{r0.init(e,t),Je.init(e,t)}),TS=Z("ZodCUID2",(e,t)=>{n0.init(e,t),Je.init(e,t)}),AS=Z("ZodULID",(e,t)=>{i0.init(e,t),Je.init(e,t)}),OS=Z("ZodXID",(e,t)=>{s0.init(e,t),Je.init(e,t)}),CS=Z("ZodKSUID",(e,t)=>{o0.init(e,t),Je.init(e,t)}),DS=Z("ZodIPv4",(e,t)=>{d0.init(e,t),Je.init(e,t)}),IS=Z("ZodIPv6",(e,t)=>{f0.init(e,t),Je.init(e,t)}),PS=Z("ZodCIDRv4",(e,t)=>{h0.init(e,t),Je.init(e,t)}),$S=Z("ZodCIDRv6",(e,t)=>{p0.init(e,t),Je.init(e,t)}),MS=Z("ZodBase64",(e,t)=>{m0.init(e,t),Je.init(e,t)}),FS=Z("ZodBase64URL",(e,t)=>{g0.init(e,t),Je.init(e,t)}),NS=Z("ZodE164",(e,t)=>{y0.init(e,t),Je.init(e,t)}),RS=Z("ZodJWT",(e,t)=>{_0.init(e,t),Je.init(e,t)}),Eh=Z("ZodNumber",(e,t)=>{Xf.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Nk(e,n,i,s),$s(e,"ZodNumber",{gt(n,i){return this.check(hh(n,i))},gte(n,i){return this.check(iu(n,i))},min(n,i){return this.check(iu(n,i))},lt(n,i){return this.check(fh(n,i))},lte(n,i){return this.check(nu(n,i))},max(n,i){return this.check(nu(n,i))},int(n){return this.check(xh(n))},safe(n){return this.check(xh(n))},positive(n){return this.check(hh(0,n))},nonnegative(n){return this.check(iu(0,n))},negative(n){return this.check(fh(0,n))},nonpositive(n){return this.check(nu(0,n))},multipleOf(n,i){return this.check(ph(n,i))},step(n,i){return this.check(ph(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 Ms(e){return pk(Eh,e)}var LS=Z("ZodNumberFormat",(e,t)=>{w0.init(e,t),Eh.init(e,t)});function xh(e){return mk(LS,e)}var zS=Z("ZodUnknown",(e,t)=>{k0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lk(e,r,n,i)});function Th(){return vk(zS)}var US=Z("ZodNever",(e,t)=>{S0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Rk(e,r,n,i)});function VS(e){return gk(US,e)}var BS=Z("ZodArray",(e,t)=>{E0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Bk(e,r,n,i),e.element=t.element,$s(e,"ZodArray",{min(r,n){return this.check(Go(r,n))},nonempty(r){return this.check(Go(1,r))},max(r,n){return this.check(mh(r,n))},length(r,n){return this.check(vh(r,n))},unwrap(){return this.element}})});function Ah(e,t){return Ck(BS,e,t)}var qS=Z("ZodObject",(e,t)=>{T0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qk(e,r,n,i),Ve(e,"shape",()=>t.shape),$s(e,"ZodObject",{keyof(){return GS(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Th()})},loose(){return this.clone({...this._zod.def,catchall:Th()})},strict(){return this.clone({...this._zod.def,catchall:VS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return W_(this,r)},safeExtend(r){return H_(this,r)},merge(r){return G_(this,r)},pick(r){return j_(this,r)},omit(r){return Z_(this,r)},partial(...r){return K_(Oh,this,r[0])},required(...r){return Y_(Ih,this,r[0])}})});function su(e,t){return new qS({type:"object",shape:e??{},...ye(t)})}var jS=Z("ZodUnion",(e,t)=>{A0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jk(e,r,n,i),e.options=t.options});function ZS(e,t){return new jS({type:"union",options:e,...ye(t)})}var WS=Z("ZodIntersection",(e,t)=>{O0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Zk(e,r,n,i)});function HS(e,t){return new WS({type:"intersection",left:e,right:t})}var ou=Z("ZodEnum",(e,t)=>{C0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(n,i,s)=>zk(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 ou({...t,checks:[],...ye(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 ou({...t,checks:[],...ye(i),entries:s})}});function GS(e,t){return new ou({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...ye(t)})}var KS=Z("ZodTransform",(e,t)=>{D0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Vk(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mf(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Is(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(Is(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 YS(e){return new KS({type:"transform",transform:e})}var Oh=Z("ZodOptional",(e,t)=>{sh.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Ch(e){return new Oh({type:"optional",innerType:e})}var JS=Z("ZodExactOptional",(e,t)=>{I0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_h(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function XS(e){return new JS({type:"optional",innerType:e})}var QS=Z("ZodNullable",(e,t)=>{P0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Wk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function Dh(e){return new QS({type:"nullable",innerType:e})}var e1=Z("ZodDefault",(e,t)=>{$0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Gk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function t1(e,t){return new e1({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zf(t)}})}var r1=Z("ZodPrefault",(e,t)=>{M0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Kk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function n1(e,t){return new r1({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zf(t)}})}var Ih=Z("ZodNonOptional",(e,t)=>{F0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function i1(e,t){return new Ih({type:"nonoptional",innerType:e,...ye(t)})}var s1=Z("ZodCatch",(e,t)=>{N0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Yk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function o1(e,t){return new s1({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var a1=Z("ZodPipe",(e,t)=>{R0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Jk(e,r,n,i),e.in=t.in,e.out=t.out});function Ph(e,t){return new a1({type:"pipe",in:e,out:t})}var l1=Z("ZodReadonly",(e,t)=>{L0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Xk(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});function u1(e){return new l1({type:"readonly",innerType:e})}var $h=Z("ZodCustom",(e,t)=>{z0.init(e,t),lt.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Uk(e,r,n,i)});function c1(e,t={}){return Dk($h,e,t)}function d1(e,t){return Ik(e,t)}function f1(e,t={}){const r=new $h({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...ye(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 h1=su({id:Ms(),customer:su({customer_salutation_id:Ms().positive({message:"user.fieldErrors.titleRequire"}),name:lr().min(1,{message:"user.fieldErrors.nameRequire"}),surname:lr().min(1,{message:"user.fieldErrors.surnameRequire"}),email:lr().email({message:"user.fieldErrors.emailValid"}).min(1,{message:"user.fieldErrors.emailRequire"}),email_confirmation:lr().email({message:"user.fieldErrors.emailValidRequire"}).optional(),addr_street:lr().min(1,{message:"user.fieldErrors.streetRequire"}),addr_zip:lr().min(1,{message:"user.fieldErrors.postRequire"}),addr_city:lr().min(1,{message:"user.fieldErrors.cityRequire"}),addr_country_id:Ms().positive().default(60),language_id:Ms().positive({message:"user.fieldErrors.languageRequire"}).default(1)})}),U2=su({ticket_sale_id:Ms(),start_at:lr().date(),personalizations:Ah(h1)});function au(e,t){return e-t*Math.floor(e/t)}var Mh=1721426;function Jo(e,t,r,n){t=lu(e,t);let i=t-1,s=-2;return r<=2?s=0:Xo(t)&&(s=-1),Mh-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*r-362)/12+s+n)}function Xo(e){return e%4===0&&(e%100!==0||e%400===0)}function lu(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 m1={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]},Di=class{fromJulianDay(e){let t=e,r=t-Mh,n=Math.floor(r/146097),i=au(r,146097),s=Math.floor(i/36524),o=au(i,36524),a=Math.floor(o/1461),l=au(o,1461),c=Math.floor(l/365),[d,u]=p1(n*400+s*100+a*4+c+(s!==4&&c!==4?1:0)),h=t-Jo(d,u,1,1),f=2;t<Jo(d,u,3,1)?f=0:Xo(u)&&(f=1);let g=Math.floor(((h+f)*12+373)/367);return new Ls(d,u,g,t-Jo(d,u,g,1)+1)}toJulianDay(e){return Jo(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return m1[Xo(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Xo(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"}},v1={"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 xn(e,t){return t=Kt(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function uu(e,t){return t=Kt(t,e.calendar),e=du(e),t=du(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function g1(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function y1(e,t){return xn(e,Xn(t))}var b1={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Fh(e,t,r){let n=e.calendar.toJulianDay(e),i=r?b1[r]:E1(t),s=Math.ceil(n+1-i)%7;return s<0&&(s+=7),s}function _1(e){return Vr(Date.now(),e)}function Xn(e){return A1(_1(e))}function Nh(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Rh(e,t){return Lh(e)-Lh(t)}function Lh(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var cu=null,w1=!1;function Ut(){return cu==null&&(cu=new Intl.DateTimeFormat().resolvedOptions().timeZone),cu}function zh(){return w1}function du(e){return e.subtract({days:e.day-1})}function k1(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var Uh=new Map,fu=new Map;function S1(e){if(Intl.Locale){let r=Uh.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&Uh.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function E1(e){let t=fu.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return fu.set(e,t),t.firstDay}let r=S1(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&&v1[r]||0};fu.set(e,t)}return t.firstDay}function Tn(e){return e=Kt(e,new Di),Vh(lu(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Vh(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 Fs(e,t){if(t==="UTC")return 0;if(e>0&&t===Ut()&&!zh())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:i,hour:s,minute:o,second:a}=qh(e,t);return Vh(r,n,i,s,o,a,0)-Math.floor(e/1e3)*1e3}var Bh=new Map;function qh(e,t){let r=Bh.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"}),Bh.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 Qo=864e5;function x1(e,t){let r=Tn(e);return jh(e,t,r-Fs(r-Qo,t),r-Fs(r+Qo,t))}function jh(e,t,r,n){return(r===n?[r]:[r,n]).filter(i=>T1(e,t,i))}function T1(e,t,r){let n=qh(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=An(e);if(t==="UTC")return Tn(n);if(t===Ut()&&r==="compatible"&&!zh()){n=Kt(n,new Di);let l=new Date,c=lu(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=Tn(n),s=Fs(i-Qo,t),o=Fs(i+Qo,t),a=jh(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 Zh(e,t,r="compatible"){return new Date(Ur(e,t,r))}function Vr(e,t){let r=Fs(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 On(i<1?"BC":"AD",i<1?-i+1:i,s,o,t,r,a,l,c,d)}function A1(e){return new Ls(e.calendar,e.era,e.year,e.month,e.day)}function An(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 Ii(e.calendar,e.era,e.year,e.month,e.day,r,n,i,s)}function O1(e){return new q1(e.hour,e.minute,e.second,e.millisecond)}function Kt(e,t){if(g1(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,Qn(n),n}function C1(e,t,r){return e instanceof On?e.timeZone===t?e:Wh(e,t):Vr(Ur(e,t,r),t)}function D1(e){let t=Tn(e)-e.offset;return new Date(t)}function Wh(e,t){return Kt(Vr(Tn(e)-e.offset,t),e.calendar)}var Ns=36e5;function ea(e,t){let r=e.copy(),n="hour"in r?Yh(r,t):0;hu(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,pu(r),Hh(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,I1(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 hu(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function pu(e){for(;e.month<1;)hu(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,hu(e,1)}function I1(e){for(;e.day<1;)e.month--,pu(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,pu(e)}function Hh(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 Qn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Hh(e)}function mu(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function Gh(e,t){return ea(e,mu(t))}function vu(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),Qn(r),r}function Rs(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),Kh(r),r}function P1(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ta(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ta(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ta(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ta(e.hour,24),t}function Kh(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 ta(e,t){let r=e%t;return r<0&&(r+=t),r}function Yh(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,P1(e)}function Jh(e,t){let r=e.copy();return Yh(r,t),r}function $1(e,t){return Jh(e,mu(t))}function gu(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=nn(o,r,0,s.length-1,n?.round),i.era=s[o],Qn(i);break}case"year":i.calendar.isInverseEra?.(i)&&(r=-r),i.year=nn(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=nn(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":i.day=nn(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),Qn(i),i}function yu(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=nn(s,r,o,a,n?.round);break}case"minute":i.minute=nn(e.minute,r,0,59,n?.round);break;case"second":i.second=nn(e.second,r,0,59,n?.round);break;case"millisecond":i.millisecond=nn(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return i}function nn(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 Xh(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(ea(An(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):r=Tn(e)-e.offset,r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5,Kt(Vr(r,e.timeZone),e.calendar)}function M1(e,t){return Xh(e,mu(t))}function F1(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=An(e),a=Kt(Rs(o,{hour:i}),new Di),l=[Ur(a,e.timeZone,"earlier"),Ur(a,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===a.day)[0],c=Kt(Rs(o,{hour:s}),new Di),d=[Ur(c,e.timeZone,"earlier"),Ur(c,e.timeZone,"later")].filter(g=>Vr(g,e.timeZone).day===c.day).pop(),u=Tn(e)-e.offset,h=Math.floor(u/Ns),f=u%Ns;return u=nn(h,r,Math.floor(l/Ns),Math.floor(d/Ns),n?.round)*Ns+f,Kt(Vr(u,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return yu(e,t,r,n);case"era":case"year":case"month":case"day":return Kt(Vr(Ur(gu(An(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw new Error("Unsupported field "+t)}}function N1(e,t,r){let n=An(e),i=Rs(vu(n,t),t);return i.compare(n)===0?e:Kt(Vr(Ur(i,e.timeZone,r),e.timeZone),e.calendar)}var R1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,L1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,z1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,bu=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/,U1=["hours","minutes","seconds"],V2=["years","months","weeks","days",...U1];function ra(e){let t=e.match(R1);if(!t)throw bu.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new Ls(Re(t[1],0,9999),Re(t[2],1,12),1);return r.day=Re(t[3],1,r.calendar.getDaysInMonth(r)),r}function Qh(e){let t=e.match(L1);if(!t)throw bu.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=Re(t[1],-9999,9999),n=new Ii(r<1?"BC":"AD",r<1?-r+1:r,Re(t[2],1,12),1,t[4]?Re(t[4],0,23):0,t[5]?Re(t[5],0,59):0,t[6]?Re(t[6],0,59):0,t[7]?Re(t[7],0,1/0)*1e3:0);return n.day=Re(t[3],0,n.calendar.getDaysInMonth(n)),n}function ep(e,t){let r=e.match(z1);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new On(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,r[11],0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);i.day=Re(r[3],0,i.calendar.getDaysInMonth(i));let s=An(i),o;if(r[8]){let a=Re(r[8],-23,23);if(i.offset=Math.sign(a)*(Math.abs(a)*36e5+Re(r[9]??"0",0,59)*6e4+Re(r[10]??"0",0,59)*1e3),o=Tn(i)-i.offset,!x1(s,i.timeZone).includes(o))throw new Error(`Offset ${np(i.offset)} is invalid for ${_u(i)} in ${i.timeZone}`)}else o=Ur(An(s),i.timeZone,t);return Vr(o,i.timeZone)}function V1(e,t){let r=e.match(bu);if(!r)throw new Error("Invalid ISO 8601 date time string: "+e);let n=Re(r[1],-9999,9999),i=new On(n<1?"BC":"AD",n<1?-n+1:n,Re(r[2],1,12),1,t,0,r[4]?Re(r[4],0,23):0,r[5]?Re(r[5],0,59):0,r[6]?Re(r[6],0,59):0,r[7]?Re(r[7],0,1/0)*1e3:0);return i.day=Re(r[3],0,i.calendar.getDaysInMonth(i)),r[8]&&(i.offset=Re(r[8],-23,23)*36e5+Re(r[9]??"0",0,59)*6e4),Wh(i,t)}function Re(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 tp(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 rp(e){let t=Kt(e,new Di),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 _u(e){return`${rp(e)}T${tp(e)}`}function np(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 B1(e){return`${_u(e)}${np(e.offset)}[${e.timeZone}]`}function wu(e){let t=typeof e[0]=="object"?e.shift():new Di,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 Ls=class Qc{#e;constructor(...t){let[r,n,i,s,o]=wu(t);this.calendar=r,this.era=n,this.year=i,this.month=s,this.day=o,Qn(this)}copy(){return this.era?new Qc(this.calendar,this.era,this.year,this.month,this.day):new Qc(this.calendar,this.year,this.month,this.day)}add(t){return ea(this,t)}subtract(t){return Gh(this,t)}set(t){return vu(this,t)}cycle(t,r,n){return gu(this,t,r,n)}toDate(t){return Zh(this,t)}toString(){return rp(this)}compare(t){return Nh(this,t)}},q1=class Bg{#e;constructor(t=0,r=0,n=0,i=0){this.hour=t,this.minute=r,this.second=n,this.millisecond=i,Kh(this)}copy(){return new Bg(this.hour,this.minute,this.second,this.millisecond)}add(t){return Jh(this,t)}subtract(t){return $1(this,t)}set(t){return Rs(this,t)}cycle(t,r,n){return yu(this,t,r,n)}toString(){return tp(this)}compare(t){return Rh(this,t)}},Ii=class ed{#e;constructor(...t){let[r,n,i,s,o]=wu(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,Qn(this)}copy(){return this.era?new ed(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ed(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return ea(this,t)}subtract(t){return Gh(this,t)}set(t){return vu(Rs(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return gu(this,t,r,n);default:return yu(this,t,r,n)}}toDate(t,r){return Zh(this,t,r)}toString(){return _u(this)}compare(t){let r=Nh(this,t);return r===0?Rh(this,An(t)):r}},On=class td{#e;constructor(...t){let[r,n,i,s,o]=wu(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,Qn(this)}copy(){return this.era?new td(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new td(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Xh(this,t)}subtract(t){return M1(this,t)}set(t,r){return N1(this,t,r)}cycle(t,r,n){return F1(this,t,r,n)}toDate(){return D1(this)}toString(){return B1(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-C1(t,this.timeZone).toDate().getTime()}},ku=new Map,Br=class{constructor(e,t={}){this.formatter=ip(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 W1()&&(this.resolvedHourCycle||(this.resolvedHourCycle=H1(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}},j1={true:{ja:"h11"},false:{}};function ip(e,t={}){if(typeof t.hour12=="boolean"&&Z1()){t={...t};let i=j1[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(ku.has(r))return ku.get(r);let n=new Intl.DateTimeFormat(e,t);return ku.set(r,n),n}var Su=null;function Z1(){return Su==null&&(Su=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Su}var Eu=null;function W1(){return Eu==null&&(Eu=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Eu}function H1(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=ip(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 zs(e){return O1(V1(e,"Europe/Berlin")).toString().slice(0,-3)}function Us(e,t={weekday:"long",year:"numeric",month:"long",day:"numeric"},r="de"){return t={...t},new Date(e).toLocaleDateString(r,t)}function na(e){if(e===void 0)throw Error("priceCents is required");return new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}var G1=1;function sp(e){return e.type==="Ticket"}function ia(e,t){return{...e,uid:G1++,selectedTime:t?.selectedTime??"",type:"Ticket",subtype:{time_slot:"timeslot",normal:"day",annual:"annual"}[e.ticket_type],shop_order:e.shop_order??0}}function Cn(e,t=""){return $_(Object.values(e).map(r=>ia(r,{selectedTime:t})),r=>r.shop_order)}function Dn(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 K1=function(e,t,r,n){if(e.capacityPolicy(r)!=="quotas")throw new Error("(getMaxQuantityQuotas) impossible");if(!sp(r.product))throw new Error("(getMaxQuantityQuotas) impossible");const i=r.product,s=e.quotaManager;s.clearPrecart();for(const l of[...n.items,...t.items]){const c=l.product;sp(c)&&s.setPrecartItemQuantity(c.id,l.quantity)}const o=s.ticketCapacity(i.id,i.selectedTime),a=s.totalCapacity(i.id,i.selectedTime);return{max:Math.min(i.max_persons||100,o),min:i.min_persons||0,bookedOut:o===0,unavailable:a===0}};function Vs(e){return e.type==="Event"}function Y1(e){return Vs(e)&&e.subtype==="scale"}var J1=1;function X1(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{uid:J1++,dateId:t,minAvailableCapacity:0,selectedTime:"",...r,...n,...e,type:"Event",subtype:e.scale_price_id===void 0?"flat":"scale"}}function xu(e,t,r){return X1(e,t,r)}var Q1=function(e,t,r,n){if(e.capacityPolicy(r)!=="seats")throw new Error("(getMaxQuantitySeats) impossible");if(!Vs(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=Gn(t.items.filter(h=>n.items.some(f=>f.uuid===h.uuid)),h=>h.quantity),u=Math.max(l-d-c+r.quantity,0);return{max:u,min:a.min??0,unavailable:a.available===0,bookedOut:u===0}},eE=function(e,t,r,n){if(e.capacityPolicy(r)!=="unlimited")throw new Error("(getMaxQuantityUnlimited) impossible");return{max:r.product.max_persons??100,min:r.product.min_persons??0,unavailable:!1,bookedOut:!1}};function tE(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=[]},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=Gn(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){return(Hl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.capacity))??0)+this.getPrecartItemQuantity(t)},totalCapacity(t,r){return Hl(this.filterBy({timeslot:r,ticketId:t}).map(n=>n.totalCapacity))??0},timeslotsOn(t){const r=P_(this.timeslots().filter(n=>n.timeSlot.startsWith(t.toString())),n=>n.timeSlot);return Object.values(r).map(n=>M_(F_(n.flatMap(i=>i.tickets)).map(i=>Hl(n.filter(s=>s.tickets.includes(i)),s=>s.capacity)).filter(i=>i!==null),i=>i.capacity)??n[0]).sort((n,i)=>n.timeSlot.localeCompare(i.timeSlot))}}}function rE(e){let t=0;_s(()=>{me(()=>{if(e.items.length===t)return;const r=e.items.length>t?"go-cart-item-added":"go-cart-item-removed";t=e.items.length,document.dispatchEvent(new CustomEvent(r,{detail:e.items.length}))})})}function yt(e,t){return{quantity:0,time:"",...t??{},type:e.type,product:e,orderAttributes(){const r={shipped_with_merchandise_id:null,shipping_mode:"email",id:this.product.id};switch(e.type){case"Ticket":return{...r,time:this.time,quantity:this.quantity};case"Event":switch(e.subtype){case"flat":return{...r,quantity:this.quantity};case"scale":return{...r,quantities:{[e.scale_price_id]:this.quantity}};default:throw new Error(`(orderAttributes) Unhandled Event subtype: ${e}`)}default:throw new Error(`(orderAttributes) Unhandled product type: ${e}`)}},get uuid(){return this.type+"-"+this.product.id+this.subUId},get subUId(){const r=[];return this.time&&r.push(`time: ${this.time}`),Y1(this.product)&&r.push(`scale_price: ${this.product.scale_price_id}`),this.display?.discounted&&r.push("discounted"),r.length>0?` (${r.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 ur(this.price_cents)},get final_price_cents(){const r=this.product.tax_included?1:1+this.product.vat_pct/100;return this.price_cents*r},get final_price_formatted(){return ur(this.final_price_cents)},get total_price_cents(){return this.quantity*this.final_price_cents},get total_price_formatted(){return ur(this.total_price_cents)}}}var B2=15*6e4;function sa(){return typeof window<"u"&&typeof localStorage<"u"}function nE(e,t){if(sa())try{localStorage.setItem(e,JSON.stringify(t))}catch(r){console.warn(`Failed to save to localStorage (${e}):`,r)}}function Tu(e){if(!sa())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 op(e){if(sa())try{localStorage.removeItem(e)}catch(t){console.warn(`Failed to remove from localStorage (${e}):`,t)}}var ap="go-cart",oa=(e,t)=>localStorage.setItem(ap,JSON.stringify({items:e,coupons:t,savedAt:Date.now()}));function iE(e){const t=e.product.type;switch(t){case"Ticket":return lp(e)?yt(ia(e.product,{selectedTime:e.product.selectedTime}),{time:e.time,quantity:e.quantity}):void 0;case"Event":return lp(e)?yt(xu(e.product,e.id),{time:e.time,quantity:e.quantity}):void 0;default:throw new Error(`Unhandled case: ${t}`)}}function sE(e){let t=[],r=[],n;try{const i=localStorage.getItem(ap);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(),oa([],[]),[]):(t.length===0?e.clearItems():e.items=t.map(iE).filter(uE),e.clearCoupons(),r.forEach(o=>e.addCoupon(o)),e.items)}catch(i){return console.error(i),oa([],[]),[]}}function oE(e){sE(e);let t=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});oa(e.items||[],e.coupons||[]),_s(()=>{me(()=>{const r=JSON.stringify({items:e.items||[],coupons:e.coupons||[]});r!==t&&(t=r,oa(e.items||[],e.coupons||[]))})})}var aE=e=>new Date<new Date(e),lE=e=>ra(e.slice(0,10)).compare(Xn(Ut()))>=0,lp=e=>e.time?e.product.subtype==="day"?lE(e.time):aE(e.time):!0,uE=e=>e!==void 0,cE=0;function Pi(e,t=20){const r={items:$e([]),coupons:$e([]),paymentModeId:void 0,uid:`cart-${cE++}`,get nonEmptyItems(){return this.items.filter(n=>n.quantity>0)},get totalPriceCents(){return Math.max(0,Gn(this.items,n=>n.total_price_cents))},get totalQuantity(){return Gn(this.items,n=>n.quantity)},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,donations:[],affiliate:{},total:this.totalPriceCents}},get totalFormatted(){return ur(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){this.coupons.includes(n)||this.coupons.push(n)},removeCoupon(n){const i=this.coupons.indexOf(n);i>-1&&this.coupons.splice(i,1)},clearCoupons(){for(;this.coupons.length>0;)this.coupons.pop()}};return e&&e.forEach(n=>r.addItem(yt(n))),r}function ur(e){return e=e??0,new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e/100)}function dE(){const e=$e(Pi());return oE(e),rE(e),e}var $i="go-capacity";function up(e,t){const r=Tu($i);nE($i,{allSeats:{...r?.allSeats||{},...e},allQuotas:{...r?.allQuotas||{},...t},savedAt:Date.now()})}function cp(e){const t=Tu($i);if(t){if(!t.savedAt||Date.now()-t.savedAt>9e5){op($i);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 fE(e){sa()&&window.addEventListener("storage",t=>{if(t.key===$i&&cp(e),t.key==="go-cart"){const r=Tu("go-cart");(!r||!r.items||r.items.length===0)&&op($i)}})}function dp(){const e={allSeats:{},allQuotas:{},quotaManager:tE({}),addQuotas(t,r=!0){this.allQuotas={...this.allQuotas,...t},this.quotaManager.addQuotas(t),r&&up(this.allSeats,this.allQuotas)},addSeats(t,r,n=!0){this.allSeats[t]=r,n&&up(this.allSeats,this.allQuotas)},capacityPolicy(t){const r=t.product.type;switch(r){case"Ticket":const n=t.product.subtype;switch(n){case"timeslot":case"event:ticket":case"day":return"quotas";case"annual":return"unlimited";default:throw new Error(`(getMaxAvailability) Unhandled case: ${n}`)}case"Event":const i=t.product.subtype;switch(i){case"flat":case"scale":return"seats";default:throw new Error(`(getMaxAvailability) Unhandled case: ${i}`)}default:throw new Error(`(getMaxAvailability) Unhandled case: ${r}`)}},capacity(t,r,n){const i=this.capacityPolicy(r),s={quotas:K1,seats:Q1,unlimited:eE}[i];if(!s)throw new Error(`(maxQuantity) impossible: ${i}`);return qe(()=>s(this,t,r,n))}};return cp(e),fE(e),e}function fp(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 hp=class{get isAuthenticated(){return this.isLoggedIn||this.isGuest}},hE=class extends hp{constructor(){super()}get isLoggedIn(){try{const e=fp("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=fp("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}}},pE=class extends hp{get isGuest(){throw new Error("Not implemented.")}get isLoggedIn(){throw new Error("Not implemented")}},mE=e=>{switch(e){case"angular":return new hE;case"jmb":return new pE;default:throw new Error("Unhandled shop type: "+e)}};function vE(e){return e==null||typeof e=="string"&&e.trim()===""}function gE(e,t){const r={};if(!t||t.length===0)return r;for(const n of t)(!(n in e)||vE(e[n]))&&(r[n]=[`Field '${n}' is required and cannot be empty`]);return r}function yE(e,t){return gE(e,t)}var bE={withStackTrace:!1},pp=(e,t,r=bE)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:r.withStackTrace?new Error().stack:void 0});function ei(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 mp(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 qr(e){return this instanceof qr?(this.v=e,this):new qr(e)}function vp(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(f){return function(g){return Promise.resolve(g).then(f,u)}}function a(f,g){n[f]&&(i[f]=function(m){return new Promise(function(v,_){s.push([f,m,v,_])>1||l(f,m)})},g&&(i[f]=g(i[f])))}function l(f,g){try{c(n[f](g))}catch(m){h(s[0][3],m)}}function c(f){f.value instanceof qr?Promise.resolve(f.value.v).then(d,u):h(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function h(f,g){f(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function _E(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:qr(e[i](o)),done:!1}:s?s(o):o}:s}}function wE(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 mp=="function"?mp(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 ti=class vr{constructor(t){this._promise=t}static fromSafePromise(t){return new vr(t.then(r=>new Zr(r)))}static fromPromise(t,r){return new vr(t.then(n=>new Zr(n)).catch(n=>new _r(r(n))))}static fromThrowable(t,r){return(...n)=>new vr(ei(this,void 0,void 0,function*(){try{return new Zr(yield t(...n))}catch(i){return new _r(r?r(i):i)}}))}static combine(t){return kE(t)}static combineWithAllErrors(t){return SE(t)}map(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){return r.isErr()?new _r(r.error):new Zr(yield t(r.value))})))}andThrough(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isErr())return new _r(r.error);const n=yield t(r.value);return n.isErr()?new _r(n.error):new Zr(r.value)})))}andTee(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isErr())return new _r(r.error);try{yield t(r.value)}catch{}return new Zr(r.value)})))}orTee(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){if(r.isOk())return new Zr(r.value);try{yield t(r.error)}catch{}return new _r(r.error)})))}mapErr(t){return new vr(this._promise.then(r=>ei(this,void 0,void 0,function*(){return r.isOk()?new Zr(r.value):new _r(yield t(r.error))})))}andThen(t){return new vr(this._promise.then(r=>{if(r.isErr())return new _r(r.error);const n=t(r.value);return n instanceof vr?n._promise:n}))}orElse(t){return new vr(this._promise.then(r=>ei(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 vp(this,arguments,function*(){return yield qr(yield qr(yield*_E(wE(yield qr(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return vp(this,arguments,function*(){const r=yield qr(this._promise);return r.isErr()&&(yield yield qr(aa(r.error))),yield qr(r.value)})}};function aa(e){return new ti(Promise.resolve(new _r(e)))}var q2=ti.fromPromise,j2=ti.fromSafePromise,Z2=ti.fromThrowable,gp=e=>{let t=In([]);for(const r of e)if(r.isErr()){t=jr(r.error);break}else t.map(n=>n.push(r.value));return t},kE=e=>ti.fromSafePromise(Promise.all(e)).andThen(gp),yp=e=>{let t=In([]);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},SE=e=>ti.fromSafePromise(Promise.all(e)).andThen(yp),Au;(function(e){function t(i,s){return(...o)=>{try{return In(i(...o))}catch(a){return jr(s?s(a):a)}}}e.fromThrowable=t;function r(i){return gp(i)}e.combine=r;function n(i){return yp(i)}e.combineWithAllErrors=n})(Au||(Au={}));function In(e){return new Zr(e)}function jr(e){return new _r(e)}var Zr=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return In(e(this.value))}mapErr(e){return In(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 In(this.value)}orTee(e){return In(this.value)}orElse(e){return In(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return ti.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 pp("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},_r=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 aa(this.error)}asyncAndThrough(e){return aa(this.error)}asyncMap(e){return aa(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 pp("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){const e=this;return yield e,e}},W2=Au.fromThrowable,EE=/\{[^{}]+\}/g,xE=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function TE(){return Math.random().toString(36).slice(2,11)}function AE(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=xE()?l:void 0,t=Sp(t);const d=[];async function u(h,f){const{baseUrl:g,fetch:m=n,Request:v=r,headers:_,params:x={},parseAs:A="json",querySerializer:E,bodySerializer:T=s??CE,pathSerializer:O,body:$,middleware:L=[],...H}=f||{};let N=t;g&&(N=Sp(g)??t);let se=typeof i=="function"?i:wp(i);E&&(se=typeof E=="function"?E:wp({...typeof i=="object"?i:{},...E}));const V=O||o||OE,oe=$===void 0?void 0:T($,kp(a,_,x.header)),pe=kp(oe===void 0||oe instanceof FormData?{}:{"Content-Type":"application/json"},a,_,x.header),Y=[...d,...L],ie={redirect:"follow",...c,...H,body:oe,headers:pe};let B,j,G=new v(DE(h,{baseUrl:N,params:x,querySerializer:se,pathSerializer:V}),ie),J;for(const F in H)F in G||(G[F]=H[F]);if(Y.length){B=TE(),j=Object.freeze({baseUrl:N,fetch:m,parseAs:A,querySerializer:se,bodySerializer:T,pathSerializer:V});for(const F of Y)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const ue=await F.onRequest({request:G,schemaPath:h,params:x,options:j,id:B});if(ue)if(ue instanceof v)G=ue;else if(ue instanceof Response){J=ue;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!J){try{J=await m(G,l)}catch(F){let ue=F;if(Y.length)for(let U=Y.length-1;U>=0;U--){const ge=Y[U];if(ge&&typeof ge=="object"&&typeof ge.onError=="function"){const de=await ge.onError({request:G,error:ue,schemaPath:h,params:x,options:j,id:B});if(de){if(de instanceof Response){ue=void 0,J=de;break}if(de instanceof Error){ue=de;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ue)throw ue}if(Y.length)for(let F=Y.length-1;F>=0;F--){const ue=Y[F];if(ue&&typeof ue=="object"&&typeof ue.onResponse=="function"){const U=await ue.onResponse({request:G,response:J,schemaPath:h,params:x,options:j,id:B});if(U){if(!(U instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");J=U}}}}const le=J.headers.get("Content-Length");if(J.status===204||G.method==="HEAD"||le==="0"&&!J.headers.get("Transfer-Encoding")?.includes("chunked"))return J.ok?{data:void 0,response:J}:{error:void 0,response:J};if(J.ok)return{data:await(async()=>{if(A==="stream")return J.body;if(A==="json"&&!le){const ue=await J.text();return ue?JSON.parse(ue):void 0}return await J[A]()})(),response:J};let he=await J.text();try{he=JSON.parse(he)}catch{}return{error:he,response:J}}return{request(h,f,g){return u(f,{...g,method:h.toUpperCase()})},GET(h,f){return u(h,{...f,method:"GET"})},PUT(h,f){return u(h,{...f,method:"PUT"})},POST(h,f){return u(h,{...f,method:"POST"})},DELETE(h,f){return u(h,{...f,method:"DELETE"})},OPTIONS(h,f){return u(h,{...f,method:"OPTIONS"})},HEAD(h,f){return u(h,{...f,method:"HEAD"})},PATCH(h,f){return u(h,{...f,method:"PATCH"})},TRACE(h,f){return u(h,{...f,method:"TRACE"})},use(...h){for(const f of h)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");d.push(f)}},eject(...h){for(const f of h){const g=d.indexOf(f);g!==-1&&d.splice(g,1)}}}}function la(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 bp(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(la(a,t[o],r))}const s=n.join(i);return r.style==="label"||r.style==="matrix"?`${i}${s}`:s}function _p(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(la(e,s,r));return r.style==="label"||r.style==="matrix"?`${n}${i.join(n)}`:i.join(n)}function wp(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(_p(i,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof s=="object"){n.push(bp(i,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(la(i,s,e))}}return n.join("&")}}function OE(e,t){let r=e;for(const n of e.match(EE)??[]){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,_p(i,a,{style:o,explode:s}));continue}if(typeof a=="object"){r=r.replace(n,bp(i,a,{style:o,explode:s}));continue}if(o==="matrix"){r=r.replace(n,`;${la(i,a)}`);continue}r=r.replace(n,o==="label"?`.${encodeURIComponent(a)}`:encodeURIComponent(a))}return r}function CE(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 DE(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 kp(...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 Sp(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function IE(e,t){return AE({baseUrl:e,headers:{"X-Shop-Url":t}})}var PE="/api/v4/calendar",$E="/api/v4/tickets/calendar",ME="/api/v4/auth/validate_token",FE="/api/v4/tickets/list_and_quotas",NE="/api/v4/tickets",RE="/api/v4/auth/sign_in",LE="/api/v4/auth",zE="/api/v4/orders/withdrawals",Ep={SHOP_GUEST:10,SHOP:20},UE=class{type;#e=Q($e({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"),p(this.#e).urls=x_(this.type),p(this.#e).currentUser=mE(this.type),p(this.#e).apiUrl=e,p(this.#e).shopDomain=t,p(this.#e).locale=r||"de",this.#t={},p(this.#e).client=IE(e,t),p(this.#e).capacityManager=dp(),p(this.#e).cart=dE(),p(this.#e).auth=new Pf,p(this.#e).client.use(new R_(this.auth)),await this.waitForAllFetches(this.shop)}get capacityManager(){return p(this.#e).capacityManager||(p(this.#e).capacityManager=dp()),p(this.#e).capacityManager}get cart(){return p(this.#e).cart}get auth(){return p(this.#e).auth||(p(this.#e).auth=new Pf),p(this.#e).auth}get currentUser(){return p(this.#e).currentUser}get slug(){return this.shopDomain?.match(/^(?:https?:\/\/)?([^.-]+)/)?.[1]}get client(){return p(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 p(this.#e).apiUrl}get shopDomain(){return p(this.#e).shopDomain}get baseUrl(){return"https://"+this.shopDomain}get locale(){return p(this.#e).locale}get shop(){return this.fetchAndCache("/api/v4/shop","shop","shop")}get _data(){return p(this.#e)}validateToken(){return this.fetchAndCache(ME,"validateToken","",{cache:5})}ticketsCalendar(e){return this.fetchAndCache($E,`ticketsCalendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}calendar(e){return this.fetchAndCache(PE,`calendar-${JSON.stringify(e)}`,"data",{cache:60,query:e})}ticketsAndQuotas(e){return this.fetchAndCache(FE,`ticketsAndQuotas-${JSON.stringify(e)}`,"",{cache:60,query:e})}tickets(e){return this.fetchAndCache(NE,`tickets-${JSON.stringify(e)}`,"tickets",{cache:60,query:e})}signIn(e){return this.apiPost(RE,{body:e,requiredFields:["email","password"]})}signUp(e,t=!1){e=Gt({addr_addressat:"",addr_street:"n/a",addr_zip:"n/a",addr_city:"n/a",level:t?Ep.SHOP_GUEST:Ep.SHOP},e);let r=["name","surname","email","email_confirmation","terms"];return t||r.push("password","password_confirmation"),this.apiPost(LE,{body:e,requiredFields:r})}withdrawal(e){const t={...e,order_id:String(e.order_id)};return t.note||delete t.note,this.apiPost(zE,{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: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!"),p(this.#e)[t];const i=Gt({per_page:1e3},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&&(p(this.#e)[t]=r===""?l:l[r])}),p(this.#e)[t]}get museums(){return this.fetchAndCache("/api/v4/museums","museums","museums")}get exhibitions(){return this.fetchAndCache("/api/v4/exhibitions","exhibitions","exhibitions")}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")}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")}get upcomingEvents(){return this.fetchAndCache("/api/v4/events","events","events",{query:{by_bookable:!0,with_bookings_in_future:1}})}get tours(){return this.fetchAndCache("/api/v4/tours","tours","tours")}get merchandises(){return this.fetchAndCache("/api/v4/merchandises","merchandises","merchandises")}get customerSalutations(){return this.fetchAndCache("/api/v3/customer_salutations","customerSalutations","customer_salutations")}get countries(){return this.fetchAndCache("/api/v3/countries","countries","countries")}get locales(){return this.fetchAndCache("/api/v4/locales","locales","locales_options")}get urls(){return p(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:Gt(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=yE(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:Gt(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 O_(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=Gt(i,{params:{query:t}})),e&&(i=Gt(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 UE;function Mi(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 VE=class qg{host;KEY;pollDuration;#e=Q($e({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 qg(null,null);return r.value=t,r}load(){Zl(()=>(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 p(this.#e).value}set value(t){p(this.#e).value=t}};function Fi(e){return function(t,r={pollDuration:1e3}){if(t){const n=new VE(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 BE={urls:{},navigateTo:e=>{window.location.assign(e)},forms:{},fields:{}},qE=class{defaultConfig=Gt(BE,window.customOptions);override=this.defaultConfig;#e=Q($e({}));get options(){return p(this.#e)}set options(e){I(this.#e,e,!0)}constructor(){this.update()}update(){const e=Gt(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=Gt(this.override,e),this.update(),this}default(e){return this.defaultConfig=Gt(this.defaultConfig,e),this.update(),this}},Xe=new qE,xp=class{#e=Q();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}#t=Q();get ticketSaleId(){return p(this.#t)}set ticketSaleId(e){I(this.#t,e,!0)}get order(){if(this.token)return ol(C.annualOrder(this.token))}get ticketSale(){if(this.ticketSaleId)return ol(this.order?.ticket_sales.find(e=>e.id==this.ticketSaleId))}get isBmcTicket(){return this.ticketSale?.is_bmc_ticket||!1}goToPersonalization(e){return Xe.config.urls.annualTicketPersonalizationForm?Xe.config.urls.annualTicketPersonalizationForm(this.token,e.id):C.urls.annualTicketPersonalizationForm(this.token,e.id)}},Tp="go-annual-ticket-personalization",Ap=Mi(Tp),jE=Fi(Tp),ZE=W("<li><a> </a></li>"),WE=W('<ul class="go-annual-ticket"><li class="go-annual-ticket-title"> </li> <li class="go-annual-ticket-personalization-count"> </li> <!></ul>');function HE(e,t){ee(t,!0);let r=b(t,"token",7);const n=new xp;Ap(t.$$host,n),me(()=>{n.token=r()});let i=D(()=>n.order);var s={details:n,get token(){return r()},set token(c){r(c),y()}},o=K(),a=z(o),l=c=>{var d=K(),u=z(d);Ue(u,17,()=>p(i).ticket_sales,h=>h.id,(h,f)=>{var g=WE(),m=M(g),v=M(m,!0);P(m);var _=X(m,2),x=M(_,!0);P(_);var A=X(_,2),E=T=>{var O=ZE(),$=M(O),L=M($,!0);P($),P(O),ae((H,N)=>{ke($,"href",H),ne(L,N)},[()=>n.goToPersonalization(p(f)),()=>C.t("ticket.annual.personalization.list.personalize.add")]),S(T,O)};ce(A,T=>{p(f).status=="not_ready_to_send"&&T(E)}),P(g),ae(T=>{ke(g,"data-ticket-sale-id",p(f).id),ne(v,p(f).title),ne(x,T)},[()=>C.t("ticket.annual.personalization.detail.title",{count:p(f).personalizations.length})]),S(h,g)}),S(c,d)};return ce(a,c=>{p(i)&&c(l)}),S(e,o),te(s)}customElements.define("go-annual-ticket-personalization",re(HE,{token:{attribute:"token",reflect:!0,type:"String"}},[],["details"]));var GE={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:lr().email("user.fieldErrors.emailValid")},confirmEmail:{key:"confirmEmail",apiKey:"email_confirmation",type:"email",label:"user.registration.form.confirmEmail",placeholder:"",description:"",autocomplete:"email",validator:lr().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:lr().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:lr().date()},token:{key:"token",apiKey:"id",type:"text",label:"cart.coupon.form.code",placeholder:"",description:"",autocomplete:"off"},photo:{key:"photo",apiKey:"file",type:"file",label:"ticket.annual.personalization.form.photo",placeholder:"",description:"",autocomplete:"off",validator:f1(File)},withdrawalFirstName:{key:"withdrawalFirstName",apiKey:"first_name",type:"text",label:"user.registration.form.name",placeholder:"",description:"",autocomplete:"given-name"},withdrawalLastName:{key:"withdrawalLastName",apiKey:"last_name",type:"text",label:"user.registration.form.surname",placeholder:"",description:"",autocomplete:"family-name"},orderNumber:{key:"orderNumber",apiKey:"order_id",type:"text",label:"withdrawal.form.orderNumber",placeholder:"",description:"",autocomplete:"off"},withdrawalNote:{key:"withdrawalNote",apiKey:"note",type:"textarea",label:"withdrawal.form.note",placeholder:"",description:"",autocomplete:"off"},paymentMode:{key:"paymentMode",apiKey:"payment_mode_id",type:"paymentMode",label:"cart.paymentMode.label",placeholder:"",description:"",autocomplete:"off",options:()=>(C.payment_modes?Object.values(C.payment_modes):[]).map(e=>({value:String(e.id),label:e.name}))}};function KE(e,t){return{...e,errors:e.errors||[],value:e.value??YE(e.type),options:e.options,autocomplete:e.autocomplete??"",placeholder:e.placeholder??"",description:e.description,apiErrors:e.apiErrors??[],mounted:e.mounted??!1,required:t,validate(){JE(this)}}}function YE(e){return e==="checkbox"?!1:e==="file"?null:""}function JE(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 cr=class Ka{static#e={};static defineForm(t){Xe.default({forms:{[t.id]:{fields:t.fields,submitLabel:t.submitLabel}}})}static defineFields(t){Xe.default({fields:t})}static{Ka.defineFields(GE)}static setRequiredApiKeys(t,r){Ka.#e[t]=r}static getFormOptions(t){return Xe.config.forms[t]}static createField(t,r){const n=Ka.getFieldInit(t);if(!n)throw new Error(`(formFields) Field "${t}" not found`);return KE(n,r)}static getFormFields(t){return XE(t)}static getFieldInit(t){return Xe.config.fields[t]}};function XE(e){const t=Xe.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 Ou(e){return e?e.filter(t=>t.mounted&&(t.errors?.length||t.apiErrors?.length)).length:0}function QE(e,t){ee(t,!0);let r=b(t,"token",7),n=b(t,"ticketSaleId",7),i;const s=new xp;Ap(t.$$host,s),me(()=>{s.token=r(),s.ticketSaleId=n()}),cr.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"])'),_=If(m,(T,O)=>{const $=v[O-1].details;return T.push($),T},[]);if(_.forEach(T=>{T.fields.forEach(O=>{T.validateField(O)})}),!If(m,(T,O)=>_[O-1].isValid,!1))return;if(s.ticketSale?.photo_mandatory==="mandatory"){const T=_.map(async($,L)=>{const H=s.ticketSale.personalizations[L].id,N=$.fields.find(V=>V.key==="photo")?.value;if(!(N instanceof File))return{ok:!1,error:"ticket.annual.personalization.photo.missing"};const se=await C.uploadPersonalizationPhoto(r(),H,N);return se.error?{ok:!1,error:se.error.error??"ticket.annual.personalization.photo.upload_failed"}:{ok:!0,error:""}}),O=(await Promise.all(T)).find($=>!$.ok);if(O){i.details.apiErrors=[O.error];return}}const x={personalization:{ticket_sale_id:s.ticketSaleId,start_at:i.details.formData.start_at,personalizations:_.map((T,O)=>{const $=N_(T.formData,["email_confirmation"]);return{id:s.ticketSale?.personalizations[O].id,customer:$}})}},A=await C.finalizePersonalizations(r(),x);if(A.error){i.details.apiErrors=[A.error.error];return}const E=Xe.config.forms.personalization?.beforeSubmit;E&&E(x),Xe.config.urls.annualTicketPersonalizationFormSubmit?.()&&Xe.config.navigateTo(Xe.config.urls.annualTicketPersonalizationFormSubmit())}let a=null,l=null,c=null,d=0;function u(m){m.querySelectorAll("go-field").forEach(v=>v.replaceChildren())}function h(){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 f(m){if(!h()||!a||!l||!c)return;const v=a.parentElement;if(!v)return;const _=Math.max(m,1),x=Array.from(v.querySelectorAll("go-personalization-form"));for(;x.length<_;){const E=l.cloneNode(!0);u(E),v.insertBefore(E,c),x.push(E)}for(;x.length>_;){const E=x.pop();E&&E!==a&&E.remove()}const A=s.ticketSale?.personalizations??[];x.forEach((E,T)=>{const O=A[T];O&&(E.dataset.personalizationId=String(O.id))}),d=_}rn(()=>{h(),t.$$host.addEventListener("go-submit",o),i=document.querySelector('go-form[form-id="ticketPersonalization"]')}),me(()=>{if(!s.ticketSale)return;const m=s.ticketSale?.personalizations.length??1;m!==d&&f(m)});var g={details:s,get token(){return r()},set token(m){r(m),y()},get ticketSaleId(){return n()},set ticketSaleId(m){n(m),y()}};return te(g)}customElements.define("go-annual-ticket-personalization-form",re(QE,{token:{attribute:"token",reflect:!0,type:"String"},ticketSaleId:{attribute:"ticket-sale-id",reflect:!0,type:"Number"}},[],["details"]));var ex=class{formId;form;#e=Q($e([]));#t=D(()=>Ou(this.fields)==0);get isValid(){return p(this.#t)}set isValid(e){I(this.#t,e)}#r=Q();get successMessage(){return p(this.#r)}set successMessage(e){I(this.#r,e,!0)}get formData(){function e(r){return I_(r)||C_(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 p(this.#e)}set apiErrors(e){if(this.fields.forEach(t=>t.apiErrors=[]),Wl(e)){I(this.#e,e,!0);return}if(e.errors&&Wl(e.errors)&&I(this.#e,e.errors,!0),D_(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}},Op="go-form-details",tx=Mi(Op),Ni=Fi(Op);function Pn(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 rx=W("<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>",3);function nx(e,t){ee(t,!0);let r=b(t,"formId",7),n=b(t,"custom",7);const i=new ex(r(),t.$$host);tx(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=Pn(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),y()},get custom(){return n()},set custom(d){n(d),y()}},a=K(),l=z(a),c=d=>{var u=rx(),h=z(u),f=X(h,2),g=X(f,2),m=M(g,!0);P(g),ae(v=>ne(m,v),[()=>C.t(cr.getFormOptions(r())?.submitLabel||"Submit")]),S(d,u)};return ce(l,d=>{n()||d(c)}),S(e,a),te(o)}customElements.define("go-form",re(nx,{formId:{attribute:"form-id",reflect:!0,type:"String"},custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],["details"]));var ix=W("<go-form></go-form>",2);function sx(e,t){ee(t,!0);let r=b(t,"custom",7,!1);cr.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),y()}},s=ix();return Hn(s,"formId","passwordReset"),ae(()=>Hn(s,"custom",r())),Ol("submit",s,n),S(e,s),te(i)}customElements.define("go-password-reset",re(sx,{custom:{}},[],[]));function ox(e,t){ee(t,!0),cr.defineForm({id:"signIn",submitLabel:"common.actions.login",fields:[{key:"email",required:!0},{key:"password",required:!0}]});let r=b(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 Pn(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),y()}})}customElements.define("go-sign-in",re(ox,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function ax(e,t){ee(t,!0);let r=b(t,"custom",7,!1);cr.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 Pn(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),y()}})}customElements.define("go-sign-up",re(ax,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));function lx(e,t){if(typeof e=="number"&&Number.isFinite(e))return e;if(e&&typeof e=="object"){const r=Object.values(e).reduce((n,i)=>typeof i=="number"&&Number.isFinite(i)?n+i:n,0);if(r>0)return r}return t}function Cp(e){return"quantity"in e&&e.quantity!==void 0?e.quantity:e.quantities}function ux(e){return lx(Cp(e),0)}function cx(e){const t=Cp(e);if(t&&typeof t=="object"){const r=Object.keys(t);if(r.length>0)return Number(r[0])}}function dx(e,t){const r=Pi(),n=new Set;return e.coupons.forEach(i=>r.addCoupon(i)),t.forEach(i=>{const s=i.attributes,o=cx(s),a=e.items.find(l=>l.type.toLowerCase()===i.type.toLowerCase()&&l.product.id===s.id&&(!s.time||l.time===s.time)&&(o===void 0||Vs(l.product)&&l.product.scale_price_id===o));if(!a){console.error("(go-cart) Ignoring unmatched cart line",{type:i.type,attrs:s});return}s.coupon&&(r.addCoupon(s.coupon),n.add(s.coupon)),r.addItem(fx(a,s))}),{cart:r,appliedCoupons:n}}function fx(e,t){const r=ux(t),n=t.price_cents??e.product.price_cents,i=e.product.price_cents,s=n<i;return yt({...e.product,price_cents:n},{quantity:r,time:e.time,display:{discounted:s,reference_uuid:e.uuid,originalPrice:i}})}var hx=class{#e=Q();get displayCart(){return p(this.#e)}set displayCart(e){I(this.#e,e,!0)}#t=Q($e(new Set));get appliedCoupons(){return p(this.#t)}set appliedCoupons(e){I(this.#t,e,!0)}#r=Q(!1);get preview(){return p(this.#r)}set preview(e){I(this.#r,e,!0)}get totalPriceCents(){return this.displayCart?.totalPriceCents??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||"error"in n){n&&"error"in n&&console.error("(go-cart) Unable to fetch discounted cart data",n.error),this.displayCart=e;return}const i=dx(e,n.data.items??[]);this.displayCart=i.cart,this.appliedCoupons=i.appliedCoupons}catch(t){console.error("(go-cart) Unable to fetch discounted cart data",t),this.displayCart=e}}},Dp="go-cart-details",px=Mi(Dp),Ri=Fi(Dp),mx=W('<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),vx=W('<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 Ip(e,t){ee(t,!0);let r=b(t,"cartItem",7);if(!Vs(r().product))throw new Error("Product is not an event ticket");const n=r().product;var i={get cartItem(){return r()},set cartItem(f){r(f),y()}},s=vx(),o=z(s),a=M(o),l=M(a,!0);P(a);var c=X(a),d=M(c,!0);P(c),P(o);var u=X(o),h=f=>{var g=mx(),m=z(g),v=M(m,!0);P(m);var _=X(m),x=M(_,!0);P(_),ae((A,E)=>{ne(v,A),ne(x,E)},[()=>Us(r().time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().time)]),S(f,g)};return ce(u,f=>{r().time&&f(h)}),ae(()=>{ne(l,n.event_title),ne(d,n.title)}),S(e,s),te(i)}re(Ip,{cartItem:{}},[],[],{mode:"open"});var gx=W('<span class="go-cart-item-time" data-testid="cart-item-time"> </span>'),yx=W('<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>',1),bx=W('<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>',1);function Pp(e,t){ee(t,!0);let r=b(t,"cartItem",7);var n={get cartItem(){return r()},set cartItem(c){r(c),y()}},i=bx(),s=z(i),o=M(s,!0);P(s);var a=X(s,2),l=c=>{var d=yx(),u=z(d),h=M(u,!0);P(u);var f=X(u,2),g=m=>{var v=gx(),_=M(v,!0);P(v),ae(x=>ne(_,x),[()=>zs(r().time)]),S(m,v)};ce(f,m=>{r().product.subtype==="timeslot"&&m(g)}),ae(m=>ne(h,m),[()=>Us(r().time,{month:"numeric",day:"numeric"},C.locale)]),S(c,d)};return ce(a,c=>{r().time&&c(l)}),ae(()=>ne(o,r().product.title)),S(e,i),te(n)}re(Pp,{cartItem:{}},[],[],{mode:"open"});function $p(e,t,r={floor:0}){const{floor:n}=r;if(t===0||t===n)return[ua(n)];if(t<e)return e>n?[ua(e)]:[];const i=Math.max(e,n),s=[ua(n)];for(let o=i;o<=t;o++)o!==n&&s.push(ua(o));return s}function ua(e){return{value:e,label:e.toString()}}var _x=W('<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>',1),wx=W('<span class="go-cart-item-price-discounted"> </span>'),kx=W("<span> </span>"),Sx=W("<option> </option>"),Ex=W('<select class="go-cart-item-select"></select>'),xx=W('<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>'),Tx=W('<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>');function Mp(e,t){ee(t,!0);let r=b(t,"displayItem",7),n=b(t,"displayCart",7),i=b(t,"preview",7),s=Q(void 0);const o=D(()=>C.cart?.items.find(g=>g.uuid===(r().display?.reference_uuid??r().uuid))),a=Pi();me(()=>{C.cart?.items.map(g=>g.quantity),qe(()=>{I(s,C.capacityManager.capacity(n(),r(),a),!0)})});function l(g){const m=g;if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const v=parseInt(m.value,10);p(o).quantity=Math.max(0,p(o).quantity-r().quantity+v)}function c(){if(!p(o)){console.error("(CartItem) Could not find main item for line",r());return}const g=Math.max(0,p(o).quantity-r().quantity);g===0?C.cart?.deleteItem(p(o)):p(o).quantity=g}var d={get displayItem(){return r()},set displayItem(g){r(g),y()},get displayCart(){return n()},set displayCart(g){n(g),y()},get preview(){return i()},set preview(g){i(g),y()}},u=K(),h=z(u),f=g=>{var m=Tx(),v=M(m),_=M(v),x=M(_),A=B=>{Pp(B,{get cartItem(){return r()}})},E=B=>{Ip(B,{get cartItem(){return r()}})};ce(x,B=>{r().product.type==="Ticket"?B(A):r().product.type==="Event"&&B(E,1)}),P(_);var T=X(_,2),O=M(T),$=B=>{var j=_x(),G=z(j),J=M(G,!0);P(G);var le=X(G,2),he=M(le,!0);P(le),ae((F,ue)=>{ne(J,F),ne(he,ue)},[()=>ur(r().display.originalPrice),()=>ur(r().final_price_cents)]),S(B,j)},L=B=>{var j=wx(),G=M(j,!0);P(j),ae(J=>ne(G,J),[()=>ur(r().final_price_cents)]),S(B,j)};ce(O,B=>{r().display?.discounted?B($):B(L,-1)}),P(T);var H=X(T,2),N=M(H),se=B=>{var j=kx(),G=M(j,!0);P(j),ae(()=>ne(G,r().quantity)),S(B,j)},V=B=>{var j=Ex();Ue(j,21,()=>$p(p(s).min,p(s).max,{floor:1}),G=>G.value,(G,J)=>{var le=Sx(),he=M(le,!0);P(le);var F={};ae(()=>{Fl(le,r().quantity===p(J).value),ne(he,p(J).label),F!==(F=p(J).value)&&(le.value=(le.__value=p(J).value)??"")}),S(G,le)}),P(j),ae(G=>ke(j,"aria-label",G),[()=>C.t("cart.content.table.edit")]),Nt("change",j,G=>l(G.target)),S(B,j)};ce(N,B=>{i()?B(se):B(V,-1)}),P(H);var oe=X(H,2),pe=B=>{var j=xx(),G=M(j);P(j),ae(J=>ke(G,"aria-label",J),[()=>C.t("cart.item.remove")]),Nt("click",G,c),S(B,j)};ce(oe,B=>{i()||B(pe)});var Y=X(oe,2),ie=M(Y,!0);P(Y),P(v),P(m),ae(B=>ne(ie,B),[()=>ur(r().total_price_cents)]),S(g,m)};return ce(h,g=>{p(s)&&g(f)}),S(e,u),te(d)}Rr(["change","click"]),re(Mp,{displayItem:{},displayCart:{},preview:{}},[],[],{mode:"open"});var Ax=W('<li class="go-cart-header-remove"></li>'),Ox=W('<li class="go-cart-item"><!></li>'),Cx=W('<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 Dx(e,t){ee(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=Cx(),c=M(l),d=M(c),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);P(f);var m=X(f,2),v=M(m,!0);P(m);var _=X(m,2),x=O=>{var $=Ax();S(O,$)};ce(_,O=>{p(n).preview||O(x)});var A=X(_,2),E=M(A,!0);P(A),P(d),P(c);var T=X(c,2);Ue(T,17,()=>p(n).displayCart.items,O=>O.uuid,(O,$)=>{var L=Ox();Mp(M(L),{get displayItem(){return p($)},get displayCart(){return p(n).displayCart},get preview(){return p(n).preview}}),P(L),S(O,L)}),P(l),ae((O,$,L,H)=>{ne(h,O),ne(g,$),ne(v,L),ne(E,H)},[()=>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=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-items",re(Dx,{},[],[]));var Ix=W('<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>'),Px=W('<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>'),$x=W('<ol data-testid="cart-coupons"></ol>');function Mx(e,t){ee(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=$x();Ue(l,20,()=>p(n).displayCart.coupons,c=>c,(c,d)=>{var u=Px();let h;var f=M(u),g=M(f),m=M(g),v=M(m,!0);P(m);var _=X(m,2),x=A=>{var E=Ix(),T=M(E);P(E),ae(O=>ke(T,"aria-label",O),[()=>C.t("cart.coupons.remove")]),Nt("click",T,()=>C.cart?.removeCoupon(d)),S(A,E)};ce(_,A=>{p(n).preview||A(x)}),P(g),P(f),P(u),ae(A=>{h=Lt(u,1,"go-cart-coupon",null,h,A),ne(v,d)},[()=>({"go-cart-coupon-inactive":!p(n).appliedCoupons.has(d)})]),S(c,u)}),P(l),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.coupons.length>0&&a(o)}),S(e,i),te()}Rr(["click"]),customElements.define("go-cart-coupons",re(Mx,{},[],[]));var Fx=W('<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>');function Nx(e,t){ee(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=Fx(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).totalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).displayCart&&p(n).displayCart.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-total-amount",re(Nx,{},[],[]));function Rx(e,t){ee(t,!0);const r=b(t,"preview",7,!1),n=new hx;px(t.$$host,n),me(()=>{n.preview=r()}),me(()=>{C.cart&&(C.cart.items.map(s=>s.uuid+":"+s.quantity+":"+s.time),C.cart.coupons.join("|"),qe(()=>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();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),y()}})}customElements.define("go-cart",re(Rx,{preview:{attribute:"preview",reflect:!0,type:"Boolean"}},[],[]));var Lx=W('<span class="go-cart-subtotal-amount" data-testid="cart-subtotal-amount"> </span>');function zx(e,t){ee(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=Lx(),c=M(l,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).subtotalPriceCents)]),S(a,l)};ce(s,a=>{p(n)&&C.cart?.items.length&&a(o)}),S(e,i),te()}customElements.define("go-cart-subtotal-amount",re(zx,{},[],[]));var Ux=W('<span class="go-cart-discounted-amount" data-testid="cart-discounted-amount"><span class="go-cart-discounted-amount-sign">−</span> </span>');function Vx(e,t){ee(t,!0);const r=Ri(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=Ux(),c=X(M(l),1,!0);P(l),ae(d=>ne(c,d),[()=>ur(p(n).discountedAmountCents)]),S(a,l)};ce(s,a=>{p(n)&&p(n).discountedAmountCents>0&&a(o)}),S(e,i),te()}customElements.define("go-cart-discounted-amount",re(Vx,{},[],[]));function Bx(e,t){ee(t,!0),Pn(t.$$host,"go-if",{when:"data.cart.items.length === 0"}),te()}customElements.define("go-cart-empty",re(Bx,{},[],[]));function qx(e,t){ee(t,!0);let r=D(()=>C.cart?.items.length);Et();var n=Rt();ae(()=>ne(n,p(r))),S(e,n),te()}customElements.define("go-cart-counter",re(qx,{},[],[]));function jx(e,t){ee(t,!0);let r=b(t,"custom",7,!1),n=D(()=>C.cart);return cr.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}]}),Pn(t.$$host,"go-form",{"form-id":"checkoutGuest",custom:r()}),t.$$host.addEventListener("submit",async i=>{const s=i.target;if(!p(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");p(n).paymentModeId=a==null?void 0:String(a);const l=await C.checkout(p(n).orderData());if(l.error){s.details.apiErrors=l.error;return}const c=Xe.config.forms.checkoutGuest?.beforeSubmit;c&&await c(s.details.formData);const d=l.data.meta.payment_url;Xe.config.navigateTo?.(d)}),te({get custom(){return r()},set custom(i=!1){r(i),y()}})}customElements.define("go-checkout-form",re(jx,{custom:{}},[],[]));var Zx="TokenActions::ApplyOrderDiscount";async function Wx(e){if(!C.cart)throw new Error("(go-coupon-redemption): cart not found");const t=await C.asyncFetch(()=>C.getCouponSaleByBarcode(e));return t?.is_valid?t.value_action===Zx?(C.cart.addCoupon(e),{success:!0}):t.is_voucher_for?Hx(e,t):Cu([C.t("cart.coupon.form.errors.notValid")]):Cu([C.t("cart.coupon.form.errors.notValid")])}async function Hx(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 Cu([C.t("cart.coupon.form.errors.error")]);const n={...r,price_cents:0};return C.cart.addItem(yt(ia(n),{quantity:1})),C.cart.addCoupon(e),{success:!0}}function Cu(e){return{success:!1,errors:e}}var Gx=W("<go-form></go-form>",2);function Kx(e,t){ee(t,!0),cr.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 Wx(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=Gx();return Hn(o,"formId","couponRedemption"),Ol("submit",o,n),S(e,o),te(s)}customElements.define("go-coupon-redemption",re(Kx,{},[],["flush"])),Ky();var Yx=class{#e=Q();get campaign(){return p(this.#e)}set campaign(e){I(this.#e,e,!0)}#t=Q();get amount(){return p(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")||"[]");Gn(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())}},At=new Yx,Jx=W('<img alt="logo"/>'),Xx=W('<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 Fp(e,t){ee(t,!0);let r=b(t,"campaign",7);const n=D(()=>r().translations);var i={get campaign(){return r()},set campaign(m){r(m),y()}},s=Xx();let o;var a=M(s),l=M(a),c=m=>{var v=Jx();ae(_=>ke(v,"src",_),[()=>r().picture.thumbnail.replace("thumbnail","article_3x2")]),S(m,v)};ce(l,m=>{r().picture.thumbnail&&m(c)}),P(a);var d=X(a,2),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);return P(f),P(d),P(s),ae(()=>{o=Lt(s,1,"go-donation-campaign",null,o,{selected:At.campaign?.id===r()?.id}),ne(h,p(n)["donations.headline"]),ne(g,p(n)["donations.shop.info"])}),Nt("click",s,()=>At.selectCampaign(r())),Nt("keydown",s,m=>{m.key==="Enter"&&At.selectCampaign(r())}),S(e,s),te(i)}Rr(["click","keydown"]),re(Fp,{campaign:{}},[],[],{mode:"open"});function Qx(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 sn(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 eT=W("<button> </button>"),tT=W('<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>'),rT=W('<div class="donation-selection"><h3> </h3> <div class="donation-options"></div> <!></div>');function Np(e,t){ee(t,!0);const r=At.campaign?.guest_limit/100;let n=Q(void 0);function i(h){At.amount=h,I(n,null)}function s(h){const f=document.getElementById("donationForm");f.checkValidity()?At.amount=h.target.valueAsNumber*100:(At.amount=void 0,f.reportValidity())}var o=rT(),a=M(o),l=M(a,!0);P(a);var c=X(a,2);Ue(c,20,()=>At.campaign?.options,h=>h,(h,f)=>{var g=eT();let m;var v=M(g,!0);P(g),ae(_=>{m=Lt(g,1,"btn btn-default",null,m,{selected:At.amount===f}),ne(v,_)},[()=>Qx(f/100,C.currency)]),Nt("click",g,()=>i(f)),S(h,g)}),P(c);var d=X(c,2),u=h=>{var f=tT(),g=M(f),m=M(g),v=M(m,!0);P(m);var _=X(m,2);Fo(_),P(g),P(f),ae((x,A)=>{ne(v,x),ke(_,"max",r),ke(_,"placeholder",A),wf(_,p(n))},[()=>C.t("donations.selection.custom.label"),()=>C.t("donations.selection.custom.input.placeholder")]),Nt("input",_,s),S(h,f)};ce(d,h=>{At.campaign?.free_donations&&h(u)}),P(o),ae(h=>ne(l,h),[()=>C.t("donations.selection.title")]),S(e,o),te()}Rr(["click","input"]),re(Np,{},[],[],{mode:"open"});var nT=W('<div class="go-donations-list"><!> <!> <div class="donation-actions"><button class="btn btn-default"> </button> <button class="btn btn-primary"> </button></div></div>');function iT(e,t){ee(t,!1),rn(()=>{C.donations?.campaigns?.length==1&&At.selectCampaign(C.donations?.campaigns[0])}),jl();var r=K(),n=z(r),i=s=>{var o=nT(),a=M(o);Ue(a,1,()=>C?.donations?.campaigns,m=>m.id,(m,v)=>{Fp(m,{get campaign(){return p(v)}})});var l=X(a,2),c=m=>{Np(m,{})};ce(l,m=>{At.campaign&&m(c)});var d=X(l,2),u=M(d),h=M(u,!0);P(u);var f=X(u,2),g=M(f,!0);P(f),P(d),P(o),ae((m,v)=>{ne(h,m),f.disabled=!At.amount,ne(g,v)},[()=>C.t("donations.actions.continueWithoutDonation"),()=>C.t("donations.actions.addToCart")]),Nt("click",u,function(...m){At.skipDonation?.apply(this,m)}),Nt("click",f,function(...m){At.addDonationToCart?.apply(this,m)}),S(s,o)};ce(n,s=>{C.donations&&C.donations.campaigns&&s(i)}),S(e,r),te()}Rr(["click"]),customElements.define("go-donations",re(iT,{},[],[]));function sT(e){return typeof e=="function"}function Bs(e){return e!==null&&typeof e=="object"}var oT=["string","number","bigint","boolean"];function Du(e){return e==null||oT.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Du(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}var ca=Symbol("box"),Rp=Symbol("is-writable");function R(e,t){const r=D(e);return t?{[ca]:!0,[Rp]:!0,get current(){return p(r)},set current(n){t(n)}}:{[ca]:!0,get current(){return e()}}}function Lp(e){return Bs(e)&&ca in e}function aT(e){return Lp(e)?e:sT(e)?R(e):wr(e)}function wr(e){let t=Q($e(e));return{[ca]:!0,[Rp]:!0,get current(){return p(t)},set current(r){I(t,r,!0)}}}function zp(...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 Up=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,lT=/\n/g,uT=/^\s*/,cT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,dT=/^:\s*/,fT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hT=/^[;\s]*/,pT=/^\s+|\s+$/g,mT=`
76
+ `,Vp="/",Bp="*",ri="",vT="comment",gT="declaration";function yT(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(lT);m&&(r+=m.length);var v=g.lastIndexOf(mT);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(uT)}function d(g){var m;for(g=g||[];m=u();)m!==!1&&g.push(m);return g}function u(){var g=s();if(!(Vp!=e.charAt(0)||Bp!=e.charAt(1))){for(var m=2;ri!=e.charAt(m)&&(Bp!=e.charAt(m)||Vp!=e.charAt(m+1));)++m;if(m+=2,ri===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:vT,comment:v})}}function h(){var g=s(),m=l(cT);if(m){if(u(),!l(dT))return a("property missing ':'");var v=l(fT),_=g({type:gT,property:qp(m[0].replace(Up,ri)),value:v?qp(v[0].replace(Up,ri)):ri});return l(hT),_}}function f(){var g=[];d(g);for(var m;m=h();)m!==!1&&(g.push(m),d(g));return g}return c(),f()}function qp(e){return e?e.replace(pT,ri):ri}function bT(e,t){let r=null;if(!e||typeof e!="string")return r;const n=yT(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 _T=/\d/,wT=["-","_","/","."];function kT(e=""){if(!_T.test(e))return e!==e.toLowerCase()}function ST(e){const t=[];let r="",n,i;for(const s of e){const o=wT.includes(s);if(o===!0){t.push(r),r="",n=void 0;continue}const a=kT(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 jp(e){return e?ST(e).map(t=>xT(t)).join(""):""}function ET(e){return TT(jp(e||""))}function xT(e){return e?e[0].toUpperCase()+e.slice(1):""}function TT(e){return e?e[0].toLowerCase()+e.slice(1):""}function qs(e){if(!e)return{};const t={};function r(n,i){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){t[jp(n)]=i;return}if(n.startsWith("--")){t[n]=i;return}t[ET(n)]=i}return bT(e,r),t}function js(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}function AT(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 OT=AT(/[A-Z]/,e=>`-${e.toLowerCase()}`);function CT(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=>`${OT(t)}: ${e[t]};`).join(`
77
+ `)}function Zs(e={}){return CT(e).replace(`
78
+ `," ")}var DT=["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"],IT=new Set(DT);function PT(e){return IT.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&&PT(i))t[i]=zp(s,o);else if(a&&l)t[i]=js(s,o);else if(i==="class"){const c=Du(s),d=Du(o);c&&d?t[i]=$o(s,o):c?t[i]=$o(s):d&&(t[i]=$o(o))}else if(i==="style"){const c=typeof s=="object",d=typeof o=="object",u=typeof s=="string",h=typeof o=="string";if(c&&d)t[i]={...s,...o};else if(c&&h){const f=qs(o);t[i]={...s,...f}}else if(u&&d)t[i]={...qs(s),...o};else if(u&&h){const f=qs(s),g=qs(o);t[i]={...f,...g}}else c?t[i]=s:d?t[i]=o:u?t[i]=s:h&&(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=Zs(t.style).replaceAll(`
79
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Zp={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%)"},$T=Zs(Zp),Wp=typeof window<"u"?window:void 0,H2=typeof window<"u"?window.document:void 0,G2=typeof window<"u"?window.navigator:void 0,K2=typeof window<"u"?window.location:void 0;function MT(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var FT=class extends Map{#e=new Map;#t=Q(0);#r=Q(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?Q(e):_n(e)}has(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else return p(this.#t),!1;return p(r),!0}forEach(e,t){this.#s(),super.forEach(e,t)}get(e){var t=this.#e,r=t.get(e);if(r===void 0)if(super.has(e))r=this.#i(0),t.set(e,r);else{p(this.#t);return}return p(r),super.get(e)}set(e,t){var r=this.#e,n=r.get(e),i=super.get(e),s=super.set(e,t),o=this.#t;if(n===void 0)n=this.#i(0),r.set(e,n),I(this.#r,super.size),Fr(o);else if(i!==t){Fr(n);var a=o.reactions===null?null:new Set(o.reactions);(a===null||!n.reactions?.every(l=>a.has(l)))&&Fr(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),Fr(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);Fr(this.#t),e.clear()}}#s(){p(this.#t);var e=this.#e;if(this.#r.v!==e.size){for(var t of super.keys())if(!e.has(t)){var r=this.#i(0);e.set(t,r)}}for([,r]of this.#e)p(r)}keys(){return p(this.#t),super.keys()}values(){return this.#s(),super.values()}entries(){return this.#s(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return p(this.#r),super.size}},NT=class{#e;#t;constructor(e={}){const{window:t=Wp,document:r=t?.document}=e;t!==void 0&&(this.#e=r,this.#t=pl(n=>{const i=ht(t,"focusin",n),s=ht(t,"focusout",n);return()=>{i(),s()}}))}get current(){return this.#t?.(),this.#e?MT(this.#e):null}},Y2=new NT;function RT(e){return typeof e=="function"}var Ot=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tb(this.#t)}get(){const e=yd(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const t=yd(this.#t);return t===void 0?e:t}set(e){return eb(this.#t,e)}};function LT(e,t){switch(e){case"post":me(t);break;case"pre":kl(t);break}}function Iu(e,t,r,n={}){const{lazy:i=!1}=n;let s=!i,o=Array.isArray(e)?[]:void 0;LT(t,()=>{const a=Array.isArray(e)?e.map(c=>c()):e();if(!s){s=!0,o=a;return}const l=qe(()=>r(a,o));return o=a,l})}function Hp(e,t,r){const n=_s(()=>{let i=!1;Iu(e,t,(s,o)=>{if(i){n();return}const a=r(s,o);return i=!0,a},{lazy:!0})});me(()=>n)}function tt(e,t,r){Iu(e,"post",t,r)}function zT(e,t,r){Iu(e,"pre",t,r)}tt.pre=zT;function UT(e,t){Hp(e,"post",t)}function VT(e,t){Hp(e,"pre",t)}UT.pre=VT;function Gp(e){return RT(e)?e():e}var BT=class{#e={width:0,height:0};#t=!1;#r;#n;#i;#s=D(()=>(p(this.#o)?.(),this.getSize().width));#a=D(()=>(p(this.#o)?.(),this.getSize().height));#o=D(()=>{const e=Gp(this.#n);if(e)return pl(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??Wp,this.#r=t,this.#n=e,this.#e={width:0,height:0}}calculateSize(){const e=Gp(this.#n);if(!e||!this.#i)return;const t=e.offsetWidth,r=e.offsetHeight;if(this.#r.box==="border-box")return{width:t,height:r};const n=this.#i.getComputedStyle(e),i=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),a=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth);return{width:t-i-o,height:r-s-a}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return p(this.#o)?.(),this.getSize()}get width(){return p(this.#s)}get height(){return p(this.#a)}};function qT(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 jT(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 Kp(e,t,r={},n){const{lazy:i=!1,once:s=!1,initialValue:o,debounce:a,throttle:l}=r;let c=Q($e(o)),d=Q(!1),u=Q(void 0),h=Q($e([]));const f=()=>{p(h).forEach(A=>A()),I(h,[],!0)},g=A=>{I(h,[...p(h),A],!0)},m=async(A,E,T=!1)=>{try{I(d,!0),I(u,void 0),f();const O=new AbortController;g(()=>O.abort());const $=await t(A,E,{data:p(c),refetching:T,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?qT(m,a):l?jT(m,l):m,_=Array.isArray(e)?e:[e];let x;return n((A,E)=>{s&&x||(x=A,v(Array.isArray(e)?A:A[0],Array.isArray(e)?E:E?.[0]))},{lazy:i}),{get current(){return p(c)},get loading(){return p(d)},get error(){return p(u)},mutate:A=>{I(c,A,!0)},refetch:A=>{const E=_.map(T=>T());return v(Array.isArray(e)?E:E[0],Array.isArray(e)?E:E[0],A??!0)}}}function ZT(e,t,r){return Kp(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e];tt(()=>s.map(a=>a()),(a,l)=>{n(a,l??[])},i)})}function WT(e,t,r){return Kp(e,t,r,(n,i)=>{const s=Array.isArray(e)?e:[e],o=()=>s.map(a=>a());tt.pre(o,(a,l)=>{n(a,l??[])},i)})}ZT.pre=WT;function ni(e){me(()=>()=>{e()})}function HT(e,t){return setTimeout(t,e)}function Ws(e){nf().then(e)}var GT=1,KT=9,YT=11;function Pu(e){return Bs(e)&&e.nodeType===GT&&typeof e.nodeName=="string"}function Yp(e){return Bs(e)&&e.nodeType===KT}function JT(e){return Bs(e)&&e.constructor?.name==="VisualViewport"}function XT(e){return Bs(e)&&e.nodeType!==void 0}function Jp(e){return XT(e)&&e.nodeType===YT&&"host"in e}function QT(e,t){if(!e||!t||!Pu(e)||!Pu(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Jp(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function da(e){return Yp(e)?e:JT(e)?e.document:e?.ownerDocument??document}function Xp(e){return Jp(e)?Xp(e.host):Yp(e)?e.defaultView??window:Pu(e)?e.ownerDocument?.defaultView??window:window}function eA(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}var Li=class{element;#e=D(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return p(this.#e)}set root(e){I(this.#e,e)}constructor(e){typeof e=="function"?this.element=R(e):this.element=e}getDocument=()=>da(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>eA(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Qe(e,t){return{[Jb()]:r=>Lp(e)?(e.current=r,qe(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e.current=null,t?.(null))}):(e(r),qe(()=>t?.(r)),()=>{"isConnected"in r&&r.isConnected||(e(null),t?.(null))})}}function kr(e){return e?"true":"false"}function $u(e){return e?"true":void 0}function Le(e){return e?"":void 0}function Qp(e){return e?"open":"closed"}function tA(e){return e==="starting"?{"data-starting-style":""}:e==="ending"?{"data-ending-style":""}:{}}var rA=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(t=>[t,this.getAttr(t)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function fa(e){const t=new rA(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Mu="ArrowDown",em="ArrowLeft",tm="ArrowRight",Fu="ArrowUp",nA="Backspace",iA="Enter",J2="Escape",X2=" ",Q2="Tab",eF="a",tF="P",rF="A",nF="p",on=typeof document<"u",rm=sA();function sA(){return on&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Sr(e){return e instanceof HTMLElement}function ii(e){return e instanceof Element}function oA(e){return e instanceof Element||e instanceof SVGElement}function ha(e){return!Number.isNaN(Number(e))&&!Number.isNaN(Number.parseFloat(e))}function $n(e){return e===null}function pa(e){return e.pointerType==="touch"}function aA(e){return e!==null}var lA=class{#e;#t=null;#r=null;#n=0;constructor(e){this.#e=e,ni(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#r?.disconnect(),this.#r=null,this.#n++}run(e){this.#i();const t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!="function"){this.#s(e);return}const r=this.#n,n=()=>{r===this.#n&&this.#s(e)},i=()=>{if(r!==this.#n)return;const o=t.getAnimations();if(o.length===0){n();return}Promise.all(o.map(a=>a.finished)).then(()=>{n()}).catch(()=>{if(r===this.#n){if(t.getAnimations().some(a=>a.pending||a.playState!=="finished")){i();return}n()}})},s=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){s();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;const o="data-starting-style";if(!t.hasAttribute(o)){s();return}this.#r=new MutationObserver(()=>{r===this.#n&&(t.hasAttribute(o)||(this.#r?.disconnect(),this.#r=null,s()))}),this.#r.observe(t,{attributes:!0,attributeFilter:[o]})})}#s(e){const t=()=>{e()};this.#e.afterTick?Ws(t):t()}},nm=class{#e;#t;#r;#n=Q(!1);#i=Q(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 lA({ref:this.#e.ref,afterTick:this.#e.open}),ni(()=>this.#o()),tt(()=>this.#e.open.current,t=>{if(!this.#s){this.#s=!0;return}if(this.#o(),!t&&this.#e.shouldSkipExitAnimation?.()){I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}if(t&&I(this.#n,!0),I(this.#i,t?"starting":"ending",!0),t&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#e.open.current&&I(this.#i,void 0)})),!this.#t){t||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.();return}this.#r.run(()=>{t===this.#e.open.current&&(this.#e.open.current||I(this.#n,!1),I(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return p(this.#n)}get transitionStatus(){return p(this.#i)}#o(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}};function Se(){}function Ce(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var uA=new Ot("BitsConfig");function cA(){const e=new dA(null,{});return uA.getOr(e).opts}var dA=class{opts;constructor(e,t){const r=fA(e,t);this.opts={defaultPortalTo:r(n=>n.defaultPortalTo),defaultLocale:r(n=>n.defaultLocale)}}};function fA(e,t){return r=>R(()=>{const n=r(t)?.current;if(n!==void 0)return n;if(e!==null)return r(e.opts)?.current})}function im(e,t){return r=>{const n=cA();return R(()=>{const i=r();if(i!==void 0)return i;const s=e(n).current;return s!==void 0?s:t})}}var sm=im(e=>e.defaultLocale,"en"),iF=im(e=>e.defaultPortalTo,"body"),hA=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 ht(e,this.eventName,n,r)}};function om(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 am(e,t){return e===t||e.contains(t)}function lm(e){return e?.ownerDocument??document}function pA(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 um=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ma=um.join(","),cm=typeof Element>"u",si=cm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,va=!cm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ga=function(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return i===""||i==="true"||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ga(t.parentNode))},mA=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},dm=function(t,r,n){if(ga(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ma));return r&&si.call(t,ma)&&i.unshift(t),i=i.filter(n),i},ya=function(t,r,n){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!ga(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=ya(a.length?a:o.children,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{si.call(o,ma)&&n.filter(o)&&(r||!t.includes(o))&&i.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!ga(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&d){var u=ya(c===!0?o.children:c.children,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else s.unshift.apply(s,o.children)}}return i},fm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hm=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||mA(t))&&!fm(t)?0:t.tabIndex},vA=function(t,r){var n=hm(t);return n<0&&r&&!fm(t)?0:n},gA=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},pm=function(t){return t.tagName==="INPUT"},yA=function(t){return pm(t)&&t.type==="hidden"},bA=function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})},_A=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},wA=function(t){if(!t.name)return!0;var r=t.form||va(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=_A(i,t.form);return!s||s===t},kA=function(t){return pm(t)&&t.type==="radio"},SA=function(t){return kA(t)&&!wA(t)},EA=function(t){var r,n=t&&va(t),i=(r=n)===null||r===void 0?void 0:r.host,s=!1;if(n&&n!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var c,d,u;n=va(i),i=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=i)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return s},mm=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},xA=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var s=si.call(t,"details>summary:first-of-type")?t.parentElement:t;if(si.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var o=t;t;){var a=t.parentElement,l=va(t);if(a&&!a.shadowRoot&&i(a)===!0)return mm(t);t.assignedSlot?t=t.assignedSlot:!a&&l!==t.ownerDocument?t=l.host:t=a}t=o}if(EA(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return mm(t);return!1},TA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return si.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},ba=function(t,r){return!(r.disabled||yA(r)||xA(r,t)||bA(r)||TA(r))},Nu=function(t,r){return!(SA(r)||hm(r)<0||!ba(t,r))},AA=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},vm=function(t){var r=[],n=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=vA(a,o),c=o?vm(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(gA).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(r)},OA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:Nu.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:AA}):n=dm(t,r.includeContainer,Nu.bind(null,r)),vm(n)},CA=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ya([t],r.includeContainer,{filter:ba.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=dm(t,r.includeContainer,ba.bind(null,r)),n},DA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,ma)===!1?!1:Nu(r,t)},IA=um.concat("iframe:not([inert]):not([inert] *)").join(","),PA=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return si.call(t,IA)===!1?!1:ba(r,t)};function $A(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 Ru(e,t){return e>=0&&e<t.length}var MA="data-context-menu-trigger",FA="data-context-menu-content",sF=new Ot("Menu.Root"),oF=new Ot("Menu.Root | Menu.Sub"),aF=new Ot("Menu.Content"),lF=new Ot("Menu.Group | Menu.RadioGroup"),uF=new Ot("Menu.RadioGroup"),cF=new Ot("Menu.CheckboxGroup"),dF=new hA("bitsmenuopen",{bubbles:!1,cancelable:!0}),fF=fa({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;var NA=class jg{static create(t){return new jg(t)}opts;#e;#t;#r={pointerdown:!1};#n=!1;#i=!1;#s=void 0;#a;#o=Se;constructor(t){this.opts=t,this.#t=t.interactOutsideBehavior,this.#e=t.onInteractOutside,this.#a=t.onFocusOutside,me(()=>{this.#s=lm(this.opts.ref.current)});let r=Se;const n=()=>{this.#v(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),r()};tt([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return HT(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),r(),r=this.#u())}),n}),ni(()=>{this.#v.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#c.destroy(),this.#o(),r()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Ws(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#u(){return js(ht(this.#s,"pointerdown",js(this.#h,this.#f),{capture:!0}),ht(this.#s,"pointerdown",js(this.#p,this.#c)),ht(this.#s,"focusin",this.#l))}#d=t=>{let r=t;r.defaultPrevented&&(r=gm(t)),this.#e.current(t)};#c=om(t=>{if(!this.opts.ref.current){this.#o();return}const r=this.opts.isValidEvent.current(t,this.opts.ref.current)||zA(t,this.opts.ref.current);if(!this.#n||this.#y()||!r){this.#o();return}let n=t;if(n.defaultPrevented&&(n=gm(n)),this.#t.current!=="close"&&this.#t.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=ht(this.#s,"click",this.#d,{once:!0})):this.#e.current(n)},10);#h=t=>{this.#r[t.type]=!0};#p=t=>{this.#r[t.type]=!1};#f=()=>{this.opts.ref.current&&(this.#n=LA(this.opts.ref.current))};#m=t=>this.opts.ref.current?am(this.opts.ref.current,t):!1;#v=om(()=>{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 RA(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:r}])=>r==="close"||r==="ignore")}function LA(e){const t=[...globalThis.bitsDismissableLayers],r=RA(t);if(r)return r[0].opts.ref.current===e;const[n]=t[0];return n.opts.ref.current===e}function zA(e,t){const r=e.target;if(!oA(r))return!1;const n=!!r.closest(`[${MA}]`),i=!!t.closest(`[${FA}]`);return"button"in e&&e.button>0&&!n?!1:"button"in e&&e.button===0&&n&&i?!0:n&&i?!1:lm(r).documentElement.contains(r)&&!am(t,r)&&pA(e,t)}function gm(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 ym(e,t){ee(t,!0);let r=b(t,"interactOutsideBehavior",7,"close"),n=b(t,"onInteractOutside",7,Se),i=b(t,"onFocusOutside",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"isValidEvent",7,()=>!1),c=b(t,"ref",7);const d=NA.create({id:R(()=>s()),interactOutsideBehavior:R(()=>r()),onInteractOutside:R(()=>n()),enabled:R(()=>a()),onFocusOutside:R(()=>i()),isValidEvent:R(()=>l()),ref:c()});var u={get interactOutsideBehavior(){return r()},set interactOutsideBehavior(g="close"){r(g),y()},get onInteractOutside(){return n()},set onInteractOutside(g=Se){n(g),y()},get onFocusOutside(){return i()},set onFocusOutside(g=Se){i(g),y()},get id(){return s()},set id(g){s(g),y()},get children(){return o()},set children(g){o(g),y()},get enabled(){return a()},set enabled(g){a(g),y()},get isValidEvent(){return l()},set isValidEvent(g=()=>!1){l(g),y()},get ref(){return c()},set ref(g){c(g),y()}},h=K(),f=z(h);return _e(f,()=>o()??Fe,()=>({props:d.props})),S(e,h),te(u)}re(ym,{interactOutsideBehavior:{},onInteractOutside:{},onFocusOutside:{},id:{},children:{},enabled:{},isValidEvent:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsEscapeLayers??=new Map;var UA=class Zg{static create(t){return new Zg(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Li(this.opts.ref);let r=Se;tt(()=>t.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),r=this.#e()),()=>{r(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ht(this.domContext.getDocument(),"keydown",this.#t,{passive:!1});#t=t=>{if(t.key!=="Escape"||!VA(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 VA(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 bm(e,t){ee(t,!0);let r=b(t,"escapeKeydownBehavior",7,"close"),n=b(t,"onEscapeKeydown",7,Se),i=b(t,"children",7),s=b(t,"enabled",7),o=b(t,"ref",7);UA.create({escapeKeydownBehavior:R(()=>r()),onEscapeKeydown:R(()=>n()),enabled:R(()=>s()),ref:o()});var a={get escapeKeydownBehavior(){return r()},set escapeKeydownBehavior(d="close"){r(d),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(d=Se){n(d),y()},get children(){return i()},set children(d){i(d),y()},get enabled(){return s()},set enabled(d){s(d),y()},get ref(){return o()},set ref(d){o(d),y()}},l=K(),c=z(l);return _e(c,()=>i()??Fe),S(e,l),te(a)}re(bm,{escapeKeydownBehavior:{},onEscapeKeydown:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"});var BA=class Wg{static instance;#e=wr([]);#t=new WeakMap;#r=new WeakMap;static getInstance(){return this.instance||(this.instance=new Wg),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)}},qA=class Hg{#e=!1;#t=null;#r=BA.getInstance();#n=[];#i;constructor(t){this.#i=t}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#s(){for(const t of this.#n)t();this.#n=[]}mount(t){this.#t&&this.unmount(),this.#t=t,this.#r.register(this),this.#l(),this.#a()}unmount(){this.#t&&(this.#s(),this.#o(),this.#r.unregister(this),this.#r.clearPreFocusMemory(this),this.#t=null)}#a(){if(!this.#t)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;const r=this.#d();r?(r.focus(),this.#r.setFocusMemory(this,r)):this.#t.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const r=this.#r.getPreFocusMemory(this);if(r&&document.contains(r))try{r.focus()}catch{document.body.focus()}}}#l(){if(!this.#t||!this.#i.trap.current)return;const t=this.#t,r=t.ownerDocument,n=o=>{if(this.#e||!this.#r.isActiveScope(this))return;const a=o.target;if(a)if(t.contains(a))this.#r.setFocusMemory(this,a);else{const l=this.#r.getFocusMemory(this);if(l&&t.contains(l)&&PA(l))o.preventDefault(),l.focus();else{const c=this.#d(),d=this.#c()[0];(c||d||t).focus()}}},i=o=>{if(!this.#i.loop||this.#e||o.key!=="Tab"||!this.#r.isActiveScope(this))return;const a=this.#u();if(a.length===0)return;const l=a[0],c=a[a.length-1];!o.shiftKey&&r.activeElement===c?(o.preventDefault(),l.focus()):o.shiftKey&&r.activeElement===l&&(o.preventDefault(),c.focus())};this.#n.push(ht(r,"focusin",n,{capture:!0}),ht(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#r.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#d(),l=this.#c()[0],c=a||l;c?(c.focus(),this.#r.setFocusMemory(this,c)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#n.push(()=>s.disconnect())}#u(){return this.#t?OA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#u()[0]||null}#c(){return this.#t?CA(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let r=null;return tt([()=>t.ref.current,()=>t.enabled.current],([n,i])=>{n&&i?(r||(r=new Hg(t)),r.mount(n)):r&&(r.unmount(),r=null)}),ni(()=>{r?.unmount()}),{get props(){return{tabindex:-1}}}}};function _m(e,t){ee(t,!0);let r=b(t,"enabled",7,!1),n=b(t,"trapFocus",7,!1),i=b(t,"loop",7,!1),s=b(t,"onCloseAutoFocus",7,Se),o=b(t,"onOpenAutoFocus",7,Se),a=b(t,"focusScope",7),l=b(t,"ref",7);const c=qA.use({enabled:R(()=>r()),trap:R(()=>n()),loop:i(),onCloseAutoFocus:R(()=>s()),onOpenAutoFocus:R(()=>o()),ref:l()});var d={get enabled(){return r()},set enabled(f=!1){r(f),y()},get trapFocus(){return n()},set trapFocus(f=!1){n(f),y()},get loop(){return i()},set loop(f=!1){i(f),y()},get onCloseAutoFocus(){return s()},set onCloseAutoFocus(f=Se){s(f),y()},get onOpenAutoFocus(){return o()},set onOpenAutoFocus(f=Se){o(f),y()},get focusScope(){return a()},set focusScope(f){a(f),y()},get ref(){return l()},set ref(f){l(f),y()}},u=K(),h=z(u);return _e(h,()=>a()??Fe,()=>({props:c.props})),S(e,u),te(d)}re(_m,{enabled:{},trapFocus:{},loop:{},onCloseAutoFocus:{},onOpenAutoFocus:{},focusScope:{},ref:{}},[],[],{mode:"open"});var wm=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var jA=class Gg{static create(t){return new Gg(t)}opts;domContext;#e=Se;#t=!1;#r=wm;#n=wm;constructor(t){this.opts=t,this.domContext=new Li(t.ref);let r=Se;tt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([n,i,s])=>(this.#t=n,this.#r=i,this.#n=s,n&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),r(),r=this.#i()),()=>{this.#t=!1,r(),this.#o(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return js(ht(this.domContext.getDocument(),"pointerdown",this.#a),ht(this.domContext.getDocument(),"pointerup",zp(this.#o,this.#s)))}#s=t=>{this.#n(t)};#a=t=>{const r=this.opts.ref.current,n=t.target;!Sr(r)||!Sr(n)||!this.#t||!WA(this)||!QT(r,n)||(this.#r(t),!t.defaultPrevented&&(this.#e=ZA(r,this.domContext.getDocument().body)))};#o=()=>{this.#e(),this.#e=Se}},km=e=>e.style.userSelect||e.style.webkitUserSelect;function ZA(e,t){const r=km(t),n=km(e);return _a(t,"none"),_a(e,"text"),()=>{_a(t,r),_a(e,n)}}function _a(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function WA(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const r=t.at(-1);return r?r[0]===e:!1}function Sm(e,t){ee(t,!0);let r=b(t,"preventOverflowTextSelection",7,!0),n=b(t,"onPointerDown",7,Se),i=b(t,"onPointerUp",7,Se),s=b(t,"id",7),o=b(t,"children",7),a=b(t,"enabled",7),l=b(t,"ref",7);jA.create({id:R(()=>s()),onPointerDown:R(()=>n()),onPointerUp:R(()=>i()),enabled:R(()=>a()&&r()),ref:l()});var c={get preventOverflowTextSelection(){return r()},set preventOverflowTextSelection(h=!0){r(h),y()},get onPointerDown(){return n()},set onPointerDown(h=Se){n(h),y()},get onPointerUp(){return i()},set onPointerUp(h=Se){i(h),y()},get id(){return s()},set id(h){s(h),y()},get children(){return o()},set children(h){o(h),y()},get enabled(){return a()},set enabled(h){a(h),y()},get ref(){return l()},set ref(h){l(h),y()}},d=K(),u=z(d);return _e(u,()=>o()??Fe),S(e,d),te(c)}re(Sm,{preventOverflowTextSelection:{},onPointerDown:{},onPointerUp:{},id:{},children:{},enabled:{},ref:{}},[],[],{mode:"open"}),globalThis.bitsIdCounter??={current:0};function Mn(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var HA=class{#e;#t=0;#r=Q();#n;constructor(e){this.#e=e}#i(){this.#t-=1,this.#n&&this.#t<=0&&(this.#n(),I(this.#r,void 0),this.#n=void 0)}get(...e){return this.#t+=1,p(this.#r)===void 0&&(this.#n=_s(()=>{I(this.#r,this.#e(...e),!0)})),me(()=>()=>{this.#i()}),p(this.#r)}},wa=new FT,ka=Q(null),Lu=null,Hs=null,Gs=!1,Em=R(()=>{for(const e of wa.values())if(e)return!0;return!1}),zu=null,GA=new HA(()=>{function e(){document.body.setAttribute("style",p(ka)??""),document.body.style.removeProperty("--scrollbar-width"),rm&&Lu?.(),I(ka,null)}function t(){Hs!==null&&(window.clearTimeout(Hs),Hs=null)}function r(i,s){t(),Gs=!0,zu=Date.now();const o=zu,a=()=>{Hs=null,zu===o&&(xm(wa)?Gs=!1:(Gs=!1,s()))},l=i===null?24:i;Hs=window.setTimeout(a,l)}function n(){p(ka)===null&&wa.size===0&&!Gs&&I(ka,document.body.getAttribute("style"),!0)}return tt(()=>Em.current,()=>{if(!Em.current)return;n(),Gs=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",rm&&(Lu=ht(document,"touchmove",c=>{c.target===document.documentElement&&(c.touches.length>1||c.preventDefault())},{passive:!1})),Ws(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),ni(()=>()=>{Lu?.()}),{get lockMap(){return wa},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:r,cancelPendingCleanup:t,ensureInitialStyleCaptured:n}}),KA=class{#e=Mn();#t;#r=()=>null;#n;locked;constructor(e,t=()=>null){this.#t=e,this.#r=t,this.#n=GA.get(),this.#n&&(this.#n.cancelPendingCleanup(),this.#n.ensureInitialStyleCaptured(),this.#n.lockMap.set(this.#e,this.#t??!1),this.locked=R(()=>this.#n.lockMap.get(this.#e)??!1,r=>this.#n.lockMap.set(this.#e,r)),ni(()=>{if(this.#n.lockMap.delete(this.#e),xm(this.#n.lockMap))return;const r=this.#r();this.#n.scheduleCleanupIfNoNewLocks(r,()=>{this.#n.resetBodyStyle()})}))}};function xm(e){for(const[t,r]of e)if(r)return!0;return!1}function Uu(e,t){ee(t,!0);let r=b(t,"preventScroll",7,!0),n=b(t,"restoreScrollDelay",7,null);return r()&&new KA(r(),()=>n()),te({get preventScroll(){return r()},set preventScroll(i=!0){r(i),y()},get restoreScrollDelay(){return n()},set restoreScrollDelay(i=null){n(i),y()}})}re(Uu,{preventScroll:{},restoreScrollDelay:{}},[],[],{mode:"open"});function YA(e){if(!on||!e)return null;let t=e.querySelector("[data-bits-announcer]");const r=i=>{const s=e.createElement("div");return s.role="log",s.ariaLive=i,s.setAttribute("aria-relevant","additions"),s};if(!Sr(t)){const i=e.createElement("div");i.style.cssText=$T,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(!Sr(t))return null;const s=t.querySelector(`[aria-live="${i}"]`);return Sr(s)?s:null}}}function Sa(e){const t=YA(e);function r(n,i="assertive",s=7500){if(!t||!on||!e)return;const o=t.getLog(i),a=e.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,i==="assertive"?o?.replaceChildren(a):o?.appendChild(a),setTimeout(()=>{a.remove()},s)}return{announce:r}}var JA={defaultValue:void 0,granularity:"day"};function Tm(e){const{defaultValue:t,granularity:r,minValue:n,maxValue:i}={...JA,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let s=new Date;n&&s<n.toDate(Ut())?s=n.toDate(Ut()):i&&s>i.toDate(Ut())&&(s=i.toDate(Ut()));const o=s.getFullYear(),a=s.getMonth()+1,l=s.getDate();return["hour","minute","second"].includes(r??"day")?new Ii(o,a,l,0,0,0):new Ls(o,a,l)}}function Am(e,t){let r;return t instanceof On?r=ep(e):t instanceof Ii?r=Qh(e):r=ra(e),r.calendar!==t.calendar?Kt(r,t.calendar):r}function Vt(e,t=Ut()){return e instanceof On?e.toDate():e.toDate(t)}function XA(e){if(e instanceof Ls)return"date";if(e instanceof Ii)return"datetime";if(e instanceof On)return"zoneddatetime";throw new Error("Unknown date type")}function QA(e,t){switch(t){case"date":return ra(e);case"datetime":return Qh(e);case"zoneddatetime":return ep(e);default:throw new Error(`Unknown date type: ${t}`)}}function eO(e){return e instanceof Ii}function Vu(e){return e instanceof On}function Ea(e){return eO(e)||Vu(e)}function Ks(e){if(e instanceof Date){const t=e.getFullYear(),r=e.getMonth()+1;return new Date(t,r,0).getDate()}else return e.set({day:100}).day}function oi(e,t){return e.compare(t)<0}function tO(e,t){return e.compare(t)>0}function Om(e,t,r){const n=Fh(e,r);return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function Cm(e,t,r){const n=Fh(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 xa=["day","month","year"],Ta=["hour","minute","second","dayPeriod"],Dm=["literal","timeZoneName"],Ys=[...xa,...Ta],Im=[...Ys,...Dm],rO=[...Ta,...Dm],hF=Im.filter(e=>e!=="literal"),pF=rO.filter(e=>e!=="literal"),nO=["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"],iO=["year","month","day"],Bu={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 sO(e){if(Pm(e))return Bu[e];{const t=uO(e);return Pm(t)?Bu[t]:Bu.en}}function qu(e,t,r){return oO(e)?sO(r)[e]:lO(e)?t:aO(e)?"––":""}function Pm(e){return nO.includes(e)}function oO(e){return iO.includes(e)}function aO(e){return e==="hour"||e==="minute"||e==="second"}function lO(e){return e==="era"||e==="dayPeriod"}function uO(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function ju(e){const t=["hour","minute","second"],r=Ys.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null?!1:e==="day"?!t.includes(n):!0);return Object.fromEntries(r)}function cO(e){const{segmentValues:t,formatter:r,locale:n,dateRef:i}=e,s=Object.keys(t).reduce((a,l)=>{if(!Mm(l))return a;if("hour"in t&&l==="dayPeriod"){const c=t[l];$n(c)?a[l]=qu(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(!$n(l)&&!$n(d)){const u=r.part(i.set({[a]:l}),a,{hourCycle:e.hourCycle===24?"h23":void 0}),h=e.hourCycle===12||e.hourCycle===void 0&&Nm(n)===12;if(a==="hour"&&h){if(d>12){const f=d-12;return f===0?"12":f<10?`0${f}`:`${f}`}return d===0?"12":d<10?`0${d}`:`${d}`}return a==="year"?`${l}`:c&&u.length===1?`0${u}`:u}else return qu(a,"",n)}else{if(Aa(a)){const l=t[a],c=typeof l=="string"&&l?.startsWith("0");if(l==="0")return"0";if($n(l))return qu(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 dO(e){const{granularity:t,dateRef:r,formatter:n,contentObj:i,hideTimeZone:s,hourCycle:o}=e;return n.toParts(r,hO(t,o)).map(a=>["literal","dayPeriod","timeZoneName",null].includes(a.type)||!Mm(a.type)?{part:a.type,value:a.value}:{part:a.type,value:i[a.type]}).filter(a=>!($n(a.part)||$n(a.value)||a.part==="timeZoneName"&&(!Vu(r)||s)))}function fO(e){const t=cO(e);return{obj:t,arr:dO({contentObj:t,...e})}}function hO(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 $m(){return Ys.reduce((e,t)=>(e[t]={lastKeyZero:!1,hasLeftFocus:!0,updating:null},e),{})}function Aa(e){return xa.includes(e)}function Mm(e){return Ys.includes(e)}function pO(e){return Im.includes(e)}function Fm(e){return!on||!e?[]:Oa(e).map(t=>t.dataset.segment).filter(t=>Ys.includes(t))}function mO(e){const{segmentObj:t,fieldNode:r,dateRef:n}=e,i=Fm(r);let s=n;for(const o of i)if("hour"in t){const a=t[o];if($n(a))continue;s=s.set({[o]:t[o]})}else if(Aa(o)){const a=t[o];if($n(a))continue;s=s.set({[o]:t[o]})}return s}function vO(e,t){const r=Fm(t);for(const n of r)if("hour"in e){if(e[n]===null)return!1}else if(Aa(n)&&e[n]===null)return!1;return!0}function gO(e){return typeof e!="object"||e===null?!1:Object.entries(e).every(([t,r])=>(Ta.includes(t)||xa.includes(t))&&(t==="dayPeriod"?r==="AM"||r==="PM"||r===null:typeof r=="string"||typeof r=="number"||r===null))}function yO(e,t){return t||(Ea(e)?"minute":"day")}function Zu(e){return!!(["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Backspace"," "].includes(e)||ha(e))}function bO(e,t){if(!on)return!1;const r=Oa(t);return r.length?r[0].id===e:!1}function _O(e){const{id:t,formatter:r,value:n,doc:i}=e;if(!on)return;const s=r.selectedDate(n),o=i.getElementById(t);if(o)o.innerText=`Selected Date: ${s}`;else{const a=i.createElement("div");a.style.cssText=Zs({display:"none"}),a.id=t,a.innerText=`Selected Date: ${s}`,i.body.appendChild(a)}}function wO(e,t){if(!on)return;const r=t.getElementById(e);r&&t.body.removeChild(r)}function Nm(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date("2023-01-01T13:00:00")).find(t=>t.type==="hour")?.value==="1"?12:24}function Js(e,t){const r=e.currentTarget;if(!Sr(r))return;const{prev:n,next:i}=Wu(r,t);if(e.key==="ArrowLeft"){if(!n)return;n.focus()}else if(e.key==="ArrowRight"){if(!i)return;i.focus()}}function kO(e,t){const r=t.indexOf(e);return r===t.length-1||r===-1?null:t[r+1]}function SO(e,t){const r=t.indexOf(e);return r===0||r===-1?null:t[r-1]}function Wu(e,t){const r=Oa(t);return r.length?{next:kO(e,r),prev:SO(e,r)}:{next:null,prev:null}}function Rm(e,t){const r=e.currentTarget;if(!Sr(r))return;const{next:n}=Wu(r,t);n&&n.focus()}function Lm(e,t){const r=e.currentTarget;if(!Sr(r))return;const{prev:n}=Wu(r,t);n&&n.focus()}function Xs(e){return e==="ArrowRight"||e==="ArrowLeft"}function Oa(e){return e?Array.from(e.querySelectorAll("[data-segment]")).filter(t=>{if(!Sr(t))return!1;const r=t.dataset.segment;return r==="trigger"?!0:!(!pO(r)||r==="literal")}):[]}function EO(e){return Oa(e)[0]}var xO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function zm(e){let t=e.initialLocale;function r(f){t=f}function n(){return t}function i(f,g){return new Br(t,g).format(f)}function s(f,g=!0){return Ea(f)&&g?i(Vt(f),{dateStyle:"long",timeStyle:"long"}):i(Vt(f),{dateStyle:"long"})}function o(f){return typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function"?new Br(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(f):`${typeof e.monthFormat.current=="function"?e.monthFormat.current(f.getMonth()+1):new Br(t,{month:e.monthFormat.current}).format(f)} ${typeof e.yearFormat.current=="function"?e.yearFormat.current(f.getFullYear()):new Br(t,{year:e.yearFormat.current}).format(f)}`}function a(f){return new Br(t,{month:"long"}).format(f)}function l(f){return new Br(t,{year:"numeric"}).format(f)}function c(f,g){return Vu(f)?new Br(t,{...g,timeZone:f.timeZone}).formatToParts(Vt(f)):new Br(t,g).formatToParts(Vt(f))}function d(f,g="narrow"){return new Br(t,{weekday:g}).format(f)}function u(f,g=void 0){return new Br(t,{hour:"numeric",minute:"numeric",hourCycle:g===24?"h23":void 0}).formatToParts(f).find(m=>m.type==="dayPeriod")?.value==="PM"?"PM":"AM"}function h(f,g,m={}){const v=c(f,{...xO,...m}).find(_=>_.type===g);return v?v.value:""}return{setLocale:r,getLocale:n,fullMonth:a,fullYear:l,fullMonthAndYear:o,toParts:c,custom:i,part:h,dayPeriod:u,selectedDate:s,dayOfWeek:d}}function TO(e){return!(!Sr(e)||!e.hasAttribute("data-bits-day"))}function Um(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 Hu(e){const{dateObj:t,weekStartsOn:r,fixedWeeks:n,locale:i}=e,s=Ks(t),o=Array.from({length:s},(m,v)=>t.set({day:v+1})),a=du(t),l=k1(t),c=r!==void 0?Om(a,r,"en-US"):Om(a,0,i),d=r!==void 0?Cm(l,r,"en-US"):Cm(l,0,i),u=Um(c.subtract({days:1}),a),h=Um(l,d.add({days:1})),f=u.length+o.length+h.length;if(n&&f<42){const m=42-f;let v=h[h.length-1];v||(v=t.add({months:1}).set({day:1}));let _=m;h.length===0&&(_=m-1,h.push(v));const x=Array.from({length:_},(A,E)=>{const T=E+1;return v.add({days:T})});h.push(...x)}const g=u.concat(o,h);return{value:t,dates:g,weeks:$A(g,7)}}function Qs(e){const{numberOfMonths:t,dateObj:r,...n}=e,i=[];if(!t||t===1)return i.push(Hu({...n,dateObj:r})),i;i.push(Hu({...n,dateObj:r}));for(let s=1;s<t;s++){const o=r.add({months:s});i.push(Hu({...n,dateObj:o}))}return i}function Gu(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>Sr(t)):[]}function Vm(e,t){const r=e.getAttribute("data-value");r&&(t.current=Am(r,t.current))}function AO({node:e,add:t,placeholder:r,calendarNode:n,isPrevButtonDisabled:i,isNextButtonDisabled:s,months:o,numberOfMonths:a}){const l=Gu(n);if(!l.length)return;const c=l.indexOf(e)+t;if(Ru(c,l)){const d=l[c];return Vm(d,r),d.focus()}if(c<0){if(i)return;const d=o[0]?.value;if(!d)return;r.current=d.subtract({months:a}),Ws(()=>{const u=Gu(n);if(!u.length)return;const h=u.length-Math.abs(c);if(Ru(h,u)){const f=u[h];return Vm(f,r),f.focus()}})}if(c>=l.length){if(s)return;const d=o[0]?.value;if(!d)return;r.current=d.add({months:a}),Ws(()=>{const u=Gu(n);if(!u.length)return;const h=c-l.length;if(Ru(h,u))return u[h].focus()})}}var Bm=[Mu,Fu,em,tm],qm=[iA," "];function OO({event:e,handleCellClick:t,shiftFocus:r,placeholderValue:n}){const i=e.target;if(!TO(i)||!Bm.includes(e.key)&&!qm.includes(e.key))return;e.preventDefault();const s={[Mu]:7,[Fu]:-7,[em]:-1,[tm]:1};if(Bm.includes(e.key)){const o=s[e.key];o!==void 0&&r(i,o)}if(qm.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,Am(o,n))}}function CO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.add({months:r}));else{const c=l.add({months:1}),d=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function DO({months:e,setMonths:t,numberOfMonths:r,pagedNavigation:n,weekStartsOn:i,locale:s,fixedWeeks:o,setPlaceholder:a}){const l=e[0]?.value;if(l)if(n)a(l.subtract({months:r}));else{const c=l.subtract({months:1}),d=Qs({dateObj:c,weekStartsOn:i,locale:s,fixedWeeks:o,numberOfMonths:r});a(c),t(d)}}function IO({months:e,formatter:t,weekdayFormat:r}){if(!e.length)return[];const n=e[0].weeks[0];return n?n.map(i=>t.dayOfWeek(Vt(i),r)):[]}function PO(e){me(()=>{const t=e.weekStartsOn.current,r=e.locale.current,n=e.fixedWeeks.current,i=e.numberOfMonths.current;qe(()=>{const s=e.placeholder.current;if(!s)return;const o={weekStartsOn:t,locale:r,fixedWeeks:n,numberOfMonths:i};e.setMonths(Qs({...o,dateObj:s}))})})}function $O({calendarNode:e,label:t,accessibleHeadingId:r}){const n=da(e),i=n.createElement("div");i.style.cssText=Zs({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const s=n.createElement("div");return s.textContent=t,s.id=r,s.role="heading",s.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(s),()=>{const o=n.getElementById(r);o&&(i.parentElement?.removeChild(i),o.remove())}}function MO({placeholder:e,getVisibleMonths:t,weekStartsOn:r,locale:n,fixedWeeks:i,numberOfMonths:s,setMonths:o}){me(()=>{e.current,qe(()=>{t().some(a=>uu(a,e.current))||o(Qs({weekStartsOn:r.current,locale:n.current,fixedWeeks:i.current,numberOfMonths:s.current,dateObj:e.current}))})})}function FO({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?tO(n.add({months:1}).set({day:1}),e):!1}function NO({minValue:e,months:t,disabled:r}){if(!e||!t.length)return!1;if(r)return!0;const n=t[0]?.value;return n?oi(n.subtract({months:1}).set({day:35}),e):!1}function RO({months:e,locale:t,formatter:r}){if(!e.length)return"";if(t!==r.getLocale()&&r.setLocale(t),e.length===1){const c=Vt(e[0].value);return`${r.fullMonthAndYear(c)}`}const n=Vt(e[0].value),i=Vt(e[e.length-1].value),s=r.fullMonth(n),o=r.fullMonth(i),a=r.fullYear(n),l=r.fullYear(i);return a===l?`${s} - ${o} ${l}`:`${s} ${a} - ${o} ${l}`}function LO({fullCalendarLabel:e,id:t,isInvalid:r,disabled:n,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":Le(r),"data-disabled":Le(n),"data-readonly":Le(i)}}function zO(e){const t=da(e.target).querySelector("[data-bits-day][data-focused]");t&&(e.preventDefault(),t?.focus())}function UO(e){if(!on)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const r=t[0],n=r?.getAttribute("data-value"),i=r?.getAttribute("data-type");if(!(!n||!i))return QA(n,i)}function VO({ref:e,placeholder:t,defaultPlaceholder:r,minValue:n,maxValue:i,isDateDisabled:s}){function o(a){return!!(s.current(a)||n.current&&oi(a,n.current)||i.current&&oi(i.current,a))}tt(()=>e.current,()=>{e.current&&t.current&&xn(t.current,r)&&o(r)&&(t.current=UO(e.current)??r)})}function BO(e,t){return!e||!t?e:Ea(e)&&Ea(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var qO=fa({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function jO(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 Er=new Ot("Calendar.Root | RangeCalender.Root"),jm=class Kg{static create(t){return Er.set(new Kg(t))}opts;#e=D(()=>this.months.map(t=>t.value));get visibleMonths(){return p(this.#e)}set visibleMonths(t){I(this.#e,t)}formatter;accessibleHeadingId=Mn();domContext;attachment;#t=Q($e([]));get months(){return p(this.#t)}set months(t){I(this.#t,t,!0)}announcer;constructor(t){this.opts=t,this.attachment=Qe(this.opts.ref),this.domContext=new Li(t.ref),this.announcer=Sa(null),this.formatter=zm({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),rn(()=>{this.announcer=Sa(this.domContext.getDocument())}),this.months=Qs({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#s(),this.#a(),this.#o(),MO({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}),PO({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),tt(()=>this.fullCalendarLabel,r=>{const n=this.domContext.getElementById(this.accessibleHeadingId);n&&(n.textContent=r)}),tt(()=>this.opts.value.current,()=>{const r=this.opts.value.current;if(Array.isArray(r)&&r.length){const n=r[r.length-1];n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}else!Array.isArray(r)&&r&&this.opts.placeholder.current!==r&&(this.opts.placeholder.current=r)}),VO({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(()=>IO({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#r)}set weekdays(t){I(this.#r,t)}#n=D(()=>qe(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#n)}set initialPlaceholderYear(t){I(this.#n,t)}#i=D(()=>jO({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(t){I(this.#i,t)}#s(){me(()=>{if(qe(()=>this.opts.initialFocus.current)){const t=this.opts.ref.current?.querySelector("[data-focused]");t&&t.focus()}})}#a(){me(()=>{if(this.opts.ref.current)return $O({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#o(){kl(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){CO({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(){DO({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(()=>FO({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#l)}set isNextButtonDisabled(t){I(this.#l,t)}#u=D(()=>NO({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(this.#u)}set isPrevButtonDisabled(t){I(this.#u,t)}#d=D(()=>{const t=this.opts.value.current,r=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(t)){if(!t.length)return!1;for(const i of t)if(r(i)||n(i))return!0}else{if(!t)return!1;if(r(t)||n(t))return!0}return!1});get isInvalid(){return p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,RO({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#c)}set headingValue(t){I(this.#c,t)}#h=D(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#h)}set fullCalendarLabel(t){I(this.#h,t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(r=>uu(t,r))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const r=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(r&&oi(t,r)||n&&oi(n,t))}isDateSelected(t){const r=this.opts.value.current;return Array.isArray(r)?r.some(n=>xn(n,t)):r?xn(r,t):!1}shiftFocus(t,r){return AO({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=BO(i,n),i!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(t,r){if(!t){const s=[r];return this.#p(s)?s:[r]}if(!Array.isArray(t))return;const n=t.findIndex(s=>xn(s,r)),i=this.opts.preventDeselect.current;if(n===-1){const s=[...t,r];return this.#p(s)?s:[r]}else{if(i)return t;{const s=t.filter(o=>!xn(o,r));if(!s.length){this.opts.placeholder.current=r;return}return s}}}handleSingleUpdate(t,r){if(Array.isArray(t),!t)return r;if(!this.opts.preventDeselect.current&&xn(t,r)){this.opts.placeholder.current=r;return}return r}onkeydown(t){OO({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#f=D(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#f)}set snippetProps(t){I(this.#f,t)}getBitsAttr=t=>qO.getAttr(t);#m=D(()=>({...LO({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#m)}set props(t){I(this.#m,t)}},ZO=class Yg{static create(t){return new Yg(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":$u(!0),"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},Zm=new Ot("Calendar.Cell | RangeCalendar.Cell"),WO=class Jg{static create(t){return Zm.set(new Jg(t,Er.get()))}opts;root;#e=D(()=>Vt(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(t){I(this.#e,t)}#t=D(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(t){I(this.#t,t)}#r=D(()=>y1(this.opts.date.current,Ut()));get isDateToday(){return p(this.#r)}set isDateToday(t){I(this.#r,t)}#n=D(()=>!uu(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#n)}set isOutsideMonth(t){I(this.#n,t)}#i=D(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(this.#i)}set isOutsideVisibleMonths(t){I(this.#i,t)}#s=D(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return p(this.#s)}set isDisabled(t){I(this.#s,t)}#a=D(()=>xn(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#a)}set isFocusedDate(t){I(this.#a,t)}#o=D(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(this.#o)}set isSelectedDate(t){I(this.#o,t)}#l=D(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}));get labelText(){return p(this.#l)}set labelText(t){I(this.#l,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#u=D(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return p(this.#u)}set snippetProps(t){I(this.#u,t)}#d=D(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return p(this.#d)}set ariaDisabled(t){I(this.#d,t)}#c=D(()=>({"data-unavailable":Le(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":Le(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":XA(this.opts.date.current),"data-disabled":Le(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#c)}set sharedDataAttrs(t){I(this.#c,t)}#h=D(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":kr(this.isSelectedDate),"aria-disabled":kr(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}));get props(){return p(this.#h)}set props(t){I(this.#h,t)}},HO=class Xg{static create(t){return new Xg(t,Zm.get())}opts;cell;attachment;constructor(t,r){this.opts=t,this.cell=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}#e=D(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}#t=D(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return p(this.#t)}set snippetProps(t){I(this.#t,t)}#r=D(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":kr(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},GO=class Qg{static create(t){return new Qg(t,Er.get())}opts;root;#e=D(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.nextPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":kr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},KO=class ey{static create(t){return new ey(t,Er.get())}opts;root;#e=D(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(t){I(this.#e,t)}attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(this.opts.ref)}onclick(t){this.isDisabled||this.root.prevPage()}#t=D(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":kr(this.isDisabled),"data-disabled":Le(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},YO=class ty{static create(t){return new ty(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":kr(this.root.opts.readonly.current),"aria-disabled":kr(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),"data-disabled":Le(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},JO=class ry{static create(t){return new ry(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},XO=class ny{static create(t){return new ny(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},QO=class iy{static create(t){return new iy(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},eC=class sy{static create(t){return new sy(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},tC=class oy{static create(t){return new oy(t,Er.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref)}#e=D(()=>({id:this.opts.id.current,"data-disabled":Le(this.root.opts.disabled.current),"data-readonly":Le(this.root.opts.readonly.current),[this.root.getBitsAttr("header")]:"",...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},rC=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"]),nC=W("<div><!></div>");function Wm(e,t){ee(t,!0);let r=b(t,"child",7),n=b(t,"children",7),i=b(t,"id",23,Mn),s=b(t,"ref",15,null),o=b(t,"value",15),a=b(t,"onValueChange",7,Se),l=b(t,"placeholder",15),c=b(t,"onPlaceholderChange",7,Se),d=b(t,"weekdayFormat",7,"narrow"),u=b(t,"weekStartsOn",7),h=b(t,"pagedNavigation",7,!1),f=b(t,"isDateDisabled",7,()=>!1),g=b(t,"isDateUnavailable",7,()=>!1),m=b(t,"fixedWeeks",7,!1),v=b(t,"numberOfMonths",7,1),_=b(t,"locale",7),x=b(t,"calendarLabel",7,"Event"),A=b(t,"disabled",7,!1),E=b(t,"readonly",7,!1),T=b(t,"minValue",7,void 0),O=b(t,"maxValue",7,void 0),$=b(t,"preventDeselect",7,!1),L=b(t,"type",7),H=b(t,"disableDaysOutsideMonth",7,!0),N=b(t,"initialFocus",7,!1),se=b(t,"maxDays",7),V=b(t,"monthFormat",7,"long"),oe=b(t,"yearFormat",7,"numeric"),pe=je(t,rC);const Y=Tm({defaultValue:o(),minValue:T(),maxValue:O()});function ie(){l()===void 0&&l(Y)}ie(),tt.pre(()=>l(),()=>{ie()});function B(){o()===void 0&&o(L()==="single"?void 0:[])}B(),tt.pre(()=>o(),()=>{B()});const j=jm.create({id:R(()=>i()),ref:R(()=>s(),U=>s(U)),weekdayFormat:R(()=>d()),weekStartsOn:R(()=>u()),pagedNavigation:R(()=>h()),isDateDisabled:R(()=>f()),isDateUnavailable:R(()=>g()),fixedWeeks:R(()=>m()),numberOfMonths:R(()=>v()),locale:sm(()=>_()),calendarLabel:R(()=>x()),readonly:R(()=>E()),disabled:R(()=>A()),minValue:R(()=>T()),maxValue:R(()=>O()),disableDaysOutsideMonth:R(()=>H()),initialFocus:R(()=>N()),maxDays:R(()=>se()),placeholder:R(()=>l(),U=>{l(U),c()(U)}),preventDeselect:R(()=>$()),value:R(()=>o(),U=>{o(U),a()(U)}),type:R(()=>L()),monthFormat:R(()=>V()),yearFormat:R(()=>oe()),defaultPlaceholder:Y}),G=D(()=>We(pe,j.props));var J={get child(){return r()},set child(U){r(U),y()},get children(){return n()},set children(U){n(U),y()},get id(){return i()},set id(U=Mn()){i(U),y()},get ref(){return s()},set ref(U=null){s(U),y()},get value(){return o()},set value(U){o(U),y()},get onValueChange(){return a()},set onValueChange(U=Se){a(U),y()},get placeholder(){return l()},set placeholder(U){l(U),y()},get onPlaceholderChange(){return c()},set onPlaceholderChange(U=Se){c(U),y()},get weekdayFormat(){return d()},set weekdayFormat(U="narrow"){d(U),y()},get weekStartsOn(){return u()},set weekStartsOn(U){u(U),y()},get pagedNavigation(){return h()},set pagedNavigation(U=!1){h(U),y()},get isDateDisabled(){return f()},set isDateDisabled(U=()=>!1){f(U),y()},get isDateUnavailable(){return g()},set isDateUnavailable(U=()=>!1){g(U),y()},get fixedWeeks(){return m()},set fixedWeeks(U=!1){m(U),y()},get numberOfMonths(){return v()},set numberOfMonths(U=1){v(U),y()},get locale(){return _()},set locale(U){_(U),y()},get calendarLabel(){return x()},set calendarLabel(U="Event"){x(U),y()},get disabled(){return A()},set disabled(U=!1){A(U),y()},get readonly(){return E()},set readonly(U=!1){E(U),y()},get minValue(){return T()},set minValue(U=void 0){T(U),y()},get maxValue(){return O()},set maxValue(U=void 0){O(U),y()},get preventDeselect(){return $()},set preventDeselect(U=!1){$(U),y()},get type(){return L()},set type(U){L(U),y()},get disableDaysOutsideMonth(){return H()},set disableDaysOutsideMonth(U=!0){H(U),y()},get initialFocus(){return N()},set initialFocus(U=!1){N(U),y()},get maxDays(){return se()},set maxDays(U){se(U),y()},get monthFormat(){return V()},set monthFormat(U="long"){V(U),y()},get yearFormat(){return oe()},set yearFormat(U="numeric"){oe(U),y()}},le=K(),he=z(le),F=U=>{var ge=K(),de=z(ge);{let w=D(()=>({props:p(G),...j.snippetProps}));_e(de,r,()=>p(w))}S(U,ge)},ue=U=>{var ge=nC();Ne(ge,()=>({...p(G)}));var de=M(ge);_e(de,()=>n()??Fe,()=>j.snippetProps),P(ge),S(U,ge)};return ce(he,U=>{r()?U(F):U(ue,-1)}),S(e,le),te(J)}re(Wm,{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 iC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),sC=W("<div><!></div>");function Ku(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,iC);const l=HO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);{let x=D(()=>({props:p(c),...l.snippetProps}));_e(_,i,()=>p(x))}S(m,v)},g=m=>{var v=sC();Ne(v,()=>({...p(c)}));var _=M(v),x=E=>{var T=K(),O=z(T);_e(O,()=>n()??Fe,()=>l.snippetProps),S(E,T)},A=E=>{var T=Rt();ae(()=>ne(T,l.cell.opts.date.current.day)),S(E,T)};ce(_,E=>{n()?E(x):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(Ku,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var oC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),aC=W("<table><!></table>");function Yu(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,oC);const l=YO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=aC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(Yu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var lC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),uC=W("<tbody><!></tbody>");function Ju(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,lC);const l=JO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=uC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(Ju,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var cC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id","date","month"]),dC=W("<td><!></td>");function Xu(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"date",7),l=b(t,"month",7),c=je(t,cC);const d=WO.create({id:R(()=>o()),ref:R(()=>s(),_=>s(_)),date:R(()=>a()),month:R(()=>l())}),u=D(()=>We(c,d.props));var h={get children(){return n()},set children(_){n(_),y()},get child(){return i()},set child(_){i(_),y()},get ref(){return s()},set ref(_=null){s(_),y()},get id(){return o()},set id(_=Ce(r)){o(_),y()},get date(){return a()},set date(_){a(_),y()},get month(){return l()},set month(_){l(_),y()}},f=K(),g=z(f),m=_=>{var x=K(),A=z(x);{let E=D(()=>({props:p(u),...d.snippetProps}));_e(A,i,()=>p(E))}S(_,x)},v=_=>{var x=dC();Ne(x,()=>({...p(u)}));var A=M(x);_e(A,()=>n()??Fe,()=>d.snippetProps),P(x),S(_,x)};return ce(g,_=>{i()?_(m):_(v,-1)}),S(e,f),te(h)}re(Xu,{children:{},child:{},ref:{},id:{},date:{},month:{}},[],[],{mode:"open"});var fC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),hC=W("<thead><!></thead>");function Qu(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,fC);const l=XO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=hC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(Qu,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var pC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),mC=W("<th><!></th>");function ec(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,pC);const l=eC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=mC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(ec,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var vC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),gC=W("<tr><!></tr>");function eo(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,vC);const l=QO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=gC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(eo,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var yC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),bC=W("<header><!></header>");function tc(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,yC);const l=tC.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c)})),S(m,v)},g=m=>{var v=bC();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>n()??Fe),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(tc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var _C=new Set(["$$slots","$$events","$$legacy","$$host","children","child","ref","id"]),wC=W("<div><!></div>");function rc(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=je(t,_C);const l=ZO.create({id:R(()=>o()),ref:R(()=>s(),m=>s(m))}),c=D(()=>We(a,l.props));var d={get children(){return n()},set children(m){n(m),y()},get child(){return i()},set child(m){i(m),y()},get ref(){return s()},set ref(m=null){s(m),y()},get id(){return o()},set id(m=Ce(r)){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,i,()=>({props:p(c),headingValue:l.root.headingValue})),S(m,v)},g=m=>{var v=wC();Ne(v,()=>({...p(c)}));var _=M(v),x=E=>{var T=K(),O=z(T);_e(O,()=>n()??Fe,()=>({headingValue:l.root.headingValue})),S(E,T)},A=E=>{var T=Rt();ae(()=>ne(T,l.root.headingValue)),S(E,T)};ce(_,E=>{n()?E(x):E(A,-1)}),P(v),S(m,v)};return ce(h,m=>{i()?m(f):m(g,-1)}),S(e,u),te(d)}re(rc,{children:{},child:{},ref:{},id:{}},[],[],{mode:"open"});var kC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),SC=W("<button><!></button>");function nc(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,kC);const c=GO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},h=K(),f=z(h),g=v=>{var _=K(),x=z(_);_e(x,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=SC();Ne(_,()=>({...p(d)}));var x=M(_);_e(x,()=>n()??Fe),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),te(u)}re(nc,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var EC=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","tabindex"]),xC=W("<button><!></button>");function ic(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"tabindex",7,0),l=je(t,EC);const c=KO.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v))}),d=D(()=>We(l,c.props,{tabindex:a()}));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get tabindex(){return a()},set tabindex(v=0){a(v),y()}},h=K(),f=z(h),g=v=>{var _=K(),x=z(_);_e(x,i,()=>({props:p(d)})),S(v,_)},m=v=>{var _=xC();Ne(_,()=>({...p(d)}));var x=M(_);_e(x,()=>n()??Fe),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),te(u)}re(ic,{children:{},child:{},id:{},ref:{},tabindex:{}},[],[],{mode:"open"});var TC=new Set(["$$slots","$$events","$$legacy","$$host","value"]),Hm=W("<input/>");function Gm(e,t){ee(t,!0);let r=b(t,"value",15),n=je(t,TC);const i=D(()=>We(n,{"aria-hidden":"true",tabindex:-1,style:{...Zp,position:"absolute",top:"0",left:"0"}}));var s={get value(){return r()},set value(d){r(d),y()}},o=K(),a=z(o),l=d=>{var u=Hm();Ne(u,()=>({...p(i),value:r()}),void 0,void 0,void 0,void 0,!0),S(d,u)},c=d=>{var u=Hm();Ne(u,()=>({...p(i)}),void 0,void 0,void 0,void 0,!0),Ro(u,r),S(d,u)};return ce(a,d=>{p(i).type==="checkbox"?d(l):d(c,-1)}),S(e,o),te(s)}re(Gm,{value:{}},[],[],{mode:"open"});var AC=["top","right","bottom","left"],Fn=Math.min,Yt=Math.max,Ca=Math.round,Da=Math.floor,Wr=e=>({x:e,y:e}),OC={left:"right",right:"left",bottom:"top",top:"bottom"};function sc(e,t,r){return Yt(e,Fn(t,r))}function an(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function zi(e){return e.split("-")[1]}function oc(e){return e==="x"?"y":"x"}function ac(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function lc(e){return oc(Hr(e))}function CC(e,t,r){r===void 0&&(r=!1);const n=zi(e),i=lc(e),s=ac(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Ia(o)),[o,Ia(o)]}function DC(e){const t=Ia(e);return[uc(e),t,uc(t)]}function uc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Km=["left","right"],Ym=["right","left"],IC=["top","bottom"],PC=["bottom","top"];function $C(e,t,r){switch(e){case"top":case"bottom":return r?t?Ym:Km:t?Km:Ym;case"left":case"right":return t?IC:PC;default:return[]}}function MC(e,t,r,n){const i=zi(e);let s=$C(ln(e),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(uc)))),s}function Ia(e){const t=ln(e);return OC[t]+e.slice(t.length)}function FC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jm(e){return typeof e!="number"?FC(e):{top:e,right:e,bottom:e,left:e}}function Pa(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Xm(e,t,r){let{reference:n,floating:i}=e;const s=Hr(t),o=lc(t),a=ac(o),l=ln(t),c=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y}}switch(zi(t)){case"start":f[o]-=h*(r&&c?-1:1);break;case"end":f[o]+=h*(r&&c?-1:1);break}return f}async function NC(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=an(t,e),g=Jm(f),m=a[h?u==="floating"?"reference":"floating":u],v=Pa(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=u==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Pa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:x,strategy:l}):_);return{top:(v.top-E.top+g.top)/A.y,bottom:(E.bottom-v.bottom+g.bottom)/A.y,left:(v.left-E.left+g.left)/A.x,right:(E.right-v.right+g.right)/A.x}}var RC=50,LC=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:NC},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}=Xm(c,n,l),h=n,f=0;const g={};for(let m=0;m<s.length;m++){const v=s[m];if(!v)continue;const{name:_,fn:x}=v,{x:A,y:E,data:T,reset:O}=await x({x:d,y:u,initialPlacement:n,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:e,floating:t}});d=A??d,u=E??u,g[_]={...g[_],...T},O&&f<RC&&(f++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:u}=Xm(c,h,l)),m=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}},zC=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=an(e,t)||{};if(c==null)return{};const u=Jm(d),h={x:r,y:n},f=lc(i),g=ac(f),m=await o.getDimensions(c),v=f==="y",_=v?"top":"left",x=v?"bottom":"right",A=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[f]-h[f]-s.floating[g],T=h[f]-s.reference[f],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=O?O[A]:0;(!$||!await(o.isElement==null?void 0:o.isElement(O)))&&($=a.floating[A]||s.floating[g]);const L=E/2-T/2,H=$/2-m[g]/2-1,N=Fn(u[_],H),se=Fn(u[x],H),V=N,oe=$-m[g]-se,pe=$/2-m[g]/2+L,Y=sc(V,pe,oe),ie=!l.arrow&&zi(i)!=null&&pe!==Y&&s.reference[g]/2-(pe<V?N:se)-m[g]/2<0,B=ie?pe<V?pe-V:pe-oe:0;return{[f]:h[f]+B,data:{[f]:Y,centerOffset:pe-Y-B,...ie&&{alignmentOffset:B}},reset:ie}}}),UC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=an(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const _=ln(i),x=Hr(a),A=ln(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(A||!m?[Ia(a)]:DC(a)),O=g!=="none";!h&&O&&T.push(...MC(a,m,g,E));const $=[a,...T],L=await l.detectOverflow(t,v),H=[];let N=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&H.push(L[_]),u){const pe=CC(i,o,E);H.push(L[pe[0]],L[pe[1]])}if(N=[...N,{placement:i,overflows:H}],!H.every(pe=>pe<=0)){var se,V;const pe=(((se=s.flip)==null?void 0:se.index)||0)+1,Y=$[pe];if(Y&&(!(u==="alignment"&&x!==Hr(Y))||N.every(B=>Hr(B.placement)===x?B.overflows[0]>0:!0)))return{data:{index:pe,overflows:N},reset:{placement:Y}};let ie=(V=N.filter(B=>B.overflows[0]<=0).sort((B,j)=>B.overflows[1]-j.overflows[1])[0])==null?void 0:V.placement;if(!ie)switch(f){case"bestFit":{var oe;const B=(oe=N.filter(j=>{if(O){const G=Hr(j.placement);return G===x||G==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(G=>G>0).reduce((G,J)=>G+J,0)]).sort((j,G)=>j[1]-G[1])[0])==null?void 0:oe[0];B&&(ie=B);break}case"initialPlacement":ie=a;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};function Qm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ev(e){return AC.some(t=>e[t]>=0)}var VC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...s}=an(e,t);switch(i){case"referenceHidden":{const o=Qm(await n.detectOverflow(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ev(o)}}}case"escaped":{const o=Qm(await n.detectOverflow(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:ev(o)}}}default:return{}}}}},tv=new Set(["left","top"]);async function BC(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ln(r),a=zi(r),l=Hr(r)==="y",c=tv.has(o)?-1:1,d=s&&l?-1:1,u=an(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}}var qC=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 BC(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}}}}},jC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:_=>{let{x,y:A}=_;return{x,y:A}}},...c}=an(e,t),d={x:r,y:n},u=await s.detectOverflow(t,c),h=Hr(ln(i)),f=oc(h);let g=d[f],m=d[h];if(o){const _=f==="y"?"top":"left",x=f==="y"?"bottom":"right",A=g+u[_],E=g-u[x];g=sc(A,g,E)}if(a){const _=h==="y"?"top":"left",x=h==="y"?"bottom":"right",A=m+u[_],E=m-u[x];m=sc(A,m,E)}const v=l.fn({...t,[f]:g,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:o,[h]:a}}}}}},ZC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=an(e,t),d={x:r,y:n},u=Hr(i),h=oc(u);let f=d[h],g=d[u];const m=an(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const A=h==="y"?"height":"width",E=s.reference[h]-s.floating[A]+v.mainAxis,T=s.reference[h]+s.reference[A]-v.mainAxis;f<E?f=E:f>T&&(f=T)}if(c){var _,x;const A=h==="y"?"width":"height",E=tv.has(ln(i)),T=s.reference[u]-s.floating[A]+(E&&((_=o.offset)==null?void 0:_[u])||0)+(E?0:v.crossAxis),O=s.reference[u]+s.reference[A]+(E?0:((x=o.offset)==null?void 0:x[u])||0)-(E?v.crossAxis:0);g<T?g=T:g>O&&(g=O)}return{[h]:f,[u]:g}}}},WC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=an(e,t),d=await o.detectOverflow(t,c),u=ln(i),h=zi(i),f=Hr(i)==="y",{width:g,height:m}=s.floating;let v,_;u==="top"||u==="bottom"?(v=u,_=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,v=h==="end"?"top":"bottom");const x=m-d.top-d.bottom,A=g-d.left-d.right,E=Fn(m-d[v],x),T=Fn(g-d[_],A),O=!t.middlewareData.shift;let $=E,L=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=x),O&&!h){const N=Yt(d.left,0),se=Yt(d.right,0),V=Yt(d.top,0),oe=Yt(d.bottom,0);f?L=g-2*(N!==0||se!==0?N+se:Yt(d.left,d.right)):$=m-2*(V!==0||oe!==0?V+oe:Yt(d.top,d.bottom))}await l({...t,availableWidth:L,availableHeight:$});const H=await o.getDimensions(a.floating);return g!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function $a(){return typeof window<"u"}function Ui(e){return rv(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(rv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rv(e){return $a()?e instanceof Node||e instanceof Jt(e).Node:!1}function xr(e){return $a()?e instanceof Element||e instanceof Jt(e).Element:!1}function un(e){return $a()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function nv(e){return!$a()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function to(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function HC(e){return/^(table|td|th)$/.test(Ui(e))}function Ma(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var GC=/transform|translate|scale|rotate|perspective|filter/,KC=/paint|layout|strict|content/,ai=e=>!!e&&e!=="none",cc;function dc(e){const t=xr(e)?Tr(e):e;return ai(t.transform)||ai(t.translate)||ai(t.scale)||ai(t.rotate)||ai(t.perspective)||!fc()&&(ai(t.backdropFilter)||ai(t.filter))||GC.test(t.willChange||"")||KC.test(t.contain||"")}function YC(e){let t=Nn(e);for(;un(t)&&!Vi(t);){if(dc(t))return t;if(Ma(t))return null;t=Nn(t)}return null}function fc(){return cc==null&&(cc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),cc}function Vi(e){return/^(html|body|#document)$/.test(Ui(e))}function Tr(e){return Jt(e).getComputedStyle(e)}function Fa(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if(Ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nv(e)&&e.host||Gr(e);return nv(t)?t.host:t}function iv(e){const t=Nn(e);return Vi(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&to(t)?t:iv(t)}function ro(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=iv(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(i);if(s){const a=hc(o);return t.concat(o,o.visualViewport||[],to(i)?i:[],a&&r?ro(a):[])}else return t.concat(i,ro(i,[],r))}function hc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sv(e){const t=Tr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=un(e),s=i?e.offsetWidth:r,o=i?e.offsetHeight:n,a=Ca(r)!==s||Ca(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function pc(e){return xr(e)?e:e.contextElement}function Bi(e){const t=pc(e);if(!un(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=sv(t);let o=(s?Ca(r.width):r.width)/n,a=(s?Ca(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var JC=Wr(0);function ov(e){const t=Jt(e);return!fc()||!t.visualViewport?JC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XC(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function li(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=pc(e);let o=Wr(1);t&&(n?xr(n)&&(o=Bi(n)):o=Bi(e));const a=XC(s,r,n)?ov(s):Wr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,u=i.height/o.y;if(s){const h=Jt(s),f=n&&xr(n)?Jt(n):n;let g=h,m=hc(g);for(;m&&n&&f!==g;){const v=Bi(m),_=m.getBoundingClientRect(),x=Tr(m),A=_.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,E=_.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=A,c+=E,g=Jt(m),m=hc(g)}}return Pa({width:d,height:u,x:l,y:c})}function Na(e,t){const r=Fa(e).scrollLeft;return t?t.left+r:li(Gr(e)).left+r}function av(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Na(e,r),y:r.top+t.scrollTop}}function QC(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",o=Gr(n),a=t?Ma(t.floating):!1;if(n===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const d=Wr(0),u=un(n);if((u||!u&&!s)&&((Ui(n)!=="body"||to(o))&&(l=Fa(n)),u)){const f=li(n);c=Bi(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const h=o&&!u&&!s?av(o,l):Wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-l.scrollTop*c.y+d.y+h.y}}function eD(e){return Array.from(e.getClientRects())}function tD(e){const t=Gr(e),r=Fa(e),n=e.ownerDocument.body,i=Yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Na(e);const a=-r.scrollTop;return Tr(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}var lv=25;function rD(e,t){const r=Jt(e),n=Gr(e),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=fc();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Na(n);if(c<=0){const d=n.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-f);g<=lv&&(s-=g)}else c<=lv&&(s+=c);return{width:s,height:o,x:a,y:l}}function nD(e,t){const r=li(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=un(e)?Bi(e):Wr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:n*s.y}}function uv(e,t,r){let n;if(t==="viewport")n=rD(e,r);else if(t==="document")n=tD(Gr(e));else if(xr(t))n=nD(t,r);else{const i=ov(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Pa(n)}function cv(e,t){const r=Nn(e);return r===t||!xr(r)||Vi(r)?!1:Tr(r).position==="fixed"||cv(r,t)}function iD(e,t){const r=t.get(e);if(r)return r;let n=ro(e,[],!1).filter(a=>xr(a)&&Ui(a)!=="body"),i=null;const s=Tr(e).position==="fixed";let o=s?Nn(e):e;for(;xr(o)&&!Vi(o);){const a=Tr(o),l=dc(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||to(o)&&!l&&cv(e,o))?n=n.filter(c=>c!==o):i=a,o=Nn(o)}return t.set(e,n),n}function sD(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ma(t)?[]:iD(t,this._c):[].concat(r),n],o=uv(t,s[0],i);let a=o.top,l=o.right,c=o.bottom,d=o.left;for(let u=1;u<s.length;u++){const h=uv(t,s[u],i);a=Yt(h.top,a),l=Fn(h.right,l),c=Fn(h.bottom,c),d=Yt(h.left,d)}return{width:l-d,height:c-a,x:d,y:a}}function oD(e){const{width:t,height:r}=sv(e);return{width:t,height:r}}function aD(e,t,r){const n=un(t),i=Gr(t),s=r==="fixed",o=li(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=Na(i)}if(n||!n&&!s)if((Ui(t)!=="body"||to(i))&&(a=Fa(t)),n){const u=li(t,!0,s,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&c();s&&!n&&i&&c();const d=i&&!n&&!s?av(i,a):Wr(0);return{x:o.left+a.scrollLeft-l.x-d.x,y:o.top+a.scrollTop-l.y-d.y,width:o.width,height:o.height}}function mc(e){return Tr(e).position==="static"}function dv(e,t){if(!un(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function fv(e,t){const r=Jt(e);if(Ma(e))return r;if(!un(e)){let i=Nn(e);for(;i&&!Vi(i);){if(xr(i)&&!mc(i))return i;i=Nn(i)}return r}let n=dv(e,t);for(;n&&HC(n)&&mc(n);)n=dv(n,t);return n&&Vi(n)&&mc(n)&&!dc(n)?r:n||YC(e)||r}var lD=async function(e){const t=this.getOffsetParent||fv,r=this.getDimensions,n=await r(e.floating);return{reference:aD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function uD(e){return Tr(e).direction==="rtl"}var cD={convertOffsetParentRelativeRectToViewportRelativeRect:QC,getDocumentElement:Gr,getClippingRect:sD,getOffsetParent:fv,getElementRects:lD,getClientRects:eD,getDimensions:oD,getScale:Bi,isElement:xr,isRTL:uD};function hv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dD(e,t){let r=null,n;const i=Gr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=c;if(a||t(),!h||!f)return;const g=Da(u),m=Da(i.clientWidth-(d+h)),v=Da(i.clientHeight-(u+f)),_=Da(d),x={rootMargin:-g+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Yt(0,Fn(1,l))||1};let A=!0;function E(T){const O=T[0].intersectionRatio;if(O!==l){if(!A)return o();O?o(!1,O):n=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!hv(c,e.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(E,{...x,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return o(!0),s}function fD(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=pc(e),d=i||s?[...c?ro(c):[],...t?ro(t):[]]:[];d.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),s&&_.addEventListener("resize",r)});const u=c&&a?dD(c,r):null;let h=-1,f=null;o&&(f=new ResizeObserver(_=>{let[x]=_;x&&x.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var A;(A=f)==null||A.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let g,m=l?li(e):null;l&&v();function v(){const _=li(e);m&&!hv(m,_)&&r(),m=_,g=requestAnimationFrame(v)}return r(),()=>{var _;d.forEach(x=>{i&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var hD=qC,pD=jC,mD=UC,vD=WC,gD=VC,yD=zC,bD=ZC,_D=(e,t,r)=>{const n=new Map,i={platform:cD,...r},s={...i.platform,_c:n};return LC(e,t,{...i,platform:s})};function ui(e){return typeof e=="function"?e():e}function pv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mv(e,t){const r=pv(e);return Math.round(t*r)/r}function vv(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 wD(e){const t=e.whileElementsMounted,r=D(()=>ui(e.open)??!0),n=D(()=>ui(e.middleware)),i=D(()=>ui(e.transform)??!0),s=D(()=>ui(e.placement)??"bottom"),o=D(()=>ui(e.strategy)??"absolute"),a=D(()=>ui(e.sideOffset)??0),l=D(()=>ui(e.alignOffset)??0),c=e.reference;let d=Q(0),u=Q(0);const h=wr(null);let f=Q($e(p(o))),g=Q($e(p(s))),m=Q($e({})),v=Q(!1),_=!1,x=0;const A=D(()=>{const N=h.current?mv(h.current,p(d)):p(d),se=h.current?mv(h.current,p(u)):p(u);return p(i)?{position:p(f),left:"0",top:"0",transform:`translate(${N}px, ${se}px)`,...h.current&&pv(h.current)>=1.5&&{willChange:"transform"}}:{position:p(f),left:`${N}px`,top:`${se}px`}});let E;function T(){if(c.current===null||h.current===null)return;const N=c.current,se=h.current,V=++x;_D(N,se,{middleware:p(n),placement:p(s),strategy:p(o)}).then(oe=>{if(V===x&&!(c.current!==N||h.current!==se)){if(kD(N)){I(m,{...p(m),hide:{...p(m).hide,referenceHidden:!0}},!0);return}if(!p(r)&&p(d)!==0&&p(u)!==0){const pe=Math.max(Math.abs(p(a)),Math.abs(p(l)),15);if(oe.x<=pe&&oe.y<=pe)return}I(d,oe.x,!0),I(u,oe.y,!0),I(f,oe.strategy,!0),I(g,oe.placement,!0),I(m,oe.middlewareData,!0),I(v,!0)}})}function O(){typeof E=="function"&&(E(),E=void 0),x++}function $(){if(O(),t===void 0){T();return}p(r)&&(c.current===null||h.current===null||(E=t(c.current,h.current,T)))}function L(){!p(r)&&h.current===null&&I(v,!1)}function H(){return[p(n),p(s),p(o),p(a),p(l),p(r)]}return me(()=>{t===void 0&&p(r)&&T()}),me($),me(()=>{if(t!==void 0){if(H(),!p(r)){_=!1;return}if(!p(v)){_=!1;return}if(!_){_=!0;return}T()}}),me(L),me(()=>O),{floating:h,reference:c,get strategy(){return p(f)},get placement(){return p(g)},get middlewareData(){return p(m)},get isPositioned(){return p(v)},get floatingStyles(){return p(A)},get update(){return T}}}function kD(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var SD={top:"bottom",right:"left",bottom:"top",left:"right"},vc=new Ot("Floating.Root"),gv=new Ot("Floating.Content"),gc=new Ot("Floating.Root"),ED=class rd{static create(t=!1){return t?gc.set(new rd):vc.set(new rd)}anchorNode=wr(null);customAnchorNode=wr(null);triggerNode=wr(null);constructor(){me(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},xD=class nd{static create(t,r=!1){return r?gv.set(new nd(t,gc.get())):gv.set(new nd(t,vc.get()))}opts;root;contentRef=wr(null);wrapperRef=wr(null);arrowRef=wr(null);contentAttachment=Qe(this.contentRef);wrapperAttachment=Qe(this.wrapperRef);arrowAttachment=Qe(this.arrowRef);arrowId=wr(Mn());#e=D(()=>{if(typeof this.opts.style=="string")return qs(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#r=new BT(()=>this.arrowRef.current??void 0);#n=D(()=>this.#r?.width??0);#i=D(()=>this.#r?.height??0);#s=D(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=D(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=D(()=>p(this.#a).length>0);get hasExplicitBoundaries(){return p(this.#o)}set hasExplicitBoundaries(t){I(this.#o,t)}#l=D(()=>({padding:this.opts.collisionPadding.current,boundary:p(this.#a).filter(aA),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return p(this.#l)}set detectOverflowOptions(t){I(this.#l,t)}#u=Q(void 0);#d=Q(void 0);#c=Q(void 0);#h=Q(void 0);#p=D(()=>[hD({mainAxis:this.opts.sideOffset.current+p(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&pD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?bD():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&mD({...this.detectOverflowOptions}),vD({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:n})=>{const{width:i,height:s}=t.reference;I(this.#u,r,!0),I(this.#d,n,!0),I(this.#c,i,!0),I(this.#h,s,!0)}}),this.arrowRef.current&&yD({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),AD({arrowWidth:p(this.#n),arrowHeight:p(this.#i)}),this.opts.hideWhenDetached.current&&gD({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return p(this.#p)}set middleware(t){I(this.#p,t)}floating;#f=D(()=>OD(this.floating.placement));get placedSide(){return p(this.#f)}set placedSide(t){I(this.#f,t)}#m=D(()=>CD(this.floating.placement));get placedAlign(){return p(this.#m)}set placedAlign(t){I(this.#m,t)}#v=D(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return p(this.#v)}set arrowX(t){I(this.#v,t)}#y=D(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return p(this.#y)}set arrowY(t){I(this.#y,t)}#w=D(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return p(this.#w)}set cannotCenterArrow(t){I(this.#w,t)}#_=Q();get contentZIndex(){return p(this.#_)}set contentZIndex(t){I(this.#_,t,!0)}#g=D(()=>SD[this.placedSide]);get arrowBaseSide(){return p(this.#g)}set arrowBaseSide(t){I(this.#g,t)}#k=D(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${p(this.#u)}px`,"--bits-floating-available-height":`${p(this.#d)}px`,"--bits-floating-anchor-width":`${p(this.#c)}px`,"--bits-floating-anchor-height":`${p(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...p(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return p(this.#k)}set wrapperProps(t){I(this.#k,t)}#b=D(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Zs({...p(this.#e)}),...this.contentAttachment}));get props(){return p(this.#b)}set props(t){I(this.#b,t)}#S=D(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return p(this.#S)}set arrowStyle(t){I(this.#S,t)}constructor(t,r){this.opts=t,this.root=r,this.#t=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),tt(()=>t.customAnchor.current,n=>{this.root.customAnchorNode.current=n}),this.floating=wD({strategy:()=>this.opts.strategy.current,placement:()=>p(this.#s),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...n)=>fD(...n,{animationFrame:this.#t?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),me(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),tt(()=>this.contentRef.current,n=>{if(!n||!this.opts.enabled.current)return;const i=Xp(n),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==n||!this.opts.enabled.current)return;const o=i.getComputedStyle(n).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),me(()=>{this.floating.floating.current=this.wrapperRef.current})}},TD=class id{static create(t,r=!1){return r?new id(t,gc.get()):new id(t,vc.get())}opts;root;constructor(t,r){this.opts=t,this.root=r,t.virtualEl&&t.virtualEl.current?r.triggerNode=aT(t.virtualEl.current):r.triggerNode=t.ref}};function AD(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]=yc(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(i.arrow?.x??0)+o/2,h=(i.arrow?.y??0)+a/2;let f="",g="";return l==="bottom"?(f=s?d:`${u}px`,g=`${-a}px`):l==="top"?(f=s?d:`${u}px`,g=`${n.floating.height+a}px`):l==="right"?(f=`${-a}px`,g=s?d:`${h}px`):l==="left"&&(f=`${n.floating.width+a}px`,g=s?d:`${h}px`),{data:{x:f,y:g}}}}}function yc(e){const[t,r="center"]=e.split("-");return[t,r]}function OD(e){return yc(e)[0]}function CD(e){return yc(e)[1]}function yv(e,t){ee(t,!0);let r=b(t,"children",7),n=b(t,"tooltip",7,!1);ED.create(n());var i={get children(){return r()},set children(a){r(a),y()},get tooltip(){return n()},set tooltip(a=!1){n(a),y()}},s=K(),o=z(s);return _e(o,()=>r()??Fe),S(e,s),te(i)}re(yv,{children:{},tooltip:{}},[],[],{mode:"open"});function bv(e,t){ee(t,!0);let r=b(t,"id",7),n=b(t,"children",7),i=b(t,"virtualEl",7),s=b(t,"ref",7),o=b(t,"tooltip",7,!1);TD.create({id:R(()=>r()),virtualEl:R(()=>i()),ref:s()},o());var a={get id(){return r()},set id(d){r(d),y()},get children(){return n()},set children(d){n(d),y()},get virtualEl(){return i()},set virtualEl(d){i(d),y()},get ref(){return s()},set ref(d){s(d),y()},get tooltip(){return o()},set tooltip(d=!1){o(d),y()}},l=K(),c=z(l);return _e(c,()=>n()??Fe),S(e,l),te(a)}re(bv,{id:{},children:{},virtualEl:{},ref:{},tooltip:{}},[],[],{mode:"open"});function _v(e,t){ee(t,!0);let r=b(t,"content",7),n=b(t,"side",7,"bottom"),i=b(t,"sideOffset",7,0),s=b(t,"align",7,"center"),o=b(t,"alignOffset",7,0),a=b(t,"id",7),l=b(t,"arrowPadding",7,0),c=b(t,"avoidCollisions",7,!0),d=b(t,"collisionBoundary",23,()=>[]),u=b(t,"collisionPadding",7,0),h=b(t,"hideWhenDetached",7,!1),f=b(t,"onPlaced",7,()=>{}),g=b(t,"sticky",7,"partial"),m=b(t,"updatePositionStrategy",7,"optimized"),v=b(t,"strategy",7,"fixed"),_=b(t,"dir",7,"ltr"),x=b(t,"style",23,()=>({})),A=b(t,"wrapperId",23,Mn),E=b(t,"customAnchor",7,null),T=b(t,"enabled",7),O=b(t,"tooltip",7,!1);const $=xD.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>s()),alignOffset:R(()=>o()),id:R(()=>a()),arrowPadding:R(()=>l()),avoidCollisions:R(()=>c()),collisionBoundary:R(()=>d()),collisionPadding:R(()=>u()),hideWhenDetached:R(()=>h()),onPlaced:R(()=>f()),sticky:R(()=>g()),updatePositionStrategy:R(()=>m()),strategy:R(()=>v()),dir:R(()=>_()),style:R(()=>x()),enabled:R(()=>T()),wrapperId:R(()=>A()),customAnchor:R(()=>E())},O()),L=D(()=>We($.wrapperProps,{style:{pointerEvents:"auto"}}));var H={get content(){return r()},set content(V){r(V),y()},get side(){return n()},set side(V="bottom"){n(V),y()},get sideOffset(){return i()},set sideOffset(V=0){i(V),y()},get align(){return s()},set align(V="center"){s(V),y()},get alignOffset(){return o()},set alignOffset(V=0){o(V),y()},get id(){return a()},set id(V){a(V),y()},get arrowPadding(){return l()},set arrowPadding(V=0){l(V),y()},get avoidCollisions(){return c()},set avoidCollisions(V=!0){c(V),y()},get collisionBoundary(){return d()},set collisionBoundary(V=[]){d(V),y()},get collisionPadding(){return u()},set collisionPadding(V=0){u(V),y()},get hideWhenDetached(){return h()},set hideWhenDetached(V=!1){h(V),y()},get onPlaced(){return f()},set onPlaced(V=()=>{}){f(V),y()},get sticky(){return g()},set sticky(V="partial"){g(V),y()},get updatePositionStrategy(){return m()},set updatePositionStrategy(V="optimized"){m(V),y()},get strategy(){return v()},set strategy(V="fixed"){v(V),y()},get dir(){return _()},set dir(V="ltr"){_(V),y()},get style(){return x()},set style(V={}){x(V),y()},get wrapperId(){return A()},set wrapperId(V=Mn()){A(V),y()},get customAnchor(){return E()},set customAnchor(V=null){E(V),y()},get enabled(){return T()},set enabled(V){T(V),y()},get tooltip(){return O()},set tooltip(V=!1){O(V),y()}},N=K(),se=z(N);return _e(se,()=>r()??Fe,()=>({props:$.props,wrapperProps:p(L)})),S(e,N),te(H)}re(_v,{content:{},side:{},sideOffset:{},align:{},alignOffset:{},id:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},hideWhenDetached:{},onPlaced:{},sticky:{},updatePositionStrategy:{},strategy:{},dir:{},style:{},wrapperId:{},customAnchor:{},enabled:{},tooltip:{}},[],[],{mode:"open"});function wv(e,t){ee(t,!0);let r=b(t,"content",7),n=b(t,"onPlaced",7);rn(()=>{n()?.()});var i={get content(){return r()},set content(a){r(a),y()},get onPlaced(){return n()},set onPlaced(a){n(a),y()}},s=K(),o=z(s);return _e(o,()=>r()??Fe,()=>({props:{},wrapperProps:{}})),S(e,s),te(i)}re(wv,{content:{},onPlaced:{}},[],[],{mode:"open"});var DD=new Set(["$$slots","$$events","$$legacy","$$host","content","isStatic","onPlaced"]);function kv(e,t){ee(t,!0);let r=b(t,"content",7),n=b(t,"isStatic",7,!1),i=b(t,"onPlaced",7),s=je(t,DD);var o={get content(){return r()},set content(u){r(u),y()},get isStatic(){return n()},set isStatic(u=!1){n(u),y()},get onPlaced(){return i()},set onPlaced(u){i(u),y()}},a=K(),l=z(a),c=u=>{wv(u,{get content(){return r()},get onPlaced(){return i()}})},d=u=>{_v(u,kn({get content(){return r()},get onPlaced(){return i()}},()=>s))};return ce(l,u=>{n()?u(c):u(d,-1)}),S(e,a),te(o)}re(kv,{content:{},isStatic:{},onPlaced:{}},[],[],{mode:"open"});var ID=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"]),PD=W("<!> <!>",1);function bc(e,t){ee(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),h=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),x=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),H=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),Y=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),B=b(t,"isValidEvent",7,()=>!1),j=b(t,"customAnchor",7,null),G=b(t,"isStatic",7,!1),J=b(t,"enabled",7),le=b(t,"ref",7),he=b(t,"tooltip",7,!1),F=b(t,"contentPointerEvents",7,"auto"),ue=je(t,ID);const U=D(()=>O()??!0),ge=D(()=>E()??(p(U)?"fixed":"absolute"));var de={get popper(){return r()},set popper(w){r(w),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(w){n(w),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(w){i(w),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(w){s(w),y()},get id(){return o()},set id(w){o(w),y()},get onPointerDown(){return a()},set onPointerDown(w){a(w),y()},get onPointerUp(){return l()},set onPointerUp(w){l(w),y()},get side(){return c()},set side(w){c(w),y()},get sideOffset(){return d()},set sideOffset(w){d(w),y()},get align(){return u()},set align(w){u(w),y()},get alignOffset(){return h()},set alignOffset(w){h(w),y()},get arrowPadding(){return f()},set arrowPadding(w){f(w),y()},get avoidCollisions(){return g()},set avoidCollisions(w){g(w),y()},get collisionBoundary(){return m()},set collisionBoundary(w){m(w),y()},get collisionPadding(){return v()},set collisionPadding(w){v(w),y()},get sticky(){return _()},set sticky(w){_(w),y()},get hideWhenDetached(){return x()},set hideWhenDetached(w){x(w),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(w){A(w),y()},get strategy(){return E()},set strategy(w){E(w),y()},get dir(){return T()},set dir(w){T(w),y()},get preventScroll(){return O()},set preventScroll(w){O(w),y()},get wrapperId(){return $()},set wrapperId(w){$(w),y()},get style(){return L()},set style(w){L(w),y()},get onPlaced(){return H()},set onPlaced(w){H(w),y()},get onInteractOutside(){return N()},set onInteractOutside(w){N(w),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(w){se(w),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(w){V(w),y()},get onFocusOutside(){return oe()},set onFocusOutside(w){oe(w),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(w="close"){pe(w),y()},get loop(){return Y()},set loop(w){Y(w),y()},get trapFocus(){return ie()},set trapFocus(w=!0){ie(w),y()},get isValidEvent(){return B()},set isValidEvent(w=()=>!1){B(w),y()},get customAnchor(){return j()},set customAnchor(w=null){j(w),y()},get isStatic(){return G()},set isStatic(w=!1){G(w),y()},get enabled(){return J()},set enabled(w){J(w),y()},get ref(){return le()},set ref(w){le(w),y()},get tooltip(){return he()},set tooltip(w=!1){he(w),y()},get contentPointerEvents(){return F()},set contentPointerEvents(w="auto"){F(w),y()}};return kv(e,{get isStatic(){return G()},get id(){return o()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return x()},get updatePositionStrategy(){return A()},get strategy(){return p(ge)},get dir(){return T()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return H()},get customAnchor(){return j()},get enabled(){return J()},get tooltip(){return he()},content:(Be,Pe)=>{let Ye=()=>Pe?.().props,kt=()=>Pe?.().wrapperProps;var Ge=PD(),Xt=z(Ge),ct=It=>{Uu(It,{get preventScroll(){return p(U)}})},Qt=It=>{Uu(It,{get preventScroll(){return p(U)}})};ce(Xt,It=>{t.forceMount&&J()?It(ct):t.forceMount||It(Qt,1)});var St=X(Xt,2);_m(St,{get onOpenAutoFocus(){return V()},get onCloseAutoFocus(){return se()},get loop(){return Y()},get enabled(){return J()},get trapFocus(){return ie()},get forceMount(){return t.forceMount},get ref(){return le()},focusScope:(er,qt)=>{let hr=()=>qt?.().props;bm(er,{get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get enabled(){return J()},get ref(){return le()},children:(Or,Cr)=>{ym(Or,{get id(){return o()},get onInteractOutside(){return N()},get onFocusOutside(){return oe()},get interactOutsideBehavior(){return pe()},get isValidEvent(){return B()},get enabled(){return J()},get ref(){return le()},children:(Dr,pr)=>{let Jr=()=>pr?.().props;Sm(Dr,{get id(){return o()},get preventOverflowTextSelection(){return s()},get onPointerDown(){return a()},get onPointerUp(){return l()},get enabled(){return J()},get ref(){return le()},children:(Xr,_t)=>{var Ln=K(),rs=z(Ln);{let ns=D(()=>({props:We(ue,Ye(),Jr(),hr(),{style:{pointerEvents:F()}}),wrapperProps:kt()}));_e(rs,()=>r()??Fe,()=>p(ns))}S(Xr,Ln)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),S(Be,Ge)},$$slots:{content:!0}}),te(de)}re(bc,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{},ref:{},tooltip:{},contentPointerEvents:{}},[],[],{mode:"open"});var $D=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 Sv(e,t){ee(t,!0);let r=b(t,"popper",7),n=b(t,"open",7),i=b(t,"onEscapeKeydown",7),s=b(t,"escapeKeydownBehavior",7),o=b(t,"preventOverflowTextSelection",7),a=b(t,"id",7),l=b(t,"onPointerDown",7),c=b(t,"onPointerUp",7),d=b(t,"side",7),u=b(t,"sideOffset",7),h=b(t,"align",7),f=b(t,"alignOffset",7),g=b(t,"arrowPadding",7),m=b(t,"avoidCollisions",7),v=b(t,"collisionBoundary",7),_=b(t,"collisionPadding",7),x=b(t,"sticky",7),A=b(t,"hideWhenDetached",7),E=b(t,"updatePositionStrategy",7),T=b(t,"strategy",7),O=b(t,"dir",7),$=b(t,"preventScroll",7),L=b(t,"wrapperId",7),H=b(t,"style",7),N=b(t,"onPlaced",7),se=b(t,"onInteractOutside",7),V=b(t,"onCloseAutoFocus",7),oe=b(t,"onOpenAutoFocus",7),pe=b(t,"onFocusOutside",7),Y=b(t,"interactOutsideBehavior",7,"close"),ie=b(t,"loop",7),B=b(t,"trapFocus",7,!0),j=b(t,"isValidEvent",7,()=>!1),G=b(t,"customAnchor",7,null),J=b(t,"isStatic",7,!1),le=b(t,"ref",7),he=b(t,"shouldRender",7),F=je(t,$D);var ue={get popper(){return r()},set popper(w){r(w),y()},get open(){return n()},set open(w){n(w),y()},get onEscapeKeydown(){return i()},set onEscapeKeydown(w){i(w),y()},get escapeKeydownBehavior(){return s()},set escapeKeydownBehavior(w){s(w),y()},get preventOverflowTextSelection(){return o()},set preventOverflowTextSelection(w){o(w),y()},get id(){return a()},set id(w){a(w),y()},get onPointerDown(){return l()},set onPointerDown(w){l(w),y()},get onPointerUp(){return c()},set onPointerUp(w){c(w),y()},get side(){return d()},set side(w){d(w),y()},get sideOffset(){return u()},set sideOffset(w){u(w),y()},get align(){return h()},set align(w){h(w),y()},get alignOffset(){return f()},set alignOffset(w){f(w),y()},get arrowPadding(){return g()},set arrowPadding(w){g(w),y()},get avoidCollisions(){return m()},set avoidCollisions(w){m(w),y()},get collisionBoundary(){return v()},set collisionBoundary(w){v(w),y()},get collisionPadding(){return _()},set collisionPadding(w){_(w),y()},get sticky(){return x()},set sticky(w){x(w),y()},get hideWhenDetached(){return A()},set hideWhenDetached(w){A(w),y()},get updatePositionStrategy(){return E()},set updatePositionStrategy(w){E(w),y()},get strategy(){return T()},set strategy(w){T(w),y()},get dir(){return O()},set dir(w){O(w),y()},get preventScroll(){return $()},set preventScroll(w){$(w),y()},get wrapperId(){return L()},set wrapperId(w){L(w),y()},get style(){return H()},set style(w){H(w),y()},get onPlaced(){return N()},set onPlaced(w){N(w),y()},get onInteractOutside(){return se()},set onInteractOutside(w){se(w),y()},get onCloseAutoFocus(){return V()},set onCloseAutoFocus(w){V(w),y()},get onOpenAutoFocus(){return oe()},set onOpenAutoFocus(w){oe(w),y()},get onFocusOutside(){return pe()},set onFocusOutside(w){pe(w),y()},get interactOutsideBehavior(){return Y()},set interactOutsideBehavior(w="close"){Y(w),y()},get loop(){return ie()},set loop(w){ie(w),y()},get trapFocus(){return B()},set trapFocus(w=!0){B(w),y()},get isValidEvent(){return j()},set isValidEvent(w=()=>!1){j(w),y()},get customAnchor(){return G()},set customAnchor(w=null){G(w),y()},get isStatic(){return J()},set isStatic(w=!1){J(w),y()},get ref(){return le()},set ref(w){le(w),y()},get shouldRender(){return he()},set shouldRender(w){he(w),y()}},U=K(),ge=z(U),de=w=>{bc(w,kn({get popper(){return r()},get onEscapeKeydown(){return i()},get escapeKeydownBehavior(){return s()},get preventOverflowTextSelection(){return o()},get id(){return a()},get onPointerDown(){return l()},get onPointerUp(){return c()},get side(){return d()},get sideOffset(){return u()},get align(){return h()},get alignOffset(){return f()},get arrowPadding(){return g()},get avoidCollisions(){return m()},get collisionBoundary(){return v()},get collisionPadding(){return _()},get sticky(){return x()},get hideWhenDetached(){return A()},get updatePositionStrategy(){return E()},get strategy(){return T()},get dir(){return O()},get preventScroll(){return $()},get wrapperId(){return L()},get style(){return H()},get onPlaced(){return N()},get customAnchor(){return G()},get isStatic(){return J()},get enabled(){return n()},get onInteractOutside(){return se()},get onCloseAutoFocus(){return V()},get onOpenAutoFocus(){return oe()},get interactOutsideBehavior(){return Y()},get loop(){return ie()},get trapFocus(){return B()},get isValidEvent(){return j()},get onFocusOutside(){return pe()},forceMount:!1,get ref(){return le()}},()=>F))};return ce(ge,w=>{he()&&w(de)}),S(e,U),te(ue)}re(Sv,{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 MD=new Set(["$$slots","$$events","$$legacy","$$host","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);function Ev(e,t){ee(t,!0);let r=b(t,"popper",7),n=b(t,"onEscapeKeydown",7),i=b(t,"escapeKeydownBehavior",7),s=b(t,"preventOverflowTextSelection",7),o=b(t,"id",7),a=b(t,"onPointerDown",7),l=b(t,"onPointerUp",7),c=b(t,"side",7),d=b(t,"sideOffset",7),u=b(t,"align",7),h=b(t,"alignOffset",7),f=b(t,"arrowPadding",7),g=b(t,"avoidCollisions",7),m=b(t,"collisionBoundary",7),v=b(t,"collisionPadding",7),_=b(t,"sticky",7),x=b(t,"hideWhenDetached",7),A=b(t,"updatePositionStrategy",7),E=b(t,"strategy",7),T=b(t,"dir",7),O=b(t,"preventScroll",7),$=b(t,"wrapperId",7),L=b(t,"style",7),H=b(t,"onPlaced",7),N=b(t,"onInteractOutside",7),se=b(t,"onCloseAutoFocus",7),V=b(t,"onOpenAutoFocus",7),oe=b(t,"onFocusOutside",7),pe=b(t,"interactOutsideBehavior",7,"close"),Y=b(t,"loop",7),ie=b(t,"trapFocus",7,!0),B=b(t,"isValidEvent",7,()=>!1),j=b(t,"customAnchor",7,null),G=b(t,"isStatic",7,!1),J=b(t,"enabled",7),le=je(t,MD);var he={get popper(){return r()},set popper(F){r(F),y()},get onEscapeKeydown(){return n()},set onEscapeKeydown(F){n(F),y()},get escapeKeydownBehavior(){return i()},set escapeKeydownBehavior(F){i(F),y()},get preventOverflowTextSelection(){return s()},set preventOverflowTextSelection(F){s(F),y()},get id(){return o()},set id(F){o(F),y()},get onPointerDown(){return a()},set onPointerDown(F){a(F),y()},get onPointerUp(){return l()},set onPointerUp(F){l(F),y()},get side(){return c()},set side(F){c(F),y()},get sideOffset(){return d()},set sideOffset(F){d(F),y()},get align(){return u()},set align(F){u(F),y()},get alignOffset(){return h()},set alignOffset(F){h(F),y()},get arrowPadding(){return f()},set arrowPadding(F){f(F),y()},get avoidCollisions(){return g()},set avoidCollisions(F){g(F),y()},get collisionBoundary(){return m()},set collisionBoundary(F){m(F),y()},get collisionPadding(){return v()},set collisionPadding(F){v(F),y()},get sticky(){return _()},set sticky(F){_(F),y()},get hideWhenDetached(){return x()},set hideWhenDetached(F){x(F),y()},get updatePositionStrategy(){return A()},set updatePositionStrategy(F){A(F),y()},get strategy(){return E()},set strategy(F){E(F),y()},get dir(){return T()},set dir(F){T(F),y()},get preventScroll(){return O()},set preventScroll(F){O(F),y()},get wrapperId(){return $()},set wrapperId(F){$(F),y()},get style(){return L()},set style(F){L(F),y()},get onPlaced(){return H()},set onPlaced(F){H(F),y()},get onInteractOutside(){return N()},set onInteractOutside(F){N(F),y()},get onCloseAutoFocus(){return se()},set onCloseAutoFocus(F){se(F),y()},get onOpenAutoFocus(){return V()},set onOpenAutoFocus(F){V(F),y()},get onFocusOutside(){return oe()},set onFocusOutside(F){oe(F),y()},get interactOutsideBehavior(){return pe()},set interactOutsideBehavior(F="close"){pe(F),y()},get loop(){return Y()},set loop(F){Y(F),y()},get trapFocus(){return ie()},set trapFocus(F=!0){ie(F),y()},get isValidEvent(){return B()},set isValidEvent(F=()=>!1){B(F),y()},get customAnchor(){return j()},set customAnchor(F=null){j(F),y()},get isStatic(){return G()},set isStatic(F=!1){G(F),y()},get enabled(){return J()},set enabled(F){J(F),y()}};return bc(e,kn({get popper(){return r()},get onEscapeKeydown(){return n()},get escapeKeydownBehavior(){return i()},get preventOverflowTextSelection(){return s()},get id(){return o()},get onPointerDown(){return a()},get onPointerUp(){return l()},get side(){return c()},get sideOffset(){return d()},get align(){return u()},get alignOffset(){return h()},get arrowPadding(){return f()},get avoidCollisions(){return g()},get collisionBoundary(){return m()},get collisionPadding(){return v()},get sticky(){return _()},get hideWhenDetached(){return x()},get updatePositionStrategy(){return A()},get strategy(){return E()},get dir(){return T()},get preventScroll(){return O()},get wrapperId(){return $()},get style(){return L()},get onPlaced(){return H()},get customAnchor(){return j()},get isStatic(){return G()},get enabled(){return J()},get onInteractOutside(){return N()},get onCloseAutoFocus(){return se()},get onOpenAutoFocus(){return V()},get interactOutsideBehavior(){return pe()},get loop(){return Y()},get trapFocus(){return ie()},get isValidEvent(){return B()},get onFocusOutside(){return oe()}},()=>le,{forceMount:!0})),te(he)}re(Ev,{popper:{},onEscapeKeydown:{},escapeKeydownBehavior:{},preventOverflowTextSelection:{},id:{},onPointerDown:{},onPointerUp:{},side:{},sideOffset:{},align:{},alignOffset:{},arrowPadding:{},avoidCollisions:{},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{},updatePositionStrategy:{},strategy:{},dir:{},preventScroll:{},wrapperId:{},style:{},onPlaced:{},onInteractOutside:{},onCloseAutoFocus:{},onOpenAutoFocus:{},onFocusOutside:{},interactOutsideBehavior:{},loop:{},trapFocus:{},isValidEvent:{},customAnchor:{},isStatic:{},enabled:{}},[],[],{mode:"open"});var Ra=fa({component:"date-field",parts:["input","label","segment"]}),qi={day:{min:1,max:e=>{const t=e.segmentValues.month,r=e.value.current??e.placeholder.current;return Ks(t?r.set({month:Number.parseInt(t)}):r)},cycle:1,padZero:!0},month:{min:1,max:12,cycle:1,padZero:!0,getAnnouncement:(e,t)=>t.placeholder.current?`${e} - ${t.formatter.fullMonth(Vt(t.placeholder.current.set({month:e})))}`:""},year:{min:1,max:9999,cycle:1,padZero:!1},hour:{min:e=>e.hourCycle.current===12?1:0,max:e=>e.hourCycle.current===24?23:e.hourCycle.current===12||Nm(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}},Rn=new Ot("DateField.Root"),FD=class ay{static create(t,r){return Rn.set(new ay(t,r))}value;placeholder;validate;minValue;maxValue;disabled;readonly;granularity;readonlySegments;hourCycle;locale;hideTimeZone;required;onInvalid;errorMessageId;isInvalidProp;descriptionId=Mn();formatter;initialSegments;#e=Q();get segmentValues(){return p(this.#e)}set segmentValues(t){I(this.#e,t,!0)}announcer;#t=D(()=>new Set(this.readonlySegments.current));get readonlySegmentsSet(){return p(this.#t)}set readonlySegmentsSet(t){I(this.#t,t)}segmentStates=$m();#r=Q(null);#n=Q(null);#i=Q(null);get descriptionNode(){return p(this.#i)}set descriptionNode(t){I(this.#i,t,!0)}#s=Q(null);get validationNode(){return p(this.#s)}set validationNode(t){I(this.#s,t,!0)}states=$m();#a=Q(null);get dayPeriodNode(){return p(this.#a)}set dayPeriodNode(t){I(this.#a,t,!0)}rangeRoot=void 0;#o=Q("");get name(){return p(this.#o)}set name(t){I(this.#o,t,!0)}domContext=new Li(()=>null);constructor(t,r){this.rangeRoot=r,this.value=t.value,this.placeholder=r?r.opts.placeholder:t.placeholder,this.validate=r?wr(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=zm({initialLocale:this.locale.current,monthFormat:R(()=>"long"),yearFormat:R(()=>"numeric")}),this.initialSegments=ju(this.inferredGranularity),this.segmentValues=this.initialSegments,this.announcer=Sa(null),this.getFieldNode=this.getFieldNode.bind(this),this.updateSegment=this.updateSegment.bind(this),this.handleSegmentClick=this.handleSegmentClick.bind(this),this.getBaseSegmentAttrs=this.getBaseSegmentAttrs.bind(this),me(()=>{qe(()=>{this.initialSegments=ju(this.inferredGranularity)})}),rn(()=>{this.announcer=Sa(this.domContext.getDocument())}),ni(()=>{r||wO(this.descriptionId,this.domContext.getDocument())}),me(()=>{r||this.formatter.getLocale()!==this.locale.current&&this.formatter.setLocale(this.locale.current)}),me(()=>{if(r)return;this.value.current&&_O({id:qe(()=>this.descriptionId),formatter:this.formatter,value:this.value.current,doc:this.domContext.getDocument()});const n=qe(()=>this.placeholder.current);this.value.current&&n!==this.value.current&&qe(()=>{this.value.current&&(this.placeholder.current=this.value.current)})}),this.value.current&&this.syncSegmentValues(this.value.current),me(()=>{this.locale.current,this.value.current&&this.syncSegmentValues(this.value.current),this.#l()}),me(()=>{this.value.current===void 0&&(this.segmentValues=ju(this.inferredGranularity))}),tt(()=>this.validationStatus,()=>{this.validationStatus!==!1&&this.onInvalid.current?.(this.validationStatus.reason,this.validationStatus.message)})}setName(t){this.name=t}setFieldNode(t){I(this.#r,t,!0)}getFieldNode(){return this.rangeRoot?this.rangeRoot.fieldNode:p(this.#r)}setLabelNode(t){I(this.#n,t,!0)}getLabelNode(){return this.rangeRoot?this.rangeRoot.labelNode:p(this.#n)}#l(){this.states.day.updating=null,this.states.month.updating=null,this.states.year.updating=null,this.states.hour.updating=null,this.states.minute.updating=null,this.states.dayPeriod.updating=null}setValue(t){this.value.current=t}syncSegmentValues(t){const r=xa.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=Ta.map(s=>{if(s==="dayPeriod")return this.states.dayPeriod.updating?[s,this.states.dayPeriod.updating]:[s,this.formatter.dayPeriod(Vt(t))];if(s==="hour"){if(this.states.hour.updating)return[s,this.states.hour.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`];if(t[s]===0&&this.dayPeriodNode)return[s,"12"]}else if(s==="minute"){if(this.states.minute.updating)return[s,this.states.minute.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}else if(s==="second"){if(this.states.second.updating)return[s,this.states.second.updating];if(t[s]!==void 0&&t[s]<10)return[s,`0${t[s]}`]}return[s,`${t[s]}`]}),i=[...r,...n];this.segmentValues=Object.fromEntries(i),this.#l();return}this.segmentValues=Object.fromEntries(r)}#u=D(()=>{const t=this.value.current;if(!t)return!1;const r=this.validate.current?.(t);if(r)return{reason:"custom",message:r};const n=this.minValue.current;if(n&&oi(t,n))return{reason:"min"};const i=this.maxValue.current;return i&&oi(i,t)?{reason:"max"}:!1});get validationStatus(){return p(this.#u)}set validationStatus(t){I(this.#u,t)}#d=D(()=>this.validationStatus===!1?!1:(this.isInvalidProp.current,!0));get isInvalid(){return p(this.#d)}set isInvalid(t){I(this.#d,t)}#c=D(()=>{const t=this.granularity.current;return t||yO(this.placeholder.current,this.granularity.current)});get inferredGranularity(){return p(this.#c)}set inferredGranularity(t){I(this.#c,t)}#h=D(()=>this.value.current!==void 0?this.value.current:this.placeholder.current);get dateRef(){return p(this.#h)}set dateRef(t){I(this.#h,t)}#p=D(()=>fO({segmentValues:this.segmentValues,formatter:this.formatter,locale:this.locale.current,granularity:this.inferredGranularity,dateRef:this.dateRef,hideTimeZone:this.hideTimeZone.current,hourCycle:this.hourCycle.current}));get allSegmentContent(){return p(this.#p)}set allSegmentContent(t){I(this.#p,t)}#f=D(()=>this.allSegmentContent.arr);get segmentContents(){return p(this.#f)}set segmentContents(t){I(this.#f,t)}sharedSegmentAttrs={role:"spinbutton",contenteditable:"true",tabindex:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:{caretColor:"transparent"},onbeforeinput:t=>{(!t.data||t.data.length<=1)&&t.preventDefault()}};#m(t){return`${t} ${this.getLabelNode()?.id??""}`}updateSegment(t,r){const n=this.disabled.current,i=this.readonly.current,s=this.readonlySegmentsSet;if(n||i||s.has(t))return;const o=this.segmentValues;let a=o;const l=this.placeholder.current;if(gO(o)){const c=o[t],d=r;if(t==="month"){const u=d(c);if(this.states.month.updating=u,u!==null&&o.day!==null){const h=Ks(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`)}a={...o,[t]:u}}else if(t==="dayPeriod"){const u=d(c);this.states.dayPeriod.updating=u;const h=this.value.current;if(h&&"hour"in h){const f=h.hour;u==="AM"?f>=12&&(o.hour=`${f-12}`):u==="PM"&&f<12&&(o.hour=`${f+12}`)}a={...o,[t]:u}}else if(t==="hour"){const u=d(c);if(this.states.hour.updating=u,u!==null&&o.dayPeriod!==null){const h=this.formatter.dayPeriod(Vt(l.set({hour:Number.parseInt(u)})),this.hourCycle.current);(h==="AM"||h==="PM")&&(o.dayPeriod=h)}a={...o,[t]:u}}else if(t==="minute"){const u=d(c);this.states.minute.updating=u,a={...o,[t]:u}}else if(t==="second"){const u=d(c);this.states.second.updating=u,a={...o,[t]:u}}else if(t==="year"){const u=d(c);this.states.year.updating=u,a={...o,[t]:u}}else if(t==="day"){const u=d(c);this.states.day.updating=u,a={...o,[t]:u}}else{const u=d(c);a={...o,[t]:u}}}else if(Aa(t)){const c=o[t],d=r,u=d(c);if(t==="month"&&u!==null&&o.day!==null){this.states.month.updating=u;const h=Ks(Vt(l.set({month:Number.parseInt(u)})));Number.parseInt(o.day)>h&&(o.day=`${h}`),a={...o,[t]:u}}else if(t==="year"){const h=d(c);this.states.year.updating=h,a={...o,[t]:h}}else if(t==="day"){const h=d(c);this.states.day.updating=h,a={...o,[t]:h}}else a={...o,[t]:u}}this.segmentValues=a,vO(a,p(this.#r))?this.setValue(mO({segmentObj:a,fieldNode:p(this.#r),dateRef:this.placeholder.current})):(this.setValue(void 0),this.segmentValues=a)}handleSegmentClick(t){this.disabled.current&&t.preventDefault()}getBaseSegmentAttrs(t,r){const n=this.readonlySegmentsSet.has(t),i={"aria-invalid":$u(this.isInvalid),"aria-disabled":kr(this.disabled.current),"aria-readonly":kr(this.readonly.current||n),"data-invalid":Le(this.isInvalid),"data-disabled":Le(this.disabled.current),"data-readonly":Le(this.readonly.current||n),"data-segment":`${t}`,[Ra.segment]:""};if(t==="literal")return i;const s=this.descriptionNode?.id,o=bO(r,p(this.#r))&&s,a=this.errorMessageId?.current,l=o?`${s} ${this.isInvalid&&a?a:""}`:void 0,c=!(this.readonly.current||n||this.disabled.current);return{...i,"aria-labelledby":this.#m(r),contenteditable:c?"true":void 0,"aria-describedby":l,tabindex:this.disabled.current?void 0:0}}},ND=class ly{static create(t){return new ly(t,Rn.get())}opts;root;domContext;attachment;constructor(t,r){this.opts=t,this.root=r,this.domContext=new Li(t.ref),this.root.domContext=this.domContext,this.attachment=Qe(t.ref,n=>this.root.setFieldNode(n)),tt(()=>this.opts.name.current,n=>{this.root.setName(n)})}#e=D(()=>{if(on&&this.domContext.getElementById(this.root.descriptionId))return this.root.descriptionId});#t=D(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.root.getLabelNode()?.id??void 0,"aria-describedby":p(this.#e),"aria-disabled":kr(this.root.disabled.current),"data-invalid":this.root.isInvalid?"":void 0,"data-disabled":Le(this.root.disabled.current),[Ra.input]:"",...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}},RD=class uy{static create(){return new uy(Rn.get())}root;#e=D(()=>this.root.name!=="");get shouldRender(){return p(this.#e)}set shouldRender(t){I(this.#e,t)}#t=D(()=>this.root.value.current?this.root.value.current.toString():"");get isoValue(){return p(this.#t)}set isoValue(t){I(this.#t,t)}constructor(t){this.root=t}#r=D(()=>({name:this.root.name,value:this.isoValue,required:this.root.required.current}));get props(){return p(this.#r)}set props(t){I(this.#r,t)}},LD=class cy{static create(t){return new cy(t,Rn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onclick=this.onclick.bind(this),this.attachment=Qe(t.ref,n=>this.root.setLabelNode(n))}onclick(t){if(this.root.disabled.current)return;const r=EO(this.root.getFieldNode());r&&r.focus()}#e=D(()=>({id:this.opts.id.current,"data-invalid":Le(this.root.isInvalid),"data-disabled":Le(this.root.disabled.current),[Ra.label]:"",onclick:this.onclick,...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},ji=class{opts;root;announcer;part;config;attachment;constructor(e,t,r,n){this.opts=e,this.root=t,this.part=r,this.config=n,this.announcer=t.announcer,this.onkeydown=this.onkeydown.bind(this),this.onfocusout=this.onfocusout.bind(this),this.attachment=Qe(e.ref)}#e(){return typeof this.config.max=="function"?this.config.max(this.root):this.config.max}#t(){return typeof this.config.min=="function"?this.config.min(this.root):this.config.min}#r(e){return this.config.getAnnouncement?this.config.getAnnouncement(e,this.root):e}#n(e,t=!0){const r=String(e);return t&&this.config.padZero&&r.length===1?`0${e}`:r}onkeydown(e){const t=this.root.value.current??this.root.placeholder.current;if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&!((this.part==="hour"||this.part==="minute"||this.part==="second")&&!(this.part in t))&&(e.key!=="Tab"&&e.preventDefault(),!!Zu(e.key))){if(_c(e.key)){this.#i(t);return}if(wc(e.key)){this.#s(t);return}if(ha(e.key)){this.#a(e);return}if(kc(e.key)){this.#o(e);return}Xs(e.key)&&Js(e,this.root.getFieldNode())}}#i(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#s(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!1),this.root.updateSegment(this.part,r=>{if(r===null){const i=e[this.part];return this.announcer.announce(this.#r(i)),this.#n(i)}const n=e.set({[this.part]:Number.parseInt(r)}).cycle(this.part,-this.config.cycle)[this.part];return this.announcer.announce(this.#r(n)),this.#n(n)})}#a(e){const t=Number.parseInt(e.key);let r=!1;const n=this.#e(),i=Math.floor(n/10),s=t===0,o=this.part;this.root.updateSegment(this.part,a=>{if(o in this.root.states&&this.root.states[o].hasLeftFocus&&(a=null,this.root.states[o].hasLeftFocus=!1),a===null)return s?(o in this.root.states&&(this.root.states[o].lastKeyZero=!0),this.announcer.announce("0"),"0"):(o in this.root.states&&(this.root.states[o].lastKeyZero||t>i)&&(r=!0),o in this.root.states&&(this.root.states[o].lastKeyZero=!1),r&&String(t).length===1?(this.announcer.announce(t),`0${t}`):`${t}`);if(o in this.root.states&&this.root.states[o].lastKeyZero)return t!==0?(r=!0,this.root.states[o].lastKeyZero=!1,`0${t}`):this.part==="hour"&&t===0&&this.root.hourCycle.current===24?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):(this.part==="minute"||this.part==="second")&&t===0?(r=!0,this.root.states[o].lastKeyZero=!1,"00"):a;const l=Number.parseInt(a+t.toString());return l>n?(r=!0,`0${t}`):(r=!0,`${l}`)}),r&&Rm(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&&Lm(e,this.root.getFieldNode())}onfocusout(e){const t=this.part;t in this.root.states&&(this.root.states[t].hasLeftFocus=!0),this.config.padZero&&this.root.updateSegment(this.part,r=>r&&r.length===1?`0${r}`:r)}getSegmentProps(){const e=this.root.segmentValues,t=this.root.placeholder.current,r=e[this.part]===null;let n=t;e[this.part]&&(n=t.set({[this.part]:Number.parseInt(e[this.part])}));const i=n[this.part],s=this.#t(),o=this.#e();let a=r?"Empty":`${i}`;return this.part==="hour"&&"dayPeriod"in e&&e.dayPeriod&&(a=r?"Empty":`${i} ${e.dayPeriod}`),{"aria-label":`${this.part}, `,"aria-valuemin":s,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":a}}#l=D(()=>({...this.root.sharedSegmentAttrs,id:this.opts.id.current,...this.getSegmentProps(),onkeydown:this.onkeydown,onfocusout:this.onfocusout,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs(this.part,this.opts.id.current),...this.attachment}));get props(){return p(this.#l)}set props(e){I(this.#l,e)}},zD=class extends ji{#e=[];#t=0;constructor(e,t){super(e,t,"year",qi.year)}onkeydown(e){if(!(e.ctrlKey||e.metaKey||this.root.disabled.current)&&(e.key!=="Tab"&&e.preventDefault(),!!Zu(e.key))){if(_c(e.key)){this.#r(),super.onkeydown(e);return}if(wc(e.key)){this.#r(),super.onkeydown(e);return}if(ha(e.key)){this.#i(e);return}if(kc(e.key)){this.#s(e);return}Xs(e.key)&&Js(e,this.root.getFieldNode())}}#r(){this.#t=0}#n(){this.#t++}#i(e){this.#e.push(e.key);let t=!1;const r=Number.parseInt(e.key);this.root.updateSegment("year",n=>{if(this.root.states.year.hasLeftFocus&&(n=null,this.root.states.year.hasLeftFocus=!1),n===null)return this.announcer.announce(r),`000${r}`;const i=n.toString()+r.toString(),s=Number.parseInt(i);if(String(s).length<4)return this.#t>0&&this.#e.length<=this.#t&&i.length<=4?(this.announcer.announce(s),i):(this.announcer.announce(s),xv(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&&Rm(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&&Lm(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?xv(Number.parseInt(t)):t)}},UD=class extends ji{constructor(e,t){super(e,t,"day",qi.day)}},VD=class extends ji{constructor(e,t){super(e,t,"month",qi.month)}},BD=class extends ji{constructor(e,t){super(e,t,"hour",qi.hour)}onkeydown(e){if(ha(e.key)){const t=this.root.updateSegment.bind(this.root);this.root.updateSegment=(r,n)=>{const i=t(r,n);return r==="hour"&&"hour"in this.root.segmentValues&&this.root.segmentValues.hour==="0"&&this.root.dayPeriodNode&&this.root.hourCycle.current!==24&&(this.root.segmentValues.hour="12"),i}}super.onkeydown(e),this.root.updateSegment=this.root.updateSegment.bind(this.root)}},qD=class extends ji{constructor(e,t){super(e,t,"minute",qi.minute)}},jD=class extends ji{constructor(e,t){super(e,t,"second",qi.second)}},ZD=class dy{static create(t){return new dy(t,Rn.get())}opts;root;attachment;#e;constructor(t,r){this.opts=t,this.root=r,this.#e=this.root.announcer,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref,n=>this.root.dayPeriodNode=n)}onkeydown(t){if(!(t.ctrlKey||t.metaKey||this.root.disabled.current)&&(t.key!=="Tab"&&t.preventDefault(),!!KD(t.key))){if(_c(t.key)||wc(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}kc(t.key)&&(this.root.states.dayPeriod.hasLeftFocus=!1,this.root.updateSegment("dayPeriod",()=>(this.#e.announce("AM"),"AM"))),t.key==="A"||t.key,this.root.updateSegment("dayPeriod",()=>{const r=t.key==="A"||t.key==="a"?"AM":"PM";return this.#e.announce(r),r}),Xs(t.key)&&Js(t,this.root.getFieldNode())}}#t=D(()=>{const t=this.root.segmentValues;if(!("dayPeriod"in t))return;const r=0,n=12,i=t.dayPeriod==="AM"?0:12,s=t.dayPeriod??"AM";return{...this.root.sharedSegmentAttrs,id:this.opts.id.current,inputmode:"text","aria-label":"AM/PM","aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":i,"aria-valuetext":s,onkeydown:this.onkeydown,onclick:this.root.handleSegmentClick,...this.root.getBaseSegmentAttrs("dayPeriod",this.opts.id.current),...this.attachment}});get props(){return p(this.#t)}set props(t){I(this.#t,t)}},WD=class fy{static create(t){return new fy(t,Rn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(t.ref)}#e=D(()=>({id:this.opts.id.current,"aria-hidden":$u(!0),...this.root.getBaseSegmentAttrs("literal",this.opts.id.current),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},HD=class hy{static create(t){return new hy(t,Rn.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.onkeydown=this.onkeydown.bind(this),this.attachment=Qe(t.ref)}onkeydown(t){t.key!=="Tab"&&t.preventDefault(),!this.root.disabled.current&&Xs(t.key)&&Js(t,this.root.getFieldNode())}#e=D(()=>({role:"textbox",id:this.opts.id.current,"aria-label":"timezone, ",style:{caretColor:"transparent"},onkeydown:this.onkeydown,...this.root.getBaseSegmentAttrs("timeZoneName",this.opts.id.current),"data-readonly":Le(!0),...this.attachment}));get props(){return p(this.#e)}set props(t){I(this.#e,t)}},GD=class{static create(e,t){const r=Rn.get();switch(e){case"day":return new UD(t,r);case"month":return new VD(t,r);case"year":return new zD(t,r);case"hour":return new BD(t,r);case"minute":return new qD(t,r);case"second":return new jD(t,r);case"dayPeriod":return new ZD(t,r);case"literal":return new WD(t,r);case"timeZoneName":return new HD(t,r)}}};function KD(e){return Zu(e)||e==="A"||e==="P"||e==="a"||e==="p"}function _c(e){return e===Fu}function wc(e){return e===Mu}function kc(e){return e===nA}function xv(e){const t=4-String(e).length;return`${"0".repeat(t)}${e}`}function Tv(e,t){ee(t,!1);const r=RD.create();jl();var n=K(),i=z(n),s=o=>{Gm(o,kn(()=>r.props))};ce(i,o=>{r.shouldRender&&o(s)}),S(e,n),te()}re(Tv,{},[],[],{mode:"open"});var YD=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","name","children","child"]),JD=W("<div><!></div>"),XD=W("<!> <!>",1);function Av(e,t){const r=vt();ee(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"name",7,""),o=b(t,"children",7),a=b(t,"child",7),l=je(t,YD);const c=ND.create({id:R(()=>n()),ref:R(()=>i(),v=>i(v)),name:R(()=>s())}),d=D(()=>We(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get name(){return s()},set name(v=""){s(v),y()},get children(){return o()},set children(v){o(v),y()},get child(){return a()},set child(v){a(v),y()}},h=XD(),f=z(h),g=v=>{var _=K(),x=z(_);_e(x,a,()=>({props:p(d),segments:c.root.segmentContents})),S(v,_)},m=v=>{var _=JD();Ne(_,()=>({...p(d)}));var x=M(_);_e(x,()=>o()??Fe,()=>({segments:c.root.segmentContents})),P(_),S(v,_)};return ce(f,v=>{a()?v(g):v(m,-1)}),Tv(X(f,2),{}),S(e,h),te(u)}re(Av,{id:{},ref:{},name:{},children:{},child:{}},[],[],{mode:"open"});var QD=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child"]),eI=W("<div><!></div>");function Ov(e,t){const r=vt();ee(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=je(t,QD);const l=LD.create({id:R(()=>n()),ref:R(()=>i(),m=>i(m))}),c=D(()=>We(a,l.props));var d={get id(){return n()},set id(m=Ce(r)){n(m),y()},get ref(){return i()},set ref(m=null){i(m),y()},get children(){return s()},set children(m){s(m),y()},get child(){return o()},set child(m){o(m),y()}},u=K(),h=z(u),f=m=>{var v=K(),_=z(v);_e(_,o,()=>({props:p(c)})),S(m,v)},g=m=>{var v=eI();Ne(v,()=>({...p(c)}));var _=M(v);_e(_,()=>s()??Fe),P(v),S(m,v)};return ce(h,m=>{o()?m(f):m(g,-1)}),S(e,u),te(d)}re(Ov,{id:{},ref:{},children:{},child:{}},[],[],{mode:"open"});var tI=new Set(["$$slots","$$events","$$legacy","$$host","id","ref","children","child","part"]),rI=W("<span><!></span>");function Cv(e,t){const r=vt();ee(t,!0);let n=b(t,"id",23,()=>Ce(r)),i=b(t,"ref",15,null),s=b(t,"children",7),o=b(t,"child",7),a=b(t,"part",7),l=je(t,tI);const c=GD.create(a(),{id:R(()=>n()),ref:R(()=>i(),v=>i(v))}),d=D(()=>We(l,c.props));var u={get id(){return n()},set id(v=Ce(r)){n(v),y()},get ref(){return i()},set ref(v=null){i(v),y()},get children(){return s()},set children(v){s(v),y()},get child(){return o()},set child(v){o(v),y()},get part(){return a()},set part(v){a(v),y()}},h=K(),f=z(h),g=v=>{var _=K(),x=z(_);_e(x,o,()=>({props:p(d)})),S(v,_)},m=v=>{var _=rI();Ne(_,()=>({...p(d)}));var x=M(_);_e(x,()=>s()??Fe),P(_),S(v,_)};return ce(f,v=>{o()?v(g):v(m,-1)}),S(e,h),te(u)}re(Cv,{id:{},ref:{},children:{},child:{},part:{}},[],[],{mode:"open"});var Dv=new Ot("DatePicker.Root"),nI=class py{static create(t){return Dv.set(new py(t))}opts;constructor(t){this.opts=t}};function Sc(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 Ec(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function Iv(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 iI=class{#e;#t;#r;#n=null;#i=null;#s=[];#a=null;#o=null;#l=null;#u(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#d(){this.#u(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())})}#c(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#h(){this.#r!==null&&(this.#c(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#n||!this.#i)&&(this.#f(),this.#e.onPointerExit())},this.#r))}constructor(e){this.#e=e,this.#t=e.buffer??1;const t=e.transitIntentTimeout;this.#r=typeof t=="number"&&t>0?t:null,tt([e.triggerNode,e.contentNode,e.enabled],([r,n,i])=>{if(!r||!n||!i){this.#a=null,this.#f();return}this.#a&&this.#a!==r&&this.#f(),this.#a=r;const s=da(r),o=u=>{this.#p([u.clientX,u.clientY],r,n)},a=u=>{const h=u.relatedTarget;if(ii(h)&&n.contains(h))return;const f=this.#e.ignoredTargets?.()??[];ii(h)&&f.some(g=>g===h||g.contains(h))||(this.#s=ii(h)&&f.length>0?f.filter(g=>h.contains(g)):[],this.#n=[u.clientX,u.clientY],this.#i="content",this.#d())},l=()=>{this.#f()},c=()=>{this.#f()},d=u=>{const h=u.relatedTarget;ii(h)&&r.contains(h)||(this.#n=[u.clientX,u.clientY],this.#i="trigger",this.#d())};return[ht(s,"pointermove",o),ht(r,"pointerleave",a),ht(r,"pointerenter",l),ht(n,"pointerenter",c),ht(n,"pointerleave",d)].reduce((u,h)=>()=>{u(),h()},()=>{})})}#p(e,t,r){if(!this.#n||!this.#i)return;this.#u(),this.#h();const n=t.getBoundingClientRect(),i=r.getBoundingClientRect();if(this.#i==="content"&&Ec(e,i)){this.#f();return}if(this.#i==="trigger"&&Ec(e,n)){this.#f();return}if(this.#i==="content"&&this.#s.length>0)for(const l of this.#s){const c=l.getBoundingClientRect();if(Ec(e,c))return;const d=Iv(n,c),u=this.#m(n,c,d);if(u&&Sc(e,u))return}const s=Iv(n,i),o=this.#m(n,i,s);if(o&&Sc(e,o))return;const a=this.#i==="content"?i:n;Sc(e,this.#v(this.#n,a,s,this.#i))||(this.#f(),this.#e.onPointerExit())}#f(){this.#n=null,this.#i=null,this.#s=[],this.#u(),this.#c()}#m(e,t,r){const n=this.#t;switch(r){case"top":return[[Math.min(e.left,t.left)-n,e.top],[Math.min(e.left,t.left)-n,t.bottom],[Math.max(e.right,t.right)+n,t.bottom],[Math.max(e.right,t.right)+n,e.top]];case"bottom":return[[Math.min(e.left,t.left)-n,e.bottom],[Math.min(e.left,t.left)-n,t.top],[Math.max(e.right,t.right)+n,t.top],[Math.max(e.right,t.right)+n,e.bottom]];case"left":return[[e.left,Math.min(e.top,t.top)-n],[t.right,Math.min(e.top,t.top)-n],[t.right,Math.max(e.bottom,t.bottom)+n],[e.left,Math.max(e.bottom,t.bottom)+n]];case"right":return[[e.right,Math.min(e.top,t.top)-n],[t.left,Math.min(e.top,t.top)-n],[t.left,Math.max(e.bottom,t.bottom)+n],[e.right,Math.max(e.bottom,t.bottom)+n]]}}#v(e,t,r,n){const i=this.#t*4,[s,o]=e;switch(n==="trigger"?this.#y(r):r){case"top":return[[s-i,o+i],[s+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case"bottom":return[[s-i,o-i],[s+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case"left":return[[s+i,o-i],[s+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case"right":return[[s-i,o-i],[s-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}#y(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}},xc=fa({component:"popover",parts:["root","trigger","content","close","overlay"]}),Tc=new Ot("Popover.Root"),sI=class my{static create(t){return Tc.set(new my(t))}opts;#e=Q(null);get contentNode(){return p(this.#e)}set contentNode(t){I(this.#e,t,!0)}contentPresence;#t=Q(null);get triggerNode(){return p(this.#t)}set triggerNode(t){I(this.#t,t,!0)}#r=Q(null);get overlayNode(){return p(this.#r)}set overlayNode(t){I(this.#r,t,!0)}overlayPresence;#n=Q(!1);get openedViaHover(){return p(this.#n)}set openedViaHover(t){I(this.#n,t,!0)}#i=Q(!1);get hasInteractedWithContent(){return p(this.#i)}set hasInteractedWithContent(t){I(this.#i,t,!0)}#s=Q(!1);get hoverCooldown(){return p(this.#s)}set hoverCooldown(t){I(this.#s,t,!0)}#a=Q(0);get closeDelay(){return p(this.#a)}set closeDelay(t){I(this.#a,t,!0)}#o=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new nm({ref:R(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new nm({ref:R(()=>this.overlayNode),open:this.opts.open}),tt(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#u())})}setDomContext(t){this.#l=t}#u(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#u(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#u(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#u(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#u(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#u()}markInteraction(){this.hasInteractedWithContent=!0,this.#u()}},oI=class vy{static create(t){return new vy(t,Tc.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=Q(!1);constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.triggerNode=n),this.domContext=new Li(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),tt(()=>this.opts.closeDelay.current,n=>{this.root.closeDelay=n})}#n(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#i(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#n(),this.#i()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||pa(t)||(I(this.#r,!0),this.#i(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},r)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(pa(t)||(I(this.#r,!1),this.#n(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#s(),p(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}p(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.#s(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=D(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":kr(this.root.opts.open.current),"data-state":Qp(this.root.opts.open.current),"aria-controls":this.#a(),[xc.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#o)}set props(t){I(this.#o,t)}},aI=class gy{static create(t){return new gy(t,Tc.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=Qe(this.opts.ref,n=>this.root.contentNode=n),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new iI({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const r=t.target;ii(r)&&DA(r)&&this.root.markInteraction()}onpointerenter(t){pa(t)||this.root.cancelDelayedClose()}onpointerleave(t){pa(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!ii(t.target))return;const r=t.target.closest(xc.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(ii(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const n=document.querySelector(this.opts.customAnchor.current);if(n&&n.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=D(()=>({open:this.root.opts.open.current}));get snippetProps(){return p(this.#e)}set snippetProps(t){I(this.#e,t)}#t=D(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Qp(this.root.opts.open.current),...tA(this.root.contentPresence.transitionStatus),[xc.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return p(this.#t)}set props(t){I(this.#t,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}};function Pv(e,t){ee(t,!0);let r=b(t,"open",15,!1),n=b(t,"onOpenChange",7,Se),i=b(t,"onOpenChangeComplete",7,Se),s=b(t,"value",15),o=b(t,"onValueChange",7,Se),a=b(t,"placeholder",15),l=b(t,"onPlaceholderChange",7,Se),c=b(t,"isDateUnavailable",7,()=>!1),d=b(t,"validate",7,Se),u=b(t,"onInvalid",7,Se),h=b(t,"minValue",7),f=b(t,"maxValue",7),g=b(t,"disabled",7,!1),m=b(t,"readonly",7,!1),v=b(t,"granularity",7),_=b(t,"readonlySegments",23,()=>[]),x=b(t,"hourCycle",7),A=b(t,"locale",7),E=b(t,"hideTimeZone",7,!1),T=b(t,"required",7,!1),O=b(t,"calendarLabel",7,"Event"),$=b(t,"disableDaysOutsideMonth",7,!0),L=b(t,"preventDeselect",7,!1),H=b(t,"pagedNavigation",7,!1),N=b(t,"weekStartsOn",7),se=b(t,"weekdayFormat",7,"narrow"),V=b(t,"isDateDisabled",7,()=>!1),oe=b(t,"fixedWeeks",7,!1),pe=b(t,"numberOfMonths",7,1),Y=b(t,"closeOnDateSelect",7,!0),ie=b(t,"initialFocus",7,!1),B=b(t,"errorMessageId",7),j=b(t,"children",7),G=b(t,"monthFormat",7,"long"),J=b(t,"yearFormat",7,"numeric");const le=Tm({granularity:v(),defaultValue:s(),minValue:h(),maxValue:f()});function he(){a()===void 0&&a(le)}he(),tt.pre(()=>a(),()=>{he()});function F(){Y()&&r(!1)}const ue=nI.create({open:R(()=>r(),w=>{r(w),n()(w)}),value:R(()=>s(),w=>{s(w),o()(w)}),placeholder:R(()=>a(),w=>{a(w),l()(w)}),isDateUnavailable:R(()=>c()),minValue:R(()=>h()),maxValue:R(()=>f()),disabled:R(()=>g()),readonly:R(()=>m()),granularity:R(()=>v()),readonlySegments:R(()=>_()),hourCycle:R(()=>x()),locale:sm(()=>A()),hideTimeZone:R(()=>E()),required:R(()=>T()),calendarLabel:R(()=>O()),disableDaysOutsideMonth:R(()=>$()),preventDeselect:R(()=>L()),pagedNavigation:R(()=>H()),weekStartsOn:R(()=>N()),weekdayFormat:R(()=>se()),isDateDisabled:R(()=>V()),fixedWeeks:R(()=>oe()),numberOfMonths:R(()=>pe()),initialFocus:R(()=>ie()),onDateSelect:R(()=>F),defaultPlaceholder:le,monthFormat:R(()=>G()),yearFormat:R(()=>J())});sI.create({open:ue.opts.open,onOpenChangeComplete:R(()=>i())}),FD.create({value:ue.opts.value,disabled:ue.opts.disabled,readonly:ue.opts.readonly,readonlySegments:ue.opts.readonlySegments,validate:R(()=>d()),onInvalid:R(()=>u()),minValue:ue.opts.minValue,maxValue:ue.opts.maxValue,granularity:ue.opts.granularity,hideTimeZone:ue.opts.hideTimeZone,hourCycle:ue.opts.hourCycle,locale:ue.opts.locale,required:ue.opts.required,placeholder:ue.opts.placeholder,errorMessageId:R(()=>B()),isInvalidProp:R(()=>{})});var U={get open(){return r()},set open(w=!1){r(w),y()},get onOpenChange(){return n()},set onOpenChange(w=Se){n(w),y()},get onOpenChangeComplete(){return i()},set onOpenChangeComplete(w=Se){i(w),y()},get value(){return s()},set value(w){s(w),y()},get onValueChange(){return o()},set onValueChange(w=Se){o(w),y()},get placeholder(){return a()},set placeholder(w){a(w),y()},get onPlaceholderChange(){return l()},set onPlaceholderChange(w=Se){l(w),y()},get isDateUnavailable(){return c()},set isDateUnavailable(w=()=>!1){c(w),y()},get validate(){return d()},set validate(w=Se){d(w),y()},get onInvalid(){return u()},set onInvalid(w=Se){u(w),y()},get minValue(){return h()},set minValue(w){h(w),y()},get maxValue(){return f()},set maxValue(w){f(w),y()},get disabled(){return g()},set disabled(w=!1){g(w),y()},get readonly(){return m()},set readonly(w=!1){m(w),y()},get granularity(){return v()},set granularity(w){v(w),y()},get readonlySegments(){return _()},set readonlySegments(w=[]){_(w),y()},get hourCycle(){return x()},set hourCycle(w){x(w),y()},get locale(){return A()},set locale(w){A(w),y()},get hideTimeZone(){return E()},set hideTimeZone(w=!1){E(w),y()},get required(){return T()},set required(w=!1){T(w),y()},get calendarLabel(){return O()},set calendarLabel(w="Event"){O(w),y()},get disableDaysOutsideMonth(){return $()},set disableDaysOutsideMonth(w=!0){$(w),y()},get preventDeselect(){return L()},set preventDeselect(w=!1){L(w),y()},get pagedNavigation(){return H()},set pagedNavigation(w=!1){H(w),y()},get weekStartsOn(){return N()},set weekStartsOn(w){N(w),y()},get weekdayFormat(){return se()},set weekdayFormat(w="narrow"){se(w),y()},get isDateDisabled(){return V()},set isDateDisabled(w=()=>!1){V(w),y()},get fixedWeeks(){return oe()},set fixedWeeks(w=!1){oe(w),y()},get numberOfMonths(){return pe()},set numberOfMonths(w=1){pe(w),y()},get closeOnDateSelect(){return Y()},set closeOnDateSelect(w=!0){Y(w),y()},get initialFocus(){return ie()},set initialFocus(w=!1){ie(w),y()},get errorMessageId(){return B()},set errorMessageId(w){B(w),y()},get children(){return j()},set children(w){j(w),y()},get monthFormat(){return G()},set monthFormat(w="long"){G(w),y()},get yearFormat(){return J()},set yearFormat(w="numeric"){J(w),y()}},ge=K(),de=z(ge);return De(de,()=>yv,(w,Be)=>{Be(w,{children:(Pe,Ye)=>{var kt=K(),Ge=z(kt);_e(Ge,()=>j()??Fe),S(Pe,kt)},$$slots:{default:!0}})}),S(e,ge),te(U)}re(Pv,{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 lI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref"]),uI=W("<div><!></div>");function $v(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=je(t,lI);const l=Dv.get(),c=jm.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),calendarLabel:l.opts.calendarLabel,fixedWeeks:l.opts.fixedWeeks,isDateDisabled:l.opts.isDateDisabled,isDateUnavailable:l.opts.isDateUnavailable,locale:l.opts.locale,numberOfMonths:l.opts.numberOfMonths,pagedNavigation:l.opts.pagedNavigation,preventDeselect:l.opts.preventDeselect,readonly:l.opts.readonly,type:R(()=>"single"),weekStartsOn:l.opts.weekStartsOn,weekdayFormat:l.opts.weekdayFormat,disabled:l.opts.disabled,disableDaysOutsideMonth:l.opts.disableDaysOutsideMonth,maxValue:l.opts.maxValue,minValue:l.opts.minValue,placeholder:l.opts.placeholder,value:l.opts.value,onDateSelect:l.opts.onDateSelect,initialFocus:l.opts.initialFocus,defaultPlaceholder:l.opts.defaultPlaceholder,maxDays:R(()=>{}),monthFormat:l.opts.monthFormat,yearFormat:l.opts.yearFormat}),d=D(()=>We(a,c.props));var u={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()}},h=K(),f=z(h),g=v=>{var _=K(),x=z(_);{let A=D(()=>({props:p(d),...c.snippetProps}));_e(x,i,()=>p(A))}S(v,_)},m=v=>{var _=uI();Ne(_,()=>({...p(d)}));var x=M(_);_e(x,()=>n()??Fe,()=>c.snippetProps),P(_),S(v,_)};return ce(f,v=>{i()?v(g):v(m,-1)}),S(e,h),te(u)}re($v,{children:{},child:{},id:{},ref:{}},[],[],{mode:"open"});var cI=new Set(["$$slots","$$events","$$legacy","$$host","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),Mv=W("<div><div><!></div></div>");function Fv(e,t){const r=vt();ee(t,!0);let n=b(t,"child",7),i=b(t,"children",7),s=b(t,"ref",15,null),o=b(t,"id",23,()=>Ce(r)),a=b(t,"forceMount",7,!1),l=b(t,"onOpenAutoFocus",7,Se),c=b(t,"onCloseAutoFocus",7,Se),d=b(t,"onEscapeKeydown",7,Se),u=b(t,"onInteractOutside",7,Se),h=b(t,"trapFocus",7,!0),f=b(t,"preventScroll",7,!1),g=b(t,"customAnchor",7,null),m=b(t,"style",7),v=je(t,cI);const _=aI.create({id:R(()=>o()),ref:R(()=>s(),N=>s(N)),onInteractOutside:R(()=>u()),onEscapeKeydown:R(()=>d()),customAnchor:R(()=>g())}),x=D(()=>We(v,_.props)),A=D(()=>h()&&_.shouldTrapFocus);function E(N){_.shouldTrapFocus||N.preventDefault(),l()(N)}var T={get child(){return n()},set child(N){n(N),y()},get children(){return i()},set children(N){i(N),y()},get ref(){return s()},set ref(N=null){s(N),y()},get id(){return o()},set id(N=Ce(r)){o(N),y()},get forceMount(){return a()},set forceMount(N=!1){a(N),y()},get onOpenAutoFocus(){return l()},set onOpenAutoFocus(N=Se){l(N),y()},get onCloseAutoFocus(){return c()},set onCloseAutoFocus(N=Se){c(N),y()},get onEscapeKeydown(){return d()},set onEscapeKeydown(N=Se){d(N),y()},get onInteractOutside(){return u()},set onInteractOutside(N=Se){u(N),y()},get trapFocus(){return h()},set trapFocus(N=!0){h(N),y()},get preventScroll(){return f()},set preventScroll(N=!1){f(N),y()},get customAnchor(){return g()},set customAnchor(N=null){g(N),y()},get style(){return m()},set style(N){m(N),y()}},O=K(),$=z(O),L=N=>{Ev(N,kn(()=>p(x),()=>_.popperProps,{get ref(){return _.opts.ref},get enabled(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!0,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,oe)=>{let pe=()=>oe?.().props,Y=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:vv("popover")},{style:m()}));var B=K(),j=z(B),G=le=>{var he=K(),F=z(he);{let ue=D(()=>({props:p(ie),wrapperProps:Y(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,he)},J=le=>{var he=Mv();Ne(he,()=>({...Y()}));var F=M(he);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Fe),P(F),P(he),S(le,he)};ce(j,le=>{n()?le(G):le(J,-1)}),S(V,B)},$$slots:{popper:!0}}))},H=N=>{Sv(N,kn(()=>p(x),()=>_.popperProps,{get ref(){return _.opts.ref},get open(){return _.root.opts.open.current},get id(){return o()},get trapFocus(){return p(A)},get preventScroll(){return f()},loop:!0,forceMount:!1,get customAnchor(){return g()},onOpenAutoFocus:E,get onCloseAutoFocus(){return c()},get shouldRender(){return _.shouldRender},popper:(V,oe)=>{let pe=()=>oe?.().props,Y=()=>oe?.().wrapperProps;const ie=D(()=>We(pe(),{style:vv("popover")},{style:m()}));var B=K(),j=z(B),G=le=>{var he=K(),F=z(he);{let ue=D(()=>({props:p(ie),wrapperProps:Y(),..._.snippetProps}));_e(F,n,()=>p(ue))}S(le,he)},J=le=>{var he=Mv();Ne(he,()=>({...Y()}));var F=M(he);Ne(F,()=>({...p(ie)}));var ue=M(F);_e(ue,()=>i()??Fe),P(F),P(he),S(le,he)};ce(j,le=>{n()?le(G):le(J,-1)}),S(V,B)},$$slots:{popper:!0}}))};return ce($,N=>{a()?N(L):a()||N(H,1)}),S(e,O),te(T)}re(Fv,{child:{},children:{},ref:{},id:{},forceMount:{},onOpenAutoFocus:{},onCloseAutoFocus:{},onEscapeKeydown:{},onInteractOutside:{},trapFocus:{},preventScroll:{},customAnchor:{},style:{}},[],[],{mode:"open"});var dI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onOpenAutoFocus"]);function Nv(e,t){ee(t,!0);let r=b(t,"ref",15,null),n=b(t,"onOpenAutoFocus",7),i=je(t,dI);const s=D(()=>We({onOpenAutoFocus:n()},{onOpenAutoFocus:zO}));var o={get ref(){return r()},set ref(a=null){r(a),y()},get onOpenAutoFocus(){return n()},set onOpenAutoFocus(a){n(a),y()}};return Fv(e,kn(()=>p(s),()=>i,{get ref(){return r()},set ref(a){r(a)}})),te(o)}re(Nv,{ref:{},onOpenAutoFocus:{}},[],[],{mode:"open"});var fI=new Set(["$$slots","$$events","$$legacy","$$host","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),hI=W("<button><!></button>");function Rv(e,t){const r=vt();ee(t,!0);let n=b(t,"children",7),i=b(t,"child",7),s=b(t,"id",23,()=>Ce(r)),o=b(t,"ref",15,null),a=b(t,"type",7,"button"),l=b(t,"disabled",7,!1),c=b(t,"openOnHover",7,!1),d=b(t,"openDelay",7,700),u=b(t,"closeDelay",7,300),h=je(t,fI);const f=oI.create({id:R(()=>s()),ref:R(()=>o(),v=>o(v)),disabled:R(()=>!!l()),openOnHover:R(()=>c()),openDelay:R(()=>d()),closeDelay:R(()=>u())}),g=D(()=>We(h,f.props,{type:a()}));var m={get children(){return n()},set children(v){n(v),y()},get child(){return i()},set child(v){i(v),y()},get id(){return s()},set id(v=Ce(r)){s(v),y()},get ref(){return o()},set ref(v=null){o(v),y()},get type(){return a()},set type(v="button"){a(v),y()},get disabled(){return l()},set disabled(v=!1){l(v),y()},get openOnHover(){return c()},set openOnHover(v=!1){c(v),y()},get openDelay(){return d()},set openDelay(v=700){d(v),y()},get closeDelay(){return u()},set closeDelay(v=300){u(v),y()}};return bv(e,{get id(){return s()},get ref(){return f.opts.ref},children:(v,_)=>{var x=K(),A=z(x),E=O=>{var $=K(),L=z($);_e(L,i,()=>({props:p(g)})),S(O,$)},T=O=>{var $=hI();Ne($,()=>({...p(g)}));var L=M($);_e(L,()=>n()??Fe),P($),S(O,$)};ce(A,O=>{i()?O(E):O(T,-1)}),S(v,x)},$$slots:{default:!0}}),te(m)}re(Rv,{children:{},child:{},id:{},ref:{},type:{},disabled:{},openOnHover:{},openDelay:{},closeDelay:{}},[],[],{mode:"open"});var pI=new Set(["$$slots","$$events","$$legacy","$$host","ref","onkeydown"]);function Lv(e,t){ee(t,!0);let r=b(t,"ref",15,null),n=b(t,"onkeydown",7),i=je(t,pI);function s(l){if(Xs(l.key)){const c=l.currentTarget.closest(Ra.selector("input"));if(!c)return;Js(l,c)}}const o=D(()=>We({onkeydown:n()},{onkeydown:s}));var a={get ref(){return r()},set ref(l=null){r(l),y()},get onkeydown(){return n()},set onkeydown(l){n(l),y()}};return Rv(e,kn(()=>i,{"data-segment":"trigger"},()=>p(o),{get ref(){return r()},set ref(l){r(l)}})),te(a)}re(Lv,{ref:{},onkeydown:{}},[],[],{mode:"open"});var Ac=W("<!> <!>",1),zv=W("<!> <!> <!>",1);function Uv(e,t){ee(t,!0);let r=b(t,"dateString",15),n=b(t,"labelClass",7),i=b(t,"inputClass",7),s=b(t,"labelText",7),o=Q($e(Xn(Ut())));const a="go-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);me(()=>{r(p(o).toString())});var l={get dateString(){return r()},set dateString(u){r(u),y()},get labelClass(){return n()},set labelClass(u){n(u),y()},get inputClass(){return i()},set inputClass(u){i(u),y()},get labelText(){return s()},set labelText(u){s(u),y()}},c=K(),d=z(c);{let u=D(()=>C.locale||"de");De(d,()=>Pv,(h,f)=>{f(h,{get locale(){return p(u)},weekStartsOn:1,isDateDisabled:g=>g.compare(Xn(Ut()))<0,get value(){return p(o)},set value(g){I(o,g,!0)},children:(g,m)=>{var v=zv(),_=z(v);De(_,()=>Ov,(E,T)=>{T(E,{get id(){return a},get class(){return`go-datepicker-label ${n()??""}`},children:(O,$)=>{var L=K(),H=z(L),N=se=>{var V=K(),oe=z(V);_e(oe,s),S(se,V)};ce(H,se=>{s()&&se(N)}),S(O,L)},$$slots:{default:!0}})});var x=X(_,2);{const E=(T,O)=>{let $=()=>O?.().segments;var L=Ac(),H=z(L);Ue(H,17,$,Lr,(se,V)=>{let oe=()=>p(V).part,pe=()=>p(V).value;var Y=K(),ie=z(Y);De(ie,()=>Cv,(B,j)=>{j(B,{get part(){return oe()},children:(G,J)=>{Et();var le=Rt();ae(()=>ne(le,pe())),S(G,le)},$$slots:{default:!0}})}),S(se,Y)});var N=X(H,2);De(N,()=>Lv,(se,V)=>{V(se,{get"aria-labelledby"(){return a},class:"go-calendar-button"})}),S(T,L)};De(x,()=>Av,(T,O)=>{O(T,{get class(){return`go-datepicker-input ${i()??""}`},children:E,$$slots:{default:!0}})})}var A=X(x,2);De(A,()=>Nv,(E,T)=>{T(E,{children:(O,$)=>{var L=K(),H=z(L);{const N=(se,V)=>{let oe=()=>V?.().months,pe=()=>V?.().weekdays;var Y=Ac(),ie=z(Y);De(ie,()=>tc,(j,G)=>{G(j,{children:(J,le)=>{var he=zv(),F=z(he);De(F,()=>ic,(ge,de)=>{de(ge,{class:"go-datepicker-previous"})});var ue=X(F,2);De(ue,()=>rc,(ge,de)=>{de(ge,{class:"go-datepicker-selected-month"})});var U=X(ue,2);De(U,()=>nc,(ge,de)=>{de(ge,{class:"go-datepicker-next"})}),S(J,he)},$$slots:{default:!0}})});var B=X(ie,2);Ue(B,16,oe,j=>j,(j,G)=>{var J=K(),le=z(J);De(le,()=>Yu,(he,F)=>{F(he,{children:(ue,U)=>{var ge=Ac(),de=z(ge);De(de,()=>Qu,(Be,Pe)=>{Pe(Be,{children:(Ye,kt)=>{var Ge=K(),Xt=z(Ge);De(Xt,()=>eo,(ct,Qt)=>{Qt(ct,{children:(St,It)=>{var er=K(),qt=z(er);Ue(qt,17,pe,Lr,(hr,Or)=>{var Cr=K(),mn=z(Cr);De(mn,()=>ec,(Dr,pr)=>{pr(Dr,{children:(Jr,Xr)=>{Et();var _t=Rt();ae(()=>ne(_t,p(Or))),S(Jr,_t)},$$slots:{default:!0}})}),S(hr,Cr)}),S(St,er)},$$slots:{default:!0}})}),S(Ye,Ge)},$$slots:{default:!0}})});var w=X(de,2);De(w,()=>Ju,(Be,Pe)=>{Pe(Be,{children:(Ye,kt)=>{var Ge=K(),Xt=z(Ge);Ue(Xt,16,()=>G.weeks,ct=>ct,(ct,Qt)=>{var St=K(),It=z(St);De(It,()=>eo,(er,qt)=>{qt(er,{children:(hr,Or)=>{var Cr=K(),mn=z(Cr);Ue(mn,16,()=>Qt,Dr=>Dr,(Dr,pr,Jr,Xr)=>{var _t=K(),Ln=z(_t);De(Ln,()=>Xu,(rs,ns)=>{ns(rs,{get date(){return pr},get month(){return G.value},children:(ao,Zc)=>{var mi=K(),is=z(mi);De(is,()=>Ku,(mr,zn)=>{zn(mr,{})}),S(ao,mi)},$$slots:{default:!0}})}),S(Dr,_t)}),S(hr,Cr)},$$slots:{default:!0}})}),S(ct,St)}),S(Ye,Ge)},$$slots:{default:!0}})}),S(ue,ge)},$$slots:{default:!0}})}),S(j,J)}),S(se,Y)};De(H,()=>$v,(se,V)=>{V(se,{children:N,$$slots:{default:!0}})})}S(O,L)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})})}return S(e,c),te(l)}re(Uv,{dateString:{},labelClass:{},inputClass:{},labelText:{}},[],[],{mode:"open"});var mI=new Set(["$$slots","$$events","$$legacy","$$host","field","describedByIds","labelClass","inputClass","host"]),vI=W('<span class="go-field-star" aria-hidden="true">*</span>'),gI=W(" <!>",1),yI=W("<label><!></label> <input/>",1),bI=W("<label><!></label> <textarea></textarea>",1),_I=W('<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>'),wI=W("<label><!></label> <input/> <!>",1),kI=W('<label><input/> <span class="go-checkbox-label"><!></span></label>'),SI=W('<img src="" alt=""/> <option> </option>',1),EI=W('<option disabled="" hidden="" selected=""> </option> <!>',1),xI=W("<!>",1),TI=W("<label><!></label> <select><!></select>",1),AI=W('<img style="width: 60px" aria-hidden="true"/>'),OI=W('<span class="go-payment-mode-icons"></span>'),CI=W('<label><input type="radio"/> <!></label>'),DI=W('<fieldset role="radiogroup"><legend><!></legend> <!></fieldset>'),II=W("<label> <input/></label>"),PI=W("<fieldset><legend><!></legend> <!></fieldset>");function Vv(e,t){ee(t,!0);const r=Y=>{Et();var ie=gI(),B=z(ie),j=X(B),G=J=>{var le=vI();S(J,le)};ce(j,J=>{u().required&&J(G)}),ae(()=>ne(B,`${p(L)??""} `)),S(Y,ie)},n=Y=>{var ie=yI(),B=z(ie);r(M(B)),P(B);var j=X(B,2);Ne(j,()=>({...p($),...v,class:g(),placeholder:u().placeholder,type:u().type,name:u().key}),void 0,void 0,void 0,void 0,!0),ae(()=>{Lt(B,1,zr(f())),ke(B,"for",p(T))}),Ro(j,()=>u().value,G=>u(u().value=G,!0)),S(Y,ie)},i=Y=>{var ie=bI(),B=z(ie);r(M(B)),P(B);var j=X(B,2);xb(j),Ne(j,()=>({...p($),...v,class:g(),placeholder:u().placeholder,name:u().key})),ae(()=>{Lt(B,1,zr(f())),ke(B,"for",p(T))}),Ro(j,()=>u().value,G=>u(u().value=G,!0)),S(Y,ie)},s=Y=>{var ie=wI(),B=z(ie);r(M(B)),P(B);var j=X(B,2),G=he=>{const F=he.currentTarget.files;u(u().value=F&&F[0]?F[0]:null,!0),p(x)?p(x).validateField(u()):u().validate()};Ne(j,()=>({...p($),...v,class:g(),type:"file",accept:"image/*",name:u().key,onchange:G}),void 0,void 0,void 0,void 0,!0);var J=X(j,2),le=he=>{var F=_I(),ue=M(F),U=X(ue,2),ge=M(U,!0);P(U),P(F),ae(de=>{ke(F,"data-field-preview",u().key),ke(ue,"src",p(N)),ke(ue,"alt",de),ne(ge,u().value.name)},[()=>C.t("forms.file.preview_alt")||"User uploaded photo"]),S(he,F)};ce(J,he=>{p(N)&&u().value instanceof File&&he(le)}),ae(()=>{Lt(B,1,zr(f())),ke(B,"for",p(T))}),S(Y,ie)},o=Y=>{var ie=kI(),B=M(ie);Ne(B,()=>({...p($),...v,name:u().key,type:"checkbox",value:"true"}),void 0,void 0,void 0,void 0,!0);var j=X(B,2);r(M(j)),P(j),P(ie),ae(()=>{Lt(ie,1,zr(f())),ke(ie,"for",p(T))}),y_(B,()=>u().value===!0,G=>{u(u().value=G,!0)}),S(Y,ie)},a=Y=>{var ie=TI(),B=z(ie);r(M(B)),P(B);var j=X(B,2);Ne(j,()=>({...p($),...v,name:u().key,class:g()})),v_(j,()=>{var G=M(j),J=xI(),le=z(J),he=F=>{var ue=EI(),U=z(ue),ge=M(U,!0);P(U),U.value=U.__value="";var de=X(U,2);Ue(de,17,()=>u().options(),w=>w.value,(w,Be)=>{var Pe=SI(),Ye=X(z(Pe),2),kt=M(Ye,!0);P(Ye);var Ge={};ae(()=>{ne(kt,p(Be).label),Ge!==(Ge=p(Be).value)&&(Ye.value=(Ye.__value=p(Be).value)??"")}),S(w,Pe)}),ae(w=>ne(ge,w),[()=>C.t("common.choose")]),S(F,ue)};ce(le,F=>{u().options&&F(he)}),S(G,J)}),ae(()=>{Lt(B,1,zr(f())),ke(B,"for",p(T))}),a_(j,()=>u().value,G=>u(u().value=G,!0)),S(Y,ie)},l=Y=>{Uv(Y,{get labelClass(){return f()},get inputClass(){return g()},get labelText(){return r},get dateString(){return u().value},set dateString(ie){u(u().value=ie,!0)}})},c=Y=>{const ie=D(()=>C.payment_modes?Object.values(C.payment_modes):[]);var B=DI(),j=M(B);r(M(j)),P(j);var G=X(j,2);Ue(G,17,()=>p(ie),J=>J.id,(J,le)=>{var he=CI(),F=M(he);Fo(F);var ue=X(F,2),U=ge=>{var de=OI();Ue(de,20,()=>p(le).icons,w=>w,(w,Be)=>{const Pe=D(()=>H+Be+".svg");var Ye=AI();ae(()=>{Lt(Ye,1,zr(Be)),ke(Ye,"src",p(Pe)),ke(Ye,"alt",Be+" icon")}),S(w,Ye)}),P(de),S(ge,de)};ce(ue,ge=>{p(le).icons.length>0&&ge(U)}),P(he),ae((ge,de,w)=>{ke(F,"name",u().key),wf(F,ge),f_(F,de),ke(F,"hidden",p(ie).length===1),ke(F,"aria-label",w)},[()=>String(p(le).id),()=>p(ie).length===1||String(p(le).id)===String(u().value),()=>C.t(`cart.paymentMode.ariaLabel.${p(le).name.toLowerCase()}`)]),Nt("change",F,()=>{u(u().value=String(p(le).id),!0)}),S(J,he)}),P(B),ae(()=>{ke(B,"aria-required",u().required),ke(B,"aria-invalid",u().errors.length>0)}),S(Y,B)},d=Y=>{var ie=PI(),B=M(ie);r(M(B)),P(B);var j=X(B,2),G=J=>{var le=K(),he=z(le);Ue(he,17,()=>u().options,Lr,(F,ue)=>{var U=II(),ge=M(U),de=X(ge);Ne(de,()=>({...p($),...v,class:g(),type:"radio"}),void 0,void 0,void 0,void 0,!0),P(U),ae(()=>{Lt(U,1,zr(f())),ke(U,"for",p(T)+p(ue)),ne(ge,`${p(ue)??""} `)}),Ro(de,()=>u().value,w=>u(u().value=w,!0)),S(F,U)}),S(J,le)};ce(j,J=>{u().options&&J(G)}),P(ie),S(Y,ie)};let u=b(t,"field",15),h=b(t,"describedByIds",7),f=b(t,"labelClass",7),g=b(t,"inputClass",7),m=b(t,"host",7),v=je(t,mI);const _=Ni(m()),x=D(()=>_.value),A={input:n,text:n,email:n,password:n,search:n,tel:n,url:n,number:n,checkbox:o,select:a,radio:d,date:l,file:s,textarea:i,paymentMode:c},E=D(()=>A[u().type]);let T=D(()=>t.id||`go-field-${Math.random().toString(36).substring(2,9)}`);function O(){u().type!=="checkbox"&&u().value&&(p(x)?p(x).validateField(u()):u().validate())}const $=D(()=>({id:p(T),"aria-describedby":h(),"aria-required":u().required,"aria-invalid":u().errors.length>0,autocomplete:u().autocomplete,onblur:O}));let L=D(()=>C.t(u().label)||u().label);const H="https://cdn.shop.platform.gomus.de/";let N=Q(null);me(()=>{const Y=u().value;if(Y instanceof File&&Y.type.startsWith("image/")){const ie=URL.createObjectURL(Y);return I(N,ie,!0),()=>{URL.revokeObjectURL(ie),I(N,null)}}I(N,null)});var se={get field(){return u()},set field(Y){u(Y),y()},get describedByIds(){return h()},set describedByIds(Y){h(Y),y()},get labelClass(){return f()},set labelClass(Y){f(Y),y()},get inputClass(){return g()},set inputClass(Y){g(Y),y()},get host(){return m()},set host(Y){m(Y),y()}},V=K(),oe=z(V),pe=Y=>{var ie=K(),B=z(ie);_e(B,()=>p(E)),S(Y,ie)};return ce(oe,Y=>{p(E)&&Y(pe)}),S(e,V),te(se)}Rr(["change"]),re(Vv,{field:{},describedByIds:{},labelClass:{},inputClass:{},host:{}},[],[],{mode:"open"});var $I=W("<span> </span>"),MI=W("<li> </li>"),FI=W('<ul class="go-field-errors"></ul>'),NI=W("<!> <!> <!>",1);function RI(e,t){ee(t,!0);let r=b(t,"key",7),n=b(t,"required",7,!1),i=b(t,"labelClass",7),s=b(t,"inputClass",7),o=Q($e(cr.createField(r(),n())));const a=Ni(t.$$host),l=D(()=>a.value),c=()=>p(o);let d=D(()=>p(o)?[...p(o).errors,...p(o).apiErrors].map($=>C.t($)):[]),u=D(()=>p(o)?.description),h=D(()=>p(d).length>0),f=D(()=>`go-description-${r()}-${Math.floor(Math.random()*100)}`),g=D(()=>`go-errors-${r()}-${Math.floor(Math.random()*100)}`),m=D(()=>[p(u)&&p(f),p(h)&&p(g)].filter(Boolean).join(" ")||void 0);me(()=>{t.$$host.classList.toggle("go-field",!0),t.$$host.classList.toggle("is-invalid",p(d).length>0)}),t.$$host.dataset.testid=r(),me(()=>{p(o)&&(p(o).mounted=!0,p(o).value,qe(()=>{p(o)?.errors.length&&p(l).validateField(p(o))}))});var v={getField:c,get key(){return r()},set key($){r($),y()},get required(){return n()},set required($=!1){n($),y()},get labelClass(){return i()},set labelClass($){i($),y()},get inputClass(){return s()},set inputClass($){s($),y()}},_=NI(),x=z(_);Vv(x,{get describedByIds(){return p(m)},get labelClass(){return i()},get inputClass(){return s()},host:t.$$host,get field(){return p(o)},set field($){I(o,$,!0)}});var A=X(x,2),E=$=>{var L=$I(),H=M(L,!0);P(L),ae(()=>{ke(L,"id",p(f)),ne(H,p(o).description)}),S($,L)};ce(A,$=>{p(u)&&$(E)});var T=X(A,2),O=$=>{var L=FI();Ue(L,21,()=>p(d),Lr,(H,N)=>{var se=MI(),V=M(se,!0);P(se),ae(()=>ne(V,p(N))),S(H,se)}),P(L),ae(()=>ke(L,"id",p(g))),S($,L)};return ce(T,$=>{p(h)&&$(O)}),S(e,_),te(v)}customElements.define("go-field",re(RI,{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 LI=W("<go-field></go-field>",2);function zI(e,t){ee(t,!0);let r=Ni(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?cr.getFormFields(p(n)?.formId):[]);var s=K(),o=z(s);Ue(o,17,()=>p(i),a=>a.key,(a,l)=>{var c=LI();ae(()=>Hn(c,"key",p(l).key)),ae(()=>Hn(c,"required",p(l).required)),S(a,c)}),S(e,s),te()}customElements.define("go-all-fields",re(zI,{},[],[]));var UI=W('<p aria-hidden="true"> </p>'),VI=W("<li> </li>"),BI=W('<ul class="go-error-feedback-api-errors"></ul>'),qI=W('<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>');function jI(e,t){ee(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);me(()=>{p(n)?.form?.addEventListener("go-after-validation",()=>{I(o,Ou(p(n)?.fields),!0)})});let i=Q(0);setInterval(()=>{I(i,Ou(p(n)?.fields)||0,!0)},100);let s=D(()=>p(i)+(p(n)?.apiErrors?.length||0)),o=Q(-1);me(()=>{t.$$host.classList.toggle("is-invalid",p(s)>0),t.$$host.classList.toggle("go-feedback",!0),t.$$host.setAttribute("data-num-errors",p(s).toString())});var a=qI(),l=M(a),c=M(l),d=v=>{var _=Rt();ae(x=>ne(_,x),[()=>C.t("forms.errorSummary",{count:p(o)})]),S(v,_)};ce(c,v=>{p(o)>0&&v(d)}),P(l);var u=X(l,2),h=v=>{var _=UI(),x=M(_,!0);P(_),ae(A=>ne(x,A),[()=>C.t("forms.errorSummary",{count:p(i)})]),S(v,_)};ce(u,v=>{p(i)>0&&v(h)});var f=X(u,2),g=v=>{var _=BI();Ue(_,21,()=>p(n)?.apiErrors,Lr,(x,A)=>{var E=VI(),T=M(E,!0);P(E),ae(()=>ne(T,p(A))),S(x,E)}),P(_),S(v,_)},m=D(()=>p(n)&&Wl(p(n).apiErrors)&&p(n).apiErrors.length>0);ce(f,v=>{p(m)&&v(g)}),P(a),S(e,a),te()}customElements.define("go-errors-feedback",re(jI,{},[],[]));var ZI=W('<div class="go-form-feedback"><!></div>');function WI(e,t){var r=ZI(),n=M(r);r_(n,t,"default",{},null),P(r),S(e,r)}customElements.define("go-form-feedback",re(WI,{},["default"],[]));function HI(e,t){ee(t,!0);let r=b(t,"buttonClass",7,"");return rn(()=>{Pn(t.$$host,"button",{type:"submit",class:r()})}),te({get buttonClass(){return r()},set buttonClass(n=""){r(n),y()}})}customElements.define("go-submit",re(HI,{buttonClass:{attribute:"button-class",reflect:!0,type:"String"}},[],[]));var GI=W('<div aria-live="assertive"> </div>');function KI(e,t){ee(t,!0);const r=Ni(t.$$host),n=D(()=>r.value);var i=K(),s=z(i),o=a=>{var l=GI();let c;var d=M(l,!0);P(l),ae(()=>{c=Lt(l,1,"go-success-feedback go-feedback",null,c,{"is-successful":p(n).successMessage}),ne(d,p(n)?.successMessage)}),S(a,l)};ce(s,a=>{p(n)?.successMessage&&a(o)}),S(e,i),te()}customElements.define("go-success-feedback",re(KI,{},[],[]));var dr="INUMBER",Zi="IOP1",Wi="IOP2",Hi="IOP3",cn="IVAR",ci="IVARNAME",Gi="IFUNCALL",La="IFUNDEF",Bt="IEXPR",Oc="IEXPREVAL",di="IMEMBER",za="IENDSTATEMENT",Ki="IARRAY";function Ie(e,t){this.type=e,this.value=t??0}Ie.prototype.toString=function(){switch(this.type){case dr:case Zi:case Wi:case Hi:case cn:case ci:case za:return this.value;case Gi:return"CALL "+this.value;case La:return"DEF "+this.value;case Ki:return"ARRAY "+this.value;case di:return"."+this.value;default:return"Invalid Instruction"}};function Ua(e){return new Ie(Zi,e)}function dn(e){return new Ie(Wi,e)}function Bv(e){return new Ie(Hi,e)}function Cc(e,t,r,n,i){for(var s=[],o=[],a,l,c,d,u=0;u<e.length;u++){var h=e[u],f=h.type;if(f===dr||f===ci)Array.isArray(h.value)?s.push.apply(s,Cc(h.value.map(function(g){return new Ie(dr,g)}).concat(new Ie(Ki,h.value.length)),t,r,n,i)):s.push(h);else if(f===cn&&i.hasOwnProperty(h.value))h=new Ie(dr,i[h.value]),s.push(h);else if(f===Wi&&s.length>1)l=s.pop(),a=s.pop(),d=r[h.value],h=new Ie(dr,d(a.value,l.value)),s.push(h);else if(f===Hi&&s.length>2)c=s.pop(),l=s.pop(),a=s.pop(),h.value==="?"?s.push(a.value?l.value:c.value):(d=n[h.value],h=new Ie(dr,d(a.value,l.value,c.value)),s.push(h));else if(f===Zi&&s.length>0)a=s.pop(),d=t[h.value],h=new Ie(dr,d(a.value)),s.push(h);else if(f===Bt){for(;s.length>0;)o.push(s.shift());o.push(new Ie(Bt,Cc(h.value,t,r,n,i)))}else if(f===di&&s.length>0)a=s.pop(),s.push(new Ie(dr,a.value[h.value]));else{for(;s.length>0;)o.push(s.shift());o.push(h)}}for(;s.length>0;)o.push(s.shift());return o}function qv(e,t,r){for(var n=[],i=0;i<e.length;i++){var s=e[i],o=s.type;if(o===cn&&s.value===t)for(var a=0;a<r.tokens.length;a++){var l=r.tokens[a],c;l.type===Zi?c=Ua(l.value):l.type===Wi?c=dn(l.value):l.type===Hi?c=Bv(l.value):c=new Ie(l.type,l.value),n.push(c)}else o===Bt?n.push(new Ie(Bt,qv(s.value,t,r))):n.push(s)}return n}function fi(e,t,r){var n=[],i,s,o,a,l,c;if(Dc(e))return fn(e,r);for(var d=e.length,u=0;u<d;u++){var h=e[u],f=h.type;if(f===dr||f===ci)n.push(h.value);else if(f===Wi)s=n.pop(),i=n.pop(),h.value==="and"?n.push(i?!!fi(s,t,r):!1):h.value==="or"?n.push(i?!0:!!fi(s,t,r)):h.value==="="?(a=t.binaryOps[h.value],n.push(a(i,fi(s,t,r),r))):(a=t.binaryOps[h.value],n.push(a(fn(i,r),fn(s,r))));else if(f===Hi)o=n.pop(),s=n.pop(),i=n.pop(),h.value==="?"?n.push(fi(i?s:o,t,r)):(a=t.ternaryOps[h.value],n.push(a(fn(i,r),fn(s,r),fn(o,r))));else if(f===cn)if(h.value in t.functions)n.push(t.functions[h.value]);else if(h.value in t.unaryOps&&t.parser.isOperatorEnabled(h.value))n.push(t.unaryOps[h.value]);else{var g=r[h.value];if(g!==void 0)n.push(g);else throw new Error("undefined variable: "+h.value)}else if(f===Zi)i=n.pop(),a=t.unaryOps[h.value],n.push(a(fn(i,r)));else if(f===Gi){for(c=h.value,l=[];c-- >0;)l.unshift(fn(n.pop(),r));if(a=n.pop(),a.apply&&a.call)n.push(a.apply(void 0,l));else throw new Error(a+" is not a function")}else if(f===La)n.push((function(){for(var m=n.pop(),v=[],_=h.value;_-- >0;)v.unshift(n.pop());var x=n.pop(),A=function(){for(var E=Object.assign({},r),T=0,O=v.length;T<O;T++)E[v[T]]=arguments[T];return fi(m,t,E)};return Object.defineProperty(A,"name",{value:x,writable:!1}),r[x]=A,A})());else if(f===Bt)n.push(YI(h,t));else if(f===Oc)n.push(h);else if(f===di)i=n.pop(),n.push(i[h.value]);else if(f===za)n.pop();else if(f===Ki){for(c=h.value,l=[];c-- >0;)l.unshift(n.pop());n.push(l)}else throw new Error("invalid Expression")}if(n.length>1)throw new Error("invalid Expression (parity)");return n[0]===0?0:fn(n[0],r)}function YI(e,t,r){return Dc(e)?e:{type:Oc,value:function(n){return fi(e.value,t,n)}}}function Dc(e){return e&&e.type===Oc}function fn(e,t){return Dc(e)?e.value(t):e}function Ic(e,t){for(var r=[],n,i,s,o,a,l,c=0;c<e.length;c++){var d=e[c],u=d.type;if(u===dr)typeof d.value=="number"&&d.value<0?r.push("("+d.value+")"):Array.isArray(d.value)?r.push("["+d.value.map(jv).join(", ")+"]"):r.push(jv(d.value));else if(u===Wi)i=r.pop(),n=r.pop(),o=d.value,t?o==="^"?r.push("Math.pow("+n+", "+i+")"):o==="and"?r.push("(!!"+n+" && !!"+i+")"):o==="or"?r.push("(!!"+n+" || !!"+i+")"):o==="||"?r.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+n+"),("+i+")))"):o==="=="?r.push("("+n+" === "+i+")"):o==="!="?r.push("("+n+" !== "+i+")"):o==="["?r.push(n+"[("+i+") | 0]"):r.push("("+n+" "+o+" "+i+")"):o==="["?r.push(n+"["+i+"]"):r.push("("+n+" "+o+" "+i+")");else if(u===Hi)if(s=r.pop(),i=r.pop(),n=r.pop(),o=d.value,o==="?")r.push("("+n+" ? "+i+" : "+s+")");else throw new Error("invalid Expression");else if(u===cn||u===ci)r.push(d.value);else if(u===Zi)n=r.pop(),o=d.value,o==="-"||o==="+"?r.push("("+o+n+")"):t?o==="not"?r.push("(!"+n+")"):o==="!"?r.push("fac("+n+")"):r.push(o+"("+n+")"):o==="!"?r.push("("+n+"!)"):r.push("("+o+" "+n+")");else if(u===Gi){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());o=r.pop(),r.push(o+"("+a.join(", ")+")")}else if(u===La){for(i=r.pop(),l=d.value,a=[];l-- >0;)a.unshift(r.pop());n=r.pop(),t?r.push("("+n+" = function("+a.join(", ")+") { return "+i+" })"):r.push("("+n+"("+a.join(", ")+") = "+i+")")}else if(u===di)n=r.pop(),r.push(n+"."+d.value);else if(u===Ki){for(l=d.value,a=[];l-- >0;)a.unshift(r.pop());r.push("["+a.join(", ")+"]")}else if(u===Bt)r.push("("+Ic(d.value,t)+")");else if(u!==za)throw new Error("invalid Expression")}return r.length>1&&(t?r=[r.join(",")]:r=[r.join(";")]),String(r[0])}function jv(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function Yi(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function Pc(e,t,r){r=r||{};for(var n=!!r.withMembers,i=null,s=0;s<e.length;s++){var o=e[s];o.type===cn||o.type===ci?!n&&!Yi(t,o.value)?t.push(o.value):(i!==null&&(Yi(t,i)||t.push(i)),i=o.value):o.type===di&&n&&i!==null?i+="."+o.value:o.type===Bt?Pc(o.value,t,r):i!==null&&(Yi(t,i)||t.push(i),i=null)}i!==null&&!Yi(t,i)&&t.push(i)}function Ar(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}Ar.prototype.simplify=function(e){return e=e||{},new Ar(Cc(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},Ar.prototype.substitute=function(e,t){return t instanceof Ar||(t=this.parser.parse(String(t))),new Ar(qv(this.tokens,e,t),this.parser)},Ar.prototype.evaluate=function(e){return e=e||{},fi(this.tokens,this,e)},Ar.prototype.toString=function(){return Ic(this.tokens,!1)},Ar.prototype.symbols=function(e){e=e||{};var t=[];return Pc(this.tokens,t,e),t},Ar.prototype.variables=function(e){e=e||{};var t=[];Pc(this.tokens,t,e);var r=this.functions;return t.filter(function(n){return!(n in r)})},Ar.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 "+Ic(this.simplify(t).tokens,!0)+"; }");return function(){return n.apply(r,arguments)}};var no="TEOF",Ze="TOP",Va="TNUMBER",Zv="TSTRING",hn="TPAREN",Ji="TBRACKET",Ba="TCOMMA",$c="TNAME",Mc="TSEMICOLON";function Wv(e,t,r){this.type=e,this.value=t,this.index=r}Wv.prototype.toString=function(){return this.type+": "+this.value};function rt(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}rt.prototype.newToken=function(e,t,r){return new Wv(e,t,r??this.pos)},rt.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},rt.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},rt.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(no,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},rt.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if(r==="'"||r==='"')for(var n=this.expression.indexOf(r,t+1);n>=0&&this.pos<this.expression.length;){if(this.pos=n+1,this.expression.charAt(n-1)!=="\\"){var i=this.expression.substring(t+1,n);this.current=this.newToken(Zv,this.unescape(i),t),e=!0;break}n=this.expression.indexOf(r,n+1)}return e},rt.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(hn,e),this.pos++,!0):!1},rt.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(Ji,e),this.pos++,!0):!1},rt.prototype.isComma=function(){return this.expression.charAt(this.pos)===","?(this.current=this.newToken(Ba,","),this.pos++,!0):!1},rt.prototype.isSemicolon=function(){return this.expression.charAt(this.pos)===";"?(this.current=this.newToken(Mc,";"),this.pos++,!0):!1},rt.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&r!=="."&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(n in this.consts)return this.current=this.newToken(Va,this.consts[n]),this.pos+=n.length,!0}return!1},rt.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||r!=="_"&&(r<"0"||r>"9")))break}if(t>e){var n=this.expression.substring(e,t);if(this.isOperatorEnabled(n)&&(n in this.binaryOps||n in this.unaryOps||n in this.ternaryOps))return this.current=this.newToken(Ze,n),this.pos+=n.length,!0}return!1},rt.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&(n==="$"||n==="_")){n==="_"&&(r=!0);continue}else if(t===this.pos||!r||n!=="_"&&(n<"0"||n>"9"))break}else r=!0}if(r){var i=this.expression.substring(e,t);return this.current=this.newToken($c,i),this.pos+=i.length,!0}return!1},rt.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
80
+ `||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var JI=/^[0-9a-f]{4}$/i;rt.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var n=e.charAt(++t);switch(n){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+=`
81
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"u":var i=e.substring(t+1,t+5);JI.test(i)||this.parseError("Illegal escape sequence: \\u"+i),r+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+n+'"')}++t;var s=e.indexOf("\\",t);r+=e.substring(t,s<0?e.length:s),t=s}return r},rt.prototype.isComment=function(){return this.expression.charAt(this.pos)==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1},rt.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,r;if(this.expression.charAt(e)==="x")t=16,r=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,r=/^[01]$/i,++e;else return!1;for(var n=!1,i=e;e<this.expression.length;){var s=this.expression.charAt(e);if(r.test(s))e++,n=!0;else break}return n&&(this.current=this.newToken(Va,parseInt(this.expression.substring(i,e),t)),this.pos=e),n},rt.prototype.isNumber=function(){for(var e=!1,t=this.pos,r=t,n=t,i=!1,s=!1,o;t<this.expression.length&&(o=this.expression.charAt(t),o>="0"&&o<="9"||!i&&o===".");)o==="."?i=!0:s=!0,t++,e=s;if(e&&(n=t),o==="e"||o==="E"){t++;for(var a=!0,l=!1;t<this.expression.length;){if(o=this.expression.charAt(t),a&&(o==="+"||o==="-"))a=!1;else if(o>="0"&&o<="9")l=!0,a=!1;else break;t++}l||(t=n)}return e?(this.current=this.newToken(Va,parseFloat(this.expression.substring(r,t))),this.pos=t):this.pos=n,e},rt.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(Ze,t);else if(t==="∙"||t==="•")this.current=this.newToken(Ze,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,">="),this.pos++):this.current=this.newToken(Ze,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"<="),this.pos++):this.current=this.newToken(Ze,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(Ze,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"=="),this.pos++):this.current=this.newToken(Ze,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(Ze,"!="),this.pos++):this.current=this.newToken(Ze,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)},rt.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)},rt.prototype.getCoordinates=function(){var e=0,t,r=-1;do e++,t=this.pos-r,r=this.expression.indexOf(`
82
+ `,r+1);while(r>=0&&r<this.pos);return{line:e,column:t}},rt.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function He(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=r.allowMemberAccess!==!1}He.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},He.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?Yi(t,e.value):typeof t=="function"?t(e):e.value===t},He.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},He.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},He.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1},He.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},He.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.accept($c)||this.accept(Ze,r))e.push(new Ie(cn,this.current.value));else if(this.accept(Va))e.push(new Ie(dr,this.current.value));else if(this.accept(Zv))e.push(new Ie(dr,this.current.value));else if(this.accept(hn,"("))this.parseExpression(e),this.expect(hn,")");else if(this.accept(Ji,"["))if(this.accept(Ji,"]"))e.push(new Ie(Ki,0));else{var n=this.parseArrayList(e);e.push(new Ie(Ki,n))}else throw new Error("unexpected "+this.nextToken)},He.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))},He.prototype.pushExpression=function(e,t){for(var r=0,n=t.length;r<n;r++)e.push(t[r])},He.prototype.parseUntilEndStatement=function(e,t){return this.accept(Mc)?(this.nextToken&&this.nextToken.type!==no&&!(this.nextToken.type===hn&&this.nextToken.value===")")&&t.push(new Ie(za)),this.nextToken.type!==no&&this.parseExpression(t),e.push(new Ie(Bt,t)),!0):!1},He.prototype.parseArrayList=function(e){for(var t=0;!this.accept(Ji,"]");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(Ze,"=");){var t=e.pop(),r=[],n=e.length-1;if(t.type===Gi){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,s=t.value+1;i<s;i++){var o=n-i;e[o].type===cn&&(e[o]=new Ie(ci,e[o].value))}this.parseVariableAssignmentExpression(r),e.push(new Ie(Bt,r)),e.push(new Ie(La,t.value));continue}if(t.type!==cn&&t.type!==di)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(r),e.push(new Ie(ci,t.value)),e.push(new Ie(Bt,r)),e.push(dn("="))}},He.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(Ze,"?");){var t=[],r=[];this.parseConditionalExpression(t),this.expect(Ze,":"),this.parseConditionalExpression(r),e.push(new Ie(Bt,t)),e.push(new Ie(Bt,r)),e.push(Bv("?"))}},He.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(Ze,"or");){var t=[];this.parseAndExpression(t),e.push(new Ie(Bt,t)),e.push(dn("or"))}},He.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(Ze,"and");){var t=[];this.parseComparison(t),e.push(new Ie(Bt,t)),e.push(dn("and"))}};var XI=["==","!=","<","<=",">=",">","in"];He.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(Ze,XI);){var t=this.current;this.parseAddSub(e),e.push(dn(t.value))}};var QI=["+","-","||"];He.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(Ze,QI);){var t=this.current;this.parseTerm(e),e.push(dn(t.value))}};var eP=["*","/","%"];He.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(Ze,eP);){var t=this.current;this.parseFactor(e),e.push(dn(t.value))}},He.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function r(i){return i.value in t}if(this.save(),this.accept(Ze,r)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===hn&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===Mc||this.nextToken.type===Ba||this.nextToken.type===no||this.nextToken.type===hn&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var n=this.current;this.parseFactor(e),e.push(Ua(n.value))}else this.parseExponential(e)},He.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(Ze,"^");)this.parseFactor(e),e.push(dn("^"))},He.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(Ze,"!");)e.push(Ua("!"))},He.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function r(s){return s.value in t}if(this.accept(Ze,r)){var n=this.current;this.parseAtom(e),e.push(Ua(n.value))}else for(this.parseMemberExpression(e);this.accept(hn,"(");)if(this.accept(hn,")"))e.push(new Ie(Gi,0));else{var i=this.parseArgumentList(e);e.push(new Ie(Gi,i))}},He.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(hn,")");)for(this.parseExpression(e),++t;this.accept(Ba);)this.parseExpression(e),++t;return t},He.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(Ze,".")||this.accept(Ji,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect($c),e.push(new Ie(di,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(Ji,"]"),e.push(dn("["))}else throw new Error("unexpected symbol: "+t.value)}};function tP(e,t){return Number(e)+Number(t)}function rP(e,t){return e-t}function nP(e,t){return e*t}function iP(e,t){return e/t}function sP(e,t){return e%t}function oP(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function aP(e,t){return e===t}function lP(e,t){return e!==t}function uP(e,t){return e>t}function cP(e,t){return e<t}function dP(e,t){return e>=t}function fP(e,t){return e<=t}function hP(e,t){return!!(e&&t)}function pP(e,t){return!!(e||t)}function mP(e,t){return Yi(t,e)}function vP(e){return(Math.exp(e)-Math.exp(-e))/2}function gP(e){return(Math.exp(e)+Math.exp(-e))/2}function yP(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function bP(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function _P(e){return Math.log(e+Math.sqrt(e*e-1))}function wP(e){return Math.log((1+e)/(1-e))/2}function Hv(e){return Math.log(e)*Math.LOG10E}function kP(e){return-e}function SP(e){return!e}function EP(e){return e<0?Math.ceil(e):Math.floor(e)}function xP(e){return Math.random()*(e||1)}function Gv(e){return Nc(e+1)}function TP(e){return isFinite(e)&&e===Math.round(e)}var AP=4.7421875,Fc=[.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 Nc(e){var t,r;if(TP(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)*Nc(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=Fc[0];for(var c=1;c<Fc.length;++c)r+=Fc[c]/(e+c);return t=e+AP+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function OP(e){return Array.isArray(e)?e.length:String(e).length}function Kv(){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 Yv(e,t,r){return e?t:r}function CP(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 DP(e,t,r){return r&&(r[e]=t),t}function IP(e,t){return e[t|0]}function PP(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function $P(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function MP(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 FP(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 NP(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 RP(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 LP(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function zP(e){return(e>0)-(e<0)||+e}var Jv=1/3;function UP(e){return e<0?-Math.pow(-e,Jv):Math.pow(e,Jv)}function VP(e){return Math.exp(e)-1}function BP(e){return Math.log(1+e)}function qP(e){return Math.log(e)/Math.LN2}function hi(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||vP,cosh:Math.cosh||gP,tanh:Math.tanh||yP,asinh:Math.asinh||bP,acosh:Math.acosh||_P,atanh:Math.atanh||wP,sqrt:Math.sqrt,cbrt:Math.cbrt||UP,log:Math.log,log2:Math.log2||qP,ln:Math.log,lg:Math.log10||Hv,log10:Math.log10||Hv,expm1:Math.expm1||VP,log1p:Math.log1p||BP,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||EP,"-":kP,"+":Number,exp:Math.exp,not:SP,length:OP,"!":Gv,sign:Math.sign||zP},this.binaryOps={"+":tP,"-":rP,"*":nP,"/":iP,"%":sP,"^":Math.pow,"||":oP,"==":aP,"!=":lP,">":uP,"<":cP,">=":dP,"<=":fP,and:hP,or:pP,in:mP,"=":DP,"[":IP},this.ternaryOps={"?":Yv},this.functions={random:xP,fac:Gv,min:$P,max:PP,hypot:Math.hypot||Kv,pyt:Math.hypot||Kv,pow:Math.pow,atan2:Math.atan2,if:Yv,gamma:Nc,roundTo:CP,map:MP,fold:FP,filter:NP,indexOf:RP,join:LP},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}hi.prototype.parse=function(e){var t=[],r=new He(this,new rt(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect(no,"EOF"),new Ar(t,this)},hi.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Xv=new hi;hi.parse=function(e){return Xv.parse(e)},hi.evaluate=function(e,t){return Xv.parse(e).evaluate(t)};var Qv={"+":"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 jP(e){return Qv.hasOwnProperty(e)?Qv[e]:e}hi.prototype.isOperatorEnabled=function(e){var t=jP(e),r=this.options.operators||{};return!(t in r)||!!r[t]};var ZP=/\b[$A-Za-z_][$\w]*(?:(?:\?\.)|\.)[$A-Za-z_][$\w]*(?:(?:\?\.)[$A-Za-z_][$\w]*|(?:\.)[$A-Za-z_][$\w]*)*/g,WP=/\b([$A-Za-z_][$\w]*(?:\.[$A-Za-z_][$\w]*)*)\.length\b/g,HP=/(__optional\("[^"]+"\))\.length\b/g,GP=new hi({allowMemberAccess:!0,operators:{assignment:!1,fndef:!1}}),eg=new Map;function KP(e){return e.replace(ZP,t=>t.includes("?.")?`__optional("${t.replace(/\?\./g,".")}")`:t).replace(WP,(t,r)=>`__length(${r})`).replace(HP,(t,r)=>`__length(${r})`).replaceAll("!==","!=").replaceAll("===","==").replaceAll("&&"," and ").replaceAll("||"," or ").replace(/!\s*(?!=)/g,"not ")}function YP(e){const t=eg.get(e);if(t)return t;const r=GP.parse(KP(e));return eg.set(e,r),r}function JP(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=YP(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 tg=["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"],XP={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}));C.capacityManager.addQuotas(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=Cn(Dn(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(yt(s,{time:t.selectedTime}))}},QP={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=Cn(Dn(r,s),s);for(const a of o)e.preCart.addItem(yt(a,{time:s}))}},e$={name:"ticket:annual",calendarEndpoint:null,apiToken:"annual",requires:[],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:()=>!0,async loadTimeslots(){},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t)return;const r=await C.asyncFetch(()=>C.tickets({by_bookable:!0,"by_ticket_types[]":["annual"],"by_ticket_ids[]":t.ticketIds,"by_ticket_group_ids[]":e.ticketGroupIds??t.ticketGroupIds}));for(const n of Object.values(r))e.preCart.addItem(yt(ia(n)))}},t$={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()}));C.capacityManager.addQuotas(r)},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||!t.selectedDate||!(await C.asyncFetch(()=>C.getEvent(t.eventIds[0]))).tickets?.length)return;const{tickets:r,quotas:n}=await C.asyncFetch(()=>C.ticketsAndQuotas({by_bookable:!0,valid_at:t.selectedDate.toString(),date_id:e.dateId}));C.capacityManager.addQuotas(n);const i=Cn(Dn(r,t.selectedTime),t.selectedTime);for(const s of i)e.preCart.addItem(yt(s,{time:t.selectedTime}))}},r$={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=Cn(Dn(n,o),o);for(const l of a)e.preCart.addItem(yt(l,{time:o}))}},n$={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()}));C.capacityManager.addQuotas(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=Cn(Dn(n,t.selectedTime),t.selectedTime);for(const o of s)e.preCart.addItem(yt(o,{time:t.selectedTime}))}},i$={name:"event:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"eventIds"},{kind:"segment",field:"dateId"}],isCalendarVisible:()=>!1,isTimeslotsVisible:()=>!1,isTicketsVisible:e=>!!e.eventIds?.length,loadTimeslots:async()=>{},async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.eventIds?.length||e.dateId===void 0)return;const r=await C.asyncFetch(()=>C.getEventDetailsOnDate(t.eventIds[0],e.dateId));if(r.prices?.length){for(const n of r.prices){const i=xu(n,r.id,{event_title:r.event_title});e.preCart.addItem(yt(i,{time:r.start_time}))}r.seats&&C.capacityManager.addSeats(r.id,r.seats)}}},s$=7200*1e3;function qa(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+s$&&(i.seats?.available??0)>0})}async function ja(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}));C.capacityManager.addQuotas(t)}var o$={name:"events:admission",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>ja(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=qa(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=Cn(Dn(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(yt(l,{time:n.start_time}))}}},a$={name:"events:admission:day",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>ja(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=qa(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=Cn(Dn(s,l),l);for(const d of c)e.preCart.addItem(yt(d,{time:l}))}}},l$={name:"events:admission:timeslot",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>ja(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=qa(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=Cn(Dn(s,n.start_time),n.start_time);for(const l of a)e.preCart.addItem(yt(l,{time:n.start_time}))}}},u$={name:"events:price",calendarEndpoint:"events",requires:[{kind:"tsd",field:"selectedDate"},{kind:"tsd",field:"selectedTimeslot"}],isCalendarVisible:()=>!0,isTimeslotsVisible:()=>!0,isTicketsVisible:()=>!0,loadTimeslots:e=>ja(e),async loadProducts(e){const t=e.ticketSelectionDetails;if(!t?.selectedDate||!t.selectedTime)return;const r=qa(await C.asyncFetch(()=>C.getDates({by_bookable:!0,"by_museum_ids[]":e.museumIds??t.museumIds,"by_exhibition_ids[]":t.exhibitionIds,"by_event_ids[]":t.eventIds,"by_language_ids[]":e.languageIds,"by_catch_word_ids[]":e.catchWordIds,start_at:t.selectedDate.toString(),per_page:e.limit||30})),t.selectedDate.toString(),t.selectedTime),n=e.query;for(const i of r){if(!i.prices?.length)continue;const s=n?i.prices.filter(o=>o.title?.includes(n)):i.prices;for(const o of s){const a=xu(o,i.id,{event_title:i.event_title});e.preCart.addItem(yt(a,{time:i.start_time}))}i.seats&&C.capacityManager.addSeats(i.id,i.seats)}}},c$={"ticket:timeslot":XP,"ticket:day":QP,"ticket:annual":e$,"event:admission":t$,"event:admission:day":r$,"event:admission:timeslot":n$,"event:price":i$,"events:admission":o$,"events:admission:day":a$,"events:admission:timeslot":l$,"events:price":u$};function pi(e){const t=c$[e];return t||console.warn(`[ticket-selection] Unknown filter "${e}". Valid filters: ${tg.join(", ")}`),t}var rg=tg,d$=0,f$=class{uid=d$++;#e=Q();get filters(){return p(this.#e)}set filters(e){I(this.#e,e,!0)}#t=Q();get eventIds(){return p(this.#t)}set eventIds(e){I(this.#t,e,!0)}#r=Q();get museumIds(){return p(this.#r)}set museumIds(e){I(this.#r,e,!0)}#n=Q();get exhibitionIds(){return p(this.#n)}set exhibitionIds(e){I(this.#n,e,!0)}#i=Q();get ticketIds(){return p(this.#i)}set ticketIds(e){I(this.#i,e,!0)}#s=Q();get ticketGroupIds(){return p(this.#s)}set ticketGroupIds(e){I(this.#s,e,!0)}#a=Q();get selectedDate(){return p(this.#a)}set selectedDate(e){I(this.#a,e,!0)}#o=Q();get selectedTimeslot(){return p(this.#o)}set selectedTimeslot(e){I(this.#o,e,!0)}#l=D(()=>this.selectedTimeslot);get selectedTime(){return p(this.#l)}set selectedTime(e){I(this.#l,e)}#u=Q($e([]));get ticketSegments(){return p(this.#u)}set ticketSegments(e){I(this.#u,e,!0)}#d=D(()=>this.ticketSegments.map(e=>e.preCart));get preCarts(){return p(this.#d)}set preCarts(e){I(this.#d,e)}#c=Q();get timeslotDetails(){return p(this.#c)}set timeslotDetails(e){I(this.#c,e,!0)}addTicketSegment(e){this.ticketSegments.push(e)}get isCalendarVisible(){return!!this.filters?.some(e=>pi(e).isCalendarVisible(this))}get isTimeslotsVisible(){return!!this.filters?.some(e=>pi(e).isTimeslotsVisible(this))}get isTicketsVisible(){return!!this.filters?.some(e=>pi(e).isTicketsVisible(this))}},ng="go-ticket-selection",h$=Mi(ng),pn=Fi(ng);function p$(e,t){ee(t,!0);let r=b(t,"when",7),n=b(t,"then",7,"show");const i=pn(t.$$host),s=D(()=>i.value),o=jE(t.$$host),a=D(()=>o.value),l=Ni(t.$$host),c=D(()=>l.value),d=Ri(t.$$host),u=D(()=>d.value);let h=D(()=>({ticketSelection:p(s),personalizationDetails:p(a),formData:p(c)?.formData,cart:C.cart,cartView:p(u)}));const f=x=>{I(h,x)},g=()=>p(h);let m=D(()=>JP(r(),p(h))),v=null;me(()=>{const x=t.$$host;if(p(m)&&n()==="show")v&&(x.appendChild(v),v=null);else if(!v&&x.childNodes.length>0)for(v=document.createDocumentFragment();x.firstChild;)v.appendChild(x.firstChild)});var _={_setData:f,_getData:g,get when(){return r()},set when(x){r(x),y()},get then(){return n()},set then(x="show"){n(x),y()}};return te(_)}customElements.define("go-if",re(p$,{when:{attribute:"when",reflect:!0,type:"String"},then:{attribute:"then",reflect:!0,type:"String"}},[],["_setData","_getData"]));function ig(e,t){ee(t,!0);let r=b(t,"apiUrl",7),n=b(t,"shopDomain",7),i=b(t,"locale",7);return i(i()||localStorage.getItem("lang")||"en"),me(()=>{(n()!==C.shopDomain||r()!==C.apiUrl||i()!==C.locale)&&(C.load(r(),n(),i()),console.warn("shop loaded due to prop change"))}),te({get apiUrl(){return r()},set apiUrl(s){r(s),y()},get shopDomain(){return n()},set shopDomain(s){n(s),y()},get locale(){return i()},set locale(s){i(s),y()}})}customElements.define("gomus-init",re(ig,{apiUrl:{attribute:"api-url",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function m$(e,t){ee(t,!0);let r=b(t,"apiDomain",7),n=b(t,"shopDomain",7),i=b(t,"locale",7),s=`https://${r()}`;var o={get apiDomain(){return r()},set apiDomain(a){r(a),y()},get shopDomain(){return n()},set shopDomain(a){n(a),y()},get locale(){return i()},set locale(a){i(a),y()}};return ig(e,{get apiUrl(){return s},get shopDomain(){return n()},get locale(){return i()}}),te(o)}customElements.define("go-init",re(m$,{apiDomain:{attribute:"api-domain",type:"String"},shopDomain:{attribute:"shop-domain",type:"String"},locale:{attribute:"locale",type:"String"}},[],[]));function v$(e,t){ee(t,!0);const r=b(t,"to",7),n=D(()=>Xe.config.urls[r()]),i=Pn(t.$$host,"a");return me(()=>{if(!p(n)){console.warn(`[go-link] No URL found for route "${r()}".`),i.removeAttribute("href");return}i.setAttribute("href",p(n)())}),i.addEventListener("click",s=>{if(s.preventDefault(),!Xe.config.urls[r()]){console.warn(`[go-link] No URL found for route "${r()}". You can define it with go.config.urls.${r()} = () => 'https://example.com/my-route'`);return}Xe.config.navigateTo(Xe.config.urls[r()]())}),te({get to(){return r()},set to(s){r(s),y()}})}customElements.define("go-link",re(v$,{to:{attribute:"to",reflect:!0,type:"String"}},[],[]));var g$=class{#e=Q();get token(){return p(this.#e)}set token(e){I(this.#e,e,!0)}constructor(e){this.token=e}get order(){if(this.token)return ol(C.order(this.token))}downloadLink(e,t){if(this.order?.is_valid)switch(e.type){case"Event":return`${C.apiUrl}/api/v4/orders/${this.order.id}/events/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}`;case"Ticket":return e.attributes.ticket_type==="annual"&&!e.attributes.is_voucher?Xe.config.urls.annualTicketPersonalizationList?.()?Xe.config.urls.annualTicketPersonalizationList(this.token):C.urls?.annualTicketPersonalizationList(this.token):`${C.apiUrl}/api/v4/orders/${this.order.id}/tickets/${e.attributes.id}.pdf?locale=${C.locale}&token=${this.token}&barcode_id=${t}`;default:break}}},sg="go-order-details",y$=Mi(sg),og=Fi(sg);function b$(e,t){ee(t,!0);let r=b(t,"token",7);const n=new g$(r());y$(t.$$host,n),rn(()=>{C.cart.clearItems(),C.auth.isGuest()&&C.auth.signOut()});var i={orderDetails:n,get token(){return r()},set token(s){r(s),y()}};return te(i)}customElements.define("go-order",re(b$,{token:{attribute:"token",reflect:!0,type:"String"}},[],["orderDetails"]));var _$=W('<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),w$=W('<br/> <span class="go-order-item-quantities"> </span>',1),k$=W('<a aria-label="iCal link"> </a>'),S$=W('<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 ag(e,t){ee(t,!0);let r=b(t,"item",7),n=b(t,"orderDetails",7);var i={get item(){return r()},set item(T){r(T),y()},get orderDetails(){return n()},set orderDetails(T){n(T),y()}},s=S$(),o=M(s),a=M(o),l=X(M(a),2),c=M(l),d=M(c,!0);P(c);var u=X(c,2),h=T=>{var O=_$(),$=z(O),L=M($,!0);P($);var H=X($,2),N=M(H,!0);P(H),ae((se,V)=>{ne(L,se),ne(N,V)},[()=>Us(r().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(r().attributes.start_time)]),S(T,O)};ce(u,T=>{r().attributes.start_time&&T(h)});var f=X(u,2);Ue(f,17,()=>r().attributes.quantities,T=>T.id,(T,O)=>{var $=w$(),L=X(z($),2),H=M(L);P(L),ae(()=>ne(H,`${p(O).quantity??""} x ${p(O).title??""}`)),S(T,$)});var g=X(f,2),m=M(g,!0);P(g),P(l);var v=X(l,2),_=M(v,!0);P(v);var x=X(v,4),A=M(x),E=T=>{var O=k$(),$=M(O,!0);P(O),ae(L=>{ke(O,"href",C.apiUrl+r().attributes.ical_url),ne($,L)},[()=>C.t("common.calendar")]),S(T,O)};return ce(A,T=>{r().attributes.ical_url&&T(E)}),P(x),P(a),P(o),P(s),ae((T,O,$)=>{ne(d,r().attributes.title),ke(g,"href",T),ne(m,O),ne(_,$)},[()=>n().downloadLink(r()),()=>C.t("common.download"),()=>na(r().price_cents)]),S(e,s),te(i)}re(ag,{item:{},orderDetails:{}},[],[],{mode:"open"});var E$=W('<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>',1),x$=W('<span class="go-cart-item-date"> </span>'),T$=W('<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>',1),A$=W('<br/> <a class="go-ticket-personalization"> </a>',1),O$=W('<a aria-label="passbook link"><img alt="apple wallet icon"/></a>'),C$=W('<a aria-label="iCal link"> </a>'),D$=W('<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>'),I$=W('<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>'),P$=W('<a class="go-ticket-personalization"> </a>'),$$=W('<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 lg(e,t){ee(t,!0);const r=`https://cdn.shop.platform.gomus.de/apple_wallet_${C.locale}.svg`;let n=b(t,"item",7),i=b(t,"orderDetails",7);var s={get item(){return n()},set item(d){n(d),y()},get orderDetails(){return i()},set orderDetails(d){i(d),y()}},o=K(),a=z(o),l=d=>{var u=K(),h=z(u);Ue(h,17,()=>({length:n().attributes.quantity}),Lr,(f,g,m)=>{var v=D$(),_=M(v),x=M(_),A=M(x);A.textContent="1";var E=X(A,2),T=M(E),O=M(T,!0);P(T);var $=X(T,2),L=j=>{const G=D(()=>n().attributes.barcodes[m]?.id);var J=T$(),le=z(J),he=ge=>{var de=E$(),w=z(de),Be=M(w,!0);P(w);var Pe=X(w,2),Ye=M(Pe,!0);P(Pe),ae((kt,Ge)=>{ne(Be,kt),ne(Ye,Ge)},[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale),()=>zs(n().attributes.start_time)]),S(ge,de)},F=ge=>{var de=x$(),w=M(de,!0);P(de),ae(Be=>ne(w,Be),[()=>Us(n().attributes.start_time,{month:"numeric",day:"numeric"},C.locale)]),S(ge,de)};ce(le,ge=>{n().attributes.ticket_type==="time_slot"?ge(he):n().attributes.ticket_type==="normal"&&ge(F,1)});var ue=X(le,4),U=M(ue,!0);P(ue),ae((ge,de)=>{ke(ue,"href",ge),ne(U,de)},[()=>i().downloadLink(n(),p(G)),()=>C.t("common.download")]),S(j,J)},H=j=>{var G=A$(),J=X(z(G),2),le=M(J,!0);P(J),ae((he,F)=>{ke(J,"href",he),ne(le,F)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(j,G)};ce($,j=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?j(L):j(H,-1)}),P(E);var N=X(E,2),se=M(N,!0);P(N);var V=X(N,2),oe=M(V),pe=j=>{var G=O$(),J=M(G);P(G),ae(()=>{ke(G,"href",C.apiUrl+n().attributes.barcodes[m]?.passbook_url),ke(J,"src",r)}),S(j,G)};ce(oe,j=>{n().attributes.barcodes[m]&&n().attributes.barcodes[m]?.passbook_url&&j(pe)}),P(V);var Y=X(V,2),ie=M(Y),B=j=>{var G=C$(),J=M(G,!0);P(G),ae(le=>{ke(G,"href",C.apiUrl+n().attributes.ical_url),ne(J,le)},[()=>C.t("common.calendar")]),S(j,G)};ce(ie,j=>{n().attributes.ical_url&&j(B)}),P(Y),P(x),P(_),P(v),ae(j=>{ne(O,n().attributes.title),ne(se,j)},[()=>na(n().price_cents)]),S(f,v)}),S(d,u)},c=d=>{var u=$$(),h=M(u),f=M(h),g=M(f),m=M(g,!0);P(g);var v=X(g,2),_=M(v),x=M(_,!0);P(_);var A=X(_,2),E=L=>{var H=I$(),N=M(H,!0);P(H),ae((se,V)=>{ke(H,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.download")]),S(L,H)},T=L=>{var H=P$(),N=M(H,!0);P(H),ae((se,V)=>{ke(H,"href",se),ne(N,V)},[()=>i().downloadLink(n()),()=>C.t("common.personalize")]),S(L,H)};ce(A,L=>{n().attributes.is_voucher?L(E):L(T,-1)}),P(v);var O=X(v,2),$=M(O,!0);P(O),Et(2),P(f),P(h),P(u),ae(L=>{ne(m,n().attributes.quantity),ne(x,n().attributes.title),ne($,L)},[()=>na(n().price_cents)]),S(d,u)};return ce(a,d=>{n().attributes.ticket_type=="time_slot"||n().attributes.ticket_type=="normal"?d(l):d(c,-1)}),S(e,o),te(s)}re(lg,{item:{},orderDetails:{}},[],[],{mode:"open"});var M$=W('<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 F$(e,t){ee(t,!0);const r=og(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);var s=K(),o=z(s),a=l=>{var c=M$(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v),Et(2),P(u),P(d);var x=X(d,2);Ue(x,17,()=>p(i).items,$=>$.id,($,L)=>{var H=K(),N=z(H),se=oe=>{lg(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})},V=oe=>{ag(oe,{get item(){return p(L)},get orderDetails(){return p(n)}})};ce(N,oe=>{p(L).type==="Ticket"?oe(se):p(L).type==="Event"&&oe(V,1)}),S($,H)});var A=X(x,2),E=M(A),T=X(M(E),4),O=M(T,!0);P(T),Et(2),P(E),P(A),P(c),ae(($,L,H,N)=>{ne(f,$),ne(m,L),ne(_,H),ne(O,N)},[()=>C.t("common.table.count"),()=>C.t("common.table.product"),()=>C.t("common.table.price"),()=>C.t("common.table.total",{value:na(p(i).total_price_cents)})]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),te()}customElements.define("go-order-breakdown",re(F$,{},[],[]));function N$(e,t){ee(t,!0);const r=og(t.$$host),n=D(()=>r.value);let i=D(()=>p(n)?.order);Et();var s=Rt();ae(()=>ne(s,p(i)?.id)),S(e,s),te()}customElements.define("go-order-invoice-id",re(N$,{},[],[]));var R$=W("<go-form></go-form>",2);function L$(e,t){ee(t,!1),cr.defineForm({id:"passwordResetForm",fields:[{key:"currentPassword",required:!0},{key:"password",required:!0},{key:"confirmPassword",required:!0}]});async function r(i){const s=i.target.details,o=await C.updatePassword(s.formData);o.data?(s.successMessage=C.t("user.passwordSuccess.desc.title"),s.apiErrors=[]):s.apiErrors=o.error?.errors||o.error||o.errors}jl();var n=R$();Hn(n,"formId","passwordResetForm"),Ol("submit",n,r),S(e,n),te()}customElements.define("go-profile-password",re(L$,{},[],[]));var z$=W("<go-form></go-form>",2);function U$(e,t){ee(t,!0),cr.defineForm({id:"accountDetailsForm",fields:[{key:"salutation",required:!1},{key:"firstName",required:!0},{key:"lastName",required:!0},{key:"email",required:!0},{key:"confirmEmail",required:!0},{key:"language",required:!0}]});let r=Q(void 0);const n=D(()=>C.validateToken());rn(async()=>{await C.waitForAllFetches(),await Zl(()=>p(r).details),await Zl(()=>p(n).data),p(r).details.fill(p(n).data)});var i=z$();Hn(i,"formId","accountDetailsForm"),Ef(i,s=>I(r,s),()=>p(r)),S(e,i),te()}customElements.define("go-profile-details",re(U$,{},[],[]));var V$=W('<div class="go-profile-fullname"> </div> <div class="go-profile-email"> </div>',1);function B$(e,t){ee(t,!0);const r=D(()=>C.validateToken()),n=D(()=>p(r)?.data);var i=K(),s=z(i),o=l=>{var c=V$(),d=z(c),u=M(d);P(d);var h=X(d,2),f=M(h,!0);P(h),ae(()=>{ne(u,`${p(n).name??""}
83
+ ${p(n).surname??""}`),ne(f,p(n).email)}),S(l,c)},a=l=>{var c=Rt();ae(d=>ne(c,d),[()=>C.t("user.login.desc.text")]),S(l,c)};ce(s,l=>{p(n)?l(o):l(a,-1)}),S(e,i),te()}customElements.define("go-profile-overview",re(B$,{},[],[]));function q$(e,t){ee(t,!0);function r(f){if(!f)return;const g=[];for(const m of f.split(",")){const v=m.trim();v&&(rg.includes(v)?g.push(v):console.warn(`[go-ticket-selection] Unknown filter "${v}". Valid filters: ${rg.join(", ")}`))}return g.length?g:void 0}let n=b(t,"filters",7),i=b(t,"eventIds",7),s=b(t,"museumIds",7),o=b(t,"exhibitionIds",7),a=b(t,"selectedDate",7),l=b(t,"selectedTimeslot",7),c=b(t,"ticketIds",7),d=b(t,"ticketGroupIds",7);const u=new f$;me(()=>{t.$$host.hasAttribute("mode")&&console.warn('[go-ticket-selection] `mode` attribute is deprecated and ignored. Use `filters` instead, e.g. filters="ticket:timeslot".')}),me(()=>{u.filters=r(n()),u.eventIds=sn(i()),u.museumIds=sn(s()),u.exhibitionIds=sn(o()),u.ticketIds=sn(c()),u.ticketGroupIds=sn(d()),u.selectedTimeslot=l(),a()&&(u.selectedDate=ra(a()))}),me(()=>{u.selectedDate&&qe(()=>{a(u.selectedDate.toString())})}),h$(t.$$host,u);var h={details:u,get filters(){return n()},set filters(f){n(f),y()},get eventIds(){return i()},set eventIds(f){i(f),y()},get museumIds(){return s()},set museumIds(f){s(f),y()},get exhibitionIds(){return o()},set exhibitionIds(f){o(f),y()},get selectedDate(){return a()},set selectedDate(f){a(f),y()},get selectedTimeslot(){return l()},set selectedTimeslot(f){l(f),y()},get ticketIds(){return c()},set ticketIds(f){c(f),y()},get ticketGroupIds(){return d()},set ticketGroupIds(f){d(f),y()}};return te(h)}customElements.define("go-ticket-selection",re(q$,{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 j$(e,t){ee(t,!0);const r=pn(t.$$host),n=D(()=>r.value);me(()=>{t.$$host.style.display=p(n)?.isTicketsVisible?"block":"none",t.$$host.classList.toggle("is-hidden",!p(n)?.isTicketsVisible),t.$$host.classList.toggle("is-visible",p(n)?.isTicketsVisible)}),te()}customElements.define("go-tickets",re(j$,{},[],[]));function Z$(e,t){ee(t,!0);const r=pn(t.$$host),n=D(()=>r.value),i=D(()=>Gn(p(n)?.preCarts||[],o=>o.items.length)),s=D(()=>!p(n)?.isTicketsVisible||p(n)?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),te()}customElements.define("go-tickets-empty",re(Z$,{},[],[]));function W$(e,t){ee(t,!0);const r=pn(t.$$host),n=D(()=>r.value);let i=D(()=>Gn(p(n)?.preCarts||[],o=>o.totalPriceCents));Et();var s=Rt();ae(o=>ne(s,o),[()=>ur(p(i))]),S(e,s),te()}customElements.define("go-tickets-sum",re(W$,{},[],[]));var H$=class{#e;get ticketSelectionDetails(){return p(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}#t=Q($e(Pi()));get preCart(){return p(this.#t)}set preCart(e){I(this.#t,e,!0)}#r=Q();get filters(){return p(this.#r)}set filters(e){I(this.#r,e,!0)}#n=Q();get dateId(){return p(this.#n)}set dateId(e){I(this.#n,e,!0)}#i=Q();get limit(){return p(this.#i)}set limit(e){I(this.#i,e,!0)}#s=Q();get query(){return p(this.#s)}set query(e){I(this.#s,e,!0)}#a=Q($e([]));get ticketGroupIds(){return p(this.#a)}set ticketGroupIds(e){I(this.#a,e,!0)}#o=Q($e([]));get languageIds(){return p(this.#o)}set languageIds(e){I(this.#o,e,!0)}#l=Q($e([]));get catchWordIds(){return p(this.#l)}set catchWordIds(e){I(this.#l,e,!0)}#u=Q($e([]));get museumIds(){return p(this.#u)}set museumIds(e){I(this.#u,e,!0)}constructor(e,t){this.filters=e===void 0?void 0:Array.isArray(e)?e:[e],this.#e=D(()=>t.value)}get effectiveFilters(){return this.filters?.length?this.filters:this.ticketSelectionDetails?.filters??[]}clear(){this.preCart=Pi([])}toString(){return JSON.stringify({filters:this.effectiveFilters,preCart:this.preCart.toString()})}async loadTickets(){this.preCart=Pi();const e=this.effectiveFilters.filter(t=>t!=="custom");await Promise.all(e.map(t=>pi(t).loadProducts(this)))}},ug="go-ticket-segment",G$=Mi(ug),Rc=Fi(ug);function K$(e,t){ee(t,!0);const r=b(t,"filters",7),n=b(t,"dateId",7),i=b(t,"query",7),s=b(t,"limit",7),o=b(t,"ticketGroupIds",7),a=b(t,"languageIds",7),l=b(t,"catchWordIds",7),c=b(t,"museumIds",7);function d(v){if(!v)return;const _=v.split(",").map(x=>x.trim()).filter(Boolean);return _.length?_:void 0}const u=pn(t.$$host),h=u.value,f=new H$(d(r()),u);G$(t.$$host,f),me(()=>{f.filters=d(r()),f.dateId=n(),f.query=i(),f.limit=s(),f.ticketGroupIds=sn(o()),f.languageIds=sn(a()),f.catchWordIds=sn(l()),f.museumIds=sn(c())}),me(()=>{f.dateId,f.filters,f.ticketGroupIds,f.museumIds,f.languageIds,f.catchWordIds,f.query,f.limit,h?.filters,h?.selectedTimeslot,h?.selectedTime,h?.selectedDate,h?.museumIds,qe(()=>{f.loadTickets()})}),me(()=>{h&&qe(()=>h?.addTicketSegment(f))});const g=D(()=>f.preCart.items.length);me(()=>{t.$$host.classList.toggle("is-empty",p(g)===0)});var m={details:f,get filters(){return r()},set filters(v){r(v),y()},get dateId(){return n()},set dateId(v){n(v),y()},get query(){return i()},set query(v){i(v),y()},get limit(){return s()},set limit(v){s(v),y()},get ticketGroupIds(){return o()},set ticketGroupIds(v){o(v),y()},get languageIds(){return a()},set languageIds(v){a(v),y()},get catchWordIds(){return l()},set catchWordIds(v){l(v),y()},get museumIds(){return c()},set museumIds(v){c(v),y()}};return te(m)}customElements.define("go-ticket-segment",re(K$,{catchWordIds:{attribute:"catch-word-ids",reflect:!0,type:"String"},dateId:{attribute:"date-id",reflect:!0,type:"Number"},filters:{attribute:"filters",reflect:!0,type:"String"},languageIds:{attribute:"language-ids",reflect:!0,type:"String"},limit:{attribute:"limit",reflect:!0,type:"Number"},query:{attribute:"query",reflect:!0,type:"String"},ticketGroupIds:{attribute:"ticket-group-ids",reflect:!0,type:"String"},museumIds:{attribute:"museum-ids",reflect:!0,type:"String"}},[],["details"]));function Y$(e,t){ee(t,!0);const r=pn(t.$$host).value,n=Rc(t.$$host).value,i=D(()=>n?.preCart.items.length),s=D(()=>!r?.isTicketsVisible||r?.isTicketsVisible&&p(i)===0);me(()=>{t.$$host.style.display=p(s)?"block":"none",t.$$host.classList.toggle("is-hidden",!p(s)),t.$$host.classList.toggle("is-visible",p(s))}),te()}customElements.define("go-ticket-segment-empty",re(Y$,{},[],[]));function cg(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 J$(e){if(Array.isArray(e))return e}function X$(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 Q$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
84
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eM(e,t){return J$(e)||X$(e,t)||tM(e,t)||Q$()}function tM(e,t){if(e){if(typeof e=="string")return cg(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)?cg(e,t):void 0}}var dg=Object.entries,fg=Object.setPrototypeOf,rM=Object.isFrozen,nM=Object.getPrototypeOf,iM=Object.getOwnPropertyDescriptor,Ct=Object.freeze,fr=Object.seal,Xi=Object.create,hg=typeof Reflect<"u"&&Reflect,Lc=hg.apply,zc=hg.construct;Ct||(Ct=function(t){return t}),fr||(fr=function(t){return t}),Lc||(Lc=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)}),zc||(zc=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});var Qi=ut(Array.prototype.forEach),sM=ut(Array.prototype.lastIndexOf),pg=ut(Array.prototype.pop),es=ut(Array.prototype.push),oM=ut(Array.prototype.splice),Dt=Array.isArray,io=ut(String.prototype.toLowerCase),Uc=ut(String.prototype.toString),mg=ut(String.prototype.match),ts=ut(String.prototype.replace),vg=ut(String.prototype.indexOf),aM=ut(String.prototype.trim),lM=ut(Number.prototype.toString),uM=ut(Boolean.prototype.toString),gg=typeof BigInt>"u"?null:ut(BigInt.prototype.toString),yg=typeof Symbol>"u"?null:ut(Symbol.prototype.toString),nt=ut(Object.prototype.hasOwnProperty),so=ut(Object.prototype.toString),bt=ut(RegExp.prototype.test),oo=cM(TypeError);function ut(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Lc(e,t,n)}}function cM(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zc(e,r)}}function xe(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:io;if(fg&&fg(e,null),!Dt(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(rM(t)||(t[n]=s),i=s)}e[i]=!0}return e}function dM(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function wt(e){const t=Xi(null);for(const n of dg(e)){var r=eM(n,2);const i=r[0],s=r[1];nt(e,i)&&(Dt(s)?t[i]=dM(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=wt(s):t[i]=s)}return t}function fM(e){switch(typeof e){case"string":return e;case"number":return lM(e);case"boolean":return uM(e);case"bigint":return gg?gg(e):"0";case"symbol":return yg?yg(e):"Symbol()";case"undefined":return so(e);case"function":case"object":{if(e===null)return so(e);const t=e,r=Kr(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:so(n)}return so(e)}default:return so(e)}}function Kr(e,t){for(;e!==null;){const n=iM(e,t);if(n){if(n.get)return ut(n.get);if(typeof n.value=="function")return ut(n.value)}e=nM(e)}function r(){return null}return r}function hM(e){try{return bt(e,""),!0}catch{return!1}}var bg=Ct(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vc=Ct(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Bc=Ct(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pM=Ct(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qc=Ct(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mM=Ct(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_g=Ct(["#text"]),wg=Ct(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),jc=Ct(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),kg=Ct(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Za=Ct(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vM=fr(/{{[\w\W]*|^[\w\W]*}}/g),gM=fr(/<%[\w\W]*|^[\w\W]*%>/g),yM=fr(/\${[\w\W]*/g),bM=fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),_M=fr(/^aria-[\-\w]+$/),Sg=fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wM=fr(/^(?:\w+script|data):/i),kM=fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),SM=fr(/^html$/i),EM=fr(/^[a-z][.\w]*(-[.\w]+)+$/i),Yr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xM=function(){return typeof window>"u"?null:window},TM=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}},Eg=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xM();const t=ve=>xg(ve);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Yr.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,u=a.prototype,h=Kr(u,"cloneNode"),f=Kr(u,"remove"),g=Kr(u,"nextSibling"),m=Kr(u,"childNodes"),v=Kr(u,"parentNode"),_=Kr(u,"shadowRoot"),x=Kr(u,"attributes"),A=o&&o.prototype?Kr(o.prototype,"nodeType"):null,E=o&&o.prototype?Kr(o.prototype,"nodeName"):null;if(typeof s=="function"){const ve=r.createElement("template");ve.content&&ve.content.ownerDocument&&(r=ve.content.ownerDocument)}let T,O="";const $=r,L=$.implementation,H=$.createNodeIterator,N=$.createDocumentFragment,se=$.getElementsByTagName,V=n.importNode;let oe=Eg();t.isSupported=typeof dg=="function"&&typeof v=="function"&&L&&L.createHTMLDocument!==void 0;const pe=vM,Y=gM,ie=yM,B=bM,j=_M,G=wM,J=kM,le=EM;let he=Sg,F=null;const ue=xe({},[...bg,...Vc,...Bc,...qc,..._g]);let U=null;const ge=xe({},[...wg,...jc,...kg,...Za]);let de=Object.seal(Xi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,Be=null;const Pe=Object.seal(Xi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ye=!0,kt=!0,Ge=!1,Xt=!0,ct=!1,Qt=!0,St=!1,It=!1,er=!1,qt=!1,hr=!1,Or=!1,Cr=!0,mn=!1;const Dr="user-content-";let pr=!0,Jr=!1,Xr={},_t=null;const Ln=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 rs=null;const ns=xe({},["audio","video","img","source","image","track"]);let ao=null;const Zc=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",is="http://www.w3.org/2000/svg",mr="http://www.w3.org/1999/xhtml";let zn=mr,Wc=!1,Hc=null;const GM=xe({},[mi,is,mr],Uc);let Gc=xe({},["mi","mo","mn","ms","mtext"]),Kc=xe({},["annotation-xml"]);const KM=xe({},["title","style","font","a","script"]);let lo=null;const YM=["application/xhtml+xml","text/html"],JM="text/html";let st=null,ss=null;const XM=r.createElement("form"),Dg=function(k){return k instanceof RegExp||k instanceof Function},Yc=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===k)return;(!k||typeof k!="object")&&(k={}),k=wt(k),lo=YM.indexOf(k.PARSER_MEDIA_TYPE)===-1?JM:k.PARSER_MEDIA_TYPE,st=lo==="application/xhtml+xml"?Uc:io,F=nt(k,"ALLOWED_TAGS")&&Dt(k.ALLOWED_TAGS)?xe({},k.ALLOWED_TAGS,st):ue,U=nt(k,"ALLOWED_ATTR")&&Dt(k.ALLOWED_ATTR)?xe({},k.ALLOWED_ATTR,st):ge,Hc=nt(k,"ALLOWED_NAMESPACES")&&Dt(k.ALLOWED_NAMESPACES)?xe({},k.ALLOWED_NAMESPACES,Uc):GM,ao=nt(k,"ADD_URI_SAFE_ATTR")&&Dt(k.ADD_URI_SAFE_ATTR)?xe(wt(Zc),k.ADD_URI_SAFE_ATTR,st):Zc,rs=nt(k,"ADD_DATA_URI_TAGS")&&Dt(k.ADD_DATA_URI_TAGS)?xe(wt(ns),k.ADD_DATA_URI_TAGS,st):ns,_t=nt(k,"FORBID_CONTENTS")&&Dt(k.FORBID_CONTENTS)?xe({},k.FORBID_CONTENTS,st):Ln,w=nt(k,"FORBID_TAGS")&&Dt(k.FORBID_TAGS)?xe({},k.FORBID_TAGS,st):wt({}),Be=nt(k,"FORBID_ATTR")&&Dt(k.FORBID_ATTR)?xe({},k.FORBID_ATTR,st):wt({}),Xr=nt(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?wt(k.USE_PROFILES):k.USE_PROFILES:!1,Ye=k.ALLOW_ARIA_ATTR!==!1,kt=k.ALLOW_DATA_ATTR!==!1,Ge=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ct=k.SAFE_FOR_TEMPLATES||!1,Qt=k.SAFE_FOR_XML!==!1,St=k.WHOLE_DOCUMENT||!1,qt=k.RETURN_DOM||!1,hr=k.RETURN_DOM_FRAGMENT||!1,Or=k.RETURN_TRUSTED_TYPE||!1,er=k.FORCE_BODY||!1,Cr=k.SANITIZE_DOM!==!1,mn=k.SANITIZE_NAMED_PROPS||!1,pr=k.KEEP_CONTENT!==!1,Jr=k.IN_PLACE||!1,he=hM(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Sg,zn=typeof k.NAMESPACE=="string"?k.NAMESPACE:mr,Gc=nt(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?wt(k.MATHML_TEXT_INTEGRATION_POINTS):xe({},["mi","mo","mn","ms","mtext"]),Kc=nt(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?wt(k.HTML_INTEGRATION_POINTS):xe({},["annotation-xml"]);const q=nt(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?wt(k.CUSTOM_ELEMENT_HANDLING):Xi(null);if(de=Xi(null),nt(q,"tagNameCheck")&&Dg(q.tagNameCheck)&&(de.tagNameCheck=q.tagNameCheck),nt(q,"attributeNameCheck")&&Dg(q.attributeNameCheck)&&(de.attributeNameCheck=q.attributeNameCheck),nt(q,"allowCustomizedBuiltInElements")&&typeof q.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=q.allowCustomizedBuiltInElements),ct&&(kt=!1),hr&&(qt=!0),Xr&&(F=xe({},_g),U=Xi(null),Xr.html===!0&&(xe(F,bg),xe(U,wg)),Xr.svg===!0&&(xe(F,Vc),xe(U,jc),xe(U,Za)),Xr.svgFilters===!0&&(xe(F,Bc),xe(U,jc),xe(U,Za)),Xr.mathMl===!0&&(xe(F,qc),xe(U,kg),xe(U,Za))),Pe.tagCheck=null,Pe.attributeCheck=null,nt(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?Pe.tagCheck=k.ADD_TAGS:Dt(k.ADD_TAGS)&&(F===ue&&(F=wt(F)),xe(F,k.ADD_TAGS,st))),nt(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?Pe.attributeCheck=k.ADD_ATTR:Dt(k.ADD_ATTR)&&(U===ge&&(U=wt(U)),xe(U,k.ADD_ATTR,st))),nt(k,"ADD_URI_SAFE_ATTR")&&Dt(k.ADD_URI_SAFE_ATTR)&&xe(ao,k.ADD_URI_SAFE_ATTR,st),nt(k,"FORBID_CONTENTS")&&Dt(k.FORBID_CONTENTS)&&(_t===Ln&&(_t=wt(_t)),xe(_t,k.FORBID_CONTENTS,st)),nt(k,"ADD_FORBID_CONTENTS")&&Dt(k.ADD_FORBID_CONTENTS)&&(_t===Ln&&(_t=wt(_t)),xe(_t,k.ADD_FORBID_CONTENTS,st)),pr&&(F["#text"]=!0),St&&xe(F,["html","head","body"]),F.table&&(xe(F,["tbody"]),delete w.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=k.TRUSTED_TYPES_POLICY,O=T.createHTML("")}else T===void 0&&(T=TM(d,i)),T!==null&&typeof O=="string"&&(O=T.createHTML(""));(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&F===ue&&(F=wt(F)),oe.uponSanitizeAttribute.length>0&&U===ge&&(U=wt(U)),Ct&&Ct(k),ss=k},Ig=xe({},[...Vc,...Bc,...pM]),Pg=xe({},[...qc,...mM]),QM=function(k){let q=v(k);(!q||!q.tagName)&&(q={namespaceURI:zn,tagName:"template"});const fe=io(k.tagName),Oe=io(q.tagName);return Hc[k.namespaceURI]?k.namespaceURI===is?q.namespaceURI===mr?fe==="svg":q.namespaceURI===mi?fe==="svg"&&(Oe==="annotation-xml"||Gc[Oe]):!!Ig[fe]:k.namespaceURI===mi?q.namespaceURI===mr?fe==="math":q.namespaceURI===is?fe==="math"&&Kc[Oe]:!!Pg[fe]:k.namespaceURI===mr?q.namespaceURI===is&&!Kc[Oe]||q.namespaceURI===mi&&!Gc[Oe]?!1:!Pg[fe]&&(KM[fe]||!Ig[fe]):!!(lo==="application/xhtml+xml"&&Hc[k.namespaceURI]):!1},Ir=function(k){es(t.removed,{element:k});try{v(k).removeChild(k)}catch{f(k)}},vi=function(k,q){try{es(t.removed,{attribute:q.getAttributeNode(k),from:q})}catch{es(t.removed,{attribute:null,from:q})}if(q.removeAttribute(k),k==="is")if(qt||hr)try{Ir(q)}catch{}else try{q.setAttribute(k,"")}catch{}},$g=function(k){let q=null,fe=null;if(er)k="<remove></remove>"+k;else{const et=mg(k,/^[\r\n\t ]+/);fe=et&&et[0]}lo==="application/xhtml+xml"&&zn===mr&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const Oe=T?T.createHTML(k):k;if(zn===mr)try{q=new c().parseFromString(Oe,lo)}catch{}if(!q||!q.documentElement){q=L.createDocument(zn,"template",null);try{q.documentElement.innerHTML=Wc?O:Oe}catch{}}const Me=q.body||q.documentElement;return k&&fe&&Me.insertBefore(r.createTextNode(fe),Me.childNodes[0]||null),zn===mr?se.call(q,St?"html":"body")[0]:St?q.documentElement:Me},Mg=function(k){return H.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Fg=function(k){k.normalize();const q=H.call(k.ownerDocument||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let fe=q.nextNode();for(;fe;){let Oe=fe.data;Qi([pe,Y,ie],Me=>{Oe=ts(Oe,Me," ")}),fe.data=Oe,fe=q.nextNode()}},Wa=function(k){const q=E?E(k):null;return typeof q!="string"||st(q)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==x(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==A(k)||k.childNodes!==m(k)},uo=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return A(k)===Yr.documentFragment}catch{return!1}},Ha=function(k){if(!A||typeof k!="object"||k===null)return!1;try{return typeof A(k)=="number"}catch{return!1}};function vn(ve,k,q){Qi(ve,fe=>{fe.call(t,k,q,ss)})}const Ng=function(k){let q=null;if(vn(oe.beforeSanitizeElements,k,null),Wa(k))return Ir(k),!0;const fe=st(k.nodeName);if(vn(oe.uponSanitizeElement,k,{tagName:fe,allowedTags:F}),Qt&&k.hasChildNodes()&&!Ha(k.firstElementChild)&&bt(/<[/\w!]/g,k.innerHTML)&&bt(/<[/\w!]/g,k.textContent)||Qt&&k.namespaceURI===mr&&fe==="style"&&Ha(k.firstElementChild)||k.nodeType===Yr.progressingInstruction||Qt&&k.nodeType===Yr.comment&&bt(/<[/\w]/g,k.data))return Ir(k),!0;if(w[fe]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(fe))&&!F[fe]){if(!w[fe]&&Lg(fe)&&(de.tagNameCheck instanceof RegExp&&bt(de.tagNameCheck,fe)||de.tagNameCheck instanceof Function&&de.tagNameCheck(fe)))return!1;if(pr&&!_t[fe]){const Oe=v(k),Me=m(k);if(Me&&Oe){const et=Me.length;for(let jt=et-1;jt>=0;--jt){const Un=h(Me[jt],!0);Oe.insertBefore(Un,g(k))}}}return Ir(k),!0}return(A?A(k):k.nodeType)===Yr.element&&!QM(k)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&bt(/<\/no(script|embed|frames)/i,k.innerHTML)?(Ir(k),!0):(ct&&k.nodeType===Yr.text&&(q=k.textContent,Qi([pe,Y,ie],Oe=>{q=ts(q,Oe," ")}),k.textContent!==q&&(es(t.removed,{element:k.cloneNode()}),k.textContent=q)),vn(oe.afterSanitizeElements,k,null),!1)},Rg=function(k,q,fe){if(Be[q]||Cr&&(q==="id"||q==="name")&&(fe in r||fe in XM))return!1;const Oe=U[q]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(q,k);if(!(kt&&!Be[q]&&bt(B,q))){if(!(Ye&&bt(j,q))){if(!Oe||Be[q]){if(!(Lg(k)&&(de.tagNameCheck instanceof RegExp&&bt(de.tagNameCheck,k)||de.tagNameCheck instanceof Function&&de.tagNameCheck(k))&&(de.attributeNameCheck instanceof RegExp&&bt(de.attributeNameCheck,q)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(q,k))||q==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&bt(de.tagNameCheck,fe)||de.tagNameCheck instanceof Function&&de.tagNameCheck(fe))))return!1}else if(!ao[q]){if(!bt(he,ts(fe,J,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&k!=="script"&&vg(fe,"data:")===0&&rs[k])){if(!(Ge&&!bt(G,ts(fe,J,"")))){if(fe)return!1}}}}}}return!0},e2=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Lg=function(k){return!e2[io(k)]&&bt(le,k)},zg=function(k){vn(oe.beforeSanitizeAttributes,k,null);const q=k.attributes;if(!q||Wa(k))return;const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let Oe=q.length;for(;Oe--;){const Me=q[Oe],et=Me.name,jt=Me.namespaceURI,Un=Me.value,gn=st(et),Jc=Un;let pt=et==="value"?Jc:aM(Jc);if(fe.attrName=gn,fe.attrValue=pt,fe.keepAttr=!0,fe.forceKeepAttr=void 0,vn(oe.uponSanitizeAttribute,k,fe),pt=fe.attrValue,mn&&(gn==="id"||gn==="name")&&vg(pt,Dr)!==0&&(vi(et,k),pt=Dr+pt),Qt&&bt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,pt)){vi(et,k);continue}if(gn==="attributename"&&mg(pt,"href")){vi(et,k);continue}if(fe.forceKeepAttr)continue;if(!fe.keepAttr){vi(et,k);continue}if(!Xt&&bt(/\/>/i,pt)){vi(et,k);continue}ct&&Qi([pe,Y,ie],Vg=>{pt=ts(pt,Vg," ")});const Ug=st(k.nodeName);if(!Rg(Ug,gn,pt)){vi(et,k);continue}if(T&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!jt)switch(d.getAttributeType(Ug,gn)){case"TrustedHTML":pt=T.createHTML(pt);break;case"TrustedScriptURL":pt=T.createScriptURL(pt);break}if(pt!==Jc)try{jt?k.setAttributeNS(jt,et,pt):k.setAttribute(et,pt),Wa(k)?Ir(k):pg(t.removed)}catch{vi(et,k)}}vn(oe.afterSanitizeAttributes,k,null)},Ga=function(k){let q=null;const fe=Mg(k);for(vn(oe.beforeSanitizeShadowDOM,k,null);q=fe.nextNode();)if(vn(oe.uponSanitizeShadowNode,q,null),Ng(q),zg(q),uo(q.content)&&Ga(q.content),(A?A(q):q.nodeType)===Yr.element){const Oe=_?_(q):q.shadowRoot;uo(Oe)&&(os(Oe),Ga(Oe))}vn(oe.afterSanitizeShadowDOM,k,null)},os=function(k){const q=A?A(k):k.nodeType;if(q===Yr.element){const Me=_?_(k):k.shadowRoot;uo(Me)&&(os(Me),Ga(Me))}const fe=m?m(k):k.childNodes;if(!fe)return;const Oe=[];Qi(fe,Me=>{es(Oe,Me)});for(const Me of Oe)os(Me);if(q===Yr.element){const Me=E?E(k):null;if(typeof Me=="string"&&st(Me)==="template"){const et=k.content;uo(et)&&os(et)}}};return t.sanitize=function(ve){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,fe=null,Oe=null,Me=null;if(Wc=!ve,Wc&&(ve="<!-->"),typeof ve!="string"&&!Ha(ve)&&(ve=fM(ve),typeof ve!="string"))throw oo("dirty is not a string, aborting");if(!t.isSupported)return ve;if(It||Yc(k),t.removed=[],typeof ve=="string"&&(Jr=!1),Jr){const Un=E?E(ve):ve.nodeName;if(typeof Un=="string"){const gn=st(Un);if(!F[gn]||w[gn])throw oo("root node is forbidden and cannot be sanitized in-place")}if(Wa(ve))throw oo("root node is clobbered and cannot be sanitized in-place");os(ve)}else if(Ha(ve))q=$g("<!---->"),fe=q.ownerDocument.importNode(ve,!0),fe.nodeType===Yr.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?q=fe:q.appendChild(fe),os(fe);else{if(!qt&&!ct&&!St&&ve.indexOf("<")===-1)return T&&Or?T.createHTML(ve):ve;if(q=$g(ve),!q)return qt?null:Or?O:""}q&&er&&Ir(q.firstChild);const et=Mg(Jr?ve:q);for(;Oe=et.nextNode();)Ng(Oe),zg(Oe),uo(Oe.content)&&Ga(Oe.content);if(Jr)return ct&&Fg(ve),ve;if(qt){if(ct&&Fg(q),hr)for(Me=N.call(q.ownerDocument);q.firstChild;)Me.appendChild(q.firstChild);else Me=q;return(U.shadowroot||U.shadowrootmode)&&(Me=V.call(n,Me,!0)),Me}let jt=St?q.outerHTML:q.innerHTML;return St&&F["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&bt(SM,q.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
85
+ `+jt),ct&&Qi([pe,Y,ie],Un=>{jt=ts(jt,Un," ")}),T&&Or?T.createHTML(jt):jt},t.setConfig=function(){Yc(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),It=!0},t.clearConfig=function(){ss=null,It=!1},t.isValidAttribute=function(ve,k,q){return ss||Yc({}),Rg(st(ve),st(k),q)},t.addHook=function(ve,k){typeof k=="function"&&es(oe[ve],k)},t.removeHook=function(ve,k){if(k!==void 0){const q=sM(oe[ve],k);return q===-1?void 0:oM(oe[ve],q,1)[0]}return pg(oe[ve])},t.removeHooks=function(ve){oe[ve]=[]},t.removeAllHooks=function(){oe=Eg()},t}var AM=xg(),OM=W('<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>',1),CM=W("<option> </option>"),DM=W('<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>');function Tg(e,t){ee(t,!0);const r=f=>{var g=OM(),m=z(g),v=M(m);P(m);var _=X(m,2),x=M(_,!0);P(_),ae(A=>{ne(v,`${i().product.event_title??""} - ${A??""}`),ne(x,i().product.title)},[()=>zs(i().time)]),S(f,g)},n=f=>{Et();var g=Rt();ae(()=>ne(g,i().product.title)),S(f,g)};let i=b(t,"item",7),s=b(t,"details",7),o=Q(void 0);me(()=>{s().preCart.items.map(f=>f.quantity),qe(()=>{I(o,C.capacityManager.capacity(C.cart,i(),s().preCart),!0)})});function a(f,g,m){f.quantity=parseInt(g.value)}let l=n;Vs(i().product)&&(l=r);var c={get item(){return i()},set item(f){i(f),y()},get details(){return s()},set details(f){s(f),y()}},d=K(),u=z(d),h=f=>{var g=DM(),m=M(g),v=M(m),_=M(v),x=M(_);l(x),P(_);var A=X(_,2);t_(A,()=>AM.sanitize(i().product.description),!0),P(A);var E=X(A,2),T=M(E,!0);P(E);var O=X(E,2),$=M(O);Ue($,21,()=>$p(p(o).min,p(o).max),L=>L.value,(L,H)=>{var N=CM(),se=M(N,!0);P(N);var V={};ae(()=>{Fl(N,i().quantity===p(H).value),ne(se,p(H).label),V!==(V=p(H).value)&&(N.value=(N.__value=p(H).value)??"")}),S(L,N)}),P($),P(O),P(v),P(m),P(g),ae(L=>{Lt(m,1,zr(["go-tickets-item",p(o).bookedOut&&"is-booked-out"])),ke(m,"data-testid",i().uuid),ne(T,i().price_formatted),ke($,"aria-label",L)},[()=>C.t("cart.content.table.edit")]),Nt("change",$,L=>a(i(),L.target,s()?.ticketSelectionDetails)),S(f,g)};return ce(u,f=>{p(o)&&!p(o).unavailable&&f(h)}),S(e,d),te(c)}Rr(["change"]),re(Tg,{item:{},details:{}},[],[],{mode:"open"});var IM=W('<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 PM(e,t){ee(t,!0);const r=Rc(t.$$host),n=D(()=>r.value),i=D(()=>p(n)?.preCart?.items.length&&p(n)?.preCart?.items.length>0);var s=K(),o=z(s),a=l=>{var c=IM(),d=M(c),u=M(d),h=M(u),f=M(h,!0);P(h);var g=X(h,2),m=M(g,!0);P(g);var v=X(g,2),_=M(v,!0);P(v);var x=X(v,2),A=M(x,!0);P(x),P(u),P(d);var E=X(d,2);Ue(E,17,()=>p(n).preCart.items,T=>T.uuid,(T,O)=>{Tg(T,{get item(){return p(O)},get details(){return p(n)}})}),P(c),ae((T,O,$,L)=>{ne(f,T),ne(m,O),ne(_,$),ne(A,L)},[()=>C.t("product.detail.table.title"),()=>C.t("product.detail.table.desc"),()=>C.t("product.detail.table.price"),()=>C.t("product.detail.table.quantity")]),S(l,c)};ce(o,l=>{p(i)&&p(n)&&l(a)}),S(e,s),te()}customElements.define("go-ticket-segment-body",re(PM,{},[],[]));function $M(e,t){ee(t,!0);const r=Rc(t.$$host),n=D(()=>r.value);Et();var i=Rt();ae(()=>ne(i,p(n)?.preCart.totalFormatted)),S(e,i),te()}customElements.define("go-ticket-segment-sum",re($M,{},[],[]));var MM=class{#e;get tsd(){return p(this.#e)}set tsd(e){I(this.#e,e)}#t=Q($e([]));get timeslots(){return p(this.#t)}set timeslots(e){I(this.#t,e,!0)}constructor(e){e&&(this.#e=D(()=>e.value),this.tsd&&(this.tsd.timeslotDetails=this))}get boockedOutCount(){return this.timeslots.filter(e=>e.capacity==0).length}recalculateCapacities(){const e=this.tsd?.selectedDate;if(!e){this.timeslots=[];return}this.timeslots=C.capacityManager.quotaManager.timeslotsOn(e).map(t=>({...t,startAt:t.timeSlot,timeFormatted:t.timeSlot.substring(11,16),available:t.capacity>0}))}},FM=W('<li><label> <input type="radio" name="timeslot"/></label></li>'),NM=W('<ul data-testid="timeslots"></ul>');function RM(e,t){ee(t,!0);const r=[],n=new MM(pn(t.$$host));me(()=>{const d=n.tsd;if(!d)return;const u=d.filters,h=d.selectedDate;qe(async()=>{u?.length&&h&&await Promise.all(u.map(f=>pi(f).loadTimeslots(d))),n.recalculateCapacities()})});const i=(d,u)=>{!d||!("dispatchEvent"in d)||d.dispatchEvent(new CustomEvent("go-timeslot-select",{detail:{selected:u},bubbles:!0,composed:!0}))},s=d=>{i(d.target,n.tsd?.selectedTimeslot)};me(()=>{const d=n.tsd;if(!d)return;const u=n.timeslots;if(u.length!==1)return;const h=u[0];h.available&&d.selectedTimeslot!==h.startAt&&(d.selectedTimeslot=h.startAt,i(t.$$host,h.startAt))});var o={details:n},a=K(),l=z(a),c=d=>{var u=NM();Ue(u,20,()=>n.timeslots,h=>h,(h,f)=>{const g=D(()=>f.totalCapacity===0),m=D(()=>!p(g)&&f.capacity===0),v=D(()=>p(g)||p(m)||!f.available),_=D(()=>n.tsd?.selectedTimeslot===f.startAt);var x=FM(),A=M(x),E=M(A),T=X(E);Fo(T);var O;P(A),P(x),ae(()=>{Lt(x,1,zr({"go-timeslot":!0,"is-unavailable":p(g),"is-sold-out":p(m),"is-disabled":p(v),"is-selected":p(_)})),ne(E,`${f.timeFormatted??""} `),T.disabled=p(v),ke(T,"aria-disabled",p(v)),O!==(O=f.startAt)&&(T.value=(T.__value=f.startAt)??"")}),Nt("change",T,s),g_(r,[],T,()=>(f.startAt,n.tsd.selectedTimeslot),$=>n.tsd.selectedTimeslot=$),S(h,x)}),P(u),S(d,u)};return ce(l,d=>{n.tsd?.isTimeslotsVisible&&d(c)}),S(e,a),te(o)}Rr(["change"]),customElements.define("go-timeslots",re(RM,{},[],["details"]));var LM=class{#e=Q();get details(){return p(this.#e)}set details(e){I(this.#e,e,!0)}#t=Q($e(Xn(Ut())));get startAt(){return p(this.#t)}set startAt(e){I(this.#t,e,!0)}#r=Q(void 0);get selected(){return p(this.#r)}set selected(e){I(this.#r,e,!0)}get endpoint(){return(this.details?.filters?.map(e=>pi(e).calendarEndpoint).filter(Boolean)??[])[0]??null}get dates(){if(this.details)switch(this.endpoint){case"tickets":return this.ticketsDates();case"events":return this.eventsDates();default:return}}isDateDisabled(e){return this.dates?e.compare(Xn(Ut()))<0||this.dates[e.toString()]=="unavailable":e.compare(Xn(Ut()))<0}isDateUnavailable(e){return this.dates?.[e.toString()]=="fully_booked"}get apiFilters(){return this.details?.filters?.map(e=>pi(e).apiToken).filter(Boolean)}params(e){return this.details?{by_bookable:!0,"by_ticket_types[]":this.apiFilters,"by_ticket_ids[]":this.details.ticketIds,"by_ticket_group_ids[]":this.details.ticketGroupIds,"by_museum_ids[]":this.details.museumIds,"by_exhibition_ids[]":this.details.exhibitionIds,"by_event_ids[]":this.details.eventIds,depth:"availability_status",start_at:e.toString(),end_at:e.add({months:1}).toString()}:{}}fetchPeriod(){const e=this.startAt.set({day:1});return[e.subtract({months:1}),e,e.add({months:1}),e.add({months:2})]}eventsDates(){const e=C.calendar.bind(C);return this.fetchPeriod().reduce((t,r)=>Gt(t,e(this.params(r))),{})}ticketsDates(){const e=C.ticketsCalendar.bind(C);return this.fetchPeriod().reduce((t,r)=>Gt(t,e(this.params(r))),{})}},zM=W("<!> <!> <!>",1),UM=W("<div> </div>"),Ag=W("<!> <!>",1),VM=W('<div data-calendar-wrapper=""><!></div>');function Og(e,t){ee(t,!0);let r=b(t,"calendarClass",7),n=Q(void 0);const i=r();me(()=>{p(n)?.dispatchEvent(new CustomEvent("go-date-select",{detail:{selected:r().selected},bubbles:!0}))});var s={details:i,get calendarClass(){return r()},set calendarClass(l){r(l),y()}},o=VM(),a=M(o);{const l=(c,d)=>{let u=()=>d?.().months,h=()=>d?.().weekdays;var f=Ag(),g=z(f);De(g,()=>tc,(v,_)=>{_(v,{children:(x,A)=>{var E=zM(),T=z(E);De(T,()=>ic,(L,H)=>{H(L,{class:"go-calendar-prev-button",children:(N,se)=>{Et();var V=Rt("Prev");S(N,V)},$$slots:{default:!0}})});var O=X(T,2);De(O,()=>rc,(L,H)=>{H(L,{class:"go-calendar-heading"})});var $=X(O,2);De($,()=>nc,(L,H)=>{H(L,{class:"go-calendar-next-button",children:(N,se)=>{Et();var V=Rt("Next");S(N,V)},$$slots:{default:!0}})}),S(x,E)},$$slots:{default:!0}})});var m=X(g,2);Ue(m,17,u,Lr,(v,_)=>{var x=K(),A=z(x);De(A,()=>Yu,(E,T)=>{T(E,{class:"go-calendar-grid",children:(O,$)=>{var L=Ag(),H=z(L);De(H,()=>Qu,(se,V)=>{V(se,{class:"go-calendar-grid-head",children:(oe,pe)=>{var Y=K(),ie=z(Y);De(ie,()=>eo,(B,j)=>{j(B,{class:"go-calendar-grid-row",children:(G,J)=>{var le=K(),he=z(le);Ue(he,17,h,Lr,(F,ue,U,ge)=>{var de=K(),w=z(de);De(w,()=>ec,(Be,Pe)=>{Pe(Be,{children:(Ye,kt)=>{var Ge=UM(),Xt=M(Ge,!0);P(Ge),ae(ct=>ne(Xt,ct),[()=>p(ue).slice(0,2)]),S(Ye,Ge)},$$slots:{default:!0}})}),S(F,de)}),S(G,le)},$$slots:{default:!0}})}),S(oe,Y)},$$slots:{default:!0}})});var N=X(H,2);De(N,()=>Ju,(se,V)=>{V(se,{class:"go-calendar-grid-body",children:(oe,pe)=>{var Y=K(),ie=z(Y);Ue(ie,17,()=>p(_).weeks,Lr,(B,j,G,J)=>{var le=K(),he=z(le);De(he,()=>eo,(F,ue)=>{ue(F,{class:"go-calendar-grid-row",children:(U,ge)=>{var de=K(),w=z(de);Ue(w,17,()=>p(j),Lr,(Be,Pe,Ye,kt)=>{var Ge=K(),Xt=z(Ge);De(Xt,()=>Xu,(ct,Qt)=>{Qt(ct,{get date(){return p(Pe)},get month(){return p(_).value},class:"go-calendar-cell",children:(St,It)=>{var er=K(),qt=z(er);{let hr=D(()=>({"go-calendar-day":!0,"is-unavailable":r().isDateUnavailable(p(Pe)),"is-disabled":r().isDateDisabled(p(Pe)),"is-selected":r().selected?.compare(p(Pe))===0}));De(qt,()=>Ku,(Or,Cr)=>{Cr(Or,{get class(){return p(hr)},children:(mn,Dr)=>{Et();var pr=Rt();ae(()=>ne(pr,p(Pe).day)),S(mn,pr)},$$slots:{default:!0}})})}S(St,er)},$$slots:{default:!0}})}),S(Be,Ge)}),S(U,de)},$$slots:{default:!0}})}),S(B,le)}),S(oe,Y)},$$slots:{default:!0}})}),S(O,L)},$$slots:{default:!0}})}),S(v,x)}),S(c,f)};De(a,()=>Wm,(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),Ef(o,l=>I(n,l),()=>p(n)),S(e,o),te(s)}re(Og,{calendarClass:{}},[],["details"],{mode:"open"});function BM(e,t){ee(t,!0);const r=new LM,n=r,i=pn(t.$$host),s=D(()=>i.value);me(()=>{r.details=p(s)}),t.$$host.addEventListener("go-date-select",d=>{p(s)&&(p(s).selectedDate=d.detail.selected,p(s).selectedTimeslot=void 0)});var o={details:n},a=K(),l=z(a),c=d=>{Og(d,{get calendarClass(){return r}})};return ce(l,d=>{p(s)?.isCalendarVisible&&d(c)}),S(e,a),te(o)}customElements.define("go-calendar",re(BM,{},[],["details"]));var qM=class{#e;get ticketSelectionDetails(){return p(this.#e)}set ticketSelectionDetails(e){I(this.#e,e)}constructor(e){e&&(this.#e=D(()=>e.value))}addToCart(){if(!C.cart){console.error("cart not found");return}if(!this.ticketSelectionDetails){console.error("ticket selection details not found");return}const e=this.ticketSelectionDetails.preCarts,t=e.flatMap(r=>r.nonEmptyItems.map(n=>{const i=n.product.ticket_type!="annual"?n.time:void 0;return yt(n.product,{quantity:n.quantity,time:i})}));C.cart.addItems(t),e.forEach(r=>r.items.forEach(n=>n.quantity=0)),Xe.config.urls.cart&&Xe.config.navigateTo(Xe.config.urls.cart())}anyTicketsSelected(){return this.ticketSelectionDetails?this.ticketSelectionDetails.preCarts.some(e=>e.items.some(t=>t.quantity>0)):!1}},jM=W('<button data-add-to-cart-button="" data-testid="go-add-to-cart-button__button"> </button>');function ZM(e,t){ee(t,!0);const r=new qM(pn(t.$$host));var n={details:r},i=jM(),s=M(i,!0);return P(i),ae((o,a,l)=>{i.disabled=o,ke(i,"data-x",a),ne(s,l)},[()=>!r.anyTicketsSelected(),()=>!r.anyTicketsSelected(),()=>C.t("common.actions.cart")]),Nt("click",i,()=>r.addToCart()),S(e,i),te(n)}Rr(["click"]),customElements.define("go-add-to-cart-button",re(ZM,{},[],["details"]));function WM(e,t){ee(t,!0);let r=b(t,"custom",7,!1);cr.defineForm({id:"withdrawal",submitLabel:"withdrawal.actions.submit",fields:[{key:"withdrawalFirstName",required:!0},{key:"withdrawalLastName",required:!0},{key:"email",required:!0},{key:"orderNumber",required:!0},{key:"withdrawalNote",required:!1}]});async function n(i){const s=i.target.details,o=await C.withdrawal(s.formData);o.response?.ok?t.$$host.dispatchEvent(new Event("go-success",{bubbles:!0,composed:!0})):s.apiErrors=o.error?.errors??[C.t("withdrawal.form.errors.requestFailed")]}return Pn(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),y()}})}customElements.define("go-withdrawal-form",re(WM,{custom:{attribute:"custom",reflect:!0,type:"Boolean"}},[],[]));async function HM(e){const t=e.go;let r=t&&t._queue||[];console.log(r);for(const n of r)try{await Cg[n.method](n.options)}catch(i){console.error(i)}e.go=Cg,t&&(t._queue=null)}var Cg={loaded:!0,config:e=>{Xe.define(e)},init:async e=>{await C.load("https://"+e.api,e.shop,e.locale)}};(async()=>await HM(window))()})();