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