@moonbase.sh/storefront 0.2.54 → 0.2.57
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 +41 -41
- package/dist/moonbase.umd.cjs +8 -8
- package/package.json +2 -2
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
**//*! #__NO_SIDE_EFFECTS__ */function hn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const je=Jl.NODE_ENV!=="production"?Object.freeze({}):{},Lr=Jl.NODE_ENV!=="production"?Object.freeze([]):[],et=()=>{},eh=()=>!1,go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gs=e=>e.startsWith("onUpdate:"),Ke=Object.assign,Vi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},th=Object.prototype.hasOwnProperty,De=(e,t)=>th.call(e,t),ue=Array.isArray,ir=e=>ys(e)==="[object Map]",Yl=e=>ys(e)==="[object Set]",de=e=>typeof e=="function",Ze=e=>typeof e=="string",Vn=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Ri=e=>(Ie(e)||de(e))&&de(e.then)&&de(e.catch),Xl=Object.prototype.toString,ys=e=>Xl.call(e),ji=e=>ys(e).slice(8,-1),Ql=e=>ys(e)==="[object Object]",Li=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yo=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nh=hn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),bs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},rh=/-(\w)/g,Ct=bs(e=>e.replace(rh,(t,n)=>n?n.toUpperCase():"")),oh=/\B([A-Z])/g,mn=bs(e=>e.replace(oh,"-$1").toLowerCase()),ar=bs(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=bs(e=>e?`on${ar(e)}`:""),Rn=(e,t)=>!Object.is(e,t),bo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_s=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ih=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t};let eu;const Mi=()=>eu||(eu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ui(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Ze(r)?ch(r):Ui(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Ze(e)||Ie(e))return e}const ah=/;(?![^(]*\))/g,lh=/:([^]+)/,uh=/\/\*[^]*?\*\//g;function ch(e){const t={};return e.replace(uh,"").split(ah).forEach(n=>{if(n){const r=n.split(lh);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ws(e){let t="";if(Ze(e))t=e;else if(ue(e))for(let n=0;n<e.length;n++){const r=ws(e[n]);r&&(t+=r+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dh="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",fh="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ph="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",hh=hn(dh),mh=hn(fh),vh=hn(ph),gh=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tu(e){return!!e||e===""}const nu=e=>!!(e&&e.__v_isRef===!0),K=e=>Ze(e)?e:e==null?"":ue(e)||Ie(e)&&(e.toString===Xl||!de(e.toString))?nu(e)?K(e.value):JSON.stringify(e,ru,2):String(e),ru=(e,t)=>nu(t)?ru(e,t.value):ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Fi(r,s)+" =>"]=o,n),{})}:Yl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Fi(n))}:Vn(t)?Fi(t):Ie(t)&&!ue(t)&&!Ql(t)?String(t):t,Fi=(e,t="")=>{var n;return Vn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ve={};function At(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let gt;class ou{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=gt,!t&>&&(this.index=(gt.scopes||(gt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=gt;try{return gt=this,t()}finally{gt=n}}else Ve.NODE_ENV!=="production"&&At("cannot run an inactive effect scope.")}on(){gt=this}off(){gt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function su(e){return new ou(e)}function iu(){return gt}function yh(e,t=!1){gt?gt.cleanups.push(e):Ve.NODE_ENV!=="production"&&!t&&At("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ae;const Bi=new WeakSet;class au{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,gt&>.active&>.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Bi.has(this)&&(Bi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=_o,_o=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pu(this),uu(this);const t=Ae,n=Bt;Ae=this,Bt=!0;try{return this.fn()}finally{Ve.NODE_ENV!=="production"&&Ae!==this&&At("Active effect was not restored correctly - this is likely a Vue internal bug."),cu(this),Ae=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Wi(t);this.deps=this.depsTail=void 0,pu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){qi(this)&&this.run()}get dirty(){return qi(this)}}let lu=0,_o;function Hi(){lu++}function Zi(){if(--lu>0)return;let e;for(;_o;){let t=_o;for(_o=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function uu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,n=e.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),Wi(r),bh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function qi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&du(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function du(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wo))return;e.globalVersion=wo;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!qi(e)){e.flags&=-3;return}const n=Ae,r=Bt;Ae=e,Bt=!0;try{uu(e);const o=e.fn(e._value);(t.version===0||Rn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ae=n,Bt=r,cu(e),e.flags&=-3}}function Wi(e){const{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let o=t.computed.deps;o;o=o.nextDep)Wi(o)}}function bh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const fu=[];function vn(){fu.push(Bt),Bt=!1}function gn(){const e=fu.pop();Bt=e===void 0?!0:e}function pu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let wo=0;class zi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,Ve.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ae||!Bt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink={dep:this,sub:Ae,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ae.flags&4&&hu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=r)}return Ve.NODE_ENV!=="production"&&Ae.onTrack&&Ae.onTrack(Ke({effect:Ae},t)),n}trigger(t){this.version++,wo++,this.notify(t)}notify(t){Hi();try{if(Ve.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)Ve.NODE_ENV!=="production"&&n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ke({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{Zi()}}}function hu(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)hu(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ve.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}const Es=new WeakMap,ur=Symbol(Ve.NODE_ENV!=="production"?"Object iterate":""),Ki=Symbol(Ve.NODE_ENV!=="production"?"Map keys iterate":""),Eo=Symbol(Ve.NODE_ENV!=="production"?"Array iterate":"");function tt(e,t,n){if(Bt&&Ae){let r=Es.get(e);r||Es.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new zi),Ve.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function en(e,t,n,r,o,s){const i=Es.get(e);if(!i){wo++;return}let a=[];if(t==="clear")a=[...i.values()];else{const l=ue(e),u=l&&Li(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Eo||!Vn(f)&&f>=c)&&a.push(d)})}else{const c=d=>d&&a.push(d);switch(n!==void 0&&c(i.get(n)),u&&c(i.get(Eo)),t){case"add":l?u&&c(i.get("length")):(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"delete":l||(c(i.get(ur)),ir(e)&&c(i.get(Ki)));break;case"set":ir(e)&&c(i.get(ur));break}}}Hi();for(const l of a)Ve.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger();Zi()}function _h(e,t){var n;return(n=Es.get(e))==null?void 0:n.get(t)}function Mr(e){const t=ye(e);return t===e?t:(tt(t,"iterate",Eo),Ot(e)?t:t.map(ct))}function Os(e){return tt(e=ye(e),"iterate",Eo),e}const wh={__proto__:null,[Symbol.iterator](){return Gi(this,Symbol.iterator,ct)},concat(...e){return Mr(this).concat(...e.map(t=>ue(t)?Mr(t):t))},entries(){return Gi(this,"entries",e=>(e[1]=ct(e[1]),e))},every(e,t){return yn(this,"every",e,t,void 0,arguments)},filter(e,t){return yn(this,"filter",e,t,n=>n.map(ct),arguments)},find(e,t){return yn(this,"find",e,t,ct,arguments)},findIndex(e,t){return yn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yn(this,"findLast",e,t,ct,arguments)},findLastIndex(e,t){return yn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ji(this,"includes",e)},indexOf(...e){return Ji(this,"indexOf",e)},join(e){return Mr(this).join(e)},lastIndexOf(...e){return Ji(this,"lastIndexOf",e)},map(e,t){return yn(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(...e){return Oo(this,"push",e)},reduce(e,...t){return mu(this,"reduce",e,t)},reduceRight(e,...t){return mu(this,"reduceRight",e,t)},shift(){return Oo(this,"shift")},some(e,t){return yn(this,"some",e,t,void 0,arguments)},splice(...e){return Oo(this,"splice",e)},toReversed(){return Mr(this).toReversed()},toSorted(e){return Mr(this).toSorted(e)},toSpliced(...e){return Mr(this).toSpliced(...e)},unshift(...e){return Oo(this,"unshift",e)},values(){return Gi(this,"values",ct)}};function Gi(e,t,n){const r=Os(e),o=r[t]();return r!==e&&!Ot(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Eh=Array.prototype;function yn(e,t,n,r,o,s){const i=Os(e),a=i!==e&&!Ot(e),l=i[t];if(l!==Eh[t]){const d=l.apply(e,s);return a?ct(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,ct(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(i,u,r);return a&&o?o(c):c}function mu(e,t,n,r){const o=Os(e);let s=n;return o!==e&&(Ot(e)?n.length>3&&(s=function(i,a,l){return n.call(this,i,a,l,e)}):s=function(i,a,l){return n.call(this,i,ct(a),l,e)}),o[t](s,...r)}function Ji(e,t,n){const r=ye(e);tt(r,"iterate",Eo);const o=r[t](...n);return(o===-1||o===!1)&&So(n[0])?(n[0]=ye(n[0]),r[t](...n)):o}function Oo(e,t,n=[]){vn(),Hi();const r=ye(e)[t].apply(e,n);return Zi(),gn(),r}const Oh=hn("__proto__,__v_isRef,__isVue"),vu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vn));function Nh(e){Vn(e)||(e=String(e));const t=ye(this);return tt(t,"has",e),t.hasOwnProperty(e)}class gu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Tu:ku:s?xu:Su).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ue(t);if(!o){let l;if(i&&(l=wh[n]))return l;if(n==="hasOwnProperty")return Nh}const a=Reflect.get(t,n,qe(t)?t:r);return(Vn(n)?vu.has(n):Oh(n))||(o||tt(t,"get",n),s)?a:qe(a)?i&&Li(n)?a:a.value:Ie(a)?o?Cu(a):No(a):a}}class yu extends gu{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=bn(s);if(!Ot(r)&&!bn(r)&&(s=ye(s),r=ye(r)),!ue(t)&&qe(s)&&!qe(r))return l?!1:(s.value=r,!0)}const i=ue(t)&&Li(n)?Number(n)<t.length:De(t,n),a=Reflect.set(t,n,r,qe(t)?t:o);return t===ye(o)&&(i?Rn(r,s)&&en(t,"set",n,r,s):en(t,"add",n,r)),a}deleteProperty(t,n){const r=De(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&en(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Vn(n)||!vu.has(n))&&tt(t,"has",n),r}ownKeys(t){return tt(t,"iterate",ue(t)?"length":ur),Reflect.ownKeys(t)}}class bu extends gu{constructor(t=!1){super(!0,t)}set(t,n){return Ve.NODE_ENV!=="production"&&At(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ve.NODE_ENV!=="production"&&At(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Sh=new yu,xh=new bu,kh=new yu(!0),Th=new bu(!0),Yi=e=>e,Ns=e=>Reflect.getPrototypeOf(e);function Ss(e,t,n=!1,r=!1){e=e.__v_raw;const o=ye(e),s=ye(t);n||(Rn(t,s)&&tt(o,"get",t),tt(o,"get",s));const{has:i}=Ns(o),a=r?Yi:n?Xi:ct;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function xs(e,t=!1){const n=this.__v_raw,r=ye(n),o=ye(e);return t||(Rn(e,o)&&tt(r,"has",e),tt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ks(e,t=!1){return e=e.__v_raw,!t&&tt(ye(e),"iterate",ur),Reflect.get(e,"size",e)}function _u(e,t=!1){!t&&!Ot(e)&&!bn(e)&&(e=ye(e));const n=ye(this);return Ns(n).has.call(n,e)||(n.add(e),en(n,"add",e,e)),this}function wu(e,t,n=!1){!n&&!Ot(t)&&!bn(t)&&(t=ye(t));const r=ye(this),{has:o,get:s}=Ns(r);let i=o.call(r,e);i?Ve.NODE_ENV!=="production"&&Nu(r,o,e):(e=ye(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Rn(t,a)&&en(r,"set",e,t,a):en(r,"add",e,t),this}function Eu(e){const t=ye(this),{has:n,get:r}=Ns(t);let o=n.call(t,e);o?Ve.NODE_ENV!=="production"&&Nu(t,n,e):(e=ye(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&en(t,"delete",e,void 0,s),i}function Ou(){const e=ye(this),t=e.size!==0,n=Ve.NODE_ENV!=="production"?ir(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&en(e,"clear",void 0,void 0,n),r}function Ts(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ye(i),l=t?Yi:e?Xi:ct;return!e&&tt(a,"iterate",ur),i.forEach((u,c)=>r.call(o,l(u),l(c),s))}}function Cs(e,t,n){return function(...r){const o=this.__v_raw,s=ye(o),i=ir(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Yi:t?Xi:ct;return!t&&tt(s,"iterate",l?Ki:ur),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function jn(e){return function(...t){if(Ve.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";At(`${ar(e)} operation ${n}failed: target is readonly.`,ye(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ch(){const e={get(s){return Ss(this,s)},get size(){return ks(this)},has:xs,add:_u,set:wu,delete:Eu,clear:Ou,forEach:Ts(!1,!1)},t={get(s){return Ss(this,s,!1,!0)},get size(){return ks(this)},has:xs,add(s){return _u.call(this,s,!0)},set(s,i){return wu.call(this,s,i,!0)},delete:Eu,clear:Ou,forEach:Ts(!1,!0)},n={get(s){return Ss(this,s,!0)},get size(){return ks(this,!0)},has(s){return xs.call(this,s,!0)},add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear"),forEach:Ts(!0,!1)},r={get(s){return Ss(this,s,!0,!0)},get size(){return ks(this,!0)},has(s){return xs.call(this,s,!0)},add:jn("add"),set:jn("set"),delete:jn("delete"),clear:jn("clear"),forEach:Ts(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Cs(s,!1,!1),n[s]=Cs(s,!0,!1),t[s]=Cs(s,!1,!0),r[s]=Cs(s,!0,!0)}),[e,n,t,r]}const[Ph,Dh,$h,Ih]=Ch();function Ps(e,t){const n=t?e?Ih:$h:e?Dh:Ph;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(De(n,o)&&o in r?n:r,o,s)}const Ah={get:Ps(!1,!1)},Vh={get:Ps(!1,!0)},Rh={get:Ps(!0,!1)},jh={get:Ps(!0,!0)};function Nu(e,t,n){const r=ye(n);if(r!==n&&t.call(e,r)){const o=ji(e);At(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Su=new WeakMap,xu=new WeakMap,ku=new WeakMap,Tu=new WeakMap;function Lh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mh(e){return e.__v_skip||!Object.isExtensible(e)?0:Lh(ji(e))}function No(e){return bn(e)?e:Ds(e,!1,Sh,Ah,Su)}function Uh(e){return Ds(e,!1,kh,Vh,xu)}function Cu(e){return Ds(e,!0,xh,Rh,ku)}function tn(e){return Ds(e,!0,Th,jh,Tu)}function Ds(e,t,n,r,o){if(!Ie(e))return Ve.NODE_ENV!=="production"&&At(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=Mh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function nn(e){return bn(e)?nn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Ot(e){return!!(e&&e.__v_isShallow)}function So(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function Ln(e){return Object.isExtensible(e)&&_s(e,"__v_skip",!0),e}const ct=e=>Ie(e)?No(e):e,Xi=e=>Ie(e)?Cu(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function C(e){return Pu(e,!1)}function Fh(e){return Pu(e,!0)}function Pu(e,t){return qe(e)?e:new Bh(e,t)}class Bh{constructor(t,n){this.dep=new zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ot(t)||bn(t);t=r?t:ye(t),Rn(t,n)&&(this._rawValue=t,this._value=r?t:ct(t),Ve.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function _(e){return qe(e)?e.value:e}function Mn(e){return de(e)?e():_(e)}const Hh={get:(e,t,n)=>t==="__v_raw"?e:_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Du(e){return nn(e)?e:new Proxy(e,Hh)}function $u(e){Ve.NODE_ENV!=="production"&&!So(e)&&At("toRefs() expects a reactive object but received a plain one.");const t=ue(e)?new Array(e.length):{};for(const n in e)t[n]=Iu(e,n);return t}class Zh{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _h(ye(this._object),this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qi(e,t,n){return qe(e)?e:de(e)?new qh(e):Ie(e)&&arguments.length>1?Iu(e,t,n):C(e)}function Iu(e,t,n){const r=e[t];return qe(r)?r:new Zh(e,t,n)}class Wh{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){Ae!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=Ve.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return du(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ve.NODE_ENV!=="production"&&At("Write operation failed: computed value is readonly")}}function zh(e,t,n=!1){let r,o;de(e)?r=e:(r=e.get,o=e.set);const s=new Wh(r,o,n);return Ve.NODE_ENV!=="production"&&t&&!n&&(s.onTrack=t.onTrack,s.onTrigger=t.onTrigger),s}const $s={},Is=new WeakMap;let cr;function Kh(e,t=!1,n=cr){if(n){let r=Is.get(n);r||Is.set(n,r=[]),r.push(e)}else Ve.NODE_ENV!=="production"&&!t&&At("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gh(e,t,n=je){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=x=>{(n.onWarn||At)("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.")},c=x=>o?x:Ot(x)||o===!1||o===0?Un(x,1):Un(x);let d,f,m,b,O=!1,w=!1;if(qe(e)?(f=()=>e.value,O=Ot(e)):nn(e)?(f=()=>c(e),O=!0):ue(e)?(w=!0,O=e.some(x=>nn(x)||Ot(x)),f=()=>e.map(x=>{if(qe(x))return x.value;if(nn(x))return c(x);if(de(x))return l?l(x,2):x();Ve.NODE_ENV!=="production"&&u(x)})):de(e)?t?f=l?()=>l(e,2):e:f=()=>{if(m){vn();try{m()}finally{gn()}}const x=cr;cr=d;try{return l?l(e,3,[b]):e(b)}finally{cr=x}}:(f=et,Ve.NODE_ENV!=="production"&&u(e)),t&&o){const x=f,U=o===!0?1/0:o;f=()=>Un(x(),U)}const $=iu(),H=()=>{d.stop(),$&&Vi($.effects,d)};if(s)if(t){const x=t;t=(...U)=>{x(...U),H()}}else{const x=f;f=()=>{x(),H()}}let T=w?new Array(e.length).fill($s):$s;const te=x=>{if(!(!(d.flags&1)||!d.dirty&&!x))if(t){const U=d.run();if(o||O||(w?U.some((j,ge)=>Rn(j,T[ge])):Rn(U,T))){m&&m();const j=cr;cr=d;try{const ge=[U,T===$s?void 0:w&&T[0]===$s?[]:T,b];l?l(t,3,ge):t(...ge),T=U}finally{cr=j}}}else d.run()};return a&&a(te),d=new au(f),d.scheduler=i?()=>i(te,!1):te,b=x=>Kh(x,!1,d),m=d.onStop=()=>{const x=Is.get(d);if(x){if(l)l(x,4);else for(const U of x)U();Is.delete(d)}},Ve.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?te(!0):T=d.run():i?i(te.bind(null,!0),!0):d.run(),H.pause=d.pause.bind(d),H.resume=d.resume.bind(d),H.stop=H,H}function Un(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))Un(e.value,t,n);else if(ue(e))for(let r=0;r<e.length;r++)Un(e[r],t,n);else if(Yl(e)||ir(e))e.forEach(r=>{Un(r,t,n)});else if(Ql(e)){for(const r in e)Un(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Un(e[r],t,n)}return e}var g={};const dr=[];function As(e){dr.push(e)}function Vs(){dr.pop()}let ea=!1;function F(e,...t){if(ea)return;ea=!0,vn();const n=dr.length?dr[dr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Jh();if(r)Ur(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Xs(n,s.type)}>`).join(`
|
|
8
8
|
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
|
|
9
9
|
`,...Yh(o)),console.warn(...s)}gn(),ea=!1}function Jh(){let e=dr[dr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function Yh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
10
|
-
`],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Xs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const ta={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ur(e,t,n,r){try{return r?e(...r):e()}catch(o){xo(o,t,n)}}function Ht(e,t,n,r){if(de(e)){const o=Ur(e,t,n,r);return o&&Ri(o)&&o.catch(s=>{xo(s,t,n)}),o}if(ue(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function xo(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?ta[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Ur(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=ta[t];if(n&&As(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Vs(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,na=!1;const yt=[];let rn=0;const Fr=[];let Fn=null,Br=0;const Vu=Promise.resolve();let ra=null;const nm=100;function To(e){const t=ra||Vu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=ko?rn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=Co(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function Rs(e){if(!(e.flags&1)){const t=Co(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=Co(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!na&&(na=!0,ra=Vu.then(Uu))}function ju(e){ue(e)?Fr.push(...e):Fn&&e.id===-1?Fn.splice(Br+1,0,e):e.flags&1||(Fr.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?rn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&oa(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Fr.length){const t=[...new Set(Fr)].sort((n,r)=>Co(n)-Co(r));if(Fr.length=0,Fn){Fn.push(...t);return}for(Fn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Br=0;Br<Fn.length;Br++){const n=Fn[Br];g.NODE_ENV!=="production"&&oa(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Fn=null,Br=0}}const Co=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){na=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>oa(e,n):et;try{for(rn=0;rn<yt.length;rn++){const n=yt[rn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ur(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;rn<yt.length;rn++){const n=yt[rn];n&&(n.flags&=-2)}rn=0,yt.length=0,Mu(e),ko=!1,ra=null,(yt.length||Fr.length)&&Uu(e)}}function oa(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Va(r.type);return xo(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Bn=!1;const js=new Map;g.NODE_ENV!=="production"&&(Mi().__VUE_HMR_RUNTIME__={createRecord:sa(Fu),rerender:sa(im),reload:sa(am)});const fr=new Map;function om(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function sm(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Ls(t),instances:new Set}),!0)}function Ls(e){return zc(e)?e.__vccOpts:e}function im(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Ls(r.type).render=t),r.renderCache=[],Bn=!0,r.update(),Bn=!1}))}function am(e,t){const n=fr.get(e);if(!n)return;t=Ls(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Ls(s.type);let a=js.get(i);a||(i!==n.initialDef&&Bu(i,t),js.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?Rs(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{js.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function sa(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let on,Po=[],ia=!1;function Do(e,...t){on?on.emit(e,...t):ia||Po.push({event:e,args:t})}function Hu(e,t){var n,r;on=e,on?(on.enabled=!0,Po.forEach(({event:o,args:s})=>on.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{on||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ia=!0,Po=[])},3e3)):(ia=!0,Po=[])}function lm(e,t){Do("app:init",e,t,{Fragment:xe,Text:jo,Comment:Ge,Static:Lo})}function um(e){Do("app:unmount",e)}const cm=aa("component:added"),Zu=aa("component:updated"),dm=aa("component:removed"),fm=e=>{on&&typeof on.cleanupBuffer=="function"&&!on.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function aa(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=qu("perf:start"),hm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let nt=null,Wu=null;function Ms(e){const t=nt;return nt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=nt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=Ms(t);let i;try{i=e(...o)}finally{Ms(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){nh(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,la=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&F(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:w}}=u,$=hr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Bn&&(l=!1,te=null),e==null){const x=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");m(x,n,r),m(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=la(t.props,b),A=Xu(q,t,O,m);q?(i!=="svg"&&Ju(q)?i="svg":i!=="mathml"&&Yu(q)&&(i="mathml"),$||(j(q,A),Fs(t))):g.NODE_ENV!=="production"&&!$&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};$&&(j(n,U),Fs(t)),vm(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=hr(e.props),q=ge?n:U,A=ge?x:j;if(i==="svg"||Ju(U)?i="svg":(i==="mathml"||Yu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Ro(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),$)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Us(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=la(t.props,b);V?Us(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Us(t,U,j,u,1);Fs(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!hr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Us,hydrate:ym};function Us(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=la(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Xu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}Fs(t)}return t.anchor&&i(t.anchor)}const bm=gm;function Fs(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Hn=Symbol("_leaveCb"),Bs=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),fa(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},wm={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=Gs(),r=_m();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return ca(s);const l=rc(s);if(!l)return ca(s);let u=ua(l,i,r,n,f=>u=f);l.type!==Ge&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Ge&&!yr(l,d)&&ec(n).type!==Ge){const f=ua(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},ca(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(m,b,O)=>{const w=nc(r,d);w[String(d.key)]=d,m[Hn]=()=>{b(),m[Hn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ua(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:$,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),x=nc(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),ue(q)?q.every(D=>D.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Hn]&&q[Hn](!0);const V=x[te];V&&yr(e,V)&&V.el[Hn]&&V.el[Hn](),U(A,[q])},enter(q){let A=u,V=c,D=d;if(!n.isMounted)if(s)A=$||u,V=H||c,D=T||d;else return;let ae=!1;const $e=q[Bs]=E=>{ae||(ae=!0,E?U(D,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Bs]=void 0)};A?j(A,[q,$e]):$e()},leave(q,A){const V=String(e.key);if(q[Bs]&&q[Bs](!0),n.isUnmounting)return A();U(f,[q]);let D=!1;const ae=q[Hn]=$e=>{D||(D=!0,A(),$e?U(O,[q]):U(b,[q]),q[Hn]=void 0,x[V]===e&&delete x[V])};x[V]=e,m?j(m,[q,ae]):ae()},clone(q){const A=ua(q,t,n,r,o);return o&&o(A),A}};return ge}function ca(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&de(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function fe(e,t){return de(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function da(e,t,n,r,o=!1){if(ue(e)){e.forEach((b,O)=>da(b,t&&(ue(t)?t[O]:t),n,r,o));return}if(Hr(r)&&!o)return;const s=r.shapeFlag&4?Aa(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),de(l))Ur(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const $=b?m(l)?d[l]:c[l]:l.value;o?ue($)&&Vi($,s):ue($)?$.includes(s)||$.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Hr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function Nm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Xe){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Hs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Hs(t,e,r,!0);bt(()=>{Vi(r[t],o)},n)}function Hs(e,t,n=Xe,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Fo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(ta[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Xe)=>{(!Ys||e==="sp")&&Hs(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),fa=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Xe){Hs("ec",e,t)}const Am="components",ac=Symbol.for("v-ndc");function pa(e){return Ze(e)?Vm(Am,e,!1)||e:e||ac}function Vm(e,t,n=!0,r=!1){const o=nt||Xe;if(o){const s=o.type;{const a=Va(s,!1);if(a&&(a===t||a===Ct(t)||a===ar(Ct(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
11
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Ct(t)]||e[ar(Ct(t))])}function sn(e,t,n,r){let o;const s=n,i=ue(e);if(i||Ze(e)){const a=i&&nn(e);a&&(e=Os(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function ha(e,t,n={},r,o){if(nt.ce||nt.parent&&Hr(nt.parent)&&nt.parent.ce)return y(),Se(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&uc(s(n)),a=Se(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>Zr(t)?!(t.type===Ge||t.type===xe&&!uc(t.children)):!0)?e:null}const ma=e=>e?Hc(e)?Aa(e):ma(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?tn(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?tn(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?tn(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?tn(e.refs):e.refs,$parent:e=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ba(e),$forceUpdate:e=>e.f||(e.f=()=>{Rs(e.update)}),$nextTick:e=>e.n||(e.n=To.bind(e.proxy)),$watch:e=>hv.bind(e)}),va=e=>e==="_"||e==="$",ga=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ga(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];ya&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(tt(e.attrs,"get",""),g.NODE_ENV!=="production"&&zs()):g.NODE_ENV!=="production"&&t==="$slots"&&tt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&nt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&va(t[0])&&De(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===nt&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ga(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ga(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:et})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:et})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(va(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:et})}})}function dc(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ya=!0;function Um(e){const t=ba(e),n=e.proxy,r=e.ctx;ya=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:w,beforeDestroy:$,beforeUnmount:H,destroyed:T,unmounted:te,render:x,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:D,directives:ae,filters:$e}=t,E=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&Fm(u,r,E),i)for(const Y in i){const re=i[Y];de(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!de(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ri(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=No(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),va(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:et})}if(ya=!0,s)for(const Y in s){const re=s[Y],he=de(re)?re.bind(n,n):de(re.get)?re.get.bind(n,n):et;g.NODE_ENV!=="production"&&he===et&&F(`Computed property "${Y}" has no getter.`);const oe=!de(re)&&de(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:et,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)pc(a[Y],r,n,Y);if(l){const Y=de(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&fc(c,e,"c");function P(Y,re){ue(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(km,d),P(Le,f),P(Tm,m),P(Cm,b),P(Nm,O),P(Sm,w),P(Im,ge),P($m,U),P(Dm,j),P(fa,H),P(bt,te),P(Pm,q),ue(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});x&&e.render===et&&(e.render=x),V!=null&&(e.inheritAttrs=V),D&&(e.components=D),ae&&(e.directives=ae),q&&sc(e)}function Fm(e,t,n=et){ue(e)&&(e=_a(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(ue(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];de(s)?Ye(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(de(e))Ye(o,e.bind(n));else if(Ie(e))if(ue(e))e.forEach(s=>pc(s,t,n,r));else{const s=de(e.handler)?e.handler.bind(n):t[e.handler];de(s)?Ye(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ba(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Zs(l,u,i,!0)),Zs(l,t,i)),Ie(t)&&s.set(t,l),l}function Zs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Zs(e,s,n,!0),o&&o.forEach(i=>Zs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:Zm,provide:hc,inject:Hm};function hc(e,t){return t?e?function(){return Ke(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return Ao(_a(e),_a(t))}function _a(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:eh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qm=0;function Wm(e,t){return function(r,o=null){de(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&de(c.install)?(i.add(c),c.install(u,...d)):de(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&$a(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Kc)),Aa(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function dt(e,t){if(!Xe)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Xe.provides;const r=Xe.parent&&Xe.parent.provides;r===n&&(n=Xe.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Xe||nt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&de(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Xe||nt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Km(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Uh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Ws(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=wa(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=wa(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&en(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Ws(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=wa(o,l,d,u[d],e,!De(u,d))}}return i}function wa(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&de(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function wc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!de(e)){const c=d=>{l=!0;const[f,m]=wc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Lr),Lr;if(ue(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);Ec(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(Ec(d)){const f=s[c],m=i[d]=ue(f)||de(f)?{type:f}:Ke({},f),b=m.type;let O=!1,w=!0;if(ue(b))for(let $=0;$<b.length;++$){const H=b[$],T=de(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=de(b)&&b.name==="Boolean";m[0]=O,m[1]=w,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?tn(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ue(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){F(nv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=ue(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=ji(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&Sc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Sc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Sc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const xc=e=>e[0]==="_"||e==="$stable",Ea=e=>ue(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Xe&&(!n||n.root===Xe.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ea(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(xc(o))continue;const s=e[o];if(de(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Ea(s);t[o]=()=>i}}},Tc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ea(t);e.slots.default=()=>n},Oa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(Oa(r,t,n),n&&_s(r,"_",o,!0)):kc(t,r)}else t&&Tc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Bn?(Oa(o,t,n),en(e,"set","$slots")):n&&a===1?s=!1:Oa(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Tc(e,t),i={default:1});if(s)for(const a in o)!xc(a)&&i[a]==null&&delete o[a]};let Vo,Zn;function wn(e,t){e.appContext.config.performance&&qs()&&Zn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,qs()?Zn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&qs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Zn.mark(r),Zn.measure(`<${Xs(e,e.type)}> ${t}`,n,r),Zn.clearMarks(n),Zn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,qs()?Zn.now():Date.now())}function qs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,Zn=window.performance):Vo=!1),Vo}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
10
|
+
`],...Xh(n))}),t}function Xh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Xs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Qh(e.props),s]:[o+s]}function Qh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Au(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Au(e,t,n){return Ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Au(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function em(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?F(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&F(`${t} is NaN - the duration expression might be incorrect.`))}const ta={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ur(e,t,n,r){try{return r?e(...r):e()}catch(o){xo(o,t,n)}}function Ht(e,t,n,r){if(de(e)){const o=Ur(e,t,n,r);return o&&Ri(o)&&o.catch(s=>{xo(s,t,n)}),o}if(ue(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Ht(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&F(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function xo(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||je;if(t){let a=t.parent;const l=t.proxy,u=g.NODE_ENV!=="production"?ta[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){vn(),Ur(s,null,10,[e,l,u]),gn();return}}tm(e,n,o,r,i)}function tm(e,t,n,r=!0,o=!1){if(g.NODE_ENV!=="production"){const s=ta[t];if(n&&As(n),F(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Vs(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}let ko=!1,na=!1;const yt=[];let rn=0;const Fr=[];let Fn=null,Br=0;const Vu=Promise.resolve();let ra=null;const nm=100;function To(e){const t=ra||Vu;return e?t.then(this?e.bind(this):e):t}function rm(e){let t=ko?rn+1:0,n=yt.length;for(;t<n;){const r=t+n>>>1,o=yt[r],s=Co(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function Rs(e){if(!(e.flags&1)){const t=Co(e),n=yt[yt.length-1];!n||!(e.flags&2)&&t>=Co(n)?yt.push(e):yt.splice(rm(t),0,e),e.flags|=1,Ru()}}function Ru(){!ko&&!na&&(na=!0,ra=Vu.then(Uu))}function ju(e){ue(e)?Fr.push(...e):Fn&&e.id===-1?Fn.splice(Br+1,0,e):e.flags&1||(Fr.push(e),e.flags|=1),Ru()}function Lu(e,t,n=ko?rn+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&oa(t,r))continue;yt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&=-2}}}function Mu(e){if(Fr.length){const t=[...new Set(Fr)].sort((n,r)=>Co(n)-Co(r));if(Fr.length=0,Fn){Fn.push(...t);return}for(Fn=t,g.NODE_ENV!=="production"&&(e=e||new Map),Br=0;Br<Fn.length;Br++){const n=Fn[Br];g.NODE_ENV!=="production"&&oa(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Fn=null,Br=0}}const Co=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Uu(e){na=!1,ko=!0,g.NODE_ENV!=="production"&&(e=e||new Map);const t=g.NODE_ENV!=="production"?n=>oa(e,n):et;try{for(rn=0;rn<yt.length;rn++){const n=yt[rn];if(n&&!(n.flags&8)){if(g.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ur(n,n.i,n.i?15:14),n.flags&=-2}}}finally{for(;rn<yt.length;rn++){const n=yt[rn];n&&(n.flags&=-2)}rn=0,yt.length=0,Mu(e),ko=!1,ra=null,(yt.length||Fr.length)&&Uu(e)}}function oa(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>nm){const r=t.i,o=r&&Va(r.type);return xo(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Bn=!1;const js=new Map;g.NODE_ENV!=="production"&&(Mi().__VUE_HMR_RUNTIME__={createRecord:sa(Fu),rerender:sa(im),reload:sa(am)});const fr=new Map;function om(e){const t=e.type.__hmrId;let n=fr.get(t);n||(Fu(t,e.type),n=fr.get(t)),n.instances.add(e)}function sm(e){fr.get(e.type.__hmrId).instances.delete(e)}function Fu(e,t){return fr.has(e)?!1:(fr.set(e,{initialDef:Ls(t),instances:new Set}),!0)}function Ls(e){return zc(e)?e.__vccOpts:e}function im(e,t){const n=fr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,Ls(r.type).render=t),r.renderCache=[],Bn=!0,r.update(),Bn=!1}))}function am(e,t){const n=fr.get(e);if(!n)return;t=Ls(t),Bu(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=Ls(s.type);let a=js.get(i);a||(i!==n.initialDef&&Bu(i,t),js.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?Rs(()=>{s.parent.update(),a.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(i)}ju(()=>{js.clear()})}function Bu(e,t){Ke(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function sa(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let on,Po=[],ia=!1;function Do(e,...t){on?on.emit(e,...t):ia||Po.push({event:e,args:t})}function Hu(e,t){var n,r;on=e,on?(on.enabled=!0,Po.forEach(({event:o,args:s})=>on.emit(o,...s)),Po=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Hu(s,t)}),setTimeout(()=>{on||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ia=!0,Po=[])},3e3)):(ia=!0,Po=[])}function lm(e,t){Do("app:init",e,t,{Fragment:xe,Text:jo,Comment:Ge,Static:Lo})}function um(e){Do("app:unmount",e)}const cm=aa("component:added"),Zu=aa("component:updated"),dm=aa("component:removed"),fm=e=>{on&&typeof on.cleanupBuffer=="function"&&!on.cleanupBuffer(e)&&dm(e)};/*! #__NO_SIDE_EFFECTS__ */function aa(e){return t=>{Do(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const pm=qu("perf:start"),hm=qu("perf:end");function qu(e){return(t,n,r)=>{Do(e,t.appContext.app,t.uid,t,n,r)}}function mm(e,t,n){Do("component:emit",e.appContext.app,e,t,n)}let nt=null,Wu=null;function Ms(e){const t=nt;return nt=e,Wu=e&&e.type.__scopeId||null,t}function _e(e,t=nt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&jc(-1);const s=Ms(t);let i;try{i=e(...o)}finally{Ms(s),r._d&&jc(1)}return g.NODE_ENV!=="production"&&Zu(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function zu(e){nh(e)&&F("Do not use built-in directive ids as custom directive id: "+e)}function pr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(vn(),Ht(l,n,8,[e.el,a,e,t]),gn())}}const Ku=Symbol("_vte"),Gu=e=>e.__isTeleport,hr=e=>e&&(e.disabled||e.disabled===""),vm=e=>e&&(e.defer||e.defer===""),Ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,la=(e,t)=>{const n=e&&e.to;if(Ze(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!hr(e)&&F(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&F("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!hr(e)&&F(`Invalid Teleport target: ${n}`),n},gm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:m,querySelector:b,createText:O,createComment:w}}=u,$=hr(t.props);let{shapeFlag:H,children:T,dynamicChildren:te}=t;if(g.NODE_ENV!=="production"&&Bn&&(l=!1,te=null),e==null){const x=t.el=g.NODE_ENV!=="production"?w("teleport start"):O(""),U=t.anchor=g.NODE_ENV!=="production"?w("teleport end"):O("");m(x,n,r),m(U,n,r);const j=(q,A)=>{H&16&&c(T,q,A,o,s,i,a,l)},ge=()=>{const q=t.target=la(t.props,b),A=Xu(q,t,O,m);q?(i!=="svg"&&Ju(q)?i="svg":i!=="mathml"&&Yu(q)&&(i="mathml"),$||(j(q,A),Fs(t))):g.NODE_ENV!=="production"&&!$&&F("Invalid Teleport target on mount:",q,`(${typeof q})`)};$&&(j(n,U),Fs(t)),vm(t.props)?Nt(ge,s):ge()}else{t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ge=hr(e.props),q=ge?n:U,A=ge?x:j;if(i==="svg"||Ju(U)?i="svg":(i==="mathml"||Yu(U))&&(i="mathml"),te?(f(e.dynamicChildren,te,q,o,s,i,a),Ro(e,t,!0)):l||d(e,t,q,A,o,s,i,a,!1),$)ge?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Us(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=la(t.props,b);V?Us(t,V,null,u,0):g.NODE_ENV!=="production"&&F("Invalid Teleport target on update:",U,`(${typeof U})`)}else ge&&Us(t,U,j,u,1);Fs(t)}},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(o(u),o(c)),s&&o(l),i&16){const m=s||!hr(f);for(let b=0;b<a.length;b++){const O=a[b];r(O,t,n,m,!!O.dynamicChildren)}}},move:Us,hydrate:ym};function Us(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(i,t,n),(!d||hr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ym(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=la(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(hr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}b=i(b)}t.targetAnchor||Xu(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}Fs(t)}return t.anchor&&i(t.anchor)}const bm=gm;function Fs(e){const t=e.ctx;if(t&&t.ut){let n=e.targetStart;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Xu(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Ku]=s,e&&(r(o,e),r(s,e)),s}const Hn=Symbol("_leaveCb"),Bs=Symbol("_enterCb");function _m(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Le(()=>{e.isMounted=!0}),fa(()=>{e.isUnmounting=!0}),e}const Vt=[Function,Array],Qu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vt,onEnter:Vt,onAfterEnter:Vt,onEnterCancelled:Vt,onBeforeLeave:Vt,onLeave:Vt,onAfterLeave:Vt,onLeaveCancelled:Vt,onBeforeAppear:Vt,onAppear:Vt,onAfterAppear:Vt,onAppearCancelled:Vt},ec=e=>{const t=e.subTree;return t.component?ec(t.component):t},wm={name:"BaseTransition",props:Qu,setup(e,{slots:t}){const n=Gs(),r=_m();return()=>{const o=t.default&&oc(t.default(),!0);if(!o||!o.length)return;const s=tc(o),i=ye(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&F(`invalid <transition> mode: ${a}`),r.isLeaving)return ca(s);const l=rc(s);if(!l)return ca(s);let u=ua(l,i,r,n,f=>u=f);l.type!==Ge&&$o(l,u);const c=n.subTree,d=c&&rc(c);if(d&&d.type!==Ge&&!yr(l,d)&&ec(n).type!==Ge){const f=ua(d,i,r,n);if($o(d,f),a==="out-in"&&l.type!==Ge)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave},ca(s);a==="in-out"&&l.type!==Ge&&(f.delayLeave=(m,b,O)=>{const w=nc(r,d);w[String(d.key)]=d,m[Hn]=()=>{b(),m[Hn]=void 0,delete u.delayedLeave},u.delayedLeave=O})}return s}}};function tc(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ge){if(g.NODE_ENV!=="production"&&n){F("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,g.NODE_ENV==="production")break}}return t}const Em=wm;function nc(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ua(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:b,onLeaveCancelled:O,onBeforeAppear:w,onAppear:$,onAfterAppear:H,onAppearCancelled:T}=t,te=String(e.key),x=nc(n,e),U=(q,A)=>{q&&Ht(q,r,9,A)},j=(q,A)=>{const V=A[1];U(q,A),ue(q)?q.every(D=>D.length<=1)&&V():q.length<=1&&V()},ge={mode:i,persisted:a,beforeEnter(q){let A=l;if(!n.isMounted)if(s)A=w||l;else return;q[Hn]&&q[Hn](!0);const V=x[te];V&&yr(e,V)&&V.el[Hn]&&V.el[Hn](),U(A,[q])},enter(q){let A=u,V=c,D=d;if(!n.isMounted)if(s)A=$||u,V=H||c,D=T||d;else return;let ae=!1;const $e=q[Bs]=E=>{ae||(ae=!0,E?U(D,[q]):U(V,[q]),ge.delayedLeave&&ge.delayedLeave(),q[Bs]=void 0)};A?j(A,[q,$e]):$e()},leave(q,A){const V=String(e.key);if(q[Bs]&&q[Bs](!0),n.isUnmounting)return A();U(f,[q]);let D=!1;const ae=q[Hn]=$e=>{D||(D=!0,A(),$e?U(O,[q]):U(b,[q]),q[Hn]=void 0,x[V]===e&&delete x[V])};x[V]=e,m?j(m,[q,ae]):ae()},clone(q){const A=ua(q,t,n,r,o);return o&&o(A),A}};return ge}function ca(e){if(Io(e))return e=Zt(e),e.children=null,e}function rc(e){if(!Io(e))return Gu(e.type)&&e.children?tc(e.children):e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&de(n.default))return n.default()}}function $o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$o(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function oc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===xe?(i.patchFlag&128&&o++,r=r.concat(oc(i.children,t,a))):(t||i.type!==Ge)&&r.push(a!=null?Zt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function fe(e,t){return de(e)?Ke({name:e.name},t,{setup:e}):e}function sc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Om=new WeakSet;function da(e,t,n,r,o=!1){if(ue(e)){e.forEach((b,O)=>da(b,t&&(ue(t)?t[O]:t),n,r,o));return}if(Hr(r)&&!o)return;const s=r.shapeFlag&4?Aa(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){F("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,f=ye(d),m=d===je?()=>!1:b=>g.NODE_ENV!=="production"&&Om.has(f[b])?!1:De(f,b);if(u!=null&&u!==l&&(Ze(u)?(c[u]=null,m(u)&&(d[u]=null)):qe(u)&&(u.value=null)),de(l))Ur(l,a,12,[i,c]);else{const b=Ze(l),O=qe(l);if(b||O){const w=()=>{if(e.f){const $=b?m(l)?d[l]:c[l]:l.value;o?ue($)&&Vi($,s):ue($)?$.includes(s)||$.push(s):b?(c[l]=[s],m(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else b?(c[l]=i,m(l)&&(d[l]=i)):O?(l.value=i,e.k&&(c[e.k]=i)):g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)};i?(w.id=-1,Nt(w,n)):w()}else g.NODE_ENV!=="production"&&F("Invalid template ref type:",l,`(${typeof l})`)}}const Hr=e=>!!e.type.__asyncLoader,Io=e=>e.type.__isKeepAlive;function Nm(e,t){ic(e,"a",t)}function Sm(e,t){ic(e,"da",t)}function ic(e,t,n=Ye){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Hs(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Io(o.parent.vnode)&&xm(r,t,n,o),o=o.parent}}function xm(e,t,n,r){const o=Hs(t,e,r,!0);bt(()=>{Vi(r[t],o)},n)}function Hs(e,t,n=Ye,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{vn();const a=Fo(n),l=Ht(t,n,e,i);return a(),gn(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=lr(ta[e].replace(/ hook$/,""));F(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const _n=e=>(t,n=Ye)=>{(!Ys||e==="sp")&&Hs(e,(...r)=>t(...r),n)},km=_n("bm"),Le=_n("m"),Tm=_n("bu"),Cm=_n("u"),fa=_n("bum"),bt=_n("um"),Pm=_n("sp"),Dm=_n("rtg"),$m=_n("rtc");function Im(e,t=Ye){Hs("ec",e,t)}const Am="components",ac=Symbol.for("v-ndc");function pa(e){return Ze(e)?Vm(Am,e,!1)||e:e||ac}function Vm(e,t,n=!0,r=!1){const o=nt||Ye;if(o){const s=o.type;{const a=Va(s,!1);if(a&&(a===t||a===Ct(t)||a===ar(Ct(t))))return s}const i=lc(o[e]||s[e],t)||lc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&F(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
11
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&F(`resolve${ar(e.slice(0,-1))} can only be used in render() or setup().`)}function lc(e,t){return e&&(e[t]||e[Ct(t)]||e[ar(Ct(t))])}function sn(e,t,n,r){let o;const s=n,i=ue(e);if(i||Ze(e)){const a=i&&nn(e);a&&(e=Os(e)),o=new Array(e.length);for(let l=0,u=e.length;l<u;l++)o[l]=t(a?ct(e[l]):e[l],l,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&F(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];o[l]=t(e[c],c,l,s)}}else o=[];return o}function ha(e,t,n={},r,o){if(nt.ce||nt.parent&&Hr(nt.parent)&&nt.parent.ce)return y(),Se(xe,null,[Z("slot",n,r)],64);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(F("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),y();const i=s&&uc(s(n)),a=Se(xe,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function uc(e){return e.some(t=>Zr(t)?!(t.type===Ge||t.type===xe&&!uc(t.children)):!0)?e:null}const ma=e=>e?Hc(e)?Aa(e):ma(e.parent):null,mr=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?tn(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?tn(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?tn(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?tn(e.refs):e.refs,$parent:e=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ba(e),$forceUpdate:e=>e.f||(e.f=()=>{Rs(e.update)}),$nextTick:e=>e.n||(e.n=To.bind(e.proxy)),$watch:e=>hv.bind(e)}),va=e=>e==="_"||e==="$",ga=(e,t)=>e!==je&&!e.__isScriptSetup&&De(e,t),cc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ga(r,t))return i[t]=1,r[t];if(o!==je&&De(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&De(u,t))return i[t]=3,s[t];if(n!==je&&De(n,t))return i[t]=4,n[t];ya&&(i[t]=0)}}const c=mr[t];let d,f;if(c)return t==="$attrs"?(tt(e.attrs,"get",""),g.NODE_ENV!=="production"&&zs()):g.NODE_ENV!=="production"&&t==="$slots"&&tt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==je&&De(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,De(f,t))return f[t];g.NODE_ENV!=="production"&&nt&&(!Ze(t)||t.indexOf("__v")!==0)&&(o!==je&&va(t[0])&&De(o,t)?F(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===nt&&F(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return ga(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&De(o,t)?(F(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==je&&De(r,t)?(r[t]=n,!0):De(e.props,t)?(g.NODE_ENV!=="production"&&F(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&F(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==je&&De(e,i)||ga(t,i)||(a=s[0])&&De(a,i)||De(r,i)||De(mr,i)||De(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:De(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(cc.ownKeys=e=>(F("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Rm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(mr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>mr[n](e),set:et})}),t}function jm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:et})})}function Lm(e){const{ctx:t,setupState:n}=e;Object.keys(ye(n)).forEach(r=>{if(!n.__isScriptSetup){if(va(r[0])){F(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:et})}})}function dc(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Mm(){const e=Object.create(null);return(t,n)=>{e[n]?F(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ya=!0;function Um(e){const t=ba(e),n=e.proxy,r=e.ctx;ya=!1,t.beforeCreate&&fc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:m,updated:b,activated:O,deactivated:w,beforeDestroy:$,beforeUnmount:H,destroyed:T,unmounted:te,render:x,renderTracked:U,renderTriggered:j,errorCaptured:ge,serverPrefetch:q,expose:A,inheritAttrs:V,components:D,directives:ae,filters:$e}=t,E=g.NODE_ENV!=="production"?Mm():null;if(g.NODE_ENV!=="production"){const[Y]=e.propsOptions;if(Y)for(const re in Y)E("Props",re)}if(u&&Fm(u,r,E),i)for(const Y in i){const re=i[Y];de(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,Y,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Y]=re.bind(n),g.NODE_ENV!=="production"&&E("Methods",Y)):g.NODE_ENV!=="production"&&F(`Method "${Y}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!de(o)&&F("The data option must be a function. Plain object usage is no longer supported.");const Y=o.call(n,n);if(g.NODE_ENV!=="production"&&Ri(Y)&&F("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ie(Y))g.NODE_ENV!=="production"&&F("data() should return an object.");else if(e.data=No(Y),g.NODE_ENV!=="production")for(const re in Y)E("Data",re),va(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>Y[re],set:et})}if(ya=!0,s)for(const Y in s){const re=s[Y],he=de(re)?re.bind(n,n):de(re.get)?re.get.bind(n,n):et;g.NODE_ENV!=="production"&&he===et&&F(`Computed property "${Y}" has no getter.`);const oe=!de(re)&&de(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{F(`Write operation failed: computed property "${Y}" is readonly.`)}:et,Fe=Q({get:he,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:ht=>Fe.value=ht}),g.NODE_ENV!=="production"&&E("Computed",Y)}if(a)for(const Y in a)pc(a[Y],r,n,Y);if(l){const Y=de(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(re=>{dt(re,Y[re])})}c&&fc(c,e,"c");function P(Y,re){ue(re)?re.forEach(he=>Y(he.bind(n))):re&&Y(re.bind(n))}if(P(km,d),P(Le,f),P(Tm,m),P(Cm,b),P(Nm,O),P(Sm,w),P(Im,ge),P($m,U),P(Dm,j),P(fa,H),P(bt,te),P(Pm,q),ue(A))if(A.length){const Y=e.exposed||(e.exposed={});A.forEach(re=>{Object.defineProperty(Y,re,{get:()=>n[re],set:he=>n[re]=he})})}else e.exposed||(e.exposed={});x&&e.render===et&&(e.render=x),V!=null&&(e.inheritAttrs=V),D&&(e.components=D),ae&&(e.directives=ae),q&&sc(e)}function Fm(e,t,n=et){ue(e)&&(e=_a(e));for(const r in e){const o=e[r];let s;Ie(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),qe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function fc(e,t,n){Ht(ue(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function pc(e,t,n,r){let o=r.includes(".")?Dc(n,r):()=>n[r];if(Ze(e)){const s=t[e];de(s)?Je(o,s):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e}"`,s)}else if(de(e))Je(o,e.bind(n));else if(Ie(e))if(ue(e))e.forEach(s=>pc(s,t,n,r));else{const s=de(e.handler)?e.handler.bind(n):t[e.handler];de(s)?Je(o,s,e):g.NODE_ENV!=="production"&&F(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&F(`Invalid watch option: "${r}"`,e)}function ba(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(u=>Zs(l,u,i,!0)),Zs(l,t,i)),Ie(t)&&s.set(t,l),l}function Zs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Zs(e,s,n,!0),o&&o.forEach(i=>Zs(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&F('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Bm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Bm={data:hc,props:mc,emits:mc,methods:Ao,computed:Ao,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:Ao,directives:Ao,watch:Zm,provide:hc,inject:Hm};function hc(e,t){return t?e?function(){return Ke(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function Hm(e,t){return Ao(_a(e),_a(t))}function _a(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _t(e,t){return e?[...new Set([].concat(e,t))]:t}function Ao(e,t){return e?Ke(Object.create(null),e,t):t}function mc(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Ke(Object.create(null),dc(e),dc(t??{})):t}function Zm(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const r in t)n[r]=_t(e[r],t[r]);return n}function vc(){return{app:null,config:{isNativeTag:eh,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qm=0;function Wm(e,t){return function(r,o=null){de(r)||(r=Ke({},r)),o!=null&&!Ie(o)&&(g.NODE_ENV!=="production"&&F("root props passed to app.mount() must be an object."),o=null);const s=vc(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:qm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Kc,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&F("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?g.NODE_ENV!=="production"&&F("Plugin has already been applied to target app."):c&&de(c.install)?(i.add(c),c.install(u,...d)):de(c)?(i.add(c),c(u,...d)):g.NODE_ENV!=="production"&&F('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&F("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return g.NODE_ENV!=="production"&&$a(c,s.config),d?(g.NODE_ENV!=="production"&&s.components[c]&&F(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return g.NODE_ENV!=="production"&&zu(c),d?(g.NODE_ENV!=="production"&&s.directives[c]&&F(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)g.NODE_ENV!=="production"&&F("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&F("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const m=u._ceVNode||Z(r,o);return m.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Zt(m),c,f)}),d&&t?t(m,c):e(m,c,f),l=!0,u._container=c,c.__vue_app__=u,g.NODE_ENV!=="production"&&(u._instance=m.component,lm(u,Kc)),Aa(m.component)}},onUnmount(c){g.NODE_ENV!=="production"&&typeof c!="function"&&F(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(Ht(a,u._instance,16),e(null,u._container),g.NODE_ENV!=="production"&&(u._instance=null,um(u)),delete u._container.__vue_app__):g.NODE_ENV!=="production"&&F("Cannot unmount an app that is not mounted.")},provide(c,d){return g.NODE_ENV!=="production"&&c in s.provides&&F(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=d,u},runWithContext(c){const d=vr;vr=u;try{return c()}finally{vr=d}}};return u}}let vr=null;function dt(e,t){if(!Ye)g.NODE_ENV!=="production"&&F("provide() can only be used inside setup().");else{let n=Ye.provides;const r=Ye.parent&&Ye.parent.provides;r===n&&(n=Ye.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=Ye||nt;if(r||vr){const o=vr?vr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&de(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&F(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&F("inject() can only be used inside setup() or functional components.")}function zm(){return!!(Ye||nt||vr)}const gc={},yc=()=>Object.create(gc),bc=e=>Object.getPrototypeOf(e)===gc;function Km(e,t,n,r=!1){const o={},s=yc();e.propsDefaults=Object.create(null),_c(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Oc(t||{},o,e),n?e.props=r?o:Uh(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Gm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Jm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ye(o),[l]=e.propsOptions;let u=!1;if(!(g.NODE_ENV!=="production"&&Gm(e))&&(r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Ws(e.emitsOptions,f))continue;const m=t[f];if(l)if(De(s,f))m!==s[f]&&(s[f]=m,u=!0);else{const b=Ct(f);o[b]=wa(l,a,b,m,e,!1)}else m!==s[f]&&(s[f]=m,u=!0)}}}else{_c(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!De(t,d)&&((c=mn(d))===d||!De(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=wa(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!De(t,d))&&(delete s[d],u=!0)}u&&en(e.attrs,"set",""),g.NODE_ENV!=="production"&&Oc(t||{},o,e)}function _c(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(yo(l))continue;const u=t[l];let c;o&&De(o,c=Ct(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Ws(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=ye(n),u=a||je;for(let c=0;c<s.length;c++){const d=s[c];n[d]=wa(o,l,d,u[d],e,!De(u,d))}}return i}function wa(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=De(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&de(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Fo(o);r=u[n]=l.call(null,t),c()}}else r=l;o.ce&&o.ce._setProp(n,r)}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===mn(n))&&(r=!0))}return r}const Ym=new WeakMap;function wc(e,t,n=!1){const r=n?Ym:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!de(e)){const c=d=>{l=!0;const[f,m]=wc(d,t,!0);Ke(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return Ie(e)&&r.set(e,Lr),Lr;if(ue(s))for(let c=0;c<s.length;c++){g.NODE_ENV!=="production"&&!Ze(s[c])&&F("props must be strings when using array syntax.",s[c]);const d=Ct(s[c]);Ec(d)&&(i[d]=je)}else if(s){g.NODE_ENV!=="production"&&!Ie(s)&&F("invalid props options",s);for(const c in s){const d=Ct(c);if(Ec(d)){const f=s[c],m=i[d]=ue(f)||de(f)?{type:f}:Ke({},f),b=m.type;let O=!1,w=!0;if(ue(b))for(let $=0;$<b.length;++$){const H=b[$],T=de(H)&&H.name;if(T==="Boolean"){O=!0;break}else T==="String"&&(w=!1)}else O=de(b)&&b.name==="Boolean";m[0]=O,m[1]=w,(O||De(m,"default"))&&a.push(d)}}}const u=[i,a];return Ie(e)&&r.set(e,u),u}function Ec(e){return e[0]!=="$"&&!yo(e)?!0:(g.NODE_ENV!=="production"&&F(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Xm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Oc(e,t,n){const r=ye(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&Qm(s,r[s],i,g.NODE_ENV!=="production"?tn(r):r,!De(e,s)&&!De(e,mn(s)))}}function Qm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){F('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ue(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:m,expectedType:b}=tv(t,c[f]);d.push(b||""),u=m}if(!u){F(nv(e,t,d));return}}a&&!a(t,r)&&F('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ev=hn("String,Number,Boolean,Function,Symbol,BigInt");function tv(e,t){let n;const r=Xm(t);if(r==="null")n=e===null;else if(ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Ie(e):r==="Array"?n=ue(e):n=e instanceof t;return{valid:n,expectedType:r}}function nv(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ar).join(" | ")}`;const o=n[0],s=ji(t),i=Nc(t,o),a=Nc(t,s);return n.length===1&&Sc(o)&&!rv(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Sc(s)&&(r+=`with value ${a}.`),r}function Nc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Sc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function rv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const xc=e=>e[0]==="_"||e==="$stable",Ea=e=>ue(e)?e.map(qt):[qt(e)],ov=(e,t,n)=>{if(t._n)return t;const r=_e((...o)=>(g.NODE_ENV!=="production"&&Ye&&(!n||n.root===Ye.root)&&F(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ea(t(...o))),n);return r._c=!1,r},kc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(xc(o))continue;const s=e[o];if(de(s))t[o]=ov(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&F(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Ea(s);t[o]=()=>i}}},Tc=(e,t)=>{g.NODE_ENV!=="production"&&!Io(e.vnode)&&F("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ea(t);e.slots.default=()=>n},Oa=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},sv=(e,t,n)=>{const r=e.slots=yc();if(e.vnode.shapeFlag&32){const o=t._;o?(Oa(r,t,n),n&&_s(r,"_",o,!0)):kc(t,r)}else t&&Tc(e,t)},iv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=je;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Bn?(Oa(o,t,n),en(e,"set","$slots")):n&&a===1?s=!1:Oa(o,t,n):(s=!t.$stable,kc(t,o)),i=t}else t&&(Tc(e,t),i={default:1});if(s)for(const a in o)!xc(a)&&i[a]==null&&delete o[a]};let Vo,Zn;function wn(e,t){e.appContext.config.performance&&qs()&&Zn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&pm(e,t,qs()?Zn.now():Date.now())}function En(e,t){if(e.appContext.config.performance&&qs()){const n=`vue-${t}-${e.uid}`,r=n+":end";Zn.mark(r),Zn.measure(`<${Xs(e,e.type)}> ${t}`,n,r),Zn.clearMarks(n),Zn.clearMarks(r)}g.NODE_ENV!=="production"&&hm(e,t,qs()?Zn.now():Date.now())}function qs(){return Vo!==void 0||(typeof window<"u"&&window.performance?(Vo=!0,Zn=window.performance):Vo=!1),Vo}function av(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
12
12
|
|
|
13
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Mi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=et,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Bn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(L=_i(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case jo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Lo:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ae(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,ns):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&da(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);x(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},x=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:le,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Na(p,R),J,z),we&&pr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!yo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&an(M,L,p)}g.NODE_ENV!=="production"&&(_s(W,"__vnode",p,!0),_s(W,"__vueParentComponent",L,!0)),we&&pr(p,null,L,"beforeMount");const Pe=cv(I,le);Pe&&le.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&an(M,L,p),Pe&&le.enter(W),we&&pr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Ta(R.children)||R),h===R||Rc(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?qn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,le=h.props||je;let we;if(k&&gr(k,!1),(we=le.onVnodeBeforeUpdate)&&an(we,k,h,p),me&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Bn&&(W=0,J=!1,M=null),(X.innerHTML&&le.innerHTML==null||X.textContent&&le.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Na(h,I),R),g.NODE_ENV!=="production"&&Ro(p,h)):J||he(p,h,z,null,k,L,Na(h,I),R,!1),W>0){if(W&16)D(z,X,le,k,I);else if(W&2&&X.class!==le.class&&s(z,"class",null,le.class,I),W&4&&s(z,"style",X.style,le.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=le[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,le,k,I);((we=le.onVnodeUpdated)||me)&&Nt(()=>{we&&an(we,k,h,p),me&&pr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!yr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!yo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(yo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ae=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:le,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Bn||X&2048)&&(X=0,W=!1,le=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&le&&p.dynamicChildren?(V(p.dynamicChildren,le,k,I,R,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||I&&h===I.subTree)&&Ro(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&(As(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ns),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(Vs(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&As(h),re(L,h,k),g.NODE_ENV!=="production"&&Vs();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:le,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&As(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,le&&bo(le),($t=X.props&&X.props.onVnodeBeforeUpdate)&&an($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=ka(p);g.NODE_ENV!=="production"&&En(p,"render");const Kt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(Kt,mt,d(Kt.el),_i(Kt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>an($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Vs()}else{let X;const{el:le,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,Kt=Hr(h);if(gr(p,!1),Pe&&bo(Pe),!Kt&&(X=we&&we.onVnodeBeforeMount)&&an(X,Me,h),gr(p,!0),le&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=ka(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(le,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};Kt&&mt.__asyncHydrate?mt.__asyncHydrate(le,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=ka(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!Kt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>an(X,Me,It),I)}(h.shapeFlag&256||Me&&Hr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>Rs(me),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Lu(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:le,shapeFlag:we}=h;if(le>0){if(le&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(le&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&ts(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):ts(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Lr,h=h||Lr;const M=p.length,me=h.length,X=Math.min(M,me);let le;for(le=0;le<X;le++){const we=h[le]=W?qn(h[le]):qt(h[le]);O(p[le],we,k,null,I,R,J,z,W)}M>me?ts(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,le=me-1;for(;M<=X&&M<=le;){const we=p[M],Pe=h[M]=W?qn(h[M]):qt(h[M]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=le;){const we=p[X],Pe=h[le]=W?qn(h[le]):qt(h[le]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,le--}if(M>X){if(M<=le){const we=le+1,Pe=we<me?h[we].el:L;for(;M<=le;)O(null,h[M]=W?qn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>le)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=le;M++){const Et=h[M]=W?qn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=le-Pe+1;let Kt=!1,It=0;const rs=new Array(mt);for(M=0;M<mt;M++)rs[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=le;Me++)if(rs[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(rs[dn-Pe]=M+1,dn>=It?It=dn:Kt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Pf=Kt?dv(rs):Lr;for(Me=Pf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Df=Et+1<me?h[Et+1].el:L;rs[M]===0?O(null,dn,k,Df,I,R,J,z,W):Kt&&(Me<0||M!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,ns);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Lo){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:le,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};le?le(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:le,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&da(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&le,He=!Hr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&an(Me,h,p),me&6)Ow(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&pr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,ns,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?ts(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&ts(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&an(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):nr(k,L);return}if(h===Lo){x(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},nr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Ow=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Pc(W),Pc(M),L&&bo(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{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"&&fm(p)},ts=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},_i=p=>{if(p.shapeFlag&6)return _i(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ns={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:_i,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Na({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 gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(ue(r)&&ue(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]=qn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<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 Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("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)}function Ye(e,t,n){return g.NODE_ENV!=="production"&&!de(t)&&F("`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,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Ys)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:et,resume:et,pause:et};const u=Xe;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():Rs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;de(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=Sa(o,s.bind(r),n);return i(),a}function Dc(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}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];de(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&F(`Event "${c}" is emitted in component ${Xs(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 "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(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(!de(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(ue(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Ws(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let xa=!1;function zs(){xa=!0}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=Ms(e);let $,H;g.NODE_ENV!=="production"&&(xa=!1);try{if(n.shapeFlag&4){const x=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(x,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):x;$=qt(u.call(U,x,c,g.NODE_ENV!=="production"?tn(d):d,m,f,b)),H=a}else{const x=t;g.NODE_ENV!=="production"&&a===d&&zs(),$=qt(x.length>1?x(g.NODE_ENV!=="production"?tn(d):d,g.NODE_ENV!=="production"?{get attrs(){return zs(),tn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):x(g.NODE_ENV!=="production"?tn(d):d,null)),H=t.props?a:gv(a)}}catch(x){Mo.length=0,xo(x,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Ic($)),H&&O!==!1){const x=Object.keys(H),{shapeFlag:U}=T;if(x.length){if(U&7)s&&x.some(gs)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!xa&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];go(D)?gs(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.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"&&!Ac(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,Ms(w),$}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ta(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(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[qt(r),i]};function Ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Zr(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ta(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!gs(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Bn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Ws(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(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]&&!Ws(n,s))return!0}return!1}function _v({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 Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Lr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function S(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Se(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function Zr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=js.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 Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||de(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ks(t),scopeId:Wu,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:nt};return a?(Ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Zr(e)){const a=Zt(e,t,!0);return n&&Ca(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=ws(a)),Ie(l)&&(So(l)&&!ue(l)&&(l=Ke({},l)),t.style=Ui(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:de(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),F("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`.",`
|
|
14
|
-
Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Pa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?ue(s)?s.concat(Ks(t)):[s,Ks(t)]:Ks(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ue(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return ue(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function ce(e="",t=!1){return t?(y(),Se(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):ue(e)?Z(xe,null,e.slice()):typeof e=="object"?qn(e):Z(jo,null,String(e))}function qn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ue(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&&!bc(t)?t._ctx=nt:o===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Pa(...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=ws([t.class,r.class]));else if(o==="style")t.style=Ui([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(ue(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function an(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,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=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Xe=null;const Gs=()=>Xe||nt;let Js,Da;{const e=Mi(),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)}};Js=t("__VUE_INSTANCE_SETTERS__",n=>Xe=n),Da=t("__VUE_SSR_SETTERS__",n=>Ys=n)}const Fo=e=>{const t=Xe;return Js(e),e.scope.on(),()=>{e.scope.off(),Js(t)}},Bc=()=>{Xe&&Xe.scope.off(),Js(null)},Cv=hn("slot,component");function $a(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Ys=!1;function Pv(e,t=!1,n=!1){t&&Da(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Da(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&$a(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)$a(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&$v()&&F('"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,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Ur(o,e,0,[g.NODE_ENV!=="production"?tn(e.props):e.props,s]);if(gn(),i(),Ri(a)){if(Hr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: 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 Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Zr(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Ia;const $v=()=>!Ia;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Ia&&!r.render){const o=r.template||ba(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Ia(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||et}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===et&&!t&&(r.template?F('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".'):F("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return zs(),tt(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return tt(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return tt(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ue(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`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,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(Ln(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Va(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function Xs(e,t,n=!1){let r=Va(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?Rv(r):n?"App":"Anonymous"}function zc(e){return de(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Ys);if(g.NODE_ENV!=="production"){const r=Gs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!ue(t)?Zr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Zr(n)&&(n=[n]),Z(e,t,n))}function jv(){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 Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:nn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(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",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},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]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(de(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(ue(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?F:et;var ln={};let Ra;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{Ra=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){ln.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=Ra?e=>Ra.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={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"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.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{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Wn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={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},Fv=Ke({},Qu,Xc),ja=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Xc||(t[D]=e[D]);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:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:x,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ae,$e)=>{_r(D,ae?c:a),_r(D,ae?u:i),$e&&$e()},A=(D,ae)=>{D._isLeaving=!1,_r(D,d),_r(D,m),_r(D,f),ae&&ae()},V=D=>(ae,$e)=>{const E=D?j:H,P=()=>q(ae,D,$e);br(E,[ae,P]),ed(()=>{_r(ae,D?l:s),zn(ae,D?c:a),Qc(E)||td(ae,r,O,P)})};return Ke(t,{onBeforeEnter(D){br($,[D]),zn(D,s),zn(D,i)},onBeforeAppear(D){br(U,[D]),zn(D,l),zn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ae){D._isLeaving=!0;const $e=()=>A(D,ae);zn(D,d),zn(D,f),Wv(),ed(()=>{D._isLeaving&&(_r(D,d),zn(D,m),Qc(te)||td(D,r,w,$e))}),br(te,[D,$e])},onEnterCancelled(D){q(D,!1),br(T,[D])},onAppearCancelled(D){q(D,!0),br(ge,[D])},onLeaveCancelled(D){A(D),br(x,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){const t=ih(e);return ln.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function zn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Wn}Delay`),s=r(`${Wn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===Wn?i>0&&(c=Wn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Wn:Bo:null,f=c?c===Wn?s.length:l.length:0);const m=c===Wn&&/\b(transform|all)(,|$)/.test(r(`${Wn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(ln.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Qs(r,a,"")}else for(const i in t)n[i]==null&&Qs(r,i,"");for(const i in n)i==="display"&&(s=!0),Qs(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Qs(e,t,n){if(ue(n))n.forEach(r=>Qs(e,t,r));else if(n==null&&(n=""),ln.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ma={};function Qv(e,t){const n=Ma[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ma[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ma[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Vn(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):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?e.type==="checkbox"?"on":"":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=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){ln.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=ln.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(ln.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ua=0;const sg=Promise.resolve(),ig=()=>Ua||(sg.then(()=>Ua=0),Ua=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return de(e)||ue(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
15
|
-
Expected function or array of functions, received type ${typeof e}.`),et)}function lg(e,t){if(ue(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 fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?gs(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&de(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 fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={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)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(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=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);ln.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!de(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("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 On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return ln.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return ln.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let ei;const Og=new Uint8Array(16);function Ng(){if(!ei&&(ei=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ei))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ei(Og)}const it=[];for(let e=0;e<256;++e)it.push((e+256).toString(16).slice(1));function Sg(e,t=0){return it[e[t+0]]+it[e[t+1]]+it[e[t+2]]+it[e[t+3]]+"-"+it[e[t+4]]+it[e[t+5]]+"-"+it[e[t+6]]+it[e[t+7]]+"-"+it[e[t+8]]+it[e[t+9]]+"-"+it[e[t+10]]+it[e[t+11]]+it[e[t+12]]+it[e[t+13]]+it[e[t+14]]+it[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Kn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(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.colorScheme="normal",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.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),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 Zo=class Je{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(Je.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Je.storefrontKey}_loaded`,!1),this.utm=r(Je.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(Je.utmKey,{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}),this.hasUtm)localStorage.setItem(Je.utmKey,JSON.stringify(this.utm.value));else{const l=localStorage.getItem(Je.utmKey);if(l)try{this.utm=r(Je.utmKey,JSON.parse(l))}catch{}}const i=localStorage.getItem(Je.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(Je.storefrontKey);if(a?(this.storefront=r(Je.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${Je.storefrontKey}_loaded`,!0)):(this.storefront=r(Je.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Je.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Ye(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&Object.values(this.utm.value).some(t=>!!t)}get loadedUserPromise(){return new Promise(t=>{Ye(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Kn,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 Ci||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(Je.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(Je.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case Je.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case Je.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!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(Je.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&(localStorage.removeItem(Je.sessionKey),localStorage.removeItem(Je.utmKey))}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof An)return;console.warn("Could not surrender order:",t)}}};Zo.userKey="moonbase_user",Zo.sessionKey="moonbase_session",Zo.storefrontKey="moonbase_storefront",Zo.utmKey="moonbase_utm";var Dg=Zo;function vd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ti(e){const t=Ce(Kn);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 $g(e,t){const n=Ce(Kn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Mn(e)}`,null),o=n.stateFactory(`activation-request-${Mn(e)}-error`,null),s=n.stateFactory(`activation-request-${Mn(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Mn(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Mn(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Mn(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Qt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Ye(()=>Mn(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Qt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Ye(n.currentUser,async()=>{var c,d;const f=Mn(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Qt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Qt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Qt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(Kn);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 An?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(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);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},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)}return t.pushOrderContent(),n},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=>{var r;const o=typeof window<"u"?window.location.pathname:"",s=new URL((r=n.returnUrl)!=null?r:o,document.baseURI).href,i=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:s},t.hasUtm?t.utm.value:void 0);if(!n.redirect&&i.embeddedCheckoutUrl&&typeof window<"u"){const a=i.embeddedCheckoutUrl;return new Promise(l=>{md(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{l({next:u.detail.next})})})}else{if(n.redirect&&i.checkoutUrl&&typeof window<"u")return window.location.href=i.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Kn);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,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await Promise.all([t.updateStorefront(),t.surrenderOrder()]),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),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ni(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 Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let qr,Za;function Mg(){var e;return qr!==void 0||(typeof window<"u"&&window.performance?(qr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(qr=!0,Za=globalThis.perf_hooks.performance):qr=!1),qr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{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 Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}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 _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let qo;const Wo=e=>qo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var un;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(un||(un={}));const Er=typeof window<"u",Ed=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 Bg(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 qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ri(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 oi=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(oi.userAgent)&&/AppleWebKit/.test(oi.userAgent)&&!/Safari/.test(oi.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in oi?Zg:qg:()=>{};function Hg(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?Od(r.href)?qa(e,t,n):(r.target="_blank",ri(r)):ri(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ri(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ri(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),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 st(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 Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return st("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(st('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),st("Global state copied to clipboard.")}catch(t){if(kd(t))return;st("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),st("Global state pasted from clipboard.")}catch(t){if(kd(t))return;st("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){st("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),st(`Global state imported from "${o.name}".`)}catch(t){st("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(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 Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",si="_root";function Yg(e){return Wa(e)?{id:si,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(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,l)=>(a[l]=i[l],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 Qg(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:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case un.direct:return"mutation";case un.patchFunction:return"$patch";case un.patchObject:return"$patch";default:return"unknown"}}let Wr=!0;const ii=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ai=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,app:e},n=>{typeof n.now!="function"&&st("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:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(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"?st(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),st(`Store "${r}" reset.`)):st(`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:ai(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ai(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),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()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===si?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==si&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===si?t:t._s.get(r.nodeId);if(!s)return st(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wr=!1,r.set(s,i,r.state.value),Wr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return st(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return st(`Invalid path for store "${o}":
|
|
13
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Mi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=et,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Bn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(L=_i(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case jo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Lo:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ae(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,ns):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&da(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);x(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},x=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:le,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Na(p,R),J,z),we&&pr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!yo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&an(M,L,p)}g.NODE_ENV!=="production"&&(_s(W,"__vnode",p,!0),_s(W,"__vueParentComponent",L,!0)),we&&pr(p,null,L,"beforeMount");const Pe=cv(I,le);Pe&&le.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&an(M,L,p),Pe&&le.enter(W),we&&pr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Ta(R.children)||R),h===R||Rc(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?qn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,le=h.props||je;let we;if(k&&gr(k,!1),(we=le.onVnodeBeforeUpdate)&&an(we,k,h,p),me&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Bn&&(W=0,J=!1,M=null),(X.innerHTML&&le.innerHTML==null||X.textContent&&le.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Na(h,I),R),g.NODE_ENV!=="production"&&Ro(p,h)):J||he(p,h,z,null,k,L,Na(h,I),R,!1),W>0){if(W&16)D(z,X,le,k,I);else if(W&2&&X.class!==le.class&&s(z,"class",null,le.class,I),W&4&&s(z,"style",X.style,le.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=le[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,le,k,I);((we=le.onVnodeUpdated)||me)&&Nt(()=>{we&&an(we,k,h,p),me&&pr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!yr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!yo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(yo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ae=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:le,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Bn||X&2048)&&(X=0,W=!1,le=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&le&&p.dynamicChildren?(V(p.dynamicChildren,le,k,I,R,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||I&&h===I.subTree)&&Ro(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&(As(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ns),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(Vs(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&As(h),re(L,h,k),g.NODE_ENV!=="production"&&Vs();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:le,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&As(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,le&&bo(le),($t=X.props&&X.props.onVnodeBeforeUpdate)&&an($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=ka(p);g.NODE_ENV!=="production"&&En(p,"render");const Kt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(Kt,mt,d(Kt.el),_i(Kt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>an($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&Vs()}else{let X;const{el:le,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,Kt=Hr(h);if(gr(p,!1),Pe&&bo(Pe),!Kt&&(X=we&&we.onVnodeBeforeMount)&&an(X,Me,h),gr(p,!0),le&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=ka(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(le,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};Kt&&mt.__asyncHydrate?mt.__asyncHydrate(le,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=ka(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!Kt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>an(X,Me,It),I)}(h.shapeFlag&256||Me&&Hr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>Rs(me),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Lu(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:le,shapeFlag:we}=h;if(le>0){if(le&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(le&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&ts(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):ts(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Lr,h=h||Lr;const M=p.length,me=h.length,X=Math.min(M,me);let le;for(le=0;le<X;le++){const we=h[le]=W?qn(h[le]):qt(h[le]);O(p[le],we,k,null,I,R,J,z,W)}M>me?ts(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,le=me-1;for(;M<=X&&M<=le;){const we=p[M],Pe=h[M]=W?qn(h[M]):qt(h[M]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=le;){const we=p[X],Pe=h[le]=W?qn(h[le]):qt(h[le]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,le--}if(M>X){if(M<=le){const we=le+1,Pe=we<me?h[we].el:L;for(;M<=le;)O(null,h[M]=W?qn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>le)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=le;M++){const Et=h[M]=W?qn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=le-Pe+1;let Kt=!1,It=0;const rs=new Array(mt);for(M=0;M<mt;M++)rs[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=le;Me++)if(rs[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(rs[dn-Pe]=M+1,dn>=It?It=dn:Kt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Pf=Kt?dv(rs):Lr;for(Me=Pf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Df=Et+1<me?h[Et+1].el:L;rs[M]===0?O(null,dn,k,Df,I,R,J,z,W):Kt&&(Me<0||M!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,ns);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Lo){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:le,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};le?le(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:le,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&da(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&le,He=!Hr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&an(Me,h,p),me&6)Ow(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&pr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,ns,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?ts(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&ts(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&an(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):nr(k,L);return}if(h===Lo){x(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},nr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Ow=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Pc(W),Pc(M),L&&bo(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{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"&&fm(p)},ts=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},_i=p=>{if(p.shapeFlag&6)return _i(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ns={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:_i,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Na({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 gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(ue(r)&&ue(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]=qn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<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 Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("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)}function Je(e,t,n){return g.NODE_ENV!=="production"&&!de(t)&&F("`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,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Ys)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:et,resume:et,pause:et};const u=Ye;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():Rs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;de(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=Sa(o,s.bind(r),n);return i(),a}function Dc(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}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];de(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&F(`Event "${c}" is emitted in component ${Xs(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 "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(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(!de(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(ue(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function Ws(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let xa=!1;function zs(){xa=!0}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=Ms(e);let $,H;g.NODE_ENV!=="production"&&(xa=!1);try{if(n.shapeFlag&4){const x=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(x,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):x;$=qt(u.call(U,x,c,g.NODE_ENV!=="production"?tn(d):d,m,f,b)),H=a}else{const x=t;g.NODE_ENV!=="production"&&a===d&&zs(),$=qt(x.length>1?x(g.NODE_ENV!=="production"?tn(d):d,g.NODE_ENV!=="production"?{get attrs(){return zs(),tn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):x(g.NODE_ENV!=="production"?tn(d):d,null)),H=t.props?a:gv(a)}}catch(x){Mo.length=0,xo(x,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Ic($)),H&&O!==!1){const x=Object.keys(H),{shapeFlag:U}=T;if(x.length){if(U&7)s&&x.some(gs)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!xa&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];go(D)?gs(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.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"&&!Ac(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,Ms(w),$}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ta(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(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[qt(r),i]};function Ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Zr(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ta(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!gs(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Bn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Ws(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(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]&&!Ws(n,s))return!0}return!1}function _v({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 Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Lr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function S(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Se(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function Zr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=js.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 Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||de(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&Ks(t),scopeId:Wu,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:nt};return a?(Ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Zr(e)){const a=Zt(e,t,!0);return n&&Ca(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=ws(a)),Ie(l)&&(So(l)&&!ue(l)&&(l=Ke({},l)),t.style=Ui(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:de(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),F("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`.",`
|
|
14
|
+
Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Pa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?ue(s)?s.concat(Ks(t)):[s,Ks(t)]:Ks(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ue(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return ue(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function ce(e="",t=!1){return t?(y(),Se(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):ue(e)?Z(xe,null,e.slice()):typeof e=="object"?qn(e):Z(jo,null,String(e))}function qn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ue(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&&!bc(t)?t._ctx=nt:o===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Pa(...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=ws([t.class,r.class]));else if(o==="style")t.style=Ui([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(ue(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function an(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,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=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Ye=null;const Gs=()=>Ye||nt;let Js,Da;{const e=Mi(),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)}};Js=t("__VUE_INSTANCE_SETTERS__",n=>Ye=n),Da=t("__VUE_SSR_SETTERS__",n=>Ys=n)}const Fo=e=>{const t=Ye;return Js(e),e.scope.on(),()=>{e.scope.off(),Js(t)}},Bc=()=>{Ye&&Ye.scope.off(),Js(null)},Cv=hn("slot,component");function $a(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Ys=!1;function Pv(e,t=!1,n=!1){t&&Da(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Da(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&$a(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)$a(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&$v()&&F('"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,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Ur(o,e,0,[g.NODE_ENV!=="production"?tn(e.props):e.props,s]);if(gn(),i(),Ri(a)){if(Hr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: 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 Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Zr(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Ia;const $v=()=>!Ia;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Ia&&!r.render){const o=r.template||ba(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Ia(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||et}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===et&&!t&&(r.template?F('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".'):F("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return zs(),tt(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return tt(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return tt(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ue(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`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,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(Ln(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Va(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function Xs(e,t,n=!1){let r=Va(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?Rv(r):n?"App":"Anonymous"}function zc(e){return de(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Ys);if(g.NODE_ENV!=="production"){const r=Gs();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!ue(t)?Zr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Zr(n)&&(n=[n]),Z(e,t,n))}function jv(){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 Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:nn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(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",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},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]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(de(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(ue(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?F:et;var ln={};let Ra;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{Ra=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){ln.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=Ra?e=>Ra.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={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"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.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{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Wn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={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},Fv=Ke({},Qu,Xc),ja=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Xc||(t[D]=e[D]);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:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:x,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ae,$e)=>{_r(D,ae?c:a),_r(D,ae?u:i),$e&&$e()},A=(D,ae)=>{D._isLeaving=!1,_r(D,d),_r(D,m),_r(D,f),ae&&ae()},V=D=>(ae,$e)=>{const E=D?j:H,P=()=>q(ae,D,$e);br(E,[ae,P]),ed(()=>{_r(ae,D?l:s),zn(ae,D?c:a),Qc(E)||td(ae,r,O,P)})};return Ke(t,{onBeforeEnter(D){br($,[D]),zn(D,s),zn(D,i)},onBeforeAppear(D){br(U,[D]),zn(D,l),zn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ae){D._isLeaving=!0;const $e=()=>A(D,ae);zn(D,d),zn(D,f),Wv(),ed(()=>{D._isLeaving&&(_r(D,d),zn(D,m),Qc(te)||td(D,r,w,$e))}),br(te,[D,$e])},onEnterCancelled(D){q(D,!1),br(T,[D])},onAppearCancelled(D){q(D,!0),br(ge,[D])},onLeaveCancelled(D){A(D),br(x,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){const t=ih(e);return ln.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function zn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Wn}Delay`),s=r(`${Wn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===Wn?i>0&&(c=Wn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Wn:Bo:null,f=c?c===Wn?s.length:l.length:0);const m=c===Wn&&/\b(transform|all)(,|$)/.test(r(`${Wn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(ln.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Qs(r,a,"")}else for(const i in t)n[i]==null&&Qs(r,i,"");for(const i in n)i==="display"&&(s=!0),Qs(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Qs(e,t,n){if(ue(n))n.forEach(r=>Qs(e,t,r));else if(n==null&&(n=""),ln.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ma={};function Qv(e,t){const n=Ma[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ma[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ma[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Vn(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):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?e.type==="checkbox"?"on":"":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=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){ln.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=ln.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(ln.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ua=0;const sg=Promise.resolve(),ig=()=>Ua||(sg.then(()=>Ua=0),Ua=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return de(e)||ue(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
15
|
+
Expected function or array of functions, received type ${typeof e}.`),et)}function lg(e,t){if(ue(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 fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?gs(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&de(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 fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={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)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(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=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);ln.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!de(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("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 On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return ln.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return ln.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let ei;const Og=new Uint8Array(16);function Ng(){if(!ei&&(ei=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ei))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ei(Og)}const it=[];for(let e=0;e<256;++e)it.push((e+256).toString(16).slice(1));function Sg(e,t=0){return it[e[t+0]]+it[e[t+1]]+it[e[t+2]]+it[e[t+3]]+"-"+it[e[t+4]]+it[e[t+5]]+"-"+it[e[t+6]]+it[e[t+7]]+"-"+it[e[t+8]]+it[e[t+9]]+"-"+it[e[t+10]]+it[e[t+11]]+it[e[t+12]]+it[e[t+13]]+it[e[t+14]]+it[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Kn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(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.colorScheme="normal",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.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),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 Zo=class Qe{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(Qe.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Qe.storefrontKey}_loaded`,!1),this.utm=r(Qe.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(Qe.utmKey,{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}),this.hasUtm&&t.persistUtm)localStorage.setItem(Qe.utmKey,JSON.stringify(this.utm.value));else if(t.persistUtm){const l=localStorage.getItem(Qe.utmKey);if(l)try{this.utm=r(Qe.utmKey,JSON.parse(l))}catch{}}const i=localStorage.getItem(Qe.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtm&&this.pushOrderContent());const a=localStorage.getItem(Qe.storefrontKey);if(a?(this.storefront=r(Qe.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${Qe.storefrontKey}_loaded`,!0)):(this.storefront=r(Qe.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${Qe.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&Object.values(this.utm.value).some(t=>!!t)}get loadedUserPromise(){return new Promise(t=>{Je(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Kn,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 Ci||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(Qe.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(Qe.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case Qe.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case Qe.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!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(Qe.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(Qe.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof An)return;console.warn("Could not surrender order:",t)}}};Zo.userKey="moonbase_user",Zo.sessionKey="moonbase_session",Zo.storefrontKey="moonbase_storefront",Zo.utmKey="moonbase_utm";var Dg=Zo;function vd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ti(e){const t=Ce(Kn);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 $g(e,t){const n=Ce(Kn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Mn(e)}`,null),o=n.stateFactory(`activation-request-${Mn(e)}-error`,null),s=n.stateFactory(`activation-request-${Mn(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Mn(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Mn(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Mn(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Qt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>Mn(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Qt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=Mn(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Qt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Qt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Qt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(Kn);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 An?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(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);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},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)}return t.pushOrderContent(),n},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=>{var r;const o=typeof window<"u"?window.location.pathname:"",s=new URL((r=n.returnUrl)!=null?r:o,document.baseURI).href,i=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:s},t.hasUtm?t.utm.value:void 0);if(!n.redirect&&i.embeddedCheckoutUrl&&typeof window<"u"){const a=i.embeddedCheckoutUrl;return new Promise(l=>{md(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{l({next:u.detail.next})})})}else{if(n.redirect&&i.checkoutUrl&&typeof window<"u")return window.location.href=i.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Kn);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,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await Promise.all([t.updateStorefront(),t.surrenderOrder()]),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),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ni(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 Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let qr,Za;function Mg(){var e;return qr!==void 0||(typeof window<"u"&&window.performance?(qr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(qr=!0,Za=globalThis.perf_hooks.performance):qr=!1),qr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{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 Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}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 _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let qo;const Wo=e=>qo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var un;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(un||(un={}));const Er=typeof window<"u",Ed=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 Bg(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 qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ri(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 oi=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(oi.userAgent)&&/AppleWebKit/.test(oi.userAgent)&&!/Safari/.test(oi.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in oi?Zg:qg:()=>{};function Hg(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?Od(r.href)?qa(e,t,n):(r.target="_blank",ri(r)):ri(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ri(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ri(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),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 st(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 Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return st("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(st('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),st("Global state copied to clipboard.")}catch(t){if(kd(t))return;st("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),st("Global state pasted from clipboard.")}catch(t){if(kd(t))return;st("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){st("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),st(`Global state imported from "${o.name}".`)}catch(t){st("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(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 Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",si="_root";function Yg(e){return Wa(e)?{id:si,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(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,l)=>(a[l]=i[l],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 Qg(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:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case un.direct:return"mutation";case un.patchFunction:return"$patch";case un.patchObject:return"$patch";default:return"unknown"}}let Wr=!0;const ii=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ai=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,app:e},n=>{typeof n.now!="function"&&st("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:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(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"?st(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),st(`Store "${r}" reset.`)):st(`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:ai(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ai(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),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()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===si?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==si&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===si?t:t._s.get(r.nodeId);if(!s)return st(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wr=!1,r.set(s,i,r.state.value),Wr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return st(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return st(`Invalid path for store "${o}":
|
|
16
16
|
${i}
|
|
17
|
-
Only state can be modified.`);i[0]="$state",Wr=!1,r.set(s,i,r.state.value),Wr=!0}})})}function ry(e,t){ii.includes(ai(t.$id))||ii.push(ai(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,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:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{
|
|
17
|
+
Only state can be modified.`);i[0]="$state",Wr=!1,r.set(s,i,r.state.value),Wr=!0}})})}function ry(e,t){ii.includes(ai(t.$id))||ii.push(ai(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,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:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Je(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Wr&&n.addTimelineEvent({layerId:Or,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Gn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Wr)return;const u={time:r(),title:ey(a),data:ty({store:Wt(t.$id)},Qg(i)),groupId:Gn};a===un.patchFunction?u.subtitle="⤵️":a===un.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Or,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Ln(i=>{o(i),n.addTimelineEvent({layerId:Or,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("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&&st(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&st(`"${t.$id}" store installed 🆕`)})}let Pd=0,Gn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Pd,i=n?new Proxy(e,{get(...l){return Gn=s,Reflect.get(...l)},set(...l){return Gn=s,Reflect.set(...l)}}):e;Gn=s;const a=r[o].apply(i,arguments);return Gn=void 0,a}}function oy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}ry(e,t)}}function sy(){const e=su(!0),t=e.run(()=>C({}));let n=[],r=[];const o=Ln({install(s){Wo(o),o._a=s,s.provide(wd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er&&ny(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!yd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(oy),o}function $d(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];wr(o)&&wr(r)&&!qe(r)&&!nn(r)?e[n]=$d(o,r):e[n]=r}return e}const Id=()=>{};function Ad(e,t,n,r=Id){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&iu()&&yh(o),o}function zr(e,...t){e.slice().forEach(n=>{n(...t)})}const iy=e=>e(),Vd=Symbol(),za=Symbol();function Ka(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];wr(o)&&wr(r)&&e.hasOwnProperty(n)&&!qe(r)&&!nn(r)?e[n]=Ka(o,r):e[n]=r}return e}const ay=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function ly(e){return!wr(e)||!e.hasOwnProperty(ay)}const{assign:Rt}=Object;function Rd(e){return!!(qe(e)&&e.effect)}function jd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?$u(C(o?o():{}).value):$u(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&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]=Ln(Q(()=>{Wo(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!yd&&(l.onTrigger=A=>{u?m=A:u==!1&&!j._hotUpdating&&(Array.isArray(m)?m.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function $(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(m=[]),typeof A=="function"?(A(r.state.value[e]),V={type:un.patchFunction,storeId:e,events:m}):(Ka(r.state.value[e],A),V={type:un.patchObject,payload:A,storeId:e,events:m});const D=w=Symbol();To().then(()=>{w===D&&(u=!0)}),c=!0,zr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,D=V?V():{};this.$patch(ae=>{Rt(ae,D)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Id;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Vd in A)return A[za]=V,A;const D=function(){Wo(r);const ae=Array.from(arguments),$e=[],E=[];function P(he){$e.push(he)}function Y(he){E.push(he)}zr(f,{args:ae,name:D[za],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ae)}catch(he){throw zr(E,he),he}return re instanceof Promise?re.then(he=>(zr($e,he),he)).catch(he=>(zr(E,he),Promise.reject(he))):(zr($e,re),re)};return D[Vd]=!0,D[za]=V,D},x=Ln({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:Ad.bind(null,f),$patch:$,$reset:H,$subscribe(A,V={}){const D=Ad(d,A,V.detached,()=>ae()),ae=i.run(()=>Je(()=>r.state.value[e],$e=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:un.direct,events:m},$e)},Rt({},l,V)));return D},$dispose:T},j=No(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er?Rt({_hmrPayload:x,_customProperties:Ln(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||iy)(()=>r._e.run(()=>(i=su()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!Rd(V)||nn(V))Te.NODE_ENV!=="production"&&o?ni(O.value,A,Qi(q,A)):s||(b&&ly(V)&&(qe(V)?V.value=b[A]:Ka(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&x.state.push(A);else if(typeof V=="function"){const D=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=D,Te.NODE_ENV!=="production"&&(x.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&Rd(V)&&(x.getters[A]=s?n.getters[A]:V,Er&&(q._getters||(q._getters=Ln([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");$(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=Ln(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const D=A.$state[V],ae=j.$state[V];typeof D=="object"&&wr(D)&&wr(ae)?$d(D,ae):A.$state[V]=ae}ni(j,V,Qi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Ha(j,V)}),u=!1,c=!1,r.state.value[e]=Qi(A._hmrPayload,"hotState"),c=!0,To().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const D=A[V];ni(j,V,te(D,V))}for(const V in A._hmrPayload.getters){const D=A._hmrPayload.getters[V],ae=s?Q(()=>(Wo(r),D.call(j,j))):D;ni(j,V,ae)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Ha(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Ha(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(D=>j._customProperties.add(D)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
18
18
|
state: () => new MyClass()
|
|
19
19
|
Found in store "${j.$id}".`),b&&s&&n.hydrate&&n.hydrate(j.$state,b),u=!0,c=!0,j}function uy(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=zm();if(a=(Te.NODE_ENV==="test"&&qo&&qo._testing?null:a)||(u?Ce(wd,null):null),a&&Wo(a),Te.NODE_ENV!=="production"&&!qo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
20
20
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
21
|
-
This will fail in production.`);a=qo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=Gs();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var ie=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ie||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},zo=Symbol("options");var Oe=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Oe||{});const Re=uy("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),To(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),zt=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=fe({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(zo);return Le(()=>{zt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),S("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Oe).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),S("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):ce("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),S("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Oe).Cart,_(ie).AddToCart))}," Cart ")):ce("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),S("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Oe).Authentication,_(ie).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),S("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Oe).Customer,_(ie).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):ce("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=fe({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Pa({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):ce("",!0)],8,my))}}),Kr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),S("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Kr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Ld=Symbol("form-state"),Jn=fe({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await zt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(i,a)=>(y(),S("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[ha(i.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Yn=Kr(fe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Ld),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),S("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Se(jt,{key:0})):ce("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-1440b0cf"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],Md=fe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",xy,[N("div",ky,[N("input",Pa({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):ce("",!0)])]))}}),Iy=["data-visible"],Ay=fe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);zt(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Se(Jn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Yn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Oe).Authentication,_(ie).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=fe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof An?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);zt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),S("div",Vy,[Z(jt)])):i.value?(y(),S(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),S("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=fe({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),zt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof An?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Se(Jn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(({disabled:u})=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:"",disabled:u},null,8,["modelValue","disabled"]),Z(Yn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=fe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);zt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Se(Jn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=fe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Re(),{user:o,confirmEmailChange:s}=St(),i=C(!0),a=C(null);return Le(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),zt(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return y(),S("div",Hy,[i.value?(y(),S("div",Zy,[Z(jt)])):a.value?(y(),S("div",qy,K(a.value),1)):(y(),S(xe,{key:2},[N("h3",null," Hi "+K((c=_(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){Tr(this,"current",this.detect());Tr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Ko=new zy;function Ja(e,t,n,r){Ko.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=C(0),t=C(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Qe(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Qe),r}var Xn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Xn||{}),Qn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Qn||{});function rt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return li(i);if(t&1){const a=s.unmount??!0?0:1;return Qe(a,{0(){return null},1(){return li({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return li(i)}function li({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
|
|
21
|
+
This will fail in production.`);a=qo,a._s.has(r)||(s?Ga(r,t,o,a):jd(r,o,a),Te.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Te.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Ga(d,t,o,a,!0):jd(d,Rt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Te.NODE_ENV!=="production"&&Er){const d=Gs();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=c}}return c}return i.$id=r,i}var ie=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e))(ie||{});const cy={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}},checkout:{redirect:!1}},zo=Symbol("options");var Oe=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Oe||{});const Re=uy("ui",()=>{const e=C("None"),t=C(null),n=C(null),r=C(null);function o(u,c,d){n.value=d??null,t.value=c,e.value=u}function s(u,c,d){r.value=[u,c,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const u=r.value;i(),To(()=>{if(u){const[c,d,f]=u;n.value=f??null,t.value=d,e.value=c}})}function l(u){return n.value===null||!n.value[u]?null:n.value[u]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),zt=e=>new Promise(t=>setTimeout(t,e)),dy=["data-visible","data-location"],fy={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},py=["disabled"],hy=fe({__name:"Toolbar",setup(e){const t=C(!1),n=Re(),r=St(),o=Ce(zo);return Le(()=>{zt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,u,c,d;return y(),S("div",{class:"moonbase:toolbar","data-visible":t.value&&_(n).active===_(Oe).None?"true":"false","data-location":_(o).toolbar.location},[(a=_(o))!=null&&a.toolbar.show.moonbase?(y(),S("a",fy,i[3]||(i[3]=[Sv('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)]))):ce("",!0),(l=_(o))!=null&&l.toolbar.show.cart?(y(),S("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>_(n).show(_(Oe).Cart,_(ie).AddToCart))}," Cart ")):ce("",!0),(u=_(o))!=null&&u.toolbar.show.account&&!_(r).user.value?(y(),S("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!_(r).loaded,onClick:i[1]||(i[1]=f=>_(n).show(_(Oe).Authentication,_(ie).SignIn))}," Log in ",8,py)):(c=_(o))!=null&&c.toolbar.show.account?(y(),S("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>_(n).show(_(Oe).Customer,_(ie).ViewAccount))},K((d=_(r).user.value)==null?void 0:d.name),1)):ce("",!0)],8,dy)}}}),my=["hidden"],vy=["for"],gy=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],yy=["id"],by=["id"],wt=fe({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",{class:"moonbase:input",hidden:t.hidden||void 0},[N("label",{for:`mb-${t.name}`},K(t.label),9,vy),N("input",Pa({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,gy),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,yy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,by)):ce("",!0)],8,my))}}),Kr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_y={},wy={fill:"none",viewBox:"0 0 24 24"};function Ey(e,t){return y(),S("svg",wy,t[0]||(t[0]=[N("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),N("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))}const jt=Kr(_y,[["render",Ey],["__scopeId","data-v-687bcaf0"]]),Oy=["disabled"],Ld=Symbol("form-state"),Jn=fe({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1);dt(Ld,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await zt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(i,a)=>(y(),S("form",{disabled:n.value||r.value,onSubmit:pg(s,["prevent"])},[ha(i.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,Oy))}}),Ny=["disabled","data-success","data-error","data-working"],Sy=["data-visible"],Yn=Kr(fe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Ld),s=Q(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(y(),S("button",{class:"moonbase:submit-button",type:"submit",disabled:_(r)||_(o)||_(n),"data-success":_(r)||void 0,"data-error":_(o)||void 0,"data-working":_(n)||void 0},[N("div",{"data-visible":_(n)||void 0,"aria-hidden":"true"},[_(n)?(y(),Se(jt,{key:0})):ce("",!0)],8,Sy),ke(" "+K(s.value),1)],8,Ny))}}),[["__scopeId","data-v-1440b0cf"]]),xy={class:"moonbase:checkbox"},ky={class:"moonbase:checkbox-container"},Ty=["id","name","value","disabled","aria-invalid","aria-describedby"],Cy={class:"moonbase:checkbox-description"},Py=["for"],Dy=["id"],$y=["id"],Md=fe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(y(),S("div",xy,[N("div",ky,[N("input",Pa({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,Ty)]),N("div",Cy,[N("label",{for:`mb-${t.name}`},K(t.label),9,Py),t.error?(y(),S("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,Dy)):t.hint?(y(),S("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,$y)):ce("",!0)])]))}}),Iy=["data-visible"],Ay=fe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),u=C(null);async function c(){u.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);zt(1500).then(()=>n("signedUp",d))}catch(d){throw u.value=d.message,d}}return(d,f)=>(y(),Se(Jn,{handler:c,class:"moonbase:sign-up"},{default:_e(()=>[Z(wt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),Z(Yn,{success:"Signed up",label:"Sign up",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!u.value||void 0},K(u.value),9,Iy),N("button",{type:"button",onClick:f[4]||(f[4]=m=>_(r).show(_(Oe).Authentication,_(ie).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Vy={key:0,class:"moonbase:loader"},Ry={key:1,class:"moonbase:error","data-visible":""},jy=["data-visible"],Ly=fe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=C(!0),i=C(null),a=C(""),l=C(null);Le(async()=>{try{const c=r.getParameter("email"),d=r.getParameter("code");if(!c||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(c,d)}catch(c){c instanceof An?l.value="Could not find a user to confirm":l.value=c.message}s.value=!1});async function u(){var c,d;if(l.value=null,!!((c=i.value)!=null&&c.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);zt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:confirm-account"},{default:_e(()=>[s.value?(y(),S("div",Vy,[Z(jt)])):i.value?(y(),S(xe,{key:2},[N("h3",null," Hi "+K(i.value.name)+", ",1),d[1]||(d[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,jy)],64)):(y(),S("div",Ry,K(l.value),1))]),_:1}))}}),My=["data-visible"],Uy=fe({__name:"ForgotPassword",setup(e){const t=Re(),n=St(),r=C(t.getParameter("email")??""),o=C(null),s=C(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),zt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof An?o.value="User not found":o.value=a.message,a}}return(a,l)=>(y(),Se(Jn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:_e(({disabled:u})=>[l[1]||(l[1]=N("h3",null," Forgot your password? ",-1)),l[2]||(l[2]=N("p",null," Please enter your email for a reset link: ",-1)),Z(wt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:"",disabled:u},null,8,["modelValue","disabled"]),Z(Yn,{success:"Email sent",label:"Reset password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,My)]),_:1}))}}),Fy=["data-visible"],By=fe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Q(()=>r.getParameter("email")),i=C(""),a=C(null);Le(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const u=r.getParameter("code");if(u)try{await o.resetPassword(s.value,i.value,u);const c=await o.signIn(s.value,i.value);zt(1500).then(()=>n("passwordReset",c))}catch(c){throw a.value=c.message,c}}return(u,c)=>(y(),Se(Jn,{handler:l,class:"moonbase:reset-password"},{default:_e(()=>[N("h3",null," Hi "+K(s.value)+", ",1),c[1]||(c[1]=N("p",null," Please create a new password for your account: ",-1)),Z(wt,{"model-value":_(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),Z(wt,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Password saved",label:"Save password",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,Fy)]),_:1}))}}),Hy={class:"moonbase:confirm-email-change"},Zy={key:0,class:"moonbase:loader"},qy={key:1,class:"moonbase:error","data-visible":""},Wy=fe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Re(),{user:o,confirmEmailChange:s}=St(),i=C(!0),a=C(null);return Le(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),zt(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return y(),S("div",Hy,[i.value?(y(),S("div",Zy,[Z(jt)])):a.value?(y(),S("div",qy,K(a.value),1)):(y(),S(xe,{key:2},[N("h3",null," Hi "+K((c=_(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=N("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}});class zy{constructor(){Tr(this,"current",this.detect());Tr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Ko=new zy;function Ja(e,t,n,r){Ko.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ud(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function Ya(){let e=C(0),t=C(!0);return Ud(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Xe(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xe),r}var Xn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Xn||{}),Qn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Qn||{});function rt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Bd(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return li(i);if(t&1){const a=s.unmount??!0?0:1;return Xe(a,{0(){return null},1(){return li({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return li(i)}function li({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Xa(e,["unmount","static"]);let a=(u=n.default)==null?void 0:u.call(n,r);const l={};if(r){let c=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(c=!0),m===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Fd(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!Ky(c)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(b=>b.trim()).filter((b,O,w)=>w.indexOf(b)===O).sort((b,O)=>b.localeCompare(O)).map(b=>` - ${b}`).join(`
|
|
22
22
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
|
|
23
23
|
`)].join(`
|
|
24
|
-
`));const f=Bd(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===xe?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var er=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(er||{});let tr=fe({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return rt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(Ko.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const ui=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ci(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ui)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Qe(t,{0(){return e.matches(ui)},1(){let r=e;for(;r!==null;){if(r.matches(ui))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function Gr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function at(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Gr(e):e:ci(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Sr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Sr[0]===t.target)return;let n=t.target;n=n.closest(ui),Sr.unshift(n??t.target),Sr=Sr.filter(r=>r!=null&&r.isConnected),Sr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function di(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Go=Object.assign(fe({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(m){const b=G(o);if(!b)return;(w=>w())(()=>{Qe(l.value,{[Dt.Forwards]:()=>{at(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{at(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=C(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Zd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(b,O)||(c.value?at(G(o),Qe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Nr(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:$,...H}=e;return Ue(xe,[!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable}),rt({ourProps:b,theirProps:{...t,...H},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable})])}}}),{features:qd});function Xy(e){const t=C(Sr.slice());return Ye([e],([n],[r])=>{r===!0&&n===!1?di(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Sr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),bt(()=>{t.value&&Nr(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{Ye([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&di(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):at(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Fh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Jo(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return di(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Jo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return zd()||sb()}function ab(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Jo();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const xr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Jo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xr.subscribe(()=>{const e=xr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&xr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&xr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(xr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ye([e,t],([s,i],[a],l)=>{if(!s||!i)return;xr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(xr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const el=new Map,Yo=new Map;function Kd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Yo.get(r)??1;if(s===1?Yo.delete(r):Yo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Yo.get(r)??0;Yo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Xo(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Xo(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Xo(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Xo(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Xo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Xo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(tr,{features:er.Hidden,ref:r})}}}let Xd=Symbol("Context");var lt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(lt||{});function pb(){return fi()!==null}function fi(){return Ce(Xd,null)}function Qd(e){dt(Xd,e)}const ef=Symbol("ForcePortalRootContext");function hb(){return Ce(ef,!1)}const tf=fe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ef,e.force),()=>{const{force:r,...o}=e;return rt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function mb(){return Ce(nf,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{Ye(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(nf,s)}var ot=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ot||{});let gb=Symbol("DescriptionContext");function yb({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=fe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=hb(),s=Ce(sf,null),i=C(o===!0||s==null?rf(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=Gs();return Ye(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},rt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Ce(nl,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,fe({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const _b=fe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return dt(sf,r),()=>{const{target:o,...s}=e;return rt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function pi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pi),n}return t}const hi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=fe({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:hi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=fi(),c=Q(()=>e.open===hi&&u!==null?(u.value<.Open)===lt.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==hi||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===hi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),$={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(rl,null)!==null,[te,x]=of(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Yd({portals:te,defaultContainers:[Q(()=>$.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value<.Closing)===lt.Closing:!1),V=Q(()=>T||A.value?!1:O.value),D=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd(D,V);const ae=Q(()=>H.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd($e,ae),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Qe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const E=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,$);const P=Q(()=>!(!O.value||H.value));Jd(U,(oe,Fe)=>{oe.preventDefault(),$.close(),To(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ja((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===ot.Escape&&(oe.preventDefault(),oe.stopPropagation(),$.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return cb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const nr=xt.target.getBoundingClientRect();nr.x===0&&nr.y===0&&nr.width===0&&nr.height===0&&$.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},nr={open:b.value===0};return Ue(tf,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Go,{initialFocus:ht,containers:U,features:O.value?Qe(q.value,{parent:Go.features.RestoreFocus,leaf:Go.features.All&~Go.features.FocusLock}):Go.features.None},()=>Ue(x,{},()=>rt({ourProps:xt,theirProps:{...Be,...n},slot:nr,attrs:n,slots:r,visible:b.value===0,features:Xn.RenderStrategy|Xn.Static,name:"Dialog"})))))),Ue(ge)])}}}),lf=fe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=pi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return rt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=fe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=pi("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return rt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),mi=fe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=pi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return rt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=C(cf(e.value.type,e.value.as));return Le(()=>{n.value=cf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Ce(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const wb=Symbol("PopoverGroupContext");function pf(){return Ce(wb,null)}const hf=Symbol("PopoverPanelContext");function Eb(){return Ce(hf,null)}let sl=fe({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,D;if(!G(i)||!G(u))return!1;for(const ae of document.querySelectorAll("body > *"))if(Number(ae==null?void 0:ae.contains(G(i)))^Number(ae==null?void 0:ae.contains(G(u))))return!0;const x=ci(),U=x.indexOf(G(i)),j=(U+x.length-1)%x.length,ge=(U+1)%x.length,q=x[j],A=x[ge];return!((V=G(u))!=null&&V.contains(q))&&!((D=G(u))!=null&&D.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Qe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(x){f.closePopover();const U=x?x instanceof HTMLElement?x:x.value instanceof HTMLElement?G(x):G(f.button):G(f.button);U==null||U.focus()}};dt(ff,f),Qd(Q(()=>Qe(s.value,{0:lt.Open,1:lt.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=pf(),O=b==null?void 0:b.registerPopover,[w,$]=of(),H=Yd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var x,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((x=c.value)==null?void 0:x.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ja((te=c.value)==null?void 0:te.defaultView,"focus",x=>{var U,j;x.target!==window&&x.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(x.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(x.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(x.target)||f.closePopover()))},!0),Jd(H.resolveContainers,(x,U)=>{var j;f.closePopover(),Hd(U,Qa.Loose)||(x.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const x={open:s.value===0,close:f.close};return Ue(xe,[Ue($,{},()=>rt({theirProps:{...e,...n},ourProps:{ref:o},slot:x,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const mf=fe({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=df(Q(()=>({as:e.as,type:t.type})),c);function m(T){var te,x,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),(x=(te=T.target).click)==null||x.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case ot.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===ot.Space&&T.preventDefault()}function O(T){var te,x;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(x=G(o.button))==null||x.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const $=Ya();function H(){const T=G(o.panel);if(!T)return;function te(){Qe($.value,{[Dt.Forwards]:()=>at(T,We.First),[Dt.Backwards]:()=>at(T,We.Last)})===xn.Error&&at(ci().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Qe($.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:x,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:x,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[rt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(tr,{id:d,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),vf=fe({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(hf,s.panelId),ft(()=>{var $,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=($=i.value)==null?void 0:$.activeElement;(H=G(s.panel))!=null&&H.contains(w)||at(G(s.panel),We.First)});const u=fi(),c=Q(()=>u!==null?(u.value<.Open)===lt.Open:s.popoverState.value===0);function d(w){var $,H;switch(w.key){case ot.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!(($=G(s.panel))!=null&&$.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,x,U;const $=w.relatedTarget;$&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains($)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,$)||(U=(x=G(s.afterPanelSentinel))==null?void 0:x.contains)!=null&&U.call(x,$))&&$.focus({preventScroll:!0})))}const m=Ya();function b(){const w=G(s.panel);if(!w)return;function $(){Qe(m.value,{[Dt.Forwards]:()=>{var T;at(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}$()}function O(){const w=G(s.panel);if(!w)return;function $(){Qe(m.value,{[Dt.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ci(),x=te.indexOf(H),U=te.slice(0,x+1),ge=[...te.slice(x+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}at(ge,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;at(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}$()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:$,focus:H,...T}=e,te={ref:s.panel,id:$,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return rt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...x)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(tr,{id:a,ref:s.beforePanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...x),c.value&&s.isPortalled.value&&Ue(tr,{id:l,ref:s.afterPanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Xn.RenderStrategy|Xn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=fe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(tr,{as:"button",type:"button",features:er.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Qo(e){const t=Ce(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qo),n}return t}const il=Symbol("TabsSSRContext"),Nb=fe({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Gr(c.tabs.value,G),w=Gr(c.panels.value,G),$=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Qe(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Qe(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Qe(H,{0:()=>O.indexOf($[0]),1:()=>O.indexOf($[$.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>$.includes(U));if(!te)return;let x=O.indexOf(te)??c.selectedIndex.value;x===-1&&(x=c.selectedIndex.value),o.value=x,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Gr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Gr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(gf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{Ye([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Gr(c.tabs.value,G);b.some((w,$)=>G(c.tabs.value[$])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),rt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=fe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Qo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return rt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=fe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const $=w();if($===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(x=>G(x)===T);te!==-1&&o.setSelectedIndex(te)}return $}function d(w){const $=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===ot.Space||w.key===ot.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case ot.Home:case ot.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>at($,We.First));case ot.End:case ot.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>at($,We.Last))}if(c(()=>Qe(o.orientation.value,{vertical(){return w.key===ot.ArrowUp?at($,We.Previous|We.WrapAround):w.key===ot.ArrowDown?at($,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===ot.ArrowLeft?at($,We.Previous|We.WrapAround):w.key===ot.ArrowRight?at($,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function m(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),di(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=df(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:$,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:$,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return rt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),xb=fe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Qo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return rt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=fe({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(tr,{as:"span","aria-hidden":!0,...b}):rt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Xn.Static|Xn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function vi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Tb(e,t){const n=Jo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Jo(),a=s!==void 0?kb(s):()=>{};return vi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{vi(e,...n),ul(e,...r),i.add(Tb(e,l=>(vi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>vi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Cb(){return Ce(dl,null)!==null}function Pb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Db(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function gi(e){return"children"in e?gi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Qn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Qe(i,{[Qn.Unmount](){t.value.splice(a,1)},[Qn.Hidden](){t.value[a].state="hidden"}}),!gi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Qn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Xn.RenderStrategy,es=fe({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=lt.Opening,t("beforeEnter")}function a(){s.value&=~lt.Opening,t("afterEnter")}function l(){s.value|=lt.Closing,t("beforeLeave")}function u(){s.value&=~lt.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Qn.Unmount:Qn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),w=C(f.value?"visible":"hidden"),$={value:!0},H=Lt(),T={value:!1},te=bf(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ae=b(H);bt(ae)}),ft(()=>{if(d.value===Qn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Qe(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const x=kr(e.enter),U=kr(e.enterFrom),j=kr(e.enterTo),ge=kr(e.entered),q=kr(e.leave),A=kr(e.leaveFrom),V=kr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ae=G(c);if(ae instanceof Comment&&ae.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(ae){const $e=$.value&&!m.value,E=G(c);!E||!(E instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ae(f.value?yf(E,x,U,j,ge,P=>{T.value=!1,P===cl.Finished&&a()}):yf(E,q,A,V,ge,P=>{T.value=!1,P===cl.Finished&&(gi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{Ye([f],(ae,$e,E)=>{D(E),$.value=!1},{immediate:!0})}),dt(fl,te),Qd(Q(()=>Qe(w.value,{visible:lt.Open,hidden:lt.Closed})|s.value)),()=>{const{appear:ae,show:$e,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&Ko.isServer?{class:ws([n.class,ht.class,...x,...U])}:{}};return rt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:w.value==="visible",name:"TransitionChild"})}}}),$b=es,pl=fe({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=fi(),s=Q(()=>e.show===null&&o!==null?(o.value<.Open)===lt.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=bf(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":gi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return rt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},yi=fe({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=fe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(zo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);zt(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof An?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),S("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Oe).Authentication,_(ie).SignUp,{email:i.value}))}," Create account ")):ce("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Oe).Authentication,_(ie).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=fe({__name:"Authentication",props:{open:{type:Boolean}},setup(e){const t=Re(),{loaded:n}=St(),r=Q(()=>{switch(t.intent){case ie.SignIn:return"Sign in";case ie.SignUp:return"Sign up";case ie.ConfirmAccount:return"Confirm account";case ie.ConfirmEmailChange:return"Confirm email change";case ie.ForgotPassword:return"Forgot password";case ie.ResetPassword:return"Reset password"}return"Authentication"}),o=Q(()=>{if(t.intent===ie.SignIn&&t.next){const[i,a,l]=t.next;if(i===Oe.Authentication&&a===ie.ConfirmEmailChange)return"to confirm email"}return null});function s(){t.reset()}return(i,a)=>(y(),Se(yi,{open:i.open,onClose:s},{default:_e(()=>[N("div",Rb,[Z(_(mi),{as:"h3"},{default:_e(()=>[ke(K(r.value)+" "+K(o.value),1)]),_:1}),_(n)?_(t).intent===_(ie).SignIn?(y(),Se(Vb,{key:1,onSignedIn:a[0]||(a[0]=l=>_(t).dequeue())})):_(t).intent===_(ie).SignUp?(y(),Se(Ay,{key:2,onSignedUp:a[1]||(a[1]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmAccount?(y(),Se(Ly,{key:3,onConfirmedAccount:a[2]||(a[2]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmEmailChange?(y(),Se(Wy,{key:4})):_(t).intent===_(ie).ForgotPassword?(y(),Se(Uy,{key:5})):_(t).intent===_(ie).ResetPassword?(y(),Se(By,{key:6,onPasswordReset:a[3]||(a[3]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):ce("",!0):(y(),S("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=fe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),S("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),S("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),S("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),S("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),S("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):ce("",!0)])):ce("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),S("div",Wb,[t.lineItem.variation.hasDiscount?(y(),S("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):ce("",!0),t.lineItem.quantity!==1?(y(),S("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):ce("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):ce("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=fe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return Ye(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),S("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),S("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),S("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),S("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),S("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ce("",!0)])):ce("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),S("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),S(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):ce("",!0),o[2]||(o[2]=ke(" products "))]),(y(),S("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):ce("",!0)])]),r.lineItem.variation?(y(),S("div",s_,[r.lineItem.variation.hasDiscount?(y(),S("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ce("",!0),r.lineItem.quantity!==1?(y(),S("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):ce("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ce("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),S(xe,null,sn(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),S("div",{key:f.id},[f!=null&&f.iconUrl?(y(),S("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),S("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),S("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):ce("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),S("p",p_,K(f.tagline),1)):ce("",!0):(y(),S("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=fe({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],wf=fe({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await zt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(a,l)=>(y(),S("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Se(jt,{key:0})):ce("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=fe({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ba(),i=Ce(zo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Se(v_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",b_,[Z(_(mi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),S("ul",__,[(y(!0),S(xe,null,sn(_(n),c=>(y(),S("li",{key:c.id},[c.type==="Product"?(y(),Se(Gb,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Se(h_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):ce("",!0)]))),128))])):(y(),S("div",w_," Your cart is empty! ")),_(n).length>0?(y(),S("div",E_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):ce("",!0),_(n).length>0?(y(),Se(wf,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):ce("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=fe({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),m=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(x){throw u.value=x,x}}async function w(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(x){throw m.value=x,x}}async function $(){b.value=!0,await s(),t.reset()}return(x,U)=>(y(),S("div",N_,[Z(Jn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),S("p",S_,K(u.value.message),1)):c.value?(y(),S("p",x_," You need to confirm your new email address, please check your inbox ")):ce("",!0)]),_:1}),Z(Jn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),S("p",k_,K(m.value.message),1)):ce("",!0)]),_:1}),Z(wf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:$})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),S("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Ef=Kr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),S("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Of=Kr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),S("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Nf=Kr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),S("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Kr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=fe({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},{downloadProduct:r}=ti(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),S("span",F_,[(y(!0),S(xe,null,sn(o.value,(a,l,u)=>(y(),S(xe,{key:l},[a.length===1?(y(),S("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Se(pa(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Se(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(mf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Se(pa(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),S(xe,null,sn(a,c=>(y(),S("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},[N("span",null,K(c.name),1)],8,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=fe({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ti(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Ii.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),S("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),S("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):ce("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),S("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):ce("",!0):(y(),S("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(i.value,d=>{var f;return y(),S("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),S("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Se(jt,{key:0})):ce("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):ce("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:1,scope:"col"},o1={key:0},s1={key:1},i1=["src"],a1={key:1,class:"moonbase:image-placeholder"},l1={key:1},u1={key:2},c1={key:0},d1=fe({__name:"Products",setup(e){const{getProducts:t}=ti(),n=C(null);Le(async()=>{let s=await t();for(n.value=s.items;s.hasMore&&s.next;)s=await t(s.next),n.value.push(...s.items)});const r=Q(()=>n.value&&n.value.some(s=>s.downloads)),o=Q(()=>n.value&&n.value.some(s=>s.maxActivations&&s.maxActivations>0));return(s,i)=>(y(),S("table",t1,[N("thead",null,[N("tr",null,[i[0]||(i[0]=N("th",{scope:"col"}," Product ",-1)),o.value?(y(),S("th",n1," Activations ")):ce("",!0),r.value?(y(),S("th",r1," Downloads ")):ce("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),S("tr",s1,i[3]||(i[3]=[N("td",{colspan:"3"}," No products found ",-1)]))):ce("",!0):(y(),S("tr",o1,[N("td",null,[Z(jt),i[1]||(i[1]=ke(" Loading products.. "))]),i[2]||(i[2]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(n.value||[],a=>(y(),S("tr",{key:a.id},[N("td",null,[N("div",null,[a.iconUrl?(y(),S("img",{key:0,src:a.iconUrl,alt:""},null,8,i1)):(y(),S("div",a1)),N("span",null,K(a.name),1)])]),a.maxActivations&&a.maxActivations>0?(y(),Se(_(sl),{key:0,as:"td"},{default:_e(()=>[Z(_(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[i[4]||(i[4]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(a.currentActivations)+" / "+K(a.maxActivations),1)]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[Z(e1,{"product-id":a.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024)):o.value?(y(),S("td",l1)):ce("",!0),r.value?(y(),S("td",u1,[a.currentVersion!=null?(y(),S("div",c1,[a.downloads?(y(),Se(W_,{key:0,downloads:a.downloads},null,8,["downloads"])):ce("",!0)])):ce("",!0)])):ce("",!0)]))),128))])]))}}),f1={class:"moonbase:redeem"},p1=["data-visible"],h1={key:1,class:"moonbase:redeem-voucher"},m1={key:0},v1={key:1},g1={class:"moonbase:redeem-voucher-products"},y1=["src"],b1={key:1,class:"moonbase:image-placeholder"},_1={key:0},w1={class:"moonbase:redeem-voucher-bundle"},E1=["src"],O1={key:1,class:"moonbase:image-placeholder"},N1={key:0},S1={class:"moonbase:redeem-voucher-bundle-products"},x1={class:"shrink-0"},k1=["src"],T1={key:1,class:"moonbase:image-placeholder"},C1=fe({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),S("div",f1,[Z(ja,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),S("div",h1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),S("h4",m1,K(r.value.description),1)):ce("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),S("div",v1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",g1,[(y(!0),S(xe,null,sn(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),S("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,y1)):(y(),S("div",b1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",_1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),S(xe,null,sn(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),S("div",{key:u.id},[N("div",w1,[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,E1)):(y(),S("div",O1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",N1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",S1,[(y(!0),S(xe,null,sn(u.products,d=>(y(),S("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",x1,[d.iconUrl?(y(),S("img",{key:0,src:d.iconUrl,alt:""},null,8,k1)):(y(),S("div",T1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):ce("",!0)])):(y(),Se(Jn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Yn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,p1)]}),_:1}))]),_:1})]))}}),P1={class:"moonbase:customer"},D1=fe({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ie.ViewAccount:return 0;case ie.ViewProducts:return 1;case ie.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));Ye(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Se(yi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",P1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(d1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(C1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),$1={class:"moonbase:auto-activate"},I1={key:0,class:"moonbase:loader"},A1={key:1,class:"moonbase:loader"},V1={key:2,class:"moonbase:loader"},R1={key:3},j1={key:0,class:"moonbase:auto-activate-product"},L1=["src"],M1={key:1,class:"moonbase:image-placeholder"},U1={key:1,class:"moonbase:loader"},F1={key:2,class:"moonbase:loader"},B1={key:3,class:"moonbase:loader"},H1={key:4,class:"moonbase:auto-activate-content"},Z1={key:0},q1={key:1},W1={class:"moonbase:auto-activate-cta"},z1=["href"],K1={key:2,class:"moonbase:auto-activate-trial"},G1={class:"moonbase:auto-activate-cta"},J1=fe({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);Ye(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Qt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(Oe.Customer,ie.ViewProducts)}function b(){t.enqueue(Oe.Activation,ie.ActivateProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}return(O,w)=>{var $,H,T,te;return y(),S("div",$1,[_(i)||!_(r)?(y(),S("div",I1,[Z(jt)])):_(u)?(y(),S("div",A1,K(_(u)),1)):_(s)?(y(),S("div",R1,[_(s).product?(y(),S("div",j1,[_(s).product.iconUrl?(y(),S("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,L1)):(y(),S("div",M1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):ce("",!0),(($=_(s))==null?void 0:$.status)===_(Qt).Cancelled?(y(),S("div",U1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),S("div",F1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Qt).Completed?(y(),S("div",B1,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),S("div",H1,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),S("div",q1,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",W1,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=x=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),S("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,z1)):ce("",!0)])])):ce("",!0):(y(),S("div",Z1,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),S("div",K1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),S(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ce("",!0),w[6]||(w[6]=ke(". ")),N("span",G1,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=x=>_(d)())}," Start trial ")])])):ce("",!0)]))])):(y(),S("div",V1," Could not find activation request "))])}}}),Y1={class:"moonbase:activation"},X1=fe({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(yi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",Y1,[Z(_(mi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ie).ActivateProduct?(y(),Se(J1,{key:0})):ce("",!0)])]),_:1},8,["open"]))}});function Q1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const ew={class:"moonbase:download-product"},tw={key:0,class:"moonbase:loader"},nw={key:1,class:"moonbase:loader"},rw={key:2,class:"moonbase:loader"},ow={key:3},sw={class:"moonbase:download-product-product"},iw=["src"],aw={key:1,class:"moonbase:image-placeholder"},lw={key:0},uw={key:0,class:"moonbase:download-product-content"},cw={key:1,class:"moonbase:download-product-content"},dw={key:2,class:"moonbase:download-product-content"},fw={key:0,role:"list"},pw={class:"moonbase:download-product-download-name"},hw=["onClick"],mw={class:"moonbase:download-product-download-description"},vw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},gw={key:1,class:"moonbase:loader"},yw=fe({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ti(),i={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter($=>!d.value||$.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch($){u.value=$.message}c.value=!1});function m(){t.enqueue(Oe.Download,ie.DownloadProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var $,H;return y(),S("div",ew,[c.value||!_(r)?(y(),S("div",tw,[Z(jt)])):u.value?(y(),S("div",nw,K(u.value),1)):a.value?(y(),S("div",ow,[N("div",sw,[a.value.iconUrl?(y(),S("img",{key:0,src:a.value.iconUrl,alt:""},null,8,iw)):(y(),S("div",aw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),S("span",lw," (pre-release)")):ce("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),S("div",uw,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!(($=_(n).ownedProducts)!=null&&$.includes(a.value.id))?(y(),S("div",cw," This product requires ownership to download ")):(y(),S("div",dw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),S("ul",fw,[(y(!0),S(xe,null,sn(f.value,T=>(y(),S("li",{key:T.key},[N("div",null,[N("p",pw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,hw)]),N("p",mw,[(y(),Se(pa(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(Q1)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Se(jt,{key:0})):(y(),S("svg",vw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),S("div",gw," No downloadable files found "))]))])):(y(),S("div",rw," Could not find product "))])}}}),bw={class:"moonbase:download"},_w=fe({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(yi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",bw,[Z(_(mi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ie).DownloadProduct?(y(),Se(yw,{key:0})):ce("",!0)])]),_:1},8,["open"]))}}),ww=fe({__name:"App",setup(e){const t=Ce(zo),n=Re();return Ye(()=>[n.active,n.intent],([r,o])=>{}),(r,o)=>{var s;return y(),S(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Se(hy,{key:0})):ce("",!0),Z(O_,{open:_(n).active===_(Oe).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Oe).Authentication},null,8,["open"]),Z(X1,{open:_(n).active===_(Oe).Activation},null,8,["open"]),Z(_w,{open:_(n).active===_(Oe).Download},null,8,["open"]),Z(D1,{open:_(n).active===_(Oe).Customer},null,8,["open"])],64)}}});function bi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(bi(e)&&bi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];bi(o)&&bi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class Ew{constructor(){Tr(this,"initialized",!1);Tr(this,"pinia");Tr(this,"storefront");Tr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(ww).use(this.storefront).use(this.pinia).provide(zo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ie).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ie.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ie.ViewProducts&&(s.user?o.show(Oe.Customer,ie.ViewProducts):o.show(Oe.Cart,ie.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Oe.Authentication,ie.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Oe.Authentication,ie.ConfirmEmailChange,t):(n.show(Oe.Authentication,ie.SignIn),n.enqueue(Oe.Authentication,ie.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Oe.Customer,ie.ViewAccount):(t.show(Oe.Authentication,ie.SignIn),t.enqueue(Oe.Customer,ie.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Download,ie.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Oe.Activation,ie.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Oe.Cart,ie.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const xf=new Ew;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=xf),kt.MoonbaseIntent=ie,kt.default=xf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
24
|
+
`));const f=Bd(c.props??{},i,l),m=Zt(c,f,!0);for(const b in f)b.startsWith("on")&&(m.props||(m.props={}),m.props[b]=f[b]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Ue(s,Object.assign({},i,l),{default:()=>a})}function Fd(e){return e.flatMap(t=>t.type===xe?Fd(t.children):[t])}function Bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Xa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ky(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var er=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(er||{});let tr=fe({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return rt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Gy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function cn(e){if(Ko.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const ui=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var We=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(We||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{});function ci(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ui)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qa||{});function Hd(e,t=0){var n;return e===((n=cn(e))==null?void 0:n.body)?!1:Xe(t,{0(){return e.matches(ui)},1(){let r=e;for(;r!==null;){if(r.matches(ui))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function Nr(e){e==null||e.focus({preventScroll:!0})}const Jy=["textarea","input"].join(",");function Yy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Jy))??!1}function Gr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function at(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?Gr(e):e:ci(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{};let c=0;const d=i.length;let f;do{if(c>=d||c+d<=0)return 0;let m=l+c;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&Yy(f)&&f.select(),2}let Sr=[];Gy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Sr[0]===t.target)return;let n=t.target;n=n.closest(ui),Sr.unshift(n??t.target),Sr=Sr.filter(r=>r!=null&&r.isConnected),Sr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function di(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var qd=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(qd||{});const Go=Object.assign(fe({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=C(null);r({el:o,$el:o});const s=Q(()=>cn(o)),i=C(!1);Le(()=>i.value=!0),bt(()=>i.value=!1),Qy({ownerDocument:s},Q(()=>i.value&&!!(e.features&16)));const a=eb({ownerDocument:s,container:o,initialFocus:Q(()=>e.initialFocus)},Q(()=>i.value&&!!(e.features&2)));tb({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Q(()=>i.value&&!!(e.features&8)));const l=Ya();function u(m){const b=G(o);if(!b)return;(w=>w())(()=>{Xe(l.value,{[Dt.Forwards]:()=>{at(b,We.First,{skipElements:[m.relatedTarget]})},[Dt.Backwards]:()=>{at(b,We.Last,{skipElements:[m.relatedTarget]})}})})}const c=C(!1);function d(m){m.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(m){if(!i.value)return;const b=Zd(e.containers);G(o)instanceof HTMLElement&&b.add(G(o));const O=m.relatedTarget;O instanceof HTMLElement&&O.dataset.moonbaseFocusGuard!=="true"&&(Wd(b,O)||(c.value?at(G(o),Xe(l.value,{[Dt.Forwards]:()=>We.Next,[Dt.Backwards]:()=>We.Previous})|We.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Nr(m.target)))}return()=>{const m={},b={ref:o,onKeydown:d,onFocusout:f},{features:O,initialFocus:w,containers:$,...H}=e;return Ue(xe,[!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable}),rt({ourProps:b,theirProps:{...t,...H},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(O&4)&&Ue(tr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:er.Focusable})])}}}),{features:qd});function Xy(e){const t=C(Sr.slice());return Je([e],([n],[r])=>{r===!0&&n===!1?di(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Sr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Qy({ownerDocument:e},t){const n=Xy(t);Le(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Nr(n())},{flush:"post"})}),bt(()=>{t.value&&Nr(n())})}function eb({ownerDocument:e,container:t,initialFocus:n},r){const o=C(null),s=C(!1);return Le(()=>s.value=!0),bt(()=>s.value=!1),Le(()=>{Je([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=G(t);l&&di(()=>{var d,f;if(!s.value)return;const u=G(n),c=(d=e.value)==null?void 0:d.activeElement;if(u){if(u===c){o.value=c;return}}else if(l.contains(c)){o.value=c;return}u?Nr(u):at(l,We.First|We.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function tb({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ja((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Zd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?Wd(a,u)?(r.value=u,Nr(u)):(i.preventDefault(),i.stopPropagation(),Nr(l)):Nr(r.value)},!0)}function Wd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function nb(e){let t=Fh(e.getSnapshot());return bt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Jo(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return di(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=Jo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function rb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function ob(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sb(){return/Android/gi.test(window.navigator.userAgent)}function ib(){return zd()||sb()}function ab(){return zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=Jo();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function lb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ub(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const xr=rb(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:Jo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:ub(n)},o=[ab(),ob(),lb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});xr.subscribe(()=>{const e=xr.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&xr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&xr.dispatch("TEARDOWN",n)}});function cb(e,t,n){const r=nb(xr),o=Q(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Je([e,t],([s,i],[a],l)=>{if(!s||!i)return;xr.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(xr.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let db=0;function fb(){return++db}function Lt(){return fb()}const el=new Map,Yo=new Map;function Kd(e,t=C(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Yo.get(r)??1;if(s===1?Yo.delete(r):Yo.set(r,s-1),s!==1)return;const i=el.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,el.delete(r))});const o=Yo.get(r)??0;Yo.set(r,o+1),o===0&&(el.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Xo(e,t,n,r){Ko.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Gd=30;function Jd(e,t,n=Q(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const c of u){if(c===null)continue;const d=c instanceof HTMLElement?c:G(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hd(l,Qa.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=C(null);Xo(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Xo(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Xo(n,"click",i=>{ib()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Xo(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Xo(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Gd||Math.abs(a.y-s.y)>=Gd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ud(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Yd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=C(null),o=cn(r);function s(){var a,l;const i=[];for(const u of e)u!==null&&(u instanceof HTMLElement?i.push(u):"value"in u&&u.value instanceof HTMLElement&&i.push(u.value));if(t!=null&&t.value)for(const u of t.value)i.push(u);for(const u of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="moonbase"&&(u.contains(G(r))||u.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(c=>u.contains(c))||i.push(u));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ue(tr,{features:er.Hidden,ref:r})}}}let Xd=Symbol("Context");var lt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(lt||{});function pb(){return fi()!==null}function fi(){return Ce(Xd,null)}function Qd(e){dt(Xd,e)}const ef=Symbol("ForcePortalRootContext");function hb(){return Ce(ef,!1)}const tf=fe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ef,e.force),()=>{const{force:r,...o}=e;return rt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let nf=Symbol("StackContext");var tl=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(tl||{});function mb(){return Ce(nf,()=>{})}function vb({type:e,enabled:t,element:n,onUpdate:r}){let o=mb();function s(...i){r==null||r(...i),o(...i)}Le(()=>{Je(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),bt(()=>{t.value&&s(1,e,n)}),dt(nf,s)}var ot=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ot||{});let gb=Symbol("DescriptionContext");function yb({slot:e=C({}),name:t="Description",props:n={}}={}){let r=C([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(gb,{register:o,slot:e,name:t,props:n}),Q(()=>r.value.length>0?r.value.join(" "):void 0)}function rf(e){const t=cn(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const bb=fe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=C(null);Q(()=>cn(r));const o=hb(),s=Ce(sf,null),i=C(o===!0||s==null?rf(r.value):s.resolveTarget()),a=C(!1);Le(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=Ce(nl,null);let u=!1;const c=Gs();return Je(r,()=>{if(u||!l)return;const d=G(r);d&&(bt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Ue(bm,{to:i.value},rt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let nl=Symbol("PortalParentContext");function of(){const e=Ce(nl,null),t=C([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,fe({name:"PortalWrapper",setup(s,{slots:i}){return dt(nl,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let sf=Symbol("PortalGroupContext");const _b=fe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=No({resolveTarget(){return e.target}});return dt(sf,r),()=>{const{target:o,...s}=e;return rt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),rl=Symbol("DialogContext");function pi(e){const t=Ce(rl,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,pi),n}return t}const hi="DC8F892D-2EBD-447C-A4C8-A03058436FF4",af=fe({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:hi},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Lt()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var he;const s=C(!1);Le(()=>{s.value=!0});let i=!1;const a=Q(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),u=fi(),c=Q(()=>e.open===hi&&u!==null?(u.value<.Open)===lt.Open:e.open),d=C(null),f=Q(()=>cn(d));if(o({el:d,$el:d}),!(e.open!==hi||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===hi?void 0:e.open}`);const b=Q(()=>s.value&&c.value?0:1),O=Q(()=>b.value===0),w=C(null),$={titleId:w,panelRef:C(null),dialogState:b,setTitleId(oe){w.value!==oe&&(w.value=oe)},close(){t("close",!1)}},H=Q(()=>l.value>1),T=Ce(rl,null)!==null,[te,x]=of(),{resolveContainers:U,mainTreeNodeRef:j,MainTreeNode:ge}=Yd({portals:te,defaultContainers:[Q(()=>$.panelRef.value??d.value)]}),q=Q(()=>H.value?"parent":"leaf"),A=Q(()=>u!==null?(u.value<.Closing)===lt.Closing:!1),V=Q(()=>T||A.value?!1:O.value),D=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("body > *"))??[]).find(Fe=>Fe.id==="moonbase"?!1:Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd(D,V);const ae=Q(()=>H.value?!0:O.value),$e=Q(()=>{var oe;return Array.from(((oe=f.value)==null?void 0:oe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Fe=>Fe.contains(G(j))&&Fe instanceof HTMLElement)??null});Kd($e,ae),vb({type:"Dialog",enabled:Q(()=>b.value===0),element:d,onUpdate:(oe,Fe)=>{if(Fe==="Dialog")return Xe(oe,{[tl.Add]:()=>l.value+=1,[tl.Remove]:()=>l.value-=1})}});const E=yb({name:"DialogDescription",slot:Q(()=>({open:c.value}))});dt(rl,$);const P=Q(()=>!(!O.value||H.value));Jd(U,(oe,Fe)=>{oe.preventDefault(),$.close(),To(()=>Fe==null?void 0:Fe.focus())},P);const Y=Q(()=>!(H.value||b.value!==0));Ja((he=f.value)==null?void 0:he.defaultView,"keydown",oe=>{Y.value&&(oe.defaultPrevented||oe.key===ot.Escape&&(oe.preventDefault(),oe.stopPropagation(),$.close()))});const re=Q(()=>!(A.value||b.value!==0||T));return cb(f,re,oe=>({containers:[...oe.containers??[],U]})),ft(oe=>{if(b.value!==0)return;const Fe=G(d);if(!Fe)return;const ht=new ResizeObserver(Be=>{for(const xt of Be){const nr=xt.target.getBoundingClientRect();nr.x===0&&nr.y===0&&nr.width===0&&nr.height===0&&$.close()}});ht.observe(Fe),oe(()=>ht.disconnect())}),()=>{const{id:oe,open:Fe,initialFocus:ht,...Be}=e,xt={...n,ref:d,id:oe,role:a.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":w.value,"aria-describedby":E.value},nr={open:b.value===0};return Ue(tf,{force:!0},()=>[Ue(bb,()=>Ue(_b,{target:d.value},()=>Ue(tf,{force:!1},()=>Ue(Go,{initialFocus:ht,containers:U,features:O.value?Xe(q.value,{parent:Go.features.RestoreFocus,leaf:Go.features.All&~Go.features.FocusLock}):Go.features.None},()=>Ue(x,{},()=>rt({ourProps:xt,theirProps:{...Be,...n},slot:nr,attrs:n,slots:r,visible:b.value===0,features:Xn.RenderStrategy|Xn.Static,name:"Dialog"})))))),Ue(ge)])}}}),lf=fe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=pi("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return rt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),uf=fe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=pi("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return rt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),mi=fe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Lt()}`}},setup(e,{attrs:t,slots:n}){const r=pi("DialogTitle");return Le(()=>{r.setTitleId(e.id),bt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return rt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function cf(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function df(e,t){let n=C(cf(e.value.type,e.value.as));return Le(()=>{n.value=cf(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const ff=Symbol("PopoverContext");function ol(e){const t=Ce(ff,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${sl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ol),n}return t}const wb=Symbol("PopoverGroupContext");function pf(){return Ce(wb,null)}const hf=Symbol("PopoverPanelContext");function Eb(){return Ce(hf,null)}let sl=fe({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var te;const o=C(null);r({el:o,$el:o});const s=C(1),i=C(null),a=C(null),l=C(null),u=C(null),c=Q(()=>cn(o)),d=Q(()=>{var V,D;if(!G(i)||!G(u))return!1;for(const ae of document.querySelectorAll("body > *"))if(Number(ae==null?void 0:ae.contains(G(i)))^Number(ae==null?void 0:ae.contains(G(u))))return!0;const x=ci(),U=x.indexOf(G(i)),j=(U+x.length-1)%x.length,ge=(U+1)%x.length,q=x[j],A=x[ge];return!((V=G(u))!=null&&V.contains(q))&&!((D=G(u))!=null&&D.contains(A))}),f={popoverState:s,buttonId:C(null),panelId:C(null),panel:u,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Xe(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(x){f.closePopover();const U=x?x instanceof HTMLElement?x:x.value instanceof HTMLElement?G(x):G(f.button):G(f.button);U==null||U.focus()}};dt(ff,f),Qd(Q(()=>Xe(s.value,{0:lt.Open,1:lt.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},b=pf(),O=b==null?void 0:b.registerPopover,[w,$]=of(),H=Yd({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:w,defaultContainers:[i,u]});function T(){var x,U,j;return(b==null?void 0:b.isFocusWithinPopoverGroup())??(((x=c.value)==null?void 0:x.activeElement)&&(((U=G(i))==null?void 0:U.contains(c.value.activeElement))||((j=G(u))==null?void 0:j.contains(c.value.activeElement))))}return ft(()=>O==null?void 0:O(m)),Ja((te=c.value)==null?void 0:te.defaultView,"focus",x=>{var U,j;x.target!==window&&x.target instanceof HTMLElement&&s.value===0&&(T()||i&&u&&(H.contains(x.target)||(U=G(f.beforePanelSentinel))!=null&&U.contains(x.target)||(j=G(f.afterPanelSentinel))!=null&&j.contains(x.target)||f.closePopover()))},!0),Jd(H.resolveContainers,(x,U)=>{var j;f.closePopover(),Hd(U,Qa.Loose)||(x.preventDefault(),(j=G(i))==null||j.focus())},Q(()=>s.value===0)),()=>{const x={open:s.value===0,close:f.close};return Ue(xe,[Ue($,{},()=>rt({theirProps:{...e,...n},ourProps:{ref:o},slot:x,slots:t,attrs:n,name:"Popover"})),Ue(H.MainTreeNode)])}}});const mf=fe({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ol("PopoverButton"),s=Q(()=>cn(o.button));r({el:o.button,$el:o.button}),Le(()=>{o.buttonId.value=e.id}),bt(()=>{o.buttonId.value=null});const i=pf(),a=i==null?void 0:i.closeOthers,l=Eb(),u=Q(()=>l===null?!1:l.value===o.panelId.value),c=C(null),d=`moonbase-focus-sentinel-${Lt()}`;u.value||ft(()=>{o.button.value=G(c)});const f=df(Q(()=>({as:e.as,type:t.type})),c);function m(T){var te,x,U,j,ge;if(u.value){if(o.popoverState.value===1)return;switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),(x=(te=T.target).click)==null||x.call(te),o.closePopover(),(U=G(o.button))==null||U.focus();break}}else switch(T.key){case ot.Space:case ot.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case ot.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(j=s.value)!=null&&j.activeElement&&!((ge=G(o.button))!=null&&ge.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function b(T){u.value||T.key===ot.Space&&T.preventDefault()}function O(T){var te,x;e.disabled||(u.value?(o.closePopover(),(te=G(o.button))==null||te.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(x=G(o.button))==null||x.focus()))}function w(T){T.preventDefault(),T.stopPropagation()}const $=Ya();function H(){const T=G(o.panel);if(!T)return;function te(){Xe($.value,{[Dt.Forwards]:()=>at(T,We.First),[Dt.Backwards]:()=>at(T,We.Last)})===xn.Error&&at(ci().filter(U=>U.dataset.moonbaseFocusGuard!=="true"),Xe($.value,{[Dt.Forwards]:We.Next,[Dt.Backwards]:We.Previous}),{relativeTo:G(o.button)})}te()}return()=>{const T=o.popoverState.value===0,te={open:T},{id:x,...U}=e,j=u.value?{ref:c,type:f.value,onKeydown:m,onClick:O}:{ref:c,id:x,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:b,onClick:O,onMousedown:w};return Ue(xe,[rt({ourProps:j,theirProps:{...t,...U},slot:te,attrs:t,slots:n,name:"PopoverButton"}),T&&!u.value&&o.isPortalled.value&&Ue(tr,{id:d,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:H})])}}}),vf=fe({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Lt()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ol("PopoverPanel"),i=Q(()=>cn(s.panel)),a=`moonbase-focus-sentinel-before-${Lt()}`,l=`moonbase-focus-sentinel-after-${Lt()}`;r({el:s.panel,$el:s.panel}),Le(()=>{s.panelId.value=e.id}),bt(()=>{s.panelId.value=null}),dt(hf,s.panelId),ft(()=>{var $,H;if(!o||s.popoverState.value!==0||!s.panel)return;const w=($=i.value)==null?void 0:$.activeElement;(H=G(s.panel))!=null&&H.contains(w)||at(G(s.panel),We.First)});const u=fi(),c=Q(()=>u!==null?(u.value<.Open)===lt.Open:s.popoverState.value===0);function d(w){var $,H;switch(w.key){case ot.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!(($=G(s.panel))!=null&&$.contains(i.value.activeElement)))return;w.preventDefault(),w.stopPropagation(),s.closePopover(),(H=G(s.button))==null||H.focus();break}}function f(w){var H,T,te,x,U;const $=w.relatedTarget;$&&G(s.panel)&&((H=G(s.panel))!=null&&H.contains($)||(s.closePopover(),((te=(T=G(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&te.call(T,$)||(U=(x=G(s.afterPanelSentinel))==null?void 0:x.contains)!=null&&U.call(x,$))&&$.focus({preventScroll:!0})))}const m=Ya();function b(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{var T;at(w,We.First)===xn.Error&&((T=G(s.afterPanelSentinel))==null||T.focus())},[Dt.Backwards]:()=>{var H;(H=G(s.button))==null||H.focus({preventScroll:!0})}})}$()}function O(){const w=G(s.panel);if(!w)return;function $(){Xe(m.value,{[Dt.Forwards]:()=>{const H=G(s.button),T=G(s.panel);if(!H)return;const te=ci(),x=te.indexOf(H),U=te.slice(0,x+1),ge=[...te.slice(x+1),...U];for(const q of ge.slice())if(q.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(q)){const A=ge.indexOf(q);A!==-1&&ge.splice(A,1)}at(ge,We.First,{sorted:!1})},[Dt.Backwards]:()=>{var T;at(w,We.Previous)===xn.Error&&((T=G(s.button))==null||T.focus())}})}$()}return()=>{const w={open:s.popoverState.value===0,close:s.close},{id:$,focus:H,...T}=e,te={ref:s.panel,id:$,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return rt({ourProps:te,theirProps:{...t,...T},attrs:t,slot:w,slots:{...n,default:(...x)=>{var U;return[Ue(xe,[c.value&&s.isPortalled.value&&Ue(tr,{id:a,ref:s.beforePanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b}),(U=n.default)==null?void 0:U.call(n,...x),c.value&&s.isPortalled.value&&Ue(tr,{id:l,ref:s.afterPanelSentinel,features:er.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:O})])]}},features:Xn.RenderStrategy|Xn.Static,visible:c.value,name:"PopoverPanel"})}}});let Ob=fe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=C(!0);return()=>t.value?Ue(tr,{as:"button",type:"button",features:er.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const gf=Symbol("TabsContext");function Qo(e){const t=Ce(gf,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qo),n}return t}const il=Symbol("TabsSSRContext"),Nb=fe({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=C(e.selectedIndex??e.defaultIndex),s=C([]),i=C([]),a=Q(()=>e.selectedIndex!==null),l=Q(()=>a.value?e.selectedIndex:o.value);function u(b){const O=Gr(c.tabs.value,G),w=Gr(c.panels.value,G),$=O.filter(H=>{var T;return!((T=G(H))!=null&&T.hasAttribute("disabled"))});if(b<0||b>O.length-1){const H=Xe(o.value===null?0:Math.sign(b-o.value),{[-1]:()=>1,0:()=>Xe(Math.sign(b),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Xe(H,{0:()=>O.indexOf($[0]),1:()=>O.indexOf($[$.length-1])});T!==-1&&(o.value=T),c.tabs.value=O,c.panels.value=w}else{const H=O.slice(0,b),te=[...O.slice(b),...H].find(U=>$.includes(U));if(!te)return;let x=O.indexOf(te)??c.selectedIndex.value;x===-1&&(x=c.selectedIndex.value),o.value=x,c.tabs.value=O,c.panels.value=w}}let c={selectedIndex:Q(()=>o.value??e.defaultIndex??null),orientation:Q(()=>e.vertical?"vertical":"horizontal"),activation:Q(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(b){l.value!==b&&r("change",b),a.value||u(b)},registerTab(b){if(s.value.includes(b))return;const O=s.value[o.value];if(s.value.push(b),s.value=Gr(s.value,G),!a.value){const w=s.value.indexOf(O)??o.value;w!==-1&&(o.value=w)}},unregisterTab(b){const O=s.value.indexOf(b);O!==-1&&s.value.splice(O,1)},registerPanel(b){i.value.includes(b)||(i.value.push(b),i.value=Gr(i.value,G))},unregisterPanel(b){const O=i.value.indexOf(b);O!==-1&&i.value.splice(O,1)}};dt(gf,c);const d=C({tabs:[],panels:[]}),f=C(!1);Le(()=>{f.value=!0}),dt(il,Q(()=>f.value?null:d.value));const m=Q(()=>e.selectedIndex);return Le(()=>{Je([m],()=>u(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||c.tabs.value.length<=0)return;const b=Gr(c.tabs.value,G);b.some((w,$)=>G(c.tabs.value[$])!==G(w))&&c.setSelectedIndex(b.findIndex(w=>G(w)===G(c.tabs.value[l.value])))}),()=>{const b={selectedIndex:o.value};return Ue(xe,[s.value.length<=0&&Ue(Ob,{onFocus:()=>{for(const O of s.value){const w=G(O);if((w==null?void 0:w.tabIndex)===0)return w.focus(),!0}return!1}}),rt({theirProps:{...n,...Xa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:b,slots:t,attrs:n,name:"TabGroup"})])}}}),Sb=fe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Qo("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return rt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),al=fe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Lt()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("Tab"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerTab(s)),bt(()=>o.unregisterTab(s));const i=Ce(il),a=Q(()=>{if(i.value){const w=i.value.tabs.indexOf(e.id);return w===-1?i.value.tabs.push(e.id)-1:w}return-1}),l=Q(()=>{const w=o.tabs.value.indexOf(s);return w===-1?a.value:w}),u=Q(()=>l.value===o.selectedIndex.value);function c(w){var H;const $=w();if($===xn.Success&&o.activation.value==="auto"){const T=(H=cn(s))==null?void 0:H.activeElement,te=o.tabs.value.findIndex(x=>G(x)===T);te!==-1&&o.setSelectedIndex(te)}return $}function d(w){const $=o.tabs.value.map(T=>G(T)).filter(Boolean);if(w.key===ot.Space||w.key===ot.Enter){w.preventDefault(),w.stopPropagation(),o.setSelectedIndex(l.value);return}switch(w.key){case ot.Home:case ot.PageUp:return w.preventDefault(),w.stopPropagation(),c(()=>at($,We.First));case ot.End:case ot.PageDown:return w.preventDefault(),w.stopPropagation(),c(()=>at($,We.Last))}if(c(()=>Xe(o.orientation.value,{vertical(){return w.key===ot.ArrowUp?at($,We.Previous|We.WrapAround):w.key===ot.ArrowDown?at($,We.Next|We.WrapAround):xn.Error},horizontal(){return w.key===ot.ArrowLeft?at($,We.Previous|We.WrapAround):w.key===ot.ArrowRight?at($,We.Next|We.WrapAround):xn.Error}}))===xn.Success)return w.preventDefault()}const f=C(!1);function m(){var w;f.value||(f.value=!0,!e.disabled&&((w=G(s))==null||w.focus({preventScroll:!0}),o.setSelectedIndex(l.value),di(()=>{f.value=!1})))}function b(w){w.preventDefault()}const O=df(Q(()=>({as:e.as,type:t.type})),s);return()=>{var te;const w={selected:u.value,disabled:e.disabled??!1},{id:$,...H}=e,T={ref:s,onKeydown:d,onMousedown:b,onClick:m,id:$,role:"tab",type:O.value,"aria-controls":(te=G(o.panels.value[l.value]))==null?void 0:te.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return rt({ourProps:T,theirProps:H,slot:w,attrs:t,slots:n,name:"Tab"})}}}),xb=fe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Qo("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return rt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),ll=fe({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Lt()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Qo("TabPanel"),s=C(null);r({el:s,$el:s}),Le(()=>o.registerPanel(s)),bt(()=>o.unregisterPanel(s));const i=Ce(il),a=Q(()=>{if(i.value){const c=i.value.panels.indexOf(e.id);return c===-1?i.value.panels.push(e.id)-1:c}return-1}),l=Q(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Q(()=>l.value===o.selectedIndex.value);return()=>{var O;const c={selected:u.value},{id:d,tabIndex:f,...m}=e,b={ref:s,id:d,role:"tabpanel","aria-labelledby":(O=G(o.tabs.value[l.value]))==null?void 0:O.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?Ue(tr,{as:"span","aria-hidden":!0,...b}):rt({ourProps:b,theirProps:m,slot:c,attrs:t,slots:n,features:Xn.Static|Xn.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function kb(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ul(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function vi(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var cl=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(cl||{});function Tb(e,t){const n=Jo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?Number.parseFloat(u):Number.parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function yf(e,t,n,r,o,s){const i=Jo(),a=s!==void 0?kb(s):()=>{};return vi(e,...o),ul(e,...t,...n),i.nextFrame(()=>{vi(e,...n),ul(e,...r),i.add(Tb(e,l=>(vi(e,...r,...t),ul(e,...o),a(l))))}),i.add(()=>vi(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function kr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const dl=Symbol("TransitionContext");function Cb(){return Ce(dl,null)!==null}function Pb(){const e=Ce(dl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const fl=Symbol("NestingContext");function Db(){const e=Ce(fl,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function gi(e){return"children"in e?gi(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function bf(e){const t=C([]),n=C(!1);Le(()=>n.value=!0),bt(()=>n.value=!1);function r(s,i=Qn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Xe(i,{[Qn.Unmount](){t.value.splice(a,1)},[Qn.Hidden](){t.value[a].state="hidden"}}),!gi(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Qn.Unmount)}return{children:t,register:o,unregister:r}}const _f=Xn.RenderStrategy,es=fe({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=C(0);function i(){s.value|=lt.Opening,t("beforeEnter")}function a(){s.value&=~lt.Opening,t("afterEnter")}function l(){s.value|=lt.Closing,t("beforeLeave")}function u(){s.value&=~lt.Closing,t("afterLeave")}if(!Cb()&&pb())return()=>Ue(pl,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=C(null),d=Q(()=>e.unmount?Qn.Unmount:Qn.Hidden);o({el:c,$el:c});const{show:f,appear:m}=Pb(),{register:b,unregister:O}=Db(),w=C(f.value?"visible":"hidden"),$={value:!0},H=Lt(),T={value:!1},te=bf(()=>{!T.value&&w.value!=="hidden"&&(w.value="hidden",O(H),u())});Le(()=>{const ae=b(H);bt(ae)}),ft(()=>{if(d.value===Qn.Hidden&&H){if(f.value&&w.value!=="visible"){w.value="visible";return}Xe(w.value,{hidden:()=>O(H),visible:()=>b(H)})}});const x=kr(e.enter),U=kr(e.enterFrom),j=kr(e.enterTo),ge=kr(e.entered),q=kr(e.leave),A=kr(e.leaveFrom),V=kr(e.leaveTo);Le(()=>{ft(()=>{if(w.value==="visible"){const ae=G(c);if(ae instanceof Comment&&ae.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(ae){const $e=$.value&&!m.value,E=G(c);!E||!(E instanceof HTMLElement)||$e||(T.value=!0,f.value&&i(),f.value||l(),ae(f.value?yf(E,x,U,j,ge,P=>{T.value=!1,P===cl.Finished&&a()}):yf(E,q,A,V,ge,P=>{T.value=!1,P===cl.Finished&&(gi(te)||(w.value="hidden",O(H),u()))})))}return Le(()=>{Je([f],(ae,$e,E)=>{D(E),$.value=!1},{immediate:!0})}),dt(fl,te),Qd(Q(()=>Xe(w.value,{visible:lt.Open,hidden:lt.Closed})|s.value)),()=>{const{appear:ae,show:$e,enter:E,enterFrom:P,enterTo:Y,entered:re,leave:he,leaveFrom:oe,leaveTo:Fe,...ht}=e,Be={ref:c},xt={...ht,...m.value&&f.value&&Ko.isServer?{class:ws([n.class,ht.class,...x,...U])}:{}};return rt({theirProps:xt,ourProps:Be,slot:{},slots:r,attrs:n,features:_f,visible:w.value==="visible",name:"TransitionChild"})}}}),$b=es,pl=fe({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=fi(),s=Q(()=>e.show===null&&o!==null?(o.value<.Open)===lt.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(s.value?"visible":"hidden"),a=bf(()=>{i.value="hidden"}),l=C(!0),u={show:s,appear:Q(()=>e.appear||!l.value)};return Le(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":gi(a)||(i.value="hidden")})}),dt(fl,a),dt(dl,u),()=>{const c=Xa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return rt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Ue($b,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:_f,visible:i.value==="visible",name:"Transition"})}}}),Ib={class:"moonbase:modal-container"},yi=fe({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",Ib,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Ab=["data-visible"],Vb=fe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Re(),o=St(),s=Ce(zo),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function u(){l.value=null;try{const c=await o.signIn(i.value,a.value);zt(1500).then(()=>n("signedIn",c))}catch(c){throw c instanceof An?l.value="User not found":l.value=c.message,c}}return(c,d)=>(y(),Se(Jn,{handler:u,class:"moonbase:sign-in"},{default:_e(()=>{var f;return[Z(wt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(Yn,{success:"Signed in",label:"Sign in",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,Ab),(f=_(s))!=null&&f.auth.enable.signUp?(y(),S("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>_(r).show(_(Oe).Authentication,_(ie).SignUp,{email:i.value}))}," Create account ")):ce("",!0),N("button",{type:"button",onClick:d[3]||(d[3]=m=>_(r).show(_(Oe).Authentication,_(ie).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),Rb={class:"moonbase:authentication"},jb={key:0,class:"moonbase:loader"},Lb=fe({__name:"Authentication",props:{open:{type:Boolean}},setup(e){const t=Re(),{loaded:n}=St(),r=Q(()=>{switch(t.intent){case ie.SignIn:return"Sign in";case ie.SignUp:return"Sign up";case ie.ConfirmAccount:return"Confirm account";case ie.ConfirmEmailChange:return"Confirm email change";case ie.ForgotPassword:return"Forgot password";case ie.ResetPassword:return"Reset password"}return"Authentication"}),o=Q(()=>{if(t.intent===ie.SignIn&&t.next){const[i,a,l]=t.next;if(i===Oe.Authentication&&a===ie.ConfirmEmailChange)return"to confirm email"}return null});function s(){t.reset()}return(i,a)=>(y(),Se(yi,{open:i.open,onClose:s},{default:_e(()=>[N("div",Rb,[Z(_(mi),{as:"h3"},{default:_e(()=>[ke(K(r.value)+" "+K(o.value),1)]),_:1}),_(n)?_(t).intent===_(ie).SignIn?(y(),Se(Vb,{key:1,onSignedIn:a[0]||(a[0]=l=>_(t).dequeue())})):_(t).intent===_(ie).SignUp?(y(),Se(Ay,{key:2,onSignedUp:a[1]||(a[1]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmAccount?(y(),Se(Ly,{key:3,onConfirmedAccount:a[2]||(a[2]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):_(t).intent===_(ie).ConfirmEmailChange?(y(),Se(Wy,{key:4})):_(t).intent===_(ie).ForgotPassword?(y(),Se(Uy,{key:5})):_(t).intent===_(ie).ResetPassword?(y(),Se(By,{key:6,onPasswordReset:a[3]||(a[3]=l=>_(t).show(_(Oe).Customer,_(ie).ViewAccount))})):ce("",!0):(y(),S("div",jb,[Z(jt)]))])]),_:1},8,["open"]))}});function kn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Mb={class:"moonbase:product-cart-item"},Ub=["src"],Fb={key:1,class:"moonbase:image-placeholder"},Bb={class:"moonbase:product-cart-item-content"},Hb={key:0,class:"moonbase:cart-item-discount"},Zb={class:"font-semibold"},qb={key:0,class:"ml-0.5"},Wb={key:2,class:"moonbase:product-cart-item-total"},zb={key:0,class:"moonbase:discount"},Kb={key:1},Gb=fe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return y(),S("div",Mb,[(r=t.lineItem.product)!=null&&r.iconUrl?(y(),S("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,Ub)):(y(),S("div",Fb)),N("div",Bb,[N("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),N("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(y(),S("p",Hb,[n[0]||(n[0]=ke(" Discount applied: ")),N("span",Zb,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(y(),S("span",qb," (-"+K(_(kn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):ce("",!0)])):ce("",!0),N("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(y(),S("div",Wb,[t.lineItem.variation.hasDiscount?(y(),S("span",zb,K(_(kn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):ce("",!0),t.lineItem.quantity!==1?(y(),S("span",Kb,K(t.lineItem.quantity)+" x "+K(_(kn)(t.lineItem.variation.price[t.currency],t.currency)),1)):ce("",!0),ke(" "+K(_(kn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):ce("",!0)])}}}),Jb={class:"moonbase:bundle-cart-item"},Yb=["src"],Xb={key:1,class:"moonbase:image-placeholder"},Qb={class:"moonbase:bundle-cart-item-content"},e_={key:0,class:"moonbase:cart-item-discount"},t_={class:"font-semibold"},n_={key:0,class:"ml-0.5"},r_={class:"moonbase:bundle-cart-item-summary"},o_=["data-open"],s_={key:2,class:"moonbase:product-cart-item-total"},i_={key:0,class:"moonbase:discount"},a_={key:1},l_=["src"],u_={key:1,class:"moonbase:image-placeholder"},c_=["data-included"],d_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},f_={key:0,class:"truncate italic"},p_={key:1,class:"truncate"},h_=fe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=C(!1),n=C(null);return Je(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,u,c,d;return y(),S("div",null,[N("div",Jb,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(y(),S("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Yb)):(y(),S("div",Xb)),N("div",Qb,[N("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),N("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),S("p",e_,[o[1]||(o[1]=ke(" Discount applied: ")),N("span",t_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),S("span",n_," (-"+K(_(kn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ce("",!0)])):ce("",!0),N("div",r_,[N("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),S("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[N("span",null,[ke(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(u=r.lineItem.bundle)!=null&&u.products.some(f=>!f.included)?(y(),S(xe,{key:0},[ke("of "+K((c=r.lineItem.bundle)==null?void 0:c.products.length),1)],64)):ce("",!0),o[2]||(o[2]=ke(" products "))]),(y(),S("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[3]||(o[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,o_))])):ce("",!0)])]),r.lineItem.variation?(y(),S("div",s_,[r.lineItem.variation.hasDiscount?(y(),S("span",i_,K(_(kn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ce("",!0),r.lineItem.quantity!==1?(y(),S("span",a_,K(r.lineItem.quantity)+" x "+K(_(kn)(r.lineItem.variation.price[r.currency],r.currency)),1)):ce("",!0),ke(" "+K(_(kn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ce("",!0)]),N("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),S(xe,null,sn(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),S("div",{key:f.id},[f!=null&&f.iconUrl?(y(),S("img",{key:0,src:f.iconUrl,alt:""},null,8,l_)):(y(),S("div",u_)),N("div",null,[N("h3",{"data-included":f.included||void 0},[f.included?(y(),S("svg",d_,o[4]||(o[4]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):ce("",!0),ke(" "+K(f==null?void 0:f.name),1)],8,c_),f.included?f!=null&&f.tagline?(y(),S("p",p_,K(f.tagline),1)):ce("",!0):(y(),S("p",f_," You already own this "))])]))),128))],512)])}}}),m_={class:"moonbase:cart-modal-container"},v_=fe({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(y(),Se(_(pl),{as:"template",show:t.open},{default:_e(()=>[Z(_(af),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:_e(()=>[N("div",m_,[Z(_(es),{as:"template"},{default:_e(()=>[Z(_(lf),{class:"moonbase:cart-modal-overlay"})]),_:1}),Z(_(es),{as:"template"},{default:_e(()=>[Z(_(uf),{class:"moonbase:cart-modal-content"},{default:_e(()=>[ha(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),g_=["disabled","data-success","data-error","data-working","data-variant"],y_=["data-visible"],wf=fe({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=C(!1),r=C(!1),o=C(!1),s=Q(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await zt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await zt(2500),o.value=!1}}return(a,l)=>(y(),S("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[N("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Se(jt,{key:0})):ce("",!0)],8,y_),ke(" "+K(s.value),1)],8,g_))}}),b_={class:"moonbase:cart"},__={key:0,role:"list",class:"moonbase:cart-items"},w_={key:1,class:"moonbase:cart-empty"},E_={key:2,class:"moonbase:cart-total"},O_=fe({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Re(),{items:n,total:r,currency:o,checkout:s}=Ba(),i=Ce(zo);async function a(){if(!await s({redirect:(i==null?void 0:i.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`}))throw new Error("Cancelled checkout")}return(l,u)=>(y(),Se(v_,{open:l.open,onClose:u[0]||(u[0]=c=>_(t).reset())},{default:_e(()=>[N("div",b_,[Z(_(mi),{as:"h3"},{default:_e(()=>u[1]||(u[1]=[ke(" Cart ")])),_:1}),_(n).length>0?(y(),S("ul",__,[(y(!0),S(xe,null,sn(_(n),c=>(y(),S("li",{key:c.id},[c.type==="Product"?(y(),Se(Gb,{key:0,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Se(h_,{key:1,"line-item":c,currency:_(o)},null,8,["line-item","currency"])):ce("",!0)]))),128))])):(y(),S("div",w_," Your cart is empty! ")),_(n).length>0?(y(),S("div",E_,[u[2]||(u[2]=N("label",null," Total ",-1)),N("span",null,K(_(kn)(_(r).amount,_(r).currency)),1),u[3]||(u[3]=N("p",null," Sales tax to be calculated at checkout ",-1))])):ce("",!0),_(n).length>0?(y(),Se(wf,{key:3,handler:a,label:"Checkout",error:"Cancelled"})):ce("",!0)])]),_:1},8,["open"]))}}),N_={class:"moonbase:account"},S_={key:0,class:"moonbase:error"},x_={key:1,class:"moonbase:notification"},k_={key:0,class:"moonbase:error"},T_=fe({__name:"Account",setup(e){var H,T,te;const t=Re(),{user:n,update:r,setPassword:o,signOut:s}=St(),i=C(((H=n.value)==null?void 0:H.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((te=n.value)==null?void 0:te.communicationPreferences)??{newsletterOptIn:!1}),u=C(null),c=C(!1),d=C(""),f=C(""),m=C(null),b=C(!1);async function O(){u.value=null,c.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(c.value=!0)}catch(x){throw u.value=x,x}}async function w(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch(x){throw m.value=x,x}}async function $(){b.value=!0,await s(),t.reset()}return(x,U)=>(y(),S("div",N_,[Z(Jn,{handler:O},{default:_e(()=>[Z(wt,{modelValue:i.value,"onUpdate:modelValue":U[0]||(U[0]=j=>i.value=j),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Z(wt,{modelValue:a.value,"onUpdate:modelValue":U[1]||(U[1]=j=>a.value=j),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Z(Md,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":U[2]||(U[2]=j=>l.value.newsletterOptIn=j),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),u.value?(y(),S("p",S_,K(u.value.message),1)):c.value?(y(),S("p",x_," You need to confirm your new email address, please check your inbox ")):ce("",!0)]),_:1}),Z(Jn,{handler:w},{default:_e(()=>[Z(wt,{modelValue:d.value,"onUpdate:modelValue":U[3]||(U[3]=j=>d.value=j),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Z(wt,{modelValue:f.value,"onUpdate:modelValue":U[4]||(U[4]=j=>f.value=j),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Z(Yn,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),S("p",k_,K(m.value.message),1)):ce("",!0)]),_:1}),Z(wf,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:$})]))}}),C_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function D_(e,t){return y(),S("svg",P_,t[0]||(t[0]=[N("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}const Ef=Kr(C_,[["render",D_]]),$_={},I_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function A_(e,t){return y(),S("svg",I_,t[0]||(t[0]=[N("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)]))}const Of=Kr($_,[["render",A_]]),V_={},R_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function j_(e,t){return y(),S("svg",R_,t[0]||(t[0]=[N("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)]))}const Nf=Kr(V_,[["render",j_]]),L_={},M_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function U_(e,t){return y(),S("svg",M_,t[0]||(t[0]=[N("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),N("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)]))}const Sf=Kr(L_,[["render",U_]]),F_={class:"moonbase:product-downloads"},B_=["data-last","onClick"],H_={class:"moonbase:sr-only"},Z_={class:"moonbase:sr-only"},q_=["onClick"],W_=fe({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},{downloadProduct:r}=ti(),o=Q(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(y(),S("span",F_,[(y(!0),S(xe,null,sn(o.value,(a,l,u)=>(y(),S(xe,{key:l},[a.length===1?(y(),S("button",{key:0,type:"button",role:"button","data-last":u===Object.keys(o.value).length-1||void 0,onClick:c=>_(r)(a[0])},[N("span",H_,K(l.toString()),1),(y(),Se(pa(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,B_)):(y(),Se(_(sl),{key:1,as:"div","data-last":u===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:_e(()=>[Z(_(mf),null,{default:_e(()=>[N("span",Z_,K(l.toString()),1),(y(),Se(pa(a[0].icon()),{"aria-hidden":"true"})),i[0]||(i[0]=N("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1))]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),{class:"moonbase:product-downloads-list"},{default:_e(()=>[(y(!0),S(xe,null,sn(a,c=>(y(),S("button",{key:c.key,type:"button",role:"button",onClick:d=>_(r)(c)},[N("span",null,K(c.name),1)],8,q_))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),z_={class:"moonbase:product-activations"},K_={key:0,scope:"col"},G_={key:0},J_={colspan:"3"},Y_={key:1},X_={key:0},Q_=["onClick"],e1=fe({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ti(),i=C(null);Le(async()=>{let u=await o(n.productId);for(i.value=u.items.map(c=>({...c,revoking:!1}));u.hasMore&&u.next;)u=await o(n.productId,u.next),i.value.push(...u.items.map(c=>({...c,revoking:!1})))});const a=Q(()=>i.value&&i.value.some(u=>u.activationMethod===Ii.Online));async function l(u){u.revoking=!0,await s(u),r("revoked",u),i.value&&i.value.splice(i.value.indexOf(u),1)}return(u,c)=>(y(),S("table",z_,[N("thead",null,[N("tr",null,[c[1]||(c[1]=N("th",{scope:"col"}," Device ",-1)),c[2]||(c[2]=N("th",{scope:"col"}," Activation Method ",-1)),c[3]||(c[3]=N("th",{scope:"col"}," Last Online ",-1)),a.value?(y(),S("th",K_,c[0]||(c[0]=[N("span",{class:"sr-only"},"Actions",-1)]))):ce("",!0)])]),N("tbody",null,[i.value?i.value.length===0?(y(),S("tr",Y_,c[6]||(c[6]=[N("td",{colspan:"3"}," No activations found ",-1)]))):ce("",!0):(y(),S("tr",G_,[N("td",J_,[Z(jt),c[4]||(c[4]=ke(" Loading activations.. "))]),c[5]||(c[5]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(i.value,d=>{var f;return y(),S("tr",{key:d.id},[N("td",null,K(d.name),1),N("td",null,K(d.activationMethod),1),N("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),S("td",X_,[N("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Se(jt,{key:0})):ce("",!0),c[7]||(c[7]=ke(" Revoke "))],8,Q_)])):ce("",!0)])}),128))])]))}}),t1={class:"moonbase:products"},n1={key:0,scope:"col"},r1={key:1,scope:"col"},o1={key:0},s1={key:1},i1=["src"],a1={key:1,class:"moonbase:image-placeholder"},l1={key:1},u1={key:2},c1={key:0},d1=fe({__name:"Products",setup(e){const{getProducts:t}=ti(),n=C(null);Le(async()=>{let s=await t();for(n.value=s.items;s.hasMore&&s.next;)s=await t(s.next),n.value.push(...s.items)});const r=Q(()=>n.value&&n.value.some(s=>s.downloads)),o=Q(()=>n.value&&n.value.some(s=>s.maxActivations&&s.maxActivations>0));return(s,i)=>(y(),S("table",t1,[N("thead",null,[N("tr",null,[i[0]||(i[0]=N("th",{scope:"col"}," Product ",-1)),o.value?(y(),S("th",n1," Activations ")):ce("",!0),r.value?(y(),S("th",r1," Downloads ")):ce("",!0)])]),N("tbody",null,[n.value?n.value.length===0?(y(),S("tr",s1,i[3]||(i[3]=[N("td",{colspan:"3"}," No products found ",-1)]))):ce("",!0):(y(),S("tr",o1,[N("td",null,[Z(jt),i[1]||(i[1]=ke(" Loading products.. "))]),i[2]||(i[2]=N("td",null,null,-1))])),(y(!0),S(xe,null,sn(n.value||[],a=>(y(),S("tr",{key:a.id},[N("td",null,[N("div",null,[a.iconUrl?(y(),S("img",{key:0,src:a.iconUrl,alt:""},null,8,i1)):(y(),S("div",a1)),N("span",null,K(a.name),1)])]),a.maxActivations&&a.maxActivations>0?(y(),Se(_(sl),{key:0,as:"td"},{default:_e(()=>[Z(_(mf),{class:"moonbase:button","data-variant":"secondary"},{default:_e(()=>[i[4]||(i[4]=N("span",{class:"moonbase:sr-only"},"View activations",-1)),ke(" "+K(a.currentActivations)+" / "+K(a.maxActivations),1)]),_:2},1024),Z(ja,{name:"moonbase:scale"},{default:_e(()=>[Z(_(vf),null,{default:_e(()=>[Z(e1,{"product-id":a.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024)):o.value?(y(),S("td",l1)):ce("",!0),r.value?(y(),S("td",u1,[a.currentVersion!=null?(y(),S("div",c1,[a.downloads?(y(),Se(W_,{key:0,downloads:a.downloads},null,8,["downloads"])):ce("",!0)])):ce("",!0)])):ce("",!0)]))),128))])]))}}),f1={class:"moonbase:redeem"},p1=["data-visible"],h1={key:1,class:"moonbase:redeem-voucher"},m1={key:0},v1={key:1},g1={class:"moonbase:redeem-voucher-products"},y1=["src"],b1={key:1,class:"moonbase:image-placeholder"},_1={key:0},w1={class:"moonbase:redeem-voucher-bundle"},E1=["src"],O1={key:1,class:"moonbase:image-placeholder"},N1={key:0},S1={class:"moonbase:redeem-voucher-bundle-products"},x1={class:"shrink-0"},k1=["src"],T1={key:1,class:"moonbase:image-placeholder"},C1=fe({__name:"Redeem",setup(e){const{redeem:t}=Ig(),n=C(!1),r=C(null),o=C(null),s=C("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(y(),S("div",f1,[Z(ja,{mode:"out-in",name:"moonbase:slide-left"},{default:_e(()=>[r.value?(y(),S("div",h1,[N("h3",null,[l[1]||(l[1]=ke(" You got: ")),N("strong",null,K(r.value.name),1)]),r.value.description?(y(),S("h4",m1,K(r.value.description),1)):ce("",!0),N("h4",null,[l[2]||(l[2]=ke(" Code: ")),N("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),S("div",v1,[l[3]||(l[3]=N("span",null," Contains: ",-1)),N("div",g1,[(y(!0),S(xe,null,sn(r.value.redeemsProducts,({value:u,quantity:c})=>(y(),S("div",{key:u.id,class:"moonbase:redeem-voucher-product"},[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,y1)):(y(),S("div",b1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",_1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]))),128)),(y(!0),S(xe,null,sn(r.value.redeemsBundles,({value:u,quantity:c})=>(y(),S("div",{key:u.id},[N("div",w1,[N("div",null,[u.iconUrl?(y(),S("img",{key:0,src:u.iconUrl,alt:""},null,8,E1)):(y(),S("div",O1))]),N("div",null,[N("p",null,[ke(K(u.name)+" ",1),c!==1?(y(),S("span",N1,"x "+K(c),1)):ce("",!0)]),N("p",null,K(u.tagline),1)])]),N("div",S1,[(y(!0),S(xe,null,sn(u.products,d=>(y(),S("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[N("div",x1,[d.iconUrl?(y(),S("img",{key:0,src:d.iconUrl,alt:""},null,8,k1)):(y(),S("div",T1))]),N("div",null,[N("p",null,K(d.name),1),N("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):ce("",!0)])):(y(),Se(Jn,{key:0,handler:i},{default:_e(()=>{var u;return[Z(wt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),Z(Yn,{label:"Redeem",success:"Redeem",error:"Error"}),N("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((u=o.value)==null?void 0:u.message),9,p1)]}),_:1}))]),_:1})]))}}),P1={class:"moonbase:customer"},D1=fe({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Re();function n(s){switch(s){case ie.ViewAccount:return 0;case ie.ViewProducts:return 1;case ie.RedeemVoucher:return 2}return 0}const r=C(n(t.intent));Je(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(y(),Se(yi,{open:s.open,onClose:i[0]||(i[0]=a=>_(t).reset())},{default:_e(()=>[N("div",P1,[Z(_(Nb),{"selected-index":r.value,onChange:o},{default:_e(()=>[Z(_(Sb),null,{default:_e(()=>[Z(_(al),null,{default:_e(()=>i[1]||(i[1]=[ke("Account")])),_:1}),Z(_(al),null,{default:_e(()=>i[2]||(i[2]=[ke(" Products ")])),_:1}),Z(_(al),null,{default:_e(()=>i[3]||(i[3]=[ke("Redeem")])),_:1})]),_:1}),Z(_(xb),null,{default:_e(()=>[Z(_(ll),null,{default:_e(()=>[Z(T_)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(d1)]),_:1}),Z(_(ll),null,{default:_e(()=>[Z(C1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),$1={class:"moonbase:auto-activate"},I1={key:0,class:"moonbase:loader"},A1={key:1,class:"moonbase:loader"},V1={key:2,class:"moonbase:loader"},R1={key:3},j1={key:0,class:"moonbase:auto-activate-product"},L1=["src"],M1={key:1,class:"moonbase:image-placeholder"},U1={key:1,class:"moonbase:loader"},F1={key:2,class:"moonbase:loader"},B1={key:3,class:"moonbase:loader"},H1={key:4,class:"moonbase:auto-activate-content"},Z1={key:0},q1={key:1},W1={class:"moonbase:auto-activate-cta"},z1=["href"],K1={key:2,class:"moonbase:auto-activate-trial"},G1={class:"moonbase:auto-activate-cta"},J1=fe({__name:"AutoActivate",setup(e){const t=Re(),{user:n,loaded:r}=St(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:u,fulfillLicense:c,fulfillTrial:d,cancel:f}=$g(o);Je(s,O=>{var w;!a.value&&!l.value&&(O==null?void 0:O.status)===Qt.Requested&&((w=O==null?void 0:O.licenseEligibility)!=null&&w.eligible)&&c()});function m(){f(),t.show(Oe.Customer,ie.ViewProducts)}function b(){t.enqueue(Oe.Activation,ie.ActivateProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}return(O,w)=>{var $,H,T,te;return y(),S("div",$1,[_(i)||!_(r)?(y(),S("div",I1,[Z(jt)])):_(u)?(y(),S("div",A1,K(_(u)),1)):_(s)?(y(),S("div",R1,[_(s).product?(y(),S("div",j1,[_(s).product.iconUrl?(y(),S("img",{key:0,src:_(s).product.iconUrl,alt:""},null,8,L1)):(y(),S("div",M1)),N("div",null,[N("h2",null,K(_(s).product.name),1),N("h3",null,K(_(s).product.tagline),1)])])):ce("",!0),(($=_(s))==null?void 0:$.status)===_(Qt).Cancelled?(y(),S("div",U1,w[2]||(w[2]=[N("h3",null," Uh oh ",-1),N("p",null," This activation request was cancelled, open your app to try again. ",-1)]))):_(a)||_(l)?(y(),S("div",F1,[Z(jt),N("p",null,"Activating "+K(_(s).product.name)+"...",1)])):((H=_(s))==null?void 0:H.status)===_(Qt).Completed?(y(),S("div",B1,w[3]||(w[3]=[N("h3",null," Done! ",-1),N("p",null," Your product is activated. ",-1)]))):(y(),S("div",H1,[_(n)?(T=_(n).ownedProducts)!=null&&T.includes(_(s).product.id)?(y(),S("div",q1,[w[5]||(w[5]=N("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1)),N("span",W1,[N("button",{role:"button",class:"moonbase:button",onClick:w[0]||(w[0]=x=>m())}," Licenses "),_(s).product&&_(s).product.website?(y(),S("a",{key:0,href:_(s).product.website,class:"moonbase:button"}," Purchase ",8,z1)):ce("",!0)])])):ce("",!0):(y(),S("div",Z1,[w[4]||(w[4]=ke(" Please sign in to use a license ")),N("span",{class:"moonbase:auto-activate-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:b}," Sign in ")])])),(te=_(s).trialEligibility)!=null&&te.eligible?(y(),S("div",K1,[ke(" You are eligible for a "+K(_(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),_(s).trialEligibility.existing?(y(),S(xe,{key:0},[ke(" of which you have "+K(_(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ce("",!0),w[6]||(w[6]=ke(". ")),N("span",G1,[N("button",{role:"button",class:"moonbase:button",onClick:w[1]||(w[1]=x=>_(d)())}," Start trial ")])])):ce("",!0)]))])):(y(),S("div",V1," Could not find activation request "))])}}}),Y1={class:"moonbase:activation"},X1=fe({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(yi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",Y1,[Z(_(mi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Activate product ")])),_:1}),n.open&&_(t).intent===_(ie).ActivateProduct?(y(),Se(J1,{key:0})):ce("",!0)])]),_:1},8,["open"]))}});function Q1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const ew={class:"moonbase:download-product"},tw={key:0,class:"moonbase:loader"},nw={key:1,class:"moonbase:loader"},rw={key:2,class:"moonbase:loader"},ow={key:3},sw={class:"moonbase:download-product-product"},iw=["src"],aw={key:1,class:"moonbase:image-placeholder"},lw={key:0},uw={key:0,class:"moonbase:download-product-content"},cw={key:1,class:"moonbase:download-product-content"},dw={key:2,class:"moonbase:download-product-content"},fw={key:0,role:"list"},pw={class:"moonbase:download-product-download-name"},hw=["onClick"],mw={class:"moonbase:download-product-download-description"},vw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},gw={key:1,class:"moonbase:loader"},yw=fe({__name:"DownloadProduct",setup(e){const t=Re(),{user:n,loaded:r}=St(),{getProduct:o,downloadProduct:s}=ti(),i={[Xt.Universal]:()=>Ef,[Xt.Windows]:()=>Of,[Xt.Linux]:()=>Nf,[Xt.Mac]:()=>Sf},a=C(null),l=C([]),u=C(null),c=C(!0),d=Q(()=>t.getParameter("key")),f=Q(()=>{var O,w;return(w=(O=a.value)==null?void 0:O.downloads)==null?void 0:w.filter($=>!d.value||$.key===d.value)});Le(async()=>{const O=t.getParameter("product_id"),w=t.getParameter("version");if(!O){u.value="Link is broken";return}try{a.value=await o(O,w||void 0)}catch($){u.value=$.message}c.value=!1});function m(){t.enqueue(Oe.Download,ie.DownloadProduct,t.parameters??void 0),t.show(Oe.Authentication,ie.SignIn)}async function b(O){l.value.push(O.key),await s(O),l.value=l.value.filter(w=>w!==O.key)}return(O,w)=>{var $,H;return y(),S("div",ew,[c.value||!_(r)?(y(),S("div",tw,[Z(jt)])):u.value?(y(),S("div",nw,K(u.value),1)):a.value?(y(),S("div",ow,[N("div",sw,[a.value.iconUrl?(y(),S("img",{key:0,src:a.value.iconUrl,alt:""},null,8,iw)):(y(),S("div",aw)),N("div",null,[N("h2",null,[ke(K(a.value.name)+" ",1),N("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),S("span",lw," (pre-release)")):ce("",!0)]),N("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!_(n)?(y(),S("div",uw,[w[0]||(w[0]=ke(" Please sign in to download product ")),N("span",{class:"moonbase:download-product-cta"},[N("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!(($=_(n).ownedProducts)!=null&&$.includes(a.value.id))?(y(),S("div",cw," This product requires ownership to download ")):(y(),S("div",dw,[(H=a.value)!=null&&H.downloads&&a.value.downloads.length>0?(y(),S("ul",fw,[(y(!0),S(xe,null,sn(f.value,T=>(y(),S("li",{key:T.key},[N("div",null,[N("p",pw,[N("button",{onClick:te=>b(T)},[w[1]||(w[1]=N("span",{class:"moonbase:download-product-clicker"},null,-1)),ke(" "+K(T.name),1)],8,hw)]),N("p",mw,[(y(),Se(pa(i[T.platform]()),{"aria-hidden":"true"})),ke(" "+K(T.platform)+" ",1),w[2]||(w[2]=N("span",null," |",-1)),ke(" "+K(_(Q1)(T.size)),1)])]),N("div",null,[l.value.includes(T.key)?(y(),Se(jt,{key:0})):(y(),S("svg",vw,w[3]||(w[3]=[N("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)])))])]))),128))])):(y(),S("div",gw," No downloadable files found "))]))])):(y(),S("div",rw," Could not find product "))])}}}),bw={class:"moonbase:download"},_w=fe({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Re();return(n,r)=>(y(),Se(yi,{open:n.open,onClose:r[0]||(r[0]=o=>_(t).reset())},{default:_e(()=>[N("div",bw,[Z(_(mi),{as:"h3"},{default:_e(()=>r[1]||(r[1]=[ke(" Download product ")])),_:1}),n.open&&_(t).intent===_(ie).DownloadProduct?(y(),Se(yw,{key:0})):ce("",!0)])]),_:1},8,["open"]))}}),ww=fe({__name:"App",setup(e){const t=Ce(zo),n=Re();return Je(()=>[n.active,n.intent],([r,o])=>{}),(r,o)=>{var s;return y(),S(xe,null,[(s=_(t))!=null&&s.toolbar.enabled?(y(),Se(hy,{key:0})):ce("",!0),Z(O_,{open:_(n).active===_(Oe).Cart},null,8,["open"]),Z(Lb,{open:_(n).active===_(Oe).Authentication},null,8,["open"]),Z(X1,{open:_(n).active===_(Oe).Activation},null,8,["open"]),Z(_w,{open:_(n).active===_(Oe).Download},null,8,["open"]),Z(D1,{open:_(n).active===_(Oe).Customer},null,8,["open"])],64)}}});function bi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(bi(e)&&bi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];bi(o)&&bi(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}class Ew{constructor(){Tr(this,"initialized",!1);Tr(this,"pinia");Tr(this,"storefront");Tr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=hl(cy,n),this.storefront=Ag(t),this.pinia=sy(),vg(ww).use(this.storefront).use(this.pinia).provide(zo,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(ie).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([c])=>c.startsWith("mb_")).map(([c,d])=>[c.substring(3),d]));if(a===ie.Checkout&&l.complete)return;this[a](l);for(const c of Object.keys(l))i.delete(`mb_${c}`);const u=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(u?`?${u}`:""))}}const o=Re(this.pinia),s=St(this.storefront);this.storefront.onCheckoutClosed(i=>{i===ie.ViewProducts&&(s.user?o.show(Oe.Customer,ie.ViewProducts):o.show(Oe.Cart,ie.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Re(this.pinia).show(Oe.Authentication,ie.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Authentication,ie.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Re(this.pinia);St(this.storefront).user.value?n.show(Oe.Authentication,ie.ConfirmEmailChange,t):(n.show(Oe.Authentication,ie.SignIn),n.enqueue(Oe.Authentication,ie.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Re(this.pinia);St(this.storefront).user.value?t.show(Oe.Customer,ie.ViewAccount):(t.show(Oe.Authentication,ie.SignIn),t.enqueue(Oe.Customer,ie.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Download,ie.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Re(this.pinia).show(Oe.Activation,ie.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Re(this.pinia).show(Oe.Cart,ie.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Ba(this.storefront);if(t!=null&&t.product_id){const l=gd(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=gd(t.product_id,this.storefront);if(u.value)n.addToCart(u.value,(s=u.value.variations)==null?void 0:s.find(c=>c.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=vd(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(u=>u.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const u=vd(t.bundle_id,this.storefront);if(u.value)n.addToCart(u.value,(a=u.value.variations)==null?void 0:a.find(c=>c.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Re(this.pinia).show(Oe.Cart,ie.AddToCart)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Ba(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`})}close_checkout(){var t;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(t=this.storefront)==null||t.closeCheckout()}}const xf=new Ew;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=xf),kt.MoonbaseIntent=ie,kt.default=xf,Object.defineProperties(kt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|