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