import{v as j,z as I,J as y,E as z,M as W,N as X,O as k,K as ee,P as x,Q as K,w as D,R as N,U as re,A as F,S as ne,V as se,g as m,W as ie,X as Y,Y as ue,Z as fe,x as M,_ as G,$ as H,i as _,a0 as L,a1 as ae,a2 as le,k as B,a3 as te,a4 as V,a5 as ce,a6 as oe,a7 as pe,a8 as J,n as de,a9 as _e,aa as ve,ab as be,ac as P,ad as he,ae as $}from"./CId4BCie.js";import{s as Pe,g as Ie}from"./Baf7hnI1.js";function De(e,r,[s,n]=[0,0]){I&&s===0&&y();var i=e,u=null,a=null,v=re,S=s>0?z:0,t=!1;const E=(l,c=!0)=>{t=!0,d(c,l)},d=(l,c)=>{if(v===(v=l))return;let b=!1;if(I&&n!==-1){if(s===0){const o=i.data;o===W?n=0:o===X?n=1/0:(n=parseInt(o.substring(1)),n!==n&&(n=v?1/0:-1))}const R=n>s;!!v===R&&(i=k(),ee(i),x(!1),b=!0,n=-1)}v?(u?K(u):c&&(u=D(()=>c(i))),a&&N(a,()=>{a=null})):(a?K(a):c&&(a=D(()=>c(i,[s+1,n]))),u&&N(u,()=>{u=null})),b&&x(!0)};j(()=>{t=!1,r(E),t||d(null,null)},S),I&&(i=F)}function Ne(e,r,s){I&&y();var n=e,i,u;j(()=>{i!==(i=r())&&(u&&(N(u),u=null),i&&(u=D(()=>s(n,i))))},z),I&&(n=F)}function C(e,r){return e===r||(e==null?void 0:e[Y])===r}function me(e={},r,s,n){return ne(()=>{var i,u;return se(()=>{i=u,u=(n==null?void 0:n())||[],m(()=>{e!==s(...u)&&(r(e,...u),i&&C(s(...i),e)&&r(null,...i))})}),()=>{ie(()=>{u&&C(s(...u),e)&&r(null,...u)})}}),e}let w=!1,U=Symbol();function Le(e,r,s){const n=s[r]??(s[r]={store:null,source:G(void 0),unsubscribe:M});if(n.store!==e&&!(U in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=M;else{var i=!0;n.unsubscribe=Pe(e,u=>{i?n.source.v=u:H(n.source,u)}),i=!1}return e&&U in s?Ie(e):_(n.source)}function Ue(){const e={};function r(){ue(()=>{for(var s in e)e[s].unsubscribe();fe(e,U,{enumerable:!1,value:!0})})}return[e,r]}function Se(e){var r=w;try{return w=!1,[e(),w]}finally{w=r}}const Re={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Ye(e,r,s){return new Proxy({props:e,exclude:r},Re)}const we={get(e,r){if(!e.exclude.includes(r))return _(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){return r in e.special||(e.special[r]=Ae({get[r](){return e.props[r]}},r,V)),e.special[r](s),$(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),$(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function ge(e,r){return new Proxy({props:e,exclude:r,special:{},version:he(0)},we)}const Ee={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(P(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let i=e.props[n];P(i)&&(i=i());const u=L(i,r);if(u&&u.set)return u.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(P(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=L(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===Y||r===J)return!1;for(let s of e.props)if(P(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props){P(s)&&(s=s());for(const n in s)r.includes(n)||r.push(n)}return r}};function qe(...e){return new Proxy({props:e},Ee)}function Z(e){var r;return((r=e.ctx)==null?void 0:r.d)??!1}function Ae(e,r,s,n){var q;var i=(s&ve)!==0,u=!de||(s&_e)!==0,a=(s&pe)!==0,v=(s&be)!==0,S=!1,t;a?[t,S]=Se(()=>e[r]):t=e[r];var E=Y in e||J in e,d=a&&(((q=L(e,r))==null?void 0:q.set)??(E&&r in e&&(f=>e[r]=f)))||void 0,l=n,c=!0,b=!1,R=()=>(b=!0,c&&(c=!1,v?l=m(n):l=n),l);t===void 0&&n!==void 0&&(d&&u&&ae(),t=R(),d&&d(t));var o;if(u)o=()=>{var f=e[r];return f===void 0?R():(c=!0,b=!1,f)};else{var g=(i?B:te)(()=>e[r]);g.f|=le,o=()=>{var f=_(g);return f!==void 0&&(l=void 0),f===void 0?l:f}}if((s&V)===0)return o;if(d){var Q=e.$$legacy;return function(f,h){return arguments.length>0?((!u||!h||Q||S)&&d(h?o():f),f):o()}}var A=!1,T=G(t),p=B(()=>{var f=o(),h=_(T);return A?(A=!1,h):T.v=f});return a&&_(p),i||(p.equals=ce),function(f,h){if(arguments.length>0){const O=h?_(p):u&&a?oe(f):f;if(!p.equals(O)){if(A=!0,H(T,O),b&&l!==void 0&&(l=O),Z(p))return f;m(()=>_(p))}return f}return Z(p)?p.v:_(p)}}export{Le as a,qe as b,Ne as c,me as d,De as i,ge as l,Ae as p,Ye as r,Ue as s};
