@moonbase.sh/storefront 0.4.11 → 0.4.12
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 +113 -110
- package/dist/moonbase.umd.cjs +9 -9
- package/package.json +2 -2
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -4,24 +4,24 @@
|
|
|
4
4
|
* @vue/shared v3.5.14
|
|
5
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
6
6
|
* @license MIT
|
|
7
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Zn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ze=Uc.NODE_ENV!=="production"?Object.freeze({}):{},To=Uc.NODE_ENV!=="production"?Object.freeze([]):[],pt=()=>{},Z0=()=>!1,Es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vi=e=>e.startsWith("onUpdate:"),it=Object.assign,bl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Y0=Object.prototype.hasOwnProperty,Ue=(e,t)=>Y0.call(e,t),ge=Array.isArray,qr=e=>Ri(e)==="[object Map]",Bc=e=>Ri(e)==="[object Set]",Ee=e=>typeof e=="function",Qe=e=>typeof e=="string",Yn=e=>typeof e=="symbol",qe=e=>e!==null&&typeof e=="object",gl=e=>(qe(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),Hc=Object.prototype.toString,Ri=e=>Hc.call(e),vl=e=>Ri(e).slice(8,-1),qc=e=>Ri(e)==="[object Object]",yl=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=Zn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G0=Zn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Li=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},K0=/-(\w)/g,It=Li(e=>e.replace(K0,(t,n)=>n?n.toUpperCase():"")),X0=/\B([A-Z])/g,vr=Li(e=>e.replace(X0,"-$1").toLowerCase()),zr=Li(e=>e.charAt(0).toUpperCase()+e.slice(1)),Wr=Li(e=>e?`on${zr(e)}`:""),yr=(e,t)=>!Object.is(e,t),ks=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ji=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},J0=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Q0=e=>{const t=Qe(e)?Number(e):NaN;return isNaN(t)?e:t};let zc;const Os=()=>zc||(zc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Fi(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Qe(r)?rb(r):Fi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Qe(e)||qe(e))return e}const eb=/;(?![^(]*\))/g,tb=/:([^]+)/,nb=/\/\*[^]*?\*\//g;function rb(e){const t={};return e.replace(nb,"").split(eb).forEach(n=>{if(n){const r=n.split(tb);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ss(e){let t="";if(Qe(e))t=e;else if(ge(e))for(let n=0;n<e.length;n++){const r=Ss(e[n]);r&&(t+=r+" ")}else if(qe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ob="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",sb="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",ib="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",ab=Zn(ob),lb=Zn(sb),ub=Zn(ib),cb=Zn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Wc(e){return!!e||e===""}const Zc=e=>!!(e&&e.__v_isRef===!0),j=e=>Qe(e)?e:e==null?"":ge(e)||qe(e)&&(e.toString===Hc||!Ee(e.toString))?Zc(e)?j(e.value):JSON.stringify(e,Yc,2):String(e),Yc=(e,t)=>Zc(t)?Yc(e,t.value):qr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[_l(r,s)+" =>"]=o,n),{})}:Bc(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>_l(n))}:Yn(t)?_l(t):qe(t)&&!ge(t)&&!qc(t)?String(t):t,_l=(e,t="")=>{var n;return Yn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ye={};function nn(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ot;class Gc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ot,!t&&Ot&&(this.index=(Ot.scopes||(Ot.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=Ot;try{return Ot=this,t()}finally{Ot=n}}else Ye.NODE_ENV!=="production"&&nn("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=Ot,Ot=this)}off(){this._on>0&&--this._on===0&&(Ot=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=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}}}function Kc(e){return new Gc(e)}function Xc(){return Ot}function db(e,t=!1){Ot?Ot.cleanups.push(e):Ye.NODE_ENV!=="production"&&!t&&nn("onScopeDispose() is called when there is no active effect scope to be associated with.")}let We;const wl=new WeakSet;class Jc{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ot&&Ot.active&&Ot.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,wl.has(this)&&(wl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ed(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sd(this),td(this);const t=We,n=hn;We=this,hn=!0;try{return this.fn()}finally{Ye.NODE_ENV!=="production"&&We!==this&&nn("Active effect was not restored correctly - this is likely a Vue internal bug."),nd(this),We=t,hn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ol(t);this.deps=this.depsTail=void 0,sd(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?wl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){kl(this)&&this.run()}get dirty(){return kl(this)}}let Qc=0,Ns,Cs;function ed(e,t=!1){if(e.flags|=8,t){e.next=Cs,Cs=e;return}e.next=Ns,Ns=e}function El(){Qc++}function xl(){if(--Qc>0)return;if(Cs){let t=Cs;for(Cs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ns;){let t=Ns;for(Ns=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function td(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function nd(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Ol(r),fb(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function kl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function rd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!kl(e))))return;e.flags|=2;const t=e.dep,n=We,r=hn;We=e,hn=!0;try{td(e);const o=e.fn(e._value);(t.version===0||yr(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{We=n,hn=r,nd(e),e.flags&=-3}}function Ol(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),Ye.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=o),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Ol(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fb(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let hn=!0;const od=[];function pn(){od.push(hn),hn=!1}function mn(){const e=od.pop();hn=e===void 0?!0:e}function sd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=We;We=void 0;try{t()}finally{We=n}}}let Ts=0;class hb{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Sl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,Ye.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!We||!hn||We===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==We)n=this.activeLink=new hb(We,this),We.deps?(n.prevDep=We.depsTail,We.depsTail.nextDep=n,We.depsTail=n):We.deps=We.depsTail=n,id(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=We.depsTail,n.nextDep=void 0,We.depsTail.nextDep=n,We.depsTail=n,We.deps===n&&(We.deps=r)}return Ye.NODE_ENV!=="production"&&We.onTrack&&We.onTrack(it({effect:We},t)),n}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){El();try{if(Ye.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(it({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{xl()}}}function id(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)id(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ye.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Ui=new WeakMap,Zr=Symbol(Ye.NODE_ENV!=="production"?"Object iterate":""),Nl=Symbol(Ye.NODE_ENV!=="production"?"Map keys iterate":""),Ps=Symbol(Ye.NODE_ENV!=="production"?"Array iterate":"");function mt(e,t,n){if(hn&&We){let r=Ui.get(e);r||Ui.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Sl),o.map=r,o.key=n),Ye.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Pn(e,t,n,r,o,s){const i=Ui.get(e);if(!i){Ts++;return}const a=l=>{l&&(Ye.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger())};if(El(),t==="clear")i.forEach(a);else{const l=ge(e),u=l&&yl(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Ps||!Yn(f)&&f>=c)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),u&&a(i.get(Ps)),t){case"add":l?u&&a(i.get("length")):(a(i.get(Zr)),qr(e)&&a(i.get(Nl)));break;case"delete":l||(a(i.get(Zr)),qr(e)&&a(i.get(Nl)));break;case"set":qr(e)&&a(i.get(Zr));break}}xl()}function pb(e,t){const n=Ui.get(e);return n&&n.get(t)}function Po(e){const t=Se(e);return t===e?t:(mt(t,"iterate",Ps),Mt(e)?t:t.map(yt))}function Bi(e){return mt(e=Se(e),"iterate",Ps),e}const mb={__proto__:null,[Symbol.iterator](){return Cl(this,Symbol.iterator,yt)},concat(...e){return Po(this).concat(...e.map(t=>ge(t)?Po(t):t))},entries(){return Cl(this,"entries",e=>(e[1]=yt(e[1]),e))},every(e,t){return Gn(this,"every",e,t,void 0,arguments)},filter(e,t){return Gn(this,"filter",e,t,n=>n.map(yt),arguments)},find(e,t){return Gn(this,"find",e,t,yt,arguments)},findIndex(e,t){return Gn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gn(this,"findLast",e,t,yt,arguments)},findLastIndex(e,t){return Gn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tl(this,"includes",e)},indexOf(...e){return Tl(this,"indexOf",e)},join(e){return Po(this).join(e)},lastIndexOf(...e){return Tl(this,"lastIndexOf",e)},map(e,t){return Gn(this,"map",e,t,void 0,arguments)},pop(){return $s(this,"pop")},push(...e){return $s(this,"push",e)},reduce(e,...t){return ad(this,"reduce",e,t)},reduceRight(e,...t){return ad(this,"reduceRight",e,t)},shift(){return $s(this,"shift")},some(e,t){return Gn(this,"some",e,t,void 0,arguments)},splice(...e){return $s(this,"splice",e)},toReversed(){return Po(this).toReversed()},toSorted(e){return Po(this).toSorted(e)},toSpliced(...e){return Po(this).toSpliced(...e)},unshift(...e){return $s(this,"unshift",e)},values(){return Cl(this,"values",yt)}};function Cl(e,t,n){const r=Bi(e),o=r[t]();return r!==e&&!Mt(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const bb=Array.prototype;function Gn(e,t,n,r,o,s){const i=Bi(e),a=i!==e&&!Mt(e),l=i[t];if(l!==bb[t]){const d=l.apply(e,s);return a?yt(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,yt(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 ad(e,t,n,r){const o=Bi(e);let s=n;return o!==e&&(Mt(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,yt(a),l,e)}),o[t](s,...r)}function Tl(e,t,n){const r=Se(e);mt(r,"iterate",Ps);const o=r[t](...n);return(o===-1||o===!1)&&$o(n[0])?(n[0]=Se(n[0]),r[t](...n)):o}function $s(e,t,n=[]){pn(),El();const r=Se(e)[t].apply(e,n);return xl(),mn(),r}const gb=Zn("__proto__,__v_isRef,__isVue"),ld=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Yn));function vb(e){Yn(e)||(e=String(e));const t=Se(this);return mt(t,"has",e),t.hasOwnProperty(e)}class ud{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;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?bd:md:s?pd:hd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ge(t);if(!o){let l;if(i&&(l=mb[n]))return l;if(n==="hasOwnProperty")return vb}const a=Reflect.get(t,n,Xe(t)?t:r);return(Yn(n)?ld.has(n):gb(n))||(o||mt(t,"get",n),s)?a:Xe(a)?i&&yl(n)?a:a.value:qe(a)?o?gd(a):As(a):a}}class cd extends ud{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=An(s);if(!Mt(r)&&!An(r)&&(s=Se(s),r=Se(r)),!ge(t)&&Xe(s)&&!Xe(r))return l?!1:(s.value=r,!0)}const i=ge(t)&&yl(n)?Number(n)<t.length:Ue(t,n),a=Reflect.set(t,n,r,Xe(t)?t:o);return t===Se(o)&&(i?yr(r,s)&&Pn(t,"set",n,r,s):Pn(t,"add",n,r)),a}deleteProperty(t,n){const r=Ue(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Pn(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Yn(n)||!ld.has(n))&&mt(t,"has",n),r}ownKeys(t){return mt(t,"iterate",ge(t)?"length":Zr),Reflect.ownKeys(t)}}class dd extends ud{constructor(t=!1){super(!0,t)}set(t,n){return Ye.NODE_ENV!=="production"&&nn(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ye.NODE_ENV!=="production"&&nn(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const yb=new cd,_b=new dd,wb=new cd(!0),Eb=new dd(!0),Pl=e=>e,Hi=e=>Reflect.getPrototypeOf(e);function xb(e,t,n){return function(...r){const o=this.__v_raw,s=Se(o),i=qr(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Pl:t?Zi:yt;return!t&&mt(s,"iterate",l?Nl:Zr),{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 qi(e){return function(...t){if(Ye.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";nn(`${zr(e)} operation ${n}failed: target is readonly.`,Se(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function kb(e,t){const n={get(o){const s=this.__v_raw,i=Se(s),a=Se(o);e||(yr(o,a)&&mt(i,"get",o),mt(i,"get",a));const{has:l}=Hi(i),u=t?Pl:e?Zi:yt;if(l.call(i,o))return u(s.get(o));if(l.call(i,a))return u(s.get(a));s!==i&&s.get(o)},get size(){const o=this.__v_raw;return!e&&mt(Se(o),"iterate",Zr),Reflect.get(o,"size",o)},has(o){const s=this.__v_raw,i=Se(s),a=Se(o);return e||(yr(o,a)&&mt(i,"has",o),mt(i,"has",a)),o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){const i=this,a=i.__v_raw,l=Se(a),u=t?Pl:e?Zi:yt;return!e&&mt(l,"iterate",Zr),a.forEach((c,d)=>o.call(s,u(c),u(d),i))}};return it(n,e?{add:qi("add"),set:qi("set"),delete:qi("delete"),clear:qi("clear")}:{add(o){!t&&!Mt(o)&&!An(o)&&(o=Se(o));const s=Se(this);return Hi(s).has.call(s,o)||(s.add(o),Pn(s,"add",o,o)),this},set(o,s){!t&&!Mt(s)&&!An(s)&&(s=Se(s));const i=Se(this),{has:a,get:l}=Hi(i);let u=a.call(i,o);u?Ye.NODE_ENV!=="production"&&fd(i,a,o):(o=Se(o),u=a.call(i,o));const c=l.call(i,o);return i.set(o,s),u?yr(s,c)&&Pn(i,"set",o,s,c):Pn(i,"add",o,s),this},delete(o){const s=Se(this),{has:i,get:a}=Hi(s);let l=i.call(s,o);l?Ye.NODE_ENV!=="production"&&fd(s,i,o):(o=Se(o),l=i.call(s,o));const u=a?a.call(s,o):void 0,c=s.delete(o);return l&&Pn(s,"delete",o,void 0,u),c},clear(){const o=Se(this),s=o.size!==0,i=Ye.NODE_ENV!=="production"?qr(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&Pn(o,"clear",void 0,void 0,i),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=xb(o,e,t)}),n}function zi(e,t){const n=kb(e,t);return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ue(n,o)&&o in r?n:r,o,s)}const Ob={get:zi(!1,!1)},Sb={get:zi(!1,!0)},Nb={get:zi(!0,!1)},Cb={get:zi(!0,!0)};function fd(e,t,n){const r=Se(n);if(r!==n&&t.call(e,r)){const o=vl(e);nn(`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 hd=new WeakMap,pd=new WeakMap,md=new WeakMap,bd=new WeakMap;function Tb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Pb(e){return e.__v_skip||!Object.isExtensible(e)?0:Tb(vl(e))}function As(e){return An(e)?e:Wi(e,!1,yb,Ob,hd)}function $b(e){return Wi(e,!1,wb,Sb,pd)}function gd(e){return Wi(e,!0,_b,Nb,md)}function $n(e){return Wi(e,!0,Eb,Cb,bd)}function Wi(e,t,n,r,o){if(!qe(e))return Ye.NODE_ENV!=="production"&&nn(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=Pb(e);if(s===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,s===2?r:n);return o.set(e,a),a}function bn(e){return An(e)?bn(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function $o(e){return e?!!e.__v_raw:!1}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function _r(e){return!Ue(e,"__v_skip")&&Object.isExtensible(e)&&ji(e,"__v_skip",!0),e}const yt=e=>qe(e)?As(e):e,Zi=e=>qe(e)?gd(e):e;function Xe(e){return e?e.__v_isRef===!0:!1}function V(e){return vd(e,!1)}function Ab(e){return vd(e,!0)}function vd(e,t){return Xe(e)?e:new Db(e,t)}class Db{constructor(t,n){this.dep=new Sl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Se(t),this._value=n?t:yt(t),this.__v_isShallow=n}get value(){return Ye.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||Mt(t)||An(t);t=r?t:Se(t),yr(t,n)&&(this._rawValue=t,this._value=r?t:yt(t),Ye.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function b(e){return Xe(e)?e.value:e}function wr(e){return Ee(e)?e():b(e)}const Ib={get:(e,t,n)=>t==="__v_raw"?e:b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Xe(o)&&!Xe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function yd(e){return bn(e)?e:new Proxy(e,Ib)}function _d(e){Ye.NODE_ENV!=="production"&&!$o(e)&&nn("toRefs() expects a reactive object but received a plain one.");const t=ge(e)?new Array(e.length):{};for(const n in e)t[n]=wd(e,n);return t}class Mb{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 pb(Se(this._object),this._key)}}class Vb{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 $l(e,t,n){return Xe(e)?e:Ee(e)?new Vb(e):qe(e)&&arguments.length>1?wd(e,t,n):V(e)}function wd(e,t,n){const r=e[t];return Xe(r)?r:new Mb(e,t,n)}class Rb{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Sl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&We!==this)return ed(this,!0),!0}get value(){const t=Ye.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return rd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ye.NODE_ENV!=="production"&&nn("Write operation failed: computed value is readonly")}}function Lb(e,t,n=!1){let r,o;return Ee(e)?r=e:(r=e.get,o=e.set),new Rb(r,o,n)}const Yi={},Gi=new WeakMap;let Yr;function jb(e,t=!1,n=Yr){if(n){let r=Gi.get(n);r||Gi.set(n,r=[]),r.push(e)}else Ye.NODE_ENV!=="production"&&!t&&nn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Fb(e,t,n=Ze){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=L=>{(n.onWarn||nn)("Invalid watch source: ",L,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=L=>o?L:Mt(L)||o===!1||o===0?Er(L,1):Er(L);let d,f,h,p,_=!1,E=!1;if(Xe(e)?(f=()=>e.value,_=Mt(e)):bn(e)?(f=()=>c(e),_=!0):ge(e)?(E=!0,_=e.some(L=>bn(L)||Mt(L)),f=()=>e.map(L=>{if(Xe(L))return L.value;if(bn(L))return c(L);if(Ee(L))return l?l(L,2):L();Ye.NODE_ENV!=="production"&&u(L)})):Ee(e)?t?f=l?()=>l(e,2):e:f=()=>{if(h){pn();try{h()}finally{mn()}}const L=Yr;Yr=d;try{return l?l(e,3,[p]):e(p)}finally{Yr=L}}:(f=pt,Ye.NODE_ENV!=="production"&&u(e)),t&&o){const L=f,D=o===!0?1/0:o;f=()=>Er(L(),D)}const N=Xc(),q=()=>{d.stop(),N&&N.active&&bl(N.effects,d)};if(s&&t){const L=t;t=(...D)=>{L(...D),q()}}let z=E?new Array(e.length).fill(Yi):Yi;const B=L=>{if(!(!(d.flags&1)||!d.dirty&&!L))if(t){const D=d.run();if(o||_||(E?D.some((m,P)=>yr(m,z[P])):yr(D,z))){h&&h();const m=Yr;Yr=d;try{const P=[D,z===Yi?void 0:E&&z[0]===Yi?[]:z,p];l?l(t,3,P):t(...P),z=D}finally{Yr=m}}}else d.run()};return a&&a(B),d=new Jc(f),d.scheduler=i?()=>i(B,!1):B,p=L=>jb(L,!1,d),h=d.onStop=()=>{const L=Gi.get(d);if(L){if(l)l(L,4);else for(const D of L)D();Gi.delete(d)}},Ye.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?B(!0):z=d.run():i?i(B.bind(null,!0),!0):d.run(),q.pause=d.pause.bind(d),q.resume=d.resume.bind(d),q.stop=q,q}function Er(e,t=1/0,n){if(t<=0||!qe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Xe(e))Er(e.value,t,n);else if(ge(e))for(let r=0;r<e.length;r++)Er(e[r],t,n);else if(Bc(e)||qr(e))e.forEach(r=>{Er(r,t,n)});else if(qc(e)){for(const r in e)Er(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Er(e[r],t,n)}return e}var S={};const Gr=[];function Ki(e){Gr.push(e)}function Xi(){Gr.pop()}let Al=!1;function J(e,...t){if(Al)return;Al=!0,pn();const n=Gr.length?Gr[Gr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Ub();if(r)Ao(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 <${ba(n,s.type)}>`).join(`
|
|
7
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Zn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ze=Uc.NODE_ENV!=="production"?Object.freeze({}):{},To=Uc.NODE_ENV!=="production"?Object.freeze([]):[],pt=()=>{},Z0=()=>!1,Es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vi=e=>e.startsWith("onUpdate:"),it=Object.assign,bl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Y0=Object.prototype.hasOwnProperty,Ue=(e,t)=>Y0.call(e,t),ge=Array.isArray,qr=e=>Ri(e)==="[object Map]",Bc=e=>Ri(e)==="[object Set]",Ee=e=>typeof e=="function",et=e=>typeof e=="string",Yn=e=>typeof e=="symbol",qe=e=>e!==null&&typeof e=="object",gl=e=>(qe(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),Hc=Object.prototype.toString,Ri=e=>Hc.call(e),vl=e=>Ri(e).slice(8,-1),qc=e=>Ri(e)==="[object Object]",yl=e=>et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=Zn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G0=Zn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Li=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},K0=/-(\w)/g,It=Li(e=>e.replace(K0,(t,n)=>n?n.toUpperCase():"")),X0=/\B([A-Z])/g,vr=Li(e=>e.replace(X0,"-$1").toLowerCase()),zr=Li(e=>e.charAt(0).toUpperCase()+e.slice(1)),Wr=Li(e=>e?`on${zr(e)}`:""),yr=(e,t)=>!Object.is(e,t),ks=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ji=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},J0=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Q0=e=>{const t=et(e)?Number(e):NaN;return isNaN(t)?e:t};let zc;const Os=()=>zc||(zc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Fi(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=et(r)?rb(r):Fi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(et(e)||qe(e))return e}const eb=/;(?![^(]*\))/g,tb=/:([^]+)/,nb=/\/\*[^]*?\*\//g;function rb(e){const t={};return e.replace(nb,"").split(eb).forEach(n=>{if(n){const r=n.split(tb);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ss(e){let t="";if(et(e))t=e;else if(ge(e))for(let n=0;n<e.length;n++){const r=Ss(e[n]);r&&(t+=r+" ")}else if(qe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ob="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",sb="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",ib="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",ab=Zn(ob),lb=Zn(sb),ub=Zn(ib),cb=Zn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Wc(e){return!!e||e===""}const Zc=e=>!!(e&&e.__v_isRef===!0),j=e=>et(e)?e:e==null?"":ge(e)||qe(e)&&(e.toString===Hc||!Ee(e.toString))?Zc(e)?j(e.value):JSON.stringify(e,Yc,2):String(e),Yc=(e,t)=>Zc(t)?Yc(e,t.value):qr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[_l(r,s)+" =>"]=o,n),{})}:Bc(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>_l(n))}:Yn(t)?_l(t):qe(t)&&!ge(t)&&!qc(t)?String(t):t,_l=(e,t="")=>{var n;return Yn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var Ye={};function nn(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ot;class Gc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ot,!t&&Ot&&(this.index=(Ot.scopes||(Ot.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=Ot;try{return Ot=this,t()}finally{Ot=n}}else Ye.NODE_ENV!=="production"&&nn("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=Ot,Ot=this)}off(){this._on>0&&--this._on===0&&(Ot=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=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}}}function Kc(e){return new Gc(e)}function Xc(){return Ot}function db(e,t=!1){Ot?Ot.cleanups.push(e):Ye.NODE_ENV!=="production"&&!t&&nn("onScopeDispose() is called when there is no active effect scope to be associated with.")}let We;const wl=new WeakSet;class Jc{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ot&&Ot.active&&Ot.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,wl.has(this)&&(wl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ed(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sd(this),td(this);const t=We,n=hn;We=this,hn=!0;try{return this.fn()}finally{Ye.NODE_ENV!=="production"&&We!==this&&nn("Active effect was not restored correctly - this is likely a Vue internal bug."),nd(this),We=t,hn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ol(t);this.deps=this.depsTail=void 0,sd(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?wl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){kl(this)&&this.run()}get dirty(){return kl(this)}}let Qc=0,Ns,Cs;function ed(e,t=!1){if(e.flags|=8,t){e.next=Cs,Cs=e;return}e.next=Ns,Ns=e}function El(){Qc++}function xl(){if(--Qc>0)return;if(Cs){let t=Cs;for(Cs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ns;){let t=Ns;for(Ns=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function td(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function nd(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Ol(r),fb(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function kl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function rd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!kl(e))))return;e.flags|=2;const t=e.dep,n=We,r=hn;We=e,hn=!0;try{td(e);const o=e.fn(e._value);(t.version===0||yr(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{We=n,hn=r,nd(e),e.flags&=-3}}function Ol(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),Ye.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=o),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Ol(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fb(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let hn=!0;const od=[];function pn(){od.push(hn),hn=!1}function mn(){const e=od.pop();hn=e===void 0?!0:e}function sd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=We;We=void 0;try{t()}finally{We=n}}}let Ts=0;class hb{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Sl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,Ye.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!We||!hn||We===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==We)n=this.activeLink=new hb(We,this),We.deps?(n.prevDep=We.depsTail,We.depsTail.nextDep=n,We.depsTail=n):We.deps=We.depsTail=n,id(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=We.depsTail,n.nextDep=void 0,We.depsTail.nextDep=n,We.depsTail=n,We.deps===n&&(We.deps=r)}return Ye.NODE_ENV!=="production"&&We.onTrack&&We.onTrack(it({effect:We},t)),n}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){El();try{if(Ye.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(it({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{xl()}}}function id(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)id(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),Ye.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Ui=new WeakMap,Zr=Symbol(Ye.NODE_ENV!=="production"?"Object iterate":""),Nl=Symbol(Ye.NODE_ENV!=="production"?"Map keys iterate":""),Ps=Symbol(Ye.NODE_ENV!=="production"?"Array iterate":"");function mt(e,t,n){if(hn&&We){let r=Ui.get(e);r||Ui.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Sl),o.map=r,o.key=n),Ye.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function Pn(e,t,n,r,o,s){const i=Ui.get(e);if(!i){Ts++;return}const a=l=>{l&&(Ye.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger())};if(El(),t==="clear")i.forEach(a);else{const l=ge(e),u=l&&yl(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Ps||!Yn(f)&&f>=c)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),u&&a(i.get(Ps)),t){case"add":l?u&&a(i.get("length")):(a(i.get(Zr)),qr(e)&&a(i.get(Nl)));break;case"delete":l||(a(i.get(Zr)),qr(e)&&a(i.get(Nl)));break;case"set":qr(e)&&a(i.get(Zr));break}}xl()}function pb(e,t){const n=Ui.get(e);return n&&n.get(t)}function Po(e){const t=Se(e);return t===e?t:(mt(t,"iterate",Ps),Mt(e)?t:t.map(yt))}function Bi(e){return mt(e=Se(e),"iterate",Ps),e}const mb={__proto__:null,[Symbol.iterator](){return Cl(this,Symbol.iterator,yt)},concat(...e){return Po(this).concat(...e.map(t=>ge(t)?Po(t):t))},entries(){return Cl(this,"entries",e=>(e[1]=yt(e[1]),e))},every(e,t){return Gn(this,"every",e,t,void 0,arguments)},filter(e,t){return Gn(this,"filter",e,t,n=>n.map(yt),arguments)},find(e,t){return Gn(this,"find",e,t,yt,arguments)},findIndex(e,t){return Gn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gn(this,"findLast",e,t,yt,arguments)},findLastIndex(e,t){return Gn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tl(this,"includes",e)},indexOf(...e){return Tl(this,"indexOf",e)},join(e){return Po(this).join(e)},lastIndexOf(...e){return Tl(this,"lastIndexOf",e)},map(e,t){return Gn(this,"map",e,t,void 0,arguments)},pop(){return $s(this,"pop")},push(...e){return $s(this,"push",e)},reduce(e,...t){return ad(this,"reduce",e,t)},reduceRight(e,...t){return ad(this,"reduceRight",e,t)},shift(){return $s(this,"shift")},some(e,t){return Gn(this,"some",e,t,void 0,arguments)},splice(...e){return $s(this,"splice",e)},toReversed(){return Po(this).toReversed()},toSorted(e){return Po(this).toSorted(e)},toSpliced(...e){return Po(this).toSpliced(...e)},unshift(...e){return $s(this,"unshift",e)},values(){return Cl(this,"values",yt)}};function Cl(e,t,n){const r=Bi(e),o=r[t]();return r!==e&&!Mt(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const bb=Array.prototype;function Gn(e,t,n,r,o,s){const i=Bi(e),a=i!==e&&!Mt(e),l=i[t];if(l!==bb[t]){const d=l.apply(e,s);return a?yt(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,yt(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 ad(e,t,n,r){const o=Bi(e);let s=n;return o!==e&&(Mt(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,yt(a),l,e)}),o[t](s,...r)}function Tl(e,t,n){const r=Se(e);mt(r,"iterate",Ps);const o=r[t](...n);return(o===-1||o===!1)&&$o(n[0])?(n[0]=Se(n[0]),r[t](...n)):o}function $s(e,t,n=[]){pn(),El();const r=Se(e)[t].apply(e,n);return xl(),mn(),r}const gb=Zn("__proto__,__v_isRef,__isVue"),ld=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Yn));function vb(e){Yn(e)||(e=String(e));const t=Se(this);return mt(t,"has",e),t.hasOwnProperty(e)}class ud{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;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?bd:md:s?pd:hd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ge(t);if(!o){let l;if(i&&(l=mb[n]))return l;if(n==="hasOwnProperty")return vb}const a=Reflect.get(t,n,Xe(t)?t:r);return(Yn(n)?ld.has(n):gb(n))||(o||mt(t,"get",n),s)?a:Xe(a)?i&&yl(n)?a:a.value:qe(a)?o?gd(a):As(a):a}}class cd extends ud{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=An(s);if(!Mt(r)&&!An(r)&&(s=Se(s),r=Se(r)),!ge(t)&&Xe(s)&&!Xe(r))return l?!1:(s.value=r,!0)}const i=ge(t)&&yl(n)?Number(n)<t.length:Ue(t,n),a=Reflect.set(t,n,r,Xe(t)?t:o);return t===Se(o)&&(i?yr(r,s)&&Pn(t,"set",n,r,s):Pn(t,"add",n,r)),a}deleteProperty(t,n){const r=Ue(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Pn(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!Yn(n)||!ld.has(n))&&mt(t,"has",n),r}ownKeys(t){return mt(t,"iterate",ge(t)?"length":Zr),Reflect.ownKeys(t)}}class dd extends ud{constructor(t=!1){super(!0,t)}set(t,n){return Ye.NODE_ENV!=="production"&&nn(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return Ye.NODE_ENV!=="production"&&nn(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const yb=new cd,_b=new dd,wb=new cd(!0),Eb=new dd(!0),Pl=e=>e,Hi=e=>Reflect.getPrototypeOf(e);function xb(e,t,n){return function(...r){const o=this.__v_raw,s=Se(o),i=qr(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?Pl:t?Zi:yt;return!t&&mt(s,"iterate",l?Nl:Zr),{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 qi(e){return function(...t){if(Ye.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";nn(`${zr(e)} operation ${n}failed: target is readonly.`,Se(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function kb(e,t){const n={get(o){const s=this.__v_raw,i=Se(s),a=Se(o);e||(yr(o,a)&&mt(i,"get",o),mt(i,"get",a));const{has:l}=Hi(i),u=t?Pl:e?Zi:yt;if(l.call(i,o))return u(s.get(o));if(l.call(i,a))return u(s.get(a));s!==i&&s.get(o)},get size(){const o=this.__v_raw;return!e&&mt(Se(o),"iterate",Zr),Reflect.get(o,"size",o)},has(o){const s=this.__v_raw,i=Se(s),a=Se(o);return e||(yr(o,a)&&mt(i,"has",o),mt(i,"has",a)),o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){const i=this,a=i.__v_raw,l=Se(a),u=t?Pl:e?Zi:yt;return!e&&mt(l,"iterate",Zr),a.forEach((c,d)=>o.call(s,u(c),u(d),i))}};return it(n,e?{add:qi("add"),set:qi("set"),delete:qi("delete"),clear:qi("clear")}:{add(o){!t&&!Mt(o)&&!An(o)&&(o=Se(o));const s=Se(this);return Hi(s).has.call(s,o)||(s.add(o),Pn(s,"add",o,o)),this},set(o,s){!t&&!Mt(s)&&!An(s)&&(s=Se(s));const i=Se(this),{has:a,get:l}=Hi(i);let u=a.call(i,o);u?Ye.NODE_ENV!=="production"&&fd(i,a,o):(o=Se(o),u=a.call(i,o));const c=l.call(i,o);return i.set(o,s),u?yr(s,c)&&Pn(i,"set",o,s,c):Pn(i,"add",o,s),this},delete(o){const s=Se(this),{has:i,get:a}=Hi(s);let l=i.call(s,o);l?Ye.NODE_ENV!=="production"&&fd(s,i,o):(o=Se(o),l=i.call(s,o));const u=a?a.call(s,o):void 0,c=s.delete(o);return l&&Pn(s,"delete",o,void 0,u),c},clear(){const o=Se(this),s=o.size!==0,i=Ye.NODE_ENV!=="production"?qr(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&Pn(o,"clear",void 0,void 0,i),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=xb(o,e,t)}),n}function zi(e,t){const n=kb(e,t);return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ue(n,o)&&o in r?n:r,o,s)}const Ob={get:zi(!1,!1)},Sb={get:zi(!1,!0)},Nb={get:zi(!0,!1)},Cb={get:zi(!0,!0)};function fd(e,t,n){const r=Se(n);if(r!==n&&t.call(e,r)){const o=vl(e);nn(`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 hd=new WeakMap,pd=new WeakMap,md=new WeakMap,bd=new WeakMap;function Tb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Pb(e){return e.__v_skip||!Object.isExtensible(e)?0:Tb(vl(e))}function As(e){return An(e)?e:Wi(e,!1,yb,Ob,hd)}function $b(e){return Wi(e,!1,wb,Sb,pd)}function gd(e){return Wi(e,!0,_b,Nb,md)}function $n(e){return Wi(e,!0,Eb,Cb,bd)}function Wi(e,t,n,r,o){if(!qe(e))return Ye.NODE_ENV!=="production"&&nn(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=Pb(e);if(s===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,s===2?r:n);return o.set(e,a),a}function bn(e){return An(e)?bn(e.__v_raw):!!(e&&e.__v_isReactive)}function An(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function $o(e){return e?!!e.__v_raw:!1}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function _r(e){return!Ue(e,"__v_skip")&&Object.isExtensible(e)&&ji(e,"__v_skip",!0),e}const yt=e=>qe(e)?As(e):e,Zi=e=>qe(e)?gd(e):e;function Xe(e){return e?e.__v_isRef===!0:!1}function V(e){return vd(e,!1)}function Ab(e){return vd(e,!0)}function vd(e,t){return Xe(e)?e:new Db(e,t)}class Db{constructor(t,n){this.dep=new Sl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Se(t),this._value=n?t:yt(t),this.__v_isShallow=n}get value(){return Ye.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||Mt(t)||An(t);t=r?t:Se(t),yr(t,n)&&(this._rawValue=t,this._value=r?t:yt(t),Ye.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function b(e){return Xe(e)?e.value:e}function wr(e){return Ee(e)?e():b(e)}const Ib={get:(e,t,n)=>t==="__v_raw"?e:b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Xe(o)&&!Xe(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function yd(e){return bn(e)?e:new Proxy(e,Ib)}function _d(e){Ye.NODE_ENV!=="production"&&!$o(e)&&nn("toRefs() expects a reactive object but received a plain one.");const t=ge(e)?new Array(e.length):{};for(const n in e)t[n]=wd(e,n);return t}class Mb{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 pb(Se(this._object),this._key)}}class Vb{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 $l(e,t,n){return Xe(e)?e:Ee(e)?new Vb(e):qe(e)&&arguments.length>1?wd(e,t,n):V(e)}function wd(e,t,n){const r=e[t];return Xe(r)?r:new Mb(e,t,n)}class Rb{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Sl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&We!==this)return ed(this,!0),!0}get value(){const t=Ye.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return rd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):Ye.NODE_ENV!=="production"&&nn("Write operation failed: computed value is readonly")}}function Lb(e,t,n=!1){let r,o;return Ee(e)?r=e:(r=e.get,o=e.set),new Rb(r,o,n)}const Yi={},Gi=new WeakMap;let Yr;function jb(e,t=!1,n=Yr){if(n){let r=Gi.get(n);r||Gi.set(n,r=[]),r.push(e)}else Ye.NODE_ENV!=="production"&&!t&&nn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Fb(e,t,n=Ze){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=L=>{(n.onWarn||nn)("Invalid watch source: ",L,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=L=>o?L:Mt(L)||o===!1||o===0?Er(L,1):Er(L);let d,f,h,p,_=!1,E=!1;if(Xe(e)?(f=()=>e.value,_=Mt(e)):bn(e)?(f=()=>c(e),_=!0):ge(e)?(E=!0,_=e.some(L=>bn(L)||Mt(L)),f=()=>e.map(L=>{if(Xe(L))return L.value;if(bn(L))return c(L);if(Ee(L))return l?l(L,2):L();Ye.NODE_ENV!=="production"&&u(L)})):Ee(e)?t?f=l?()=>l(e,2):e:f=()=>{if(h){pn();try{h()}finally{mn()}}const L=Yr;Yr=d;try{return l?l(e,3,[p]):e(p)}finally{Yr=L}}:(f=pt,Ye.NODE_ENV!=="production"&&u(e)),t&&o){const L=f,D=o===!0?1/0:o;f=()=>Er(L(),D)}const N=Xc(),q=()=>{d.stop(),N&&N.active&&bl(N.effects,d)};if(s&&t){const L=t;t=(...D)=>{L(...D),q()}}let z=E?new Array(e.length).fill(Yi):Yi;const B=L=>{if(!(!(d.flags&1)||!d.dirty&&!L))if(t){const D=d.run();if(o||_||(E?D.some((m,P)=>yr(m,z[P])):yr(D,z))){h&&h();const m=Yr;Yr=d;try{const P=[D,z===Yi?void 0:E&&z[0]===Yi?[]:z,p];l?l(t,3,P):t(...P),z=D}finally{Yr=m}}}else d.run()};return a&&a(B),d=new Jc(f),d.scheduler=i?()=>i(B,!1):B,p=L=>jb(L,!1,d),h=d.onStop=()=>{const L=Gi.get(d);if(L){if(l)l(L,4);else for(const D of L)D();Gi.delete(d)}},Ye.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?B(!0):z=d.run():i?i(B.bind(null,!0),!0):d.run(),q.pause=d.pause.bind(d),q.resume=d.resume.bind(d),q.stop=q,q}function Er(e,t=1/0,n){if(t<=0||!qe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Xe(e))Er(e.value,t,n);else if(ge(e))for(let r=0;r<e.length;r++)Er(e[r],t,n);else if(Bc(e)||qr(e))e.forEach(r=>{Er(r,t,n)});else if(qc(e)){for(const r in e)Er(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Er(e[r],t,n)}return e}var S={};const Gr=[];function Ki(e){Gr.push(e)}function Xi(){Gr.pop()}let Al=!1;function J(e,...t){if(Al)return;Al=!0,pn();const n=Gr.length?Gr[Gr.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Ub();if(r)Ao(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 <${ba(n,s.type)}>`).join(`
|
|
8
8
|
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
|
|
9
9
|
`,...Bb(o)),console.warn(...s)}mn(),Al=!1}function Ub(){let e=Gr[Gr.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 Bb(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
10
|
-
`],...Hb(n))}),t}function Hb({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${ba(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...qb(e.props),s]:[o+s]}function qb(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Ed(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Ed(e,t,n){return Qe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Xe(t)?(t=Ed(e,Se(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Ee(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Se(t),n?t:[`${e}=`,t])}function zb(e,t){S.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?J(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&J(`${t} is NaN - the duration expression might be incorrect.`))}const Dl={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 Ao(e,t,n,r){try{return r?e(...r):e()}catch(o){Ds(o,t,n)}}function gn(e,t,n,r){if(Ee(e)){const o=Ao(e,t,n,r);return o&&gl(o)&&o.catch(s=>{Ds(s,t,n)}),o}if(ge(e)){const o=[];for(let s=0;s<e.length;s++)o.push(gn(e[s],t,n,r));return o}else S.NODE_ENV!=="production"&&J(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function Ds(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ze;if(t){let a=t.parent;const l=t.proxy,u=S.NODE_ENV!=="production"?Dl[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){pn(),Ao(s,null,10,[e,l,u]),mn();return}}Wb(e,n,o,r,i)}function Wb(e,t,n,r=!0,o=!1){if(S.NODE_ENV!=="production"){const s=Dl[t];if(n&&Ki(n),J(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Xi(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}const Vt=[];let Dn=-1;const Do=[];let xr=null,Io=0;const xd=Promise.resolve();let Ji=null;const Zb=100;function Qi(e){const t=Ji||xd;return e?t.then(this?e.bind(this):e):t}function Yb(e){let t=Dn+1,n=Vt.length;for(;t<n;){const r=t+n>>>1,o=Vt[r],s=Is(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function ea(e){if(!(e.flags&1)){const t=Is(e),n=Vt[Vt.length-1];!n||!(e.flags&2)&&t>=Is(n)?Vt.push(e):Vt.splice(Yb(t),0,e),e.flags|=1,kd()}}function kd(){Ji||(Ji=xd.then(Cd))}function Od(e){ge(e)?Do.push(...e):xr&&e.id===-1?xr.splice(Io+1,0,e):e.flags&1||(Do.push(e),e.flags|=1),kd()}function Sd(e,t,n=Dn+1){for(S.NODE_ENV!=="production"&&(t=t||new Map);n<Vt.length;n++){const r=Vt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||S.NODE_ENV!=="production"&&Il(t,r))continue;Vt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Nd(e){if(Do.length){const t=[...new Set(Do)].sort((n,r)=>Is(n)-Is(r));if(Do.length=0,xr){xr.push(...t);return}for(xr=t,S.NODE_ENV!=="production"&&(e=e||new Map),Io=0;Io<xr.length;Io++){const n=xr[Io];S.NODE_ENV!=="production"&&Il(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}xr=null,Io=0}}const Is=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Cd(e){S.NODE_ENV!=="production"&&(e=e||new Map);const t=S.NODE_ENV!=="production"?n=>Il(e,n):pt;try{for(Dn=0;Dn<Vt.length;Dn++){const n=Vt[Dn];if(n&&!(n.flags&8)){if(S.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ao(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Dn<Vt.length;Dn++){const n=Vt[Dn];n&&(n.flags&=-2)}Dn=-1,Vt.length=0,Nd(e),Ji=null,(Vt.length||Do.length)&&Cd(e)}}function Il(e,t){const n=e.get(t)||0;if(n>Zb){const r=t.i,o=r&&au(r.type);return Ds(`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}return e.set(t,n+1),!1}let vn=!1;const ta=new Map;S.NODE_ENV!=="production"&&(Os().__VUE_HMR_RUNTIME__={createRecord:Ml(Td),rerender:Ml(Xb),reload:Ml(Jb)});const Kr=new Map;function Gb(e){const t=e.type.__hmrId;let n=Kr.get(t);n||(Td(t,e.type),n=Kr.get(t)),n.instances.add(e)}function Kb(e){Kr.get(e.type.__hmrId).instances.delete(e)}function Td(e,t){return Kr.has(e)?!1:(Kr.set(e,{initialDef:na(t),instances:new Set}),!0)}function na(e){return Uf(e)?e.__vccOpts:e}function Xb(e,t){const n=Kr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,na(r.type).render=t),r.renderCache=[],vn=!0,r.update(),vn=!1}))}function Jb(e,t){const n=Kr.get(e);if(!n)return;t=na(t),Pd(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=na(s.type);let a=ta.get(i);a||(i!==n.initialDef&&Pd(i,t),ta.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?ea(()=>{vn=!0,s.parent.update(),vn=!1,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)}Od(()=>{ta.clear()})}function Pd(e,t){it(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Ml(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 In,Ms=[],Vl=!1;function Vs(e,...t){In?In.emit(e,...t):Vl||Ms.push({event:e,args:t})}function $d(e,t){var n,r;In=e,In?(In.enabled=!0,Ms.forEach(({event:o,args:s})=>In.emit(o,...s)),Ms=[]):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=>{$d(s,t)}),setTimeout(()=>{In||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Vl=!0,Ms=[])},3e3)):(Vl=!0,Ms=[])}function Qb(e,t){Vs("app:init",e,t,{Fragment:$e,Text:Bs,Comment:at,Static:Hs})}function eg(e){Vs("app:unmount",e)}const tg=Rl("component:added"),Ad=Rl("component:updated"),ng=Rl("component:removed"),rg=e=>{In&&typeof In.cleanupBuffer=="function"&&!In.cleanupBuffer(e)&&ng(e)};/*! #__NO_SIDE_EFFECTS__ */function Rl(e){return t=>{Vs(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const og=Dd("perf:start"),sg=Dd("perf:end");function Dd(e){return(t,n,r)=>{Vs(e,t.appContext.app,t.uid,t,n,r)}}function ig(e,t,n){Vs("component:emit",e.appContext.app,e,t,n)}let ut=null,Id=null;function ra(e){const t=ut;return ut=e,Id=e&&e.type.__scopeId||null,t}function O(e,t=ut,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Pf(-1);const s=ra(t);let i;try{i=e(...o)}finally{ra(s),r._d&&Pf(1)}return S.NODE_ENV!=="production"&&Ad(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function Md(e){G0(e)&&J("Do not use built-in directive ids as custom directive id: "+e)}function Xr(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&&(pn(),gn(l,n,8,[e.el,a,e,t]),mn())}}const Vd=Symbol("_vte"),Rd=e=>e.__isTeleport,Jr=e=>e&&(e.disabled||e.disabled===""),Ld=e=>e&&(e.defer||e.defer===""),jd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Fd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ll=(e,t)=>{const n=e&&e.to;if(Qe(n))if(t){const r=t(n);return S.NODE_ENV!=="production"&&!r&&!Jr(e)&&J(`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 S.NODE_ENV!=="production"&&J("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return S.NODE_ENV!=="production"&&!n&&!Jr(e)&&J(`Invalid Teleport target: ${n}`),n},Ud={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:_,createComment:E}}=u,N=Jr(t.props);let{shapeFlag:q,children:z,dynamicChildren:B}=t;if(S.NODE_ENV!=="production"&&vn&&(l=!1,B=null),e==null){const L=t.el=S.NODE_ENV!=="production"?E("teleport start"):_(""),D=t.anchor=S.NODE_ENV!=="production"?E("teleport end"):_("");h(L,n,r),h(D,n,r);const m=(I,T)=>{q&16&&(o&&o.isCE&&(o.ce._teleportTarget=I),c(z,I,T,o,s,i,a,l))},P=()=>{const I=t.target=Ll(t.props,p),T=Bd(I,t,_,h);I?(i!=="svg"&&jd(I)?i="svg":i!=="mathml"&&Fd(I)&&(i="mathml"),N||(m(I,T),sa(t,!1))):S.NODE_ENV!=="production"&&!N&&J("Invalid Teleport target on mount:",I,`(${typeof I})`)};N&&(m(n,D),sa(t,!0)),Ld(t.props)?jt(()=>{P(),t.el.__isMounted=!0},s):P()}else{if(Ld(t.props)&&!e.el.__isMounted){jt(()=>{Ud.process(e,t,n,r,o,s,i,a,l,u),delete e.el.__isMounted},s);return}t.el=e.el,t.targetStart=e.targetStart;const L=t.anchor=e.anchor,D=t.target=e.target,m=t.targetAnchor=e.targetAnchor,P=Jr(e.props),I=P?n:D,T=P?L:m;if(i==="svg"||jd(D)?i="svg":(i==="mathml"||Fd(D))&&(i="mathml"),B?(f(e.dynamicChildren,B,I,o,s,i,a),Us(e,t,S.NODE_ENV==="production")):l||d(e,t,I,T,o,s,i,a,!1),N)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):oa(t,n,L,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=Ll(t.props,p);$?oa(t,$,null,u,0):S.NODE_ENV!=="production"&&J("Invalid Teleport target on update:",D,`(${typeof D})`)}else P&&oa(t,D,m,u,1);sa(t,N)}},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 h=s||!Jr(f);for(let p=0;p<a.length;p++){const _=a[p];r(_,t,n,h,!!_.dynamicChildren)}}},move:oa,hydrate:ag};function oa(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||Jr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ag(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=Ll(t.props,l);if(f){const h=Jr(t.props),p=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=p,t.targetAnchor=p&&i(p);else{t.anchor=i(e);let _=p;for(;_;){if(_&&_.nodeType===8){if(_.data==="teleport start anchor")t.targetStart=_;else if(_.data==="teleport anchor"){t.targetAnchor=_,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}_=i(_)}t.targetAnchor||Bd(f,t,c,u),d(p&&i(p),t,f,n,r,o,s)}sa(t,h)}return t.anchor&&i(t.anchor)}const lg=Ud;function sa(e,t){const n=e.ctx;if(n&&n.ut){let r,o;for(t?(r=e.el,o=e.anchor):(r=e.targetStart,o=e.targetAnchor);r&&r!==o;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Bd(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Vd]=s,e&&(r(o,e),r(s,e)),s}const kr=Symbol("_leaveCb"),ia=Symbol("_enterCb");function ug(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return He(()=>{e.isMounted=!0}),Ul(()=>{e.isUnmounting=!0}),e}const rn=[Function,Array],Hd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rn,onEnter:rn,onAfterEnter:rn,onEnterCancelled:rn,onBeforeLeave:rn,onLeave:rn,onAfterLeave:rn,onLeaveCancelled:rn,onBeforeAppear:rn,onAppear:rn,onAfterAppear:rn,onAppearCancelled:rn},qd=e=>{const t=e.subTree;return t.component?qd(t.component):t},cg={name:"BaseTransition",props:Hd,setup(e,{slots:t}){const n=pa(),r=ug();return()=>{const o=t.default&&Yd(t.default(),!0);if(!o||!o.length)return;const s=zd(o),i=Se(e),{mode:a}=i;if(S.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&J(`invalid <transition> mode: ${a}`),r.isLeaving)return Fl(s);const l=Zd(s);if(!l)return Fl(s);let u=jl(l,i,r,n,d=>u=d);l.type!==at&&Rs(l,u);let c=n.subTree&&Zd(n.subTree);if(c&&c.type!==at&&!ro(l,c)&&qd(n).type!==at){let d=jl(c,i,r,n);if(Rs(c,d),a==="out-in"&&l.type!==at)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Fl(s);a==="in-out"&&l.type!==at?d.delayLeave=(f,h,p)=>{const _=Wd(r,c);_[String(c.key)]=c,f[kr]=()=>{h(),f[kr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{p(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function zd(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==at){if(S.NODE_ENV!=="production"&&n){J("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,S.NODE_ENV==="production")break}}return t}const dg=cg;function Wd(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 jl(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:E,onAppear:N,onAfterAppear:q,onAppearCancelled:z}=t,B=String(e.key),L=Wd(n,e),D=(I,T)=>{I&&gn(I,r,9,T)},m=(I,T)=>{const $=T[1];D(I,T),ge(I)?I.every(A=>A.length<=1)&&$():I.length<=1&&$()},P={mode:i,persisted:a,beforeEnter(I){let T=l;if(!n.isMounted)if(s)T=E||l;else return;I[kr]&&I[kr](!0);const $=L[B];$&&ro(e,$)&&$.el[kr]&&$.el[kr](),D(T,[I])},enter(I){let T=u,$=c,A=d;if(!n.isMounted)if(s)T=N||u,$=q||c,A=z||d;else return;let oe=!1;const ke=I[ia]=k=>{oe||(oe=!0,k?D(A,[I]):D($,[I]),P.delayedLeave&&P.delayedLeave(),I[ia]=void 0)};T?m(T,[I,ke]):ke()},leave(I,T){const $=String(e.key);if(I[ia]&&I[ia](!0),n.isUnmounting)return T();D(f,[I]);let A=!1;const oe=I[kr]=ke=>{A||(A=!0,T(),ke?D(_,[I]):D(p,[I]),I[kr]=void 0,L[$]===e&&delete L[$])};L[$]=e,h?m(h,[I,oe]):oe()},clone(I){const T=jl(I,t,n,r,o);return o&&o(T),T}};return P}function Fl(e){if(Ls(e))return e=yn(e),e.children=null,e}function Zd(e){if(!Ls(e))return Rd(e.type)&&e.children?zd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ee(n.default))return n.default()}}function Rs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rs(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 Yd(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===$e?(i.patchFlag&128&&o++,r=r.concat(Yd(i.children,t,a))):(t||i.type!==at)&&r.push(a!=null?yn(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 pe(e,t){return Ee(e)?it({name:e.name},t,{setup:e}):e}function Gd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const fg=new WeakSet;function aa(e,t,n,r,o=!1){if(ge(e)){e.forEach((p,_)=>aa(p,t&&(ge(t)?t[_]:t),n,r,o));return}if(Mo(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&aa(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?iu(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(S.NODE_ENV!=="production"&&!a){J("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===Ze?a.refs={}:a.refs,d=a.setupState,f=Se(d),h=d===Ze?()=>!1:p=>S.NODE_ENV!=="production"&&(Ue(f,p)&&!Xe(f[p])&&J(`Template ref "${p}" used on a non-ref value. It will not work in the production build.`),fg.has(f[p]))?!1:Ue(f,p);if(u!=null&&u!==l&&(Qe(u)?(c[u]=null,h(u)&&(d[u]=null)):Xe(u)&&(u.value=null)),Ee(l))Ao(l,a,12,[i,c]);else{const p=Qe(l),_=Xe(l);if(p||_){const E=()=>{if(e.f){const N=p?h(l)?d[l]:c[l]:l.value;o?ge(N)&&bl(N,s):ge(N)?N.includes(s)||N.push(s):p?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else p?(c[l]=i,h(l)&&(d[l]=i)):_?(l.value=i,e.k&&(c[e.k]=i)):S.NODE_ENV!=="production"&&J("Invalid template ref type:",l,`(${typeof l})`)};i?(E.id=-1,jt(E,n)):E()}else S.NODE_ENV!=="production"&&J("Invalid template ref type:",l,`(${typeof l})`)}}Os().requestIdleCallback,Os().cancelIdleCallback;const Mo=e=>!!e.type.__asyncLoader,Ls=e=>e.type.__isKeepAlive;function hg(e,t){Kd(e,"a",t)}function pg(e,t){Kd(e,"da",t)}function Kd(e,t,n=ct){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(la(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Ls(o.parent.vnode)&&mg(r,t,n,o),o=o.parent}}function mg(e,t,n,r){const o=la(t,e,r,!0);Rt(()=>{bl(r[t],o)},n)}function la(e,t,n=ct,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{pn();const a=Ws(n),l=gn(t,n,e,i);return a(),mn(),l});return r?o.unshift(s):o.push(s),s}else if(S.NODE_ENV!=="production"){const o=Wr(Dl[e].replace(/ hook$/,""));J(`${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 Kn=e=>(t,n=ct)=>{(!Zs||e==="sp")&&la(e,(...r)=>t(...r),n)},bg=Kn("bm"),He=Kn("m"),gg=Kn("bu"),vg=Kn("u"),Ul=Kn("bum"),Rt=Kn("um"),yg=Kn("sp"),_g=Kn("rtg"),wg=Kn("rtc");function Eg(e,t=ct){la("ec",e,t)}const xg="components",Xd=Symbol.for("v-ndc");function Bl(e){return Qe(e)?kg(xg,e,!1)||e:e||Xd}function kg(e,t,n=!0,r=!1){const o=ut||ct;if(o){const s=o.type;{const a=au(s,!1);if(a&&(a===t||a===It(t)||a===zr(It(t))))return s}const i=Jd(o[e]||s[e],t)||Jd(o.appContext[e],t);return!i&&r?s:(S.NODE_ENV!=="production"&&n&&!i&&J(`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 S.NODE_ENV!=="production"&&J(`resolve${zr(e.slice(0,-1))} can only be used in render() or setup().`)}function Jd(e,t){return e&&(e[t]||e[It(t)]||e[zr(It(t))])}function _t(e,t,n,r){let o;const s=n,i=ge(e);if(i||Qe(e)){const a=i&&bn(e);let l=!1,u=!1;a&&(l=!Mt(e),u=An(e),e=Bi(e)),o=new Array(e.length);for(let c=0,d=e.length;c<d;c++)o[c]=t(l?u?Zi(yt(e[c])):yt(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){S.NODE_ENV!=="production"&&!Number.isInteger(e)&&J(`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(qe(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 Qd(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(ge(r))for(let o=0;o<r.length;o++)e[r[o].name]=r[o].fn;else r&&(e[r.name]=r.key?(...o)=>{const s=r.fn(...o);return s&&(s.key=r.key),s}:r.fn)}return e}function St(e,t,n={},r,o){if(ut.ce||ut.parent&&Mo(ut.parent)&&ut.parent.ce)return t!=="default"&&(n.name=t),g(),Y($e,null,[w("slot",n,r)],64);let s=e[t];S.NODE_ENV!=="production"&&s&&s.length>1&&(J("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),g();const i=s&&ef(s(n)),a=n.key||i&&i.key,l=Y($e,{key:(a&&!Yn(a)?a:`_${t}`)+""},i||[],i&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function ef(e){return e.some(t=>no(t)?!(t.type===at||t.type===$e&&!ef(t.children)):!0)?e:null}const Hl=e=>e?Rf(e)?iu(e):Hl(e.parent):null,Qr=it(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>S.NODE_ENV!=="production"?$n(e.props):e.props,$attrs:e=>S.NODE_ENV!=="production"?$n(e.attrs):e.attrs,$slots:e=>S.NODE_ENV!=="production"?$n(e.slots):e.slots,$refs:e=>S.NODE_ENV!=="production"?$n(e.refs):e.refs,$parent:e=>Hl(e.parent),$root:e=>Hl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>sf(e),$forceUpdate:e=>e.f||(e.f=()=>{ea(e.update)}),$nextTick:e=>e.n||(e.n=Qi.bind(e.proxy)),$watch:e=>rv.bind(e)}),ql=e=>e==="_"||e==="$",zl=(e,t)=>e!==Ze&&!e.__isScriptSetup&&Ue(e,t),tf={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(S.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(zl(r,t))return i[t]=1,r[t];if(o!==Ze&&Ue(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&Ue(u,t))return i[t]=3,s[t];if(n!==Ze&&Ue(n,t))return i[t]=4,n[t];Wl&&(i[t]=0)}}const c=Qr[t];let d,f;if(c)return t==="$attrs"?(mt(e.attrs,"get",""),S.NODE_ENV!=="production"&&fa()):S.NODE_ENV!=="production"&&t==="$slots"&&mt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Ze&&Ue(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Ue(f,t))return f[t];S.NODE_ENV!=="production"&&ut&&(!Qe(t)||t.indexOf("__v")!==0)&&(o!==Ze&&ql(t[0])&&Ue(o,t)?J(`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===ut&&J(`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 zl(o,t)?(o[t]=n,!0):S.NODE_ENV!=="production"&&o.__isScriptSetup&&Ue(o,t)?(J(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ze&&Ue(r,t)?(r[t]=n,!0):Ue(e.props,t)?(S.NODE_ENV!=="production"&&J(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(S.NODE_ENV!=="production"&&J(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(S.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!==Ze&&Ue(e,i)||zl(t,i)||(a=s[0])&&Ue(a,i)||Ue(r,i)||Ue(Qr,i)||Ue(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ue(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};S.NODE_ENV!=="production"&&(tf.ownKeys=e=>(J("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 Og(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Qr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Qr[n](e),set:pt})}),t}function Sg(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:pt})})}function Ng(e){const{ctx:t,setupState:n}=e;Object.keys(Se(n)).forEach(r=>{if(!n.__isScriptSetup){if(ql(r[0])){J(`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:pt})}})}function nf(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Cg(){const e=Object.create(null);return(t,n)=>{e[n]?J(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Wl=!0;function Tg(e){const t=sf(e),n=e.proxy,r=e.ctx;Wl=!1,t.beforeCreate&&rf(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:_,deactivated:E,beforeDestroy:N,beforeUnmount:q,destroyed:z,unmounted:B,render:L,renderTracked:D,renderTriggered:m,errorCaptured:P,serverPrefetch:I,expose:T,inheritAttrs:$,components:A,directives:oe,filters:ke}=t,k=S.NODE_ENV!=="production"?Cg():null;if(S.NODE_ENV!=="production"){const[R]=e.propsOptions;if(R)for(const te in R)k("Props",te)}if(u&&Pg(u,r,k),i)for(const R in i){const te=i[R];Ee(te)?(S.NODE_ENV!=="production"?Object.defineProperty(r,R,{value:te.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[R]=te.bind(n),S.NODE_ENV!=="production"&&k("Methods",R)):S.NODE_ENV!=="production"&&J(`Method "${R}" has type "${typeof te}" in the component definition. Did you reference the function correctly?`)}if(o){S.NODE_ENV!=="production"&&!Ee(o)&&J("The data option must be a function. Plain object usage is no longer supported.");const R=o.call(n,n);if(S.NODE_ENV!=="production"&&gl(R)&&J("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!qe(R))S.NODE_ENV!=="production"&&J("data() should return an object.");else if(e.data=As(R),S.NODE_ENV!=="production")for(const te in R)k("Data",te),ql(te[0])||Object.defineProperty(r,te,{configurable:!0,enumerable:!0,get:()=>R[te],set:pt})}if(Wl=!0,s)for(const R in s){const te=s[R],me=Ee(te)?te.bind(n,n):Ee(te.get)?te.get.bind(n,n):pt;S.NODE_ENV!=="production"&&me===pt&&J(`Computed property "${R}" has no getter.`);const le=!Ee(te)&&Ee(te.set)?te.set.bind(n):S.NODE_ENV!=="production"?()=>{J(`Write operation failed: computed property "${R}" is readonly.`)}:pt,he=se({get:me,set:le});Object.defineProperty(r,R,{enumerable:!0,configurable:!0,get:()=>he.value,set:_e=>he.value=_e}),S.NODE_ENV!=="production"&&k("Computed",R)}if(a)for(const R in a)of(a[R],r,n,R);if(l){const R=Ee(l)?l.call(n):l;Reflect.ownKeys(R).forEach(te=>{Bt(te,R[te])})}c&&rf(c,e,"c");function U(R,te){ge(te)?te.forEach(me=>R(me.bind(n))):te&&R(te.bind(n))}if(U(bg,d),U(He,f),U(gg,h),U(vg,p),U(hg,_),U(pg,E),U(Eg,P),U(wg,D),U(_g,m),U(Ul,q),U(Rt,B),U(yg,I),ge(T))if(T.length){const R=e.exposed||(e.exposed={});T.forEach(te=>{Object.defineProperty(R,te,{get:()=>n[te],set:me=>n[te]=me})})}else e.exposed||(e.exposed={});L&&e.render===pt&&(e.render=L),$!=null&&(e.inheritAttrs=$),A&&(e.components=A),oe&&(e.directives=oe),I&&Gd(e)}function Pg(e,t,n=pt){ge(e)&&(e=Zl(e));for(const r in e){const o=e[r];let s;qe(o)?"default"in o?s=ve(o.from||r,o.default,!0):s=ve(o.from||r):s=ve(o),Xe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,S.NODE_ENV!=="production"&&n("Inject",r)}}function rf(e,t,n){gn(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function of(e,t,n,r){let o=r.includes(".")?xf(n,r):()=>n[r];if(Qe(e)){const s=t[e];Ee(s)?et(o,s):S.NODE_ENV!=="production"&&J(`Invalid watch handler specified by key "${e}"`,s)}else if(Ee(e))et(o,e.bind(n));else if(qe(e))if(ge(e))e.forEach(s=>of(s,t,n,r));else{const s=Ee(e.handler)?e.handler.bind(n):t[e.handler];Ee(s)?et(o,s,e):S.NODE_ENV!=="production"&&J(`Invalid watch handler specified by key "${e.handler}"`,s)}else S.NODE_ENV!=="production"&&J(`Invalid watch option: "${r}"`,e)}function sf(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=>ua(l,u,i,!0)),ua(l,t,i)),qe(t)&&s.set(t,l),l}function ua(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&ua(e,s,n,!0),o&&o.forEach(i=>ua(e,i,n,!0));for(const i in t)if(r&&i==="expose")S.NODE_ENV!=="production"&&J('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=$g[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const $g={data:af,props:lf,emits:lf,methods:js,computed:js,beforeCreate:Lt,created:Lt,beforeMount:Lt,mounted:Lt,beforeUpdate:Lt,updated:Lt,beforeDestroy:Lt,beforeUnmount:Lt,destroyed:Lt,unmounted:Lt,activated:Lt,deactivated:Lt,errorCaptured:Lt,serverPrefetch:Lt,components:js,directives:js,watch:Dg,provide:af,inject:Ag};function af(e,t){return t?e?function(){return it(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function Ag(e,t){return js(Zl(e),Zl(t))}function Zl(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Lt(e,t){return e?[...new Set([].concat(e,t))]:t}function js(e,t){return e?it(Object.create(null),e,t):t}function lf(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:it(Object.create(null),nf(e),nf(t??{})):t}function Dg(e,t){if(!e)return t;if(!t)return e;const n=it(Object.create(null),e);for(const r in t)n[r]=Lt(e[r],t[r]);return n}function uf(){return{app:null,config:{isNativeTag:Z0,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 Ig=0;function Mg(e,t){return function(r,o=null){Ee(r)||(r=it({},r)),o!=null&&!qe(o)&&(S.NODE_ENV!=="production"&&J("root props passed to app.mount() must be an object."),o=null);const s=uf(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:Ig++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Bf,get config(){return s.config},set config(c){S.NODE_ENV!=="production"&&J("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?S.NODE_ENV!=="production"&&J("Plugin has already been applied to target app."):c&&Ee(c.install)?(i.add(c),c.install(u,...d)):Ee(c)?(i.add(c),c(u,...d)):S.NODE_ENV!=="production"&&J('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?S.NODE_ENV!=="production"&&J("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return S.NODE_ENV!=="production"&&su(c,s.config),d?(S.NODE_ENV!=="production"&&s.components[c]&&J(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return S.NODE_ENV!=="production"&&Md(c),d?(S.NODE_ENV!=="production"&&s.directives[c]&&J(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)S.NODE_ENV!=="production"&&J("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{S.NODE_ENV!=="production"&&c.__vue_app__&&J("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 h=u._ceVNode||w(r,o);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),S.NODE_ENV!=="production"&&(s.reload=()=>{const p=yn(h);p.el=null,e(p,c,f)}),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,S.NODE_ENV!=="production"&&(u._instance=h.component,Qb(u,Bf)),iu(h.component)}},onUnmount(c){S.NODE_ENV!=="production"&&typeof c!="function"&&J(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(gn(a,u._instance,16),e(null,u._container),S.NODE_ENV!=="production"&&(u._instance=null,eg(u)),delete u._container.__vue_app__):S.NODE_ENV!=="production"&&J("Cannot unmount an app that is not mounted.")},provide(c,d){return S.NODE_ENV!=="production"&&c in s.provides&&J(`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=eo;eo=u;try{return c()}finally{eo=d}}};return u}}let eo=null;function Bt(e,t){if(!ct)S.NODE_ENV!=="production"&&J("provide() can only be used inside setup().");else{let n=ct.provides;const r=ct.parent&&ct.parent.provides;r===n&&(n=ct.provides=Object.create(r)),n[e]=t}}function ve(e,t,n=!1){const r=ct||ut;if(r||eo){const o=eo?eo._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&&Ee(t)?t.call(r&&r.proxy):t;S.NODE_ENV!=="production"&&J(`injection "${String(e)}" not found.`)}else S.NODE_ENV!=="production"&&J("inject() can only be used inside setup() or functional components.")}function Vg(){return!!(ct||ut||eo)}const cf={},df=()=>Object.create(cf),ff=e=>Object.getPrototypeOf(e)===cf;function Rg(e,t,n,r=!1){const o={},s=df();e.propsDefaults=Object.create(null),hf(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);S.NODE_ENV!=="production"&&bf(t||{},o,e),n?e.props=r?o:$b(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Lg(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function jg(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=Se(o),[l]=e.propsOptions;let u=!1;if(!(S.NODE_ENV!=="production"&&Lg(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(da(e.emitsOptions,f))continue;const h=t[f];if(l)if(Ue(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const p=It(f);o[p]=Yl(l,a,p,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{hf(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!Ue(t,d)&&((c=vr(d))===d||!Ue(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Yl(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Ue(t,d))&&(delete s[d],u=!0)}u&&Pn(e.attrs,"set",""),S.NODE_ENV!=="production"&&bf(t||{},o,e)}function hf(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(xs(l))continue;const u=t[l];let c;o&&Ue(o,c=It(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:da(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=Se(n),u=a||Ze;for(let c=0;c<s.length;c++){const d=s[c];n[d]=Yl(o,l,d,u[d],e,!Ue(u,d))}}return i}function Yl(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ue(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&Ee(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Ws(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===vr(n))&&(r=!0))}return r}const Fg=new WeakMap;function pf(e,t,n=!1){const r=n?Fg:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!Ee(e)){const c=d=>{l=!0;const[f,h]=pf(d,t,!0);it(i,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return qe(e)&&r.set(e,To),To;if(ge(s))for(let c=0;c<s.length;c++){S.NODE_ENV!=="production"&&!Qe(s[c])&&J("props must be strings when using array syntax.",s[c]);const d=It(s[c]);mf(d)&&(i[d]=Ze)}else if(s){S.NODE_ENV!=="production"&&!qe(s)&&J("invalid props options",s);for(const c in s){const d=It(c);if(mf(d)){const f=s[c],h=i[d]=ge(f)||Ee(f)?{type:f}:it({},f),p=h.type;let _=!1,E=!0;if(ge(p))for(let N=0;N<p.length;++N){const q=p[N],z=Ee(q)&&q.name;if(z==="Boolean"){_=!0;break}else z==="String"&&(E=!1)}else _=Ee(p)&&p.name==="Boolean";h[0]=_,h[1]=E,(_||Ue(h,"default"))&&a.push(d)}}}const u=[i,a];return qe(e)&&r.set(e,u),u}function mf(e){return e[0]!=="$"&&!xs(e)?!0:(S.NODE_ENV!=="production"&&J(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Ug(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function bf(e,t,n){const r=Se(t),o=n.propsOptions[0],s=Object.keys(e).map(i=>It(i));for(const i in o){let a=o[i];a!=null&&Bg(i,r[i],a,S.NODE_ENV!=="production"?$n(r):r,!s.includes(i))}}function Bg(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){J('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ge(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:h,expectedType:p}=qg(t,c[f]);d.push(p||""),u=h}if(!u){J(zg(e,t,d));return}}a&&!a(t,r)&&J('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Hg=Zn("String,Number,Boolean,Function,Symbol,BigInt");function qg(e,t){let n;const r=Ug(t);if(r==="null")n=e===null;else if(Hg(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=qe(e):r==="Array"?n=ge(e):n=e instanceof t;return{valid:n,expectedType:r}}function zg(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(zr).join(" | ")}`;const o=n[0],s=vl(t),i=gf(t,o),a=gf(t,s);return n.length===1&&vf(o)&&!Wg(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,vf(s)&&(r+=`with value ${a}.`),r}function gf(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function vf(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Wg(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Gl=e=>e[0]==="_"||e==="$stable",Kl=e=>ge(e)?e.map(_n):[_n(e)],Zg=(e,t,n)=>{if(t._n)return t;const r=O((...o)=>(S.NODE_ENV!=="production"&&ct&&!(n===null&&ut)&&!(n&&n.root!==ct.root)&&J(`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.`),Kl(t(...o))),n);return r._c=!1,r},yf=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Gl(o))continue;const s=e[o];if(Ee(s))t[o]=Zg(o,s,r);else if(s!=null){S.NODE_ENV!=="production"&&J(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Kl(s);t[o]=()=>i}}},_f=(e,t)=>{S.NODE_ENV!=="production"&&!Ls(e.vnode)&&J("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Kl(t);e.slots.default=()=>n},Xl=(e,t,n)=>{for(const r in t)(n||!Gl(r))&&(e[r]=t[r])},Yg=(e,t,n)=>{const r=e.slots=df();if(e.vnode.shapeFlag&32){const o=t._;o?(Xl(r,t,n),n&&ji(r,"_",o,!0)):yf(t,r)}else t&&_f(e,t)},Gg=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Ze;if(r.shapeFlag&32){const a=t._;a?S.NODE_ENV!=="production"&&vn?(Xl(o,t,n),Pn(e,"set","$slots")):n&&a===1?s=!1:Xl(o,t,n):(s=!t.$stable,yf(t,o)),i=t}else t&&(_f(e,t),i={default:1});if(s)for(const a in o)!Gl(a)&&i[a]==null&&delete o[a]};let Fs,Or;function Vo(e,t){e.appContext.config.performance&&ca()&&Or.mark(`vue-${t}-${e.uid}`),S.NODE_ENV!=="production"&&og(e,t,ca()?Or.now():Date.now())}function Ro(e,t){if(e.appContext.config.performance&&ca()){const n=`vue-${t}-${e.uid}`,r=n+":end";Or.mark(r),Or.measure(`<${ba(e,e.type)}> ${t}`,n,r),Or.clearMarks(n),Or.clearMarks(r)}S.NODE_ENV!=="production"&&sg(e,t,ca()?Or.now():Date.now())}function ca(){return Fs!==void 0||(typeof window<"u"&&window.performance?(Fs=!0,Or=window.performance):Fs=!1),Fs}function Kg(){const e=[];if(S.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
|
+
`],...Hb(n))}),t}function Hb({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${ba(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...qb(e.props),s]:[o+s]}function qb(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Ed(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Ed(e,t,n){return et(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Xe(t)?(t=Ed(e,Se(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Ee(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Se(t),n?t:[`${e}=`,t])}function zb(e,t){S.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?J(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&J(`${t} is NaN - the duration expression might be incorrect.`))}const Dl={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 Ao(e,t,n,r){try{return r?e(...r):e()}catch(o){Ds(o,t,n)}}function gn(e,t,n,r){if(Ee(e)){const o=Ao(e,t,n,r);return o&&gl(o)&&o.catch(s=>{Ds(s,t,n)}),o}if(ge(e)){const o=[];for(let s=0;s<e.length;s++)o.push(gn(e[s],t,n,r));return o}else S.NODE_ENV!=="production"&&J(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function Ds(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ze;if(t){let a=t.parent;const l=t.proxy,u=S.NODE_ENV!=="production"?Dl[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){pn(),Ao(s,null,10,[e,l,u]),mn();return}}Wb(e,n,o,r,i)}function Wb(e,t,n,r=!0,o=!1){if(S.NODE_ENV!=="production"){const s=Dl[t];if(n&&Ki(n),J(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Xi(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}const Vt=[];let Dn=-1;const Do=[];let xr=null,Io=0;const xd=Promise.resolve();let Ji=null;const Zb=100;function Qi(e){const t=Ji||xd;return e?t.then(this?e.bind(this):e):t}function Yb(e){let t=Dn+1,n=Vt.length;for(;t<n;){const r=t+n>>>1,o=Vt[r],s=Is(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function ea(e){if(!(e.flags&1)){const t=Is(e),n=Vt[Vt.length-1];!n||!(e.flags&2)&&t>=Is(n)?Vt.push(e):Vt.splice(Yb(t),0,e),e.flags|=1,kd()}}function kd(){Ji||(Ji=xd.then(Cd))}function Od(e){ge(e)?Do.push(...e):xr&&e.id===-1?xr.splice(Io+1,0,e):e.flags&1||(Do.push(e),e.flags|=1),kd()}function Sd(e,t,n=Dn+1){for(S.NODE_ENV!=="production"&&(t=t||new Map);n<Vt.length;n++){const r=Vt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||S.NODE_ENV!=="production"&&Il(t,r))continue;Vt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Nd(e){if(Do.length){const t=[...new Set(Do)].sort((n,r)=>Is(n)-Is(r));if(Do.length=0,xr){xr.push(...t);return}for(xr=t,S.NODE_ENV!=="production"&&(e=e||new Map),Io=0;Io<xr.length;Io++){const n=xr[Io];S.NODE_ENV!=="production"&&Il(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}xr=null,Io=0}}const Is=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Cd(e){S.NODE_ENV!=="production"&&(e=e||new Map);const t=S.NODE_ENV!=="production"?n=>Il(e,n):pt;try{for(Dn=0;Dn<Vt.length;Dn++){const n=Vt[Dn];if(n&&!(n.flags&8)){if(S.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ao(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Dn<Vt.length;Dn++){const n=Vt[Dn];n&&(n.flags&=-2)}Dn=-1,Vt.length=0,Nd(e),Ji=null,(Vt.length||Do.length)&&Cd(e)}}function Il(e,t){const n=e.get(t)||0;if(n>Zb){const r=t.i,o=r&&au(r.type);return Ds(`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}return e.set(t,n+1),!1}let vn=!1;const ta=new Map;S.NODE_ENV!=="production"&&(Os().__VUE_HMR_RUNTIME__={createRecord:Ml(Td),rerender:Ml(Xb),reload:Ml(Jb)});const Kr=new Map;function Gb(e){const t=e.type.__hmrId;let n=Kr.get(t);n||(Td(t,e.type),n=Kr.get(t)),n.instances.add(e)}function Kb(e){Kr.get(e.type.__hmrId).instances.delete(e)}function Td(e,t){return Kr.has(e)?!1:(Kr.set(e,{initialDef:na(t),instances:new Set}),!0)}function na(e){return Uf(e)?e.__vccOpts:e}function Xb(e,t){const n=Kr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,na(r.type).render=t),r.renderCache=[],vn=!0,r.update(),vn=!1}))}function Jb(e,t){const n=Kr.get(e);if(!n)return;t=na(t),Pd(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=na(s.type);let a=ta.get(i);a||(i!==n.initialDef&&Pd(i,t),ta.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?ea(()=>{vn=!0,s.parent.update(),vn=!1,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)}Od(()=>{ta.clear()})}function Pd(e,t){it(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Ml(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 In,Ms=[],Vl=!1;function Vs(e,...t){In?In.emit(e,...t):Vl||Ms.push({event:e,args:t})}function $d(e,t){var n,r;In=e,In?(In.enabled=!0,Ms.forEach(({event:o,args:s})=>In.emit(o,...s)),Ms=[]):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=>{$d(s,t)}),setTimeout(()=>{In||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Vl=!0,Ms=[])},3e3)):(Vl=!0,Ms=[])}function Qb(e,t){Vs("app:init",e,t,{Fragment:$e,Text:Bs,Comment:at,Static:Hs})}function eg(e){Vs("app:unmount",e)}const tg=Rl("component:added"),Ad=Rl("component:updated"),ng=Rl("component:removed"),rg=e=>{In&&typeof In.cleanupBuffer=="function"&&!In.cleanupBuffer(e)&&ng(e)};/*! #__NO_SIDE_EFFECTS__ */function Rl(e){return t=>{Vs(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const og=Dd("perf:start"),sg=Dd("perf:end");function Dd(e){return(t,n,r)=>{Vs(e,t.appContext.app,t.uid,t,n,r)}}function ig(e,t,n){Vs("component:emit",e.appContext.app,e,t,n)}let ut=null,Id=null;function ra(e){const t=ut;return ut=e,Id=e&&e.type.__scopeId||null,t}function O(e,t=ut,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Pf(-1);const s=ra(t);let i;try{i=e(...o)}finally{ra(s),r._d&&Pf(1)}return S.NODE_ENV!=="production"&&Ad(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function Md(e){G0(e)&&J("Do not use built-in directive ids as custom directive id: "+e)}function Xr(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&&(pn(),gn(l,n,8,[e.el,a,e,t]),mn())}}const Vd=Symbol("_vte"),Rd=e=>e.__isTeleport,Jr=e=>e&&(e.disabled||e.disabled===""),Ld=e=>e&&(e.defer||e.defer===""),jd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Fd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ll=(e,t)=>{const n=e&&e.to;if(et(n))if(t){const r=t(n);return S.NODE_ENV!=="production"&&!r&&!Jr(e)&&J(`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 S.NODE_ENV!=="production"&&J("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return S.NODE_ENV!=="production"&&!n&&!Jr(e)&&J(`Invalid Teleport target: ${n}`),n},Ud={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:_,createComment:E}}=u,N=Jr(t.props);let{shapeFlag:q,children:z,dynamicChildren:B}=t;if(S.NODE_ENV!=="production"&&vn&&(l=!1,B=null),e==null){const L=t.el=S.NODE_ENV!=="production"?E("teleport start"):_(""),D=t.anchor=S.NODE_ENV!=="production"?E("teleport end"):_("");h(L,n,r),h(D,n,r);const m=(I,T)=>{q&16&&(o&&o.isCE&&(o.ce._teleportTarget=I),c(z,I,T,o,s,i,a,l))},P=()=>{const I=t.target=Ll(t.props,p),T=Bd(I,t,_,h);I?(i!=="svg"&&jd(I)?i="svg":i!=="mathml"&&Fd(I)&&(i="mathml"),N||(m(I,T),sa(t,!1))):S.NODE_ENV!=="production"&&!N&&J("Invalid Teleport target on mount:",I,`(${typeof I})`)};N&&(m(n,D),sa(t,!0)),Ld(t.props)?jt(()=>{P(),t.el.__isMounted=!0},s):P()}else{if(Ld(t.props)&&!e.el.__isMounted){jt(()=>{Ud.process(e,t,n,r,o,s,i,a,l,u),delete e.el.__isMounted},s);return}t.el=e.el,t.targetStart=e.targetStart;const L=t.anchor=e.anchor,D=t.target=e.target,m=t.targetAnchor=e.targetAnchor,P=Jr(e.props),I=P?n:D,T=P?L:m;if(i==="svg"||jd(D)?i="svg":(i==="mathml"||Fd(D))&&(i="mathml"),B?(f(e.dynamicChildren,B,I,o,s,i,a),Us(e,t,S.NODE_ENV==="production")):l||d(e,t,I,T,o,s,i,a,!1),N)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):oa(t,n,L,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=Ll(t.props,p);$?oa(t,$,null,u,0):S.NODE_ENV!=="production"&&J("Invalid Teleport target on update:",D,`(${typeof D})`)}else P&&oa(t,D,m,u,1);sa(t,N)}},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 h=s||!Jr(f);for(let p=0;p<a.length;p++){const _=a[p];r(_,t,n,h,!!_.dynamicChildren)}}},move:oa,hydrate:ag};function oa(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||Jr(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function ag(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=Ll(t.props,l);if(f){const h=Jr(t.props),p=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=p,t.targetAnchor=p&&i(p);else{t.anchor=i(e);let _=p;for(;_;){if(_&&_.nodeType===8){if(_.data==="teleport start anchor")t.targetStart=_;else if(_.data==="teleport anchor"){t.targetAnchor=_,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}_=i(_)}t.targetAnchor||Bd(f,t,c,u),d(p&&i(p),t,f,n,r,o,s)}sa(t,h)}return t.anchor&&i(t.anchor)}const lg=Ud;function sa(e,t){const n=e.ctx;if(n&&n.ut){let r,o;for(t?(r=e.el,o=e.anchor):(r=e.targetStart,o=e.targetAnchor);r&&r!==o;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function Bd(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Vd]=s,e&&(r(o,e),r(s,e)),s}const kr=Symbol("_leaveCb"),ia=Symbol("_enterCb");function ug(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return He(()=>{e.isMounted=!0}),Ul(()=>{e.isUnmounting=!0}),e}const rn=[Function,Array],Hd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:rn,onEnter:rn,onAfterEnter:rn,onEnterCancelled:rn,onBeforeLeave:rn,onLeave:rn,onAfterLeave:rn,onLeaveCancelled:rn,onBeforeAppear:rn,onAppear:rn,onAfterAppear:rn,onAppearCancelled:rn},qd=e=>{const t=e.subTree;return t.component?qd(t.component):t},cg={name:"BaseTransition",props:Hd,setup(e,{slots:t}){const n=pa(),r=ug();return()=>{const o=t.default&&Yd(t.default(),!0);if(!o||!o.length)return;const s=zd(o),i=Se(e),{mode:a}=i;if(S.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&J(`invalid <transition> mode: ${a}`),r.isLeaving)return Fl(s);const l=Zd(s);if(!l)return Fl(s);let u=jl(l,i,r,n,d=>u=d);l.type!==at&&Rs(l,u);let c=n.subTree&&Zd(n.subTree);if(c&&c.type!==at&&!ro(l,c)&&qd(n).type!==at){let d=jl(c,i,r,n);if(Rs(c,d),a==="out-in"&&l.type!==at)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Fl(s);a==="in-out"&&l.type!==at?d.delayLeave=(f,h,p)=>{const _=Wd(r,c);_[String(c.key)]=c,f[kr]=()=>{h(),f[kr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{p(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function zd(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==at){if(S.NODE_ENV!=="production"&&n){J("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,S.NODE_ENV==="production")break}}return t}const dg=cg;function Wd(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 jl(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:E,onAppear:N,onAfterAppear:q,onAppearCancelled:z}=t,B=String(e.key),L=Wd(n,e),D=(I,T)=>{I&&gn(I,r,9,T)},m=(I,T)=>{const $=T[1];D(I,T),ge(I)?I.every(A=>A.length<=1)&&$():I.length<=1&&$()},P={mode:i,persisted:a,beforeEnter(I){let T=l;if(!n.isMounted)if(s)T=E||l;else return;I[kr]&&I[kr](!0);const $=L[B];$&&ro(e,$)&&$.el[kr]&&$.el[kr](),D(T,[I])},enter(I){let T=u,$=c,A=d;if(!n.isMounted)if(s)T=N||u,$=q||c,A=z||d;else return;let oe=!1;const ke=I[ia]=k=>{oe||(oe=!0,k?D(A,[I]):D($,[I]),P.delayedLeave&&P.delayedLeave(),I[ia]=void 0)};T?m(T,[I,ke]):ke()},leave(I,T){const $=String(e.key);if(I[ia]&&I[ia](!0),n.isUnmounting)return T();D(f,[I]);let A=!1;const oe=I[kr]=ke=>{A||(A=!0,T(),ke?D(_,[I]):D(p,[I]),I[kr]=void 0,L[$]===e&&delete L[$])};L[$]=e,h?m(h,[I,oe]):oe()},clone(I){const T=jl(I,t,n,r,o);return o&&o(T),T}};return P}function Fl(e){if(Ls(e))return e=yn(e),e.children=null,e}function Zd(e){if(!Ls(e))return Rd(e.type)&&e.children?zd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ee(n.default))return n.default()}}function Rs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rs(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 Yd(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===$e?(i.patchFlag&128&&o++,r=r.concat(Yd(i.children,t,a))):(t||i.type!==at)&&r.push(a!=null?yn(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 pe(e,t){return Ee(e)?it({name:e.name},t,{setup:e}):e}function Gd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const fg=new WeakSet;function aa(e,t,n,r,o=!1){if(ge(e)){e.forEach((p,_)=>aa(p,t&&(ge(t)?t[_]:t),n,r,o));return}if(Mo(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&aa(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?iu(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(S.NODE_ENV!=="production"&&!a){J("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===Ze?a.refs={}:a.refs,d=a.setupState,f=Se(d),h=d===Ze?()=>!1:p=>S.NODE_ENV!=="production"&&(Ue(f,p)&&!Xe(f[p])&&J(`Template ref "${p}" used on a non-ref value. It will not work in the production build.`),fg.has(f[p]))?!1:Ue(f,p);if(u!=null&&u!==l&&(et(u)?(c[u]=null,h(u)&&(d[u]=null)):Xe(u)&&(u.value=null)),Ee(l))Ao(l,a,12,[i,c]);else{const p=et(l),_=Xe(l);if(p||_){const E=()=>{if(e.f){const N=p?h(l)?d[l]:c[l]:l.value;o?ge(N)&&bl(N,s):ge(N)?N.includes(s)||N.push(s):p?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else p?(c[l]=i,h(l)&&(d[l]=i)):_?(l.value=i,e.k&&(c[e.k]=i)):S.NODE_ENV!=="production"&&J("Invalid template ref type:",l,`(${typeof l})`)};i?(E.id=-1,jt(E,n)):E()}else S.NODE_ENV!=="production"&&J("Invalid template ref type:",l,`(${typeof l})`)}}Os().requestIdleCallback,Os().cancelIdleCallback;const Mo=e=>!!e.type.__asyncLoader,Ls=e=>e.type.__isKeepAlive;function hg(e,t){Kd(e,"a",t)}function pg(e,t){Kd(e,"da",t)}function Kd(e,t,n=ct){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(la(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Ls(o.parent.vnode)&&mg(r,t,n,o),o=o.parent}}function mg(e,t,n,r){const o=la(t,e,r,!0);Rt(()=>{bl(r[t],o)},n)}function la(e,t,n=ct,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{pn();const a=Ws(n),l=gn(t,n,e,i);return a(),mn(),l});return r?o.unshift(s):o.push(s),s}else if(S.NODE_ENV!=="production"){const o=Wr(Dl[e].replace(/ hook$/,""));J(`${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 Kn=e=>(t,n=ct)=>{(!Zs||e==="sp")&&la(e,(...r)=>t(...r),n)},bg=Kn("bm"),He=Kn("m"),gg=Kn("bu"),vg=Kn("u"),Ul=Kn("bum"),Rt=Kn("um"),yg=Kn("sp"),_g=Kn("rtg"),wg=Kn("rtc");function Eg(e,t=ct){la("ec",e,t)}const xg="components",Xd=Symbol.for("v-ndc");function Bl(e){return et(e)?kg(xg,e,!1)||e:e||Xd}function kg(e,t,n=!0,r=!1){const o=ut||ct;if(o){const s=o.type;{const a=au(s,!1);if(a&&(a===t||a===It(t)||a===zr(It(t))))return s}const i=Jd(o[e]||s[e],t)||Jd(o.appContext[e],t);return!i&&r?s:(S.NODE_ENV!=="production"&&n&&!i&&J(`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 S.NODE_ENV!=="production"&&J(`resolve${zr(e.slice(0,-1))} can only be used in render() or setup().`)}function Jd(e,t){return e&&(e[t]||e[It(t)]||e[zr(It(t))])}function _t(e,t,n,r){let o;const s=n,i=ge(e);if(i||et(e)){const a=i&&bn(e);let l=!1,u=!1;a&&(l=!Mt(e),u=An(e),e=Bi(e)),o=new Array(e.length);for(let c=0,d=e.length;c<d;c++)o[c]=t(l?u?Zi(yt(e[c])):yt(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){S.NODE_ENV!=="production"&&!Number.isInteger(e)&&J(`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(qe(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 Qd(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(ge(r))for(let o=0;o<r.length;o++)e[r[o].name]=r[o].fn;else r&&(e[r.name]=r.key?(...o)=>{const s=r.fn(...o);return s&&(s.key=r.key),s}:r.fn)}return e}function St(e,t,n={},r,o){if(ut.ce||ut.parent&&Mo(ut.parent)&&ut.parent.ce)return t!=="default"&&(n.name=t),g(),Y($e,null,[w("slot",n,r)],64);let s=e[t];S.NODE_ENV!=="production"&&s&&s.length>1&&(J("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),g();const i=s&&ef(s(n)),a=n.key||i&&i.key,l=Y($e,{key:(a&&!Yn(a)?a:`_${t}`)+""},i||[],i&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function ef(e){return e.some(t=>no(t)?!(t.type===at||t.type===$e&&!ef(t.children)):!0)?e:null}const Hl=e=>e?Rf(e)?iu(e):Hl(e.parent):null,Qr=it(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>S.NODE_ENV!=="production"?$n(e.props):e.props,$attrs:e=>S.NODE_ENV!=="production"?$n(e.attrs):e.attrs,$slots:e=>S.NODE_ENV!=="production"?$n(e.slots):e.slots,$refs:e=>S.NODE_ENV!=="production"?$n(e.refs):e.refs,$parent:e=>Hl(e.parent),$root:e=>Hl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>sf(e),$forceUpdate:e=>e.f||(e.f=()=>{ea(e.update)}),$nextTick:e=>e.n||(e.n=Qi.bind(e.proxy)),$watch:e=>rv.bind(e)}),ql=e=>e==="_"||e==="$",zl=(e,t)=>e!==Ze&&!e.__isScriptSetup&&Ue(e,t),tf={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(S.NODE_ENV!=="production"&&t==="__isVue")return!0;let u;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(zl(r,t))return i[t]=1,r[t];if(o!==Ze&&Ue(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&Ue(u,t))return i[t]=3,s[t];if(n!==Ze&&Ue(n,t))return i[t]=4,n[t];Wl&&(i[t]=0)}}const c=Qr[t];let d,f;if(c)return t==="$attrs"?(mt(e.attrs,"get",""),S.NODE_ENV!=="production"&&fa()):S.NODE_ENV!=="production"&&t==="$slots"&&mt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Ze&&Ue(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Ue(f,t))return f[t];S.NODE_ENV!=="production"&&ut&&(!et(t)||t.indexOf("__v")!==0)&&(o!==Ze&&ql(t[0])&&Ue(o,t)?J(`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===ut&&J(`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 zl(o,t)?(o[t]=n,!0):S.NODE_ENV!=="production"&&o.__isScriptSetup&&Ue(o,t)?(J(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Ze&&Ue(r,t)?(r[t]=n,!0):Ue(e.props,t)?(S.NODE_ENV!=="production"&&J(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(S.NODE_ENV!=="production"&&J(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(S.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!==Ze&&Ue(e,i)||zl(t,i)||(a=s[0])&&Ue(a,i)||Ue(r,i)||Ue(Qr,i)||Ue(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ue(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};S.NODE_ENV!=="production"&&(tf.ownKeys=e=>(J("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 Og(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Qr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Qr[n](e),set:pt})}),t}function Sg(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:pt})})}function Ng(e){const{ctx:t,setupState:n}=e;Object.keys(Se(n)).forEach(r=>{if(!n.__isScriptSetup){if(ql(r[0])){J(`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:pt})}})}function nf(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Cg(){const e=Object.create(null);return(t,n)=>{e[n]?J(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Wl=!0;function Tg(e){const t=sf(e),n=e.proxy,r=e.ctx;Wl=!1,t.beforeCreate&&rf(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:_,deactivated:E,beforeDestroy:N,beforeUnmount:q,destroyed:z,unmounted:B,render:L,renderTracked:D,renderTriggered:m,errorCaptured:P,serverPrefetch:I,expose:T,inheritAttrs:$,components:A,directives:oe,filters:ke}=t,k=S.NODE_ENV!=="production"?Cg():null;if(S.NODE_ENV!=="production"){const[R]=e.propsOptions;if(R)for(const te in R)k("Props",te)}if(u&&Pg(u,r,k),i)for(const R in i){const te=i[R];Ee(te)?(S.NODE_ENV!=="production"?Object.defineProperty(r,R,{value:te.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[R]=te.bind(n),S.NODE_ENV!=="production"&&k("Methods",R)):S.NODE_ENV!=="production"&&J(`Method "${R}" has type "${typeof te}" in the component definition. Did you reference the function correctly?`)}if(o){S.NODE_ENV!=="production"&&!Ee(o)&&J("The data option must be a function. Plain object usage is no longer supported.");const R=o.call(n,n);if(S.NODE_ENV!=="production"&&gl(R)&&J("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!qe(R))S.NODE_ENV!=="production"&&J("data() should return an object.");else if(e.data=As(R),S.NODE_ENV!=="production")for(const te in R)k("Data",te),ql(te[0])||Object.defineProperty(r,te,{configurable:!0,enumerable:!0,get:()=>R[te],set:pt})}if(Wl=!0,s)for(const R in s){const te=s[R],me=Ee(te)?te.bind(n,n):Ee(te.get)?te.get.bind(n,n):pt;S.NODE_ENV!=="production"&&me===pt&&J(`Computed property "${R}" has no getter.`);const le=!Ee(te)&&Ee(te.set)?te.set.bind(n):S.NODE_ENV!=="production"?()=>{J(`Write operation failed: computed property "${R}" is readonly.`)}:pt,he=se({get:me,set:le});Object.defineProperty(r,R,{enumerable:!0,configurable:!0,get:()=>he.value,set:_e=>he.value=_e}),S.NODE_ENV!=="production"&&k("Computed",R)}if(a)for(const R in a)of(a[R],r,n,R);if(l){const R=Ee(l)?l.call(n):l;Reflect.ownKeys(R).forEach(te=>{Bt(te,R[te])})}c&&rf(c,e,"c");function U(R,te){ge(te)?te.forEach(me=>R(me.bind(n))):te&&R(te.bind(n))}if(U(bg,d),U(He,f),U(gg,h),U(vg,p),U(hg,_),U(pg,E),U(Eg,P),U(wg,D),U(_g,m),U(Ul,q),U(Rt,B),U(yg,I),ge(T))if(T.length){const R=e.exposed||(e.exposed={});T.forEach(te=>{Object.defineProperty(R,te,{get:()=>n[te],set:me=>n[te]=me})})}else e.exposed||(e.exposed={});L&&e.render===pt&&(e.render=L),$!=null&&(e.inheritAttrs=$),A&&(e.components=A),oe&&(e.directives=oe),I&&Gd(e)}function Pg(e,t,n=pt){ge(e)&&(e=Zl(e));for(const r in e){const o=e[r];let s;qe(o)?"default"in o?s=ve(o.from||r,o.default,!0):s=ve(o.from||r):s=ve(o),Xe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,S.NODE_ENV!=="production"&&n("Inject",r)}}function rf(e,t,n){gn(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function of(e,t,n,r){let o=r.includes(".")?xf(n,r):()=>n[r];if(et(e)){const s=t[e];Ee(s)?Je(o,s):S.NODE_ENV!=="production"&&J(`Invalid watch handler specified by key "${e}"`,s)}else if(Ee(e))Je(o,e.bind(n));else if(qe(e))if(ge(e))e.forEach(s=>of(s,t,n,r));else{const s=Ee(e.handler)?e.handler.bind(n):t[e.handler];Ee(s)?Je(o,s,e):S.NODE_ENV!=="production"&&J(`Invalid watch handler specified by key "${e.handler}"`,s)}else S.NODE_ENV!=="production"&&J(`Invalid watch option: "${r}"`,e)}function sf(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=>ua(l,u,i,!0)),ua(l,t,i)),qe(t)&&s.set(t,l),l}function ua(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&ua(e,s,n,!0),o&&o.forEach(i=>ua(e,i,n,!0));for(const i in t)if(r&&i==="expose")S.NODE_ENV!=="production"&&J('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=$g[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const $g={data:af,props:lf,emits:lf,methods:js,computed:js,beforeCreate:Lt,created:Lt,beforeMount:Lt,mounted:Lt,beforeUpdate:Lt,updated:Lt,beforeDestroy:Lt,beforeUnmount:Lt,destroyed:Lt,unmounted:Lt,activated:Lt,deactivated:Lt,errorCaptured:Lt,serverPrefetch:Lt,components:js,directives:js,watch:Dg,provide:af,inject:Ag};function af(e,t){return t?e?function(){return it(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function Ag(e,t){return js(Zl(e),Zl(t))}function Zl(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Lt(e,t){return e?[...new Set([].concat(e,t))]:t}function js(e,t){return e?it(Object.create(null),e,t):t}function lf(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:it(Object.create(null),nf(e),nf(t??{})):t}function Dg(e,t){if(!e)return t;if(!t)return e;const n=it(Object.create(null),e);for(const r in t)n[r]=Lt(e[r],t[r]);return n}function uf(){return{app:null,config:{isNativeTag:Z0,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 Ig=0;function Mg(e,t){return function(r,o=null){Ee(r)||(r=it({},r)),o!=null&&!qe(o)&&(S.NODE_ENV!=="production"&&J("root props passed to app.mount() must be an object."),o=null);const s=uf(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:Ig++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Bf,get config(){return s.config},set config(c){S.NODE_ENV!=="production"&&J("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?S.NODE_ENV!=="production"&&J("Plugin has already been applied to target app."):c&&Ee(c.install)?(i.add(c),c.install(u,...d)):Ee(c)?(i.add(c),c(u,...d)):S.NODE_ENV!=="production"&&J('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?S.NODE_ENV!=="production"&&J("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return S.NODE_ENV!=="production"&&su(c,s.config),d?(S.NODE_ENV!=="production"&&s.components[c]&&J(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return S.NODE_ENV!=="production"&&Md(c),d?(S.NODE_ENV!=="production"&&s.directives[c]&&J(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)S.NODE_ENV!=="production"&&J("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{S.NODE_ENV!=="production"&&c.__vue_app__&&J("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 h=u._ceVNode||w(r,o);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),S.NODE_ENV!=="production"&&(s.reload=()=>{const p=yn(h);p.el=null,e(p,c,f)}),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,S.NODE_ENV!=="production"&&(u._instance=h.component,Qb(u,Bf)),iu(h.component)}},onUnmount(c){S.NODE_ENV!=="production"&&typeof c!="function"&&J(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(gn(a,u._instance,16),e(null,u._container),S.NODE_ENV!=="production"&&(u._instance=null,eg(u)),delete u._container.__vue_app__):S.NODE_ENV!=="production"&&J("Cannot unmount an app that is not mounted.")},provide(c,d){return S.NODE_ENV!=="production"&&c in s.provides&&J(`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=eo;eo=u;try{return c()}finally{eo=d}}};return u}}let eo=null;function Bt(e,t){if(!ct)S.NODE_ENV!=="production"&&J("provide() can only be used inside setup().");else{let n=ct.provides;const r=ct.parent&&ct.parent.provides;r===n&&(n=ct.provides=Object.create(r)),n[e]=t}}function ve(e,t,n=!1){const r=ct||ut;if(r||eo){const o=eo?eo._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&&Ee(t)?t.call(r&&r.proxy):t;S.NODE_ENV!=="production"&&J(`injection "${String(e)}" not found.`)}else S.NODE_ENV!=="production"&&J("inject() can only be used inside setup() or functional components.")}function Vg(){return!!(ct||ut||eo)}const cf={},df=()=>Object.create(cf),ff=e=>Object.getPrototypeOf(e)===cf;function Rg(e,t,n,r=!1){const o={},s=df();e.propsDefaults=Object.create(null),hf(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);S.NODE_ENV!=="production"&&bf(t||{},o,e),n?e.props=r?o:$b(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function Lg(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function jg(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=Se(o),[l]=e.propsOptions;let u=!1;if(!(S.NODE_ENV!=="production"&&Lg(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(da(e.emitsOptions,f))continue;const h=t[f];if(l)if(Ue(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const p=It(f);o[p]=Yl(l,a,p,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{hf(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!Ue(t,d)&&((c=vr(d))===d||!Ue(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=Yl(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Ue(t,d))&&(delete s[d],u=!0)}u&&Pn(e.attrs,"set",""),S.NODE_ENV!=="production"&&bf(t||{},o,e)}function hf(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(xs(l))continue;const u=t[l];let c;o&&Ue(o,c=It(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:da(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=Se(n),u=a||Ze;for(let c=0;c<s.length;c++){const d=s[c];n[d]=Yl(o,l,d,u[d],e,!Ue(u,d))}}return i}function Yl(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ue(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&Ee(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=Ws(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===vr(n))&&(r=!0))}return r}const Fg=new WeakMap;function pf(e,t,n=!1){const r=n?Fg:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!Ee(e)){const c=d=>{l=!0;const[f,h]=pf(d,t,!0);it(i,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return qe(e)&&r.set(e,To),To;if(ge(s))for(let c=0;c<s.length;c++){S.NODE_ENV!=="production"&&!et(s[c])&&J("props must be strings when using array syntax.",s[c]);const d=It(s[c]);mf(d)&&(i[d]=Ze)}else if(s){S.NODE_ENV!=="production"&&!qe(s)&&J("invalid props options",s);for(const c in s){const d=It(c);if(mf(d)){const f=s[c],h=i[d]=ge(f)||Ee(f)?{type:f}:it({},f),p=h.type;let _=!1,E=!0;if(ge(p))for(let N=0;N<p.length;++N){const q=p[N],z=Ee(q)&&q.name;if(z==="Boolean"){_=!0;break}else z==="String"&&(E=!1)}else _=Ee(p)&&p.name==="Boolean";h[0]=_,h[1]=E,(_||Ue(h,"default"))&&a.push(d)}}}const u=[i,a];return qe(e)&&r.set(e,u),u}function mf(e){return e[0]!=="$"&&!xs(e)?!0:(S.NODE_ENV!=="production"&&J(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Ug(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function bf(e,t,n){const r=Se(t),o=n.propsOptions[0],s=Object.keys(e).map(i=>It(i));for(const i in o){let a=o[i];a!=null&&Bg(i,r[i],a,S.NODE_ENV!=="production"?$n(r):r,!s.includes(i))}}function Bg(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){J('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let u=!1;const c=ge(s)?s:[s],d=[];for(let f=0;f<c.length&&!u;f++){const{valid:h,expectedType:p}=qg(t,c[f]);d.push(p||""),u=h}if(!u){J(zg(e,t,d));return}}a&&!a(t,r)&&J('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Hg=Zn("String,Number,Boolean,Function,Symbol,BigInt");function qg(e,t){let n;const r=Ug(t);if(r==="null")n=e===null;else if(Hg(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=qe(e):r==="Array"?n=ge(e):n=e instanceof t;return{valid:n,expectedType:r}}function zg(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(zr).join(" | ")}`;const o=n[0],s=vl(t),i=gf(t,o),a=gf(t,s);return n.length===1&&vf(o)&&!Wg(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,vf(s)&&(r+=`with value ${a}.`),r}function gf(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function vf(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Wg(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Gl=e=>e[0]==="_"||e==="$stable",Kl=e=>ge(e)?e.map(_n):[_n(e)],Zg=(e,t,n)=>{if(t._n)return t;const r=O((...o)=>(S.NODE_ENV!=="production"&&ct&&!(n===null&&ut)&&!(n&&n.root!==ct.root)&&J(`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.`),Kl(t(...o))),n);return r._c=!1,r},yf=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Gl(o))continue;const s=e[o];if(Ee(s))t[o]=Zg(o,s,r);else if(s!=null){S.NODE_ENV!=="production"&&J(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Kl(s);t[o]=()=>i}}},_f=(e,t)=>{S.NODE_ENV!=="production"&&!Ls(e.vnode)&&J("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Kl(t);e.slots.default=()=>n},Xl=(e,t,n)=>{for(const r in t)(n||!Gl(r))&&(e[r]=t[r])},Yg=(e,t,n)=>{const r=e.slots=df();if(e.vnode.shapeFlag&32){const o=t._;o?(Xl(r,t,n),n&&ji(r,"_",o,!0)):yf(t,r)}else t&&_f(e,t)},Gg=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Ze;if(r.shapeFlag&32){const a=t._;a?S.NODE_ENV!=="production"&&vn?(Xl(o,t,n),Pn(e,"set","$slots")):n&&a===1?s=!1:Xl(o,t,n):(s=!t.$stable,yf(t,o)),i=t}else t&&(_f(e,t),i={default:1});if(s)for(const a in o)!Gl(a)&&i[a]==null&&delete o[a]};let Fs,Or;function Vo(e,t){e.appContext.config.performance&&ca()&&Or.mark(`vue-${t}-${e.uid}`),S.NODE_ENV!=="production"&&og(e,t,ca()?Or.now():Date.now())}function Ro(e,t){if(e.appContext.config.performance&&ca()){const n=`vue-${t}-${e.uid}`,r=n+":end";Or.mark(r),Or.measure(`<${ba(e,e.type)}> ${t}`,n,r),Or.clearMarks(n),Or.clearMarks(r)}S.NODE_ENV!=="production"&&sg(e,t,ca()?Or.now():Date.now())}function ca(){return Fs!==void 0||(typeof window<"u"&&window.performance?(Fs=!0,Or=window.performance):Fs=!1),Fs}function Kg(){const e=[];if(S.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 jt=cv;function Xg(e){return Jg(e)}function Jg(e,t){Kg();const n=Os();n.__VUE__=!0,S.NODE_ENV!=="production"&&$d(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:h=pt,insertStaticContent:p}=e,_=(y,x,F,K=null,W=null,Z=null,ie=void 0,re=null,ne=S.NODE_ENV!=="production"&&vn?!1:!!x.dynamicChildren)=>{if(y===x)return;y&&!ro(y,x)&&(K=Xa(y),Be(y,W,Z,!0),y=null),x.patchFlag===-2&&(ne=!1,x.dynamicChildren=null);const{type:X,ref:we,shapeFlag:ae}=x;switch(X){case Bs:E(y,x,F,K);break;case at:N(y,x,F,K);break;case Hs:y==null?q(x,F,K,ie):S.NODE_ENV!=="production"&&z(y,x,F,ie);break;case $e:oe(y,x,F,K,W,Z,ie,re,ne);break;default:ae&1?D(y,x,F,K,W,Z,ie,re,ne):ae&6?ke(y,x,F,K,W,Z,ie,re,ne):ae&64||ae&128?X.process(y,x,F,K,W,Z,ie,re,ne,yi):S.NODE_ENV!=="production"&&J("Invalid VNode type:",X,`(${typeof X})`)}we!=null&&W&&aa(we,y&&y.ref,Z,x||y,!x)},E=(y,x,F,K)=>{if(y==null)r(x.el=a(x.children),F,K);else{const W=x.el=y.el;x.children!==y.children&&u(W,x.children)}},N=(y,x,F,K)=>{y==null?r(x.el=l(x.children||""),F,K):x.el=y.el},q=(y,x,F,K)=>{[y.el,y.anchor]=p(y.children,x,F,K,y.el,y.anchor)},z=(y,x,F,K)=>{if(x.children!==y.children){const W=f(y.anchor);L(y),[x.el,x.anchor]=p(x.children,F,W,K)}else x.el=y.el,x.anchor=y.anchor},B=({el:y,anchor:x},F,K)=>{let W;for(;y&&y!==x;)W=f(y),r(y,F,K),y=W;r(x,F,K)},L=({el:y,anchor:x})=>{let F;for(;y&&y!==x;)F=f(y),o(y),y=F;o(x)},D=(y,x,F,K,W,Z,ie,re,ne)=>{x.type==="svg"?ie="svg":x.type==="math"&&(ie="mathml"),y==null?m(x,F,K,W,Z,ie,re,ne):T(y,x,W,Z,ie,re,ne)},m=(y,x,F,K,W,Z,ie,re)=>{let ne,X;const{props:we,shapeFlag:ae,transition:ye,dirs:Ce}=y;if(ne=y.el=i(y.type,Z,we&&we.is,we),ae&8?c(ne,y.children):ae&16&&I(y.children,ne,null,K,W,Jl(y,Z),ie,re),Ce&&Xr(y,null,K,"created"),P(ne,y,y.scopeId,ie,K),we){for(const Je in we)Je!=="value"&&!xs(Je)&&s(ne,Je,null,we[Je],Z,K);"value"in we&&s(ne,"value",null,we.value,Z),(X=we.onVnodeBeforeMount)&&Mn(X,K,y)}S.NODE_ENV!=="production"&&(ji(ne,"__vnode",y,!0),ji(ne,"__vueParentComponent",K,!0)),Ce&&Xr(y,null,K,"beforeMount");const Fe=Qg(W,ye);Fe&&ye.beforeEnter(ne),r(ne,x,F),((X=we&&we.onVnodeMounted)||Fe||Ce)&&jt(()=>{X&&Mn(X,K,y),Fe&&ye.enter(ne),Ce&&Xr(y,null,K,"mounted")},W)},P=(y,x,F,K,W)=>{if(F&&h(y,F),K)for(let Z=0;Z<K.length;Z++)h(y,K[Z]);if(W){let Z=W.subTree;if(S.NODE_ENV!=="production"&&Z.patchFlag>0&&Z.patchFlag&2048&&(Z=tu(Z.children)||Z),x===Z||Tf(Z.type)&&(Z.ssContent===x||Z.ssFallback===x)){const ie=W.vnode;P(y,ie,ie.scopeId,ie.slotScopeIds,W.parent)}}},I=(y,x,F,K,W,Z,ie,re,ne=0)=>{for(let X=ne;X<y.length;X++){const we=y[X]=re?Sr(y[X]):_n(y[X]);_(null,we,x,F,K,W,Z,ie,re)}},T=(y,x,F,K,W,Z,ie)=>{const re=x.el=y.el;S.NODE_ENV!=="production"&&(re.__vnode=x);let{patchFlag:ne,dynamicChildren:X,dirs:we}=x;ne|=y.patchFlag&16;const ae=y.props||Ze,ye=x.props||Ze;let Ce;if(F&&to(F,!1),(Ce=ye.onVnodeBeforeUpdate)&&Mn(Ce,F,x,y),we&&Xr(x,y,F,"beforeUpdate"),F&&to(F,!0),S.NODE_ENV!=="production"&&vn&&(ne=0,ie=!1,X=null),(ae.innerHTML&&ye.innerHTML==null||ae.textContent&&ye.textContent==null)&&c(re,""),X?($(y.dynamicChildren,X,re,F,K,Jl(x,W),Z),S.NODE_ENV!=="production"&&Us(y,x)):ie||me(y,x,re,null,F,K,Jl(x,W),Z,!1),ne>0){if(ne&16)A(re,ae,ye,F,W);else if(ne&2&&ae.class!==ye.class&&s(re,"class",null,ye.class,W),ne&4&&s(re,"style",ae.style,ye.style,W),ne&8){const Fe=x.dynamicProps;for(let Je=0;Je<Fe.length;Je++){const Ke=Fe[Je],tn=ae[Ke],zt=ye[Ke];(zt!==tn||Ke==="value")&&s(re,Ke,tn,zt,W,F)}}ne&1&&y.children!==x.children&&c(re,x.children)}else!ie&&X==null&&A(re,ae,ye,F,W);((Ce=ye.onVnodeUpdated)||we)&&jt(()=>{Ce&&Mn(Ce,F,x,y),we&&Xr(x,y,F,"updated")},K)},$=(y,x,F,K,W,Z,ie)=>{for(let re=0;re<x.length;re++){const ne=y[re],X=x[re],we=ne.el&&(ne.type===$e||!ro(ne,X)||ne.shapeFlag&70)?d(ne.el):F;_(ne,X,we,null,K,W,Z,ie,!0)}},A=(y,x,F,K,W)=>{if(x!==F){if(x!==Ze)for(const Z in x)!xs(Z)&&!(Z in F)&&s(y,Z,x[Z],null,W,K);for(const Z in F){if(xs(Z))continue;const ie=F[Z],re=x[Z];ie!==re&&Z!=="value"&&s(y,Z,re,ie,W,K)}"value"in F&&s(y,"value",x.value,F.value,W)}},oe=(y,x,F,K,W,Z,ie,re,ne)=>{const X=x.el=y?y.el:a(""),we=x.anchor=y?y.anchor:a("");let{patchFlag:ae,dynamicChildren:ye,slotScopeIds:Ce}=x;S.NODE_ENV!=="production"&&(vn||ae&2048)&&(ae=0,ne=!1,ye=null),Ce&&(re=re?re.concat(Ce):Ce),y==null?(r(X,F,K),r(we,F,K),I(x.children||[],F,we,W,Z,ie,re,ne)):ae>0&&ae&64&&ye&&y.dynamicChildren?($(y.dynamicChildren,ye,F,W,Z,ie,re),S.NODE_ENV!=="production"?Us(y,x):(x.key!=null||W&&x===W.subTree)&&Us(y,x,!0)):me(y,x,F,we,W,Z,ie,re,ne)},ke=(y,x,F,K,W,Z,ie,re,ne)=>{x.slotScopeIds=re,y==null?x.shapeFlag&512?W.ctx.activate(x,F,K,ie,ne):k(x,F,K,W,Z,ie,ne):U(y,x,ne)},k=(y,x,F,K,W,Z,ie)=>{const re=y.component=bv(y,K,W);if(S.NODE_ENV!=="production"&&re.type.__hmrId&&Gb(re),S.NODE_ENV!=="production"&&(Ki(y),Vo(re,"mount")),Ls(y)&&(re.ctx.renderer=yi),S.NODE_ENV!=="production"&&Vo(re,"init"),vv(re,!1,ie),S.NODE_ENV!=="production"&&Ro(re,"init"),S.NODE_ENV!=="production"&&vn&&(y.el=null),re.asyncDep){if(W&&W.registerDep(re,R,ie),!y.el){const ne=re.subTree=w(at);N(null,ne,x,F)}}else R(re,y,x,F,W,Z,ie);S.NODE_ENV!=="production"&&(Xi(),Ro(re,"mount"))},U=(y,x,F)=>{const K=x.component=y.component;if(lv(y,x,F))if(K.asyncDep&&!K.asyncResolved){S.NODE_ENV!=="production"&&Ki(x),te(K,x,F),S.NODE_ENV!=="production"&&Xi();return}else K.next=x,K.update();else x.el=y.el,K.vnode=x},R=(y,x,F,K,W,Z,ie)=>{const re=()=>{if(y.isMounted){let{next:ae,bu:ye,u:Ce,parent:Fe,vnode:Je}=y;{const Un=wf(y);if(Un){ae&&(ae.el=Je.el,te(y,ae,ie)),Un.asyncDep.then(()=>{y.isUnmounted||re()});return}}let Ke=ae,tn;S.NODE_ENV!=="production"&&Ki(ae||y.vnode),to(y,!1),ae?(ae.el=Je.el,te(y,ae,ie)):ae=Je,ye&&ks(ye),(tn=ae.props&&ae.props.onVnodeBeforeUpdate)&&Mn(tn,Fe,ae,Je),to(y,!0),S.NODE_ENV!=="production"&&Vo(y,"render");const zt=Of(y);S.NODE_ENV!=="production"&&Ro(y,"render");const Fn=y.subTree;y.subTree=zt,S.NODE_ENV!=="production"&&Vo(y,"patch"),_(Fn,zt,d(Fn.el),Xa(Fn),y,W,Z),S.NODE_ENV!=="production"&&Ro(y,"patch"),ae.el=zt.el,Ke===null&&uv(y,zt.el),Ce&&jt(Ce,W),(tn=ae.props&&ae.props.onVnodeUpdated)&&jt(()=>Mn(tn,Fe,ae,Je),W),S.NODE_ENV!=="production"&&Ad(y),S.NODE_ENV!=="production"&&Xi()}else{let ae;const{el:ye,props:Ce}=x,{bm:Fe,m:Je,parent:Ke,root:tn,type:zt}=y,Fn=Mo(x);to(y,!1),Fe&&ks(Fe),!Fn&&(ae=Ce&&Ce.onVnodeBeforeMount)&&Mn(ae,Ke,x),to(y,!0);{tn.ce&&tn.ce._injectChildStyle(zt),S.NODE_ENV!=="production"&&Vo(y,"render");const Un=y.subTree=Of(y);S.NODE_ENV!=="production"&&Ro(y,"render"),S.NODE_ENV!=="production"&&Vo(y,"patch"),_(null,Un,F,K,y,W,Z),S.NODE_ENV!=="production"&&Ro(y,"patch"),x.el=Un.el}if(Je&&jt(Je,W),!Fn&&(ae=Ce&&Ce.onVnodeMounted)){const Un=x;jt(()=>Mn(ae,Ke,Un),W)}(x.shapeFlag&256||Ke&&Mo(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&y.a&&jt(y.a,W),y.isMounted=!0,S.NODE_ENV!=="production"&&tg(y),x=F=K=null}};y.scope.on();const ne=y.effect=new Jc(re);y.scope.off();const X=y.update=ne.run.bind(ne),we=y.job=ne.runIfDirty.bind(ne);we.i=y,we.id=y.uid,ne.scheduler=()=>ea(we),to(y,!0),S.NODE_ENV!=="production"&&(ne.onTrack=y.rtc?ae=>ks(y.rtc,ae):void 0,ne.onTrigger=y.rtg?ae=>ks(y.rtg,ae):void 0),X()},te=(y,x,F)=>{x.component=y;const K=y.vnode.props;y.vnode=x,y.next=null,jg(y,x.props,K,F),Gg(y,x.children,F),pn(),Sd(y),mn()},me=(y,x,F,K,W,Z,ie,re,ne=!1)=>{const X=y&&y.children,we=y?y.shapeFlag:0,ae=x.children,{patchFlag:ye,shapeFlag:Ce}=x;if(ye>0){if(ye&128){he(X,ae,F,K,W,Z,ie,re,ne);return}else if(ye&256){le(X,ae,F,K,W,Z,ie,re,ne);return}}Ce&8?(we&16&&vi(X,W,Z),ae!==X&&c(F,ae)):we&16?Ce&16?he(X,ae,F,K,W,Z,ie,re,ne):vi(X,W,Z,!0):(we&8&&c(F,""),Ce&16&&I(ae,F,K,W,Z,ie,re,ne))},le=(y,x,F,K,W,Z,ie,re,ne)=>{y=y||To,x=x||To;const X=y.length,we=x.length,ae=Math.min(X,we);let ye;for(ye=0;ye<ae;ye++){const Ce=x[ye]=ne?Sr(x[ye]):_n(x[ye]);_(y[ye],Ce,F,null,W,Z,ie,re,ne)}X>we?vi(y,W,Z,!0,!1,ae):I(x,F,K,W,Z,ie,re,ne,ae)},he=(y,x,F,K,W,Z,ie,re,ne)=>{let X=0;const we=x.length;let ae=y.length-1,ye=we-1;for(;X<=ae&&X<=ye;){const Ce=y[X],Fe=x[X]=ne?Sr(x[X]):_n(x[X]);if(ro(Ce,Fe))_(Ce,Fe,F,null,W,Z,ie,re,ne);else break;X++}for(;X<=ae&&X<=ye;){const Ce=y[ae],Fe=x[ye]=ne?Sr(x[ye]):_n(x[ye]);if(ro(Ce,Fe))_(Ce,Fe,F,null,W,Z,ie,re,ne);else break;ae--,ye--}if(X>ae){if(X<=ye){const Ce=ye+1,Fe=Ce<we?x[Ce].el:K;for(;X<=ye;)_(null,x[X]=ne?Sr(x[X]):_n(x[X]),F,Fe,W,Z,ie,re,ne),X++}}else if(X>ye)for(;X<=ae;)Be(y[X],W,Z,!0),X++;else{const Ce=X,Fe=X,Je=new Map;for(X=Fe;X<=ye;X++){const Ut=x[X]=ne?Sr(x[X]):_n(x[X]);Ut.key!=null&&(S.NODE_ENV!=="production"&&Je.has(Ut.key)&&J("Duplicate keys found during update:",JSON.stringify(Ut.key),"Make sure keys are unique."),Je.set(Ut.key,X))}let Ke,tn=0;const zt=ye-Fe+1;let Fn=!1,Un=0;const _i=new Array(zt);for(X=0;X<zt;X++)_i[X]=0;for(X=Ce;X<=ae;X++){const Ut=y[X];if(tn>=zt){Be(Ut,W,Z,!0);continue}let Bn;if(Ut.key!=null)Bn=Je.get(Ut.key);else for(Ke=Fe;Ke<=ye;Ke++)if(_i[Ke-Fe]===0&&ro(Ut,x[Ke])){Bn=Ke;break}Bn===void 0?Be(Ut,W,Z,!0):(_i[Bn-Fe]=X+1,Bn>=Un?Un=Bn:Fn=!0,_(Ut,x[Bn],F,null,W,Z,ie,re,ne),tn++)}const hm=Fn?ev(_i):To;for(Ke=hm.length-1,X=zt-1;X>=0;X--){const Ut=Fe+X,Bn=x[Ut],pm=Ut+1<we?x[Ut+1].el:K;_i[X]===0?_(null,Bn,F,pm,W,Z,ie,re,ne):Fn&&(Ke<0||X!==hm[Ke]?_e(Bn,F,pm,2):Ke--)}}},_e=(y,x,F,K,W=null)=>{const{el:Z,type:ie,transition:re,children:ne,shapeFlag:X}=y;if(X&6){_e(y.component.subTree,x,F,K);return}if(X&128){y.suspense.move(x,F,K);return}if(X&64){ie.move(y,x,F,yi);return}if(ie===$e){r(Z,x,F);for(let ae=0;ae<ne.length;ae++)_e(ne[ae],x,F,K);r(y.anchor,x,F);return}if(ie===Hs){B(y,x,F);return}if(K!==2&&X&1&&re)if(K===0)re.beforeEnter(Z),r(Z,x,F),jt(()=>re.enter(Z),W);else{const{leave:ae,delayLeave:ye,afterLeave:Ce}=re,Fe=()=>{y.ctx.isUnmounted?o(Z):r(Z,x,F)},Je=()=>{ae(Z,()=>{Fe(),Ce&&Ce()})};ye?ye(Z,Fe,Je):Je()}else r(Z,x,F)},Be=(y,x,F,K=!1,W=!1)=>{const{type:Z,props:ie,ref:re,children:ne,dynamicChildren:X,shapeFlag:we,patchFlag:ae,dirs:ye,cacheIndex:Ce}=y;if(ae===-2&&(W=!1),re!=null&&(pn(),aa(re,null,F,y,!0),mn()),Ce!=null&&(x.renderCache[Ce]=void 0),we&256){x.ctx.deactivate(y);return}const Fe=we&1&&ye,Je=!Mo(y);let Ke;if(Je&&(Ke=ie&&ie.onVnodeBeforeUnmount)&&Mn(Ke,x,y),we&6)$O(y.component,F,K);else{if(we&128){y.suspense.unmount(F,K);return}Fe&&Xr(y,null,x,"beforeUnmount"),we&64?y.type.remove(y,x,F,yi,K):X&&!X.hasOnce&&(Z!==$e||ae>0&&ae&64)?vi(X,x,F,!1,!0):(Z===$e&&ae&384||!W&&we&16)&&vi(ne,x,F),K&&ze(y)}(Je&&(Ke=ie&&ie.onVnodeUnmounted)||Fe)&&jt(()=>{Ke&&Mn(Ke,x,y),Fe&&Xr(y,null,x,"unmounted")},F)},ze=y=>{const{type:x,el:F,anchor:K,transition:W}=y;if(x===$e){S.NODE_ENV!=="production"&&y.patchFlag>0&&y.patchFlag&2048&&W&&!W.persisted?y.children.forEach(ie=>{ie.type===at?o(ie.el):ze(ie)}):At(F,K);return}if(x===Hs){L(y);return}const Z=()=>{o(F),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(y.shapeFlag&1&&W&&!W.persisted){const{leave:ie,delayLeave:re}=W,ne=()=>ie(F,Z);re?re(y.el,Z,ne):ne()}else Z()},At=(y,x)=>{let F;for(;y!==x;)F=f(y),o(y),y=F;o(x)},$O=(y,x,F)=>{S.NODE_ENV!=="production"&&y.type.__hmrId&&Kb(y);const{bum:K,scope:W,job:Z,subTree:ie,um:re,m:ne,a:X,parent:we,slots:{__:ae}}=y;Ef(ne),Ef(X),K&&ks(K),we&&ge(ae)&&ae.forEach(ye=>{we.renderCache[ye]=void 0}),W.stop(),Z&&(Z.flags|=8,Be(ie,y,x,F)),re&&jt(re,x),jt(()=>{y.isUnmounted=!0},x),x&&x.pendingBranch&&!x.isUnmounted&&y.asyncDep&&!y.asyncResolved&&y.suspenseId===x.pendingId&&(x.deps--,x.deps===0&&x.resolve()),S.NODE_ENV!=="production"&&rg(y)},vi=(y,x,F,K=!1,W=!1,Z=0)=>{for(let ie=Z;ie<y.length;ie++)Be(y[ie],x,F,K,W)},Xa=y=>{if(y.shapeFlag&6)return Xa(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const x=f(y.anchor||y.el),F=x&&x[Vd];return F?f(F):x};let ac=!1;const fm=(y,x,F)=>{y==null?x._vnode&&Be(x._vnode,null,null,!0):_(x._vnode||null,y,x,null,null,null,F),x._vnode=y,ac||(ac=!0,Sd(),Nd(),ac=!1)},yi={p:_,um:Be,m:_e,r:ze,mt:k,mc:I,pc:me,pbc:$,n:Xa,o:e};return{render:fm,hydrate:void 0,createApp:Mg(fm)}}function Jl({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 to({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Us(e,t,n=!1){const r=e.children,o=t.children;if(ge(r)&&ge(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]=Sr(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Us(i,a)),a.type===Bs&&(a.el=i.el),a.type===at&&!a.el&&(a.el=i.el),S.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function ev(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 wf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wf(t)}function Ef(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const tv=Symbol.for("v-scx"),nv=()=>{{const e=ve(tv);return e||S.NODE_ENV!=="production"&&J("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Zt(e,t){return Ql(e,null,t)}function et(e,t,n){return S.NODE_ENV!=="production"&&!Ee(t)&&J("`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."),Ql(e,t,n)}function Ql(e,t,n=Ze){const{immediate:r,deep:o,flush:s,once:i}=n;S.NODE_ENV!=="production"&&!t&&(r!==void 0&&J('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&J('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&J('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=it({},n);S.NODE_ENV!=="production"&&(a.onWarn=J);const l=t&&r||!t&&s!=="post";let u;if(Zs){if(s==="sync"){const h=nv();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=pt,h.resume=pt,h.pause=pt,h}}const c=ct;a.call=(h,p,_)=>gn(h,c,p,_);let d=!1;s==="post"?a.scheduler=h=>{jt(h,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,p)=>{p?h():ea(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=Fb(e,t,a);return Zs&&(u?u.push(f):l&&f()),f}function rv(e,t,n){const r=this.proxy,o=Qe(e)?e.includes(".")?xf(r,e):()=>r[e]:e.bind(r,r);let s;Ee(t)?s=t:(s=t.handler,n=t);const i=Ws(this),a=Ql(o,s.bind(r),n);return i(),a}function xf(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 ov=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${It(t)}Modifiers`]||e[`${vr(t)}Modifiers`];function sv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Ze;if(S.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Wr(It(t))in d))&&J(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Wr(It(t))}" prop.`);else{const f=c[t];Ee(f)&&(f(...n)||J(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&ov(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Qe(c)?c.trim():c)),i.number&&(o=n.map(J0))),S.NODE_ENV!=="production"&&ig(e,t,o),S.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Wr(c)]&&J(`Event "${c}" is emitted in component ${ba(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 "${vr(t)}" instead of "${t}".`)}let a,l=r[a=Wr(t)]||r[a=Wr(It(t))];!l&&s&&(l=r[a=Wr(vr(t))]),l&&gn(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,gn(u,e,6,o)}}function kf(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(!Ee(e)){const l=u=>{const c=kf(u,t,!0);c&&(a=!0,it(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(qe(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>i[l]=null):it(i,s),qe(e)&&r.set(e,i),i)}function da(e,t){return!e||!Es(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,vr(t))||Ue(e,t))}let eu=!1;function fa(){eu=!0}function Of(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:h,ctx:p,inheritAttrs:_}=e,E=ra(e);let N,q;S.NODE_ENV!=="production"&&(eu=!1);try{if(n.shapeFlag&4){const L=o||r,D=S.NODE_ENV!=="production"&&h.__isScriptSetup?new Proxy(L,{get(m,P,I){return J(`Property '${String(P)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(m,P,I)}}):L;N=_n(u.call(D,L,c,S.NODE_ENV!=="production"?$n(d):d,h,f,p)),q=a}else{const L=t;S.NODE_ENV!=="production"&&a===d&&fa(),N=_n(L.length>1?L(S.NODE_ENV!=="production"?$n(d):d,S.NODE_ENV!=="production"?{get attrs(){return fa(),$n(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):L(S.NODE_ENV!=="production"?$n(d):d,null)),q=t.props?a:iv(a)}}catch(L){qs.length=0,Ds(L,e,1),N=w(at)}let z=N,B;if(S.NODE_ENV!=="production"&&N.patchFlag>0&&N.patchFlag&2048&&([z,B]=Sf(N)),q&&_!==!1){const L=Object.keys(q),{shapeFlag:D}=z;if(L.length){if(D&7)s&&L.some(Vi)&&(q=av(q,s)),z=yn(z,q,!1,!0);else if(S.NODE_ENV!=="production"&&!eu&&z.type!==at){const m=Object.keys(a),P=[],I=[];for(let T=0,$=m.length;T<$;T++){const A=m[T];Es(A)?Vi(A)||P.push(A[2].toLowerCase()+A.slice(3)):I.push(A)}I.length&&J(`Extraneous non-props attributes (${I.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),P.length&&J(`Extraneous non-emits event listeners (${P.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&&(S.NODE_ENV!=="production"&&!Nf(z)&&J("Runtime directive used on component with non-element root node. The directives will not function as intended."),z=yn(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(n.dirs):n.dirs),n.transition&&(S.NODE_ENV!=="production"&&!Nf(z)&&J("Component inside <Transition> renders non-element root node that cannot be animated."),Rs(z,n.transition)),S.NODE_ENV!=="production"&&B?B(z):N=z,ra(E),N}const Sf=e=>{const t=e.children,n=e.dynamicChildren,r=tu(t,!1);if(r){if(S.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Sf(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[_n(r),i]};function tu(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(no(o)){if(o.type!==at||o.children==="v-if"){if(n)return;if(n=o,S.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return tu(n.children)}}else return}return n}const iv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Es(n))&&((t||(t={}))[n]=e[n]);return t},av=(e,t)=>{const n={};for(const r in e)(!Vi(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Nf=e=>e.shapeFlag&7||e.type===at;function lv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(S.NODE_ENV!=="production"&&(o||a)&&vn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Cf(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]&&!da(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Cf(r,i,u):!0:!!i;return!1}function Cf(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]&&!da(n,s))return!0}return!1}function uv({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 Tf=e=>e.__isSuspense;function cv(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):Od(e)}const $e=Symbol.for("v-fgt"),Bs=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Hs=Symbol.for("v-stc"),qs=[];let Yt=null;function g(e=!1){qs.push(Yt=e?null:[])}function dv(){qs.pop(),Yt=qs[qs.length-1]||null}let zs=1;function Pf(e,t=!1){zs+=e,e<0&&Yt&&t&&(Yt.hasOnce=!0)}function $f(e){return e.dynamicChildren=zs>0?Yt||To:null,dv(),zs>0&&Yt&&Yt.push(e),e}function C(e,t,n,r,o,s){return $f(H(e,t,n,r,o,s,!0))}function Y(e,t,n,r,o){return $f(w(e,t,n,r,o,!0))}function no(e){return e?e.__v_isVNode===!0:!1}function ro(e,t){if(S.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ta.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 fv=(...e)=>Df(...e),Af=({key:e})=>e??null,ha=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Qe(e)||Xe(e)||Ee(e)?{i:ut,r:e,k:t,f:!!n}:e:null);function H(e,t=null,n=null,r=0,o=null,s=e===$e?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Af(t),ref:t&&ha(t),scopeId:Id,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:ut};return a?(nu(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Qe(n)?8:16),S.NODE_ENV!=="production"&&l.key!==l.key&&J("VNode created with invalid key (NaN). VNode type:",l.type),zs>0&&!i&&Yt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Yt.push(l),l}const w=S.NODE_ENV!=="production"?fv:Df;function Df(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Xd)&&(S.NODE_ENV!=="production"&&!e&&J(`Invalid vnode type when creating vnode: ${e}.`),e=at),no(e)){const a=yn(e,t,!0);return n&&nu(a,n),zs>0&&!s&&Yt&&(a.shapeFlag&6?Yt[Yt.indexOf(e)]=a:Yt.push(a)),a.patchFlag=-2,a}if(Uf(e)&&(e=e.__vccOpts),t){t=hv(t);let{class:a,style:l}=t;a&&!Qe(a)&&(t.class=Ss(a)),qe(l)&&($o(l)&&!ge(l)&&(l=it({},l)),t.style=Fi(l))}const i=Qe(e)?1:Tf(e)?128:Rd(e)?64:qe(e)?4:Ee(e)?2:0;return S.NODE_ENV!=="production"&&i&4&&$o(e)&&(e=Se(e),J("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)),H(e,t,n,r,o,i,s,!0)}function hv(e){return e?$o(e)||ff(e)?it({},e):e:null}function yn(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?ru(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Af(u),ref:t&&t.ref?n&&s?ge(s)?s.concat(ha(t)):[s,ha(t)]:ha(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:S.NODE_ENV!=="production"&&i===-1&&ge(a)?a.map(If):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?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&&yn(e.ssContent),ssFallback:e.ssFallback&&yn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Rs(c,l.clone(c)),c}function If(e){const t=yn(e);return ge(e.children)&&(t.children=e.children.map(If)),t}function M(e=" ",t=0){return w(Bs,null,e,t)}function Mf(e,t){const n=w(Hs,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(g(),Y(at,null,e)):w(at,null,e)}function _n(e){return e==null||typeof e=="boolean"?w(at):ge(e)?w($e,null,e.slice()):no(e)?Sr(e):w(Bs,null,String(e))}function Sr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:yn(e)}function nu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ge(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),nu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ff(t)?t._ctx=ut:o===3&&ut&&(ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:ut},n=32):(t=String(t),r&64?(n=16,t=[M(t)]):n=8);e.children=t,e.shapeFlag|=n}function ru(...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=Ss([t.class,r.class]));else if(o==="style")t.style=Fi([t.style,r.style]);else if(Es(o)){const s=t[o],i=r[o];i&&s!==i&&!(ge(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Mn(e,t,n,r=null){gn(e,t,7,[n,r])}const pv=uf();let mv=0;function bv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||pv,s={uid:mv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Gc(!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:pf(r,o),emitsOptions:kf(r,o),emit:null,emitted:null,propsDefaults:Ze,inheritAttrs:r.inheritAttrs,ctx:Ze,data:Ze,props:Ze,attrs:Ze,slots:Ze,refs:Ze,setupState:Ze,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 S.NODE_ENV!=="production"?s.ctx=Og(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=sv.bind(null,s),e.ce&&e.ce(s),s}let ct=null;const pa=()=>ct||ut;let ma,ou;{const e=Os(),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)}};ma=t("__VUE_INSTANCE_SETTERS__",n=>ct=n),ou=t("__VUE_SSR_SETTERS__",n=>Zs=n)}const Ws=e=>{const t=ct;return ma(e),e.scope.on(),()=>{e.scope.off(),ma(t)}},Vf=()=>{ct&&ct.scope.off(),ma(null)},gv=Zn("slot,component");function su(e,{isNativeTag:t}){(gv(e)||t(e))&&J("Do not use built-in or reserved HTML elements as component id: "+e)}function Rf(e){return e.vnode.shapeFlag&4}let Zs=!1;function vv(e,t=!1,n=!1){t&&ou(t);const{props:r,children:o}=e.vnode,s=Rf(e);Rg(e,r,s,t),Yg(e,o,n||t);const i=s?yv(e,t):void 0;return t&&ou(!1),i}function yv(e,t){var n;const r=e.type;if(S.NODE_ENV!=="production"){if(r.name&&su(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)su(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)Md(s[i])}r.compilerOptions&&_v()&&J('"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,tf),S.NODE_ENV!=="production"&&Sg(e);const{setup:o}=r;if(o){pn();const s=e.setupContext=o.length>1?Ev(e):null,i=Ws(e),a=Ao(o,e,0,[S.NODE_ENV!=="production"?$n(e.props):e.props,s]),l=gl(a);if(mn(),i(),(l||e.sp)&&!Mo(e)&&Gd(e),l){if(a.then(Vf,Vf),t)return a.then(u=>{Lf(e,u,t)}).catch(u=>{Ds(u,e,0)});if(e.asyncDep=a,S.NODE_ENV!=="production"&&!e.suspense){const u=(n=r.name)!=null?n:"Anonymous";J(`Component <${u}>: 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 Lf(e,a,t)}else jf(e,t)}function Lf(e,t,n){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:qe(t)?(S.NODE_ENV!=="production"&&no(t)&&J("setup() should not return VNodes directly - return a render function instead."),S.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=yd(t),S.NODE_ENV!=="production"&&Ng(e)):S.NODE_ENV!=="production"&&t!==void 0&&J(`setup() should return an object. Received: ${t===null?"null":typeof t}`),jf(e,n)}const _v=()=>!0;function jf(e,t,n){const r=e.type;e.render||(e.render=r.render||pt);{const o=Ws(e);pn();try{Tg(e)}finally{mn(),o()}}S.NODE_ENV!=="production"&&!r.render&&e.render===pt&&!t&&(r.template?J('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".'):J("Component is missing template or render function: ",r))}const Ff=S.NODE_ENV!=="production"?{get(e,t){return fa(),mt(e,"get",""),e[t]},set(){return J("setupContext.attrs is readonly."),!1},deleteProperty(){return J("setupContext.attrs is readonly."),!1}}:{get(e,t){return mt(e,"get",""),e[t]}};function wv(e){return new Proxy(e.slots,{get(t,n){return mt(e,"get","$slots"),t[n]}})}function Ev(e){const t=n=>{if(S.NODE_ENV!=="production"&&(e.exposed&&J("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ge(n)?r="array":Xe(n)&&(r="ref")),r!=="object"&&J(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(S.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Ff))},get slots(){return r||(r=wv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Ff),slots:e.slots,emit:e.emit,expose:t}}function iu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(yd(_r(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Qr)return Qr[n](e)},has(t,n){return n in t||n in Qr}})):e.proxy}const xv=/(?:^|[-_])(\w)/g,kv=e=>e.replace(xv,t=>t.toUpperCase()).replace(/[-_]/g,"");function au(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function ba(e,t,n=!1){let r=au(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?kv(r):n?"App":"Anonymous"}function Uf(e){return Ee(e)&&"__vccOpts"in e}const se=(e,t)=>{const n=Lb(e,t,Zs);if(S.NODE_ENV!=="production"){const r=pa();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function dt(e,t,n){const r=arguments.length;return r===2?qe(t)&&!ge(t)?no(t)?w(e,null,[t]):w(e,t):w(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&no(n)&&(n=[n]),w(e,t,n))}function Ov(){if(S.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){if(!qe(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Xe(d)){pn();const f=d.value;return mn(),["div",{},["span",e,c(d)],"<",a(f),">"]}else{if(bn(d))return["div",{},["span",e,Mt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${An(d)?" (readonly)":""}`];if(An(d))return["div",{},["span",e,Mt(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return 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",Se(d.props))),d.setupState!==Ze&&f.push(i("setup",d.setupState)),d.data!==Ze&&f.push(i("data",Se(d.data)));const h=l(d,"computed");h&&f.push(i("computed",h));const p=l(d,"inject");return p&&f.push(i("injected",p)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=it({},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(h=>["div",{},["span",r,h+": "],a(f[h],!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]:qe(d)?["object",{object:f?Se(d):d}]:["span",n,String(d)]}function l(d,f){const h=d.type;if(Ee(h))return;const p={};for(const _ in d.ctx)u(h,_,f)&&(p[_]=d.ctx[_]);return p}function u(d,f,h){const p=d[h];if(ge(p)&&p.includes(f)||qe(p)&&f in p||d.extends&&u(d.extends,f,h)||d.mixins&&d.mixins.some(_=>u(_,f,h)))return!0}function c(d){return Mt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Bf="3.5.14",Xn=S.NODE_ENV!=="production"?J:pt;var Vn={};let lu;const Hf=typeof window<"u"&&window.trustedTypes;if(Hf)try{lu=Hf.createPolicy("vue",{createHTML:e=>e})}catch(e){Vn.NODE_ENV!=="production"&&Xn(`Error creating trusted types policy: ${e}`)}const qf=lu?e=>lu.createHTML(e):e=>e,Sv="http://www.w3.org/2000/svg",Nv="http://www.w3.org/1998/Math/MathML",Jn=typeof document<"u"?document:null,zf=Jn&&Jn.createElement("template"),Cv={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"?Jn.createElementNS(Sv,e):t==="mathml"?Jn.createElementNS(Nv,e):n?Jn.createElement(e,{is:n}):Jn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Jn.createTextNode(e),createComment:e=>Jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Jn.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{zf.innerHTML=qf(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=zf.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]}},Nr="transition",Ys="animation",Gs=Symbol("_vtc"),Wf={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},Tv=it({},Hd,Wf),Ks=(e=>(e.displayName="Transition",e.props=Tv,e))((e,{slots:t})=>dt(dg,Pv(e),t)),oo=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},Zf=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function Pv(e){const t={};for(const A in e)A in Wf||(t[A]=e[A]);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:h=`${n}-leave-to`}=e,p=$v(o),_=p&&p[0],E=p&&p[1],{onBeforeEnter:N,onEnter:q,onEnterCancelled:z,onLeave:B,onLeaveCancelled:L,onBeforeAppear:D=N,onAppear:m=q,onAppearCancelled:P=z}=t,I=(A,oe,ke,k)=>{A._enterCancelled=k,so(A,oe?c:a),so(A,oe?u:i),ke&&ke()},T=(A,oe)=>{A._isLeaving=!1,so(A,d),so(A,h),so(A,f),oe&&oe()},$=A=>(oe,ke)=>{const k=A?m:q,U=()=>I(oe,A,ke);oo(k,[oe,U]),Yf(()=>{so(oe,A?l:s),Qn(oe,A?c:a),Zf(k)||Gf(oe,r,_,U)})};return it(t,{onBeforeEnter(A){oo(N,[A]),Qn(A,s),Qn(A,i)},onBeforeAppear(A){oo(D,[A]),Qn(A,l),Qn(A,u)},onEnter:$(!1),onAppear:$(!0),onLeave(A,oe){A._isLeaving=!0;const ke=()=>T(A,oe);Qn(A,d),A._enterCancelled?(Qn(A,f),Jf()):(Jf(),Qn(A,f)),Yf(()=>{A._isLeaving&&(so(A,d),Qn(A,h),Zf(B)||Gf(A,r,E,ke))}),oo(B,[A,ke])},onEnterCancelled(A){I(A,!1,void 0,!0),oo(z,[A])},onAppearCancelled(A){I(A,!0,void 0,!0),oo(P,[A])},onLeaveCancelled(A){T(A),oo(L,[A])}})}function $v(e){if(e==null)return null;if(qe(e))return[uu(e.enter),uu(e.leave)];{const t=uu(e);return[t,t]}}function uu(e){const t=Q0(e);return Vn.NODE_ENV!=="production"&&zb(t,"<transition> explicit duration"),t}function Qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Gs]||(e[Gs]=new Set)).add(t)}function so(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Gs];n&&(n.delete(t),n.size||(e[Gs]=void 0))}function Yf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Av=0;function Gf(e,t,n,r){const o=e._endId=++Av,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=Dv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function Dv(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),o=r(`${Nr}Delay`),s=r(`${Nr}Duration`),i=Kf(o,s),a=r(`${Ys}Delay`),l=r(`${Ys}Duration`),u=Kf(a,l);let c=null,d=0,f=0;t===Nr?i>0&&(c=Nr,d=i,f=s.length):t===Ys?u>0&&(c=Ys,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Nr:Ys:null,f=c?c===Nr?s.length:l.length:0);const h=c===Nr&&/\b(transform|all)(,|$)/.test(r(`${Nr}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Kf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Xf(n)+Xf(e[r])))}function Xf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Jf(){return document.body.offsetHeight}function Iv(e,t,n){const r=e[Gs];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qf=Symbol("_vod"),Mv=Symbol("_vsh"),Vv=Symbol(Vn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Rv=/(^|;)\s*display\s*:/;function Lv(e,t,n){const r=e.style,o=Qe(n);let s=!1;if(n&&!o){if(t)if(Qe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&ga(r,a,"")}else for(const i in t)n[i]==null&&ga(r,i,"");for(const i in n)i==="display"&&(s=!0),ga(r,i,n[i])}else if(o){if(t!==n){const i=r[Vv];i&&(n+=";"+i),r.cssText=n,s=Rv.test(n)}}else t&&e.removeAttribute("style");Qf in e&&(e[Qf]=s?r.display:"",e[Mv]&&(r.display="none"))}const jv=/[^\\];\s*$/,eh=/\s*!important$/;function ga(e,t,n){if(ge(n))n.forEach(r=>ga(e,t,r));else if(n==null&&(n=""),Vn.NODE_ENV!=="production"&&jv.test(n)&&Xn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Fv(e,t);eh.test(n)?e.setProperty(vr(r),n.replace(eh,""),"important"):e[r]=n}}const th=["Webkit","Moz","ms"],cu={};function Fv(e,t){const n=cu[t];if(n)return n;let r=It(t);if(r!=="filter"&&r in e)return cu[t]=r;r=zr(r);for(let o=0;o<th.length;o++){const s=th[o]+r;if(s in e)return cu[t]=s}return t}const nh="http://www.w3.org/1999/xlink";function rh(e,t,n,r,o,s=cb(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(nh,t.slice(6,t.length)):e.setAttributeNS(nh,t,n):n==null||s&&!Wc(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Yn(n)?String(n):n)}function oh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?qf(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const a=s==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Wc(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch(a){Vn.NODE_ENV!=="production"&&!i&&Xn(`Failed setting prop "${t}" on <${s.toLowerCase()}>: value ${n} is invalid.`,a)}i&&e.removeAttribute(o||t)}function Uv(e,t,n,r){e.addEventListener(t,n,r)}function Bv(e,t,n,r){e.removeEventListener(t,n,r)}const sh=Symbol("_vei");function Hv(e,t,n,r,o=null){const s=e[sh]||(e[sh]={}),i=s[t];if(r&&i)i.value=Vn.NODE_ENV!=="production"?ah(r,t):r;else{const[a,l]=qv(t);if(r){const u=s[t]=Zv(Vn.NODE_ENV!=="production"?ah(r,t):r,o);Uv(e,a,u,l)}else i&&(Bv(e,a,i,l),s[t]=void 0)}}const ih=/(?:Once|Passive|Capture)$/;function qv(e){let t;if(ih.test(e)){t={};let r;for(;r=e.match(ih);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vr(e.slice(2)),t]}let du=0;const zv=Promise.resolve(),Wv=()=>du||(zv.then(()=>du=0),du=Date.now());function Zv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gn(Yv(r,n.value),t,5,[r])};return n.value=e,n.attached=Wv(),n}function ah(e,t){return Ee(e)||ge(e)?e:(Xn(`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}.`),pt)}function Yv(e,t){if(ge(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 lh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?Iv(e,r,i):t==="style"?Lv(e,n,r):Es(t)?Vi(t)||Hv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kv(e,t,r,i))?(oh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&rh(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Qe(r))?oh(e,It(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),rh(e,t,r,i))};function Kv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&lh(t)&&Ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||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 lh(t)&&Qe(n)?!1:t in e}const Xv=["ctrl","shift","alt","meta"],Jv={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)=>Xv.some(n=>e[`${n}Key`]&&!t.includes(n))},Cr=(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=Jv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Qv=it({patchProp:Gv},Cv);let uh;function ey(){return uh||(uh=Xg(Qv))}const ty=(...e)=>{const t=ey().createApp(...e);Vn.NODE_ENV!=="production"&&(ry(t),oy(t));const{mount:n}=t;return t.mount=r=>{const o=sy(r);if(!o)return;const s=t._component;!Ee(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,ny(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function ny(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ry(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>ab(t)||lb(t)||ub(t),writable:!1})}function oy(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){Xn("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 Xn(r),n},set(){Xn(r)}})}}function sy(e){if(Qe(e)){const t=document.querySelector(e);return Vn.NODE_ENV!=="production"&&!t&&Xn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return Vn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&Xn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var iy={};function ay(){Ov()}iy.NODE_ENV!=="production"&&ay();let va;const ly=new Uint8Array(16);function uy(){if(!va&&(va=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!va))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return va(ly)}const wt=[];for(let e=0;e<256;++e)wt.push((e+256).toString(16).slice(1));function cy(e,t=0){return wt[e[t+0]]+wt[e[t+1]]+wt[e[t+2]]+wt[e[t+3]]+"-"+wt[e[t+4]]+wt[e[t+5]]+"-"+wt[e[t+6]]+wt[e[t+7]]+"-"+wt[e[t+8]]+wt[e[t+9]]+"-"+wt[e[t+10]]+wt[e[t+11]]+wt[e[t+12]]+wt[e[t+13]]+wt[e[t+14]]+wt[e[t+15]]}const ch={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xs(e,t,n){if(ch.randomUUID&&!e)return ch.randomUUID();e=e||{};const r=e.random||(e.rng||uy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,cy(r)}var Gt=Symbol("storefront");function dy(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var fy=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional(),completed:v.boolean()}),hy=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:ml.orders.completedOrderSchema}),py=v.discriminatedUnion("event",[fy,hy]);function my(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function ya(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}if(document.getElementById("moonbase-checkout"))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=py.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 Js=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=V(null),this.loadedUser=V(!1),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent=dy(l=>this.client.orders.pushContent(l,void 0,this.hasUtmOrReferrer?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=V({id:Xs(),status:Co.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(lt.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(lt.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:sessionStorage).setItem(lt.utmKey,JSON.stringify(this.utm.value));else{const l=(t.persistUtm?localStorage:sessionStorage).getItem(lt.utmKey);if(l)try{const u=JSON.parse(l);this.utm.value=u}catch(u){console.warn(`Could not parse cached UTM from ${lt.utmKey}`,u)}}const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=V(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=V({id:Xs(),status:Co.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtmOrReferrer&&this.pushOrderContent());const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.user&&(this.currentUser.value=ml.identity.userSchema.parse(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(([h])=>!h.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const h of Object.keys(d))f.searchParams.append(h,d[h]);ya(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",l=>{l.detail.order.id===this.currentOrder.value.id&&this.resetOrder(),this.updateUser()})}get loadedStorefrontPromise(){return new Promise(t=>{et(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&!!(this.utm.value.source||this.utm.value.medium||this.utm.value.campaign||this.utm.value.term||this.utm.value.content)}get hasUtmOrReferrer(){return!!this.utm.value&&Object.values(this.utm.value).some(t=>!!t)}get loadedUserPromise(){return new Promise(t=>{et(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){my()}onCheckoutInitiated(t){window.addEventListener("moonbase-checkout-initiated",n=>t(n.detail.order,n.detail.total))}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(Gt,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 Ai||console.error("Could not load user",t),this.currentUser.value=null}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(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency),this.currentOrder.value.items=this.enrichLineItems(this.currentOrder.value.items)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.refreshOrderAbortController.abort(),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){var n;switch(t.key){case lt.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:Xs(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:Co.Open,items:[],couponsApplied:[]};break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case lt.utmKey:this.utm.value=JSON.parse(t.newValue);break;case jc.storageKey:t.newValue?console.warn("User was updated",t.newValue):(this.currentUser.value=null,console.warn("User was removed"))}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id,{abort:this.refreshOrderAbortController.signal});t&&(t.status!==Co.Open?this.resetOrder():(t.items=this.enrichLineItems(t.items),typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t instanceof kc&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Xs(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Co.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof br)return;console.warn("Could not surrender order:",t)}}enrichLineItems(t){return this.storefront?t.map(n=>{var r,o;if(n.type==="Product"){const s=this.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=this.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}}}):t}};Js.userKey="moonbase_user",Js.sessionKey="moonbase_session",Js.storefrontKey="moonbase_storefront",Js.utmKey="moonbase_utm";var by=Js;function gy(e,t){const n=ve(Gt);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${wr(e)}`,null),o=n.stateFactory(`activation-request-${wr(e)}-error`,null),s=n.stateFactory(`activation-request-${wr(e)}-loading`,!0),i=n.stateFactory(`activation-request-${wr(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${wr(e)}-completing`,!1),l=n.stateFactory(`activation-request-${wr(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=fn.Completed,a.value=!1):l.value=setTimeout(u,1500)};return et(()=>wr(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===fn.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d.message,s.value=!1}},{immediate:!0}),Ul(()=>{l.value&&clearTimeout(l.value)}),et(n.currentUser,async()=>{var c,d;const f=wr(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===fn.Fulfilled&&(a.value=!0,u())}catch(h){o.value=h.message}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:se(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===fn.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;try{r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0;const c=u()}catch(c){console.warn("Could not fulfill trial: ",c),c instanceof Ai?o.value="You need to be signed in to do this":o.value=c.message,i.value=!1}},cancel:async()=>{!r.value||r.value.status===fn.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function tt(e){const t=e??ve(Gt);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.clear(),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=i.user),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 _a(e,t){const n=t??ve(Gt);if(!n)throw new Error("No storefront configured");return se(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function vy(e){const t=ve(Gt);if(!t)throw new Error("No storefront configured");return se(()=>t.storefront.value.bundles)}function Tr(e){const t=e??ve(Gt);if(!t)throw new Error("No storefront configured");const n=se(()=>{const r=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((s,i)=>{var a,l,u,c,d,f,h,p,_;let E;if(i.type==="Product"){const N=t.storefront.value.products.find(D=>D.id===i.productId),z=((N==null?void 0:N.variations)||[]).find(D=>D.id===i.variationId),B=(l=(a=z==null?void 0:z.pricingTiers)==null?void 0:a.filter(D=>i.quantity>=D.minQuantity))!=null?l:[],L=B.length>0?B[B.length-1]:null;E=(f=(d=(u=L==null?void 0:L.price[r])!=null?u:z==null?void 0:z.price[r])!=null?d:(c=N==null?void 0:N.defaultVariation)==null?void 0:c.price[r])!=null?f:0}else{const N=t.storefront.value.bundles.find(B=>B.id===i.bundleId),z=((N==null?void 0:N.variations)||[]).find(B=>B.id===i.variationId);E=(_=(p=z==null?void 0:z.price[r])!=null?p:(h=N==null?void 0:N.defaultVariation)==null?void 0:h.price[r])!=null?_:0}return s+E*i.quantity},0),currency:r}});return{items:se(()=>t.enrichLineItems(t.currentOrder.value.items)),currency:se(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:n,addToCart:(r,o)=>{var s,i;if(r=b(r),o??(o=r.defaultVariation),!o)throw new Error("Added item does not have a default variation, and none have been specified");const a=`${r.type==="bundle"?"b":"p"}/${r.id}/${o.id}`;let l=t.currentOrder.value.items.find(u=>u.id===a);if(l)l.quantity+=1,!l.variation&&o&&(l.variation=o),!l.price&&o&&(l.price=o.price),!l.appliedDiscount&&o.discount&&(l.appliedDiscount=o.discount),l.type==="Product"&&r.type==="product"&&!l.product&&(l.product=r),l.type==="Bundle"&&r.type==="bundle"&&!l.bundle&&(l.bundle=r);else if(r.type==="bundle")l={id:a,type:"Bundle",bundleId:r.id,bundle:r,quantity:1,variation:o,variationId:o.id,price:o.price,appliedDiscount:o.discount,isDefaultVariation:o.id===((s=r.defaultVariation)==null?void 0:s.id)},t.currentOrder.value.items.push(l);else if(r.type==="product")l={id:a,type:"Product",productId:r.id,product:r,quantity:1,variation:o,variationId:o.id,price:o.price,appliedDiscount:o.discount,isDefaultVariation:o.id===((i=r.defaultVariation)==null?void 0:i.id)},t.currentOrder.value.items.push(l);else throw new Tn("Invalid input",`Could not handle item of type '${r.type}'`);return t.pushOrderContent(),l},setQuantity:(r,o)=>{const s=t.currentOrder.value.items.find(i=>i.id===r.id);if(!s)throw new Error("Cart item not found");if(s.quantity=o,s.quantity<=0){const i=t.currentOrder.value.items.findIndex(a=>a.id===s.id);t.currentOrder.value.items.splice(i,1)}return t.pushOrderContent(),r},removeFromCart:r=>{const o=t.currentOrder.value.items.findIndex(s=>s.id===r.id);t.currentOrder.value.items.splice(o,1),t.pushOrderContent()},checkout:async r=>{var o;const s=typeof window<"u"?window.location.pathname:"",i=new URL((o=r.returnUrl)!=null?o:s,document.baseURI).href,a=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:i},t.hasUtm?t.utm.value:void 0);if(a.items=t.enrichLineItems(a.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:a,total:n.value}})),!r.redirect&&a.embeddedCheckoutUrl&&typeof window<"u"){const l=a.embeddedCheckoutUrl;return new Promise(u=>{ya(l.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",c=>{const d=c;u({next:d.detail.intent,completed:d.detail.completed})},{once:!0})})}else{if(r.redirect&&a.checkoutUrl&&typeof window<"u")return window.location.href=a.checkoutUrl,{next:void 0,completed:!1};throw new Error("No checkout URL found")}}}}async function yy(e,t,n){var r,o;const s=n??ve(Gt);if(!s)throw new Error("No storefront configured");const i=[];for(const c of e){const d=b(c.item),f=(r=c.variation)!=null?r:d.defaultVariation;if(!f)throw new Error("Added item does not have a default variation, and none have been specified");const h=`${d.type==="bundle"?"b":"p"}/${d.id}/${f.id}`;if(d.type==="bundle")i.push({id:h,type:"Bundle",bundleId:d.id,bundle:d,quantity:1,variation:f,variationId:f.id,price:f.price,appliedDiscount:f.discount});else if(d.type==="product")i.push({id:h,type:"Product",productId:d.id,product:d,quantity:1,variation:f,variationId:f.id,price:f.price,appliedDiscount:f.discount});else throw new Tn("Invalid input",`Could not handle item of type '${c.type}'`)}const a=typeof window<"u"?window.location.pathname:"",l=new URL((o=t.returnUrl)!=null?o:a,document.baseURI).href,u=await s.client.orders.pushContent({id:Xs(),currency:s.storefront.value.suggestedCurrency,items:i},{returnUrl:l},s.hasUtm?s.utm.value:void 0);if(u.items=s.enrichLineItems(u.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:u,total:{amount:e.reduce((c,d)=>{var f,h;return c+((h=(f=d.variation)==null?void 0:f.price[u.currency])!=null?h:0)},0),currency:u.currency}}})),!t.redirect&&u.embeddedCheckoutUrl&&typeof window<"u"){const c=u.embeddedCheckoutUrl;return new Promise(d=>{ya(c.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",f=>{const h=f;d({next:h.detail.intent,completed:h.detail.completed})},{once:!0})})}else{if(t.redirect&&u.checkoutUrl&&typeof window<"u")return window.location.href=u.checkoutUrl,Promise.resolve({next:void 0,completed:!1});throw new Error("No checkout URL found")}}function io(e){const t=ve(Gt);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)},getSubscriptions:async n=>t.client.inventory.subscriptions.get(n),getSubscription:async n=>t.client.inventory.subscriptions.getById(n),cancelSubscription:async n=>t.client.inventory.subscriptions.cancel(n),renewSubscription:async(n,r)=>{var o;const s=typeof window<"u"?window.location.pathname:"",i=new URL((o=r.returnUrl)!=null?o:s,document.baseURI).href,{location:a}=await t.client.inventory.subscriptions.renew(n,i,!r.redirect);return r.redirect?(window.location.href=a,Promise.resolve({next:void 0,completed:!1})):new Promise(l=>{ya(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{const c=u;l({next:c.detail.intent,completed:c.detail.completed})},{once:!0})})}}}function Qs(e,t){const n=t??ve(Gt);if(!n)throw new Error("No storefront configured");return se(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function _y(e){const t=ve(Gt);if(!t)throw new Error("No storefront configured");return se(()=>t.storefront.value.products)}function dh(e){const t=ve(Gt);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 br?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof br?new Error("Voucher code invalid"):r}}}}function wy(e,t,n){const r={endpoint:e};return new by(r,new W0(r),(o,s)=>V(s))}function wa(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 fu(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Ey(){return fh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function fh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const xy=typeof Proxy=="function",ky="devtools-plugin:setup",Oy="plugin:settings:set";let Lo,hu;function Sy(){var e;return Lo!==void 0||(typeof window<"u"&&window.performance?(Lo=!0,hu=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Lo=!0,hu=globalThis.perf_hooks.performance):Lo=!1),Lo}function Ny(){return Sy()?hu.now():Date.now()}class Cy{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 Ny()}},n&&n.on(Oy,(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 hh(e,t){const n=e,r=fh(),o=Ey(),s=xy&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ky,e,t);else{const i=s?new Cy(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var je={};let ei;const ti=e=>ei=e,ph=je.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ao(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Rn||(Rn={}));const Pr=typeof window<"u",mh=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 Ty(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 pu(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){vh(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function bh(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ea(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 xa=typeof navigator=="object"?navigator:{userAgent:""},gh=/Macintosh/.test(xa.userAgent)&&/AppleWebKit/.test(xa.userAgent)&&!/Safari/.test(xa.userAgent),vh=Pr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!gh?Py:"msSaveOrOpenBlob"in xa?$y:Ay:()=>{};function Py(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?bh(r.href)?pu(e,t,n):(r.target="_blank",Ea(r)):Ea(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ea(r)},0))}function $y(e,t="download",n){if(typeof e=="string")if(bh(e))pu(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ea(r)})}else navigator.msSaveOrOpenBlob(Ty(e,n),t)}function Ay(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return pu(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(mh.HTMLElement))||"safari"in mh,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||gh)&&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 bt(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 mu(e){return"_a"in e&&"install"in e}function yh(){if(!("clipboard"in navigator))return bt("Your browser doesn't support the Clipboard API","error"),!0}function _h(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(bt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Dy(e){if(!yh())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),bt("Global state copied to clipboard.")}catch(t){if(_h(t))return;bt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Iy(e){if(!yh())try{wh(e,JSON.parse(await navigator.clipboard.readText())),bt("Global state pasted from clipboard.")}catch(t){if(_h(t))return;bt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function My(e){try{vh(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){bt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let er;function Vy(){er||(er=document.createElement("input"),er.type="file",er.accept=".json");function e(){return new Promise((t,n)=>{er.onchange=async()=>{const r=er.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},er.oncancel=()=>t(null),er.onerror=n,er.click()})}return e}async function Ry(e){try{const n=await Vy()();if(!n)return;const{text:r,file:o}=n;wh(e,JSON.parse(r)),bt(`Global state imported from "${o.name}".`)}catch(t){bt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function wh(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 wn(e){return{_custom:{display:e}}}const Eh="🍍 Pinia (root)",ka="_root";function Ly(e){return mu(e)?{id:ka,label:Eh}:{id:e.$id,label:e.$id}}function jy(e){if(mu(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 Fy(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:wn(e.type),key:wn(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Uy(e){switch(e){case Rn.direct:return"mutation";case Rn.patchFunction:return"$patch";case Rn.patchObject:return"$patch";default:return"unknown"}}let jo=!0;const Oa=[],lo="pinia:mutations",Nt="pinia",{assign:By}=Object,Sa=e=>"🍍 "+e;function Hy(e,t){hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Oa,app:e},n=>{typeof n.now!="function"&&bt("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:lo,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Nt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Dy(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Iy(t),n.sendInspectorTree(Nt),n.sendInspectorState(Nt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{My(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ry(t),n.sendInspectorTree(Nt),n.sendInspectorState(Nt)},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"?bt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),bt(`Store "${r}" reset.`)):bt(`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:Sa(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:Se(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:Sa(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===Nt){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()):Eh.toLowerCase().includes(r.filter.toLowerCase())):o).map(Ly)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===Nt){const o=r.nodeId===ka?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ka&&(globalThis.$store=Se(o)),r.state=jy(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===Nt){const s=r.nodeId===ka?t:t._s.get(r.nodeId);if(!s)return bt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;mu(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),jo=!1,r.set(s,i,r.state.value),jo=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return bt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return bt(`Invalid path for store "${o}":
|
|
13
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const jt=cv;function Xg(e){return Jg(e)}function Jg(e,t){Kg();const n=Os();n.__VUE__=!0,S.NODE_ENV!=="production"&&$d(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:h=pt,insertStaticContent:p}=e,_=(y,x,F,K=null,W=null,Z=null,ie=void 0,re=null,ne=S.NODE_ENV!=="production"&&vn?!1:!!x.dynamicChildren)=>{if(y===x)return;y&&!ro(y,x)&&(K=Xa(y),Be(y,W,Z,!0),y=null),x.patchFlag===-2&&(ne=!1,x.dynamicChildren=null);const{type:X,ref:we,shapeFlag:ae}=x;switch(X){case Bs:E(y,x,F,K);break;case at:N(y,x,F,K);break;case Hs:y==null?q(x,F,K,ie):S.NODE_ENV!=="production"&&z(y,x,F,ie);break;case $e:oe(y,x,F,K,W,Z,ie,re,ne);break;default:ae&1?D(y,x,F,K,W,Z,ie,re,ne):ae&6?ke(y,x,F,K,W,Z,ie,re,ne):ae&64||ae&128?X.process(y,x,F,K,W,Z,ie,re,ne,yi):S.NODE_ENV!=="production"&&J("Invalid VNode type:",X,`(${typeof X})`)}we!=null&&W&&aa(we,y&&y.ref,Z,x||y,!x)},E=(y,x,F,K)=>{if(y==null)r(x.el=a(x.children),F,K);else{const W=x.el=y.el;x.children!==y.children&&u(W,x.children)}},N=(y,x,F,K)=>{y==null?r(x.el=l(x.children||""),F,K):x.el=y.el},q=(y,x,F,K)=>{[y.el,y.anchor]=p(y.children,x,F,K,y.el,y.anchor)},z=(y,x,F,K)=>{if(x.children!==y.children){const W=f(y.anchor);L(y),[x.el,x.anchor]=p(x.children,F,W,K)}else x.el=y.el,x.anchor=y.anchor},B=({el:y,anchor:x},F,K)=>{let W;for(;y&&y!==x;)W=f(y),r(y,F,K),y=W;r(x,F,K)},L=({el:y,anchor:x})=>{let F;for(;y&&y!==x;)F=f(y),o(y),y=F;o(x)},D=(y,x,F,K,W,Z,ie,re,ne)=>{x.type==="svg"?ie="svg":x.type==="math"&&(ie="mathml"),y==null?m(x,F,K,W,Z,ie,re,ne):T(y,x,W,Z,ie,re,ne)},m=(y,x,F,K,W,Z,ie,re)=>{let ne,X;const{props:we,shapeFlag:ae,transition:ye,dirs:Ce}=y;if(ne=y.el=i(y.type,Z,we&&we.is,we),ae&8?c(ne,y.children):ae&16&&I(y.children,ne,null,K,W,Jl(y,Z),ie,re),Ce&&Xr(y,null,K,"created"),P(ne,y,y.scopeId,ie,K),we){for(const Qe in we)Qe!=="value"&&!xs(Qe)&&s(ne,Qe,null,we[Qe],Z,K);"value"in we&&s(ne,"value",null,we.value,Z),(X=we.onVnodeBeforeMount)&&Mn(X,K,y)}S.NODE_ENV!=="production"&&(ji(ne,"__vnode",y,!0),ji(ne,"__vueParentComponent",K,!0)),Ce&&Xr(y,null,K,"beforeMount");const Fe=Qg(W,ye);Fe&&ye.beforeEnter(ne),r(ne,x,F),((X=we&&we.onVnodeMounted)||Fe||Ce)&&jt(()=>{X&&Mn(X,K,y),Fe&&ye.enter(ne),Ce&&Xr(y,null,K,"mounted")},W)},P=(y,x,F,K,W)=>{if(F&&h(y,F),K)for(let Z=0;Z<K.length;Z++)h(y,K[Z]);if(W){let Z=W.subTree;if(S.NODE_ENV!=="production"&&Z.patchFlag>0&&Z.patchFlag&2048&&(Z=tu(Z.children)||Z),x===Z||Tf(Z.type)&&(Z.ssContent===x||Z.ssFallback===x)){const ie=W.vnode;P(y,ie,ie.scopeId,ie.slotScopeIds,W.parent)}}},I=(y,x,F,K,W,Z,ie,re,ne=0)=>{for(let X=ne;X<y.length;X++){const we=y[X]=re?Sr(y[X]):_n(y[X]);_(null,we,x,F,K,W,Z,ie,re)}},T=(y,x,F,K,W,Z,ie)=>{const re=x.el=y.el;S.NODE_ENV!=="production"&&(re.__vnode=x);let{patchFlag:ne,dynamicChildren:X,dirs:we}=x;ne|=y.patchFlag&16;const ae=y.props||Ze,ye=x.props||Ze;let Ce;if(F&&to(F,!1),(Ce=ye.onVnodeBeforeUpdate)&&Mn(Ce,F,x,y),we&&Xr(x,y,F,"beforeUpdate"),F&&to(F,!0),S.NODE_ENV!=="production"&&vn&&(ne=0,ie=!1,X=null),(ae.innerHTML&&ye.innerHTML==null||ae.textContent&&ye.textContent==null)&&c(re,""),X?($(y.dynamicChildren,X,re,F,K,Jl(x,W),Z),S.NODE_ENV!=="production"&&Us(y,x)):ie||me(y,x,re,null,F,K,Jl(x,W),Z,!1),ne>0){if(ne&16)A(re,ae,ye,F,W);else if(ne&2&&ae.class!==ye.class&&s(re,"class",null,ye.class,W),ne&4&&s(re,"style",ae.style,ye.style,W),ne&8){const Fe=x.dynamicProps;for(let Qe=0;Qe<Fe.length;Qe++){const Ke=Fe[Qe],tn=ae[Ke],zt=ye[Ke];(zt!==tn||Ke==="value")&&s(re,Ke,tn,zt,W,F)}}ne&1&&y.children!==x.children&&c(re,x.children)}else!ie&&X==null&&A(re,ae,ye,F,W);((Ce=ye.onVnodeUpdated)||we)&&jt(()=>{Ce&&Mn(Ce,F,x,y),we&&Xr(x,y,F,"updated")},K)},$=(y,x,F,K,W,Z,ie)=>{for(let re=0;re<x.length;re++){const ne=y[re],X=x[re],we=ne.el&&(ne.type===$e||!ro(ne,X)||ne.shapeFlag&70)?d(ne.el):F;_(ne,X,we,null,K,W,Z,ie,!0)}},A=(y,x,F,K,W)=>{if(x!==F){if(x!==Ze)for(const Z in x)!xs(Z)&&!(Z in F)&&s(y,Z,x[Z],null,W,K);for(const Z in F){if(xs(Z))continue;const ie=F[Z],re=x[Z];ie!==re&&Z!=="value"&&s(y,Z,re,ie,W,K)}"value"in F&&s(y,"value",x.value,F.value,W)}},oe=(y,x,F,K,W,Z,ie,re,ne)=>{const X=x.el=y?y.el:a(""),we=x.anchor=y?y.anchor:a("");let{patchFlag:ae,dynamicChildren:ye,slotScopeIds:Ce}=x;S.NODE_ENV!=="production"&&(vn||ae&2048)&&(ae=0,ne=!1,ye=null),Ce&&(re=re?re.concat(Ce):Ce),y==null?(r(X,F,K),r(we,F,K),I(x.children||[],F,we,W,Z,ie,re,ne)):ae>0&&ae&64&&ye&&y.dynamicChildren?($(y.dynamicChildren,ye,F,W,Z,ie,re),S.NODE_ENV!=="production"?Us(y,x):(x.key!=null||W&&x===W.subTree)&&Us(y,x,!0)):me(y,x,F,we,W,Z,ie,re,ne)},ke=(y,x,F,K,W,Z,ie,re,ne)=>{x.slotScopeIds=re,y==null?x.shapeFlag&512?W.ctx.activate(x,F,K,ie,ne):k(x,F,K,W,Z,ie,ne):U(y,x,ne)},k=(y,x,F,K,W,Z,ie)=>{const re=y.component=bv(y,K,W);if(S.NODE_ENV!=="production"&&re.type.__hmrId&&Gb(re),S.NODE_ENV!=="production"&&(Ki(y),Vo(re,"mount")),Ls(y)&&(re.ctx.renderer=yi),S.NODE_ENV!=="production"&&Vo(re,"init"),vv(re,!1,ie),S.NODE_ENV!=="production"&&Ro(re,"init"),S.NODE_ENV!=="production"&&vn&&(y.el=null),re.asyncDep){if(W&&W.registerDep(re,R,ie),!y.el){const ne=re.subTree=w(at);N(null,ne,x,F)}}else R(re,y,x,F,W,Z,ie);S.NODE_ENV!=="production"&&(Xi(),Ro(re,"mount"))},U=(y,x,F)=>{const K=x.component=y.component;if(lv(y,x,F))if(K.asyncDep&&!K.asyncResolved){S.NODE_ENV!=="production"&&Ki(x),te(K,x,F),S.NODE_ENV!=="production"&&Xi();return}else K.next=x,K.update();else x.el=y.el,K.vnode=x},R=(y,x,F,K,W,Z,ie)=>{const re=()=>{if(y.isMounted){let{next:ae,bu:ye,u:Ce,parent:Fe,vnode:Qe}=y;{const Un=wf(y);if(Un){ae&&(ae.el=Qe.el,te(y,ae,ie)),Un.asyncDep.then(()=>{y.isUnmounted||re()});return}}let Ke=ae,tn;S.NODE_ENV!=="production"&&Ki(ae||y.vnode),to(y,!1),ae?(ae.el=Qe.el,te(y,ae,ie)):ae=Qe,ye&&ks(ye),(tn=ae.props&&ae.props.onVnodeBeforeUpdate)&&Mn(tn,Fe,ae,Qe),to(y,!0),S.NODE_ENV!=="production"&&Vo(y,"render");const zt=Of(y);S.NODE_ENV!=="production"&&Ro(y,"render");const Fn=y.subTree;y.subTree=zt,S.NODE_ENV!=="production"&&Vo(y,"patch"),_(Fn,zt,d(Fn.el),Xa(Fn),y,W,Z),S.NODE_ENV!=="production"&&Ro(y,"patch"),ae.el=zt.el,Ke===null&&uv(y,zt.el),Ce&&jt(Ce,W),(tn=ae.props&&ae.props.onVnodeUpdated)&&jt(()=>Mn(tn,Fe,ae,Qe),W),S.NODE_ENV!=="production"&&Ad(y),S.NODE_ENV!=="production"&&Xi()}else{let ae;const{el:ye,props:Ce}=x,{bm:Fe,m:Qe,parent:Ke,root:tn,type:zt}=y,Fn=Mo(x);to(y,!1),Fe&&ks(Fe),!Fn&&(ae=Ce&&Ce.onVnodeBeforeMount)&&Mn(ae,Ke,x),to(y,!0);{tn.ce&&tn.ce._injectChildStyle(zt),S.NODE_ENV!=="production"&&Vo(y,"render");const Un=y.subTree=Of(y);S.NODE_ENV!=="production"&&Ro(y,"render"),S.NODE_ENV!=="production"&&Vo(y,"patch"),_(null,Un,F,K,y,W,Z),S.NODE_ENV!=="production"&&Ro(y,"patch"),x.el=Un.el}if(Qe&&jt(Qe,W),!Fn&&(ae=Ce&&Ce.onVnodeMounted)){const Un=x;jt(()=>Mn(ae,Ke,Un),W)}(x.shapeFlag&256||Ke&&Mo(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&y.a&&jt(y.a,W),y.isMounted=!0,S.NODE_ENV!=="production"&&tg(y),x=F=K=null}};y.scope.on();const ne=y.effect=new Jc(re);y.scope.off();const X=y.update=ne.run.bind(ne),we=y.job=ne.runIfDirty.bind(ne);we.i=y,we.id=y.uid,ne.scheduler=()=>ea(we),to(y,!0),S.NODE_ENV!=="production"&&(ne.onTrack=y.rtc?ae=>ks(y.rtc,ae):void 0,ne.onTrigger=y.rtg?ae=>ks(y.rtg,ae):void 0),X()},te=(y,x,F)=>{x.component=y;const K=y.vnode.props;y.vnode=x,y.next=null,jg(y,x.props,K,F),Gg(y,x.children,F),pn(),Sd(y),mn()},me=(y,x,F,K,W,Z,ie,re,ne=!1)=>{const X=y&&y.children,we=y?y.shapeFlag:0,ae=x.children,{patchFlag:ye,shapeFlag:Ce}=x;if(ye>0){if(ye&128){he(X,ae,F,K,W,Z,ie,re,ne);return}else if(ye&256){le(X,ae,F,K,W,Z,ie,re,ne);return}}Ce&8?(we&16&&vi(X,W,Z),ae!==X&&c(F,ae)):we&16?Ce&16?he(X,ae,F,K,W,Z,ie,re,ne):vi(X,W,Z,!0):(we&8&&c(F,""),Ce&16&&I(ae,F,K,W,Z,ie,re,ne))},le=(y,x,F,K,W,Z,ie,re,ne)=>{y=y||To,x=x||To;const X=y.length,we=x.length,ae=Math.min(X,we);let ye;for(ye=0;ye<ae;ye++){const Ce=x[ye]=ne?Sr(x[ye]):_n(x[ye]);_(y[ye],Ce,F,null,W,Z,ie,re,ne)}X>we?vi(y,W,Z,!0,!1,ae):I(x,F,K,W,Z,ie,re,ne,ae)},he=(y,x,F,K,W,Z,ie,re,ne)=>{let X=0;const we=x.length;let ae=y.length-1,ye=we-1;for(;X<=ae&&X<=ye;){const Ce=y[X],Fe=x[X]=ne?Sr(x[X]):_n(x[X]);if(ro(Ce,Fe))_(Ce,Fe,F,null,W,Z,ie,re,ne);else break;X++}for(;X<=ae&&X<=ye;){const Ce=y[ae],Fe=x[ye]=ne?Sr(x[ye]):_n(x[ye]);if(ro(Ce,Fe))_(Ce,Fe,F,null,W,Z,ie,re,ne);else break;ae--,ye--}if(X>ae){if(X<=ye){const Ce=ye+1,Fe=Ce<we?x[Ce].el:K;for(;X<=ye;)_(null,x[X]=ne?Sr(x[X]):_n(x[X]),F,Fe,W,Z,ie,re,ne),X++}}else if(X>ye)for(;X<=ae;)Be(y[X],W,Z,!0),X++;else{const Ce=X,Fe=X,Qe=new Map;for(X=Fe;X<=ye;X++){const Ut=x[X]=ne?Sr(x[X]):_n(x[X]);Ut.key!=null&&(S.NODE_ENV!=="production"&&Qe.has(Ut.key)&&J("Duplicate keys found during update:",JSON.stringify(Ut.key),"Make sure keys are unique."),Qe.set(Ut.key,X))}let Ke,tn=0;const zt=ye-Fe+1;let Fn=!1,Un=0;const _i=new Array(zt);for(X=0;X<zt;X++)_i[X]=0;for(X=Ce;X<=ae;X++){const Ut=y[X];if(tn>=zt){Be(Ut,W,Z,!0);continue}let Bn;if(Ut.key!=null)Bn=Qe.get(Ut.key);else for(Ke=Fe;Ke<=ye;Ke++)if(_i[Ke-Fe]===0&&ro(Ut,x[Ke])){Bn=Ke;break}Bn===void 0?Be(Ut,W,Z,!0):(_i[Bn-Fe]=X+1,Bn>=Un?Un=Bn:Fn=!0,_(Ut,x[Bn],F,null,W,Z,ie,re,ne),tn++)}const hm=Fn?ev(_i):To;for(Ke=hm.length-1,X=zt-1;X>=0;X--){const Ut=Fe+X,Bn=x[Ut],pm=Ut+1<we?x[Ut+1].el:K;_i[X]===0?_(null,Bn,F,pm,W,Z,ie,re,ne):Fn&&(Ke<0||X!==hm[Ke]?_e(Bn,F,pm,2):Ke--)}}},_e=(y,x,F,K,W=null)=>{const{el:Z,type:ie,transition:re,children:ne,shapeFlag:X}=y;if(X&6){_e(y.component.subTree,x,F,K);return}if(X&128){y.suspense.move(x,F,K);return}if(X&64){ie.move(y,x,F,yi);return}if(ie===$e){r(Z,x,F);for(let ae=0;ae<ne.length;ae++)_e(ne[ae],x,F,K);r(y.anchor,x,F);return}if(ie===Hs){B(y,x,F);return}if(K!==2&&X&1&&re)if(K===0)re.beforeEnter(Z),r(Z,x,F),jt(()=>re.enter(Z),W);else{const{leave:ae,delayLeave:ye,afterLeave:Ce}=re,Fe=()=>{y.ctx.isUnmounted?o(Z):r(Z,x,F)},Qe=()=>{ae(Z,()=>{Fe(),Ce&&Ce()})};ye?ye(Z,Fe,Qe):Qe()}else r(Z,x,F)},Be=(y,x,F,K=!1,W=!1)=>{const{type:Z,props:ie,ref:re,children:ne,dynamicChildren:X,shapeFlag:we,patchFlag:ae,dirs:ye,cacheIndex:Ce}=y;if(ae===-2&&(W=!1),re!=null&&(pn(),aa(re,null,F,y,!0),mn()),Ce!=null&&(x.renderCache[Ce]=void 0),we&256){x.ctx.deactivate(y);return}const Fe=we&1&&ye,Qe=!Mo(y);let Ke;if(Qe&&(Ke=ie&&ie.onVnodeBeforeUnmount)&&Mn(Ke,x,y),we&6)$O(y.component,F,K);else{if(we&128){y.suspense.unmount(F,K);return}Fe&&Xr(y,null,x,"beforeUnmount"),we&64?y.type.remove(y,x,F,yi,K):X&&!X.hasOnce&&(Z!==$e||ae>0&&ae&64)?vi(X,x,F,!1,!0):(Z===$e&&ae&384||!W&&we&16)&&vi(ne,x,F),K&&ze(y)}(Qe&&(Ke=ie&&ie.onVnodeUnmounted)||Fe)&&jt(()=>{Ke&&Mn(Ke,x,y),Fe&&Xr(y,null,x,"unmounted")},F)},ze=y=>{const{type:x,el:F,anchor:K,transition:W}=y;if(x===$e){S.NODE_ENV!=="production"&&y.patchFlag>0&&y.patchFlag&2048&&W&&!W.persisted?y.children.forEach(ie=>{ie.type===at?o(ie.el):ze(ie)}):At(F,K);return}if(x===Hs){L(y);return}const Z=()=>{o(F),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(y.shapeFlag&1&&W&&!W.persisted){const{leave:ie,delayLeave:re}=W,ne=()=>ie(F,Z);re?re(y.el,Z,ne):ne()}else Z()},At=(y,x)=>{let F;for(;y!==x;)F=f(y),o(y),y=F;o(x)},$O=(y,x,F)=>{S.NODE_ENV!=="production"&&y.type.__hmrId&&Kb(y);const{bum:K,scope:W,job:Z,subTree:ie,um:re,m:ne,a:X,parent:we,slots:{__:ae}}=y;Ef(ne),Ef(X),K&&ks(K),we&&ge(ae)&&ae.forEach(ye=>{we.renderCache[ye]=void 0}),W.stop(),Z&&(Z.flags|=8,Be(ie,y,x,F)),re&&jt(re,x),jt(()=>{y.isUnmounted=!0},x),x&&x.pendingBranch&&!x.isUnmounted&&y.asyncDep&&!y.asyncResolved&&y.suspenseId===x.pendingId&&(x.deps--,x.deps===0&&x.resolve()),S.NODE_ENV!=="production"&&rg(y)},vi=(y,x,F,K=!1,W=!1,Z=0)=>{for(let ie=Z;ie<y.length;ie++)Be(y[ie],x,F,K,W)},Xa=y=>{if(y.shapeFlag&6)return Xa(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const x=f(y.anchor||y.el),F=x&&x[Vd];return F?f(F):x};let ac=!1;const fm=(y,x,F)=>{y==null?x._vnode&&Be(x._vnode,null,null,!0):_(x._vnode||null,y,x,null,null,null,F),x._vnode=y,ac||(ac=!0,Sd(),Nd(),ac=!1)},yi={p:_,um:Be,m:_e,r:ze,mt:k,mc:I,pc:me,pbc:$,n:Xa,o:e};return{render:fm,hydrate:void 0,createApp:Mg(fm)}}function Jl({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 to({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Us(e,t,n=!1){const r=e.children,o=t.children;if(ge(r)&&ge(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]=Sr(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Us(i,a)),a.type===Bs&&(a.el=i.el),a.type===at&&!a.el&&(a.el=i.el),S.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function ev(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 wf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wf(t)}function Ef(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const tv=Symbol.for("v-scx"),nv=()=>{{const e=ve(tv);return e||S.NODE_ENV!=="production"&&J("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Zt(e,t){return Ql(e,null,t)}function Je(e,t,n){return S.NODE_ENV!=="production"&&!Ee(t)&&J("`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."),Ql(e,t,n)}function Ql(e,t,n=Ze){const{immediate:r,deep:o,flush:s,once:i}=n;S.NODE_ENV!=="production"&&!t&&(r!==void 0&&J('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&J('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&J('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=it({},n);S.NODE_ENV!=="production"&&(a.onWarn=J);const l=t&&r||!t&&s!=="post";let u;if(Zs){if(s==="sync"){const h=nv();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=pt,h.resume=pt,h.pause=pt,h}}const c=ct;a.call=(h,p,_)=>gn(h,c,p,_);let d=!1;s==="post"?a.scheduler=h=>{jt(h,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,p)=>{p?h():ea(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=Fb(e,t,a);return Zs&&(u?u.push(f):l&&f()),f}function rv(e,t,n){const r=this.proxy,o=et(e)?e.includes(".")?xf(r,e):()=>r[e]:e.bind(r,r);let s;Ee(t)?s=t:(s=t.handler,n=t);const i=Ws(this),a=Ql(o,s.bind(r),n);return i(),a}function xf(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 ov=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${It(t)}Modifiers`]||e[`${vr(t)}Modifiers`];function sv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Ze;if(S.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Wr(It(t))in d))&&J(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Wr(It(t))}" prop.`);else{const f=c[t];Ee(f)&&(f(...n)||J(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&ov(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>et(c)?c.trim():c)),i.number&&(o=n.map(J0))),S.NODE_ENV!=="production"&&ig(e,t,o),S.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Wr(c)]&&J(`Event "${c}" is emitted in component ${ba(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 "${vr(t)}" instead of "${t}".`)}let a,l=r[a=Wr(t)]||r[a=Wr(It(t))];!l&&s&&(l=r[a=Wr(vr(t))]),l&&gn(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,gn(u,e,6,o)}}function kf(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(!Ee(e)){const l=u=>{const c=kf(u,t,!0);c&&(a=!0,it(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(qe(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>i[l]=null):it(i,s),qe(e)&&r.set(e,i),i)}function da(e,t){return!e||!Es(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,vr(t))||Ue(e,t))}let eu=!1;function fa(){eu=!0}function Of(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:h,ctx:p,inheritAttrs:_}=e,E=ra(e);let N,q;S.NODE_ENV!=="production"&&(eu=!1);try{if(n.shapeFlag&4){const L=o||r,D=S.NODE_ENV!=="production"&&h.__isScriptSetup?new Proxy(L,{get(m,P,I){return J(`Property '${String(P)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(m,P,I)}}):L;N=_n(u.call(D,L,c,S.NODE_ENV!=="production"?$n(d):d,h,f,p)),q=a}else{const L=t;S.NODE_ENV!=="production"&&a===d&&fa(),N=_n(L.length>1?L(S.NODE_ENV!=="production"?$n(d):d,S.NODE_ENV!=="production"?{get attrs(){return fa(),$n(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):L(S.NODE_ENV!=="production"?$n(d):d,null)),q=t.props?a:iv(a)}}catch(L){qs.length=0,Ds(L,e,1),N=w(at)}let z=N,B;if(S.NODE_ENV!=="production"&&N.patchFlag>0&&N.patchFlag&2048&&([z,B]=Sf(N)),q&&_!==!1){const L=Object.keys(q),{shapeFlag:D}=z;if(L.length){if(D&7)s&&L.some(Vi)&&(q=av(q,s)),z=yn(z,q,!1,!0);else if(S.NODE_ENV!=="production"&&!eu&&z.type!==at){const m=Object.keys(a),P=[],I=[];for(let T=0,$=m.length;T<$;T++){const A=m[T];Es(A)?Vi(A)||P.push(A[2].toLowerCase()+A.slice(3)):I.push(A)}I.length&&J(`Extraneous non-props attributes (${I.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),P.length&&J(`Extraneous non-emits event listeners (${P.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&&(S.NODE_ENV!=="production"&&!Nf(z)&&J("Runtime directive used on component with non-element root node. The directives will not function as intended."),z=yn(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(n.dirs):n.dirs),n.transition&&(S.NODE_ENV!=="production"&&!Nf(z)&&J("Component inside <Transition> renders non-element root node that cannot be animated."),Rs(z,n.transition)),S.NODE_ENV!=="production"&&B?B(z):N=z,ra(E),N}const Sf=e=>{const t=e.children,n=e.dynamicChildren,r=tu(t,!1);if(r){if(S.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Sf(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[_n(r),i]};function tu(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(no(o)){if(o.type!==at||o.children==="v-if"){if(n)return;if(n=o,S.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return tu(n.children)}}else return}return n}const iv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Es(n))&&((t||(t={}))[n]=e[n]);return t},av=(e,t)=>{const n={};for(const r in e)(!Vi(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Nf=e=>e.shapeFlag&7||e.type===at;function lv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(S.NODE_ENV!=="production"&&(o||a)&&vn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Cf(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]&&!da(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Cf(r,i,u):!0:!!i;return!1}function Cf(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]&&!da(n,s))return!0}return!1}function uv({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 Tf=e=>e.__isSuspense;function cv(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):Od(e)}const $e=Symbol.for("v-fgt"),Bs=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Hs=Symbol.for("v-stc"),qs=[];let Yt=null;function g(e=!1){qs.push(Yt=e?null:[])}function dv(){qs.pop(),Yt=qs[qs.length-1]||null}let zs=1;function Pf(e,t=!1){zs+=e,e<0&&Yt&&t&&(Yt.hasOnce=!0)}function $f(e){return e.dynamicChildren=zs>0?Yt||To:null,dv(),zs>0&&Yt&&Yt.push(e),e}function C(e,t,n,r,o,s){return $f(H(e,t,n,r,o,s,!0))}function Y(e,t,n,r,o){return $f(w(e,t,n,r,o,!0))}function no(e){return e?e.__v_isVNode===!0:!1}function ro(e,t){if(S.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ta.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 fv=(...e)=>Df(...e),Af=({key:e})=>e??null,ha=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?et(e)||Xe(e)||Ee(e)?{i:ut,r:e,k:t,f:!!n}:e:null);function H(e,t=null,n=null,r=0,o=null,s=e===$e?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Af(t),ref:t&&ha(t),scopeId:Id,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:ut};return a?(nu(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=et(n)?8:16),S.NODE_ENV!=="production"&&l.key!==l.key&&J("VNode created with invalid key (NaN). VNode type:",l.type),zs>0&&!i&&Yt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Yt.push(l),l}const w=S.NODE_ENV!=="production"?fv:Df;function Df(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Xd)&&(S.NODE_ENV!=="production"&&!e&&J(`Invalid vnode type when creating vnode: ${e}.`),e=at),no(e)){const a=yn(e,t,!0);return n&&nu(a,n),zs>0&&!s&&Yt&&(a.shapeFlag&6?Yt[Yt.indexOf(e)]=a:Yt.push(a)),a.patchFlag=-2,a}if(Uf(e)&&(e=e.__vccOpts),t){t=hv(t);let{class:a,style:l}=t;a&&!et(a)&&(t.class=Ss(a)),qe(l)&&($o(l)&&!ge(l)&&(l=it({},l)),t.style=Fi(l))}const i=et(e)?1:Tf(e)?128:Rd(e)?64:qe(e)?4:Ee(e)?2:0;return S.NODE_ENV!=="production"&&i&4&&$o(e)&&(e=Se(e),J("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)),H(e,t,n,r,o,i,s,!0)}function hv(e){return e?$o(e)||ff(e)?it({},e):e:null}function yn(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?ru(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Af(u),ref:t&&t.ref?n&&s?ge(s)?s.concat(ha(t)):[s,ha(t)]:ha(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:S.NODE_ENV!=="production"&&i===-1&&ge(a)?a.map(If):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?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&&yn(e.ssContent),ssFallback:e.ssFallback&&yn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Rs(c,l.clone(c)),c}function If(e){const t=yn(e);return ge(e.children)&&(t.children=e.children.map(If)),t}function M(e=" ",t=0){return w(Bs,null,e,t)}function Mf(e,t){const n=w(Hs,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(g(),Y(at,null,e)):w(at,null,e)}function _n(e){return e==null||typeof e=="boolean"?w(at):ge(e)?w($e,null,e.slice()):no(e)?Sr(e):w(Bs,null,String(e))}function Sr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:yn(e)}function nu(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ge(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),nu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ff(t)?t._ctx=ut:o===3&&ut&&(ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:ut},n=32):(t=String(t),r&64?(n=16,t=[M(t)]):n=8);e.children=t,e.shapeFlag|=n}function ru(...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=Ss([t.class,r.class]));else if(o==="style")t.style=Fi([t.style,r.style]);else if(Es(o)){const s=t[o],i=r[o];i&&s!==i&&!(ge(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Mn(e,t,n,r=null){gn(e,t,7,[n,r])}const pv=uf();let mv=0;function bv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||pv,s={uid:mv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Gc(!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:pf(r,o),emitsOptions:kf(r,o),emit:null,emitted:null,propsDefaults:Ze,inheritAttrs:r.inheritAttrs,ctx:Ze,data:Ze,props:Ze,attrs:Ze,slots:Ze,refs:Ze,setupState:Ze,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 S.NODE_ENV!=="production"?s.ctx=Og(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=sv.bind(null,s),e.ce&&e.ce(s),s}let ct=null;const pa=()=>ct||ut;let ma,ou;{const e=Os(),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)}};ma=t("__VUE_INSTANCE_SETTERS__",n=>ct=n),ou=t("__VUE_SSR_SETTERS__",n=>Zs=n)}const Ws=e=>{const t=ct;return ma(e),e.scope.on(),()=>{e.scope.off(),ma(t)}},Vf=()=>{ct&&ct.scope.off(),ma(null)},gv=Zn("slot,component");function su(e,{isNativeTag:t}){(gv(e)||t(e))&&J("Do not use built-in or reserved HTML elements as component id: "+e)}function Rf(e){return e.vnode.shapeFlag&4}let Zs=!1;function vv(e,t=!1,n=!1){t&&ou(t);const{props:r,children:o}=e.vnode,s=Rf(e);Rg(e,r,s,t),Yg(e,o,n||t);const i=s?yv(e,t):void 0;return t&&ou(!1),i}function yv(e,t){var n;const r=e.type;if(S.NODE_ENV!=="production"){if(r.name&&su(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)su(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)Md(s[i])}r.compilerOptions&&_v()&&J('"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,tf),S.NODE_ENV!=="production"&&Sg(e);const{setup:o}=r;if(o){pn();const s=e.setupContext=o.length>1?Ev(e):null,i=Ws(e),a=Ao(o,e,0,[S.NODE_ENV!=="production"?$n(e.props):e.props,s]),l=gl(a);if(mn(),i(),(l||e.sp)&&!Mo(e)&&Gd(e),l){if(a.then(Vf,Vf),t)return a.then(u=>{Lf(e,u,t)}).catch(u=>{Ds(u,e,0)});if(e.asyncDep=a,S.NODE_ENV!=="production"&&!e.suspense){const u=(n=r.name)!=null?n:"Anonymous";J(`Component <${u}>: 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 Lf(e,a,t)}else jf(e,t)}function Lf(e,t,n){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:qe(t)?(S.NODE_ENV!=="production"&&no(t)&&J("setup() should not return VNodes directly - return a render function instead."),S.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=yd(t),S.NODE_ENV!=="production"&&Ng(e)):S.NODE_ENV!=="production"&&t!==void 0&&J(`setup() should return an object. Received: ${t===null?"null":typeof t}`),jf(e,n)}const _v=()=>!0;function jf(e,t,n){const r=e.type;e.render||(e.render=r.render||pt);{const o=Ws(e);pn();try{Tg(e)}finally{mn(),o()}}S.NODE_ENV!=="production"&&!r.render&&e.render===pt&&!t&&(r.template?J('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".'):J("Component is missing template or render function: ",r))}const Ff=S.NODE_ENV!=="production"?{get(e,t){return fa(),mt(e,"get",""),e[t]},set(){return J("setupContext.attrs is readonly."),!1},deleteProperty(){return J("setupContext.attrs is readonly."),!1}}:{get(e,t){return mt(e,"get",""),e[t]}};function wv(e){return new Proxy(e.slots,{get(t,n){return mt(e,"get","$slots"),t[n]}})}function Ev(e){const t=n=>{if(S.NODE_ENV!=="production"&&(e.exposed&&J("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ge(n)?r="array":Xe(n)&&(r="ref")),r!=="object"&&J(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(S.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Ff))},get slots(){return r||(r=wv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Ff),slots:e.slots,emit:e.emit,expose:t}}function iu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(yd(_r(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Qr)return Qr[n](e)},has(t,n){return n in t||n in Qr}})):e.proxy}const xv=/(?:^|[-_])(\w)/g,kv=e=>e.replace(xv,t=>t.toUpperCase()).replace(/[-_]/g,"");function au(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function ba(e,t,n=!1){let r=au(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?kv(r):n?"App":"Anonymous"}function Uf(e){return Ee(e)&&"__vccOpts"in e}const se=(e,t)=>{const n=Lb(e,t,Zs);if(S.NODE_ENV!=="production"){const r=pa();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function dt(e,t,n){const r=arguments.length;return r===2?qe(t)&&!ge(t)?no(t)?w(e,null,[t]):w(e,t):w(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&no(n)&&(n=[n]),w(e,t,n))}function Ov(){if(S.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){if(!qe(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Xe(d)){pn();const f=d.value;return mn(),["div",{},["span",e,c(d)],"<",a(f),">"]}else{if(bn(d))return["div",{},["span",e,Mt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${An(d)?" (readonly)":""}`];if(An(d))return["div",{},["span",e,Mt(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return 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",Se(d.props))),d.setupState!==Ze&&f.push(i("setup",d.setupState)),d.data!==Ze&&f.push(i("data",Se(d.data)));const h=l(d,"computed");h&&f.push(i("computed",h));const p=l(d,"inject");return p&&f.push(i("injected",p)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=it({},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(h=>["div",{},["span",r,h+": "],a(f[h],!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]:qe(d)?["object",{object:f?Se(d):d}]:["span",n,String(d)]}function l(d,f){const h=d.type;if(Ee(h))return;const p={};for(const _ in d.ctx)u(h,_,f)&&(p[_]=d.ctx[_]);return p}function u(d,f,h){const p=d[h];if(ge(p)&&p.includes(f)||qe(p)&&f in p||d.extends&&u(d.extends,f,h)||d.mixins&&d.mixins.some(_=>u(_,f,h)))return!0}function c(d){return Mt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Bf="3.5.14",Xn=S.NODE_ENV!=="production"?J:pt;var Vn={};let lu;const Hf=typeof window<"u"&&window.trustedTypes;if(Hf)try{lu=Hf.createPolicy("vue",{createHTML:e=>e})}catch(e){Vn.NODE_ENV!=="production"&&Xn(`Error creating trusted types policy: ${e}`)}const qf=lu?e=>lu.createHTML(e):e=>e,Sv="http://www.w3.org/2000/svg",Nv="http://www.w3.org/1998/Math/MathML",Jn=typeof document<"u"?document:null,zf=Jn&&Jn.createElement("template"),Cv={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"?Jn.createElementNS(Sv,e):t==="mathml"?Jn.createElementNS(Nv,e):n?Jn.createElement(e,{is:n}):Jn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Jn.createTextNode(e),createComment:e=>Jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Jn.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{zf.innerHTML=qf(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=zf.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]}},Nr="transition",Ys="animation",Gs=Symbol("_vtc"),Wf={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},Tv=it({},Hd,Wf),Ks=(e=>(e.displayName="Transition",e.props=Tv,e))((e,{slots:t})=>dt(dg,Pv(e),t)),oo=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},Zf=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function Pv(e){const t={};for(const A in e)A in Wf||(t[A]=e[A]);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:h=`${n}-leave-to`}=e,p=$v(o),_=p&&p[0],E=p&&p[1],{onBeforeEnter:N,onEnter:q,onEnterCancelled:z,onLeave:B,onLeaveCancelled:L,onBeforeAppear:D=N,onAppear:m=q,onAppearCancelled:P=z}=t,I=(A,oe,ke,k)=>{A._enterCancelled=k,so(A,oe?c:a),so(A,oe?u:i),ke&&ke()},T=(A,oe)=>{A._isLeaving=!1,so(A,d),so(A,h),so(A,f),oe&&oe()},$=A=>(oe,ke)=>{const k=A?m:q,U=()=>I(oe,A,ke);oo(k,[oe,U]),Yf(()=>{so(oe,A?l:s),Qn(oe,A?c:a),Zf(k)||Gf(oe,r,_,U)})};return it(t,{onBeforeEnter(A){oo(N,[A]),Qn(A,s),Qn(A,i)},onBeforeAppear(A){oo(D,[A]),Qn(A,l),Qn(A,u)},onEnter:$(!1),onAppear:$(!0),onLeave(A,oe){A._isLeaving=!0;const ke=()=>T(A,oe);Qn(A,d),A._enterCancelled?(Qn(A,f),Jf()):(Jf(),Qn(A,f)),Yf(()=>{A._isLeaving&&(so(A,d),Qn(A,h),Zf(B)||Gf(A,r,E,ke))}),oo(B,[A,ke])},onEnterCancelled(A){I(A,!1,void 0,!0),oo(z,[A])},onAppearCancelled(A){I(A,!0,void 0,!0),oo(P,[A])},onLeaveCancelled(A){T(A),oo(L,[A])}})}function $v(e){if(e==null)return null;if(qe(e))return[uu(e.enter),uu(e.leave)];{const t=uu(e);return[t,t]}}function uu(e){const t=Q0(e);return Vn.NODE_ENV!=="production"&&zb(t,"<transition> explicit duration"),t}function Qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Gs]||(e[Gs]=new Set)).add(t)}function so(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Gs];n&&(n.delete(t),n.size||(e[Gs]=void 0))}function Yf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Av=0;function Gf(e,t,n,r){const o=e._endId=++Av,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=Dv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function Dv(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),o=r(`${Nr}Delay`),s=r(`${Nr}Duration`),i=Kf(o,s),a=r(`${Ys}Delay`),l=r(`${Ys}Duration`),u=Kf(a,l);let c=null,d=0,f=0;t===Nr?i>0&&(c=Nr,d=i,f=s.length):t===Ys?u>0&&(c=Ys,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Nr:Ys:null,f=c?c===Nr?s.length:l.length:0);const h=c===Nr&&/\b(transform|all)(,|$)/.test(r(`${Nr}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Kf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Xf(n)+Xf(e[r])))}function Xf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Jf(){return document.body.offsetHeight}function Iv(e,t,n){const r=e[Gs];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qf=Symbol("_vod"),Mv=Symbol("_vsh"),Vv=Symbol(Vn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Rv=/(^|;)\s*display\s*:/;function Lv(e,t,n){const r=e.style,o=et(n);let s=!1;if(n&&!o){if(t)if(et(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&ga(r,a,"")}else for(const i in t)n[i]==null&&ga(r,i,"");for(const i in n)i==="display"&&(s=!0),ga(r,i,n[i])}else if(o){if(t!==n){const i=r[Vv];i&&(n+=";"+i),r.cssText=n,s=Rv.test(n)}}else t&&e.removeAttribute("style");Qf in e&&(e[Qf]=s?r.display:"",e[Mv]&&(r.display="none"))}const jv=/[^\\];\s*$/,eh=/\s*!important$/;function ga(e,t,n){if(ge(n))n.forEach(r=>ga(e,t,r));else if(n==null&&(n=""),Vn.NODE_ENV!=="production"&&jv.test(n)&&Xn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Fv(e,t);eh.test(n)?e.setProperty(vr(r),n.replace(eh,""),"important"):e[r]=n}}const th=["Webkit","Moz","ms"],cu={};function Fv(e,t){const n=cu[t];if(n)return n;let r=It(t);if(r!=="filter"&&r in e)return cu[t]=r;r=zr(r);for(let o=0;o<th.length;o++){const s=th[o]+r;if(s in e)return cu[t]=s}return t}const nh="http://www.w3.org/1999/xlink";function rh(e,t,n,r,o,s=cb(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(nh,t.slice(6,t.length)):e.setAttributeNS(nh,t,n):n==null||s&&!Wc(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Yn(n)?String(n):n)}function oh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?qf(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const a=s==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Wc(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch(a){Vn.NODE_ENV!=="production"&&!i&&Xn(`Failed setting prop "${t}" on <${s.toLowerCase()}>: value ${n} is invalid.`,a)}i&&e.removeAttribute(o||t)}function Uv(e,t,n,r){e.addEventListener(t,n,r)}function Bv(e,t,n,r){e.removeEventListener(t,n,r)}const sh=Symbol("_vei");function Hv(e,t,n,r,o=null){const s=e[sh]||(e[sh]={}),i=s[t];if(r&&i)i.value=Vn.NODE_ENV!=="production"?ah(r,t):r;else{const[a,l]=qv(t);if(r){const u=s[t]=Zv(Vn.NODE_ENV!=="production"?ah(r,t):r,o);Uv(e,a,u,l)}else i&&(Bv(e,a,i,l),s[t]=void 0)}}const ih=/(?:Once|Passive|Capture)$/;function qv(e){let t;if(ih.test(e)){t={};let r;for(;r=e.match(ih);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vr(e.slice(2)),t]}let du=0;const zv=Promise.resolve(),Wv=()=>du||(zv.then(()=>du=0),du=Date.now());function Zv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gn(Yv(r,n.value),t,5,[r])};return n.value=e,n.attached=Wv(),n}function ah(e,t){return Ee(e)||ge(e)?e:(Xn(`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}.`),pt)}function Yv(e,t){if(ge(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 lh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?Iv(e,r,i):t==="style"?Lv(e,n,r):Es(t)?Vi(t)||Hv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kv(e,t,r,i))?(oh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&rh(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!et(r))?oh(e,It(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),rh(e,t,r,i))};function Kv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&lh(t)&&Ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||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 lh(t)&&et(n)?!1:t in e}const Xv=["ctrl","shift","alt","meta"],Jv={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)=>Xv.some(n=>e[`${n}Key`]&&!t.includes(n))},Cr=(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=Jv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Qv=it({patchProp:Gv},Cv);let uh;function ey(){return uh||(uh=Xg(Qv))}const ty=(...e)=>{const t=ey().createApp(...e);Vn.NODE_ENV!=="production"&&(ry(t),oy(t));const{mount:n}=t;return t.mount=r=>{const o=sy(r);if(!o)return;const s=t._component;!Ee(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,ny(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function ny(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ry(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>ab(t)||lb(t)||ub(t),writable:!1})}function oy(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){Xn("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 Xn(r),n},set(){Xn(r)}})}}function sy(e){if(et(e)){const t=document.querySelector(e);return Vn.NODE_ENV!=="production"&&!t&&Xn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return Vn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&Xn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var iy={};function ay(){Ov()}iy.NODE_ENV!=="production"&&ay();let va;const ly=new Uint8Array(16);function uy(){if(!va&&(va=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!va))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return va(ly)}const wt=[];for(let e=0;e<256;++e)wt.push((e+256).toString(16).slice(1));function cy(e,t=0){return wt[e[t+0]]+wt[e[t+1]]+wt[e[t+2]]+wt[e[t+3]]+"-"+wt[e[t+4]]+wt[e[t+5]]+"-"+wt[e[t+6]]+wt[e[t+7]]+"-"+wt[e[t+8]]+wt[e[t+9]]+"-"+wt[e[t+10]]+wt[e[t+11]]+wt[e[t+12]]+wt[e[t+13]]+wt[e[t+14]]+wt[e[t+15]]}const ch={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xs(e,t,n){if(ch.randomUUID&&!e)return ch.randomUUID();e=e||{};const r=e.random||(e.rng||uy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,cy(r)}var Gt=Symbol("storefront");function dy(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var fy=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional(),completed:v.boolean()}),hy=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:ml.orders.completedOrderSchema}),py=v.discriminatedUnion("event",[fy,hy]);function my(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function ya(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}if(document.getElementById("moonbase-checkout"))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=py.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 Js=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=V(null),this.loadedUser=V(!1),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent=dy(l=>this.client.orders.pushContent(l,void 0,this.hasUtmOrReferrer?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=V({id:Xs(),status:Co.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(lt.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(lt.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:sessionStorage).setItem(lt.utmKey,JSON.stringify(this.utm.value));else{const l=(t.persistUtm?localStorage:sessionStorage).getItem(lt.utmKey);if(l)try{const u=JSON.parse(l);this.utm.value=u}catch(u){console.warn(`Could not parse cached UTM from ${lt.utmKey}`,u)}}const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=V(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=V({id:Xs(),status:Co.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtmOrReferrer&&this.pushOrderContent());const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.user&&(this.currentUser.value=ml.identity.userSchema.parse(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(([h])=>!h.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const h of Object.keys(d))f.searchParams.append(h,d[h]);ya(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",l=>{l.detail.order.id===this.currentOrder.value.id&&this.resetOrder(),this.updateUser()})}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get hasUtm(){return!!this.utm.value&&!!(this.utm.value.source||this.utm.value.medium||this.utm.value.campaign||this.utm.value.term||this.utm.value.content)}get hasUtmOrReferrer(){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(){my()}onCheckoutInitiated(t){window.addEventListener("moonbase-checkout-initiated",n=>t(n.detail.order,n.detail.total))}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(Gt,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 Ai||console.error("Could not load user",t),this.currentUser.value=null}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(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency),this.currentOrder.value.items=this.enrichLineItems(this.currentOrder.value.items)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.refreshOrderAbortController.abort(),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){var n;switch(t.key){case lt.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:Xs(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:Co.Open,items:[],couponsApplied:[]};break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case lt.utmKey:this.utm.value=JSON.parse(t.newValue);break;case jc.storageKey:t.newValue?console.warn("User was updated",t.newValue):(this.currentUser.value=null,console.warn("User was removed"))}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id,{abort:this.refreshOrderAbortController.signal});t&&(t.status!==Co.Open?this.resetOrder():(t.items=this.enrichLineItems(t.items),typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t instanceof kc&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Xs(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Co.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof br)return;console.warn("Could not surrender order:",t)}}enrichLineItems(t){return this.storefront?t.map(n=>{var r,o;if(n.type==="Product"){const s=this.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=this.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}}}):t}};Js.userKey="moonbase_user",Js.sessionKey="moonbase_session",Js.storefrontKey="moonbase_storefront",Js.utmKey="moonbase_utm";var by=Js;function gy(e,t){const n=ve(Gt);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${wr(e)}`,null),o=n.stateFactory(`activation-request-${wr(e)}-error`,null),s=n.stateFactory(`activation-request-${wr(e)}-loading`,!0),i=n.stateFactory(`activation-request-${wr(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${wr(e)}-completing`,!1),l=n.stateFactory(`activation-request-${wr(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=fn.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>wr(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===fn.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d.message,s.value=!1}},{immediate:!0}),Ul(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=wr(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===fn.Fulfilled&&(a.value=!0,u())}catch(h){o.value=h.message}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:se(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===fn.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;try{r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0;const c=u()}catch(c){console.warn("Could not fulfill trial: ",c),c instanceof Ai?o.value="You need to be signed in to do this":o.value=c.message,i.value=!1}},cancel:async()=>{!r.value||r.value.status===fn.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function tt(e){const t=e??ve(Gt);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.clear(),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=i.user),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 _a(e,t){const n=t??ve(Gt);if(!n)throw new Error("No storefront configured");return se(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function vy(e){const t=ve(Gt);if(!t)throw new Error("No storefront configured");return se(()=>t.storefront.value.bundles)}function Tr(e){const t=e??ve(Gt);if(!t)throw new Error("No storefront configured");const n=se(()=>{const r=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((s,i)=>{var a,l,u,c,d,f,h,p,_;let E;if(i.type==="Product"){const N=t.storefront.value.products.find(D=>D.id===i.productId),z=((N==null?void 0:N.variations)||[]).find(D=>D.id===i.variationId),B=(l=(a=z==null?void 0:z.pricingTiers)==null?void 0:a.filter(D=>i.quantity>=D.minQuantity))!=null?l:[],L=B.length>0?B[B.length-1]:null;E=(f=(d=(u=L==null?void 0:L.price[r])!=null?u:z==null?void 0:z.price[r])!=null?d:(c=N==null?void 0:N.defaultVariation)==null?void 0:c.price[r])!=null?f:0}else{const N=t.storefront.value.bundles.find(B=>B.id===i.bundleId),z=((N==null?void 0:N.variations)||[]).find(B=>B.id===i.variationId);E=(_=(p=z==null?void 0:z.price[r])!=null?p:(h=N==null?void 0:N.defaultVariation)==null?void 0:h.price[r])!=null?_:0}return s+E*i.quantity},0),currency:r}});return{items:se(()=>t.enrichLineItems(t.currentOrder.value.items)),currency:se(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:n,addToCart:(r,o)=>{var s,i;if(r=b(r),o??(o=r.defaultVariation),!o)throw new Error("Added item does not have a default variation, and none have been specified");const a=`${r.type==="bundle"?"b":"p"}/${r.id}/${o.id}`;let l=t.currentOrder.value.items.find(u=>u.id===a);if(l)l.quantity+=1,!l.variation&&o&&(l.variation=o),!l.price&&o&&(l.price=o.price),!l.appliedDiscount&&o.discount&&(l.appliedDiscount=o.discount),l.type==="Product"&&r.type==="product"&&!l.product&&(l.product=r),l.type==="Bundle"&&r.type==="bundle"&&!l.bundle&&(l.bundle=r);else if(r.type==="bundle")l={id:a,type:"Bundle",bundleId:r.id,bundle:r,quantity:1,variation:o,variationId:o.id,price:o.price,appliedDiscount:o.discount,isDefaultVariation:o.id===((s=r.defaultVariation)==null?void 0:s.id)},t.currentOrder.value.items.push(l);else if(r.type==="product")l={id:a,type:"Product",productId:r.id,product:r,quantity:1,variation:o,variationId:o.id,price:o.price,appliedDiscount:o.discount,isDefaultVariation:o.id===((i=r.defaultVariation)==null?void 0:i.id)},t.currentOrder.value.items.push(l);else throw new Tn("Invalid input",`Could not handle item of type '${r.type}'`);return t.pushOrderContent(),l},setQuantity:(r,o)=>{const s=t.currentOrder.value.items.find(i=>i.id===r.id);if(!s)throw new Error("Cart item not found");if(s.quantity=o,s.quantity<=0){const i=t.currentOrder.value.items.findIndex(a=>a.id===s.id);t.currentOrder.value.items.splice(i,1)}return t.pushOrderContent(),r},removeFromCart:r=>{const o=t.currentOrder.value.items.findIndex(s=>s.id===r.id);t.currentOrder.value.items.splice(o,1),t.pushOrderContent()},checkout:async r=>{var o;const s=typeof window<"u"?window.location.pathname:"",i=new URL((o=r.returnUrl)!=null?o:s,document.baseURI).href,a=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:i},t.hasUtm?t.utm.value:void 0);if(a.items=t.enrichLineItems(a.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:a,total:n.value}})),!r.redirect&&a.embeddedCheckoutUrl&&typeof window<"u"){const l=a.embeddedCheckoutUrl;return new Promise(u=>{ya(l.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",c=>{const d=c;u({next:d.detail.intent,completed:d.detail.completed})},{once:!0})})}else{if(r.redirect&&a.checkoutUrl&&typeof window<"u")return window.location.href=a.checkoutUrl,{next:void 0,completed:!1};throw new Error("No checkout URL found")}}}}async function yy(e,t,n){var r,o;const s=n??ve(Gt);if(!s)throw new Error("No storefront configured");const i=[];for(const c of e){const d=b(c.item),f=(r=c.variation)!=null?r:d.defaultVariation;if(!f)throw new Error("Added item does not have a default variation, and none have been specified");const h=`${d.type==="bundle"?"b":"p"}/${d.id}/${f.id}`;if(d.type==="bundle")i.push({id:h,type:"Bundle",bundleId:d.id,bundle:d,quantity:1,variation:f,variationId:f.id,price:f.price,appliedDiscount:f.discount});else if(d.type==="product")i.push({id:h,type:"Product",productId:d.id,product:d,quantity:1,variation:f,variationId:f.id,price:f.price,appliedDiscount:f.discount});else throw new Tn("Invalid input",`Could not handle item of type '${c.type}'`)}const a=typeof window<"u"?window.location.pathname:"",l=new URL((o=t.returnUrl)!=null?o:a,document.baseURI).href,u=await s.client.orders.pushContent({id:Xs(),currency:s.storefront.value.suggestedCurrency,items:i},{returnUrl:l},s.hasUtm?s.utm.value:void 0);if(u.items=s.enrichLineItems(u.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:u,total:{amount:e.reduce((c,d)=>{var f,h;return c+((h=(f=d.variation)==null?void 0:f.price[u.currency])!=null?h:0)},0),currency:u.currency}}})),!t.redirect&&u.embeddedCheckoutUrl&&typeof window<"u"){const c=u.embeddedCheckoutUrl;return new Promise(d=>{ya(c.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",f=>{const h=f;d({next:h.detail.intent,completed:h.detail.completed})},{once:!0})})}else{if(t.redirect&&u.checkoutUrl&&typeof window<"u")return window.location.href=u.checkoutUrl,Promise.resolve({next:void 0,completed:!1});throw new Error("No checkout URL found")}}function io(e){const t=ve(Gt);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)},getSubscriptions:async n=>t.client.inventory.subscriptions.get(n),getSubscription:async n=>t.client.inventory.subscriptions.getById(n),cancelSubscription:async n=>t.client.inventory.subscriptions.cancel(n),renewSubscription:async(n,r)=>{var o;const s=typeof window<"u"?window.location.pathname:"",i=new URL((o=r.returnUrl)!=null?o:s,document.baseURI).href,{location:a}=await t.client.inventory.subscriptions.renew(n,i,!r.redirect);return r.redirect?(window.location.href=a,Promise.resolve({next:void 0,completed:!1})):new Promise(l=>{ya(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{const c=u;l({next:c.detail.intent,completed:c.detail.completed})},{once:!0})})}}}function Qs(e,t){const n=t??ve(Gt);if(!n)throw new Error("No storefront configured");return se(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function _y(e){const t=ve(Gt);if(!t)throw new Error("No storefront configured");return se(()=>t.storefront.value.products)}function dh(e){const t=ve(Gt);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 br?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof br?new Error("Voucher code invalid"):r}}}}function wy(e,t,n){const r={endpoint:e};return new by(r,new W0(r),(o,s)=>V(s))}function wa(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 fu(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Ey(){return fh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function fh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const xy=typeof Proxy=="function",ky="devtools-plugin:setup",Oy="plugin:settings:set";let Lo,hu;function Sy(){var e;return Lo!==void 0||(typeof window<"u"&&window.performance?(Lo=!0,hu=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Lo=!0,hu=globalThis.perf_hooks.performance):Lo=!1),Lo}function Ny(){return Sy()?hu.now():Date.now()}class Cy{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 Ny()}},n&&n.on(Oy,(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 hh(e,t){const n=e,r=fh(),o=Ey(),s=xy&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ky,e,t);else{const i=s?new Cy(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var je={};let ei;const ti=e=>ei=e,ph=je.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ao(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Rn||(Rn={}));const Pr=typeof window<"u",mh=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 Ty(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 pu(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){vh(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function bh(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ea(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 xa=typeof navigator=="object"?navigator:{userAgent:""},gh=/Macintosh/.test(xa.userAgent)&&/AppleWebKit/.test(xa.userAgent)&&!/Safari/.test(xa.userAgent),vh=Pr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!gh?Py:"msSaveOrOpenBlob"in xa?$y:Ay:()=>{};function Py(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?bh(r.href)?pu(e,t,n):(r.target="_blank",Ea(r)):Ea(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ea(r)},0))}function $y(e,t="download",n){if(typeof e=="string")if(bh(e))pu(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ea(r)})}else navigator.msSaveOrOpenBlob(Ty(e,n),t)}function Ay(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return pu(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(mh.HTMLElement))||"safari"in mh,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||gh)&&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 bt(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 mu(e){return"_a"in e&&"install"in e}function yh(){if(!("clipboard"in navigator))return bt("Your browser doesn't support the Clipboard API","error"),!0}function _h(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(bt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Dy(e){if(!yh())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),bt("Global state copied to clipboard.")}catch(t){if(_h(t))return;bt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Iy(e){if(!yh())try{wh(e,JSON.parse(await navigator.clipboard.readText())),bt("Global state pasted from clipboard.")}catch(t){if(_h(t))return;bt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function My(e){try{vh(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){bt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let er;function Vy(){er||(er=document.createElement("input"),er.type="file",er.accept=".json");function e(){return new Promise((t,n)=>{er.onchange=async()=>{const r=er.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},er.oncancel=()=>t(null),er.onerror=n,er.click()})}return e}async function Ry(e){try{const n=await Vy()();if(!n)return;const{text:r,file:o}=n;wh(e,JSON.parse(r)),bt(`Global state imported from "${o.name}".`)}catch(t){bt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function wh(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 wn(e){return{_custom:{display:e}}}const Eh="🍍 Pinia (root)",ka="_root";function Ly(e){return mu(e)?{id:ka,label:Eh}:{id:e.$id,label:e.$id}}function jy(e){if(mu(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 Fy(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:wn(e.type),key:wn(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Uy(e){switch(e){case Rn.direct:return"mutation";case Rn.patchFunction:return"$patch";case Rn.patchObject:return"$patch";default:return"unknown"}}let jo=!0;const Oa=[],lo="pinia:mutations",Nt="pinia",{assign:By}=Object,Sa=e=>"🍍 "+e;function Hy(e,t){hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Oa,app:e},n=>{typeof n.now!="function"&&bt("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:lo,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Nt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Dy(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Iy(t),n.sendInspectorTree(Nt),n.sendInspectorState(Nt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{My(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ry(t),n.sendInspectorTree(Nt),n.sendInspectorState(Nt)},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"?bt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),bt(`Store "${r}" reset.`)):bt(`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:Sa(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:Se(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:Sa(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===Nt){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()):Eh.toLowerCase().includes(r.filter.toLowerCase())):o).map(Ly)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===Nt){const o=r.nodeId===ka?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==ka&&(globalThis.$store=Se(o)),r.state=jy(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===Nt){const s=r.nodeId===ka?t:t._s.get(r.nodeId);if(!s)return bt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;mu(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),jo=!1,r.set(s,i,r.state.value),jo=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return bt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return bt(`Invalid path for store "${o}":
|
|
16
16
|
${i}
|
|
17
|
-
Only state can be modified.`);i[0]="$state",jo=!1,r.set(s,i,r.state.value),jo=!0}})})}function qy(e,t){Oa.includes(Sa(t.$id))||Oa.push(Sa(t.$id)),hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Oa,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=xh++;n.addTimelineEvent({layerId:lo,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:wn(t.$id),action:wn(l),args:u},groupId:c}}),i(d=>{$r=void 0,n.addTimelineEvent({layerId:lo,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:wn(t.$id),action:wn(l),args:u,result:d},groupId:c}})}),a(d=>{$r=void 0,n.addTimelineEvent({layerId:lo,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:wn(t.$id),action:wn(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{
|
|
17
|
+
Only state can be modified.`);i[0]="$state",jo=!1,r.set(s,i,r.state.value),jo=!0}})})}function qy(e,t){Oa.includes(Sa(t.$id))||Oa.push(Sa(t.$id)),hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Oa,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=xh++;n.addTimelineEvent({layerId:lo,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:wn(t.$id),action:wn(l),args:u},groupId:c}}),i(d=>{$r=void 0,n.addTimelineEvent({layerId:lo,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:wn(t.$id),action:wn(l),args:u,result:d},groupId:c}})}),a(d=>{$r=void 0,n.addTimelineEvent({layerId:lo,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:wn(t.$id),action:wn(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Je(()=>b(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(Nt),jo&&n.addTimelineEvent({layerId:lo,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:$r}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Nt),!jo)return;const u={time:r(),title:Uy(a),data:By({store:wn(t.$id)},Fy(i)),groupId:$r};a===Rn.patchFunction?u.subtitle="⤵️":a===Rn.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:lo,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=_r(i=>{o(i),n.addTimelineEvent({layerId:lo,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:wn(t.$id),info:wn("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Nt),n.sendInspectorState(Nt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(Nt),n.sendInspectorState(Nt),n.getSettings().logStoreChanges&&bt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Nt),n.sendInspectorState(Nt),n.getSettings().logStoreChanges&&bt(`"${t.$id}" store installed 🆕`)})}let xh=0,$r;function kh(e,t,n){const r=t.reduce((o,s)=>(o[s]=Se(e)[s],o),{});for(const o in r)e[o]=function(){const s=xh,i=n?new Proxy(e,{get(...l){return $r=s,Reflect.get(...l)},set(...l){return $r=s,Reflect.set(...l)}}):e;$r=s;const a=r[o].apply(i,arguments);return $r=void 0,a}}function zy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){kh(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;Se(t)._hotUpdate=function(o){r.apply(this,arguments),kh(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}qy(e,t)}}function Wy(){const e=Kc(!0),t=e.run(()=>V({}));let n=[],r=[];const o=_r({install(s){ti(o),o._a=s,s.provide(ph,o),s.config.globalProperties.$pinia=o,je.NODE_ENV!=="production"&&je.NODE_ENV!=="test"&&Pr&&Hy(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return this._a?n.push(s):r.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return je.NODE_ENV!=="production"&&je.NODE_ENV!=="test"&&Pr&&typeof Proxy<"u"&&o.use(zy),o}function Oh(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];ao(o)&&ao(r)&&!Xe(r)&&!bn(r)?e[n]=Oh(o,r):e[n]=r}return e}const Sh=()=>{};function Nh(e,t,n,r=Sh){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Xc()&&db(o),o}function Fo(e,...t){e.slice().forEach(n=>{n(...t)})}const Zy=e=>e(),Ch=Symbol(),bu=Symbol();function gu(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];ao(o)&&ao(r)&&e.hasOwnProperty(n)&&!Xe(r)&&!bn(r)?e[n]=gu(o,r):e[n]=r}return e}const Yy=je.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Gy(e){return!ao(e)||!e.hasOwnProperty(Yy)}const{assign:on}=Object;function Th(e){return!!(Xe(e)&&e.effect)}function Ph(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(je.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=je.NODE_ENV!=="production"&&r?_d(V(o?o():{}).value):_d(n.state.value[e]);return on(c,s,Object.keys(i||{}).reduce((d,f)=>(je.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]=_r(se(()=>{ti(n);const h=n._s.get(e);return i[f].call(h,h)})),d),{}))}return l=vu(e,u,t,n,r,!0),l}function vu(e,t,n={},r,o,s){let i;const a=on({actions:{}},n);if(je.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};je.NODE_ENV!=="production"&&(l.onTrigger=T=>{u?h=T:u==!1&&!m._hotUpdating&&(Array.isArray(h)?h.push(T):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],h;const p=r.state.value[e];!s&&!p&&(je.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const _=V({});let E;function N(T){let $;u=c=!1,je.NODE_ENV!=="production"&&(h=[]),typeof T=="function"?(T(r.state.value[e]),$={type:Rn.patchFunction,storeId:e,events:h}):(gu(r.state.value[e],T),$={type:Rn.patchObject,payload:T,storeId:e,events:h});const A=E=Symbol();Qi().then(()=>{E===A&&(u=!0)}),c=!0,Fo(d,$,r.state.value[e])}const q=s?function(){const{state:$}=n,A=$?$():{};this.$patch(oe=>{on(oe,A)})}:je.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Sh;function z(){i.stop(),d=[],f=[],r._s.delete(e)}const B=(T,$="")=>{if(Ch in T)return T[bu]=$,T;const A=function(){ti(r);const oe=Array.from(arguments),ke=[],k=[];function U(me){ke.push(me)}function R(me){k.push(me)}Fo(f,{args:oe,name:A[bu],store:m,after:U,onError:R});let te;try{te=T.apply(this&&this.$id===e?this:m,oe)}catch(me){throw Fo(k,me),me}return te instanceof Promise?te.then(me=>(Fo(ke,me),me)).catch(me=>(Fo(k,me),Promise.reject(me))):(Fo(ke,te),te)};return A[Ch]=!0,A[bu]=$,A},L=_r({actions:{},getters:{},state:[],hotState:_}),D={_p:r,$id:e,$onAction:Nh.bind(null,f),$patch:N,$reset:q,$subscribe(T,$={}){const A=Nh(d,T,$.detached,()=>oe()),oe=i.run(()=>Je(()=>r.state.value[e],ke=>{($.flush==="sync"?c:u)&&T({storeId:e,type:Rn.direct,events:h},ke)},on({},l,$)));return A},$dispose:z},m=As(je.NODE_ENV!=="production"||je.NODE_ENV!=="production"&&je.NODE_ENV!=="test"&&Pr?on({_hmrPayload:L,_customProperties:_r(new Set)},D):D);r._s.set(e,m);const I=(r._a&&r._a.runWithContext||Zy)(()=>r._e.run(()=>(i=Kc()).run(()=>t({action:B}))));for(const T in I){const $=I[T];if(Xe($)&&!Th($)||bn($))je.NODE_ENV!=="production"&&o?wa(_.value,T,$l(I,T)):s||(p&&Gy($)&&(Xe($)?$.value=p[T]:gu($,p[T])),r.state.value[e][T]=$),je.NODE_ENV!=="production"&&L.state.push(T);else if(typeof $=="function"){const A=je.NODE_ENV!=="production"&&o?$:B($,T);I[T]=A,je.NODE_ENV!=="production"&&(L.actions[T]=$),a.actions[T]=$}else je.NODE_ENV!=="production"&&Th($)&&(L.getters[T]=s?n.getters[T]:$,Pr&&(I._getters||(I._getters=_r([]))).push(T))}if(on(m,I),on(Se(m),I),Object.defineProperty(m,"$state",{get:()=>je.NODE_ENV!=="production"&&o?_.value:r.state.value[e],set:T=>{if(je.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");N($=>{on($,T)})}}),je.NODE_ENV!=="production"&&(m._hotUpdate=_r(T=>{m._hotUpdating=!0,T._hmrPayload.state.forEach($=>{if($ in m.$state){const A=T.$state[$],oe=m.$state[$];typeof A=="object"&&ao(A)&&ao(oe)?Oh(A,oe):T.$state[$]=oe}wa(m,$,$l(T.$state,$))}),Object.keys(m.$state).forEach($=>{$ in T.$state||fu(m,$)}),u=!1,c=!1,r.state.value[e]=$l(T._hmrPayload,"hotState"),c=!0,Qi().then(()=>{u=!0});for(const $ in T._hmrPayload.actions){const A=T[$];wa(m,$,B(A,$))}for(const $ in T._hmrPayload.getters){const A=T._hmrPayload.getters[$],oe=s?se(()=>(ti(r),A.call(m,m))):A;wa(m,$,oe)}Object.keys(m._hmrPayload.getters).forEach($=>{$ in T._hmrPayload.getters||fu(m,$)}),Object.keys(m._hmrPayload.actions).forEach($=>{$ in T._hmrPayload.actions||fu(m,$)}),m._hmrPayload=T._hmrPayload,m._getters=T._getters,m._hotUpdating=!1})),je.NODE_ENV!=="production"&&je.NODE_ENV!=="test"&&Pr){const T={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach($=>{Object.defineProperty(m,$,on({value:m[$]},T))})}return r._p.forEach(T=>{if(je.NODE_ENV!=="production"&&je.NODE_ENV!=="test"&&Pr){const $=i.run(()=>T({store:m,app:r._a,pinia:r,options:a}));Object.keys($||{}).forEach(A=>m._customProperties.add(A)),on(m,$)}else on(m,i.run(()=>T({store:m,app:r._a,pinia:r,options:a})))}),je.NODE_ENV!=="production"&&m.$state&&typeof m.$state=="object"&&typeof m.$state.constructor=="function"&&!m.$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 "${m.$id}".`),p&&s&&n.hydrate&&n.hydrate(m.$state,p),u=!0,c=!0,m}/*! #__NO_SIDE_EFFECTS__ */function Ky(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=Vg();if(a=(je.NODE_ENV==="test"&&ei&&ei._testing?null:a)||(u?ve(ph,null):null),a&&ti(a),je.NODE_ENV!=="production"&&!ei)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
21
|
This will fail in production.`);a=ei,a._s.has(r)||(s?vu(r,t,o,a):Ph(r,o,a),je.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(je.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?vu(d,t,o,a,!0):Ph(d,on({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(je.NODE_ENV!=="production"&&Pr){const d=pa();if(d&&d.proxy&&!l){const f=d.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[r]=c}}return c}return i.$id=r,i}var Q=(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.ViewSubscriptions="view_subscriptions",e.RedeemVoucher="redeem_voucher",e.ViewProduct="view_product",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ManageSubscription="manage_subscription",e.ViewCart="view_cart",e.Purchase="purchase",e.AddToCart="add_to_cart",e.Checkout="checkout",e.CloseCheckout="close_checkout",e.ViewAbout="view_about",e))(Q||{});const $h={toolbar:{enabled:!0,location:"top-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{signIn:{enabled:!0,hint:void 0},signUp:{enabled:!0}},checkout:{redirect:!1},cart:{quantity:"selectable"},activation:{deviceTokenFileExtension:".dt",licenseTokenFileName:"license-file.mb"},theme:{dark:!1,colors:{primary:{50:"#E8F1FE",100:"#B8D5FB",200:"#96C0F9",300:"#66A4F6",400:"#4892F5",500:"#1A77F2",600:"#186CDC",700:"#1254AC",800:"#0E4185",900:"#0B3266"},background:"white"},fonts:{heading:"Montserrat",body:"Inter"},corners:"soft",buttons:"light",cards:"outlined"},target:void 0},Et=Symbol("options");function Uo(...e){}function Xy(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(let s=0;s<o;s++){const i=n[s];if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1}return!0}var yu=(e=>(e[e.Forward=0]="Forward",e[e.Back=1]="Back",e))(yu||{}),ue=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Redeem="Redeem",e.Cart="Cart",e.Activation="Activation",e.Product="Product",e.Subscription="Subscription",e.About="About",e))(ue||{});const Ae=Ky("ui",()=>{const e=V(0),t=V("None"),n=V(null),r=V(null),o=V([]),s=V([]);function i(h,p,_,E){h===t.value&&p===n.value&&Xy(r.value,_??null)||(t.value!=="None"&&s.value.push([t.value,n.value,r.value??void 0]),E&&(s.value=[]),e.value=0,r.value=_??null,n.value=p,t.value=h)}function a(h,p,_){o.value.push([h,p,_??void 0])}function l(){t.value="None",r.value=null,o.value=[],s.value=[]}function u(){if(o.value.length>0){const h=o.value[o.value.length-1];s.value=[];const[p,_,E]=h;e.value=0,r.value=E??null,n.value=_,t.value=p,o.value.pop()}else l()}function c(h){return r.value===null||!r.value[h]?null:r.value[h]}function d(){if(s.value.length===0)return;const h=s.value.pop();if(!h)return;const[p,_,E]=h;e.value=1,r.value=E??null,n.value=_,t.value=p}const f=se(()=>o.value.length===0?null:o.value[o.value.length-1]);return{direction:e,active:t,intent:n,parameters:r,queue:o,next:f,history:s,show:i,reset:l,enqueue:a,dequeue:u,back:d,getParameter:c}});class Jy{constructor(){go(this,"current",this.detect());go(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 ni=new Jy;function Ah(e,t,n,r){ni.isServer||Zt(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Dh(e,t,n,r){ni.isServer||Zt(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var ri=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ri||{});function Qy(){const e=V(0),t=V(!0);return Dh(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Kt(e,t,...n){if(e in t){const o=t[e];return typeof o=="function"?o(...n):o}throw new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`)}var Bo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Bo||{}),Ar=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ar||{});function Ct({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Mh(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return Na(i);if(t&1){const a=s.unmount??!0?0:1;return Kt(a,{0(){return null},1(){return Na({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Na(i)}function Na({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=_u(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,h]of Object.entries(r))typeof h=="boolean"&&(c=!0),h===!0&&d.push(f);c&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Ih(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!e1(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(p=>p.trim()).filter((p,_,E)=>E.indexOf(p)===_).sort((p,_)=>p.localeCompare(_)).map(p=>` - ${p}`).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(p=>` - ${p}`).join(`
|
|
23
23
|
`)].join(`
|
|
24
|
-
`));const f=Mh(c.props??{},i,l),h=yn(c,f,!0);for(const p in f)p.startsWith("on")&&(h.props||(h.props={}),h.props[p]=f[p]);return h}return Array.isArray(a)&&a.length===1?a[0]:a}return dt(s,Object.assign({},i,l),{default:()=>a})}function Ih(e){return e.flatMap(t=>t.type===$e?Ih(t.children):[t])}function Mh(...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 _u(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function e1(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var oi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oi||{});let si=pe({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 Ct({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function t1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function Ve(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Ho(e){if(ni.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e&&Object.prototype.hasOwnProperty.call(e,"value")){const t=Ve(e);if(t)return t.ownerDocument}return document}const Ca=["[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 gt=(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))(gt||{}),qo=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(qo||{});function n1(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ca)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Vh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Vh||{});function r1(e,t=0){var n;return e===((n=Ho(e))==null?void 0:n.body)?!1:Kt(t,{0(){return e.matches(Ca)},1(){let r=e;for(;r!==null;){if(r.matches(Ca))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 uo(e){e==null||e.focus({preventScroll:!0})}const o1=["textarea","input"].join(",");function s1(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,o1))??!1}function zo(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 Ln(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?zo(e):e:n1(e);o.length>0&&i.length>1&&(i=i.filter(h=>!o.includes(h))),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 h=l+c;if(t&16)h=(h+d)%d;else{if(h<0)return 3;if(h>=d)return 1}f=i[h],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&s1(f)&&f.select(),2}let co=[];t1(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||co[0]===t.target)return;let n=t.target;n=n.closest(Ca),co.unshift(n??t.target),co=co.filter(r=>r!=null&&r.isConnected),co.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 Ta(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rh(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=Ve(n);r instanceof HTMLElement&&t.add(r)}return t}var Lh=(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))(Lh||{});const ii=Object.assign(pe({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:V(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=V(null);r({el:o,$el:o});const s=se(()=>Ho(o)),i=V(!1);He(()=>i.value=!0),Rt(()=>i.value=!1),a1({ownerDocument:s},se(()=>i.value&&!!(e.features&16)));const a=l1({ownerDocument:s,container:o,initialFocus:se(()=>e.initialFocus)},se(()=>i.value&&!!(e.features&2)));u1({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},se(()=>i.value&&!!(e.features&8)));const l=Qy();function u(h){const p=Ve(o);if(!p)return;(E=>E())(()=>{Kt(l.value,{[ri.Forwards]:()=>{Ln(p,gt.First,{skipElements:[h.relatedTarget]})},[ri.Backwards]:()=>{Ln(p,gt.Last,{skipElements:[h.relatedTarget]})}})})}const c=V(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!i.value)return;const p=Rh(e.containers);Ve(o)instanceof HTMLElement&&p.add(Ve(o));const _=h.relatedTarget;_ instanceof HTMLElement&&_.dataset.moonbaseFocusGuard!=="true"&&(jh(p,_)||(c.value?Ln(Ve(o),Kt(l.value,{[ri.Forwards]:()=>gt.Next,[ri.Backwards]:()=>gt.Previous})|gt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&uo(h.target)))}return()=>{const h={},p={ref:o,onKeydown:d,onFocusout:f},{features:_,initialFocus:E,containers:N,...q}=e;return dt($e,[!!(_&4)&&dt(si,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:oi.Focusable}),Ct({ourProps:p,theirProps:{...t,...q},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(_&4)&&dt(si,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:oi.Focusable})])}}}),{features:Lh});function i1(e){const t=V(co.slice());return et([e],([n],[r])=>{r===!0&&n===!1?Ta(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=co.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function a1({ownerDocument:e},t){const n=i1(t);He(()=>{Zt(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&uo(n())},{flush:"post"})}),Rt(()=>{t.value&&uo(n())})}function l1({ownerDocument:e,container:t,initialFocus:n},r){const o=V(null),s=V(!1);return He(()=>s.value=!0),Rt(()=>s.value=!1),He(()=>{et([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=Ve(t);l&&Ta(()=>{var d,f;if(!s.value)return;const u=Ve(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?uo(u):Ln(l,gt.First|gt.NoScroll)===qo.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 u1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ah((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Rh(n);Ve(t)instanceof HTMLElement&&a.add(Ve(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?jh(a,u)?(r.value=u,uo(u)):(i.preventDefault(),i.stopPropagation(),uo(l)):uo(r.value)},!0)}function jh(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function c1(e){const t=Ab(e.getSnapshot());return Rt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function ai(){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 Ta(()=>{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=ai();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 d1(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 f1(){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 Fh(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function h1(){return/Android/gi.test(window.navigator.userAgent)}function p1(){return Fh()||h1()}function m1(){return Fh()?{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=ai();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 b1(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function g1(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const fo=d1(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:ai(),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:g1(n)},o=[m1(),f1(),b1()];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)}});fo.subscribe(()=>{const e=fo.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)&&fo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&fo.dispatch("TEARDOWN",n)}});function v1(e,t,n){const r=c1(fo),o=se(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return et([e,t],([s,i],[a],l)=>{if(!s||!i)return;fo.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(fo.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let y1=0;function _1(){return++y1}function ho(){return _1()}const wu=new Map,li=new Map;function Uh(e,t=V(!0)){Zt(n=>{if(!t.value)return;const r=Ve(e);if(!r)return;n(()=>{if(!r)return;const s=li.get(r)??1;if(s===1?li.delete(r):li.set(r,s-1),s!==1)return;const i=wu.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,wu.delete(r))});const o=li.get(r)??0;li.set(r,o+1),o===0&&(wu.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function ui(e,t,n,r){ni.isServer||Zt(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Bh=30;function w1(e,t,n=se(()=>!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:Ve(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!r1(l,Vh.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=V(null);ui(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),ui(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),ui(n,"click",i=>{p1()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};ui(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),ui(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Bh||Math.abs(a.y-s.y)>=Bh))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Dh(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function E1({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=V(null),o=Ho(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(Ve(r))||u.contains((l=(a=Ve(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:dt(si,{features:oi.Hidden,ref:r})}}}let Hh=Symbol("Context");var Xt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Xt||{});function x1(){return Eu()!==null}function Eu(){return ve(Hh,null)}function k1(e){Bt(Hh,e)}const qh=Symbol("ForcePortalRootContext");function O1(){return ve(qh,!1)}const zh=pe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Bt(qh,e.force),()=>{const{force:r,...o}=e;return Ct({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let Wh=Symbol("StackContext");var xu=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(xu||{});function S1(){return ve(Wh,()=>{})}function N1({type:e,enabled:t,element:n,onUpdate:r}){let o=S1();function s(...i){r==null||r(...i),o(...i)}He(()=>{et(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),Rt(()=>{t.value&&s(1,e,n)}),Bt(Wh,s)}var sn=(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))(sn||{});let C1=Symbol("DescriptionContext");function T1({slot:e=V({}),name:t="Description",props:n={}}={}){let r=V([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return Bt(C1,{register:o,slot:e,name:t,props:n}),se(()=>r.value.length>0?r.value.join(" "):void 0)}function Zh(e){const t=Ho(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 ku=Symbol("PortalParentContext"),Yh=Symbol("PortalGroupContext"),P1=pe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=V(null),o=O1(),s=ve(Yh,null),i=V(o===!0||s==null?Zh(r.value):s.resolveTarget()),a=V(!1);He(()=>{a.value=!0}),Zt(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=ve(ku,null);let u=!1;const c=pa();return et(r,()=>{if(u||!l)return;const d=Ve(r);d&&(Rt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return dt(lg,{to:i.value},Ct({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});function $1(){const e=ve(ku,null),t=V([]);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,pe({name:"PortalWrapper",setup(s,{slots:i}){return Bt(ku,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}const A1=pe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=As({resolveTarget(){return e.target}});return Bt(Yh,r),()=>{const{target:o,...s}=e;return Ct({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Ou=Symbol("DialogContext");function Su(e){const t=ve(Ou,null);if(t===null)throw new Error(`<${e} /> is missing a parent <Dialog /> component.`);return t}const Pa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",D1=pe({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:Pa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${ho()}`},role:{type:String,default:"dialog"},makeInert:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var me;const s=V(!1);He(()=>{s.value=!0});let i=!1;const a=se(()=>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=V(0),u=Eu(),c=se(()=>e.open===Pa&&u!==null?(u.value&Xt.Open)===Xt.Open:e.open),d=V(null),f=se(()=>Ho(d));if(o({el:d,$el:d}),!(e.open!==Pa||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===Pa?void 0:e.open}`);const p=se(()=>s.value&&c.value?0:1),_=se(()=>p.value===0),E=V(null),N={titleId:E,panelRef:V(null),dialogState:p,setTitleId(le){E.value!==le&&(E.value=le)},close(){t("close",!1)}},q=se(()=>l.value>1),z=ve(Ou,null)!==null,[B,L]=$1(),{resolveContainers:D,mainTreeNodeRef:m,MainTreeNode:P}=E1({portals:B,defaultContainers:[se(()=>N.panelRef.value??d.value)]}),I=se(()=>q.value?"parent":"leaf"),T=se(()=>u!==null?(u.value&Xt.Closing)===Xt.Closing:!1),$=se(()=>!e.makeInert||z||T.value?!1:_.value),A=se(()=>{var le;return Array.from(((le=f.value)==null?void 0:le.querySelectorAll("body > *"))??[]).find(he=>he.id==="moonbase"?!1:he.contains(Ve(m))&&he instanceof HTMLElement)??null});Uh(A,$);const oe=se(()=>q.value?!0:_.value),ke=se(()=>{var le;return Array.from(((le=f.value)==null?void 0:le.querySelectorAll("[data-moonbase-portal]"))??[]).find(he=>he.contains(Ve(m))&&he instanceof HTMLElement)??null});Uh(ke,oe),N1({type:"Dialog",enabled:se(()=>p.value===0),element:d,onUpdate:(le,he)=>{if(he==="Dialog")return Kt(le,{[xu.Add]:()=>l.value+=1,[xu.Remove]:()=>l.value-=1})}});const k=T1({name:"DialogDescription",slot:se(()=>({open:c.value}))});Bt(Ou,N);const U=se(()=>!(!_.value||q.value));w1(D,(le,he)=>{le.preventDefault(),N.close(),Qi(()=>he==null?void 0:he.focus())},U);const R=se(()=>!(q.value||p.value!==0));Ah((me=f.value)==null?void 0:me.defaultView,"keydown",le=>{R.value&&(le.defaultPrevented||le.key===sn.Escape&&(le.preventDefault(),le.stopPropagation(),N.close()))});const te=se(()=>!(!e.lockScroll||T.value||p.value!==0||z));return v1(f,te,le=>({containers:[...le.containers??[],D]})),Zt(le=>{if(p.value!==0)return;const he=Ve(d);if(!he)return;const _e=new ResizeObserver(Be=>{for(const ze of Be){const At=ze.target.getBoundingClientRect();At.x===0&&At.y===0&&At.width===0&&At.height===0&&N.close()}});_e.observe(he),le(()=>_e.disconnect())}),()=>{const{id:le,open:he,initialFocus:_e,...Be}=e,ze={...n,ref:d,id:le,role:a.value,"aria-modal":p.value===0?!0:void 0,"aria-labelledby":E.value,"aria-describedby":k.value},At={open:p.value===0};return dt(zh,{force:!0},()=>[dt(P1,()=>dt(A1,{target:d.value},()=>dt(zh,{force:!1},()=>dt(ii,{initialFocus:_e,containers:D,features:_.value?Kt(I.value,{parent:ii.features.RestoreFocus,leaf:ii.features.All&~ii.features.FocusLock}):ii.features.None},()=>dt(L,{},()=>Ct({ourProps:ze,theirProps:{...Be,...n},slot:At,attrs:n,slots:r,visible:p.value===0,features:Bo.RenderStrategy|Bo.Static,name:"Dialog"})))))),dt(P)])}}}),I1=pe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${ho()}`}},setup(e,{attrs:t,slots:n}){const r=Su("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Ct({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),M1=pe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${ho()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Su("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 Ct({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),Gh=pe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${ho()}`}},setup(e,{attrs:t,slots:n}){const r=Su("DialogTitle");return He(()=>{r.setTitleId(e.id),Rt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Ct({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Kh(e,t){if(e)return e;const n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function V1(e,t){const n=V(Kh(e.value.type,e.value.as));return He(()=>{n.value=Kh(e.value.type,e.value.as)}),Zt(()=>{var r;n.value||Ve(t)&&Ve(t)instanceof HTMLButtonElement&&!((r=Ve(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}let R1=pe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=V(!0);return()=>t.value?dt(si,{as:"button",type:"button",features:oi.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 Xh=Symbol("TabsContext");function $a(e){const t=ve(Xh,null);if(t===null)throw new Error(`<${e} /> is missing a parent <TabGroup /> component.`);return t}const Nu=Symbol("TabsSSRContext"),L1=pe({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=V(e.selectedIndex??e.defaultIndex),s=V([]),i=V([]),a=se(()=>e.selectedIndex!==null),l=se(()=>a.value?e.selectedIndex:o.value),u={selectedIndex:se(()=>o.value??e.defaultIndex??null),orientation:se(()=>e.vertical?"vertical":"horizontal"),activation:se(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(p){l.value!==p&&r("change",p),a.value||c(p)},registerTab(p){if(s.value.includes(p))return;const _=s.value[o.value];if(s.value.push(p),s.value=zo(s.value,Ve),!a.value){const E=s.value.indexOf(_)??o.value;E!==-1&&(o.value=E)}},unregisterTab(p){const _=s.value.indexOf(p);_!==-1&&s.value.splice(_,1)},registerPanel(p){i.value.includes(p)||(i.value.push(p),i.value=zo(i.value,Ve))},unregisterPanel(p){const _=i.value.indexOf(p);_!==-1&&i.value.splice(_,1)}};function c(p){const _=zo(u.tabs.value,Ve),E=zo(u.panels.value,Ve),N=_.filter(q=>{var z;return!((z=Ve(q))!=null&&z.hasAttribute("disabled"))});if(p<0||p>_.length-1){const q=Kt(o.value===null?0:Math.sign(p-o.value),{[-1]:()=>1,0:()=>Kt(Math.sign(p),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),z=Kt(q,{0:()=>_.indexOf(N[0]),1:()=>_.indexOf(N[N.length-1])});z!==-1&&(o.value=z),u.tabs.value=_,u.panels.value=E}else{const q=_.slice(0,p),B=[..._.slice(p),...q].find(D=>N.includes(D));if(!B)return;let L=_.indexOf(B)??u.selectedIndex.value;L===-1&&(L=u.selectedIndex.value),o.value=L,u.tabs.value=_,u.panels.value=E}}Bt(Xh,u);const d=V({tabs:[],panels:[]}),f=V(!1);He(()=>{f.value=!0}),Bt(Nu,se(()=>f.value?null:d.value));const h=se(()=>e.selectedIndex);return He(()=>{et([h],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),Zt(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const p=zo(u.tabs.value,Ve);p.some((E,N)=>Ve(u.tabs.value[N])!==Ve(E))&&u.setSelectedIndex(p.findIndex(E=>Ve(E)===Ve(u.tabs.value[l.value])))}),()=>{const p={selectedIndex:o.value};return dt($e,[s.value.length<=0&&dt(R1,{onFocus:()=>{for(const _ of s.value){const E=Ve(_);if((E==null?void 0:E.tabIndex)===0)return E.focus(),!0}return!1}}),Ct({theirProps:{...n,..._u(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:p,slots:t,attrs:n,name:"TabGroup"})])}}}),j1=pe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=$a("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Ct({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),F1=pe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${ho()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=$a("Tab"),s=V(null);r({el:s,$el:s}),He(()=>o.registerTab(s)),Rt(()=>o.unregisterTab(s));const i=ve(Nu),a=se(()=>{if(i.value){const E=i.value.tabs.indexOf(e.id);return E===-1?i.value.tabs.push(e.id)-1:E}return-1}),l=se(()=>{const E=o.tabs.value.indexOf(s);return E===-1?a.value:E}),u=se(()=>l.value===o.selectedIndex.value);function c(E){var q;const N=E();if(N===qo.Success&&o.activation.value==="auto"){const z=(q=Ho(s))==null?void 0:q.activeElement,B=o.tabs.value.findIndex(L=>Ve(L)===z);B!==-1&&o.setSelectedIndex(B)}return N}function d(E){const N=o.tabs.value.map(z=>Ve(z)).filter(Boolean);if(E.key===sn.Space||E.key===sn.Enter){E.preventDefault(),E.stopPropagation(),o.setSelectedIndex(l.value);return}switch(E.key){case sn.Home:case sn.PageUp:return E.preventDefault(),E.stopPropagation(),c(()=>Ln(N,gt.First));case sn.End:case sn.PageDown:return E.preventDefault(),E.stopPropagation(),c(()=>Ln(N,gt.Last))}if(c(()=>Kt(o.orientation.value,{vertical(){return E.key===sn.ArrowUp?Ln(N,gt.Previous|gt.WrapAround):E.key===sn.ArrowDown?Ln(N,gt.Next|gt.WrapAround):qo.Error},horizontal(){return E.key===sn.ArrowLeft?Ln(N,gt.Previous|gt.WrapAround):E.key===sn.ArrowRight?Ln(N,gt.Next|gt.WrapAround):qo.Error}}))===qo.Success)return E.preventDefault()}const f=V(!1);function h(){var E;f.value||(f.value=!0,!e.disabled&&((E=Ve(s))==null||E.focus({preventScroll:!0}),o.setSelectedIndex(l.value),Ta(()=>{f.value=!1})))}function p(E){E.preventDefault()}const _=V1(se(()=>({as:e.as,type:t.type})),s);return()=>{var B;const E={selected:u.value,disabled:e.disabled??!1},{id:N,...q}=e,z={ref:s,onKeydown:d,onMousedown:p,onClick:h,id:N,role:"tab",type:_.value,"aria-controls":(B=Ve(o.panels.value[l.value]))==null?void 0:B.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return Ct({ourProps:z,theirProps:q,slot:E,attrs:t,slots:n,name:"Tab"})}}}),U1=pe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$a("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Ct({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),B1=pe({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-${ho()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=$a("TabPanel"),s=V(null);r({el:s,$el:s}),He(()=>o.registerPanel(s)),Rt(()=>o.unregisterPanel(s));const i=ve(Nu),a=se(()=>{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=se(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=se(()=>l.value===o.selectedIndex.value);return()=>{var _;const c={selected:u.value},{id:d,tabIndex:f,...h}=e,p={ref:s,id:d,role:"tabpanel","aria-labelledby":(_=Ve(o.tabs.value[l.value]))==null?void 0:_.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?dt(si,{as:"span","aria-hidden":!0,...p}):Ct({ourProps:p,theirProps:h,slot:c,attrs:t,slots:n,features:Bo.Static|Bo.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function H1(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Cu(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function Aa(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Tu=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Tu||{});function q1(e,t){const n=ai();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 Jh(e,t,n,r,o,s){const i=ai(),a=s!==void 0?H1(s):()=>{};return Aa(e,...o),Cu(e,...t,...n),i.nextFrame(()=>{Aa(e,...n),Cu(e,...r),i.add(q1(e,l=>(Aa(e,...r,...t),Cu(e,...o),a(l))))}),i.add(()=>Aa(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function po(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Pu=Symbol("TransitionContext");function z1(){return ve(Pu,null)!==null}function W1(){const e=ve(Pu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const $u=Symbol("NestingContext");function Z1(){const e=ve($u,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Da(e){return"children"in e?Da(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Qh(e){const t=V([]),n=V(!1);He(()=>n.value=!0),Rt(()=>n.value=!1);function r(s,i=Ar.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Kt(i,{[Ar.Unmount](){t.value.splice(a,1)},[Ar.Hidden](){t.value[a].state="hidden"}}),!Da(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,Ar.Unmount)}return{children:t,register:o,unregister:r}}const ep=Bo.RenderStrategy,Au=pe({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=V(0);function i(){s.value|=Xt.Opening,t("beforeEnter")}function a(){s.value&=~Xt.Opening,t("afterEnter")}function l(){s.value|=Xt.Closing,t("beforeLeave")}function u(){s.value&=~Xt.Closing,t("afterLeave")}if(!z1()&&x1())return()=>dt(tp,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=V(null),d=se(()=>e.unmount?Ar.Unmount:Ar.Hidden);o({el:c,$el:c});const{show:f,appear:h}=W1(),{register:p,unregister:_}=Z1(),E=V(f.value?"visible":"hidden"),N={value:!0},q=ho(),z={value:!1},B=Qh(()=>{!z.value&&E.value!=="hidden"&&(E.value="hidden",_(q),u())});He(()=>{const oe=p(q);Rt(oe)}),Zt(()=>{if(d.value===Ar.Hidden&&q){if(f.value&&E.value!=="visible"){E.value="visible";return}Kt(E.value,{hidden:()=>_(q),visible:()=>p(q)})}});const L=po(e.enter),D=po(e.enterFrom),m=po(e.enterTo),P=po(e.entered),I=po(e.leave),T=po(e.leaveFrom),$=po(e.leaveTo);He(()=>{Zt(()=>{if(E.value==="visible"){const oe=Ve(c);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function A(oe){const ke=N.value&&!h.value,k=Ve(c);!k||!(k instanceof HTMLElement)||ke||(z.value=!0,f.value&&i(),f.value||l(),oe(f.value?Jh(k,L,D,m,P,U=>{z.value=!1,U===Tu.Finished&&a()}):Jh(k,I,T,$,P,U=>{z.value=!1,U===Tu.Finished&&(Da(B)||(E.value="hidden",_(q),u()))})))}return He(()=>{et([f],(oe,ke,k)=>{A(k),N.value=!1},{immediate:!0})}),Bt($u,B),k1(se(()=>Kt(E.value,{visible:Xt.Open,hidden:Xt.Closed})|s.value)),()=>{const{appear:oe,show:ke,enter:k,enterFrom:U,enterTo:R,entered:te,leave:me,leaveFrom:le,leaveTo:he,..._e}=e,Be={ref:c},ze={..._e,...h.value&&f.value&&ni.isServer?{class:Ss([n.class,_e.class,...L,...D])}:{}};return Ct({theirProps:ze,ourProps:Be,slot:{},slots:r,attrs:n,features:ep,visible:E.value==="visible",name:"TransitionChild"})}}}),Y1=Au,tp=pe({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=Eu(),s=se(()=>e.show===null&&o!==null?(o.value&Xt.Open)===Xt.Open:e.show);Zt(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=V(s.value?"visible":"hidden"),a=Qh(()=>{i.value="hidden"}),l=V(!0),u={show:s,appear:se(()=>e.appear||!l.value)};return He(()=>{Zt(()=>{l.value=!1,s.value?i.value="visible":Da(a)||(i.value="hidden")})}),Bt($u,a),Bt(Pu,u),()=>{const c=_u(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Ct({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[dt(Y1,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:ep,visible:i.value==="visible",name:"Transition"})}}});function G1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"})])}function K1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})])}function np(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})])}function X1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function J1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})])}function Q1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z"})])}function e_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function t_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})])}function n_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12 3 3m0 0 3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function r_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function o_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function s_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"})])}function rp(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"})])}function i_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14"})])}function a_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function l_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"})])}function u_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}function c_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const d_=["href","disabled","data-variant","data-size","data-corners","data-background"],f_=["disabled","data-variant","data-size","data-corners","data-background"],Wo=pe({__name:"MoonIconButton",props:{variant:{},size:{},disabled:{type:Boolean},href:{}},emits:["click"],setup(e){const t=e,n=ve(Et),r=se(()=>t.variant?t.variant==="secondary"?`secondary-${(n==null?void 0:n.value.theme.buttons)??"light"}`:t.variant:"primary");return(o,s)=>{var i,a,l,u;return o.href?(g(),C("a",{key:0,class:"moonbase:icon-button",href:o.href,disabled:o.disabled,"data-variant":r.value,"data-size":o.size||"large","data-corners":(i=b(n))==null?void 0:i.theme.corners,"data-background":(a=b(n))==null?void 0:a.theme.colors.background},[St(o.$slots,"default")],8,d_)):(g(),C("button",{key:1,class:"moonbase:icon-button",type:"button",disabled:o.disabled,"data-variant":r.value,"data-size":o.size||"large","data-corners":(l=b(n))==null?void 0:l.theme.corners,"data-background":(u=b(n))==null?void 0:u.theme.colors.background,onClick:s[0]||(s[0]=c=>o.$emit("click"))},[St(o.$slots,"default")],8,f_))}}}),tr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},h_={},p_={class:"moonbase:text-display"};function m_(e,t){return g(),C("h2",p_,[St(e.$slots,"default")])}const b_=tr(h_,[["render",m_]]),g_={},v_={class:"moonbase:text-subtitle"};function y_(e,t){return g(),C("h5",v_,[St(e.$slots,"default")])}const nt=tr(g_,[["render",y_]]),__=["data-contain"],w_={class:"moonbase:drawer-header"},E_=["data-background"],x_=pe({__name:"Drawer",setup(e){const t=Ae(),n=tt(),r=ve(Et),o=V(""),s=V("");et(()=>[t.active,t.intent,t.next],([a,l,u])=>{if(s.value="",u&&(l===Q.SignIn||l===Q.SignUp)){const[c,d,f]=u;d===Q.ConfirmEmailChange?s.value="to confirm email":d===Q.RedeemVoucher?s.value="to redeem voucher":d===Q.ActivateProduct?s.value="to activate product":d===Q.ManageSubscription&&(s.value="to manage subscription")}switch(l){case Q.ActivateProduct:o.value="Activate product";return;case Q.SignIn:o.value="Sign in";return;case Q.SignUp:o.value="Sign up";return;case Q.ConfirmAccount:o.value="Confirm account";return;case Q.ConfirmEmail:o.value="Confirm email address";return;case Q.ConfirmEmailChange:o.value="Confirm email change";return;case Q.ForgotPassword:o.value="Forgot password";return;case Q.ResetPassword:o.value="Reset password";return}switch(a){case ue.Cart:o.value="My cart";return;case ue.Customer:o.value="My account";return;case ue.Product:o.value="Product details";return;case ue.Subscription:o.value="Subscription details";return;case ue.Redeem:o.value="Redeem voucher";return}return""});function i(){if(!n.user.value)t.show(ue.Authentication,Q.SignIn),t.enqueue(ue.Customer,Q.ViewProducts);else{const a=n.user.value.ownedProducts&&n.user.value.ownedProducts.length>0||n.user.value.subscribedProducts&&n.user.value.subscribedProducts.length>0;t.show(ue.Customer,a?Q.ViewProducts:Q.ViewAccount)}}return(a,l)=>(g(),Y(b(tp),{as:"template",show:b(t).active!==b(ue).None},{default:O(()=>{var u,c,d;return[w(b(D1),{as:"div",class:"moonbase:drawer","data-contain":!!((u=b(r))!=null&&u.target)||void 0,"make-inert":!((c=b(r))!=null&&c.target),"lock-scroll":!((d=b(r))!=null&&d.target),onClose:l[2]||(l[2]=f=>b(t).reset())},{default:O(()=>{var f;return[H("div",{class:"moonbase:drawer-container","data-contain":!!((f=b(r))!=null&&f.target)||void 0},[w(b(Au),{as:"template"},{default:O(()=>{var h;return[w(b(I1),{class:"moonbase:drawer-overlay","data-contain":!!((h=b(r))!=null&&h.target)||void 0},null,8,["data-contain"])]}),_:1}),w(b(Au),{as:"template"},{default:O(()=>{var h,p;return[w(b(M1),{class:"moonbase:drawer-panel","data-contain":!!((h=b(r))!=null&&h.target)||void 0,"data-background":(p=b(r))==null?void 0:p.theme.colors.background},{default:O(()=>{var _,E;return[H("div",w_,[b(t).history.length>0?(g(),Y(Wo,{key:0,variant:"subtle",onClick:l[0]||(l[0]=N=>b(t).back())},{default:O(()=>[w(b(K1))]),_:1})):(g(),Y(Wo,{key:1,variant:"subtle",onClick:l[1]||(l[1]=N=>b(t).reset())},{default:O(()=>[w(b(c_))]),_:1})),b(t).active===b(ue).Cart&&((_=b(r))!=null&&_.auth.signIn.enabled)?(g(),Y(Wo,{key:2,variant:"subtle",onClick:i},{default:O(()=>[w(b(u_))]),_:1})):fe("",!0)]),w(b(Gh),{as:b_},{default:O(()=>[M(j(o.value)+" ",1),s.value?(g(),Y(nt,{key:0},{default:O(()=>[M(j(s.value),1)]),_:1})):fe("",!0)]),_:1}),H("div",{class:"moonbase:drawer-content","data-background":(E=b(r))==null?void 0:E.theme.colors.background},[w(Ks,{name:b(t).direction===b(yu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:O(()=>[St(a.$slots,"default")]),_:3},8,["name"])],8,E_)]}),_:3},8,["data-contain","data-background"])]}),_:3})],8,__)]}),_:3},8,["data-contain","make-inert","lock-scroll"])]}),_:3},8,["show"]))}}),Ht=e=>new Promise(t=>setTimeout(t,e)),k_={},O_={class:"moonbase:text-body-bold"};function S_(e,t){return g(),C("span",O_,[St(e.$slots,"default")])}const ci=tr(k_,[["render",S_]]),N_=["data-visible","data-contain","data-location","data-corners"],C_={key:0,href:"https://moonbase.sh",target:"_blank",rel:"noopener",class:"moonbase:toolbar-action","data-action-width":"narrow"},T_=["disabled"],P_={key:0,class:"moonbase:toolbar-cart-count"},$_=pe({__name:"Toolbar",setup(e){const t=V(!1),n=Ae(),r=tt(),{items:o}=Tr(),s=ve(Et),i=se(()=>(o.value??[]).reduce((l,u)=>l+u.quantity,0));He(()=>{Ht(100).then(()=>t.value=!0)});function a(){if(!r.user.value)n.show(ue.Authentication,Q.SignIn),n.enqueue(ue.Customer,Q.ViewProducts);else{const l=r.user.value.ownedProducts&&r.user.value.ownedProducts.length>0||r.user.value.subscribedProducts&&r.user.value.subscribedProducts.length>0;n.show(ue.Customer,l?Q.ViewProducts:Q.ViewAccount)}}return(l,u)=>{var c,d,f,h,p,_;return g(),C("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(ue).None?"true":void 0,"data-contain":!!((c=b(s))!=null&&c.target)||void 0,"data-location":b(s).toolbar.location,"data-corners":(d=b(s))==null?void 0:d.theme.corners},[(f=b(s))!=null&&f.toolbar.show.moonbase?(g(),C("a",C_,u[1]||(u[1]=[Mf('<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)]))):fe("",!0),(h=b(s))!=null&&h.toolbar.show.account&&b(s).auth.signIn.enabled&&!b(r).user.value?(g(),C("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:a},[w(ci,null,{default:O(()=>u[2]||(u[2]=[M("Log in")])),_:1,__:[2]})],8,T_)):(p=b(s))!=null&&p.toolbar.show.account?(g(),C("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:a},[w(ci,null,{default:O(()=>{var E;return[M(j((E=b(r).user.value)==null?void 0:E.name),1)]}),_:1})])):fe("",!0),(_=b(s))!=null&&_.toolbar.show.cart?(g(),C("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:u[0]||(u[0]=E=>b(n).show(b(ue).Cart,b(Q).AddToCart))},[w(ci,null,{default:O(()=>u[3]||(u[3]=[M(" Cart ")])),_:1,__:[3]}),i.value>0?(g(),C("span",P_,j(i.value),1)):fe("",!0)])):fe("",!0)],8,N_)}}});function Jt(e,t){const n=typeof e=="object"?e.amount:e;t=typeof e=="object"?e.currency:t;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:n%1===0?0:void 0,minimumFractionDigits:n%1===0?0:2}).format(n)}catch{return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"symbol",maximumFractionDigits:n%1===0?0:void 0,minimumFractionDigits:n%1===0?0:2}).format(n)}}function A_(){const e=V(null),t=[/^user\.name$/,/^user\.email$/,/^cart\.item_count$/,/^product\.[a-z\-]+\.name$/,/^product\.[a-z\-]+\.price$/,/^product\.[a-z\-]+\.original_price$/,/^product\.[a-z\-]+\.discount_name$/,/^product\.[a-z\-]+\.discount_description$/,/^product\.[a-z\-]+\.discount_total$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.price$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.original_price$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_name$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_description$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_total$/,/^bundle\.[a-z\-]+\.name$/,/^bundle\.[a-z\-]+\.price$/,/^bundle\.[a-z\-]+\.original_price$/,/^bundle\.[a-z\-]+\.discount_name$/,/^bundle\.[a-z\-]+\.discount_description$/,/^bundle\.[a-z\-]+\.discount_total$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.price$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.original_price$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_name$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_description$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_total$/],n=V({}),r=se(()=>n.value.user||[]),o=se(()=>n.value.cart||[]),s=se(()=>n.value.product||[]),i=se(()=>n.value.bundle||[]),a=[/^user$/,/^cart.has_items$/,/^product\.[a-z\-]+(\.has_discount(_description)?)?$/,/^bundle\.[a-z\-]+(\.has_discount(_description)?)?$/],l=V({}),u=se(()=>l.value.user||[]),c=se(()=>l.value.cart||[]),d=se(()=>l.value.product||[]),f=se(()=>l.value.bundle||[]),h=tt(),{currency:p,items:_}=Tr(),E=_y(),N=vy();et([r,u,h.user],([B,L,D])=>{if(B){for(const m of B)if(m.dataset.moonbaseOriginal===void 0&&(m.dataset.moonbaseOriginal=m.textContent||""),D)switch(m.dataset.moonbaseRender){case"user.name":m.textContent=D.name;break;case"user.email":m.textContent=D.email;break}else m.dataset.moonbaseOriginal?m.textContent=m.dataset.moonbaseOriginal:m.textContent="";for(const m of L)m.dataset.moonbaseOriginalHidden||(m.dataset.moonbaseOriginalHidden=m.hidden?"true":"false"),D?m.hidden=m.dataset.moonbaseIf==="!user":m.hidden=m.dataset.moonbaseIf==="user"}},{immediate:!0,deep:!0}),et([o,c,_],([B,L,D])=>{if(B){for(const m of B)switch(m.dataset.moonbaseOriginal===void 0&&(m.dataset.moonbaseOriginal=m.textContent||""),m.dataset.moonbaseRender){case"cart.item_count":m.textContent=D.reduce((P,I)=>P+I.quantity,0).toString();break}for(const m of L){if(!m.dataset.moonbaseIf)return;const P=m.dataset.moonbaseIf.split("."),I=P[1];let T=!1;switch(I){case"has_items":T=D.length>0;break}P[0].startsWith("!")&&(T=!T),m.dataset.moonbaseOriginalHidden||(m.dataset.moonbaseOriginalHidden=m.hidden?"true":"false"),T?m.hidden=!1:m.hidden=!0}}},{immediate:!0,deep:!0}),et([s,d,E,p],([B,L,D,m])=>{var P,I,T,$,A,oe,ke,k,U;if(B){for(const R of B){const te=((P=R.dataset.moonbaseRender)==null?void 0:P.split("."))??[],me=te[1];let le=te[2];const he=D.find(Be=>Be.id===me);let _e;if(le.startsWith("variation")){const Be=(I=le.match(/variation\[([a-z\-]+)\]/))==null?void 0:I[1];_e=(T=he==null?void 0:he.variations)==null?void 0:T.find(ze=>ze.id===Be),le=te[3]}else _e=he==null?void 0:he.defaultVariation;if(R.dataset.moonbaseOriginal===void 0&&(R.dataset.moonbaseOriginal=R.textContent||""),he&&_e)switch(le){case"name":R.textContent=he.name;break;case"price":R.textContent=Jt(_e.price[m],m);break;case"original_price":R.textContent=Jt(_e.originalPrice[m],m);break;case"discount_name":R.textContent=(($=_e.discount)==null?void 0:$.name)??R.dataset.moonbaseOriginal??"";break;case"discount_description":R.textContent=((A=_e.discount)==null?void 0:A.description)??R.dataset.moonbaseOriginal??"";break;case"discount_total":R.textContent=(oe=_e.discount)!=null&&oe.total?Jt(_e.discount.total[m],m):R.dataset.moonbaseOriginal??"";break}else R.dataset.moonbaseOriginal?R.textContent=R.dataset.moonbaseOriginal:R.textContent=""}for(const R of L){if(!R.dataset.moonbaseIf)return;const te=R.dataset.moonbaseIf.split("."),me=te.length===2?"product":te[2],le=te[1],he=D.find(Be=>Be.id===le);let _e=!1;switch(me){case"product":_e=!!he;break;case"has_discount":_e=!!((ke=he==null?void 0:he.defaultVariation)!=null&&ke.hasDiscount);break;case"has_discount_description":_e=!!((U=(k=he==null?void 0:he.defaultVariation)==null?void 0:k.discount)!=null&&U.description);break}te[0].startsWith("!")&&(_e=!_e),R.dataset.moonbaseOriginalHidden||(R.dataset.moonbaseOriginalHidden=R.hidden?"true":"false"),_e?R.hidden=!1:R.hidden=!0}}},{immediate:!0,deep:!0}),et([i,f,N,p],([B,L,D,m])=>{var P,I,T,$,A,oe,ke,k,U;if(B){for(const R of B){const te=((P=R.dataset.moonbaseRender)==null?void 0:P.split("."))??[],me=te[1];let le=te[2];const he=D.find(Be=>Be.id===me);let _e;if(le.startsWith("variation")){const Be=(I=le.match(/variation\[([a-z\-]+)\]/))==null?void 0:I[1];_e=(T=he==null?void 0:he.variations)==null?void 0:T.find(ze=>ze.id===Be),le=te[3]}else _e=he==null?void 0:he.defaultVariation;if(R.dataset.moonbaseOriginal===void 0&&(R.dataset.moonbaseOriginal=R.textContent||""),he&&_e)switch(le){case"name":R.textContent=he.name;break;case"price":R.textContent=Jt(_e.price[m],m);break;case"original_price":R.textContent=Jt(_e.originalPrice[m],m);break;case"discount_name":R.textContent=(($=_e.discount)==null?void 0:$.name)??R.dataset.moonbaseOriginal??"";break;case"discount_description":R.textContent=((A=_e.discount)==null?void 0:A.description)??R.dataset.moonbaseOriginal??"";break;case"discount_total":R.textContent=(oe=_e.discount)!=null&&oe.total?Jt(_e.discount.total[m],m):R.dataset.moonbaseOriginal??"";break}else R.dataset.moonbaseOriginal?R.textContent=R.dataset.moonbaseOriginal:R.textContent=""}for(const R of L){if(!R.dataset.moonbaseIf)return;const te=R.dataset.moonbaseIf.split("."),me=te.length===2?"bundle":te[2],le=te[1],he=D.find(Be=>Be.id===le);let _e=!1;switch(me){case"bundle":_e=!!he;break;case"has_discount":_e=!!((ke=he==null?void 0:he.defaultVariation)!=null&&ke.hasDiscount);break;case"has_discount_description":_e=!!((U=(k=he==null?void 0:he.defaultVariation)==null?void 0:k.discount)!=null&&U.description);break}te[0].startsWith("!")&&(_e=!_e),R.dataset.moonbaseOriginalHidden||(R.dataset.moonbaseOriginalHidden=R.hidden?"true":"false"),_e?R.hidden=!1:R.hidden=!0}}},{immediate:!0,deep:!0});function q(B){var L;if(B.dataset&&B.dataset.moonbaseRender){const D=B.dataset.moonbaseRender;if(!D||!t.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];n.value[m]=n.value[m]||[],n.value[m].push(B)}}if(B.dataset&&B.dataset.moonbaseIf){const D=(L=B.dataset.moonbaseIf)==null?void 0:L.replace(/^!/,"");if(!D||!a.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];l.value[m]=l.value[m]||[],l.value[m].push(B)}}B.nodeType===Node.ELEMENT_NODE&&B.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(D=>q(D))}function z(B){var L;if(B.dataset&&B.dataset.moonbaseRender){const D=B.dataset.moonbaseRender;if(!D||!t.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];n.value[m]&&(n.value[m]=n.value[m].filter(P=>P!==B))}}if(B.dataset&&B.dataset.moonbaseIf){const D=(L=B.dataset.moonbaseIf)==null?void 0:L.replace(/^!/,"");if(!D||!a.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];l.value[m]&&(l.value[m]=l.value[m].filter(P=>P!==B))}}B.nodeType===Node.ELEMENT_NODE&&B.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(D=>z(D))}He(()=>{e.value=new MutationObserver((L,D)=>{for(const m of L)if(m.type==="childList"){for(const P of m.addedNodes)q(P);for(const P of m.removedNodes)z(P)}else if(m.type==="attributes"&&m.attributeName){const P=m.target.getAttribute(m.attributeName);Uo(`The ${m.attributeName} attribute was modified from ${m.oldValue} to ${P}.`);const I=m.target;if(m.attributeName==="data-moonbase-render"){const T=m.oldValue;if(T){const $=T.split(".")[0];n.value[$]&&(n.value[$]=n.value[$].filter(A=>A!==I))}if(!P||!t.some($=>$.test(P)))P&&console.warn(`Element has an unknown Moonbase target (${P})`,I),I.dataset.moonbaseOriginal&&(I.textContent=I.dataset.moonbaseOriginal);else if(P){const $=P==null?void 0:P.split(".")[0];n.value[$]=n.value[$]||[],n.value[$].includes(I)||n.value[$].push(I)}}if(m.attributeName==="data-moonbase-if"){const T=m.oldValue;if(T){const $=T.split(".")[0];l.value[$]&&(l.value[$]=l.value[$].filter(A=>A!==I))}if(!P||!a.some($=>$.test(P)))P&&console.warn(`Element has an unknown Moonbase target (${P})`,I),I.dataset.moonbaseOriginalHidden==="true"&&(I.hidden=!0);else if(P){const $=P==null?void 0:P.split(".")[0];l.value[$]=l.value[$]||[],l.value[$].includes(I)||l.value[$].push(I)}}}else Uo(`A ${m.type} mutation took place.`)}),e.value.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["data-moonbase-if","data-moonbase-render"]}),document.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(L=>q(L))}),Rt(()=>e.value&&e.value.disconnect())}const di=/^#?\?mb_intent=/;function D_(){const e=V(null);function t(r){const o=r.currentTarget,s=o.getAttribute("href");if(o.tagName==="A"&&s&&di.test(s)){r.preventDefault(),r.stopPropagation();const i=new URLSearchParams(s.startsWith("#")?s.slice(1):s),a=i.get("mb_intent");if(a&&Object.values(Q).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,c])=>[u.substring(3),c]));if(a===Q.Checkout&&l.complete)return;ic[a](l)}}}function n(r){if(!(r.nodeType!==Node.ELEMENT_NODE||r.dataset.moonbaseButton))try{const o=r.getAttribute("href");r.tagName==="A"&&o&&di.test(o)&&(Uo("Adding event listener to element:",r),r.addEventListener("click",t),r.dataset.moonbaseButton="true"),r.querySelectorAll('a[href^="?mb_intent="], a[href^="#?mb_intent="]').forEach(s=>n(s))}catch(o){console.warn("Could not add Moonbase listener to link",r,o)}}He(()=>{e.value=new MutationObserver((o,s)=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)n(a);else if(i.type==="attributes"&&i.attributeName){const a=i.target.getAttribute(i.attributeName);Uo(`The ${i.attributeName} attribute was modified from ${i.oldValue} to ${a}.`);const l=i.target;i.attributeName==="href"&&(i.oldValue&&di.test(i.oldValue)&&(!a||!di.test(a))?l.removeEventListener("click",t):a&&di.test(a)&&n(l))}else Uo(`A ${i.type} mutation took place.`)}),e.value.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["href"]}),document.querySelectorAll('a[href^="?mb_intent="], a[href^="#?mb_intent="]').forEach(o=>n(o))}),Rt(()=>e.value&&e.value.disconnect())}const{min:I_,max:M_}=Math,mo=(e,t=0,n=1)=>I_(M_(t,e),n),Du=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=mo(e[t],0,255)):t===3&&(e[t]=mo(e[t],0,1));return e},op={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])op[`[object ${e}]`]=e.toLowerCase();function Re(e){return op[Object.prototype.toString.call(e)]||"object"}const De=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Re(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),Zo=e=>{if(e.length<2)return null;const t=e.length-1;return Re(e[t])=="string"?e[t].toLowerCase():null},{PI:Ia,min:sp,max:ip}=Math,an=e=>Math.round(e*100)/100,Iu=e=>Math.round(e*100)/100,nr=Ia*2,Mu=Ia/3,V_=Ia/180,R_=180/Ia;function ap(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Te={format:{},autodetect:[]};class ee{constructor(...t){const n=this;if(Re(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=Zo(t),o=!1;if(!r){o=!0,Te.sorted||(Te.autodetect=Te.autodetect.sort((s,i)=>i.p-s.p),Te.sorted=!0);for(let s of Te.autodetect)if(r=s.test(...t),r)break}if(Te.format[r]){const s=Te.format[r].apply(null,o?t:t.slice(0,-1));n._rgb=Du(s)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return Re(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const L_="3.1.2",Ie=(...e)=>new ee(...e);Ie.version=L_;const Yo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},j_=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,F_=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,lp=e=>{if(e.match(j_)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,r=t>>8&255,o=t&255;return[n,r,o,1]}if(e.match(F_)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,r=t>>16&255,o=t>>8&255,s=Math.round((t&255)/255*100)/100;return[n,r,o,s]}throw new Error(`unknown hex color: ${e}`)},{round:Ma}=Math,up=(...e)=>{let[t,n,r,o]=De(e,"rgba"),s=Zo(e)||"auto";o===void 0&&(o=1),s==="auto"&&(s=o<1?"rgba":"rgb"),t=Ma(t),n=Ma(n),r=Ma(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+Ma(o*255).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};ee.prototype.name=function(){const e=up(this._rgb,"rgb");for(let t of Object.keys(Yo))if(Yo[t]===e)return t.toLowerCase();return e},Te.format.named=e=>{if(e=e.toLowerCase(),Yo[e])return lp(Yo[e]);throw new Error("unknown color name: "+e)},Te.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&Yo[e.toLowerCase()])return"named"}}),ee.prototype.alpha=function(e,t=!1){return e!==void 0&&Re(e)==="number"?t?(this._rgb[3]=e,this):new ee([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},ee.prototype.clipped=function(){return this._rgb._clipped||!1};const jn={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},U_=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function rr(e){const t=U_.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);jn.labWhitePoint=e,jn.Xn=t[0],jn.Zn=t[1]}function fi(){return jn.labWhitePoint}const Vu=(...e)=>{e=De(e,"lab");const[t,n,r]=e,[o,s,i]=B_(t,n,r),[a,l,u]=cp(o,s,i);return[a,l,u,e.length>3?e[3]:1]},B_=(e,t,n)=>{const{kE:r,kK:o,kKE:s,Xn:i,Yn:a,Zn:l}=jn,u=(e+16)/116,c=.002*t+u,d=u-.005*n,f=c*c*c,h=d*d*d,p=f>r?f:(116*c-16)/o,_=e>s?Math.pow((e+16)/116,3):e/o,E=h>r?h:(116*d-16)/o,N=p*i,q=_*a,z=E*l;return[N,q,z]},Ru=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},cp=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:o,MtxXYZ2RGB:s,RefWhiteRGB:i,Xn:a,Yn:l,Zn:u}=jn,c=a*r.m00+l*r.m10+u*r.m20,d=a*r.m01+l*r.m11+u*r.m21,f=a*r.m02+l*r.m12+u*r.m22,h=i.X*r.m00+i.Y*r.m10+i.Z*r.m20,p=i.X*r.m01+i.Y*r.m11+i.Z*r.m21,_=i.X*r.m02+i.Y*r.m12+i.Z*r.m22,E=(e*r.m00+t*r.m10+n*r.m20)*(h/c),N=(e*r.m01+t*r.m11+n*r.m21)*(p/d),q=(e*r.m02+t*r.m12+n*r.m22)*(_/f),z=E*o.m00+N*o.m10+q*o.m20,B=E*o.m01+N*o.m11+q*o.m21,L=E*o.m02+N*o.m12+q*o.m22,D=Ru(z*s.m00+B*s.m10+L*s.m20),m=Ru(z*s.m01+B*s.m11+L*s.m21),P=Ru(z*s.m02+B*s.m12+L*s.m22);return[D*255,m*255,P*255]},Lu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=dp(t,n,r),[l,u,c]=H_(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function H_(e,t,n){const{Xn:r,Yn:o,Zn:s,kE:i,kK:a}=jn,l=e/r,u=t/o,c=n/s,d=l>i?Math.pow(l,1/3):(a*l+16)/116,f=u>i?Math.pow(u,1/3):(a*u+16)/116,h=c>i?Math.pow(c,1/3):(a*c+16)/116;return[116*f-16,500*(d-f),200*(f-h)]}function ju(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const dp=(e,t,n)=>{e=ju(e/255),t=ju(t/255),n=ju(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:o,MtxAdaptMaI:s,Xn:i,Yn:a,Zn:l,As:u,Bs:c,Cs:d}=jn;let f=e*r.m00+t*r.m10+n*r.m20,h=e*r.m01+t*r.m11+n*r.m21,p=e*r.m02+t*r.m12+n*r.m22;const _=i*o.m00+a*o.m10+l*o.m20,E=i*o.m01+a*o.m11+l*o.m21,N=i*o.m02+a*o.m12+l*o.m22;let q=f*o.m00+h*o.m10+p*o.m20,z=f*o.m01+h*o.m11+p*o.m21,B=f*o.m02+h*o.m12+p*o.m22;return q*=_/u,z*=E/c,B*=N/d,f=q*s.m00+z*s.m10+B*s.m20,h=q*s.m01+z*s.m11+B*s.m21,p=q*s.m02+z*s.m12+B*s.m22,[f,h,p]};ee.prototype.lab=function(){return Lu(this._rgb)},Object.assign(Ie,{lab:(...e)=>new ee(...e,"lab"),getLabWhitePoint:fi,setLabWhitePoint:rr}),Te.format.lab=Vu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"lab"),Re(e)==="array"&&e.length===3)return"lab"}}),ee.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=jn.Kn*e,new ee(n,"lab").alpha(t.alpha(),!0)},ee.prototype.brighten=function(e=1){return this.darken(-e)},ee.prototype.darker=ee.prototype.darken,ee.prototype.brighter=ee.prototype.brighten,ee.prototype.get=function(e){const[t,n]=e.split("."),r=this[t]();if(n){const o=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(o>-1)return r[o];throw new Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:q_}=Math,z_=1e-7,W_=20;ee.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&Re(e)==="number"){if(e===0)return new ee([0,0,0,this._rgb[3]],"rgb");if(e===1)return new ee([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=W_;const o=(i,a)=>{const l=i.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)<z_||!r--?l:u>e?o(i,l):o(l,a)},s=(n>e?o(new ee([0,0,0]),this):o(this,new ee([255,255,255]))).rgb();return new ee([...s,this._rgb[3]])}return Z_(...this._rgb.slice(0,3))};const Z_=(e,t,n)=>(e=Fu(e),t=Fu(t),n=Fu(n),.2126*e+.7152*t+.0722*n),Fu=e=>(e/=255,e<=.03928?e/12.92:q_((e+.055)/1.055,2.4)),Tt={},Go=(e,t,n=.5,...r)=>{let o=r[0]||"lrgb";if(!Tt[o]&&!r.length&&(o=Object.keys(Tt)[0]),!Tt[o])throw new Error(`interpolation mode ${o} is not defined`);return Re(e)!=="object"&&(e=new ee(e)),Re(t)!=="object"&&(t=new ee(t)),Tt[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};ee.prototype.mix=ee.prototype.interpolate=function(e,t=.5,...n){return Go(this,e,t,...n)},ee.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new ee([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:Y_,cos:G_}=Math,fp=(...e)=>{let[t,n,r]=De(e,"lch");return isNaN(r)&&(r=0),r=r*V_,[t,G_(r)*n,Y_(r)*n]},Uu=(...e)=>{e=De(e,"lch");const[t,n,r]=e,[o,s,i]=fp(t,n,r),[a,l,u]=Vu(o,s,i);return[a,l,u,e.length>3?e[3]:1]},K_=(...e)=>{const t=ap(De(e,"hcl"));return Uu(...t)},{sqrt:X_,atan2:J_,round:Q_}=Math,hp=(...e)=>{const[t,n,r]=De(e,"lab"),o=X_(n*n+r*r);let s=(J_(r,n)*R_+360)%360;return Q_(o*1e4)===0&&(s=Number.NaN),[t,o,s]},Bu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=Lu(t,n,r),[l,u,c]=hp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};ee.prototype.lch=function(){return Bu(this._rgb)},ee.prototype.hcl=function(){return ap(Bu(this._rgb))},Object.assign(Ie,{lch:(...e)=>new ee(...e,"lch"),hcl:(...e)=>new ee(...e,"hcl")}),Te.format.lch=Uu,Te.format.hcl=K_,["lch","hcl"].forEach(e=>Te.autodetect.push({p:2,test:(...t)=>{if(t=De(t,e),Re(t)==="array"&&t.length===3)return e}})),ee.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=jn.Kn*e,n[1]<0&&(n[1]=0),new ee(n,"lch").alpha(t.alpha(),!0)},ee.prototype.desaturate=function(e=1){return this.saturate(-e)},ee.prototype.set=function(e,t,n=!1){const[r,o]=e.split("."),s=this[r]();if(o){const i=r.indexOf(o)-(r.substr(0,2)==="ok"?2:0);if(i>-1){if(Re(t)=="string")switch(t.charAt(0)){case"+":s[i]+=+t;break;case"-":s[i]+=+t;break;case"*":s[i]*=+t.substr(1);break;case"/":s[i]/=+t.substr(1);break;default:s[i]=+t}else if(Re(t)==="number")s[i]=t;else throw new Error("unsupported value for Color.set");const a=new ee(s,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${o} in mode ${r}`)}else return s},ee.prototype.tint=function(e=.5,...t){return Go(this,"white",e,...t)},ee.prototype.shade=function(e=.5,...t){return Go(this,"black",e,...t)};const ew=(e,t,n)=>{const r=e._rgb,o=t._rgb;return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"rgb")};Tt.rgb=ew;const{sqrt:Hu,pow:Ko}=Math,tw=(e,t,n)=>{const[r,o,s]=e._rgb,[i,a,l]=t._rgb;return new ee(Hu(Ko(r,2)*(1-n)+Ko(i,2)*n),Hu(Ko(o,2)*(1-n)+Ko(a,2)*n),Hu(Ko(s,2)*(1-n)+Ko(l,2)*n),"rgb")};Tt.lrgb=tw;const nw=(e,t,n)=>{const r=e.lab(),o=t.lab();return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"lab")};Tt.lab=nw;const Xo=(e,t,n,r)=>{let o,s;r==="hsl"?(o=e.hsl(),s=t.hsl()):r==="hsv"?(o=e.hsv(),s=t.hsv()):r==="hcg"?(o=e.hcg(),s=t.hcg()):r==="hsi"?(o=e.hsi(),s=t.hsi()):r==="lch"||r==="hcl"?(r="hcl",o=e.hcl(),s=t.hcl()):r==="oklch"&&(o=e.oklch().reverse(),s=t.oklch().reverse());let i,a,l,u,c,d;(r.substr(0,1)==="h"||r==="oklch")&&([i,l,c]=o,[a,u,d]=s);let f,h,p,_;return!isNaN(i)&&!isNaN(a)?(a>i&&a-i>180?_=a-(i+360):a<i&&i-a>180?_=a+360-i:_=a-i,h=i+n*_):isNaN(i)?isNaN(a)?h=Number.NaN:(h=a,(c==1||c==0)&&r!="hsv"&&(f=u)):(h=i,(d==1||d==0)&&r!="hsv"&&(f=l)),f===void 0&&(f=l+n*(u-l)),p=c+n*(d-c),r==="oklch"?new ee([p,f,h],r):new ee([h,f,p],r)},pp=(e,t,n)=>Xo(e,t,n,"lch");Tt.lch=pp,Tt.hcl=pp;const rw=e=>{if(Re(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,r=e&255;return[t,n,r,1]}throw new Error("unknown num color: "+e)},ow=(...e)=>{const[t,n,r]=De(e,"rgb");return(t<<16)+(n<<8)+r};ee.prototype.num=function(){return ow(this._rgb)},Object.assign(Ie,{num:(...e)=>new ee(...e,"num")}),Te.format.num=rw,Te.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Re(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const sw=(e,t,n)=>{const r=e.num(),o=t.num();return new ee(r+n*(o-r),"num")};Tt.num=sw;const{floor:iw}=Math,aw=(...e)=>{e=De(e,"hcg");let[t,n,r]=e,o,s,i;r=r*255;const a=n*255;if(n===0)o=s=i=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=iw(t),u=t-l,c=r*(1-n),d=c+a*(1-u),f=c+a*u,h=c+a;switch(l){case 0:[o,s,i]=[h,f,c];break;case 1:[o,s,i]=[d,h,c];break;case 2:[o,s,i]=[c,h,f];break;case 3:[o,s,i]=[c,d,h];break;case 4:[o,s,i]=[f,c,h];break;case 5:[o,s,i]=[h,c,d];break}}return[o,s,i,e.length>3?e[3]:1]},lw=(...e)=>{const[t,n,r]=De(e,"rgb"),o=sp(t,n,r),s=ip(t,n,r),i=s-o,a=i*100/255,l=o/(255-i)*100;let u;return i===0?u=Number.NaN:(t===s&&(u=(n-r)/i),n===s&&(u=2+(r-t)/i),r===s&&(u=4+(t-n)/i),u*=60,u<0&&(u+=360)),[u,a,l]};ee.prototype.hcg=function(){return lw(this._rgb)};const uw=(...e)=>new ee(...e,"hcg");Ie.hcg=uw,Te.format.hcg=aw,Te.autodetect.push({p:1,test:(...e)=>{if(e=De(e,"hcg"),Re(e)==="array"&&e.length===3)return"hcg"}});const cw=(e,t,n)=>Xo(e,t,n,"hcg");Tt.hcg=cw;const{cos:Jo}=Math,dw=(...e)=>{e=De(e,"hsi");let[t,n,r]=e,o,s,i;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(i=(1-n)/3,o=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,s=1-(i+o)):t<2/3?(t-=1/3,o=(1-n)/3,s=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,i=1-(o+s)):(t-=2/3,s=(1-n)/3,i=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,o=1-(s+i)),o=mo(r*o*3),s=mo(r*s*3),i=mo(r*i*3),[o*255,s*255,i*255,e.length>3?e[3]:1]},{min:fw,sqrt:hw,acos:pw}=Math,mw=(...e)=>{let[t,n,r]=De(e,"rgb");t/=255,n/=255,r/=255;let o;const s=fw(t,n,r),i=(t+n+r)/3,a=i>0?1-s/i:0;return a===0?o=NaN:(o=(t-n+(t-r))/2,o/=hw((t-n)*(t-n)+(t-r)*(n-r)),o=pw(o),r>n&&(o=nr-o),o/=nr),[o*360,a,i]};ee.prototype.hsi=function(){return mw(this._rgb)};const bw=(...e)=>new ee(...e,"hsi");Ie.hsi=bw,Te.format.hsi=dw,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsi"),Re(e)==="array"&&e.length===3)return"hsi"}});const gw=(e,t,n)=>Xo(e,t,n,"hsi");Tt.hsi=gw;const qu=(...e)=>{e=De(e,"hsl");const[t,n,r]=e;let o,s,i;if(n===0)o=s=i=r*255;else{const a=[0,0,0],l=[0,0,0],u=r<.5?r*(1+n):r+n-r*n,c=2*r-u,d=t/360;a[0]=d+1/3,a[1]=d,a[2]=d-1/3;for(let f=0;f<3;f++)a[f]<0&&(a[f]+=1),a[f]>1&&(a[f]-=1),6*a[f]<1?l[f]=c+(u-c)*6*a[f]:2*a[f]<1?l[f]=u:3*a[f]<2?l[f]=c+(u-c)*(2/3-a[f])*6:l[f]=c;[o,s,i]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[o,s,i,e[3]]:[o,s,i,1]},mp=(...e)=>{e=De(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const o=sp(t,n,r),s=ip(t,n,r),i=(s+o)/2;let a,l;return s===o?(a=0,l=Number.NaN):a=i<.5?(s-o)/(s+o):(s-o)/(2-s-o),t==s?l=(n-r)/(s-o):n==s?l=2+(r-t)/(s-o):r==s&&(l=4+(t-n)/(s-o)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,i,e[3]]:[l,a,i]};ee.prototype.hsl=function(){return mp(this._rgb)};const vw=(...e)=>new ee(...e,"hsl");Ie.hsl=vw,Te.format.hsl=qu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsl"),Re(e)==="array"&&e.length===3)return"hsl"}});const yw=(e,t,n)=>Xo(e,t,n,"hsl");Tt.hsl=yw;const{floor:_w}=Math,ww=(...e)=>{e=De(e,"hsv");let[t,n,r]=e,o,s,i;if(r*=255,n===0)o=s=i=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=_w(t),l=t-a,u=r*(1-n),c=r*(1-n*l),d=r*(1-n*(1-l));switch(a){case 0:[o,s,i]=[r,d,u];break;case 1:[o,s,i]=[c,r,u];break;case 2:[o,s,i]=[u,r,d];break;case 3:[o,s,i]=[u,c,r];break;case 4:[o,s,i]=[d,u,r];break;case 5:[o,s,i]=[r,u,c];break}}return[o,s,i,e.length>3?e[3]:1]},{min:Ew,max:xw}=Math,kw=(...e)=>{e=De(e,"rgb");let[t,n,r]=e;const o=Ew(t,n,r),s=xw(t,n,r),i=s-o;let a,l,u;return u=s/255,s===0?(a=Number.NaN,l=0):(l=i/s,t===s&&(a=(n-r)/i),n===s&&(a=2+(r-t)/i),r===s&&(a=4+(t-n)/i),a*=60,a<0&&(a+=360)),[a,l,u]};ee.prototype.hsv=function(){return kw(this._rgb)};const Ow=(...e)=>new ee(...e,"hsv");Ie.hsv=Ow,Te.format.hsv=ww,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsv"),Re(e)==="array"&&e.length===3)return"hsv"}});const Sw=(e,t,n)=>Xo(e,t,n,"hsv");Tt.hsv=Sw;function Va(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(i=>[i]));let r=t[0].length,o=t[0].map((i,a)=>t.map(l=>l[a])),s=e.map(i=>o.map(a=>Array.isArray(i)?i.reduce((l,u,c)=>l+u*(a[c]||0),0):a.reduce((l,u)=>l+u*i,0)));return n===1&&(s=s[0]),r===1?s.map(i=>i[0]):s}const zu=(...e)=>{e=De(e,"lab");const[t,n,r,...o]=e,[s,i,a]=Nw([t,n,r]),[l,u,c]=cp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function Nw(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Va(n,e);return Va(t,r.map(o=>o**3))}const Wu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),s=dp(t,n,r);return[...Cw(s),...o.length>0&&o[0]<1?[o[0]]:[]]};function Cw(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Va(t,e);return Va(n,r.map(o=>Math.cbrt(o)))}ee.prototype.oklab=function(){return Wu(this._rgb)},Object.assign(Ie,{oklab:(...e)=>new ee(...e,"oklab")}),Te.format.oklab=zu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"oklab"),Re(e)==="array"&&e.length===3)return"oklab"}});const Tw=(e,t,n)=>{const r=e.oklab(),o=t.oklab();return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"oklab")};Tt.oklab=Tw;const Pw=(e,t,n)=>Xo(e,t,n,"oklch");Tt.oklch=Pw;const{pow:Zu,sqrt:Yu,PI:Gu,cos:bp,sin:gp,atan2:$w}=Math,Aw=(e,t="lrgb",n=null)=>{const r=e.length;n||(n=Array.from(new Array(r)).map(()=>1));const o=r/n.reduce(function(d,f){return d+f});if(n.forEach((d,f)=>{n[f]*=o}),e=e.map(d=>new ee(d)),t==="lrgb")return Dw(e,n);const s=e.shift(),i=s.get(t),a=[];let l=0,u=0;for(let d=0;d<i.length;d++)if(i[d]=(i[d]||0)*n[0],a.push(isNaN(i[d])?0:n[0]),t.charAt(d)==="h"&&!isNaN(i[d])){const f=i[d]/180*Gu;l+=bp(f)*n[0],u+=gp(f)*n[0]}let c=s.alpha()*n[0];e.forEach((d,f)=>{const h=d.get(t);c+=d.alpha()*n[f+1];for(let p=0;p<i.length;p++)if(!isNaN(h[p]))if(a[p]+=n[f+1],t.charAt(p)==="h"){const _=h[p]/180*Gu;l+=bp(_)*n[f+1],u+=gp(_)*n[f+1]}else i[p]+=h[p]*n[f+1]});for(let d=0;d<i.length;d++)if(t.charAt(d)==="h"){let f=$w(u/a[d],l/a[d])/Gu*180;for(;f<0;)f+=360;for(;f>=360;)f-=360;i[d]=f}else i[d]=i[d]/a[d];return c/=r,new ee(i,t).alpha(c>.99999?1:c,!0)},Dw=(e,t)=>{const n=e.length,r=[0,0,0,0];for(let o=0;o<e.length;o++){const s=e[o],i=t[o]/n,a=s._rgb;r[0]+=Zu(a[0],2)*i,r[1]+=Zu(a[1],2)*i,r[2]+=Zu(a[2],2)*i,r[3]+=a[3]*i}return r[0]=Yu(r[0]),r[1]=Yu(r[1]),r[2]=Yu(r[2]),r[3]>.9999999&&(r[3]=1),new ee(Du(r))},{pow:Iw}=Math;function Ra(e){let t="rgb",n=Ie("#ccc"),r=0,o=[0,1],s=[],i=[0,0],a=!1,l=[],u=!1,c=0,d=1,f=!1,h={},p=!0,_=1;const E=function(m){if(m=m||["#fff","#000"],m&&Re(m)==="string"&&Ie.brewer&&Ie.brewer[m.toLowerCase()]&&(m=Ie.brewer[m.toLowerCase()]),Re(m)==="array"){m.length===1&&(m=[m[0],m[0]]),m=m.slice(0);for(let P=0;P<m.length;P++)m[P]=Ie(m[P]);s.length=0;for(let P=0;P<m.length;P++)s.push(P/(m.length-1))}return L(),l=m},N=function(m){if(a!=null){const P=a.length-1;let I=0;for(;I<P&&m>=a[I];)I++;return I-1}return 0};let q=m=>m,z=m=>m;const B=function(m,P){let I,T;if(P==null&&(P=!1),isNaN(m)||m===null)return n;P?T=m:a&&a.length>2?T=N(m)/(a.length-2):d!==c?T=(m-c)/(d-c):T=1,T=z(T),P||(T=q(T)),_!==1&&(T=Iw(T,_)),T=i[0]+T*(1-i[0]-i[1]),T=mo(T,0,1);const $=Math.floor(T*1e4);if(p&&h[$])I=h[$];else{if(Re(l)==="array")for(let A=0;A<s.length;A++){const oe=s[A];if(T<=oe){I=l[A];break}if(T>=oe&&A===s.length-1){I=l[A];break}if(T>oe&&T<s[A+1]){T=(T-oe)/(s[A+1]-oe),I=Ie.interpolate(l[A],l[A+1],T,t);break}}else Re(l)==="function"&&(I=l(T));p&&(h[$]=I)}return I};var L=()=>h={};E(e);const D=function(m){const P=Ie(B(m));return u&&P[u]?P[u]():P};return D.classes=function(m){if(m!=null){if(Re(m)==="array")a=m,o=[m[0],m[m.length-1]];else{const P=Ie.analyze(o);m===0?a=[P.min,P.max]:a=Ie.limits(P,"e",m)}return D}return a},D.domain=function(m){if(!arguments.length)return o;c=m[0],d=m[m.length-1],s=[];const P=l.length;if(m.length===P&&c!==d)for(let I of Array.from(m))s.push((I-c)/(d-c));else{for(let I=0;I<P;I++)s.push(I/(P-1));if(m.length>2){const I=m.map(($,A)=>A/(m.length-1)),T=m.map($=>($-c)/(d-c));T.every(($,A)=>I[A]===$)||(z=$=>{if($<=0||$>=1)return $;let A=0;for(;$>=T[A+1];)A++;const oe=($-T[A])/(T[A+1]-T[A]);return I[A]+oe*(I[A+1]-I[A])})}}return o=[c,d],D},D.mode=function(m){return arguments.length?(t=m,L(),D):t},D.range=function(m,P){return E(m),D},D.out=function(m){return u=m,D},D.spread=function(m){return arguments.length?(r=m,D):r},D.correctLightness=function(m){return m==null&&(m=!0),f=m,L(),f?q=function(P){const I=B(0,!0).lab()[0],T=B(1,!0).lab()[0],$=I>T;let A=B(P,!0).lab()[0];const oe=I+(T-I)*P;let ke=A-oe,k=0,U=1,R=20;for(;Math.abs(ke)>.01&&R-- >0;)(function(){return $&&(ke*=-1),ke<0?(k=P,P+=(U-P)*.5):(U=P,P+=(k-P)*.5),A=B(P,!0).lab()[0],ke=A-oe})();return P}:q=P=>P,D},D.padding=function(m){return m!=null?(Re(m)==="number"&&(m=[m,m]),i=m,D):i},D.colors=function(m,P){arguments.length<2&&(P="hex");let I=[];if(arguments.length===0)I=l.slice(0);else if(m===1)I=[D(.5)];else if(m>1){const T=o[0],$=o[1]-T;I=Mw(0,m).map(A=>D(T+A/(m-1)*$))}else{e=[];let T=[];if(a&&a.length>2)for(let $=1,A=a.length,oe=1<=A;oe?$<A:$>A;oe?$++:$--)T.push((a[$-1]+a[$])*.5);else T=o;I=T.map($=>D($))}return Ie[P]&&(I=I.map(T=>T[P]())),I},D.cache=function(m){return m!=null?(p=m,D):p},D.gamma=function(m){return m!=null?(_=m,D):_},D.nodata=function(m){return m!=null?(n=Ie(m),D):n},D}function Mw(e,t,n){let r=[],o=e<t,s=t;for(let i=e;o?i<s:i>s;o?i++:i--)r.push(i);return r}const Vw=function(e){let t=[1,1];for(let n=1;n<e;n++){let r=[1];for(let o=1;o<=t.length;o++)r[o]=(t[o]||0)+t[o-1];t=r}return t},Rw=function(e){let t,n,r,o;if(e=e.map(s=>new ee(s)),e.length===2)[n,r]=e.map(s=>s.lab()),t=function(s){const i=[0,1,2].map(a=>n[a]+s*(r[a]-n[a]));return new ee(i,"lab")};else if(e.length===3)[n,r,o]=e.map(s=>s.lab()),t=function(s){const i=[0,1,2].map(a=>(1-s)*(1-s)*n[a]+2*(1-s)*s*r[a]+s*s*o[a]);return new ee(i,"lab")};else if(e.length===4){let s;[n,r,o,s]=e.map(i=>i.lab()),t=function(i){const a=[0,1,2].map(l=>(1-i)*(1-i)*(1-i)*n[l]+3*(1-i)*(1-i)*i*r[l]+3*(1-i)*i*i*o[l]+i*i*i*s[l]);return new ee(a,"lab")}}else if(e.length>=5){let s,i,a;s=e.map(l=>l.lab()),a=e.length-1,i=Vw(a),t=function(l){const u=1-l,c=[0,1,2].map(d=>s.reduce((f,h,p)=>f+i[p]*u**(a-p)*l**p*h[d],0));return new ee(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},Lw=e=>{const t=Rw(e);return t.scale=()=>Ra(t),t},{round:vp}=Math;ee.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vp)},ee.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:vp(t):t)},Object.assign(Ie,{rgb:(...e)=>new ee(...e,"rgb")}),Te.format.rgb=(...e)=>{const t=De(e,"rgba");return t[3]===void 0&&(t[3]=1),t},Te.autodetect.push({p:3,test:(...e)=>{if(e=De(e,"rgba"),Re(e)==="array"&&(e.length===3||e.length===4&&Re(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const En=(e,t,n)=>{if(!En[n])throw new Error("unknown blend mode "+n);return En[n](e,t)},Dr=e=>(t,n)=>{const r=Ie(n).rgb(),o=Ie(t).rgb();return Ie.rgb(e(r,o))},Ir=e=>(t,n)=>{const r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},jw=e=>e,Fw=(e,t)=>e*t/255,Uw=(e,t)=>e>t?t:e,Bw=(e,t)=>e>t?e:t,Hw=(e,t)=>255*(1-(1-e/255)*(1-t/255)),qw=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),zw=(e,t)=>255*(1-(1-t/255)/(e/255)),Ww=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);En.normal=Dr(Ir(jw)),En.multiply=Dr(Ir(Fw)),En.screen=Dr(Ir(Hw)),En.overlay=Dr(Ir(qw)),En.darken=Dr(Ir(Uw)),En.lighten=Dr(Ir(Bw)),En.dodge=Dr(Ir(Ww)),En.burn=Dr(Ir(zw));const{pow:Zw,sin:Yw,cos:Gw}=Math;function Kw(e=300,t=-1.5,n=1,r=1,o=[0,1]){let s=0,i;Re(o)==="array"?i=o[1]-o[0]:(i=0,o=[o,o]);const a=function(l){const u=nr*((e+120)/360+t*l),c=Zw(o[0]+i*l,r),f=(s!==0?n[0]+l*s:n)*c*(1-c)/2,h=Gw(u),p=Yw(u),_=c+f*(-.14861*h+1.78277*p),E=c+f*(-.29227*h-.90649*p),N=c+f*(1.97294*h);return Ie(Du([_*255,E*255,N*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?r:(r=l,a)},a.hue=function(l){return l==null?n:(n=l,Re(n)==="array"?(s=n[1]-n[0],s===0&&(n=n[1])):s=0,a)},a.lightness=function(l){return l==null?o:(Re(l)==="array"?(o=l,i=l[1]-l[0]):(o=[l,l],i=0),a)},a.scale=()=>Ie.scale(a),a.hue(n),a}const Xw="0123456789abcdef",{floor:Jw,random:Qw}=Math,e2=()=>{let e="#";for(let t=0;t<6;t++)e+=Xw.charAt(Jw(Qw()*16));return new ee(e,"hex")},{log:yp,pow:t2,floor:n2,abs:r2}=Math;function _p(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Re(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&Re(r)==="object"&&(r=r[t]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,o)=>wp(n,r,o),n}function wp(e,t="equal",n=7){Re(e)=="array"&&(e=_p(e));const{min:r,max:o}=e,s=e.values.sort((a,l)=>a-l);if(n===1)return[r,o];const i=[];if(t.substr(0,1)==="c"&&(i.push(r),i.push(o)),t.substr(0,1)==="e"){i.push(r);for(let a=1;a<n;a++)i.push(r+a/n*(o-r));i.push(o)}else if(t.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*yp(r),l=Math.LOG10E*yp(o);i.push(r);for(let u=1;u<n;u++)i.push(t2(10,a+u/n*(l-a)));i.push(o)}else if(t.substr(0,1)==="q"){i.push(r);for(let a=1;a<n;a++){const l=(s.length-1)*a/n,u=n2(l);if(u===l)i.push(s[u]);else{const c=l-u;i.push(s[u]*(1-c)+s[u+1]*c)}}i.push(o)}else if(t.substr(0,1)==="k"){let a;const l=s.length,u=new Array(l),c=new Array(n);let d=!0,f=0,h=null;h=[],h.push(r);for(let E=1;E<n;E++)h.push(r+E/n*(o-r));for(h.push(o);d;){for(let N=0;N<n;N++)c[N]=0;for(let N=0;N<l;N++){const q=s[N];let z=Number.MAX_VALUE,B;for(let L=0;L<n;L++){const D=r2(h[L]-q);D<z&&(z=D,B=L),c[B]++,u[N]=B}}const E=new Array(n);for(let N=0;N<n;N++)E[N]=null;for(let N=0;N<l;N++)a=u[N],E[a]===null?E[a]=s[N]:E[a]+=s[N];for(let N=0;N<n;N++)E[N]*=1/c[N];d=!1;for(let N=0;N<n;N++)if(E[N]!==h[N]){d=!0;break}h=E,f++,f>200&&(d=!1)}const p={};for(let E=0;E<n;E++)p[E]=[];for(let E=0;E<l;E++)a=u[E],p[a].push(s[E]);let _=[];for(let E=0;E<n;E++)_.push(p[E][0]),_.push(p[E][p[E].length-1]);_=_.sort((E,N)=>E-N),i.push(_[0]);for(let E=1;E<_.length;E+=2){const N=_[E];!isNaN(N)&&i.indexOf(N)===-1&&i.push(N)}}return i}const o2=(e,t)=>{e=new ee(e),t=new ee(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};/**
|
|
24
|
+
`));const f=Mh(c.props??{},i,l),h=yn(c,f,!0);for(const p in f)p.startsWith("on")&&(h.props||(h.props={}),h.props[p]=f[p]);return h}return Array.isArray(a)&&a.length===1?a[0]:a}return dt(s,Object.assign({},i,l),{default:()=>a})}function Ih(e){return e.flatMap(t=>t.type===$e?Ih(t.children):[t])}function Mh(...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 _u(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function e1(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var oi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oi||{});let si=pe({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 Ct({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function t1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function Ve(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Ho(e){if(ni.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e&&Object.prototype.hasOwnProperty.call(e,"value")){const t=Ve(e);if(t)return t.ownerDocument}return document}const Ca=["[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 gt=(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))(gt||{}),qo=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(qo||{});function n1(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ca)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Vh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Vh||{});function r1(e,t=0){var n;return e===((n=Ho(e))==null?void 0:n.body)?!1:Kt(t,{0(){return e.matches(Ca)},1(){let r=e;for(;r!==null;){if(r.matches(Ca))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 uo(e){e==null||e.focus({preventScroll:!0})}const o1=["textarea","input"].join(",");function s1(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,o1))??!1}function zo(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 Ln(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?zo(e):e:n1(e);o.length>0&&i.length>1&&(i=i.filter(h=>!o.includes(h))),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 h=l+c;if(t&16)h=(h+d)%d;else{if(h<0)return 3;if(h>=d)return 1}f=i[h],f==null||f.focus(u),c+=a}while(f!==s.activeElement);return t&6&&s1(f)&&f.select(),2}let co=[];t1(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||co[0]===t.target)return;let n=t.target;n=n.closest(Ca),co.unshift(n??t.target),co=co.filter(r=>r!=null&&r.isConnected),co.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 Ta(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Rh(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=Ve(n);r instanceof HTMLElement&&t.add(r)}return t}var Lh=(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))(Lh||{});const ii=Object.assign(pe({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:V(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=V(null);r({el:o,$el:o});const s=se(()=>Ho(o)),i=V(!1);He(()=>i.value=!0),Rt(()=>i.value=!1),a1({ownerDocument:s},se(()=>i.value&&!!(e.features&16)));const a=l1({ownerDocument:s,container:o,initialFocus:se(()=>e.initialFocus)},se(()=>i.value&&!!(e.features&2)));u1({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},se(()=>i.value&&!!(e.features&8)));const l=Qy();function u(h){const p=Ve(o);if(!p)return;(E=>E())(()=>{Kt(l.value,{[ri.Forwards]:()=>{Ln(p,gt.First,{skipElements:[h.relatedTarget]})},[ri.Backwards]:()=>{Ln(p,gt.Last,{skipElements:[h.relatedTarget]})}})})}const c=V(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!i.value)return;const p=Rh(e.containers);Ve(o)instanceof HTMLElement&&p.add(Ve(o));const _=h.relatedTarget;_ instanceof HTMLElement&&_.dataset.moonbaseFocusGuard!=="true"&&(jh(p,_)||(c.value?Ln(Ve(o),Kt(l.value,{[ri.Forwards]:()=>gt.Next,[ri.Backwards]:()=>gt.Previous})|gt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&uo(h.target)))}return()=>{const h={},p={ref:o,onKeydown:d,onFocusout:f},{features:_,initialFocus:E,containers:N,...q}=e;return dt($e,[!!(_&4)&&dt(si,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:oi.Focusable}),Ct({ourProps:p,theirProps:{...t,...q},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(_&4)&&dt(si,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:oi.Focusable})])}}}),{features:Lh});function i1(e){const t=V(co.slice());return Je([e],([n],[r])=>{r===!0&&n===!1?Ta(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=co.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function a1({ownerDocument:e},t){const n=i1(t);He(()=>{Zt(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&uo(n())},{flush:"post"})}),Rt(()=>{t.value&&uo(n())})}function l1({ownerDocument:e,container:t,initialFocus:n},r){const o=V(null),s=V(!1);return He(()=>s.value=!0),Rt(()=>s.value=!1),He(()=>{Je([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=Ve(t);l&&Ta(()=>{var d,f;if(!s.value)return;const u=Ve(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?uo(u):Ln(l,gt.First|gt.NoScroll)===qo.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 u1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ah((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=Rh(n);Ve(t)instanceof HTMLElement&&a.add(Ve(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?jh(a,u)?(r.value=u,uo(u)):(i.preventDefault(),i.stopPropagation(),uo(l)):uo(r.value)},!0)}function jh(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function c1(e){const t=Ab(e.getSnapshot());return Rt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function ai(){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 Ta(()=>{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=ai();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 d1(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 f1(){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 Fh(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function h1(){return/Android/gi.test(window.navigator.userAgent)}function p1(){return Fh()||h1()}function m1(){return Fh()?{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=ai();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 b1(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function g1(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const fo=d1(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:ai(),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:g1(n)},o=[m1(),f1(),b1()];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)}});fo.subscribe(()=>{const e=fo.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)&&fo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&fo.dispatch("TEARDOWN",n)}});function v1(e,t,n){const r=c1(fo),o=se(()=>{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;fo.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(fo.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let y1=0;function _1(){return++y1}function ho(){return _1()}const wu=new Map,li=new Map;function Uh(e,t=V(!0)){Zt(n=>{if(!t.value)return;const r=Ve(e);if(!r)return;n(()=>{if(!r)return;const s=li.get(r)??1;if(s===1?li.delete(r):li.set(r,s-1),s!==1)return;const i=wu.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,wu.delete(r))});const o=li.get(r)??0;li.set(r,o+1),o===0&&(wu.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function ui(e,t,n,r){ni.isServer||Zt(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const Bh=30;function w1(e,t,n=se(()=>!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:Ve(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!r1(l,Vh.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=V(null);ui(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),ui(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),ui(n,"click",i=>{p1()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};ui(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),ui(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=Bh||Math.abs(a.y-s.y)>=Bh))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Dh(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function E1({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=V(null),o=Ho(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(Ve(r))||u.contains((l=(a=Ve(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:dt(si,{features:oi.Hidden,ref:r})}}}let Hh=Symbol("Context");var Xt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Xt||{});function x1(){return Eu()!==null}function Eu(){return ve(Hh,null)}function k1(e){Bt(Hh,e)}const qh=Symbol("ForcePortalRootContext");function O1(){return ve(qh,!1)}const zh=pe({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Bt(qh,e.force),()=>{const{force:r,...o}=e;return Ct({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let Wh=Symbol("StackContext");var xu=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(xu||{});function S1(){return ve(Wh,()=>{})}function N1({type:e,enabled:t,element:n,onUpdate:r}){let o=S1();function s(...i){r==null||r(...i),o(...i)}He(()=>{Je(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),Rt(()=>{t.value&&s(1,e,n)}),Bt(Wh,s)}var sn=(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))(sn||{});let C1=Symbol("DescriptionContext");function T1({slot:e=V({}),name:t="Description",props:n={}}={}){let r=V([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return Bt(C1,{register:o,slot:e,name:t,props:n}),se(()=>r.value.length>0?r.value.join(" "):void 0)}function Zh(e){const t=Ho(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 ku=Symbol("PortalParentContext"),Yh=Symbol("PortalGroupContext"),P1=pe({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=V(null),o=O1(),s=ve(Yh,null),i=V(o===!0||s==null?Zh(r.value):s.resolveTarget()),a=V(!1);He(()=>{a.value=!0}),Zt(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=ve(ku,null);let u=!1;const c=pa();return Je(r,()=>{if(u||!l)return;const d=Ve(r);d&&(Rt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return dt(lg,{to:i.value},Ct({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});function $1(){const e=ve(ku,null),t=V([]);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,pe({name:"PortalWrapper",setup(s,{slots:i}){return Bt(ku,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}const A1=pe({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=As({resolveTarget(){return e.target}});return Bt(Yh,r),()=>{const{target:o,...s}=e;return Ct({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Ou=Symbol("DialogContext");function Su(e){const t=ve(Ou,null);if(t===null)throw new Error(`<${e} /> is missing a parent <Dialog /> component.`);return t}const Pa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",D1=pe({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:Pa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${ho()}`},role:{type:String,default:"dialog"},makeInert:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var me;const s=V(!1);He(()=>{s.value=!0});let i=!1;const a=se(()=>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=V(0),u=Eu(),c=se(()=>e.open===Pa&&u!==null?(u.value&Xt.Open)===Xt.Open:e.open),d=V(null),f=se(()=>Ho(d));if(o({el:d,$el:d}),!(e.open!==Pa||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===Pa?void 0:e.open}`);const p=se(()=>s.value&&c.value?0:1),_=se(()=>p.value===0),E=V(null),N={titleId:E,panelRef:V(null),dialogState:p,setTitleId(le){E.value!==le&&(E.value=le)},close(){t("close",!1)}},q=se(()=>l.value>1),z=ve(Ou,null)!==null,[B,L]=$1(),{resolveContainers:D,mainTreeNodeRef:m,MainTreeNode:P}=E1({portals:B,defaultContainers:[se(()=>N.panelRef.value??d.value)]}),I=se(()=>q.value?"parent":"leaf"),T=se(()=>u!==null?(u.value&Xt.Closing)===Xt.Closing:!1),$=se(()=>!e.makeInert||z||T.value?!1:_.value),A=se(()=>{var le;return Array.from(((le=f.value)==null?void 0:le.querySelectorAll("body > *"))??[]).find(he=>he.id==="moonbase"?!1:he.contains(Ve(m))&&he instanceof HTMLElement)??null});Uh(A,$);const oe=se(()=>q.value?!0:_.value),ke=se(()=>{var le;return Array.from(((le=f.value)==null?void 0:le.querySelectorAll("[data-moonbase-portal]"))??[]).find(he=>he.contains(Ve(m))&&he instanceof HTMLElement)??null});Uh(ke,oe),N1({type:"Dialog",enabled:se(()=>p.value===0),element:d,onUpdate:(le,he)=>{if(he==="Dialog")return Kt(le,{[xu.Add]:()=>l.value+=1,[xu.Remove]:()=>l.value-=1})}});const k=T1({name:"DialogDescription",slot:se(()=>({open:c.value}))});Bt(Ou,N);const U=se(()=>!(!_.value||q.value));w1(D,(le,he)=>{le.preventDefault(),N.close(),Qi(()=>he==null?void 0:he.focus())},U);const R=se(()=>!(q.value||p.value!==0));Ah((me=f.value)==null?void 0:me.defaultView,"keydown",le=>{R.value&&(le.defaultPrevented||le.key===sn.Escape&&(le.preventDefault(),le.stopPropagation(),N.close()))});const te=se(()=>!(!e.lockScroll||T.value||p.value!==0||z));return v1(f,te,le=>({containers:[...le.containers??[],D]})),Zt(le=>{if(p.value!==0)return;const he=Ve(d);if(!he)return;const _e=new ResizeObserver(Be=>{for(const ze of Be){const At=ze.target.getBoundingClientRect();At.x===0&&At.y===0&&At.width===0&&At.height===0&&N.close()}});_e.observe(he),le(()=>_e.disconnect())}),()=>{const{id:le,open:he,initialFocus:_e,...Be}=e,ze={...n,ref:d,id:le,role:a.value,"aria-modal":p.value===0?!0:void 0,"aria-labelledby":E.value,"aria-describedby":k.value},At={open:p.value===0};return dt(zh,{force:!0},()=>[dt(P1,()=>dt(A1,{target:d.value},()=>dt(zh,{force:!1},()=>dt(ii,{initialFocus:_e,containers:D,features:_.value?Kt(I.value,{parent:ii.features.RestoreFocus,leaf:ii.features.All&~ii.features.FocusLock}):ii.features.None},()=>dt(L,{},()=>Ct({ourProps:ze,theirProps:{...Be,...n},slot:At,attrs:n,slots:r,visible:p.value===0,features:Bo.RenderStrategy|Bo.Static,name:"Dialog"})))))),dt(P)])}}}),I1=pe({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${ho()}`}},setup(e,{attrs:t,slots:n}){const r=Su("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Ct({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),M1=pe({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${ho()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Su("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 Ct({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),Gh=pe({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${ho()}`}},setup(e,{attrs:t,slots:n}){const r=Su("DialogTitle");return He(()=>{r.setTitleId(e.id),Rt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Ct({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Kh(e,t){if(e)return e;const n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function V1(e,t){const n=V(Kh(e.value.type,e.value.as));return He(()=>{n.value=Kh(e.value.type,e.value.as)}),Zt(()=>{var r;n.value||Ve(t)&&Ve(t)instanceof HTMLButtonElement&&!((r=Ve(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}let R1=pe({props:{onFocus:{type:Function,required:!0}},setup(e){let t=V(!0);return()=>t.value?dt(si,{as:"button",type:"button",features:oi.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 Xh=Symbol("TabsContext");function $a(e){const t=ve(Xh,null);if(t===null)throw new Error(`<${e} /> is missing a parent <TabGroup /> component.`);return t}const Nu=Symbol("TabsSSRContext"),L1=pe({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=V(e.selectedIndex??e.defaultIndex),s=V([]),i=V([]),a=se(()=>e.selectedIndex!==null),l=se(()=>a.value?e.selectedIndex:o.value),u={selectedIndex:se(()=>o.value??e.defaultIndex??null),orientation:se(()=>e.vertical?"vertical":"horizontal"),activation:se(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(p){l.value!==p&&r("change",p),a.value||c(p)},registerTab(p){if(s.value.includes(p))return;const _=s.value[o.value];if(s.value.push(p),s.value=zo(s.value,Ve),!a.value){const E=s.value.indexOf(_)??o.value;E!==-1&&(o.value=E)}},unregisterTab(p){const _=s.value.indexOf(p);_!==-1&&s.value.splice(_,1)},registerPanel(p){i.value.includes(p)||(i.value.push(p),i.value=zo(i.value,Ve))},unregisterPanel(p){const _=i.value.indexOf(p);_!==-1&&i.value.splice(_,1)}};function c(p){const _=zo(u.tabs.value,Ve),E=zo(u.panels.value,Ve),N=_.filter(q=>{var z;return!((z=Ve(q))!=null&&z.hasAttribute("disabled"))});if(p<0||p>_.length-1){const q=Kt(o.value===null?0:Math.sign(p-o.value),{[-1]:()=>1,0:()=>Kt(Math.sign(p),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),z=Kt(q,{0:()=>_.indexOf(N[0]),1:()=>_.indexOf(N[N.length-1])});z!==-1&&(o.value=z),u.tabs.value=_,u.panels.value=E}else{const q=_.slice(0,p),B=[..._.slice(p),...q].find(D=>N.includes(D));if(!B)return;let L=_.indexOf(B)??u.selectedIndex.value;L===-1&&(L=u.selectedIndex.value),o.value=L,u.tabs.value=_,u.panels.value=E}}Bt(Xh,u);const d=V({tabs:[],panels:[]}),f=V(!1);He(()=>{f.value=!0}),Bt(Nu,se(()=>f.value?null:d.value));const h=se(()=>e.selectedIndex);return He(()=>{Je([h],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),Zt(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const p=zo(u.tabs.value,Ve);p.some((E,N)=>Ve(u.tabs.value[N])!==Ve(E))&&u.setSelectedIndex(p.findIndex(E=>Ve(E)===Ve(u.tabs.value[l.value])))}),()=>{const p={selectedIndex:o.value};return dt($e,[s.value.length<=0&&dt(R1,{onFocus:()=>{for(const _ of s.value){const E=Ve(_);if((E==null?void 0:E.tabIndex)===0)return E.focus(),!0}return!1}}),Ct({theirProps:{...n,..._u(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:p,slots:t,attrs:n,name:"TabGroup"})])}}}),j1=pe({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=$a("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Ct({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),F1=pe({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${ho()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=$a("Tab"),s=V(null);r({el:s,$el:s}),He(()=>o.registerTab(s)),Rt(()=>o.unregisterTab(s));const i=ve(Nu),a=se(()=>{if(i.value){const E=i.value.tabs.indexOf(e.id);return E===-1?i.value.tabs.push(e.id)-1:E}return-1}),l=se(()=>{const E=o.tabs.value.indexOf(s);return E===-1?a.value:E}),u=se(()=>l.value===o.selectedIndex.value);function c(E){var q;const N=E();if(N===qo.Success&&o.activation.value==="auto"){const z=(q=Ho(s))==null?void 0:q.activeElement,B=o.tabs.value.findIndex(L=>Ve(L)===z);B!==-1&&o.setSelectedIndex(B)}return N}function d(E){const N=o.tabs.value.map(z=>Ve(z)).filter(Boolean);if(E.key===sn.Space||E.key===sn.Enter){E.preventDefault(),E.stopPropagation(),o.setSelectedIndex(l.value);return}switch(E.key){case sn.Home:case sn.PageUp:return E.preventDefault(),E.stopPropagation(),c(()=>Ln(N,gt.First));case sn.End:case sn.PageDown:return E.preventDefault(),E.stopPropagation(),c(()=>Ln(N,gt.Last))}if(c(()=>Kt(o.orientation.value,{vertical(){return E.key===sn.ArrowUp?Ln(N,gt.Previous|gt.WrapAround):E.key===sn.ArrowDown?Ln(N,gt.Next|gt.WrapAround):qo.Error},horizontal(){return E.key===sn.ArrowLeft?Ln(N,gt.Previous|gt.WrapAround):E.key===sn.ArrowRight?Ln(N,gt.Next|gt.WrapAround):qo.Error}}))===qo.Success)return E.preventDefault()}const f=V(!1);function h(){var E;f.value||(f.value=!0,!e.disabled&&((E=Ve(s))==null||E.focus({preventScroll:!0}),o.setSelectedIndex(l.value),Ta(()=>{f.value=!1})))}function p(E){E.preventDefault()}const _=V1(se(()=>({as:e.as,type:t.type})),s);return()=>{var B;const E={selected:u.value,disabled:e.disabled??!1},{id:N,...q}=e,z={ref:s,onKeydown:d,onMousedown:p,onClick:h,id:N,role:"tab",type:_.value,"aria-controls":(B=Ve(o.panels.value[l.value]))==null?void 0:B.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return Ct({ourProps:z,theirProps:q,slot:E,attrs:t,slots:n,name:"Tab"})}}}),U1=pe({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=$a("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Ct({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),B1=pe({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-${ho()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=$a("TabPanel"),s=V(null);r({el:s,$el:s}),He(()=>o.registerPanel(s)),Rt(()=>o.unregisterPanel(s));const i=ve(Nu),a=se(()=>{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=se(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=se(()=>l.value===o.selectedIndex.value);return()=>{var _;const c={selected:u.value},{id:d,tabIndex:f,...h}=e,p={ref:s,id:d,role:"tabpanel","aria-labelledby":(_=Ve(o.tabs.value[l.value]))==null?void 0:_.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?dt(si,{as:"span","aria-hidden":!0,...p}):Ct({ourProps:p,theirProps:h,slot:c,attrs:t,slots:n,features:Bo.Static|Bo.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function H1(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Cu(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function Aa(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Tu=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Tu||{});function q1(e,t){const n=ai();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 Jh(e,t,n,r,o,s){const i=ai(),a=s!==void 0?H1(s):()=>{};return Aa(e,...o),Cu(e,...t,...n),i.nextFrame(()=>{Aa(e,...n),Cu(e,...r),i.add(q1(e,l=>(Aa(e,...r,...t),Cu(e,...o),a(l))))}),i.add(()=>Aa(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function po(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Pu=Symbol("TransitionContext");function z1(){return ve(Pu,null)!==null}function W1(){const e=ve(Pu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const $u=Symbol("NestingContext");function Z1(){const e=ve($u,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Da(e){return"children"in e?Da(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Qh(e){const t=V([]),n=V(!1);He(()=>n.value=!0),Rt(()=>n.value=!1);function r(s,i=Ar.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Kt(i,{[Ar.Unmount](){t.value.splice(a,1)},[Ar.Hidden](){t.value[a].state="hidden"}}),!Da(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,Ar.Unmount)}return{children:t,register:o,unregister:r}}const ep=Bo.RenderStrategy,Au=pe({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=V(0);function i(){s.value|=Xt.Opening,t("beforeEnter")}function a(){s.value&=~Xt.Opening,t("afterEnter")}function l(){s.value|=Xt.Closing,t("beforeLeave")}function u(){s.value&=~Xt.Closing,t("afterLeave")}if(!z1()&&x1())return()=>dt(tp,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=V(null),d=se(()=>e.unmount?Ar.Unmount:Ar.Hidden);o({el:c,$el:c});const{show:f,appear:h}=W1(),{register:p,unregister:_}=Z1(),E=V(f.value?"visible":"hidden"),N={value:!0},q=ho(),z={value:!1},B=Qh(()=>{!z.value&&E.value!=="hidden"&&(E.value="hidden",_(q),u())});He(()=>{const oe=p(q);Rt(oe)}),Zt(()=>{if(d.value===Ar.Hidden&&q){if(f.value&&E.value!=="visible"){E.value="visible";return}Kt(E.value,{hidden:()=>_(q),visible:()=>p(q)})}});const L=po(e.enter),D=po(e.enterFrom),m=po(e.enterTo),P=po(e.entered),I=po(e.leave),T=po(e.leaveFrom),$=po(e.leaveTo);He(()=>{Zt(()=>{if(E.value==="visible"){const oe=Ve(c);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function A(oe){const ke=N.value&&!h.value,k=Ve(c);!k||!(k instanceof HTMLElement)||ke||(z.value=!0,f.value&&i(),f.value||l(),oe(f.value?Jh(k,L,D,m,P,U=>{z.value=!1,U===Tu.Finished&&a()}):Jh(k,I,T,$,P,U=>{z.value=!1,U===Tu.Finished&&(Da(B)||(E.value="hidden",_(q),u()))})))}return He(()=>{Je([f],(oe,ke,k)=>{A(k),N.value=!1},{immediate:!0})}),Bt($u,B),k1(se(()=>Kt(E.value,{visible:Xt.Open,hidden:Xt.Closed})|s.value)),()=>{const{appear:oe,show:ke,enter:k,enterFrom:U,enterTo:R,entered:te,leave:me,leaveFrom:le,leaveTo:he,..._e}=e,Be={ref:c},ze={..._e,...h.value&&f.value&&ni.isServer?{class:Ss([n.class,_e.class,...L,...D])}:{}};return Ct({theirProps:ze,ourProps:Be,slot:{},slots:r,attrs:n,features:ep,visible:E.value==="visible",name:"TransitionChild"})}}}),Y1=Au,tp=pe({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=Eu(),s=se(()=>e.show===null&&o!==null?(o.value&Xt.Open)===Xt.Open:e.show);Zt(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=V(s.value?"visible":"hidden"),a=Qh(()=>{i.value="hidden"}),l=V(!0),u={show:s,appear:se(()=>e.appear||!l.value)};return He(()=>{Zt(()=>{l.value=!1,s.value?i.value="visible":Da(a)||(i.value="hidden")})}),Bt($u,a),Bt(Pu,u),()=>{const c=_u(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Ct({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[dt(Y1,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:ep,visible:i.value==="visible",name:"Transition"})}}});function G1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"})])}function K1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})])}function np(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})])}function X1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function J1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})])}function Q1(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z"})])}function e_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function t_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})])}function n_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12 3 3m0 0 3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function r_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function o_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function s_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"})])}function rp(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"})])}function i_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14"})])}function a_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function l_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"})])}function u_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}function c_(e,t){return g(),C("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const d_=["href","disabled","data-variant","data-size","data-corners","data-background"],f_=["disabled","data-variant","data-size","data-corners","data-background"],Wo=pe({__name:"MoonIconButton",props:{variant:{},size:{},disabled:{type:Boolean},href:{}},emits:["click"],setup(e){const t=e,n=ve(Et),r=se(()=>t.variant?t.variant==="secondary"?`secondary-${(n==null?void 0:n.value.theme.buttons)??"light"}`:t.variant:"primary");return(o,s)=>{var i,a,l,u;return o.href?(g(),C("a",{key:0,class:"moonbase:icon-button",href:o.href,disabled:o.disabled,"data-variant":r.value,"data-size":o.size||"large","data-corners":(i=b(n))==null?void 0:i.theme.corners,"data-background":(a=b(n))==null?void 0:a.theme.colors.background},[St(o.$slots,"default")],8,d_)):(g(),C("button",{key:1,class:"moonbase:icon-button",type:"button",disabled:o.disabled,"data-variant":r.value,"data-size":o.size||"large","data-corners":(l=b(n))==null?void 0:l.theme.corners,"data-background":(u=b(n))==null?void 0:u.theme.colors.background,onClick:s[0]||(s[0]=c=>o.$emit("click"))},[St(o.$slots,"default")],8,f_))}}}),tr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},h_={},p_={class:"moonbase:text-display"};function m_(e,t){return g(),C("h2",p_,[St(e.$slots,"default")])}const b_=tr(h_,[["render",m_]]),g_={},v_={class:"moonbase:text-subtitle"};function y_(e,t){return g(),C("h5",v_,[St(e.$slots,"default")])}const nt=tr(g_,[["render",y_]]),__=["data-contain"],w_={class:"moonbase:drawer-header"},E_=["data-background"],x_=pe({__name:"Drawer",setup(e){const t=Ae(),n=tt(),r=ve(Et),o=V(""),s=V("");Je(()=>[t.active,t.intent,t.next],([a,l,u])=>{if(s.value="",u&&(l===Q.SignIn||l===Q.SignUp)){const[c,d,f]=u;d===Q.ConfirmEmailChange?s.value="to confirm email":d===Q.RedeemVoucher?s.value="to redeem voucher":d===Q.ActivateProduct?s.value="to activate product":d===Q.ManageSubscription&&(s.value="to manage subscription")}switch(l){case Q.ActivateProduct:o.value="Activate product";return;case Q.SignIn:o.value="Sign in";return;case Q.SignUp:o.value="Sign up";return;case Q.ConfirmAccount:o.value="Confirm account";return;case Q.ConfirmEmail:o.value="Confirm email address";return;case Q.ConfirmEmailChange:o.value="Confirm email change";return;case Q.ForgotPassword:o.value="Forgot password";return;case Q.ResetPassword:o.value="Reset password";return}switch(a){case ue.Cart:o.value="My cart";return;case ue.Customer:o.value="My account";return;case ue.Product:o.value="Product details";return;case ue.Subscription:o.value="Subscription details";return;case ue.Redeem:o.value="Redeem voucher";return}return""});function i(){if(!n.user.value)t.show(ue.Authentication,Q.SignIn),t.enqueue(ue.Customer,Q.ViewProducts);else{const a=n.user.value.ownedProducts&&n.user.value.ownedProducts.length>0||n.user.value.subscribedProducts&&n.user.value.subscribedProducts.length>0;t.show(ue.Customer,a?Q.ViewProducts:Q.ViewAccount)}}return(a,l)=>(g(),Y(b(tp),{as:"template",show:b(t).active!==b(ue).None},{default:O(()=>{var u,c,d;return[w(b(D1),{as:"div",class:"moonbase:drawer","data-contain":!!((u=b(r))!=null&&u.target)||void 0,"make-inert":!((c=b(r))!=null&&c.target),"lock-scroll":!((d=b(r))!=null&&d.target),onClose:l[2]||(l[2]=f=>b(t).reset())},{default:O(()=>{var f;return[H("div",{class:"moonbase:drawer-container","data-contain":!!((f=b(r))!=null&&f.target)||void 0},[w(b(Au),{as:"template"},{default:O(()=>{var h;return[w(b(I1),{class:"moonbase:drawer-overlay","data-contain":!!((h=b(r))!=null&&h.target)||void 0},null,8,["data-contain"])]}),_:1}),w(b(Au),{as:"template"},{default:O(()=>{var h,p;return[w(b(M1),{class:"moonbase:drawer-panel","data-contain":!!((h=b(r))!=null&&h.target)||void 0,"data-background":(p=b(r))==null?void 0:p.theme.colors.background},{default:O(()=>{var _,E;return[H("div",w_,[b(t).history.length>0?(g(),Y(Wo,{key:0,variant:"subtle",onClick:l[0]||(l[0]=N=>b(t).back())},{default:O(()=>[w(b(K1))]),_:1})):(g(),Y(Wo,{key:1,variant:"subtle",onClick:l[1]||(l[1]=N=>b(t).reset())},{default:O(()=>[w(b(c_))]),_:1})),b(t).active===b(ue).Cart&&((_=b(r))!=null&&_.auth.signIn.enabled)?(g(),Y(Wo,{key:2,variant:"subtle",onClick:i},{default:O(()=>[w(b(u_))]),_:1})):fe("",!0)]),w(b(Gh),{as:b_},{default:O(()=>[M(j(o.value)+" ",1),s.value?(g(),Y(nt,{key:0},{default:O(()=>[M(j(s.value),1)]),_:1})):fe("",!0)]),_:1}),H("div",{class:"moonbase:drawer-content","data-background":(E=b(r))==null?void 0:E.theme.colors.background},[w(Ks,{name:b(t).direction===b(yu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:O(()=>[St(a.$slots,"default")]),_:3},8,["name"])],8,E_)]}),_:3},8,["data-contain","data-background"])]}),_:3})],8,__)]}),_:3},8,["data-contain","make-inert","lock-scroll"])]}),_:3},8,["show"]))}}),Ht=e=>new Promise(t=>setTimeout(t,e)),k_={},O_={class:"moonbase:text-body-bold"};function S_(e,t){return g(),C("span",O_,[St(e.$slots,"default")])}const ci=tr(k_,[["render",S_]]),N_=["data-visible","data-contain","data-location","data-corners"],C_={key:0,href:"https://moonbase.sh",target:"_blank",rel:"noopener",class:"moonbase:toolbar-action","data-action-width":"narrow"},T_=["disabled"],P_={key:0,class:"moonbase:toolbar-cart-count"},$_=pe({__name:"Toolbar",setup(e){const t=V(!1),n=Ae(),r=tt(),{items:o}=Tr(),s=ve(Et),i=se(()=>(o.value??[]).reduce((l,u)=>l+u.quantity,0));He(()=>{Ht(100).then(()=>t.value=!0)});function a(){if(!r.user.value)n.show(ue.Authentication,Q.SignIn),n.enqueue(ue.Customer,Q.ViewProducts);else{const l=r.user.value.ownedProducts&&r.user.value.ownedProducts.length>0||r.user.value.subscribedProducts&&r.user.value.subscribedProducts.length>0;n.show(ue.Customer,l?Q.ViewProducts:Q.ViewAccount)}}return(l,u)=>{var c,d,f,h,p,_;return g(),C("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(ue).None?"true":void 0,"data-contain":!!((c=b(s))!=null&&c.target)||void 0,"data-location":b(s).toolbar.location,"data-corners":(d=b(s))==null?void 0:d.theme.corners},[(f=b(s))!=null&&f.toolbar.show.moonbase?(g(),C("a",C_,u[1]||(u[1]=[Mf('<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)]))):fe("",!0),(h=b(s))!=null&&h.toolbar.show.account&&b(s).auth.signIn.enabled&&!b(r).user.value?(g(),C("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:a},[w(ci,null,{default:O(()=>u[2]||(u[2]=[M("Log in")])),_:1,__:[2]})],8,T_)):(p=b(s))!=null&&p.toolbar.show.account?(g(),C("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:a},[w(ci,null,{default:O(()=>{var E;return[M(j((E=b(r).user.value)==null?void 0:E.name),1)]}),_:1})])):fe("",!0),(_=b(s))!=null&&_.toolbar.show.cart?(g(),C("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:u[0]||(u[0]=E=>b(n).show(b(ue).Cart,b(Q).AddToCart))},[w(ci,null,{default:O(()=>u[3]||(u[3]=[M(" Cart ")])),_:1,__:[3]}),i.value>0?(g(),C("span",P_,j(i.value),1)):fe("",!0)])):fe("",!0)],8,N_)}}});function Jt(e,t){const n=typeof e=="object"?e.amount:e;t=typeof e=="object"?e.currency:t;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:n%1===0?0:void 0,minimumFractionDigits:n%1===0?0:2}).format(n)}catch{return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"symbol",maximumFractionDigits:n%1===0?0:void 0,minimumFractionDigits:n%1===0?0:2}).format(n)}}function A_(){const e=V(null),t=[/^user\.name$/,/^user\.email$/,/^cart\.item_count$/,/^product\.[a-z\-]+\.name$/,/^product\.[a-z\-]+\.price$/,/^product\.[a-z\-]+\.original_price$/,/^product\.[a-z\-]+\.discount_name$/,/^product\.[a-z\-]+\.discount_description$/,/^product\.[a-z\-]+\.discount_total$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.price$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.original_price$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_name$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_description$/,/^product\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_total$/,/^bundle\.[a-z\-]+\.name$/,/^bundle\.[a-z\-]+\.price$/,/^bundle\.[a-z\-]+\.original_price$/,/^bundle\.[a-z\-]+\.discount_name$/,/^bundle\.[a-z\-]+\.discount_description$/,/^bundle\.[a-z\-]+\.discount_total$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.price$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.original_price$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_name$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_description$/,/^bundle\.[a-z\-]+\.variation\[[a-z\-]+\]\.discount_total$/],n=V({}),r=se(()=>n.value.user||[]),o=se(()=>n.value.cart||[]),s=se(()=>n.value.product||[]),i=se(()=>n.value.bundle||[]),a=[/^user$/,/^cart.has_items$/,/^product\.[a-z\-]+(\.has_discount(_description)?)?$/,/^bundle\.[a-z\-]+(\.has_discount(_description)?)?$/],l=V({}),u=se(()=>l.value.user||[]),c=se(()=>l.value.cart||[]),d=se(()=>l.value.product||[]),f=se(()=>l.value.bundle||[]),h=tt(),{currency:p,items:_}=Tr(),E=_y(),N=vy();Je([r,u,h.user],([B,L,D])=>{if(B){for(const m of B)if(m.dataset.moonbaseOriginal===void 0&&(m.dataset.moonbaseOriginal=m.textContent||""),D)switch(m.dataset.moonbaseRender){case"user.name":m.textContent=D.name;break;case"user.email":m.textContent=D.email;break}else m.dataset.moonbaseOriginal?m.textContent=m.dataset.moonbaseOriginal:m.textContent="";for(const m of L)m.dataset.moonbaseOriginalHidden||(m.dataset.moonbaseOriginalHidden=m.hidden?"true":"false"),D?m.hidden=m.dataset.moonbaseIf==="!user":m.hidden=m.dataset.moonbaseIf==="user"}},{immediate:!0,deep:!0}),Je([o,c,_],([B,L,D])=>{if(B){for(const m of B)switch(m.dataset.moonbaseOriginal===void 0&&(m.dataset.moonbaseOriginal=m.textContent||""),m.dataset.moonbaseRender){case"cart.item_count":m.textContent=D.reduce((P,I)=>P+I.quantity,0).toString();break}for(const m of L){if(!m.dataset.moonbaseIf)return;const P=m.dataset.moonbaseIf.split("."),I=P[1];let T=!1;switch(I){case"has_items":T=D.length>0;break}P[0].startsWith("!")&&(T=!T),m.dataset.moonbaseOriginalHidden||(m.dataset.moonbaseOriginalHidden=m.hidden?"true":"false"),T?m.hidden=!1:m.hidden=!0}}},{immediate:!0,deep:!0}),Je([s,d,E,p],([B,L,D,m])=>{var P,I,T,$,A,oe,ke,k,U;if(B){for(const R of B){const te=((P=R.dataset.moonbaseRender)==null?void 0:P.split("."))??[],me=te[1];let le=te[2];const he=D.find(Be=>Be.id===me);let _e;if(le.startsWith("variation")){const Be=(I=le.match(/variation\[([a-z\-]+)\]/))==null?void 0:I[1];_e=(T=he==null?void 0:he.variations)==null?void 0:T.find(ze=>ze.id===Be),le=te[3]}else _e=he==null?void 0:he.defaultVariation;if(R.dataset.moonbaseOriginal===void 0&&(R.dataset.moonbaseOriginal=R.textContent||""),he&&_e)switch(le){case"name":R.textContent=he.name;break;case"price":R.textContent=Jt(_e.price[m],m);break;case"original_price":R.textContent=Jt(_e.originalPrice[m],m);break;case"discount_name":R.textContent=(($=_e.discount)==null?void 0:$.name)??R.dataset.moonbaseOriginal??"";break;case"discount_description":R.textContent=((A=_e.discount)==null?void 0:A.description)??R.dataset.moonbaseOriginal??"";break;case"discount_total":R.textContent=(oe=_e.discount)!=null&&oe.total?Jt(_e.discount.total[m],m):R.dataset.moonbaseOriginal??"";break}else R.dataset.moonbaseOriginal?R.textContent=R.dataset.moonbaseOriginal:R.textContent=""}for(const R of L){if(!R.dataset.moonbaseIf)return;const te=R.dataset.moonbaseIf.split("."),me=te.length===2?"product":te[2],le=te[1],he=D.find(Be=>Be.id===le);let _e=!1;switch(me){case"product":_e=!!he;break;case"has_discount":_e=!!((ke=he==null?void 0:he.defaultVariation)!=null&&ke.hasDiscount);break;case"has_discount_description":_e=!!((U=(k=he==null?void 0:he.defaultVariation)==null?void 0:k.discount)!=null&&U.description);break}te[0].startsWith("!")&&(_e=!_e),R.dataset.moonbaseOriginalHidden||(R.dataset.moonbaseOriginalHidden=R.hidden?"true":"false"),_e?R.hidden=!1:R.hidden=!0}}},{immediate:!0,deep:!0}),Je([i,f,N,p],([B,L,D,m])=>{var P,I,T,$,A,oe,ke,k,U;if(B){for(const R of B){const te=((P=R.dataset.moonbaseRender)==null?void 0:P.split("."))??[],me=te[1];let le=te[2];const he=D.find(Be=>Be.id===me);let _e;if(le.startsWith("variation")){const Be=(I=le.match(/variation\[([a-z\-]+)\]/))==null?void 0:I[1];_e=(T=he==null?void 0:he.variations)==null?void 0:T.find(ze=>ze.id===Be),le=te[3]}else _e=he==null?void 0:he.defaultVariation;if(R.dataset.moonbaseOriginal===void 0&&(R.dataset.moonbaseOriginal=R.textContent||""),he&&_e)switch(le){case"name":R.textContent=he.name;break;case"price":R.textContent=Jt(_e.price[m],m);break;case"original_price":R.textContent=Jt(_e.originalPrice[m],m);break;case"discount_name":R.textContent=(($=_e.discount)==null?void 0:$.name)??R.dataset.moonbaseOriginal??"";break;case"discount_description":R.textContent=((A=_e.discount)==null?void 0:A.description)??R.dataset.moonbaseOriginal??"";break;case"discount_total":R.textContent=(oe=_e.discount)!=null&&oe.total?Jt(_e.discount.total[m],m):R.dataset.moonbaseOriginal??"";break}else R.dataset.moonbaseOriginal?R.textContent=R.dataset.moonbaseOriginal:R.textContent=""}for(const R of L){if(!R.dataset.moonbaseIf)return;const te=R.dataset.moonbaseIf.split("."),me=te.length===2?"bundle":te[2],le=te[1],he=D.find(Be=>Be.id===le);let _e=!1;switch(me){case"bundle":_e=!!he;break;case"has_discount":_e=!!((ke=he==null?void 0:he.defaultVariation)!=null&&ke.hasDiscount);break;case"has_discount_description":_e=!!((U=(k=he==null?void 0:he.defaultVariation)==null?void 0:k.discount)!=null&&U.description);break}te[0].startsWith("!")&&(_e=!_e),R.dataset.moonbaseOriginalHidden||(R.dataset.moonbaseOriginalHidden=R.hidden?"true":"false"),_e?R.hidden=!1:R.hidden=!0}}},{immediate:!0,deep:!0});function q(B){var L;if(B.dataset&&B.dataset.moonbaseRender){const D=B.dataset.moonbaseRender;if(!D||!t.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];n.value[m]=n.value[m]||[],n.value[m].push(B)}}if(B.dataset&&B.dataset.moonbaseIf){const D=(L=B.dataset.moonbaseIf)==null?void 0:L.replace(/^!/,"");if(!D||!a.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];l.value[m]=l.value[m]||[],l.value[m].push(B)}}B.nodeType===Node.ELEMENT_NODE&&B.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(D=>q(D))}function z(B){var L;if(B.dataset&&B.dataset.moonbaseRender){const D=B.dataset.moonbaseRender;if(!D||!t.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];n.value[m]&&(n.value[m]=n.value[m].filter(P=>P!==B))}}if(B.dataset&&B.dataset.moonbaseIf){const D=(L=B.dataset.moonbaseIf)==null?void 0:L.replace(/^!/,"");if(!D||!a.some(m=>m.test(D)))console.warn(`Element has an unknown Moonbase target (${D})`,B);else if(D){const m=D.split(".")[0];l.value[m]&&(l.value[m]=l.value[m].filter(P=>P!==B))}}B.nodeType===Node.ELEMENT_NODE&&B.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(D=>z(D))}He(()=>{e.value=new MutationObserver((L,D)=>{for(const m of L)if(m.type==="childList"){for(const P of m.addedNodes)q(P);for(const P of m.removedNodes)z(P)}else if(m.type==="attributes"&&m.attributeName){const P=m.target.getAttribute(m.attributeName);Uo(`The ${m.attributeName} attribute was modified from ${m.oldValue} to ${P}.`);const I=m.target;if(m.attributeName==="data-moonbase-render"){const T=m.oldValue;if(T){const $=T.split(".")[0];n.value[$]&&(n.value[$]=n.value[$].filter(A=>A!==I))}if(!P||!t.some($=>$.test(P)))P&&console.warn(`Element has an unknown Moonbase target (${P})`,I),I.dataset.moonbaseOriginal&&(I.textContent=I.dataset.moonbaseOriginal);else if(P){const $=P==null?void 0:P.split(".")[0];n.value[$]=n.value[$]||[],n.value[$].includes(I)||n.value[$].push(I)}}if(m.attributeName==="data-moonbase-if"){const T=m.oldValue;if(T){const $=T.split(".")[0];l.value[$]&&(l.value[$]=l.value[$].filter(A=>A!==I))}if(!P||!a.some($=>$.test(P)))P&&console.warn(`Element has an unknown Moonbase target (${P})`,I),I.dataset.moonbaseOriginalHidden==="true"&&(I.hidden=!0);else if(P){const $=P==null?void 0:P.split(".")[0];l.value[$]=l.value[$]||[],l.value[$].includes(I)||l.value[$].push(I)}}}else Uo(`A ${m.type} mutation took place.`)}),e.value.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["data-moonbase-if","data-moonbase-render"]}),document.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(L=>q(L))}),Rt(()=>e.value&&e.value.disconnect())}const di=/^#?\?mb_intent=/;function D_(){const e=V(null);function t(r){const o=r.currentTarget,s=o.getAttribute("href");if(o.tagName==="A"&&s&&di.test(s)){r.preventDefault(),r.stopPropagation();const i=new URLSearchParams(s.startsWith("#")?s.slice(1):s),a=i.get("mb_intent");if(a&&Object.values(Q).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,c])=>[u.substring(3),c]));if(a===Q.Checkout&&l.complete)return;ic[a](l)}}}function n(r){if(!(r.nodeType!==Node.ELEMENT_NODE||r.dataset.moonbaseButton))try{const o=r.getAttribute("href");r.tagName==="A"&&o&&di.test(o)&&(Uo("Adding event listener to element:",r),r.addEventListener("click",t),r.dataset.moonbaseButton="true"),r.querySelectorAll('a[href^="?mb_intent="], a[href^="#?mb_intent="]').forEach(s=>n(s))}catch(o){console.warn("Could not add Moonbase listener to link",r,o)}}He(()=>{e.value=new MutationObserver((o,s)=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)n(a);else if(i.type==="attributes"&&i.attributeName){const a=i.target.getAttribute(i.attributeName);Uo(`The ${i.attributeName} attribute was modified from ${i.oldValue} to ${a}.`);const l=i.target;i.attributeName==="href"&&(i.oldValue&&di.test(i.oldValue)&&(!a||!di.test(a))?l.removeEventListener("click",t):a&&di.test(a)&&n(l))}else Uo(`A ${i.type} mutation took place.`)}),e.value.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["href"]}),document.querySelectorAll('a[href^="?mb_intent="], a[href^="#?mb_intent="]').forEach(o=>n(o))}),Rt(()=>e.value&&e.value.disconnect())}const{min:I_,max:M_}=Math,mo=(e,t=0,n=1)=>I_(M_(t,e),n),Du=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=mo(e[t],0,255)):t===3&&(e[t]=mo(e[t],0,1));return e},op={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])op[`[object ${e}]`]=e.toLowerCase();function Re(e){return op[Object.prototype.toString.call(e)]||"object"}const De=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Re(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),Zo=e=>{if(e.length<2)return null;const t=e.length-1;return Re(e[t])=="string"?e[t].toLowerCase():null},{PI:Ia,min:sp,max:ip}=Math,an=e=>Math.round(e*100)/100,Iu=e=>Math.round(e*100)/100,nr=Ia*2,Mu=Ia/3,V_=Ia/180,R_=180/Ia;function ap(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Te={format:{},autodetect:[]};class ee{constructor(...t){const n=this;if(Re(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=Zo(t),o=!1;if(!r){o=!0,Te.sorted||(Te.autodetect=Te.autodetect.sort((s,i)=>i.p-s.p),Te.sorted=!0);for(let s of Te.autodetect)if(r=s.test(...t),r)break}if(Te.format[r]){const s=Te.format[r].apply(null,o?t:t.slice(0,-1));n._rgb=Du(s)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return Re(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const L_="3.1.2",Ie=(...e)=>new ee(...e);Ie.version=L_;const Yo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},j_=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,F_=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,lp=e=>{if(e.match(j_)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,r=t>>8&255,o=t&255;return[n,r,o,1]}if(e.match(F_)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,r=t>>16&255,o=t>>8&255,s=Math.round((t&255)/255*100)/100;return[n,r,o,s]}throw new Error(`unknown hex color: ${e}`)},{round:Ma}=Math,up=(...e)=>{let[t,n,r,o]=De(e,"rgba"),s=Zo(e)||"auto";o===void 0&&(o=1),s==="auto"&&(s=o<1?"rgba":"rgb"),t=Ma(t),n=Ma(n),r=Ma(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+Ma(o*255).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};ee.prototype.name=function(){const e=up(this._rgb,"rgb");for(let t of Object.keys(Yo))if(Yo[t]===e)return t.toLowerCase();return e},Te.format.named=e=>{if(e=e.toLowerCase(),Yo[e])return lp(Yo[e]);throw new Error("unknown color name: "+e)},Te.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&Yo[e.toLowerCase()])return"named"}}),ee.prototype.alpha=function(e,t=!1){return e!==void 0&&Re(e)==="number"?t?(this._rgb[3]=e,this):new ee([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},ee.prototype.clipped=function(){return this._rgb._clipped||!1};const jn={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},U_=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function rr(e){const t=U_.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);jn.labWhitePoint=e,jn.Xn=t[0],jn.Zn=t[1]}function fi(){return jn.labWhitePoint}const Vu=(...e)=>{e=De(e,"lab");const[t,n,r]=e,[o,s,i]=B_(t,n,r),[a,l,u]=cp(o,s,i);return[a,l,u,e.length>3?e[3]:1]},B_=(e,t,n)=>{const{kE:r,kK:o,kKE:s,Xn:i,Yn:a,Zn:l}=jn,u=(e+16)/116,c=.002*t+u,d=u-.005*n,f=c*c*c,h=d*d*d,p=f>r?f:(116*c-16)/o,_=e>s?Math.pow((e+16)/116,3):e/o,E=h>r?h:(116*d-16)/o,N=p*i,q=_*a,z=E*l;return[N,q,z]},Ru=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},cp=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:o,MtxXYZ2RGB:s,RefWhiteRGB:i,Xn:a,Yn:l,Zn:u}=jn,c=a*r.m00+l*r.m10+u*r.m20,d=a*r.m01+l*r.m11+u*r.m21,f=a*r.m02+l*r.m12+u*r.m22,h=i.X*r.m00+i.Y*r.m10+i.Z*r.m20,p=i.X*r.m01+i.Y*r.m11+i.Z*r.m21,_=i.X*r.m02+i.Y*r.m12+i.Z*r.m22,E=(e*r.m00+t*r.m10+n*r.m20)*(h/c),N=(e*r.m01+t*r.m11+n*r.m21)*(p/d),q=(e*r.m02+t*r.m12+n*r.m22)*(_/f),z=E*o.m00+N*o.m10+q*o.m20,B=E*o.m01+N*o.m11+q*o.m21,L=E*o.m02+N*o.m12+q*o.m22,D=Ru(z*s.m00+B*s.m10+L*s.m20),m=Ru(z*s.m01+B*s.m11+L*s.m21),P=Ru(z*s.m02+B*s.m12+L*s.m22);return[D*255,m*255,P*255]},Lu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=dp(t,n,r),[l,u,c]=H_(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function H_(e,t,n){const{Xn:r,Yn:o,Zn:s,kE:i,kK:a}=jn,l=e/r,u=t/o,c=n/s,d=l>i?Math.pow(l,1/3):(a*l+16)/116,f=u>i?Math.pow(u,1/3):(a*u+16)/116,h=c>i?Math.pow(c,1/3):(a*c+16)/116;return[116*f-16,500*(d-f),200*(f-h)]}function ju(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const dp=(e,t,n)=>{e=ju(e/255),t=ju(t/255),n=ju(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:o,MtxAdaptMaI:s,Xn:i,Yn:a,Zn:l,As:u,Bs:c,Cs:d}=jn;let f=e*r.m00+t*r.m10+n*r.m20,h=e*r.m01+t*r.m11+n*r.m21,p=e*r.m02+t*r.m12+n*r.m22;const _=i*o.m00+a*o.m10+l*o.m20,E=i*o.m01+a*o.m11+l*o.m21,N=i*o.m02+a*o.m12+l*o.m22;let q=f*o.m00+h*o.m10+p*o.m20,z=f*o.m01+h*o.m11+p*o.m21,B=f*o.m02+h*o.m12+p*o.m22;return q*=_/u,z*=E/c,B*=N/d,f=q*s.m00+z*s.m10+B*s.m20,h=q*s.m01+z*s.m11+B*s.m21,p=q*s.m02+z*s.m12+B*s.m22,[f,h,p]};ee.prototype.lab=function(){return Lu(this._rgb)},Object.assign(Ie,{lab:(...e)=>new ee(...e,"lab"),getLabWhitePoint:fi,setLabWhitePoint:rr}),Te.format.lab=Vu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"lab"),Re(e)==="array"&&e.length===3)return"lab"}}),ee.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=jn.Kn*e,new ee(n,"lab").alpha(t.alpha(),!0)},ee.prototype.brighten=function(e=1){return this.darken(-e)},ee.prototype.darker=ee.prototype.darken,ee.prototype.brighter=ee.prototype.brighten,ee.prototype.get=function(e){const[t,n]=e.split("."),r=this[t]();if(n){const o=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(o>-1)return r[o];throw new Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:q_}=Math,z_=1e-7,W_=20;ee.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&Re(e)==="number"){if(e===0)return new ee([0,0,0,this._rgb[3]],"rgb");if(e===1)return new ee([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=W_;const o=(i,a)=>{const l=i.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)<z_||!r--?l:u>e?o(i,l):o(l,a)},s=(n>e?o(new ee([0,0,0]),this):o(this,new ee([255,255,255]))).rgb();return new ee([...s,this._rgb[3]])}return Z_(...this._rgb.slice(0,3))};const Z_=(e,t,n)=>(e=Fu(e),t=Fu(t),n=Fu(n),.2126*e+.7152*t+.0722*n),Fu=e=>(e/=255,e<=.03928?e/12.92:q_((e+.055)/1.055,2.4)),Tt={},Go=(e,t,n=.5,...r)=>{let o=r[0]||"lrgb";if(!Tt[o]&&!r.length&&(o=Object.keys(Tt)[0]),!Tt[o])throw new Error(`interpolation mode ${o} is not defined`);return Re(e)!=="object"&&(e=new ee(e)),Re(t)!=="object"&&(t=new ee(t)),Tt[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};ee.prototype.mix=ee.prototype.interpolate=function(e,t=.5,...n){return Go(this,e,t,...n)},ee.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new ee([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:Y_,cos:G_}=Math,fp=(...e)=>{let[t,n,r]=De(e,"lch");return isNaN(r)&&(r=0),r=r*V_,[t,G_(r)*n,Y_(r)*n]},Uu=(...e)=>{e=De(e,"lch");const[t,n,r]=e,[o,s,i]=fp(t,n,r),[a,l,u]=Vu(o,s,i);return[a,l,u,e.length>3?e[3]:1]},K_=(...e)=>{const t=ap(De(e,"hcl"));return Uu(...t)},{sqrt:X_,atan2:J_,round:Q_}=Math,hp=(...e)=>{const[t,n,r]=De(e,"lab"),o=X_(n*n+r*r);let s=(J_(r,n)*R_+360)%360;return Q_(o*1e4)===0&&(s=Number.NaN),[t,o,s]},Bu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=Lu(t,n,r),[l,u,c]=hp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};ee.prototype.lch=function(){return Bu(this._rgb)},ee.prototype.hcl=function(){return ap(Bu(this._rgb))},Object.assign(Ie,{lch:(...e)=>new ee(...e,"lch"),hcl:(...e)=>new ee(...e,"hcl")}),Te.format.lch=Uu,Te.format.hcl=K_,["lch","hcl"].forEach(e=>Te.autodetect.push({p:2,test:(...t)=>{if(t=De(t,e),Re(t)==="array"&&t.length===3)return e}})),ee.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=jn.Kn*e,n[1]<0&&(n[1]=0),new ee(n,"lch").alpha(t.alpha(),!0)},ee.prototype.desaturate=function(e=1){return this.saturate(-e)},ee.prototype.set=function(e,t,n=!1){const[r,o]=e.split("."),s=this[r]();if(o){const i=r.indexOf(o)-(r.substr(0,2)==="ok"?2:0);if(i>-1){if(Re(t)=="string")switch(t.charAt(0)){case"+":s[i]+=+t;break;case"-":s[i]+=+t;break;case"*":s[i]*=+t.substr(1);break;case"/":s[i]/=+t.substr(1);break;default:s[i]=+t}else if(Re(t)==="number")s[i]=t;else throw new Error("unsupported value for Color.set");const a=new ee(s,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${o} in mode ${r}`)}else return s},ee.prototype.tint=function(e=.5,...t){return Go(this,"white",e,...t)},ee.prototype.shade=function(e=.5,...t){return Go(this,"black",e,...t)};const ew=(e,t,n)=>{const r=e._rgb,o=t._rgb;return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"rgb")};Tt.rgb=ew;const{sqrt:Hu,pow:Ko}=Math,tw=(e,t,n)=>{const[r,o,s]=e._rgb,[i,a,l]=t._rgb;return new ee(Hu(Ko(r,2)*(1-n)+Ko(i,2)*n),Hu(Ko(o,2)*(1-n)+Ko(a,2)*n),Hu(Ko(s,2)*(1-n)+Ko(l,2)*n),"rgb")};Tt.lrgb=tw;const nw=(e,t,n)=>{const r=e.lab(),o=t.lab();return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"lab")};Tt.lab=nw;const Xo=(e,t,n,r)=>{let o,s;r==="hsl"?(o=e.hsl(),s=t.hsl()):r==="hsv"?(o=e.hsv(),s=t.hsv()):r==="hcg"?(o=e.hcg(),s=t.hcg()):r==="hsi"?(o=e.hsi(),s=t.hsi()):r==="lch"||r==="hcl"?(r="hcl",o=e.hcl(),s=t.hcl()):r==="oklch"&&(o=e.oklch().reverse(),s=t.oklch().reverse());let i,a,l,u,c,d;(r.substr(0,1)==="h"||r==="oklch")&&([i,l,c]=o,[a,u,d]=s);let f,h,p,_;return!isNaN(i)&&!isNaN(a)?(a>i&&a-i>180?_=a-(i+360):a<i&&i-a>180?_=a+360-i:_=a-i,h=i+n*_):isNaN(i)?isNaN(a)?h=Number.NaN:(h=a,(c==1||c==0)&&r!="hsv"&&(f=u)):(h=i,(d==1||d==0)&&r!="hsv"&&(f=l)),f===void 0&&(f=l+n*(u-l)),p=c+n*(d-c),r==="oklch"?new ee([p,f,h],r):new ee([h,f,p],r)},pp=(e,t,n)=>Xo(e,t,n,"lch");Tt.lch=pp,Tt.hcl=pp;const rw=e=>{if(Re(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,r=e&255;return[t,n,r,1]}throw new Error("unknown num color: "+e)},ow=(...e)=>{const[t,n,r]=De(e,"rgb");return(t<<16)+(n<<8)+r};ee.prototype.num=function(){return ow(this._rgb)},Object.assign(Ie,{num:(...e)=>new ee(...e,"num")}),Te.format.num=rw,Te.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Re(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const sw=(e,t,n)=>{const r=e.num(),o=t.num();return new ee(r+n*(o-r),"num")};Tt.num=sw;const{floor:iw}=Math,aw=(...e)=>{e=De(e,"hcg");let[t,n,r]=e,o,s,i;r=r*255;const a=n*255;if(n===0)o=s=i=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=iw(t),u=t-l,c=r*(1-n),d=c+a*(1-u),f=c+a*u,h=c+a;switch(l){case 0:[o,s,i]=[h,f,c];break;case 1:[o,s,i]=[d,h,c];break;case 2:[o,s,i]=[c,h,f];break;case 3:[o,s,i]=[c,d,h];break;case 4:[o,s,i]=[f,c,h];break;case 5:[o,s,i]=[h,c,d];break}}return[o,s,i,e.length>3?e[3]:1]},lw=(...e)=>{const[t,n,r]=De(e,"rgb"),o=sp(t,n,r),s=ip(t,n,r),i=s-o,a=i*100/255,l=o/(255-i)*100;let u;return i===0?u=Number.NaN:(t===s&&(u=(n-r)/i),n===s&&(u=2+(r-t)/i),r===s&&(u=4+(t-n)/i),u*=60,u<0&&(u+=360)),[u,a,l]};ee.prototype.hcg=function(){return lw(this._rgb)};const uw=(...e)=>new ee(...e,"hcg");Ie.hcg=uw,Te.format.hcg=aw,Te.autodetect.push({p:1,test:(...e)=>{if(e=De(e,"hcg"),Re(e)==="array"&&e.length===3)return"hcg"}});const cw=(e,t,n)=>Xo(e,t,n,"hcg");Tt.hcg=cw;const{cos:Jo}=Math,dw=(...e)=>{e=De(e,"hsi");let[t,n,r]=e,o,s,i;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(i=(1-n)/3,o=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,s=1-(i+o)):t<2/3?(t-=1/3,o=(1-n)/3,s=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,i=1-(o+s)):(t-=2/3,s=(1-n)/3,i=(1+n*Jo(nr*t)/Jo(Mu-nr*t))/3,o=1-(s+i)),o=mo(r*o*3),s=mo(r*s*3),i=mo(r*i*3),[o*255,s*255,i*255,e.length>3?e[3]:1]},{min:fw,sqrt:hw,acos:pw}=Math,mw=(...e)=>{let[t,n,r]=De(e,"rgb");t/=255,n/=255,r/=255;let o;const s=fw(t,n,r),i=(t+n+r)/3,a=i>0?1-s/i:0;return a===0?o=NaN:(o=(t-n+(t-r))/2,o/=hw((t-n)*(t-n)+(t-r)*(n-r)),o=pw(o),r>n&&(o=nr-o),o/=nr),[o*360,a,i]};ee.prototype.hsi=function(){return mw(this._rgb)};const bw=(...e)=>new ee(...e,"hsi");Ie.hsi=bw,Te.format.hsi=dw,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsi"),Re(e)==="array"&&e.length===3)return"hsi"}});const gw=(e,t,n)=>Xo(e,t,n,"hsi");Tt.hsi=gw;const qu=(...e)=>{e=De(e,"hsl");const[t,n,r]=e;let o,s,i;if(n===0)o=s=i=r*255;else{const a=[0,0,0],l=[0,0,0],u=r<.5?r*(1+n):r+n-r*n,c=2*r-u,d=t/360;a[0]=d+1/3,a[1]=d,a[2]=d-1/3;for(let f=0;f<3;f++)a[f]<0&&(a[f]+=1),a[f]>1&&(a[f]-=1),6*a[f]<1?l[f]=c+(u-c)*6*a[f]:2*a[f]<1?l[f]=u:3*a[f]<2?l[f]=c+(u-c)*(2/3-a[f])*6:l[f]=c;[o,s,i]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[o,s,i,e[3]]:[o,s,i,1]},mp=(...e)=>{e=De(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const o=sp(t,n,r),s=ip(t,n,r),i=(s+o)/2;let a,l;return s===o?(a=0,l=Number.NaN):a=i<.5?(s-o)/(s+o):(s-o)/(2-s-o),t==s?l=(n-r)/(s-o):n==s?l=2+(r-t)/(s-o):r==s&&(l=4+(t-n)/(s-o)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,i,e[3]]:[l,a,i]};ee.prototype.hsl=function(){return mp(this._rgb)};const vw=(...e)=>new ee(...e,"hsl");Ie.hsl=vw,Te.format.hsl=qu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsl"),Re(e)==="array"&&e.length===3)return"hsl"}});const yw=(e,t,n)=>Xo(e,t,n,"hsl");Tt.hsl=yw;const{floor:_w}=Math,ww=(...e)=>{e=De(e,"hsv");let[t,n,r]=e,o,s,i;if(r*=255,n===0)o=s=i=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=_w(t),l=t-a,u=r*(1-n),c=r*(1-n*l),d=r*(1-n*(1-l));switch(a){case 0:[o,s,i]=[r,d,u];break;case 1:[o,s,i]=[c,r,u];break;case 2:[o,s,i]=[u,r,d];break;case 3:[o,s,i]=[u,c,r];break;case 4:[o,s,i]=[d,u,r];break;case 5:[o,s,i]=[r,u,c];break}}return[o,s,i,e.length>3?e[3]:1]},{min:Ew,max:xw}=Math,kw=(...e)=>{e=De(e,"rgb");let[t,n,r]=e;const o=Ew(t,n,r),s=xw(t,n,r),i=s-o;let a,l,u;return u=s/255,s===0?(a=Number.NaN,l=0):(l=i/s,t===s&&(a=(n-r)/i),n===s&&(a=2+(r-t)/i),r===s&&(a=4+(t-n)/i),a*=60,a<0&&(a+=360)),[a,l,u]};ee.prototype.hsv=function(){return kw(this._rgb)};const Ow=(...e)=>new ee(...e,"hsv");Ie.hsv=Ow,Te.format.hsv=ww,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"hsv"),Re(e)==="array"&&e.length===3)return"hsv"}});const Sw=(e,t,n)=>Xo(e,t,n,"hsv");Tt.hsv=Sw;function Va(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(i=>[i]));let r=t[0].length,o=t[0].map((i,a)=>t.map(l=>l[a])),s=e.map(i=>o.map(a=>Array.isArray(i)?i.reduce((l,u,c)=>l+u*(a[c]||0),0):a.reduce((l,u)=>l+u*i,0)));return n===1&&(s=s[0]),r===1?s.map(i=>i[0]):s}const zu=(...e)=>{e=De(e,"lab");const[t,n,r,...o]=e,[s,i,a]=Nw([t,n,r]),[l,u,c]=cp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function Nw(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Va(n,e);return Va(t,r.map(o=>o**3))}const Wu=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),s=dp(t,n,r);return[...Cw(s),...o.length>0&&o[0]<1?[o[0]]:[]]};function Cw(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Va(t,e);return Va(n,r.map(o=>Math.cbrt(o)))}ee.prototype.oklab=function(){return Wu(this._rgb)},Object.assign(Ie,{oklab:(...e)=>new ee(...e,"oklab")}),Te.format.oklab=zu,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"oklab"),Re(e)==="array"&&e.length===3)return"oklab"}});const Tw=(e,t,n)=>{const r=e.oklab(),o=t.oklab();return new ee(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"oklab")};Tt.oklab=Tw;const Pw=(e,t,n)=>Xo(e,t,n,"oklch");Tt.oklch=Pw;const{pow:Zu,sqrt:Yu,PI:Gu,cos:bp,sin:gp,atan2:$w}=Math,Aw=(e,t="lrgb",n=null)=>{const r=e.length;n||(n=Array.from(new Array(r)).map(()=>1));const o=r/n.reduce(function(d,f){return d+f});if(n.forEach((d,f)=>{n[f]*=o}),e=e.map(d=>new ee(d)),t==="lrgb")return Dw(e,n);const s=e.shift(),i=s.get(t),a=[];let l=0,u=0;for(let d=0;d<i.length;d++)if(i[d]=(i[d]||0)*n[0],a.push(isNaN(i[d])?0:n[0]),t.charAt(d)==="h"&&!isNaN(i[d])){const f=i[d]/180*Gu;l+=bp(f)*n[0],u+=gp(f)*n[0]}let c=s.alpha()*n[0];e.forEach((d,f)=>{const h=d.get(t);c+=d.alpha()*n[f+1];for(let p=0;p<i.length;p++)if(!isNaN(h[p]))if(a[p]+=n[f+1],t.charAt(p)==="h"){const _=h[p]/180*Gu;l+=bp(_)*n[f+1],u+=gp(_)*n[f+1]}else i[p]+=h[p]*n[f+1]});for(let d=0;d<i.length;d++)if(t.charAt(d)==="h"){let f=$w(u/a[d],l/a[d])/Gu*180;for(;f<0;)f+=360;for(;f>=360;)f-=360;i[d]=f}else i[d]=i[d]/a[d];return c/=r,new ee(i,t).alpha(c>.99999?1:c,!0)},Dw=(e,t)=>{const n=e.length,r=[0,0,0,0];for(let o=0;o<e.length;o++){const s=e[o],i=t[o]/n,a=s._rgb;r[0]+=Zu(a[0],2)*i,r[1]+=Zu(a[1],2)*i,r[2]+=Zu(a[2],2)*i,r[3]+=a[3]*i}return r[0]=Yu(r[0]),r[1]=Yu(r[1]),r[2]=Yu(r[2]),r[3]>.9999999&&(r[3]=1),new ee(Du(r))},{pow:Iw}=Math;function Ra(e){let t="rgb",n=Ie("#ccc"),r=0,o=[0,1],s=[],i=[0,0],a=!1,l=[],u=!1,c=0,d=1,f=!1,h={},p=!0,_=1;const E=function(m){if(m=m||["#fff","#000"],m&&Re(m)==="string"&&Ie.brewer&&Ie.brewer[m.toLowerCase()]&&(m=Ie.brewer[m.toLowerCase()]),Re(m)==="array"){m.length===1&&(m=[m[0],m[0]]),m=m.slice(0);for(let P=0;P<m.length;P++)m[P]=Ie(m[P]);s.length=0;for(let P=0;P<m.length;P++)s.push(P/(m.length-1))}return L(),l=m},N=function(m){if(a!=null){const P=a.length-1;let I=0;for(;I<P&&m>=a[I];)I++;return I-1}return 0};let q=m=>m,z=m=>m;const B=function(m,P){let I,T;if(P==null&&(P=!1),isNaN(m)||m===null)return n;P?T=m:a&&a.length>2?T=N(m)/(a.length-2):d!==c?T=(m-c)/(d-c):T=1,T=z(T),P||(T=q(T)),_!==1&&(T=Iw(T,_)),T=i[0]+T*(1-i[0]-i[1]),T=mo(T,0,1);const $=Math.floor(T*1e4);if(p&&h[$])I=h[$];else{if(Re(l)==="array")for(let A=0;A<s.length;A++){const oe=s[A];if(T<=oe){I=l[A];break}if(T>=oe&&A===s.length-1){I=l[A];break}if(T>oe&&T<s[A+1]){T=(T-oe)/(s[A+1]-oe),I=Ie.interpolate(l[A],l[A+1],T,t);break}}else Re(l)==="function"&&(I=l(T));p&&(h[$]=I)}return I};var L=()=>h={};E(e);const D=function(m){const P=Ie(B(m));return u&&P[u]?P[u]():P};return D.classes=function(m){if(m!=null){if(Re(m)==="array")a=m,o=[m[0],m[m.length-1]];else{const P=Ie.analyze(o);m===0?a=[P.min,P.max]:a=Ie.limits(P,"e",m)}return D}return a},D.domain=function(m){if(!arguments.length)return o;c=m[0],d=m[m.length-1],s=[];const P=l.length;if(m.length===P&&c!==d)for(let I of Array.from(m))s.push((I-c)/(d-c));else{for(let I=0;I<P;I++)s.push(I/(P-1));if(m.length>2){const I=m.map(($,A)=>A/(m.length-1)),T=m.map($=>($-c)/(d-c));T.every(($,A)=>I[A]===$)||(z=$=>{if($<=0||$>=1)return $;let A=0;for(;$>=T[A+1];)A++;const oe=($-T[A])/(T[A+1]-T[A]);return I[A]+oe*(I[A+1]-I[A])})}}return o=[c,d],D},D.mode=function(m){return arguments.length?(t=m,L(),D):t},D.range=function(m,P){return E(m),D},D.out=function(m){return u=m,D},D.spread=function(m){return arguments.length?(r=m,D):r},D.correctLightness=function(m){return m==null&&(m=!0),f=m,L(),f?q=function(P){const I=B(0,!0).lab()[0],T=B(1,!0).lab()[0],$=I>T;let A=B(P,!0).lab()[0];const oe=I+(T-I)*P;let ke=A-oe,k=0,U=1,R=20;for(;Math.abs(ke)>.01&&R-- >0;)(function(){return $&&(ke*=-1),ke<0?(k=P,P+=(U-P)*.5):(U=P,P+=(k-P)*.5),A=B(P,!0).lab()[0],ke=A-oe})();return P}:q=P=>P,D},D.padding=function(m){return m!=null?(Re(m)==="number"&&(m=[m,m]),i=m,D):i},D.colors=function(m,P){arguments.length<2&&(P="hex");let I=[];if(arguments.length===0)I=l.slice(0);else if(m===1)I=[D(.5)];else if(m>1){const T=o[0],$=o[1]-T;I=Mw(0,m).map(A=>D(T+A/(m-1)*$))}else{e=[];let T=[];if(a&&a.length>2)for(let $=1,A=a.length,oe=1<=A;oe?$<A:$>A;oe?$++:$--)T.push((a[$-1]+a[$])*.5);else T=o;I=T.map($=>D($))}return Ie[P]&&(I=I.map(T=>T[P]())),I},D.cache=function(m){return m!=null?(p=m,D):p},D.gamma=function(m){return m!=null?(_=m,D):_},D.nodata=function(m){return m!=null?(n=Ie(m),D):n},D}function Mw(e,t,n){let r=[],o=e<t,s=t;for(let i=e;o?i<s:i>s;o?i++:i--)r.push(i);return r}const Vw=function(e){let t=[1,1];for(let n=1;n<e;n++){let r=[1];for(let o=1;o<=t.length;o++)r[o]=(t[o]||0)+t[o-1];t=r}return t},Rw=function(e){let t,n,r,o;if(e=e.map(s=>new ee(s)),e.length===2)[n,r]=e.map(s=>s.lab()),t=function(s){const i=[0,1,2].map(a=>n[a]+s*(r[a]-n[a]));return new ee(i,"lab")};else if(e.length===3)[n,r,o]=e.map(s=>s.lab()),t=function(s){const i=[0,1,2].map(a=>(1-s)*(1-s)*n[a]+2*(1-s)*s*r[a]+s*s*o[a]);return new ee(i,"lab")};else if(e.length===4){let s;[n,r,o,s]=e.map(i=>i.lab()),t=function(i){const a=[0,1,2].map(l=>(1-i)*(1-i)*(1-i)*n[l]+3*(1-i)*(1-i)*i*r[l]+3*(1-i)*i*i*o[l]+i*i*i*s[l]);return new ee(a,"lab")}}else if(e.length>=5){let s,i,a;s=e.map(l=>l.lab()),a=e.length-1,i=Vw(a),t=function(l){const u=1-l,c=[0,1,2].map(d=>s.reduce((f,h,p)=>f+i[p]*u**(a-p)*l**p*h[d],0));return new ee(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},Lw=e=>{const t=Rw(e);return t.scale=()=>Ra(t),t},{round:vp}=Math;ee.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vp)},ee.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:vp(t):t)},Object.assign(Ie,{rgb:(...e)=>new ee(...e,"rgb")}),Te.format.rgb=(...e)=>{const t=De(e,"rgba");return t[3]===void 0&&(t[3]=1),t},Te.autodetect.push({p:3,test:(...e)=>{if(e=De(e,"rgba"),Re(e)==="array"&&(e.length===3||e.length===4&&Re(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const En=(e,t,n)=>{if(!En[n])throw new Error("unknown blend mode "+n);return En[n](e,t)},Dr=e=>(t,n)=>{const r=Ie(n).rgb(),o=Ie(t).rgb();return Ie.rgb(e(r,o))},Ir=e=>(t,n)=>{const r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},jw=e=>e,Fw=(e,t)=>e*t/255,Uw=(e,t)=>e>t?t:e,Bw=(e,t)=>e>t?e:t,Hw=(e,t)=>255*(1-(1-e/255)*(1-t/255)),qw=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),zw=(e,t)=>255*(1-(1-t/255)/(e/255)),Ww=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);En.normal=Dr(Ir(jw)),En.multiply=Dr(Ir(Fw)),En.screen=Dr(Ir(Hw)),En.overlay=Dr(Ir(qw)),En.darken=Dr(Ir(Uw)),En.lighten=Dr(Ir(Bw)),En.dodge=Dr(Ir(Ww)),En.burn=Dr(Ir(zw));const{pow:Zw,sin:Yw,cos:Gw}=Math;function Kw(e=300,t=-1.5,n=1,r=1,o=[0,1]){let s=0,i;Re(o)==="array"?i=o[1]-o[0]:(i=0,o=[o,o]);const a=function(l){const u=nr*((e+120)/360+t*l),c=Zw(o[0]+i*l,r),f=(s!==0?n[0]+l*s:n)*c*(1-c)/2,h=Gw(u),p=Yw(u),_=c+f*(-.14861*h+1.78277*p),E=c+f*(-.29227*h-.90649*p),N=c+f*(1.97294*h);return Ie(Du([_*255,E*255,N*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?r:(r=l,a)},a.hue=function(l){return l==null?n:(n=l,Re(n)==="array"?(s=n[1]-n[0],s===0&&(n=n[1])):s=0,a)},a.lightness=function(l){return l==null?o:(Re(l)==="array"?(o=l,i=l[1]-l[0]):(o=[l,l],i=0),a)},a.scale=()=>Ie.scale(a),a.hue(n),a}const Xw="0123456789abcdef",{floor:Jw,random:Qw}=Math,e2=()=>{let e="#";for(let t=0;t<6;t++)e+=Xw.charAt(Jw(Qw()*16));return new ee(e,"hex")},{log:yp,pow:t2,floor:n2,abs:r2}=Math;function _p(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Re(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&Re(r)==="object"&&(r=r[t]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,o)=>wp(n,r,o),n}function wp(e,t="equal",n=7){Re(e)=="array"&&(e=_p(e));const{min:r,max:o}=e,s=e.values.sort((a,l)=>a-l);if(n===1)return[r,o];const i=[];if(t.substr(0,1)==="c"&&(i.push(r),i.push(o)),t.substr(0,1)==="e"){i.push(r);for(let a=1;a<n;a++)i.push(r+a/n*(o-r));i.push(o)}else if(t.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*yp(r),l=Math.LOG10E*yp(o);i.push(r);for(let u=1;u<n;u++)i.push(t2(10,a+u/n*(l-a)));i.push(o)}else if(t.substr(0,1)==="q"){i.push(r);for(let a=1;a<n;a++){const l=(s.length-1)*a/n,u=n2(l);if(u===l)i.push(s[u]);else{const c=l-u;i.push(s[u]*(1-c)+s[u+1]*c)}}i.push(o)}else if(t.substr(0,1)==="k"){let a;const l=s.length,u=new Array(l),c=new Array(n);let d=!0,f=0,h=null;h=[],h.push(r);for(let E=1;E<n;E++)h.push(r+E/n*(o-r));for(h.push(o);d;){for(let N=0;N<n;N++)c[N]=0;for(let N=0;N<l;N++){const q=s[N];let z=Number.MAX_VALUE,B;for(let L=0;L<n;L++){const D=r2(h[L]-q);D<z&&(z=D,B=L),c[B]++,u[N]=B}}const E=new Array(n);for(let N=0;N<n;N++)E[N]=null;for(let N=0;N<l;N++)a=u[N],E[a]===null?E[a]=s[N]:E[a]+=s[N];for(let N=0;N<n;N++)E[N]*=1/c[N];d=!1;for(let N=0;N<n;N++)if(E[N]!==h[N]){d=!0;break}h=E,f++,f>200&&(d=!1)}const p={};for(let E=0;E<n;E++)p[E]=[];for(let E=0;E<l;E++)a=u[E],p[a].push(s[E]);let _=[];for(let E=0;E<n;E++)_.push(p[E][0]),_.push(p[E][p[E].length-1]);_=_.sort((E,N)=>E-N),i.push(_[0]);for(let E=1;E<_.length;E+=2){const N=_[E];!isNaN(N)&&i.indexOf(N)===-1&&i.push(N)}}return i}const o2=(e,t)=>{e=new ee(e),t=new ee(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};/**
|
|
25
25
|
* @license
|
|
26
26
|
*
|
|
27
27
|
* The APCA contrast prediction algorithm is based of the formulas published
|
|
@@ -33,4 +33,4 @@ This will fail in production.`);a=ei,a._s.has(r)||(s?vu(r,t,o,a):Ph(r,o,a),je.NO
|
|
|
33
33
|
*
|
|
34
34
|
* You can read more about the APCA Readability Criterion at
|
|
35
35
|
* https://readtech.org/ARC/
|
|
36
|
-
*/const Ep=.027,s2=5e-4,i2=.1,xp=1.14,La=.022,kp=1.414,a2=(e,t)=>{e=new ee(e),t=new ee(t),e.alpha()<1&&(e=Go(t,e,e.alpha(),"rgb"));const n=Op(...e.rgb()),r=Op(...t.rgb()),o=n>=La?n:n+Math.pow(La-n,kp),s=r>=La?r:r+Math.pow(La-r,kp),i=Math.pow(s,.56)-Math.pow(o,.57),a=Math.pow(s,.65)-Math.pow(o,.62),l=Math.abs(s-o)<s2?0:o<s?i*xp:a*xp;return(Math.abs(l)<i2?0:l>0?l-Ep:l+Ep)*100};function Op(e,t,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:or,pow:ft,min:l2,max:u2,atan2:Sp,abs:Np,cos:ja,sin:Cp,exp:c2,PI:Tp}=Math;function d2(e,t,n=1,r=1,o=1){var s=function(Be){return 360*Be/(2*Tp)},i=function(Be){return 2*Tp*Be/360};e=new ee(e),t=new ee(t);const[a,l,u]=Array.from(e.lab()),[c,d,f]=Array.from(t.lab()),h=(a+c)/2,p=or(ft(l,2)+ft(u,2)),_=or(ft(d,2)+ft(f,2)),E=(p+_)/2,N=.5*(1-or(ft(E,7)/(ft(E,7)+ft(25,7)))),q=l*(1+N),z=d*(1+N),B=or(ft(q,2)+ft(u,2)),L=or(ft(z,2)+ft(f,2)),D=(B+L)/2,m=s(Sp(u,q)),P=s(Sp(f,z)),I=m>=0?m:m+360,T=P>=0?P:P+360,$=Np(I-T)>180?(I+T+360)/2:(I+T)/2,A=1-.17*ja(i($-30))+.24*ja(i(2*$))+.32*ja(i(3*$+6))-.2*ja(i(4*$-63));let oe=T-I;oe=Np(oe)<=180?oe:T<=I?oe+360:oe-360,oe=2*or(B*L)*Cp(i(oe)/2);const ke=c-a,k=L-B,U=1+.015*ft(h-50,2)/or(20+ft(h-50,2)),R=1+.045*D,te=1+.015*D*A,me=30*c2(-ft(($-275)/25,2)),he=-(2*or(ft(D,7)/(ft(D,7)+ft(25,7))))*Cp(2*i(me)),_e=or(ft(ke/(n*U),2)+ft(k/(r*R),2)+ft(oe/(o*te),2)+he*(k/(r*R))*(oe/(o*te)));return u2(0,l2(100,_e))}function f2(e,t,n="lab"){e=new ee(e),t=new ee(t);const r=e.get(n),o=t.get(n);let s=0;for(let i in r){const a=(r[i]||0)-(o[i]||0);s+=a*a}return Math.sqrt(s)}const h2=(...e)=>{try{return new ee(...e),!0}catch{return!1}},p2={cool(){return Ra([Ie.hsl(180,1,.9),Ie.hsl(250,.7,.4)])},hot(){return Ra(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ku={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pp=Object.keys(Ku),$p=new Map(Pp.map(e=>[e.toLowerCase(),e])),m2=typeof Proxy=="function"?new Proxy(Ku,{get(e,t){const n=t.toLowerCase();if($p.has(n))return e[$p.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Pp)}}):Ku,b2=(...e)=>{e=De(e,"cmyk");const[t,n,r,o]=e,s=e.length>4?e[4]:1;return o===1?[0,0,0,s]:[t>=1?0:255*(1-t)*(1-o),n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),s]},{max:Ap}=Math,g2=(...e)=>{let[t,n,r]=De(e,"rgb");t=t/255,n=n/255,r=r/255;const o=1-Ap(t,Ap(n,r)),s=o<1?1/(1-o):0,i=(1-t-o)*s,a=(1-n-o)*s,l=(1-r-o)*s;return[i,a,l,o]};ee.prototype.cmyk=function(){return g2(this._rgb)},Object.assign(Ie,{cmyk:(...e)=>new ee(...e,"cmyk")}),Te.format.cmyk=b2,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"cmyk"),Re(e)==="array"&&e.length===4)return"cmyk"}});const v2=(...e)=>{const t=De(e,"hsla");let n=Zo(e)||"lsa";return t[0]=an(t[0]||0)+"deg",t[1]=an(t[1]*100)+"%",t[2]=an(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),n="hsla"):t.length=3,`${n.substr(0,3)}(${t.join(" ")})`},y2=(...e)=>{const t=De(e,"lab");let n=Zo(e)||"lab";return t[0]=an(t[0])+"%",t[1]=an(t[1]),t[2]=an(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},_2=(...e)=>{const t=De(e,"lch");let n=Zo(e)||"lab";return t[0]=an(t[0])+"%",t[1]=an(t[1]),t[2]=isNaN(t[2])?"none":an(t[2])+"deg",n==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},w2=(...e)=>{const t=De(e,"lab");return t[0]=an(t[0]*100)+"%",t[1]=Iu(t[1]),t[2]=Iu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},Dp=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=Wu(t,n,r),[l,u,c]=hp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},E2=(...e)=>{const t=De(e,"lch");return t[0]=an(t[0]*100)+"%",t[1]=Iu(t[1]),t[2]=isNaN(t[2])?"none":an(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:Xu}=Math,x2=(...e)=>{const t=De(e,"rgba");let n=Zo(e)||"rgb";if(n.substr(0,3)==="hsl")return v2(mp(t),n);if(n.substr(0,3)==="lab"){const r=fi();rr("d50");const o=y2(Lu(t),n);return rr(r),o}if(n.substr(0,3)==="lch"){const r=fi();rr("d50");const o=_2(Bu(t),n);return rr(r),o}return n.substr(0,5)==="oklab"?w2(Wu(t)):n.substr(0,5)==="oklch"?E2(Dp(t)):(t[0]=Xu(t[0]),t[1]=Xu(t[1]),t[2]=Xu(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),n="rgba"),`${n.substr(0,3)}(${t.slice(0,n==="rgb"?3:4).join(" ")})`)},Ip=(...e)=>{e=De(e,"lch");const[t,n,r,...o]=e,[s,i,a]=fp(t,n,r),[l,u,c]=zu(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},sr=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,xn=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Fa=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,ln=/\s*/.source,Qo=/\s+/.source,Ju=/\s*,\s*/.source,Ua=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,es=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,Mp=new RegExp("^rgba?\\("+ln+[sr,sr,sr].join(Qo)+es+"\\)$"),Vp=new RegExp("^rgb\\("+ln+[sr,sr,sr].join(Ju)+ln+"\\)$"),Rp=new RegExp("^rgba\\("+ln+[sr,sr,sr,xn].join(Ju)+ln+"\\)$"),Lp=new RegExp("^hsla?\\("+ln+[Ua,Fa,Fa].join(Qo)+es+"\\)$"),jp=new RegExp("^hsl?\\("+ln+[Ua,Fa,Fa].join(Ju)+ln+"\\)$"),Fp=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Up=new RegExp("^lab\\("+ln+[xn,xn,xn].join(Qo)+es+"\\)$"),Bp=new RegExp("^lch\\("+ln+[xn,xn,Ua].join(Qo)+es+"\\)$"),Hp=new RegExp("^oklab\\("+ln+[xn,xn,xn].join(Qo)+es+"\\)$"),qp=new RegExp("^oklch\\("+ln+[xn,xn,Ua].join(Qo)+es+"\\)$"),{round:zp}=Math,ts=e=>e.map((t,n)=>n<=2?mo(zp(t),0,255):t),ht=(e,t=0,n=100,r=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,r?e=t+(e+1)*.5*(n-t):e=t+e*(n-t)),+e),Ft=(e,t)=>e==="none"?t:e,Qu=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Te.format.named)try{return Te.format.named(e)}catch{}if((t=e.match(Mp))||(t=e.match(Vp))){let n=t.slice(1,4);for(let o=0;o<3;o++)n[o]=+ht(Ft(n[o],0),0,255);n=ts(n);const r=t[4]!==void 0?+ht(t[4],0,1):1;return n[3]=r,n}if(t=e.match(Rp)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+ht(n[r],0,255);return n}if((t=e.match(Lp))||(t=e.match(jp))){const n=t.slice(1,4);n[0]=+Ft(n[0].replace("deg",""),0),n[1]=+ht(Ft(n[1],0),0,100)*.01,n[2]=+ht(Ft(n[2],0),0,100)*.01;const r=ts(qu(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}if(t=e.match(Fp)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=qu(n);for(let o=0;o<3;o++)r[o]=zp(r[o]);return r[3]=+t[4],r}if(t=e.match(Up)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,100),n[1]=ht(Ft(n[1],0),-125,125,!0),n[2]=ht(Ft(n[2],0),-125,125,!0);const r=fi();rr("d50");const o=ts(Vu(n));rr(r);const s=t[4]!==void 0?+ht(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Bp)){const n=t.slice(1,4);n[0]=ht(n[0],0,100),n[1]=ht(Ft(n[1],0),0,150,!1),n[2]=+Ft(n[2].replace("deg",""),0);const r=fi();rr("d50");const o=ts(Uu(n));rr(r);const s=t[4]!==void 0?+ht(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Hp)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,1),n[1]=ht(Ft(n[1],0),-.4,.4,!0),n[2]=ht(Ft(n[2],0),-.4,.4,!0);const r=ts(zu(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}if(t=e.match(qp)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,1),n[1]=ht(Ft(n[1],0),0,.4,!1),n[2]=+Ft(n[2].replace("deg",""),0);const r=ts(Ip(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}};Qu.test=e=>Mp.test(e)||Lp.test(e)||Up.test(e)||Bp.test(e)||Hp.test(e)||qp.test(e)||Vp.test(e)||Rp.test(e)||jp.test(e)||Fp.test(e)||e==="transparent",ee.prototype.css=function(e){return x2(this._rgb,e)};const k2=(...e)=>new ee(...e,"css");Ie.css=k2,Te.format.css=Qu,Te.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&Qu.test(e))return"css"}}),Te.format.gl=(...e)=>{const t=De(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const O2=(...e)=>new ee(...e,"gl");Ie.gl=O2,ee.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},ee.prototype.hex=function(e){return up(this._rgb,e)};const S2=(...e)=>new ee(...e,"hex");Ie.hex=S2,Te.format.hex=lp,Te.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Ba}=Math,Wp=e=>{const t=e/100;let n,r,o;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*Ba(r),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*Ba(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*Ba(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*Ba(r),o=255),[n,r,o,1]},{round:N2}=Math,C2=(...e)=>{const t=De(e,"rgb"),n=t[0],r=t[2];let o=1e3,s=4e4;const i=.4;let a;for(;s-o>i;){a=(s+o)*.5;const l=Wp(a);l[2]/l[0]>=r/n?s=a:o=a}return N2(a)};ee.prototype.temp=ee.prototype.kelvin=ee.prototype.temperature=function(){return C2(this._rgb)};const ec=(...e)=>new ee(...e,"temp");Object.assign(Ie,{temp:ec,kelvin:ec,temperature:ec}),Te.format.temp=Te.format.kelvin=Te.format.temperature=Wp,ee.prototype.oklch=function(){return Dp(this._rgb)},Object.assign(Ie,{oklch:(...e)=>new ee(...e,"oklch")}),Te.format.oklch=Ip,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"oklch"),Re(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Ie,{analyze:_p,average:Aw,bezier:Lw,blend:En,brewer:m2,Color:ee,colors:Yo,contrast:o2,contrastAPCA:a2,cubehelix:Kw,deltaE:d2,distance:f2,input:Te,interpolate:Go,limits:wp,mix:Go,random:e2,scale:Ra,scales:p2,valid:h2});const T2=[{name:"Slate",id:"slate",reference:!1,shades:[{number:50,hexcode:"#f8fafc"},{number:100,hexcode:"#f1f5f9"},{number:200,hexcode:"#e2e8f0"},{number:300,hexcode:"#cbd5e1"},{number:400,hexcode:"#94a3b8"},{number:500,hexcode:"#64748b"},{number:600,hexcode:"#475569"},{number:700,hexcode:"#334155"},{number:800,hexcode:"#1e293b"},{number:900,hexcode:"#0f172a"},{number:950,hexcode:"#020617"}]},{name:"Gray",id:"gray",reference:!1,shades:[{number:50,hexcode:"#f9fafb"},{number:100,hexcode:"#f3f4f6"},{number:200,hexcode:"#e5e7eb"},{number:300,hexcode:"#d1d5db"},{number:400,hexcode:"#9ca3af"},{number:500,hexcode:"#6b7280"},{number:600,hexcode:"#4b5563"},{number:700,hexcode:"#374151"},{number:800,hexcode:"#1f2937"},{number:900,hexcode:"#111827"},{number:950,hexcode:"#030712"}]},{name:"Zinc",id:"zinc",reference:!1,shades:[{number:50,hexcode:"#fafafa"},{number:100,hexcode:"#f4f4f5"},{number:200,hexcode:"#e4e4e7"},{number:300,hexcode:"#d4d4d8"},{number:400,hexcode:"#a1a1aa"},{number:500,hexcode:"#71717a"},{number:600,hexcode:"#52525b"},{number:700,hexcode:"#3f3f46"},{number:800,hexcode:"#27272a"},{number:900,hexcode:"#18181b"},{number:950,hexcode:"#09090b"}]},{name:"Neutral",id:"neutral",reference:!1,shades:[{number:50,hexcode:"#fafafa"},{number:100,hexcode:"#f5f5f5"},{number:200,hexcode:"#e5e5e5"},{number:300,hexcode:"#d4d4d4"},{number:400,hexcode:"#a3a3a3"},{number:500,hexcode:"#737373"},{number:600,hexcode:"#525252"},{number:700,hexcode:"#404040"},{number:800,hexcode:"#262626"},{number:900,hexcode:"#171717"},{number:950,hexcode:"#0a0a0a"}]},{name:"Stone",id:"stone",reference:!1,shades:[{number:50,hexcode:"#fafaf9"},{number:100,hexcode:"#f5f5f4"},{number:200,hexcode:"#e7e5e4"},{number:300,hexcode:"#d6d3d1"},{number:400,hexcode:"#a8a29e"},{number:500,hexcode:"#78716c"},{number:600,hexcode:"#57534e"},{number:700,hexcode:"#44403c"},{number:800,hexcode:"#292524"},{number:900,hexcode:"#1c1917"},{number:950,hexcode:"#0c0a09"}]},{name:"Red",id:"red",reference:!0,shades:[{number:50,hexcode:"#fef2f2"},{number:100,hexcode:"#fee2e2"},{number:200,hexcode:"#fecaca"},{number:300,hexcode:"#fca5a5"},{number:400,hexcode:"#f87171"},{number:500,hexcode:"#ef4444"},{number:600,hexcode:"#dc2626"},{number:700,hexcode:"#b91c1c"},{number:800,hexcode:"#991b1b"},{number:900,hexcode:"#7f1d1d"},{number:950,hexcode:"#450a0a"}]},{name:"Orange",id:"orange",reference:!0,shades:[{number:50,hexcode:"#fff7ed"},{number:100,hexcode:"#ffedd5"},{number:200,hexcode:"#fed7aa"},{number:300,hexcode:"#fdba74"},{number:400,hexcode:"#fb923c"},{number:500,hexcode:"#f97316"},{number:600,hexcode:"#ea580c"},{number:700,hexcode:"#c2410c"},{number:800,hexcode:"#9a3412"},{number:900,hexcode:"#7c2d12"},{number:950,hexcode:"#431407"}]},{name:"Amber",id:"amber",reference:!0,shades:[{number:50,hexcode:"#fffbeb"},{number:100,hexcode:"#fef3c7"},{number:200,hexcode:"#fde68a"},{number:300,hexcode:"#fcd34d"},{number:400,hexcode:"#fbbf24"},{number:500,hexcode:"#f59e0b"},{number:600,hexcode:"#d97706"},{number:700,hexcode:"#b45309"},{number:800,hexcode:"#92400e"},{number:900,hexcode:"#78350f"},{number:950,hexcode:"#451a03"}]},{name:"Yellow",id:"yellow",reference:!0,shades:[{number:50,hexcode:"#fefce8"},{number:100,hexcode:"#fef9c3"},{number:200,hexcode:"#fef08a"},{number:300,hexcode:"#fde047"},{number:400,hexcode:"#facc15"},{number:500,hexcode:"#eab308"},{number:600,hexcode:"#ca8a04"},{number:700,hexcode:"#a16207"},{number:800,hexcode:"#854d0e"},{number:900,hexcode:"#713f12"},{number:950,hexcode:"#422006"}]},{name:"Lime",id:"lime",reference:!0,shades:[{number:50,hexcode:"#f7fee7"},{number:100,hexcode:"#ecfccb"},{number:200,hexcode:"#d9f99d"},{number:300,hexcode:"#bef264"},{number:400,hexcode:"#a3e635"},{number:500,hexcode:"#84cc16"},{number:600,hexcode:"#65a30d"},{number:700,hexcode:"#4d7c0f"},{number:800,hexcode:"#3f6212"},{number:900,hexcode:"#365314"},{number:950,hexcode:"#1a2e05"}]},{name:"Green",id:"green",reference:!0,shades:[{number:50,hexcode:"#f0fdf4"},{number:100,hexcode:"#dcfce7"},{number:200,hexcode:"#bbf7d0"},{number:300,hexcode:"#86efac"},{number:400,hexcode:"#4ade80"},{number:500,hexcode:"#22c55e"},{number:600,hexcode:"#16a34a"},{number:700,hexcode:"#15803d"},{number:800,hexcode:"#166534"},{number:900,hexcode:"#14532d"},{number:950,hexcode:"#052e16"}]},{name:"Emerald",id:"emerald",reference:!0,shades:[{number:50,hexcode:"#ecfdf5"},{number:100,hexcode:"#d1fae5"},{number:200,hexcode:"#a7f3d0"},{number:300,hexcode:"#6ee7b7"},{number:400,hexcode:"#34d399"},{number:500,hexcode:"#10b981"},{number:600,hexcode:"#059669"},{number:700,hexcode:"#047857"},{number:800,hexcode:"#065f46"},{number:900,hexcode:"#064e3b"},{number:950,hexcode:"#022c22"}]},{name:"Teal",id:"teal",reference:!0,shades:[{number:50,hexcode:"#f0fdfa"},{number:100,hexcode:"#ccfbf1"},{number:200,hexcode:"#99f6e4"},{number:300,hexcode:"#5eead4"},{number:400,hexcode:"#2dd4bf"},{number:500,hexcode:"#14b8a6"},{number:600,hexcode:"#0d9488"},{number:700,hexcode:"#0f766e"},{number:800,hexcode:"#115e59"},{number:900,hexcode:"#134e4a"},{number:950,hexcode:"#042f2e"}]},{name:"Cyan",id:"cyan",reference:!0,shades:[{number:50,hexcode:"#ecfeff"},{number:100,hexcode:"#cffafe"},{number:200,hexcode:"#a5f3fc"},{number:300,hexcode:"#67e8f9"},{number:400,hexcode:"#22d3ee"},{number:500,hexcode:"#06b6d4"},{number:600,hexcode:"#0891b2"},{number:700,hexcode:"#0e7490"},{number:800,hexcode:"#155e75"},{number:900,hexcode:"#164e63"},{number:950,hexcode:"#083344"}]},{name:"Sky",id:"sky",reference:!0,shades:[{number:50,hexcode:"#f0f9ff"},{number:100,hexcode:"#e0f2fe"},{number:200,hexcode:"#bae6fd"},{number:300,hexcode:"#7dd3fc"},{number:400,hexcode:"#38bdf8"},{number:500,hexcode:"#0ea5e9"},{number:600,hexcode:"#0284c7"},{number:700,hexcode:"#0369a1"},{number:800,hexcode:"#075985"},{number:900,hexcode:"#0c4a6e"},{number:950,hexcode:"#082f49"}]},{name:"Blue",id:"blue",reference:!0,shades:[{number:50,hexcode:"#eff6ff"},{number:100,hexcode:"#dbeafe"},{number:200,hexcode:"#bfdbfe"},{number:300,hexcode:"#93c5fd"},{number:400,hexcode:"#60a5fa"},{number:500,hexcode:"#3b82f6"},{number:600,hexcode:"#2563eb"},{number:700,hexcode:"#1d4ed8"},{number:800,hexcode:"#1e40af"},{number:900,hexcode:"#1e3a8a"},{number:950,hexcode:"#172554"}]},{name:"Indigo",id:"indigo",reference:!0,shades:[{number:50,hexcode:"#eef2ff"},{number:100,hexcode:"#e0e7ff"},{number:200,hexcode:"#c7d2fe"},{number:300,hexcode:"#a5b4fc"},{number:400,hexcode:"#818cf8"},{number:500,hexcode:"#6366f1"},{number:600,hexcode:"#4f46e5"},{number:700,hexcode:"#4338ca"},{number:800,hexcode:"#3730a3"},{number:900,hexcode:"#312e81"},{number:950,hexcode:"#1e1b4b"}]},{name:"Violet",id:"violet",reference:!0,shades:[{number:50,hexcode:"#f5f3ff"},{number:100,hexcode:"#ede9fe"},{number:200,hexcode:"#ddd6fe"},{number:300,hexcode:"#c4b5fd"},{number:400,hexcode:"#a78bfa"},{number:500,hexcode:"#8b5cf6"},{number:600,hexcode:"#7c3aed"},{number:700,hexcode:"#6d28d9"},{number:800,hexcode:"#5b21b6"},{number:900,hexcode:"#4c1d95"},{number:950,hexcode:"#2e1065"}]},{name:"Purple",id:"purple",reference:!0,shades:[{number:50,hexcode:"#faf5ff"},{number:100,hexcode:"#f3e8ff"},{number:200,hexcode:"#e9d5ff"},{number:300,hexcode:"#d8b4fe"},{number:400,hexcode:"#c084fc"},{number:500,hexcode:"#a855f7"},{number:600,hexcode:"#9333ea"},{number:700,hexcode:"#7e22ce"},{number:800,hexcode:"#6b21a8"},{number:900,hexcode:"#581c87"},{number:950,hexcode:"#3b0764"}]},{name:"Fuchsia",id:"fuchsia",reference:!0,shades:[{number:50,hexcode:"#fdf4ff"},{number:100,hexcode:"#fae8ff"},{number:200,hexcode:"#f5d0fe"},{number:300,hexcode:"#f0abfc"},{number:400,hexcode:"#e879f9"},{number:500,hexcode:"#d946ef"},{number:600,hexcode:"#c026d3"},{number:700,hexcode:"#a21caf"},{number:800,hexcode:"#86198f"},{number:900,hexcode:"#701a75"},{number:950,hexcode:"#4a044e"}]},{name:"Pink",id:"pink",reference:!0,shades:[{number:50,hexcode:"#fdf2f8"},{number:100,hexcode:"#fce7f3"},{number:200,hexcode:"#fbcfe8"},{number:300,hexcode:"#f9a8d4"},{number:400,hexcode:"#f472b6"},{number:500,hexcode:"#ec4899"},{number:600,hexcode:"#db2777"},{number:700,hexcode:"#be185d"},{number:800,hexcode:"#9d174d"},{number:900,hexcode:"#831843"},{number:950,hexcode:"#500724"}]},{name:"Rose",id:"rose",reference:!0,shades:[{number:50,hexcode:"#fff1f2"},{number:100,hexcode:"#ffe4e6"},{number:200,hexcode:"#fecdd3"},{number:300,hexcode:"#fda4af"},{number:400,hexcode:"#fb7185"},{number:500,hexcode:"#f43f5e"},{number:600,hexcode:"#e11d48"},{number:700,hexcode:"#be123c"},{number:800,hexcode:"#9f1239"},{number:900,hexcode:"#881337"},{number:950,hexcode:"#4c0519"}]}];function P2(e){const r=T2.filter(i=>i.reference).map(i=>({...i,shades:i.shades.map(a=>({...a,delta:Ie.deltaE(e,a.hexcode)}))})).map(i=>({...i,closestShade:i.shades.reduce((a,l)=>a.delta<l.delta?a:l)})).reduce((i,a)=>i.closestShade.delta<a.closestShade.delta?i:a),o=r.shades.map(i=>({...i,lightnessDifference:Math.abs(Ie(i.hexcode).get("hsl.l")-e.get("hsl.l"))})),s=o.reduce((i,a)=>i.lightnessDifference<a.lightnessDifference?i:a);return{...r,shades:o,closestShade:s}}function $2(e){const t=Ie(e),n=P2(t),r=t.get("hsl.h"),o=Ie(n.closestShade.hexcode).get("hsl.h"),s=r-o,i=s===0?o.toString():s>0?`+${s}`:s.toString(),a=t.get("hsl.s")/Ie(n.closestShade.hexcode).get("hsl.s");return n.shades.map(u=>{if(u.number===n.closestShade.number)return{number:u.number,hexcode:t.hex()};let c=Ie(u.hexcode);const d=c.get("hsl.s")*a;return c=c.set("hsl.s",d),c=c.set("hsl.h",i),{number:u.number,hexcode:c.hex()}})}class Ha extends Error{constructor(){super(),this.name="IndiscriminateError"}}const A2={},D2={fill:"none",viewBox:"0 0 24 24"};function I2(e,t){return g(),C("svg",D2,t[0]||(t[0]=[H("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),H("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 Qt=tr(A2,[["render",I2],["__scopeId","data-v-687bcaf0"]]),M2={"aria-hidden":"true"},tc=pe({__name:"MoonButtonBase",props:{label:{},successLabel:{},errorLabel:{},icon:{},variant:{},size:{},working:{type:Boolean},success:{type:Boolean},error:{type:Boolean},disabled:{type:Boolean},type:{}},emits:["click"],setup(e){const t=e,n=ve(Et),r=se(()=>t.success?t.successLabel??t.label:t.error?t.errorLabel??t.label:t.label),o=se(()=>t.variant?t.variant==="secondary"?`secondary-${(n==null?void 0:n.value.theme.buttons)??"light"}`:t.variant:"primary");return(s,i)=>{var a,l;return g(),Y(Bl(s.type==="anchor"?"a":"button"),{class:"moonbase:button",type:s.type||"button",disabled:s.success||s.error||s.working||s.disabled,"data-success":s.success||void 0,"data-error":s.error||void 0,"data-working":s.working||void 0,"data-variant":o.value,"data-size":s.size||"large","data-corners":(a=b(n))==null?void 0:a.theme.corners,"data-background":(l=b(n))==null?void 0:l.theme.colors.background,"data-icon-visible":s.working||s.success||s.error||!!s.icon||void 0,onClick:i[0]||(i[0]=u=>s.$emit("click",u))},{default:O(()=>[H("div",M2,[s.working?(g(),Y(Qt,{key:0})):s.success?(g(),Y(b(e_),{key:1})):s.error?(g(),Y(b(o_),{key:2})):s.icon?(g(),Y(Bl(s.icon),{key:3})):fe("",!0)]),M(" "+j(r.value),1)]),_:1},8,["type","disabled","data-success","data-error","data-working","data-variant","data-size","data-corners","data-background","data-icon-visible"])}}}),st=pe({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},icon:{},variant:{},size:{},noReset:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=V(!1),r=V(!1),o=V(!1);async function s(){try{const i=t.handler();i instanceof Promise&&(n.value=!0,await i,n.value=!1,r.value=!0,await Ht(2500),t.noReset||(r.value=!1))}catch(i){if(n.value=!1,i instanceof Ha)return;o.value=!0,await Ht(2500),o.value=!1}}return(i,a)=>(g(),Y(tc,{label:i.label,working:n.value,"success-label":i.success,success:r.value,"error-label":i.error,error:o.value,icon:i.icon,disabled:i.disabled,variant:i.variant,size:i.size,onClick:s},null,8,["label","working","success-label","success","error-label","error","icon","disabled","variant","size"]))}}),V2={},R2={class:"moonbase:text-body"};function L2(e,t){return g(),C("span",R2,[St(e.$slots,"default")])}const rt=tr(V2,[["render",L2]]),j2={},F2={class:"moonbase:text-subtext"};function U2(e,t){return g(),C("span",F2,[St(e.$slots,"default")])}const Le=tr(j2,[["render",U2]]),B2={class:"moonbase:about"},H2=pe({__name:"About",setup(e){const t=Ae(),n="0.4.11";return(r,o)=>(g(),C("div",B2,[o[2]||(o[2]=Mf('<svg viewBox="0 0 512 512" height="56px" width="56px"><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)),w(b(Gh),{as:"h3"},{default:O(()=>o[0]||(o[0]=[M(" Moonbase Embedded Storefront ")])),_:1,__:[0]}),w(Le,null,{default:O(()=>[M(" Version "+j(b(n)),1)]),_:1}),w(rt,null,{default:O(()=>o[1]||(o[1]=[M(" This store is using the "),H("a",{href:"https://moonbase.sh/solutions/payments",target:"_blank"},"Moonbase Embedded Storefront",-1),M(" module to accept payments, provide authentication and power software licensing. ")])),_:1,__:[1]}),w(st,{label:"Close",variant:"primary",handler:()=>b(t).reset()},null,8,["handler"])]))}});var qt=(e=>(e.SignedIn="signed-in",e.SignedUp="signed-up",e.SignedOut="signed-out",e.RedeemedVoucher="redeemed-voucher",e.DownloadedProduct="downloaded-product",e.ActivatedProduct="activated-product",e.AddedToCart="added-to-cart",e.CheckoutInitiated="checkout-initiated",e.CheckoutClosed="checkout-closed",e.CheckoutCompleted="checkout-completed",e))(qt||{});const q2=["data-corners","data-variant"],z2={class:"moonbase:card-content"},kn=pe({__name:"MoonCard",setup(e){const t=ve(Et);return(n,r)=>{var o,s;return g(),C("div",{class:"moonbase:card","data-corners":(o=b(t))==null?void 0:o.theme.corners,"data-variant":(s=b(t))==null?void 0:s.theme.cards},[H("div",z2,[St(n.$slots,"default")]),St(n.$slots,"addon")],8,q2)}}}),W2=["data-corners"],Z2=["src"],Y2={key:1,class:"moonbase:image-placeholder"},en=pe({__name:"ProductIcon",props:{url:{},size:{}},setup(e){const t=ve(Et);return(n,r)=>{var o;return g(),C("div",{class:"moonbase:product-icon",style:Fi({width:`${n.size}px`,height:`${n.size}px`}),"data-corners":(o=b(t))==null?void 0:o.theme.corners},[n.url?(g(),C("img",{key:0,src:n.url,alt:""},null,8,Z2)):(g(),C("div",Y2,[w(b(t_))]))],12,W2)}}}),G2={},K2={class:"moonbase:text-title"};function X2(e,t){return g(),C("h4",K2,[St(e.$slots,"default")])}const ns=tr(G2,[["render",X2]]),J2={class:"moonbase:product-card-content"},Zp=pe({__name:"ProductCard",props:{product:{}},setup(e){return(t,n)=>(g(),Y(kn,{class:"moonbase:product-card"},{default:O(()=>[w(en,{url:t.product.iconUrl,size:72},null,8,["url"]),H("div",J2,[w(ns,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.name),1)]}),_:1}),w(Le,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.tagline),1)]}),_:1}),St(t.$slots,"description")]),St(t.$slots,"default")]),_:3}))}}),Q2={class:"moonbase:auto-activation"},eE={key:0,class:"moonbase:loader"},tE={key:1,class:"moonbase:loader"},nE={key:2,class:"moonbase:loader"},rE={key:3},oE={key:1,class:"moonbase:loader"},sE={key:2,class:"moonbase:loader"},iE={key:3,class:"moonbase:loader"},aE={key:4,class:"moonbase:auto-activation-content"},lE={key:0,class:"moonbase:auto-activation-option"},uE={class:"moonbase:auto-activation-cta"},cE={key:1,class:"moonbase:auto-activation-option"},dE={class:"moonbase:auto-activation-cta"},fE={key:2,class:"moonbase:auto-activation-option"},hE={key:3,class:"moonbase:auto-activation-option"},pE={class:"moonbase:auto-activation-cta"},mE={key:4,class:"moonbase:auto-activation-option"},bE={key:4,class:"moonbase:auto-activation-cta"},gE={key:5,class:"moonbase:auto-activation-cta"},vE=pe({__name:"AutoActivation",setup(e){const t=Ae(),{user:n,loaded:r}=tt(),o=ve(Lr),s=t.getParameter("token"),{activationRequest:i,loading:a,fulfilling:l,completing:u,error:c,fulfillLicense:d,fulfillTrial:f}=gy(s),h=ve(Gt);et(i,m=>{var P;!l.value&&!u.value&&(m==null?void 0:m.status)===fn.Requested&&((P=m==null?void 0:m.licenseEligibility)!=null&&P.eligible)&&d(),(m==null?void 0:m.status)===fn.Completed&&(o==null||o(qt.ActivatedProduct,{product:m.product,fulfillmentType:m.fulfillmentType,user:n.value}))},{deep:!0});const p=se(()=>{if(i.value)return b(Qs(i.value.product.id))}),_=se(()=>p.value&&p.value.defaultVariation),{currency:E,addToCart:N,setQuantity:q}=Tr();function z(){t.show(ue.Product,Q.ViewProduct,{product_id:i.value.product.id})}function B(){t.enqueue(ue.Activation,Q.ActivateProduct,t.parameters??void 0),t.show(ue.Authentication,Q.SignIn)}function L(){if(!p.value)return;const m=N(p.value);q(m,1),t.enqueue(ue.Activation,Q.ActivateProduct,t.parameters),t.show(ue.Cart,Q.ViewCart)}function D(){var m;t.enqueue(ue.Activation,Q.ActivateProduct,{...t.parameters,product_id:((m=i.value)==null?void 0:m.product.id)??""}),n.value?t.show(ue.Customer,Q.RedeemVoucher):t.show(ue.Redeem,Q.RedeemVoucher)}return(m,P)=>{var I,T,$,A,oe,ke,k;return g(),C("div",Q2,[b(a)||!b(r)||!((I=b(h))!=null&&I.loadedStorefront)?(g(),C("div",eE,[w(Qt)])):b(c)?(g(),C("div",tE,[w(nt,null,{default:O(()=>P[0]||(P[0]=[M(" Uh oh ")])),_:1,__:[0]}),w(rt,null,{default:O(()=>[M(j(b(c)),1)]),_:1})])):b(i)?(g(),C("div",rE,[b(i).product?(g(),Y(Zp,{key:0,product:b(i).product},null,8,["product"])):fe("",!0),((T=b(i))==null?void 0:T.status)===b(fn).Cancelled?(g(),C("div",oE,[w(nt,null,{default:O(()=>P[3]||(P[3]=[M(" Uh oh ")])),_:1,__:[3]}),w(rt,null,{default:O(()=>P[4]||(P[4]=[M(" This activation request was cancelled, open your app to try again. ")])),_:1,__:[4]})])):b(l)||b(u)?(g(),C("div",sE,[w(Qt),w(rt,null,{default:O(()=>[M(" Activating "+j(b(i).product.name)+"... ",1)]),_:1})])):(($=b(i))==null?void 0:$.status)===b(fn).Completed?(g(),C("div",iE,[w(nt,null,{default:O(()=>P[5]||(P[5]=[M(" Done! ")])),_:1,__:[5]}),w(rt,null,{default:O(()=>P[6]||(P[6]=[M(" Your product is activated. "),H("br",null,null,-1),M(" You may close this window and return to the app. ")])),_:1,__:[6]})])):(g(),C("div",aE,[_.value?(g(),C("div",lE,[w(nt,null,{default:O(()=>P[7]||(P[7]=[M(" Option 1: Purchase product ")])),_:1,__:[7]}),w(rt,null,{default:O(()=>[M(" Buy a copy of "+j(p.value.name)+" for ",1),H("strong",null,j(b(Jt)(p.value.defaultVariation.price[b(E)],b(E))),1),P[8]||(P[8]=M(". "))]),_:1,__:[8]}),H("span",uE,[w(st,{label:"Purchase",variant:"primary",handler:()=>L()},null,8,["handler"])])])):fe("",!0),b(n)?!b(n).ownedProducts||!((A=b(n).ownedProducts)!=null&&A.includes(b(i).product.id))&&!b(n).subscribedProducts||!((oe=b(n).subscribedProducts)!=null&&oe.includes(b(i).product.id))?(g(),C("div",fE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[10]||(P[10]=[M(" You don't own any licenses for this product. ")])),_:1,__:[10]})])):(ke=b(n).ownedProducts)!=null&&ke.includes(b(i).product.id)||(k=b(n).subscribedProducts)!=null&&k.includes(b(i).product.id)?(g(),C("div",hE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[11]||(P[11]=[M(" You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ")])),_:1,__:[11]}),H("span",pE,[w(st,{label:"Licenses",variant:"secondary",handler:()=>z()},null,8,["handler"])])])):fe("",!0):(g(),C("div",cE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[9]||(P[9]=[M(" Please sign in to use a license for this product. ")])),_:1,__:[9]}),H("span",dE,[w(st,{label:"Sign in",variant:"secondary",handler:()=>B()},null,8,["handler"])])])),b(i).trialEligibility?(g(),C("div",mE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"3":"2")+": Start trial ",1)]),_:1}),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(g(),Y(rt,{key:0},{default:O(()=>P[12]||(P[12]=[M(" You need to be signed in to start a trial for this product. ")])),_:1,__:[12]})):b(i).trialEligibility.eligible&&b(i).trialEligibility.existing?(g(),Y(rt,{key:1},{default:O(()=>[M(" You are eligible for a "+j(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial of which you have "+j(b(i).trialEligibility.numberOfDaysRemaining)+" days remaining. ",1)]),_:1})):b(i).trialEligibility.eligible?(g(),Y(rt,{key:2},{default:O(()=>[M(" You are eligible for a "+j(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial. ",1)]),_:1})):(g(),Y(rt,{key:3},{default:O(()=>P[13]||(P[13]=[M(" This device or product is not eligible for a trial. ")])),_:1,__:[13]})),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(g(),C("span",bE,[w(st,{label:"Sign in",variant:"secondary",handler:()=>B()},null,8,["handler"])])):b(i).trialEligibility.eligible?(g(),C("span",gE,[w(st,{label:"Start trial",variant:"secondary",handler:b(f)},null,8,["handler"])])):fe("",!0)])):fe("",!0),P[15]||(P[15]=H("div",{class:"moonbase:grow"},null,-1)),w(Le,{class:"moonbase:auto-activation-redeem"},{default:O(()=>[P[14]||(P[14]=M(" Have a voucher code? ")),H("button",{type:"button",onClick:D}," Redeem now ")]),_:1,__:[14]})]))])):(g(),C("div",nE,[w(nt,null,{default:O(()=>P[1]||(P[1]=[M(" Uh oh ")])),_:1,__:[1]}),w(rt,null,{default:O(()=>P[2]||(P[2]=[M(" Could not find activation request ")])),_:1,__:[2]})]))])}}}),yE={},_E={class:"moonbase:text-caption"};function wE(e,t){return g(),C("span",_E,[St(e.$slots,"default")])}const Mr=tr(yE,[["render",wE]]),EE=["data-corners"],xE=["accept"],kE={"data-error":""},OE=pe({__name:"DeviceTokenInput",props:{error:{}},emits:["input","error"],setup(e,{emit:t}){const n=t,r=ve(Et),o=V(!1),s=se(()=>{let u=".dt";return r!=null&&r.value&&(u=r.value.activation.deviceTokenFileExtension),u.startsWith(".")?u:`.${u}`});function i(u){const c=new FileReader;c.onload=d=>{var f;n("input",(f=d.target)==null?void 0:f.result)},c.readAsText(u)}function a(u){var d;o.value=!1;const c=(d=u.dataTransfer)==null?void 0:d.files;if(!c||c.length!==1){n("error",new Error("Only one file can be uploaded at a time!"));return}i(c[0])}function l(u){const c=u.target,d=c==null?void 0:c.files;if(!d||d.length!==1){n("error",new Error("Only one file can be uploaded at a time!"));return}i(d[0])}return(u,c)=>{var d,f;return g(),C("div",{class:Ss(["moonbase:device-token-input",{"moonbase:device-token-input--hovering":o.value}]),"data-corners":(d=b(r))==null?void 0:d.theme.corners,onDrag:c[0]||(c[0]=Cr(()=>{},["prevent","stop"])),onDragstart:c[1]||(c[1]=Cr(()=>{},["prevent","stop"])),onDragend:c[2]||(c[2]=Cr(h=>o.value=!1,["prevent","stop"])),onDragover:c[3]||(c[3]=Cr(h=>o.value=!0,["prevent","stop"])),onDragenter:c[4]||(c[4]=Cr(h=>o.value=!0,["prevent","stop"])),onDragleave:c[5]||(c[5]=Cr(h=>o.value=!1,["prevent","stop"])),onDrop:Cr(a,["prevent","stop"])},[w(b(r_)),c[6]||(c[6]=H("label",{for:"fallback-input"},[H("span",{class:"moonbase:underline"},"Choose a machine file"),M(" or drag here to upload ")],-1)),H("input",{id:"fallback-input",type:"file",accept:s.value,class:"moonbase:sr-only",onChange:l},null,40,xE),H("p",kE,j((f=u.error)==null?void 0:f.message),1)],42,EE)}}}),SE={class:"moonbase:manual-activation"},NE={key:1,class:"moonbase:loader"},CE={key:2,class:"moonbase:manual-activation-content"},TE=pe({__name:"ManualActivation",setup(e){const t=ve(Et),{activateProduct:n}=io(),r=Ii.Offline,o=V(0),s=V(null),i=V(null);async function a(l){o.value=1;try{i.value=await n(l,r),o.value=2}catch(u){s.value=u,o.value=0}}return(l,u)=>(g(),C("div",SE,[w(rt,null,{default:O(()=>u[2]||(u[2]=[M(" Upload your machine file here to get a license file for activating offline devices. The machine file can be generated in the installed app. ")])),_:1,__:[2]}),w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[o.value===0?(g(),Y(OE,{key:0,error:s.value,onInput:u[0]||(u[0]=c=>a(c)),onError:u[1]||(u[1]=c=>s.value=c)},null,8,["error"])):o.value===1?(g(),C("div",NE,[w(Qt)])):o.value===2&&i.value?(g(),C("div",CE,[w(nt,null,{default:O(()=>u[3]||(u[3]=[M(" Success! ")])),_:1,__:[3]}),w(rt,null,{default:O(()=>u[4]||(u[4]=[M(" Your license can be downloaded below: ")])),_:1,__:[4]}),i.value.license.product?(g(),Y(Zp,{key:0,product:i.value.license.product},{description:O(()=>[w(Mr,null,{default:O(()=>[M(j(i.value.license.activeNumberOfActivations)+" of "+j(i.value.license.maxNumberOfActivations)+" devices activated ",1)]),_:1})]),default:O(()=>{var c;return[w(Wo,{href:i.value.url,target:"_blank",download:((c=b(t))==null?void 0:c.activation.licenseTokenFileName)??"license-file.mb",class:"moonbase:manual-activation-download-button"},{default:O(()=>[w(b(n_))]),_:1},8,["href","download"])]}),_:1},8,["product"])):fe("",!0),u[5]||(u[5]=H("div",null,null,-1)),u[6]||(u[6]=H("div",null,null,-1))])):fe("",!0)]),_:1})]))}}),PE={class:"moonbase:activation"},$E=pe({__name:"Activation",setup(e){const t=Ae();return(n,r)=>(g(),C("div",PE,[b(t).getParameter("token")?(g(),Y(vE,{key:0})):(g(),Y(TE,{key:1}))]))}}),AE=["disabled"],Yp=Symbol("form-state"),ir=pe({__name:"MoonForm",props:{handler:{type:Function},disabled:{type:Boolean},noReset:{type:Boolean}},setup(e){const t=e,n=V(!1),r=V(!1),o=V(!1),s=se(()=>t.disabled||n.value||r.value||!1);Bt(Yp,{working:n,isSuccess:r,isError:o,disabled:s});async function i(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await Ht(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await Ht(2500),o.value=!1}}return(a,l)=>(g(),C("form",{disabled:s.value,onSubmit:Cr(i,["prevent"])},[St(a.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,AE))}}),DE=["hidden"],IE=["for"],ME=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby","data-corners"],VE=["id"],RE=["id"],Pt=pe({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){const t=ve(Et);return(n,r)=>{var o;return g(),C("div",{class:"moonbase:input",hidden:n.hidden||void 0},[H("label",{for:`mb-${n.name}`},j(n.label),9,IE),H("input",ru({id:`mb-${n.name}`,type:n.type??"text",name:`mb-${n.name}`,placeholder:n.placeholder,value:n.modelValue,disabled:n.disabled,"aria-invalid":!!n.error,"aria-describedby":n.error?`mb-${n.name}-error`:n.hint?`mb-${n.name}-hint`:void 0,"data-corners":(o=b(t))==null?void 0:o.theme.corners},n.$attrs,{onInput:r[0]||(r[0]=s=>{var i;return n.$emit("update:modelValue",(i=s.target)==null?void 0:i.value)})}),null,16,ME),n.error?(g(),C("p",{key:0,id:`mb-${n.name}-error`,class:"moonbase:input-hint","data-type":"error"},j(n.error),9,VE)):n.hint?(g(),C("p",{key:1,id:`mb-${n.name}-hint`,class:"moonbase:input-hint"},j(n.hint),9,RE)):fe("",!0)],8,DE)}}}),ar=pe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{},variant:{},size:{}},setup(e){const{working:t,isSuccess:n,isError:r,disabled:o}=ve(Yp);return(s,i)=>(g(),Y(tc,{label:s.label,working:b(t),"success-label":s.success,success:b(n),"error-label":s.error,error:b(r),type:"submit",disabled:b(o),variant:s.variant,size:s.size},null,8,["label","working","success-label","success","error-label","error","disabled","variant","size"]))}}),LE=["data-visible"],jE={class:"moonbase:sign-in-actions"},FE=["data-corners"],UE=pe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=ve(Et),i=ve(Lr),a=V(r.getParameter("email")??""),l=V(""),u=V(null);async function c(){u.value=null;try{const d=await o.signIn(a.value,l.value);i==null||i(qt.SignedIn,{user:d}),Ht(1500).then(()=>n("signedIn",d))}catch(d){throw d instanceof br?u.value="User not found":u.value=d.message,d}}return(d,f)=>(g(),Y(ir,{handler:c,class:"moonbase:sign-in"},{default:O(()=>{var h,p,_;return[w(Pt,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=E=>a.value=E),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=E=>l.value=E),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),H("span",{class:"moonbase:error","data-visible":!!u.value||void 0},j(u.value),9,LE),w(ar,{success:"Signed in",label:"Sign in",error:"Error"}),H("div",jE,[(h=b(s))!=null&&h.auth.signUp.enabled?(g(),Y(st,{key:0,label:"Create account",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).SignUp,{email:a.value})},null,8,["handler"])):fe("",!0),w(st,{label:"Forgot password",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).ForgotPassword,{email:a.value})},null,8,["handler"])]),(p=b(s))!=null&&p.auth.signIn.hint?(g(),C("div",{key:0,class:"moonbase:sign-in-hint","data-corners":(_=b(s))==null?void 0:_.theme.corners},[w(b(s_)),w(Le,null,{default:O(()=>[M(j(b(s).auth.signIn.hint),1)]),_:1})],8,FE)):fe("",!0)]}),_:1}))}}),rs=[{title:"Password must be at least 6 characters long",test:e=>e.length>=6},{title:"Password must contain uppercase letters",test:e=>/[A-Z]/.test(e)},{title:"Password must contain lowercase letters",test:e=>/[a-z]/.test(e)},{title:"Password must contain at least one number",test:e=>/\d/.test(e)},{title:"Password must contain at least one special character",test:e=>/[=+\-^$*.[\\\]{}()?!@#%&/,><':;|_~`]/.test(e)}],BE={key:0,class:"moonbase:loader"},HE={key:1,class:"moonbase:error","data-visible":""},qE={key:0,class:"moonbase:password-validation"},zE=["data-visible"],WE=pe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=V(!0),i=V(null),a=V(""),l=V(!1),u=V(null),c=se(()=>rs.some(f=>!f.test(a.value)));He(async()=>{try{const f=r.getParameter("email"),h=r.getParameter("code");if(!f||!h)throw new Error("Link is broken");i.value=await o.confirmAccount(f,h)}catch(f){f instanceof br?u.value="Could not find a user to confirm":u.value=f.message}s.value=!1});async function d(){var f,h;if(u.value=null,!!((f=i.value)!=null&&f.resetPasswordToken))try{const p=r.getParameter("email");await o.resetPassword(p,a.value,(h=i.value)==null?void 0:h.resetPasswordToken);const _=await o.signIn(p,a.value);Ht(1500).then(()=>n("confirmedAccount",_))}catch(p){throw u.value=p.message,p}}return(f,h)=>(g(),Y(ir,{handler:d,disabled:c.value,class:"moonbase:confirm-account"},{default:O(()=>[s.value?(g(),C("div",BE,[w(Qt)])):i.value?(g(),C($e,{key:2},[H("h3",null," Hi "+j(i.value.name)+", ",1),h[2]||(h[2]=H("p",null," Please create a new password for your account: ",-1)),w(Pt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),w(Pt,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=p=>a.value=p),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:h[1]||(h[1]=p=>l.value=!0)},null,8,["modelValue"]),l.value&&c.value?(g(),C("div",qE,[(g(!0),C($e,null,_t(b(rs).filter(p=>!p.test(a.value)),p=>(g(),Y(Le,{key:p.title,"data-error":""},{default:O(()=>[M(j(p.title),1)]),_:2},1024))),128))])):fe("",!0),w(ar,{success:"Password saved",label:"Save password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!u.value||void 0},j(u.value),9,zE)],64)):(g(),C("div",HE,j(u.value),1))]),_:1},8,["disabled"]))}}),ZE={class:"moonbase:confirm-email-change"},YE={key:0,class:"moonbase:loader"},GE={key:1,class:"moonbase:error","data-visible":""},KE=pe({__name:"ConfirmEmail",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ae(),{user:o,confirmEmail:s}=tt(),i=V(!0),a=V(null);return He(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),Ht(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>(g(),C("div",ZE,[i.value?(g(),C("div",YE,[w(Qt)])):a.value?(g(),C("div",GE,j(a.value),1)):(g(),C($e,{key:2},[w(nt,null,{default:O(()=>u[0]||(u[0]=[M(" Success! ")])),_:1,__:[0]}),u[1]||(u[1]=H("p",null," Thanks for confirming your new email. ",-1)),b(o)?(g(),Y(st,{key:0,handler:()=>b(r).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0),label:"Continue"},null,8,["handler"])):fe("",!0)],64))]))}}),XE={class:"moonbase:confirm-email-change"},JE={key:0,class:"moonbase:loader"},QE={key:1,class:"moonbase:error","data-visible":""},e5=pe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ae(),{user:o,confirmEmailChange:s}=tt(),i=V(!0),a=V(null);return He(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),Ht(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return g(),C("div",XE,[i.value?(g(),C("div",JE,[w(Qt)])):a.value?(g(),C("div",QE,j(a.value),1)):(g(),C($e,{key:2},[H("h3",null," Hi "+j((c=b(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=H("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}}),t5=["data-visible"],n5=pe({__name:"ForgotPassword",setup(e){const t=Ae(),n=tt(),r=V(t.getParameter("email")??""),o=V(null),s=V(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Ht(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof br?o.value="User not found":o.value=a.message,a}}return(a,l)=>(g(),Y(ir,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:O(({disabled:u})=>[l[1]||(l[1]=H("p",null," Please enter your email address below. You will receive an email message with instructions on how to reset your password. ",-1)),w(Pt,{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"]),w(ar,{success:"Email sent",label:"Reset password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!o.value||void 0},j(o.value),9,t5)]),_:1,__:[1]}))}}),r5={key:0,class:"moonbase:password-validation"},o5=["data-visible"],s5=pe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=se(()=>r.getParameter("email")),i=V(""),a=V(!1),l=V(null),u=se(()=>rs.some(d=>!d.test(i.value)));He(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(l.value="Link broken, please try again")});async function c(){l.value=null;const d=r.getParameter("code");if(d)try{await o.resetPassword(s.value,i.value,d);const f=await o.signIn(s.value,i.value);Ht(1500).then(()=>n("passwordReset",f))}catch(f){throw l.value=f.message,f}}return(d,f)=>(g(),Y(ir,{handler:c,disabled:u.value,class:"moonbase:reset-password"},{default:O(()=>[H("h3",null," Hi "+j(s.value)+", ",1),f[2]||(f[2]=H("p",null," Please create a new password for your account: ",-1)),w(Pt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),w(Pt,{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=h=>i.value=h),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:f[1]||(f[1]=h=>a.value=!0)},null,8,["modelValue"]),a.value&&u.value?(g(),C("div",r5,[(g(!0),C($e,null,_t(b(rs).filter(h=>!h.test(i.value)),h=>(g(),Y(Le,{key:h.title,"data-error":""},{default:O(()=>[M(j(h.title),1)]),_:2},1024))),128))])):fe("",!0),w(ar,{success:"Password saved",label:"Save password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!l.value||void 0},j(l.value),9,o5)]),_:1,__:[2]},8,["disabled"]))}}),i5={class:"moonbase:checkbox"},a5={class:"moonbase:checkbox-container"},l5=["id","name","checked","disabled","aria-invalid","aria-describedby"],u5={class:"moonbase:checkbox-description"},c5=["for"],d5=["id"],f5=["id"],Gp=pe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(g(),C("div",i5,[H("div",a5,[H("input",ru({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,checked: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,{onChange:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,l5)]),H("div",u5,[H("label",{for:`mb-${t.name}`},j(t.label),9,c5),t.error?(g(),C("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},j(t.error),9,d5)):t.hint?(g(),C("p",{key:1,id:`mb-${t.name}-hint`},j(t.hint),9,f5)):fe("",!0)])]))}}),h5={key:0,class:"moonbase:password-validation"},p5=["href"],m5=["href"],b5=["data-visible"],g5=pe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=ve(sc),i=ve(Lr),a=V(""),l=V(r.getParameter("email")??""),u=V(""),c=V(!1),d=V(!1),f=V(null),h=se(()=>rs.some(_=>!_.test(u.value)));async function p(){f.value=null;try{const _=await o.signUp(a.value,l.value,u.value,null,!0,!0,d.value);i==null||i(qt.SignedUp,{user:_}),Ht(1500).then(()=>n("signedUp",_))}catch(_){throw f.value=_.message,_}}return(_,E)=>(g(),Y(ir,{handler:p,disabled:h.value,class:"moonbase:sign-up"},{default:O(()=>[w(Pt,{modelValue:a.value,"onUpdate:modelValue":E[0]||(E[0]=N=>a.value=N),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=N=>l.value=N),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),w(Pt,{modelValue:u.value,"onUpdate:modelValue":E[2]||(E[2]=N=>u.value=N),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:"",onBlur:E[3]||(E[3]=N=>c.value=!0)},null,8,["modelValue"]),c.value&&h.value?(g(),C("div",h5,[(g(!0),C($e,null,_t(b(rs).filter(N=>!N.test(u.value)),N=>(g(),Y(Le,{key:N.title,"data-error":""},{default:O(()=>[M(j(N.title),1)]),_:2},1024))),128))])):fe("",!0),w(Gp,{modelValue:d.value,"onUpdate:modelValue":E[4]||(E[4]=N=>d.value=N),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),w(Le,null,{default:O(()=>[E[5]||(E[5]=M(" By signing up, you accept our ")),H("a",{href:`${b(s)}/terms-of-use`,target:"_blank",rel:"noopener"},"terms",8,p5),E[6]||(E[6]=M(" and ")),H("a",{href:`${b(s)}/privacy-policy`,target:"_blank",rel:"noopener"},"privacy policy",8,m5),E[7]||(E[7]=M(". "))]),_:1,__:[5,6,7]}),w(ar,{success:"Signed up",label:"Sign up",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!f.value||void 0},j(f.value),9,b5),w(st,{label:"I already have an account",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).SignIn,{email:l.value})},null,8,["handler"])]),_:1},8,["disabled"]))}}),v5={class:"moonbase:authentication"},y5={key:0,class:"moonbase:loader"},_5=pe({__name:"Authentication",setup(e){const t=Ae(),{loaded:n}=tt();return(r,o)=>(g(),C("div",v5,[w(Ks,{name:b(t).direction===b(yu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:O(()=>[b(n)?b(t).intent===b(Q).SignIn?(g(),Y(UE,{key:1,onSignedIn:o[0]||(o[0]=s=>b(t).dequeue())})):b(t).intent===b(Q).SignUp?(g(),Y(g5,{key:2,onSignedUp:o[1]||(o[1]=s=>b(t).next?b(t).dequeue():b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0))})):b(t).intent===b(Q).ConfirmAccount?(g(),Y(WE,{key:3,onConfirmedAccount:o[2]||(o[2]=s=>b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0))})):b(t).intent===b(Q).ConfirmEmail?(g(),Y(KE,{key:4})):b(t).intent===b(Q).ConfirmEmailChange?(g(),Y(e5,{key:5})):b(t).intent===b(Q).ForgotPassword?(g(),Y(n5,{key:6})):b(t).intent===b(Q).ResetPassword?(g(),Y(s5,{key:7,onPasswordReset:o[3]||(o[3]=s=>b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0))})):fe("",!0):(g(),C("div",y5,[w(Qt)]))]),_:1},8,["name"])]))}}),w5={},E5={class:"moonbase:text-subtext-bold"};function x5(e,t){return g(),C("span",E5,[St(e.$slots,"default")])}const $t=tr(w5,[["render",x5]]);function nc(){const e=ve(Gt);return e||console.warn("No storefront injectable"),{reportProblem:async(t,n)=>{try{await(e==null?void 0:e.client.api.fetch(`/api/customer/insights/${t}`,null,{method:"POST",body:{origin:window==null?void 0:window.location.href,...n}}))}catch{}}}}const k5=["data-corners","data-cards"],Kp=pe({__name:"Counter",props:{modelValue:{}},emits:["update:modelValue"],setup(e){const t=ve(Et);return(n,r)=>{var o,s;return g(),C("div",{class:"moonbase:counter","data-corners":(o=b(t))==null?void 0:o.theme.corners,"data-cards":(s=b(t))==null?void 0:s.theme.cards},[H("button",{onClick:r[0]||(r[0]=i=>n.$emit("update:modelValue",n.modelValue-1))},[w(b(i_))]),w(Le,null,{default:O(()=>[M(j(n.modelValue.toString().padStart(2,"0")),1)]),_:1}),H("button",{onClick:r[1]||(r[1]=i=>n.$emit("update:modelValue",n.modelValue+1))},[w(b(a_))])],8,k5)}}});function rc(e){switch(e){case pr.Daily:return"day";case pr.Weekly:return"week";case pr.Monthly:return"month";case pr.Quarterly:return"quarter";case pr.Yearly:return"year"}throw new Error("Unknown cycle length")}const O5={class:"moonbase:bundle-cart-item-content"},S5={key:0,class:"moonbase:bundle-cart-item-total"},N5={key:0,class:"moonbase:discount"},C5={class:"moonbase:bundle-cart-item-summary"},T5=["data-open"],P5=["data-open"],$5={class:"moonbase:bundle-cart-item-product-list-item-content"},A5={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},D5=pe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const n=_a(e.lineItem.bundleId),r=ve(Et),o=Tr(),s=V(!1),i=V(null);return et(s,a=>{i.value&&(i.value.style.height=a?`${i.value.scrollHeight}px`:"0px")}),(a,l)=>(g(),Y(kn,{class:"moonbase:bundle-cart-item"},{addon:O(()=>{var u;return[H("div",C5,[a.lineItem.bundle?(g(),C("button",{key:0,onClick:l[1]||(l[1]=c=>s.value=!s.value)},[w($t,null,{default:O(()=>{var c,d,f;return[M(j((c=a.lineItem.bundle)==null?void 0:c.products.filter(h=>h.included).length)+" ",1),(d=a.lineItem.bundle)!=null&&d.products.some(h=>!h.included)?(g(),C($e,{key:0},[M(" of "+j((f=a.lineItem.bundle)==null?void 0:f.products.length),1)],64)):fe("",!0),l[2]||(l[2]=M(" products "))]}),_:1,__:[2]}),w(Le,null,{default:O(()=>[M(j(s.value?"Hide":"Show")+" ",1),(g(),C("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},l[3]||(l[3]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,T5))]),_:1})])):fe("",!0)]),H("div",{ref_key:"productListRef",ref:i,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(g(!0),C($e,null,_t(((u=a.lineItem.bundle)==null?void 0:u.products)||[],c=>(g(),C("div",{key:c.id,class:"moonbase:bundle-cart-item-product-list-item"},[w(en,{url:c==null?void 0:c.iconUrl,size:48},null,8,["url"]),H("div",$5,[w($t,{"data-included":c.included||void 0},{default:O(()=>[c.included?(g(),C("svg",A5,l[4]||(l[4]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),M(" "+j(c==null?void 0:c.name),1)]),_:2},1032,["data-included"]),c.included?c!=null&&c.tagline?(g(),Y(Le,{key:1},{default:O(()=>[M(j(c.tagline),1)]),_:2},1024)):fe("",!0):(g(),Y(Le,{key:0},{default:O(()=>l[5]||(l[5]=[M(" You already own this ")])),_:1,__:[5]}))])]))),128))],8,P5)]}),default:O(()=>{var u,c,d,f,h,p;return[w(en,{url:(u=a.lineItem.bundle)==null?void 0:u.iconUrl,size:72},null,8,["url"]),H("div",O5,[w($t,null,{default:O(()=>{var _;return[M(j((_=a.lineItem.bundle)==null?void 0:_.name),1)]}),_:1}),w(Le,{class:"moonbase:bundle-cart-item-tagline","data-truncate":a.lineItem.variation&&a.lineItem.variation.id!==((d=(c=b(n))==null?void 0:c.defaultVariation)==null?void 0:d.id)||void 0},{default:O(()=>{var _;return[M(j((_=a.lineItem.bundle)==null?void 0:_.tagline),1)]}),_:1},8,["data-truncate"]),a.lineItem.variation&&a.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)?(g(),Y(Le,{key:0,class:"moonbase:bundle-cart-item-variation"},{default:O(()=>[M(j(a.lineItem.variation.name),1)]),_:1})):fe("",!0)]),a.lineItem.variation?(g(),C("div",S5,[w(ci,null,{default:O(()=>{var _;return[a.lineItem.variation.hasDiscount?(g(),C("span",N5,j(b(Jt)(a.lineItem.variation.originalPrice[a.currency]*a.lineItem.quantity,a.currency)),1)):fe("",!0),M(" "+j(b(Jt)(a.lineItem.variation.price[a.currency]*a.lineItem.quantity,a.currency))+" ",1),((_=a.lineItem.variation)==null?void 0:_.recurrence.type)==="Recurring"?(g(),Y(rt,{key:1},{default:O(()=>[M(" / "+j(b(rc)(a.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):fe("",!0)]}),_:1}),((p=b(r))==null?void 0:p.cart.quantity)==="selectable"?(g(),Y(Kp,{key:0,"model-value":a.lineItem.quantity,"onUpdate:modelValue":l[0]||(l[0]=_=>b(o).setQuantity(a.lineItem,_))},null,8,["model-value"])):(g(),Y(st,{key:1,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(a.lineItem,0)},null,8,["handler"]))])):fe("",!0)]}),_:1}))}}),I5={class:"moonbase:product-cart-item-content"},M5={class:"moonbase:product-cart-item-total"},V5={key:0,class:"moonbase:discount"},R5=pe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=Qs(t.lineItem.productId),r=ve(Et);function o(l){var c;if(!l.variation)throw new Error("No variation found");const u=i(l);return(u==null?void 0:u.price[t.currency])??((c=l.variation)==null?void 0:c.price[t.currency])}function s(l){return!!i(l)}function i(l){var c,d;const u=((d=(c=l.variation)==null?void 0:c.pricingTiers)==null?void 0:d.filter(f=>l.quantity>=f.minQuantity))??[];return u.length>0?u[u.length-1]:null}const a=Tr();return(l,u)=>(g(),Y(kn,{class:"moonbase:product-cart-item"},{default:O(()=>{var c,d,f,h,p,_;return[w(en,{url:(c=l.lineItem.product)==null?void 0:c.iconUrl,size:72},null,8,["url"]),H("div",I5,[w($t,null,{default:O(()=>{var E;return[M(j((E=l.lineItem.product)==null?void 0:E.name),1)]}),_:1}),w(Le,{class:"moonbase:product-cart-item-tagline","data-truncate":l.lineItem.variation&&l.lineItem.variation.id!==((f=(d=b(n))==null?void 0:d.defaultVariation)==null?void 0:f.id)||void 0},{default:O(()=>{var E;return[M(j((E=l.lineItem.product)==null?void 0:E.tagline),1)]}),_:1},8,["data-truncate"]),l.lineItem.variation&&l.lineItem.variation.id!==((p=(h=b(n))==null?void 0:h.defaultVariation)==null?void 0:p.id)?(g(),Y(Le,{key:0,class:"moonbase:product-cart-item-variation"},{default:O(()=>[M(j(l.lineItem.variation.name),1)]),_:1})):fe("",!0)]),H("div",M5,[l.lineItem.variation?(g(),Y(ci,{key:0},{default:O(()=>{var E;return[l.lineItem.variation.hasDiscount||s(l.lineItem)?(g(),C("span",V5,j(b(Jt)(l.lineItem.variation.originalPrice[l.currency]*l.lineItem.quantity,l.currency)),1)):fe("",!0),M(" "+j(b(Jt)(o(l.lineItem)*l.lineItem.quantity,l.currency))+" ",1),((E=l.lineItem.variation)==null?void 0:E.recurrence.type)==="Recurring"?(g(),Y(rt,{key:1},{default:O(()=>[M(" / "+j(b(rc)(l.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):fe("",!0)]}),_:1})):fe("",!0),((_=b(r))==null?void 0:_.cart.quantity)==="selectable"?(g(),Y(Kp,{key:1,"model-value":l.lineItem.quantity,"onUpdate:modelValue":u[0]||(u[0]=E=>b(a).setQuantity(l.lineItem,E))},null,8,["model-value"])):(g(),Y(st,{key:2,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(a).setQuantity(l.lineItem,0)},null,8,["handler"]))])]}),_:1}))}}),L5={class:"moonbase:cart"},j5=["data-background"],F5=["data-corners"],U5={class:"moonbase:cart-total"},B5={"data-error":""},H5=pe({__name:"Cart",setup(e){const t=nc(),{items:n,total:r,currency:o,checkout:s}=Tr(),i=ve(Et),a=V(null);async function l(){a.value=null;try{const u=await s({redirect:(i==null?void 0:i.value.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`});if(!(u!=null&&u.completed))throw new Ha}catch(u){if(a.value=u.message,!(u instanceof Ha))if(u instanceof Tn)t.reportProblem("error",{type:u.name,title:u.title,detail:u.detail,status:u.status,errors:u.errors?Object.fromEntries(Object.entries(u.errors).map(([c,d])=>[c,[d]])):void 0,instance:"Cart.vue:startCheckout"});else{const c=u;t.reportProblem("error",{type:c.name,title:c.message,instance:"Cart.vue:startCheckout"})}throw u}}return(u,c)=>{var d,f;return g(),C("div",L5,[b(n).length>0?(g(),C("ul",{key:0,role:"list",class:"moonbase:cart-items","data-background":(d=b(i))==null?void 0:d.theme.colors.background},[(g(!0),C($e,null,_t(b(n),h=>(g(),C("li",{key:h.id},[h.type==="Product"?(g(),Y(R5,{key:0,"line-item":h,currency:b(o)},null,8,["line-item","currency"])):h.type==="Bundle"?(g(),Y(D5,{key:1,"line-item":h,currency:b(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))],8,j5)):(g(),C("div",{key:1,class:"moonbase:cart-empty","data-corners":(f=b(i))==null?void 0:f.theme.corners},[w(b(l_)),w($t,null,{default:O(()=>c[0]||(c[0]=[M(" Your cart is empty ")])),_:1,__:[0]})],8,F5)),H("div",U5,[c[1]||(c[1]=H("label",null," Total ",-1)),H("span",null,j(b(Jt)(b(r).amount,b(r).currency)),1),c[2]||(c[2]=H("p",null," Sales tax to be calculated at checkout ",-1)),H("p",B5,j(a.value),1)]),w(st,{handler:l,disabled:b(n).length===0,label:"Checkout",error:a.value?"Error":"Cancelled",variant:"primary"},null,8,["disabled","error"])])}}}),q5={class:"moonbase:account"},z5={key:0,class:"moonbase:error"},W5={key:1,class:"moonbase:notification"},Z5={key:0,class:"moonbase:error"},Y5=pe({__name:"Account",setup(e){var q,z,B;const t=Ae(),{user:n,update:r,setPassword:o,signOut:s}=tt(),i=ve(Lr),a=V(((q=n.value)==null?void 0:q.name)??""),l=V(((z=n.value)==null?void 0:z.email)??""),u=V(((B=n.value)==null?void 0:B.communicationPreferences)??{newsletterOptIn:!1}),c=V(null),d=V(!1),f=V(""),h=V(""),p=V(null);async function _(){c.value=null,d.value=!1;try{(await r(a.value,l.value,void 0,u.value)).needsEmailConfirmationToken&&(d.value=!0)}catch(L){throw c.value=L,L}}async function E(){p.value=null;try{await o(f.value,h.value),f.value="",h.value=""}catch(L){throw p.value=L,L}}async function N(){const L={...n.value};await s(),i==null||i(qt.SignedOut,{user:L}),t.reset()}return(L,D)=>(g(),C("div",q5,[w(ir,{handler:_},{default:O(()=>[w(Pt,{modelValue:a.value,"onUpdate:modelValue":D[0]||(D[0]=m=>a.value=m),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":D[1]||(D[1]=m=>l.value=m),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),w(Gp,{modelValue:u.value.newsletterOptIn,"onUpdate:modelValue":D[2]||(D[2]=m=>u.value.newsletterOptIn=m),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),w(ar,{label:"Update",error:"Error",success:"Updated"}),c.value?(g(),C("p",z5,j(c.value.message),1)):d.value?(g(),C("p",W5," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),w(ir,{handler:E},{default:O(()=>[w(Pt,{modelValue:f.value,"onUpdate:modelValue":D[3]||(D[3]=m=>f.value=m),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),w(Pt,{modelValue:h.value,"onUpdate:modelValue":D[4]||(D[4]=m=>h.value=m),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),w(ar,{label:"Change password",error:"Error",success:"Password changed"}),p.value?(g(),C("p",Z5,j(p.value.message),1)):fe("",!0)]),_:1}),w(st,{label:"Log out",success:"Logged out",error:"Error",variant:"subtle",handler:N})]))}}),G5={class:"moonbase:products"},K5={key:0,class:"moonbase:loader"},X5={key:1,class:"moonbase:loader"},J5={class:"moonbase:products-item-content"},Q5=pe({__name:"Products",setup(e){const t=Ae(),{getProducts:n}=io(),r=V(null);return He(async()=>{let o=await n();for(r.value=o.items;o.hasMore&&o.next;)o=await n(o.next),r.value.push(...o.items)}),(o,s)=>(g(),C("div",G5,[r.value?r.value.length===0?(g(),C("div",X5," No products found ")):fe("",!0):(g(),C("div",K5,[w(Qt),s[0]||(s[0]=M(" Loading products.. "))])),(g(!0),C($e,null,_t(r.value||[],i=>(g(),C("div",{key:i.id,class:"moonbase:products-item"},[w(en,{url:i.iconUrl,size:48},null,8,["url"]),H("div",J5,[w($t,null,{default:O(()=>[M(j(i.name),1)]),_:2},1024),i.numberOfLicenses||i.subscriptionLicenses?(g(),Y(Le,{key:0},{default:O(()=>[M(j((i.numberOfLicenses??0)+(i.subscriptionLicenses??0))+" licenses ",1)]),_:2},1024)):fe("",!0)]),H("div",null,[w(Wo,{variant:"subtle",onClick:a=>b(t).show(b(ue).Product,b(Q).ViewProduct,{product_id:i.id})},{default:O(()=>[w(b(np)),s[1]||(s[1]=H("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])]))),128))]))}}),ex={class:"moonbase:bundle-redemption-item-content"},tx={class:"moonbase:bundle-redemption-item-summary"},nx=["data-open"],rx=["data-open"],Xp=pe({__name:"BundleRedemptionItem",props:{bundle:{},quantity:{}},setup(e){const t=V(!1),n=V(null);return et(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>(g(),Y(kn,{class:"moonbase:bundle-redemption-item"},{addon:O(()=>{var s;return[H("div",tx,[r.bundle?(g(),C("button",{key:0,onClick:o[0]||(o[0]=i=>t.value=!t.value)},[w($t,null,{default:O(()=>{var i;return[M(j((i=r.bundle)==null?void 0:i.products.length)+" products ",1)]}),_:1}),w(Le,null,{default:O(()=>[M(j(t.value?"Hide":"Show")+" ",1),(g(),C("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[1]||(o[1]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,nx))]),_:1})])):fe("",!0)]),H("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-redemption-item-product-list",style:{height:"0px"},"data-open":t.value||void 0},[(g(!0),C($e,null,_t(((s=r.bundle)==null?void 0:s.products)||[],i=>(g(),C("div",{key:i.id},[w(en,{url:i.iconUrl,size:48},null,8,["url"]),H("div",null,[w($t,null,{default:O(()=>[M(j(i.name),1)]),_:2},1024),i.tagline?(g(),Y(Le,{key:0},{default:O(()=>[M(j(i.tagline),1)]),_:2},1024)):fe("",!0)])]))),128))],8,rx)]}),default:O(()=>[w(en,{url:r.bundle.iconUrl,size:72},null,8,["url"]),H("div",ex,[w($t,null,{default:O(()=>{var s;return[M(j((s=r.bundle)==null?void 0:s.name),1)]}),_:1}),w(Le,{class:"moonbase:bundle-redemption-item-tagline"},{default:O(()=>{var s;return[M(j((s=r.bundle)==null?void 0:s.tagline),1)]}),_:1})])]),_:1}))}}),ox={class:"moonbase:product-redemption-item-content"},Jp=pe({__name:"ProductRedemptionItem",props:{product:{},quantity:{}},setup(e){return(t,n)=>(g(),Y(kn,{class:"moonbase:product-redemption-item"},{default:O(()=>[w(en,{url:t.product.iconUrl,size:72},null,8,["url"]),H("div",ox,[w($t,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.name),1)]}),_:1}),w(Le,{class:"moonbase:product-redemption-item-tagline"},{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.tagline),1)]}),_:1})])]),_:1}))}}),sx={class:"moonbase:redeem"},ix=["data-visible"],ax={key:1,class:"moonbase:redeem-voucher"},lx={key:0,class:"moonbase:redeem-voucher-content"},ux={key:1,class:"moonbase:redeem-voucher-return"},cx=pe({__name:"Redeem",setup(e){const{redeem:t}=dh(),n=Ae(),r=tt(),o=ve(Lr),s=V(null),i=V(null),a=V(n.getParameter("code")||"");async function l(){i.value=null;try{const u=await t(a.value);s.value=u,o==null||o(qt.RedeemedVoucher,{voucher:u,user:r.user.value})}catch(u){throw i.value=u,u}}return(u,c)=>(g(),C("div",sx,[w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[s.value?(g(),C("div",ax,[H("div",null,[w(ns,null,{default:O(()=>[M(j(s.value.name),1)]),_:1}),s.value.description?(g(),Y(nt,{key:0},{default:O(()=>[M(' "'+j(s.value.description)+'" ',1)]),_:1})):fe("",!0),w(Le,null,{default:O(()=>[w(b(Q1)),c[2]||(c[2]=M(" Licenses have been added to your account. "))]),_:1,__:[2]}),w(Le,null,{default:O(()=>[c[3]||(c[3]=M(" Code: ")),H("strong",null,j(s.value.code),1)]),_:1,__:[3]})]),w(nt,null,{default:O(()=>c[4]||(c[4]=[M(" Voucher summary ")])),_:1,__:[4]}),s.value.redeemsProducts.length>0||s.value.redeemsBundles.length>0?(g(),C("div",lx,[(g(!0),C($e,null,_t(s.value.redeemsProducts,({value:d,quantity:f})=>(g(),Y(Jp,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(g(!0),C($e,null,_t(s.value.redeemsBundles,({value:d,quantity:f})=>(g(),Y(Xp,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):fe("",!0),b(n).next&&b(n).next[0]===b(ue).Activation&&(s.value.redeemsProducts.some(d=>{var f,h;return d.value.id===((h=(f=b(n).next)==null?void 0:f[2])==null?void 0:h.product_id)})||s.value.redeemsBundles.some(d=>d.value.products.some(f=>{var h,p;return f.id===((p=(h=b(n).next)==null?void 0:h[2])==null?void 0:p.product_id)})))?(g(),C("div",ux,[w(st,{label:"Return to activation",variant:"primary",icon:b(J1),handler:()=>b(n).dequeue()},null,8,["icon","handler"])])):fe("",!0)])):(g(),Y(ir,{key:0,handler:l},{default:O(()=>{var d;return[w(rt,null,{default:O(()=>c[1]||(c[1]=[M(" Do you have a voucher you want to redeem? "),H("br",null,null,-1),M(" Please enter the code below: ")])),_:1,__:[1]}),w(Pt,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=f=>a.value=f),label:"Voucher code",name:"code",required:"",placeholder:"0000-0000-0000-0000"},null,8,["modelValue"]),w(ar,{label:"Redeem voucher",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!i.value||void 0},j((d=i.value)==null?void 0:d.message),9,ix)]}),_:1}))]),_:1})]))}}),Qp=6048e5,dx=864e5,qa=43200,em=1440,tm=Symbol.for("constructDateFrom");function lr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&tm in e?e[tm](t):e instanceof Date?new e.constructor(t):new Date(t)}function vt(e,t){return lr(t||e,e)}let fx={};function hi(){return fx}function pi(e,t){var a,l,u,c;const n=hi(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function za(e,t){return pi(e,{...t,weekStartsOn:1})}function nm(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=lr(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=za(o),i=lr(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=za(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Wa(e){const t=vt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Za(e,...t){const n=lr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function rm(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function hx(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t),s=rm(r),i=rm(o),a=+s-Wa(s),l=+i-Wa(i);return Math.round((a-l)/dx)}function px(e,t){const n=nm(e,t),r=lr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),za(r)}function Ya(e,t){const n=+vt(e)-+vt(t);return n<0?-1:n>0?1:n}function mx(e){return lr(e,Date.now())}function bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gx(e){return!(!bx(e)&&typeof e!="number"||isNaN(+vt(e)))}function vx(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function yx(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function _x(e,t){return+vt(e)-+vt(t)}function wx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Ex(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function xx(e,t){const n=vt(e,t==null?void 0:t.in);return+wx(n,t)==+Ex(n,t)}function kx(e,t,n){const[r,o,s]=Za(n==null?void 0:n.in,e,e,t),i=Ya(o,s),a=Math.abs(vx(o,s));if(a<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*a);let l=Ya(o,s)===-i;xx(r)&&a===1&&Ya(r,s)===1&&(l=!1);const u=i*(a-+l);return u===0?0:u}function Ox(e,t,n){const r=_x(e,t)/1e3;return yx(n==null?void 0:n.roundingMethod)(r)}function Sx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Nx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Cx=(e,t,n)=>{let r;const o=Nx[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function oc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Tx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Px={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ax={date:oc({formats:Tx,defaultWidth:"full"}),time:oc({formats:Px,defaultWidth:"full"}),dateTime:oc({formats:$x,defaultWidth:"full"})},Dx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ix=(e,t,n,r)=>Dx[e];function mi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Mx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ux={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:mi({values:Mx,defaultWidth:"wide"}),quarter:mi({values:Vx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:Rx,defaultWidth:"wide"}),day:mi({values:Lx,defaultWidth:"wide"}),dayPeriod:mi({values:jx,defaultWidth:"wide",formattingValues:Fx,defaultFormattingWidth:"wide"})};function bi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Hx(a,d=>d.test(i)):Bx(a,d=>d.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(i.length);return{value:u,rest:c}}}function Bx(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Hx(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qx(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const zx=/^(\d+)(th|st|nd|rd)?/i,Wx=/\d+/i,Zx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yx={any:[/^b/i,/^(a|c)/i]},Gx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kx={any:[/1/i,/2/i,/3/i,/4/i]},Xx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ek={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},nk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rk={ordinalNumber:qx({matchPattern:zx,parsePattern:Wx,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:Zx,defaultMatchWidth:"wide",parsePatterns:Yx,defaultParseWidth:"any"}),quarter:bi({matchPatterns:Gx,defaultMatchWidth:"wide",parsePatterns:Kx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:Xx,defaultMatchWidth:"wide",parsePatterns:Jx,defaultParseWidth:"any"}),day:bi({matchPatterns:Qx,defaultMatchWidth:"wide",parsePatterns:ek,defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:tk,defaultMatchWidth:"any",parsePatterns:nk,defaultParseWidth:"any"})},om={code:"en-US",formatDistance:Cx,formatLong:Ax,formatRelative:Ix,localize:Ux,match:rk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ok(e,t){const n=vt(e,t==null?void 0:t.in);return hx(n,Sx(n))+1}function sk(e,t){const n=vt(e,t==null?void 0:t.in),r=+za(n)-+px(n);return Math.round(r/Qp)+1}function sm(e,t){var c,d,f,h;const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=hi(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=lr((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=pi(i,t),l=lr((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=pi(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function ik(e,t){var a,l,u,c;const n=hi(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=sm(e,t),s=lr((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),pi(s,t)}function ak(e,t){const n=vt(e,t==null?void 0:t.in),r=+pi(n,t)-+ik(n,t);return Math.round(r/Qp)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ge(o,t.length)}},os={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},im={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Vr.y(e,t)},Y:function(e,t,n,r){const o=sm(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ge(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ge(s,t.length)},R:function(e,t){const n=nm(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ge(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ge(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ge(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ak(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=sk(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vr.d(e,t)},D:function(e,t,n){const r=ok(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ge(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ge(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ge(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=os.noon:r===0?o=os.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=os.evening:r>=12?o=os.afternoon:r>=4?o=os.morning:o=os.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vr.s(e,t)},S:function(e,t){return Vr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return lm(r);case"XXXX":case"XX":return bo(r);case"XXXXX":case"XXX":default:return bo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return lm(r);case"xxxx":case"xx":return bo(r);case"xxxxx":case"xxx":default:return bo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+am(r,":");case"OOOO":default:return"GMT"+bo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+am(r,":");case"zzzz":default:return"GMT"+bo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function am(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ge(s,2)}function lm(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):bo(e,t)}function bo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ge(Math.trunc(r/60),2),s=Ge(r%60,2);return n+o+t+s}const um=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},cm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},lk={p:cm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return um(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",um(r,t)).replace("{{time}}",cm(o,t))}},uk=/^D+$/,ck=/^Y+$/,dk=["D","DD","YY","YYYY"];function fk(e){return uk.test(e)}function hk(e){return ck.test(e)}function pk(e,t,n){const r=mk(e,t,n);if(console.warn(r),dk.includes(e))throw new RangeError(r)}function mk(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vk=/^'([^]*?)'?$/,yk=/''/g,_k=/[a-zA-Z]/;function wk(e,t,n){var c,d,f,h;const r=hi(),o=r.locale??om,s=r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=vt(e,n==null?void 0:n.in);if(!gx(a))throw new RangeError("Invalid time value");let l=t.match(gk).map(p=>{const _=p[0];if(_==="p"||_==="P"){const E=lk[_];return E(p,o.formatLong)}return p}).join("").match(bk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const _=p[0];if(_==="'")return{isToken:!1,value:Ek(p)};if(im[_])return{isToken:!0,value:p};if(_.match(_k))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const _=p.value;(hk(_)||fk(_))&&pk(_,t,String(e));const E=im[_[0]];return E(a,_,o.localize,u)}).join("")}function Ek(e){const t=e.match(vk);return t?t[1].replace(yk,"'"):e}function xk(e,t,n){const r=hi(),o=(n==null?void 0:n.locale)??r.locale??om,s=2520,i=Ya(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i}),[l,u]=Za(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=Ox(u,l),d=(Wa(u)-Wa(l))/1e3,f=Math.round((c-d)/60);let h;if(f<2)return n!=null&&n.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,a):c<10?o.formatDistance("lessThanXSeconds",10,a):c<20?o.formatDistance("lessThanXSeconds",20,a):c<40?o.formatDistance("halfAMinute",0,a):c<60?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",1,a):f===0?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",f,a);if(f<45)return o.formatDistance("xMinutes",f,a);if(f<90)return o.formatDistance("aboutXHours",1,a);if(f<em){const p=Math.round(f/60);return o.formatDistance("aboutXHours",p,a)}else{if(f<s)return o.formatDistance("xDays",1,a);if(f<qa){const p=Math.round(f/em);return o.formatDistance("xDays",p,a)}else if(f<qa*2)return h=Math.round(f/qa),o.formatDistance("aboutXMonths",h,a)}if(h=kx(u,l),h<12){const p=Math.round(f/qa);return o.formatDistance("xMonths",p,a)}else{const p=h%12,_=Math.trunc(h/12);return p<3?o.formatDistance("aboutXYears",_,a):p<9?o.formatDistance("overXYears",_,a):o.formatDistance("almostXYears",_+1,a)}}function kk(e,t){return xk(e,mx(e),t)}function Ok(e){return kk(e,{addSuffix:!0})}function gi(e,t){return wk(e,t||"PPP")}const Sk={class:"moonbase:subscriptions"},Nk={key:0,class:"moonbase:loader"},Ck={key:1,class:"moonbase:loader"},Tk=["data-subscription-status"],Pk={class:"moonbase:subscriptions-item-content"},$k={class:"moonbase:subscriptions-item-content"},Ak=pe({__name:"Subscriptions",setup(e){const t=Ae(),{getSubscriptions:n}=io(),r=V(new Date),o=V(null);return He(async()=>{let s=await n();for(o.value=s.items;s.hasMore&&s.next;)s=await n(s.next),o.value.push(...s.items)}),(s,i)=>(g(),C("div",Sk,[o.value?o.value.length===0?(g(),C("div",Ck," No subscriptions found ")):fe("",!0):(g(),C("div",Nk,[w(Qt),i[0]||(i[0]=M(" Loading subscriptions.. "))])),(g(!0),C($e,null,_t(o.value||[],a=>(g(),C("div",{key:a.id,"data-subscription-status":a.status,class:"moonbase:subscriptions-item"},[a.content.type==="Product"?(g(),C($e,{key:0},[w(en,{url:a.content.product.iconUrl,size:48},null,8,["url"]),H("div",Pk,[w($t,null,{default:O(()=>[M(j(a.content.quantity)+" x "+j(a.content.product.name),1)]),_:2},1024),w(Le,null,{default:O(()=>[M(j(a.status===b(gr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+j(b(gi)(a.expiresAt)),1)]),_:2},1024)])],64)):(g(),C($e,{key:1},[w(en,{url:a.content.bundle.iconUrl,size:48},null,8,["url"]),H("div",$k,[w($t,null,{default:O(()=>[M(j(a.content.quantity)+" x "+j(a.content.bundle.name),1)]),_:2},1024),w(Le,null,{default:O(()=>[M(j(a.status===b(gr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+j(b(gi)(a.expiresAt)),1)]),_:2},1024)])],64)),H("div",null,[w(Wo,{variant:"subtle",onClick:l=>b(t).show(b(ue).Subscription,b(Q).ManageSubscription,{subscription_id:a.id})},{default:O(()=>[w(b(np)),i[1]||(i[1]=H("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])],8,Tk))),128))]))}}),Dk={class:"moonbase:customer"},Ik=pe({__name:"Customer",setup(e){const t=Ae(),{user:n}=tt(),r=ve(Et),o=se(()=>[{intent:Q.ViewProducts,title:"Products",content:Q5},{intent:Q.ViewSubscriptions,title:"Subscriptions",content:Ak,predicate:()=>{var a;return((a=n.value)==null?void 0:a.hasSubscriptions)??!1}},{intent:Q.ViewAccount,title:"Account",content:Y5},{intent:Q.RedeemVoucher,title:"Redeem",content:cx}].filter(a=>a.predicate===void 0||a.predicate())),s=se(()=>o.value.findIndex(a=>a.intent===t.intent));function i(a){t.intent=o.value[a].intent}return(a,l)=>(g(),C("div",Dk,[w(b(L1),{"selected-index":s.value,onChange:i},{default:O(()=>{var u,c;return[w(b(j1),{"data-corners":(u=b(r))==null?void 0:u.theme.corners,"data-background":(c=b(r))==null?void 0:c.theme.colors.background},{default:O(()=>[(g(!0),C($e,null,_t(o.value,d=>(g(),Y(b(F1),{key:d.intent},{default:O(()=>[M(j(d.title),1)]),_:2},1024))),128))]),_:1},8,["data-corners","data-background"]),w(b(U1),null,{default:O(()=>[(g(!0),C($e,null,_t(o.value,d=>(g(),Y(b(B1),{key:d.intent},{default:O(()=>[(g(),Y(Bl(d.content)))]),_:2},1024))),128))]),_:1})]}),_:1},8,["selected-index"])]))}}),Mk={class:"moonbase:product-card-content"},Vk=["data-open"],Rk=pe({__name:"ProductCard",props:{product:{}},setup(e){const t=V(!1),n=V(null),r=se(()=>n.value&&n.value.$el&&n.value.$el.scrollHeight>n.value.$el.clientHeight);return(o,s)=>(g(),Y(kn,{class:"moonbase:product-card"},{addon:O(()=>[H("div",{class:"moonbase:product-card-description","data-open":t.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:n},{default:O(()=>[M(j(o.product.description),1)]),_:1},512),!t.value&&r.value?(g(),C("button",{key:0,onClick:s[0]||(s[0]=i=>t.value=!0)},[w($t,null,{default:O(()=>s[1]||(s[1]=[M(" read more ")])),_:1,__:[1]})])):fe("",!0)],8,Vk)]),default:O(()=>[w(en,{url:o.product.iconUrl,size:72},null,8,["url"]),H("div",Mk,[w(ns,null,{default:O(()=>{var i;return[M(j((i=o.product)==null?void 0:i.name),1)]}),_:1}),w(Le,{class:"moonbase:product-card-tagline"},{default:O(()=>{var i;return[M(j((i=o.product)==null?void 0:i.tagline),1)]}),_:1})])]),_:1}))}});function Lk(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 jk={class:"moonbase:product-downloads"},Fk=["data-open"],Uk={key:1,class:"moonbase:product-downloads-content"},Bk={key:2,class:"moonbase:product-downloads-content"},Hk={key:3,class:"moonbase:product-downloads-content"},qk={key:4,class:"moonbase:product-downloads-content"},zk={class:"moonbase:product-downloads-list"},Wk={class:"moonbase:product-downloads-download-actions"},Zk=pe({__name:"ProductDownloads",props:{product:{}},setup(e){const t=e,n=Ae(),r=tt(),o=nc(),s=ve(Lr),{downloadProduct:i}=io(),a=V(!1),l=V(null),u=se(()=>l.value&&l.value.$el&&l.value.$el.scrollHeight>l.value.$el.clientHeight);function c(){n.enqueue(ue.Product,Q.DownloadProduct,n.parameters??void 0),n.show(ue.Authentication,Q.SignIn)}const d=[Cn.Windows,Cn.Mac,Cn.Linux,Cn.Universal];function f(){var q;const N=(((q=navigator.userAgentData)==null?void 0:q.platform)??navigator.platform??"Unknown").toLowerCase();return/mac/.test(N)?Cn.Mac:/win/.test(N)?Cn.Windows:/linux/.test(N)?Cn.Linux:Cn.Universal}const h=f(),p=[h,...d.filter(N=>N!==h)],_=se(()=>p.flatMap(N=>[...(t.product.downloads??[]).filter(q=>q.platform===N)]));async function E(N){try{await i(N),s==null||s(qt.DownloadedProduct,{product:t.product,download:N,user:r.user.value})}catch(q){if(q instanceof Tn)o.reportProblem("error",{type:q.name,title:q.title,detail:q.detail,status:q.status,errors:q.errors?Object.fromEntries(Object.entries(q.errors).map(([z,B])=>[z,[B]])):void 0,instance:"ProductDownloads.vue:startDownload"});else{const z=q;o.reportProblem("error",{type:z.name,title:z.message,instance:"ProductDownloads.vue:startDownload"})}throw q}}return(N,q)=>(g(),C("div",jk,[w(nt,null,{default:O(()=>[q[1]||(q[1]=M(" Downloads ")),w(Le,null,{default:O(()=>[M(" Version "+j(N.product.version),1)]),_:1})]),_:1,__:[1]}),N.product.releaseDescription?(g(),C("div",{key:0,class:"moonbase:product-downloads-description","data-open":a.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:l},{default:O(()=>[M(j(N.product.releaseDescription),1)]),_:1},512),!a.value&&u.value?(g(),C("button",{key:0,onClick:q[0]||(q[0]=z=>a.value=!0)},[w($t,null,{default:O(()=>q[2]||(q[2]=[M(" read more ")])),_:1,__:[2]})])):fe("",!0)],8,Fk)):fe("",!0),N.product.downloadsNeedsUser&&N.product.downloadsNeedsOwnership&&!N.product.numberOfLicenses&&!N.product.subscriptionLicenses?(g(),C("div",Uk,[w(rt,{"data-center":""},{default:O(()=>q[3]||(q[3]=[M(" This product requires ownership to download ")])),_:1,__:[3]}),w(st,{label:"Sign in",handler:c})])):N.product.downloadsNeedsUser&&!b(r).user?(g(),C("div",Bk,[w(rt,{"data-center":""},{default:O(()=>q[4]||(q[4]=[M(" This product requires an account to download ")])),_:1,__:[4]}),w(st,{label:"Sign in",handler:c})])):N.product.downloadsNeedsOwnership&&!N.product.numberOfLicenses&&!N.product.subscriptionLicenses?(g(),C("div",Hk,[w(rt,{"data-center":""},{default:O(()=>q[5]||(q[5]=[M(" This product requires ownership to download ")])),_:1,__:[5]})])):(g(),C("div",qk,[H("div",zk,[(g(!0),C($e,null,_t(_.value,z=>(g(),Y(kn,{key:z.key,class:"moonbase:product-downloads-download"},{addon:O(()=>[H("div",Wk,[w(st,{label:`Download for ${z.platform}`,variant:z.platform===b(h)?"primary":"secondary","no-reset":!0,handler:()=>E(z),icon:b(G1)},null,8,["label","variant","handler","icon"])])]),default:O(()=>[H("div",null,[w(nt,null,{default:O(()=>[M(j(z.platform),1)]),_:2},1024),w(Mr,null,{default:O(()=>[M(j(z.name)+" - "+j(b(Lk)(z.size)),1)]),_:2},1024)])]),_:2},1024))),128))]),_.value.length===0?(g(),Y(rt,{key:0,"data-center":""},{default:O(()=>q[6]||(q[6]=[M(" No downloadable files found ")])),_:1,__:[6]})):fe("",!0)]))]))}}),Yk={class:"moonbase:product-licenses"},Gk={key:0,class:"moonbase:loader"},Kk={key:1,class:"moonbase:empty"},Xk={key:0,class:"moonbase:loader"},Jk={key:1,class:"moonbase:product-licenses-activations"},Qk={key:0},eO={class:"moonbase:product-licenses-activation-actions"},tO={key:2,class:"moonbase:loader"},nO={key:3,class:"moonbase:product-licenses-licenses"},rO=pe({__name:"ProductLicenses",props:{product:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,getProductLicenses:s,revokeActivation:i}=io(),a=nc(),l=V(null),u=V(null),c=V(!0);He(async()=>{if(n.product.maxActivations){let f=await o(n.product.id);for(l.value=f.items.map(h=>({...h,revoking:!1}));f.hasMore&&f.next;)f=await o(n.product.id,f.next),l.value.push(...f.items.map(h=>({...h,revoking:!1})))}if(n.product.externalLicenses){let f=await s(n.product.id);for(u.value=f.items;f.hasMore&&f.next;)f=await s(n.product.id,f.next),u.value.push(...f.items)}c.value=!1});async function d(f){try{await i(f),r("revoked",f),l.value&&Ht(1e3).then(()=>{var h,p;return(p=l.value)==null?void 0:p.splice((h=l.value)==null?void 0:h.indexOf(f),1)})}catch(h){if(h instanceof Tn)a.reportProblem("error",{type:h.name,title:h.title,detail:h.detail,status:h.status,errors:h.errors?Object.fromEntries(Object.entries(h.errors).map(([p,_])=>[p,[_]])):void 0,instance:"ProductLicenses.vue:revoke"});else{const p=h;a.reportProblem("error",{type:p.name,title:p.message,instance:"ProductLicenses.vue:revoke"})}throw h}}return(f,h)=>(g(),C("div",Yk,[w(nt,null,{default:O(()=>[h[0]||(h[0]=M(" Licenses ")),f.product.maxActivations&&f.product.maxActivations>0?(g(),Y(Le,{key:0},{default:O(()=>[M(j(f.product.currentActivations??0)+" of "+j(f.product.maxActivations)+" seats used ",1)]),_:1})):fe("",!0)]),_:1,__:[0]}),c.value?(g(),C("div",Gk,[w(Qt)])):!f.product.numberOfLicenses&&!f.product.subscriptionLicenses?(g(),C("div",Kk,[w(rt,null,{default:O(()=>h[1]||(h[1]=[M(" You don't own any licenses for this product yet ")])),_:1,__:[1]}),f.product&&f.product.website?(g(),Y(tc,{key:0,type:"anchor",href:f.product.website,label:"Purchase",icon:b(X1)},null,8,["href","icon"])):fe("",!0)])):fe("",!0),c.value?fe("",!0):(g(),C($e,{key:2},[f.product.maxActivations&&f.product.maxActivations>0&&!f.product.currentActivations?(g(),C("div",Xk,[w(b(rp)),w(nt,null,{default:O(()=>h[2]||(h[2]=[M(" No activations yet ")])),_:1,__:[2]})])):fe("",!0),f.product.maxActivations&&l.value?(g(),C("div",Jk,[(g(!0),C($e,null,_t(l.value??[],p=>(g(),Y(kn,{key:p.id,class:"moonbase:product-licenses-activation"},Qd({default:O(()=>[H("div",null,[w(Mr,null,{default:O(()=>h[3]||(h[3]=[M(" Device ")])),_:1,__:[3]}),w(nt,null,{default:O(()=>[M(j(p.name),1)]),_:2},1024)]),H("div",null,[w(Mr,null,{default:O(()=>h[4]||(h[4]=[M(" Activation ")])),_:1,__:[4]}),w(nt,null,{default:O(()=>[M(j(p.activationMethod),1)]),_:2},1024)]),p.lastValidatedAt?(g(),C("div",Qk,[w(Mr,null,{default:O(()=>h[5]||(h[5]=[M(" First activated ")])),_:1,__:[5]}),w(nt,null,{default:O(()=>[M(j(b(Ok)(p.firstValidatedAt)),1)]),_:2},1024)])):fe("",!0)]),_:2},[p.activationMethod===b(Ii).Online?{name:"addon",fn:O(()=>[H("div",eO,[w(st,{label:"Revoke",variant:"secondary","no-reset":!0,handler:()=>d(p)},null,8,["handler"])])]),key:"0"}:void 0]),1024))),128))])):fe("",!0),(!u.value||u.value.length===0)&&!f.product.maxActivations&&(f.product.numberOfLicenses||f.product.subscriptionLicenses)?(g(),C("div",tO,[w(b(rp)),f.product.numberOfLicenses?(g(),Y(nt,{key:0},{default:O(()=>[M(" You own "+j(f.product.numberOfLicenses)+" license"+j(f.product.numberOfLicenses!==1?"s":"")+" for this product ",1)]),_:1})):fe("",!0),f.product.subscriptionLicenses?(g(),Y(nt,{key:1},{default:O(()=>[M(" You have "+j(f.product.subscriptionLicenses)+" subscription license"+j(f.product.subscriptionLicenses!==1?"s":"")+" for this product ",1)]),_:1})):fe("",!0)])):f.product.externalLicenses&&u.value?(g(),C("div",nO,[(g(!0),C($e,null,_t((u.value??[]).filter(p=>p.externalFulfillment),p=>(g(),Y(kn,{key:p.id,class:"moonbase:product-licenses-license"},Qd({default:O(()=>[H("div",null,[w(Mr,null,{default:O(()=>[M(j(f.product.name)+" license ",1)]),_:1}),w(nt,null,{default:O(()=>[M(j(p.id),1)]),_:2},1024)])]),_:2},[p.externalFulfillment?{name:"addon",fn:O(()=>[H("code",null,j(p.externalFulfillment),1)]),key:"0"}:void 0]),1024))),128))])):fe("",!0)],64))]))}}),oO={class:"moonbase:download-product"},sO={key:0,class:"moonbase:loader"},iO={key:1,class:"moonbase:loader"},aO={key:2,class:"moonbase:loader"},lO={key:3},uO=pe({__name:"Product",setup(e){const t=Ae(),n=tt(),{loaded:r}=tt(),{getProduct:o}=io(),s=V(null),i=V(null),a=V(!0);return He(async()=>{const l=t.getParameter("product_id"),u=t.getParameter("version");if(!l){i.value="Link is broken";return}try{s.value=await o(l,u||void 0)}catch(c){i.value=c.message}a.value=!1}),(l,u)=>(g(),C("div",oO,[a.value||!b(r)?(g(),C("div",sO,[w(Qt)])):i.value?(g(),C("div",iO,j(i.value),1)):s.value?(g(),C("div",lO,[w(Rk,{product:s.value},null,8,["product"]),s.value.downloads?(g(),Y(Zk,{key:0,product:s.value},null,8,["product"])):fe("",!0),b(n).user.value?(g(),Y(rO,{key:1,product:s.value,onRevoked:u[0]||(u[0]=c=>s.value.currentActivations=(s.value.currentActivations??1)-1)},null,8,["product"])):fe("",!0)])):(g(),C("div",aO," Could not find product "))]))}}),cO={class:"moonbase:peek"},dO=["data-visible"],fO={key:1,class:"moonbase:peek-voucher"},hO={key:0,class:"moonbase:peek-voucher-content"},pO={class:"moonbase:peek-voucher-auth"},mO=pe({__name:"Redeem",setup(e){const{peek:t}=dh(),n=Ae(),r=V(null),o=V(null),s=V(n.getParameter("code")||"");async function i(){o.value=null;try{r.value=await t(s.value),n.parameters={code:r.value.code}}catch(u){throw o.value=u,u}}function a(){n.enqueue(ue.Customer,Q.RedeemVoucher,{code:s.value}),n.show(ue.Authentication,Q.SignIn)}function l(){n.enqueue(ue.Customer,Q.RedeemVoucher,{code:s.value}),n.show(ue.Authentication,Q.SignUp)}return(u,c)=>(g(),C("div",cO,[w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[r.value?(g(),C("div",fO,[H("div",null,[w(ns,null,{default:O(()=>[M(j(r.value.name),1)]),_:1}),r.value.description?(g(),Y(nt,{key:0},{default:O(()=>[M(' "'+j(r.value.description)+'" ',1)]),_:1})):fe("",!0),w(Le,null,{default:O(()=>[c[2]||(c[2]=M(" Code: ")),H("strong",null,j(r.value.code),1)]),_:1,__:[2]})]),w(nt,null,{default:O(()=>c[3]||(c[3]=[M(" Voucher summary ")])),_:1,__:[3]}),r.value.redeemsProducts.length>0||r.value.redeemsBundles.length>0?(g(),C("div",hO,[(g(!0),C($e,null,_t(r.value.redeemsProducts,({value:d,quantity:f})=>(g(),Y(Jp,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(g(!0),C($e,null,_t(r.value.redeemsBundles,({value:d,quantity:f})=>(g(),Y(Xp,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):fe("",!0),H("div",pO,[w(rt,null,{default:O(()=>c[4]||(c[4]=[M(" Sign in or create an account to redeem products ")])),_:1,__:[4]}),w(st,{label:"Sign in",variant:"primary",handler:a}),w(st,{label:"Create account",variant:"subtle",handler:l})])])):(g(),Y(ir,{key:0,handler:i},{default:O(()=>{var d;return[w(rt,null,{default:O(()=>c[1]||(c[1]=[M(" Do you have a voucher you want to redeem? "),H("br",null,null,-1),M(" Please enter the code below: ")])),_:1,__:[1]}),w(Pt,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=f=>s.value=f),label:"Voucher code",name:"code",required:"",placeholder:"0000-0000-0000-0000"},null,8,["modelValue"]),w(ar,{label:"Redeem voucher",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!o.value||void 0},j((d=o.value)==null?void 0:d.message),9,dO)]}),_:1}))]),_:1})]))}}),bO={class:"moonbase:subscription-content-card-content"},gO=["data-open"],vO={class:"moonbase:subscription-content-card-content"},yO=["data-open"],_O=pe({__name:"ContentCard",props:{subscription:{}},setup(e){const t=V(new Date),n=V(!1),r=V(null),o=se(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>s.subscription.content.type==="Product"?(g(),Y(kn,{key:0,class:"moonbase:subscription-content-card"},{addon:O(()=>[H("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:r},{default:O(()=>[M(j(s.subscription.content.product.description),1)]),_:1},512),!n.value&&o.value?(g(),C("button",{key:0,onClick:i[0]||(i[0]=a=>n.value=!0)},[w($t,null,{default:O(()=>i[2]||(i[2]=[M(" read more ")])),_:1,__:[2]})])):fe("",!0)],8,gO)]),default:O(()=>[w(en,{url:s.subscription.content.product.iconUrl,size:72},null,8,["url"]),H("div",bO,[w(ns,null,{default:O(()=>{var a;return[M(j((a=s.subscription.content.product)==null?void 0:a.name),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-tagline"},{default:O(()=>{var a;return[M(j((a=s.subscription.content.product)==null?void 0:a.tagline),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-expiry"},{default:O(()=>[M(j(s.subscription.status===b(gr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),H("strong",null,j(b(gi)(s.subscription.expiresAt)),1)]),_:1})])]),_:1})):(g(),Y(kn,{key:1,class:"moonbase:subscription-content-card"},{addon:O(()=>[H("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:r},{default:O(()=>[M(j(s.subscription.content.bundle.description),1)]),_:1},512),!n.value&&o.value?(g(),C("button",{key:0,onClick:i[1]||(i[1]=a=>n.value=!0)},[w($t,null,{default:O(()=>i[3]||(i[3]=[M(" read more ")])),_:1,__:[3]})])):fe("",!0)],8,yO)]),default:O(()=>[w(en,{url:s.subscription.content.bundle.iconUrl,size:72},null,8,["url"]),H("div",vO,[w(ns,null,{default:O(()=>{var a;return[M(j((a=s.subscription.content.bundle)==null?void 0:a.name),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-tagline"},{default:O(()=>{var a;return[M(j((a=s.subscription.content.bundle)==null?void 0:a.tagline),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-expiry"},{default:O(()=>[M(j(s.subscription.status===b(gr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),H("strong",null,j(b(gi)(s.subscription.expiresAt)),1)]),_:1})])]),_:1}))}}),wO={class:"moonbase:subscription"},EO={key:0,class:"moonbase:loader"},xO={key:1,class:"moonbase:loader"},kO={key:2,class:"moonbase:loader"},OO={key:3},SO={class:"moonbase:subscription-actions"},NO=pe({__name:"Subscription",setup(e){const t=Ae(),{loaded:n}=tt(),{getSubscription:r,renewSubscription:o,cancelSubscription:s}=io(),i=V(null),a=V(new Date),l=V(null),u=V(!0);He(async()=>{const f=t.getParameter("subscription_id");if(!f){l.value="Link is broken";return}try{i.value=await r(f)}catch(h){l.value=h.message}u.value=!1});async function c(){if(!i.value)return;if((await o(i.value.id,{redirect:!1})).completed){const h=await r(i.value.id);Ht(1500).then(()=>i.value=h)}else throw new Ha}async function d(){i.value&&(i.value=await s(i.value.id))}return(f,h)=>(g(),C("div",wO,[u.value||!b(n)?(g(),C("div",EO,[w(Qt)])):l.value?(g(),C("div",xO,j(l.value),1)):i.value?(g(),C("div",OO,[w(_O,{subscription:i.value},null,8,["subscription"]),H("div",SO,[i.value.status===b(gr).Active?(g(),Y(st,{key:0,label:"Cancel subscription",variant:"danger",handler:d})):(g(),Y(st,{key:1,label:"Continue subscription",variant:"primary",handler:c})),i.value.status===b(gr).Active?(g(),Y(Mr,{key:2},{default:O(()=>[h[0]||(h[0]=M(" Cancelling a subscription will let you use the products to the end of the current period, after which you will lose access. If you want to continue using the products later, you may simply renew this subscription whenever you wish. You are currently paying ")),H("strong",null,j(b(Jt)(i.value.total.due)),1),M(" per "+j(b(rc)(i.value.cycleLength))+" for this subscription. ",1)]),_:1,__:[0]})):(g(),Y(Mr,{key:3},{default:O(()=>[M(" This subscription has been stopped, and "+j(i.value.expiresAt>a.value?"expires":"expired")+" "+j(b(gi)(i.value.expiresAt))+". If you want to continue using the products after this date, you may continue the subscription to regain access. ",1)]),_:1}))])])):(g(),C("div",kO," Could not find subscription "))]))}}),CO=pe({__name:"App",setup(e){const t=ve(Et),n=Ae();et(()=>[n.active,n.intent],([o,s])=>{});const r={Inter:"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",Roboto:"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap","EB Garamond":"https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap",Merriweather:"https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap",Poppins:"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap","PT Serif":"https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap",Montserrat:"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap",Aleo:"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&display=swap"};if(t){const o=document.createElement("link");o.rel="stylesheet",o.href=r[t.value.theme.fonts.body],document.head.appendChild(o),document.documentElement.style.setProperty("--moonbase-font-body",t.value.theme.fonts.body??"");const s=document.createElement("link");s.rel="stylesheet",s.href=r[t.value.theme.fonts.heading],document.head.appendChild(s),document.documentElement.style.setProperty("--moonbase-font-heading",t.value.theme.fonts.heading??"");let i=t.value.theme.colors.primary;typeof i=="string"&&(i=Object.fromEntries($2(i).map(a=>[a.number<=100||a.number===950?a.number-50:a.number-100,a.hexcode]))),document.documentElement.style.setProperty("--moonbase-brand-50",i[50]??""),document.documentElement.style.setProperty("--moonbase-brand-100",i[100]??""),document.documentElement.style.setProperty("--moonbase-brand-200",i[200]??""),document.documentElement.style.setProperty("--moonbase-brand-300",i[300]??""),document.documentElement.style.setProperty("--moonbase-brand-400",i[400]??""),document.documentElement.style.setProperty("--moonbase-brand-500",i[500]??""),document.documentElement.style.setProperty("--moonbase-brand-600",i[600]??""),document.documentElement.style.setProperty("--moonbase-brand-700",i[700]??""),document.documentElement.style.setProperty("--moonbase-brand-800",i[800]??""),document.documentElement.style.setProperty("--moonbase-brand-900",i[900]??"")}return et(()=>t==null?void 0:t.value.theme.dark,o=>{o?document.documentElement.classList.add("moonbase:dark"):document.documentElement.classList.remove("moonbase:dark")},{immediate:!0}),A_(),D_(),(o,s)=>{var i;return g(),C($e,null,[(i=b(t))!=null&&i.toolbar.enabled?(g(),Y($_,{key:0})):fe("",!0),w(x_,null,{default:O(()=>[b(n).active===b(ue).Cart?(g(),Y(H5,{key:0})):b(n).active===b(ue).Authentication?(g(),Y(_5,{key:1})):b(n).active===b(ue).Activation?(g(),Y($E,{key:2})):b(n).active===b(ue).Product?(g(),Y(uO,{key:3})):b(n).active===b(ue).Subscription?(g(),Y(NO,{key:4})):b(n).active===b(ue).Customer?(g(),Y(Ik,{key:5})):b(n).active===b(ue).Redeem?(g(),Y(mO,{key:6})):b(n).active===b(ue).About?(g(),Y(H2,{key:7})):fe("",!0)]),_:1})],64)}}});function Ga(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof HTMLElement)}function Ka(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(Ga(e)&&Ga(n)){for(const r in e)if(Object.prototype.hasOwnProperty.call(n,r)){const o=n[r];Ga(o)&&Ga(e[r])?e[r]=Ka(e[r],o):o!==void 0&&(e[r]=o)}}return Ka(e,...t)}function TO(e){const t=n=>Array.isArray(n)?n.map(r=>t(r)):Xe(n)||bn(n)||$o(n)?t(Se(n)):n&&typeof n=="object"?Object.keys(n).reduce((r,o)=>(r[o]=t(n[o]),r),{}):n;return t(e)}const sc=Symbol("url"),dm=Symbol("moonbase_instance"),Rr=(e,t)=>window.dispatchEvent(new CustomEvent(`moonbase-storefront-${e}`,{detail:TO(t)})),Lr=Symbol("event-emitter");class PO{constructor(){go(this,"initialized",!1);go(this,"pinia");go(this,"storefront");go(this,"options")}async setup(t,n){var l,u;if(typeof window>"u")throw console.error("Moonbase setup must be done client-side"),new Error("Moonbase setup must be done client-side");if(globalThis.MoonbaseCSS&&globalThis.MoonbaseCSS.inject(),document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}this.options=V(Ka(((l=this.options)==null?void 0:l.value)??$h,n??{})),Uo("Merged options:",this.options.value);const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase"),(this.options.value.target??document.body).append(r),this.storefront=wy(t),this.pinia=Wy(),ty(CO).use(this.storefront).use(this.pinia).provide(Et,this.options).provide(sc,t.replace(/\/$/,"")).provide(Lr,Rr).provide(dm,this).mount("#moonbase"),this.initialized=!0,window&&window.location&&this.handleLocationIntent(window.location);const i=Ae(this.pinia),a=tt(this.storefront);(u=this.storefront)==null||u.onCheckoutInitiated((c,d)=>{Rr(qt.CheckoutInitiated,{order:c,total:d,user:a.user.value})}),this.storefront.onCheckoutClosed(c=>{Rr(qt.CheckoutClosed,{order:this.storefront.currentOrder.value,user:a.user.value}),c===Q.ViewProducts&&(a.user?i.show(ue.Customer,Q.ViewProducts):i.show(ue.Cart,Q.ViewCart))}),this.storefront.onCheckoutCompleted(c=>{Rr(qt.CheckoutCompleted,{order:c,user:a.user.value})})}configure(t){var r;const n=Ka(((r=this.options)==null?void 0:r.value)??$h,t??{});this.options?this.options.value=n:this.options=V(n)}on(t,n){window.addEventListener(`moonbase-storefront-${t}`,r=>n(r.detail))}handleLocationIntent(t){const n=new URLSearchParams(t.search),r=n.get("mb_intent");if(r&&Object.values(Q).includes(r)){const o=Object.fromEntries([...n.entries()].filter(([i])=>i.startsWith("mb_")).map(([i,a])=>[i.substring(3),a]));if(r===Q.Checkout&&o.complete)return;this[r](o);for(const i of Object.keys(o))n.delete(`mb_${i}`);const s=n.toString();window.history.replaceState(null,"",t.href.split("?")[0]+(s?`?${s}`:""))}}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.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.value.auth.signUp.enabled))throw new Error("Sign ups are not enabled");Ae(this.pinia).show(ue.Authentication,Q.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ConfirmAccount,t)}confirm_email(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ConfirmEmail,t)}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Authentication,Q.ConfirmEmailChange,t):(n.enqueue(ue.Authentication,Q.ConfirmEmailChange,t),n.show(ue.Authentication,Q.SignIn))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ae(this.pinia);tt(this.storefront).user.value?t.show(ue.Customer,Q.ViewAccount):(t.enqueue(ue.Customer,Q.ViewAccount),t.show(ue.Authentication,Q.SignIn))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Customer,Q.ViewProducts)}view_subscriptions(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Customer,Q.ViewSubscriptions)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Customer,Q.RedeemVoucher,t):n.show(ue.Redeem,Q.RedeemVoucher,t)}view_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Product,Q.ViewProduct,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Product,Q.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia),r=tt(this.storefront);!(t!=null&&t.token)&&!r.user.value?(n.enqueue(ue.Activation,Q.ActivateProduct,t),n.show(ue.Authentication,Q.SignIn)):n.show(ue.Activation,Q.ActivateProduct,t)}manage_subscription(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Subscription,Q.ManageSubscription,t):(n.enqueue(ue.Subscription,Q.ManageSubscription,t),n.show(ue.Authentication,Q.SignIn))}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Cart,Q.ViewCart)}async add_to_cart(t){var o,s,i,a,l,u,c,d;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=Tr(this.storefront),r=tt(this.storefront);if(t!=null&&t.product_id){const f=Qs(t.product_id,this.storefront);if(f.value){let h=n.addToCart(f.value,(o=f.value.variations)==null?void 0:o.find(p=>p.id===t.variation_id));t!=null&&t.quantity&&(h=n.setQuantity(h,h.quantity+t.quantity-1)),((s=this.options)==null?void 0:s.value.cart.quantity)==="single"&&(h=n.setQuantity(h,1)),Rr(qt.AddedToCart,{item:h,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const h=Qs(t.product_id,this.storefront);if(h.value){let p=n.addToCart(h.value,(i=h.value.variations)==null?void 0:i.find(_=>_.id===t.variation_id));t!=null&&t.quantity&&(p=n.setQuantity(p,p.quantity+t.quantity-1)),((a=this.options)==null?void 0:a.value.cart.quantity)==="single"&&(p=n.setQuantity(p,1)),Rr(qt.AddedToCart,{item:p,currency:n.currency.value,user:r.user.value})}else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const f=_a(t.bundle_id,this.storefront);if(f.value){let h=n.addToCart(f.value,(l=f.value.variations)==null?void 0:l.find(p=>p.id===t.variation_id));t!=null&&t.quantity&&(h=n.setQuantity(h,h.quantity+t.quantity-1)),((u=this.options)==null?void 0:u.value.cart.quantity)==="single"&&(h=n.setQuantity(h,1)),Rr(qt.AddedToCart,{item:h,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const h=_a(t.bundle_id,this.storefront);if(h.value){let p=n.addToCart(h.value,(c=h.value.variations)==null?void 0:c.find(_=>_.id===t.variation_id));t!=null&&t.quantity&&(p=n.setQuantity(p,p.quantity+t.quantity-1)),((d=this.options)==null?void 0:d.value.cart.quantity)==="single"&&(p=n.setQuantity(p,1)),Rr(qt.AddedToCart,{item:p,currency:n.currency.value,user:r.user.value})}else throw new Error(`Bundle '${t.bundle_id}' not found`)}}(t==null?void 0:t.show_cart)!==!1&&Ae(this.pinia).show(ue.Cart,Q.AddToCart)}async purchase(t){var o,s,i,a,l;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(o=this.storefront)!=null&&o.loadedStorefront||await((s=this.storefront)==null?void 0:s.loadedStorefrontPromise);const n=t?Array.isArray(t)?t:[t]:[];if(n.length===0)throw new Error("No items given to purchase");const r=[];for(const u of n){if(!u.product_id&&!u.bundle_id)throw new Error("You need to provide a product or bundle ID when purchasing");if(u.product_id){const c=Qs(u.product_id,this.storefront);if(c.value)r.push({item:c.value,variation:(i=c.value.variations)==null?void 0:i.find(d=>d.id===u.variation_id),quantity:u.quantity});else throw new Error(`Product '${u.product_id}' not found`)}if(u.bundle_id){const c=_a(u.bundle_id,this.storefront);if(c.value)r.push({item:c.value,variation:(a=c.value.variations)==null?void 0:a.find(d=>d.id===u.variation_id),quantity:u.quantity});else throw new Error(`Bundle '${u.bundle_id}' not found`)}}await yy(r,{redirect:((l=this.options)==null?void 0:l.value.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`},this.storefront)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Tr(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.value.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()}view_about(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.About,Q.ViewAbout)}}const ic=new PO;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=ic),xt.MoonbaseIntent=Q,xt.default=ic,xt.eventEmitterKey=Lr,xt.instanceKey=dm,xt.urlKey=sc,Object.defineProperties(xt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
36
|
+
*/const Ep=.027,s2=5e-4,i2=.1,xp=1.14,La=.022,kp=1.414,a2=(e,t)=>{e=new ee(e),t=new ee(t),e.alpha()<1&&(e=Go(t,e,e.alpha(),"rgb"));const n=Op(...e.rgb()),r=Op(...t.rgb()),o=n>=La?n:n+Math.pow(La-n,kp),s=r>=La?r:r+Math.pow(La-r,kp),i=Math.pow(s,.56)-Math.pow(o,.57),a=Math.pow(s,.65)-Math.pow(o,.62),l=Math.abs(s-o)<s2?0:o<s?i*xp:a*xp;return(Math.abs(l)<i2?0:l>0?l-Ep:l+Ep)*100};function Op(e,t,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:or,pow:ft,min:l2,max:u2,atan2:Sp,abs:Np,cos:ja,sin:Cp,exp:c2,PI:Tp}=Math;function d2(e,t,n=1,r=1,o=1){var s=function(Be){return 360*Be/(2*Tp)},i=function(Be){return 2*Tp*Be/360};e=new ee(e),t=new ee(t);const[a,l,u]=Array.from(e.lab()),[c,d,f]=Array.from(t.lab()),h=(a+c)/2,p=or(ft(l,2)+ft(u,2)),_=or(ft(d,2)+ft(f,2)),E=(p+_)/2,N=.5*(1-or(ft(E,7)/(ft(E,7)+ft(25,7)))),q=l*(1+N),z=d*(1+N),B=or(ft(q,2)+ft(u,2)),L=or(ft(z,2)+ft(f,2)),D=(B+L)/2,m=s(Sp(u,q)),P=s(Sp(f,z)),I=m>=0?m:m+360,T=P>=0?P:P+360,$=Np(I-T)>180?(I+T+360)/2:(I+T)/2,A=1-.17*ja(i($-30))+.24*ja(i(2*$))+.32*ja(i(3*$+6))-.2*ja(i(4*$-63));let oe=T-I;oe=Np(oe)<=180?oe:T<=I?oe+360:oe-360,oe=2*or(B*L)*Cp(i(oe)/2);const ke=c-a,k=L-B,U=1+.015*ft(h-50,2)/or(20+ft(h-50,2)),R=1+.045*D,te=1+.015*D*A,me=30*c2(-ft(($-275)/25,2)),he=-(2*or(ft(D,7)/(ft(D,7)+ft(25,7))))*Cp(2*i(me)),_e=or(ft(ke/(n*U),2)+ft(k/(r*R),2)+ft(oe/(o*te),2)+he*(k/(r*R))*(oe/(o*te)));return u2(0,l2(100,_e))}function f2(e,t,n="lab"){e=new ee(e),t=new ee(t);const r=e.get(n),o=t.get(n);let s=0;for(let i in r){const a=(r[i]||0)-(o[i]||0);s+=a*a}return Math.sqrt(s)}const h2=(...e)=>{try{return new ee(...e),!0}catch{return!1}},p2={cool(){return Ra([Ie.hsl(180,1,.9),Ie.hsl(250,.7,.4)])},hot(){return Ra(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ku={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pp=Object.keys(Ku),$p=new Map(Pp.map(e=>[e.toLowerCase(),e])),m2=typeof Proxy=="function"?new Proxy(Ku,{get(e,t){const n=t.toLowerCase();if($p.has(n))return e[$p.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Pp)}}):Ku,b2=(...e)=>{e=De(e,"cmyk");const[t,n,r,o]=e,s=e.length>4?e[4]:1;return o===1?[0,0,0,s]:[t>=1?0:255*(1-t)*(1-o),n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),s]},{max:Ap}=Math,g2=(...e)=>{let[t,n,r]=De(e,"rgb");t=t/255,n=n/255,r=r/255;const o=1-Ap(t,Ap(n,r)),s=o<1?1/(1-o):0,i=(1-t-o)*s,a=(1-n-o)*s,l=(1-r-o)*s;return[i,a,l,o]};ee.prototype.cmyk=function(){return g2(this._rgb)},Object.assign(Ie,{cmyk:(...e)=>new ee(...e,"cmyk")}),Te.format.cmyk=b2,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"cmyk"),Re(e)==="array"&&e.length===4)return"cmyk"}});const v2=(...e)=>{const t=De(e,"hsla");let n=Zo(e)||"lsa";return t[0]=an(t[0]||0)+"deg",t[1]=an(t[1]*100)+"%",t[2]=an(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),n="hsla"):t.length=3,`${n.substr(0,3)}(${t.join(" ")})`},y2=(...e)=>{const t=De(e,"lab");let n=Zo(e)||"lab";return t[0]=an(t[0])+"%",t[1]=an(t[1]),t[2]=an(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},_2=(...e)=>{const t=De(e,"lch");let n=Zo(e)||"lab";return t[0]=an(t[0])+"%",t[1]=an(t[1]),t[2]=isNaN(t[2])?"none":an(t[2])+"deg",n==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},w2=(...e)=>{const t=De(e,"lab");return t[0]=an(t[0]*100)+"%",t[1]=Iu(t[1]),t[2]=Iu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},Dp=(...e)=>{const[t,n,r,...o]=De(e,"rgb"),[s,i,a]=Wu(t,n,r),[l,u,c]=hp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},E2=(...e)=>{const t=De(e,"lch");return t[0]=an(t[0]*100)+"%",t[1]=Iu(t[1]),t[2]=isNaN(t[2])?"none":an(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:Xu}=Math,x2=(...e)=>{const t=De(e,"rgba");let n=Zo(e)||"rgb";if(n.substr(0,3)==="hsl")return v2(mp(t),n);if(n.substr(0,3)==="lab"){const r=fi();rr("d50");const o=y2(Lu(t),n);return rr(r),o}if(n.substr(0,3)==="lch"){const r=fi();rr("d50");const o=_2(Bu(t),n);return rr(r),o}return n.substr(0,5)==="oklab"?w2(Wu(t)):n.substr(0,5)==="oklch"?E2(Dp(t)):(t[0]=Xu(t[0]),t[1]=Xu(t[1]),t[2]=Xu(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),n="rgba"),`${n.substr(0,3)}(${t.slice(0,n==="rgb"?3:4).join(" ")})`)},Ip=(...e)=>{e=De(e,"lch");const[t,n,r,...o]=e,[s,i,a]=fp(t,n,r),[l,u,c]=zu(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},sr=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,xn=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Fa=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,ln=/\s*/.source,Qo=/\s+/.source,Ju=/\s*,\s*/.source,Ua=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,es=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,Mp=new RegExp("^rgba?\\("+ln+[sr,sr,sr].join(Qo)+es+"\\)$"),Vp=new RegExp("^rgb\\("+ln+[sr,sr,sr].join(Ju)+ln+"\\)$"),Rp=new RegExp("^rgba\\("+ln+[sr,sr,sr,xn].join(Ju)+ln+"\\)$"),Lp=new RegExp("^hsla?\\("+ln+[Ua,Fa,Fa].join(Qo)+es+"\\)$"),jp=new RegExp("^hsl?\\("+ln+[Ua,Fa,Fa].join(Ju)+ln+"\\)$"),Fp=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Up=new RegExp("^lab\\("+ln+[xn,xn,xn].join(Qo)+es+"\\)$"),Bp=new RegExp("^lch\\("+ln+[xn,xn,Ua].join(Qo)+es+"\\)$"),Hp=new RegExp("^oklab\\("+ln+[xn,xn,xn].join(Qo)+es+"\\)$"),qp=new RegExp("^oklch\\("+ln+[xn,xn,Ua].join(Qo)+es+"\\)$"),{round:zp}=Math,ts=e=>e.map((t,n)=>n<=2?mo(zp(t),0,255):t),ht=(e,t=0,n=100,r=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,r?e=t+(e+1)*.5*(n-t):e=t+e*(n-t)),+e),Ft=(e,t)=>e==="none"?t:e,Qu=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Te.format.named)try{return Te.format.named(e)}catch{}if((t=e.match(Mp))||(t=e.match(Vp))){let n=t.slice(1,4);for(let o=0;o<3;o++)n[o]=+ht(Ft(n[o],0),0,255);n=ts(n);const r=t[4]!==void 0?+ht(t[4],0,1):1;return n[3]=r,n}if(t=e.match(Rp)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+ht(n[r],0,255);return n}if((t=e.match(Lp))||(t=e.match(jp))){const n=t.slice(1,4);n[0]=+Ft(n[0].replace("deg",""),0),n[1]=+ht(Ft(n[1],0),0,100)*.01,n[2]=+ht(Ft(n[2],0),0,100)*.01;const r=ts(qu(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}if(t=e.match(Fp)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=qu(n);for(let o=0;o<3;o++)r[o]=zp(r[o]);return r[3]=+t[4],r}if(t=e.match(Up)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,100),n[1]=ht(Ft(n[1],0),-125,125,!0),n[2]=ht(Ft(n[2],0),-125,125,!0);const r=fi();rr("d50");const o=ts(Vu(n));rr(r);const s=t[4]!==void 0?+ht(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Bp)){const n=t.slice(1,4);n[0]=ht(n[0],0,100),n[1]=ht(Ft(n[1],0),0,150,!1),n[2]=+Ft(n[2].replace("deg",""),0);const r=fi();rr("d50");const o=ts(Uu(n));rr(r);const s=t[4]!==void 0?+ht(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Hp)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,1),n[1]=ht(Ft(n[1],0),-.4,.4,!0),n[2]=ht(Ft(n[2],0),-.4,.4,!0);const r=ts(zu(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}if(t=e.match(qp)){const n=t.slice(1,4);n[0]=ht(Ft(n[0],0),0,1),n[1]=ht(Ft(n[1],0),0,.4,!1),n[2]=+Ft(n[2].replace("deg",""),0);const r=ts(Ip(n)),o=t[4]!==void 0?+ht(t[4],0,1):1;return r[3]=o,r}};Qu.test=e=>Mp.test(e)||Lp.test(e)||Up.test(e)||Bp.test(e)||Hp.test(e)||qp.test(e)||Vp.test(e)||Rp.test(e)||jp.test(e)||Fp.test(e)||e==="transparent",ee.prototype.css=function(e){return x2(this._rgb,e)};const k2=(...e)=>new ee(...e,"css");Ie.css=k2,Te.format.css=Qu,Te.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&Qu.test(e))return"css"}}),Te.format.gl=(...e)=>{const t=De(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const O2=(...e)=>new ee(...e,"gl");Ie.gl=O2,ee.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},ee.prototype.hex=function(e){return up(this._rgb,e)};const S2=(...e)=>new ee(...e,"hex");Ie.hex=S2,Te.format.hex=lp,Te.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Re(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Ba}=Math,Wp=e=>{const t=e/100;let n,r,o;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*Ba(r),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*Ba(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*Ba(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*Ba(r),o=255),[n,r,o,1]},{round:N2}=Math,C2=(...e)=>{const t=De(e,"rgb"),n=t[0],r=t[2];let o=1e3,s=4e4;const i=.4;let a;for(;s-o>i;){a=(s+o)*.5;const l=Wp(a);l[2]/l[0]>=r/n?s=a:o=a}return N2(a)};ee.prototype.temp=ee.prototype.kelvin=ee.prototype.temperature=function(){return C2(this._rgb)};const ec=(...e)=>new ee(...e,"temp");Object.assign(Ie,{temp:ec,kelvin:ec,temperature:ec}),Te.format.temp=Te.format.kelvin=Te.format.temperature=Wp,ee.prototype.oklch=function(){return Dp(this._rgb)},Object.assign(Ie,{oklch:(...e)=>new ee(...e,"oklch")}),Te.format.oklch=Ip,Te.autodetect.push({p:2,test:(...e)=>{if(e=De(e,"oklch"),Re(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Ie,{analyze:_p,average:Aw,bezier:Lw,blend:En,brewer:m2,Color:ee,colors:Yo,contrast:o2,contrastAPCA:a2,cubehelix:Kw,deltaE:d2,distance:f2,input:Te,interpolate:Go,limits:wp,mix:Go,random:e2,scale:Ra,scales:p2,valid:h2});const T2=[{name:"Slate",id:"slate",reference:!1,shades:[{number:50,hexcode:"#f8fafc"},{number:100,hexcode:"#f1f5f9"},{number:200,hexcode:"#e2e8f0"},{number:300,hexcode:"#cbd5e1"},{number:400,hexcode:"#94a3b8"},{number:500,hexcode:"#64748b"},{number:600,hexcode:"#475569"},{number:700,hexcode:"#334155"},{number:800,hexcode:"#1e293b"},{number:900,hexcode:"#0f172a"},{number:950,hexcode:"#020617"}]},{name:"Gray",id:"gray",reference:!1,shades:[{number:50,hexcode:"#f9fafb"},{number:100,hexcode:"#f3f4f6"},{number:200,hexcode:"#e5e7eb"},{number:300,hexcode:"#d1d5db"},{number:400,hexcode:"#9ca3af"},{number:500,hexcode:"#6b7280"},{number:600,hexcode:"#4b5563"},{number:700,hexcode:"#374151"},{number:800,hexcode:"#1f2937"},{number:900,hexcode:"#111827"},{number:950,hexcode:"#030712"}]},{name:"Zinc",id:"zinc",reference:!1,shades:[{number:50,hexcode:"#fafafa"},{number:100,hexcode:"#f4f4f5"},{number:200,hexcode:"#e4e4e7"},{number:300,hexcode:"#d4d4d8"},{number:400,hexcode:"#a1a1aa"},{number:500,hexcode:"#71717a"},{number:600,hexcode:"#52525b"},{number:700,hexcode:"#3f3f46"},{number:800,hexcode:"#27272a"},{number:900,hexcode:"#18181b"},{number:950,hexcode:"#09090b"}]},{name:"Neutral",id:"neutral",reference:!1,shades:[{number:50,hexcode:"#fafafa"},{number:100,hexcode:"#f5f5f5"},{number:200,hexcode:"#e5e5e5"},{number:300,hexcode:"#d4d4d4"},{number:400,hexcode:"#a3a3a3"},{number:500,hexcode:"#737373"},{number:600,hexcode:"#525252"},{number:700,hexcode:"#404040"},{number:800,hexcode:"#262626"},{number:900,hexcode:"#171717"},{number:950,hexcode:"#0a0a0a"}]},{name:"Stone",id:"stone",reference:!1,shades:[{number:50,hexcode:"#fafaf9"},{number:100,hexcode:"#f5f5f4"},{number:200,hexcode:"#e7e5e4"},{number:300,hexcode:"#d6d3d1"},{number:400,hexcode:"#a8a29e"},{number:500,hexcode:"#78716c"},{number:600,hexcode:"#57534e"},{number:700,hexcode:"#44403c"},{number:800,hexcode:"#292524"},{number:900,hexcode:"#1c1917"},{number:950,hexcode:"#0c0a09"}]},{name:"Red",id:"red",reference:!0,shades:[{number:50,hexcode:"#fef2f2"},{number:100,hexcode:"#fee2e2"},{number:200,hexcode:"#fecaca"},{number:300,hexcode:"#fca5a5"},{number:400,hexcode:"#f87171"},{number:500,hexcode:"#ef4444"},{number:600,hexcode:"#dc2626"},{number:700,hexcode:"#b91c1c"},{number:800,hexcode:"#991b1b"},{number:900,hexcode:"#7f1d1d"},{number:950,hexcode:"#450a0a"}]},{name:"Orange",id:"orange",reference:!0,shades:[{number:50,hexcode:"#fff7ed"},{number:100,hexcode:"#ffedd5"},{number:200,hexcode:"#fed7aa"},{number:300,hexcode:"#fdba74"},{number:400,hexcode:"#fb923c"},{number:500,hexcode:"#f97316"},{number:600,hexcode:"#ea580c"},{number:700,hexcode:"#c2410c"},{number:800,hexcode:"#9a3412"},{number:900,hexcode:"#7c2d12"},{number:950,hexcode:"#431407"}]},{name:"Amber",id:"amber",reference:!0,shades:[{number:50,hexcode:"#fffbeb"},{number:100,hexcode:"#fef3c7"},{number:200,hexcode:"#fde68a"},{number:300,hexcode:"#fcd34d"},{number:400,hexcode:"#fbbf24"},{number:500,hexcode:"#f59e0b"},{number:600,hexcode:"#d97706"},{number:700,hexcode:"#b45309"},{number:800,hexcode:"#92400e"},{number:900,hexcode:"#78350f"},{number:950,hexcode:"#451a03"}]},{name:"Yellow",id:"yellow",reference:!0,shades:[{number:50,hexcode:"#fefce8"},{number:100,hexcode:"#fef9c3"},{number:200,hexcode:"#fef08a"},{number:300,hexcode:"#fde047"},{number:400,hexcode:"#facc15"},{number:500,hexcode:"#eab308"},{number:600,hexcode:"#ca8a04"},{number:700,hexcode:"#a16207"},{number:800,hexcode:"#854d0e"},{number:900,hexcode:"#713f12"},{number:950,hexcode:"#422006"}]},{name:"Lime",id:"lime",reference:!0,shades:[{number:50,hexcode:"#f7fee7"},{number:100,hexcode:"#ecfccb"},{number:200,hexcode:"#d9f99d"},{number:300,hexcode:"#bef264"},{number:400,hexcode:"#a3e635"},{number:500,hexcode:"#84cc16"},{number:600,hexcode:"#65a30d"},{number:700,hexcode:"#4d7c0f"},{number:800,hexcode:"#3f6212"},{number:900,hexcode:"#365314"},{number:950,hexcode:"#1a2e05"}]},{name:"Green",id:"green",reference:!0,shades:[{number:50,hexcode:"#f0fdf4"},{number:100,hexcode:"#dcfce7"},{number:200,hexcode:"#bbf7d0"},{number:300,hexcode:"#86efac"},{number:400,hexcode:"#4ade80"},{number:500,hexcode:"#22c55e"},{number:600,hexcode:"#16a34a"},{number:700,hexcode:"#15803d"},{number:800,hexcode:"#166534"},{number:900,hexcode:"#14532d"},{number:950,hexcode:"#052e16"}]},{name:"Emerald",id:"emerald",reference:!0,shades:[{number:50,hexcode:"#ecfdf5"},{number:100,hexcode:"#d1fae5"},{number:200,hexcode:"#a7f3d0"},{number:300,hexcode:"#6ee7b7"},{number:400,hexcode:"#34d399"},{number:500,hexcode:"#10b981"},{number:600,hexcode:"#059669"},{number:700,hexcode:"#047857"},{number:800,hexcode:"#065f46"},{number:900,hexcode:"#064e3b"},{number:950,hexcode:"#022c22"}]},{name:"Teal",id:"teal",reference:!0,shades:[{number:50,hexcode:"#f0fdfa"},{number:100,hexcode:"#ccfbf1"},{number:200,hexcode:"#99f6e4"},{number:300,hexcode:"#5eead4"},{number:400,hexcode:"#2dd4bf"},{number:500,hexcode:"#14b8a6"},{number:600,hexcode:"#0d9488"},{number:700,hexcode:"#0f766e"},{number:800,hexcode:"#115e59"},{number:900,hexcode:"#134e4a"},{number:950,hexcode:"#042f2e"}]},{name:"Cyan",id:"cyan",reference:!0,shades:[{number:50,hexcode:"#ecfeff"},{number:100,hexcode:"#cffafe"},{number:200,hexcode:"#a5f3fc"},{number:300,hexcode:"#67e8f9"},{number:400,hexcode:"#22d3ee"},{number:500,hexcode:"#06b6d4"},{number:600,hexcode:"#0891b2"},{number:700,hexcode:"#0e7490"},{number:800,hexcode:"#155e75"},{number:900,hexcode:"#164e63"},{number:950,hexcode:"#083344"}]},{name:"Sky",id:"sky",reference:!0,shades:[{number:50,hexcode:"#f0f9ff"},{number:100,hexcode:"#e0f2fe"},{number:200,hexcode:"#bae6fd"},{number:300,hexcode:"#7dd3fc"},{number:400,hexcode:"#38bdf8"},{number:500,hexcode:"#0ea5e9"},{number:600,hexcode:"#0284c7"},{number:700,hexcode:"#0369a1"},{number:800,hexcode:"#075985"},{number:900,hexcode:"#0c4a6e"},{number:950,hexcode:"#082f49"}]},{name:"Blue",id:"blue",reference:!0,shades:[{number:50,hexcode:"#eff6ff"},{number:100,hexcode:"#dbeafe"},{number:200,hexcode:"#bfdbfe"},{number:300,hexcode:"#93c5fd"},{number:400,hexcode:"#60a5fa"},{number:500,hexcode:"#3b82f6"},{number:600,hexcode:"#2563eb"},{number:700,hexcode:"#1d4ed8"},{number:800,hexcode:"#1e40af"},{number:900,hexcode:"#1e3a8a"},{number:950,hexcode:"#172554"}]},{name:"Indigo",id:"indigo",reference:!0,shades:[{number:50,hexcode:"#eef2ff"},{number:100,hexcode:"#e0e7ff"},{number:200,hexcode:"#c7d2fe"},{number:300,hexcode:"#a5b4fc"},{number:400,hexcode:"#818cf8"},{number:500,hexcode:"#6366f1"},{number:600,hexcode:"#4f46e5"},{number:700,hexcode:"#4338ca"},{number:800,hexcode:"#3730a3"},{number:900,hexcode:"#312e81"},{number:950,hexcode:"#1e1b4b"}]},{name:"Violet",id:"violet",reference:!0,shades:[{number:50,hexcode:"#f5f3ff"},{number:100,hexcode:"#ede9fe"},{number:200,hexcode:"#ddd6fe"},{number:300,hexcode:"#c4b5fd"},{number:400,hexcode:"#a78bfa"},{number:500,hexcode:"#8b5cf6"},{number:600,hexcode:"#7c3aed"},{number:700,hexcode:"#6d28d9"},{number:800,hexcode:"#5b21b6"},{number:900,hexcode:"#4c1d95"},{number:950,hexcode:"#2e1065"}]},{name:"Purple",id:"purple",reference:!0,shades:[{number:50,hexcode:"#faf5ff"},{number:100,hexcode:"#f3e8ff"},{number:200,hexcode:"#e9d5ff"},{number:300,hexcode:"#d8b4fe"},{number:400,hexcode:"#c084fc"},{number:500,hexcode:"#a855f7"},{number:600,hexcode:"#9333ea"},{number:700,hexcode:"#7e22ce"},{number:800,hexcode:"#6b21a8"},{number:900,hexcode:"#581c87"},{number:950,hexcode:"#3b0764"}]},{name:"Fuchsia",id:"fuchsia",reference:!0,shades:[{number:50,hexcode:"#fdf4ff"},{number:100,hexcode:"#fae8ff"},{number:200,hexcode:"#f5d0fe"},{number:300,hexcode:"#f0abfc"},{number:400,hexcode:"#e879f9"},{number:500,hexcode:"#d946ef"},{number:600,hexcode:"#c026d3"},{number:700,hexcode:"#a21caf"},{number:800,hexcode:"#86198f"},{number:900,hexcode:"#701a75"},{number:950,hexcode:"#4a044e"}]},{name:"Pink",id:"pink",reference:!0,shades:[{number:50,hexcode:"#fdf2f8"},{number:100,hexcode:"#fce7f3"},{number:200,hexcode:"#fbcfe8"},{number:300,hexcode:"#f9a8d4"},{number:400,hexcode:"#f472b6"},{number:500,hexcode:"#ec4899"},{number:600,hexcode:"#db2777"},{number:700,hexcode:"#be185d"},{number:800,hexcode:"#9d174d"},{number:900,hexcode:"#831843"},{number:950,hexcode:"#500724"}]},{name:"Rose",id:"rose",reference:!0,shades:[{number:50,hexcode:"#fff1f2"},{number:100,hexcode:"#ffe4e6"},{number:200,hexcode:"#fecdd3"},{number:300,hexcode:"#fda4af"},{number:400,hexcode:"#fb7185"},{number:500,hexcode:"#f43f5e"},{number:600,hexcode:"#e11d48"},{number:700,hexcode:"#be123c"},{number:800,hexcode:"#9f1239"},{number:900,hexcode:"#881337"},{number:950,hexcode:"#4c0519"}]}];function P2(e){const r=T2.filter(i=>i.reference).map(i=>({...i,shades:i.shades.map(a=>({...a,delta:Ie.deltaE(e,a.hexcode)}))})).map(i=>({...i,closestShade:i.shades.reduce((a,l)=>a.delta<l.delta?a:l)})).reduce((i,a)=>i.closestShade.delta<a.closestShade.delta?i:a),o=r.shades.map(i=>({...i,lightnessDifference:Math.abs(Ie(i.hexcode).get("hsl.l")-e.get("hsl.l"))})),s=o.reduce((i,a)=>i.lightnessDifference<a.lightnessDifference?i:a);return{...r,shades:o,closestShade:s}}function $2(e){const t=Ie(e),n=P2(t),r=t.get("hsl.h"),o=Ie(n.closestShade.hexcode).get("hsl.h"),s=r-o,i=s===0?o.toString():s>0?`+${s}`:s.toString(),a=t.get("hsl.s")/Ie(n.closestShade.hexcode).get("hsl.s");return n.shades.map(u=>{if(u.number===n.closestShade.number)return{number:u.number,hexcode:t.hex()};let c=Ie(u.hexcode);const d=c.get("hsl.s")*a;return c=c.set("hsl.s",d),c=c.set("hsl.h",i),{number:u.number,hexcode:c.hex()}})}class Ha extends Error{constructor(){super(),this.name="IndiscriminateError"}}const A2={},D2={fill:"none",viewBox:"0 0 24 24"};function I2(e,t){return g(),C("svg",D2,t[0]||(t[0]=[H("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),H("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 Qt=tr(A2,[["render",I2],["__scopeId","data-v-687bcaf0"]]),M2={"aria-hidden":"true"},tc=pe({__name:"MoonButtonBase",props:{label:{},successLabel:{},errorLabel:{},icon:{},variant:{},size:{},working:{type:Boolean},success:{type:Boolean},error:{type:Boolean},disabled:{type:Boolean},type:{}},emits:["click"],setup(e){const t=e,n=ve(Et),r=se(()=>t.success?t.successLabel??t.label:t.error?t.errorLabel??t.label:t.label),o=se(()=>t.variant?t.variant==="secondary"?`secondary-${(n==null?void 0:n.value.theme.buttons)??"light"}`:t.variant:"primary");return(s,i)=>{var a,l;return g(),Y(Bl(s.type==="anchor"?"a":"button"),{class:"moonbase:button",type:s.type||"button",disabled:s.success||s.error||s.working||s.disabled,"data-success":s.success||void 0,"data-error":s.error||void 0,"data-working":s.working||void 0,"data-variant":o.value,"data-size":s.size||"large","data-corners":(a=b(n))==null?void 0:a.theme.corners,"data-background":(l=b(n))==null?void 0:l.theme.colors.background,"data-icon-visible":s.working||s.success||s.error||!!s.icon||void 0,onClick:i[0]||(i[0]=u=>s.$emit("click",u))},{default:O(()=>[H("div",M2,[s.working?(g(),Y(Qt,{key:0})):s.success?(g(),Y(b(e_),{key:1})):s.error?(g(),Y(b(o_),{key:2})):s.icon?(g(),Y(Bl(s.icon),{key:3})):fe("",!0)]),M(" "+j(r.value),1)]),_:1},8,["type","disabled","data-success","data-error","data-working","data-variant","data-size","data-corners","data-background","data-icon-visible"])}}}),st=pe({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},icon:{},variant:{},size:{},noReset:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=V(!1),r=V(!1),o=V(!1);async function s(){try{const i=t.handler();i instanceof Promise&&(n.value=!0,await i,n.value=!1,r.value=!0,await Ht(2500),t.noReset||(r.value=!1))}catch(i){if(n.value=!1,i instanceof Ha)return;o.value=!0,await Ht(2500),o.value=!1}}return(i,a)=>(g(),Y(tc,{label:i.label,working:n.value,"success-label":i.success,success:r.value,"error-label":i.error,error:o.value,icon:i.icon,disabled:i.disabled,variant:i.variant,size:i.size,onClick:s},null,8,["label","working","success-label","success","error-label","error","icon","disabled","variant","size"]))}}),V2={},R2={class:"moonbase:text-body"};function L2(e,t){return g(),C("span",R2,[St(e.$slots,"default")])}const rt=tr(V2,[["render",L2]]),j2={},F2={class:"moonbase:text-subtext"};function U2(e,t){return g(),C("span",F2,[St(e.$slots,"default")])}const Le=tr(j2,[["render",U2]]),B2={class:"moonbase:about"},H2=pe({__name:"About",setup(e){const t=Ae(),n="0.4.12";return(r,o)=>(g(),C("div",B2,[o[2]||(o[2]=Mf('<svg viewBox="0 0 512 512" height="56px" width="56px"><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)),w(b(Gh),{as:"h3"},{default:O(()=>o[0]||(o[0]=[M(" Moonbase Embedded Storefront ")])),_:1,__:[0]}),w(Le,null,{default:O(()=>[M(" Version "+j(b(n)),1)]),_:1}),w(rt,null,{default:O(()=>o[1]||(o[1]=[M(" This store is using the "),H("a",{href:"https://moonbase.sh/solutions/payments",target:"_blank"},"Moonbase Embedded Storefront",-1),M(" module to accept payments, provide authentication and power software licensing. ")])),_:1,__:[1]}),w(st,{label:"Close",variant:"primary",handler:()=>b(t).reset()},null,8,["handler"])]))}});var qt=(e=>(e.SignedIn="signed-in",e.SignedUp="signed-up",e.SignedOut="signed-out",e.RedeemedVoucher="redeemed-voucher",e.DownloadedProduct="downloaded-product",e.ActivatedProduct="activated-product",e.AddedToCart="added-to-cart",e.CheckoutInitiated="checkout-initiated",e.CheckoutClosed="checkout-closed",e.CheckoutCompleted="checkout-completed",e))(qt||{});const q2=["data-corners","data-variant"],z2={class:"moonbase:card-content"},kn=pe({__name:"MoonCard",setup(e){const t=ve(Et);return(n,r)=>{var o,s;return g(),C("div",{class:"moonbase:card","data-corners":(o=b(t))==null?void 0:o.theme.corners,"data-variant":(s=b(t))==null?void 0:s.theme.cards},[H("div",z2,[St(n.$slots,"default")]),St(n.$slots,"addon")],8,q2)}}}),W2=["data-corners"],Z2=["src"],Y2={key:1,class:"moonbase:image-placeholder"},en=pe({__name:"ProductIcon",props:{url:{},size:{}},setup(e){const t=ve(Et);return(n,r)=>{var o;return g(),C("div",{class:"moonbase:product-icon",style:Fi({width:`${n.size}px`,height:`${n.size}px`}),"data-corners":(o=b(t))==null?void 0:o.theme.corners},[n.url?(g(),C("img",{key:0,src:n.url,alt:""},null,8,Z2)):(g(),C("div",Y2,[w(b(t_))]))],12,W2)}}}),G2={},K2={class:"moonbase:text-title"};function X2(e,t){return g(),C("h4",K2,[St(e.$slots,"default")])}const ns=tr(G2,[["render",X2]]),J2={class:"moonbase:product-card-content"},Zp=pe({__name:"ProductCard",props:{product:{}},setup(e){return(t,n)=>(g(),Y(kn,{class:"moonbase:product-card"},{default:O(()=>[w(en,{url:t.product.iconUrl,size:72},null,8,["url"]),H("div",J2,[w(ns,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.name),1)]}),_:1}),w(Le,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.tagline),1)]}),_:1}),St(t.$slots,"description")]),St(t.$slots,"default")]),_:3}))}}),Q2={class:"moonbase:auto-activation"},eE={key:0,class:"moonbase:loader"},tE={key:1,class:"moonbase:loader"},nE={key:2,class:"moonbase:loader"},rE={key:3},oE={key:1,class:"moonbase:loader"},sE={key:2,class:"moonbase:loader"},iE={key:3,class:"moonbase:loader"},aE={key:4,class:"moonbase:auto-activation-content"},lE={key:0,class:"moonbase:auto-activation-option"},uE={class:"moonbase:auto-activation-cta"},cE={key:1,class:"moonbase:auto-activation-option"},dE={class:"moonbase:auto-activation-cta"},fE={key:2,class:"moonbase:auto-activation-option"},hE={key:3,class:"moonbase:auto-activation-option"},pE={class:"moonbase:auto-activation-cta"},mE={key:4,class:"moonbase:auto-activation-option"},bE={key:4,class:"moonbase:auto-activation-cta"},gE={key:5,class:"moonbase:auto-activation-cta"},vE=pe({__name:"AutoActivation",setup(e){const t=Ae(),{user:n,loaded:r}=tt(),o=ve(Lr),s=t.getParameter("token"),{activationRequest:i,loading:a,fulfilling:l,completing:u,error:c,fulfillLicense:d,fulfillTrial:f}=gy(s),h=ve(Gt);Je(i,m=>{var P;!l.value&&!u.value&&(m==null?void 0:m.status)===fn.Requested&&((P=m==null?void 0:m.licenseEligibility)!=null&&P.eligible)&&d(),(m==null?void 0:m.status)===fn.Completed&&(o==null||o(qt.ActivatedProduct,{product:m.product,fulfillmentType:m.fulfillmentType,user:n.value}))},{deep:!0});const p=se(()=>{if(i.value)return b(Qs(i.value.product.id))}),_=se(()=>p.value&&p.value.defaultVariation),{currency:E,addToCart:N,setQuantity:q}=Tr();function z(){t.show(ue.Product,Q.ViewProduct,{product_id:i.value.product.id})}function B(){t.enqueue(ue.Activation,Q.ActivateProduct,t.parameters??void 0),t.show(ue.Authentication,Q.SignIn)}function L(){if(!p.value)return;const m=N(p.value);q(m,1),t.enqueue(ue.Activation,Q.ActivateProduct,t.parameters),t.show(ue.Cart,Q.ViewCart)}function D(){var m;t.enqueue(ue.Activation,Q.ActivateProduct,{...t.parameters,product_id:((m=i.value)==null?void 0:m.product.id)??""}),n.value?t.show(ue.Customer,Q.RedeemVoucher):t.show(ue.Redeem,Q.RedeemVoucher)}return(m,P)=>{var I,T,$,A,oe,ke,k;return g(),C("div",Q2,[b(a)||!b(r)||!((I=b(h))!=null&&I.loadedStorefront)?(g(),C("div",eE,[w(Qt)])):b(c)?(g(),C("div",tE,[w(nt,null,{default:O(()=>P[0]||(P[0]=[M(" Uh oh ")])),_:1,__:[0]}),w(rt,null,{default:O(()=>[M(j(b(c)),1)]),_:1})])):b(i)?(g(),C("div",rE,[b(i).product?(g(),Y(Zp,{key:0,product:b(i).product},null,8,["product"])):fe("",!0),((T=b(i))==null?void 0:T.status)===b(fn).Cancelled?(g(),C("div",oE,[w(nt,null,{default:O(()=>P[3]||(P[3]=[M(" Uh oh ")])),_:1,__:[3]}),w(rt,null,{default:O(()=>P[4]||(P[4]=[M(" This activation request was cancelled, open your app to try again. ")])),_:1,__:[4]})])):b(l)||b(u)?(g(),C("div",sE,[w(Qt),w(rt,null,{default:O(()=>[M(" Activating "+j(b(i).product.name)+"... ",1)]),_:1})])):(($=b(i))==null?void 0:$.status)===b(fn).Completed?(g(),C("div",iE,[w(nt,null,{default:O(()=>P[5]||(P[5]=[M(" Done! ")])),_:1,__:[5]}),w(rt,null,{default:O(()=>P[6]||(P[6]=[M(" Your product is activated. "),H("br",null,null,-1),M(" You may close this window and return to the app. ")])),_:1,__:[6]})])):(g(),C("div",aE,[_.value?(g(),C("div",lE,[w(nt,null,{default:O(()=>P[7]||(P[7]=[M(" Option 1: Purchase product ")])),_:1,__:[7]}),w(rt,null,{default:O(()=>[M(" Buy a copy of "+j(p.value.name)+" for ",1),H("strong",null,j(b(Jt)(p.value.defaultVariation.price[b(E)],b(E))),1),P[8]||(P[8]=M(". "))]),_:1,__:[8]}),H("span",uE,[w(st,{label:"Purchase",variant:"primary",handler:()=>L()},null,8,["handler"])])])):fe("",!0),b(n)?!b(n).ownedProducts||!((A=b(n).ownedProducts)!=null&&A.includes(b(i).product.id))&&!b(n).subscribedProducts||!((oe=b(n).subscribedProducts)!=null&&oe.includes(b(i).product.id))?(g(),C("div",fE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[10]||(P[10]=[M(" You don't own any licenses for this product. ")])),_:1,__:[10]})])):(ke=b(n).ownedProducts)!=null&&ke.includes(b(i).product.id)||(k=b(n).subscribedProducts)!=null&&k.includes(b(i).product.id)?(g(),C("div",hE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[11]||(P[11]=[M(" You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ")])),_:1,__:[11]}),H("span",pE,[w(st,{label:"Licenses",variant:"secondary",handler:()=>z()},null,8,["handler"])])])):fe("",!0):(g(),C("div",cE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"2":"1")+": Use license ",1)]),_:1}),w(rt,null,{default:O(()=>P[9]||(P[9]=[M(" Please sign in to use a license for this product. ")])),_:1,__:[9]}),H("span",dE,[w(st,{label:"Sign in",variant:"secondary",handler:()=>B()},null,8,["handler"])])])),b(i).trialEligibility?(g(),C("div",mE,[w(nt,null,{default:O(()=>[M(" Option "+j(_.value?"3":"2")+": Start trial ",1)]),_:1}),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(g(),Y(rt,{key:0},{default:O(()=>P[12]||(P[12]=[M(" You need to be signed in to start a trial for this product. ")])),_:1,__:[12]})):b(i).trialEligibility.eligible&&b(i).trialEligibility.existing?(g(),Y(rt,{key:1},{default:O(()=>[M(" You are eligible for a "+j(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial of which you have "+j(b(i).trialEligibility.numberOfDaysRemaining)+" days remaining. ",1)]),_:1})):b(i).trialEligibility.eligible?(g(),Y(rt,{key:2},{default:O(()=>[M(" You are eligible for a "+j(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial. ",1)]),_:1})):(g(),Y(rt,{key:3},{default:O(()=>P[13]||(P[13]=[M(" This device or product is not eligible for a trial. ")])),_:1,__:[13]})),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(g(),C("span",bE,[w(st,{label:"Sign in",variant:"secondary",handler:()=>B()},null,8,["handler"])])):b(i).trialEligibility.eligible?(g(),C("span",gE,[w(st,{label:"Start trial",variant:"secondary",handler:b(f)},null,8,["handler"])])):fe("",!0)])):fe("",!0),P[15]||(P[15]=H("div",{class:"moonbase:grow"},null,-1)),w(Le,{class:"moonbase:auto-activation-redeem"},{default:O(()=>[P[14]||(P[14]=M(" Have a voucher code? ")),H("button",{type:"button",onClick:D}," Redeem now ")]),_:1,__:[14]})]))])):(g(),C("div",nE,[w(nt,null,{default:O(()=>P[1]||(P[1]=[M(" Uh oh ")])),_:1,__:[1]}),w(rt,null,{default:O(()=>P[2]||(P[2]=[M(" Could not find activation request ")])),_:1,__:[2]})]))])}}}),yE={},_E={class:"moonbase:text-caption"};function wE(e,t){return g(),C("span",_E,[St(e.$slots,"default")])}const Mr=tr(yE,[["render",wE]]),EE=["data-corners"],xE=["accept"],kE={"data-error":""},OE=pe({__name:"DeviceTokenInput",props:{error:{}},emits:["input","error"],setup(e,{emit:t}){const n=t,r=ve(Et),o=V(!1),s=se(()=>{let u=".dt";return r!=null&&r.value&&(u=r.value.activation.deviceTokenFileExtension),u.startsWith(".")?u:`.${u}`});function i(u){const c=new FileReader;c.onload=d=>{var f;n("input",(f=d.target)==null?void 0:f.result)},c.readAsText(u)}function a(u){var d;o.value=!1;const c=(d=u.dataTransfer)==null?void 0:d.files;if(!c||c.length!==1){n("error",new Error("Only one file can be uploaded at a time!"));return}i(c[0])}function l(u){const c=u.target,d=c==null?void 0:c.files;if(!d||d.length!==1){n("error",new Error("Only one file can be uploaded at a time!"));return}i(d[0])}return(u,c)=>{var d,f;return g(),C("div",{class:Ss(["moonbase:device-token-input",{"moonbase:device-token-input--hovering":o.value}]),"data-corners":(d=b(r))==null?void 0:d.theme.corners,onDrag:c[0]||(c[0]=Cr(()=>{},["prevent","stop"])),onDragstart:c[1]||(c[1]=Cr(()=>{},["prevent","stop"])),onDragend:c[2]||(c[2]=Cr(h=>o.value=!1,["prevent","stop"])),onDragover:c[3]||(c[3]=Cr(h=>o.value=!0,["prevent","stop"])),onDragenter:c[4]||(c[4]=Cr(h=>o.value=!0,["prevent","stop"])),onDragleave:c[5]||(c[5]=Cr(h=>o.value=!1,["prevent","stop"])),onDrop:Cr(a,["prevent","stop"])},[w(b(r_)),c[6]||(c[6]=H("label",{for:"fallback-input"},[H("span",{class:"moonbase:underline"},"Choose a machine file"),M(" or drag here to upload ")],-1)),H("input",{id:"fallback-input",type:"file",accept:s.value,class:"moonbase:sr-only",onChange:l},null,40,xE),H("p",kE,j((f=u.error)==null?void 0:f.message),1)],42,EE)}}}),SE={class:"moonbase:manual-activation"},NE={key:1,class:"moonbase:loader"},CE={key:2,class:"moonbase:manual-activation-content"},TE=pe({__name:"ManualActivation",setup(e){const t=ve(Et),{activateProduct:n}=io(),r=Ii.Offline,o=V(0),s=V(null),i=V(null);async function a(l){o.value=1;try{i.value=await n(l,r),o.value=2}catch(u){s.value=u,o.value=0}}return(l,u)=>(g(),C("div",SE,[w(rt,null,{default:O(()=>u[2]||(u[2]=[M(" Upload your machine file here to get a license file for activating offline devices. The machine file can be generated in the installed app. ")])),_:1,__:[2]}),w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[o.value===0?(g(),Y(OE,{key:0,error:s.value,onInput:u[0]||(u[0]=c=>a(c)),onError:u[1]||(u[1]=c=>s.value=c)},null,8,["error"])):o.value===1?(g(),C("div",NE,[w(Qt)])):o.value===2&&i.value?(g(),C("div",CE,[w(nt,null,{default:O(()=>u[3]||(u[3]=[M(" Success! ")])),_:1,__:[3]}),w(rt,null,{default:O(()=>u[4]||(u[4]=[M(" Your license can be downloaded below: ")])),_:1,__:[4]}),i.value.license.product?(g(),Y(Zp,{key:0,product:i.value.license.product},{description:O(()=>[w(Mr,null,{default:O(()=>[M(j(i.value.license.activeNumberOfActivations)+" of "+j(i.value.license.maxNumberOfActivations)+" devices activated ",1)]),_:1})]),default:O(()=>{var c;return[w(Wo,{href:i.value.url,target:"_blank",download:((c=b(t))==null?void 0:c.activation.licenseTokenFileName)??"license-file.mb",class:"moonbase:manual-activation-download-button"},{default:O(()=>[w(b(n_))]),_:1},8,["href","download"])]}),_:1},8,["product"])):fe("",!0),u[5]||(u[5]=H("div",null,null,-1)),u[6]||(u[6]=H("div",null,null,-1))])):fe("",!0)]),_:1})]))}}),PE={class:"moonbase:activation"},$E=pe({__name:"Activation",setup(e){const t=Ae();return(n,r)=>(g(),C("div",PE,[b(t).getParameter("token")?(g(),Y(vE,{key:0})):(g(),Y(TE,{key:1}))]))}}),AE=["disabled"],Yp=Symbol("form-state"),ir=pe({__name:"MoonForm",props:{handler:{type:Function},disabled:{type:Boolean},noReset:{type:Boolean}},setup(e){const t=e,n=V(!1),r=V(!1),o=V(!1),s=se(()=>t.disabled||n.value||r.value||!1);Bt(Yp,{working:n,isSuccess:r,isError:o,disabled:s});async function i(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await Ht(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await Ht(2500),o.value=!1}}return(a,l)=>(g(),C("form",{disabled:s.value,onSubmit:Cr(i,["prevent"])},[St(a.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,AE))}}),DE=["hidden"],IE=["for"],ME=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby","data-corners"],VE=["id"],RE=["id"],Pt=pe({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){const t=ve(Et);return(n,r)=>{var o;return g(),C("div",{class:"moonbase:input",hidden:n.hidden||void 0},[H("label",{for:`mb-${n.name}`},j(n.label),9,IE),H("input",ru({id:`mb-${n.name}`,type:n.type??"text",name:`mb-${n.name}`,placeholder:n.placeholder,value:n.modelValue,disabled:n.disabled,"aria-invalid":!!n.error,"aria-describedby":n.error?`mb-${n.name}-error`:n.hint?`mb-${n.name}-hint`:void 0,"data-corners":(o=b(t))==null?void 0:o.theme.corners},n.$attrs,{onInput:r[0]||(r[0]=s=>{var i;return n.$emit("update:modelValue",(i=s.target)==null?void 0:i.value)})}),null,16,ME),n.error?(g(),C("p",{key:0,id:`mb-${n.name}-error`,class:"moonbase:input-hint","data-type":"error"},j(n.error),9,VE)):n.hint?(g(),C("p",{key:1,id:`mb-${n.name}-hint`,class:"moonbase:input-hint"},j(n.hint),9,RE)):fe("",!0)],8,DE)}}}),ar=pe({__name:"MoonSubmitButton",props:{label:{},success:{},error:{},variant:{},size:{}},setup(e){const{working:t,isSuccess:n,isError:r,disabled:o}=ve(Yp);return(s,i)=>(g(),Y(tc,{label:s.label,working:b(t),"success-label":s.success,success:b(n),"error-label":s.error,error:b(r),type:"submit",disabled:b(o),variant:s.variant,size:s.size},null,8,["label","working","success-label","success","error-label","error","disabled","variant","size"]))}}),LE=["data-visible"],jE={class:"moonbase:sign-in-actions"},FE=["data-corners"],UE=pe({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=ve(Et),i=ve(Lr),a=V(r.getParameter("email")??""),l=V(""),u=V(null);async function c(){u.value=null;try{const d=await o.signIn(a.value,l.value);i==null||i(qt.SignedIn,{user:d}),Ht(1500).then(()=>n("signedIn",d))}catch(d){throw d instanceof br?u.value="User not found":u.value=d.message,d}}return(d,f)=>(g(),Y(ir,{handler:c,class:"moonbase:sign-in"},{default:O(()=>{var h,p,_;return[w(Pt,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=E=>a.value=E),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=E=>l.value=E),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),H("span",{class:"moonbase:error","data-visible":!!u.value||void 0},j(u.value),9,LE),w(ar,{success:"Signed in",label:"Sign in",error:"Error"}),H("div",jE,[(h=b(s))!=null&&h.auth.signUp.enabled?(g(),Y(st,{key:0,label:"Create account",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).SignUp,{email:a.value})},null,8,["handler"])):fe("",!0),w(st,{label:"Forgot password",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).ForgotPassword,{email:a.value})},null,8,["handler"])]),(p=b(s))!=null&&p.auth.signIn.hint?(g(),C("div",{key:0,class:"moonbase:sign-in-hint","data-corners":(_=b(s))==null?void 0:_.theme.corners},[w(b(s_)),w(Le,null,{default:O(()=>[M(j(b(s).auth.signIn.hint),1)]),_:1})],8,FE)):fe("",!0)]}),_:1}))}}),rs=[{title:"Password must be at least 6 characters long",test:e=>e.length>=6},{title:"Password must contain uppercase letters",test:e=>/[A-Z]/.test(e)},{title:"Password must contain lowercase letters",test:e=>/[a-z]/.test(e)},{title:"Password must contain at least one number",test:e=>/\d/.test(e)},{title:"Password must contain at least one special character",test:e=>/[=+\-^$*.[\\\]{}()?!@#%&/,><':;|_~`]/.test(e)}],BE={key:0,class:"moonbase:loader"},HE={key:1,class:"moonbase:error","data-visible":""},qE={key:0,class:"moonbase:password-validation"},zE=["data-visible"],WE=pe({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=V(!0),i=V(null),a=V(""),l=V(!1),u=V(null),c=se(()=>rs.some(f=>!f.test(a.value)));He(async()=>{try{const f=r.getParameter("email"),h=r.getParameter("code");if(!f||!h)throw new Error("Link is broken");i.value=await o.confirmAccount(f,h)}catch(f){f instanceof br?u.value="Could not find a user to confirm":u.value=f.message}s.value=!1});async function d(){var f,h;if(u.value=null,!!((f=i.value)!=null&&f.resetPasswordToken))try{const p=r.getParameter("email");await o.resetPassword(p,a.value,(h=i.value)==null?void 0:h.resetPasswordToken);const _=await o.signIn(p,a.value);Ht(1500).then(()=>n("confirmedAccount",_))}catch(p){throw u.value=p.message,p}}return(f,h)=>(g(),Y(ir,{handler:d,disabled:c.value,class:"moonbase:confirm-account"},{default:O(()=>[s.value?(g(),C("div",BE,[w(Qt)])):i.value?(g(),C($e,{key:2},[H("h3",null," Hi "+j(i.value.name)+", ",1),h[2]||(h[2]=H("p",null," Please create a new password for your account: ",-1)),w(Pt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),w(Pt,{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=p=>a.value=p),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:h[1]||(h[1]=p=>l.value=!0)},null,8,["modelValue"]),l.value&&c.value?(g(),C("div",qE,[(g(!0),C($e,null,_t(b(rs).filter(p=>!p.test(a.value)),p=>(g(),Y(Le,{key:p.title,"data-error":""},{default:O(()=>[M(j(p.title),1)]),_:2},1024))),128))])):fe("",!0),w(ar,{success:"Password saved",label:"Save password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!u.value||void 0},j(u.value),9,zE)],64)):(g(),C("div",HE,j(u.value),1))]),_:1},8,["disabled"]))}}),ZE={class:"moonbase:confirm-email-change"},YE={key:0,class:"moonbase:loader"},GE={key:1,class:"moonbase:error","data-visible":""},KE=pe({__name:"ConfirmEmail",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ae(),{user:o,confirmEmail:s}=tt(),i=V(!0),a=V(null);return He(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),Ht(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>(g(),C("div",ZE,[i.value?(g(),C("div",YE,[w(Qt)])):a.value?(g(),C("div",GE,j(a.value),1)):(g(),C($e,{key:2},[w(nt,null,{default:O(()=>u[0]||(u[0]=[M(" Success! ")])),_:1,__:[0]}),u[1]||(u[1]=H("p",null," Thanks for confirming your new email. ",-1)),b(o)?(g(),Y(st,{key:0,handler:()=>b(r).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0),label:"Continue"},null,8,["handler"])):fe("",!0)],64))]))}}),XE={class:"moonbase:confirm-email-change"},JE={key:0,class:"moonbase:loader"},QE={key:1,class:"moonbase:error","data-visible":""},e5=pe({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ae(),{user:o,confirmEmailChange:s}=tt(),i=V(!0),a=V(null);return He(async()=>{try{const l=r.getParameter("email"),u=r.getParameter("code");if(!l||!u)throw new Error("Link is broken");await s(l,u),Ht(1500).then(()=>n("confirmed"))}catch(l){a.value=l.message}i.value=!1}),(l,u)=>{var c;return g(),C("div",XE,[i.value?(g(),C("div",JE,[w(Qt)])):a.value?(g(),C("div",QE,j(a.value),1)):(g(),C($e,{key:2},[H("h3",null," Hi "+j((c=b(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=H("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}}),t5=["data-visible"],n5=pe({__name:"ForgotPassword",setup(e){const t=Ae(),n=tt(),r=V(t.getParameter("email")??""),o=V(null),s=V(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Ht(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof br?o.value="User not found":o.value=a.message,a}}return(a,l)=>(g(),Y(ir,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:O(({disabled:u})=>[l[1]||(l[1]=H("p",null," Please enter your email address below. You will receive an email message with instructions on how to reset your password. ",-1)),w(Pt,{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"]),w(ar,{success:"Email sent",label:"Reset password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!o.value||void 0},j(o.value),9,t5)]),_:1,__:[1]}))}}),r5={key:0,class:"moonbase:password-validation"},o5=["data-visible"],s5=pe({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=se(()=>r.getParameter("email")),i=V(""),a=V(!1),l=V(null),u=se(()=>rs.some(d=>!d.test(i.value)));He(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(l.value="Link broken, please try again")});async function c(){l.value=null;const d=r.getParameter("code");if(d)try{await o.resetPassword(s.value,i.value,d);const f=await o.signIn(s.value,i.value);Ht(1500).then(()=>n("passwordReset",f))}catch(f){throw l.value=f.message,f}}return(d,f)=>(g(),Y(ir,{handler:c,disabled:u.value,class:"moonbase:reset-password"},{default:O(()=>[H("h3",null," Hi "+j(s.value)+", ",1),f[2]||(f[2]=H("p",null," Please create a new password for your account: ",-1)),w(Pt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),w(Pt,{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=h=>i.value=h),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:f[1]||(f[1]=h=>a.value=!0)},null,8,["modelValue"]),a.value&&u.value?(g(),C("div",r5,[(g(!0),C($e,null,_t(b(rs).filter(h=>!h.test(i.value)),h=>(g(),Y(Le,{key:h.title,"data-error":""},{default:O(()=>[M(j(h.title),1)]),_:2},1024))),128))])):fe("",!0),w(ar,{success:"Password saved",label:"Save password",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!l.value||void 0},j(l.value),9,o5)]),_:1,__:[2]},8,["disabled"]))}}),i5={class:"moonbase:checkbox"},a5={class:"moonbase:checkbox-container"},l5=["id","name","checked","disabled","aria-invalid","aria-describedby"],u5={class:"moonbase:checkbox-description"},c5=["for"],d5=["id"],f5=["id"],Gp=pe({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(g(),C("div",i5,[H("div",a5,[H("input",ru({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,checked: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,{onChange:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,l5)]),H("div",u5,[H("label",{for:`mb-${t.name}`},j(t.label),9,c5),t.error?(g(),C("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},j(t.error),9,d5)):t.hint?(g(),C("p",{key:1,id:`mb-${t.name}-hint`},j(t.hint),9,f5)):fe("",!0)])]))}}),h5={key:0,class:"moonbase:password-validation"},p5=["href"],m5=["href"],b5=["data-visible"],g5=pe({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ae(),o=tt(),s=ve(sc),i=ve(Lr),a=V(""),l=V(r.getParameter("email")??""),u=V(""),c=V(!1),d=V(!1),f=V(null),h=se(()=>rs.some(_=>!_.test(u.value)));async function p(){f.value=null;try{const _=await o.signUp(a.value,l.value,u.value,null,!0,!0,d.value);i==null||i(qt.SignedUp,{user:_}),Ht(1500).then(()=>n("signedUp",_))}catch(_){throw f.value=_.message,_}}return(_,E)=>(g(),Y(ir,{handler:p,disabled:h.value,class:"moonbase:sign-up"},{default:O(()=>[w(Pt,{modelValue:a.value,"onUpdate:modelValue":E[0]||(E[0]=N=>a.value=N),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=N=>l.value=N),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),w(Pt,{modelValue:u.value,"onUpdate:modelValue":E[2]||(E[2]=N=>u.value=N),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:"",onBlur:E[3]||(E[3]=N=>c.value=!0)},null,8,["modelValue"]),c.value&&h.value?(g(),C("div",h5,[(g(!0),C($e,null,_t(b(rs).filter(N=>!N.test(u.value)),N=>(g(),Y(Le,{key:N.title,"data-error":""},{default:O(()=>[M(j(N.title),1)]),_:2},1024))),128))])):fe("",!0),w(Gp,{modelValue:d.value,"onUpdate:modelValue":E[4]||(E[4]=N=>d.value=N),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),w(Le,null,{default:O(()=>[E[5]||(E[5]=M(" By signing up, you accept our ")),H("a",{href:`${b(s)}/terms-of-use`,target:"_blank",rel:"noopener"},"terms",8,p5),E[6]||(E[6]=M(" and ")),H("a",{href:`${b(s)}/privacy-policy`,target:"_blank",rel:"noopener"},"privacy policy",8,m5),E[7]||(E[7]=M(". "))]),_:1,__:[5,6,7]}),w(ar,{success:"Signed up",label:"Sign up",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!f.value||void 0},j(f.value),9,b5),w(st,{label:"I already have an account",variant:"subtle",handler:()=>b(r).show(b(ue).Authentication,b(Q).SignIn,{email:l.value})},null,8,["handler"])]),_:1},8,["disabled"]))}}),v5={class:"moonbase:authentication"},y5={key:0,class:"moonbase:loader"},_5=pe({__name:"Authentication",setup(e){const t=Ae(),{loaded:n}=tt();return(r,o)=>(g(),C("div",v5,[w(Ks,{name:b(t).direction===b(yu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:O(()=>[b(n)?b(t).intent===b(Q).SignIn?(g(),Y(UE,{key:1,onSignedIn:o[0]||(o[0]=s=>b(t).dequeue())})):b(t).intent===b(Q).SignUp?(g(),Y(g5,{key:2,onSignedUp:o[1]||(o[1]=s=>b(t).next?b(t).dequeue():b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0))})):b(t).intent===b(Q).ConfirmAccount?(g(),Y(WE,{key:3,onConfirmedAccount:o[2]||(o[2]=s=>b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0,!0))})):b(t).intent===b(Q).ConfirmEmail?(g(),Y(KE,{key:4})):b(t).intent===b(Q).ConfirmEmailChange?(g(),Y(e5,{key:5})):b(t).intent===b(Q).ForgotPassword?(g(),Y(n5,{key:6})):b(t).intent===b(Q).ResetPassword?(g(),Y(s5,{key:7,onPasswordReset:o[3]||(o[3]=s=>b(t).show(b(ue).Customer,b(Q).ViewAccount,void 0))})):fe("",!0):(g(),C("div",y5,[w(Qt)]))]),_:1},8,["name"])]))}}),w5={},E5={class:"moonbase:text-subtext-bold"};function x5(e,t){return g(),C("span",E5,[St(e.$slots,"default")])}const $t=tr(w5,[["render",x5]]);function nc(){const e=ve(Gt);return e||console.warn("No storefront injectable"),{reportProblem:async(t,n)=>{try{await(e==null?void 0:e.client.api.fetch(`/api/customer/insights/${t}`,null,{method:"POST",body:{origin:window==null?void 0:window.location.href,...n}}))}catch{}}}}const k5=["data-corners","data-cards"],Kp=pe({__name:"Counter",props:{modelValue:{}},emits:["update:modelValue"],setup(e){const t=ve(Et);return(n,r)=>{var o,s;return g(),C("div",{class:"moonbase:counter","data-corners":(o=b(t))==null?void 0:o.theme.corners,"data-cards":(s=b(t))==null?void 0:s.theme.cards},[H("button",{onClick:r[0]||(r[0]=i=>n.$emit("update:modelValue",n.modelValue-1))},[w(b(i_))]),w(Le,null,{default:O(()=>[M(j(n.modelValue.toString().padStart(2,"0")),1)]),_:1}),H("button",{onClick:r[1]||(r[1]=i=>n.$emit("update:modelValue",n.modelValue+1))},[w(b(a_))])],8,k5)}}});function rc(e){switch(e){case pr.Daily:return"day";case pr.Weekly:return"week";case pr.Monthly:return"month";case pr.Quarterly:return"quarter";case pr.Yearly:return"year"}throw new Error("Unknown cycle length")}const O5={class:"moonbase:bundle-cart-item-content"},S5={key:0,class:"moonbase:bundle-cart-item-total"},N5={key:0,class:"moonbase:discount"},C5={class:"moonbase:bundle-cart-item-summary"},T5=["data-open"],P5=["data-open"],$5={class:"moonbase:bundle-cart-item-product-list-item-content"},A5={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},D5=pe({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const n=_a(e.lineItem.bundleId),r=ve(Et),o=Tr(),s=V(!1),i=V(null);return Je(s,a=>{i.value&&(i.value.style.height=a?`${i.value.scrollHeight}px`:"0px")}),(a,l)=>(g(),Y(kn,{class:"moonbase:bundle-cart-item"},{addon:O(()=>{var u;return[H("div",C5,[a.lineItem.bundle?(g(),C("button",{key:0,onClick:l[1]||(l[1]=c=>s.value=!s.value)},[w($t,null,{default:O(()=>{var c,d,f;return[M(j((c=a.lineItem.bundle)==null?void 0:c.products.filter(h=>h.included).length)+" ",1),(d=a.lineItem.bundle)!=null&&d.products.some(h=>!h.included)?(g(),C($e,{key:0},[M(" of "+j((f=a.lineItem.bundle)==null?void 0:f.products.length),1)],64)):fe("",!0),l[2]||(l[2]=M(" products "))]}),_:1,__:[2]}),w(Le,null,{default:O(()=>[M(j(s.value?"Hide":"Show")+" ",1),(g(),C("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},l[3]||(l[3]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,T5))]),_:1})])):fe("",!0)]),H("div",{ref_key:"productListRef",ref:i,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(g(!0),C($e,null,_t(((u=a.lineItem.bundle)==null?void 0:u.products)||[],c=>(g(),C("div",{key:c.id,class:"moonbase:bundle-cart-item-product-list-item"},[w(en,{url:c==null?void 0:c.iconUrl,size:48},null,8,["url"]),H("div",$5,[w($t,{"data-included":c.included||void 0},{default:O(()=>[c.included?(g(),C("svg",A5,l[4]||(l[4]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):fe("",!0),M(" "+j(c==null?void 0:c.name),1)]),_:2},1032,["data-included"]),c.included?c!=null&&c.tagline?(g(),Y(Le,{key:1},{default:O(()=>[M(j(c.tagline),1)]),_:2},1024)):fe("",!0):(g(),Y(Le,{key:0},{default:O(()=>l[5]||(l[5]=[M(" You already own this ")])),_:1,__:[5]}))])]))),128))],8,P5)]}),default:O(()=>{var u,c,d,f,h,p;return[w(en,{url:(u=a.lineItem.bundle)==null?void 0:u.iconUrl,size:72},null,8,["url"]),H("div",O5,[w($t,null,{default:O(()=>{var _;return[M(j((_=a.lineItem.bundle)==null?void 0:_.name),1)]}),_:1}),w(Le,{class:"moonbase:bundle-cart-item-tagline","data-truncate":a.lineItem.variation&&a.lineItem.variation.id!==((d=(c=b(n))==null?void 0:c.defaultVariation)==null?void 0:d.id)||void 0},{default:O(()=>{var _;return[M(j((_=a.lineItem.bundle)==null?void 0:_.tagline),1)]}),_:1},8,["data-truncate"]),a.lineItem.variation&&a.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)?(g(),Y(Le,{key:0,class:"moonbase:bundle-cart-item-variation"},{default:O(()=>[M(j(a.lineItem.variation.name),1)]),_:1})):fe("",!0)]),a.lineItem.variation?(g(),C("div",S5,[w(ci,null,{default:O(()=>{var _;return[a.lineItem.variation.hasDiscount?(g(),C("span",N5,j(b(Jt)(a.lineItem.variation.originalPrice[a.currency]*a.lineItem.quantity,a.currency)),1)):fe("",!0),M(" "+j(b(Jt)(a.lineItem.variation.price[a.currency]*a.lineItem.quantity,a.currency))+" ",1),((_=a.lineItem.variation)==null?void 0:_.recurrence.type)==="Recurring"?(g(),Y(rt,{key:1},{default:O(()=>[M(" / "+j(b(rc)(a.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):fe("",!0)]}),_:1}),((p=b(r))==null?void 0:p.cart.quantity)==="selectable"?(g(),Y(Kp,{key:0,"model-value":a.lineItem.quantity,"onUpdate:modelValue":l[0]||(l[0]=_=>b(o).setQuantity(a.lineItem,_))},null,8,["model-value"])):(g(),Y(st,{key:1,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(a.lineItem,0)},null,8,["handler"]))])):fe("",!0)]}),_:1}))}}),I5={class:"moonbase:product-cart-item-content"},M5={class:"moonbase:product-cart-item-total"},V5={key:0,class:"moonbase:discount"},R5=pe({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=Qs(t.lineItem.productId),r=ve(Et);function o(l){var c;if(!l.variation)throw new Error("No variation found");const u=i(l);return(u==null?void 0:u.price[t.currency])??((c=l.variation)==null?void 0:c.price[t.currency])}function s(l){return!!i(l)}function i(l){var c,d;const u=((d=(c=l.variation)==null?void 0:c.pricingTiers)==null?void 0:d.filter(f=>l.quantity>=f.minQuantity))??[];return u.length>0?u[u.length-1]:null}const a=Tr();return(l,u)=>(g(),Y(kn,{class:"moonbase:product-cart-item"},{default:O(()=>{var c,d,f,h,p,_;return[w(en,{url:(c=l.lineItem.product)==null?void 0:c.iconUrl,size:72},null,8,["url"]),H("div",I5,[w($t,null,{default:O(()=>{var E;return[M(j((E=l.lineItem.product)==null?void 0:E.name),1)]}),_:1}),w(Le,{class:"moonbase:product-cart-item-tagline","data-truncate":l.lineItem.variation&&l.lineItem.variation.id!==((f=(d=b(n))==null?void 0:d.defaultVariation)==null?void 0:f.id)||void 0},{default:O(()=>{var E;return[M(j((E=l.lineItem.product)==null?void 0:E.tagline),1)]}),_:1},8,["data-truncate"]),l.lineItem.variation&&l.lineItem.variation.id!==((p=(h=b(n))==null?void 0:h.defaultVariation)==null?void 0:p.id)?(g(),Y(Le,{key:0,class:"moonbase:product-cart-item-variation"},{default:O(()=>[M(j(l.lineItem.variation.name),1)]),_:1})):fe("",!0)]),H("div",M5,[l.lineItem.variation?(g(),Y(ci,{key:0},{default:O(()=>{var E;return[l.lineItem.variation.hasDiscount||s(l.lineItem)?(g(),C("span",V5,j(b(Jt)(l.lineItem.variation.originalPrice[l.currency]*l.lineItem.quantity,l.currency)),1)):fe("",!0),M(" "+j(b(Jt)(o(l.lineItem)*l.lineItem.quantity,l.currency))+" ",1),((E=l.lineItem.variation)==null?void 0:E.recurrence.type)==="Recurring"?(g(),Y(rt,{key:1},{default:O(()=>[M(" / "+j(b(rc)(l.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):fe("",!0)]}),_:1})):fe("",!0),((_=b(r))==null?void 0:_.cart.quantity)==="selectable"?(g(),Y(Kp,{key:1,"model-value":l.lineItem.quantity,"onUpdate:modelValue":u[0]||(u[0]=E=>b(a).setQuantity(l.lineItem,E))},null,8,["model-value"])):(g(),Y(st,{key:2,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(a).setQuantity(l.lineItem,0)},null,8,["handler"]))])]}),_:1}))}}),L5={class:"moonbase:cart"},j5=["data-background"],F5=["data-corners"],U5={class:"moonbase:cart-total"},B5={"data-error":""},H5=pe({__name:"Cart",setup(e){const t=nc(),{items:n,total:r,currency:o,checkout:s}=Tr(),i=ve(Et),a=V(null);async function l(){a.value=null;try{const u=await s({redirect:(i==null?void 0:i.value.checkout.redirect)??!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`});if(!(u!=null&&u.completed))throw new Ha}catch(u){if(a.value=u.message,!(u instanceof Ha))if(u instanceof Tn)t.reportProblem("error",{type:u.name,title:u.title,detail:u.detail,status:u.status,errors:u.errors?Object.fromEntries(Object.entries(u.errors).map(([c,d])=>[c,[d]])):void 0,instance:"Cart.vue:startCheckout"});else{const c=u;t.reportProblem("error",{type:c.name,title:c.message,instance:"Cart.vue:startCheckout"})}throw u}}return(u,c)=>{var d,f;return g(),C("div",L5,[b(n).length>0?(g(),C("ul",{key:0,role:"list",class:"moonbase:cart-items","data-background":(d=b(i))==null?void 0:d.theme.colors.background},[(g(!0),C($e,null,_t(b(n),h=>(g(),C("li",{key:h.id},[h.type==="Product"?(g(),Y(R5,{key:0,"line-item":h,currency:b(o)},null,8,["line-item","currency"])):h.type==="Bundle"?(g(),Y(D5,{key:1,"line-item":h,currency:b(o)},null,8,["line-item","currency"])):fe("",!0)]))),128))],8,j5)):(g(),C("div",{key:1,class:"moonbase:cart-empty","data-corners":(f=b(i))==null?void 0:f.theme.corners},[w(b(l_)),w($t,null,{default:O(()=>c[0]||(c[0]=[M(" Your cart is empty ")])),_:1,__:[0]})],8,F5)),H("div",U5,[c[1]||(c[1]=H("label",null," Total ",-1)),H("span",null,j(b(Jt)(b(r).amount,b(r).currency)),1),c[2]||(c[2]=H("p",null," Sales tax to be calculated at checkout ",-1)),H("p",B5,j(a.value),1)]),w(st,{handler:l,disabled:b(n).length===0,label:"Checkout",error:a.value?"Error":"Cancelled",variant:"primary"},null,8,["disabled","error"])])}}}),q5={class:"moonbase:account"},z5={key:0,class:"moonbase:error"},W5={key:1,class:"moonbase:notification"},Z5={key:0,class:"moonbase:error"},Y5=pe({__name:"Account",setup(e){var q,z,B;const t=Ae(),{user:n,update:r,setPassword:o,signOut:s}=tt(),i=ve(Lr),a=V(((q=n.value)==null?void 0:q.name)??""),l=V(((z=n.value)==null?void 0:z.email)??""),u=V(((B=n.value)==null?void 0:B.communicationPreferences)??{newsletterOptIn:!1}),c=V(null),d=V(!1),f=V(""),h=V(""),p=V(null);async function _(){c.value=null,d.value=!1;try{(await r(a.value,l.value,void 0,u.value)).needsEmailConfirmationToken&&(d.value=!0)}catch(L){throw c.value=L,L}}async function E(){p.value=null;try{await o(f.value,h.value),f.value="",h.value=""}catch(L){throw p.value=L,L}}async function N(){const L={...n.value};await s(),i==null||i(qt.SignedOut,{user:L}),t.reset()}return(L,D)=>(g(),C("div",q5,[w(ir,{handler:_},{default:O(()=>[w(Pt,{modelValue:a.value,"onUpdate:modelValue":D[0]||(D[0]=m=>a.value=m),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),w(Pt,{modelValue:l.value,"onUpdate:modelValue":D[1]||(D[1]=m=>l.value=m),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),w(Gp,{modelValue:u.value.newsletterOptIn,"onUpdate:modelValue":D[2]||(D[2]=m=>u.value.newsletterOptIn=m),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),w(ar,{label:"Update",error:"Error",success:"Updated"}),c.value?(g(),C("p",z5,j(c.value.message),1)):d.value?(g(),C("p",W5," You need to confirm your new email address, please check your inbox ")):fe("",!0)]),_:1}),w(ir,{handler:E},{default:O(()=>[w(Pt,{modelValue:f.value,"onUpdate:modelValue":D[3]||(D[3]=m=>f.value=m),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),w(Pt,{modelValue:h.value,"onUpdate:modelValue":D[4]||(D[4]=m=>h.value=m),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),w(ar,{label:"Change password",error:"Error",success:"Password changed"}),p.value?(g(),C("p",Z5,j(p.value.message),1)):fe("",!0)]),_:1}),w(st,{label:"Log out",success:"Logged out",error:"Error",variant:"subtle",handler:N})]))}}),G5={class:"moonbase:products"},K5={key:0,class:"moonbase:loader"},X5={key:1,class:"moonbase:loader"},J5={class:"moonbase:products-item-content"},Q5=pe({__name:"Products",setup(e){const t=Ae(),{getProducts:n}=io(),r=V(null);return He(async()=>{let o=await n();for(r.value=o.items;o.hasMore&&o.next;)o=await n(o.next),r.value.push(...o.items)}),(o,s)=>(g(),C("div",G5,[r.value?r.value.length===0?(g(),C("div",X5," No products found ")):fe("",!0):(g(),C("div",K5,[w(Qt),s[0]||(s[0]=M(" Loading products.. "))])),(g(!0),C($e,null,_t(r.value||[],i=>(g(),C("div",{key:i.id,class:"moonbase:products-item"},[w(en,{url:i.iconUrl,size:48},null,8,["url"]),H("div",J5,[w($t,null,{default:O(()=>[M(j(i.name),1)]),_:2},1024),i.numberOfLicenses||i.subscriptionLicenses?(g(),Y(Le,{key:0},{default:O(()=>[M(j((i.numberOfLicenses??0)+(i.subscriptionLicenses??0))+" licenses ",1)]),_:2},1024)):fe("",!0)]),H("div",null,[w(Wo,{variant:"subtle",onClick:a=>b(t).show(b(ue).Product,b(Q).ViewProduct,{product_id:i.id})},{default:O(()=>[w(b(np)),s[1]||(s[1]=H("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])]))),128))]))}}),ex={class:"moonbase:bundle-redemption-item-content"},tx={class:"moonbase:bundle-redemption-item-summary"},nx=["data-open"],rx=["data-open"],Xp=pe({__name:"BundleRedemptionItem",props:{bundle:{},quantity:{}},setup(e){const t=V(!1),n=V(null);return Je(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>(g(),Y(kn,{class:"moonbase:bundle-redemption-item"},{addon:O(()=>{var s;return[H("div",tx,[r.bundle?(g(),C("button",{key:0,onClick:o[0]||(o[0]=i=>t.value=!t.value)},[w($t,null,{default:O(()=>{var i;return[M(j((i=r.bundle)==null?void 0:i.products.length)+" products ",1)]}),_:1}),w(Le,null,{default:O(()=>[M(j(t.value?"Hide":"Show")+" ",1),(g(),C("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[1]||(o[1]=[H("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,nx))]),_:1})])):fe("",!0)]),H("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-redemption-item-product-list",style:{height:"0px"},"data-open":t.value||void 0},[(g(!0),C($e,null,_t(((s=r.bundle)==null?void 0:s.products)||[],i=>(g(),C("div",{key:i.id},[w(en,{url:i.iconUrl,size:48},null,8,["url"]),H("div",null,[w($t,null,{default:O(()=>[M(j(i.name),1)]),_:2},1024),i.tagline?(g(),Y(Le,{key:0},{default:O(()=>[M(j(i.tagline),1)]),_:2},1024)):fe("",!0)])]))),128))],8,rx)]}),default:O(()=>[w(en,{url:r.bundle.iconUrl,size:72},null,8,["url"]),H("div",ex,[w($t,null,{default:O(()=>{var s;return[M(j((s=r.bundle)==null?void 0:s.name),1)]}),_:1}),w(Le,{class:"moonbase:bundle-redemption-item-tagline"},{default:O(()=>{var s;return[M(j((s=r.bundle)==null?void 0:s.tagline),1)]}),_:1})])]),_:1}))}}),ox={class:"moonbase:product-redemption-item-content"},Jp=pe({__name:"ProductRedemptionItem",props:{product:{},quantity:{}},setup(e){return(t,n)=>(g(),Y(kn,{class:"moonbase:product-redemption-item"},{default:O(()=>[w(en,{url:t.product.iconUrl,size:72},null,8,["url"]),H("div",ox,[w($t,null,{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.name),1)]}),_:1}),w(Le,{class:"moonbase:product-redemption-item-tagline"},{default:O(()=>{var r;return[M(j((r=t.product)==null?void 0:r.tagline),1)]}),_:1})])]),_:1}))}}),sx={class:"moonbase:redeem"},ix=["data-visible"],ax={key:1,class:"moonbase:redeem-voucher"},lx={key:0,class:"moonbase:redeem-voucher-content"},ux={key:1,class:"moonbase:redeem-voucher-return"},cx=pe({__name:"Redeem",setup(e){const{redeem:t}=dh(),n=Ae(),r=tt(),o=ve(Lr),s=V(null),i=V(null),a=V(n.getParameter("code")||"");async function l(){i.value=null;try{const u=await t(a.value);s.value=u,o==null||o(qt.RedeemedVoucher,{voucher:u,user:r.user.value})}catch(u){throw i.value=u,u}}return(u,c)=>(g(),C("div",sx,[w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[s.value?(g(),C("div",ax,[H("div",null,[w(ns,null,{default:O(()=>[M(j(s.value.name),1)]),_:1}),s.value.description?(g(),Y(nt,{key:0},{default:O(()=>[M(' "'+j(s.value.description)+'" ',1)]),_:1})):fe("",!0),w(Le,null,{default:O(()=>[w(b(Q1)),c[2]||(c[2]=M(" Licenses have been added to your account. "))]),_:1,__:[2]}),w(Le,null,{default:O(()=>[c[3]||(c[3]=M(" Code: ")),H("strong",null,j(s.value.code),1)]),_:1,__:[3]})]),w(nt,null,{default:O(()=>c[4]||(c[4]=[M(" Voucher summary ")])),_:1,__:[4]}),s.value.redeemsProducts.length>0||s.value.redeemsBundles.length>0?(g(),C("div",lx,[(g(!0),C($e,null,_t(s.value.redeemsProducts,({value:d,quantity:f})=>(g(),Y(Jp,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(g(!0),C($e,null,_t(s.value.redeemsBundles,({value:d,quantity:f})=>(g(),Y(Xp,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):fe("",!0),b(n).next&&b(n).next[0]===b(ue).Activation&&(s.value.redeemsProducts.some(d=>{var f,h;return d.value.id===((h=(f=b(n).next)==null?void 0:f[2])==null?void 0:h.product_id)})||s.value.redeemsBundles.some(d=>d.value.products.some(f=>{var h,p;return f.id===((p=(h=b(n).next)==null?void 0:h[2])==null?void 0:p.product_id)})))?(g(),C("div",ux,[w(st,{label:"Return to activation",variant:"primary",icon:b(J1),handler:()=>b(n).dequeue()},null,8,["icon","handler"])])):fe("",!0)])):(g(),Y(ir,{key:0,handler:l},{default:O(()=>{var d;return[w(rt,null,{default:O(()=>c[1]||(c[1]=[M(" Do you have a voucher you want to redeem? "),H("br",null,null,-1),M(" Please enter the code below: ")])),_:1,__:[1]}),w(Pt,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=f=>a.value=f),label:"Voucher code",name:"code",required:"",placeholder:"0000-0000-0000-0000"},null,8,["modelValue"]),w(ar,{label:"Redeem voucher",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!i.value||void 0},j((d=i.value)==null?void 0:d.message),9,ix)]}),_:1}))]),_:1})]))}}),Qp=6048e5,dx=864e5,qa=43200,em=1440,tm=Symbol.for("constructDateFrom");function lr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&tm in e?e[tm](t):e instanceof Date?new e.constructor(t):new Date(t)}function vt(e,t){return lr(t||e,e)}let fx={};function hi(){return fx}function pi(e,t){var a,l,u,c;const n=hi(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=vt(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function za(e,t){return pi(e,{...t,weekStartsOn:1})}function nm(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=lr(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=za(o),i=lr(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=za(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Wa(e){const t=vt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Za(e,...t){const n=lr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function rm(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function hx(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t),s=rm(r),i=rm(o),a=+s-Wa(s),l=+i-Wa(i);return Math.round((a-l)/dx)}function px(e,t){const n=nm(e,t),r=lr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),za(r)}function Ya(e,t){const n=+vt(e)-+vt(t);return n<0?-1:n>0?1:n}function mx(e){return lr(e,Date.now())}function bx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gx(e){return!(!bx(e)&&typeof e!="number"||isNaN(+vt(e)))}function vx(e,t,n){const[r,o]=Za(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function yx(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function _x(e,t){return+vt(e)-+vt(t)}function wx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Ex(e,t){const n=vt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function xx(e,t){const n=vt(e,t==null?void 0:t.in);return+wx(n,t)==+Ex(n,t)}function kx(e,t,n){const[r,o,s]=Za(n==null?void 0:n.in,e,e,t),i=Ya(o,s),a=Math.abs(vx(o,s));if(a<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*a);let l=Ya(o,s)===-i;xx(r)&&a===1&&Ya(r,s)===1&&(l=!1);const u=i*(a-+l);return u===0?0:u}function Ox(e,t,n){const r=_x(e,t)/1e3;return yx(n==null?void 0:n.roundingMethod)(r)}function Sx(e,t){const n=vt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Nx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Cx=(e,t,n)=>{let r;const o=Nx[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function oc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Tx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Px={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$x={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ax={date:oc({formats:Tx,defaultWidth:"full"}),time:oc({formats:Px,defaultWidth:"full"}),dateTime:oc({formats:$x,defaultWidth:"full"})},Dx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ix=(e,t,n,r)=>Dx[e];function mi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Mx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ux={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:mi({values:Mx,defaultWidth:"wide"}),quarter:mi({values:Vx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:Rx,defaultWidth:"wide"}),day:mi({values:Lx,defaultWidth:"wide"}),dayPeriod:mi({values:jx,defaultWidth:"wide",formattingValues:Fx,defaultFormattingWidth:"wide"})};function bi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Hx(a,d=>d.test(i)):Bx(a,d=>d.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(i.length);return{value:u,rest:c}}}function Bx(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Hx(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qx(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const zx=/^(\d+)(th|st|nd|rd)?/i,Wx=/\d+/i,Zx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yx={any:[/^b/i,/^(a|c)/i]},Gx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kx={any:[/1/i,/2/i,/3/i,/4/i]},Xx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ek={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},nk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rk={ordinalNumber:qx({matchPattern:zx,parsePattern:Wx,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:Zx,defaultMatchWidth:"wide",parsePatterns:Yx,defaultParseWidth:"any"}),quarter:bi({matchPatterns:Gx,defaultMatchWidth:"wide",parsePatterns:Kx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:Xx,defaultMatchWidth:"wide",parsePatterns:Jx,defaultParseWidth:"any"}),day:bi({matchPatterns:Qx,defaultMatchWidth:"wide",parsePatterns:ek,defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:tk,defaultMatchWidth:"any",parsePatterns:nk,defaultParseWidth:"any"})},om={code:"en-US",formatDistance:Cx,formatLong:Ax,formatRelative:Ix,localize:Ux,match:rk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ok(e,t){const n=vt(e,t==null?void 0:t.in);return hx(n,Sx(n))+1}function sk(e,t){const n=vt(e,t==null?void 0:t.in),r=+za(n)-+px(n);return Math.round(r/Qp)+1}function sm(e,t){var c,d,f,h;const n=vt(e,t==null?void 0:t.in),r=n.getFullYear(),o=hi(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=lr((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=pi(i,t),l=lr((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=pi(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function ik(e,t){var a,l,u,c;const n=hi(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=sm(e,t),s=lr((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),pi(s,t)}function ak(e,t){const n=vt(e,t==null?void 0:t.in),r=+pi(n,t)-+ik(n,t);return Math.round(r/Qp)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ge(o,t.length)}},os={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},im={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Vr.y(e,t)},Y:function(e,t,n,r){const o=sm(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Ge(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ge(s,t.length)},R:function(e,t){const n=nm(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ge(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ge(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ge(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ak(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=sk(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vr.d(e,t)},D:function(e,t,n){const r=ok(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ge(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ge(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ge(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=os.noon:r===0?o=os.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=os.evening:r>=12?o=os.afternoon:r>=4?o=os.morning:o=os.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vr.s(e,t)},S:function(e,t){return Vr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return lm(r);case"XXXX":case"XX":return bo(r);case"XXXXX":case"XXX":default:return bo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return lm(r);case"xxxx":case"xx":return bo(r);case"xxxxx":case"xxx":default:return bo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+am(r,":");case"OOOO":default:return"GMT"+bo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+am(r,":");case"zzzz":default:return"GMT"+bo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function am(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Ge(s,2)}function lm(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):bo(e,t)}function bo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ge(Math.trunc(r/60),2),s=Ge(r%60,2);return n+o+t+s}const um=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},cm=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},lk={p:cm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return um(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",um(r,t)).replace("{{time}}",cm(o,t))}},uk=/^D+$/,ck=/^Y+$/,dk=["D","DD","YY","YYYY"];function fk(e){return uk.test(e)}function hk(e){return ck.test(e)}function pk(e,t,n){const r=mk(e,t,n);if(console.warn(r),dk.includes(e))throw new RangeError(r)}function mk(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vk=/^'([^]*?)'?$/,yk=/''/g,_k=/[a-zA-Z]/;function wk(e,t,n){var c,d,f,h;const r=hi(),o=r.locale??om,s=r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=vt(e,n==null?void 0:n.in);if(!gx(a))throw new RangeError("Invalid time value");let l=t.match(gk).map(p=>{const _=p[0];if(_==="p"||_==="P"){const E=lk[_];return E(p,o.formatLong)}return p}).join("").match(bk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const _=p[0];if(_==="'")return{isToken:!1,value:Ek(p)};if(im[_])return{isToken:!0,value:p};if(_.match(_k))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const _=p.value;(hk(_)||fk(_))&&pk(_,t,String(e));const E=im[_[0]];return E(a,_,o.localize,u)}).join("")}function Ek(e){const t=e.match(vk);return t?t[1].replace(yk,"'"):e}function xk(e,t,n){const r=hi(),o=(n==null?void 0:n.locale)??r.locale??om,s=2520,i=Ya(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i}),[l,u]=Za(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=Ox(u,l),d=(Wa(u)-Wa(l))/1e3,f=Math.round((c-d)/60);let h;if(f<2)return n!=null&&n.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,a):c<10?o.formatDistance("lessThanXSeconds",10,a):c<20?o.formatDistance("lessThanXSeconds",20,a):c<40?o.formatDistance("halfAMinute",0,a):c<60?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",1,a):f===0?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",f,a);if(f<45)return o.formatDistance("xMinutes",f,a);if(f<90)return o.formatDistance("aboutXHours",1,a);if(f<em){const p=Math.round(f/60);return o.formatDistance("aboutXHours",p,a)}else{if(f<s)return o.formatDistance("xDays",1,a);if(f<qa){const p=Math.round(f/em);return o.formatDistance("xDays",p,a)}else if(f<qa*2)return h=Math.round(f/qa),o.formatDistance("aboutXMonths",h,a)}if(h=kx(u,l),h<12){const p=Math.round(f/qa);return o.formatDistance("xMonths",p,a)}else{const p=h%12,_=Math.trunc(h/12);return p<3?o.formatDistance("aboutXYears",_,a):p<9?o.formatDistance("overXYears",_,a):o.formatDistance("almostXYears",_+1,a)}}function kk(e,t){return xk(e,mx(e),t)}function Ok(e){return kk(e,{addSuffix:!0})}function gi(e,t){return wk(e,t||"PPP")}const Sk={class:"moonbase:subscriptions"},Nk={key:0,class:"moonbase:loader"},Ck={key:1,class:"moonbase:loader"},Tk=["data-subscription-status"],Pk={class:"moonbase:subscriptions-item-content"},$k={class:"moonbase:subscriptions-item-content"},Ak=pe({__name:"Subscriptions",setup(e){const t=Ae(),{getSubscriptions:n}=io(),r=V(new Date),o=V(null);return He(async()=>{let s=await n();for(o.value=s.items;s.hasMore&&s.next;)s=await n(s.next),o.value.push(...s.items)}),(s,i)=>(g(),C("div",Sk,[o.value?o.value.length===0?(g(),C("div",Ck," No subscriptions found ")):fe("",!0):(g(),C("div",Nk,[w(Qt),i[0]||(i[0]=M(" Loading subscriptions.. "))])),(g(!0),C($e,null,_t(o.value||[],a=>(g(),C("div",{key:a.id,"data-subscription-status":a.status,class:"moonbase:subscriptions-item"},[a.content.type==="Product"?(g(),C($e,{key:0},[w(en,{url:a.content.product.iconUrl,size:48},null,8,["url"]),H("div",Pk,[w($t,null,{default:O(()=>[M(j(a.content.quantity)+" x "+j(a.content.product.name),1)]),_:2},1024),w(Le,null,{default:O(()=>[M(j(a.status===b(gr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+j(b(gi)(a.expiresAt)),1)]),_:2},1024)])],64)):(g(),C($e,{key:1},[w(en,{url:a.content.bundle.iconUrl,size:48},null,8,["url"]),H("div",$k,[w($t,null,{default:O(()=>[M(j(a.content.quantity)+" x "+j(a.content.bundle.name),1)]),_:2},1024),w(Le,null,{default:O(()=>[M(j(a.status===b(gr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+j(b(gi)(a.expiresAt)),1)]),_:2},1024)])],64)),H("div",null,[w(Wo,{variant:"subtle",onClick:l=>b(t).show(b(ue).Subscription,b(Q).ManageSubscription,{subscription_id:a.id})},{default:O(()=>[w(b(np)),i[1]||(i[1]=H("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])],8,Tk))),128))]))}}),Dk={class:"moonbase:customer"},Ik=pe({__name:"Customer",setup(e){const t=Ae(),{user:n}=tt(),r=ve(Et),o=se(()=>[{intent:Q.ViewProducts,title:"Products",content:Q5},{intent:Q.ViewSubscriptions,title:"Subscriptions",content:Ak,predicate:()=>{var a;return((a=n.value)==null?void 0:a.hasSubscriptions)??!1}},{intent:Q.ViewAccount,title:"Account",content:Y5},{intent:Q.RedeemVoucher,title:"Redeem",content:cx}].filter(a=>a.predicate===void 0||a.predicate())),s=se(()=>o.value.findIndex(a=>a.intent===t.intent));function i(a){t.intent=o.value[a].intent}return(a,l)=>(g(),C("div",Dk,[w(b(L1),{"selected-index":s.value,onChange:i},{default:O(()=>{var u,c;return[w(b(j1),{"data-corners":(u=b(r))==null?void 0:u.theme.corners,"data-background":(c=b(r))==null?void 0:c.theme.colors.background},{default:O(()=>[(g(!0),C($e,null,_t(o.value,d=>(g(),Y(b(F1),{key:d.intent},{default:O(()=>[M(j(d.title),1)]),_:2},1024))),128))]),_:1},8,["data-corners","data-background"]),w(b(U1),null,{default:O(()=>[(g(!0),C($e,null,_t(o.value,d=>(g(),Y(b(B1),{key:d.intent},{default:O(()=>[(g(),Y(Bl(d.content)))]),_:2},1024))),128))]),_:1})]}),_:1},8,["selected-index"])]))}}),Mk={class:"moonbase:product-card-content"},Vk=["data-open"],Rk=pe({__name:"ProductCard",props:{product:{}},setup(e){const t=V(!1),n=V(null),r=se(()=>n.value&&n.value.$el&&n.value.$el.scrollHeight>n.value.$el.clientHeight);return(o,s)=>(g(),Y(kn,{class:"moonbase:product-card"},{addon:O(()=>[H("div",{class:"moonbase:product-card-description","data-open":t.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:n},{default:O(()=>[M(j(o.product.description),1)]),_:1},512),!t.value&&r.value?(g(),C("button",{key:0,onClick:s[0]||(s[0]=i=>t.value=!0)},[w($t,null,{default:O(()=>s[1]||(s[1]=[M(" read more ")])),_:1,__:[1]})])):fe("",!0)],8,Vk)]),default:O(()=>[w(en,{url:o.product.iconUrl,size:72},null,8,["url"]),H("div",Mk,[w(ns,null,{default:O(()=>{var i;return[M(j((i=o.product)==null?void 0:i.name),1)]}),_:1}),w(Le,{class:"moonbase:product-card-tagline"},{default:O(()=>{var i;return[M(j((i=o.product)==null?void 0:i.tagline),1)]}),_:1})])]),_:1}))}});function Lk(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 jk={class:"moonbase:product-downloads"},Fk=["data-open"],Uk={key:1,class:"moonbase:product-downloads-content"},Bk={key:2,class:"moonbase:product-downloads-content"},Hk={key:3,class:"moonbase:product-downloads-content"},qk={key:4,class:"moonbase:product-downloads-content"},zk={class:"moonbase:product-downloads-list"},Wk={class:"moonbase:product-downloads-download-actions"},Zk=pe({__name:"ProductDownloads",props:{product:{}},setup(e){const t=e,n=Ae(),r=tt(),o=nc(),s=ve(Lr),{downloadProduct:i}=io(),a=V(!1),l=V(null),u=se(()=>l.value&&l.value.$el&&l.value.$el.scrollHeight>l.value.$el.clientHeight);function c(){n.enqueue(ue.Product,Q.DownloadProduct,n.parameters??void 0),n.show(ue.Authentication,Q.SignIn)}const d=[Cn.Windows,Cn.Mac,Cn.Linux,Cn.Universal];function f(){var q;const N=(((q=navigator.userAgentData)==null?void 0:q.platform)??navigator.platform??"Unknown").toLowerCase();return/mac/.test(N)?Cn.Mac:/win/.test(N)?Cn.Windows:/linux/.test(N)?Cn.Linux:Cn.Universal}const h=f(),p=[h,...d.filter(N=>N!==h)],_=se(()=>p.flatMap(N=>[...(t.product.downloads??[]).filter(q=>q.platform===N)]));async function E(N){try{await i(N),s==null||s(qt.DownloadedProduct,{product:t.product,download:N,user:r.user.value})}catch(q){if(q instanceof Tn)o.reportProblem("error",{type:q.name,title:q.title,detail:q.detail,status:q.status,errors:q.errors?Object.fromEntries(Object.entries(q.errors).map(([z,B])=>[z,[B]])):void 0,instance:"ProductDownloads.vue:startDownload"});else{const z=q;o.reportProblem("error",{type:z.name,title:z.message,instance:"ProductDownloads.vue:startDownload"})}throw q}}return(N,q)=>(g(),C("div",jk,[w(nt,null,{default:O(()=>[q[1]||(q[1]=M(" Downloads ")),w(Le,null,{default:O(()=>[M(" Version "+j(N.product.version),1)]),_:1})]),_:1,__:[1]}),N.product.releaseDescription?(g(),C("div",{key:0,class:"moonbase:product-downloads-description","data-open":a.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:l},{default:O(()=>[M(j(N.product.releaseDescription),1)]),_:1},512),!a.value&&u.value?(g(),C("button",{key:0,onClick:q[0]||(q[0]=z=>a.value=!0)},[w($t,null,{default:O(()=>q[2]||(q[2]=[M(" read more ")])),_:1,__:[2]})])):fe("",!0)],8,Fk)):fe("",!0),N.product.downloadsNeedsUser&&N.product.downloadsNeedsOwnership&&!N.product.numberOfLicenses&&!N.product.subscriptionLicenses?(g(),C("div",Uk,[w(rt,{"data-center":""},{default:O(()=>q[3]||(q[3]=[M(" This product requires ownership to download ")])),_:1,__:[3]}),w(st,{label:"Sign in",handler:c})])):N.product.downloadsNeedsUser&&!b(r).user?(g(),C("div",Bk,[w(rt,{"data-center":""},{default:O(()=>q[4]||(q[4]=[M(" This product requires an account to download ")])),_:1,__:[4]}),w(st,{label:"Sign in",handler:c})])):N.product.downloadsNeedsOwnership&&!N.product.numberOfLicenses&&!N.product.subscriptionLicenses?(g(),C("div",Hk,[w(rt,{"data-center":""},{default:O(()=>q[5]||(q[5]=[M(" This product requires ownership to download ")])),_:1,__:[5]})])):(g(),C("div",qk,[H("div",zk,[(g(!0),C($e,null,_t(_.value,z=>(g(),Y(kn,{key:z.key,class:"moonbase:product-downloads-download"},{addon:O(()=>[H("div",Wk,[w(st,{label:`Download for ${z.platform}`,variant:z.platform===b(h)?"primary":"secondary","no-reset":!0,handler:()=>E(z),icon:b(G1)},null,8,["label","variant","handler","icon"])])]),default:O(()=>[H("div",null,[w(nt,null,{default:O(()=>[M(j(z.platform),1)]),_:2},1024),w(Mr,null,{default:O(()=>[M(j(z.name)+" - "+j(b(Lk)(z.size)),1)]),_:2},1024)])]),_:2},1024))),128))]),_.value.length===0?(g(),Y(rt,{key:0,"data-center":""},{default:O(()=>q[6]||(q[6]=[M(" No downloadable files found ")])),_:1,__:[6]})):fe("",!0)]))]))}}),Yk={class:"moonbase:product-licenses"},Gk={key:0,class:"moonbase:loader"},Kk={key:1,class:"moonbase:empty"},Xk={key:0,class:"moonbase:loader"},Jk={key:1,class:"moonbase:product-licenses-activations"},Qk={key:0},eO={class:"moonbase:product-licenses-activation-actions"},tO={key:2,class:"moonbase:loader"},nO={key:3,class:"moonbase:product-licenses-licenses"},rO=pe({__name:"ProductLicenses",props:{product:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,getProductLicenses:s,revokeActivation:i}=io(),a=nc(),l=V(null),u=V(null),c=V(!0);He(async()=>{if(n.product.maxActivations){let f=await o(n.product.id);for(l.value=f.items.map(h=>({...h,revoking:!1}));f.hasMore&&f.next;)f=await o(n.product.id,f.next),l.value.push(...f.items.map(h=>({...h,revoking:!1})))}if(n.product.externalLicenses){let f=await s(n.product.id);for(u.value=f.items;f.hasMore&&f.next;)f=await s(n.product.id,f.next),u.value.push(...f.items)}c.value=!1});async function d(f){try{await i(f),r("revoked",f),l.value&&Ht(1e3).then(()=>{var h,p;return(p=l.value)==null?void 0:p.splice((h=l.value)==null?void 0:h.indexOf(f),1)})}catch(h){if(h instanceof Tn)a.reportProblem("error",{type:h.name,title:h.title,detail:h.detail,status:h.status,errors:h.errors?Object.fromEntries(Object.entries(h.errors).map(([p,_])=>[p,[_]])):void 0,instance:"ProductLicenses.vue:revoke"});else{const p=h;a.reportProblem("error",{type:p.name,title:p.message,instance:"ProductLicenses.vue:revoke"})}throw h}}return(f,h)=>(g(),C("div",Yk,[w(nt,null,{default:O(()=>[h[0]||(h[0]=M(" Licenses ")),f.product.maxActivations&&f.product.maxActivations>0?(g(),Y(Le,{key:0},{default:O(()=>[M(j(f.product.currentActivations??0)+" of "+j(f.product.maxActivations)+" seats used ",1)]),_:1})):fe("",!0)]),_:1,__:[0]}),c.value?(g(),C("div",Gk,[w(Qt)])):!f.product.numberOfLicenses&&!f.product.subscriptionLicenses?(g(),C("div",Kk,[w(rt,null,{default:O(()=>h[1]||(h[1]=[M(" You don't own any licenses for this product yet ")])),_:1,__:[1]}),f.product&&f.product.website?(g(),Y(tc,{key:0,type:"anchor",href:f.product.website,label:"Purchase",icon:b(X1)},null,8,["href","icon"])):fe("",!0)])):fe("",!0),c.value?fe("",!0):(g(),C($e,{key:2},[f.product.maxActivations&&f.product.maxActivations>0&&!f.product.currentActivations?(g(),C("div",Xk,[w(b(rp)),w(nt,null,{default:O(()=>h[2]||(h[2]=[M(" No activations yet ")])),_:1,__:[2]})])):fe("",!0),f.product.maxActivations&&l.value?(g(),C("div",Jk,[(g(!0),C($e,null,_t(l.value??[],p=>(g(),Y(kn,{key:p.id,class:"moonbase:product-licenses-activation"},Qd({default:O(()=>[H("div",null,[w(Mr,null,{default:O(()=>h[3]||(h[3]=[M(" Device ")])),_:1,__:[3]}),w(nt,null,{default:O(()=>[M(j(p.name),1)]),_:2},1024)]),H("div",null,[w(Mr,null,{default:O(()=>h[4]||(h[4]=[M(" Activation ")])),_:1,__:[4]}),w(nt,null,{default:O(()=>[M(j(p.activationMethod),1)]),_:2},1024)]),p.lastValidatedAt?(g(),C("div",Qk,[w(Mr,null,{default:O(()=>h[5]||(h[5]=[M(" First activated ")])),_:1,__:[5]}),w(nt,null,{default:O(()=>[M(j(b(Ok)(p.firstValidatedAt)),1)]),_:2},1024)])):fe("",!0)]),_:2},[p.activationMethod===b(Ii).Online?{name:"addon",fn:O(()=>[H("div",eO,[w(st,{label:"Revoke",variant:"secondary","no-reset":!0,handler:()=>d(p)},null,8,["handler"])])]),key:"0"}:void 0]),1024))),128))])):fe("",!0),(!u.value||u.value.length===0)&&!f.product.maxActivations&&(f.product.numberOfLicenses||f.product.subscriptionLicenses)?(g(),C("div",tO,[w(b(rp)),f.product.numberOfLicenses?(g(),Y(nt,{key:0},{default:O(()=>[M(" You own "+j(f.product.numberOfLicenses)+" license"+j(f.product.numberOfLicenses!==1?"s":"")+" for this product ",1)]),_:1})):fe("",!0),f.product.subscriptionLicenses?(g(),Y(nt,{key:1},{default:O(()=>[M(" You have "+j(f.product.subscriptionLicenses)+" subscription license"+j(f.product.subscriptionLicenses!==1?"s":"")+" for this product ",1)]),_:1})):fe("",!0)])):f.product.externalLicenses&&u.value?(g(),C("div",nO,[(g(!0),C($e,null,_t((u.value??[]).filter(p=>p.externalFulfillment),p=>(g(),Y(kn,{key:p.id,class:"moonbase:product-licenses-license"},Qd({default:O(()=>[H("div",null,[w(Mr,null,{default:O(()=>[M(j(f.product.name)+" license ",1)]),_:1}),w(nt,null,{default:O(()=>[M(j(p.id),1)]),_:2},1024)])]),_:2},[p.externalFulfillment?{name:"addon",fn:O(()=>[H("code",null,j(p.externalFulfillment),1)]),key:"0"}:void 0]),1024))),128))])):fe("",!0)],64))]))}}),oO={class:"moonbase:download-product"},sO={key:0,class:"moonbase:loader"},iO={key:1,class:"moonbase:loader"},aO={key:2,class:"moonbase:loader"},lO={key:3},uO=pe({__name:"Product",setup(e){const t=Ae(),n=tt(),{loaded:r}=tt(),{getProduct:o}=io(),s=V(null),i=V(null),a=V(!0);return He(async()=>{const l=t.getParameter("product_id"),u=t.getParameter("version");if(!l){i.value="Link is broken";return}try{s.value=await o(l,u||void 0)}catch(c){i.value=c.message}a.value=!1}),(l,u)=>(g(),C("div",oO,[a.value||!b(r)?(g(),C("div",sO,[w(Qt)])):i.value?(g(),C("div",iO,j(i.value),1)):s.value?(g(),C("div",lO,[w(Rk,{product:s.value},null,8,["product"]),s.value.downloads?(g(),Y(Zk,{key:0,product:s.value},null,8,["product"])):fe("",!0),b(n).user.value?(g(),Y(rO,{key:1,product:s.value,onRevoked:u[0]||(u[0]=c=>s.value.currentActivations=(s.value.currentActivations??1)-1)},null,8,["product"])):fe("",!0)])):(g(),C("div",aO," Could not find product "))]))}}),cO={class:"moonbase:peek"},dO=["data-visible"],fO={key:1,class:"moonbase:peek-voucher"},hO={key:0,class:"moonbase:peek-voucher-content"},pO={class:"moonbase:peek-voucher-auth"},mO=pe({__name:"Redeem",setup(e){const{peek:t}=dh(),n=Ae(),r=V(null),o=V(null),s=V(n.getParameter("code")||"");async function i(){o.value=null;try{r.value=await t(s.value),n.parameters={code:r.value.code}}catch(u){throw o.value=u,u}}function a(){n.enqueue(ue.Customer,Q.RedeemVoucher,{code:s.value}),n.show(ue.Authentication,Q.SignIn)}function l(){n.enqueue(ue.Customer,Q.RedeemVoucher,{code:s.value}),n.show(ue.Authentication,Q.SignUp)}return(u,c)=>(g(),C("div",cO,[w(Ks,{mode:"out-in",name:"moonbase:slide-left"},{default:O(()=>[r.value?(g(),C("div",fO,[H("div",null,[w(ns,null,{default:O(()=>[M(j(r.value.name),1)]),_:1}),r.value.description?(g(),Y(nt,{key:0},{default:O(()=>[M(' "'+j(r.value.description)+'" ',1)]),_:1})):fe("",!0),w(Le,null,{default:O(()=>[c[2]||(c[2]=M(" Code: ")),H("strong",null,j(r.value.code),1)]),_:1,__:[2]})]),w(nt,null,{default:O(()=>c[3]||(c[3]=[M(" Voucher summary ")])),_:1,__:[3]}),r.value.redeemsProducts.length>0||r.value.redeemsBundles.length>0?(g(),C("div",hO,[(g(!0),C($e,null,_t(r.value.redeemsProducts,({value:d,quantity:f})=>(g(),Y(Jp,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(g(!0),C($e,null,_t(r.value.redeemsBundles,({value:d,quantity:f})=>(g(),Y(Xp,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):fe("",!0),H("div",pO,[w(rt,null,{default:O(()=>c[4]||(c[4]=[M(" Sign in or create an account to redeem products ")])),_:1,__:[4]}),w(st,{label:"Sign in",variant:"primary",handler:a}),w(st,{label:"Create account",variant:"subtle",handler:l})])])):(g(),Y(ir,{key:0,handler:i},{default:O(()=>{var d;return[w(rt,null,{default:O(()=>c[1]||(c[1]=[M(" Do you have a voucher you want to redeem? "),H("br",null,null,-1),M(" Please enter the code below: ")])),_:1,__:[1]}),w(Pt,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=f=>s.value=f),label:"Voucher code",name:"code",required:"",placeholder:"0000-0000-0000-0000"},null,8,["modelValue"]),w(ar,{label:"Redeem voucher",error:"Error"}),H("span",{class:"moonbase:error","data-visible":!!o.value||void 0},j((d=o.value)==null?void 0:d.message),9,dO)]}),_:1}))]),_:1})]))}}),bO={class:"moonbase:subscription-content-card-content"},gO=["data-open"],vO={class:"moonbase:subscription-content-card-content"},yO=["data-open"],_O=pe({__name:"ContentCard",props:{subscription:{}},setup(e){const t=V(new Date),n=V(!1),r=V(null),o=se(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>s.subscription.content.type==="Product"?(g(),Y(kn,{key:0,class:"moonbase:subscription-content-card"},{addon:O(()=>[H("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:r},{default:O(()=>[M(j(s.subscription.content.product.description),1)]),_:1},512),!n.value&&o.value?(g(),C("button",{key:0,onClick:i[0]||(i[0]=a=>n.value=!0)},[w($t,null,{default:O(()=>i[2]||(i[2]=[M(" read more ")])),_:1,__:[2]})])):fe("",!0)],8,gO)]),default:O(()=>[w(en,{url:s.subscription.content.product.iconUrl,size:72},null,8,["url"]),H("div",bO,[w(ns,null,{default:O(()=>{var a;return[M(j((a=s.subscription.content.product)==null?void 0:a.name),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-tagline"},{default:O(()=>{var a;return[M(j((a=s.subscription.content.product)==null?void 0:a.tagline),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-expiry"},{default:O(()=>[M(j(s.subscription.status===b(gr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),H("strong",null,j(b(gi)(s.subscription.expiresAt)),1)]),_:1})])]),_:1})):(g(),Y(kn,{key:1,class:"moonbase:subscription-content-card"},{addon:O(()=>[H("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[w(Le,{ref_key:"descriptionRef",ref:r},{default:O(()=>[M(j(s.subscription.content.bundle.description),1)]),_:1},512),!n.value&&o.value?(g(),C("button",{key:0,onClick:i[1]||(i[1]=a=>n.value=!0)},[w($t,null,{default:O(()=>i[3]||(i[3]=[M(" read more ")])),_:1,__:[3]})])):fe("",!0)],8,yO)]),default:O(()=>[w(en,{url:s.subscription.content.bundle.iconUrl,size:72},null,8,["url"]),H("div",vO,[w(ns,null,{default:O(()=>{var a;return[M(j((a=s.subscription.content.bundle)==null?void 0:a.name),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-tagline"},{default:O(()=>{var a;return[M(j((a=s.subscription.content.bundle)==null?void 0:a.tagline),1)]}),_:1}),w(Le,{class:"moonbase:subscription-content-card-expiry"},{default:O(()=>[M(j(s.subscription.status===b(gr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),H("strong",null,j(b(gi)(s.subscription.expiresAt)),1)]),_:1})])]),_:1}))}}),wO={class:"moonbase:subscription"},EO={key:0,class:"moonbase:loader"},xO={key:1,class:"moonbase:loader"},kO={key:2,class:"moonbase:loader"},OO={key:3},SO={class:"moonbase:subscription-actions"},NO=pe({__name:"Subscription",setup(e){const t=Ae(),{loaded:n}=tt(),{getSubscription:r,renewSubscription:o,cancelSubscription:s}=io(),i=V(null),a=V(new Date),l=V(null),u=V(!0);He(async()=>{const f=t.getParameter("subscription_id");if(!f){l.value="Link is broken";return}try{i.value=await r(f)}catch(h){l.value=h.message}u.value=!1});async function c(){if(!i.value)return;if((await o(i.value.id,{redirect:!1})).completed){const h=await r(i.value.id);Ht(1500).then(()=>i.value=h)}else throw new Ha}async function d(){i.value&&(i.value=await s(i.value.id))}return(f,h)=>(g(),C("div",wO,[u.value||!b(n)?(g(),C("div",EO,[w(Qt)])):l.value?(g(),C("div",xO,j(l.value),1)):i.value?(g(),C("div",OO,[w(_O,{subscription:i.value},null,8,["subscription"]),H("div",SO,[i.value.status===b(gr).Active?(g(),Y(st,{key:0,label:"Cancel subscription",variant:"danger",handler:d})):(g(),Y(st,{key:1,label:"Continue subscription",variant:"primary",handler:c})),i.value.status===b(gr).Active?(g(),Y(Mr,{key:2},{default:O(()=>[h[0]||(h[0]=M(" Cancelling a subscription will let you use the products to the end of the current period, after which you will lose access. If you want to continue using the products later, you may simply renew this subscription whenever you wish. You are currently paying ")),H("strong",null,j(b(Jt)(i.value.total.due)),1),M(" per "+j(b(rc)(i.value.cycleLength))+" for this subscription. ",1)]),_:1,__:[0]})):(g(),Y(Mr,{key:3},{default:O(()=>[M(" This subscription has been stopped, and "+j(i.value.expiresAt>a.value?"expires":"expired")+" "+j(b(gi)(i.value.expiresAt))+". If you want to continue using the products after this date, you may continue the subscription to regain access. ",1)]),_:1}))])])):(g(),C("div",kO," Could not find subscription "))]))}}),CO=pe({__name:"App",setup(e){const t=ve(Et),n=Ae();Je(()=>[n.active,n.intent],([o,s])=>{});const r={Inter:"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",Roboto:"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap","EB Garamond":"https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap",Merriweather:"https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap",Poppins:"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap","PT Serif":"https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap",Montserrat:"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap",Aleo:"https://fonts.googleapis.com/css2?family=Aleo:ital,wght@0,100..900;1,100..900&display=swap"};if(t){const o=document.createElement("link");o.rel="stylesheet",o.href=r[t.value.theme.fonts.body],document.head.appendChild(o),document.documentElement.style.setProperty("--moonbase-font-body",t.value.theme.fonts.body??"");const s=document.createElement("link");s.rel="stylesheet",s.href=r[t.value.theme.fonts.heading],document.head.appendChild(s),document.documentElement.style.setProperty("--moonbase-font-heading",t.value.theme.fonts.heading??"")}return Je(()=>t==null?void 0:t.value.theme.colors.primary,o=>{if(!o)return;let s=o;typeof s=="string"&&(s=Object.fromEntries($2(s).map(i=>[i.number<=100||i.number===950?i.number-50:i.number-100,i.hexcode]))),document.documentElement.style.setProperty("--moonbase-brand-50",s[50]??""),document.documentElement.style.setProperty("--moonbase-brand-100",s[100]??""),document.documentElement.style.setProperty("--moonbase-brand-200",s[200]??""),document.documentElement.style.setProperty("--moonbase-brand-300",s[300]??""),document.documentElement.style.setProperty("--moonbase-brand-400",s[400]??""),document.documentElement.style.setProperty("--moonbase-brand-500",s[500]??""),document.documentElement.style.setProperty("--moonbase-brand-600",s[600]??""),document.documentElement.style.setProperty("--moonbase-brand-700",s[700]??""),document.documentElement.style.setProperty("--moonbase-brand-800",s[800]??""),document.documentElement.style.setProperty("--moonbase-brand-900",s[900]??"")},{immediate:!0}),Je(()=>t==null?void 0:t.value.theme.dark,o=>{o?document.documentElement.classList.add("moonbase:dark"):document.documentElement.classList.remove("moonbase:dark")},{immediate:!0}),A_(),D_(),(o,s)=>{var i;return g(),C($e,null,[(i=b(t))!=null&&i.toolbar.enabled?(g(),Y($_,{key:0})):fe("",!0),w(x_,null,{default:O(()=>[b(n).active===b(ue).Cart?(g(),Y(H5,{key:0})):b(n).active===b(ue).Authentication?(g(),Y(_5,{key:1})):b(n).active===b(ue).Activation?(g(),Y($E,{key:2})):b(n).active===b(ue).Product?(g(),Y(uO,{key:3})):b(n).active===b(ue).Subscription?(g(),Y(NO,{key:4})):b(n).active===b(ue).Customer?(g(),Y(Ik,{key:5})):b(n).active===b(ue).Redeem?(g(),Y(mO,{key:6})):b(n).active===b(ue).About?(g(),Y(H2,{key:7})):fe("",!0)]),_:1})],64)}}});function Ga(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof HTMLElement)}function Ka(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(Ga(e)&&Ga(n)){for(const r in e)if(Object.prototype.hasOwnProperty.call(n,r)){const o=n[r];Ga(o)&&Ga(e[r])?e[r]=Ka(e[r],o):o!==void 0&&(e[r]=o)}}return Ka(e,...t)}function TO(e){const t=n=>Array.isArray(n)?n.map(r=>t(r)):Xe(n)||bn(n)||$o(n)?t(Se(n)):n&&typeof n=="object"?Object.keys(n).reduce((r,o)=>(r[o]=t(n[o]),r),{}):n;return t(e)}const sc=Symbol("url"),dm=Symbol("moonbase_instance"),Rr=(e,t)=>window.dispatchEvent(new CustomEvent(`moonbase-storefront-${e}`,{detail:TO(t)})),Lr=Symbol("event-emitter");class PO{constructor(){go(this,"initialized",!1);go(this,"pinia");go(this,"storefront");go(this,"options")}async setup(t,n){var l,u;if(typeof window>"u")throw console.error("Moonbase setup must be done client-side"),new Error("Moonbase setup must be done client-side");if(globalThis.MoonbaseCSS&&globalThis.MoonbaseCSS.inject(),document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}this.options=V(Ka(((l=this.options)==null?void 0:l.value)??$h,n??{})),Uo("Merged options:",this.options.value);const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase"),(this.options.value.target??document.body).append(r),this.storefront=wy(t),this.pinia=Wy(),ty(CO).use(this.storefront).use(this.pinia).provide(Et,this.options).provide(sc,t.replace(/\/$/,"")).provide(Lr,Rr).provide(dm,this).mount("#moonbase"),this.initialized=!0,window&&window.location&&this.handleLocationIntent(window.location);const i=Ae(this.pinia),a=tt(this.storefront);(u=this.storefront)==null||u.onCheckoutInitiated((c,d)=>{Rr(qt.CheckoutInitiated,{order:c,total:d,user:a.user.value})}),this.storefront.onCheckoutClosed(c=>{Rr(qt.CheckoutClosed,{order:this.storefront.currentOrder.value,user:a.user.value}),c===Q.ViewProducts&&(a.user?i.show(ue.Customer,Q.ViewProducts):i.show(ue.Cart,Q.ViewCart))}),this.storefront.onCheckoutCompleted(c=>{Rr(qt.CheckoutCompleted,{order:c,user:a.user.value})})}configure(t){var r;const n=Ka(((r=this.options)==null?void 0:r.value)??$h,t??{});this.options?this.options.value=n:this.options=V(n)}on(t,n){window.addEventListener(`moonbase-storefront-${t}`,r=>n(r.detail))}handleLocationIntent(t){const n=new URLSearchParams(t.search),r=n.get("mb_intent");if(r&&Object.values(Q).includes(r)){const o=Object.fromEntries([...n.entries()].filter(([i])=>i.startsWith("mb_")).map(([i,a])=>[i.substring(3),a]));if(r===Q.Checkout&&o.complete)return;this[r](o);for(const i of Object.keys(o))n.delete(`mb_${i}`);const s=n.toString();window.history.replaceState(null,"",t.href.split("?")[0]+(s?`?${s}`:""))}}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.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.value.auth.signUp.enabled))throw new Error("Sign ups are not enabled");Ae(this.pinia).show(ue.Authentication,Q.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ConfirmAccount,t)}confirm_email(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Authentication,Q.ConfirmEmail,t)}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Authentication,Q.ConfirmEmailChange,t):(n.enqueue(ue.Authentication,Q.ConfirmEmailChange,t),n.show(ue.Authentication,Q.SignIn))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ae(this.pinia);tt(this.storefront).user.value?t.show(ue.Customer,Q.ViewAccount):(t.enqueue(ue.Customer,Q.ViewAccount),t.show(ue.Authentication,Q.SignIn))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Customer,Q.ViewProducts)}view_subscriptions(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Customer,Q.ViewSubscriptions)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Customer,Q.RedeemVoucher,t):n.show(ue.Redeem,Q.RedeemVoucher,t)}view_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Product,Q.ViewProduct,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Product,Q.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia),r=tt(this.storefront);!(t!=null&&t.token)&&!r.user.value?(n.enqueue(ue.Activation,Q.ActivateProduct,t),n.show(ue.Authentication,Q.SignIn)):n.show(ue.Activation,Q.ActivateProduct,t)}manage_subscription(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);tt(this.storefront).user.value?n.show(ue.Subscription,Q.ManageSubscription,t):(n.enqueue(ue.Subscription,Q.ManageSubscription,t),n.show(ue.Authentication,Q.SignIn))}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.Cart,Q.ViewCart)}async add_to_cart(t){var o,s,i,a,l,u,c,d;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=Tr(this.storefront),r=tt(this.storefront);if(t!=null&&t.product_id){const f=Qs(t.product_id,this.storefront);if(f.value){let h=n.addToCart(f.value,(o=f.value.variations)==null?void 0:o.find(p=>p.id===t.variation_id));t!=null&&t.quantity&&(h=n.setQuantity(h,h.quantity+t.quantity-1)),((s=this.options)==null?void 0:s.value.cart.quantity)==="single"&&(h=n.setQuantity(h,1)),Rr(qt.AddedToCart,{item:h,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const h=Qs(t.product_id,this.storefront);if(h.value){let p=n.addToCart(h.value,(i=h.value.variations)==null?void 0:i.find(_=>_.id===t.variation_id));t!=null&&t.quantity&&(p=n.setQuantity(p,p.quantity+t.quantity-1)),((a=this.options)==null?void 0:a.value.cart.quantity)==="single"&&(p=n.setQuantity(p,1)),Rr(qt.AddedToCart,{item:p,currency:n.currency.value,user:r.user.value})}else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const f=_a(t.bundle_id,this.storefront);if(f.value){let h=n.addToCart(f.value,(l=f.value.variations)==null?void 0:l.find(p=>p.id===t.variation_id));t!=null&&t.quantity&&(h=n.setQuantity(h,h.quantity+t.quantity-1)),((u=this.options)==null?void 0:u.value.cart.quantity)==="single"&&(h=n.setQuantity(h,1)),Rr(qt.AddedToCart,{item:h,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const h=_a(t.bundle_id,this.storefront);if(h.value){let p=n.addToCart(h.value,(c=h.value.variations)==null?void 0:c.find(_=>_.id===t.variation_id));t!=null&&t.quantity&&(p=n.setQuantity(p,p.quantity+t.quantity-1)),((d=this.options)==null?void 0:d.value.cart.quantity)==="single"&&(p=n.setQuantity(p,1)),Rr(qt.AddedToCart,{item:p,currency:n.currency.value,user:r.user.value})}else throw new Error(`Bundle '${t.bundle_id}' not found`)}}(t==null?void 0:t.show_cart)!==!1&&Ae(this.pinia).show(ue.Cart,Q.AddToCart)}async purchase(t){var o,s,i,a,l;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(o=this.storefront)!=null&&o.loadedStorefront||await((s=this.storefront)==null?void 0:s.loadedStorefrontPromise);const n=t?Array.isArray(t)?t:[t]:[];if(n.length===0)throw new Error("No items given to purchase");const r=[];for(const u of n){if(!u.product_id&&!u.bundle_id)throw new Error("You need to provide a product or bundle ID when purchasing");if(u.product_id){const c=Qs(u.product_id,this.storefront);if(c.value)r.push({item:c.value,variation:(i=c.value.variations)==null?void 0:i.find(d=>d.id===u.variation_id),quantity:u.quantity});else throw new Error(`Product '${u.product_id}' not found`)}if(u.bundle_id){const c=_a(u.bundle_id,this.storefront);if(c.value)r.push({item:c.value,variation:(a=c.value.variations)==null?void 0:a.find(d=>d.id===u.variation_id),quantity:u.quantity});else throw new Error(`Bundle '${u.bundle_id}' not found`)}}await yy(r,{redirect:((l=this.options)==null?void 0:l.value.checkout.redirect)||!1,returnUrl:`${window.location.pathname}?mb_intent=view_products`},this.storefront)}checkout(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;Tr(this.storefront).checkout({redirect:((r=this.options)==null?void 0:r.value.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()}view_about(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(ue.About,Q.ViewAbout)}}const ic=new PO;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=ic),xt.MoonbaseIntent=Q,xt.default=ic,xt.eventEmitterKey=Lr,xt.instanceKey=dm,xt.urlKey=sc,Object.defineProperties(xt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|