var Dn=Array.isArray,Nn=Array.from,In=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,Pn=Object.prototype,bn=Array.prototype,Zt=Object.getPrototypeOf;function Cn(t){return typeof t=="function"}const Fn=()=>{};function qn(t){return t()}function Wt(t){for(var n=0;nnew Promise(e=>{r.outro?yn(n,()=>{k(n),e(void 0)}):(k(n),e(void 0))})}function It(t){return j(dt,t,!1)}function pn(t){return j(Z,t,!0)}function dr(t){return hn(t)}function hn(t,n=0){return j(Z|st|n,t,!0)}function yr(t,n=!0){return j(Z|T,t,!0,n)}function Pt(t){var n=t.teardown;if(n!==null){const r=ot,e=o;ht(!0),K(null);try{n.call(null)}finally{ht(r),K(e)}}}function bt(t){var n=t.deriveds;if(n!==null){t.deriveds=null;for(var r=0;r{k(t),n&&n()})}function En(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var l of t)l.out(e)}else n()}function qt(t,n,r){if(!(t.f&b)){if(t.f^=b,t.transitions!==null)for(const u of t.transitions)(u.is_global||r)&&n.push(u);for(var e=t.first;e!==null;){var l=e.next,s=(e.f&yt)!==0||(e.f&T)!==0;qt(e,n,s?r:!1),e=l}}}function Er(t){Lt(t,!0)}function Lt(t,n){if(t.f&b){U(t)&&Q(t),t.f^=b;for(var r=t.first;r!==null;){var e=r.next,l=(r.f&yt)!==0||(r.f&T)!==0;Lt(r,l?n:!1),r=e}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||n)&&s.in()}}let G=!1,et=[];function Yt(){G=!1;const t=et.slice();et=[],Wt(t)}function wr(t){G||(G=!0,queueMicrotask(Yt)),et.push(t)}function wn(){G&&Yt()}const Mt=0,mn=1;let B=!1,H=Mt,q=!1,L=null,I=!1,ot=!1;function pt(t){I=t}function ht(t){ot=t}let R=[],P=0;let o=null;function K(t){o=t}let a=null;function $(t){a=t}let m=null;function Tn(t){m=t}let h=null,d=0,A=null;function gn(t){A=t}let jt=1,S=!1,f=null;function Ut(){return++jt}function it(){return!z||f!==null&&f.l===null}function U(t){var p;var n=t.f;if(n&x)return!0;if(n&M){var r=t.deps,e=(n&D)!==0;if(r!==null){var l,s,u=(n&V)!==0,i=e&&a!==null&&!S,_=r.length;if(u||i){for(l=0;l<_;l++)s=r[l],(p=s==null?void 0:s.reactions)!=null&&p.includes(t)||(s.reactions??(s.reactions=[])).push(t);u&&(t.f^=V)}for(l=0;l<_;l++)if(s=r[l],U(s)&&Dt(s),s.version>t.version)return!0}(!e||a!==null&&!S)&&g(t,y)}return!1}function An(t,n){for(var r=n;r!==null;){if(r.f&tt)try{r.fn(t);return}catch{r.f^=tt}r=r.parent}throw B=!1,t}function xn(t){return(t.f&C)===0&&(t.parent===null||(t.parent.f&tt)===0)}function J(t,n,r,e){if(B){if(r===null&&(B=!1),xn(n))throw t;return}r!==null&&(B=!0);{An(t,n);return}}function Bt(t){var ft;var n=h,r=d,e=A,l=o,s=S,u=m,i=f,_=t.f;h=null,d=0,A=null,o=_&(T|W)?null:t,S=!I&&(_&D)!==0,m=null,f=t.ctx;try{var p=(0,t.fn)(),c=t.deps;if(h!==null){var v;if(Y(t,d),c!==null&&d>0)for(c.length=d+h.length,v=0;v1e3){P=0;try{rn()}catch(t){if(L!==null)J(t,L,null);else throw t}}P++}function Vt(t){var n=t.length;if(n!==0){Ht();var r=I;I=!0;try{for(var e=0;e1001)return;const t=R;R=[],Vt(t),q||(P=0,L=null)}function X(t){H===Mt&&(q||(q=!0,queueMicrotask(On))),L=t;for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(r&(W|T)){if(!(r&y))return;n.f^=y}}R.push(n)}function Gt(t,n){var r=t.first,e=[];t:for(;r!==null;){var l=r.f,s=(l&T)!==0,u=s&&(l&y)!==0,i=r.next;if(!u&&!(l&b))if(l&Z){if(s)r.f^=y;else try{U(r)&&Q(r)}catch(v){J(v,r,null,r.ctx)}var _=r.first;if(_!==null){r=_;continue}}else l&dt&&e.push(r);if(i===null){let v=r.parent;for(;v!==null;){if(t===v)break t;var p=v.next;if(p!==null){r=p;continue t}v=v.parent}}r=i}for(var c=0;c0||l.length>0)&&Kt(),P=0,L=null,e}finally{H=n,R=r}}async function mr(){await Promise.resolve(),Kt()}function Tr(t){var c;var n=t.f,r=(n&E)!==0;if(r&&n&C){var e=kt(t);return at(t),e}if(o!==null){m!==null&&m.includes(t)&&en();var l=o.deps;h===null&&l!==null&&l[d]===t?d++:h===null?h=[t]:h.push(t),A!==null&&a!==null&&a.f&y&&!(a.f&T)&&A.includes(t)&&(g(a,x),X(a))}else if(r&&t.deps===null)for(var s=t,u=s.parent,i=s;u!==null;)if(u.f&E){var _=u;i=_,u=_.parent}else{var p=u;(c=p.deriveds)!=null&&c.includes(i)||(p.deriveds??(p.deriveds=[])).push(i);break}return r&&(s=t,U(s)&&Dt(s)),t.v}function gr(t){const n=o;try{return o=null,t()}finally{o=n}}const kn=~(x|M|y);function g(t,n){t.f=t.f&kn|n}function Ar(t,n=!1,r){f={p:f,c:null,e:null,m:!1,s:t,x:null,l:null},z&&!n&&(f.l={s:null,u:null,r1:[],r2:ut(!1)})}function xr(t){const n=f;if(n!==null){const u=n.e;if(u!==null){var r=a,e=o;n.e=null;try{for(var l=0;l