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