UNPKG

@revenuecat/purchases-js

Version:

Web subscriptions made easy. Powered by RevenueCat

2 lines 710 kB
(function(he,Ce){typeof exports=="object"&&typeof module<"u"?Ce(exports):typeof define=="function"&&define.amd?define(["exports"],Ce):(he=typeof globalThis<"u"?globalThis:he||self,Ce(he.Purchases={}))})(this,function(he){"use strict";var Ux=Object.create;var cc=Object.defineProperty;var Vx=Object.getOwnPropertyDescriptor;var N_=(he,Ce)=>(Ce=Symbol[he])?Ce:Symbol.for("Symbol."+he),$a=he=>{throw TypeError(he)};var j_=(he,Ce,Ye)=>Ce in he?cc(he,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):he[Ce]=Ye;var L_=(he,Ce)=>cc(he,"name",{value:Ce,configurable:!0});var B_=he=>[,,,Ux((he==null?void 0:he[N_("metadata")])??null)],R_=["class","method","getter","setter","accessor","field","value","get","set"],Yo=he=>he!==void 0&&typeof he!="function"?$a("Function expected"):he,Hx=(he,Ce,Ye,ct,mr)=>({kind:R_[he],name:Ce,metadata:ct,addInitializer:Nr=>Ye._?$a("Already initialized"):mr.push(Yo(Nr||null))}),uc=(he,Ce)=>j_(Ce,N_("metadata"),he[3]),U_=(he,Ce,Ye,ct)=>{for(var mr=0,Nr=he[Ce>>1],Ot=Nr&&Nr.length;mr<Ot;mr++)Ce&1?Nr[mr].call(Ye):ct=Nr[mr].call(Ye,ct);return ct},dc=(he,Ce,Ye,ct,mr,Nr)=>{var Ot,rt,Go,Yn,eo,tr=Ce&7,ro=!!(Ce&8),mt=!!(Ce&16),to=tr>3?he.length+1:tr?ro?1:2:0,no=R_[tr+5],Ko=tr>3&&(he[to-1]=[]),Er=he[to]||(he[to]=[]),ut=tr&&(!mt&&!ro&&(mr=mr.prototype),tr<5&&(tr>3||!mt)&&Vx(tr<4?mr:{get[Ye](){return W(this,Nr)},set[Ye](Xr){return Be(this,Nr,Xr)}},Ye));tr?mt&&tr<4&&L_(Nr,(tr>2?"set ":tr>1?"get ":"")+Ye):L_(mr,Ye);for(var ao=ct.length-1;ao>=0;ao--)Yn=Hx(tr,Ye,Go={},he[3],Er),tr&&(Yn.static=ro,Yn.private=mt,eo=Yn.access={has:mt?Xr=>Wx(mr,Xr):Xr=>Ye in Xr},tr^3&&(eo.get=mt?Xr=>(tr^1?W:Mr)(Xr,mr,tr^4?Nr:ut.get):Xr=>Xr[Ye]),tr>2&&(eo.set=mt?(Xr,Gn)=>Be(Xr,mr,Gn,tr^4?Nr:ut.set):(Xr,Gn)=>Xr[Ye]=Gn)),rt=(0,ct[ao])(tr?tr<4?mt?Nr:ut[no]:tr>4?void 0:{get:ut.get,set:ut.set}:mr,Yn),Go._=1,tr^4||rt===void 0?Yo(rt)&&(tr>4?Ko.unshift(rt):tr?mt?Nr=rt:ut[no]=rt:mr=rt):typeof rt!="object"||rt===null?$a("Object expected"):(Yo(Ot=rt.get)&&(ut.get=Ot),Yo(Ot=rt.set)&&(ut.set=Ot),Yo(Ot=rt.init)&&Ko.unshift(Ot));return tr||uc(he,mr),ut&&cc(mr,Ye,ut),mt?tr^4?Nr:ut:mr},$=(he,Ce,Ye)=>j_(he,typeof Ce!="symbol"?Ce+"":Ce,Ye),pc=(he,Ce,Ye)=>Ce.has(he)||$a("Cannot "+Ye),Wx=(he,Ce)=>Object(Ce)!==Ce?$a('Cannot use the "in" operator on this value'):he.has(Ce),W=(he,Ce,Ye)=>(pc(he,Ce,"read from private field"),Ye?Ye.call(he):Ce.get(he)),Re=(he,Ce,Ye)=>Ce.has(he)?$a("Cannot add the same private member more than once"):Ce instanceof WeakSet?Ce.add(he):Ce.set(he,Ye),Be=(he,Ce,Ye,ct)=>(pc(he,Ce,"write to private field"),ct?ct.call(he,Ye):Ce.set(he,Ye),Ye),Mr=(he,Ce,Ye)=>(pc(he,Ce,"access private method"),Ye);var M_,Ha,Wa,da,pa,Lo,Ya,Ga,It,_c,gc,V_,H_,Tt,lc,tn,_a,nn,Ct,lt,an,bn,Rn,ga,Un,fa,Ka,Xa,Vn,es,Lr,Yx,Gx,fc,cs,us,mc,zt,on,ft,ma,No,jo,rs,Hn,Za,Bo,ts,W_,Ro,Uo,Qa,z_,O_,as;const Ce="5";typeof window<"u"&&((M_=window.__svelte??(window.__svelte={})).v??(M_.v=new Set)).add(Ce);const Ye=1,ct=2,mr=4,Nr=8,Ot=16,rt=1,Go=2,Yn=4,eo=8,tr=16,ro=1,mt=2,to=4,no=1,Ko=2,Er=Symbol(),ut="http://www.w3.org/1999/xhtml",ao="http://www.w3.org/2000/svg",Xr="@attach",Gn=!1;var Xo=Array.isArray,Y_=Array.prototype.indexOf,Zo=Array.from,hc=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,vc=Object.getOwnPropertyDescriptors,G_=Object.prototype,K_=Array.prototype,ds=Object.getPrototypeOf,yc=Object.isExtensible;function va(r){return typeof r=="function"}const Ze=()=>{};function X_(r){return r()}function Jo(r){for(var e=0;e<r.length;e++)r[e]()}function bc(){var r,e,t=new Promise((n,a)=>{r=n,e=a});return{promise:t,resolve:r,reject:e}}function Qo(r,e){if(Array.isArray(r))return r;if(e===void 0||!(Symbol.iterator in r))return Array.from(r);const t=[];for(const n of r)if(t.push(n),t.length===e)break;return t}const jr=2,$o=4,oo=8,ps=1<<24,Lt=16,ln=32,Kn=64,_s=128,ht=512,Br=1024,Zr=2048,Nt=4096,dt=8192,cn=16384,ei=32768,jt=65536,kc=1<<17,wc=1<<18,ya=1<<19,Pc=1<<20,un=1<<25,io=32768,gs=1<<21,fs=1<<22,wn=1<<23,Bt=Symbol("$state"),xc=Symbol("legacy props"),Z_=Symbol(""),ba=new class extends Error{constructor(){super(...arguments);$(this,"name","StaleReactionError");$(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ms(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function J_(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Q_(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function eg(r){throw new Error("https://svelte.dev/e/effect_orphan")}function rg(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tg(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function ng(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ag(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function og(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ig(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function sg(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function lg(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ec(r){return r===this.v}function hs(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function Sc(r){return!hs(r,this.v)}let ka=!1,cg=!1;function ug(){ka=!0}let nr=null;function wa(r){nr=r}function Ge(r){return Ic().get(r)}function hr(r,e){return Ic().set(r,e),e}function pe(r,e=!1,t){nr={p:nr,i:!1,c:null,e:null,s:r,x:null,l:ka&&!e?{s:null,u:null,$:[]}:null}}function _e(r){var e=nr,t=e.e;if(t!==null){e.e=null;for(var n of t)Jc(n)}return r!==void 0&&(e.x=r),e.i=!0,nr=e.p,r??{}}function Pa(){return!ka||nr!==null&&nr.l===null}function Ic(r){return nr===null&&ms(),nr.c??(nr.c=new Map(dg(nr)||void 0))}function dg(r){let e=r.p;for(;e!==null;){const t=e.c;if(t!==null)return t;e=e.p}return null}let Xn=[];function Tc(){var r=Xn;Xn=[],Jo(r)}function Pn(r){if(Xn.length===0&&!so){var e=Xn;queueMicrotask(()=>{e===Xn&&Tc()})}Xn.push(r)}function pg(){for(;Xn.length>0;)Tc()}function Cc(r){var e=Je;if(e===null)return We.f|=wn,r;if((e.f&ei)===0){if((e.f&_s)===0)throw r;e.b.error(r)}else xa(r,e)}function xa(r,e){for(;e!==null;){if((e.f&_s)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r}const _g=-7169;function qr(r,e){r.f=r.f&_g|e}function vs(r){(r.f&ht)!==0||r.deps===null?qr(r,Br):qr(r,Nt)}function Dc(r){if(r!==null)for(const e of r)(e.f&jr)===0||(e.f&io)===0||(e.f^=io,Dc(e.deps))}function Ac(r,e,t){(r.f&Zr)!==0?e.add(r):(r.f&Nt)!==0&&t.add(r),Dc(r.deps),qr(r,Br)}const ri=new Set;let Xe=null,ti=null,Rr=null,vt=[],ni=null,ys=!1,so=!1;const $i=class $i{constructor(){Re(this,It);$(this,"committed",!1);$(this,"current",new Map);$(this,"previous",new Map);Re(this,Ha,new Set);Re(this,Wa,new Set);Re(this,da,0);Re(this,pa,0);Re(this,Lo,null);Re(this,Ya,new Set);Re(this,Ga,new Set);$(this,"skipped_effects",new Set);$(this,"is_fork",!1)}is_deferred(){return this.is_fork||W(this,pa)>0}process(e){var a;vt=[],ti=null,this.apply();var t=[],n=[];for(const i of e)Mr(this,It,_c).call(this,i,t,n);this.is_fork||Mr(this,It,V_).call(this),this.is_deferred()?(Mr(this,It,gc).call(this,n),Mr(this,It,gc).call(this,t)):(ti=this,Xe=null,Fc(n),Fc(t),ti=null,(a=W(this,Lo))==null||a.resolve()),Rr=null}capture(e,t){t!==Er&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&wn)===0&&(this.current.set(e,e.v),Rr==null||Rr.set(e,e.v))}activate(){Xe=this,this.apply()}deactivate(){Xe===this&&(Xe=null,Rr=null)}flush(){if(this.activate(),vt.length>0){if(qc(),Xe!==null&&Xe!==this)return}else W(this,da)===0&&this.process([]);this.deactivate()}discard(){for(const e of W(this,Wa))e(this);W(this,Wa).clear()}increment(e){Be(this,da,W(this,da)+1),e&&Be(this,pa,W(this,pa)+1)}decrement(e){Be(this,da,W(this,da)-1),e&&Be(this,pa,W(this,pa)-1),this.revive()}revive(){for(const e of W(this,Ya))W(this,Ga).delete(e),qr(e,Zr),pn(e);for(const e of W(this,Ga))qr(e,Nt),pn(e);this.flush()}oncommit(e){W(this,Ha).add(e)}ondiscard(e){W(this,Wa).add(e)}settled(){return(W(this,Lo)??Be(this,Lo,bc())).promise}static ensure(){if(Xe===null){const e=Xe=new $i;ri.add(Xe),so||$i.enqueue(()=>{Xe===e&&e.flush()})}return Xe}static enqueue(e){Pn(e)}apply(){}};Ha=new WeakMap,Wa=new WeakMap,da=new WeakMap,pa=new WeakMap,Lo=new WeakMap,Ya=new WeakMap,Ga=new WeakMap,It=new WeakSet,_c=function(e,t,n){e.f^=Br;for(var a=e.first,i=null;a!==null;){var s=a.f,l=(s&(ln|Kn))!==0,c=l&&(s&Br)!==0,u=c||(s&dt)!==0||this.skipped_effects.has(a);if(!u&&a.fn!==null){l?a.f^=Br:i!==null&&(s&($o|oo|ps))!==0?i.b.defer_effect(a):(s&$o)!==0?t.push(a):Ca(a)&&((s&Lt)!==0&&W(this,Ya).add(a),Da(a));var d=a.first;if(d!==null){a=d;continue}}var p=a.parent;for(a=a.next;a===null&&p!==null;)p===i&&(i=null),a=p.next,p=p.parent}},gc=function(e){for(var t=0;t<e.length;t+=1)Ac(e[t],W(this,Ya),W(this,Ga))},V_=function(){if(W(this,pa)===0){for(const e of W(this,Ha))e();W(this,Ha).clear()}W(this,da)===0&&Mr(this,It,H_).call(this)},H_=function(){var a;if(ri.size>1){this.previous.clear();var e=Rr,t=!0;for(const i of ri){if(i===this){t=!1;continue}const s=[];for(const[c,u]of this.current){if(i.current.has(c))if(t&&u!==i.current.get(c))i.current.set(c,u);else continue;s.push(c)}if(s.length===0)continue;const l=[...i.current.keys()].filter(c=>!this.current.has(c));if(l.length>0){var n=vt;vt=[];const c=new Set,u=new Map;for(const d of s)Mc(d,l,c,u);if(vt.length>0){Xe=i,i.apply();for(const d of vt)Mr(a=i,It,_c).call(a,d,[],[]);i.deactivate()}vt=n}}Xe=null,Rr=e}this.committed=!0,ri.delete(this)};let dn=$i;function gg(r){var e=so;so=!0;try{for(var t;;){if(pg(),vt.length===0&&(Xe==null||Xe.flush(),vt.length===0))return ni=null,t;qc()}}finally{so=e}}function qc(){var r=ea;ys=!0;var e=null;try{var t=0;for(oi(!0);vt.length>0;){var n=dn.ensure();if(t++>1e3){var a,i;fg()}n.process(vt),xn.clear()}}finally{ys=!1,oi(r),ni=null}}function fg(){try{rg()}catch(r){xa(r,ni)}}let At=null;function Fc(r){var e=r.length;if(e!==0){for(var t=0;t<e;){var n=r[t++];if((n.f&(cn|dt))===0&&Ca(n)&&(At=new Set,Da(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?tu(n):n.fn=null),(At==null?void 0:At.size)>0)){xn.clear();for(const a of At){if((a.f&(cn|dt))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)At.has(s)&&(At.delete(s),i.push(s)),s=s.parent;for(let l=i.length-1;l>=0;l--){const c=i[l];(c.f&(cn|dt))===0&&Da(c)}}At.clear()}}At=null}}function Mc(r,e,t,n){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const a of r.reactions){const i=a.f;(i&jr)!==0?Mc(a,e,t,n):(i&(fs|Lt))!==0&&(i&Zr)===0&&zc(a,e,n)&&(qr(a,Zr),pn(a))}}function zc(r,e,t){const n=t.get(r);if(n!==void 0)return n;if(r.deps!==null)for(const a of r.deps){if(e.includes(a))return!0;if((a.f&jr)!==0&&zc(a,e,t))return t.set(a,!0),!0}return t.set(r,!1),!1}function pn(r){for(var e=ni=r;e.parent!==null;){e=e.parent;var t=e.f;if(ys&&e===Je&&(t&Lt)!==0&&(t&wc)===0)return;if((t&(Kn|ln))!==0){if((t&Br)===0)return;e.f^=Br}}vt.push(e)}function Oc(r){let e=0,t=Zn(0),n;return()=>{ws()&&(o(t),Ta(()=>(e===0&&(n=Ne(()=>r(()=>co(t)))),e+=1,()=>{Pn(()=>{e-=1,e===0&&(n==null||n(),n=void 0,co(t))})})))}}var mg=jt|ya|_s;function Lc(r,e,t){new hg(r,e,t)}class hg{constructor(e,t,n){Re(this,Lr);$(this,"parent");$(this,"is_pending",!1);Re(this,Tt);Re(this,lc,null);Re(this,tn);Re(this,_a);Re(this,nn);Re(this,Ct,null);Re(this,lt,null);Re(this,an,null);Re(this,bn,null);Re(this,Rn,null);Re(this,ga,0);Re(this,Un,0);Re(this,fa,!1);Re(this,Ka,new Set);Re(this,Xa,new Set);Re(this,Vn,null);Re(this,es,Oc(()=>(Be(this,Vn,Zn(W(this,ga))),()=>{Be(this,Vn,null)})));Be(this,Tt,e),Be(this,tn,t),Be(this,_a,n),this.parent=Je.b,this.is_pending=!!W(this,tn).pending,Be(this,nn,Qn(()=>{Je.b=this;{var a=Mr(this,Lr,fc).call(this);try{Be(this,Ct,tt(()=>n(a)))}catch(i){this.error(i)}W(this,Un)>0?Mr(this,Lr,us).call(this):this.is_pending=!1}return()=>{var i;(i=W(this,Rn))==null||i.remove()}},mg))}defer_effect(e){Ac(e,W(this,Ka),W(this,Xa))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!W(this,tn).pending}update_pending_count(e){Mr(this,Lr,mc).call(this,e),Be(this,ga,W(this,ga)+e),W(this,Vn)&&Ea(W(this,Vn),W(this,ga))}get_effect_pending(){return W(this,es).call(this),o(W(this,Vn))}error(e){var t=W(this,tn).onerror;let n=W(this,tn).failed;if(W(this,fa)||!t&&!n)throw e;W(this,Ct)&&(Ur(W(this,Ct)),Be(this,Ct,null)),W(this,lt)&&(Ur(W(this,lt)),Be(this,lt,null)),W(this,an)&&(Ur(W(this,an)),Be(this,an,null));var a=!1,i=!1;const s=()=>{if(a){lg();return}a=!0,i&&ig(),dn.ensure(),Be(this,ga,0),W(this,an)!==null&&$n(W(this,an),()=>{Be(this,an,null)}),this.is_pending=this.has_pending_snippet(),Be(this,Ct,Mr(this,Lr,cs).call(this,()=>(Be(this,fa,!1),tt(()=>W(this,_a).call(this,W(this,Tt)))))),W(this,Un)>0?Mr(this,Lr,us).call(this):this.is_pending=!1};var l=We;try{nt(null),i=!0,t==null||t(e,s),i=!1}catch(c){xa(c,W(this,nn)&&W(this,nn).parent)}finally{nt(l)}n&&Pn(()=>{Be(this,an,Mr(this,Lr,cs).call(this,()=>{dn.ensure(),Be(this,fa,!0);try{return tt(()=>{n(W(this,Tt),()=>e,()=>s)})}catch(c){return xa(c,W(this,nn).parent),null}finally{Be(this,fa,!1)}}))})}}Tt=new WeakMap,lc=new WeakMap,tn=new WeakMap,_a=new WeakMap,nn=new WeakMap,Ct=new WeakMap,lt=new WeakMap,an=new WeakMap,bn=new WeakMap,Rn=new WeakMap,ga=new WeakMap,Un=new WeakMap,fa=new WeakMap,Ka=new WeakMap,Xa=new WeakMap,Vn=new WeakMap,es=new WeakMap,Lr=new WeakSet,Yx=function(){try{Be(this,Ct,tt(()=>W(this,_a).call(this,W(this,Tt))))}catch(e){this.error(e)}},Gx=function(){const e=W(this,tn).pending;e&&(Be(this,lt,tt(()=>e(W(this,Tt)))),dn.enqueue(()=>{var t=Mr(this,Lr,fc).call(this);Be(this,Ct,Mr(this,Lr,cs).call(this,()=>(dn.ensure(),tt(()=>W(this,_a).call(this,t))))),W(this,Un)>0?Mr(this,Lr,us).call(this):($n(W(this,lt),()=>{Be(this,lt,null)}),this.is_pending=!1)}))},fc=function(){var e=W(this,Tt);return this.is_pending&&(Be(this,Rn,Ut()),W(this,Tt).before(W(this,Rn)),e=W(this,Rn)),e},cs=function(e){var t=Je,n=We,a=nr;Vt(W(this,nn)),nt(W(this,nn)),wa(W(this,nn).ctx);try{return e()}catch(i){return Cc(i),null}finally{Vt(t),nt(n),wa(a)}},us=function(){const e=W(this,tn).pending;W(this,Ct)!==null&&(Be(this,bn,document.createDocumentFragment()),W(this,bn).append(W(this,Rn)),ou(W(this,Ct),W(this,bn))),W(this,lt)===null&&Be(this,lt,tt(()=>e(W(this,Tt))))},mc=function(e){var t;if(!this.has_pending_snippet()){this.parent&&Mr(t=this.parent,Lr,mc).call(t,e);return}if(Be(this,Un,W(this,Un)+e),W(this,Un)===0){this.is_pending=!1;for(const n of W(this,Ka))qr(n,Zr),pn(n);for(const n of W(this,Xa))qr(n,Nt),pn(n);W(this,Ka).clear(),W(this,Xa).clear(),W(this,lt)&&$n(W(this,lt),()=>{Be(this,lt,null)}),W(this,bn)&&(W(this,Tt).before(W(this,bn)),Be(this,bn,null))}};function Nc(r,e,t,n){const a=Pa()?lo:Rt;if(t.length===0&&r.length===0){n(e.map(a));return}var i=Xe,s=Je,l=vg();function c(){Promise.all(t.map(u=>yg(u))).then(u=>{l();try{n([...e.map(a),...u])}catch(d){(s.f&cn)===0&&xa(d,s)}i==null||i.deactivate(),ai()}).catch(u=>{xa(u,s)})}r.length>0?Promise.all(r).then(()=>{l();try{return c()}finally{i==null||i.deactivate(),ai()}}):c()}function vg(){var r=Je,e=We,t=nr,n=Xe;return function(i=!0){Vt(r),nt(e),wa(t),i&&(n==null||n.activate())}}function ai(){Vt(null),nt(null),wa(null)}function lo(r){var e=jr|Zr,t=We!==null&&(We.f&jr)!==0?We:null;return Je!==null&&(Je.f|=ya),{ctx:nr,deps:null,effects:null,equals:Ec,f:e,fn:r,reactions:null,rv:0,v:Er,wv:0,parent:t??Je,ac:null}}function yg(r,e,t){let n=Je;n===null&&J_();var a=n.b,i=void 0,s=Zn(Er),l=!We,c=new Map;return Ag(()=>{var _;var u=bc();i=u.promise;try{Promise.resolve(r()).then(u.resolve,u.reject).then(()=>{d===Xe&&d.committed&&d.deactivate(),ai()})}catch(f){u.reject(f),ai()}var d=Xe;if(l){var p=a.is_rendered();a.update_pending_count(1),d.increment(p),(_=c.get(d))==null||_.reject(ba),c.delete(d),c.set(d,u)}const g=(f,v=void 0)=>{if(d.activate(),v)v!==ba&&(s.f|=wn,Ea(s,v));else{(s.f&wn)!==0&&(s.f^=wn),Ea(s,f);for(const[y,h]of c){if(c.delete(y),y===d)break;h.reject(ba)}}l&&(a.update_pending_count(-1),d.decrement(p))};u.promise.then(g,f=>g(null,f||"unknown"))}),Ia(()=>{for(const u of c.values())u.reject(ba)}),new Promise(u=>{function d(p){function g(){p===i?u(s):d(i)}p.then(g,g)}d(i)})}function m(r){const e=lo(r);return su(e),e}function Rt(r){const e=lo(r);return e.equals=Sc,e}function jc(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)Ur(e[t])}}function bg(r){for(var e=r.parent;e!==null;){if((e.f&jr)===0)return(e.f&cn)===0?e:null;e=e.parent}return null}function bs(r){var e,t=Je;Vt(bg(r));try{r.f&=~io,jc(r),e=pu(r)}finally{Vt(t)}return e}function Bc(r){var e=bs(r);if(!r.equals(e)&&(r.wv=uu(),(!(Xe!=null&&Xe.is_fork)||r.deps===null)&&(r.v=e,r.deps===null))){qr(r,Br);return}En||(Rr!==null?(ws()||Xe!=null&&Xe.is_fork)&&Rr.set(r,e):vs(r))}let ks=new Set;const xn=new Map;let Rc=!1;function Zn(r,e){var t={f:0,v:r,reactions:null,equals:Ec,rv:0,wv:0};return t}function re(r,e){const t=Zn(r);return su(t),t}function ar(r,e=!1,t=!0){var a;const n=Zn(r);return e||(n.equals=Sc),ka&&t&&nr!==null&&nr.l!==null&&((a=nr.l).s??(a.s=[])).push(n),n}function L(r,e,t=!1){We!==null&&(!Ft||(We.f&kc)!==0)&&Pa()&&(We.f&(jr|Lt|fs|kc))!==0&&!(Jr!=null&&Jr.includes(r))&&og();let n=t?er(e):e;return Ea(r,n)}function Ea(r,e){if(!r.equals(e)){var t=r.v;En?xn.set(r,e):xn.set(r,t),r.v=e;var n=dn.ensure();if(n.capture(r,t),(r.f&jr)!==0){const a=r;(r.f&Zr)!==0&&bs(a),vs(a)}r.wv=uu(),Uc(r,Zr),Pa()&&Je!==null&&(Je.f&Br)!==0&&(Je.f&(ln|Kn))===0&&(yt===null?Fg([r]):yt.push(r)),!n.is_fork&&ks.size>0&&!Rc&&kg()}return e}function kg(){Rc=!1;var r=ea;oi(!0);const e=Array.from(ks);try{for(const t of e)(t.f&Br)!==0&&qr(t,Nt),Ca(t)&&Da(t)}finally{oi(r)}ks.clear()}function co(r){L(r,r.v+1)}function Uc(r,e){var t=r.reactions;if(t!==null)for(var n=Pa(),a=t.length,i=0;i<a;i++){var s=t[i],l=s.f;if(!(!n&&s===Je)){var c=(l&Zr)===0;if(c&&qr(s,e),(l&jr)!==0){var u=s;Rr==null||Rr.delete(u),(l&io)===0&&(l&ht&&(s.f|=io),Uc(u,Nt))}else c&&((l&Lt)!==0&&At!==null&&At.add(s),pn(s))}}}function er(r){if(typeof r!="object"||r===null||Bt in r)return r;const e=ds(r);if(e!==G_&&e!==K_)return r;var t=new Map,n=Xo(r),a=re(0),i=ra,s=l=>{if(ra===i)return l();var c=We,u=ra;nt(null),cu(i);var d=l();return nt(c),cu(u),d};return n&&t.set("length",re(r.length)),new Proxy(r,{defineProperty(l,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ng();var d=t.get(c);return d===void 0?d=s(()=>{var p=re(u.value);return t.set(c,p),p}):L(d,u.value,!0),!0},deleteProperty(l,c){var u=t.get(c);if(u===void 0){if(c in l){const d=s(()=>re(Er));t.set(c,d),co(a)}}else L(u,Er),co(a);return!0},get(l,c,u){var _;if(c===Bt)return r;var d=t.get(c),p=c in l;if(d===void 0&&(!p||(_=kn(l,c))!=null&&_.writable)&&(d=s(()=>{var f=er(p?l[c]:Er),v=re(f);return v}),t.set(c,d)),d!==void 0){var g=o(d);return g===Er?void 0:g}return Reflect.get(l,c,u)},getOwnPropertyDescriptor(l,c){var u=Reflect.getOwnPropertyDescriptor(l,c);if(u&&"value"in u){var d=t.get(c);d&&(u.value=o(d))}else if(u===void 0){var p=t.get(c),g=p==null?void 0:p.v;if(p!==void 0&&g!==Er)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return u},has(l,c){var g;if(c===Bt)return!0;var u=t.get(c),d=u!==void 0&&u.v!==Er||Reflect.has(l,c);if(u!==void 0||Je!==null&&(!d||(g=kn(l,c))!=null&&g.writable)){u===void 0&&(u=s(()=>{var _=d?er(l[c]):Er,f=re(_);return f}),t.set(c,u));var p=o(u);if(p===Er)return!1}return d},set(l,c,u,d){var k;var p=t.get(c),g=c in l;if(n&&c==="length")for(var _=u;_<p.v;_+=1){var f=t.get(_+"");f!==void 0?L(f,Er):_ in l&&(f=s(()=>re(Er)),t.set(_+"",f))}if(p===void 0)(!g||(k=kn(l,c))!=null&&k.writable)&&(p=s(()=>re(void 0)),L(p,er(u)),t.set(c,p));else{g=p.v!==Er;var v=s(()=>er(u));L(p,v)}var y=Reflect.getOwnPropertyDescriptor(l,c);if(y!=null&&y.set&&y.set.call(d,u),!g){if(n&&typeof c=="string"){var h=t.get("length"),w=Number(c);Number.isInteger(w)&&w>=h.v&&L(h,w+1)}co(a)}return!0},ownKeys(l){o(a);var c=Reflect.ownKeys(l).filter(p=>{var g=t.get(p);return g===void 0||g.v!==Er});for(var[u,d]of t)d.v!==Er&&!(u in l)&&c.push(u);return c},setPrototypeOf(){ag()}})}function Vc(r){try{if(r!==null&&typeof r=="object"&&Bt in r)return r[Bt]}catch{}return r}function wg(r,e){return Object.is(Vc(r),Vc(e))}var Hc,Wc,Yc,Gc;function Pg(){if(Hc===void 0){Hc=window,Wc=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Yc=kn(e,"firstChild").get,Gc=kn(e,"nextSibling").get,yc(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),yc(t)&&(t.__t=void 0)}}function Ut(r=""){return document.createTextNode(r)}function pt(r){return Yc.call(r)}function uo(r){return Gc.call(r)}function z(r,e){return pt(r)}function ae(r,e=!1){{var t=pt(r);return t instanceof Comment&&t.data===""?uo(t):t}}function Y(r,e=1,t=!1){let n=r;for(;e--;)n=uo(n);return n}function xg(r){r.textContent=""}function Kc(){return!1}function Eg(r,e){if(e){const t=document.body;r.autofocus=!0,Pn(()=>{document.activeElement===t&&r.focus()})}}let Xc=!1;function Sg(){Xc||(Xc=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{var e;if(!r.defaultPrevented)for(const t of r.target.elements)(e=t.__on_r)==null||e.call(t)})},{capture:!0}))}function Sa(r){var e=We,t=Je;nt(null),Vt(null);try{return r()}finally{nt(e),Vt(t)}}function Ig(r,e,t,n=t){r.addEventListener(e,()=>Sa(t));const a=r.__on_r;a?r.__on_r=()=>{a(),n(!0)}:r.__on_r=()=>n(!0),Sg()}function Zc(r){Je===null&&(We===null&&eg(),$_()),En&&Q_()}function Tg(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function qt(r,e,t){var n=Je;n!==null&&(n.f&dt)!==0&&(r|=dt);var a={ctx:nr,deps:null,nodes:null,f:r|Zr|ht,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(t)try{Da(a),a.f|=ei}catch(l){throw Ur(a),l}else e!==null&&pn(a);var i=a;if(t&&i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ya)===0&&(i=i.first,(r&Lt)!==0&&(r&jt)!==0&&i!==null&&(i.f|=jt)),i!==null&&(i.parent=n,n!==null&&Tg(i,n),We!==null&&(We.f&jr)!==0&&(r&Kn)===0)){var s=We;(s.effects??(s.effects=[])).push(i)}return a}function ws(){return We!==null&&!Ft}function Ia(r){const e=qt(oo,null,!1);return qr(e,Br),e.teardown=r,e}function fr(r){Zc();var e=Je.f,t=!We&&(e&ln)!==0&&(e&ei)===0;if(t){var n=nr;(n.e??(n.e=[])).push(r)}else return Jc(r)}function Jc(r){return qt($o|Pc,r,!1)}function Cg(r){return Zc(),qt(oo|Pc,r,!0)}function Dg(r){dn.ensure();const e=qt(Kn|ya,r,!0);return(t={})=>new Promise(n=>{t.outro?$n(e,()=>{Ur(e),n(void 0)}):(Ur(e),n(void 0))})}function Jn(r){return qt($o,r,!1)}function pr(r,e){var t=nr,n={effect:null,ran:!1,deps:r};t.l.$.push(n),n.effect=Ta(()=>{r(),!n.ran&&(n.ran=!0,Ne(e))})}function Ps(){var r=nr;Ta(()=>{for(var e of r.l.$){e.deps();var t=e.effect;(t.f&Br)!==0&&t.deps!==null&&qr(t,Nt),Ca(t)&&Da(t),e.ran=!1}})}function Ag(r){return qt(fs|ya,r,!0)}function Ta(r,e=0){return qt(oo|e,r,!0)}function K(r,e=[],t=[],n=[]){Nc(n,e,t,a=>{qt(oo,()=>r(...a.map(o)),!0)})}function Qn(r,e=0){var t=qt(Lt|e,r,!0);return t}function Qc(r,e=0){var t=qt(ps|e,r,!0);return t}function tt(r){return qt(ln|ya,r,!0)}function $c(r){var e=r.teardown;if(e!==null){const t=En,n=We;iu(!0),nt(null);try{e.call(null)}finally{iu(t),nt(n)}}}function eu(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const a=t.ac;a!==null&&Sa(()=>{a.abort(ba)});var n=t.next;(t.f&Kn)!==0?t.parent=null:Ur(t,e),t=n}}function qg(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ln)===0&&Ur(e),e=t}}function Ur(r,e=!0){var t=!1;(e||(r.f&wc)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(ru(r.nodes.start,r.nodes.end),t=!0),eu(r,e&&!t),ii(r,0),qr(r,cn);var n=r.nodes&&r.nodes.t;if(n!==null)for(const i of n)i.stop();$c(r);var a=r.parent;a!==null&&a.first!==null&&tu(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=null}function ru(r,e){for(;r!==null;){var t=r===e?null:uo(r);r.remove(),r=t}}function tu(r){var e=r.parent,t=r.prev,n=r.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===r&&(e.first=n),e.last===r&&(e.last=t))}function $n(r,e,t=!0){var n=[];nu(r,n,!0);var a=()=>{t&&Ur(r),e&&e()},i=n.length;if(i>0){var s=()=>--i||a();for(var l of n)l.out(s)}else a()}function nu(r,e,t){if((r.f&dt)===0){r.f^=dt;var n=r.nodes&&r.nodes.t;if(n!==null)for(const l of n)(l.is_global||t)&&e.push(l);for(var a=r.first;a!==null;){var i=a.next,s=(a.f&jt)!==0||(a.f&ln)!==0&&(r.f&Lt)!==0;nu(a,e,s?t:!1),a=i}}}function xs(r){au(r,!0)}function au(r,e){if((r.f&dt)!==0){r.f^=dt,(r.f&Br)===0&&(qr(r,Zr),pn(r));for(var t=r.first;t!==null;){var n=t.next,a=(t.f&jt)!==0||(t.f&ln)!==0;au(t,a?e:!1),t=n}var i=r.nodes&&r.nodes.t;if(i!==null)for(const s of i)(s.is_global||e)&&s.in()}}function ou(r,e){if(r.nodes)for(var t=r.nodes.start,n=r.nodes.end;t!==null;){var a=t===n?null:uo(t);e.append(t),t=a}}let ea=!1;function oi(r){ea=r}let En=!1;function iu(r){En=r}let We=null,Ft=!1;function nt(r){We=r}let Je=null;function Vt(r){Je=r}let Jr=null;function su(r){We!==null&&(Jr===null?Jr=[r]:Jr.push(r))}let Qr=null,_t=0,yt=null;function Fg(r){yt=r}let lu=1,po=0,ra=po;function cu(r){ra=r}function uu(){return++lu}function Ca(r){var e=r.f;if((e&Zr)!==0)return!0;if(e&jr&&(r.f&=-32769),(e&Nt)!==0){for(var t=r.deps,n=t.length,a=0;a<n;a++){var i=t[a];if(Ca(i)&&Bc(i),i.wv>r.wv)return!0}(e&ht)!==0&&Rr===null&&qr(r,Br)}return!1}function du(r,e,t=!0){var n=r.reactions;if(n!==null&&!(Jr!=null&&Jr.includes(r)))for(var a=0;a<n.length;a++){var i=n[a];(i.f&jr)!==0?du(i,e,!1):e===i&&(t?qr(i,Zr):(i.f&Br)!==0&&qr(i,Nt),pn(i))}}function pu(r){var f;var e=Qr,t=_t,n=yt,a=We,i=Jr,s=nr,l=Ft,c=ra,u=r.f;Qr=null,_t=0,yt=null,We=(u&(ln|Kn))===0?r:null,Jr=null,wa(r.ctx),Ft=!1,ra=++po,r.ac!==null&&(Sa(()=>{r.ac.abort(ba)}),r.ac=null);try{r.f|=gs;var d=r.fn,p=d(),g=r.deps;if(Qr!==null){var _;if(ii(r,_t),g!==null&&_t>0)for(g.length=_t+Qr.length,_=0;_<Qr.length;_++)g[_t+_]=Qr[_];else r.deps=g=Qr;if(ws()&&(r.f&ht)!==0)for(_=_t;_<g.length;_++)((f=g[_]).reactions??(f.reactions=[])).push(r)}else g!==null&&_t<g.length&&(ii(r,_t),g.length=_t);if(Pa()&&yt!==null&&!Ft&&g!==null&&(r.f&(jr|Nt|Zr))===0)for(_=0;_<yt.length;_++)du(yt[_],r);return a!==null&&a!==r&&(po++,yt!==null&&(n===null?n=yt:n.push(...yt))),(r.f&wn)!==0&&(r.f^=wn),p}catch(v){return Cc(v)}finally{r.f^=gs,Qr=e,_t=t,yt=n,We=a,Jr=i,wa(s),Ft=l,ra=c}}function Mg(r,e){let t=e.reactions;if(t!==null){var n=Y_.call(t,r);if(n!==-1){var a=t.length-1;a===0?t=e.reactions=null:(t[n]=t[a],t.pop())}}if(t===null&&(e.f&jr)!==0&&(Qr===null||!Qr.includes(e))){var i=e;(i.f&ht)!==0&&(i.f^=ht,i.f&=-32769),vs(i),jc(i),ii(i,0)}}function ii(r,e){var t=r.deps;if(t!==null)for(var n=e;n<t.length;n++)Mg(r,t[n])}function Da(r){var e=r.f;if((e&cn)===0){qr(r,Br);var t=Je,n=ea;Je=r,ea=!0;try{(e&(Lt|ps))!==0?qg(r):eu(r),$c(r);var a=pu(r);r.teardown=typeof a=="function"?a:null,r.wv=lu;var i;Gn&&cg&&(r.f&Zr)!==0&&r.deps}finally{ea=n,Je=t}}}async function zg(){await Promise.resolve(),gg()}function o(r){var e=r.f,t=(e&jr)!==0;if(We!==null&&!Ft){var n=Je!==null&&(Je.f&cn)!==0;if(!n&&!(Jr!=null&&Jr.includes(r))){var a=We.deps;if((We.f&gs)!==0)r.rv<po&&(r.rv=po,Qr===null&&a!==null&&a[_t]===r?_t++:Qr===null?Qr=[r]:Qr.includes(r)||Qr.push(r));else{(We.deps??(We.deps=[])).push(r);var i=r.reactions;i===null?r.reactions=[We]:i.includes(We)||i.push(We)}}}if(En&&xn.has(r))return xn.get(r);if(t){var s=r;if(En){var l=s.v;return((s.f&Br)===0&&s.reactions!==null||gu(s))&&(l=bs(s)),xn.set(s,l),l}var c=(s.f&ht)===0&&!Ft&&We!==null&&(ea||(We.f&ht)!==0),u=s.deps===null;Ca(s)&&(c&&(s.f|=ht),Bc(s)),c&&!u&&_u(s)}if(Rr!=null&&Rr.has(r))return Rr.get(r);if((r.f&wn)!==0)throw r.v;return r.v}function _u(r){if(r.deps!==null){r.f|=ht;for(const e of r.deps)(e.reactions??(e.reactions=[])).push(r),(e.f&jr)!==0&&(e.f&ht)===0&&_u(e)}}function gu(r){if(r.v===Er)return!0;if(r.deps===null)return!1;for(const e of r.deps)if(xn.has(e)||(e.f&jr)!==0&&gu(e))return!0;return!1}function Ne(r){var e=Ft;try{return Ft=!0,r()}finally{Ft=e}}function Og(r,e){var t={};for(var n in r)e.includes(n)||(t[n]=r[n]);for(var a of Object.getOwnPropertySymbols(r))Object.propertyIsEnumerable.call(r,a)&&!e.includes(a)&&(t[a]=r[a]);return t}function Ve(r){if(!(typeof r!="object"||!r||r instanceof EventTarget)){if(Bt in r)Es(r);else if(!Array.isArray(r))for(let e in r){const t=r[e];typeof t=="object"&&t&&Bt in t&&Es(t)}}}function Es(r,e=new Set){if(typeof r=="object"&&r!==null&&!(r instanceof EventTarget)&&!e.has(r)){e.add(r),r instanceof Date&&r.getTime();for(let n in r)try{Es(r[n],e)}catch{}const t=ds(r);if(t!==Object.prototype&&t!==Array.prototype&&t!==Map.prototype&&t!==Set.prototype&&t!==Date.prototype){const n=vc(t);for(let a in n){const i=n[a].get;if(i)try{i.call(r)}catch{}}}}}const fu=new Set,Ss=new Set;function Is(r,e,t,n={}){function a(i){if(n.capture||_o.call(e,i),!i.cancelBubble)return Sa(()=>t==null?void 0:t.call(this,i))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?Pn(()=>{e.addEventListener(r,a,n)}):e.addEventListener(r,a,n),a}function Lg(r,e,t,n={}){var a=Is(e,r,t,n);return()=>{r.removeEventListener(e,a,n)}}function zr(r,e,t,n,a){var i={capture:n,passive:a},s=Is(r,e,t,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ia(()=>{e.removeEventListener(r,s,i)})}function Sn(r){for(var e=0;e<r.length;e++)fu.add(r[e]);for(var t of Ss)t(r)}let mu=null;function _o(r){var y;var e=this,t=e.ownerDocument,n=r.type,a=((y=r.composedPath)==null?void 0:y.call(r))||[],i=a[0]||r.target;mu=r;var s=0,l=mu===r&&r.__root;if(l){var c=a.indexOf(l);if(c!==-1&&(e===document||e===window)){r.__root=e;return}var u=a.indexOf(e);if(u===-1)return;c<=u&&(s=c)}if(i=a[s]||r.target,i!==e){hc(r,"currentTarget",{configurable:!0,get(){return i||t}});var d=We,p=Je;nt(null),Vt(null);try{for(var g,_=[];i!==null;){var f=i.assignedSlot||i.parentNode||i.host||null;try{var v=i["__"+n];v!=null&&(!i.disabled||r.target===i)&&v.call(i,r)}catch(h){g?_.push(h):g=h}if(r.cancelBubble||f===e||f===null)break;i=f}if(g){for(let h of _)queueMicrotask(()=>{throw h});throw g}}finally{r.__root=e,delete r.currentTarget,nt(d),Vt(p)}}}function Ts(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function In(r,e){var t=Je;t.nodes===null&&(t.nodes={start:r,end:e,a:null,t:null})}function U(r,e){var t=(e&no)!==0,n=(e&Ko)!==0,a,i=!r.startsWith("<!>");return()=>{a===void 0&&(a=Ts(i?r:"<!>"+r),t||(a=pt(a)));var s=n||Wc?document.importNode(a,!0):a.cloneNode(!0);if(t){var l=pt(s),c=s.lastChild;In(l,c)}else In(s,s);return s}}function Ng(r,e,t="svg"){var n=!r.startsWith("<!>"),a=(e&no)!==0,i=`<${t}>${n?r:"<!>"+r}</${t}>`,s;return()=>{if(!s){var l=Ts(i),c=pt(l);if(a)for(s=document.createDocumentFragment();pt(c);)s.appendChild(pt(c));else s=pt(c)}var u=s.cloneNode(!0);if(a){var d=pt(u),p=u.lastChild;In(d,p)}else In(u,u);return u}}function Sr(r,e){return Ng(r,e,"svg")}function Ue(r=""){{var e=Ut(r+"");return In(e,e),e}}function we(){var r=document.createDocumentFragment(),e=document.createComment(""),t=Ut();return r.append(e,t),In(e,t),r}function S(r,e){r!==null&&r.before(e)}function jg(r){return r.endsWith("capture")&&r!=="gotpointercapture"&&r!=="lostpointercapture"}const Bg=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Rg(r){return Bg.includes(r)}const Ug={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 Vg(r){return r=r.toLowerCase(),Ug[r]??r}const Hg=["touchstart","touchmove"];function Wg(r){return Hg.includes(r)}let si=!0;function li(r){si=r}function xe(r,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(r.__t??(r.__t=r.nodeValue))&&(r.__t=t,r.nodeValue=t+"")}function Aa(r,e){return Yg(r,e)}const qa=new Map;function Yg(r,{target:e,anchor:t,props:n={},events:a,context:i,intro:s=!0}){Pg();var l=new Set,c=p=>{for(var g=0;g<p.length;g++){var _=p[g];if(!l.has(_)){l.add(_);var f=Wg(_);e.addEventListener(_,_o,{passive:f});var v=qa.get(_);v===void 0?(document.addEventListener(_,_o,{passive:f}),qa.set(_,1)):qa.set(_,v+1)}}};c(Zo(fu)),Ss.add(c);var u=void 0,d=Dg(()=>{var p=t??e.appendChild(Ut());return Lc(p,{pending:()=>{}},g=>{if(i){pe({});var _=nr;_.c=i}a&&(n.$$events=a),si=s,u=r(g,n)||{},si=!0,i&&_e()}),()=>{var f;for(var g of l){e.removeEventListener(g,_o);var _=qa.get(g);--_===0?(document.removeEventListener(g,_o),qa.delete(g)):qa.set(g,_)}Ss.delete(c),p!==t&&((f=p.parentNode)==null||f.removeChild(p))}});return Cs.set(u,d),u}let Cs=new WeakMap;function go(r,e){const t=Cs.get(r);return t?(Cs.delete(r),t(e)):Promise.resolve()}class fo{constructor(e,t=!0){$(this,"anchor");Re(this,zt,new Map);Re(this,on,new Map);Re(this,ft,new Map);Re(this,ma,new Set);Re(this,No,!0);Re(this,jo,()=>{var e=Xe;if(W(this,zt).has(e)){var t=W(this,zt).get(e),n=W(this,on).get(t);if(n)xs(n),W(this,ma).delete(t);else{var a=W(this,ft).get(t);a&&(W(this,on).set(t,a.effect),W(this,ft).delete(t),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),n=a.effect)}for(const[i,s]of W(this,zt)){if(W(this,zt).delete(i),i===e)break;const l=W(this,ft).get(s);l&&(Ur(l.effect),W(this,ft).delete(s))}for(const[i,s]of W(this,on)){if(i===t||W(this,ma).has(i))continue;const l=()=>{if(Array.from(W(this,zt).values()).includes(i)){var u=document.createDocumentFragment();ou(s,u),u.append(Ut()),W(this,ft).set(i,{effect:s,fragment:u})}else Ur(s);W(this,ma).delete(i),W(this,on).delete(i)};W(this,No)||!n?(W(this,ma).add(i),$n(s,l,!1)):l()}}});Re(this,rs,e=>{W(this,zt).delete(e);const t=Array.from(W(this,zt).values());for(const[n,a]of W(this,ft))t.includes(n)||(Ur(a.effect),W(this,ft).delete(n))});this.anchor=e,Be(this,No,t)}ensure(e,t){var n=Xe,a=Kc();if(t&&!W(this,on).has(e)&&!W(this,ft).has(e))if(a){var i=document.createDocumentFragment(),s=Ut();i.append(s),W(this,ft).set(e,{effect:tt(()=>t(s)),fragment:i})}else W(this,on).set(e,tt(()=>t(this.anchor)));if(W(this,zt).set(n,e),a){for(const[l,c]of W(this,on))l===e?n.skipped_effects.delete(c):n.skipped_effects.add(c);for(const[l,c]of W(this,ft))l===e?n.skipped_effects.delete(c.effect):n.skipped_effects.add(c.effect);n.oncommit(W(this,jo)),n.ondiscard(W(this,rs))}else W(this,jo).call(this)}}zt=new WeakMap,on=new WeakMap,ft=new WeakMap,ma=new WeakMap,No=new WeakMap,jo=new WeakMap,rs=new WeakMap;function vr(r,e,...t){var n=new fo(r);Qn(()=>{const a=e()??null;n.ensure(a,a&&(i=>a(i,...t)))},jt)}function br(r){nr===null&&ms(),ka&&nr.l!==null?Gg(nr).m.push(r):fr(()=>{const e=Ne(r);if(typeof e=="function")return e})}function Ht(r){nr===null&&ms(),br(()=>()=>Ne(r))}function Gg(r){var e=r.l;return e.u??(e.u={a:[],b:[],m:[]})}function G(r,e,t=!1){var n=new fo(r),a=t?jt:0;function i(s,l){n.ensure(s,l)}Qn(()=>{var s=!1;e((l,c=!0)=>{s=!0,i(c,l)}),s||i(!1,null)},a)}function Kg(r,e,t){var n=new fo(r),a=!Pa();Qn(()=>{var i=e();a&&i!==null&&typeof i=="object"&&(i={}),n.ensure(i,t)})}function _n(r,e){return e}function Xg(r,e,t){for(var n=[],a=e.length,i,s=e.length,l=0;l<a;l++){let p=e[l];$n(p,()=>{if(i){if(i.pending.delete(p),i.done.add(p),i.pending.size===0){var g=r.outrogroups;Ds(Zo(i.done)),g.delete(i),g.size===0&&(r.outrogroups=null)}}else s-=1},!1)}if(s===0){var c=n.length===0&&t!==null;if(c){var u=t,d=u.parentNode;xg(d),d.append(u),r.items.clear()}Ds(e,!c)}else i={pending:new Set(e),done:new Set},(r.outrogroups??(r.outrogroups=new Set)).add(i)}function Ds(r,e=!0){for(var t=0;t<r.length;t++)Ur(r[t],e)}var hu;function Wt(r,e,t,n,a,i=null){var s=r,l=new Map,c=(e&mr)!==0;if(c){var u=r;s=u.appendChild(Ut())}var d=null,p=Rt(()=>{var h=t();return Xo(h)?h:h==null?[]:Zo(h)}),g,_=!0;function f(){y.fallback=d,Zg(y,g,s,e,n),d!==null&&(g.length===0?(d.f&un)===0?xs(d):(d.f^=un,mo(d,null,s)):$n(d,()=>{d=null}))}var v=Qn(()=>{g=o(p);for(var h=g.length,w=new Set,k=Xe,b=Kc(),P=0;P<h;P+=1){var I=g[P],T=n(I,P),A=_?null:l.get(T);A?(A.v&&Ea(A.v,I),A.i&&Ea(A.i,P),b&&k.skipped_effects.delete(A.e)):(A=Jg(l,_?s:hu??(hu=Ut()),I,T,P,a,e,t),_||(A.e.f|=un),l.set(T,A)),w.add(T)}if(h===0&&i&&!d&&(_?d=tt(()=>i(s)):(d=tt(()=>i(hu??(hu=Ut()))),d.f|=un)),!_)if(b){for(const[x,F]of l)w.has(x)||k.skipped_effects.add(F.e);k.oncommit(f),k.ondiscard(()=>{})}else f();o(p)}),y={effect:v,items:l,outrogroups:null,fallback:d};_=!1}function Zg(r,e,t,n,a){var F,D,j,O,q,N,E,C,M;var i=(n&Nr)!==0,s=e.length,l=r.items,c=r.effect.first,u,d=null,p,g=[],_=[],f,v,y,h;if(i)for(h=0;h<s;h+=1)f=e[h],v=a(f,h),y=l.get(v).e,(y.f&un)===0&&((D=(F=y.nodes)==null?void 0:F.a)==null||D.measure(),(p??(p=new Set)).add(y));for(h=0;h<s;h+=1){if(f=e[h],v=a(f,h),y=l.get(v).e,r.outrogroups!==null)for(const R of r.outrogroups)R.pending.delete(y),R.done.delete(y);if((y.f&un)!==0)if(y.f^=un,y===c)mo(y,null,t);else{var w=d?d.next:c;y===r.effect.last&&(r.effect.last=y.prev),y.prev&&(y.prev.next=y.next),y.next&&(y.next.prev=y.prev),Tn(r,d,y),Tn(r,y,w),mo(y,w,t),d=y,g=[],_=[],c=d.next;continue}if((y.f&dt)!==0&&(xs(y),i&&((O=(j=y.nodes)==null?void 0:j.a)==null||O.unfix(),(p??(p=new Set)).delete(y))),y!==c){if(u!==void 0&&u.has(y)){if(g.length<_.length){var k=_[0],b;d=k.prev;var P=g[0],I=g[g.length-1];for(b=0;b<g.length;b+=1)mo(g[b],k,t);for(b=0;b<_.length;b+=1)u.delete(_[b]);Tn(r,P.prev,I.next),Tn(r,d,P),Tn(r,I,k),c=k,d=I,h-=1,g=[],_=[]}else u.delete(y),mo(y,c,t),Tn(r,y.prev,y.next),Tn(r,y,d===null?r.effect.first:d.next),Tn(r,d,y),d=y;continue}for(g=[],_=[];c!==null&&c!==y;)(u??(u=new Set)).add(c),_.push(c),c=c.next;if(c===null)continue}(y.f&un)===0&&g.push(y),d=y,c=y.next}if(r.outrogroups!==null){for(const R of r.outrogroups)R.pending.size===0&&(Ds(Zo(R.done)),(q=r.outrogroups)==null||q.delete(R));r.outrogroups.size===0&&(r.outrogroups=null)}if(c!==null||u!==void 0){var T=[];if(u!==void 0)for(y of u)(y.f&dt)===0&&T.push(y);for(;c!==null;)(c.f&dt)===0&&c!==r.fallback&&T.push(c),c=c.next;var A=T.length;if(A>0){var x=(n&mr)!==0&&s===0?t:null;if(i){for(h=0;h<A;h+=1)(E=(N=T[h].nodes)==null?void 0:N.a)==null||E.measure();for(h=0;h<A;h+=1)(M=(C=T[h].nodes)==null?void 0:C.a)==null||M.fix()}Xg(r,T,x)}}i&&Pn(()=>{var R,V;if(p!==void 0)for(y of p)(V=(R=y.nodes)==null?void 0:R.a)==null||V.apply()})}function Jg(r,e,t,n,a,i,s,l){var c=(s&Ye)!==0?(s&Ot)===0?ar(t,!1,!1):Zn(t):null,u=(s&ct)!==0?Zn(a):null;return{v:c,i:u,e:tt(()=>(i(e,c??t,u??a,l),()=>{r.delete(n)}))}}function mo(r,e,t){if(r.nodes)for(var n=r.nodes.start,a=r.nodes.end,i=e&&(e.f&un)===0?e.nodes.start:t;n!==null;){var s=uo(n);if(i.before(n),n===a)return;n=s}}function Tn(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function gn(r,e,t=!1,n=!1,a=!1){var i=r,s="";K(()=>{var l=Je;if(s!==(s=e()??"")&&(l.nodes!==null&&(ru(l.nodes.start,l.nodes.end),l.nodes=null),s!=="")){var c=s+"";t?c=`<svg>${c}</svg>`:n&&(c=`<math>${c}</math>`);var u=Ts(c);if((t||n)&&(u=pt(u)),In(pt(u),u.lastChild),t||n)for(;pt(u);)i.before(pt(u));else i.before(u)}})}function Qg(r,e,t){var n=new fo(r);Qn(()=>{var a=e()??null;n.ensure(a,a&&(i=>t(i,a)))},jt)}const $g=()=>performance.now(),fn={tick:r=>requestAnimationFrame(r),now:()=>$g(),tasks:new Set};function vu(){const r=fn.now();fn.tasks.forEach(e=>{e.c(r)||(fn.tasks.delete(e),e.f())}),fn.tasks.size!==0&&fn.tick(vu)}function ef(r){let e;return fn.tasks.size===0&&fn.tick(vu),{promise:new Promise(t=>{fn.tasks.add(e={c:r,f:t})}),abort(){fn.tasks.delete(e)}}}function ci(r,e){Sa(()=>{r.dispatchEvent(new CustomEvent(e))})}function rf(r){if(r==="float")return"cssFloat";if(r==="offset")return"cssOffset";if(r.startsWith("--"))return r;const e=r.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function yu(r){const e={},t=r.split(";");for(const n of t){const[a,i]=n.split(":");if(!a||i===void 0)break;const s=rf(a.trim());e[s]=i.trim()}return e}const tf=r=>r;function bu(r,e,t,n){var k;var a=(r&ro)!==0,i=(r&mt)!==0,s=a&&i,l=(r&to)!==0,c=s?"both":a?"in":"out",u,d=e.inert,p=e.style.overflow,g,_;function f(){return Sa(()=>u??(u=t()(e,(n==null?void 0:n())??{},{direction:c})))}var v={is_global:l,in(){var b;if(e.inert=d,!a){_==null||_.abort(),(b=_==null?void 0:_.reset)==null||b.call(_);return}i||g==null||g.abort(),ci(e,"introstart"),g=As(e,f(),_,1,()=>{ci(e,"introend"),g==null||g.abort(),g=u=void 0,e.style.overflow=p})},out(b){if(!i){b==null||b(),u=void 0;return}e.inert=!0,ci(e,"outrostart"),_=As(e,f(),g,0,()=>{ci(e,"outroend"),b==null||b()})},stop:()=>{g==null||g.abort(),_==null||_.abort()}},y=Je;if(((k=y.nodes).t??(k.t=[])).push(v),a&&si){var h=l;if(!h){for(var w=y.parent;w&&(w.f&jt)!==0;)for(;(w=w.parent)&&(w.f&Lt)===0;);h=!w||(w.f&ei)!==0}h&&Jn(()=>{Ne(()=>v.in())})}}function As(r,e,t,n,a){var i=n===1;if(va(e)){var s,l=!1;return Pn(()=>{if(!l){var y=e({direction:i?"in":"out"});s=As(r,y,t,n,a)}}),{abort:()=>{l=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(t==null||t.deactivate(),!(e!=null&&e.duration))return a(),{abort:Ze,deactivate:Ze,reset:Ze,t:()=>n};const{delay:c=0,css:u,tick:d,easing:p=tf}=e;var g=[];if(i&&t===void 0&&(d&&d(0,1),u)){var _=yu(u(0,1));g.push(_,_)}var f=()=>1-n,v=r.animate(g,{duration:c,fill:"forwards"});return v.onfinish=()=>{v.cancel();var y=(t==null?void 0:t.t())??1-n;t==null||t.abort();var h=n-y,w=e.duration*Math.abs(h),k=[];if(w>0){var b=!1;if(u)for(var P=Math.ceil(w/16.666666666666668),I=0;I<=P;I+=1){var T=y+h*p(I/P),A=yu(u(T,1-T));k.push(A),b||(b=A.overflow==="hidden")}b&&(r.style.overflow="hidden"),f=()=>{var x=v.currentTime;return y+h*p(x/w)},d&&ef(()=>{if(v.playState!=="running")return!1;var x=f();return d(x,1-x),!0})}v=r.animate(k,{duration:w,fill:"forwards"}),v.onfinish=()=>{f=()=>n,d==null||d(n,1-n),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=Ze)},deactivate:()=>{a=Ze},reset:()=>{n===0&&(d==null||d(1,0))},t:()=>f()}}function qs(r,e,t,n,a,i){var s=null,l=r,c=new fo(l,!1);Qn(()=>{const u=e()||null;var d=u==="svg"?ao:null;if(u===null){c.ensure(null,null),li(!0);return}return c.ensure(u,p=>{if(u){if(s=d?document.createElementNS(d,u):document.createElement(u),In(s,s),n){var g=s.appendChild(Ut());n(s,g)}Je.nodes.end=s,p.before(s)}}),li(!0),()=>{u&&li(!1)}},jt),Ia(()=>{li(!0)})}function ve(r,e){Jn(()=>{var t=r.getRootNode(),n=t.host?t:t.head??t.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const a=document.createElement("style");a.id=e.hash,a.textContent=e.code,n.appendChild(a)}})}function nf(r,e,t){Jn(()=>{var n=Ne(()=>e(r,t==null?void 0:t())||{});if(t&&(n!=null&&n.update)){var a=!1,i={};Ta(()=>{var s=t();Ve(s),a&&hs(i,s)&&(i=s,n.update(s))}),a=!0}if(n!=null&&n.destroy)return()=>n.destroy()})}function af(r,e){var t=void 0,n;Qc(()=>{t!==(t=e())&&(n&&(Ur(n),n=null),t&&(n=tt(()=>{Jn(()=>t(r))})))})}function ku(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=ku(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function of(){for(var r,e,t=0,n="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=ku(r))&&(n&&(n+=" "),n+=e);return n}function Fa(r){return typeof r=="object"?of(r):r??""}const wu=[...` \r\f \v\uFEFF`];function sf(r,e,t){var n=r==null?"":""+r;if(e&&(n=n?n+" "+e:e),t){for(var a in t)if(t[a])n=n?n+" "+a:a;else if(n.length)for(var i=a.length,s=0;(s=n.indexOf(a,s))>=0;){var l=s+i;(s===0||wu.includes(n[s-1]))&&(l===n.length||wu.includes(n[l]))?n=(s===0?"":n.substring(0,s))+n.substring(l+1):s=l}}return n===""?null:n}function Pu(r,e=!1){var t=e?" !important;":";",n="";for(var a in r){var i=r[a];i!=null&&i!==""&&(n+=" "+a+": "+i+t)}return n}function Fs(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function lf(r,e){if(e){var t="",n,a;if(Array.isArray(e)?(n=e[0],a=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,l=!1,c=[];n&&c.push(...Object.keys(n).map(Fs)),a&&c.push(...Object.keys(a).map(Fs));var u=0,d=-1;const v=r.length;for(var p=0;p<v;p++){var g=r[p];if(l?g==="/"&&r[p-1]==="*"&&(l=!1):i?i===g&&(i=!1):g==="/"&&r[p+1]==="*"?l=!0:g==='"'||g==="'"?i=g:g==="("?s++:g===")"&&s--,!l&&i===!1&&s===0){if(g===":"&&d===-1)d=p;else if(g===";"||p===v-1){if(d!==-1){var _=Fs(r.substring(u,d).trim());if(!c.includes(_)){g!==";"&&p++;var f=r.substring(u,p).trim();t+=" "+f+";"}}u=p+1,d=-1}}}}return n&&(t+=Pu(n)),a&&(t+=Pu(a,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function cr(r,e,t,n,a,i){var s=r.__className;if(s!==t||s===void 0){var l=sf(t,n,i);l==null?r.removeAttribute("class"):e?r.className=l:r.setAttribute("class",l),r.__className=t}else if(i&&a!==i)for(var c in i){var u=!!i[c];(a==null||u!==!!a[c])&&r.classList.toggle(c,u)}return i}function Ms(r,e={},t,n){for(var a in t){var i=t[a];e[a]!==i&&(t[a]==null?r.style.removeProperty(a):r.style.setProperty(a,i,n))}}function Se(r,e,t,n){var a=r.__style;if(a!==e){var i=lf(e,n);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else n&&(Array.isArray(n)?(Ms(r,t==null?void 0:t[0],n[0]),Ms(r,t==null?void 0:t[1],n[1],"important")):Ms(r,t,n));return n}function zs(r,e,t=!1){if(r.multiple){if(e==null)return;if(!Xo(e))return sg();for(var n of r.options)n.selected=e.includes(xu(n));return}for(n of r.options){var a=xu(n);if(wg(a,e)){n.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function cf(r){var e=new MutationObserver(()=>{zs(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ia(()=>{e.disconnect()})}function xu(r){return"__value"in r?r.__value:r.value}const ho=Symbol("class"),vo=Symbol("style"),Eu=Symbol("is custom element"),Su=Symbol("is html");function uf(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function ge(r,e,t,n){var a=Iu(r);a[e]!==(a[e]=t)&&(e==="loading"&&(r[Z_]=t),t==null?r.removeAttribute(e):typeof t!="string"&&Cu(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function df(r,e,t,n,a=!1,i=!1){var s=Iu(r),l=s[Eu],c=!s[Su],u=e||{},d=r.tagName==="OPTION";for(var p in e)p in t||(t[p]=null);t.class?t.class=Fa(t.class):(n||t[ho])&&(t.class=null),t[vo]&&(t.style??(t.style=null));var g=Cu(r);for(const k in t){let b=t[k];if(d&&k==="value"&&b==null){r.value=r.__value="",u[k]=b;continue}if(k==="class"){var _=r.namespaceURI==="http://www.w3.org/1999/xhtml";cr(r,_,b,n,e==null?void 0:e[ho],t[ho]),u[k]=b,u[ho]=t[ho];continue}if(k==="style"){Se(r,b,e==null?void 0:e[vo],t[vo]),u[k]=b,u[vo]=t[vo];continue}var f=u[k];if(!(b===f&&!(b===void 0&&r.hasAttribute(k)))){u[k]=b;var v=k[0]+k[1];if(v!=="$$")if(v==="on"){const P={},I="$$"+k;let T=k.slice(2);var y=Rg(T);if(jg(T)&&(T=T.slice(0,-7),P.capture=!0),!y&&f){if(b!=null)continue;r.removeEventListener(T,u[I],P),u[I]=null}if(b!=null)if(y)r[`__${T}`]=b,Sn([T]);else{let A=function(x){u[k].call(this,x)};u[I]=Is(T,r,A,P)}else y&&(r[`__${T}`]=void 0)}else if(k==="style")ge(r,k,b);else if(k==="autofocus")Eg(r,!!b);else if(!l&&(k==="__value"||k==="value"&&b!=null))r.value=r.__value=b;else if(k==="selected"&&d)uf(r,b);else{var h=k;c||(h=Vg(h));var w=h==="defaultValue"||h==="defaultChecked";if(b==null&&!l&&!w)if(s[k]=null,h==="value"||h==="checked"){let P=r;const I=e===void 0;if(h==="value"){let T=P.defaultValue;P.removeAttribute(h),P.defaultValue=T,P.value=P.__value=I?T:null}else{let T=P.defaultChecked;P.removeAttribute(h),P.defaultChecked=T,P.checked=I?T:!1}}else r.removeAttribute(k);else w||g.includes(h)&&(l||typeof b!="string")?(r[h]=b,h in s&&(s[h]=Er)):typeof b!="function"&&ge(r,h,b)}}}return u}function Os(r,e,t=[],n=[],a=[],i,s=!1,l=!1){Nc(a,t,n,c=>{var u=void 0,d={},p=r.nodeName==="SELECT",g=!1;if(Qc(()=>{var f=e(...c.map(o)),v=df(r,u,f,i,s,l);g&&p&&"value"in f&&zs(r,f.value);for(let h of Object.getOwnPropertySymbols(d))f[h]||Ur(d[h]);for(let h of Object.getOwnPropertySymbols(f)){var y=f[h];h.description===Xr&&(!u||y!==u[h])&&(d[h]&&Ur(d[h]),d[h]=tt(()=>af(r,()=>y))),v[h]=y}u=v}),p){var _=r;Jn(()=>{zs(_,u.value,!0),cf(_)})}g=!0})}function Iu(r){return r.__attributes??(r.__attributes={[Eu]:r.nodeName.includes("-"),[Su]:r.namespaceURI===ut})}var Tu=new Map;function Cu(r){var e=r.getAttribute("is")||r.nodeName,t=Tu.get(e);if(t)return t;Tu.set(e,t=[]);for(var n,a=r,i=Element.prototype;i!==a;){n=vc(a);for(var s in n)n[s].set&&t.push(s);a=ds(a)}return t}function pf(r,e,t=e){var n=new WeakSet;Ig(r,"input",async a=>{var i=a?r.defaultValue:r.value;if(i=Ls(r)?Ns(i):i,t(i),Xe!==null&&n.add(Xe),await zg(),i!==(i=e())){var s=r.selectionStart,l=r.selectionEnd,c=r.value.length;if(r.value=i??"",l!==null){var u=r.value.length;s===l&&l===c&&u>c?(r.selectionStart=u,r.selectionEnd=u):(r.selectionStart=s,r.selectionEnd=Math.min(l,u))}}}),Ne(e)==null&&r.value&&(t(Ls(r)?Ns(r.value):r.value),Xe!==null&&n.add(Xe)),Ta(()=>{var a=e();if(r===document.activeElement){var i=ti??Xe;if(n.has(i))return}Ls(r)&&a===Ns(r.value)||r.type==="date"&&!a&&!r.value||a!==r.value&&(r.value=a??"")})}function Ls(r){var e=r.type;return e==="number"||e==="range"}function Ns(r){return r===""?null:+r}const ns=class ns{constructor(e){Re(this,ts);Re(this,Hn,new WeakMap);Re(this,Za);Re(this,Bo);Be(this,Bo,e)}observe(e,t){var n=W(this,Hn).get(e)||new Set;return n.add(t),W(this,Hn).set(e,n),Mr(this,ts,W_).call(this).observe(e,W(this,Bo)),()=>{var a=W(this,Hn).get(e);a.delete(t),a.size===0&&(W(this,Hn).delete(e),W(this,Za).unobserve(e))}}};Hn=new WeakMap,Za=new WeakMap,Bo=new WeakMap,ts=new WeakSet,W_=function(){return W(this,Za)??Be(this,Za,new ResizeObserver(e=>{for(var t of e){ns.entries.set(t.target,t);for(var n of W(this,Hn).get(t.target)||[])n(t)}}))},$(ns,"entries",new WeakMap);let ui=ns;var _f=new ui({box:"content-box"}),gf=new ui({box:"border-box"});function Du(r,e,t){var n=_f,a=n.observe(r,i=>t(i[e]));Ia(a)}function di(r,e,t){var n=gf.observe(r,()=>t(r[e]));Jn(()=>(Ne(()=>t(r[e])),n))}function Au(r,e){return r==