import{o as y,h as O,R as z,E as F,af as G,W as H,X as V,U as Z,Y as D,_ as Y,v as m,$ as B,ap as j,x as W,aq as X,k,j as L,q as p,ar as $,as as J,at as K,au as Q,I as U,V as x,av as aa,g as E,aw as ra,b as ea,e as sa,a3 as fa,ax as ia,ay as ta,az as na,aA as ua,aB as la}from"./CZBSCAq2.js";import{l as _a}from"./DIeogL5L.js";function da(a,r,[i,f]=[0,0]){O&&i===0&&z();var t=a,e=null,n=null,d=j,P=i>0?F:0,l=!1;const T=(u,_=!0)=>{l=!0,I(_,u)},I=(u,_)=>{if(d===(d=u))return;let S=!1;if(O&&f!==-1){if(i===0){const c=t.data;c===G?f=0:c===H?f=1/0:(f=parseInt(c.substring(1)),f!==f&&(f=d?1/0:-1))}const R=f>i;!!d===R&&(t=V(),Z(t),D(!1),S=!0,f=-1)}d?(e?Y(e):_&&(e=m(()=>_(t))),n&&B(n,()=>{n=null})):(n?Y(n):_&&(n=m(()=>_(t,[i+1,f]))),e&&B(e,()=>{e=null})),S&&D(!0)};y(()=>{l=!1,r(T),l||I(null,null)},P),O&&(t=W)}function C(a,r){return a===r||(a==null?void 0:a[$])===r}function Sa(a={},r,i,f){return X(()=>{var t,e;return k(()=>{t=e,e=[],L(()=>{a!==i(...e)&&(r(a,...e),t&&C(i(...t),a)&&r(null,...t))})}),()=>{p(()=>{e&&C(i(...e),a)&&r(null,...e)})}}),a}let b=!1;function ca(a){var r=b;try{return b=!1,[a(),b]}finally{b=r}}function M(a){var r;return((r=a.ctx)==null?void 0:r.d)??!1}function Aa(a,r,i,f){var q;var t=(i&ua)!==0,e=!_a||(i&na)!==0,n=(i&ia)!==0,d=(i&la)!==0,P=!1,l;n?[l,P]=ca(()=>a[r]):l=a[r];var T=$ in a||ta in a,I=n&&(((q=J(a,r))==null?void 0:q.set)??(T&&r in a&&(s=>a[r]=s)))||void 0,u=f,_=!0,S=!1,R=()=>(S=!0,_&&(_=!1,d?u=L(f):u=f),u);l===void 0&&f!==void 0&&(I&&e&&K(),l=R(),I&&I(l));var c;if(e)c=()=>{var s=a[r];return s===void 0?R():(_=!0,S=!1,s)};else{var N=(t?U:x)(()=>a[r]);N.f|=Q,c=()=>{var s=E(N);return s!==void 0&&(u=void 0),s===void 0?u:s}}if((i&aa)===0)return c;if(I){var w=a.$$legacy;return function(s,A){return arguments.length>0?((!e||!A||w||P)&&I(A?c():s),s):c()}}var g=!1,h=fa(l),v=U(()=>{var s=c(),A=E(h);return g?(g=!1,A):h.v=s});return n&&E(v),t||(v.equals=ra),function(s,A){if(arguments.length>0){const o=A?E(v):e&&n?ea(s):s;if(!v.equals(o)){if(g=!0,sa(h,o),S&&u!==void 0&&(u=o),M(v))return s;L(()=>E(v))}return s}return M(v)?v.v:E(v)}}export{Sa as b,da as i,Aa as p};
