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