@moonbase.sh/storefront 0.2.17 β 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/moonbase.js +4 -3
- package/dist/moonbase.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/moonbase.js
CHANGED
|
@@ -9276,10 +9276,11 @@ function Ji(e) {
|
|
|
9276
9276
|
i({ next: a.detail.next });
|
|
9277
9277
|
});
|
|
9278
9278
|
});
|
|
9279
|
-
} else
|
|
9280
|
-
|
|
9281
|
-
|
|
9279
|
+
} else {
|
|
9280
|
+
if (o.checkoutUrl && typeof window < "u")
|
|
9281
|
+
return window.location.href = o.checkoutUrl, { next: void 0 };
|
|
9282
9282
|
throw new Error("No checkout URL found");
|
|
9283
|
+
}
|
|
9283
9284
|
}
|
|
9284
9285
|
};
|
|
9285
9286
|
}
|
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -13,7 +13,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
13
13
|
|
|
14
14
|
For more details, see https://link.vuejs.org/feature-flags.`)}}const _t=Wm;function Im(e){return Dm(e)}function Dm(e,t){$m();const n=Ei();n.__VUE__=!0,g.NODE_ENV!=="production"&&pc(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:m=We,insertStaticContent:y}=e,E=(p,h,k,L=null,D=null,M=null,J=void 0,q=null,W=g.NODE_ENV!=="production"&&Dn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!hr(p,h)&&(L=si(p),bt(p,D,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:R,ref:Q,shapeFlag:le}=h;switch(R){case _o:S(p,h,k,L);break;case Ke:A(p,h,k,L);break;case bo:p==null?F(h,k,L,J):g.NODE_ENV!=="production"&&C(p,h,k,J);break;case Ce:oe(p,h,k,L,D,M,J,q,W);break;default:le&1?Z(p,h,k,L,D,M,J,q,W):le&6?w(p,h,k,L,D,M,J,q,W):le&64||le&128?R.process(p,h,k,L,D,M,J,q,W,jo):g.NODE_ENV!=="production"&&U("Invalid VNode type:",R,`(${typeof R})`)}Q!=null&&D&&na(Q,p&&p.ref,M,h||p,!h)},S=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const D=h.el=p.el;h.children!==p.children&&l(D,h.children)}},A=(p,h,k,L)=>{p==null?r(h.el=c(h.children||""),k,L):h.el=p.el},F=(p,h,k,L)=>{[p.el,p.anchor]=y(p.children,h,k,L,p.el,p.anchor)},C=(p,h,k,L)=>{if(h.children!==p.children){const D=f(p.anchor);$(p),[h.el,h.anchor]=y(h.children,k,D,L)}else h.el=p.el,h.anchor=p.anchor},z=({el:p,anchor:h},k,L)=>{let D;for(;p&&p!==h;)D=f(p),r(p,k,L),p=D;r(h,k,L)},$=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},Z=(p,h,k,L,D,M,J,q,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?x(h,k,L,D,M,J,q,W):V(p,h,D,M,J,q,W)},x=(p,h,k,L,D,M,J,q)=>{let W,R;const{props:Q,shapeFlag:le,transition:se,dirs:we}=p;if(W=p.el=i(p.type,M,Q&&Q.is,Q),le&8?u(W,p.children):le&16&&Y(p.children,W,null,L,D,oa(p,M),J,q),we&&lr(p,null,L,"created"),de(W,p,p.scopeId,J,L),Q){for(const Fe in Q)Fe!=="value"&&!ro(Fe)&&s(W,Fe,null,Q[Fe],M,L);"value"in Q&&s(W,"value",null,Q.value,M),(R=Q.onVnodeBeforeMount)&&Jt(R,L,p)}g.NODE_ENV!=="production"&&(ns(W,"__vnode",p,!0),ns(W,"__vueParentComponent",L,!0)),we&&lr(p,null,L,"beforeMount");const Se=Am(D,se);Se&&se.beforeEnter(W),r(W,h,k),((R=Q&&Q.onVnodeMounted)||Se||we)&&_t(()=>{R&&Jt(R,L,p),Se&&se.enter(W),we&&lr(p,null,L,"mounted")},D)},de=(p,h,k,L,D)=>{if(k&&m(p,k),L)for(let M=0;M<L.length;M++)m(p,L[M]);if(D){let M=D.subTree;if(g.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=la(M.children)||M),h===M){const J=D.vnode;de(p,J,J.scopeId,J.slotScopeIds,D.parent)}}},Y=(p,h,k,L,D,M,J,q,W=0)=>{for(let R=W;R<p.length;R++){const Q=p[R]=q?Rn(p[R]):jt(p[R]);E(null,Q,h,k,L,D,M,J,q)}},V=(p,h,k,L,D,M,J)=>{const q=h.el=p.el;g.NODE_ENV!=="production"&&(q.__vnode=h);let{patchFlag:W,dynamicChildren:R,dirs:Q}=h;W|=p.patchFlag&16;const le=p.props||Me,se=h.props||Me;let we;if(k&&fr(k,!1),(we=se.onVnodeBeforeUpdate)&&Jt(we,k,h,p),Q&&lr(h,p,k,"beforeUpdate"),k&&fr(k,!0),g.NODE_ENV!=="production"&&Dn&&(W=0,J=!1,R=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&u(q,""),R?(P(p.dynamicChildren,R,q,k,L,oa(h,D),M),g.NODE_ENV!=="production"&&yo(p,h)):J||ce(p,h,q,null,k,L,oa(h,D),M,!1),W>0){if(W&16)j(q,le,se,k,D);else if(W&2&&le.class!==se.class&&s(q,"class",null,se.class,D),W&4&&s(q,"style",le.style,se.style,D),W&8){const Se=h.dynamicProps;for(let Fe=0;Fe<Se.length;Fe++){const Ve=Se[Fe],rt=le[Ve],Mt=se[Ve];(Mt!==rt||Ve==="value")&&s(q,Ve,rt,Mt,D,k)}}W&1&&p.children!==h.children&&u(q,h.children)}else!J&&R==null&&j(q,le,se,k,D);((we=se.onVnodeUpdated)||Q)&&_t(()=>{we&&Jt(we,k,h,p),Q&&lr(h,p,k,"updated")},L)},P=(p,h,k,L,D,M,J)=>{for(let q=0;q<h.length;q++){const W=p[q],R=h[q],Q=W.el&&(W.type===Ce||!hr(W,R)||W.shapeFlag&70)?d(W.el):k;E(W,R,Q,null,L,D,M,J,!0)}},j=(p,h,k,L,D)=>{if(h!==k){if(h!==Me)for(const M in h)!ro(M)&&!(M in k)&&s(p,M,h[M],null,D,L);for(const M in k){if(ro(M))continue;const J=k[M],q=h[M];J!==q&&M!=="value"&&s(p,M,q,J,D,L)}"value"in k&&s(p,"value",h.value,k.value,D)}},oe=(p,h,k,L,D,M,J,q,W)=>{const R=h.el=p?p.el:a(""),Q=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Dn||le&2048)&&(le=0,W=!1,se=null),we&&(q=q?q.concat(we):we),p==null?(r(R,k,L),r(Q,k,L),Y(h.children||[],k,Q,D,M,J,q,W)):le>0&&le&64&&se&&p.dynamicChildren?(P(p.dynamicChildren,se,k,D,M,J,q),g.NODE_ENV!=="production"?yo(p,h):(h.key!=null||D&&h===D.subTree)&&yo(p,h,!0)):ce(p,h,k,Q,D,M,J,q,W)},w=(p,h,k,L,D,M,J,q,W)=>{h.slotScopeIds=q,p==null?h.shapeFlag&512?D.ctx.activate(h,k,L,J,W):I(h,k,L,D,M,J,W):ne(p,h,W)},I=(p,h,k,L,D,M,J)=>{const q=p.component=Qm(p,L,D);if(g.NODE_ENV!=="production"&&q.type.__hmrId&&Ch(q),g.NODE_ENV!=="production"&&(ms(p),pn(q,"mount")),mo(p)&&(q.ctx.renderer=jo),g.NODE_ENV!=="production"&&pn(q,"init"),tv(q,!1,J),g.NODE_ENV!=="production"&&hn(q,"init"),q.asyncDep){if(D&&D.registerDep(q,ae,J),!p.el){const W=q.subTree=B(Ke);A(null,W,h,k)}}else ae(q,p,h,k,D,M,J);g.NODE_ENV!=="production"&&(vs(),hn(q,"mount"))},ne=(p,h,k)=>{const L=h.component=p.component;if(Hm(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&ms(h),re(L,h,k),g.NODE_ENV!=="production"&&vs();return}else L.next=h,xh(L.update),L.effect.dirty=!0,L.update();else h.el=p.el,L.vnode=h},ae=(p,h,k,L,D,M,J)=>{const q=()=>{if(p.isMounted){let{next:Q,bu:le,u:se,parent:we,vnode:Se}=p;{const Lr=Jc(p);if(Lr){Q&&(Q.el=Se.el,re(p,Q,J)),Lr.asyncDep.then(()=>{p.isUnmounted||q()});return}}let Fe=Q,Ve;g.NODE_ENV!=="production"&&ms(Q||p.vnode),fr(p,!1),Q?(Q.el=Se.el,re(p,Q,J)):Q=Se,le&&oo(le),(Ve=Q.props&&Q.props.onVnodeBeforeUpdate)&&Jt(Ve,we,Q,Se),fr(p,!0),g.NODE_ENV!=="production"&&pn(p,"render");const rt=aa(p);g.NODE_ENV!=="production"&&hn(p,"render");const Mt=p.subTree;p.subTree=rt,g.NODE_ENV!=="production"&&pn(p,"patch"),E(Mt,rt,d(Mt.el),si(Mt),p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),Q.el=rt.el,Fe===null&&Zm(p,rt.el),se&&_t(se,D),(Ve=Q.props&&Q.props.onVnodeUpdated)&&_t(()=>Jt(Ve,we,Q,Se),D),g.NODE_ENV!=="production"&&hc(p),g.NODE_ENV!=="production"&&vs()}else{let Q;const{el:le,props:se}=h,{bm:we,m:Se,parent:Fe}=p,Ve=ho(h);if(fr(p,!1),we&&oo(we),!Ve&&(Q=se&&se.onVnodeBeforeMount)&&Jt(Q,Fe,h),fr(p,!0),le&&zd){const rt=()=>{g.NODE_ENV!=="production"&&pn(p,"render"),p.subTree=aa(p),g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"hydrate"),zd(le,p.subTree,p,D,null),g.NODE_ENV!=="production"&&hn(p,"hydrate")};Ve?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{g.NODE_ENV!=="production"&&pn(p,"render");const rt=p.subTree=aa(p);g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"patch"),E(null,rt,k,L,p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),h.el=rt.el}if(Se&&_t(Se,D),!Ve&&(Q=se&&se.onVnodeMounted)){const rt=h;_t(()=>Jt(Q,Fe,rt),D)}(h.shapeFlag&256||Fe&&ho(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&p.a&&_t(p.a,D),p.isMounted=!0,g.NODE_ENV!=="production"&&Ah(p),h=k=L=null}},W=p.effect=new Si(q,We,()=>gs(R),p.scope),R=p.update=()=>{W.dirty&&W.run()};R.i=p,R.id=p.uid,fr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?Q=>oo(p.rtc,Q):void 0,W.onTrigger=p.rtg?Q=>oo(p.rtg,Q):void 0),R()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,vm(p,h.props,L,k),xm(p,h.children,k),sn(),lc(p),an()},ce=(p,h,k,L,D,M,J,q,W=!1)=>{const R=p&&p.children,Q=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:we}=h;if(se>0){if(se&128){je(R,le,k,L,D,M,J,q,W);return}else if(se&256){Ie(R,le,k,L,D,M,J,q,W);return}}we&8?(Q&16&&Ro(R,D,M),le!==R&&u(k,le)):Q&16?we&16?je(R,le,k,L,D,M,J,q,W):Ro(R,D,M,!0):(Q&8&&u(k,""),we&16&&Y(le,k,L,D,M,J,q,W))},Ie=(p,h,k,L,D,M,J,q,W)=>{p=p||$r,h=h||$r;const R=p.length,Q=h.length,le=Math.min(R,Q);let se;for(se=0;se<le;se++){const we=h[se]=W?Rn(h[se]):jt(h[se]);E(p[se],we,k,null,D,M,J,q,W)}R>Q?Ro(p,D,M,!0,!1,le):Y(h,k,L,D,M,J,q,W,le)},je=(p,h,k,L,D,M,J,q,W)=>{let R=0;const Q=h.length;let le=p.length-1,se=Q-1;for(;R<=le&&R<=se;){const we=p[R],Se=h[R]=W?Rn(h[R]):jt(h[R]);if(hr(we,Se))E(we,Se,k,null,D,M,J,q,W);else break;R++}for(;R<=le&&R<=se;){const we=p[le],Se=h[se]=W?Rn(h[se]):jt(h[se]);if(hr(we,Se))E(we,Se,k,null,D,M,J,q,W);else break;le--,se--}if(R>le){if(R<=se){const we=se+1,Se=we<Q?h[we].el:L;for(;R<=se;)E(null,h[R]=W?Rn(h[R]):jt(h[R]),k,Se,D,M,J,q,W),R++}}else if(R>se)for(;R<=le;)bt(p[R],D,M,!0),R++;else{const we=R,Se=R,Fe=new Map;for(R=Se;R<=se;R++){const yt=h[R]=W?Rn(h[R]):jt(h[R]);yt.key!=null&&(g.NODE_ENV!=="production"&&Fe.has(yt.key)&&U("Duplicate keys found during update:",JSON.stringify(yt.key),"Make sure keys are unique."),Fe.set(yt.key,R))}let Ve,rt=0;const Mt=se-Se+1;let Lr=!1,Kd=0;const Lo=new Array(Mt);for(R=0;R<Mt;R++)Lo[R]=0;for(R=we;R<=le;R++){const yt=p[R];if(rt>=Mt){bt(yt,D,M,!0);continue}let en;if(yt.key!=null)en=Fe.get(yt.key);else for(Ve=Se;Ve<=se;Ve++)if(Lo[Ve-Se]===0&&hr(yt,h[Ve])){en=Ve;break}en===void 0?bt(yt,D,M,!0):(Lo[en-Se]=R+1,en>=Kd?Kd=en:Lr=!0,E(yt,h[en],k,null,D,M,J,q,W),rt++)}const Gd=Lr?Vm(Lo):$r;for(Ve=Gd.length-1,R=Mt-1;R>=0;R--){const yt=Se+R,en=h[yt],Jd=yt+1<Q?h[yt+1].el:L;Lo[R]===0?E(null,en,k,Jd,D,M,J,q,W):Lr&&(Ve<0||R!==Gd[Ve]?nt(en,k,Jd,2):Ve--)}}},nt=(p,h,k,L,D=null)=>{const{el:M,type:J,transition:q,children:W,shapeFlag:R}=p;if(R&6){nt(p.component.subTree,h,k,L);return}if(R&128){p.suspense.move(h,k,L);return}if(R&64){J.move(p,h,k,jo);return}if(J===Ce){r(M,h,k);for(let le=0;le<W.length;le++)nt(W[le],h,k,L);r(p.anchor,h,k);return}if(J===bo){z(p,h,k);return}if(L!==2&&R&1&&q)if(L===0)q.beforeEnter(M),r(M,h,k),_t(()=>q.enter(M),D);else{const{leave:le,delayLeave:se,afterLeave:we}=q,Se=()=>r(M,h,k),Fe=()=>{le(M,()=>{Se(),we&&we()})};se?se(M,Se,Fe):Fe()}else r(M,h,k)},bt=(p,h,k,L=!1,D=!1)=>{const{type:M,props:J,ref:q,children:W,dynamicChildren:R,shapeFlag:Q,patchFlag:le,dirs:se,cacheIndex:we}=p;if(le===-2&&(D=!1),q!=null&&na(q,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),Q&256){h.ctx.deactivate(p);return}const Se=Q&1&&se,Fe=!ho(p);let Ve;if(Fe&&(Ve=J&&J.onVnodeBeforeUnmount)&&Jt(Ve,h,p),Q&6)Sw(p.component,k,L);else{if(Q&128){p.suspense.unmount(k,L);return}Se&&lr(p,null,h,"beforeUnmount"),Q&64?p.type.remove(p,h,k,jo,L):R&&!R.hasOnce&&(M!==Ce||le>0&&le&64)?Ro(R,h,k,!1,!0):(M===Ce&&le&384||!D&&Q&16)&&Ro(W,h,k),L&&bn(p)}(Fe&&(Ve=J&&J.onVnodeUnmounted)||Se)&&_t(()=>{Ve&&Jt(Ve,h,p),Se&&lr(p,null,h,"unmounted")},k)},bn=p=>{const{type:h,el:k,anchor:L,transition:D}=p;if(h===Ce){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&D&&!D.persisted?p.children.forEach(J=>{J.type===Ke?o(J.el):bn(J)}):Gn(k,L);return}if(h===bo){$(p);return}const M=()=>{o(k),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(p.shapeFlag&1&&D&&!D.persisted){const{leave:J,delayLeave:q}=D,W=()=>J(k,M);q?q(p.el,M,W):W()}else M()},Gn=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Sw=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&Th(p);const{bum:L,scope:D,update:M,subTree:J,um:q,m:W,a:R}=p;Yc(W),Yc(R),L&&oo(L),D.stop(),M&&(M.active=!1,bt(J,p,h,k)),q&&_t(q,h),_t(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&Rh(p)},Ro=(p,h,k,L=!1,D=!1,M=0)=>{for(let J=M;J<p.length;J++)bt(p[J],h,k,L,D)},si=p=>{if(p.shapeFlag&6)return si(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[qc];return k?f(k):h};let za=!1;const qd=(p,h,k)=>{p==null?h._vnode&&bt(h._vnode,null,null,!0):E(h._vnode||null,p,h,null,null,null,k),h._vnode=p,za||(za=!0,lc(),cc(),za=!1)},jo={p:E,um:bt,m:nt,r:bn,mt:I,mc:Y,pc:ce,pbc:P,n:si,o:e};let Wd,zd;return{render:qd,hydrate:Wd,createApp:fm(qd,Wd)}}function oa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function fr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Am(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yo(e,t,n=!1){const r=e.children,o=t.children;if(ie(r)&&ie(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Rn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&yo(i,a)),a.type===_o&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Vm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const c=e.length;for(r=0;r<c;r++){const l=e[r];if(l!==0){if(o=n[n.length-1],e[o]<l){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<l?s=a+1:i=a;l<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Jc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Jc(t)}function Yc(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Rm=Symbol.for("v-scx"),jm=()=>{{const e=$e(Rm);return e||g.NODE_ENV!=="production"&&U("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return sa(e,null,t)}const Cs={};function Xe(e,t,n){return g.NODE_ENV!=="production"&&!fe(t)&&U("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),sa(e,t,n)}function sa(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Me){if(t&&s){const x=t;t=(...de)=>{x(...de),Z()}}g.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&U('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),g.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=x=>{U("Invalid watch source: ",x,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=Ge,u=x=>r===!0?x:pr(x,r===!1?1:void 0);let d,f=!1,m=!1;if(He(e)?(d=()=>e.value,f=un(e)):ln(e)?(d=()=>u(e),f=!0):ie(e)?(m=!0,f=e.some(x=>ln(x)||un(x)),d=()=>e.map(x=>{if(He(x))return x.value;if(ln(x))return u(x);if(fe(x))return dn(x,l,2);g.NODE_ENV!=="production"&&c(x)})):fe(e)?t?d=()=>dn(e,l,2):d=()=>(y&&y(),kt(e,l,3,[E])):(d=We,g.NODE_ENV!=="production"&&c(e)),t&&r){const x=d;d=()=>pr(x())}let y,E=x=>{y=z.onStop=()=>{dn(x,l,4),y=z.onStop=void 0}},S;if(As)if(E=We,t?n&&kt(t,l,3,[d(),m?[]:void 0,E]):d(),o==="sync"){const x=jm();S=x.__watcherHandles||(x.__watcherHandles=[])}else return We;let A=m?new Array(e.length).fill(Cs):Cs;const F=()=>{if(!(!z.active||!z.dirty))if(t){const x=z.run();(r||f||(m?x.some((de,Y)=>Cn(de,A[Y])):Cn(x,A)))&&(y&&y(),kt(t,l,3,[x,A===Cs?void 0:m&&A[0]===Cs?[]:A,E]),A=x)}else z.run()};F.allowRecurse=!!t;let C;o==="sync"?C=F:o==="post"?C=()=>_t(F,l&&l.suspense):(F.pre=!0,l&&(F.id=l.uid),C=()=>gs(F));const z=new Si(d,We,C),$=Tl(),Z=()=>{z.stop(),$&&yi($.effects,z)};return g.NODE_ENV!=="production"&&(z.onTrack=i,z.onTrigger=a),t?n?F():A=z.run():o==="post"?_t(z.run.bind(z),l&&l.suspense):z.run(),S&&S.push(Z),Z}function Lm(e,t,n){const r=this.proxy,o=Be(e)?e.includes(".")?Xc(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=Oo(this),a=sa(o,s.bind(r),n);return i(),a}function Xc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function pr(e,t=1/0,n){if(t<=0||!De(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,He(e))pr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)pr(e[r],t,n);else if(bl(e)||er(e))e.forEach(r=>{pr(r,t,n)});else if(El(e)){for(const r in e)pr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&pr(e[r],t,n)}return e}const Mm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${on(t)}Modifiers`];function Um(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Me;if(g.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(nr(Et(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${nr(Et(t))}" prop.`);else{const f=u[t];fe(f)&&(f(...n)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Mm(r,t.slice(7));if(i&&(i.trim&&(o=n.map(u=>Be(u)?u.trim():u)),i.number&&(o=n.map(Cp))),g.NODE_ENV!=="production"&&Mh(e,t,o),g.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&r[nr(u)]&&U(`Event "${u}" is emitted in component ${Vs(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${on(t)}" instead of "${t}".`)}let a,c=r[a=nr(t)]||r[a=nr(Et(t))];!c&&s&&(c=r[a=nr(on(t))]),c&&kt(c,e,6,o);const l=r[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,kt(l,e,6,o)}}function Qc(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!fe(e)){const c=l=>{const u=Qc(l,t,!0);u&&(a=!0,qe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!a?(De(e)&&r.set(e,null),null):(ie(s)?s.forEach(c=>i[c]=null):qe(i,s),De(e)&&r.set(e,i),i)}function Ts(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,on(t))||Ne(e,t))}let ia=!1;function Ps(){ia=!0}function aa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:d,data:f,setupState:m,ctx:y,inheritAttrs:E}=e,S=ws(e);let A,F;g.NODE_ENV!=="production"&&(ia=!1);try{if(n.shapeFlag&4){const $=o||r,Z=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy($,{get(x,de,Y){return U(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(x,de,Y)}}):$;A=jt(l.call(Z,$,u,g.NODE_ENV!=="production"?Wt(d):d,m,f,y)),F=a}else{const $=t;g.NODE_ENV!=="production"&&a===d&&Ps(),A=jt($.length>1?$(g.NODE_ENV!=="production"?Wt(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ps(),Wt(a)},slots:i,emit:c}:{attrs:a,slots:i,emit:c}):$(g.NODE_ENV!=="production"?Wt(d):d,null)),F=t.props?a:Fm(a)}}catch($){wo.length=0,ao($,e,1),A=B(Ke)}let C=A,z;if(g.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([C,z]=eu(A)),F&&E!==!1){const $=Object.keys(F),{shapeFlag:Z}=C;if($.length){if(Z&7)s&&$.some(Qo)&&(F=Bm(F,s)),C=Rt(C,F,!1,!0);else if(g.NODE_ENV!=="production"&&!ia&&C.type!==Ke){const x=Object.keys(a),de=[],Y=[];for(let V=0,P=x.length;V<P;V++){const j=x[V];no(j)?Qo(j)||de.push(j[2].toLowerCase()+j.slice(3)):Y.push(j)}Y.length&&U(`Extraneous non-props attributes (${Y.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),de.length&&U(`Extraneous non-emits event listeners (${de.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Rt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),C.transition=n.transition),g.NODE_ENV!=="production"&&z?z(C):A=C,ws(S),A}const eu=e=>{const t=e.children,n=e.dynamicChildren,r=la(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return eu(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[jt(r),i]};function la(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Dr(o)){if(o.type!==Ke||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return la(n.children)}}else return}return n}const Fm=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},Bm=(e,t)=>{const n={};for(const r in e)(!Qo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},tu=e=>e.shapeFlag&7||e.type===Ke;function Hm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:c}=t,l=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Dn||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?nu(r,i,l):!!i;if(c&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==r[f]&&!Ts(l,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?nu(r,i,l):!0:!!i;return!1}function nu(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Ts(n,s))return!0}return!1}function Zm({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const qm=e=>e.__isSuspense;function Wm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):ac(e)}const Ce=Symbol.for("v-fgt"),_o=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),wo=[];let Nt=null;function _(e=!1){wo.push(Nt=e?null:[])}function zm(){wo.pop(),Nt=wo[wo.length-1]||null}let Eo=1;function ru(e){Eo+=e,e<0&&Nt&&(Nt.hasOnce=!0)}function ou(e){return e.dynamicChildren=Eo>0?Nt||$r:null,zm(),Eo>0&&Nt&&Nt.push(e),e}function N(e,t,n,r,o,s){return ou(O(e,t,n,r,o,s,!0))}function xe(e,t,n,r,o){return ou(B(e,t,n,r,o,!0))}function Dr(e){return e?e.__v_isVNode===!0:!1}function hr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ys.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Km=(...e)=>iu(...e),su=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||He(e)||fe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function O(e,t=null,n=null,r=0,o=null,s=e===Ce?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&su(t),ref:t&&$s(t),scopeId:bs,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ye};return a?(ca(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=Be(n)?8:16),g.NODE_ENV!=="production"&&c.key!==c.key&&U("VNode created with invalid key (NaN). VNode type:",c.type),Eo>0&&!i&&Nt&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Nt.push(c),c}const B=g.NODE_ENV!=="production"?Km:iu;function iu(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Oc)&&(g.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),Dr(e)){const a=Rt(e,t,!0);return n&&ca(a,n),Eo>0&&!s&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(pu(e)&&(e=e.__vccOpts),t){t=Gm(t);let{class:a,style:c}=t;a&&!Be(a)&&(t.class=rs(a)),De(c)&&(ps(c)&&!ie(c)&&(c=qe({},c)),t.style=Oi(c))}const i=Be(e)?1:qm(e)?128:km(e)?64:De(e)?4:fe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&ps(e)&&(e=ge(e),U("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
15
15
|
Component that was made reactive: `,e)),O(e,t,n,r,o,i,s,!0)}function Gm(e){return e?ps(e)||Vc(e)?qe({},e):e:null}function Rt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:c}=e,l=t?ua(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&su(l),ref:t&&t.ref?n&&s?ie(s)?s.concat($s(t)):[s,$s(t)]:$s(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(au):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rt(e.ssContent),ssFallback:e.ssFallback&&Rt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Os(u,c.clone(u)),u}function au(e){const t=Rt(e);return ie(e.children)&&(t.children=e.children.map(au)),t}function Te(e=" ",t=0){return B(_o,null,e,t)}function Jm(e,t){const n=B(bo,null,e);return n.staticCount=t,n}function me(e="",t=!1){return t?(_(),xe(Ke,null,e)):B(Ke,null,e)}function jt(e){return e==null||typeof e=="boolean"?B(Ke):ie(e)?B(Ce,null,e.slice()):typeof e=="object"?Rn(e):B(_o,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rt(e)}function ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ie(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),ca(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Ye},n=32):(t=String(t),r&64?(n=16,t=[Te(t)]):n=8);e.children=t,e.shapeFlag|=n}function ua(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=rs([t.class,r.class]));else if(o==="style")t.style=Oi([t.style,r.style]);else if(no(o)){const s=t[o],i=r[o];i&&s!==i&&!(ie(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Jt(e,t,n,r=null){kt(e,t,7,[n,r])}const Ym=Ic();let Xm=0;function Qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Ym,s={uid:Xm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new kl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jc(r,o),emitsOptions:Qc(r,o),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:r.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=nm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Um.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const Is=()=>Ge||Ye;let Ds,da;{const e=Ei(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ds=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),da=t("__VUE_SSR_SETTERS__",n=>As=n)}const Oo=e=>{const t=Ge;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},lu=()=>{Ge&&Ge.scope.off(),Ds(null)},ev=rn("slot,component");function fa(e,{isNativeTag:t}){(ev(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function cu(e){return e.vnode.shapeFlag&4}let As=!1;function tv(e,t=!1,n=!1){t&&da(t);const{props:r,children:o}=e.vnode,s=cu(e);hm(e,r,s,t),Sm(e,o,n);const i=s?nv(e,t):void 0;return t&&da(!1),i}function nv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&fa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)fa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)vc(s[i])}r.compilerOptions&&rv()&&U('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,xc),g.NODE_ENV!=="production"&&rm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?sv(e):null,i=Oo(e);sn();const a=dn(o,e,0,[g.NODE_ENV!=="production"?Wt(e.props):e.props,s]);if(an(),i(),_i(a)){if(a.then(lu,lu),t)return a.then(c=>{uu(e,c,t)}).catch(c=>{ao(c,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const c=(n=r.name)!=null?n:"Anonymous";U(`Component <${c}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else uu(e,a,t)}else du(e,t)}function uu(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:De(t)?(g.NODE_ENV!=="production"&&Dr(t)&&U("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=tc(t),g.NODE_ENV!=="production"&&om(e)):g.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),du(e,n)}let pa;const rv=()=>!pa;function du(e,t,n){const r=e.type;if(!e.render){if(!t&&pa&&!r.render){const o=r.template||Yi(e).template;if(o){g.NODE_ENV!=="production"&&pn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:c}=r,l=qe(qe({isCustomElement:s,delimiters:a},i),c);r.render=pa(o,l),g.NODE_ENV!=="production"&&hn(e,"compile")}}e.render=r.render||We}{const o=Oo(e);sn();try{im(e)}finally{an(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===We&&!t&&(r.template?U('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):U("Component is missing template or render function: ",r))}const fu=g.NODE_ENV!=="production"?{get(e,t){return Ps(),ot(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return ot(e,"get",""),e[t]}};function ov(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function sv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ie(n)?r="array":He(n)&&(r="ref")),r!=="object"&&U(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,fu))},get slots(){return r||(r=ov(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function ha(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tc($n(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cr)return cr[n](e)},has(t,n){return n in t||n in cr}})):e.proxy}const iv=/(?:^|[-_])(\w)/g,av=e=>e.replace(iv,t=>t.toUpperCase()).replace(/[-_]/g,"");function ma(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Vs(e,t,n=!1){let r=ma(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?av(r):n?"App":"Anonymous"}function pu(e){return fe(e)&&"__vccOpts"in e}const X=(e,t)=>{const n=dh(e,t,As);if(g.NODE_ENV!=="production"){const r=Is();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Le(e,t,n){const r=arguments.length;return r===2?De(t)&&!ie(t)?Dr(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Dr(n)&&(n=[n]),B(e,t,n))}function lv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return De(d)?d.__isVue?["div",e,"VueInstance"]:He(d)?["div",{},["span",e,u(d)],"<",a(d.value),">"]:ln(d)?["div",{},["span",e,un(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${cn(d)?" (readonly)":""}`]:cn(d)?["div",{},["span",e,un(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ge(d.props))),d.setupState!==Me&&f.push(i("setup",d.setupState)),d.data!==Me&&f.push(i("data",ge(d.data)));const m=c(d,"computed");m&&f.push(i("computed",m));const y=c(d,"inject");return y&&f.push(i("injected",y)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=qe({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:De(d)?["object",{object:f?ge(d):d}]:["span",n,String(d)]}function c(d,f){const m=d.type;if(fe(m))return;const y={};for(const E in d.ctx)l(m,E,f)&&(y[E]=d.ctx[E]);return y}function l(d,f,m){const y=d[m];if(ie(y)&&y.includes(f)||De(y)&&f in y||d.extends&&l(d.extends,f,m)||d.mixins&&d.mixins.some(E=>l(E,f,m)))return!0}function u(d){return un(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const hu="3.4.38",jn=g.NODE_ENV!=="production"?U:We;var mn={};const cv="http://www.w3.org/2000/svg",uv="http://www.w3.org/1998/Math/MathML",vn=typeof document<"u"?document:null,mu=vn&&vn.createElement("template"),dv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?vn.createElementNS(cv,e):t==="mathml"?vn.createElementNS(uv,e):n?vn.createElement(e,{is:n}):vn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>vn.createTextNode(e),createComment:e=>vn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{mu.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=mu.content;if(r==="svg"||r==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ln="transition",No="animation",So=Symbol("_vtc"),xo=(e,{slots:t})=>Le(Hh,fv(e),t);xo.displayName="Transition";const vu={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};xo.props=qe({},gc,vu);const mr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function fv(e){const t={};for(const j in e)j in vu||(t[j]=e[j]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:l=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,y=pv(o),E=y&&y[0],S=y&&y[1],{onBeforeEnter:A,onEnter:F,onEnterCancelled:C,onLeave:z,onLeaveCancelled:$,onBeforeAppear:Z=A,onAppear:x=F,onAppearCancelled:de=C}=t,Y=(j,oe,w)=>{vr(j,oe?u:a),vr(j,oe?l:i),w&&w()},V=(j,oe)=>{j._isLeaving=!1,vr(j,d),vr(j,m),vr(j,f),oe&&oe()},P=j=>(oe,w)=>{const I=j?x:F,ne=()=>Y(oe,j,w);mr(I,[oe,ne]),yu(()=>{vr(oe,j?c:s),Mn(oe,j?u:a),gu(I)||_u(oe,r,E,ne)})};return qe(t,{onBeforeEnter(j){mr(A,[j]),Mn(j,s),Mn(j,i)},onBeforeAppear(j){mr(Z,[j]),Mn(j,c),Mn(j,l)},onEnter:P(!1),onAppear:P(!0),onLeave(j,oe){j._isLeaving=!0;const w=()=>V(j,oe);Mn(j,d),Mn(j,f),vv(),yu(()=>{j._isLeaving&&(vr(j,d),Mn(j,m),gu(z)||_u(j,r,S,w))}),mr(z,[j,w])},onEnterCancelled(j){Y(j,!1),mr(C,[j])},onAppearCancelled(j){Y(j,!0),mr(de,[j])},onLeaveCancelled(j){V(j),mr($,[j])}})}function pv(e){if(e==null)return null;if(De(e))return[va(e.enter),va(e.leave)];{const t=va(e);return[t,t]}}function va(e){const t=Tp(e);return mn.NODE_ENV!=="production"&&Eh(t,"<transition> explicit duration"),t}function Mn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[So]||(e[So]=new Set)).add(t)}function vr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[So];n&&(n.delete(t),n.size||(e[So]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hv=0;function _u(e,t,n,r){const o=e._endId=++hv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:c}=mv(e,t);if(!i)return r();const l=i+"end";let u=0;const d=()=>{e.removeEventListener(l,f),s()},f=m=>{m.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},a+1),e.addEventListener(l,f)}function mv(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${Ln}Delay`),s=r(`${Ln}Duration`),i=bu(o,s),a=r(`${No}Delay`),c=r(`${No}Duration`),l=bu(a,c);let u=null,d=0,f=0;t===Ln?i>0&&(u=Ln,d=i,f=s.length):t===No?l>0&&(u=No,d=l,f=c.length):(d=Math.max(i,l),u=d>0?i>l?Ln:No:null,f=u?u===Ln?s.length:c.length:0);const m=u===Ln&&/\b(transform|all)(,|$)/.test(r(`${Ln}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:m}}function bu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>wu(n)+wu(e[r])))}function wu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vv(){return document.body.offsetHeight}function gv(e,t,n){const r=e[So];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Eu=Symbol("_vod"),yv=Symbol("_vsh"),_v=Symbol(mn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),bv=/(^|;)\s*display\s*:/;function wv(e,t,n){const r=e.style,o=Be(n);let s=!1;if(n&&!o){if(t)if(Be(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Rs(r,a,"")}else for(const i in t)n[i]==null&&Rs(r,i,"");for(const i in n)i==="display"&&(s=!0),Rs(r,i,n[i])}else if(o){if(t!==n){const i=r[_v];i&&(n+=";"+i),r.cssText=n,s=bv.test(n)}}else t&&e.removeAttribute("style");Eu in e&&(e[Eu]=s?r.display:"",e[yv]&&(r.display="none"))}const Ev=/[^\\];\s*$/,Ou=/\s*!important$/;function Rs(e,t,n){if(ie(n))n.forEach(r=>Rs(e,t,r));else if(n==null&&(n=""),mn.NODE_ENV!=="production"&&Ev.test(n)&&jn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Ov(e,t);Ou.test(n)?e.setProperty(on(r),n.replace(Ou,""),"important"):e[r]=n}}const Nu=["Webkit","Moz","ms"],ga={};function Ov(e,t){const n=ga[t];if(n)return n;let r=Et(t);if(r!=="filter"&&r in e)return ga[t]=r;r=tr(r);for(let o=0;o<Nu.length;o++){const s=Nu[o]+r;if(s in e)return ga[t]=s}return t}const Su="http://www.w3.org/1999/xlink";function xu(e,t,n,r,o,s=Up(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Su,t.slice(6,t.length)):e.setAttributeNS(Su,t,n):n==null||s&&!Nl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":kn(n)?String(n):n)}function Nv(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Nl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){mn.NODE_ENV!=="production"&&!s&&jn(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function Sv(e,t,n,r){e.addEventListener(t,n,r)}function xv(e,t,n,r){e.removeEventListener(t,n,r)}const ku=Symbol("_vei");function kv(e,t,n,r,o=null){const s=e[ku]||(e[ku]={}),i=s[t];if(r&&i)i.value=mn.NODE_ENV!=="production"?Tu(r,t):r;else{const[a,c]=Cv(t);if(r){const l=s[t]=$v(mn.NODE_ENV!=="production"?Tu(r,t):r,o);Sv(e,a,l,c)}else i&&(xv(e,a,i,c),s[t]=void 0)}}const Cu=/(?:Once|Passive|Capture)$/;function Cv(e){let t;if(Cu.test(e)){t={};let r;for(;r=e.match(Cu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):on(e.slice(2)),t]}let ya=0;const Tv=Promise.resolve(),Pv=()=>ya||(Tv.then(()=>ya=0),ya=Date.now());function $v(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;kt(Iv(r,n.value),t,5,[r])};return n.value=e,n.attached=Pv(),n}function Tu(e,t){return fe(e)||ie(e)?e:(jn(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
16
|
-
Expected function or array of functions, received type ${typeof e}.`),We)}function Iv(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Pu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?gv(e,r,i):t==="style"?wv(e,n,r):no(t)?Qo(t)||kv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Av(e,t,r,i))?(Nv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),xu(e,t,r,i))};function Av(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Pu(t)&&Be(n)?!1:t in e}const Vv=["ctrl","shift","alt","meta"],Rv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vv.some(n=>e[`${n}Key`]&&!t.includes(n))},jv=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=Rv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Lv=qe({patchProp:Dv},dv);let $u;function Mv(){return $u||($u=Im(Lv))}const Uv=(...e)=>{const t=Mv().createApp(...e);mn.NODE_ENV!=="production"&&(Bv(t),Hv(t));const{mount:n}=t;return t.mount=r=>{const o=Zv(r);if(!o)return;const s=t._component;!fe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Fv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Fv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>jp(t)||Lp(t)||Mp(t),writable:!1})}function Hv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){jn("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return jn(r),n},set(){jn(r)}})}}function Zv(e){if(Be(e)){const t=document.querySelector(e);return mn.NODE_ENV!=="production"&&!t&&jn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return mn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&jn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var qv={};function Wv(){lv()}qv.NODE_ENV!=="production"&&Wv();let js;const zv=new Uint8Array(16);function Kv(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(zv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Gv(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const Iu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _a(e,t,n){if(Iu.randomUUID&&!t&&!e)return Iu.randomUUID();e=e||{};const r=e.random||(e.rng||Kv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gv(r)}var Un=Symbol("storefront");function Jv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Yv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),next:v.string().optional()}),Xv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed")}),Qv=v.discriminatedUnion("event",[Yv,Xv]);function Du(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.height="100%",t.width="100%",document.body.append(t),window.onmessage=function(n){var r;try{const o=Qv.parse(n.data);o.event==="close"&&(document.body.contains(t)&&document.body.removeChild(t),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Ls=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=X(()=>!!this.utm.value&&Object.values(this.utm.value).some(c=>!!c)),this.currentUser=T(null),this.loadedUser=T(!1),this.debouncedPushOrderContent=Jv(c=>this.client.orders.pushContent(c,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",c=>this.handleStorageUpdate(c));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=T(JSON.parse(i)),this.refreshOrder()):this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const c=new URLSearchParams(window.location.search),l=c.get("mb_intent"),u=c.get("mb_endpoint");if(l==="checkout"&&c.get("mb_complete")&&u){const d=Object.fromEntries([...c.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);Du(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Xe(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Xe(this.loadedUser,n=>{n&&t()},{immediate:!0})})}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",()=>t())}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.next))}install(t){t.provide(Un,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==eo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:_a(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:eo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ls.userKey="moonbase_user",Ls.sessionKey="moonbase_session",Ls.storefrontKey="moonbase_storefront";var eg=Ls;function Au(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Vu(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ms(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function tg(e,t){const n=$e(Un),r=hh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),c=n.stateFactory(`activation-request-${r}-completing`,!1),l=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ht.Completed,c.value=!1):l.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ht.Fulfilled&&(c.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Zi(()=>{l.value&&clearTimeout(l.value)}),Xe(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Ht.Fulfilled&&(c.value=!0,u())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:c,error:s,isInstalled:X(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ht.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,c.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,c.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ht.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ng(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}}}}function ba(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{items:X(()=>t.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=t.storefront.value.products.find(i=>i.id===n.productId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:s,price:s==null?void 0:s.price}}else{const r=t.storefront.value.bundles.find(i=>i.id===n.bundleId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:s,price:s==null?void 0:s.price}}})),currency:X(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:X(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,c,l,u,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(c=(a=E==null?void 0:E.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?c:0}else{const m=t.storefront.value.bundles.find(S=>S.id===s.bundleId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(l=m==null?void 0:m.defaultVariation)==null?void 0:l.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{Du(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else if(o.checkoutUrl&&typeof window<"u")window.location.href=o.checkoutUrl;else throw new Error("No checkout URL found")}}}function St(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,c)=>{const l=await t.client.identity.signUp(n,r,o,s,i,a,c);return t.currentUser.value=l,t.updateStorefront(),l},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await t.client.identity.confirmEmailChange(n,r),t.updateUser()}}}function rg(e,t){const n={endpoint:e};return new eg(n,new Ep(n),(r,o)=>T(o))}var Ru=!1;function Us(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function wa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function og(){return ju().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ju(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const sg=typeof Proxy=="function",ig="devtools-plugin:setup",ag="plugin:settings:set";let Ar,Ea;function lg(){var e;return Ar!==void 0||(typeof window<"u"&&window.performance?(Ar=!0,Ea=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ar=!0,Ea=globalThis.perf_hooks.performance):Ar=!1),Ar}function cg(){return lg()?Ea.now():Date.now()}class ug{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return cg()}},n&&n.on(ag,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(l=>{this.targetQueue.push({method:a,args:c,resolve:l})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Lu(e,t){const n=e,r=ju(),o=og(),s=sg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ig,e,t);else{const i=s?new ug(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Pe={};let ko;const Co=e=>ko=e,Mu=Pe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function gr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yt||(Yt={}));const yr=typeof window<"u",Uu=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function dg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Oa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Hu(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Fu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Fs(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Bs=typeof navigator=="object"?navigator:{userAgent:""},Bu=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),Hu=yr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Bu?fg:"msSaveOrOpenBlob"in Bs?pg:hg:()=>{};function fg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Fu(r.href)?Oa(e,t,n):(r.target="_blank",Fs(r)):Fs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Fs(r)},0))}function pg(e,t="download",n){if(typeof e=="string")if(Fu(e))Oa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Fs(r)})}else navigator.msSaveOrOpenBlob(dg(e,n),t)}function hg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Oa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Uu.HTMLElement))||"safari"in Uu,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Bu)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let c=a.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function tt(e,t){const n="π "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Na(e){return"_a"in e&&"install"in e}function Zu(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function qu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(tt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function mg(e){if(!Zu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(qu(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vg(e){if(!Zu())try{Wu(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(qu(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function gg(e){try{Hu(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){tt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let gn;function yg(){gn||(gn=document.createElement("input"),gn.type="file",gn.accept=".json");function e(){return new Promise((t,n)=>{gn.onchange=async()=>{const r=gn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},gn.oncancel=()=>t(null),gn.onerror=n,gn.click()})}return e}async function _g(e){try{const n=await yg()();if(!n)return;const{text:r,file:o}=n;Wu(e,JSON.parse(r)),tt(`Global state imported from "${o.name}".`)}catch(t){tt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Wu(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Lt(e){return{_custom:{display:e}}}const zu="π Pinia (root)",Hs="_root";function bg(e){return Na(e)?{id:Hs,label:zu}:{id:e.$id,label:e.$id}}function wg(e){if(Na(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,c)=>(a[c]=i[c],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Eg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Lt(e.type),key:Lt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Og(e){switch(e){case Yt.direct:return"mutation";case Yt.patchFunction:return"$patch";case Yt.patchObject:return"$patch";default:return"unknown"}}let Vr=!0;const Zs=[],_r="pinia:mutations",pt="pinia",{assign:Ng}=Object,qs=e=>"π "+e;function Sg(e,t){Lu({id:"dev.esm.pinia",label:"Pinia π",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e},n=>{typeof n.now!="function"&&tt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:_r,label:"Pinia π",color:15064968}),n.addInspector({id:pt,label:"Pinia π",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{mg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{gg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await _g(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?tt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),tt(`Store "${r}" reset.`)):tt(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:qs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ge(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:qs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(u){c[l]=u}return c},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):zu.toLowerCase().includes(r.filter.toLowerCase())):o).map(bg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Hs&&(globalThis.$store=ge(o)),r.state=wg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Na(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Vr=!1,r.set(s,i,r.state.value),Vr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("π")){const o=r.type.replace(/^π\s*/,""),s=t._s.get(o);if(!s)return tt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return tt(`Invalid path for store "${o}":
|
|
16
|
+
Expected function or array of functions, received type ${typeof e}.`),We)}function Iv(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Pu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?gv(e,r,i):t==="style"?wv(e,n,r):no(t)?Qo(t)||kv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Av(e,t,r,i))?(Nv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),xu(e,t,r,i))};function Av(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Pu(t)&&Be(n)?!1:t in e}const Vv=["ctrl","shift","alt","meta"],Rv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vv.some(n=>e[`${n}Key`]&&!t.includes(n))},jv=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=Rv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Lv=qe({patchProp:Dv},dv);let $u;function Mv(){return $u||($u=Im(Lv))}const Uv=(...e)=>{const t=Mv().createApp(...e);mn.NODE_ENV!=="production"&&(Bv(t),Hv(t));const{mount:n}=t;return t.mount=r=>{const o=Zv(r);if(!o)return;const s=t._component;!fe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Fv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Fv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>jp(t)||Lp(t)||Mp(t),writable:!1})}function Hv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){jn("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return jn(r),n},set(){jn(r)}})}}function Zv(e){if(Be(e)){const t=document.querySelector(e);return mn.NODE_ENV!=="production"&&!t&&jn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return mn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&jn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var qv={};function Wv(){lv()}qv.NODE_ENV!=="production"&&Wv();let js;const zv=new Uint8Array(16);function Kv(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(zv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Gv(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const Iu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _a(e,t,n){if(Iu.randomUUID&&!t&&!e)return Iu.randomUUID();e=e||{};const r=e.random||(e.rng||Kv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gv(r)}var Un=Symbol("storefront");function Jv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Yv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),next:v.string().optional()}),Xv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed")}),Qv=v.discriminatedUnion("event",[Yv,Xv]);function Du(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.height="100%",t.width="100%",document.body.append(t),window.onmessage=function(n){var r;try{const o=Qv.parse(n.data);o.event==="close"&&(document.body.contains(t)&&document.body.removeChild(t),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Ls=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=X(()=>!!this.utm.value&&Object.values(this.utm.value).some(c=>!!c)),this.currentUser=T(null),this.loadedUser=T(!1),this.debouncedPushOrderContent=Jv(c=>this.client.orders.pushContent(c,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",c=>this.handleStorageUpdate(c));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=T(JSON.parse(i)),this.refreshOrder()):this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const c=new URLSearchParams(window.location.search),l=c.get("mb_intent"),u=c.get("mb_endpoint");if(l==="checkout"&&c.get("mb_complete")&&u){const d=Object.fromEntries([...c.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);Du(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Xe(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Xe(this.loadedUser,n=>{n&&t()},{immediate:!0})})}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",()=>t())}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.next))}install(t){t.provide(Un,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==eo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:_a(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:eo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ls.userKey="moonbase_user",Ls.sessionKey="moonbase_session",Ls.storefrontKey="moonbase_storefront";var eg=Ls;function Au(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Vu(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ms(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function tg(e,t){const n=$e(Un),r=hh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),c=n.stateFactory(`activation-request-${r}-completing`,!1),l=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ht.Completed,c.value=!1):l.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ht.Fulfilled&&(c.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Zi(()=>{l.value&&clearTimeout(l.value)}),Xe(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Ht.Fulfilled&&(c.value=!0,u())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:c,error:s,isInstalled:X(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ht.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,c.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,c.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ht.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ng(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}}}}function ba(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{items:X(()=>t.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=t.storefront.value.products.find(i=>i.id===n.productId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:s,price:s==null?void 0:s.price}}else{const r=t.storefront.value.bundles.find(i=>i.id===n.bundleId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:s,price:s==null?void 0:s.price}}})),currency:X(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:X(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,c,l,u,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(c=(a=E==null?void 0:E.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?c:0}else{const m=t.storefront.value.bundles.find(S=>S.id===s.bundleId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(l=m==null?void 0:m.defaultVariation)==null?void 0:l.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{Du(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,c)=>{const l=await t.client.identity.signUp(n,r,o,s,i,a,c);return t.currentUser.value=l,t.updateStorefront(),l},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await t.client.identity.confirmEmailChange(n,r),t.updateUser()}}}function rg(e,t){const n={endpoint:e};return new eg(n,new Ep(n),(r,o)=>T(o))}var Ru=!1;function Us(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function wa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function og(){return ju().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ju(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const sg=typeof Proxy=="function",ig="devtools-plugin:setup",ag="plugin:settings:set";let Ar,Ea;function lg(){var e;return Ar!==void 0||(typeof window<"u"&&window.performance?(Ar=!0,Ea=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ar=!0,Ea=globalThis.perf_hooks.performance):Ar=!1),Ar}function cg(){return lg()?Ea.now():Date.now()}class ug{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return cg()}},n&&n.on(ag,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(l=>{this.targetQueue.push({method:a,args:c,resolve:l})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Lu(e,t){const n=e,r=ju(),o=og(),s=sg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ig,e,t);else{const i=s?new ug(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Pe={};let ko;const Co=e=>ko=e,Mu=Pe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function gr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yt||(Yt={}));const yr=typeof window<"u",Uu=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function dg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Oa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Hu(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Fu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Fs(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Bs=typeof navigator=="object"?navigator:{userAgent:""},Bu=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),Hu=yr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Bu?fg:"msSaveOrOpenBlob"in Bs?pg:hg:()=>{};function fg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Fu(r.href)?Oa(e,t,n):(r.target="_blank",Fs(r)):Fs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Fs(r)},0))}function pg(e,t="download",n){if(typeof e=="string")if(Fu(e))Oa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Fs(r)})}else navigator.msSaveOrOpenBlob(dg(e,n),t)}function hg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Oa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Uu.HTMLElement))||"safari"in Uu,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Bu)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let c=a.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function tt(e,t){const n="π "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Na(e){return"_a"in e&&"install"in e}function Zu(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function qu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(tt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function mg(e){if(!Zu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(qu(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vg(e){if(!Zu())try{Wu(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(qu(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function gg(e){try{Hu(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){tt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let gn;function yg(){gn||(gn=document.createElement("input"),gn.type="file",gn.accept=".json");function e(){return new Promise((t,n)=>{gn.onchange=async()=>{const r=gn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},gn.oncancel=()=>t(null),gn.onerror=n,gn.click()})}return e}async function _g(e){try{const n=await yg()();if(!n)return;const{text:r,file:o}=n;Wu(e,JSON.parse(r)),tt(`Global state imported from "${o.name}".`)}catch(t){tt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Wu(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Lt(e){return{_custom:{display:e}}}const zu="π Pinia (root)",Hs="_root";function bg(e){return Na(e)?{id:Hs,label:zu}:{id:e.$id,label:e.$id}}function wg(e){if(Na(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,c)=>(a[c]=i[c],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Eg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Lt(e.type),key:Lt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Og(e){switch(e){case Yt.direct:return"mutation";case Yt.patchFunction:return"$patch";case Yt.patchObject:return"$patch";default:return"unknown"}}let Vr=!0;const Zs=[],_r="pinia:mutations",pt="pinia",{assign:Ng}=Object,qs=e=>"π "+e;function Sg(e,t){Lu({id:"dev.esm.pinia",label:"Pinia π",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e},n=>{typeof n.now!="function"&&tt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:_r,label:"Pinia π",color:15064968}),n.addInspector({id:pt,label:"Pinia π",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{mg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{gg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await _g(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?tt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),tt(`Store "${r}" reset.`)):tt(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:qs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ge(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:qs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(u){c[l]=u}return c},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):zu.toLowerCase().includes(r.filter.toLowerCase())):o).map(bg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Hs&&(globalThis.$store=ge(o)),r.state=wg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Na(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Vr=!1,r.set(s,i,r.state.value),Vr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("π")){const o=r.type.replace(/^π\s*/,""),s=t._s.get(o);if(!s)return tt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return tt(`Invalid path for store "${o}":
|
|
17
17
|
${i}
|
|
18
18
|
Only state can be modified.`);i[0]="$state",Vr=!1,r.set(s,i,r.state.value),Vr=!0}})})}function xg(e,t){Zs.includes(qs(t.$id))||Zs.push(qs(t.$id)),Lu({id:"dev.esm.pinia",label:"Pinia π",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:c,args:l})=>{const u=Ku++;n.addTimelineEvent({layerId:_r,event:{time:r(),title:"π« "+c,subtitle:"start",data:{store:Lt(t.$id),action:Lt(c),args:l},groupId:u}}),i(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),title:"π¬ "+c,subtitle:"end",data:{store:Lt(t.$id),action:Lt(c),args:l,result:d},groupId:u}})}),a(d=>{Fn=void 0,n.addTimelineEvent({layerId:_r,event:{time:r(),logType:"error",title:"π₯ "+c,subtitle:"end",data:{store:Lt(t.$id),action:Lt(c),args:l,error:d},groupId:u}})})},!0),t._customProperties.forEach(i=>{Xe(()=>b(t[i]),(a,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Vr&&n.addTimelineEvent({layerId:_r,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:c},groupId:Fn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Vr)return;const l={time:r(),title:Og(a),data:Ng({store:Lt(t.$id)},Eg(i)),groupId:Fn};a===Yt.patchFunction?l.subtitle="‡οΈ":a===Yt.patchObject?l.subtitle="π§©":i&&!Array.isArray(i)&&(l.subtitle=i.type),i&&(l.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:_r,event:l})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=$n(i=>{o(i),n.addTimelineEvent({layerId:_r,event:{time:r(),title:"π₯ "+t.$id,subtitle:"HMR update",data:{store:Lt(t.$id),info:Lt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&tt(`Disposed "${t.$id}" store π`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&tt(`"${t.$id}" store installed π`)})}let Ku=0,Fn;function Gu(e,t,n){const r=t.reduce((o,s)=>(o[s]=ge(e)[s],o),{});for(const o in r)e[o]=function(){const s=Ku,i=n?new Proxy(e,{get(...c){return Fn=s,Reflect.get(...c)},set(...c){return Fn=s,Reflect.set(...c)}}):e;Fn=s;const a=r[o].apply(i,arguments);return Fn=void 0,a}}function kg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Gu(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ge(t)._hotUpdate=function(o){r.apply(this,arguments),Gu(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}xg(e,t)}}function Cg(){const e=Cl(!0),t=e.run(()=>T({}));let n=[],r=[];const o=$n({install(s){Co(o),o._a=s,s.provide(Mu,o),s.config.globalProperties.$pinia=o,Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr&&Sg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ru?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(kg),o}function Ju(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];gr(o)&&gr(r)&&!He(r)&&!ln(r)?e[n]=Ju(o,r):e[n]=r}return e}const Yu=()=>{};function Xu(e,t,n,r=Yu){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Tl()&&Bp(o),o}function Rr(e,...t){e.slice().forEach(n=>{n(...t)})}const Tg=e=>e(),Qu=Symbol(),Sa=Symbol();function xa(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];gr(o)&&gr(r)&&e.hasOwnProperty(n)&&!He(r)&&!ln(r)?e[n]=xa(o,r):e[n]=r}return e}const Pg=Pe.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function $g(e){return!gr(e)||!e.hasOwnProperty(Pg)}const{assign:Tt}=Object;function ed(e){return!!(He(e)&&e.effect)}function td(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let c;function l(){!a&&(Pe.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const u=Pe.NODE_ENV!=="production"&&r?nc(T(o?o():{}).value):nc(n.state.value[e]);return Tt(u,s,Object.keys(i||{}).reduce((d,f)=>(Pe.NODE_ENV!=="production"&&f in u&&console.warn(`[π]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=$n(X(()=>{Co(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return c=ka(e,l,t,n,r,!0),c}function ka(e,t,n={},r,o,s){let i;const a=Tt({actions:{}},n);if(Pe.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};Pe.NODE_ENV!=="production"&&!Ru&&(c.onTrigger=V=>{l?m=V:l==!1&&!x._hotUpdating&&(Array.isArray(m)?m.push(V):console.error("π debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,u,d=[],f=[],m;const y=r.state.value[e];!s&&!y&&(Pe.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const E=T({});let S;function A(V){let P;l=u=!1,Pe.NODE_ENV!=="production"&&(m=[]),typeof V=="function"?(V(r.state.value[e]),P={type:Yt.patchFunction,storeId:e,events:m}):(xa(r.state.value[e],V),P={type:Yt.patchObject,payload:V,storeId:e,events:m});const j=S=Symbol();co().then(()=>{S===j&&(l=!0)}),u=!0,Rr(d,P,r.state.value[e])}const F=s?function(){const{state:P}=n,j=P?P():{};this.$patch(oe=>{Tt(oe,j)})}:Pe.NODE_ENV!=="production"?()=>{throw new Error(`π: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Yu;function C(){i.stop(),d=[],f=[],r._s.delete(e)}const z=(V,P="")=>{if(Qu in V)return V[Sa]=P,V;const j=function(){Co(r);const oe=Array.from(arguments),w=[],I=[];function ne(ce){w.push(ce)}function ae(ce){I.push(ce)}Rr(f,{args:oe,name:j[Sa],store:x,after:ne,onError:ae});let re;try{re=V.apply(this&&this.$id===e?this:x,oe)}catch(ce){throw Rr(I,ce),ce}return re instanceof Promise?re.then(ce=>(Rr(w,ce),ce)).catch(ce=>(Rr(I,ce),Promise.reject(ce))):(Rr(w,re),re)};return j[Qu]=!0,j[Sa]=P,j},$=$n({actions:{},getters:{},state:[],hotState:E}),Z={_p:r,$id:e,$onAction:Xu.bind(null,f),$patch:A,$reset:F,$subscribe(V,P={}){const j=Xu(d,V,P.detached,()=>oe()),oe=i.run(()=>Xe(()=>r.state.value[e],w=>{(P.flush==="sync"?u:l)&&V({storeId:e,type:Yt.direct,events:m},w)},Tt({},c,P)));return j},$dispose:C},x=so(Pe.NODE_ENV!=="production"||Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr?Tt({_hmrPayload:$,_customProperties:$n(new Set)},Z):Z);r._s.set(e,x);const Y=(r._a&&r._a.runWithContext||Tg)(()=>r._e.run(()=>(i=Cl()).run(()=>t({action:z}))));for(const V in Y){const P=Y[V];if(He(P)&&!ed(P)||ln(P))Pe.NODE_ENV!=="production"&&o?Us(E.value,V,Di(Y,V)):s||(y&&$g(P)&&(He(P)?P.value=y[V]:xa(P,y[V])),r.state.value[e][V]=P),Pe.NODE_ENV!=="production"&&$.state.push(V);else if(typeof P=="function"){const j=Pe.NODE_ENV!=="production"&&o?P:z(P,V);Y[V]=j,Pe.NODE_ENV!=="production"&&($.actions[V]=P),a.actions[V]=P}else Pe.NODE_ENV!=="production"&&ed(P)&&($.getters[V]=s?n.getters[V]:P,yr&&(Y._getters||(Y._getters=$n([]))).push(V))}if(Tt(x,Y),Tt(ge(x),Y),Object.defineProperty(x,"$state",{get:()=>Pe.NODE_ENV!=="production"&&o?E.value:r.state.value[e],set:V=>{if(Pe.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");A(P=>{Tt(P,V)})}}),Pe.NODE_ENV!=="production"&&(x._hotUpdate=$n(V=>{x._hotUpdating=!0,V._hmrPayload.state.forEach(P=>{if(P in x.$state){const j=V.$state[P],oe=x.$state[P];typeof j=="object"&&gr(j)&&gr(oe)?Ju(j,oe):V.$state[P]=oe}Us(x,P,Di(V.$state,P))}),Object.keys(x.$state).forEach(P=>{P in V.$state||wa(x,P)}),l=!1,u=!1,r.state.value[e]=Di(V._hmrPayload,"hotState"),u=!0,co().then(()=>{l=!0});for(const P in V._hmrPayload.actions){const j=V[P];Us(x,P,z(j,P))}for(const P in V._hmrPayload.getters){const j=V._hmrPayload.getters[P],oe=s?X(()=>(Co(r),j.call(x,x))):j;Us(x,P,oe)}Object.keys(x._hmrPayload.getters).forEach(P=>{P in V._hmrPayload.getters||wa(x,P)}),Object.keys(x._hmrPayload.actions).forEach(P=>{P in V._hmrPayload.actions||wa(x,P)}),x._hmrPayload=V._hmrPayload,x._getters=V._getters,x._hotUpdating=!1})),Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const V={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(P=>{Object.defineProperty(x,P,Tt({value:x[P]},V))})}return r._p.forEach(V=>{if(Pe.NODE_ENV!=="production"&&Pe.NODE_ENV!=="test"&&yr){const P=i.run(()=>V({store:x,app:r._a,pinia:r,options:a}));Object.keys(P||{}).forEach(j=>x._customProperties.add(j)),Tt(x,P)}else Tt(x,i.run(()=>V({store:x,app:r._a,pinia:r,options:a})))}),Pe.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[π]: The "state" must be a plain object. It cannot be
|
|
19
19
|
state: () => new MyClass()
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.18",
|
|
5
5
|
"description": "Package to let you embed Moonbase.sh into your storefront as a payment and delivery provider",
|
|
6
6
|
"author": "Tobias LΓΈnnerΓΈd Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"pinia": "^2.1.7",
|
|
23
23
|
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
24
24
|
"vue": "^3.4.29",
|
|
25
|
-
"@moonbase.sh/vue": "0.2.
|
|
25
|
+
"@moonbase.sh/vue": "0.2.18"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^18.14.2",
|