import{I as H,r as J,J as K,K as V,c as D,y as R,L as N,M as T,N as tt,O as et,P as st,B as nt,C as ot,w as ct,h as rt,Q as ut}from"./style-CWE_e4zZ.js";/*!
 * pinia v3.0.3
 * (c) 2025 Eduardo San Martin Morote
 * @license MIT
 */let Q;const x=t=>Q=t,q=Symbol();function k(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var g;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(g||(g={}));function at(){const t=H(!0),o=t.run(()=>J({}));let s=[],e=[];const r=K({install(u){x(r),r._a=u,u.provide(q,r),u.config.globalProperties.$pinia=r,e.forEach(a=>s.push(a)),e=[]},use(u){return this._a?s.push(u):e.push(u),this},_p:s,_a:null,_e:t,_s:new Map,state:o});return r}const z=()=>{};function A(t,o,s,e=z){t.push(o);const r=()=>{const u=t.indexOf(o);u>-1&&(t.splice(u,1),e())};return!s&&nt()&&ot(r),r}function d(t,...o){t.slice().forEach(s=>{s(...o)})}const ft=t=>t(),B=Symbol(),I=Symbol();function L(t,o){t instanceof Map&&o instanceof Map?o.forEach((s,e)=>t.set(e,s)):t instanceof Set&&o instanceof Set&&o.forEach(t.add,t);for(const s in o){if(!o.hasOwnProperty(s))continue;const e=o[s],r=t[s];k(r)&&k(e)&&t.hasOwnProperty(s)&&!R(e)&&!N(e)?t[s]=L(r,e):t[s]=e}return t}const it=Symbol();function lt(t){return!k(t)||!Object.prototype.hasOwnProperty.call(t,it)}const{assign:h}=Object;function ht(t){return!!(R(t)&&t.effect)}function bt(t,o,s,e){const{state:r,actions:u,getters:a}=o,O=s.state.value[t];let y;function b(){O||(s.state.value[t]=r?r():{});const S=ut(s.state.value[t]);return h(S,u,Object.keys(a||{}).reduce((v,_)=>(v[_]=K(D(()=>{x(s);const m=s._s.get(t);return a[_].call(m,m)})),v),{}))}return y=U(t,b,o,s,e,!0),y}function U(t,o,s={},e,r,u){let a;const O=h({actions:{}},s),y={deep:!0};let b,S,v=[],_=[],m;const j=e.state.value[t];!u&&!j&&(e.state.value[t]={}),J({});let W;function F(c){let n;b=S=!1,typeof c=="function"?(c(e.state.value[t]),n={type:g.patchFunction,storeId:t,events:m}):(L(e.state.value[t],c),n={type:g.patchObject,payload:c,storeId:t,events:m});const f=W=Symbol();rt().then(()=>{W===f&&(b=!0)}),S=!0,d(v,n,e.state.value[t])}const X=u?function(){const{state:n}=s,f=n?n():{};this.$patch(p=>{h(p,f)})}:z;function Y(){a.stop(),v=[],_=[],e._s.delete(t)}const M=(c,n="")=>{if(B in c)return c[I]=n,c;const f=function(){x(e);const p=Array.from(arguments),C=[],E=[];function G(i){C.push(i)}function $(i){E.push(i)}d(_,{args:p,name:f[I],store:l,after:G,onError:$});let w;try{w=c.apply(this&&this.$id===t?this:l,p)}catch(i){throw d(E,i),i}return w instanceof Promise?w.then(i=>(d(C,i),i)).catch(i=>(d(E,i),Promise.reject(i))):(d(C,w),w)};return f[B]=!0,f[I]=n,f},Z={_p:e,$id:t,$onAction:A.bind(null,_),$patch:F,$reset:X,$subscribe(c,n={}){const f=A(v,c,n.detached,()=>p()),p=a.run(()=>ct(()=>e.state.value[t],C=>{(n.flush==="sync"?S:b)&&c({storeId:t,type:g.direct,events:m},C)},h({},y,n)));return f},$dispose:Y},l=st(Z);e._s.set(t,l);const P=(e._a&&e._a.runWithContext||ft)(()=>e._e.run(()=>(a=H()).run(()=>o({action:M}))));for(const c in P){const n=P[c];if(R(n)&&!ht(n)||N(n))u||(j&&lt(n)&&(R(n)?n.value=j[c]:L(n,j[c])),e.state.value[t][c]=n);else if(typeof n=="function"){const f=M(n,c);P[c]=f,O.actions[c]=n}}return h(l,P),h(V(l),P),Object.defineProperty(l,"$state",{get:()=>e.state.value[t],set:c=>{F(n=>{h(n,c)})}}),e._p.forEach(c=>{h(l,a.run(()=>c({store:l,app:e._a,pinia:e,options:O})))}),j&&u&&s.hydrate&&s.hydrate(l.$state,j),b=!0,S=!0,l}/*! #__NO_SIDE_EFFECTS__ */function vt(t,o,s){let e;const r=typeof o=="function";e=r?s:o;function u(a,O){const y=et();return a=a||(y?tt(q,null):null),a&&x(a),a=Q,a._s.has(t)||(r?U(t,o,e,a):bt(t,e,a)),a._s.get(t)}return u.$id=t,u}function _t(t){const o=V(t),s={};for(const e in o){const r=o[e];r.effect?s[e]=D({get:()=>t[e],set(u){t[e]=u}}):(R(r)||N(r))&&(s[e]=T(t,e))}return s}const mt=at();export{vt as d,mt as p,_t as s};
