@moonbase.sh/storefront 1.0.25 → 1.0.27

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.
@@ -3,24 +3,24 @@
3
3
  * @vue/shared v3.5.17
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
5
  * @license MIT
6
- **//*! #__NO_SIDE_EFFECTS__ */function Jn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ze=bd.NODE_ENV!=="production"?Object.freeze({}):{},Mo=bd.NODE_ENV!=="production"?Object.freeze([]):[],mt=()=>{},Cg=()=>!1,Ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ea=e=>e.startsWith("onUpdate:"),it=Object.assign,Tl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Og=Object.prototype.hasOwnProperty,Le=(e,t)=>Og.call(e,t),ge=Array.isArray,Kr=e=>ta(e)==="[object Map]",vd=e=>ta(e)==="[object Set]",_e=e=>typeof e=="function",nt=e=>typeof e=="string",er=e=>typeof e=="symbol",Fe=e=>e!==null&&typeof e=="object",Il=e=>(Fe(e)||_e(e))&&_e(e.then)&&_e(e.catch),yd=Object.prototype.toString,ta=e=>yd.call(e),Dl=e=>ta(e).slice(8,-1),wd=e=>ta(e)==="[object Object]",$l=e=>nt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$s=Jn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sg=Jn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),na=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ng=/-(\w)/g,Vt=na(e=>e.replace(Ng,(t,n)=>n?n.toUpperCase():"")),Pg=/\B([A-Z])/g,Or=na(e=>e.replace(Pg,"-$1").toLowerCase()),Gr=na(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qr=na(e=>e?`on${Gr(e)}`:""),Sr=(e,t)=>!Object.is(e,t),Ms=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Vs=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Tg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ig=e=>{const t=nt(e)?Number(e):NaN;return isNaN(t)?e:t};let _d;const Ls=()=>_d||(_d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Vo(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=nt(r)?Vg(r):Vo(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(nt(e)||Fe(e))return e}const Dg=/;(?![^(]*\))/g,$g=/:([^]+)/,Mg=/\/\*[^]*?\*\//g;function Vg(e){const t={};return e.replace(Mg,"").split(Dg).forEach(n=>{if(n){const r=n.split($g);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Rs(e){let t="";if(nt(e))t=e;else if(ge(e))for(let n=0;n<e.length;n++){const r=Rs(e[n]);r&&(t+=r+" ")}else if(Fe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Lg="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",Rg="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",jg="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",Ug=Jn(Lg),Bg=Jn(Rg),Fg=Jn(jg),Hg=Jn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Ed(e){return!!e||e===""}const kd=e=>!!(e&&e.__v_isRef===!0),$=e=>nt(e)?e:e==null?"":ge(e)||Fe(e)&&(e.toString===yd||!_e(e.toString))?kd(e)?$(e.value):JSON.stringify(e,xd,2):String(e),xd=(e,t)=>kd(t)?xd(e,t.value):Kr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Ml(r,s)+" =>"]=o,n),{})}:vd(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ml(n))}:er(t)?Ml(t):Fe(t)&&!ge(t)&&!wd(t)?String(t):t,Ml=(e,t="")=>{var n;return er(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var We={};function rn(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let St;class Ad{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=St,!t&&St&&(this.index=(St.scopes||(St.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=St;try{return St=this,t()}finally{St=n}}else We.NODE_ENV!=="production"&&rn("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=St,St=this)}off(){this._on>0&&--this._on===0&&(St=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 Cd(e){return new Ad(e)}function Od(){return St}function qg(e,t=!1){St?St.cleanups.push(e):We.NODE_ENV!=="production"&&!t&&rn("onScopeDispose() is called when there is no active effect scope to be associated with.")}let He;const Vl=new WeakSet;class Sd{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,St&&St.active&&St.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vl.has(this)&&(Vl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Pd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Md(this),Td(this);const t=He,n=vn;He=this,vn=!0;try{return this.fn()}finally{We.NODE_ENV!=="production"&&He!==this&&rn("Active effect was not restored correctly - this is likely a Vue internal bug."),Id(this),He=t,vn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ul(t);this.deps=this.depsTail=void 0,Md(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){jl(this)&&this.run()}get dirty(){return jl(this)}}let Nd=0,js,Us;function Pd(e,t=!1){if(e.flags|=8,t){e.next=Us,Us=e;return}e.next=js,js=e}function Ll(){Nd++}function Rl(){if(--Nd>0)return;if(Us){let t=Us;for(Us=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;js;){let t=js;for(js=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 Id(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Ul(r),zg(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function jl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bs)||(e.globalVersion=Bs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!jl(e))))return;e.flags|=2;const t=e.dep,n=He,r=vn;He=e,vn=!0;try{Td(e);const o=e.fn(e._value);(t.version===0||Sr(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{He=n,vn=r,Id(e),e.flags&=-3}}function Ul(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),We.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)Ul(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zg(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let vn=!0;const $d=[];function yn(){$d.push(vn),vn=!1}function wn(){const e=$d.pop();vn=e===void 0?!0:e}function Md(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=He;He=void 0;try{t()}finally{He=n}}}let Bs=0;class Wg{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 Bl{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,this.__v_skip=!0,We.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!He||!vn||He===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==He)n=this.activeLink=new Wg(He,this),He.deps?(n.prevDep=He.depsTail,He.depsTail.nextDep=n,He.depsTail=n):He.deps=He.depsTail=n,Vd(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=He.depsTail,n.nextDep=void 0,He.depsTail.nextDep=n,He.depsTail=n,He.deps===n&&(He.deps=r)}return We.NODE_ENV!=="production"&&He.onTrack&&He.onTrack(it({effect:He},t)),n}trigger(t){this.version++,Bs++,this.notify(t)}notify(t){Ll();try{if(We.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{Rl()}}}function Vd(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)Vd(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),We.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const ra=new WeakMap,Xr=Symbol(We.NODE_ENV!=="production"?"Object iterate":""),Fl=Symbol(We.NODE_ENV!=="production"?"Map keys iterate":""),Fs=Symbol(We.NODE_ENV!=="production"?"Array iterate":"");function gt(e,t,n){if(vn&&He){let r=ra.get(e);r||ra.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Bl),o.map=r,o.key=n),We.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function $n(e,t,n,r,o,s){const i=ra.get(e);if(!i){Bs++;return}const a=l=>{l&&(We.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger())};if(Ll(),t==="clear")i.forEach(a);else{const l=ge(e),u=l&&$l(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Fs||!er(f)&&f>=c)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),u&&a(i.get(Fs)),t){case"add":l?u&&a(i.get("length")):(a(i.get(Xr)),Kr(e)&&a(i.get(Fl)));break;case"delete":l||(a(i.get(Xr)),Kr(e)&&a(i.get(Fl)));break;case"set":Kr(e)&&a(i.get(Xr));break}}Rl()}function Zg(e,t){const n=ra.get(e);return n&&n.get(t)}function Lo(e){const t=Ee(e);return t===e?t:(gt(t,"iterate",Fs),Lt(e)?t:t.map(Et))}function oa(e){return gt(e=Ee(e),"iterate",Fs),e}const Yg={__proto__:null,[Symbol.iterator](){return Hl(this,Symbol.iterator,Et)},concat(...e){return Lo(this).concat(...e.map(t=>ge(t)?Lo(t):t))},entries(){return Hl(this,"entries",e=>(e[1]=Et(e[1]),e))},every(e,t){return tr(this,"every",e,t,void 0,arguments)},filter(e,t){return tr(this,"filter",e,t,n=>n.map(Et),arguments)},find(e,t){return tr(this,"find",e,t,Et,arguments)},findIndex(e,t){return tr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tr(this,"findLast",e,t,Et,arguments)},findLastIndex(e,t){return tr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ql(this,"includes",e)},indexOf(...e){return ql(this,"indexOf",e)},join(e){return Lo(this).join(e)},lastIndexOf(...e){return ql(this,"lastIndexOf",e)},map(e,t){return tr(this,"map",e,t,void 0,arguments)},pop(){return Hs(this,"pop")},push(...e){return Hs(this,"push",e)},reduce(e,...t){return Ld(this,"reduce",e,t)},reduceRight(e,...t){return Ld(this,"reduceRight",e,t)},shift(){return Hs(this,"shift")},some(e,t){return tr(this,"some",e,t,void 0,arguments)},splice(...e){return Hs(this,"splice",e)},toReversed(){return Lo(this).toReversed()},toSorted(e){return Lo(this).toSorted(e)},toSpliced(...e){return Lo(this).toSpliced(...e)},unshift(...e){return Hs(this,"unshift",e)},values(){return Hl(this,"values",Et)}};function Hl(e,t,n){const r=oa(e),o=r[t]();return r!==e&&!Lt(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Kg=Array.prototype;function tr(e,t,n,r,o,s){const i=oa(e),a=i!==e&&!Lt(e),l=i[t];if(l!==Kg[t]){const d=l.apply(e,s);return a?Et(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,Et(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 Ld(e,t,n,r){const o=oa(e);let s=n;return o!==e&&(Lt(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,Et(a),l,e)}),o[t](s,...r)}function ql(e,t,n){const r=Ee(e);gt(r,"iterate",Fs);const o=r[t](...n);return(o===-1||o===!1)&&Ro(n[0])?(n[0]=Ee(n[0]),r[t](...n)):o}function Hs(e,t,n=[]){yn(),Ll();const r=Ee(e)[t].apply(e,n);return Rl(),wn(),r}const Gg=Jn("__proto__,__v_isRef,__isVue"),Rd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(er));function Qg(e){er(e)||(e=String(e));const t=Ee(this);return gt(t,"has",e),t.hasOwnProperty(e)}class jd{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?Wd:zd:s?qd:Hd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ge(t);if(!o){let l;if(i&&(l=Yg[n]))return l;if(n==="hasOwnProperty")return Qg}const a=Reflect.get(t,n,Je(t)?t:r);return(er(n)?Rd.has(n):Gg(n))||(o||gt(t,"get",n),s)?a:Je(a)?i&&$l(n)?a:a.value:Fe(a)?o?Zd(a):qs(a):a}}class Ud extends jd{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=Vn(s);if(!Lt(r)&&!Vn(r)&&(s=Ee(s),r=Ee(r)),!ge(t)&&Je(s)&&!Je(r))return l?!1:(s.value=r,!0)}const i=ge(t)&&$l(n)?Number(n)<t.length:Le(t,n),a=Reflect.set(t,n,r,Je(t)?t:o);return t===Ee(o)&&(i?Sr(r,s)&&$n(t,"set",n,r,s):$n(t,"add",n,r)),a}deleteProperty(t,n){const r=Le(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&$n(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!er(n)||!Rd.has(n))&&gt(t,"has",n),r}ownKeys(t){return gt(t,"iterate",ge(t)?"length":Xr),Reflect.ownKeys(t)}}class Bd extends jd{constructor(t=!1){super(!0,t)}set(t,n){return We.NODE_ENV!=="production"&&rn(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return We.NODE_ENV!=="production"&&rn(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Xg=new Ud,Jg=new Bd,eb=new Ud(!0),tb=new Bd(!0),zl=e=>e,sa=e=>Reflect.getPrototypeOf(e);function nb(e,t,n){return function(...r){const o=this.__v_raw,s=Ee(o),i=Kr(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?zl:t?ua:Et;return!t&&gt(s,"iterate",l?Fl:Xr),{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 ia(e){return function(...t){if(We.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";rn(`${Gr(e)} operation ${n}failed: target is readonly.`,Ee(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function rb(e,t){const n={get(o){const s=this.__v_raw,i=Ee(s),a=Ee(o);e||(Sr(o,a)&&gt(i,"get",o),gt(i,"get",a));const{has:l}=sa(i),u=t?zl:e?ua:Et;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&&gt(Ee(o),"iterate",Xr),Reflect.get(o,"size",o)},has(o){const s=this.__v_raw,i=Ee(s),a=Ee(o);return e||(Sr(o,a)&&gt(i,"has",o),gt(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=Ee(a),u=t?zl:e?ua:Et;return!e&&gt(l,"iterate",Xr),a.forEach((c,d)=>o.call(s,u(c),u(d),i))}};return it(n,e?{add:ia("add"),set:ia("set"),delete:ia("delete"),clear:ia("clear")}:{add(o){!t&&!Lt(o)&&!Vn(o)&&(o=Ee(o));const s=Ee(this);return sa(s).has.call(s,o)||(s.add(o),$n(s,"add",o,o)),this},set(o,s){!t&&!Lt(s)&&!Vn(s)&&(s=Ee(s));const i=Ee(this),{has:a,get:l}=sa(i);let u=a.call(i,o);u?We.NODE_ENV!=="production"&&Fd(i,a,o):(o=Ee(o),u=a.call(i,o));const c=l.call(i,o);return i.set(o,s),u?Sr(s,c)&&$n(i,"set",o,s,c):$n(i,"add",o,s),this},delete(o){const s=Ee(this),{has:i,get:a}=sa(s);let l=i.call(s,o);l?We.NODE_ENV!=="production"&&Fd(s,i,o):(o=Ee(o),l=i.call(s,o));const u=a?a.call(s,o):void 0,c=s.delete(o);return l&&$n(s,"delete",o,void 0,u),c},clear(){const o=Ee(this),s=o.size!==0,i=We.NODE_ENV!=="production"?Kr(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&$n(o,"clear",void 0,void 0,i),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=nb(o,e,t)}),n}function aa(e,t){const n=rb(e,t);return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Le(n,o)&&o in r?n:r,o,s)}const ob={get:aa(!1,!1)},sb={get:aa(!1,!0)},ib={get:aa(!0,!1)},ab={get:aa(!0,!0)};function Fd(e,t,n){const r=Ee(n);if(r!==n&&t.call(e,r)){const o=Dl(e);rn(`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,qd=new WeakMap,zd=new WeakMap,Wd=new WeakMap;function lb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ub(e){return e.__v_skip||!Object.isExtensible(e)?0:lb(Dl(e))}function qs(e){return Vn(e)?e:la(e,!1,Xg,ob,Hd)}function cb(e){return la(e,!1,eb,sb,qd)}function Zd(e){return la(e,!0,Jg,ib,zd)}function Mn(e){return la(e,!0,tb,ab,Wd)}function la(e,t,n,r,o){if(!Fe(e))return We.NODE_ENV!=="production"&&rn(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=ub(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 _n(e){return Vn(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function Vn(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function Ro(e){return e?!!e.__v_raw:!1}function Ee(e){const t=e&&e.__v_raw;return t?Ee(t):e}function Nr(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&Vs(e,"__v_skip",!0),e}const Et=e=>Fe(e)?qs(e):e,ua=e=>Fe(e)?Zd(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function j(e){return Yd(e,!1)}function db(e){return Yd(e,!0)}function Yd(e,t){return Je(e)?e:new fb(e,t)}class fb{constructor(t,n){this.dep=new Bl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ee(t),this._value=n?t:Et(t),this.__v_isShallow=n}get value(){return We.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||Lt(t)||Vn(t);t=r?t:Ee(t),Sr(t,n)&&(this._rawValue=t,this._value=r?t:Et(t),We.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function b(e){return Je(e)?e.value:e}function Pr(e){return _e(e)?e():b(e)}const hb={get:(e,t,n)=>t==="__v_raw"?e:b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Je(o)&&!Je(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Kd(e){return _n(e)?e:new Proxy(e,hb)}function Gd(e){We.NODE_ENV!=="production"&&!Ro(e)&&rn("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]=Qd(e,n);return t}class pb{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 Zg(Ee(this._object),this._key)}}class mb{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 Wl(e,t,n){return Je(e)?e:_e(e)?new mb(e):Fe(e)&&arguments.length>1?Qd(e,t,n):j(e)}function Qd(e,t,n){const r=e[t];return Je(r)?r:new pb(e,t,n)}class gb{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Bl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return Pd(this,!0),!0}get value(){const t=We.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Dd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):We.NODE_ENV!=="production"&&rn("Write operation failed: computed value is readonly")}}function bb(e,t,n=!1){let r,o;return _e(e)?r=e:(r=e.get,o=e.set),new gb(r,o,n)}const ca={},da=new WeakMap;let Jr;function vb(e,t=!1,n=Jr){if(n){let r=da.get(n);r||da.set(n,r=[]),r.push(e)}else We.NODE_ENV!=="production"&&!t&&rn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function yb(e,t,n=ze){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=I=>{(n.onWarn||rn)("Invalid watch source: ",I,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=I=>o?I:Lt(I)||o===!1||o===0?Tr(I,1):Tr(I);let d,f,h,m,y=!1,x=!1;if(Je(e)?(f=()=>e.value,y=Lt(e)):_n(e)?(f=()=>c(e),y=!0):ge(e)?(x=!0,y=e.some(I=>_n(I)||Lt(I)),f=()=>e.map(I=>{if(Je(I))return I.value;if(_n(I))return c(I);if(_e(I))return l?l(I,2):I();We.NODE_ENV!=="production"&&u(I)})):_e(e)?t?f=l?()=>l(e,2):e:f=()=>{if(h){yn();try{h()}finally{wn()}}const I=Jr;Jr=d;try{return l?l(e,3,[m]):e(m)}finally{Jr=I}}:(f=mt,We.NODE_ENV!=="production"&&u(e)),t&&o){const I=f,V=o===!0?1/0:o;f=()=>Tr(I(),V)}const P=Od(),C=()=>{d.stop(),P&&P.active&&Tl(P.effects,d)};if(s&&t){const I=t;t=(...V)=>{I(...V),C()}}let U=x?new Array(e.length).fill(ca):ca;const M=I=>{if(!(!(d.flags&1)||!d.dirty&&!I))if(t){const V=d.run();if(o||y||(x?V.some((E,O)=>Sr(E,U[O])):Sr(V,U))){h&&h();const E=Jr;Jr=d;try{const O=[V,U===ca?void 0:x&&U[0]===ca?[]:U,m];U=V,l?l(t,3,O):t(...O)}finally{Jr=E}}}else d.run()};return a&&a(M),d=new Sd(f),d.scheduler=i?()=>i(M,!1):M,m=I=>vb(I,!1,d),h=d.onStop=()=>{const I=da.get(d);if(I){if(l)l(I,4);else for(const V of I)V();da.delete(d)}},We.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?M(!0):U=d.run():i?i(M.bind(null,!0),!0):d.run(),C.pause=d.pause.bind(d),C.resume=d.resume.bind(d),C.stop=C,C}function Tr(e,t=1/0,n){if(t<=0||!Fe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Je(e))Tr(e.value,t,n);else if(ge(e))for(let r=0;r<e.length;r++)Tr(e[r],t,n);else if(vd(e)||Kr(e))e.forEach(r=>{Tr(r,t,n)});else if(wd(e)){for(const r in e)Tr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Tr(e[r],t,n)}return e}var D={};const eo=[];function fa(e){eo.push(e)}function ha(){eo.pop()}let Zl=!1;function G(e,...t){if(Zl)return;Zl=!0,yn();const n=eo.length?eo[eo.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=wb();if(r)jo(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 <${Ia(n,s.type)}>`).join(`
6
+ **//*! #__NO_SIDE_EFFECTS__ */function Jn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ze=bd.NODE_ENV!=="production"?Object.freeze({}):{},Mo=bd.NODE_ENV!=="production"?Object.freeze([]):[],mt=()=>{},Cg=()=>!1,Ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ea=e=>e.startsWith("onUpdate:"),at=Object.assign,Tl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Og=Object.prototype.hasOwnProperty,Le=(e,t)=>Og.call(e,t),ge=Array.isArray,Kr=e=>ta(e)==="[object Map]",vd=e=>ta(e)==="[object Set]",_e=e=>typeof e=="function",nt=e=>typeof e=="string",er=e=>typeof e=="symbol",Fe=e=>e!==null&&typeof e=="object",Il=e=>(Fe(e)||_e(e))&&_e(e.then)&&_e(e.catch),yd=Object.prototype.toString,ta=e=>yd.call(e),Dl=e=>ta(e).slice(8,-1),wd=e=>ta(e)==="[object Object]",$l=e=>nt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$s=Jn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sg=Jn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),na=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ng=/-(\w)/g,Vt=na(e=>e.replace(Ng,(t,n)=>n?n.toUpperCase():"")),Pg=/\B([A-Z])/g,Or=na(e=>e.replace(Pg,"-$1").toLowerCase()),Gr=na(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qr=na(e=>e?`on${Gr(e)}`:""),Sr=(e,t)=>!Object.is(e,t),Ms=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Vs=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Tg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ig=e=>{const t=nt(e)?Number(e):NaN;return isNaN(t)?e:t};let _d;const Ls=()=>_d||(_d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Vo(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=nt(r)?Vg(r):Vo(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(nt(e)||Fe(e))return e}const Dg=/;(?![^(]*\))/g,$g=/:([^]+)/,Mg=/\/\*[^]*?\*\//g;function Vg(e){const t={};return e.replace(Mg,"").split(Dg).forEach(n=>{if(n){const r=n.split($g);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Rs(e){let t="";if(nt(e))t=e;else if(ge(e))for(let n=0;n<e.length;n++){const r=Rs(e[n]);r&&(t+=r+" ")}else if(Fe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Lg="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",Rg="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",jg="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",Ug=Jn(Lg),Bg=Jn(Rg),Fg=Jn(jg),Hg=Jn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Ed(e){return!!e||e===""}const kd=e=>!!(e&&e.__v_isRef===!0),$=e=>nt(e)?e:e==null?"":ge(e)||Fe(e)&&(e.toString===yd||!_e(e.toString))?kd(e)?$(e.value):JSON.stringify(e,xd,2):String(e),xd=(e,t)=>kd(t)?xd(e,t.value):Kr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Ml(r,s)+" =>"]=o,n),{})}:vd(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ml(n))}:er(t)?Ml(t):Fe(t)&&!ge(t)&&!wd(t)?String(t):t,Ml=(e,t="")=>{var n;return er(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var We={};function rn(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let St;class Ad{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=St,!t&&St&&(this.index=(St.scopes||(St.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=St;try{return St=this,t()}finally{St=n}}else We.NODE_ENV!=="production"&&rn("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=St,St=this)}off(){this._on>0&&--this._on===0&&(St=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 Cd(e){return new Ad(e)}function Od(){return St}function qg(e,t=!1){St?St.cleanups.push(e):We.NODE_ENV!=="production"&&!t&&rn("onScopeDispose() is called when there is no active effect scope to be associated with.")}let He;const Vl=new WeakSet;class Sd{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,St&&St.active&&St.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vl.has(this)&&(Vl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Pd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Md(this),Td(this);const t=He,n=vn;He=this,vn=!0;try{return this.fn()}finally{We.NODE_ENV!=="production"&&He!==this&&rn("Active effect was not restored correctly - this is likely a Vue internal bug."),Id(this),He=t,vn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ul(t);this.deps=this.depsTail=void 0,Md(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){jl(this)&&this.run()}get dirty(){return jl(this)}}let Nd=0,js,Us;function Pd(e,t=!1){if(e.flags|=8,t){e.next=Us,Us=e;return}e.next=js,js=e}function Ll(){Nd++}function Rl(){if(--Nd>0)return;if(Us){let t=Us;for(Us=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;js;){let t=js;for(js=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 Id(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Ul(r),zg(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function jl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bs)||(e.globalVersion=Bs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!jl(e))))return;e.flags|=2;const t=e.dep,n=He,r=vn;He=e,vn=!0;try{Td(e);const o=e.fn(e._value);(t.version===0||Sr(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{He=n,vn=r,Id(e),e.flags&=-3}}function Ul(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),We.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)Ul(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zg(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let vn=!0;const $d=[];function yn(){$d.push(vn),vn=!1}function wn(){const e=$d.pop();vn=e===void 0?!0:e}function Md(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=He;He=void 0;try{t()}finally{He=n}}}let Bs=0;class Wg{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 Bl{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,this.__v_skip=!0,We.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!He||!vn||He===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==He)n=this.activeLink=new Wg(He,this),He.deps?(n.prevDep=He.depsTail,He.depsTail.nextDep=n,He.depsTail=n):He.deps=He.depsTail=n,Vd(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=He.depsTail,n.nextDep=void 0,He.depsTail.nextDep=n,He.depsTail=n,He.deps===n&&(He.deps=r)}return We.NODE_ENV!=="production"&&He.onTrack&&He.onTrack(at({effect:He},t)),n}trigger(t){this.version++,Bs++,this.notify(t)}notify(t){Ll();try{if(We.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(at({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Rl()}}}function Vd(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)Vd(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),We.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const ra=new WeakMap,Xr=Symbol(We.NODE_ENV!=="production"?"Object iterate":""),Fl=Symbol(We.NODE_ENV!=="production"?"Map keys iterate":""),Fs=Symbol(We.NODE_ENV!=="production"?"Array iterate":"");function gt(e,t,n){if(vn&&He){let r=ra.get(e);r||ra.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Bl),o.map=r,o.key=n),We.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function $n(e,t,n,r,o,s){const i=ra.get(e);if(!i){Bs++;return}const a=l=>{l&&(We.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}):l.trigger())};if(Ll(),t==="clear")i.forEach(a);else{const l=ge(e),u=l&&$l(n);if(l&&n==="length"){const c=Number(r);i.forEach((d,f)=>{(f==="length"||f===Fs||!er(f)&&f>=c)&&a(d)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),u&&a(i.get(Fs)),t){case"add":l?u&&a(i.get("length")):(a(i.get(Xr)),Kr(e)&&a(i.get(Fl)));break;case"delete":l||(a(i.get(Xr)),Kr(e)&&a(i.get(Fl)));break;case"set":Kr(e)&&a(i.get(Xr));break}}Rl()}function Zg(e,t){const n=ra.get(e);return n&&n.get(t)}function Lo(e){const t=Ee(e);return t===e?t:(gt(t,"iterate",Fs),Lt(e)?t:t.map(Et))}function oa(e){return gt(e=Ee(e),"iterate",Fs),e}const Yg={__proto__:null,[Symbol.iterator](){return Hl(this,Symbol.iterator,Et)},concat(...e){return Lo(this).concat(...e.map(t=>ge(t)?Lo(t):t))},entries(){return Hl(this,"entries",e=>(e[1]=Et(e[1]),e))},every(e,t){return tr(this,"every",e,t,void 0,arguments)},filter(e,t){return tr(this,"filter",e,t,n=>n.map(Et),arguments)},find(e,t){return tr(this,"find",e,t,Et,arguments)},findIndex(e,t){return tr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tr(this,"findLast",e,t,Et,arguments)},findLastIndex(e,t){return tr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ql(this,"includes",e)},indexOf(...e){return ql(this,"indexOf",e)},join(e){return Lo(this).join(e)},lastIndexOf(...e){return ql(this,"lastIndexOf",e)},map(e,t){return tr(this,"map",e,t,void 0,arguments)},pop(){return Hs(this,"pop")},push(...e){return Hs(this,"push",e)},reduce(e,...t){return Ld(this,"reduce",e,t)},reduceRight(e,...t){return Ld(this,"reduceRight",e,t)},shift(){return Hs(this,"shift")},some(e,t){return tr(this,"some",e,t,void 0,arguments)},splice(...e){return Hs(this,"splice",e)},toReversed(){return Lo(this).toReversed()},toSorted(e){return Lo(this).toSorted(e)},toSpliced(...e){return Lo(this).toSpliced(...e)},unshift(...e){return Hs(this,"unshift",e)},values(){return Hl(this,"values",Et)}};function Hl(e,t,n){const r=oa(e),o=r[t]();return r!==e&&!Lt(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.value&&(s.value=n(s.value)),s}),o}const Kg=Array.prototype;function tr(e,t,n,r,o,s){const i=oa(e),a=i!==e&&!Lt(e),l=i[t];if(l!==Kg[t]){const d=l.apply(e,s);return a?Et(d):d}let u=n;i!==e&&(a?u=function(d,f){return n.call(this,Et(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 Ld(e,t,n,r){const o=oa(e);let s=n;return o!==e&&(Lt(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,Et(a),l,e)}),o[t](s,...r)}function ql(e,t,n){const r=Ee(e);gt(r,"iterate",Fs);const o=r[t](...n);return(o===-1||o===!1)&&Ro(n[0])?(n[0]=Ee(n[0]),r[t](...n)):o}function Hs(e,t,n=[]){yn(),Ll();const r=Ee(e)[t].apply(e,n);return Rl(),wn(),r}const Gg=Jn("__proto__,__v_isRef,__isVue"),Rd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(er));function Qg(e){er(e)||(e=String(e));const t=Ee(this);return gt(t,"has",e),t.hasOwnProperty(e)}class jd{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?Wd:zd:s?qd:Hd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ge(t);if(!o){let l;if(i&&(l=Yg[n]))return l;if(n==="hasOwnProperty")return Qg}const a=Reflect.get(t,n,Je(t)?t:r);return(er(n)?Rd.has(n):Gg(n))||(o||gt(t,"get",n),s)?a:Je(a)?i&&$l(n)?a:a.value:Fe(a)?o?Zd(a):qs(a):a}}class Ud extends jd{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=Vn(s);if(!Lt(r)&&!Vn(r)&&(s=Ee(s),r=Ee(r)),!ge(t)&&Je(s)&&!Je(r))return l?!1:(s.value=r,!0)}const i=ge(t)&&$l(n)?Number(n)<t.length:Le(t,n),a=Reflect.set(t,n,r,Je(t)?t:o);return t===Ee(o)&&(i?Sr(r,s)&&$n(t,"set",n,r,s):$n(t,"add",n,r)),a}deleteProperty(t,n){const r=Le(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&$n(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!er(n)||!Rd.has(n))&&gt(t,"has",n),r}ownKeys(t){return gt(t,"iterate",ge(t)?"length":Xr),Reflect.ownKeys(t)}}class Bd extends jd{constructor(t=!1){super(!0,t)}set(t,n){return We.NODE_ENV!=="production"&&rn(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return We.NODE_ENV!=="production"&&rn(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Xg=new Ud,Jg=new Bd,eb=new Ud(!0),tb=new Bd(!0),zl=e=>e,sa=e=>Reflect.getPrototypeOf(e);function nb(e,t,n){return function(...r){const o=this.__v_raw,s=Ee(o),i=Kr(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=o[e](...r),c=n?zl:t?ua:Et;return!t&&gt(s,"iterate",l?Fl:Xr),{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 ia(e){return function(...t){if(We.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";rn(`${Gr(e)} operation ${n}failed: target is readonly.`,Ee(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function rb(e,t){const n={get(o){const s=this.__v_raw,i=Ee(s),a=Ee(o);e||(Sr(o,a)&&gt(i,"get",o),gt(i,"get",a));const{has:l}=sa(i),u=t?zl:e?ua:Et;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&&gt(Ee(o),"iterate",Xr),Reflect.get(o,"size",o)},has(o){const s=this.__v_raw,i=Ee(s),a=Ee(o);return e||(Sr(o,a)&&gt(i,"has",o),gt(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=Ee(a),u=t?zl:e?ua:Et;return!e&&gt(l,"iterate",Xr),a.forEach((c,d)=>o.call(s,u(c),u(d),i))}};return at(n,e?{add:ia("add"),set:ia("set"),delete:ia("delete"),clear:ia("clear")}:{add(o){!t&&!Lt(o)&&!Vn(o)&&(o=Ee(o));const s=Ee(this);return sa(s).has.call(s,o)||(s.add(o),$n(s,"add",o,o)),this},set(o,s){!t&&!Lt(s)&&!Vn(s)&&(s=Ee(s));const i=Ee(this),{has:a,get:l}=sa(i);let u=a.call(i,o);u?We.NODE_ENV!=="production"&&Fd(i,a,o):(o=Ee(o),u=a.call(i,o));const c=l.call(i,o);return i.set(o,s),u?Sr(s,c)&&$n(i,"set",o,s,c):$n(i,"add",o,s),this},delete(o){const s=Ee(this),{has:i,get:a}=sa(s);let l=i.call(s,o);l?We.NODE_ENV!=="production"&&Fd(s,i,o):(o=Ee(o),l=i.call(s,o));const u=a?a.call(s,o):void 0,c=s.delete(o);return l&&$n(s,"delete",o,void 0,u),c},clear(){const o=Ee(this),s=o.size!==0,i=We.NODE_ENV!=="production"?Kr(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&$n(o,"clear",void 0,void 0,i),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=nb(o,e,t)}),n}function aa(e,t){const n=rb(e,t);return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Le(n,o)&&o in r?n:r,o,s)}const ob={get:aa(!1,!1)},sb={get:aa(!1,!0)},ib={get:aa(!0,!1)},ab={get:aa(!0,!0)};function Fd(e,t,n){const r=Ee(n);if(r!==n&&t.call(e,r)){const o=Dl(e);rn(`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,qd=new WeakMap,zd=new WeakMap,Wd=new WeakMap;function lb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ub(e){return e.__v_skip||!Object.isExtensible(e)?0:lb(Dl(e))}function qs(e){return Vn(e)?e:la(e,!1,Xg,ob,Hd)}function cb(e){return la(e,!1,eb,sb,qd)}function Zd(e){return la(e,!0,Jg,ib,zd)}function Mn(e){return la(e,!0,tb,ab,Wd)}function la(e,t,n,r,o){if(!Fe(e))return We.NODE_ENV!=="production"&&rn(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=ub(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 _n(e){return Vn(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function Vn(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function Ro(e){return e?!!e.__v_raw:!1}function Ee(e){const t=e&&e.__v_raw;return t?Ee(t):e}function Nr(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&Vs(e,"__v_skip",!0),e}const Et=e=>Fe(e)?qs(e):e,ua=e=>Fe(e)?Zd(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function j(e){return Yd(e,!1)}function db(e){return Yd(e,!0)}function Yd(e,t){return Je(e)?e:new fb(e,t)}class fb{constructor(t,n){this.dep=new Bl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ee(t),this._value=n?t:Et(t),this.__v_isShallow=n}get value(){return We.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||Lt(t)||Vn(t);t=r?t:Ee(t),Sr(t,n)&&(this._rawValue=t,this._value=r?t:Et(t),We.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function b(e){return Je(e)?e.value:e}function Pr(e){return _e(e)?e():b(e)}const hb={get:(e,t,n)=>t==="__v_raw"?e:b(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Je(o)&&!Je(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Kd(e){return _n(e)?e:new Proxy(e,hb)}function Gd(e){We.NODE_ENV!=="production"&&!Ro(e)&&rn("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]=Qd(e,n);return t}class pb{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 Zg(Ee(this._object),this._key)}}class mb{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 Wl(e,t,n){return Je(e)?e:_e(e)?new mb(e):Fe(e)&&arguments.length>1?Qd(e,t,n):j(e)}function Qd(e,t,n){const r=e[t];return Je(r)?r:new pb(e,t,n)}class gb{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Bl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return Pd(this,!0),!0}get value(){const t=We.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Dd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):We.NODE_ENV!=="production"&&rn("Write operation failed: computed value is readonly")}}function bb(e,t,n=!1){let r,o;return _e(e)?r=e:(r=e.get,o=e.set),new gb(r,o,n)}const ca={},da=new WeakMap;let Jr;function vb(e,t=!1,n=Jr){if(n){let r=da.get(n);r||da.set(n,r=[]),r.push(e)}else We.NODE_ENV!=="production"&&!t&&rn("onWatcherCleanup() was called when there was no active watcher to associate with.")}function yb(e,t,n=ze){const{immediate:r,deep:o,once:s,scheduler:i,augmentJob:a,call:l}=n,u=I=>{(n.onWarn||rn)("Invalid watch source: ",I,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=I=>o?I:Lt(I)||o===!1||o===0?Tr(I,1):Tr(I);let d,f,h,m,y=!1,x=!1;if(Je(e)?(f=()=>e.value,y=Lt(e)):_n(e)?(f=()=>c(e),y=!0):ge(e)?(x=!0,y=e.some(I=>_n(I)||Lt(I)),f=()=>e.map(I=>{if(Je(I))return I.value;if(_n(I))return c(I);if(_e(I))return l?l(I,2):I();We.NODE_ENV!=="production"&&u(I)})):_e(e)?t?f=l?()=>l(e,2):e:f=()=>{if(h){yn();try{h()}finally{wn()}}const I=Jr;Jr=d;try{return l?l(e,3,[m]):e(m)}finally{Jr=I}}:(f=mt,We.NODE_ENV!=="production"&&u(e)),t&&o){const I=f,V=o===!0?1/0:o;f=()=>Tr(I(),V)}const P=Od(),C=()=>{d.stop(),P&&P.active&&Tl(P.effects,d)};if(s&&t){const I=t;t=(...V)=>{I(...V),C()}}let U=x?new Array(e.length).fill(ca):ca;const M=I=>{if(!(!(d.flags&1)||!d.dirty&&!I))if(t){const V=d.run();if(o||y||(x?V.some((E,O)=>Sr(E,U[O])):Sr(V,U))){h&&h();const E=Jr;Jr=d;try{const O=[V,U===ca?void 0:x&&U[0]===ca?[]:U,m];U=V,l?l(t,3,O):t(...O)}finally{Jr=E}}}else d.run()};return a&&a(M),d=new Sd(f),d.scheduler=i?()=>i(M,!1):M,m=I=>vb(I,!1,d),h=d.onStop=()=>{const I=da.get(d);if(I){if(l)l(I,4);else for(const V of I)V();da.delete(d)}},We.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?r?M(!0):U=d.run():i?i(M.bind(null,!0),!0):d.run(),C.pause=d.pause.bind(d),C.resume=d.resume.bind(d),C.stop=C,C}function Tr(e,t=1/0,n){if(t<=0||!Fe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Je(e))Tr(e.value,t,n);else if(ge(e))for(let r=0;r<e.length;r++)Tr(e[r],t,n);else if(vd(e)||Kr(e))e.forEach(r=>{Tr(r,t,n)});else if(wd(e)){for(const r in e)Tr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Tr(e[r],t,n)}return e}var D={};const eo=[];function fa(e){eo.push(e)}function ha(){eo.pop()}let Zl=!1;function G(e,...t){if(Zl)return;Zl=!0,yn();const n=eo.length?eo[eo.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=wb();if(r)jo(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 <${Ia(n,s.type)}>`).join(`
7
7
  `),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
8
8
  `,..._b(o)),console.warn(...s)}wn(),Zl=!1}function wb(){let e=eo[eo.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 _b(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
9
- `],...Eb(n))}),t}function Eb({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Ia(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...kb(e.props),s]:[o+s]}function kb(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Xd(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Xd(e,t,n){return nt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Je(t)?(t=Xd(e,Ee(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):_e(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ee(t),n?t:[`${e}=`,t])}function xb(e,t){D.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?G(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&G(`${t} is NaN - the duration expression might be incorrect.`))}const Yl={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 jo(e,t,n,r){try{return r?e(...r):e()}catch(o){zs(o,t,n)}}function En(e,t,n,r){if(_e(e)){const o=jo(e,t,n,r);return o&&Il(o)&&o.catch(s=>{zs(s,t,n)}),o}if(ge(e)){const o=[];for(let s=0;s<e.length;s++)o.push(En(e[s],t,n,r));return o}else D.NODE_ENV!=="production"&&G(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function zs(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=D.NODE_ENV!=="production"?Yl[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){yn(),jo(s,null,10,[e,l,u]),wn();return}}Ab(e,n,o,r,i)}function Ab(e,t,n,r=!0,o=!1){if(D.NODE_ENV!=="production"){const s=Yl[t];if(n&&fa(n),G(`Unhandled error${s?` during execution of ${s}`:""}`),n&&ha(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}const Rt=[];let Ln=-1;const Uo=[];let Ir=null,Bo=0;const Jd=Promise.resolve();let pa=null;const Cb=100;function ma(e){const t=pa||Jd;return e?t.then(this?e.bind(this):e):t}function Ob(e){let t=Ln+1,n=Rt.length;for(;t<n;){const r=t+n>>>1,o=Rt[r],s=Ws(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function ga(e){if(!(e.flags&1)){const t=Ws(e),n=Rt[Rt.length-1];!n||!(e.flags&2)&&t>=Ws(n)?Rt.push(e):Rt.splice(Ob(t),0,e),e.flags|=1,ef()}}function ef(){pa||(pa=Jd.then(of))}function tf(e){ge(e)?Uo.push(...e):Ir&&e.id===-1?Ir.splice(Bo+1,0,e):e.flags&1||(Uo.push(e),e.flags|=1),ef()}function nf(e,t,n=Ln+1){for(D.NODE_ENV!=="production"&&(t=t||new Map);n<Rt.length;n++){const r=Rt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||D.NODE_ENV!=="production"&&Kl(t,r))continue;Rt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function rf(e){if(Uo.length){const t=[...new Set(Uo)].sort((n,r)=>Ws(n)-Ws(r));if(Uo.length=0,Ir){Ir.push(...t);return}for(Ir=t,D.NODE_ENV!=="production"&&(e=e||new Map),Bo=0;Bo<Ir.length;Bo++){const n=Ir[Bo];D.NODE_ENV!=="production"&&Kl(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Ir=null,Bo=0}}const Ws=e=>e.id==null?e.flags&2?-1:1/0:e.id;function of(e){D.NODE_ENV!=="production"&&(e=e||new Map);const t=D.NODE_ENV!=="production"?n=>Kl(e,n):mt;try{for(Ln=0;Ln<Rt.length;Ln++){const n=Rt[Ln];if(n&&!(n.flags&8)){if(D.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),jo(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Ln<Rt.length;Ln++){const n=Rt[Ln];n&&(n.flags&=-2)}Ln=-1,Rt.length=0,rf(e),pa=null,(Rt.length||Uo.length)&&of(e)}}function Kl(e,t){const n=e.get(t)||0;if(n>Cb){const r=t.i,o=r&&Eu(r.type);return zs(`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 kn=!1;const ba=new Map;D.NODE_ENV!=="production"&&(Ls().__VUE_HMR_RUNTIME__={createRecord:Gl(sf),rerender:Gl(Pb),reload:Gl(Tb)});const to=new Map;function Sb(e){const t=e.type.__hmrId;let n=to.get(t);n||(sf(t,e.type),n=to.get(t)),n.instances.add(e)}function Nb(e){to.get(e.type.__hmrId).instances.delete(e)}function sf(e,t){return to.has(e)?!1:(to.set(e,{initialDef:va(t),instances:new Set}),!0)}function va(e){return gh(e)?e.__vccOpts:e}function Pb(e,t){const n=to.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,va(r.type).render=t),r.renderCache=[],kn=!0,r.update(),kn=!1}))}function Tb(e,t){const n=to.get(e);if(!n)return;t=va(t),af(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=va(s.type);let a=ba.get(i);a||(i!==n.initialDef&&af(i,t),ba.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?ga(()=>{kn=!0,s.parent.update(),kn=!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)}tf(()=>{ba.clear()})}function af(e,t){it(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Gl(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 Rn,Zs=[],Ql=!1;function Ys(e,...t){Rn?Rn.emit(e,...t):Ql||Zs.push({event:e,args:t})}function lf(e,t){var n,r;Rn=e,Rn?(Rn.enabled=!0,Zs.forEach(({event:o,args:s})=>Rn.emit(o,...s)),Zs=[]):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=>{lf(s,t)}),setTimeout(()=>{Rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ql=!0,Zs=[])},3e3)):(Ql=!0,Zs=[])}function Ib(e,t){Ys("app:init",e,t,{Fragment:de,Text:ti,Comment:lt,Static:ni})}function Db(e){Ys("app:unmount",e)}const $b=Xl("component:added"),uf=Xl("component:updated"),Mb=Xl("component:removed"),Vb=e=>{Rn&&typeof Rn.cleanupBuffer=="function"&&!Rn.cleanupBuffer(e)&&Mb(e)};/*! #__NO_SIDE_EFFECTS__ */function Xl(e){return t=>{Ys(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Lb=cf("perf:start"),Rb=cf("perf:end");function cf(e){return(t,n,r)=>{Ys(e,t.appContext.app,t.uid,t,n,r)}}function jb(e,t,n){Ys("component:emit",e.appContext.app,e,t,n)}let ct=null,df=null;function ya(e){const t=ct;return ct=e,df=e&&e.type.__scopeId||null,t}function k(e,t=ct,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&sh(-1);const s=ya(t);let i;try{i=e(...o)}finally{ya(s),r._d&&sh(1)}return D.NODE_ENV!=="production"&&uf(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function ff(e){Sg(e)&&G("Do not use built-in directive ids as custom directive id: "+e)}function no(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&&(yn(),En(l,n,8,[e.el,a,e,t]),wn())}}const hf=Symbol("_vte"),pf=e=>e.__isTeleport,ro=e=>e&&(e.disabled||e.disabled===""),mf=e=>e&&(e.defer||e.defer===""),gf=e=>typeof SVGElement<"u"&&e instanceof SVGElement,bf=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Jl=(e,t)=>{const n=e&&e.to;if(nt(n))if(t){const r=t(n);return D.NODE_ENV!=="production"&&!r&&!ro(e)&&G(`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 D.NODE_ENV!=="production"&&G("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return D.NODE_ENV!=="production"&&!n&&!ro(e)&&G(`Invalid Teleport target: ${n}`),n},vf={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:m,createText:y,createComment:x}}=u,P=ro(t.props);let{shapeFlag:C,children:U,dynamicChildren:M}=t;if(D.NODE_ENV!=="production"&&kn&&(l=!1,M=null),e==null){const I=t.el=D.NODE_ENV!=="production"?x("teleport start"):y(""),V=t.anchor=D.NODE_ENV!=="production"?x("teleport end"):y("");h(I,n,r),h(V,n,r);const E=(T,A)=>{C&16&&(o&&o.isCE&&(o.ce._teleportTarget=T),c(U,T,A,o,s,i,a,l))},O=()=>{const T=t.target=Jl(t.props,m),A=yf(T,t,y,h);T?(i!=="svg"&&gf(T)?i="svg":i!=="mathml"&&bf(T)&&(i="mathml"),P||(E(T,A),_a(t,!1))):D.NODE_ENV!=="production"&&!P&&G("Invalid Teleport target on mount:",T,`(${typeof T})`)};P&&(E(n,V),_a(t,!0)),mf(t.props)?(t.el.__isMounted=!1,Bt(()=>{O(),delete t.el.__isMounted},s)):O()}else{if(mf(t.props)&&e.el.__isMounted===!1){Bt(()=>{vf.process(e,t,n,r,o,s,i,a,l,u)},s);return}t.el=e.el,t.targetStart=e.targetStart;const I=t.anchor=e.anchor,V=t.target=e.target,E=t.targetAnchor=e.targetAnchor,O=ro(e.props),T=O?n:V,A=O?I:E;if(i==="svg"||gf(V)?i="svg":(i==="mathml"||bf(V))&&(i="mathml"),M?(f(e.dynamicChildren,M,T,o,s,i,a),ei(e,t,D.NODE_ENV==="production")):l||d(e,t,T,A,o,s,i,a,!1),P)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wa(t,n,I,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=Jl(t.props,m);R?wa(t,R,null,u,0):D.NODE_ENV!=="production"&&G("Invalid Teleport target on update:",V,`(${typeof V})`)}else O&&wa(t,V,E,u,1);_a(t,P)}},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||!ro(f);for(let m=0;m<a.length;m++){const y=a[m];r(y,t,n,h,!!y.dynamicChildren)}}},move:wa,hydrate:Ub};function wa(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||ro(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function Ub(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=Jl(t.props,l);if(f){const h=ro(t.props),m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||yf(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}_a(t,h)}return t.anchor&&i(t.anchor)}const Bb=vf;function _a(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 yf(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[hf]=s,e&&(r(o,e),r(s,e)),s}const Dr=Symbol("_leaveCb"),Ea=Symbol("_enterCb");function Fb(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ue(()=>{e.isMounted=!0}),nu(()=>{e.isUnmounting=!0}),e}const on=[Function,Array],wf={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:on,onEnter:on,onAfterEnter:on,onEnterCancelled:on,onBeforeLeave:on,onLeave:on,onAfterLeave:on,onLeaveCancelled:on,onBeforeAppear:on,onAppear:on,onAfterAppear:on,onAppearCancelled:on},_f=e=>{const t=e.subTree;return t.component?_f(t.component):t},Hb={name:"BaseTransition",props:wf,setup(e,{slots:t}){const n=Pa(),r=Fb();return()=>{const o=t.default&&Af(t.default(),!0);if(!o||!o.length)return;const s=Ef(o),i=Ee(e),{mode:a}=i;if(D.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&G(`invalid <transition> mode: ${a}`),r.isLeaving)return tu(s);const l=xf(s);if(!l)return tu(s);let u=eu(l,i,r,n,d=>u=d);l.type!==lt&&Ks(l,u);let c=n.subTree&&xf(n.subTree);if(c&&c.type!==lt&&!lo(l,c)&&_f(n).type!==lt){let d=eu(c,i,r,n);if(Ks(c,d),a==="out-in"&&l.type!==lt)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},tu(s);a==="in-out"&&l.type!==lt?d.delayLeave=(f,h,m)=>{const y=kf(r,c);y[String(c.key)]=c,f[Dr]=()=>{h(),f[Dr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function Ef(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==lt){if(D.NODE_ENV!=="production"&&n){G("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,D.NODE_ENV==="production")break}}return t}const qb=Hb;function kf(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 eu(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:m,onLeaveCancelled:y,onBeforeAppear:x,onAppear:P,onAfterAppear:C,onAppearCancelled:U}=t,M=String(e.key),I=kf(n,e),V=(T,A)=>{T&&En(T,r,9,A)},E=(T,A)=>{const R=A[1];V(T,A),ge(T)?T.every(B=>B.length<=1)&&R():T.length<=1&&R()},O={mode:i,persisted:a,beforeEnter(T){let A=l;if(!n.isMounted)if(s)A=x||l;else return;T[Dr]&&T[Dr](!0);const R=I[M];R&&lo(e,R)&&R.el[Dr]&&R.el[Dr](),V(A,[T])},enter(T){let A=u,R=c,B=d;if(!n.isMounted)if(s)A=P||u,R=C||c,B=U||d;else return;let q=!1;const be=T[Ea]=pe=>{q||(q=!0,pe?V(B,[T]):V(R,[T]),O.delayedLeave&&O.delayedLeave(),T[Ea]=void 0)};A?E(A,[T,be]):be()},leave(T,A){const R=String(e.key);if(T[Ea]&&T[Ea](!0),n.isUnmounting)return A();V(f,[T]);let B=!1;const q=T[Dr]=be=>{B||(B=!0,A(),be?V(y,[T]):V(m,[T]),T[Dr]=void 0,I[R]===e&&delete I[R])};I[R]=e,h?E(h,[T,q]):q()},clone(T){const A=eu(T,t,n,r,o);return o&&o(A),A}};return O}function tu(e){if(Qs(e))return e=xn(e),e.children=null,e}function xf(e){if(!Qs(e))return pf(e.type)&&e.children?Ef(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&&_e(n.default))return n.default()}}function Ks(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ks(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 Af(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===de?(i.patchFlag&128&&o++,r=r.concat(Af(i.children,t,a))):(t||i.type!==lt)&&r.push(a!=null?xn(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 le(e,t){return _e(e)?it({name:e.name},t,{setup:e}):e}function Cf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const zb=new WeakSet;function Gs(e,t,n,r,o=!1){if(ge(e)){e.forEach((m,y)=>Gs(m,t&&(ge(t)?t[y]:t),n,r,o));return}if(Fo(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Gs(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?_u(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(D.NODE_ENV!=="production"&&!a){G("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=Ee(d),h=d===ze?()=>!1:m=>D.NODE_ENV!=="production"&&(Le(f,m)&&!Je(f[m])&&G(`Template ref "${m}" used on a non-ref value. It will not work in the production build.`),zb.has(f[m]))?!1:Le(f,m);if(u!=null&&u!==l&&(nt(u)?(c[u]=null,h(u)&&(d[u]=null)):Je(u)&&(u.value=null)),_e(l))jo(l,a,12,[i,c]);else{const m=nt(l),y=Je(l);if(m||y){const x=()=>{if(e.f){const P=m?h(l)?d[l]:c[l]:l.value;o?ge(P)&&Tl(P,s):ge(P)?P.includes(s)||P.push(s):m?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else m?(c[l]=i,h(l)&&(d[l]=i)):y?(l.value=i,e.k&&(c[e.k]=i)):D.NODE_ENV!=="production"&&G("Invalid template ref type:",l,`(${typeof l})`)};i?(x.id=-1,Bt(x,n)):x()}else D.NODE_ENV!=="production"&&G("Invalid template ref type:",l,`(${typeof l})`)}}Ls().requestIdleCallback,Ls().cancelIdleCallback;const Fo=e=>!!e.type.__asyncLoader,Qs=e=>e.type.__isKeepAlive;function Wb(e,t){Of(e,"a",t)}function Zb(e,t){Of(e,"da",t)}function Of(e,t,n=dt){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ka(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Qs(o.parent.vnode)&&Yb(r,t,n,o),o=o.parent}}function Yb(e,t,n,r){const o=ka(t,e,r,!0);jt(()=>{Tl(r[t],o)},n)}function ka(e,t,n=dt,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{yn();const a=si(n),l=En(t,n,e,i);return a(),wn(),l});return r?o.unshift(s):o.push(s),s}else if(D.NODE_ENV!=="production"){const o=Qr(Yl[e].replace(/ hook$/,""));G(`${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 nr=e=>(t,n=dt)=>{(!ii||e==="sp")&&ka(e,(...r)=>t(...r),n)},Kb=nr("bm"),Ue=nr("m"),Gb=nr("bu"),Qb=nr("u"),nu=nr("bum"),jt=nr("um"),Xb=nr("sp"),Jb=nr("rtg"),ev=nr("rtc");function tv(e,t=dt){ka("ec",e,t)}const nv="components",Sf=Symbol.for("v-ndc");function ru(e){return nt(e)?rv(nv,e,!1)||e:e||Sf}function rv(e,t,n=!0,r=!1){const o=ct||dt;if(o){const s=o.type;{const a=Eu(s,!1);if(a&&(a===t||a===Vt(t)||a===Gr(Vt(t))))return s}const i=Nf(o[e]||s[e],t)||Nf(o.appContext[e],t);return!i&&r?s:(D.NODE_ENV!=="production"&&n&&!i&&G(`Failed to resolve ${e.slice(0,-1)}: ${t}
10
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else D.NODE_ENV!=="production"&&G(`resolve${Gr(e.slice(0,-1))} can only be used in render() or setup().`)}function Nf(e,t){return e&&(e[t]||e[Vt(t)]||e[Gr(Vt(t))])}function rt(e,t,n,r){let o;const s=n,i=ge(e);if(i||nt(e)){const a=i&&_n(e);let l=!1,u=!1;a&&(l=!Lt(e),u=Vn(e),e=oa(e)),o=new Array(e.length);for(let c=0,d=e.length;c<d;c++)o[c]=t(l?u?ua(Et(e[c])):Et(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){D.NODE_ENV!=="production"&&!Number.isInteger(e)&&G(`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(Fe(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 xa(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 Nt(e,t,n={},r,o){if(ct.ce||ct.parent&&Fo(ct.parent)&&ct.parent.ce)return t!=="default"&&(n.name=t),p(),H(de,null,[v("slot",n,r)],64);let s=e[t];D.NODE_ENV!=="production"&&s&&s.length>1&&(G("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),p();const i=s&&Pf(s(n)),a=n.key||i&&i.key,l=H(de,{key:(a&&!er(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Pf(e){return e.some(t=>ao(t)?!(t.type===lt||t.type===de&&!Pf(t.children)):!0)?e:null}const ou=e=>e?fh(e)?_u(e):ou(e.parent):null,oo=it(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>D.NODE_ENV!=="production"?Mn(e.props):e.props,$attrs:e=>D.NODE_ENV!=="production"?Mn(e.attrs):e.attrs,$slots:e=>D.NODE_ENV!=="production"?Mn(e.slots):e.slots,$refs:e=>D.NODE_ENV!=="production"?Mn(e.refs):e.refs,$parent:e=>ou(e.parent),$root:e=>ou(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mf(e),$forceUpdate:e=>e.f||(e.f=()=>{ga(e.update)}),$nextTick:e=>e.n||(e.n=ma.bind(e.proxy)),$watch:e=>Vv.bind(e)}),su=e=>e==="_"||e==="$",iu=(e,t)=>e!==ze&&!e.__isScriptSetup&&Le(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(D.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(iu(r,t))return i[t]=1,r[t];if(o!==ze&&Le(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&Le(u,t))return i[t]=3,s[t];if(n!==ze&&Le(n,t))return i[t]=4,n[t];au&&(i[t]=0)}}const c=oo[t];let d,f;if(c)return t==="$attrs"?(gt(e.attrs,"get",""),D.NODE_ENV!=="production"&&Sa()):D.NODE_ENV!=="production"&&t==="$slots"&&gt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==ze&&Le(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Le(f,t))return f[t];D.NODE_ENV!=="production"&&ct&&(!nt(t)||t.indexOf("__v")!==0)&&(o!==ze&&su(t[0])&&Le(o,t)?G(`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===ct&&G(`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 iu(o,t)?(o[t]=n,!0):D.NODE_ENV!=="production"&&o.__isScriptSetup&&Le(o,t)?(G(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==ze&&Le(r,t)?(r[t]=n,!0):Le(e.props,t)?(D.NODE_ENV!=="production"&&G(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(D.NODE_ENV!=="production"&&G(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(D.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&&Le(e,i)||iu(t,i)||(a=s[0])&&Le(a,i)||Le(r,i)||Le(oo,i)||Le(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};D.NODE_ENV!=="production"&&(Tf.ownKeys=e=>(G("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 ov(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(oo).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>oo[n](e),set:mt})}),t}function sv(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:mt})})}function iv(e){const{ctx:t,setupState:n}=e;Object.keys(Ee(n)).forEach(r=>{if(!n.__isScriptSetup){if(su(r[0])){G(`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:mt})}})}function If(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function av(){const e=Object.create(null);return(t,n)=>{e[n]?G(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let au=!0;function lv(e){const t=Mf(e),n=e.proxy,r=e.ctx;au=!1,t.beforeCreate&&Df(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:m,activated:y,deactivated:x,beforeDestroy:P,beforeUnmount:C,destroyed:U,unmounted:M,render:I,renderTracked:V,renderTriggered:E,errorCaptured:O,serverPrefetch:T,expose:A,inheritAttrs:R,components:B,directives:q,filters:be}=t,pe=D.NODE_ENV!=="production"?av():null;if(D.NODE_ENV!=="production"){const[oe]=e.propsOptions;if(oe)for(const ue in oe)pe("Props",ue)}if(u&&uv(u,r,pe),i)for(const oe in i){const ue=i[oe];_e(ue)?(D.NODE_ENV!=="production"?Object.defineProperty(r,oe,{value:ue.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[oe]=ue.bind(n),D.NODE_ENV!=="production"&&pe("Methods",oe)):D.NODE_ENV!=="production"&&G(`Method "${oe}" has type "${typeof ue}" in the component definition. Did you reference the function correctly?`)}if(o){D.NODE_ENV!=="production"&&!_e(o)&&G("The data option must be a function. Plain object usage is no longer supported.");const oe=o.call(n,n);if(D.NODE_ENV!=="production"&&Il(oe)&&G("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Fe(oe))D.NODE_ENV!=="production"&&G("data() should return an object.");else if(e.data=qs(oe),D.NODE_ENV!=="production")for(const ue in oe)pe("Data",ue),su(ue[0])||Object.defineProperty(r,ue,{configurable:!0,enumerable:!0,get:()=>oe[ue],set:mt})}if(au=!0,s)for(const oe in s){const ue=s[oe],Be=_e(ue)?ue.bind(n,n):_e(ue.get)?ue.get.bind(n,n):mt;D.NODE_ENV!=="production"&&Be===mt&&G(`Computed property "${oe}" has no getter.`);const Qe=!_e(ue)&&_e(ue.set)?ue.set.bind(n):D.NODE_ENV!=="production"?()=>{G(`Write operation failed: computed property "${oe}" is readonly.`)}:mt,ot=Z({get:Be,set:Qe});Object.defineProperty(r,oe,{enumerable:!0,configurable:!0,get:()=>ot.value,set:$t=>ot.value=$t}),D.NODE_ENV!=="production"&&pe("Computed",oe)}if(a)for(const oe in a)$f(a[oe],r,n,oe);if(l){const oe=_e(l)?l.call(n):l;Reflect.ownKeys(oe).forEach(ue=>{Yt(ue,oe[ue])})}c&&Df(c,e,"c");function he(oe,ue){ge(ue)?ue.forEach(Be=>oe(Be.bind(n))):ue&&oe(ue.bind(n))}if(he(Kb,d),he(Ue,f),he(Gb,h),he(Qb,m),he(Wb,y),he(Zb,x),he(tv,O),he(ev,V),he(Jb,E),he(nu,C),he(jt,M),he(Xb,T),ge(A))if(A.length){const oe=e.exposed||(e.exposed={});A.forEach(ue=>{Object.defineProperty(oe,ue,{get:()=>n[ue],set:Be=>n[ue]=Be})})}else e.exposed||(e.exposed={});I&&e.render===mt&&(e.render=I),R!=null&&(e.inheritAttrs=R),B&&(e.components=B),q&&(e.directives=q),T&&Cf(e)}function uv(e,t,n=mt){ge(e)&&(e=lu(e));for(const r in e){const o=e[r];let s;Fe(o)?"default"in o?s=fe(o.from||r,o.default,!0):s=fe(o.from||r):s=fe(o),Je(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,D.NODE_ENV!=="production"&&n("Inject",r)}}function Df(e,t,n){En(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $f(e,t,n,r){let o=r.includes(".")?Xf(n,r):()=>n[r];if(nt(e)){const s=t[e];_e(s)?Ze(o,s):D.NODE_ENV!=="production"&&G(`Invalid watch handler specified by key "${e}"`,s)}else if(_e(e))Ze(o,e.bind(n));else if(Fe(e))if(ge(e))e.forEach(s=>$f(s,t,n,r));else{const s=_e(e.handler)?e.handler.bind(n):t[e.handler];_e(s)?Ze(o,s,e):D.NODE_ENV!=="production"&&G(`Invalid watch handler specified by key "${e.handler}"`,s)}else D.NODE_ENV!=="production"&&G(`Invalid watch option: "${r}"`,e)}function Mf(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=>Aa(l,u,i,!0)),Aa(l,t,i)),Fe(t)&&s.set(t,l),l}function Aa(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Aa(e,s,n,!0),o&&o.forEach(i=>Aa(e,i,n,!0));for(const i in t)if(r&&i==="expose")D.NODE_ENV!=="production"&&G('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=cv[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const cv={data:Vf,props:Lf,emits:Lf,methods:Xs,computed:Xs,beforeCreate:Ut,created:Ut,beforeMount:Ut,mounted:Ut,beforeUpdate:Ut,updated:Ut,beforeDestroy:Ut,beforeUnmount:Ut,destroyed:Ut,unmounted:Ut,activated:Ut,deactivated:Ut,errorCaptured:Ut,serverPrefetch:Ut,components:Xs,directives:Xs,watch:fv,provide:Vf,inject:dv};function Vf(e,t){return t?e?function(){return it(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function dv(e,t){return Xs(lu(e),lu(t))}function lu(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Xs(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),If(e),If(t??{})):t}function fv(e,t){if(!e)return t;if(!t)return e;const n=it(Object.create(null),e);for(const r in t)n[r]=Ut(e[r],t[r]);return n}function Rf(){return{app:null,config:{isNativeTag:Cg,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 hv=0;function pv(e,t){return function(r,o=null){_e(r)||(r=it({},r)),o!=null&&!Fe(o)&&(D.NODE_ENV!=="production"&&G("root props passed to app.mount() must be an object."),o=null);const s=Rf(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:hv++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:bh,get config(){return s.config},set config(c){D.NODE_ENV!=="production"&&G("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?D.NODE_ENV!=="production"&&G("Plugin has already been applied to target app."):c&&_e(c.install)?(i.add(c),c.install(u,...d)):_e(c)?(i.add(c),c(u,...d)):D.NODE_ENV!=="production"&&G('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?D.NODE_ENV!=="production"&&G("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return D.NODE_ENV!=="production"&&wu(c,s.config),d?(D.NODE_ENV!=="production"&&s.components[c]&&G(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return D.NODE_ENV!=="production"&&ff(c),d?(D.NODE_ENV!=="production"&&s.directives[c]&&G(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)D.NODE_ENV!=="production"&&G("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{D.NODE_ENV!=="production"&&c.__vue_app__&&G("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||v(r,o);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),D.NODE_ENV!=="production"&&(s.reload=()=>{const m=xn(h);m.el=null,e(m,c,f)}),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,D.NODE_ENV!=="production"&&(u._instance=h.component,Ib(u,bh)),_u(h.component)}},onUnmount(c){D.NODE_ENV!=="production"&&typeof c!="function"&&G(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(En(a,u._instance,16),e(null,u._container),D.NODE_ENV!=="production"&&(u._instance=null,Db(u)),delete u._container.__vue_app__):D.NODE_ENV!=="production"&&G("Cannot unmount an app that is not mounted.")},provide(c,d){return D.NODE_ENV!=="production"&&c in s.provides&&(Le(s.provides,c)?G(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`):G(`App already provides property with key "${String(c)}" inherited from its parent element. It will be overwritten with the new value.`)),s.provides[c]=d,u},runWithContext(c){const d=so;so=u;try{return c()}finally{so=d}}};return u}}let so=null;function Yt(e,t){if(!dt)D.NODE_ENV!=="production"&&G("provide() can only be used inside setup().");else{let n=dt.provides;const r=dt.parent&&dt.parent.provides;r===n&&(n=dt.provides=Object.create(r)),n[e]=t}}function fe(e,t,n=!1){const r=dt||ct;if(r||so){let o=so?so._context.provides:r?r.parent==null||r.ce?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&&_e(t)?t.call(r&&r.proxy):t;D.NODE_ENV!=="production"&&G(`injection "${String(e)}" not found.`)}else D.NODE_ENV!=="production"&&G("inject() can only be used inside setup() or functional components.")}function mv(){return!!(dt||ct||so)}const jf={},Uf=()=>Object.create(jf),Bf=e=>Object.getPrototypeOf(e)===jf;function gv(e,t,n,r=!1){const o={},s=Uf();e.propsDefaults=Object.create(null),Ff(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);D.NODE_ENV!=="production"&&zf(t||{},o,e),n?e.props=r?o:cb(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function bv(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vv(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=Ee(o),[l]=e.propsOptions;let u=!1;if(!(D.NODE_ENV!=="production"&&bv(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(Oa(e.emitsOptions,f))continue;const h=t[f];if(l)if(Le(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const m=Vt(f);o[m]=uu(l,a,m,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{Ff(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!Le(t,d)&&((c=Or(d))===d||!Le(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=uu(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Le(t,d))&&(delete s[d],u=!0)}u&&$n(e.attrs,"set",""),D.NODE_ENV!=="production"&&zf(t||{},o,e)}function Ff(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if($s(l))continue;const u=t[l];let c;o&&Le(o,c=Vt(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Oa(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=Ee(n),u=a||ze;for(let c=0;c<s.length;c++){const d=s[c];n[d]=uu(o,l,d,u[d],e,!Le(u,d))}}return i}function uu(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Le(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&_e(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=si(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===Or(n))&&(r=!0))}return r}const yv=new WeakMap;function Hf(e,t,n=!1){const r=n?yv:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!_e(e)){const c=d=>{l=!0;const[f,h]=Hf(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 Fe(e)&&r.set(e,Mo),Mo;if(ge(s))for(let c=0;c<s.length;c++){D.NODE_ENV!=="production"&&!nt(s[c])&&G("props must be strings when using array syntax.",s[c]);const d=Vt(s[c]);qf(d)&&(i[d]=ze)}else if(s){D.NODE_ENV!=="production"&&!Fe(s)&&G("invalid props options",s);for(const c in s){const d=Vt(c);if(qf(d)){const f=s[c],h=i[d]=ge(f)||_e(f)?{type:f}:it({},f),m=h.type;let y=!1,x=!0;if(ge(m))for(let P=0;P<m.length;++P){const C=m[P],U=_e(C)&&C.name;if(U==="Boolean"){y=!0;break}else U==="String"&&(x=!1)}else y=_e(m)&&m.name==="Boolean";h[0]=y,h[1]=x,(y||Le(h,"default"))&&a.push(d)}}}const u=[i,a];return Fe(e)&&r.set(e,u),u}function qf(e){return e[0]!=="$"&&!$s(e)?!0:(D.NODE_ENV!=="production"&&G(`Invalid prop name: "${e}" is a reserved property.`),!1)}function wv(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function zf(e,t,n){const r=Ee(t),o=n.propsOptions[0],s=Object.keys(e).map(i=>Vt(i));for(const i in o){let a=o[i];a!=null&&_v(i,r[i],a,D.NODE_ENV!=="production"?Mn(r):r,!s.includes(i))}}function _v(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){G('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:m}=kv(t,c[f]);d.push(m||""),u=h}if(!u){G(xv(e,t,d));return}}a&&!a(t,r)&&G('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Ev=Jn("String,Number,Boolean,Function,Symbol,BigInt");function kv(e,t){let n;const r=wv(t);if(r==="null")n=e===null;else if(Ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Fe(e):r==="Array"?n=ge(e):n=e instanceof t;return{valid:n,expectedType:r}}function xv(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(Gr).join(" | ")}`;const o=n[0],s=Dl(t),i=Wf(t,o),a=Wf(t,s);return n.length===1&&Zf(o)&&!Av(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Zf(s)&&(r+=`with value ${a}.`),r}function Wf(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Zf(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Av(...e){return e.some(t=>t.toLowerCase()==="boolean")}const cu=e=>e[0]==="_"||e==="$stable",du=e=>ge(e)?e.map(An):[An(e)],Cv=(e,t,n)=>{if(t._n)return t;const r=k((...o)=>(D.NODE_ENV!=="production"&&dt&&!(n===null&&ct)&&!(n&&n.root!==dt.root)&&G(`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.`),du(t(...o))),n);return r._c=!1,r},Yf=(e,t,n)=>{const r=e._ctx;for(const o in e){if(cu(o))continue;const s=e[o];if(_e(s))t[o]=Cv(o,s,r);else if(s!=null){D.NODE_ENV!=="production"&&G(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=du(s);t[o]=()=>i}}},Kf=(e,t)=>{D.NODE_ENV!=="production"&&!Qs(e.vnode)&&G("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=du(t);e.slots.default=()=>n},fu=(e,t,n)=>{for(const r in t)(n||!cu(r))&&(e[r]=t[r])},Ov=(e,t,n)=>{const r=e.slots=Uf();if(e.vnode.shapeFlag&32){const o=t.__;o&&Vs(r,"__",o,!0);const s=t._;s?(fu(r,t,n),n&&Vs(r,"_",s,!0)):Yf(t,r)}else t&&Kf(e,t)},Sv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=ze;if(r.shapeFlag&32){const a=t._;a?D.NODE_ENV!=="production"&&kn?(fu(o,t,n),$n(e,"set","$slots")):n&&a===1?s=!1:fu(o,t,n):(s=!t.$stable,Yf(t,o)),i=t}else t&&(Kf(e,t),i={default:1});if(s)for(const a in o)!cu(a)&&i[a]==null&&delete o[a]};let Js,$r;function Ho(e,t){e.appContext.config.performance&&Ca()&&$r.mark(`vue-${t}-${e.uid}`),D.NODE_ENV!=="production"&&Lb(e,t,Ca()?$r.now():Date.now())}function qo(e,t){if(e.appContext.config.performance&&Ca()){const n=`vue-${t}-${e.uid}`,r=n+":end";$r.mark(r),$r.measure(`<${Ia(e,e.type)}> ${t}`,n,r),$r.clearMarks(n),$r.clearMarks(r)}D.NODE_ENV!=="production"&&Rb(e,t,Ca()?$r.now():Date.now())}function Ca(){return Js!==void 0||(typeof window<"u"&&window.performance?(Js=!0,$r=window.performance):Js=!1),Js}function Nv(){const e=[];if(D.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.
9
+ `],...Eb(n))}),t}function Eb({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Ia(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...kb(e.props),s]:[o+s]}function kb(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Xd(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Xd(e,t,n){return nt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Je(t)?(t=Xd(e,Ee(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):_e(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ee(t),n?t:[`${e}=`,t])}function xb(e,t){D.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?G(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&G(`${t} is NaN - the duration expression might be incorrect.`))}const Yl={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 jo(e,t,n,r){try{return r?e(...r):e()}catch(o){zs(o,t,n)}}function En(e,t,n,r){if(_e(e)){const o=jo(e,t,n,r);return o&&Il(o)&&o.catch(s=>{zs(s,t,n)}),o}if(ge(e)){const o=[];for(let s=0;s<e.length;s++)o.push(En(e[s],t,n,r));return o}else D.NODE_ENV!=="production"&&G(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function zs(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=D.NODE_ENV!=="production"?Yl[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){yn(),jo(s,null,10,[e,l,u]),wn();return}}Ab(e,n,o,r,i)}function Ab(e,t,n,r=!0,o=!1){if(D.NODE_ENV!=="production"){const s=Yl[t];if(n&&fa(n),G(`Unhandled error${s?` during execution of ${s}`:""}`),n&&ha(),r)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}const Rt=[];let Ln=-1;const Uo=[];let Ir=null,Bo=0;const Jd=Promise.resolve();let pa=null;const Cb=100;function ma(e){const t=pa||Jd;return e?t.then(this?e.bind(this):e):t}function Ob(e){let t=Ln+1,n=Rt.length;for(;t<n;){const r=t+n>>>1,o=Rt[r],s=Ws(o);s<e||s===e&&o.flags&2?t=r+1:n=r}return t}function ga(e){if(!(e.flags&1)){const t=Ws(e),n=Rt[Rt.length-1];!n||!(e.flags&2)&&t>=Ws(n)?Rt.push(e):Rt.splice(Ob(t),0,e),e.flags|=1,ef()}}function ef(){pa||(pa=Jd.then(of))}function tf(e){ge(e)?Uo.push(...e):Ir&&e.id===-1?Ir.splice(Bo+1,0,e):e.flags&1||(Uo.push(e),e.flags|=1),ef()}function nf(e,t,n=Ln+1){for(D.NODE_ENV!=="production"&&(t=t||new Map);n<Rt.length;n++){const r=Rt[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||D.NODE_ENV!=="production"&&Kl(t,r))continue;Rt.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function rf(e){if(Uo.length){const t=[...new Set(Uo)].sort((n,r)=>Ws(n)-Ws(r));if(Uo.length=0,Ir){Ir.push(...t);return}for(Ir=t,D.NODE_ENV!=="production"&&(e=e||new Map),Bo=0;Bo<Ir.length;Bo++){const n=Ir[Bo];D.NODE_ENV!=="production"&&Kl(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Ir=null,Bo=0}}const Ws=e=>e.id==null?e.flags&2?-1:1/0:e.id;function of(e){D.NODE_ENV!=="production"&&(e=e||new Map);const t=D.NODE_ENV!=="production"?n=>Kl(e,n):mt;try{for(Ln=0;Ln<Rt.length;Ln++){const n=Rt[Ln];if(n&&!(n.flags&8)){if(D.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),jo(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Ln<Rt.length;Ln++){const n=Rt[Ln];n&&(n.flags&=-2)}Ln=-1,Rt.length=0,rf(e),pa=null,(Rt.length||Uo.length)&&of(e)}}function Kl(e,t){const n=e.get(t)||0;if(n>Cb){const r=t.i,o=r&&Eu(r.type);return zs(`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 kn=!1;const ba=new Map;D.NODE_ENV!=="production"&&(Ls().__VUE_HMR_RUNTIME__={createRecord:Gl(sf),rerender:Gl(Pb),reload:Gl(Tb)});const to=new Map;function Sb(e){const t=e.type.__hmrId;let n=to.get(t);n||(sf(t,e.type),n=to.get(t)),n.instances.add(e)}function Nb(e){to.get(e.type.__hmrId).instances.delete(e)}function sf(e,t){return to.has(e)?!1:(to.set(e,{initialDef:va(t),instances:new Set}),!0)}function va(e){return gh(e)?e.__vccOpts:e}function Pb(e,t){const n=to.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,va(r.type).render=t),r.renderCache=[],kn=!0,r.update(),kn=!1}))}function Tb(e,t){const n=to.get(e);if(!n)return;t=va(t),af(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=va(s.type);let a=ba.get(i);a||(i!==n.initialDef&&af(i,t),ba.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?ga(()=>{kn=!0,s.parent.update(),kn=!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)}tf(()=>{ba.clear()})}function af(e,t){at(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Gl(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 Rn,Zs=[],Ql=!1;function Ys(e,...t){Rn?Rn.emit(e,...t):Ql||Zs.push({event:e,args:t})}function lf(e,t){var n,r;Rn=e,Rn?(Rn.enabled=!0,Zs.forEach(({event:o,args:s})=>Rn.emit(o,...s)),Zs=[]):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=>{lf(s,t)}),setTimeout(()=>{Rn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ql=!0,Zs=[])},3e3)):(Ql=!0,Zs=[])}function Ib(e,t){Ys("app:init",e,t,{Fragment:de,Text:ti,Comment:lt,Static:ni})}function Db(e){Ys("app:unmount",e)}const $b=Xl("component:added"),uf=Xl("component:updated"),Mb=Xl("component:removed"),Vb=e=>{Rn&&typeof Rn.cleanupBuffer=="function"&&!Rn.cleanupBuffer(e)&&Mb(e)};/*! #__NO_SIDE_EFFECTS__ */function Xl(e){return t=>{Ys(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Lb=cf("perf:start"),Rb=cf("perf:end");function cf(e){return(t,n,r)=>{Ys(e,t.appContext.app,t.uid,t,n,r)}}function jb(e,t,n){Ys("component:emit",e.appContext.app,e,t,n)}let ct=null,df=null;function ya(e){const t=ct;return ct=e,df=e&&e.type.__scopeId||null,t}function k(e,t=ct,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&sh(-1);const s=ya(t);let i;try{i=e(...o)}finally{ya(s),r._d&&sh(1)}return D.NODE_ENV!=="production"&&uf(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function ff(e){Sg(e)&&G("Do not use built-in directive ids as custom directive id: "+e)}function no(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&&(yn(),En(l,n,8,[e.el,a,e,t]),wn())}}const hf=Symbol("_vte"),pf=e=>e.__isTeleport,ro=e=>e&&(e.disabled||e.disabled===""),mf=e=>e&&(e.defer||e.defer===""),gf=e=>typeof SVGElement<"u"&&e instanceof SVGElement,bf=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Jl=(e,t)=>{const n=e&&e.to;if(nt(n))if(t){const r=t(n);return D.NODE_ENV!=="production"&&!r&&!ro(e)&&G(`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 D.NODE_ENV!=="production"&&G("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return D.NODE_ENV!=="production"&&!n&&!ro(e)&&G(`Invalid Teleport target: ${n}`),n},vf={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:m,createText:y,createComment:x}}=u,P=ro(t.props);let{shapeFlag:C,children:U,dynamicChildren:M}=t;if(D.NODE_ENV!=="production"&&kn&&(l=!1,M=null),e==null){const I=t.el=D.NODE_ENV!=="production"?x("teleport start"):y(""),V=t.anchor=D.NODE_ENV!=="production"?x("teleport end"):y("");h(I,n,r),h(V,n,r);const E=(T,A)=>{C&16&&(o&&o.isCE&&(o.ce._teleportTarget=T),c(U,T,A,o,s,i,a,l))},O=()=>{const T=t.target=Jl(t.props,m),A=yf(T,t,y,h);T?(i!=="svg"&&gf(T)?i="svg":i!=="mathml"&&bf(T)&&(i="mathml"),P||(E(T,A),_a(t,!1))):D.NODE_ENV!=="production"&&!P&&G("Invalid Teleport target on mount:",T,`(${typeof T})`)};P&&(E(n,V),_a(t,!0)),mf(t.props)?(t.el.__isMounted=!1,Bt(()=>{O(),delete t.el.__isMounted},s)):O()}else{if(mf(t.props)&&e.el.__isMounted===!1){Bt(()=>{vf.process(e,t,n,r,o,s,i,a,l,u)},s);return}t.el=e.el,t.targetStart=e.targetStart;const I=t.anchor=e.anchor,V=t.target=e.target,E=t.targetAnchor=e.targetAnchor,O=ro(e.props),T=O?n:V,A=O?I:E;if(i==="svg"||gf(V)?i="svg":(i==="mathml"||bf(V))&&(i="mathml"),M?(f(e.dynamicChildren,M,T,o,s,i,a),ei(e,t,D.NODE_ENV==="production")):l||d(e,t,T,A,o,s,i,a,!1),P)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wa(t,n,I,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=Jl(t.props,m);R?wa(t,R,null,u,0):D.NODE_ENV!=="production"&&G("Invalid Teleport target on update:",V,`(${typeof V})`)}else O&&wa(t,V,E,u,1);_a(t,P)}},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||!ro(f);for(let m=0;m<a.length;m++){const y=a[m];r(y,t,n,h,!!y.dynamicChildren)}}},move:wa,hydrate:Ub};function wa(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||ro(c))&&l&16)for(let f=0;f<u.length;f++)o(u[f],t,n,2);d&&r(a,t,n)}function Ub(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=Jl(t.props,l);if(f){const h=ro(t.props),m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||yf(f,t,c,u),d(m&&i(m),t,f,n,r,o,s)}_a(t,h)}return t.anchor&&i(t.anchor)}const Bb=vf;function _a(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 yf(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[hf]=s,e&&(r(o,e),r(s,e)),s}const Dr=Symbol("_leaveCb"),Ea=Symbol("_enterCb");function Fb(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ue(()=>{e.isMounted=!0}),nu(()=>{e.isUnmounting=!0}),e}const on=[Function,Array],wf={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:on,onEnter:on,onAfterEnter:on,onEnterCancelled:on,onBeforeLeave:on,onLeave:on,onAfterLeave:on,onLeaveCancelled:on,onBeforeAppear:on,onAppear:on,onAfterAppear:on,onAppearCancelled:on},_f=e=>{const t=e.subTree;return t.component?_f(t.component):t},Hb={name:"BaseTransition",props:wf,setup(e,{slots:t}){const n=Pa(),r=Fb();return()=>{const o=t.default&&Af(t.default(),!0);if(!o||!o.length)return;const s=Ef(o),i=Ee(e),{mode:a}=i;if(D.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&G(`invalid <transition> mode: ${a}`),r.isLeaving)return tu(s);const l=xf(s);if(!l)return tu(s);let u=eu(l,i,r,n,d=>u=d);l.type!==lt&&Ks(l,u);let c=n.subTree&&xf(n.subTree);if(c&&c.type!==lt&&!lo(l,c)&&_f(n).type!==lt){let d=eu(c,i,r,n);if(Ks(c,d),a==="out-in"&&l.type!==lt)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},tu(s);a==="in-out"&&l.type!==lt?d.delayLeave=(f,h,m)=>{const y=kf(r,c);y[String(c.key)]=c,f[Dr]=()=>{h(),f[Dr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function Ef(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==lt){if(D.NODE_ENV!=="production"&&n){G("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(t=r,n=!0,D.NODE_ENV==="production")break}}return t}const qb=Hb;function kf(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 eu(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:m,onLeaveCancelled:y,onBeforeAppear:x,onAppear:P,onAfterAppear:C,onAppearCancelled:U}=t,M=String(e.key),I=kf(n,e),V=(T,A)=>{T&&En(T,r,9,A)},E=(T,A)=>{const R=A[1];V(T,A),ge(T)?T.every(B=>B.length<=1)&&R():T.length<=1&&R()},O={mode:i,persisted:a,beforeEnter(T){let A=l;if(!n.isMounted)if(s)A=x||l;else return;T[Dr]&&T[Dr](!0);const R=I[M];R&&lo(e,R)&&R.el[Dr]&&R.el[Dr](),V(A,[T])},enter(T){let A=u,R=c,B=d;if(!n.isMounted)if(s)A=P||u,R=C||c,B=U||d;else return;let q=!1;const be=T[Ea]=pe=>{q||(q=!0,pe?V(B,[T]):V(R,[T]),O.delayedLeave&&O.delayedLeave(),T[Ea]=void 0)};A?E(A,[T,be]):be()},leave(T,A){const R=String(e.key);if(T[Ea]&&T[Ea](!0),n.isUnmounting)return A();V(f,[T]);let B=!1;const q=T[Dr]=be=>{B||(B=!0,A(),be?V(y,[T]):V(m,[T]),T[Dr]=void 0,I[R]===e&&delete I[R])};I[R]=e,h?E(h,[T,q]):q()},clone(T){const A=eu(T,t,n,r,o);return o&&o(A),A}};return O}function tu(e){if(Qs(e))return e=xn(e),e.children=null,e}function xf(e){if(!Qs(e))return pf(e.type)&&e.children?Ef(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&&_e(n.default))return n.default()}}function Ks(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ks(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 Af(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===de?(i.patchFlag&128&&o++,r=r.concat(Af(i.children,t,a))):(t||i.type!==lt)&&r.push(a!=null?xn(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 le(e,t){return _e(e)?at({name:e.name},t,{setup:e}):e}function Cf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const zb=new WeakSet;function Gs(e,t,n,r,o=!1){if(ge(e)){e.forEach((m,y)=>Gs(m,t&&(ge(t)?t[y]:t),n,r,o));return}if(Fo(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Gs(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?_u(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(D.NODE_ENV!=="production"&&!a){G("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=Ee(d),h=d===ze?()=>!1:m=>D.NODE_ENV!=="production"&&(Le(f,m)&&!Je(f[m])&&G(`Template ref "${m}" used on a non-ref value. It will not work in the production build.`),zb.has(f[m]))?!1:Le(f,m);if(u!=null&&u!==l&&(nt(u)?(c[u]=null,h(u)&&(d[u]=null)):Je(u)&&(u.value=null)),_e(l))jo(l,a,12,[i,c]);else{const m=nt(l),y=Je(l);if(m||y){const x=()=>{if(e.f){const P=m?h(l)?d[l]:c[l]:l.value;o?ge(P)&&Tl(P,s):ge(P)?P.includes(s)||P.push(s):m?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else m?(c[l]=i,h(l)&&(d[l]=i)):y?(l.value=i,e.k&&(c[e.k]=i)):D.NODE_ENV!=="production"&&G("Invalid template ref type:",l,`(${typeof l})`)};i?(x.id=-1,Bt(x,n)):x()}else D.NODE_ENV!=="production"&&G("Invalid template ref type:",l,`(${typeof l})`)}}Ls().requestIdleCallback,Ls().cancelIdleCallback;const Fo=e=>!!e.type.__asyncLoader,Qs=e=>e.type.__isKeepAlive;function Wb(e,t){Of(e,"a",t)}function Zb(e,t){Of(e,"da",t)}function Of(e,t,n=dt){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ka(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Qs(o.parent.vnode)&&Yb(r,t,n,o),o=o.parent}}function Yb(e,t,n,r){const o=ka(t,e,r,!0);jt(()=>{Tl(r[t],o)},n)}function ka(e,t,n=dt,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{yn();const a=si(n),l=En(t,n,e,i);return a(),wn(),l});return r?o.unshift(s):o.push(s),s}else if(D.NODE_ENV!=="production"){const o=Qr(Yl[e].replace(/ hook$/,""));G(`${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 nr=e=>(t,n=dt)=>{(!ii||e==="sp")&&ka(e,(...r)=>t(...r),n)},Kb=nr("bm"),Ue=nr("m"),Gb=nr("bu"),Qb=nr("u"),nu=nr("bum"),jt=nr("um"),Xb=nr("sp"),Jb=nr("rtg"),ev=nr("rtc");function tv(e,t=dt){ka("ec",e,t)}const nv="components",Sf=Symbol.for("v-ndc");function ru(e){return nt(e)?rv(nv,e,!1)||e:e||Sf}function rv(e,t,n=!0,r=!1){const o=ct||dt;if(o){const s=o.type;{const a=Eu(s,!1);if(a&&(a===t||a===Vt(t)||a===Gr(Vt(t))))return s}const i=Nf(o[e]||s[e],t)||Nf(o.appContext[e],t);return!i&&r?s:(D.NODE_ENV!=="production"&&n&&!i&&G(`Failed to resolve ${e.slice(0,-1)}: ${t}
10
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else D.NODE_ENV!=="production"&&G(`resolve${Gr(e.slice(0,-1))} can only be used in render() or setup().`)}function Nf(e,t){return e&&(e[t]||e[Vt(t)]||e[Gr(Vt(t))])}function rt(e,t,n,r){let o;const s=n,i=ge(e);if(i||nt(e)){const a=i&&_n(e);let l=!1,u=!1;a&&(l=!Lt(e),u=Vn(e),e=oa(e)),o=new Array(e.length);for(let c=0,d=e.length;c<d;c++)o[c]=t(l?u?ua(Et(e[c])):Et(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){D.NODE_ENV!=="production"&&!Number.isInteger(e)&&G(`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(Fe(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 xa(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 Nt(e,t,n={},r,o){if(ct.ce||ct.parent&&Fo(ct.parent)&&ct.parent.ce)return t!=="default"&&(n.name=t),p(),H(de,null,[v("slot",n,r)],64);let s=e[t];D.NODE_ENV!=="production"&&s&&s.length>1&&(G("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),p();const i=s&&Pf(s(n)),a=n.key||i&&i.key,l=H(de,{key:(a&&!er(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Pf(e){return e.some(t=>ao(t)?!(t.type===lt||t.type===de&&!Pf(t.children)):!0)?e:null}const ou=e=>e?fh(e)?_u(e):ou(e.parent):null,oo=at(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>D.NODE_ENV!=="production"?Mn(e.props):e.props,$attrs:e=>D.NODE_ENV!=="production"?Mn(e.attrs):e.attrs,$slots:e=>D.NODE_ENV!=="production"?Mn(e.slots):e.slots,$refs:e=>D.NODE_ENV!=="production"?Mn(e.refs):e.refs,$parent:e=>ou(e.parent),$root:e=>ou(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mf(e),$forceUpdate:e=>e.f||(e.f=()=>{ga(e.update)}),$nextTick:e=>e.n||(e.n=ma.bind(e.proxy)),$watch:e=>Vv.bind(e)}),su=e=>e==="_"||e==="$",iu=(e,t)=>e!==ze&&!e.__isScriptSetup&&Le(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(D.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(iu(r,t))return i[t]=1,r[t];if(o!==ze&&Le(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&Le(u,t))return i[t]=3,s[t];if(n!==ze&&Le(n,t))return i[t]=4,n[t];au&&(i[t]=0)}}const c=oo[t];let d,f;if(c)return t==="$attrs"?(gt(e.attrs,"get",""),D.NODE_ENV!=="production"&&Sa()):D.NODE_ENV!=="production"&&t==="$slots"&&gt(e,"get",t),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==ze&&Le(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Le(f,t))return f[t];D.NODE_ENV!=="production"&&ct&&(!nt(t)||t.indexOf("__v")!==0)&&(o!==ze&&su(t[0])&&Le(o,t)?G(`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===ct&&G(`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 iu(o,t)?(o[t]=n,!0):D.NODE_ENV!=="production"&&o.__isScriptSetup&&Le(o,t)?(G(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==ze&&Le(r,t)?(r[t]=n,!0):Le(e.props,t)?(D.NODE_ENV!=="production"&&G(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(D.NODE_ENV!=="production"&&G(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(D.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&&Le(e,i)||iu(t,i)||(a=s[0])&&Le(a,i)||Le(r,i)||Le(oo,i)||Le(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};D.NODE_ENV!=="production"&&(Tf.ownKeys=e=>(G("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 ov(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(oo).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>oo[n](e),set:mt})}),t}function sv(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:mt})})}function iv(e){const{ctx:t,setupState:n}=e;Object.keys(Ee(n)).forEach(r=>{if(!n.__isScriptSetup){if(su(r[0])){G(`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:mt})}})}function If(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function av(){const e=Object.create(null);return(t,n)=>{e[n]?G(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let au=!0;function lv(e){const t=Mf(e),n=e.proxy,r=e.ctx;au=!1,t.beforeCreate&&Df(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:m,activated:y,deactivated:x,beforeDestroy:P,beforeUnmount:C,destroyed:U,unmounted:M,render:I,renderTracked:V,renderTriggered:E,errorCaptured:O,serverPrefetch:T,expose:A,inheritAttrs:R,components:B,directives:q,filters:be}=t,pe=D.NODE_ENV!=="production"?av():null;if(D.NODE_ENV!=="production"){const[oe]=e.propsOptions;if(oe)for(const ue in oe)pe("Props",ue)}if(u&&uv(u,r,pe),i)for(const oe in i){const ue=i[oe];_e(ue)?(D.NODE_ENV!=="production"?Object.defineProperty(r,oe,{value:ue.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[oe]=ue.bind(n),D.NODE_ENV!=="production"&&pe("Methods",oe)):D.NODE_ENV!=="production"&&G(`Method "${oe}" has type "${typeof ue}" in the component definition. Did you reference the function correctly?`)}if(o){D.NODE_ENV!=="production"&&!_e(o)&&G("The data option must be a function. Plain object usage is no longer supported.");const oe=o.call(n,n);if(D.NODE_ENV!=="production"&&Il(oe)&&G("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Fe(oe))D.NODE_ENV!=="production"&&G("data() should return an object.");else if(e.data=qs(oe),D.NODE_ENV!=="production")for(const ue in oe)pe("Data",ue),su(ue[0])||Object.defineProperty(r,ue,{configurable:!0,enumerable:!0,get:()=>oe[ue],set:mt})}if(au=!0,s)for(const oe in s){const ue=s[oe],Be=_e(ue)?ue.bind(n,n):_e(ue.get)?ue.get.bind(n,n):mt;D.NODE_ENV!=="production"&&Be===mt&&G(`Computed property "${oe}" has no getter.`);const Qe=!_e(ue)&&_e(ue.set)?ue.set.bind(n):D.NODE_ENV!=="production"?()=>{G(`Write operation failed: computed property "${oe}" is readonly.`)}:mt,ot=Z({get:Be,set:Qe});Object.defineProperty(r,oe,{enumerable:!0,configurable:!0,get:()=>ot.value,set:$t=>ot.value=$t}),D.NODE_ENV!=="production"&&pe("Computed",oe)}if(a)for(const oe in a)$f(a[oe],r,n,oe);if(l){const oe=_e(l)?l.call(n):l;Reflect.ownKeys(oe).forEach(ue=>{Yt(ue,oe[ue])})}c&&Df(c,e,"c");function he(oe,ue){ge(ue)?ue.forEach(Be=>oe(Be.bind(n))):ue&&oe(ue.bind(n))}if(he(Kb,d),he(Ue,f),he(Gb,h),he(Qb,m),he(Wb,y),he(Zb,x),he(tv,O),he(ev,V),he(Jb,E),he(nu,C),he(jt,M),he(Xb,T),ge(A))if(A.length){const oe=e.exposed||(e.exposed={});A.forEach(ue=>{Object.defineProperty(oe,ue,{get:()=>n[ue],set:Be=>n[ue]=Be})})}else e.exposed||(e.exposed={});I&&e.render===mt&&(e.render=I),R!=null&&(e.inheritAttrs=R),B&&(e.components=B),q&&(e.directives=q),T&&Cf(e)}function uv(e,t,n=mt){ge(e)&&(e=lu(e));for(const r in e){const o=e[r];let s;Fe(o)?"default"in o?s=fe(o.from||r,o.default,!0):s=fe(o.from||r):s=fe(o),Je(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,D.NODE_ENV!=="production"&&n("Inject",r)}}function Df(e,t,n){En(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $f(e,t,n,r){let o=r.includes(".")?Xf(n,r):()=>n[r];if(nt(e)){const s=t[e];_e(s)?Ze(o,s):D.NODE_ENV!=="production"&&G(`Invalid watch handler specified by key "${e}"`,s)}else if(_e(e))Ze(o,e.bind(n));else if(Fe(e))if(ge(e))e.forEach(s=>$f(s,t,n,r));else{const s=_e(e.handler)?e.handler.bind(n):t[e.handler];_e(s)?Ze(o,s,e):D.NODE_ENV!=="production"&&G(`Invalid watch handler specified by key "${e.handler}"`,s)}else D.NODE_ENV!=="production"&&G(`Invalid watch option: "${r}"`,e)}function Mf(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=>Aa(l,u,i,!0)),Aa(l,t,i)),Fe(t)&&s.set(t,l),l}function Aa(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Aa(e,s,n,!0),o&&o.forEach(i=>Aa(e,i,n,!0));for(const i in t)if(r&&i==="expose")D.NODE_ENV!=="production"&&G('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=cv[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const cv={data:Vf,props:Lf,emits:Lf,methods:Xs,computed:Xs,beforeCreate:Ut,created:Ut,beforeMount:Ut,mounted:Ut,beforeUpdate:Ut,updated:Ut,beforeDestroy:Ut,beforeUnmount:Ut,destroyed:Ut,unmounted:Ut,activated:Ut,deactivated:Ut,errorCaptured:Ut,serverPrefetch:Ut,components:Xs,directives:Xs,watch:fv,provide:Vf,inject:dv};function Vf(e,t){return t?e?function(){return at(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function dv(e,t){return Xs(lu(e),lu(t))}function lu(e){if(ge(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Xs(e,t){return e?at(Object.create(null),e,t):t}function Lf(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:at(Object.create(null),If(e),If(t??{})):t}function fv(e,t){if(!e)return t;if(!t)return e;const n=at(Object.create(null),e);for(const r in t)n[r]=Ut(e[r],t[r]);return n}function Rf(){return{app:null,config:{isNativeTag:Cg,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 hv=0;function pv(e,t){return function(r,o=null){_e(r)||(r=at({},r)),o!=null&&!Fe(o)&&(D.NODE_ENV!=="production"&&G("root props passed to app.mount() must be an object."),o=null);const s=Rf(),i=new WeakSet,a=[];let l=!1;const u=s.app={_uid:hv++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:bh,get config(){return s.config},set config(c){D.NODE_ENV!=="production"&&G("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return i.has(c)?D.NODE_ENV!=="production"&&G("Plugin has already been applied to target app."):c&&_e(c.install)?(i.add(c),c.install(u,...d)):_e(c)?(i.add(c),c(u,...d)):D.NODE_ENV!=="production"&&G('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return s.mixins.includes(c)?D.NODE_ENV!=="production"&&G("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),u},component(c,d){return D.NODE_ENV!=="production"&&wu(c,s.config),d?(D.NODE_ENV!=="production"&&s.components[c]&&G(`Component "${c}" has already been registered in target app.`),s.components[c]=d,u):s.components[c]},directive(c,d){return D.NODE_ENV!=="production"&&ff(c),d?(D.NODE_ENV!=="production"&&s.directives[c]&&G(`Directive "${c}" has already been registered in target app.`),s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(l)D.NODE_ENV!=="production"&&G("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{D.NODE_ENV!=="production"&&c.__vue_app__&&G("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||v(r,o);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),D.NODE_ENV!=="production"&&(s.reload=()=>{const m=xn(h);m.el=null,e(m,c,f)}),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,D.NODE_ENV!=="production"&&(u._instance=h.component,Ib(u,bh)),_u(h.component)}},onUnmount(c){D.NODE_ENV!=="production"&&typeof c!="function"&&G(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(En(a,u._instance,16),e(null,u._container),D.NODE_ENV!=="production"&&(u._instance=null,Db(u)),delete u._container.__vue_app__):D.NODE_ENV!=="production"&&G("Cannot unmount an app that is not mounted.")},provide(c,d){return D.NODE_ENV!=="production"&&c in s.provides&&(Le(s.provides,c)?G(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`):G(`App already provides property with key "${String(c)}" inherited from its parent element. It will be overwritten with the new value.`)),s.provides[c]=d,u},runWithContext(c){const d=so;so=u;try{return c()}finally{so=d}}};return u}}let so=null;function Yt(e,t){if(!dt)D.NODE_ENV!=="production"&&G("provide() can only be used inside setup().");else{let n=dt.provides;const r=dt.parent&&dt.parent.provides;r===n&&(n=dt.provides=Object.create(r)),n[e]=t}}function fe(e,t,n=!1){const r=dt||ct;if(r||so){let o=so?so._context.provides:r?r.parent==null||r.ce?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&&_e(t)?t.call(r&&r.proxy):t;D.NODE_ENV!=="production"&&G(`injection "${String(e)}" not found.`)}else D.NODE_ENV!=="production"&&G("inject() can only be used inside setup() or functional components.")}function mv(){return!!(dt||ct||so)}const jf={},Uf=()=>Object.create(jf),Bf=e=>Object.getPrototypeOf(e)===jf;function gv(e,t,n,r=!1){const o={},s=Uf();e.propsDefaults=Object.create(null),Ff(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);D.NODE_ENV!=="production"&&zf(t||{},o,e),n?e.props=r?o:cb(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function bv(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vv(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=Ee(o),[l]=e.propsOptions;let u=!1;if(!(D.NODE_ENV!=="production"&&bv(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(Oa(e.emitsOptions,f))continue;const h=t[f];if(l)if(Le(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const m=Vt(f);o[m]=uu(l,a,m,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{Ff(e,t,o,s)&&(u=!0);let c;for(const d in a)(!t||!Le(t,d)&&((c=Or(d))===d||!Le(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(o[d]=uu(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Le(t,d))&&(delete s[d],u=!0)}u&&$n(e.attrs,"set",""),D.NODE_ENV!=="production"&&zf(t||{},o,e)}function Ff(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if($s(l))continue;const u=t[l];let c;o&&Le(o,c=Vt(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Oa(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,i=!0)}if(s){const l=Ee(n),u=a||ze;for(let c=0;c<s.length;c++){const d=s[c];n[d]=uu(o,l,d,u[d],e,!Le(u,d))}}return i}function uu(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Le(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&_e(l)){const{propsDefaults:u}=o;if(n in u)r=u[n];else{const c=si(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===Or(n))&&(r=!0))}return r}const yv=new WeakMap;function Hf(e,t,n=!1){const r=n?yv:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!_e(e)){const c=d=>{l=!0;const[f,h]=Hf(d,t,!0);at(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 Fe(e)&&r.set(e,Mo),Mo;if(ge(s))for(let c=0;c<s.length;c++){D.NODE_ENV!=="production"&&!nt(s[c])&&G("props must be strings when using array syntax.",s[c]);const d=Vt(s[c]);qf(d)&&(i[d]=ze)}else if(s){D.NODE_ENV!=="production"&&!Fe(s)&&G("invalid props options",s);for(const c in s){const d=Vt(c);if(qf(d)){const f=s[c],h=i[d]=ge(f)||_e(f)?{type:f}:at({},f),m=h.type;let y=!1,x=!0;if(ge(m))for(let P=0;P<m.length;++P){const C=m[P],U=_e(C)&&C.name;if(U==="Boolean"){y=!0;break}else U==="String"&&(x=!1)}else y=_e(m)&&m.name==="Boolean";h[0]=y,h[1]=x,(y||Le(h,"default"))&&a.push(d)}}}const u=[i,a];return Fe(e)&&r.set(e,u),u}function qf(e){return e[0]!=="$"&&!$s(e)?!0:(D.NODE_ENV!=="production"&&G(`Invalid prop name: "${e}" is a reserved property.`),!1)}function wv(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function zf(e,t,n){const r=Ee(t),o=n.propsOptions[0],s=Object.keys(e).map(i=>Vt(i));for(const i in o){let a=o[i];a!=null&&_v(i,r[i],a,D.NODE_ENV!=="production"?Mn(r):r,!s.includes(i))}}function _v(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){G('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:m}=kv(t,c[f]);d.push(m||""),u=h}if(!u){G(xv(e,t,d));return}}a&&!a(t,r)&&G('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Ev=Jn("String,Number,Boolean,Function,Symbol,BigInt");function kv(e,t){let n;const r=wv(t);if(r==="null")n=e===null;else if(Ev(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Fe(e):r==="Array"?n=ge(e):n=e instanceof t;return{valid:n,expectedType:r}}function xv(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(Gr).join(" | ")}`;const o=n[0],s=Dl(t),i=Wf(t,o),a=Wf(t,s);return n.length===1&&Zf(o)&&!Av(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Zf(s)&&(r+=`with value ${a}.`),r}function Wf(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Zf(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Av(...e){return e.some(t=>t.toLowerCase()==="boolean")}const cu=e=>e[0]==="_"||e==="$stable",du=e=>ge(e)?e.map(An):[An(e)],Cv=(e,t,n)=>{if(t._n)return t;const r=k((...o)=>(D.NODE_ENV!=="production"&&dt&&!(n===null&&ct)&&!(n&&n.root!==dt.root)&&G(`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.`),du(t(...o))),n);return r._c=!1,r},Yf=(e,t,n)=>{const r=e._ctx;for(const o in e){if(cu(o))continue;const s=e[o];if(_e(s))t[o]=Cv(o,s,r);else if(s!=null){D.NODE_ENV!=="production"&&G(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=du(s);t[o]=()=>i}}},Kf=(e,t)=>{D.NODE_ENV!=="production"&&!Qs(e.vnode)&&G("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=du(t);e.slots.default=()=>n},fu=(e,t,n)=>{for(const r in t)(n||!cu(r))&&(e[r]=t[r])},Ov=(e,t,n)=>{const r=e.slots=Uf();if(e.vnode.shapeFlag&32){const o=t.__;o&&Vs(r,"__",o,!0);const s=t._;s?(fu(r,t,n),n&&Vs(r,"_",s,!0)):Yf(t,r)}else t&&Kf(e,t)},Sv=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=ze;if(r.shapeFlag&32){const a=t._;a?D.NODE_ENV!=="production"&&kn?(fu(o,t,n),$n(e,"set","$slots")):n&&a===1?s=!1:fu(o,t,n):(s=!t.$stable,Yf(t,o)),i=t}else t&&(Kf(e,t),i={default:1});if(s)for(const a in o)!cu(a)&&i[a]==null&&delete o[a]};let Js,$r;function Ho(e,t){e.appContext.config.performance&&Ca()&&$r.mark(`vue-${t}-${e.uid}`),D.NODE_ENV!=="production"&&Lb(e,t,Ca()?$r.now():Date.now())}function qo(e,t){if(e.appContext.config.performance&&Ca()){const n=`vue-${t}-${e.uid}`,r=n+":end";$r.mark(r),$r.measure(`<${Ia(e,e.type)}> ${t}`,n,r),$r.clearMarks(n),$r.clearMarks(r)}D.NODE_ENV!=="production"&&Rb(e,t,Ca()?$r.now():Date.now())}function Ca(){return Js!==void 0||(typeof window<"u"&&window.performance?(Js=!0,$r=window.performance):Js=!1),Js}function Nv(){const e=[];if(D.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.
11
11
 
12
- For more details, see https://link.vuejs.org/feature-flags.`)}}const Bt=Hv;function Pv(e){return Tv(e)}function Tv(e,t){Nv();const n=Ls();n.__VUE__=!0,D.NODE_ENV!=="production"&&lf(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=mt,insertStaticContent:m}=e,y=(w,S,F,Q=null,Y=null,K=null,se=void 0,re=null,ne=D.NODE_ENV!=="production"&&kn?!1:!!S.dynamicChildren)=>{if(w===S)return;w&&!lo(w,S)&&(Q=ml(w),wt(w,Y,K,!0),w=null),S.patchFlag===-2&&(ne=!1,S.dynamicChildren=null);const{type:X,ref:we,shapeFlag:ie}=S;switch(X){case ti:x(w,S,F,Q);break;case lt:P(w,S,F,Q);break;case ni:w==null?C(S,F,Q,se):D.NODE_ENV!=="production"&&U(w,S,F,se);break;case de:q(w,S,F,Q,Y,K,se,re,ne);break;default:ie&1?V(w,S,F,Q,Y,K,se,re,ne):ie&6?be(w,S,F,Q,Y,K,se,re,ne):ie&64||ie&128?X.process(w,S,F,Q,Y,K,se,re,ne,Di):D.NODE_ENV!=="production"&&G("Invalid VNode type:",X,`(${typeof X})`)}we!=null&&Y?Gs(we,w&&w.ref,K,S||w,!S):we==null&&w&&w.ref!=null&&Gs(w.ref,null,K,w,!0)},x=(w,S,F,Q)=>{if(w==null)r(S.el=a(S.children),F,Q);else{const Y=S.el=w.el;S.children!==w.children&&u(Y,S.children)}},P=(w,S,F,Q)=>{w==null?r(S.el=l(S.children||""),F,Q):S.el=w.el},C=(w,S,F,Q)=>{[w.el,w.anchor]=m(w.children,S,F,Q,w.el,w.anchor)},U=(w,S,F,Q)=>{if(S.children!==w.children){const Y=f(w.anchor);I(w),[S.el,S.anchor]=m(S.children,F,Y,Q)}else S.el=w.el,S.anchor=w.anchor},M=({el:w,anchor:S},F,Q)=>{let Y;for(;w&&w!==S;)Y=f(w),r(w,F,Q),w=Y;r(S,F,Q)},I=({el:w,anchor:S})=>{let F;for(;w&&w!==S;)F=f(w),o(w),w=F;o(S)},V=(w,S,F,Q,Y,K,se,re,ne)=>{S.type==="svg"?se="svg":S.type==="math"&&(se="mathml"),w==null?E(S,F,Q,Y,K,se,re,ne):A(w,S,Y,K,se,re,ne)},E=(w,S,F,Q,Y,K,se,re)=>{let ne,X;const{props:we,shapeFlag:ie,transition:ve,dirs:Oe}=w;if(ne=w.el=i(w.type,K,we&&we.is,we),ie&8?c(ne,w.children):ie&16&&T(w.children,ne,null,Q,Y,hu(w,K),se,re),Oe&&no(w,null,Q,"created"),O(ne,w,w.scopeId,se,Q),we){for(const tt in we)tt!=="value"&&!$s(tt)&&s(ne,tt,null,we[tt],K,Q);"value"in we&&s(ne,"value",null,we.value,K),(X=we.onVnodeBeforeMount)&&jn(X,Q,w)}D.NODE_ENV!=="production"&&(Vs(ne,"__vnode",w,!0),Vs(ne,"__vueParentComponent",Q,!0)),Oe&&no(w,null,Q,"beforeMount");const je=Iv(Y,ve);je&&ve.beforeEnter(ne),r(ne,S,F),((X=we&&we.onVnodeMounted)||je||Oe)&&Bt(()=>{X&&jn(X,Q,w),je&&ve.enter(ne),Oe&&no(w,null,Q,"mounted")},Y)},O=(w,S,F,Q,Y)=>{if(F&&h(w,F),Q)for(let K=0;K<Q.length;K++)h(w,Q[K]);if(Y){let K=Y.subTree;if(D.NODE_ENV!=="production"&&K.patchFlag>0&&K.patchFlag&2048&&(K=gu(K.children)||K),S===K||oh(K.type)&&(K.ssContent===S||K.ssFallback===S)){const se=Y.vnode;O(w,se,se.scopeId,se.slotScopeIds,Y.parent)}}},T=(w,S,F,Q,Y,K,se,re,ne=0)=>{for(let X=ne;X<w.length;X++){const we=w[X]=re?Mr(w[X]):An(w[X]);y(null,we,S,F,Q,Y,K,se,re)}},A=(w,S,F,Q,Y,K,se)=>{const re=S.el=w.el;D.NODE_ENV!=="production"&&(re.__vnode=S);let{patchFlag:ne,dynamicChildren:X,dirs:we}=S;ne|=w.patchFlag&16;const ie=w.props||ze,ve=S.props||ze;let Oe;if(F&&io(F,!1),(Oe=ve.onVnodeBeforeUpdate)&&jn(Oe,F,S,w),we&&no(S,w,F,"beforeUpdate"),F&&io(F,!0),D.NODE_ENV!=="production"&&kn&&(ne=0,se=!1,X=null),(ie.innerHTML&&ve.innerHTML==null||ie.textContent&&ve.textContent==null)&&c(re,""),X?(R(w.dynamicChildren,X,re,F,Q,hu(S,Y),K),D.NODE_ENV!=="production"&&ei(w,S)):se||Be(w,S,re,null,F,Q,hu(S,Y),K,!1),ne>0){if(ne&16)B(re,ie,ve,F,Y);else if(ne&2&&ie.class!==ve.class&&s(re,"class",null,ve.class,Y),ne&4&&s(re,"style",ie.style,ve.style,Y),ne&8){const je=S.dynamicProps;for(let tt=0;tt<je.length;tt++){const Xe=je[tt],Kt=ie[Xe],Gt=ve[Xe];(Gt!==Kt||Xe==="value")&&s(re,Xe,Kt,Gt,Y,F)}}ne&1&&w.children!==S.children&&c(re,S.children)}else!se&&X==null&&B(re,ie,ve,F,Y);((Oe=ve.onVnodeUpdated)||we)&&Bt(()=>{Oe&&jn(Oe,F,S,w),we&&no(S,w,F,"updated")},Q)},R=(w,S,F,Q,Y,K,se)=>{for(let re=0;re<S.length;re++){const ne=w[re],X=S[re],we=ne.el&&(ne.type===de||!lo(ne,X)||ne.shapeFlag&198)?d(ne.el):F;y(ne,X,we,null,Q,Y,K,se,!0)}},B=(w,S,F,Q,Y)=>{if(S!==F){if(S!==ze)for(const K in S)!$s(K)&&!(K in F)&&s(w,K,S[K],null,Y,Q);for(const K in F){if($s(K))continue;const se=F[K],re=S[K];se!==re&&K!=="value"&&s(w,K,re,se,Y,Q)}"value"in F&&s(w,"value",S.value,F.value,Y)}},q=(w,S,F,Q,Y,K,se,re,ne)=>{const X=S.el=w?w.el:a(""),we=S.anchor=w?w.anchor:a("");let{patchFlag:ie,dynamicChildren:ve,slotScopeIds:Oe}=S;D.NODE_ENV!=="production"&&(kn||ie&2048)&&(ie=0,ne=!1,ve=null),Oe&&(re=re?re.concat(Oe):Oe),w==null?(r(X,F,Q),r(we,F,Q),T(S.children||[],F,we,Y,K,se,re,ne)):ie>0&&ie&64&&ve&&w.dynamicChildren?(R(w.dynamicChildren,ve,F,Y,K,se,re),D.NODE_ENV!=="production"?ei(w,S):(S.key!=null||Y&&S===Y.subTree)&&ei(w,S,!0)):Be(w,S,F,we,Y,K,se,re,ne)},be=(w,S,F,Q,Y,K,se,re,ne)=>{S.slotScopeIds=re,w==null?S.shapeFlag&512?Y.ctx.activate(S,F,Q,se,ne):pe(S,F,Q,Y,K,se,ne):he(w,S,ne)},pe=(w,S,F,Q,Y,K,se)=>{const re=w.component=Kv(w,Q,Y);if(D.NODE_ENV!=="production"&&re.type.__hmrId&&Sb(re),D.NODE_ENV!=="production"&&(fa(w),Ho(re,"mount")),Qs(w)&&(re.ctx.renderer=Di),D.NODE_ENV!=="production"&&Ho(re,"init"),Qv(re,!1,se),D.NODE_ENV!=="production"&&qo(re,"init"),D.NODE_ENV!=="production"&&kn&&(w.el=null),re.asyncDep){if(Y&&Y.registerDep(re,oe,se),!w.el){const ne=re.subTree=v(lt);P(null,ne,S,F)}}else oe(re,w,S,F,Y,K,se);D.NODE_ENV!=="production"&&(ha(),qo(re,"mount"))},he=(w,S,F)=>{const Q=S.component=w.component;if(Bv(w,S,F))if(Q.asyncDep&&!Q.asyncResolved){D.NODE_ENV!=="production"&&fa(S),ue(Q,S,F),D.NODE_ENV!=="production"&&ha();return}else Q.next=S,Q.update();else S.el=w.el,Q.vnode=S},oe=(w,S,F,Q,Y,K,se)=>{const re=()=>{if(w.isMounted){let{next:ie,bu:ve,u:Oe,parent:je,vnode:tt}=w;{const Yn=Gf(w);if(Yn){ie&&(ie.el=tt.el,ue(w,ie,se)),Yn.asyncDep.then(()=>{w.isUnmounted||re()});return}}let Xe=ie,Kt;D.NODE_ENV!=="production"&&fa(ie||w.vnode),io(w,!1),ie?(ie.el=tt.el,ue(w,ie,se)):ie=tt,ve&&Ms(ve),(Kt=ie.props&&ie.props.onVnodeBeforeUpdate)&&jn(Kt,je,ie,tt),io(w,!0),D.NODE_ENV!=="production"&&Ho(w,"render");const Gt=eh(w);D.NODE_ENV!=="production"&&qo(w,"render");const Zn=w.subTree;w.subTree=Gt,D.NODE_ENV!=="production"&&Ho(w,"patch"),y(Zn,Gt,d(Zn.el),ml(Zn),w,Y,K),D.NODE_ENV!=="production"&&qo(w,"patch"),ie.el=Gt.el,Xe===null&&Fv(w,Gt.el),Oe&&Bt(Oe,Y),(Kt=ie.props&&ie.props.onVnodeUpdated)&&Bt(()=>jn(Kt,je,ie,tt),Y),D.NODE_ENV!=="production"&&uf(w),D.NODE_ENV!=="production"&&ha()}else{let ie;const{el:ve,props:Oe}=S,{bm:je,m:tt,parent:Xe,root:Kt,type:Gt}=w,Zn=Fo(S);io(w,!1),je&&Ms(je),!Zn&&(ie=Oe&&Oe.onVnodeBeforeMount)&&jn(ie,Xe,S),io(w,!0);{Kt.ce&&Kt.ce._def.shadowRoot!==!1&&Kt.ce._injectChildStyle(Gt),D.NODE_ENV!=="production"&&Ho(w,"render");const Yn=w.subTree=eh(w);D.NODE_ENV!=="production"&&qo(w,"render"),D.NODE_ENV!=="production"&&Ho(w,"patch"),y(null,Yn,F,Q,w,Y,K),D.NODE_ENV!=="production"&&qo(w,"patch"),S.el=Yn.el}if(tt&&Bt(tt,Y),!Zn&&(ie=Oe&&Oe.onVnodeMounted)){const Yn=S;Bt(()=>jn(ie,Xe,Yn),Y)}(S.shapeFlag&256||Xe&&Fo(Xe.vnode)&&Xe.vnode.shapeFlag&256)&&w.a&&Bt(w.a,Y),w.isMounted=!0,D.NODE_ENV!=="production"&&$b(w),S=F=Q=null}};w.scope.on();const ne=w.effect=new Sd(re);w.scope.off();const X=w.update=ne.run.bind(ne),we=w.job=ne.runIfDirty.bind(ne);we.i=w,we.id=w.uid,ne.scheduler=()=>ga(we),io(w,!0),D.NODE_ENV!=="production"&&(ne.onTrack=w.rtc?ie=>Ms(w.rtc,ie):void 0,ne.onTrigger=w.rtg?ie=>Ms(w.rtg,ie):void 0),X()},ue=(w,S,F)=>{S.component=w;const Q=w.vnode.props;w.vnode=S,w.next=null,vv(w,S.props,Q,F),Sv(w,S.children,F),yn(),nf(w),wn()},Be=(w,S,F,Q,Y,K,se,re,ne=!1)=>{const X=w&&w.children,we=w?w.shapeFlag:0,ie=S.children,{patchFlag:ve,shapeFlag:Oe}=S;if(ve>0){if(ve&128){ot(X,ie,F,Q,Y,K,se,re,ne);return}else if(ve&256){Qe(X,ie,F,Q,Y,K,se,re,ne);return}}Oe&8?(we&16&&Ii(X,Y,K),ie!==X&&c(F,ie)):we&16?Oe&16?ot(X,ie,F,Q,Y,K,se,re,ne):Ii(X,Y,K,!0):(we&8&&c(F,""),Oe&16&&T(ie,F,Q,Y,K,se,re,ne))},Qe=(w,S,F,Q,Y,K,se,re,ne)=>{w=w||Mo,S=S||Mo;const X=w.length,we=S.length,ie=Math.min(X,we);let ve;for(ve=0;ve<ie;ve++){const Oe=S[ve]=ne?Mr(S[ve]):An(S[ve]);y(w[ve],Oe,F,null,Y,K,se,re,ne)}X>we?Ii(w,Y,K,!0,!1,ie):T(S,F,Q,Y,K,se,re,ne,ie)},ot=(w,S,F,Q,Y,K,se,re,ne)=>{let X=0;const we=S.length;let ie=w.length-1,ve=we-1;for(;X<=ie&&X<=ve;){const Oe=w[X],je=S[X]=ne?Mr(S[X]):An(S[X]);if(lo(Oe,je))y(Oe,je,F,null,Y,K,se,re,ne);else break;X++}for(;X<=ie&&X<=ve;){const Oe=w[ie],je=S[ve]=ne?Mr(S[ve]):An(S[ve]);if(lo(Oe,je))y(Oe,je,F,null,Y,K,se,re,ne);else break;ie--,ve--}if(X>ie){if(X<=ve){const Oe=ve+1,je=Oe<we?S[Oe].el:Q;for(;X<=ve;)y(null,S[X]=ne?Mr(S[X]):An(S[X]),F,je,Y,K,se,re,ne),X++}}else if(X>ve)for(;X<=ie;)wt(w[X],Y,K,!0),X++;else{const Oe=X,je=X,tt=new Map;for(X=je;X<=ve;X++){const Zt=S[X]=ne?Mr(S[X]):An(S[X]);Zt.key!=null&&(D.NODE_ENV!=="production"&&tt.has(Zt.key)&&G("Duplicate keys found during update:",JSON.stringify(Zt.key),"Make sure keys are unique."),tt.set(Zt.key,X))}let Xe,Kt=0;const Gt=ve-je+1;let Zn=!1,Yn=0;const $i=new Array(Gt);for(X=0;X<Gt;X++)$i[X]=0;for(X=Oe;X<=ie;X++){const Zt=w[X];if(Kt>=Gt){wt(Zt,Y,K,!0);continue}let Kn;if(Zt.key!=null)Kn=tt.get(Zt.key);else for(Xe=je;Xe<=ve;Xe++)if($i[Xe-je]===0&&lo(Zt,S[Xe])){Kn=Xe;break}Kn===void 0?wt(Zt,Y,K,!0):($i[Kn-je]=X+1,Kn>=Yn?Yn=Kn:Zn=!0,y(Zt,S[Kn],F,null,Y,K,se,re,ne),Kt++)}const Km=Zn?Dv($i):Mo;for(Xe=Km.length-1,X=Gt-1;X>=0;X--){const Zt=je+X,Kn=S[Zt],Gm=Zt+1<we?S[Zt+1].el:Q;$i[X]===0?y(null,Kn,F,Gm,Y,K,se,re,ne):Zn&&(Xe<0||X!==Km[Xe]?$t(Kn,F,Gm,2):Xe--)}}},$t=(w,S,F,Q,Y=null)=>{const{el:K,type:se,transition:re,children:ne,shapeFlag:X}=w;if(X&6){$t(w.component.subTree,S,F,Q);return}if(X&128){w.suspense.move(S,F,Q);return}if(X&64){se.move(w,S,F,Di);return}if(se===de){r(K,S,F);for(let ie=0;ie<ne.length;ie++)$t(ne[ie],S,F,Q);r(w.anchor,S,F);return}if(se===ni){M(w,S,F);return}if(Q!==2&&X&1&&re)if(Q===0)re.beforeEnter(K),r(K,S,F),Bt(()=>re.enter(K),Y);else{const{leave:ie,delayLeave:ve,afterLeave:Oe}=re,je=()=>{w.ctx.isUnmounted?o(K):r(K,S,F)},tt=()=>{ie(K,()=>{je(),Oe&&Oe()})};ve?ve(K,je,tt):tt()}else r(K,S,F)},wt=(w,S,F,Q=!1,Y=!1)=>{const{type:K,props:se,ref:re,children:ne,dynamicChildren:X,shapeFlag:we,patchFlag:ie,dirs:ve,cacheIndex:Oe}=w;if(ie===-2&&(Y=!1),re!=null&&(yn(),Gs(re,null,F,w,!0),wn()),Oe!=null&&(S.renderCache[Oe]=void 0),we&256){S.ctx.deactivate(w);return}const je=we&1&&ve,tt=!Fo(w);let Xe;if(tt&&(Xe=se&&se.onVnodeBeforeUnmount)&&jn(Xe,S,w),we&6)BA(w.component,F,Q);else{if(we&128){w.suspense.unmount(F,Q);return}je&&no(w,null,S,"beforeUnmount"),we&64?w.type.remove(w,S,F,Di,Q):X&&!X.hasOnce&&(K!==de||ie>0&&ie&64)?Ii(X,S,F,!1,!0):(K===de&&ie&384||!Y&&we&16)&&Ii(ne,S,F),Q&&gr(w)}(tt&&(Xe=se&&se.onVnodeUnmounted)||je)&&Bt(()=>{Xe&&jn(Xe,S,w),je&&no(w,null,S,"unmounted")},F)},gr=w=>{const{type:S,el:F,anchor:Q,transition:Y}=w;if(S===de){D.NODE_ENV!=="production"&&w.patchFlag>0&&w.patchFlag&2048&&Y&&!Y.persisted?w.children.forEach(se=>{se.type===lt?o(se.el):gr(se)}):qr(F,Q);return}if(S===ni){I(w);return}const K=()=>{o(F),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(w.shapeFlag&1&&Y&&!Y.persisted){const{leave:se,delayLeave:re}=Y,ne=()=>se(F,K);re?re(w.el,K,ne):ne()}else K()},qr=(w,S)=>{let F;for(;w!==S;)F=f(w),o(w),w=F;o(S)},BA=(w,S,F)=>{D.NODE_ENV!=="production"&&w.type.__hmrId&&Nb(w);const{bum:Q,scope:Y,job:K,subTree:se,um:re,m:ne,a:X,parent:we,slots:{__:ie}}=w;Qf(ne),Qf(X),Q&&Ms(Q),we&&ge(ie)&&ie.forEach(ve=>{we.renderCache[ve]=void 0}),Y.stop(),K&&(K.flags|=8,wt(se,w,S,F)),re&&Bt(re,S),Bt(()=>{w.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&w.asyncDep&&!w.asyncResolved&&w.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve()),D.NODE_ENV!=="production"&&Vb(w)},Ii=(w,S,F,Q=!1,Y=!1,K=0)=>{for(let se=K;se<w.length;se++)wt(w[se],S,F,Q,Y)},ml=w=>{if(w.shapeFlag&6)return ml(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const S=f(w.anchor||w.el),F=S&&S[hf];return F?f(F):S};let Ec=!1;const Ym=(w,S,F)=>{w==null?S._vnode&&wt(S._vnode,null,null,!0):y(S._vnode||null,w,S,null,null,null,F),S._vnode=w,Ec||(Ec=!0,nf(),rf(),Ec=!1)},Di={p:y,um:wt,m:$t,r:gr,mt:pe,mc:T,pc:Be,pbc:R,n:ml,o:e};return{render:Ym,hydrate:void 0,createApp:pv(Ym)}}function hu({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 io({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Iv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ei(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]=Mr(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&ei(i,a)),a.type===ti&&(a.el=i.el),a.type===lt&&!a.el&&(a.el=i.el),D.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function Dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Gf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gf(t)}function Qf(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const $v=Symbol.for("v-scx"),Mv=()=>{{const e=fe($v);return e||D.NODE_ENV!=="production"&&G("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Xt(e,t){return pu(e,null,t)}function Ze(e,t,n){return D.NODE_ENV!=="production"&&!_e(t)&&G("`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."),pu(e,t,n)}function pu(e,t,n=ze){const{immediate:r,deep:o,flush:s,once:i}=n;D.NODE_ENV!=="production"&&!t&&(r!==void 0&&G('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&G('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&G('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=it({},n);D.NODE_ENV!=="production"&&(a.onWarn=G);const l=t&&r||!t&&s!=="post";let u;if(ii){if(s==="sync"){const h=Mv();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=mt,h.resume=mt,h.pause=mt,h}}const c=dt;a.call=(h,m,y)=>En(h,c,m,y);let d=!1;s==="post"?a.scheduler=h=>{Bt(h,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():ga(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=yb(e,t,a);return ii&&(u?u.push(f):l&&f()),f}function Vv(e,t,n){const r=this.proxy,o=nt(e)?e.includes(".")?Xf(r,e):()=>r[e]:e.bind(r,r);let s;_e(t)?s=t:(s=t.handler,n=t);const i=si(this),a=pu(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 Lv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Vt(t)}Modifiers`]||e[`${Or(t)}Modifiers`];function Rv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ze;if(D.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Qr(Vt(t))in d))&&G(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Qr(Vt(t))}" prop.`);else{const f=c[t];_e(f)&&(f(...n)||G(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Lv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>nt(c)?c.trim():c)),i.number&&(o=n.map(Tg))),D.NODE_ENV!=="production"&&jb(e,t,o),D.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Qr(c)]&&G(`Event "${c}" is emitted in component ${Ia(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 "${Or(t)}" instead of "${t}".`)}let a,l=r[a=Qr(t)]||r[a=Qr(Vt(t))];!l&&s&&(l=r[a=Qr(Or(t))]),l&&En(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,En(u,e,6,o)}}function Jf(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(!_e(e)){const l=u=>{const c=Jf(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?(Fe(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>i[l]=null):it(i,s),Fe(e)&&r.set(e,i),i)}function Oa(e,t){return!e||!Ds(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,Or(t))||Le(e,t))}let mu=!1;function Sa(){mu=!0}function eh(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:m,inheritAttrs:y}=e,x=ya(e);let P,C;D.NODE_ENV!=="production"&&(mu=!1);try{if(n.shapeFlag&4){const I=o||r,V=D.NODE_ENV!=="production"&&h.__isScriptSetup?new Proxy(I,{get(E,O,T){return G(`Property '${String(O)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(E,O,T)}}):I;P=An(u.call(V,I,c,D.NODE_ENV!=="production"?Mn(d):d,h,f,m)),C=a}else{const I=t;D.NODE_ENV!=="production"&&a===d&&Sa(),P=An(I.length>1?I(D.NODE_ENV!=="production"?Mn(d):d,D.NODE_ENV!=="production"?{get attrs(){return Sa(),Mn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):I(D.NODE_ENV!=="production"?Mn(d):d,null)),C=t.props?a:jv(a)}}catch(I){ri.length=0,zs(I,e,1),P=v(lt)}let U=P,M;if(D.NODE_ENV!=="production"&&P.patchFlag>0&&P.patchFlag&2048&&([U,M]=th(P)),C&&y!==!1){const I=Object.keys(C),{shapeFlag:V}=U;if(I.length){if(V&7)s&&I.some(ea)&&(C=Uv(C,s)),U=xn(U,C,!1,!0);else if(D.NODE_ENV!=="production"&&!mu&&U.type!==lt){const E=Object.keys(a),O=[],T=[];for(let A=0,R=E.length;A<R;A++){const B=E[A];Ds(B)?ea(B)||O.push(B[2].toLowerCase()+B.slice(3)):T.push(B)}T.length&&G(`Extraneous non-props attributes (${T.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),O.length&&G(`Extraneous non-emits event listeners (${O.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&&(D.NODE_ENV!=="production"&&!nh(U)&&G("Runtime directive used on component with non-element root node. The directives will not function as intended."),U=xn(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition&&(D.NODE_ENV!=="production"&&!nh(U)&&G("Component inside <Transition> renders non-element root node that cannot be animated."),Ks(U,n.transition)),D.NODE_ENV!=="production"&&M?M(U):P=U,ya(x),P}const th=e=>{const t=e.children,n=e.dynamicChildren,r=gu(t,!1);if(r){if(D.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return th(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[An(r),i]};function gu(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(ao(o)){if(o.type!==lt||o.children==="v-if"){if(n)return;if(n=o,D.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return gu(n.children)}}else return}return n}const jv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ds(n))&&((t||(t={}))[n]=e[n]);return t},Uv=(e,t)=>{const n={};for(const r in e)(!ea(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},nh=e=>e.shapeFlag&7||e.type===lt;function Bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(D.NODE_ENV!=="production"&&(o||a)&&kn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?rh(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]&&!Oa(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?rh(r,i,u):!0:!!i;return!1}function rh(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]&&!Oa(n,s))return!0}return!1}function Fv({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 oh=e=>e.__isSuspense;function Hv(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):tf(e)}const de=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),lt=Symbol.for("v-cmt"),ni=Symbol.for("v-stc"),ri=[];let Jt=null;function p(e=!1){ri.push(Jt=e?null:[])}function qv(){ri.pop(),Jt=ri[ri.length-1]||null}let oi=1;function sh(e,t=!1){oi+=e,e<0&&Jt&&t&&(Jt.hasOnce=!0)}function ih(e){return e.dynamicChildren=oi>0?Jt||Mo:null,qv(),oi>0&&Jt&&Jt.push(e),e}function _(e,t,n,r,o,s){return ih(L(e,t,n,r,o,s,!0))}function H(e,t,n,r,o){return ih(v(e,t,n,r,o,!0))}function ao(e){return e?e.__v_isVNode===!0:!1}function lo(e,t){if(D.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ba.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 zv=(...e)=>lh(...e),ah=({key:e})=>e??null,Na=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?nt(e)||Je(e)||_e(e)?{i:ct,r:e,k:t,f:!!n}:e:null);function L(e,t=null,n=null,r=0,o=null,s=e===de?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ah(t),ref:t&&Na(t),scopeId:df,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:ct};return a?(bu(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=nt(n)?8:16),D.NODE_ENV!=="production"&&l.key!==l.key&&G("VNode created with invalid key (NaN). VNode type:",l.type),oi>0&&!i&&Jt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Jt.push(l),l}const v=D.NODE_ENV!=="production"?zv:lh;function lh(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Sf)&&(D.NODE_ENV!=="production"&&!e&&G(`Invalid vnode type when creating vnode: ${e}.`),e=lt),ao(e)){const a=xn(e,t,!0);return n&&bu(a,n),oi>0&&!s&&Jt&&(a.shapeFlag&6?Jt[Jt.indexOf(e)]=a:Jt.push(a)),a.patchFlag=-2,a}if(gh(e)&&(e=e.__vccOpts),t){t=Wv(t);let{class:a,style:l}=t;a&&!nt(a)&&(t.class=Rs(a)),Fe(l)&&(Ro(l)&&!ge(l)&&(l=it({},l)),t.style=Vo(l))}const i=nt(e)?1:oh(e)?128:pf(e)?64:Fe(e)?4:_e(e)?2:0;return D.NODE_ENV!=="production"&&i&4&&Ro(e)&&(e=Ee(e),G("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`.",`
13
- Component that was made reactive: `,e)),L(e,t,n,r,o,i,s,!0)}function Wv(e){return e?Ro(e)||Bf(e)?it({},e):e:null}function xn(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?vu(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&ah(u),ref:t&&t.ref?n&&s?ge(s)?s.concat(Na(t)):[s,Na(t)]:Na(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:D.NODE_ENV!=="production"&&i===-1&&ge(a)?a.map(uh):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==de?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&&xn(e.ssContent),ssFallback:e.ssFallback&&xn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Ks(c,l.clone(c)),c}function uh(e){const t=xn(e);return ge(e.children)&&(t.children=e.children.map(uh)),t}function N(e=" ",t=0){return v(ti,null,e,t)}function ch(e,t){const n=v(ni,null,e);return n.staticCount=t,n}function z(e="",t=!1){return t?(p(),H(lt,null,e)):v(lt,null,e)}function An(e){return e==null||typeof e=="boolean"?v(lt):ge(e)?v(de,null,e.slice()):ao(e)?Mr(e):v(ti,null,String(e))}function Mr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xn(e)}function bu(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),bu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Bf(t)?t._ctx=ct:o===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _e(t)?(t={default:t,_ctx:ct},n=32):(t=String(t),r&64?(n=16,t=[N(t)]):n=8);e.children=t,e.shapeFlag|=n}function vu(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=Rs([t.class,r.class]));else if(o==="style")t.style=Vo([t.style,r.style]);else if(Ds(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 jn(e,t,n,r=null){En(e,t,7,[n,r])}const Zv=Rf();let Yv=0;function Kv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Zv,s={uid:Yv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ad(!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:Hf(r,o),emitsOptions:Jf(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 D.NODE_ENV!=="production"?s.ctx=ov(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Rv.bind(null,s),e.ce&&e.ce(s),s}let dt=null;const Pa=()=>dt||ct;let Ta,yu;{const e=Ls(),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)}};Ta=t("__VUE_INSTANCE_SETTERS__",n=>dt=n),yu=t("__VUE_SSR_SETTERS__",n=>ii=n)}const si=e=>{const t=dt;return Ta(e),e.scope.on(),()=>{e.scope.off(),Ta(t)}},dh=()=>{dt&&dt.scope.off(),Ta(null)},Gv=Jn("slot,component");function wu(e,{isNativeTag:t}){(Gv(e)||t(e))&&G("Do not use built-in or reserved HTML elements as component id: "+e)}function fh(e){return e.vnode.shapeFlag&4}let ii=!1;function Qv(e,t=!1,n=!1){t&&yu(t);const{props:r,children:o}=e.vnode,s=fh(e);gv(e,r,s,t),Ov(e,o,n||t);const i=s?Xv(e,t):void 0;return t&&yu(!1),i}function Xv(e,t){var n;const r=e.type;if(D.NODE_ENV!=="production"){if(r.name&&wu(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)wu(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)ff(s[i])}r.compilerOptions&&Jv()&&G('"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),D.NODE_ENV!=="production"&&sv(e);const{setup:o}=r;if(o){yn();const s=e.setupContext=o.length>1?ty(e):null,i=si(e),a=jo(o,e,0,[D.NODE_ENV!=="production"?Mn(e.props):e.props,s]),l=Il(a);if(wn(),i(),(l||e.sp)&&!Fo(e)&&Cf(e),l){if(a.then(dh,dh),t)return a.then(u=>{hh(e,u,t)}).catch(u=>{zs(u,e,0)});if(e.asyncDep=a,D.NODE_ENV!=="production"&&!e.suspense){const u=(n=r.name)!=null?n:"Anonymous";G(`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 hh(e,a,t)}else ph(e,t)}function hh(e,t,n){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fe(t)?(D.NODE_ENV!=="production"&&ao(t)&&G("setup() should not return VNodes directly - return a render function instead."),D.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Kd(t),D.NODE_ENV!=="production"&&iv(e)):D.NODE_ENV!=="production"&&t!==void 0&&G(`setup() should return an object. Received: ${t===null?"null":typeof t}`),ph(e,n)}const Jv=()=>!0;function ph(e,t,n){const r=e.type;e.render||(e.render=r.render||mt);{const o=si(e);yn();try{lv(e)}finally{wn(),o()}}D.NODE_ENV!=="production"&&!r.render&&e.render===mt&&!t&&(r.template?G('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".'):G("Component is missing template or render function: ",r))}const mh=D.NODE_ENV!=="production"?{get(e,t){return Sa(),gt(e,"get",""),e[t]},set(){return G("setupContext.attrs is readonly."),!1},deleteProperty(){return G("setupContext.attrs is readonly."),!1}}:{get(e,t){return gt(e,"get",""),e[t]}};function ey(e){return new Proxy(e.slots,{get(t,n){return gt(e,"get","$slots"),t[n]}})}function ty(e){const t=n=>{if(D.NODE_ENV!=="production"&&(e.exposed&&G("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ge(n)?r="array":Je(n)&&(r="ref")),r!=="object"&&G(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(D.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,mh))},get slots(){return r||(r=ey(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,mh),slots:e.slots,emit:e.emit,expose:t}}function _u(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Kd(Nr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oo)return oo[n](e)},has(t,n){return n in t||n in oo}})):e.proxy}const ny=/(?:^|[-_])(\w)/g,ry=e=>e.replace(ny,t=>t.toUpperCase()).replace(/[-_]/g,"");function Eu(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function Ia(e,t,n=!1){let r=Eu(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?ry(r):n?"App":"Anonymous"}function gh(e){return _e(e)&&"__vccOpts"in e}const Z=(e,t)=>{const n=bb(e,t,ii);if(D.NODE_ENV!=="production"){const r=Pa();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function ft(e,t,n){const r=arguments.length;return r===2?Fe(t)&&!ge(t)?ao(t)?v(e,null,[t]):v(e,t):v(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ao(n)&&(n=[n]),v(e,t,n))}function oy(){if(D.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(!Fe(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Je(d)){yn();const f=d.value;return wn(),["div",{},["span",e,c(d)],"<",a(f),">"]}else{if(_n(d))return["div",{},["span",e,Lt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${Vn(d)?" (readonly)":""}`];if(Vn(d))return["div",{},["span",e,Lt(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",Ee(d.props))),d.setupState!==ze&&f.push(i("setup",d.setupState)),d.data!==ze&&f.push(i("data",Ee(d.data)));const h=l(d,"computed");h&&f.push(i("computed",h));const m=l(d,"inject");return m&&f.push(i("injected",m)),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]:Fe(d)?["object",{object:f?Ee(d):d}]:["span",n,String(d)]}function l(d,f){const h=d.type;if(_e(h))return;const m={};for(const y in d.ctx)u(h,y,f)&&(m[y]=d.ctx[y]);return m}function u(d,f,h){const m=d[h];if(ge(m)&&m.includes(f)||Fe(m)&&f in m||d.extends&&u(d.extends,f,h)||d.mixins&&d.mixins.some(y=>u(y,f,h)))return!0}function c(d){return Lt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const bh="3.5.17",rr=D.NODE_ENV!=="production"?G:mt;var Un={};let ku;const vh=typeof window<"u"&&window.trustedTypes;if(vh)try{ku=vh.createPolicy("vue",{createHTML:e=>e})}catch(e){Un.NODE_ENV!=="production"&&rr(`Error creating trusted types policy: ${e}`)}const yh=ku?e=>ku.createHTML(e):e=>e,sy="http://www.w3.org/2000/svg",iy="http://www.w3.org/1998/Math/MathML",or=typeof document<"u"?document:null,wh=or&&or.createElement("template"),ay={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"?or.createElementNS(sy,e):t==="mathml"?or.createElementNS(iy,e):n?or.createElement(e,{is:n}):or.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>or.createTextNode(e),createComment:e=>or.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>or.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{wh.innerHTML=yh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=wh.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]}},Vr="transition",ai="animation",li=Symbol("_vtc"),_h={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},ly=it({},wf,_h),ui=(e=>(e.displayName="Transition",e.props=ly,e))((e,{slots:t})=>ft(qb,uy(e),t)),uo=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},Eh=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function uy(e){const t={};for(const B in e)B in _h||(t[B]=e[B]);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,m=cy(o),y=m&&m[0],x=m&&m[1],{onBeforeEnter:P,onEnter:C,onEnterCancelled:U,onLeave:M,onLeaveCancelled:I,onBeforeAppear:V=P,onAppear:E=C,onAppearCancelled:O=U}=t,T=(B,q,be,pe)=>{B._enterCancelled=pe,co(B,q?c:a),co(B,q?u:i),be&&be()},A=(B,q)=>{B._isLeaving=!1,co(B,d),co(B,h),co(B,f),q&&q()},R=B=>(q,be)=>{const pe=B?E:C,he=()=>T(q,B,be);uo(pe,[q,he]),kh(()=>{co(q,B?l:s),sr(q,B?c:a),Eh(pe)||xh(q,r,y,he)})};return it(t,{onBeforeEnter(B){uo(P,[B]),sr(B,s),sr(B,i)},onBeforeAppear(B){uo(V,[B]),sr(B,l),sr(B,u)},onEnter:R(!1),onAppear:R(!0),onLeave(B,q){B._isLeaving=!0;const be=()=>A(B,q);sr(B,d),B._enterCancelled?(sr(B,f),Oh()):(Oh(),sr(B,f)),kh(()=>{B._isLeaving&&(co(B,d),sr(B,h),Eh(M)||xh(B,r,x,be))}),uo(M,[B,be])},onEnterCancelled(B){T(B,!1,void 0,!0),uo(U,[B])},onAppearCancelled(B){T(B,!0,void 0,!0),uo(O,[B])},onLeaveCancelled(B){A(B),uo(I,[B])}})}function cy(e){if(e==null)return null;if(Fe(e))return[xu(e.enter),xu(e.leave)];{const t=xu(e);return[t,t]}}function xu(e){const t=Ig(e);return Un.NODE_ENV!=="production"&&xb(t,"<transition> explicit duration"),t}function sr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[li]||(e[li]=new Set)).add(t)}function co(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[li];n&&(n.delete(t),n.size||(e[li]=void 0))}function kh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let dy=0;function xh(e,t,n,r){const o=e._endId=++dy,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=fy(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 fy(e,t){const n=window.getComputedStyle(e),r=m=>(n[m]||"").split(", "),o=r(`${Vr}Delay`),s=r(`${Vr}Duration`),i=Ah(o,s),a=r(`${ai}Delay`),l=r(`${ai}Duration`),u=Ah(a,l);let c=null,d=0,f=0;t===Vr?i>0&&(c=Vr,d=i,f=s.length):t===ai?u>0&&(c=ai,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Vr:ai:null,f=c?c===Vr?s.length:l.length:0);const h=c===Vr&&/\b(transform|all)(,|$)/.test(r(`${Vr}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Ah(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ch(n)+Ch(e[r])))}function Ch(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Oh(){return document.body.offsetHeight}function hy(e,t,n){const r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Sh=Symbol("_vod"),py=Symbol("_vsh"),my=Symbol(Un.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),gy=/(^|;)\s*display\s*:/;function by(e,t,n){const r=e.style,o=nt(n);let s=!1;if(n&&!o){if(t)if(nt(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Da(r,a,"")}else for(const i in t)n[i]==null&&Da(r,i,"");for(const i in n)i==="display"&&(s=!0),Da(r,i,n[i])}else if(o){if(t!==n){const i=r[my];i&&(n+=";"+i),r.cssText=n,s=gy.test(n)}}else t&&e.removeAttribute("style");Sh in e&&(e[Sh]=s?r.display:"",e[py]&&(r.display="none"))}const vy=/[^\\];\s*$/,Nh=/\s*!important$/;function Da(e,t,n){if(ge(n))n.forEach(r=>Da(e,t,r));else if(n==null&&(n=""),Un.NODE_ENV!=="production"&&vy.test(n)&&rr(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=yy(e,t);Nh.test(n)?e.setProperty(Or(r),n.replace(Nh,""),"important"):e[r]=n}}const Ph=["Webkit","Moz","ms"],Au={};function yy(e,t){const n=Au[t];if(n)return n;let r=Vt(t);if(r!=="filter"&&r in e)return Au[t]=r;r=Gr(r);for(let o=0;o<Ph.length;o++){const s=Ph[o]+r;if(s in e)return Au[t]=s}return t}const Th="http://www.w3.org/1999/xlink";function Ih(e,t,n,r,o,s=Hg(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Th,t.slice(6,t.length)):e.setAttributeNS(Th,t,n):n==null||s&&!Ed(n)?e.removeAttribute(t):e.setAttribute(t,s?"":er(n)?String(n):n)}function Dh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?yh(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=Ed(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch(a){Un.NODE_ENV!=="production"&&!i&&rr(`Failed setting prop "${t}" on <${s.toLowerCase()}>: value ${n} is invalid.`,a)}i&&e.removeAttribute(o||t)}function wy(e,t,n,r){e.addEventListener(t,n,r)}function _y(e,t,n,r){e.removeEventListener(t,n,r)}const $h=Symbol("_vei");function Ey(e,t,n,r,o=null){const s=e[$h]||(e[$h]={}),i=s[t];if(r&&i)i.value=Un.NODE_ENV!=="production"?Vh(r,t):r;else{const[a,l]=ky(t);if(r){const u=s[t]=Cy(Un.NODE_ENV!=="production"?Vh(r,t):r,o);wy(e,a,u,l)}else i&&(_y(e,a,i,l),s[t]=void 0)}}const Mh=/(?:Once|Passive|Capture)$/;function ky(e){let t;if(Mh.test(e)){t={};let r;for(;r=e.match(Mh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Or(e.slice(2)),t]}let Cu=0;const xy=Promise.resolve(),Ay=()=>Cu||(xy.then(()=>Cu=0),Cu=Date.now());function Cy(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;En(Oy(r,n.value),t,5,[r])};return n.value=e,n.attached=Ay(),n}function Vh(e,t){return _e(e)||ge(e)?e:(rr(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
14
- Expected function or array of functions, received type ${typeof e}.`),mt)}function Oy(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,Sy=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?hy(e,r,i):t==="style"?by(e,n,r):Ds(t)?ea(t)||Ey(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ny(e,t,r,i))?(Dh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ih(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!nt(r))?Dh(e,Vt(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ih(e,t,r,i))};function Ny(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lh(t)&&_e(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)&&nt(n)?!1:t in e}const Py=["ctrl","shift","alt","meta"],Ty={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)=>Py.some(n=>e[`${n}Key`]&&!t.includes(n))},Lr=(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=Ty[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Iy=it({patchProp:Sy},ay);let Rh;function Dy(){return Rh||(Rh=Pv(Iy))}const $y=(...e)=>{const t=Dy().createApp(...e);Un.NODE_ENV!=="production"&&(Vy(t),Ly(t));const{mount:n}=t;return t.mount=r=>{const o=Ry(r);if(!o)return;const s=t._component;!_e(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,My(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function My(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vy(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Ug(t)||Bg(t)||Fg(t),writable:!1})}function Ly(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){rr("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 rr(r),n},set(){rr(r)}})}}function Ry(e){if(nt(e)){const t=document.querySelector(e);return Un.NODE_ENV!=="production"&&!t&&rr(`Failed to mount app: mount target selector "${e}" returned null.`),t}return Un.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&rr('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var jy={};function Uy(){oy()}jy.NODE_ENV!=="production"&&Uy();let $a;const By=new Uint8Array(16);function Fy(){if(!$a&&($a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $a(By)}const kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function Hy(e,t=0){return kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]}const jh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ci(e,t,n){if(jh.randomUUID&&!e)return jh.randomUUID();e=e||{};const r=e.random||(e.rng||Fy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Hy(r)}var Ft=Symbol("storefront");function qy(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var zy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("close"),intent:g.string().optional(),completed:g.boolean()}),Wy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("billing-details-updated"),order:Xi.orders.openOrderSchema}),Zy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("completed"),order:Xi.orders.completedOrderSchema}),Yy=g.discriminatedUnion("event",[zy,Wy,Zy]);function Ky(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function Ma(e){var t;if(typeof window>"u"){console.warn("Can not mount checkout server side");return}if(document.getElementById("moonbase-checkout"))return;const n=(t=document.head.querySelector('meta[name="color-scheme"]'))==null?void 0:t.getAttribute("content");n&&(e+=`${e.includes("?")?"&":"?"}color_scheme=${encodeURIComponent(n)}`);const r=document.createElement("iframe");r.id="moonbase-checkout",r.src=e,r.style.position="fixed",r.style.top="0px",r.style.left="0px",r.style.right="0px",r.style.border="none",r.style.colorScheme="normal",r.style.backgroundColor="transparent",r.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),r.setAttribute("background","transparent"),r.setAttribute("frameborder","0"),r.setAttribute("allowtransparency","true"),r.setAttribute("allow","payment"),r.height="100%",r.width="100%",document.body.append(r),document.documentElement.style.overflow="hidden",window.onmessage=function(o){var s;try{const i=Yy.parse(o.data);i.event==="close"&&(document.body.contains(r)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(r)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:i}))),i.event==="billing-details-updated"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-billing-details-updated",{detail:i})),i.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:i}))}catch(i){((s=o.data)==null?void 0:s.source)==="moonbase-checkout"&&console.error("Could not parse event:",o.data,i)}}}var Gy=g.object({source:g.literal("moonbase-subscription"),event:g.literal("close"),completed:g.boolean()}),Qy=g.object({source:g.literal("moonbase-subscription"),event:g.literal("updated-payment-method")}),Xy=g.discriminatedUnion("event",[Gy,Qy]);function Uh(e){if(typeof window>"u"){console.warn("Can not mount subscription server side");return}if(document.getElementById("moonbase-subscription"))return;const t=document.createElement("iframe");t.id="moonbase-subscription",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=Xy.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-subscription-closed",{detail:o})))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-subscription"&&console.error("Could not parse event:",n.data,o)}}}var di=class ut{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=j(null),this.loadedUser=j(!1),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent=qy(l=>this.client.orders.pushContent(l,void 0,this.hasUtmOrReferrer?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=j({id:ci(),status:$o.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(ut.storefrontKey,{suggestedCurrency:"",enabledCurrencies:[],bundles:[],products:[],offers:[]}),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!1),this.utm=r(ut.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(ut.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(ut.utmKey,JSON.stringify(this.utm.value));else{const l=(t.persistUtm?localStorage:sessionStorage).getItem(ut.utmKey);if(l)try{const u=JSON.parse(l);this.utm.value=u}catch(u){console.warn(`Could not parse cached UTM from ${ut.utmKey}`,u)}}const i=localStorage.getItem(ut.sessionKey);i?(this.currentOrder=j(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=j({id:ci(),status:$o.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtmOrReferrer&&this.pushOrderContent());const a=localStorage.getItem(ut.storefrontKey);if(a?(this.storefront=r(ut.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!0)):(this.storefront=r(ut.storefrontKey,{suggestedCurrency:"",enabledCurrencies:[],bundles:[],products:[],offers:[]}),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!1)),this.client.tokenStore.user&&(this.currentUser.value=Xi.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]);Ma(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}if(u==="update_subscription"&&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]);Uh(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-billing-details-updated",()=>{this.updateStorefront(),this.updateUser()}),window.addEventListener("moonbase-checkout-completed",l=>{l.detail.order.id===this.currentOrder.value.id&&this.resetOrder(),this.updateUser()})}get loadedStorefrontPromise(){return new Promise(t=>{Ze(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=>{Ze(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Ky()}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))}onStorefrontUpdated(t){window.addEventListener("moonbase-storefront-updated",n=>t(n.detail.storefront))}install(t){t.provide(Ft,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 Wi||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(ut.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency=t.suggestedCurrency,this.currentOrder.value.items=this.enrichLineItems(this.currentOrder.value.items),typeof window<"u"&&window.dispatchEvent(new CustomEvent("moonbase-storefront-updated",{detail:{storefront:t}}))),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(ut.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 ut.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:ci(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:$o.Open,items:[],couponsApplied:[]};break;case ut.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case ut.utmKey:this.utm.value=JSON.parse(t.newValue);break;case fd.storageKey:t.newValue?console.warn("User was updated",t.newValue):(this.currentUser.value=null,console.warn("User was removed"))}}async refreshOrder(){var t;try{const n=await this.client.orders.get(this.currentOrder.value.id,{abort:this.refreshOrderAbortController.signal});n&&(n.status!==$o.Open?this.resetOrder():(n.items=this.enrichLineItems(n.items),typeof window<"u"&&localStorage.setItem(ut.sessionKey,JSON.stringify(n)),this.storefront.value&&!((t=this.storefront.value.enabledCurrencies)!=null&&t.includes(n.currency))&&(n.currency=this.storefront.value.suggestedCurrency),this.currentOrder.value=n))}catch(n){n instanceof zc&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:ci(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:$o.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(ut.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof Ar)return;console.warn("Could not surrender order:",t)}}enrichLineItems(t){return this.storefront?t.map(n=>{var r,o,s;const i=(r=this.storefront.value.offers)==null?void 0:r.find(a=>a.id===n.offerId);if(n.type==="Product"){const a=this.storefront.value.products.find(c=>c.id===n.productId);let u=((a==null?void 0:a.variations)||[]).find(c=>c.id===n.variationId);return i&&u&&Dn.eligible(i,this.currentOrder.value)&&(u=Dn.applyToVariation(i,u)),{...n,product:a,variation:u,price:u==null?void 0:u.price,appliedDiscount:(o=u==null?void 0:u.discount)!=null?o:n.appliedDiscount}}else{const a=this.storefront.value.bundles.find(c=>c.id===n.bundleId);let u=((a==null?void 0:a.variations)||[]).find(c=>c.id===n.variationId);return i&&u&&Dn.eligible(i,this.currentOrder.value)&&(u=Dn.applyToVariation(i,u)),{...n,bundle:a,variation:u,price:u==null?void 0:u.price,appliedDiscount:(s=u==null?void 0:u.discount)!=null?s:n.appliedDiscount}}}):t}};di.userKey="moonbase_user",di.sessionKey="moonbase_session",di.storefrontKey="moonbase_storefront",di.utmKey="moonbase_utm";var Jy=di;function e1(e,t){const n=fe(Ft);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Pr(e)}`,null),o=n.stateFactory(`activation-request-${Pr(e)}-error`,null),s=n.stateFactory(`activation-request-${Pr(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Pr(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Pr(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Pr(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=mn.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Ze(()=>Pr(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===mn.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}),nu(()=>{l.value&&clearTimeout(l.value)}),Ze(n.currentUser,async()=>{var c,d;const f=Pr(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===mn.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:Z(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===mn.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 Wi?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===mn.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Re(e){const t=e??fe(Ft);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()),getConnectionUrl:async(n,r,o)=>await t.client.identity.getConnectionUrl(n,r,o),disconnectAccount:async n=>(await t.client.identity.disconnectAccount(n),await t.updateUser()),refreshUser:async()=>await t.updateUser()}}function Va(e,t){const n=t??fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function t1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>t.storefront.value.bundles)}function Bn(e){const t=e??fe(Ft);if(!t)throw new Error("No storefront configured");const n=Z(()=>{const i=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((l,u)=>{var c,d,f,h,m,y,x,P,C,U;let M;if(u.type==="Product"){const V=t.storefront.value.products.find(R=>R.id===u.productId),O=((V==null?void 0:V.variations)||[]).find(R=>R.id===u.variationId),T=(d=(c=O==null?void 0:O.pricingTiers)==null?void 0:c.filter(R=>u.quantity>=R.minQuantity))!=null?d:[],A=T.length>0?T[T.length-1]:null;M=(y=(m=(f=A==null?void 0:A.price[i])!=null?f:O==null?void 0:O.price[i])!=null?m:(h=V==null?void 0:V.defaultVariation)==null?void 0:h.price[i])!=null?y:0}else{const V=t.storefront.value.bundles.find(T=>T.id===u.bundleId),O=((V==null?void 0:V.variations)||[]).find(T=>T.id===u.variationId);M=(C=(P=O==null?void 0:O.price[i])!=null?P:(x=V==null?void 0:V.defaultVariation)==null?void 0:x.price[i])!=null?C:0}const I=u.offerId?(U=t.storefront.value.offers)==null?void 0:U.find(V=>V.id===u.offerId):null;if(I&&Dn.eligible(I,t.currentOrder.value)){const V=Ji.apply(I.discount,{[i]:M});M-=V[i]}return l+M*u.quantity},0),currency:i}});function r(i,a,l,u){var c,d,f;if(i=b(i),a??(a=i.defaultVariation),!a)throw new Error("Added item does not have a default variation, and none have been specified");const h=`${i.type==="Bundle"?"b":"p"}/${i.id}/${a.id}`;let m=t==null?void 0:t.currentOrder.value.items.find(y=>y.id===h);if(m)m.quantity+=1,(f=m.offerId)!=null||(m.offerId=l==null?void 0:l.id),!m.variation&&a&&(m.variation=a),!m.price&&a&&(m.price=a.price),!m.appliedDiscount&&a.discount&&(m.appliedDiscount=a.discount),m.type==="Product"&&i.type==="Product"&&!m.product&&(m.product=i),m.type==="Bundle"&&i.type==="Bundle"&&!m.bundle&&(m.bundle=i);else if(i.type==="Bundle"){if(m={id:h,type:"Bundle",bundleId:i.id,bundle:i,quantity:1,variation:a,variationId:a.id,offerId:l==null?void 0:l.id,price:a.price,appliedDiscount:a.discount,isDefaultVariation:a.id===((c=i.defaultVariation)==null?void 0:c.id)},(u==null?void 0:u.bundleBehaviour)==="replace"){const y=t==null?void 0:t.currentOrder.value.items.filter(x=>x.type==="Product"&&i.products.some(P=>P.included&&P.id===x.productId));for(const x of y??[]){const P=t==null?void 0:t.currentOrder.value.items.findIndex(C=>C.id===x.id);P!==void 0&&(t==null||t.currentOrder.value.items.splice(P,1))}m.replaced=y==null?void 0:y.filter(x=>x.type==="Product").map(x=>`${x.productId}/${x.variationId}`)}t==null||t.currentOrder.value.items.push(m)}else if(i.type==="Product")m={id:h,type:"Product",productId:i.id,product:i,quantity:1,variation:a,variationId:a.id,offerId:l==null?void 0:l.id,price:a.price,appliedDiscount:a.discount,isDefaultVariation:a.id===((d=i.defaultVariation)==null?void 0:d.id)},t==null||t.currentOrder.value.items.push(m);else throw new gn("Invalid input",`Could not handle item of type '${i.type}'`);return t==null||t.pushOrderContent(),m}function o(i,a){var l,u;if(t&&i.type==="Bundle"&&i.replaced&&i.replaced.length>0){let c=a;for(const{productId:d,variationId:f}of i.replaced.map(h=>({productId:h.split("/")[0],variationId:h.split("/")[1]}))){const h=t.storefront.value.products.find(y=>y.id===d),m=(l=h==null?void 0:h.variations)==null?void 0:l.find(y=>y.id===f);if(h&&m&&!t.currentOrder.value.items.some(y=>y.type==="Product"&&y.productId===d)){const x={id:`p/${h.id}/${f}`,type:"Product",productId:h.id,product:h,quantity:1,variation:m,variationId:f,price:m.price,appliedDiscount:m.discount,isDefaultVariation:m.id===((u=h.defaultVariation)==null?void 0:u.id)};c!==void 0?(t.currentOrder.value.items.splice(c,0,x),c++):t.currentOrder.value.items.push(x)}}}}function s(){var i;if(t){for(const a of t.currentOrder.value.items)if(a.offerId){const l=(i=t.storefront.value.offers)==null?void 0:i.find(u=>u.id===a.offerId);(!l||!Dn.eligible(l,t.currentOrder.value))&&(a.offerId=void 0)}}}return{items:Z(()=>t.enrichLineItems(t.currentOrder.value.items)),currency:Z(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:n,addToCart:r,setQuantity:(i,a)=>{const l=t.currentOrder.value.items.find(u=>u.id===i.id);if(!l)throw new Error("Cart item not found");if(l.quantity=a,l.quantity<=0){const u=t.currentOrder.value.items.findIndex(c=>c.id===l.id);t.currentOrder.value.items.splice(u,1),o(i,u),s()}return t.pushOrderContent(),i},removeFromCart:i=>{const a=t.currentOrder.value.items.findIndex(l=>l.id===i.id);t.currentOrder.value.items.splice(a,1),o(i,a),s(),t.pushOrderContent()},checkout:async i=>{var a;const l=typeof window<"u"?window.location.pathname:"",u=new URL((a=i.returnUrl)!=null?a:l,document.baseURI).href,c=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:!i.redirect||i.returnUrl?u:void 0},t.hasUtm?t.utm.value:void 0);if(c.items=t.enrichLineItems(c.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:c,total:n.value}})),!i.redirect&&c.embeddedCheckoutUrl&&typeof window<"u"){const d=c.embeddedCheckoutUrl;return new Promise(f=>{Ma(d.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",h=>{const m=h;f({next:m.detail.intent,completed:m.detail.completed})},{once:!0})})}else{if(i.redirect&&c.checkoutUrl&&typeof window<"u")return window.location.href=c.checkoutUrl,{next:void 0,completed:!1};throw new Error("No checkout URL found")}}}}async function n1(e,t,n){var r,o;const s=n??fe(Ft);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 gn("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:ci(),currency:s.storefront.value.suggestedCurrency,items:i},{returnUrl:!t.redirect||t.returnUrl?l:void 0},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=>{Ma(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 fo(e){const t=fe(Ft);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=>{Ma(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})})},updateSubscriptionPaymentMethod: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,a=await t.client.inventory.subscriptions.getById(n.id,{toUpdatePaymentMethod:!0,returnUrl:i});if(window.dispatchEvent(new CustomEvent("moonbase-subscription-payment-method-update-initiated",{detail:{subscription:Ee(n)}})),a.embeddedUpdatePaymentUrl&&typeof window<"u"){const l=a.embeddedUpdatePaymentUrl;return new Promise(u=>{Uh(l.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-subscription-closed",c=>{u({completed:c.detail.completed})},{once:!0})})}else throw new Error("No update URL found")}}}function r1(e,t){const n=fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>{var r;return((r=n.storefront.value.offers)==null?void 0:r.find(o=>o.id===e))||null})}function o1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>{var n;return((n=t.storefront.value.offers)!=null?n:[]).filter(r=>Dn.eligible(r,t.currentOrder.value)&&!s1(r,t.currentOrder.value)&&!i1(r,t.currentOrder.value))})}function s1(e,t){return t.items.some(n=>n.offerId===e.id)}function i1(e,t){const n=e.target;return Array.isArray(n)?n.every(r=>t.items.some(o=>o.type==="Product"&&r.type==="Product"&&o.productId===r.id||o.type==="Bundle"&&r.type==="Bundle"&&o.bundleId===r.id)):t.items.some(r=>r.type==="Product"&&n.type==="Product"&&r.productId===n.id||r.type==="Bundle"&&n.type==="Bundle"&&r.bundleId===n.id)}function fi(e,t){const n=t??fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function a1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>t.storefront.value.products)}function Bh(e){const t=fe(Ft);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 Ar?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Ar?new Error("Voucher code invalid"):r}}}}function l1(e,t,n){const r={endpoint:e};return new Jy(r,new Ag(r),(o,s)=>j(s))}function La(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 Ou(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function u1(){return Fh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Fh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const c1=typeof Proxy=="function",d1="devtools-plugin:setup",f1="plugin:settings:set";let zo,Su;function h1(){var e;return zo!==void 0||(typeof window<"u"&&window.performance?(zo=!0,Su=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(zo=!0,Su=globalThis.perf_hooks.performance):zo=!1),zo}function p1(){return h1()?Su.now():Date.now()}class m1{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 p1()}},n&&n.on(f1,(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=u1(),s=c1&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(d1,e,t);else{const i=s?new m1(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Me={};let hi;const pi=e=>hi=e,qh=Me.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ho(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Fn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Fn||(Fn={}));const po=typeof window<"u",zh=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 g1(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 Nu(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Yh(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Wh(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ra(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 ja=typeof navigator=="object"?navigator:{userAgent:""},Zh=/Macintosh/.test(ja.userAgent)&&/AppleWebKit/.test(ja.userAgent)&&!/Safari/.test(ja.userAgent),Yh=po?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Zh?b1:"msSaveOrOpenBlob"in ja?v1:y1:()=>{};function b1(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?Wh(r.href)?Nu(e,t,n):(r.target="_blank",Ra(r)):Ra(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ra(r)},0))}function v1(e,t="download",n){if(typeof e=="string")if(Wh(e))Nu(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ra(r)})}else navigator.msSaveOrOpenBlob(g1(e,n),t)}function y1(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Nu(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(zh.HTMLElement))||"safari"in zh,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Zh)&&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 Pu(e){return"_a"in e&&"install"in e}function Kh(){if(!("clipboard"in navigator))return bt("Your browser doesn't support the Clipboard API","error"),!0}function Gh(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 w1(e){if(!Kh())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),bt("Global state copied to clipboard.")}catch(t){if(Gh(t))return;bt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function _1(e){if(!Kh())try{Qh(e,JSON.parse(await navigator.clipboard.readText())),bt("Global state pasted from clipboard.")}catch(t){if(Gh(t))return;bt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function E1(e){try{Yh(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 ir;function k1(){ir||(ir=document.createElement("input"),ir.type="file",ir.accept=".json");function e(){return new Promise((t,n)=>{ir.onchange=async()=>{const r=ir.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},ir.oncancel=()=>t(null),ir.onerror=n,ir.click()})}return e}async function x1(e){try{const n=await k1()();if(!n)return;const{text:r,file:o}=n;Qh(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 Qh(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 Cn(e){return{_custom:{display:e}}}const Xh="🍍 Pinia (root)",Ua="_root";function A1(e){return Pu(e)?{id:Ua,label:Xh}:{id:e.$id,label:e.$id}}function C1(e){if(Pu(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 O1(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:Cn(e.type),key:Cn(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function S1(e){switch(e){case Fn.direct:return"mutation";case Fn.patchFunction:return"$patch";case Fn.patchObject:return"$patch";default:return"unknown"}}let Wo=!0;const Ba=[],mo="pinia:mutations",Pt="pinia",{assign:N1}=Object,Fa=e=>"🍍 "+e;function P1(e,t){Hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ba,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:mo,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{w1(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await _1(t),n.sendInspectorTree(Pt),n.sendInspectorState(Pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{E1(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await x1(t),n.sendInspectorTree(Pt),n.sendInspectorState(Pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?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:Fa(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:Ee(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:Fa(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===Pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Xh.toLowerCase().includes(r.filter.toLowerCase())):o).map(A1)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===Pt){const o=r.nodeId===Ua?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Ua&&(globalThis.$store=Ee(o)),r.state=C1(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===Pt){const s=r.nodeId===Ua?t:t._s.get(r.nodeId);if(!s)return bt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Pu(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wo=!1,r.set(s,i,r.state.value),Wo=!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}":
12
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const Bt=Hv;function Pv(e){return Tv(e)}function Tv(e,t){Nv();const n=Ls();n.__VUE__=!0,D.NODE_ENV!=="production"&&lf(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=mt,insertStaticContent:m}=e,y=(w,S,F,Q=null,Y=null,K=null,se=void 0,re=null,ne=D.NODE_ENV!=="production"&&kn?!1:!!S.dynamicChildren)=>{if(w===S)return;w&&!lo(w,S)&&(Q=ml(w),wt(w,Y,K,!0),w=null),S.patchFlag===-2&&(ne=!1,S.dynamicChildren=null);const{type:X,ref:we,shapeFlag:ie}=S;switch(X){case ti:x(w,S,F,Q);break;case lt:P(w,S,F,Q);break;case ni:w==null?C(S,F,Q,se):D.NODE_ENV!=="production"&&U(w,S,F,se);break;case de:q(w,S,F,Q,Y,K,se,re,ne);break;default:ie&1?V(w,S,F,Q,Y,K,se,re,ne):ie&6?be(w,S,F,Q,Y,K,se,re,ne):ie&64||ie&128?X.process(w,S,F,Q,Y,K,se,re,ne,Di):D.NODE_ENV!=="production"&&G("Invalid VNode type:",X,`(${typeof X})`)}we!=null&&Y?Gs(we,w&&w.ref,K,S||w,!S):we==null&&w&&w.ref!=null&&Gs(w.ref,null,K,w,!0)},x=(w,S,F,Q)=>{if(w==null)r(S.el=a(S.children),F,Q);else{const Y=S.el=w.el;S.children!==w.children&&u(Y,S.children)}},P=(w,S,F,Q)=>{w==null?r(S.el=l(S.children||""),F,Q):S.el=w.el},C=(w,S,F,Q)=>{[w.el,w.anchor]=m(w.children,S,F,Q,w.el,w.anchor)},U=(w,S,F,Q)=>{if(S.children!==w.children){const Y=f(w.anchor);I(w),[S.el,S.anchor]=m(S.children,F,Y,Q)}else S.el=w.el,S.anchor=w.anchor},M=({el:w,anchor:S},F,Q)=>{let Y;for(;w&&w!==S;)Y=f(w),r(w,F,Q),w=Y;r(S,F,Q)},I=({el:w,anchor:S})=>{let F;for(;w&&w!==S;)F=f(w),o(w),w=F;o(S)},V=(w,S,F,Q,Y,K,se,re,ne)=>{S.type==="svg"?se="svg":S.type==="math"&&(se="mathml"),w==null?E(S,F,Q,Y,K,se,re,ne):A(w,S,Y,K,se,re,ne)},E=(w,S,F,Q,Y,K,se,re)=>{let ne,X;const{props:we,shapeFlag:ie,transition:ve,dirs:Oe}=w;if(ne=w.el=i(w.type,K,we&&we.is,we),ie&8?c(ne,w.children):ie&16&&T(w.children,ne,null,Q,Y,hu(w,K),se,re),Oe&&no(w,null,Q,"created"),O(ne,w,w.scopeId,se,Q),we){for(const tt in we)tt!=="value"&&!$s(tt)&&s(ne,tt,null,we[tt],K,Q);"value"in we&&s(ne,"value",null,we.value,K),(X=we.onVnodeBeforeMount)&&jn(X,Q,w)}D.NODE_ENV!=="production"&&(Vs(ne,"__vnode",w,!0),Vs(ne,"__vueParentComponent",Q,!0)),Oe&&no(w,null,Q,"beforeMount");const je=Iv(Y,ve);je&&ve.beforeEnter(ne),r(ne,S,F),((X=we&&we.onVnodeMounted)||je||Oe)&&Bt(()=>{X&&jn(X,Q,w),je&&ve.enter(ne),Oe&&no(w,null,Q,"mounted")},Y)},O=(w,S,F,Q,Y)=>{if(F&&h(w,F),Q)for(let K=0;K<Q.length;K++)h(w,Q[K]);if(Y){let K=Y.subTree;if(D.NODE_ENV!=="production"&&K.patchFlag>0&&K.patchFlag&2048&&(K=gu(K.children)||K),S===K||oh(K.type)&&(K.ssContent===S||K.ssFallback===S)){const se=Y.vnode;O(w,se,se.scopeId,se.slotScopeIds,Y.parent)}}},T=(w,S,F,Q,Y,K,se,re,ne=0)=>{for(let X=ne;X<w.length;X++){const we=w[X]=re?Mr(w[X]):An(w[X]);y(null,we,S,F,Q,Y,K,se,re)}},A=(w,S,F,Q,Y,K,se)=>{const re=S.el=w.el;D.NODE_ENV!=="production"&&(re.__vnode=S);let{patchFlag:ne,dynamicChildren:X,dirs:we}=S;ne|=w.patchFlag&16;const ie=w.props||ze,ve=S.props||ze;let Oe;if(F&&io(F,!1),(Oe=ve.onVnodeBeforeUpdate)&&jn(Oe,F,S,w),we&&no(S,w,F,"beforeUpdate"),F&&io(F,!0),D.NODE_ENV!=="production"&&kn&&(ne=0,se=!1,X=null),(ie.innerHTML&&ve.innerHTML==null||ie.textContent&&ve.textContent==null)&&c(re,""),X?(R(w.dynamicChildren,X,re,F,Q,hu(S,Y),K),D.NODE_ENV!=="production"&&ei(w,S)):se||Be(w,S,re,null,F,Q,hu(S,Y),K,!1),ne>0){if(ne&16)B(re,ie,ve,F,Y);else if(ne&2&&ie.class!==ve.class&&s(re,"class",null,ve.class,Y),ne&4&&s(re,"style",ie.style,ve.style,Y),ne&8){const je=S.dynamicProps;for(let tt=0;tt<je.length;tt++){const Xe=je[tt],Kt=ie[Xe],Gt=ve[Xe];(Gt!==Kt||Xe==="value")&&s(re,Xe,Kt,Gt,Y,F)}}ne&1&&w.children!==S.children&&c(re,S.children)}else!se&&X==null&&B(re,ie,ve,F,Y);((Oe=ve.onVnodeUpdated)||we)&&Bt(()=>{Oe&&jn(Oe,F,S,w),we&&no(S,w,F,"updated")},Q)},R=(w,S,F,Q,Y,K,se)=>{for(let re=0;re<S.length;re++){const ne=w[re],X=S[re],we=ne.el&&(ne.type===de||!lo(ne,X)||ne.shapeFlag&198)?d(ne.el):F;y(ne,X,we,null,Q,Y,K,se,!0)}},B=(w,S,F,Q,Y)=>{if(S!==F){if(S!==ze)for(const K in S)!$s(K)&&!(K in F)&&s(w,K,S[K],null,Y,Q);for(const K in F){if($s(K))continue;const se=F[K],re=S[K];se!==re&&K!=="value"&&s(w,K,re,se,Y,Q)}"value"in F&&s(w,"value",S.value,F.value,Y)}},q=(w,S,F,Q,Y,K,se,re,ne)=>{const X=S.el=w?w.el:a(""),we=S.anchor=w?w.anchor:a("");let{patchFlag:ie,dynamicChildren:ve,slotScopeIds:Oe}=S;D.NODE_ENV!=="production"&&(kn||ie&2048)&&(ie=0,ne=!1,ve=null),Oe&&(re=re?re.concat(Oe):Oe),w==null?(r(X,F,Q),r(we,F,Q),T(S.children||[],F,we,Y,K,se,re,ne)):ie>0&&ie&64&&ve&&w.dynamicChildren?(R(w.dynamicChildren,ve,F,Y,K,se,re),D.NODE_ENV!=="production"?ei(w,S):(S.key!=null||Y&&S===Y.subTree)&&ei(w,S,!0)):Be(w,S,F,we,Y,K,se,re,ne)},be=(w,S,F,Q,Y,K,se,re,ne)=>{S.slotScopeIds=re,w==null?S.shapeFlag&512?Y.ctx.activate(S,F,Q,se,ne):pe(S,F,Q,Y,K,se,ne):he(w,S,ne)},pe=(w,S,F,Q,Y,K,se)=>{const re=w.component=Kv(w,Q,Y);if(D.NODE_ENV!=="production"&&re.type.__hmrId&&Sb(re),D.NODE_ENV!=="production"&&(fa(w),Ho(re,"mount")),Qs(w)&&(re.ctx.renderer=Di),D.NODE_ENV!=="production"&&Ho(re,"init"),Qv(re,!1,se),D.NODE_ENV!=="production"&&qo(re,"init"),D.NODE_ENV!=="production"&&kn&&(w.el=null),re.asyncDep){if(Y&&Y.registerDep(re,oe,se),!w.el){const ne=re.subTree=v(lt);P(null,ne,S,F)}}else oe(re,w,S,F,Y,K,se);D.NODE_ENV!=="production"&&(ha(),qo(re,"mount"))},he=(w,S,F)=>{const Q=S.component=w.component;if(Bv(w,S,F))if(Q.asyncDep&&!Q.asyncResolved){D.NODE_ENV!=="production"&&fa(S),ue(Q,S,F),D.NODE_ENV!=="production"&&ha();return}else Q.next=S,Q.update();else S.el=w.el,Q.vnode=S},oe=(w,S,F,Q,Y,K,se)=>{const re=()=>{if(w.isMounted){let{next:ie,bu:ve,u:Oe,parent:je,vnode:tt}=w;{const Yn=Gf(w);if(Yn){ie&&(ie.el=tt.el,ue(w,ie,se)),Yn.asyncDep.then(()=>{w.isUnmounted||re()});return}}let Xe=ie,Kt;D.NODE_ENV!=="production"&&fa(ie||w.vnode),io(w,!1),ie?(ie.el=tt.el,ue(w,ie,se)):ie=tt,ve&&Ms(ve),(Kt=ie.props&&ie.props.onVnodeBeforeUpdate)&&jn(Kt,je,ie,tt),io(w,!0),D.NODE_ENV!=="production"&&Ho(w,"render");const Gt=eh(w);D.NODE_ENV!=="production"&&qo(w,"render");const Zn=w.subTree;w.subTree=Gt,D.NODE_ENV!=="production"&&Ho(w,"patch"),y(Zn,Gt,d(Zn.el),ml(Zn),w,Y,K),D.NODE_ENV!=="production"&&qo(w,"patch"),ie.el=Gt.el,Xe===null&&Fv(w,Gt.el),Oe&&Bt(Oe,Y),(Kt=ie.props&&ie.props.onVnodeUpdated)&&Bt(()=>jn(Kt,je,ie,tt),Y),D.NODE_ENV!=="production"&&uf(w),D.NODE_ENV!=="production"&&ha()}else{let ie;const{el:ve,props:Oe}=S,{bm:je,m:tt,parent:Xe,root:Kt,type:Gt}=w,Zn=Fo(S);io(w,!1),je&&Ms(je),!Zn&&(ie=Oe&&Oe.onVnodeBeforeMount)&&jn(ie,Xe,S),io(w,!0);{Kt.ce&&Kt.ce._def.shadowRoot!==!1&&Kt.ce._injectChildStyle(Gt),D.NODE_ENV!=="production"&&Ho(w,"render");const Yn=w.subTree=eh(w);D.NODE_ENV!=="production"&&qo(w,"render"),D.NODE_ENV!=="production"&&Ho(w,"patch"),y(null,Yn,F,Q,w,Y,K),D.NODE_ENV!=="production"&&qo(w,"patch"),S.el=Yn.el}if(tt&&Bt(tt,Y),!Zn&&(ie=Oe&&Oe.onVnodeMounted)){const Yn=S;Bt(()=>jn(ie,Xe,Yn),Y)}(S.shapeFlag&256||Xe&&Fo(Xe.vnode)&&Xe.vnode.shapeFlag&256)&&w.a&&Bt(w.a,Y),w.isMounted=!0,D.NODE_ENV!=="production"&&$b(w),S=F=Q=null}};w.scope.on();const ne=w.effect=new Sd(re);w.scope.off();const X=w.update=ne.run.bind(ne),we=w.job=ne.runIfDirty.bind(ne);we.i=w,we.id=w.uid,ne.scheduler=()=>ga(we),io(w,!0),D.NODE_ENV!=="production"&&(ne.onTrack=w.rtc?ie=>Ms(w.rtc,ie):void 0,ne.onTrigger=w.rtg?ie=>Ms(w.rtg,ie):void 0),X()},ue=(w,S,F)=>{S.component=w;const Q=w.vnode.props;w.vnode=S,w.next=null,vv(w,S.props,Q,F),Sv(w,S.children,F),yn(),nf(w),wn()},Be=(w,S,F,Q,Y,K,se,re,ne=!1)=>{const X=w&&w.children,we=w?w.shapeFlag:0,ie=S.children,{patchFlag:ve,shapeFlag:Oe}=S;if(ve>0){if(ve&128){ot(X,ie,F,Q,Y,K,se,re,ne);return}else if(ve&256){Qe(X,ie,F,Q,Y,K,se,re,ne);return}}Oe&8?(we&16&&Ii(X,Y,K),ie!==X&&c(F,ie)):we&16?Oe&16?ot(X,ie,F,Q,Y,K,se,re,ne):Ii(X,Y,K,!0):(we&8&&c(F,""),Oe&16&&T(ie,F,Q,Y,K,se,re,ne))},Qe=(w,S,F,Q,Y,K,se,re,ne)=>{w=w||Mo,S=S||Mo;const X=w.length,we=S.length,ie=Math.min(X,we);let ve;for(ve=0;ve<ie;ve++){const Oe=S[ve]=ne?Mr(S[ve]):An(S[ve]);y(w[ve],Oe,F,null,Y,K,se,re,ne)}X>we?Ii(w,Y,K,!0,!1,ie):T(S,F,Q,Y,K,se,re,ne,ie)},ot=(w,S,F,Q,Y,K,se,re,ne)=>{let X=0;const we=S.length;let ie=w.length-1,ve=we-1;for(;X<=ie&&X<=ve;){const Oe=w[X],je=S[X]=ne?Mr(S[X]):An(S[X]);if(lo(Oe,je))y(Oe,je,F,null,Y,K,se,re,ne);else break;X++}for(;X<=ie&&X<=ve;){const Oe=w[ie],je=S[ve]=ne?Mr(S[ve]):An(S[ve]);if(lo(Oe,je))y(Oe,je,F,null,Y,K,se,re,ne);else break;ie--,ve--}if(X>ie){if(X<=ve){const Oe=ve+1,je=Oe<we?S[Oe].el:Q;for(;X<=ve;)y(null,S[X]=ne?Mr(S[X]):An(S[X]),F,je,Y,K,se,re,ne),X++}}else if(X>ve)for(;X<=ie;)wt(w[X],Y,K,!0),X++;else{const Oe=X,je=X,tt=new Map;for(X=je;X<=ve;X++){const Zt=S[X]=ne?Mr(S[X]):An(S[X]);Zt.key!=null&&(D.NODE_ENV!=="production"&&tt.has(Zt.key)&&G("Duplicate keys found during update:",JSON.stringify(Zt.key),"Make sure keys are unique."),tt.set(Zt.key,X))}let Xe,Kt=0;const Gt=ve-je+1;let Zn=!1,Yn=0;const $i=new Array(Gt);for(X=0;X<Gt;X++)$i[X]=0;for(X=Oe;X<=ie;X++){const Zt=w[X];if(Kt>=Gt){wt(Zt,Y,K,!0);continue}let Kn;if(Zt.key!=null)Kn=tt.get(Zt.key);else for(Xe=je;Xe<=ve;Xe++)if($i[Xe-je]===0&&lo(Zt,S[Xe])){Kn=Xe;break}Kn===void 0?wt(Zt,Y,K,!0):($i[Kn-je]=X+1,Kn>=Yn?Yn=Kn:Zn=!0,y(Zt,S[Kn],F,null,Y,K,se,re,ne),Kt++)}const Km=Zn?Dv($i):Mo;for(Xe=Km.length-1,X=Gt-1;X>=0;X--){const Zt=je+X,Kn=S[Zt],Gm=Zt+1<we?S[Zt+1].el:Q;$i[X]===0?y(null,Kn,F,Gm,Y,K,se,re,ne):Zn&&(Xe<0||X!==Km[Xe]?$t(Kn,F,Gm,2):Xe--)}}},$t=(w,S,F,Q,Y=null)=>{const{el:K,type:se,transition:re,children:ne,shapeFlag:X}=w;if(X&6){$t(w.component.subTree,S,F,Q);return}if(X&128){w.suspense.move(S,F,Q);return}if(X&64){se.move(w,S,F,Di);return}if(se===de){r(K,S,F);for(let ie=0;ie<ne.length;ie++)$t(ne[ie],S,F,Q);r(w.anchor,S,F);return}if(se===ni){M(w,S,F);return}if(Q!==2&&X&1&&re)if(Q===0)re.beforeEnter(K),r(K,S,F),Bt(()=>re.enter(K),Y);else{const{leave:ie,delayLeave:ve,afterLeave:Oe}=re,je=()=>{w.ctx.isUnmounted?o(K):r(K,S,F)},tt=()=>{ie(K,()=>{je(),Oe&&Oe()})};ve?ve(K,je,tt):tt()}else r(K,S,F)},wt=(w,S,F,Q=!1,Y=!1)=>{const{type:K,props:se,ref:re,children:ne,dynamicChildren:X,shapeFlag:we,patchFlag:ie,dirs:ve,cacheIndex:Oe}=w;if(ie===-2&&(Y=!1),re!=null&&(yn(),Gs(re,null,F,w,!0),wn()),Oe!=null&&(S.renderCache[Oe]=void 0),we&256){S.ctx.deactivate(w);return}const je=we&1&&ve,tt=!Fo(w);let Xe;if(tt&&(Xe=se&&se.onVnodeBeforeUnmount)&&jn(Xe,S,w),we&6)BA(w.component,F,Q);else{if(we&128){w.suspense.unmount(F,Q);return}je&&no(w,null,S,"beforeUnmount"),we&64?w.type.remove(w,S,F,Di,Q):X&&!X.hasOnce&&(K!==de||ie>0&&ie&64)?Ii(X,S,F,!1,!0):(K===de&&ie&384||!Y&&we&16)&&Ii(ne,S,F),Q&&gr(w)}(tt&&(Xe=se&&se.onVnodeUnmounted)||je)&&Bt(()=>{Xe&&jn(Xe,S,w),je&&no(w,null,S,"unmounted")},F)},gr=w=>{const{type:S,el:F,anchor:Q,transition:Y}=w;if(S===de){D.NODE_ENV!=="production"&&w.patchFlag>0&&w.patchFlag&2048&&Y&&!Y.persisted?w.children.forEach(se=>{se.type===lt?o(se.el):gr(se)}):qr(F,Q);return}if(S===ni){I(w);return}const K=()=>{o(F),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(w.shapeFlag&1&&Y&&!Y.persisted){const{leave:se,delayLeave:re}=Y,ne=()=>se(F,K);re?re(w.el,K,ne):ne()}else K()},qr=(w,S)=>{let F;for(;w!==S;)F=f(w),o(w),w=F;o(S)},BA=(w,S,F)=>{D.NODE_ENV!=="production"&&w.type.__hmrId&&Nb(w);const{bum:Q,scope:Y,job:K,subTree:se,um:re,m:ne,a:X,parent:we,slots:{__:ie}}=w;Qf(ne),Qf(X),Q&&Ms(Q),we&&ge(ie)&&ie.forEach(ve=>{we.renderCache[ve]=void 0}),Y.stop(),K&&(K.flags|=8,wt(se,w,S,F)),re&&Bt(re,S),Bt(()=>{w.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&w.asyncDep&&!w.asyncResolved&&w.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve()),D.NODE_ENV!=="production"&&Vb(w)},Ii=(w,S,F,Q=!1,Y=!1,K=0)=>{for(let se=K;se<w.length;se++)wt(w[se],S,F,Q,Y)},ml=w=>{if(w.shapeFlag&6)return ml(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const S=f(w.anchor||w.el),F=S&&S[hf];return F?f(F):S};let Ec=!1;const Ym=(w,S,F)=>{w==null?S._vnode&&wt(S._vnode,null,null,!0):y(S._vnode||null,w,S,null,null,null,F),S._vnode=w,Ec||(Ec=!0,nf(),rf(),Ec=!1)},Di={p:y,um:wt,m:$t,r:gr,mt:pe,mc:T,pc:Be,pbc:R,n:ml,o:e};return{render:Ym,hydrate:void 0,createApp:pv(Ym)}}function hu({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 io({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Iv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ei(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]=Mr(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&ei(i,a)),a.type===ti&&(a.el=i.el),a.type===lt&&!a.el&&(a.el=i.el),D.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function Dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Gf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gf(t)}function Qf(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const $v=Symbol.for("v-scx"),Mv=()=>{{const e=fe($v);return e||D.NODE_ENV!=="production"&&G("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Xt(e,t){return pu(e,null,t)}function Ze(e,t,n){return D.NODE_ENV!=="production"&&!_e(t)&&G("`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."),pu(e,t,n)}function pu(e,t,n=ze){const{immediate:r,deep:o,flush:s,once:i}=n;D.NODE_ENV!=="production"&&!t&&(r!==void 0&&G('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&G('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&G('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=at({},n);D.NODE_ENV!=="production"&&(a.onWarn=G);const l=t&&r||!t&&s!=="post";let u;if(ii){if(s==="sync"){const h=Mv();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=mt,h.resume=mt,h.pause=mt,h}}const c=dt;a.call=(h,m,y)=>En(h,c,m,y);let d=!1;s==="post"?a.scheduler=h=>{Bt(h,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():ga(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=yb(e,t,a);return ii&&(u?u.push(f):l&&f()),f}function Vv(e,t,n){const r=this.proxy,o=nt(e)?e.includes(".")?Xf(r,e):()=>r[e]:e.bind(r,r);let s;_e(t)?s=t:(s=t.handler,n=t);const i=si(this),a=pu(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 Lv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Vt(t)}Modifiers`]||e[`${Or(t)}Modifiers`];function Rv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ze;if(D.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Qr(Vt(t))in d))&&G(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Qr(Vt(t))}" prop.`);else{const f=c[t];_e(f)&&(f(...n)||G(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Lv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>nt(c)?c.trim():c)),i.number&&(o=n.map(Tg))),D.NODE_ENV!=="production"&&jb(e,t,o),D.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[Qr(c)]&&G(`Event "${c}" is emitted in component ${Ia(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 "${Or(t)}" instead of "${t}".`)}let a,l=r[a=Qr(t)]||r[a=Qr(Vt(t))];!l&&s&&(l=r[a=Qr(Or(t))]),l&&En(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,En(u,e,6,o)}}function Jf(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(!_e(e)){const l=u=>{const c=Jf(u,t,!0);c&&(a=!0,at(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Fe(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>i[l]=null):at(i,s),Fe(e)&&r.set(e,i),i)}function Oa(e,t){return!e||!Ds(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,Or(t))||Le(e,t))}let mu=!1;function Sa(){mu=!0}function eh(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:m,inheritAttrs:y}=e,x=ya(e);let P,C;D.NODE_ENV!=="production"&&(mu=!1);try{if(n.shapeFlag&4){const I=o||r,V=D.NODE_ENV!=="production"&&h.__isScriptSetup?new Proxy(I,{get(E,O,T){return G(`Property '${String(O)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(E,O,T)}}):I;P=An(u.call(V,I,c,D.NODE_ENV!=="production"?Mn(d):d,h,f,m)),C=a}else{const I=t;D.NODE_ENV!=="production"&&a===d&&Sa(),P=An(I.length>1?I(D.NODE_ENV!=="production"?Mn(d):d,D.NODE_ENV!=="production"?{get attrs(){return Sa(),Mn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):I(D.NODE_ENV!=="production"?Mn(d):d,null)),C=t.props?a:jv(a)}}catch(I){ri.length=0,zs(I,e,1),P=v(lt)}let U=P,M;if(D.NODE_ENV!=="production"&&P.patchFlag>0&&P.patchFlag&2048&&([U,M]=th(P)),C&&y!==!1){const I=Object.keys(C),{shapeFlag:V}=U;if(I.length){if(V&7)s&&I.some(ea)&&(C=Uv(C,s)),U=xn(U,C,!1,!0);else if(D.NODE_ENV!=="production"&&!mu&&U.type!==lt){const E=Object.keys(a),O=[],T=[];for(let A=0,R=E.length;A<R;A++){const B=E[A];Ds(B)?ea(B)||O.push(B[2].toLowerCase()+B.slice(3)):T.push(B)}T.length&&G(`Extraneous non-props attributes (${T.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),O.length&&G(`Extraneous non-emits event listeners (${O.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&&(D.NODE_ENV!=="production"&&!nh(U)&&G("Runtime directive used on component with non-element root node. The directives will not function as intended."),U=xn(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition&&(D.NODE_ENV!=="production"&&!nh(U)&&G("Component inside <Transition> renders non-element root node that cannot be animated."),Ks(U,n.transition)),D.NODE_ENV!=="production"&&M?M(U):P=U,ya(x),P}const th=e=>{const t=e.children,n=e.dynamicChildren,r=gu(t,!1);if(r){if(D.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return th(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[An(r),i]};function gu(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(ao(o)){if(o.type!==lt||o.children==="v-if"){if(n)return;if(n=o,D.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return gu(n.children)}}else return}return n}const jv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ds(n))&&((t||(t={}))[n]=e[n]);return t},Uv=(e,t)=>{const n={};for(const r in e)(!ea(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},nh=e=>e.shapeFlag&7||e.type===lt;function Bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(D.NODE_ENV!=="production"&&(o||a)&&kn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?rh(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]&&!Oa(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?rh(r,i,u):!0:!!i;return!1}function rh(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]&&!Oa(n,s))return!0}return!1}function Fv({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 oh=e=>e.__isSuspense;function Hv(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):tf(e)}const de=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),lt=Symbol.for("v-cmt"),ni=Symbol.for("v-stc"),ri=[];let Jt=null;function p(e=!1){ri.push(Jt=e?null:[])}function qv(){ri.pop(),Jt=ri[ri.length-1]||null}let oi=1;function sh(e,t=!1){oi+=e,e<0&&Jt&&t&&(Jt.hasOnce=!0)}function ih(e){return e.dynamicChildren=oi>0?Jt||Mo:null,qv(),oi>0&&Jt&&Jt.push(e),e}function _(e,t,n,r,o,s){return ih(L(e,t,n,r,o,s,!0))}function H(e,t,n,r,o){return ih(v(e,t,n,r,o,!0))}function ao(e){return e?e.__v_isVNode===!0:!1}function lo(e,t){if(D.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ba.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 zv=(...e)=>lh(...e),ah=({key:e})=>e??null,Na=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?nt(e)||Je(e)||_e(e)?{i:ct,r:e,k:t,f:!!n}:e:null);function L(e,t=null,n=null,r=0,o=null,s=e===de?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ah(t),ref:t&&Na(t),scopeId:df,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:ct};return a?(bu(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=nt(n)?8:16),D.NODE_ENV!=="production"&&l.key!==l.key&&G("VNode created with invalid key (NaN). VNode type:",l.type),oi>0&&!i&&Jt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Jt.push(l),l}const v=D.NODE_ENV!=="production"?zv:lh;function lh(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Sf)&&(D.NODE_ENV!=="production"&&!e&&G(`Invalid vnode type when creating vnode: ${e}.`),e=lt),ao(e)){const a=xn(e,t,!0);return n&&bu(a,n),oi>0&&!s&&Jt&&(a.shapeFlag&6?Jt[Jt.indexOf(e)]=a:Jt.push(a)),a.patchFlag=-2,a}if(gh(e)&&(e=e.__vccOpts),t){t=Wv(t);let{class:a,style:l}=t;a&&!nt(a)&&(t.class=Rs(a)),Fe(l)&&(Ro(l)&&!ge(l)&&(l=at({},l)),t.style=Vo(l))}const i=nt(e)?1:oh(e)?128:pf(e)?64:Fe(e)?4:_e(e)?2:0;return D.NODE_ENV!=="production"&&i&4&&Ro(e)&&(e=Ee(e),G("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`.",`
13
+ Component that was made reactive: `,e)),L(e,t,n,r,o,i,s,!0)}function Wv(e){return e?Ro(e)||Bf(e)?at({},e):e:null}function xn(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?vu(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&ah(u),ref:t&&t.ref?n&&s?ge(s)?s.concat(Na(t)):[s,Na(t)]:Na(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:D.NODE_ENV!=="production"&&i===-1&&ge(a)?a.map(uh):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==de?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&&xn(e.ssContent),ssFallback:e.ssFallback&&xn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Ks(c,l.clone(c)),c}function uh(e){const t=xn(e);return ge(e.children)&&(t.children=e.children.map(uh)),t}function N(e=" ",t=0){return v(ti,null,e,t)}function ch(e,t){const n=v(ni,null,e);return n.staticCount=t,n}function z(e="",t=!1){return t?(p(),H(lt,null,e)):v(lt,null,e)}function An(e){return e==null||typeof e=="boolean"?v(lt):ge(e)?v(de,null,e.slice()):ao(e)?Mr(e):v(ti,null,String(e))}function Mr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xn(e)}function bu(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),bu(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Bf(t)?t._ctx=ct:o===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _e(t)?(t={default:t,_ctx:ct},n=32):(t=String(t),r&64?(n=16,t=[N(t)]):n=8);e.children=t,e.shapeFlag|=n}function vu(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=Rs([t.class,r.class]));else if(o==="style")t.style=Vo([t.style,r.style]);else if(Ds(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 jn(e,t,n,r=null){En(e,t,7,[n,r])}const Zv=Rf();let Yv=0;function Kv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Zv,s={uid:Yv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ad(!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:Hf(r,o),emitsOptions:Jf(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 D.NODE_ENV!=="production"?s.ctx=ov(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Rv.bind(null,s),e.ce&&e.ce(s),s}let dt=null;const Pa=()=>dt||ct;let Ta,yu;{const e=Ls(),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)}};Ta=t("__VUE_INSTANCE_SETTERS__",n=>dt=n),yu=t("__VUE_SSR_SETTERS__",n=>ii=n)}const si=e=>{const t=dt;return Ta(e),e.scope.on(),()=>{e.scope.off(),Ta(t)}},dh=()=>{dt&&dt.scope.off(),Ta(null)},Gv=Jn("slot,component");function wu(e,{isNativeTag:t}){(Gv(e)||t(e))&&G("Do not use built-in or reserved HTML elements as component id: "+e)}function fh(e){return e.vnode.shapeFlag&4}let ii=!1;function Qv(e,t=!1,n=!1){t&&yu(t);const{props:r,children:o}=e.vnode,s=fh(e);gv(e,r,s,t),Ov(e,o,n||t);const i=s?Xv(e,t):void 0;return t&&yu(!1),i}function Xv(e,t){var n;const r=e.type;if(D.NODE_ENV!=="production"){if(r.name&&wu(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)wu(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)ff(s[i])}r.compilerOptions&&Jv()&&G('"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),D.NODE_ENV!=="production"&&sv(e);const{setup:o}=r;if(o){yn();const s=e.setupContext=o.length>1?ty(e):null,i=si(e),a=jo(o,e,0,[D.NODE_ENV!=="production"?Mn(e.props):e.props,s]),l=Il(a);if(wn(),i(),(l||e.sp)&&!Fo(e)&&Cf(e),l){if(a.then(dh,dh),t)return a.then(u=>{hh(e,u,t)}).catch(u=>{zs(u,e,0)});if(e.asyncDep=a,D.NODE_ENV!=="production"&&!e.suspense){const u=(n=r.name)!=null?n:"Anonymous";G(`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 hh(e,a,t)}else ph(e,t)}function hh(e,t,n){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Fe(t)?(D.NODE_ENV!=="production"&&ao(t)&&G("setup() should not return VNodes directly - return a render function instead."),D.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Kd(t),D.NODE_ENV!=="production"&&iv(e)):D.NODE_ENV!=="production"&&t!==void 0&&G(`setup() should return an object. Received: ${t===null?"null":typeof t}`),ph(e,n)}const Jv=()=>!0;function ph(e,t,n){const r=e.type;e.render||(e.render=r.render||mt);{const o=si(e);yn();try{lv(e)}finally{wn(),o()}}D.NODE_ENV!=="production"&&!r.render&&e.render===mt&&!t&&(r.template?G('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".'):G("Component is missing template or render function: ",r))}const mh=D.NODE_ENV!=="production"?{get(e,t){return Sa(),gt(e,"get",""),e[t]},set(){return G("setupContext.attrs is readonly."),!1},deleteProperty(){return G("setupContext.attrs is readonly."),!1}}:{get(e,t){return gt(e,"get",""),e[t]}};function ey(e){return new Proxy(e.slots,{get(t,n){return gt(e,"get","$slots"),t[n]}})}function ty(e){const t=n=>{if(D.NODE_ENV!=="production"&&(e.exposed&&G("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ge(n)?r="array":Je(n)&&(r="ref")),r!=="object"&&G(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(D.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,mh))},get slots(){return r||(r=ey(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,mh),slots:e.slots,emit:e.emit,expose:t}}function _u(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Kd(Nr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oo)return oo[n](e)},has(t,n){return n in t||n in oo}})):e.proxy}const ny=/(?:^|[-_])(\w)/g,ry=e=>e.replace(ny,t=>t.toUpperCase()).replace(/[-_]/g,"");function Eu(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function Ia(e,t,n=!1){let r=Eu(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?ry(r):n?"App":"Anonymous"}function gh(e){return _e(e)&&"__vccOpts"in e}const Z=(e,t)=>{const n=bb(e,t,ii);if(D.NODE_ENV!=="production"){const r=Pa();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function ft(e,t,n){const r=arguments.length;return r===2?Fe(t)&&!ge(t)?ao(t)?v(e,null,[t]):v(e,t):v(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ao(n)&&(n=[n]),v(e,t,n))}function oy(){if(D.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(!Fe(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Je(d)){yn();const f=d.value;return wn(),["div",{},["span",e,c(d)],"<",a(f),">"]}else{if(_n(d))return["div",{},["span",e,Lt(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${Vn(d)?" (readonly)":""}`];if(Vn(d))return["div",{},["span",e,Lt(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",Ee(d.props))),d.setupState!==ze&&f.push(i("setup",d.setupState)),d.data!==ze&&f.push(i("data",Ee(d.data)));const h=l(d,"computed");h&&f.push(i("computed",h));const m=l(d,"inject");return m&&f.push(i("injected",m)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=at({},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]:Fe(d)?["object",{object:f?Ee(d):d}]:["span",n,String(d)]}function l(d,f){const h=d.type;if(_e(h))return;const m={};for(const y in d.ctx)u(h,y,f)&&(m[y]=d.ctx[y]);return m}function u(d,f,h){const m=d[h];if(ge(m)&&m.includes(f)||Fe(m)&&f in m||d.extends&&u(d.extends,f,h)||d.mixins&&d.mixins.some(y=>u(y,f,h)))return!0}function c(d){return Lt(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const bh="3.5.17",rr=D.NODE_ENV!=="production"?G:mt;var Un={};let ku;const vh=typeof window<"u"&&window.trustedTypes;if(vh)try{ku=vh.createPolicy("vue",{createHTML:e=>e})}catch(e){Un.NODE_ENV!=="production"&&rr(`Error creating trusted types policy: ${e}`)}const yh=ku?e=>ku.createHTML(e):e=>e,sy="http://www.w3.org/2000/svg",iy="http://www.w3.org/1998/Math/MathML",or=typeof document<"u"?document:null,wh=or&&or.createElement("template"),ay={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"?or.createElementNS(sy,e):t==="mathml"?or.createElementNS(iy,e):n?or.createElement(e,{is:n}):or.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>or.createTextNode(e),createComment:e=>or.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>or.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{wh.innerHTML=yh(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=wh.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]}},Vr="transition",ai="animation",li=Symbol("_vtc"),_h={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},ly=at({},wf,_h),ui=(e=>(e.displayName="Transition",e.props=ly,e))((e,{slots:t})=>ft(qb,uy(e),t)),uo=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},Eh=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function uy(e){const t={};for(const B in e)B in _h||(t[B]=e[B]);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,m=cy(o),y=m&&m[0],x=m&&m[1],{onBeforeEnter:P,onEnter:C,onEnterCancelled:U,onLeave:M,onLeaveCancelled:I,onBeforeAppear:V=P,onAppear:E=C,onAppearCancelled:O=U}=t,T=(B,q,be,pe)=>{B._enterCancelled=pe,co(B,q?c:a),co(B,q?u:i),be&&be()},A=(B,q)=>{B._isLeaving=!1,co(B,d),co(B,h),co(B,f),q&&q()},R=B=>(q,be)=>{const pe=B?E:C,he=()=>T(q,B,be);uo(pe,[q,he]),kh(()=>{co(q,B?l:s),sr(q,B?c:a),Eh(pe)||xh(q,r,y,he)})};return at(t,{onBeforeEnter(B){uo(P,[B]),sr(B,s),sr(B,i)},onBeforeAppear(B){uo(V,[B]),sr(B,l),sr(B,u)},onEnter:R(!1),onAppear:R(!0),onLeave(B,q){B._isLeaving=!0;const be=()=>A(B,q);sr(B,d),B._enterCancelled?(sr(B,f),Oh()):(Oh(),sr(B,f)),kh(()=>{B._isLeaving&&(co(B,d),sr(B,h),Eh(M)||xh(B,r,x,be))}),uo(M,[B,be])},onEnterCancelled(B){T(B,!1,void 0,!0),uo(U,[B])},onAppearCancelled(B){T(B,!0,void 0,!0),uo(O,[B])},onLeaveCancelled(B){A(B),uo(I,[B])}})}function cy(e){if(e==null)return null;if(Fe(e))return[xu(e.enter),xu(e.leave)];{const t=xu(e);return[t,t]}}function xu(e){const t=Ig(e);return Un.NODE_ENV!=="production"&&xb(t,"<transition> explicit duration"),t}function sr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[li]||(e[li]=new Set)).add(t)}function co(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[li];n&&(n.delete(t),n.size||(e[li]=void 0))}function kh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let dy=0;function xh(e,t,n,r){const o=e._endId=++dy,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=fy(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 fy(e,t){const n=window.getComputedStyle(e),r=m=>(n[m]||"").split(", "),o=r(`${Vr}Delay`),s=r(`${Vr}Duration`),i=Ah(o,s),a=r(`${ai}Delay`),l=r(`${ai}Duration`),u=Ah(a,l);let c=null,d=0,f=0;t===Vr?i>0&&(c=Vr,d=i,f=s.length):t===ai?u>0&&(c=ai,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Vr:ai:null,f=c?c===Vr?s.length:l.length:0);const h=c===Vr&&/\b(transform|all)(,|$)/.test(r(`${Vr}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Ah(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ch(n)+Ch(e[r])))}function Ch(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Oh(){return document.body.offsetHeight}function hy(e,t,n){const r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Sh=Symbol("_vod"),py=Symbol("_vsh"),my=Symbol(Un.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),gy=/(^|;)\s*display\s*:/;function by(e,t,n){const r=e.style,o=nt(n);let s=!1;if(n&&!o){if(t)if(nt(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Da(r,a,"")}else for(const i in t)n[i]==null&&Da(r,i,"");for(const i in n)i==="display"&&(s=!0),Da(r,i,n[i])}else if(o){if(t!==n){const i=r[my];i&&(n+=";"+i),r.cssText=n,s=gy.test(n)}}else t&&e.removeAttribute("style");Sh in e&&(e[Sh]=s?r.display:"",e[py]&&(r.display="none"))}const vy=/[^\\];\s*$/,Nh=/\s*!important$/;function Da(e,t,n){if(ge(n))n.forEach(r=>Da(e,t,r));else if(n==null&&(n=""),Un.NODE_ENV!=="production"&&vy.test(n)&&rr(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=yy(e,t);Nh.test(n)?e.setProperty(Or(r),n.replace(Nh,""),"important"):e[r]=n}}const Ph=["Webkit","Moz","ms"],Au={};function yy(e,t){const n=Au[t];if(n)return n;let r=Vt(t);if(r!=="filter"&&r in e)return Au[t]=r;r=Gr(r);for(let o=0;o<Ph.length;o++){const s=Ph[o]+r;if(s in e)return Au[t]=s}return t}const Th="http://www.w3.org/1999/xlink";function Ih(e,t,n,r,o,s=Hg(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Th,t.slice(6,t.length)):e.setAttributeNS(Th,t,n):n==null||s&&!Ed(n)?e.removeAttribute(t):e.setAttribute(t,s?"":er(n)?String(n):n)}function Dh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?yh(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=Ed(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch(a){Un.NODE_ENV!=="production"&&!i&&rr(`Failed setting prop "${t}" on <${s.toLowerCase()}>: value ${n} is invalid.`,a)}i&&e.removeAttribute(o||t)}function wy(e,t,n,r){e.addEventListener(t,n,r)}function _y(e,t,n,r){e.removeEventListener(t,n,r)}const $h=Symbol("_vei");function Ey(e,t,n,r,o=null){const s=e[$h]||(e[$h]={}),i=s[t];if(r&&i)i.value=Un.NODE_ENV!=="production"?Vh(r,t):r;else{const[a,l]=ky(t);if(r){const u=s[t]=Cy(Un.NODE_ENV!=="production"?Vh(r,t):r,o);wy(e,a,u,l)}else i&&(_y(e,a,i,l),s[t]=void 0)}}const Mh=/(?:Once|Passive|Capture)$/;function ky(e){let t;if(Mh.test(e)){t={};let r;for(;r=e.match(Mh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Or(e.slice(2)),t]}let Cu=0;const xy=Promise.resolve(),Ay=()=>Cu||(xy.then(()=>Cu=0),Cu=Date.now());function Cy(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;En(Oy(r,n.value),t,5,[r])};return n.value=e,n.attached=Ay(),n}function Vh(e,t){return _e(e)||ge(e)?e:(rr(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
14
+ Expected function or array of functions, received type ${typeof e}.`),mt)}function Oy(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,Sy=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?hy(e,r,i):t==="style"?by(e,n,r):Ds(t)?ea(t)||Ey(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ny(e,t,r,i))?(Dh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ih(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!nt(r))?Dh(e,Vt(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ih(e,t,r,i))};function Ny(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lh(t)&&_e(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)&&nt(n)?!1:t in e}const Py=["ctrl","shift","alt","meta"],Ty={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)=>Py.some(n=>e[`${n}Key`]&&!t.includes(n))},Lr=(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=Ty[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Iy=at({patchProp:Sy},ay);let Rh;function Dy(){return Rh||(Rh=Pv(Iy))}const $y=(...e)=>{const t=Dy().createApp(...e);Un.NODE_ENV!=="production"&&(Vy(t),Ly(t));const{mount:n}=t;return t.mount=r=>{const o=Ry(r);if(!o)return;const s=t._component;!_e(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,My(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function My(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vy(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Ug(t)||Bg(t)||Fg(t),writable:!1})}function Ly(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){rr("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 rr(r),n},set(){rr(r)}})}}function Ry(e){if(nt(e)){const t=document.querySelector(e);return Un.NODE_ENV!=="production"&&!t&&rr(`Failed to mount app: mount target selector "${e}" returned null.`),t}return Un.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&rr('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var jy={};function Uy(){oy()}jy.NODE_ENV!=="production"&&Uy();let $a;const By=new Uint8Array(16);function Fy(){if(!$a&&($a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $a(By)}const kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function Hy(e,t=0){return kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]}const jh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ci(e,t,n){if(jh.randomUUID&&!e)return jh.randomUUID();e=e||{};const r=e.random||(e.rng||Fy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Hy(r)}var Ft=Symbol("storefront");function qy(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var zy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("close"),intent:g.string().optional(),completed:g.boolean()}),Wy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("billing-details-updated"),order:Xi.orders.openOrderSchema}),Zy=g.object({source:g.literal("moonbase-checkout"),event:g.literal("completed"),order:Xi.orders.completedOrderSchema}),Yy=g.discriminatedUnion("event",[zy,Wy,Zy]);function Ky(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function Ma(e){var t;if(typeof window>"u"){console.warn("Can not mount checkout server side");return}if(document.getElementById("moonbase-checkout"))return;const n=(t=document.head.querySelector('meta[name="color-scheme"]'))==null?void 0:t.getAttribute("content");n&&(e+=`${e.includes("?")?"&":"?"}color_scheme=${encodeURIComponent(n)}`);const r=document.createElement("iframe");r.id="moonbase-checkout",r.src=e,r.style.position="fixed",r.style.top="0px",r.style.left="0px",r.style.right="0px",r.style.border="none",r.style.colorScheme="normal",r.style.backgroundColor="transparent",r.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),r.setAttribute("background","transparent"),r.setAttribute("frameborder","0"),r.setAttribute("allowtransparency","true"),r.setAttribute("allow","payment"),r.height="100%",r.width="100%",document.body.append(r),document.documentElement.style.overflow="hidden",window.onmessage=function(o){var s;try{const i=Yy.parse(o.data);i.event==="close"&&(document.body.contains(r)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(r)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:i}))),i.event==="billing-details-updated"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-billing-details-updated",{detail:i})),i.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:i}))}catch(i){((s=o.data)==null?void 0:s.source)==="moonbase-checkout"&&console.error("Could not parse event:",o.data,i)}}}var Gy=g.object({source:g.literal("moonbase-subscription"),event:g.literal("close"),completed:g.boolean()}),Qy=g.object({source:g.literal("moonbase-subscription"),event:g.literal("updated-payment-method")}),Xy=g.discriminatedUnion("event",[Gy,Qy]);function Uh(e){if(typeof window>"u"){console.warn("Can not mount subscription server side");return}if(document.getElementById("moonbase-subscription"))return;const t=document.createElement("iframe");t.id="moonbase-subscription",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=Xy.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-subscription-closed",{detail:o})))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-subscription"&&console.error("Could not parse event:",n.data,o)}}}var di=class ut{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.currentUser=j(null),this.loadedUser=j(!1),this.refreshOrderAbortController=new AbortController,this.debouncedPushOrderContent=qy(l=>this.client.orders.pushContent(l,void 0,this.hasUtmOrReferrer?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=j({id:ci(),status:$o.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(ut.storefrontKey,{suggestedCurrency:"",enabledCurrencies:[],bundles:[],products:[],offers:[]}),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!1),this.utm=r(ut.utmKey,void 0);return}window.addEventListener("storage",l=>this.handleStorageUpdate(l));const s=new URLSearchParams(window.location.search);if(this.utm=r(ut.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(ut.utmKey,JSON.stringify(this.utm.value));else{const l=(t.persistUtm?localStorage:sessionStorage).getItem(ut.utmKey);if(l)try{const u=JSON.parse(l);this.utm.value=u}catch(u){console.warn(`Could not parse cached UTM from ${ut.utmKey}`,u)}}const i=localStorage.getItem(ut.sessionKey);i?(this.currentOrder=j(JSON.parse(i)),this.refreshOrder()):(this.currentOrder=j({id:ci(),status:$o.Open,currency:"",items:[],couponsApplied:[]}),this.hasUtmOrReferrer&&this.pushOrderContent());const a=localStorage.getItem(ut.storefrontKey);if(a?(this.storefront=r(ut.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!0)):(this.storefront=r(ut.storefrontKey,{suggestedCurrency:"",enabledCurrencies:[],bundles:[],products:[],offers:[]}),this.loadedStorefront=r(`${ut.storefrontKey}_loaded`,!1)),this.client.tokenStore.user&&(this.currentUser.value=Xi.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]);Ma(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}if(u==="update_subscription"&&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]);Uh(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-billing-details-updated",()=>{this.updateStorefront(),this.updateUser()}),window.addEventListener("moonbase-checkout-completed",l=>{l.detail.order.id===this.currentOrder.value.id&&this.resetOrder(),this.updateUser()})}get loadedStorefrontPromise(){return new Promise(t=>{Ze(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=>{Ze(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Ky()}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))}onStorefrontUpdated(t){window.addEventListener("moonbase-storefront-updated",n=>t(n.detail.storefront))}install(t){t.provide(Ft,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 Wi||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(ut.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency=t.suggestedCurrency,this.currentOrder.value.items=this.enrichLineItems(this.currentOrder.value.items),typeof window<"u"&&window.dispatchEvent(new CustomEvent("moonbase-storefront-updated",{detail:{storefront:t}}))),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(ut.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 ut.sessionKey:this.currentOrder.value=t.newValue?JSON.parse(t.newValue):{id:ci(),currency:((n=this.storefront.value)==null?void 0:n.suggestedCurrency)||"",status:$o.Open,items:[],couponsApplied:[]};break;case ut.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break;case ut.utmKey:this.utm.value=JSON.parse(t.newValue);break;case fd.storageKey:t.newValue?console.warn("User was updated",t.newValue):(this.currentUser.value=null,console.warn("User was removed"))}}async refreshOrder(){var t;try{const n=await this.client.orders.get(this.currentOrder.value.id,{abort:this.refreshOrderAbortController.signal});n&&(n.status!==$o.Open?this.resetOrder():(n.items=this.enrichLineItems(n.items),typeof window<"u"&&localStorage.setItem(ut.sessionKey,JSON.stringify(n)),this.storefront.value&&!((t=this.storefront.value.enabledCurrencies)!=null&&t.includes(n.currency))&&(n.currency=this.storefront.value.suggestedCurrency),this.currentOrder.value=n))}catch(n){n instanceof zc&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:ci(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:$o.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(ut.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof Ar)return;console.warn("Could not surrender order:",t)}}enrichLineItems(t){return this.storefront?t.map(n=>{var r,o,s;const i=(r=this.storefront.value.offers)==null?void 0:r.find(a=>a.id===n.offerId);if(n.type==="Product"){const a=this.storefront.value.products.find(c=>c.id===n.productId);let u=((a==null?void 0:a.variations)||[]).find(c=>c.id===n.variationId);return i&&u&&Dn.eligible(i,this.currentOrder.value)&&(u=Dn.applyToVariation(i,u)),{...n,product:a,variation:u,price:u==null?void 0:u.price,appliedDiscount:(o=u==null?void 0:u.discount)!=null?o:n.appliedDiscount}}else{const a=this.storefront.value.bundles.find(c=>c.id===n.bundleId);let u=((a==null?void 0:a.variations)||[]).find(c=>c.id===n.variationId);return i&&u&&Dn.eligible(i,this.currentOrder.value)&&(u=Dn.applyToVariation(i,u)),{...n,bundle:a,variation:u,price:u==null?void 0:u.price,appliedDiscount:(s=u==null?void 0:u.discount)!=null?s:n.appliedDiscount}}}):t}};di.userKey="moonbase_user",di.sessionKey="moonbase_session",di.storefrontKey="moonbase_storefront",di.utmKey="moonbase_utm";var Jy=di;function e1(e,t){const n=fe(Ft);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Pr(e)}`,null),o=n.stateFactory(`activation-request-${Pr(e)}-error`,null),s=n.stateFactory(`activation-request-${Pr(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Pr(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Pr(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Pr(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=mn.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Ze(()=>Pr(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===mn.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}),nu(()=>{l.value&&clearTimeout(l.value)}),Ze(n.currentUser,async()=>{var c,d;const f=Pr(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===mn.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:Z(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===mn.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 Wi?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===mn.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Re(e){const t=e??fe(Ft);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()),getConnectionUrl:async(n,r,o)=>await t.client.identity.getConnectionUrl(n,r,o),disconnectAccount:async n=>(await t.client.identity.disconnectAccount(n),await t.updateUser()),refreshUser:async()=>await t.updateUser()}}function Va(e,t){const n=t??fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function t1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>t.storefront.value.bundles)}function Bn(e){const t=e??fe(Ft);if(!t)throw new Error("No storefront configured");const n=Z(()=>{const i=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((l,u)=>{var c,d,f,h,m,y,x,P,C,U;let M;if(u.type==="Product"){const V=t.storefront.value.products.find(R=>R.id===u.productId),O=((V==null?void 0:V.variations)||[]).find(R=>R.id===u.variationId),T=(d=(c=O==null?void 0:O.pricingTiers)==null?void 0:c.filter(R=>u.quantity>=R.minQuantity))!=null?d:[],A=T.length>0?T[T.length-1]:null;M=(y=(m=(f=A==null?void 0:A.price[i])!=null?f:O==null?void 0:O.price[i])!=null?m:(h=V==null?void 0:V.defaultVariation)==null?void 0:h.price[i])!=null?y:0}else{const V=t.storefront.value.bundles.find(T=>T.id===u.bundleId),O=((V==null?void 0:V.variations)||[]).find(T=>T.id===u.variationId);M=(C=(P=O==null?void 0:O.price[i])!=null?P:(x=V==null?void 0:V.defaultVariation)==null?void 0:x.price[i])!=null?C:0}const I=u.offerId?(U=t.storefront.value.offers)==null?void 0:U.find(V=>V.id===u.offerId):null;if(I&&Dn.eligible(I,t.currentOrder.value)){const V=Ji.apply(I.discount,{[i]:M});M-=V[i]}return l+M*u.quantity},0),currency:i}});function r(i,a,l,u){var c,d,f;if(i=b(i),a??(a=i.defaultVariation),!a)throw new Error("Added item does not have a default variation, and none have been specified");const h=`${i.type==="Bundle"?"b":"p"}/${i.id}/${a.id}`;let m=t==null?void 0:t.currentOrder.value.items.find(y=>y.id===h);if(m)m.quantity+=1,(f=m.offerId)!=null||(m.offerId=l==null?void 0:l.id),!m.variation&&a&&(m.variation=a),!m.price&&a&&(m.price=a.price),!m.appliedDiscount&&a.discount&&(m.appliedDiscount=a.discount),m.type==="Product"&&i.type==="Product"&&!m.product&&(m.product=i),m.type==="Bundle"&&i.type==="Bundle"&&!m.bundle&&(m.bundle=i);else if(i.type==="Bundle"){if(m={id:h,type:"Bundle",bundleId:i.id,bundle:i,quantity:1,variation:a,variationId:a.id,offerId:l==null?void 0:l.id,price:a.price,appliedDiscount:a.discount,isDefaultVariation:a.id===((c=i.defaultVariation)==null?void 0:c.id)},(u==null?void 0:u.bundleBehaviour)==="replace"){const y=t==null?void 0:t.currentOrder.value.items.filter(x=>x.type==="Product"&&i.products.some(P=>P.included&&P.id===x.productId));for(const x of y??[]){const P=t==null?void 0:t.currentOrder.value.items.findIndex(C=>C.id===x.id);P!==void 0&&(t==null||t.currentOrder.value.items.splice(P,1))}m.replaced=y==null?void 0:y.filter(x=>x.type==="Product").map(x=>`${x.productId}/${x.variationId}`)}t==null||t.currentOrder.value.items.push(m)}else if(i.type==="Product")m={id:h,type:"Product",productId:i.id,product:i,quantity:1,variation:a,variationId:a.id,offerId:l==null?void 0:l.id,price:a.price,appliedDiscount:a.discount,isDefaultVariation:a.id===((d=i.defaultVariation)==null?void 0:d.id)},t==null||t.currentOrder.value.items.push(m);else throw new gn("Invalid input",`Could not handle item of type '${i.type}'`);return t==null||t.pushOrderContent(),m}function o(i,a){var l,u;if(t&&i.type==="Bundle"&&i.replaced&&i.replaced.length>0){let c=a;for(const{productId:d,variationId:f}of i.replaced.map(h=>({productId:h.split("/")[0],variationId:h.split("/")[1]}))){const h=t.storefront.value.products.find(y=>y.id===d),m=(l=h==null?void 0:h.variations)==null?void 0:l.find(y=>y.id===f);if(h&&m&&!t.currentOrder.value.items.some(y=>y.type==="Product"&&y.productId===d)){const x={id:`p/${h.id}/${f}`,type:"Product",productId:h.id,product:h,quantity:1,variation:m,variationId:f,price:m.price,appliedDiscount:m.discount,isDefaultVariation:m.id===((u=h.defaultVariation)==null?void 0:u.id)};c!==void 0?(t.currentOrder.value.items.splice(c,0,x),c++):t.currentOrder.value.items.push(x)}}}}function s(){var i;if(t){for(const a of t.currentOrder.value.items)if(a.offerId){const l=(i=t.storefront.value.offers)==null?void 0:i.find(u=>u.id===a.offerId);(!l||!Dn.eligible(l,t.currentOrder.value))&&(a.offerId=void 0)}}}return{items:Z(()=>t.enrichLineItems(t.currentOrder.value.items)),currency:Z(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:n,addToCart:r,setQuantity:(i,a)=>{const l=t.currentOrder.value.items.find(u=>u.id===i.id);if(!l)throw new Error("Cart item not found");if(l.quantity=a,l.quantity<=0){const u=t.currentOrder.value.items.findIndex(c=>c.id===l.id);t.currentOrder.value.items.splice(u,1),o(i,u),s()}return t.pushOrderContent(),i},removeFromCart:i=>{const a=t.currentOrder.value.items.findIndex(l=>l.id===i.id);t.currentOrder.value.items.splice(a,1),o(i,a),s(),t.pushOrderContent()},checkout:async i=>{var a;const l=typeof window<"u"?window.location.pathname:"",u=new URL((a=i.returnUrl)!=null?a:l,document.baseURI).href,c=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:!i.redirect||i.returnUrl?u:void 0},t.hasUtm?t.utm.value:void 0);if(c.items=t.enrichLineItems(c.items),window.dispatchEvent(new CustomEvent("moonbase-checkout-initiated",{detail:{order:c,total:n.value}})),!i.redirect&&c.embeddedCheckoutUrl&&typeof window<"u"){const d=c.embeddedCheckoutUrl;return new Promise(f=>{Ma(d.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",h=>{const m=h;f({next:m.detail.intent,completed:m.detail.completed})},{once:!0})})}else{if(i.redirect&&c.checkoutUrl&&typeof window<"u")return window.location.href=c.checkoutUrl,{next:void 0,completed:!1};throw new Error("No checkout URL found")}}}}async function n1(e,t,n){var r,o;const s=n??fe(Ft);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 gn("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:ci(),currency:s.storefront.value.suggestedCurrency,items:i},{returnUrl:!t.redirect||t.returnUrl?l:void 0},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=>{Ma(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 fo(e){const t=fe(Ft);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=>{Ma(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})})},updateSubscriptionPaymentMethod: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,a=await t.client.inventory.subscriptions.getById(n.id,{toUpdatePaymentMethod:!0,returnUrl:i});if(window.dispatchEvent(new CustomEvent("moonbase-subscription-payment-method-update-initiated",{detail:{subscription:Ee(n)}})),a.embeddedUpdatePaymentUrl&&typeof window<"u"){const l=a.embeddedUpdatePaymentUrl;return new Promise(u=>{Uh(l.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-subscription-closed",c=>{u({completed:c.detail.completed})},{once:!0})})}else throw new Error("No update URL found")}}}function r1(e,t){const n=fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>{var r;return((r=n.storefront.value.offers)==null?void 0:r.find(o=>o.id===e))||null})}function o1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>{var n;return((n=t.storefront.value.offers)!=null?n:[]).filter(r=>Dn.eligible(r,t.currentOrder.value)&&!s1(r,t.currentOrder.value)&&!i1(r,t.currentOrder.value))})}function s1(e,t){return t.items.some(n=>n.offerId===e.id)}function i1(e,t){const n=e.target;return Array.isArray(n)?n.every(r=>t.items.some(o=>o.type==="Product"&&r.type==="Product"&&o.productId===r.id||o.type==="Bundle"&&r.type==="Bundle"&&o.bundleId===r.id)):t.items.some(r=>r.type==="Product"&&n.type==="Product"&&r.productId===n.id||r.type==="Bundle"&&n.type==="Bundle"&&r.bundleId===n.id)}function fi(e,t){const n=t??fe(Ft);if(!n)throw new Error("No storefront configured");return Z(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function a1(e){const t=fe(Ft);if(!t)throw new Error("No storefront configured");return Z(()=>t.storefront.value.products)}function Bh(e){const t=fe(Ft);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 Ar?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Ar?new Error("Voucher code invalid"):r}}}}function l1(e,t,n){const r={endpoint:e};return new Jy(r,new Ag(r),(o,s)=>j(s))}function La(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 Ou(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function u1(){return Fh().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Fh(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const c1=typeof Proxy=="function",d1="devtools-plugin:setup",f1="plugin:settings:set";let zo,Su;function h1(){var e;return zo!==void 0||(typeof window<"u"&&window.performance?(zo=!0,Su=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(zo=!0,Su=globalThis.perf_hooks.performance):zo=!1),zo}function p1(){return h1()?Su.now():Date.now()}class m1{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 p1()}},n&&n.on(f1,(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=u1(),s=c1&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(d1,e,t);else{const i=s?new m1(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Me={};let hi;const pi=e=>hi=e,qh=Me.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ho(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Fn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Fn||(Fn={}));const po=typeof window<"u",zh=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 g1(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 Nu(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Yh(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Wh(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ra(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 ja=typeof navigator=="object"?navigator:{userAgent:""},Zh=/Macintosh/.test(ja.userAgent)&&/AppleWebKit/.test(ja.userAgent)&&!/Safari/.test(ja.userAgent),Yh=po?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Zh?b1:"msSaveOrOpenBlob"in ja?v1:y1:()=>{};function b1(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?Wh(r.href)?Nu(e,t,n):(r.target="_blank",Ra(r)):Ra(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ra(r)},0))}function v1(e,t="download",n){if(typeof e=="string")if(Wh(e))Nu(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Ra(r)})}else navigator.msSaveOrOpenBlob(g1(e,n),t)}function y1(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Nu(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(zh.HTMLElement))||"safari"in zh,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Zh)&&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 Pu(e){return"_a"in e&&"install"in e}function Kh(){if(!("clipboard"in navigator))return bt("Your browser doesn't support the Clipboard API","error"),!0}function Gh(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 w1(e){if(!Kh())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),bt("Global state copied to clipboard.")}catch(t){if(Gh(t))return;bt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function _1(e){if(!Kh())try{Qh(e,JSON.parse(await navigator.clipboard.readText())),bt("Global state pasted from clipboard.")}catch(t){if(Gh(t))return;bt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function E1(e){try{Yh(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 ir;function k1(){ir||(ir=document.createElement("input"),ir.type="file",ir.accept=".json");function e(){return new Promise((t,n)=>{ir.onchange=async()=>{const r=ir.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},ir.oncancel=()=>t(null),ir.onerror=n,ir.click()})}return e}async function x1(e){try{const n=await k1()();if(!n)return;const{text:r,file:o}=n;Qh(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 Qh(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 Cn(e){return{_custom:{display:e}}}const Xh="🍍 Pinia (root)",Ua="_root";function A1(e){return Pu(e)?{id:Ua,label:Xh}:{id:e.$id,label:e.$id}}function C1(e){if(Pu(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 O1(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:Cn(e.type),key:Cn(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function S1(e){switch(e){case Fn.direct:return"mutation";case Fn.patchFunction:return"$patch";case Fn.patchObject:return"$patch";default:return"unknown"}}let Wo=!0;const Ba=[],mo="pinia:mutations",Pt="pinia",{assign:N1}=Object,Fa=e=>"🍍 "+e;function P1(e,t){Hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ba,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:mo,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{w1(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await _1(t),n.sendInspectorTree(Pt),n.sendInspectorState(Pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{E1(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await x1(t),n.sendInspectorTree(Pt),n.sendInspectorState(Pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?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:Fa(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:Ee(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:Fa(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===Pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Xh.toLowerCase().includes(r.filter.toLowerCase())):o).map(A1)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===Pt){const o=r.nodeId===Ua?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Ua&&(globalThis.$store=Ee(o)),r.state=C1(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===Pt){const s=r.nodeId===Ua?t:t._s.get(r.nodeId);if(!s)return bt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Pu(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wo=!1,r.set(s,i,r.state.value),Wo=!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}":
15
15
  ${i}
16
16
  Only state can be modified.`);i[0]="$state",Wo=!1,r.set(s,i,r.state.value),Wo=!0}})})}function T1(e,t){Ba.includes(Fa(t.$id))||Ba.push(Fa(t.$id)),Hh({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ba,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=Jh++;n.addTimelineEvent({layerId:mo,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Cn(t.$id),action:Cn(l),args:u},groupId:c}}),i(d=>{Rr=void 0,n.addTimelineEvent({layerId:mo,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Cn(t.$id),action:Cn(l),args:u,result:d},groupId:c}})}),a(d=>{Rr=void 0,n.addTimelineEvent({layerId:mo,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Cn(t.$id),action:Cn(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Ze(()=>b(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(Pt),Wo&&n.addTimelineEvent({layerId:mo,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Rr}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Pt),!Wo)return;const u={time:r(),title:S1(a),data:N1({store:Cn(t.$id)},O1(i)),groupId:Rr};a===Fn.patchFunction?u.subtitle="⤵️":a===Fn.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:mo,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Nr(i=>{o(i),n.addTimelineEvent({layerId:mo,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Cn(t.$id),info:Cn("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Pt),n.sendInspectorState(Pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(Pt),n.sendInspectorState(Pt),n.getSettings().logStoreChanges&&bt(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Pt),n.sendInspectorState(Pt),n.getSettings().logStoreChanges&&bt(`"${t.$id}" store installed 🆕`)})}let Jh=0,Rr;function ep(e,t,n){const r=t.reduce((o,s)=>(o[s]=Ee(e)[s],o),{});for(const o in r)e[o]=function(){const s=Jh,i=n?new Proxy(e,{get(...l){return Rr=s,Reflect.get(...l)},set(...l){return Rr=s,Reflect.set(...l)}}):e;Rr=s;const a=r[o].apply(i,arguments);return Rr=void 0,a}}function I1({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){ep(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;Ee(t)._hotUpdate=function(o){r.apply(this,arguments),ep(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}T1(e,t)}}function D1(){const e=Cd(!0),t=e.run(()=>j({}));let n=[],r=[];const o=Nr({install(s){pi(o),o._a=s,s.provide(qh,o),s.config.globalProperties.$pinia=o,Me.NODE_ENV!=="production"&&Me.NODE_ENV!=="test"&&po&&P1(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 Me.NODE_ENV!=="production"&&Me.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(I1),o}function tp(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];ho(o)&&ho(r)&&!Je(r)&&!_n(r)?e[n]=tp(o,r):e[n]=r}return e}const np=()=>{};function rp(e,t,n,r=np){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Od()&&qg(o),o}function Zo(e,...t){e.slice().forEach(n=>{n(...t)})}const $1=e=>e(),op=Symbol(),Tu=Symbol();function Iu(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];ho(o)&&ho(r)&&e.hasOwnProperty(n)&&!Je(r)&&!_n(r)?e[n]=Iu(o,r):e[n]=r}return e}const M1=Me.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function V1(e){return!ho(e)||!e.hasOwnProperty(M1)}const{assign:sn}=Object;function sp(e){return!!(Je(e)&&e.effect)}function ip(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Me.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Me.NODE_ENV!=="production"&&r?Gd(j(o?o():{}).value):Gd(n.state.value[e]);return sn(c,s,Object.keys(i||{}).reduce((d,f)=>(Me.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]=Nr(Z(()=>{pi(n);const h=n._s.get(e);return i[f].call(h,h)})),d),{}))}return l=Du(e,u,t,n,r,!0),l}function Du(e,t,n={},r,o,s){let i;const a=sn({actions:{}},n);if(Me.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Me.NODE_ENV!=="production"&&(l.onTrigger=A=>{u?h=A:u==!1&&!E._hotUpdating&&(Array.isArray(h)?h.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],h;const m=r.state.value[e];!s&&!m&&(Me.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const y=j({});let x;function P(A){let R;u=c=!1,Me.NODE_ENV!=="production"&&(h=[]),typeof A=="function"?(A(r.state.value[e]),R={type:Fn.patchFunction,storeId:e,events:h}):(Iu(r.state.value[e],A),R={type:Fn.patchObject,payload:A,storeId:e,events:h});const B=x=Symbol();ma().then(()=>{x===B&&(u=!0)}),c=!0,Zo(d,R,r.state.value[e])}const C=s?function(){const{state:R}=n,B=R?R():{};this.$patch(q=>{sn(q,B)})}:Me.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:np;function U(){i.stop(),d=[],f=[],r._s.delete(e)}const M=(A,R="")=>{if(op in A)return A[Tu]=R,A;const B=function(){pi(r);const q=Array.from(arguments),be=[],pe=[];function he(Be){be.push(Be)}function oe(Be){pe.push(Be)}Zo(f,{args:q,name:B[Tu],store:E,after:he,onError:oe});let ue;try{ue=A.apply(this&&this.$id===e?this:E,q)}catch(Be){throw Zo(pe,Be),Be}return ue instanceof Promise?ue.then(Be=>(Zo(be,Be),Be)).catch(Be=>(Zo(pe,Be),Promise.reject(Be))):(Zo(be,ue),ue)};return B[op]=!0,B[Tu]=R,B},I=Nr({actions:{},getters:{},state:[],hotState:y}),V={_p:r,$id:e,$onAction:rp.bind(null,f),$patch:P,$reset:C,$subscribe(A,R={}){const B=rp(d,A,R.detached,()=>q()),q=i.run(()=>Ze(()=>r.state.value[e],be=>{(R.flush==="sync"?c:u)&&A({storeId:e,type:Fn.direct,events:h},be)},sn({},l,R)));return B},$dispose:U},E=qs(Me.NODE_ENV!=="production"||Me.NODE_ENV!=="production"&&Me.NODE_ENV!=="test"&&po?sn({_hmrPayload:I,_customProperties:Nr(new Set)},V):V);r._s.set(e,E);const T=(r._a&&r._a.runWithContext||$1)(()=>r._e.run(()=>(i=Cd()).run(()=>t({action:M}))));for(const A in T){const R=T[A];if(Je(R)&&!sp(R)||_n(R))Me.NODE_ENV!=="production"&&o?La(y.value,A,Wl(T,A)):s||(m&&V1(R)&&(Je(R)?R.value=m[A]:Iu(R,m[A])),r.state.value[e][A]=R),Me.NODE_ENV!=="production"&&I.state.push(A);else if(typeof R=="function"){const B=Me.NODE_ENV!=="production"&&o?R:M(R,A);T[A]=B,Me.NODE_ENV!=="production"&&(I.actions[A]=R),a.actions[A]=R}else Me.NODE_ENV!=="production"&&sp(R)&&(I.getters[A]=s?n.getters[A]:R,po&&(T._getters||(T._getters=Nr([]))).push(A))}if(sn(E,T),sn(Ee(E),T),Object.defineProperty(E,"$state",{get:()=>Me.NODE_ENV!=="production"&&o?y.value:r.state.value[e],set:A=>{if(Me.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");P(R=>{sn(R,A)})}}),Me.NODE_ENV!=="production"&&(E._hotUpdate=Nr(A=>{E._hotUpdating=!0,A._hmrPayload.state.forEach(R=>{if(R in E.$state){const B=A.$state[R],q=E.$state[R];typeof B=="object"&&ho(B)&&ho(q)?tp(B,q):A.$state[R]=q}La(E,R,Wl(A.$state,R))}),Object.keys(E.$state).forEach(R=>{R in A.$state||Ou(E,R)}),u=!1,c=!1,r.state.value[e]=Wl(A._hmrPayload,"hotState"),c=!0,ma().then(()=>{u=!0});for(const R in A._hmrPayload.actions){const B=A[R];La(E,R,M(B,R))}for(const R in A._hmrPayload.getters){const B=A._hmrPayload.getters[R],q=s?Z(()=>(pi(r),B.call(E,E))):B;La(E,R,q)}Object.keys(E._hmrPayload.getters).forEach(R=>{R in A._hmrPayload.getters||Ou(E,R)}),Object.keys(E._hmrPayload.actions).forEach(R=>{R in A._hmrPayload.actions||Ou(E,R)}),E._hmrPayload=A._hmrPayload,E._getters=A._getters,E._hotUpdating=!1})),Me.NODE_ENV!=="production"&&Me.NODE_ENV!=="test"&&po){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(R=>{Object.defineProperty(E,R,sn({value:E[R]},A))})}return r._p.forEach(A=>{if(Me.NODE_ENV!=="production"&&Me.NODE_ENV!=="test"&&po){const R=i.run(()=>A({store:E,app:r._a,pinia:r,options:a}));Object.keys(R||{}).forEach(B=>E._customProperties.add(B)),sn(E,R)}else sn(E,i.run(()=>A({store:E,app:r._a,pinia:r,options:a})))}),Me.NODE_ENV!=="production"&&E.$state&&typeof E.$state=="object"&&typeof E.$state.constructor=="function"&&!E.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
17
17
  state: () => new MyClass()
18
18
  Found in store "${E.$id}".`),m&&s&&n.hydrate&&n.hydrate(E.$state,m),u=!0,c=!0,E}/*! #__NO_SIDE_EFFECTS__ */function L1(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,l){const u=mv();if(a=(Me.NODE_ENV==="test"&&hi&&hi._testing?null:a)||(u?fe(qh,null):null),a&&pi(a),Me.NODE_ENV!=="production"&&!hi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
19
19
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
20
- This will fail in production.`);a=hi,a._s.has(r)||(s?Du(r,t,o,a):ip(r,o,a),Me.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Me.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Du(d,t,o,a,!0):ip(d,sn({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Me.NODE_ENV!=="production"&&po){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 W=(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.ConnectAccount="connect_account",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))(W||{});const ap={toolbar:{enabled:!0,location:"top-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{signIn:{enabled:!0,hint:void 0},signUp:{enabled:!0,marketingConsent:Po.OptIn},passwords:"default"},checkout:{redirect:!1},cart:{quantity:"selectable",bundles:{onAdd:"replace",showProducts:!0},offers:{label:"You might also like:"},leadMagnets:{quantity:"single"}},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},at=Symbol("options"),R1=()=>window.location.search.includes("mb_debug=true");function Ye(...e){R1()&&console.debug(...e)}function $u(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 Mu=(e=>(e[e.Forward=0]="Forward",e[e.Back=1]="Back",e))(Mu||{}),te=(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))(te||{});const Ce=L1("ui",()=>{const e=j(0),t=j("None"),n=j(null),r=j(null),o=j([]),s=j([]);function i(h,m,y,x){if(h===t.value&&m===n.value&&$u(r.value,y??null)){Ye("Skipping navigation request, already on the requested view with the same intent and parameters");return}t.value!=="None"&&s.value.push([t.value,n.value,r.value??void 0]),x&&(s.value=[]),e.value=0,r.value=y??null,n.value=m,t.value=h}function a(h,m,y){o.value.push([h,m,y??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[m,y,x]=h;e.value=0,r.value=x??null,n.value=y,t.value=m,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;Ye("Going back to ",h);const[m,y,x]=h;e.value=1,r.value=x??null,n.value=y,t.value=m}const f=Z(()=>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 j1{constructor(){ko(this,"current",this.detect());ko(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 mi=new j1;function lp(e,t,n,r){mi.isServer||Xt(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function up(e,t,n,r){mi.isServer||Xt(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var gi=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(gi||{});function U1(){const e=j(0),t=j(!0);return up(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function en(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 Yo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yo||{}),jr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(jr||{});function Tt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=dp(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return Ha(i);if(t&1){const a=s.unmount??!0?0:1;return en(a,{0(){return null},1(){return Ha({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Ha(i)}function Ha({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Vu(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=cp(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!B1(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(m=>m.trim()).filter((m,y,x)=>x.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(`
20
+ This will fail in production.`);a=hi,a._s.has(r)||(s?Du(r,t,o,a):ip(r,o,a),Me.NODE_ENV!=="production"&&(i._pinia=a));const c=a._s.get(r);if(Me.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?Du(d,t,o,a,!0):ip(d,sn({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Me.NODE_ENV!=="production"&&po){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 W=(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.ConnectAccount="connect_account",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))(W||{});const ap={toolbar:{enabled:!0,location:"top-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{signIn:{enabled:!0,hint:void 0},signUp:{enabled:!0,marketingConsent:Po.OptIn},passwords:"default"},checkout:{redirect:!1},cart:{quantity:"selectable",bundles:{onAdd:"replace",showProducts:!0},offers:{label:"You might also like:"},leadMagnets:{quantity:"single"}},activation:{deviceTokenFileExtension:".dt",licenseTokenFileName:"license-file.mb",websiteLink:{enabled:!1,label:"Visit website"}},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},it=Symbol("options"),R1=()=>window.location.search.includes("mb_debug=true");function Ye(...e){R1()&&console.debug(...e)}function $u(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 Mu=(e=>(e[e.Forward=0]="Forward",e[e.Back=1]="Back",e))(Mu||{}),te=(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))(te||{});const Ce=L1("ui",()=>{const e=j(0),t=j("None"),n=j(null),r=j(null),o=j([]),s=j([]);function i(h,m,y,x){if(h===t.value&&m===n.value&&$u(r.value,y??null)){Ye("Skipping navigation request, already on the requested view with the same intent and parameters");return}t.value!=="None"&&s.value.push([t.value,n.value,r.value??void 0]),x&&(s.value=[]),e.value=0,r.value=y??null,n.value=m,t.value=h}function a(h,m,y){o.value.push([h,m,y??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[m,y,x]=h;e.value=0,r.value=x??null,n.value=y,t.value=m,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;Ye("Going back to ",h);const[m,y,x]=h;e.value=1,r.value=x??null,n.value=y,t.value=m}const f=Z(()=>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 j1{constructor(){ko(this,"current",this.detect());ko(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 mi=new j1;function lp(e,t,n,r){mi.isServer||Xt(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function up(e,t,n,r){mi.isServer||Xt(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var gi=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(gi||{});function U1(){const e=j(0),t=j(!0);return up(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function en(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 Yo=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yo||{}),jr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(jr||{});function Tt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=dp(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return Ha(i);if(t&1){const a=s.unmount??!0?0:1;return en(a,{0(){return null},1(){return Ha({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Ha(i)}function Ha({props:e,attrs:t,slots:n,slot:r,name:o}){var u;const{as:s,...i}=Vu(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=cp(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[c,...d]=a??[];if(!B1(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(m=>m.trim()).filter((m,y,x)=>x.indexOf(m)===y).sort((m,y)=>m.localeCompare(y)).map(m=>` - ${m}`).join(`
21
21
  `),"","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(m=>` - ${m}`).join(`
22
22
  `)].join(`
23
- `));const f=dp(c.props??{},i,l),h=xn(c,f,!0);for(const m in f)m.startsWith("on")&&(h.props||(h.props={}),h.props[m]=f[m]);return h}return Array.isArray(a)&&a.length===1?a[0]:a}return ft(s,Object.assign({},i,l),{default:()=>a})}function cp(e){return e.flatMap(t=>t.type===de?cp(t.children):[t])}function dp(...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 Vu(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function B1(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var bi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(bi||{});let vi=le({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 Tt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function F1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function De(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Ko(e){if(mi.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e&&Object.prototype.hasOwnProperty.call(e,"value")){const t=De(e);if(t)return t.ownerDocument}return document}const qa=["[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 vt=(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))(vt||{}),Go=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Go||{});function H1(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(qa)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var fp=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(fp||{});function q1(e,t=0){var n;return e===((n=Ko(e))==null?void 0:n.body)?!1:en(t,{0(){return e.matches(qa)},1(){let r=e;for(;r!==null;){if(r.matches(qa))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 go(e){e==null||e.focus({preventScroll:!0})}const z1=["textarea","input"].join(",");function W1(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,z1))??!1}function Qo(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 Hn(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?Qo(e):e:H1(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&&W1(f)&&f.select(),2}let bo=[];F1(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||bo[0]===t.target)return;let n=t.target;n=n.closest(qa),bo.unshift(n??t.target),bo=bo.filter(r=>r!=null&&r.isConnected),bo.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 za(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function hp(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=De(n);r instanceof HTMLElement&&t.add(r)}return t}var pp=(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))(pp||{});const yi=Object.assign(le({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:j(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=j(null);r({el:o,$el:o});const s=Z(()=>Ko(o)),i=j(!1);Ue(()=>i.value=!0),jt(()=>i.value=!1),Y1({ownerDocument:s},Z(()=>i.value&&!!(e.features&16)));const a=K1({ownerDocument:s,container:o,initialFocus:Z(()=>e.initialFocus)},Z(()=>i.value&&!!(e.features&2)));G1({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Z(()=>i.value&&!!(e.features&8)));const l=U1();function u(h){const m=De(o);if(!m)return;(x=>x())(()=>{en(l.value,{[gi.Forwards]:()=>{Hn(m,vt.First,{skipElements:[h.relatedTarget]})},[gi.Backwards]:()=>{Hn(m,vt.Last,{skipElements:[h.relatedTarget]})}})})}const c=j(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!i.value)return;const m=hp(e.containers);De(o)instanceof HTMLElement&&m.add(De(o));const y=h.relatedTarget;y instanceof HTMLElement&&y.dataset.moonbaseFocusGuard!=="true"&&(mp(m,y)||(c.value?Hn(De(o),en(l.value,{[gi.Forwards]:()=>vt.Next,[gi.Backwards]:()=>vt.Previous})|vt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&go(h.target)))}return()=>{const h={},m={ref:o,onKeydown:d,onFocusout:f},{features:y,initialFocus:x,containers:P,...C}=e;return ft(de,[!!(y&4)&&ft(vi,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:bi.Focusable}),Tt({ourProps:m,theirProps:{...t,...C},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(y&4)&&ft(vi,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:bi.Focusable})])}}}),{features:pp});function Z1(e){const t=j(bo.slice());return Ze([e],([n],[r])=>{r===!0&&n===!1?za(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=bo.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Y1({ownerDocument:e},t){const n=Z1(t);Ue(()=>{Xt(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&go(n())},{flush:"post"})}),jt(()=>{t.value&&go(n())})}function K1({ownerDocument:e,container:t,initialFocus:n},r){const o=j(null),s=j(!1);return Ue(()=>s.value=!0),jt(()=>s.value=!1),Ue(()=>{Ze([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=De(t);l&&za(()=>{var d,f;if(!s.value)return;const u=De(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?go(u):Hn(l,vt.First|vt.NoScroll)===Go.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 G1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;lp((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=hp(n);De(t)instanceof HTMLElement&&a.add(De(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?mp(a,u)?(r.value=u,go(u)):(i.preventDefault(),i.stopPropagation(),go(l)):go(r.value)},!0)}function mp(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Q1(e){const t=db(e.getSnapshot());return jt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function wi(){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 za(()=>{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=wi();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 X1(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 J1(){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 gp(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ew(){return/Android/gi.test(window.navigator.userAgent)}function tw(){return gp()||ew()}function nw(){return gp()?{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=wi();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 rw(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ow(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const vo=X1(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:wi(),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:ow(n)},o=[nw(),J1(),rw()];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)}});vo.subscribe(()=>{const e=vo.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)&&vo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&vo.dispatch("TEARDOWN",n)}});function sw(e,t,n){const r=Q1(vo),o=Z(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ze([e,t],([s,i],[a],l)=>{if(!s||!i)return;vo.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(vo.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let iw=0;function aw(){return++iw}function yo(){return aw()}const Lu=new Map,_i=new Map;function bp(e,t=j(!0)){Xt(n=>{if(!t.value)return;const r=De(e);if(!r)return;n(()=>{if(!r)return;const s=_i.get(r)??1;if(s===1?_i.delete(r):_i.set(r,s-1),s!==1)return;const i=Lu.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,Lu.delete(r))});const o=_i.get(r)??0;_i.set(r,o+1),o===0&&(Lu.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Ei(e,t,n,r){mi.isServer||Xt(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const vp=30;function lw(e,t,n=Z(()=>!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:De(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!q1(l,fp.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=j(null);Ei(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),Ei(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),Ei(n,"click",i=>{tw()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Ei(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Ei(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=vp||Math.abs(a.y-s.y)>=vp))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),up(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function uw({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=j(null),o=Ko(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(De(r))||u.contains((l=(a=De(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:ft(vi,{features:bi.Hidden,ref:r})}}}let yp=Symbol("Context");var tn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(tn||{});function cw(){return Ru()!==null}function Ru(){return fe(yp,null)}function dw(e){Yt(yp,e)}const wp=Symbol("ForcePortalRootContext");function fw(){return fe(wp,!1)}const _p=le({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Yt(wp,e.force),()=>{const{force:r,...o}=e;return Tt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let Ep=Symbol("StackContext");var ju=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(ju||{});function hw(){return fe(Ep,()=>{})}function pw({type:e,enabled:t,element:n,onUpdate:r}){let o=hw();function s(...i){r==null||r(...i),o(...i)}Ue(()=>{Ze(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),jt(()=>{t.value&&s(1,e,n)}),Yt(Ep,s)}var an=(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))(an||{});let mw=Symbol("DescriptionContext");function gw({slot:e=j({}),name:t="Description",props:n={}}={}){let r=j([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return Yt(mw,{register:o,slot:e,name:t,props:n}),Z(()=>r.value.length>0?r.value.join(" "):void 0)}function kp(e){const t=Ko(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 Uu=Symbol("PortalParentContext"),xp=Symbol("PortalGroupContext"),bw=le({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=j(null),o=fw(),s=fe(xp,null),i=j(o===!0||s==null?kp(r.value):s.resolveTarget()),a=j(!1);Ue(()=>{a.value=!0}),Xt(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=fe(Uu,null);let u=!1;const c=Pa();return Ze(r,()=>{if(u||!l)return;const d=De(r);d&&(jt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return ft(Bb,{to:i.value},Tt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});function vw(){const e=fe(Uu,null),t=j([]);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,le({name:"PortalWrapper",setup(s,{slots:i}){return Yt(Uu,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}const yw=le({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=qs({resolveTarget(){return e.target}});return Yt(xp,r),()=>{const{target:o,...s}=e;return Tt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Bu=Symbol("DialogContext");function Fu(e){const t=fe(Bu,null);if(t===null)throw new Error(`<${e} /> is missing a parent <Dialog /> component.`);return t}const Wa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",ww=le({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:Wa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${yo()}`},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 Be;const s=j(!1);Ue(()=>{s.value=!0});let i=!1;const a=Z(()=>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=j(0),u=Ru(),c=Z(()=>e.open===Wa&&u!==null?(u.value&tn.Open)===tn.Open:e.open),d=j(null),f=Z(()=>Ko(d));if(o({el:d,$el:d}),!(e.open!==Wa||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===Wa?void 0:e.open}`);const m=Z(()=>s.value&&c.value?0:1),y=Z(()=>m.value===0),x=j(null),P={titleId:x,panelRef:j(null),dialogState:m,setTitleId(Qe){x.value!==Qe&&(x.value=Qe)},close(){t("close",!1)}},C=Z(()=>l.value>1),U=fe(Bu,null)!==null,[M,I]=vw(),{resolveContainers:V,mainTreeNodeRef:E,MainTreeNode:O}=uw({portals:M,defaultContainers:[Z(()=>P.panelRef.value??d.value)]}),T=Z(()=>C.value?"parent":"leaf"),A=Z(()=>u!==null?(u.value&tn.Closing)===tn.Closing:!1),R=Z(()=>!e.makeInert||U||A.value?!1:y.value),B=Z(()=>{var Qe;return Array.from(((Qe=f.value)==null?void 0:Qe.querySelectorAll("body > *"))??[]).find(ot=>ot.id==="moonbase"?!1:ot.contains(De(E))&&ot instanceof HTMLElement)??null});bp(B,R);const q=Z(()=>C.value?!0:y.value),be=Z(()=>{var Qe;return Array.from(((Qe=f.value)==null?void 0:Qe.querySelectorAll("[data-moonbase-portal]"))??[]).find(ot=>ot.contains(De(E))&&ot instanceof HTMLElement)??null});bp(be,q),pw({type:"Dialog",enabled:Z(()=>m.value===0),element:d,onUpdate:(Qe,ot)=>{if(ot==="Dialog")return en(Qe,{[ju.Add]:()=>l.value+=1,[ju.Remove]:()=>l.value-=1})}});const pe=gw({name:"DialogDescription",slot:Z(()=>({open:c.value}))});Yt(Bu,P);const he=Z(()=>!(!y.value||C.value));lw(V,(Qe,ot)=>{Qe.preventDefault(),P.close(),ma(()=>ot==null?void 0:ot.focus())},he);const oe=Z(()=>!(C.value||m.value!==0));lp((Be=f.value)==null?void 0:Be.defaultView,"keydown",Qe=>{oe.value&&(Qe.defaultPrevented||Qe.key===an.Escape&&(Qe.preventDefault(),Qe.stopPropagation(),P.close()))});const ue=Z(()=>!(!e.lockScroll||A.value||m.value!==0||U));return sw(f,ue,Qe=>({containers:[...Qe.containers??[],V]})),Xt(Qe=>{if(m.value!==0)return;const ot=De(d);if(!ot)return;const $t=new ResizeObserver(wt=>{for(const gr of wt){const qr=gr.target.getBoundingClientRect();qr.x===0&&qr.y===0&&qr.width===0&&qr.height===0&&P.close()}});$t.observe(ot),Qe(()=>$t.disconnect())}),()=>{const{id:Qe,open:ot,initialFocus:$t,...wt}=e,gr={...n,ref:d,id:Qe,role:a.value,"aria-modal":m.value===0?!0:void 0,"aria-labelledby":x.value,"aria-describedby":pe.value},qr={open:m.value===0};return ft(_p,{force:!0},()=>[ft(bw,()=>ft(yw,{target:d.value},()=>ft(_p,{force:!1},()=>ft(yi,{initialFocus:$t,containers:V,features:y.value?en(T.value,{parent:yi.features.RestoreFocus,leaf:yi.features.All&~yi.features.FocusLock}):yi.features.None},()=>ft(I,{},()=>Tt({ourProps:gr,theirProps:{...wt,...n},slot:qr,attrs:n,slots:r,visible:m.value===0,features:Yo.RenderStrategy|Yo.Static,name:"Dialog"})))))),ft(O)])}}}),_w=le({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${yo()}`}},setup(e,{attrs:t,slots:n}){const r=Fu("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Tt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),Ew=le({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${yo()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Fu("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 Tt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),Ap=le({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${yo()}`}},setup(e,{attrs:t,slots:n}){const r=Fu("DialogTitle");return Ue(()=>{r.setTitleId(e.id),jt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Tt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Cp(e,t){if(e)return e;const n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function kw(e,t){const n=j(Cp(e.value.type,e.value.as));return Ue(()=>{n.value=Cp(e.value.type,e.value.as)}),Xt(()=>{var r;n.value||De(t)&&De(t)instanceof HTMLButtonElement&&!((r=De(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}let xw=le({props:{onFocus:{type:Function,required:!0}},setup(e){let t=j(!0);return()=>t.value?ft(vi,{as:"button",type:"button",features:bi.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 Op=Symbol("TabsContext");function Za(e){const t=fe(Op,null);if(t===null)throw new Error(`<${e} /> is missing a parent <TabGroup /> component.`);return t}const Hu=Symbol("TabsSSRContext"),Aw=le({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=j(e.selectedIndex??e.defaultIndex),s=j([]),i=j([]),a=Z(()=>e.selectedIndex!==null),l=Z(()=>a.value?e.selectedIndex:o.value),u={selectedIndex:Z(()=>o.value??e.defaultIndex??null),orientation:Z(()=>e.vertical?"vertical":"horizontal"),activation:Z(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(m){l.value!==m&&r("change",m),a.value||c(m)},registerTab(m){if(s.value.includes(m))return;const y=s.value[o.value];if(s.value.push(m),s.value=Qo(s.value,De),!a.value){const x=s.value.indexOf(y)??o.value;x!==-1&&(o.value=x)}},unregisterTab(m){const y=s.value.indexOf(m);y!==-1&&s.value.splice(y,1)},registerPanel(m){i.value.includes(m)||(i.value.push(m),i.value=Qo(i.value,De))},unregisterPanel(m){const y=i.value.indexOf(m);y!==-1&&i.value.splice(y,1)}};function c(m){const y=Qo(u.tabs.value,De),x=Qo(u.panels.value,De),P=y.filter(C=>{var U;return!((U=De(C))!=null&&U.hasAttribute("disabled"))});if(m<0||m>y.length-1){const C=en(o.value===null?0:Math.sign(m-o.value),{[-1]:()=>1,0:()=>en(Math.sign(m),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),U=en(C,{0:()=>y.indexOf(P[0]),1:()=>y.indexOf(P[P.length-1])});U!==-1&&(o.value=U),u.tabs.value=y,u.panels.value=x}else{const C=y.slice(0,m),M=[...y.slice(m),...C].find(V=>P.includes(V));if(!M)return;let I=y.indexOf(M)??u.selectedIndex.value;I===-1&&(I=u.selectedIndex.value),o.value=I,u.tabs.value=y,u.panels.value=x}}Yt(Op,u);const d=j({tabs:[],panels:[]}),f=j(!1);Ue(()=>{f.value=!0}),Yt(Hu,Z(()=>f.value?null:d.value));const h=Z(()=>e.selectedIndex);return Ue(()=>{Ze([h],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),Xt(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const m=Qo(u.tabs.value,De);m.some((x,P)=>De(u.tabs.value[P])!==De(x))&&u.setSelectedIndex(m.findIndex(x=>De(x)===De(u.tabs.value[l.value])))}),()=>{const m={selectedIndex:o.value};return ft(de,[s.value.length<=0&&ft(xw,{onFocus:()=>{for(const y of s.value){const x=De(y);if((x==null?void 0:x.tabIndex)===0)return x.focus(),!0}return!1}}),Tt({theirProps:{...n,...Vu(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:m,slots:t,attrs:n,name:"TabGroup"})])}}}),Cw=le({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Za("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Tt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),Ow=le({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${yo()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Za("Tab"),s=j(null);r({el:s,$el:s}),Ue(()=>o.registerTab(s)),jt(()=>o.unregisterTab(s));const i=fe(Hu),a=Z(()=>{if(i.value){const x=i.value.tabs.indexOf(e.id);return x===-1?i.value.tabs.push(e.id)-1:x}return-1}),l=Z(()=>{const x=o.tabs.value.indexOf(s);return x===-1?a.value:x}),u=Z(()=>l.value===o.selectedIndex.value);function c(x){var C;const P=x();if(P===Go.Success&&o.activation.value==="auto"){const U=(C=Ko(s))==null?void 0:C.activeElement,M=o.tabs.value.findIndex(I=>De(I)===U);M!==-1&&o.setSelectedIndex(M)}return P}function d(x){const P=o.tabs.value.map(U=>De(U)).filter(Boolean);if(x.key===an.Space||x.key===an.Enter){x.preventDefault(),x.stopPropagation(),o.setSelectedIndex(l.value);return}switch(x.key){case an.Home:case an.PageUp:return x.preventDefault(),x.stopPropagation(),c(()=>Hn(P,vt.First));case an.End:case an.PageDown:return x.preventDefault(),x.stopPropagation(),c(()=>Hn(P,vt.Last))}if(c(()=>en(o.orientation.value,{vertical(){return x.key===an.ArrowUp?Hn(P,vt.Previous|vt.WrapAround):x.key===an.ArrowDown?Hn(P,vt.Next|vt.WrapAround):Go.Error},horizontal(){return x.key===an.ArrowLeft?Hn(P,vt.Previous|vt.WrapAround):x.key===an.ArrowRight?Hn(P,vt.Next|vt.WrapAround):Go.Error}}))===Go.Success)return x.preventDefault()}const f=j(!1);function h(){var x;f.value||(f.value=!0,!e.disabled&&((x=De(s))==null||x.focus({preventScroll:!0}),o.setSelectedIndex(l.value),za(()=>{f.value=!1})))}function m(x){x.preventDefault()}const y=kw(Z(()=>({as:e.as,type:t.type})),s);return()=>{var M;const x={selected:u.value,disabled:e.disabled??!1},{id:P,...C}=e,U={ref:s,onKeydown:d,onMousedown:m,onClick:h,id:P,role:"tab",type:y.value,"aria-controls":(M=De(o.panels.value[l.value]))==null?void 0:M.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return Tt({ourProps:U,theirProps:C,slot:x,attrs:t,slots:n,name:"Tab"})}}}),Sw=le({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Za("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Tt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Nw=le({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-${yo()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Za("TabPanel"),s=j(null);r({el:s,$el:s}),Ue(()=>o.registerPanel(s)),jt(()=>o.unregisterPanel(s));const i=fe(Hu),a=Z(()=>{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=Z(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Z(()=>l.value===o.selectedIndex.value);return()=>{var y;const c={selected:u.value},{id:d,tabIndex:f,...h}=e,m={ref:s,id:d,role:"tabpanel","aria-labelledby":(y=De(o.tabs.value[l.value]))==null?void 0:y.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?ft(vi,{as:"span","aria-hidden":!0,...m}):Tt({ourProps:m,theirProps:h,slot:c,attrs:t,slots:n,features:Yo.Static|Yo.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function Pw(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function qu(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 Ya(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var zu=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(zu||{});function Tw(e,t){const n=wi();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 Sp(e,t,n,r,o,s){const i=wi(),a=s!==void 0?Pw(s):()=>{};return Ya(e,...o),qu(e,...t,...n),i.nextFrame(()=>{Ya(e,...n),qu(e,...r),i.add(Tw(e,l=>(Ya(e,...r,...t),qu(e,...o),a(l))))}),i.add(()=>Ya(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function wo(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Wu=Symbol("TransitionContext");function Iw(){return fe(Wu,null)!==null}function Dw(){const e=fe(Wu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Zu=Symbol("NestingContext");function $w(){const e=fe(Zu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Ka(e){return"children"in e?Ka(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Np(e){const t=j([]),n=j(!1);Ue(()=>n.value=!0),jt(()=>n.value=!1);function r(s,i=jr.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(en(i,{[jr.Unmount](){t.value.splice(a,1)},[jr.Hidden](){t.value[a].state="hidden"}}),!Ka(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,jr.Unmount)}return{children:t,register:o,unregister:r}}const Pp=Yo.RenderStrategy,Yu=le({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=j(0);function i(){s.value|=tn.Opening,t("beforeEnter")}function a(){s.value&=~tn.Opening,t("afterEnter")}function l(){s.value|=tn.Closing,t("beforeLeave")}function u(){s.value&=~tn.Closing,t("afterLeave")}if(!Iw()&&cw())return()=>ft(Tp,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=j(null),d=Z(()=>e.unmount?jr.Unmount:jr.Hidden);o({el:c,$el:c});const{show:f,appear:h}=Dw(),{register:m,unregister:y}=$w(),x=j(f.value?"visible":"hidden"),P={value:!0},C=yo(),U={value:!1},M=Np(()=>{!U.value&&x.value!=="hidden"&&(x.value="hidden",y(C),u())});Ue(()=>{const q=m(C);jt(q)}),Xt(()=>{if(d.value===jr.Hidden&&C){if(f.value&&x.value!=="visible"){x.value="visible";return}en(x.value,{hidden:()=>y(C),visible:()=>m(C)})}});const I=wo(e.enter),V=wo(e.enterFrom),E=wo(e.enterTo),O=wo(e.entered),T=wo(e.leave),A=wo(e.leaveFrom),R=wo(e.leaveTo);Ue(()=>{Xt(()=>{if(x.value==="visible"){const q=De(c);if(q instanceof Comment&&q.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function B(q){const be=P.value&&!h.value,pe=De(c);!pe||!(pe instanceof HTMLElement)||be||(U.value=!0,f.value&&i(),f.value||l(),q(f.value?Sp(pe,I,V,E,O,he=>{U.value=!1,he===zu.Finished&&a()}):Sp(pe,T,A,R,O,he=>{U.value=!1,he===zu.Finished&&(Ka(M)||(x.value="hidden",y(C),u()))})))}return Ue(()=>{Ze([f],(q,be,pe)=>{B(pe),P.value=!1},{immediate:!0})}),Yt(Zu,M),dw(Z(()=>en(x.value,{visible:tn.Open,hidden:tn.Closed})|s.value)),()=>{const{appear:q,show:be,enter:pe,enterFrom:he,enterTo:oe,entered:ue,leave:Be,leaveFrom:Qe,leaveTo:ot,...$t}=e,wt={ref:c},gr={...$t,...h.value&&f.value&&mi.isServer?{class:Rs([n.class,$t.class,...I,...V])}:{}};return Tt({theirProps:gr,ourProps:wt,slot:{},slots:r,attrs:n,features:Pp,visible:x.value==="visible",name:"TransitionChild"})}}}),Mw=Yu,Tp=le({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=Ru(),s=Z(()=>e.show===null&&o!==null?(o.value&tn.Open)===tn.Open:e.show);Xt(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=j(s.value?"visible":"hidden"),a=Np(()=>{i.value="hidden"}),l=j(!0),u={show:s,appear:Z(()=>e.appear||!l.value)};return Ue(()=>{Xt(()=>{l.value=!1,s.value?i.value="visible":Ka(a)||(i.value="hidden")})}),Yt(Zu,a),Yt(Wu,u),()=>{const c=Vu(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Tt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[ft(Mw,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:Pp,visible:i.value==="visible",name:"Transition"})}}});function Vw(e,t){return p(),_("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"},[L("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 Lw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})])}function Ip(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})])}function Ku(e,t){return p(),_("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"},[L("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 Rw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})])}function jw(e,t){return p(),_("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"},[L("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 Uw(e,t){return p(),_("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"},[L("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 Bw(e,t){return p(),_("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"},[L("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 Dp(e,t){return p(),_("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"},[L("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 Fw(e,t){return p(),_("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"},[L("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 Hw(e,t){return p(),_("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"},[L("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 qw(e,t){return p(),_("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"},[L("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 $p(e,t){return p(),_("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"},[L("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 zw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14"})])}function Ww(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function Zw(e,t){return p(),_("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"},[L("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 Yw(e,t){return p(),_("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"},[L("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 Kw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const Gw=["href","disabled","data-variant","data-size","data-corners","data-background"],Qw=["disabled","data-variant","data-size","data-corners","data-background"],Xo=le({__name:"MoonIconButton",props:{variant:{},size:{},disabled:{type:Boolean},href:{}},emits:["click"],setup(e){const t=e,n=fe(at),r=Z(()=>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?(p(),_("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},[Nt(o.$slots,"default")],8,Gw)):(p(),_("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"))},[Nt(o.$slots,"default")],8,Qw))}}}),ar=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Xw={},Jw={class:"moonbase:text-display"};function e_(e,t){return p(),_("h2",Jw,[Nt(e.$slots,"default")])}const t_=ar(Xw,[["render",e_]]),n_={},r_={class:"moonbase:text-subtitle"};function o_(e,t){return p(),_("h5",r_,[Nt(e.$slots,"default")])}const qe=ar(n_,[["render",o_]]),s_=["data-contain"],i_={class:"moonbase:drawer-header"},a_=["data-background"],l_=le({__name:"Drawer",setup(e){const t=Ce(),n=Re(),r=fe(at),o=j(""),s=j("");Ze(()=>[t.active,t.intent,t.next],([a,l,u])=>{if(s.value="",u&&(l===W.SignIn||l===W.SignUp)){const[c,d,f]=u;d===W.ConfirmEmailChange?s.value="to confirm email":d===W.RedeemVoucher?s.value="to redeem voucher":d===W.ActivateProduct?s.value="to activate product":d===W.ViewProducts?s.value="to manage products":d===W.ManageSubscription&&(s.value="to manage subscription")}switch(l){case W.ActivateProduct:o.value="Activate product";return;case W.SignIn:o.value="Sign in";return;case W.SignUp:o.value="Sign up";return;case W.ConfirmAccount:o.value="Confirm account";return;case W.ConfirmEmail:o.value="Confirm email address";return;case W.ConfirmEmailChange:o.value="Confirm email change";return;case W.ForgotPassword:o.value="Forgot password";return;case W.ResetPassword:o.value="Reset password";return}switch(a){case te.Cart:o.value="My cart";return;case te.Customer:o.value="My account";return;case te.Product:o.value="Product details";return;case te.Subscription:o.value="Subscription details";return;case te.Redeem:o.value="Redeem voucher";return}return""});function i(){if(!n.user.value)t.show(te.Authentication,W.SignIn),t.enqueue(te.Customer,W.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(te.Customer,a?W.ViewProducts:W.ViewAccount)}}return(a,l)=>(p(),H(b(Tp),{as:"template",show:b(t).active!==b(te).None},{default:k(()=>{var u,c,d;return[v(b(ww),{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:k(()=>{var f;return[L("div",{class:"moonbase:drawer-container","data-contain":!!((f=b(r))!=null&&f.target)||void 0},[v(b(Yu),{as:"template"},{default:k(()=>{var h;return[v(b(_w),{class:"moonbase:drawer-overlay","data-contain":!!((h=b(r))!=null&&h.target)||void 0},null,8,["data-contain"])]}),_:1}),v(b(Yu),{as:"template"},{default:k(()=>{var h,m;return[v(b(Ew),{class:"moonbase:drawer-panel","data-contain":!!((h=b(r))!=null&&h.target)||void 0,"data-background":(m=b(r))==null?void 0:m.theme.colors.background},{default:k(()=>{var y,x;return[L("div",i_,[b(t).history.length>0?(p(),H(Xo,{key:0,variant:"subtle",onClick:l[0]||(l[0]=P=>b(t).back())},{default:k(()=>[v(b(Lw))]),_:1})):(p(),H(Xo,{key:1,variant:"subtle",onClick:l[1]||(l[1]=P=>b(t).reset())},{default:k(()=>[v(b(Kw))]),_:1})),b(t).active===b(te).Cart&&((y=b(r))!=null&&y.auth.signIn.enabled)?(p(),H(Xo,{key:2,variant:"subtle",onClick:i},{default:k(()=>[v(b(Yw))]),_:1})):z("",!0)]),v(b(Ap),{as:t_},{default:k(()=>[N($(o.value)+" ",1),s.value?(p(),H(qe,{key:0},{default:k(()=>[N($(s.value),1)]),_:1})):z("",!0)]),_:1}),L("div",{class:"moonbase:drawer-content","data-background":(x=b(r))==null?void 0:x.theme.colors.background},[v(ui,{name:b(t).direction===b(Mu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:k(()=>[Nt(a.$slots,"default")]),_:3},8,["name"])],8,a_)]}),_:3},8,["data-contain","data-background"])]}),_:3})],8,s_)]}),_:3},8,["data-contain","make-inert","lock-scroll"])]}),_:3},8,["show"]))}}),Ht=e=>new Promise(t=>setTimeout(t,e)),u_={},c_={class:"moonbase:text-body-bold"};function d_(e,t){return p(),_("span",c_,[Nt(e.$slots,"default")])}const On=ar(u_,[["render",d_]]),f_=["data-visible","data-contain","data-location","data-corners"],h_={key:0,href:"https://moonbase.sh",target:"_blank",rel:"noopener",class:"moonbase:toolbar-action","data-action-width":"narrow"},p_=["disabled"],m_={key:0,class:"moonbase:toolbar-cart-count"},g_=le({__name:"Toolbar",setup(e){const t=j(!1),n=Ce(),r=Re(),{items:o}=Bn(),s=fe(at),i=Z(()=>(o.value??[]).reduce((l,u)=>l+u.quantity,0));Ue(()=>{Ht(100).then(()=>t.value=!0)});function a(){if(!r.user.value)n.show(te.Authentication,W.SignIn),n.enqueue(te.Customer,W.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(te.Customer,l?W.ViewProducts:W.ViewAccount)}}return(l,u)=>{var c,d,f,h,m,y;return p(),_("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(te).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?(p(),_("a",h_,u[1]||(u[1]=[ch('<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)]))):z("",!0),(h=b(s))!=null&&h.toolbar.show.account&&b(s).auth.signIn.enabled&&!b(r).user.value?(p(),_("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:a},[v(On,null,{default:k(()=>u[2]||(u[2]=[N("Log in")])),_:1,__:[2]})],8,p_)):(m=b(s))!=null&&m.toolbar.show.account?(p(),_("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:a},[v(On,null,{default:k(()=>{var x;return[N($((x=b(r).user.value)==null?void 0:x.name),1)]}),_:1})])):z("",!0),(y=b(s))!=null&&y.toolbar.show.cart?(p(),_("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:u[0]||(u[0]=x=>b(n).show(b(te).Cart,b(W).AddToCart))},[v(On,null,{default:k(()=>u[3]||(u[3]=[N(" Cart ")])),_:1,__:[3]}),i.value>0?(p(),_("span",m_,$(i.value),1)):z("",!0)])):z("",!0)],8,f_)}}});function xt(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)}}const lr=String.raw`[a-z][a-z0-9\-]+[a-z0-9](?:\.[a-z][a-z0-9\-]+[a-z0-9])*`,Mp=String.raw`[a-z][a-z0-9\-]+[a-z0-9]`,Vp="name|price|original_price|discount_name|discount_description|discount_total",Lp="price|original_price|discount_name|discount_description|discount_total",b_=/^user\.(?<property>name|email)$/,v_=/^cart\.(?<property>item_count)$/,y_=new RegExp(String.raw`^product\.(?<id>${lr})\.variation\[(?<variation>${Mp})\]\.(?<property>${Lp})$`),w_=new RegExp(String.raw`^product\.(?<id>${lr})\.(?<property>${Vp})$`),__=new RegExp(String.raw`^bundle\.(?<id>${lr})\.variation\[(?<variation>${Mp})\]\.(?<property>${Lp})$`),E_=new RegExp(String.raw`^bundle\.(?<id>${lr})\.(?<property>${Vp})$`);function ki(e){const t=b_.exec(e);if(t!=null&&t.groups)return{kind:"user",property:t.groups.property};const n=v_.exec(e);if(n!=null&&n.groups)return{kind:"cart",property:n.groups.property};const r=y_.exec(e);if(r!=null&&r.groups)return{kind:"product",id:r.groups.id,variationId:r.groups.variation,property:r.groups.property};const o=w_.exec(e);if(o!=null&&o.groups)return{kind:"product",id:o.groups.id,property:o.groups.property};const s=__.exec(e);if(s!=null&&s.groups)return{kind:"bundle",id:s.groups.id,variationId:s.groups.variation,property:s.groups.property};const i=E_.exec(e);return i!=null&&i.groups?{kind:"bundle",id:i.groups.id,property:i.groups.property}:null}const k_=/^user$/,x_=/^cart\.has_items$/,A_=new RegExp(String.raw`^cart\.(?<which>contains_product|contains_bundle)\.(?<id>${lr})$`),C_=new RegExp(String.raw`^product\.(?<id>${lr})\.(?<condition>has_discount|has_discount_description|owned)$`),O_=new RegExp(String.raw`^product\.(?<id>${lr})$`),S_=new RegExp(String.raw`^bundle\.(?<id>${lr})\.(?<condition>has_discount|has_discount_description)$`),N_=new RegExp(String.raw`^bundle\.(?<id>${lr})$`);function Jo(e){if(k_.test(e))return{kind:"user"};if(x_.test(e))return{kind:"cart",condition:"has_items"};const t=A_.exec(e);if(t!=null&&t.groups)return{kind:"cart",condition:t.groups.which,id:t.groups.id};const n=C_.exec(e);if(n!=null&&n.groups)return{kind:"product",id:n.groups.id,condition:n.groups.condition};const r=O_.exec(e);if(r!=null&&r.groups)return{kind:"product",id:r.groups.id,condition:"exists"};const o=S_.exec(e);if(o!=null&&o.groups)return{kind:"bundle",id:o.groups.id,condition:o.groups.condition};const s=N_.exec(e);return s!=null&&s.groups?{kind:"bundle",id:s.groups.id,condition:"exists"}:null}function P_(){const e=j(null),t=j({}),n=Z(()=>t.value.user||[]),r=Z(()=>t.value.cart||[]),o=Z(()=>t.value.product||[]),s=Z(()=>t.value.bundle||[]),i=j({}),a=Z(()=>i.value.user||[]),l=Z(()=>i.value.cart||[]),u=Z(()=>i.value.product||[]),c=Z(()=>i.value.bundle||[]),d=Re(),{currency:f,items:h}=Bn(),m=a1(),y=t1();Ze([n,a,d.user],([C,U,M])=>{if(C){for(const I of C)if(I.dataset.moonbaseOriginal===void 0&&(I.dataset.moonbaseOriginal=I.textContent||""),M)switch(I.dataset.moonbaseRender){case"user.name":I.textContent=M.name;break;case"user.email":I.textContent=M.email;break}else I.dataset.moonbaseOriginal?I.textContent=I.dataset.moonbaseOriginal:I.textContent="";for(const I of U)I.dataset.moonbaseOriginalHidden||(I.dataset.moonbaseOriginalHidden=I.hidden?"true":"false"),M?I.hidden=I.dataset.moonbaseIf==="!user":I.hidden=I.dataset.moonbaseIf==="user"}},{immediate:!0,deep:!0}),Ze([r,l,h],([C,U,M])=>{if(C){for(const I of C)switch(I.dataset.moonbaseOriginal===void 0&&(I.dataset.moonbaseOriginal=I.textContent||""),Ye("Rendering cart element",I),I.dataset.moonbaseRender){case"cart.item_count":I.textContent=M.reduce((V,E)=>V+E.quantity,0).toString();break}for(const I of U){const V=I.dataset.moonbaseIf;if(!V)return;const E=V.startsWith("!"),O=Jo(E?V.slice(1):V);if(!O||O.kind!=="cart")continue;let T=!1;switch(O.condition){case"has_items":T=M.length>0;break;case"contains_product":T=M.some(A=>A.type==="Product"&&A.productId===O.id);break;case"contains_bundle":T=M.some(A=>A.type==="Bundle"&&A.bundleId===O.id);break}E&&(T=!T),I.dataset.moonbaseOriginalHidden||(I.dataset.moonbaseOriginalHidden=I.hidden?"true":"false"),I.hidden=!T}}},{immediate:!0,deep:!0}),Ze([o,u,m,f],([C,U,M,I])=>{var V,E,O,T,A,R,B;if(C){for(const q of C){const be=q.dataset.moonbaseRender;if(!be)continue;const pe=ki(be);if(!pe||pe.kind!=="product")continue;const he=M.find(ue=>ue.id===pe.id);let oe;if(pe.variationId?oe=(V=he==null?void 0:he.variations)==null?void 0:V.find(ue=>ue.id===pe.variationId):oe=he==null?void 0:he.defaultVariation,q.dataset.moonbaseOriginal===void 0&&(q.dataset.moonbaseOriginal=q.textContent||""),he&&oe)switch(pe.property){case"name":q.textContent=he.name;break;case"price":q.textContent=xt(oe.price[I],I);break;case"original_price":q.textContent=xt(oe.originalPrice[I],I);break;case"discount_name":q.textContent=((E=oe.discount)==null?void 0:E.name)??q.dataset.moonbaseOriginal??"";break;case"discount_description":q.textContent=((O=oe.discount)==null?void 0:O.description)??q.dataset.moonbaseOriginal??"";break;case"discount_total":q.textContent=(T=oe.discount)!=null&&T.total?xt(oe.discount.total[I],I):q.dataset.moonbaseOriginal??"";break}else q.dataset.moonbaseOriginal?q.textContent=q.dataset.moonbaseOriginal:q.textContent=""}for(const q of U){const be=q.dataset.moonbaseIf;if(!be)return;const pe=be.startsWith("!"),he=Jo(pe?be.slice(1):be);if(!he||he.kind!=="product")continue;const oe=M.find(Be=>Be.id===he.id);let ue=!1;switch(he.condition){case"exists":ue=!!oe;break;case"owned":ue=!!(oe!=null&&oe.owned);break;case"has_discount":ue=!!((A=oe==null?void 0:oe.defaultVariation)!=null&&A.hasDiscount);break;case"has_discount_description":ue=!!((B=(R=oe==null?void 0:oe.defaultVariation)==null?void 0:R.discount)!=null&&B.description);break}pe&&(ue=!ue),q.dataset.moonbaseOriginalHidden||(q.dataset.moonbaseOriginalHidden=q.hidden?"true":"false"),q.hidden=!ue}}},{immediate:!0,deep:!0}),Ze([s,c,y,f],([C,U,M,I])=>{var V,E,O,T,A,R,B;if(C){for(const q of C){const be=q.dataset.moonbaseRender;if(!be)continue;const pe=ki(be);if(!pe||pe.kind!=="bundle")continue;const he=M.find(ue=>ue.id===pe.id);let oe;if(pe.variationId?oe=(V=he==null?void 0:he.variations)==null?void 0:V.find(ue=>ue.id===pe.variationId):oe=he==null?void 0:he.defaultVariation,q.dataset.moonbaseOriginal===void 0&&(q.dataset.moonbaseOriginal=q.textContent||""),he&&oe)switch(pe.property){case"name":q.textContent=he.name;break;case"price":q.textContent=xt(oe.price[I],I);break;case"original_price":q.textContent=xt(oe.originalPrice[I],I);break;case"discount_name":q.textContent=((E=oe.discount)==null?void 0:E.name)??q.dataset.moonbaseOriginal??"";break;case"discount_description":q.textContent=((O=oe.discount)==null?void 0:O.description)??q.dataset.moonbaseOriginal??"";break;case"discount_total":q.textContent=(T=oe.discount)!=null&&T.total?xt(oe.discount.total[I],I):q.dataset.moonbaseOriginal??"";break}else q.dataset.moonbaseOriginal?q.textContent=q.dataset.moonbaseOriginal:q.textContent=""}for(const q of U){const be=q.dataset.moonbaseIf;if(!be)return;const pe=be.startsWith("!"),he=Jo(pe?be.slice(1):be);if(!he||he.kind!=="bundle")continue;const oe=M.find(Be=>Be.id===he.id);let ue=!1;switch(he.condition){case"exists":ue=!!oe;break;case"has_discount":ue=!!((A=oe==null?void 0:oe.defaultVariation)!=null&&A.hasDiscount);break;case"has_discount_description":ue=!!((B=(R=oe==null?void 0:oe.defaultVariation)==null?void 0:R.discount)!=null&&B.description);break}pe&&(ue=!ue),q.dataset.moonbaseOriginalHidden||(q.dataset.moonbaseOriginalHidden=q.hidden?"true":"false"),q.hidden=!ue}}},{immediate:!0,deep:!0});function x(C){var U;if(C.dataset&&C.dataset.moonbaseRender){const M=C.dataset.moonbaseRender;if(!M||!ki(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];t.value[I]=t.value[I]||[],t.value[I].push(C),Ye("Added node to render collection",C)}}if(C.dataset&&C.dataset.moonbaseIf){const M=(U=C.dataset.moonbaseIf)==null?void 0:U.replace(/^!/,"");if(!M||!Jo(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];i.value[I]=i.value[I]||[],i.value[I].push(C),Ye("Added node to conditional collection",C)}}C.nodeType===Node.ELEMENT_NODE&&C.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(M=>x(M))}function P(C){var U;if(C.dataset&&C.dataset.moonbaseRender){const M=C.dataset.moonbaseRender;if(!M||!ki(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];t.value[I]?(t.value[I]=t.value[I].filter(V=>V!==C),Ye("Removed node from render collection",C)):Ye("Could not find node in render collection",C)}}if(C.dataset&&C.dataset.moonbaseIf){const M=(U=C.dataset.moonbaseIf)==null?void 0:U.replace(/^!/,"");if(!M||!Jo(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];i.value[I]?(i.value[I]=i.value[I].filter(V=>V!==C),Ye("Removed node from conditional collection",C)):Ye("Could not find node in conditional collection",C)}}C.nodeType===Node.ELEMENT_NODE&&C.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(M=>P(M))}Ue(()=>{e.value=new MutationObserver((U,M)=>{for(const I of U)if(I.type==="childList"){for(const V of I.addedNodes)x(V);for(const V of I.removedNodes)P(V)}else if(I.type==="attributes"&&I.attributeName){const V=I.target.getAttribute(I.attributeName);Ye(`The ${I.attributeName} attribute was modified from ${I.oldValue} to ${V}.`);const E=I.target;if(I.attributeName==="data-moonbase-render"){const O=I.oldValue;if(O){const T=O.split(".")[0];t.value[T]?(t.value[T]=t.value[T].filter(A=>A!==E),Ye("Removed node from render collection",E)):Ye("Could not find node in render collection",E)}if(!V||!ki(V))V&&console.warn(`Element has an unknown Moonbase target (${V})`,E),E.dataset.moonbaseOriginal&&(E.textContent=E.dataset.moonbaseOriginal);else if(V){const T=V==null?void 0:V.split(".")[0];t.value[T]=t.value[T]||[],t.value[T].includes(E)||t.value[T].push(E),Ye("Added node to render collection",E)}}if(I.attributeName==="data-moonbase-if"){const O=I.oldValue;if(O){const A=O.replace(/^!/,"").split(".")[0];i.value[A]?(i.value[A]=i.value[A].filter(R=>R!==E),Ye("Removed node from conditional collection",E)):Ye("Could not find node in conditional collection",E)}const T=V==null?void 0:V.replace(/^!/,"");if(!T||!Jo(T))V&&console.warn(`Element has an unknown Moonbase target (${V})`,E),E.dataset.moonbaseOriginalHidden==="true"&&(E.hidden=!0);else{const A=T.split(".")[0];i.value[A]=i.value[A]||[],i.value[A].includes(E)||i.value[A].push(E),Ye("Added node to conditional collection",E)}}}else Ye(`A ${I.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(U=>x(U))}),jt(()=>e.value&&e.value.disconnect())}const xi=/\?mb_intent=\w+/;function T_(){const e=j(null);function t(r){const o=r.currentTarget,s=o.getAttribute("href");if(Ye("Link was clicked:",o,s,pl),o.tagName==="A"&&s&&xi.test(s)){r.preventDefault(),r.stopPropagation();const i=new URLSearchParams(s.slice(s.indexOf("?"))),a=i.get("mb_intent");if(a&&Object.values(W).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,c])=>[u.substring(3),c]));if(a===W.Checkout&&l.complete)return;Ye("Parsed intent, invoking..",a,l),pl[a](l)}}}function n(r){if(r.nodeType===Node.ELEMENT_NODE){if(r.dataset.moonbaseButton){Ye(`Link ${r.dataset.moonbaseButton} is already registered, making sure the event listener is still there, element:`,r),r.addEventListener("click",t);return}try{const o=r.getAttribute("href");if(r.tagName==="A"&&o&&xi.test(o)){const s=crypto.randomUUID().slice(0,8);Ye(`Adding event listener for link ${s} to element:`,r),r.addEventListener("click",t),r.dataset.moonbaseButton=s}r.querySelectorAll('a[href*="?mb_intent="]').forEach(s=>n(s))}catch(o){console.warn("Could not add Moonbase listener to link",r,o)}}}Ue(()=>{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);Ye(`The ${i.attributeName} attribute was modified from ${i.oldValue} to ${a}.`);const l=i.target;i.attributeName==="href"&&(i.oldValue&&xi.test(i.oldValue)&&(!a||!xi.test(a))?l.removeEventListener("click",t):a&&xi.test(a)&&n(l))}else Ye(`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="]').forEach(o=>n(o))}),jt(()=>e.value&&e.value.disconnect())}const{min:I_,max:D_}=Math,_o=(e,t=0,n=1)=>I_(D_(t,e),n),Gu=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]=_o(e[t],0,255)):t===3&&(e[t]=_o(e[t],0,1));return e},Rp={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Rp[`[object ${e}]`]=e.toLowerCase();function $e(e){return Rp[Object.prototype.toString.call(e)]||"object"}const Pe=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):$e(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),es=e=>{if(e.length<2)return null;const t=e.length-1;return $e(e[t])=="string"?e[t].toLowerCase():null},{PI:Ga,min:jp,max:Up}=Math,ln=e=>Math.round(e*100)/100,Qu=e=>Math.round(e*100)/100,ur=Ga*2,Xu=Ga/3,$_=Ga/180,M_=180/Ga;function Bp(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Se={format:{},autodetect:[]};class J{constructor(...t){const n=this;if($e(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=es(t),o=!1;if(!r){o=!0,Se.sorted||(Se.autodetect=Se.autodetect.sort((s,i)=>i.p-s.p),Se.sorted=!0);for(let s of Se.autodetect)if(r=s.test(...t),r)break}if(Se.format[r]){const s=Se.format[r].apply(null,o?t:t.slice(0,-1));n._rgb=Gu(s)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return $e(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const V_="3.1.2",Te=(...e)=>new J(...e);Te.version=V_;const ts={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"},L_=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,R_=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Fp=e=>{if(e.match(L_)){(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(R_)){(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:Qa}=Math,Hp=(...e)=>{let[t,n,r,o]=Pe(e,"rgba"),s=es(e)||"auto";o===void 0&&(o=1),s==="auto"&&(s=o<1?"rgba":"rgb"),t=Qa(t),n=Qa(n),r=Qa(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+Qa(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}`}};J.prototype.name=function(){const e=Hp(this._rgb,"rgb");for(let t of Object.keys(ts))if(ts[t]===e)return t.toLowerCase();return e},Se.format.named=e=>{if(e=e.toLowerCase(),ts[e])return Fp(ts[e]);throw new Error("unknown color name: "+e)},Se.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&ts[e.toLowerCase()])return"named"}}),J.prototype.alpha=function(e,t=!1){return e!==void 0&&$e(e)==="number"?t?(this._rgb[3]=e,this):new J([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},J.prototype.clipped=function(){return this._rgb._clipped||!1};const qn={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}},j_=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 cr(e){const t=j_.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);qn.labWhitePoint=e,qn.Xn=t[0],qn.Zn=t[1]}function Ai(){return qn.labWhitePoint}const Ju=(...e)=>{e=Pe(e,"lab");const[t,n,r]=e,[o,s,i]=U_(t,n,r),[a,l,u]=qp(o,s,i);return[a,l,u,e.length>3?e[3]:1]},U_=(e,t,n)=>{const{kE:r,kK:o,kKE:s,Xn:i,Yn:a,Zn:l}=qn,u=(e+16)/116,c=.002*t+u,d=u-.005*n,f=c*c*c,h=d*d*d,m=f>r?f:(116*c-16)/o,y=e>s?Math.pow((e+16)/116,3):e/o,x=h>r?h:(116*d-16)/o,P=m*i,C=y*a,U=x*l;return[P,C,U]},ec=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},qp=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:o,MtxXYZ2RGB:s,RefWhiteRGB:i,Xn:a,Yn:l,Zn:u}=qn,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,m=i.X*r.m01+i.Y*r.m11+i.Z*r.m21,y=i.X*r.m02+i.Y*r.m12+i.Z*r.m22,x=(e*r.m00+t*r.m10+n*r.m20)*(h/c),P=(e*r.m01+t*r.m11+n*r.m21)*(m/d),C=(e*r.m02+t*r.m12+n*r.m22)*(y/f),U=x*o.m00+P*o.m10+C*o.m20,M=x*o.m01+P*o.m11+C*o.m21,I=x*o.m02+P*o.m12+C*o.m22,V=ec(U*s.m00+M*s.m10+I*s.m20),E=ec(U*s.m01+M*s.m11+I*s.m21),O=ec(U*s.m02+M*s.m12+I*s.m22);return[V*255,E*255,O*255]},tc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=zp(t,n,r),[l,u,c]=B_(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function B_(e,t,n){const{Xn:r,Yn:o,Zn:s,kE:i,kK:a}=qn,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 nc(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 zp=(e,t,n)=>{e=nc(e/255),t=nc(t/255),n=nc(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:o,MtxAdaptMaI:s,Xn:i,Yn:a,Zn:l,As:u,Bs:c,Cs:d}=qn;let f=e*r.m00+t*r.m10+n*r.m20,h=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22;const y=i*o.m00+a*o.m10+l*o.m20,x=i*o.m01+a*o.m11+l*o.m21,P=i*o.m02+a*o.m12+l*o.m22;let C=f*o.m00+h*o.m10+m*o.m20,U=f*o.m01+h*o.m11+m*o.m21,M=f*o.m02+h*o.m12+m*o.m22;return C*=y/u,U*=x/c,M*=P/d,f=C*s.m00+U*s.m10+M*s.m20,h=C*s.m01+U*s.m11+M*s.m21,m=C*s.m02+U*s.m12+M*s.m22,[f,h,m]};J.prototype.lab=function(){return tc(this._rgb)},Object.assign(Te,{lab:(...e)=>new J(...e,"lab"),getLabWhitePoint:Ai,setLabWhitePoint:cr}),Se.format.lab=Ju,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"lab"),$e(e)==="array"&&e.length===3)return"lab"}}),J.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=qn.Kn*e,new J(n,"lab").alpha(t.alpha(),!0)},J.prototype.brighten=function(e=1){return this.darken(-e)},J.prototype.darker=J.prototype.darken,J.prototype.brighter=J.prototype.brighten,J.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:F_}=Math,H_=1e-7,q_=20;J.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&$e(e)==="number"){if(e===0)return new J([0,0,0,this._rgb[3]],"rgb");if(e===1)return new J([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=q_;const o=(i,a)=>{const l=i.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)<H_||!r--?l:u>e?o(i,l):o(l,a)},s=(n>e?o(new J([0,0,0]),this):o(this,new J([255,255,255]))).rgb();return new J([...s,this._rgb[3]])}return z_(...this._rgb.slice(0,3))};const z_=(e,t,n)=>(e=rc(e),t=rc(t),n=rc(n),.2126*e+.7152*t+.0722*n),rc=e=>(e/=255,e<=.03928?e/12.92:F_((e+.055)/1.055,2.4)),It={},ns=(e,t,n=.5,...r)=>{let o=r[0]||"lrgb";if(!It[o]&&!r.length&&(o=Object.keys(It)[0]),!It[o])throw new Error(`interpolation mode ${o} is not defined`);return $e(e)!=="object"&&(e=new J(e)),$e(t)!=="object"&&(t=new J(t)),It[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};J.prototype.mix=J.prototype.interpolate=function(e,t=.5,...n){return ns(this,e,t,...n)},J.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 J([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:W_,cos:Z_}=Math,Wp=(...e)=>{let[t,n,r]=Pe(e,"lch");return isNaN(r)&&(r=0),r=r*$_,[t,Z_(r)*n,W_(r)*n]},oc=(...e)=>{e=Pe(e,"lch");const[t,n,r]=e,[o,s,i]=Wp(t,n,r),[a,l,u]=Ju(o,s,i);return[a,l,u,e.length>3?e[3]:1]},Y_=(...e)=>{const t=Bp(Pe(e,"hcl"));return oc(...t)},{sqrt:K_,atan2:G_,round:Q_}=Math,Zp=(...e)=>{const[t,n,r]=Pe(e,"lab"),o=K_(n*n+r*r);let s=(G_(r,n)*M_+360)%360;return Q_(o*1e4)===0&&(s=Number.NaN),[t,o,s]},sc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=tc(t,n,r),[l,u,c]=Zp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};J.prototype.lch=function(){return sc(this._rgb)},J.prototype.hcl=function(){return Bp(sc(this._rgb))},Object.assign(Te,{lch:(...e)=>new J(...e,"lch"),hcl:(...e)=>new J(...e,"hcl")}),Se.format.lch=oc,Se.format.hcl=Y_,["lch","hcl"].forEach(e=>Se.autodetect.push({p:2,test:(...t)=>{if(t=Pe(t,e),$e(t)==="array"&&t.length===3)return e}})),J.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=qn.Kn*e,n[1]<0&&(n[1]=0),new J(n,"lch").alpha(t.alpha(),!0)},J.prototype.desaturate=function(e=1){return this.saturate(-e)},J.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($e(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($e(t)==="number")s[i]=t;else throw new Error("unsupported value for Color.set");const a=new J(s,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${o} in mode ${r}`)}else return s},J.prototype.tint=function(e=.5,...t){return ns(this,"white",e,...t)},J.prototype.shade=function(e=.5,...t){return ns(this,"black",e,...t)};const X_=(e,t,n)=>{const r=e._rgb,o=t._rgb;return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"rgb")};It.rgb=X_;const{sqrt:ic,pow:rs}=Math,J_=(e,t,n)=>{const[r,o,s]=e._rgb,[i,a,l]=t._rgb;return new J(ic(rs(r,2)*(1-n)+rs(i,2)*n),ic(rs(o,2)*(1-n)+rs(a,2)*n),ic(rs(s,2)*(1-n)+rs(l,2)*n),"rgb")};It.lrgb=J_;const e2=(e,t,n)=>{const r=e.lab(),o=t.lab();return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"lab")};It.lab=e2;const os=(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,m,y;return!isNaN(i)&&!isNaN(a)?(a>i&&a-i>180?y=a-(i+360):a<i&&i-a>180?y=a+360-i:y=a-i,h=i+n*y):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)),m=c+n*(d-c),r==="oklch"?new J([m,f,h],r):new J([h,f,m],r)},Yp=(e,t,n)=>os(e,t,n,"lch");It.lch=Yp,It.hcl=Yp;const t2=e=>{if($e(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)},n2=(...e)=>{const[t,n,r]=Pe(e,"rgb");return(t<<16)+(n<<8)+r};J.prototype.num=function(){return n2(this._rgb)},Object.assign(Te,{num:(...e)=>new J(...e,"num")}),Se.format.num=t2,Se.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&$e(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const r2=(e,t,n)=>{const r=e.num(),o=t.num();return new J(r+n*(o-r),"num")};It.num=r2;const{floor:o2}=Math,s2=(...e)=>{e=Pe(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=o2(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]},i2=(...e)=>{const[t,n,r]=Pe(e,"rgb"),o=jp(t,n,r),s=Up(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]};J.prototype.hcg=function(){return i2(this._rgb)};const a2=(...e)=>new J(...e,"hcg");Te.hcg=a2,Se.format.hcg=s2,Se.autodetect.push({p:1,test:(...e)=>{if(e=Pe(e,"hcg"),$e(e)==="array"&&e.length===3)return"hcg"}});const l2=(e,t,n)=>os(e,t,n,"hcg");It.hcg=l2;const{cos:ss}=Math,u2=(...e)=>{e=Pe(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*ss(ur*t)/ss(Xu-ur*t))/3,s=1-(i+o)):t<2/3?(t-=1/3,o=(1-n)/3,s=(1+n*ss(ur*t)/ss(Xu-ur*t))/3,i=1-(o+s)):(t-=2/3,s=(1-n)/3,i=(1+n*ss(ur*t)/ss(Xu-ur*t))/3,o=1-(s+i)),o=_o(r*o*3),s=_o(r*s*3),i=_o(r*i*3),[o*255,s*255,i*255,e.length>3?e[3]:1]},{min:c2,sqrt:d2,acos:f2}=Math,h2=(...e)=>{let[t,n,r]=Pe(e,"rgb");t/=255,n/=255,r/=255;let o;const s=c2(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/=d2((t-n)*(t-n)+(t-r)*(n-r)),o=f2(o),r>n&&(o=ur-o),o/=ur),[o*360,a,i]};J.prototype.hsi=function(){return h2(this._rgb)};const p2=(...e)=>new J(...e,"hsi");Te.hsi=p2,Se.format.hsi=u2,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsi"),$e(e)==="array"&&e.length===3)return"hsi"}});const m2=(e,t,n)=>os(e,t,n,"hsi");It.hsi=m2;const ac=(...e)=>{e=Pe(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]},Kp=(...e)=>{e=Pe(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const o=jp(t,n,r),s=Up(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]};J.prototype.hsl=function(){return Kp(this._rgb)};const g2=(...e)=>new J(...e,"hsl");Te.hsl=g2,Se.format.hsl=ac,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsl"),$e(e)==="array"&&e.length===3)return"hsl"}});const b2=(e,t,n)=>os(e,t,n,"hsl");It.hsl=b2;const{floor:v2}=Math,y2=(...e)=>{e=Pe(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=v2(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:w2,max:_2}=Math,E2=(...e)=>{e=Pe(e,"rgb");let[t,n,r]=e;const o=w2(t,n,r),s=_2(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]};J.prototype.hsv=function(){return E2(this._rgb)};const k2=(...e)=>new J(...e,"hsv");Te.hsv=k2,Se.format.hsv=y2,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsv"),$e(e)==="array"&&e.length===3)return"hsv"}});const x2=(e,t,n)=>os(e,t,n,"hsv");It.hsv=x2;function Xa(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 lc=(...e)=>{e=Pe(e,"lab");const[t,n,r,...o]=e,[s,i,a]=A2([t,n,r]),[l,u,c]=qp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function A2(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=Xa(n,e);return Xa(t,r.map(o=>o**3))}const uc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),s=zp(t,n,r);return[...C2(s),...o.length>0&&o[0]<1?[o[0]]:[]]};function C2(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=Xa(t,e);return Xa(n,r.map(o=>Math.cbrt(o)))}J.prototype.oklab=function(){return uc(this._rgb)},Object.assign(Te,{oklab:(...e)=>new J(...e,"oklab")}),Se.format.oklab=lc,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"oklab"),$e(e)==="array"&&e.length===3)return"oklab"}});const O2=(e,t,n)=>{const r=e.oklab(),o=t.oklab();return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"oklab")};It.oklab=O2;const S2=(e,t,n)=>os(e,t,n,"oklch");It.oklch=S2;const{pow:cc,sqrt:dc,PI:fc,cos:Gp,sin:Qp,atan2:N2}=Math,P2=(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 J(d)),t==="lrgb")return T2(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*fc;l+=Gp(f)*n[0],u+=Qp(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 m=0;m<i.length;m++)if(!isNaN(h[m]))if(a[m]+=n[f+1],t.charAt(m)==="h"){const y=h[m]/180*fc;l+=Gp(y)*n[f+1],u+=Qp(y)*n[f+1]}else i[m]+=h[m]*n[f+1]});for(let d=0;d<i.length;d++)if(t.charAt(d)==="h"){let f=N2(u/a[d],l/a[d])/fc*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 J(i,t).alpha(c>.99999?1:c,!0)},T2=(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]+=cc(a[0],2)*i,r[1]+=cc(a[1],2)*i,r[2]+=cc(a[2],2)*i,r[3]+=a[3]*i}return r[0]=dc(r[0]),r[1]=dc(r[1]),r[2]=dc(r[2]),r[3]>.9999999&&(r[3]=1),new J(Gu(r))},{pow:I2}=Math;function Ja(e){let t="rgb",n=Te("#ccc"),r=0,o=[0,1],s=[],i=[0,0],a=!1,l=[],u=!1,c=0,d=1,f=!1,h={},m=!0,y=1;const x=function(E){if(E=E||["#fff","#000"],E&&$e(E)==="string"&&Te.brewer&&Te.brewer[E.toLowerCase()]&&(E=Te.brewer[E.toLowerCase()]),$e(E)==="array"){E.length===1&&(E=[E[0],E[0]]),E=E.slice(0);for(let O=0;O<E.length;O++)E[O]=Te(E[O]);s.length=0;for(let O=0;O<E.length;O++)s.push(O/(E.length-1))}return I(),l=E},P=function(E){if(a!=null){const O=a.length-1;let T=0;for(;T<O&&E>=a[T];)T++;return T-1}return 0};let C=E=>E,U=E=>E;const M=function(E,O){let T,A;if(O==null&&(O=!1),isNaN(E)||E===null)return n;O?A=E:a&&a.length>2?A=P(E)/(a.length-2):d!==c?A=(E-c)/(d-c):A=1,A=U(A),O||(A=C(A)),y!==1&&(A=I2(A,y)),A=i[0]+A*(1-i[0]-i[1]),A=_o(A,0,1);const R=Math.floor(A*1e4);if(m&&h[R])T=h[R];else{if($e(l)==="array")for(let B=0;B<s.length;B++){const q=s[B];if(A<=q){T=l[B];break}if(A>=q&&B===s.length-1){T=l[B];break}if(A>q&&A<s[B+1]){A=(A-q)/(s[B+1]-q),T=Te.interpolate(l[B],l[B+1],A,t);break}}else $e(l)==="function"&&(T=l(A));m&&(h[R]=T)}return T};var I=()=>h={};x(e);const V=function(E){const O=Te(M(E));return u&&O[u]?O[u]():O};return V.classes=function(E){if(E!=null){if($e(E)==="array")a=E,o=[E[0],E[E.length-1]];else{const O=Te.analyze(o);E===0?a=[O.min,O.max]:a=Te.limits(O,"e",E)}return V}return a},V.domain=function(E){if(!arguments.length)return o;c=E[0],d=E[E.length-1],s=[];const O=l.length;if(E.length===O&&c!==d)for(let T of Array.from(E))s.push((T-c)/(d-c));else{for(let T=0;T<O;T++)s.push(T/(O-1));if(E.length>2){const T=E.map((R,B)=>B/(E.length-1)),A=E.map(R=>(R-c)/(d-c));A.every((R,B)=>T[B]===R)||(U=R=>{if(R<=0||R>=1)return R;let B=0;for(;R>=A[B+1];)B++;const q=(R-A[B])/(A[B+1]-A[B]);return T[B]+q*(T[B+1]-T[B])})}}return o=[c,d],V},V.mode=function(E){return arguments.length?(t=E,I(),V):t},V.range=function(E,O){return x(E),V},V.out=function(E){return u=E,V},V.spread=function(E){return arguments.length?(r=E,V):r},V.correctLightness=function(E){return E==null&&(E=!0),f=E,I(),f?C=function(O){const T=M(0,!0).lab()[0],A=M(1,!0).lab()[0],R=T>A;let B=M(O,!0).lab()[0];const q=T+(A-T)*O;let be=B-q,pe=0,he=1,oe=20;for(;Math.abs(be)>.01&&oe-- >0;)(function(){return R&&(be*=-1),be<0?(pe=O,O+=(he-O)*.5):(he=O,O+=(pe-O)*.5),B=M(O,!0).lab()[0],be=B-q})();return O}:C=O=>O,V},V.padding=function(E){return E!=null?($e(E)==="number"&&(E=[E,E]),i=E,V):i},V.colors=function(E,O){arguments.length<2&&(O="hex");let T=[];if(arguments.length===0)T=l.slice(0);else if(E===1)T=[V(.5)];else if(E>1){const A=o[0],R=o[1]-A;T=D2(0,E).map(B=>V(A+B/(E-1)*R))}else{e=[];let A=[];if(a&&a.length>2)for(let R=1,B=a.length,q=1<=B;q?R<B:R>B;q?R++:R--)A.push((a[R-1]+a[R])*.5);else A=o;T=A.map(R=>V(R))}return Te[O]&&(T=T.map(A=>A[O]())),T},V.cache=function(E){return E!=null?(m=E,V):m},V.gamma=function(E){return E!=null?(y=E,V):y},V.nodata=function(E){return E!=null?(n=Te(E),V):n},V}function D2(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 $2=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},M2=function(e){let t,n,r,o;if(e=e.map(s=>new J(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 J(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 J(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 J(a,"lab")}}else if(e.length>=5){let s,i,a;s=e.map(l=>l.lab()),a=e.length-1,i=$2(a),t=function(l){const u=1-l,c=[0,1,2].map(d=>s.reduce((f,h,m)=>f+i[m]*u**(a-m)*l**m*h[d],0));return new J(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},V2=e=>{const t=M2(e);return t.scale=()=>Ja(t),t},{round:Xp}=Math;J.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Xp)},J.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:Xp(t):t)},Object.assign(Te,{rgb:(...e)=>new J(...e,"rgb")}),Se.format.rgb=(...e)=>{const t=Pe(e,"rgba");return t[3]===void 0&&(t[3]=1),t},Se.autodetect.push({p:3,test:(...e)=>{if(e=Pe(e,"rgba"),$e(e)==="array"&&(e.length===3||e.length===4&&$e(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Sn=(e,t,n)=>{if(!Sn[n])throw new Error("unknown blend mode "+n);return Sn[n](e,t)},Ur=e=>(t,n)=>{const r=Te(n).rgb(),o=Te(t).rgb();return Te.rgb(e(r,o))},Br=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},L2=e=>e,R2=(e,t)=>e*t/255,j2=(e,t)=>e>t?t:e,U2=(e,t)=>e>t?e:t,B2=(e,t)=>255*(1-(1-e/255)*(1-t/255)),F2=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),H2=(e,t)=>255*(1-(1-t/255)/(e/255)),q2=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);Sn.normal=Ur(Br(L2)),Sn.multiply=Ur(Br(R2)),Sn.screen=Ur(Br(B2)),Sn.overlay=Ur(Br(F2)),Sn.darken=Ur(Br(j2)),Sn.lighten=Ur(Br(U2)),Sn.dodge=Ur(Br(q2)),Sn.burn=Ur(Br(H2));const{pow:z2,sin:W2,cos:Z2}=Math;function Y2(e=300,t=-1.5,n=1,r=1,o=[0,1]){let s=0,i;$e(o)==="array"?i=o[1]-o[0]:(i=0,o=[o,o]);const a=function(l){const u=ur*((e+120)/360+t*l),c=z2(o[0]+i*l,r),f=(s!==0?n[0]+l*s:n)*c*(1-c)/2,h=Z2(u),m=W2(u),y=c+f*(-.14861*h+1.78277*m),x=c+f*(-.29227*h-.90649*m),P=c+f*(1.97294*h);return Te(Gu([y*255,x*255,P*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,$e(n)==="array"?(s=n[1]-n[0],s===0&&(n=n[1])):s=0,a)},a.lightness=function(l){return l==null?o:($e(l)==="array"?(o=l,i=l[1]-l[0]):(o=[l,l],i=0),a)},a.scale=()=>Te.scale(a),a.hue(n),a}const K2="0123456789abcdef",{floor:G2,random:Q2}=Math,X2=()=>{let e="#";for(let t=0;t<6;t++)e+=K2.charAt(G2(Q2()*16));return new J(e,"hex")},{log:Jp,pow:J2,floor:eE,abs:tE}=Math;function em(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return $e(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&$e(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)=>tm(n,r,o),n}function tm(e,t="equal",n=7){$e(e)=="array"&&(e=em(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*Jp(r),l=Math.LOG10E*Jp(o);i.push(r);for(let u=1;u<n;u++)i.push(J2(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=eE(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 x=1;x<n;x++)h.push(r+x/n*(o-r));for(h.push(o);d;){for(let P=0;P<n;P++)c[P]=0;for(let P=0;P<l;P++){const C=s[P];let U=Number.MAX_VALUE,M;for(let I=0;I<n;I++){const V=tE(h[I]-C);V<U&&(U=V,M=I),c[M]++,u[P]=M}}const x=new Array(n);for(let P=0;P<n;P++)x[P]=null;for(let P=0;P<l;P++)a=u[P],x[a]===null?x[a]=s[P]:x[a]+=s[P];for(let P=0;P<n;P++)x[P]*=1/c[P];d=!1;for(let P=0;P<n;P++)if(x[P]!==h[P]){d=!0;break}h=x,f++,f>200&&(d=!1)}const m={};for(let x=0;x<n;x++)m[x]=[];for(let x=0;x<l;x++)a=u[x],m[a].push(s[x]);let y=[];for(let x=0;x<n;x++)y.push(m[x][0]),y.push(m[x][m[x].length-1]);y=y.sort((x,P)=>x-P),i.push(y[0]);for(let x=1;x<y.length;x+=2){const P=y[x];!isNaN(P)&&i.indexOf(P)===-1&&i.push(P)}}return i}const nE=(e,t)=>{e=new J(e),t=new J(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};/**
23
+ `));const f=dp(c.props??{},i,l),h=xn(c,f,!0);for(const m in f)m.startsWith("on")&&(h.props||(h.props={}),h.props[m]=f[m]);return h}return Array.isArray(a)&&a.length===1?a[0]:a}return ft(s,Object.assign({},i,l),{default:()=>a})}function cp(e){return e.flatMap(t=>t.type===de?cp(t.children):[t])}function dp(...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 Vu(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function B1(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var bi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(bi||{});let vi=le({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 Tt({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function F1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function De(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Ko(e){if(mi.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e&&Object.prototype.hasOwnProperty.call(e,"value")){const t=De(e);if(t)return t.ownerDocument}return document}const qa=["[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 vt=(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))(vt||{}),Go=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Go||{});function H1(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(qa)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var fp=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(fp||{});function q1(e,t=0){var n;return e===((n=Ko(e))==null?void 0:n.body)?!1:en(t,{0(){return e.matches(qa)},1(){let r=e;for(;r!==null;){if(r.matches(qa))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 go(e){e==null||e.focus({preventScroll:!0})}const z1=["textarea","input"].join(",");function W1(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,z1))??!1}function Qo(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 Hn(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?Qo(e):e:H1(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&&W1(f)&&f.select(),2}let bo=[];F1(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||bo[0]===t.target)return;let n=t.target;n=n.closest(qa),bo.unshift(n??t.target),bo=bo.filter(r=>r!=null&&r.isConnected),bo.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 za(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function hp(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=De(n);r instanceof HTMLElement&&t.add(r)}return t}var pp=(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))(pp||{});const yi=Object.assign(le({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:j(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=j(null);r({el:o,$el:o});const s=Z(()=>Ko(o)),i=j(!1);Ue(()=>i.value=!0),jt(()=>i.value=!1),Y1({ownerDocument:s},Z(()=>i.value&&!!(e.features&16)));const a=K1({ownerDocument:s,container:o,initialFocus:Z(()=>e.initialFocus)},Z(()=>i.value&&!!(e.features&2)));G1({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Z(()=>i.value&&!!(e.features&8)));const l=U1();function u(h){const m=De(o);if(!m)return;(x=>x())(()=>{en(l.value,{[gi.Forwards]:()=>{Hn(m,vt.First,{skipElements:[h.relatedTarget]})},[gi.Backwards]:()=>{Hn(m,vt.Last,{skipElements:[h.relatedTarget]})}})})}const c=j(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!i.value)return;const m=hp(e.containers);De(o)instanceof HTMLElement&&m.add(De(o));const y=h.relatedTarget;y instanceof HTMLElement&&y.dataset.moonbaseFocusGuard!=="true"&&(mp(m,y)||(c.value?Hn(De(o),en(l.value,{[gi.Forwards]:()=>vt.Next,[gi.Backwards]:()=>vt.Previous})|vt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&go(h.target)))}return()=>{const h={},m={ref:o,onKeydown:d,onFocusout:f},{features:y,initialFocus:x,containers:P,...C}=e;return ft(de,[!!(y&4)&&ft(vi,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:bi.Focusable}),Tt({ourProps:m,theirProps:{...t,...C},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(y&4)&&ft(vi,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:u,features:bi.Focusable})])}}}),{features:pp});function Z1(e){const t=j(bo.slice());return Ze([e],([n],[r])=>{r===!0&&n===!1?za(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=bo.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Y1({ownerDocument:e},t){const n=Z1(t);Ue(()=>{Xt(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&go(n())},{flush:"post"})}),jt(()=>{t.value&&go(n())})}function K1({ownerDocument:e,container:t,initialFocus:n},r){const o=j(null),s=j(!1);return Ue(()=>s.value=!0),jt(()=>s.value=!1),Ue(()=>{Ze([t,n,r],(i,a)=>{if(i.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;const l=De(t);l&&za(()=>{var d,f;if(!s.value)return;const u=De(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?go(u):Hn(l,vt.First|vt.NoScroll)===Go.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 G1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;lp((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=hp(n);De(t)instanceof HTMLElement&&a.add(De(t));const l=r.value;if(!l)return;const u=i.target;u&&u instanceof HTMLElement?mp(a,u)?(r.value=u,go(u)):(i.preventDefault(),i.stopPropagation(),go(l)):go(r.value)},!0)}function mp(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Q1(e){const t=db(e.getSnapshot());return jt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function wi(){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 za(()=>{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=wi();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 X1(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 J1(){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 gp(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ew(){return/Android/gi.test(window.navigator.userAgent)}function tw(){return gp()||ew()}function nw(){return gp()?{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=wi();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 rw(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ow(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const vo=X1(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:wi(),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:ow(n)},o=[nw(),J1(),rw()];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)}});vo.subscribe(()=>{const e=vo.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)&&vo.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&vo.dispatch("TEARDOWN",n)}});function sw(e,t,n){const r=Q1(vo),o=Z(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ze([e,t],([s,i],[a],l)=>{if(!s||!i)return;vo.dispatch("PUSH",s,n);let u=!1;l(()=>{u||(vo.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),o}let iw=0;function aw(){return++iw}function yo(){return aw()}const Lu=new Map,_i=new Map;function bp(e,t=j(!0)){Xt(n=>{if(!t.value)return;const r=De(e);if(!r)return;n(()=>{if(!r)return;const s=_i.get(r)??1;if(s===1?_i.delete(r):_i.set(r,s-1),s!==1)return;const i=Lu.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,Lu.delete(r))});const o=_i.get(r)??0;_i.set(r,o+1),o===0&&(Lu.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Ei(e,t,n,r){mi.isServer||Xt(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const vp=30;function lw(e,t,n=Z(()=>!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:De(c);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!q1(l,fp.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=j(null);Ei(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),Ei(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),Ei(n,"click",i=>{tw()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Ei(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Ei(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=vp||Math.abs(a.y-s.y)>=vp))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),up(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function uw({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=j(null),o=Ko(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(De(r))||u.contains((l=(a=De(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:ft(vi,{features:bi.Hidden,ref:r})}}}let yp=Symbol("Context");var tn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(tn||{});function cw(){return Ru()!==null}function Ru(){return fe(yp,null)}function dw(e){Yt(yp,e)}const wp=Symbol("ForcePortalRootContext");function fw(){return fe(wp,!1)}const _p=le({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Yt(wp,e.force),()=>{const{force:r,...o}=e;return Tt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let Ep=Symbol("StackContext");var ju=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(ju||{});function hw(){return fe(Ep,()=>{})}function pw({type:e,enabled:t,element:n,onUpdate:r}){let o=hw();function s(...i){r==null||r(...i),o(...i)}Ue(()=>{Ze(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),jt(()=>{t.value&&s(1,e,n)}),Yt(Ep,s)}var an=(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))(an||{});let mw=Symbol("DescriptionContext");function gw({slot:e=j({}),name:t="Description",props:n={}}={}){let r=j([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return Yt(mw,{register:o,slot:e,name:t,props:n}),Z(()=>r.value.length>0?r.value.join(" "):void 0)}function kp(e){const t=Ko(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 Uu=Symbol("PortalParentContext"),xp=Symbol("PortalGroupContext"),bw=le({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=j(null),o=fw(),s=fe(xp,null),i=j(o===!0||s==null?kp(r.value):s.resolveTarget()),a=j(!1);Ue(()=>{a.value=!0}),Xt(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=fe(Uu,null);let u=!1;const c=Pa();return Ze(r,()=>{if(u||!l)return;const d=De(r);d&&(jt(l.register(d),c),u=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return ft(Bb,{to:i.value},Tt({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});function vw(){const e=fe(Uu,null),t=j([]);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,le({name:"PortalWrapper",setup(s,{slots:i}){return Yt(Uu,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}const yw=le({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=qs({resolveTarget(){return e.target}});return Yt(xp,r),()=>{const{target:o,...s}=e;return Tt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Bu=Symbol("DialogContext");function Fu(e){const t=fe(Bu,null);if(t===null)throw new Error(`<${e} /> is missing a parent <Dialog /> component.`);return t}const Wa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",ww=le({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:Wa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${yo()}`},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 Be;const s=j(!1);Ue(()=>{s.value=!0});let i=!1;const a=Z(()=>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=j(0),u=Ru(),c=Z(()=>e.open===Wa&&u!==null?(u.value&tn.Open)===tn.Open:e.open),d=j(null),f=Z(()=>Ko(d));if(o({el:d,$el:d}),!(e.open!==Wa||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===Wa?void 0:e.open}`);const m=Z(()=>s.value&&c.value?0:1),y=Z(()=>m.value===0),x=j(null),P={titleId:x,panelRef:j(null),dialogState:m,setTitleId(Qe){x.value!==Qe&&(x.value=Qe)},close(){t("close",!1)}},C=Z(()=>l.value>1),U=fe(Bu,null)!==null,[M,I]=vw(),{resolveContainers:V,mainTreeNodeRef:E,MainTreeNode:O}=uw({portals:M,defaultContainers:[Z(()=>P.panelRef.value??d.value)]}),T=Z(()=>C.value?"parent":"leaf"),A=Z(()=>u!==null?(u.value&tn.Closing)===tn.Closing:!1),R=Z(()=>!e.makeInert||U||A.value?!1:y.value),B=Z(()=>{var Qe;return Array.from(((Qe=f.value)==null?void 0:Qe.querySelectorAll("body > *"))??[]).find(ot=>ot.id==="moonbase"?!1:ot.contains(De(E))&&ot instanceof HTMLElement)??null});bp(B,R);const q=Z(()=>C.value?!0:y.value),be=Z(()=>{var Qe;return Array.from(((Qe=f.value)==null?void 0:Qe.querySelectorAll("[data-moonbase-portal]"))??[]).find(ot=>ot.contains(De(E))&&ot instanceof HTMLElement)??null});bp(be,q),pw({type:"Dialog",enabled:Z(()=>m.value===0),element:d,onUpdate:(Qe,ot)=>{if(ot==="Dialog")return en(Qe,{[ju.Add]:()=>l.value+=1,[ju.Remove]:()=>l.value-=1})}});const pe=gw({name:"DialogDescription",slot:Z(()=>({open:c.value}))});Yt(Bu,P);const he=Z(()=>!(!y.value||C.value));lw(V,(Qe,ot)=>{Qe.preventDefault(),P.close(),ma(()=>ot==null?void 0:ot.focus())},he);const oe=Z(()=>!(C.value||m.value!==0));lp((Be=f.value)==null?void 0:Be.defaultView,"keydown",Qe=>{oe.value&&(Qe.defaultPrevented||Qe.key===an.Escape&&(Qe.preventDefault(),Qe.stopPropagation(),P.close()))});const ue=Z(()=>!(!e.lockScroll||A.value||m.value!==0||U));return sw(f,ue,Qe=>({containers:[...Qe.containers??[],V]})),Xt(Qe=>{if(m.value!==0)return;const ot=De(d);if(!ot)return;const $t=new ResizeObserver(wt=>{for(const gr of wt){const qr=gr.target.getBoundingClientRect();qr.x===0&&qr.y===0&&qr.width===0&&qr.height===0&&P.close()}});$t.observe(ot),Qe(()=>$t.disconnect())}),()=>{const{id:Qe,open:ot,initialFocus:$t,...wt}=e,gr={...n,ref:d,id:Qe,role:a.value,"aria-modal":m.value===0?!0:void 0,"aria-labelledby":x.value,"aria-describedby":pe.value},qr={open:m.value===0};return ft(_p,{force:!0},()=>[ft(bw,()=>ft(yw,{target:d.value},()=>ft(_p,{force:!1},()=>ft(yi,{initialFocus:$t,containers:V,features:y.value?en(T.value,{parent:yi.features.RestoreFocus,leaf:yi.features.All&~yi.features.FocusLock}):yi.features.None},()=>ft(I,{},()=>Tt({ourProps:gr,theirProps:{...wt,...n},slot:qr,attrs:n,slots:r,visible:m.value===0,features:Yo.RenderStrategy|Yo.Static,name:"Dialog"})))))),ft(O)])}}}),_w=le({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${yo()}`}},setup(e,{attrs:t,slots:n}){const r=Fu("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Tt({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),Ew=le({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${yo()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Fu("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 Tt({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),Ap=le({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${yo()}`}},setup(e,{attrs:t,slots:n}){const r=Fu("DialogTitle");return Ue(()=>{r.setTitleId(e.id),jt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Tt({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Cp(e,t){if(e)return e;const n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function kw(e,t){const n=j(Cp(e.value.type,e.value.as));return Ue(()=>{n.value=Cp(e.value.type,e.value.as)}),Xt(()=>{var r;n.value||De(t)&&De(t)instanceof HTMLButtonElement&&!((r=De(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}let xw=le({props:{onFocus:{type:Function,required:!0}},setup(e){let t=j(!0);return()=>t.value?ft(vi,{as:"button",type:"button",features:bi.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 Op=Symbol("TabsContext");function Za(e){const t=fe(Op,null);if(t===null)throw new Error(`<${e} /> is missing a parent <TabGroup /> component.`);return t}const Hu=Symbol("TabsSSRContext"),Aw=le({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=j(e.selectedIndex??e.defaultIndex),s=j([]),i=j([]),a=Z(()=>e.selectedIndex!==null),l=Z(()=>a.value?e.selectedIndex:o.value),u={selectedIndex:Z(()=>o.value??e.defaultIndex??null),orientation:Z(()=>e.vertical?"vertical":"horizontal"),activation:Z(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(m){l.value!==m&&r("change",m),a.value||c(m)},registerTab(m){if(s.value.includes(m))return;const y=s.value[o.value];if(s.value.push(m),s.value=Qo(s.value,De),!a.value){const x=s.value.indexOf(y)??o.value;x!==-1&&(o.value=x)}},unregisterTab(m){const y=s.value.indexOf(m);y!==-1&&s.value.splice(y,1)},registerPanel(m){i.value.includes(m)||(i.value.push(m),i.value=Qo(i.value,De))},unregisterPanel(m){const y=i.value.indexOf(m);y!==-1&&i.value.splice(y,1)}};function c(m){const y=Qo(u.tabs.value,De),x=Qo(u.panels.value,De),P=y.filter(C=>{var U;return!((U=De(C))!=null&&U.hasAttribute("disabled"))});if(m<0||m>y.length-1){const C=en(o.value===null?0:Math.sign(m-o.value),{[-1]:()=>1,0:()=>en(Math.sign(m),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),U=en(C,{0:()=>y.indexOf(P[0]),1:()=>y.indexOf(P[P.length-1])});U!==-1&&(o.value=U),u.tabs.value=y,u.panels.value=x}else{const C=y.slice(0,m),M=[...y.slice(m),...C].find(V=>P.includes(V));if(!M)return;let I=y.indexOf(M)??u.selectedIndex.value;I===-1&&(I=u.selectedIndex.value),o.value=I,u.tabs.value=y,u.panels.value=x}}Yt(Op,u);const d=j({tabs:[],panels:[]}),f=j(!1);Ue(()=>{f.value=!0}),Yt(Hu,Z(()=>f.value?null:d.value));const h=Z(()=>e.selectedIndex);return Ue(()=>{Ze([h],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),Xt(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const m=Qo(u.tabs.value,De);m.some((x,P)=>De(u.tabs.value[P])!==De(x))&&u.setSelectedIndex(m.findIndex(x=>De(x)===De(u.tabs.value[l.value])))}),()=>{const m={selectedIndex:o.value};return ft(de,[s.value.length<=0&&ft(xw,{onFocus:()=>{for(const y of s.value){const x=De(y);if((x==null?void 0:x.tabIndex)===0)return x.focus(),!0}return!1}}),Tt({theirProps:{...n,...Vu(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:m,slots:t,attrs:n,name:"TabGroup"})])}}}),Cw=le({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Za("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Tt({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),Ow=le({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${yo()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Za("Tab"),s=j(null);r({el:s,$el:s}),Ue(()=>o.registerTab(s)),jt(()=>o.unregisterTab(s));const i=fe(Hu),a=Z(()=>{if(i.value){const x=i.value.tabs.indexOf(e.id);return x===-1?i.value.tabs.push(e.id)-1:x}return-1}),l=Z(()=>{const x=o.tabs.value.indexOf(s);return x===-1?a.value:x}),u=Z(()=>l.value===o.selectedIndex.value);function c(x){var C;const P=x();if(P===Go.Success&&o.activation.value==="auto"){const U=(C=Ko(s))==null?void 0:C.activeElement,M=o.tabs.value.findIndex(I=>De(I)===U);M!==-1&&o.setSelectedIndex(M)}return P}function d(x){const P=o.tabs.value.map(U=>De(U)).filter(Boolean);if(x.key===an.Space||x.key===an.Enter){x.preventDefault(),x.stopPropagation(),o.setSelectedIndex(l.value);return}switch(x.key){case an.Home:case an.PageUp:return x.preventDefault(),x.stopPropagation(),c(()=>Hn(P,vt.First));case an.End:case an.PageDown:return x.preventDefault(),x.stopPropagation(),c(()=>Hn(P,vt.Last))}if(c(()=>en(o.orientation.value,{vertical(){return x.key===an.ArrowUp?Hn(P,vt.Previous|vt.WrapAround):x.key===an.ArrowDown?Hn(P,vt.Next|vt.WrapAround):Go.Error},horizontal(){return x.key===an.ArrowLeft?Hn(P,vt.Previous|vt.WrapAround):x.key===an.ArrowRight?Hn(P,vt.Next|vt.WrapAround):Go.Error}}))===Go.Success)return x.preventDefault()}const f=j(!1);function h(){var x;f.value||(f.value=!0,!e.disabled&&((x=De(s))==null||x.focus({preventScroll:!0}),o.setSelectedIndex(l.value),za(()=>{f.value=!1})))}function m(x){x.preventDefault()}const y=kw(Z(()=>({as:e.as,type:t.type})),s);return()=>{var M;const x={selected:u.value,disabled:e.disabled??!1},{id:P,...C}=e,U={ref:s,onKeydown:d,onMousedown:m,onClick:h,id:P,role:"tab",type:y.value,"aria-controls":(M=De(o.panels.value[l.value]))==null?void 0:M.id,"aria-selected":u.value,tabIndex:u.value?0:-1,disabled:e.disabled?!0:void 0};return Tt({ourProps:U,theirProps:C,slot:x,attrs:t,slots:n,name:"Tab"})}}}),Sw=le({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Za("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Tt({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Nw=le({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-${yo()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Za("TabPanel"),s=j(null);r({el:s,$el:s}),Ue(()=>o.registerPanel(s)),jt(()=>o.unregisterPanel(s));const i=fe(Hu),a=Z(()=>{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=Z(()=>{const c=o.panels.value.indexOf(s);return c===-1?a.value:c}),u=Z(()=>l.value===o.selectedIndex.value);return()=>{var y;const c={selected:u.value},{id:d,tabIndex:f,...h}=e,m={ref:s,id:d,role:"tabpanel","aria-labelledby":(y=De(o.tabs.value[l.value]))==null?void 0:y.id,tabIndex:u.value?f:-1};return!u.value&&e.unmount&&!e.static?ft(vi,{as:"span","aria-hidden":!0,...m}):Tt({ourProps:m,theirProps:h,slot:c,attrs:t,slots:n,features:Yo.Static|Yo.RenderStrategy,visible:u.value,name:"TabPanel"})}}});function Pw(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function qu(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 Ya(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var zu=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(zu||{});function Tw(e,t){const n=wi();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 Sp(e,t,n,r,o,s){const i=wi(),a=s!==void 0?Pw(s):()=>{};return Ya(e,...o),qu(e,...t,...n),i.nextFrame(()=>{Ya(e,...n),qu(e,...r),i.add(Tw(e,l=>(Ya(e,...r,...t),qu(e,...o),a(l))))}),i.add(()=>Ya(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function wo(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Wu=Symbol("TransitionContext");function Iw(){return fe(Wu,null)!==null}function Dw(){const e=fe(Wu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Zu=Symbol("NestingContext");function $w(){const e=fe(Zu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Ka(e){return"children"in e?Ka(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Np(e){const t=j([]),n=j(!1);Ue(()=>n.value=!0),jt(()=>n.value=!1);function r(s,i=jr.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(en(i,{[jr.Unmount](){t.value.splice(a,1)},[jr.Hidden](){t.value[a].state="hidden"}}),!Ka(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,jr.Unmount)}return{children:t,register:o,unregister:r}}const Pp=Yo.RenderStrategy,Yu=le({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=j(0);function i(){s.value|=tn.Opening,t("beforeEnter")}function a(){s.value&=~tn.Opening,t("afterEnter")}function l(){s.value|=tn.Closing,t("beforeLeave")}function u(){s.value&=~tn.Closing,t("afterLeave")}if(!Iw()&&cw())return()=>ft(Tp,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);const c=j(null),d=Z(()=>e.unmount?jr.Unmount:jr.Hidden);o({el:c,$el:c});const{show:f,appear:h}=Dw(),{register:m,unregister:y}=$w(),x=j(f.value?"visible":"hidden"),P={value:!0},C=yo(),U={value:!1},M=Np(()=>{!U.value&&x.value!=="hidden"&&(x.value="hidden",y(C),u())});Ue(()=>{const q=m(C);jt(q)}),Xt(()=>{if(d.value===jr.Hidden&&C){if(f.value&&x.value!=="visible"){x.value="visible";return}en(x.value,{hidden:()=>y(C),visible:()=>m(C)})}});const I=wo(e.enter),V=wo(e.enterFrom),E=wo(e.enterTo),O=wo(e.entered),T=wo(e.leave),A=wo(e.leaveFrom),R=wo(e.leaveTo);Ue(()=>{Xt(()=>{if(x.value==="visible"){const q=De(c);if(q instanceof Comment&&q.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function B(q){const be=P.value&&!h.value,pe=De(c);!pe||!(pe instanceof HTMLElement)||be||(U.value=!0,f.value&&i(),f.value||l(),q(f.value?Sp(pe,I,V,E,O,he=>{U.value=!1,he===zu.Finished&&a()}):Sp(pe,T,A,R,O,he=>{U.value=!1,he===zu.Finished&&(Ka(M)||(x.value="hidden",y(C),u()))})))}return Ue(()=>{Ze([f],(q,be,pe)=>{B(pe),P.value=!1},{immediate:!0})}),Yt(Zu,M),dw(Z(()=>en(x.value,{visible:tn.Open,hidden:tn.Closed})|s.value)),()=>{const{appear:q,show:be,enter:pe,enterFrom:he,enterTo:oe,entered:ue,leave:Be,leaveFrom:Qe,leaveTo:ot,...$t}=e,wt={ref:c},gr={...$t,...h.value&&f.value&&mi.isServer?{class:Rs([n.class,$t.class,...I,...V])}:{}};return Tt({theirProps:gr,ourProps:wt,slot:{},slots:r,attrs:n,features:Pp,visible:x.value==="visible",name:"TransitionChild"})}}}),Mw=Yu,Tp=le({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=Ru(),s=Z(()=>e.show===null&&o!==null?(o.value&tn.Open)===tn.Open:e.show);Xt(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=j(s.value?"visible":"hidden"),a=Np(()=>{i.value="hidden"}),l=j(!0),u={show:s,appear:Z(()=>e.appear||!l.value)};return Ue(()=>{Xt(()=>{l.value=!1,s.value?i.value="visible":Ka(a)||(i.value="hidden")})}),Yt(Zu,a),Yt(Wu,u),()=>{const c=Vu(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Tt({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[ft(Mw,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:Pp,visible:i.value==="visible",name:"Transition"})}}});function Vw(e,t){return p(),_("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"},[L("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 Lw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})])}function Ip(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})])}function Ku(e,t){return p(),_("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"},[L("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 Rw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})])}function jw(e,t){return p(),_("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"},[L("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 Uw(e,t){return p(),_("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"},[L("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 Bw(e,t){return p(),_("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"},[L("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 Dp(e,t){return p(),_("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"},[L("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 Fw(e,t){return p(),_("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"},[L("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 Hw(e,t){return p(),_("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"},[L("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 qw(e,t){return p(),_("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"},[L("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 $p(e,t){return p(),_("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"},[L("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 zw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 12h14"})])}function Ww(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function Zw(e,t){return p(),_("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"},[L("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 Yw(e,t){return p(),_("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"},[L("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 Kw(e,t){return p(),_("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"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const Gw=["href","disabled","data-variant","data-size","data-corners","data-background"],Qw=["disabled","data-variant","data-size","data-corners","data-background"],Xo=le({__name:"MoonIconButton",props:{variant:{},size:{},disabled:{type:Boolean},href:{}},emits:["click"],setup(e){const t=e,n=fe(it),r=Z(()=>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?(p(),_("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},[Nt(o.$slots,"default")],8,Gw)):(p(),_("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"))},[Nt(o.$slots,"default")],8,Qw))}}}),ar=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Xw={},Jw={class:"moonbase:text-display"};function e_(e,t){return p(),_("h2",Jw,[Nt(e.$slots,"default")])}const t_=ar(Xw,[["render",e_]]),n_={},r_={class:"moonbase:text-subtitle"};function o_(e,t){return p(),_("h5",r_,[Nt(e.$slots,"default")])}const qe=ar(n_,[["render",o_]]),s_=["data-contain"],i_={class:"moonbase:drawer-header"},a_=["data-background"],l_=le({__name:"Drawer",setup(e){const t=Ce(),n=Re(),r=fe(it),o=j(""),s=j("");Ze(()=>[t.active,t.intent,t.next],([a,l,u])=>{if(s.value="",u&&(l===W.SignIn||l===W.SignUp)){const[c,d,f]=u;d===W.ConfirmEmailChange?s.value="to confirm email":d===W.RedeemVoucher?s.value="to redeem voucher":d===W.ActivateProduct?s.value="to activate product":d===W.ViewProducts?s.value="to manage products":d===W.ManageSubscription&&(s.value="to manage subscription")}switch(l){case W.ActivateProduct:o.value="Activate product";return;case W.SignIn:o.value="Sign in";return;case W.SignUp:o.value="Sign up";return;case W.ConfirmAccount:o.value="Confirm account";return;case W.ConfirmEmail:o.value="Confirm email address";return;case W.ConfirmEmailChange:o.value="Confirm email change";return;case W.ForgotPassword:o.value="Forgot password";return;case W.ResetPassword:o.value="Reset password";return}switch(a){case te.Cart:o.value="My cart";return;case te.Customer:o.value="My account";return;case te.Product:o.value="Product details";return;case te.Subscription:o.value="Subscription details";return;case te.Redeem:o.value="Redeem voucher";return}return""});function i(){if(!n.user.value)t.show(te.Authentication,W.SignIn),t.enqueue(te.Customer,W.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(te.Customer,a?W.ViewProducts:W.ViewAccount)}}return(a,l)=>(p(),H(b(Tp),{as:"template",show:b(t).active!==b(te).None},{default:k(()=>{var u,c,d;return[v(b(ww),{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:k(()=>{var f;return[L("div",{class:"moonbase:drawer-container","data-contain":!!((f=b(r))!=null&&f.target)||void 0},[v(b(Yu),{as:"template"},{default:k(()=>{var h;return[v(b(_w),{class:"moonbase:drawer-overlay","data-contain":!!((h=b(r))!=null&&h.target)||void 0},null,8,["data-contain"])]}),_:1}),v(b(Yu),{as:"template"},{default:k(()=>{var h,m;return[v(b(Ew),{class:"moonbase:drawer-panel","data-contain":!!((h=b(r))!=null&&h.target)||void 0,"data-background":(m=b(r))==null?void 0:m.theme.colors.background},{default:k(()=>{var y,x;return[L("div",i_,[b(t).history.length>0?(p(),H(Xo,{key:0,variant:"subtle",onClick:l[0]||(l[0]=P=>b(t).back())},{default:k(()=>[v(b(Lw))]),_:1})):(p(),H(Xo,{key:1,variant:"subtle",onClick:l[1]||(l[1]=P=>b(t).reset())},{default:k(()=>[v(b(Kw))]),_:1})),b(t).active===b(te).Cart&&((y=b(r))!=null&&y.auth.signIn.enabled)?(p(),H(Xo,{key:2,variant:"subtle",onClick:i},{default:k(()=>[v(b(Yw))]),_:1})):z("",!0)]),v(b(Ap),{as:t_},{default:k(()=>[N($(o.value)+" ",1),s.value?(p(),H(qe,{key:0},{default:k(()=>[N($(s.value),1)]),_:1})):z("",!0)]),_:1}),L("div",{class:"moonbase:drawer-content","data-background":(x=b(r))==null?void 0:x.theme.colors.background},[v(ui,{name:b(t).direction===b(Mu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:k(()=>[Nt(a.$slots,"default")]),_:3},8,["name"])],8,a_)]}),_:3},8,["data-contain","data-background"])]}),_:3})],8,s_)]}),_:3},8,["data-contain","make-inert","lock-scroll"])]}),_:3},8,["show"]))}}),Ht=e=>new Promise(t=>setTimeout(t,e)),u_={},c_={class:"moonbase:text-body-bold"};function d_(e,t){return p(),_("span",c_,[Nt(e.$slots,"default")])}const On=ar(u_,[["render",d_]]),f_=["data-visible","data-contain","data-location","data-corners"],h_={key:0,href:"https://moonbase.sh",target:"_blank",rel:"noopener",class:"moonbase:toolbar-action","data-action-width":"narrow"},p_=["disabled"],m_={key:0,class:"moonbase:toolbar-cart-count"},g_=le({__name:"Toolbar",setup(e){const t=j(!1),n=Ce(),r=Re(),{items:o}=Bn(),s=fe(it),i=Z(()=>(o.value??[]).reduce((l,u)=>l+u.quantity,0));Ue(()=>{Ht(100).then(()=>t.value=!0)});function a(){if(!r.user.value)n.show(te.Authentication,W.SignIn),n.enqueue(te.Customer,W.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(te.Customer,l?W.ViewProducts:W.ViewAccount)}}return(l,u)=>{var c,d,f,h,m,y;return p(),_("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(te).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?(p(),_("a",h_,u[1]||(u[1]=[ch('<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)]))):z("",!0),(h=b(s))!=null&&h.toolbar.show.account&&b(s).auth.signIn.enabled&&!b(r).user.value?(p(),_("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:a},[v(On,null,{default:k(()=>u[2]||(u[2]=[N("Log in")])),_:1,__:[2]})],8,p_)):(m=b(s))!=null&&m.toolbar.show.account?(p(),_("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:a},[v(On,null,{default:k(()=>{var x;return[N($((x=b(r).user.value)==null?void 0:x.name),1)]}),_:1})])):z("",!0),(y=b(s))!=null&&y.toolbar.show.cart?(p(),_("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:u[0]||(u[0]=x=>b(n).show(b(te).Cart,b(W).AddToCart))},[v(On,null,{default:k(()=>u[3]||(u[3]=[N(" Cart ")])),_:1,__:[3]}),i.value>0?(p(),_("span",m_,$(i.value),1)):z("",!0)])):z("",!0)],8,f_)}}});function xt(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)}}const lr=String.raw`[a-z][a-z0-9\-]+[a-z0-9](?:\.[a-z][a-z0-9\-]+[a-z0-9])*`,Mp=String.raw`[a-z][a-z0-9\-]+[a-z0-9]`,Vp="name|price|original_price|discount_name|discount_description|discount_total",Lp="price|original_price|discount_name|discount_description|discount_total",b_=/^user\.(?<property>name|email)$/,v_=/^cart\.(?<property>item_count)$/,y_=new RegExp(String.raw`^product\.(?<id>${lr})\.variation\[(?<variation>${Mp})\]\.(?<property>${Lp})$`),w_=new RegExp(String.raw`^product\.(?<id>${lr})\.(?<property>${Vp})$`),__=new RegExp(String.raw`^bundle\.(?<id>${lr})\.variation\[(?<variation>${Mp})\]\.(?<property>${Lp})$`),E_=new RegExp(String.raw`^bundle\.(?<id>${lr})\.(?<property>${Vp})$`);function ki(e){const t=b_.exec(e);if(t!=null&&t.groups)return{kind:"user",property:t.groups.property};const n=v_.exec(e);if(n!=null&&n.groups)return{kind:"cart",property:n.groups.property};const r=y_.exec(e);if(r!=null&&r.groups)return{kind:"product",id:r.groups.id,variationId:r.groups.variation,property:r.groups.property};const o=w_.exec(e);if(o!=null&&o.groups)return{kind:"product",id:o.groups.id,property:o.groups.property};const s=__.exec(e);if(s!=null&&s.groups)return{kind:"bundle",id:s.groups.id,variationId:s.groups.variation,property:s.groups.property};const i=E_.exec(e);return i!=null&&i.groups?{kind:"bundle",id:i.groups.id,property:i.groups.property}:null}const k_=/^user$/,x_=/^cart\.has_items$/,A_=new RegExp(String.raw`^cart\.(?<which>contains_product|contains_bundle)\.(?<id>${lr})$`),C_=new RegExp(String.raw`^product\.(?<id>${lr})\.(?<condition>has_discount|has_discount_description|owned)$`),O_=new RegExp(String.raw`^product\.(?<id>${lr})$`),S_=new RegExp(String.raw`^bundle\.(?<id>${lr})\.(?<condition>has_discount|has_discount_description)$`),N_=new RegExp(String.raw`^bundle\.(?<id>${lr})$`);function Jo(e){if(k_.test(e))return{kind:"user"};if(x_.test(e))return{kind:"cart",condition:"has_items"};const t=A_.exec(e);if(t!=null&&t.groups)return{kind:"cart",condition:t.groups.which,id:t.groups.id};const n=C_.exec(e);if(n!=null&&n.groups)return{kind:"product",id:n.groups.id,condition:n.groups.condition};const r=O_.exec(e);if(r!=null&&r.groups)return{kind:"product",id:r.groups.id,condition:"exists"};const o=S_.exec(e);if(o!=null&&o.groups)return{kind:"bundle",id:o.groups.id,condition:o.groups.condition};const s=N_.exec(e);return s!=null&&s.groups?{kind:"bundle",id:s.groups.id,condition:"exists"}:null}function P_(){const e=j(null),t=j({}),n=Z(()=>t.value.user||[]),r=Z(()=>t.value.cart||[]),o=Z(()=>t.value.product||[]),s=Z(()=>t.value.bundle||[]),i=j({}),a=Z(()=>i.value.user||[]),l=Z(()=>i.value.cart||[]),u=Z(()=>i.value.product||[]),c=Z(()=>i.value.bundle||[]),d=Re(),{currency:f,items:h}=Bn(),m=a1(),y=t1();Ze([n,a,d.user],([C,U,M])=>{if(C){for(const I of C)if(I.dataset.moonbaseOriginal===void 0&&(I.dataset.moonbaseOriginal=I.textContent||""),M)switch(I.dataset.moonbaseRender){case"user.name":I.textContent=M.name;break;case"user.email":I.textContent=M.email;break}else I.dataset.moonbaseOriginal?I.textContent=I.dataset.moonbaseOriginal:I.textContent="";for(const I of U)I.dataset.moonbaseOriginalHidden||(I.dataset.moonbaseOriginalHidden=I.hidden?"true":"false"),M?I.hidden=I.dataset.moonbaseIf==="!user":I.hidden=I.dataset.moonbaseIf==="user"}},{immediate:!0,deep:!0}),Ze([r,l,h],([C,U,M])=>{if(C){for(const I of C)switch(I.dataset.moonbaseOriginal===void 0&&(I.dataset.moonbaseOriginal=I.textContent||""),Ye("Rendering cart element",I),I.dataset.moonbaseRender){case"cart.item_count":I.textContent=M.reduce((V,E)=>V+E.quantity,0).toString();break}for(const I of U){const V=I.dataset.moonbaseIf;if(!V)return;const E=V.startsWith("!"),O=Jo(E?V.slice(1):V);if(!O||O.kind!=="cart")continue;let T=!1;switch(O.condition){case"has_items":T=M.length>0;break;case"contains_product":T=M.some(A=>A.type==="Product"&&A.productId===O.id);break;case"contains_bundle":T=M.some(A=>A.type==="Bundle"&&A.bundleId===O.id);break}E&&(T=!T),I.dataset.moonbaseOriginalHidden||(I.dataset.moonbaseOriginalHidden=I.hidden?"true":"false"),I.hidden=!T}}},{immediate:!0,deep:!0}),Ze([o,u,m,f],([C,U,M,I])=>{var V,E,O,T,A,R,B;if(C){for(const q of C){const be=q.dataset.moonbaseRender;if(!be)continue;const pe=ki(be);if(!pe||pe.kind!=="product")continue;const he=M.find(ue=>ue.id===pe.id);let oe;if(pe.variationId?oe=(V=he==null?void 0:he.variations)==null?void 0:V.find(ue=>ue.id===pe.variationId):oe=he==null?void 0:he.defaultVariation,q.dataset.moonbaseOriginal===void 0&&(q.dataset.moonbaseOriginal=q.textContent||""),he&&oe)switch(pe.property){case"name":q.textContent=he.name;break;case"price":q.textContent=xt(oe.price[I],I);break;case"original_price":q.textContent=xt(oe.originalPrice[I],I);break;case"discount_name":q.textContent=((E=oe.discount)==null?void 0:E.name)??q.dataset.moonbaseOriginal??"";break;case"discount_description":q.textContent=((O=oe.discount)==null?void 0:O.description)??q.dataset.moonbaseOriginal??"";break;case"discount_total":q.textContent=(T=oe.discount)!=null&&T.total?xt(oe.discount.total[I],I):q.dataset.moonbaseOriginal??"";break}else q.dataset.moonbaseOriginal?q.textContent=q.dataset.moonbaseOriginal:q.textContent=""}for(const q of U){const be=q.dataset.moonbaseIf;if(!be)return;const pe=be.startsWith("!"),he=Jo(pe?be.slice(1):be);if(!he||he.kind!=="product")continue;const oe=M.find(Be=>Be.id===he.id);let ue=!1;switch(he.condition){case"exists":ue=!!oe;break;case"owned":ue=!!(oe!=null&&oe.owned);break;case"has_discount":ue=!!((A=oe==null?void 0:oe.defaultVariation)!=null&&A.hasDiscount);break;case"has_discount_description":ue=!!((B=(R=oe==null?void 0:oe.defaultVariation)==null?void 0:R.discount)!=null&&B.description);break}pe&&(ue=!ue),q.dataset.moonbaseOriginalHidden||(q.dataset.moonbaseOriginalHidden=q.hidden?"true":"false"),q.hidden=!ue}}},{immediate:!0,deep:!0}),Ze([s,c,y,f],([C,U,M,I])=>{var V,E,O,T,A,R,B;if(C){for(const q of C){const be=q.dataset.moonbaseRender;if(!be)continue;const pe=ki(be);if(!pe||pe.kind!=="bundle")continue;const he=M.find(ue=>ue.id===pe.id);let oe;if(pe.variationId?oe=(V=he==null?void 0:he.variations)==null?void 0:V.find(ue=>ue.id===pe.variationId):oe=he==null?void 0:he.defaultVariation,q.dataset.moonbaseOriginal===void 0&&(q.dataset.moonbaseOriginal=q.textContent||""),he&&oe)switch(pe.property){case"name":q.textContent=he.name;break;case"price":q.textContent=xt(oe.price[I],I);break;case"original_price":q.textContent=xt(oe.originalPrice[I],I);break;case"discount_name":q.textContent=((E=oe.discount)==null?void 0:E.name)??q.dataset.moonbaseOriginal??"";break;case"discount_description":q.textContent=((O=oe.discount)==null?void 0:O.description)??q.dataset.moonbaseOriginal??"";break;case"discount_total":q.textContent=(T=oe.discount)!=null&&T.total?xt(oe.discount.total[I],I):q.dataset.moonbaseOriginal??"";break}else q.dataset.moonbaseOriginal?q.textContent=q.dataset.moonbaseOriginal:q.textContent=""}for(const q of U){const be=q.dataset.moonbaseIf;if(!be)return;const pe=be.startsWith("!"),he=Jo(pe?be.slice(1):be);if(!he||he.kind!=="bundle")continue;const oe=M.find(Be=>Be.id===he.id);let ue=!1;switch(he.condition){case"exists":ue=!!oe;break;case"has_discount":ue=!!((A=oe==null?void 0:oe.defaultVariation)!=null&&A.hasDiscount);break;case"has_discount_description":ue=!!((B=(R=oe==null?void 0:oe.defaultVariation)==null?void 0:R.discount)!=null&&B.description);break}pe&&(ue=!ue),q.dataset.moonbaseOriginalHidden||(q.dataset.moonbaseOriginalHidden=q.hidden?"true":"false"),q.hidden=!ue}}},{immediate:!0,deep:!0});function x(C){var U;if(C.dataset&&C.dataset.moonbaseRender){const M=C.dataset.moonbaseRender;if(!M||!ki(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];t.value[I]=t.value[I]||[],t.value[I].push(C),Ye("Added node to render collection",C)}}if(C.dataset&&C.dataset.moonbaseIf){const M=(U=C.dataset.moonbaseIf)==null?void 0:U.replace(/^!/,"");if(!M||!Jo(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];i.value[I]=i.value[I]||[],i.value[I].push(C),Ye("Added node to conditional collection",C)}}C.nodeType===Node.ELEMENT_NODE&&C.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(M=>x(M))}function P(C){var U;if(C.dataset&&C.dataset.moonbaseRender){const M=C.dataset.moonbaseRender;if(!M||!ki(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];t.value[I]?(t.value[I]=t.value[I].filter(V=>V!==C),Ye("Removed node from render collection",C)):Ye("Could not find node in render collection",C)}}if(C.dataset&&C.dataset.moonbaseIf){const M=(U=C.dataset.moonbaseIf)==null?void 0:U.replace(/^!/,"");if(!M||!Jo(M))console.warn(`Element has an unknown Moonbase target (${M})`,C);else if(M){const I=M.split(".")[0];i.value[I]?(i.value[I]=i.value[I].filter(V=>V!==C),Ye("Removed node from conditional collection",C)):Ye("Could not find node in conditional collection",C)}}C.nodeType===Node.ELEMENT_NODE&&C.querySelectorAll("[data-moonbase-render], [data-moonbase-if]").forEach(M=>P(M))}Ue(()=>{e.value=new MutationObserver((U,M)=>{for(const I of U)if(I.type==="childList"){for(const V of I.addedNodes)x(V);for(const V of I.removedNodes)P(V)}else if(I.type==="attributes"&&I.attributeName){const V=I.target.getAttribute(I.attributeName);Ye(`The ${I.attributeName} attribute was modified from ${I.oldValue} to ${V}.`);const E=I.target;if(I.attributeName==="data-moonbase-render"){const O=I.oldValue;if(O){const T=O.split(".")[0];t.value[T]?(t.value[T]=t.value[T].filter(A=>A!==E),Ye("Removed node from render collection",E)):Ye("Could not find node in render collection",E)}if(!V||!ki(V))V&&console.warn(`Element has an unknown Moonbase target (${V})`,E),E.dataset.moonbaseOriginal&&(E.textContent=E.dataset.moonbaseOriginal);else if(V){const T=V==null?void 0:V.split(".")[0];t.value[T]=t.value[T]||[],t.value[T].includes(E)||t.value[T].push(E),Ye("Added node to render collection",E)}}if(I.attributeName==="data-moonbase-if"){const O=I.oldValue;if(O){const A=O.replace(/^!/,"").split(".")[0];i.value[A]?(i.value[A]=i.value[A].filter(R=>R!==E),Ye("Removed node from conditional collection",E)):Ye("Could not find node in conditional collection",E)}const T=V==null?void 0:V.replace(/^!/,"");if(!T||!Jo(T))V&&console.warn(`Element has an unknown Moonbase target (${V})`,E),E.dataset.moonbaseOriginalHidden==="true"&&(E.hidden=!0);else{const A=T.split(".")[0];i.value[A]=i.value[A]||[],i.value[A].includes(E)||i.value[A].push(E),Ye("Added node to conditional collection",E)}}}else Ye(`A ${I.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(U=>x(U))}),jt(()=>e.value&&e.value.disconnect())}const xi=/\?mb_intent=\w+/;function T_(){const e=j(null);function t(r){const o=r.currentTarget,s=o.getAttribute("href");if(Ye("Link was clicked:",o,s,pl),o.tagName==="A"&&s&&xi.test(s)){r.preventDefault(),r.stopPropagation();const i=new URLSearchParams(s.slice(s.indexOf("?"))),a=i.get("mb_intent");if(a&&Object.values(W).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,c])=>[u.substring(3),c]));if(a===W.Checkout&&l.complete)return;Ye("Parsed intent, invoking..",a,l),pl[a](l)}}}function n(r){if(r.nodeType===Node.ELEMENT_NODE){if(r.dataset.moonbaseButton){Ye(`Link ${r.dataset.moonbaseButton} is already registered, making sure the event listener is still there, element:`,r),r.addEventListener("click",t);return}try{const o=r.getAttribute("href");if(r.tagName==="A"&&o&&xi.test(o)){const s=crypto.randomUUID().slice(0,8);Ye(`Adding event listener for link ${s} to element:`,r),r.addEventListener("click",t),r.dataset.moonbaseButton=s}r.querySelectorAll('a[href*="?mb_intent="]').forEach(s=>n(s))}catch(o){console.warn("Could not add Moonbase listener to link",r,o)}}}Ue(()=>{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);Ye(`The ${i.attributeName} attribute was modified from ${i.oldValue} to ${a}.`);const l=i.target;i.attributeName==="href"&&(i.oldValue&&xi.test(i.oldValue)&&(!a||!xi.test(a))?l.removeEventListener("click",t):a&&xi.test(a)&&n(l))}else Ye(`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="]').forEach(o=>n(o))}),jt(()=>e.value&&e.value.disconnect())}const{min:I_,max:D_}=Math,_o=(e,t=0,n=1)=>I_(D_(t,e),n),Gu=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]=_o(e[t],0,255)):t===3&&(e[t]=_o(e[t],0,1));return e},Rp={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Rp[`[object ${e}]`]=e.toLowerCase();function $e(e){return Rp[Object.prototype.toString.call(e)]||"object"}const Pe=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):$e(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),es=e=>{if(e.length<2)return null;const t=e.length-1;return $e(e[t])=="string"?e[t].toLowerCase():null},{PI:Ga,min:jp,max:Up}=Math,ln=e=>Math.round(e*100)/100,Qu=e=>Math.round(e*100)/100,ur=Ga*2,Xu=Ga/3,$_=Ga/180,M_=180/Ga;function Bp(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Se={format:{},autodetect:[]};class J{constructor(...t){const n=this;if($e(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=es(t),o=!1;if(!r){o=!0,Se.sorted||(Se.autodetect=Se.autodetect.sort((s,i)=>i.p-s.p),Se.sorted=!0);for(let s of Se.autodetect)if(r=s.test(...t),r)break}if(Se.format[r]){const s=Se.format[r].apply(null,o?t:t.slice(0,-1));n._rgb=Gu(s)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return $e(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const V_="3.1.2",Te=(...e)=>new J(...e);Te.version=V_;const ts={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"},L_=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,R_=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Fp=e=>{if(e.match(L_)){(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(R_)){(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:Qa}=Math,Hp=(...e)=>{let[t,n,r,o]=Pe(e,"rgba"),s=es(e)||"auto";o===void 0&&(o=1),s==="auto"&&(s=o<1?"rgba":"rgb"),t=Qa(t),n=Qa(n),r=Qa(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+Qa(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}`}};J.prototype.name=function(){const e=Hp(this._rgb,"rgb");for(let t of Object.keys(ts))if(ts[t]===e)return t.toLowerCase();return e},Se.format.named=e=>{if(e=e.toLowerCase(),ts[e])return Fp(ts[e]);throw new Error("unknown color name: "+e)},Se.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&ts[e.toLowerCase()])return"named"}}),J.prototype.alpha=function(e,t=!1){return e!==void 0&&$e(e)==="number"?t?(this._rgb[3]=e,this):new J([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},J.prototype.clipped=function(){return this._rgb._clipped||!1};const qn={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}},j_=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 cr(e){const t=j_.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);qn.labWhitePoint=e,qn.Xn=t[0],qn.Zn=t[1]}function Ai(){return qn.labWhitePoint}const Ju=(...e)=>{e=Pe(e,"lab");const[t,n,r]=e,[o,s,i]=U_(t,n,r),[a,l,u]=qp(o,s,i);return[a,l,u,e.length>3?e[3]:1]},U_=(e,t,n)=>{const{kE:r,kK:o,kKE:s,Xn:i,Yn:a,Zn:l}=qn,u=(e+16)/116,c=.002*t+u,d=u-.005*n,f=c*c*c,h=d*d*d,m=f>r?f:(116*c-16)/o,y=e>s?Math.pow((e+16)/116,3):e/o,x=h>r?h:(116*d-16)/o,P=m*i,C=y*a,U=x*l;return[P,C,U]},ec=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},qp=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:o,MtxXYZ2RGB:s,RefWhiteRGB:i,Xn:a,Yn:l,Zn:u}=qn,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,m=i.X*r.m01+i.Y*r.m11+i.Z*r.m21,y=i.X*r.m02+i.Y*r.m12+i.Z*r.m22,x=(e*r.m00+t*r.m10+n*r.m20)*(h/c),P=(e*r.m01+t*r.m11+n*r.m21)*(m/d),C=(e*r.m02+t*r.m12+n*r.m22)*(y/f),U=x*o.m00+P*o.m10+C*o.m20,M=x*o.m01+P*o.m11+C*o.m21,I=x*o.m02+P*o.m12+C*o.m22,V=ec(U*s.m00+M*s.m10+I*s.m20),E=ec(U*s.m01+M*s.m11+I*s.m21),O=ec(U*s.m02+M*s.m12+I*s.m22);return[V*255,E*255,O*255]},tc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=zp(t,n,r),[l,u,c]=B_(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function B_(e,t,n){const{Xn:r,Yn:o,Zn:s,kE:i,kK:a}=qn,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 nc(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 zp=(e,t,n)=>{e=nc(e/255),t=nc(t/255),n=nc(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:o,MtxAdaptMaI:s,Xn:i,Yn:a,Zn:l,As:u,Bs:c,Cs:d}=qn;let f=e*r.m00+t*r.m10+n*r.m20,h=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22;const y=i*o.m00+a*o.m10+l*o.m20,x=i*o.m01+a*o.m11+l*o.m21,P=i*o.m02+a*o.m12+l*o.m22;let C=f*o.m00+h*o.m10+m*o.m20,U=f*o.m01+h*o.m11+m*o.m21,M=f*o.m02+h*o.m12+m*o.m22;return C*=y/u,U*=x/c,M*=P/d,f=C*s.m00+U*s.m10+M*s.m20,h=C*s.m01+U*s.m11+M*s.m21,m=C*s.m02+U*s.m12+M*s.m22,[f,h,m]};J.prototype.lab=function(){return tc(this._rgb)},Object.assign(Te,{lab:(...e)=>new J(...e,"lab"),getLabWhitePoint:Ai,setLabWhitePoint:cr}),Se.format.lab=Ju,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"lab"),$e(e)==="array"&&e.length===3)return"lab"}}),J.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=qn.Kn*e,new J(n,"lab").alpha(t.alpha(),!0)},J.prototype.brighten=function(e=1){return this.darken(-e)},J.prototype.darker=J.prototype.darken,J.prototype.brighter=J.prototype.brighten,J.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:F_}=Math,H_=1e-7,q_=20;J.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&$e(e)==="number"){if(e===0)return new J([0,0,0,this._rgb[3]],"rgb");if(e===1)return new J([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=q_;const o=(i,a)=>{const l=i.interpolate(a,.5,t),u=l.luminance();return Math.abs(e-u)<H_||!r--?l:u>e?o(i,l):o(l,a)},s=(n>e?o(new J([0,0,0]),this):o(this,new J([255,255,255]))).rgb();return new J([...s,this._rgb[3]])}return z_(...this._rgb.slice(0,3))};const z_=(e,t,n)=>(e=rc(e),t=rc(t),n=rc(n),.2126*e+.7152*t+.0722*n),rc=e=>(e/=255,e<=.03928?e/12.92:F_((e+.055)/1.055,2.4)),It={},ns=(e,t,n=.5,...r)=>{let o=r[0]||"lrgb";if(!It[o]&&!r.length&&(o=Object.keys(It)[0]),!It[o])throw new Error(`interpolation mode ${o} is not defined`);return $e(e)!=="object"&&(e=new J(e)),$e(t)!=="object"&&(t=new J(t)),It[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};J.prototype.mix=J.prototype.interpolate=function(e,t=.5,...n){return ns(this,e,t,...n)},J.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 J([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:W_,cos:Z_}=Math,Wp=(...e)=>{let[t,n,r]=Pe(e,"lch");return isNaN(r)&&(r=0),r=r*$_,[t,Z_(r)*n,W_(r)*n]},oc=(...e)=>{e=Pe(e,"lch");const[t,n,r]=e,[o,s,i]=Wp(t,n,r),[a,l,u]=Ju(o,s,i);return[a,l,u,e.length>3?e[3]:1]},Y_=(...e)=>{const t=Bp(Pe(e,"hcl"));return oc(...t)},{sqrt:K_,atan2:G_,round:Q_}=Math,Zp=(...e)=>{const[t,n,r]=Pe(e,"lab"),o=K_(n*n+r*r);let s=(G_(r,n)*M_+360)%360;return Q_(o*1e4)===0&&(s=Number.NaN),[t,o,s]},sc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=tc(t,n,r),[l,u,c]=Zp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};J.prototype.lch=function(){return sc(this._rgb)},J.prototype.hcl=function(){return Bp(sc(this._rgb))},Object.assign(Te,{lch:(...e)=>new J(...e,"lch"),hcl:(...e)=>new J(...e,"hcl")}),Se.format.lch=oc,Se.format.hcl=Y_,["lch","hcl"].forEach(e=>Se.autodetect.push({p:2,test:(...t)=>{if(t=Pe(t,e),$e(t)==="array"&&t.length===3)return e}})),J.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=qn.Kn*e,n[1]<0&&(n[1]=0),new J(n,"lch").alpha(t.alpha(),!0)},J.prototype.desaturate=function(e=1){return this.saturate(-e)},J.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($e(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($e(t)==="number")s[i]=t;else throw new Error("unsupported value for Color.set");const a=new J(s,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${o} in mode ${r}`)}else return s},J.prototype.tint=function(e=.5,...t){return ns(this,"white",e,...t)},J.prototype.shade=function(e=.5,...t){return ns(this,"black",e,...t)};const X_=(e,t,n)=>{const r=e._rgb,o=t._rgb;return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"rgb")};It.rgb=X_;const{sqrt:ic,pow:rs}=Math,J_=(e,t,n)=>{const[r,o,s]=e._rgb,[i,a,l]=t._rgb;return new J(ic(rs(r,2)*(1-n)+rs(i,2)*n),ic(rs(o,2)*(1-n)+rs(a,2)*n),ic(rs(s,2)*(1-n)+rs(l,2)*n),"rgb")};It.lrgb=J_;const e2=(e,t,n)=>{const r=e.lab(),o=t.lab();return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"lab")};It.lab=e2;const os=(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,m,y;return!isNaN(i)&&!isNaN(a)?(a>i&&a-i>180?y=a-(i+360):a<i&&i-a>180?y=a+360-i:y=a-i,h=i+n*y):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)),m=c+n*(d-c),r==="oklch"?new J([m,f,h],r):new J([h,f,m],r)},Yp=(e,t,n)=>os(e,t,n,"lch");It.lch=Yp,It.hcl=Yp;const t2=e=>{if($e(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)},n2=(...e)=>{const[t,n,r]=Pe(e,"rgb");return(t<<16)+(n<<8)+r};J.prototype.num=function(){return n2(this._rgb)},Object.assign(Te,{num:(...e)=>new J(...e,"num")}),Se.format.num=t2,Se.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&$e(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const r2=(e,t,n)=>{const r=e.num(),o=t.num();return new J(r+n*(o-r),"num")};It.num=r2;const{floor:o2}=Math,s2=(...e)=>{e=Pe(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=o2(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]},i2=(...e)=>{const[t,n,r]=Pe(e,"rgb"),o=jp(t,n,r),s=Up(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]};J.prototype.hcg=function(){return i2(this._rgb)};const a2=(...e)=>new J(...e,"hcg");Te.hcg=a2,Se.format.hcg=s2,Se.autodetect.push({p:1,test:(...e)=>{if(e=Pe(e,"hcg"),$e(e)==="array"&&e.length===3)return"hcg"}});const l2=(e,t,n)=>os(e,t,n,"hcg");It.hcg=l2;const{cos:ss}=Math,u2=(...e)=>{e=Pe(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*ss(ur*t)/ss(Xu-ur*t))/3,s=1-(i+o)):t<2/3?(t-=1/3,o=(1-n)/3,s=(1+n*ss(ur*t)/ss(Xu-ur*t))/3,i=1-(o+s)):(t-=2/3,s=(1-n)/3,i=(1+n*ss(ur*t)/ss(Xu-ur*t))/3,o=1-(s+i)),o=_o(r*o*3),s=_o(r*s*3),i=_o(r*i*3),[o*255,s*255,i*255,e.length>3?e[3]:1]},{min:c2,sqrt:d2,acos:f2}=Math,h2=(...e)=>{let[t,n,r]=Pe(e,"rgb");t/=255,n/=255,r/=255;let o;const s=c2(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/=d2((t-n)*(t-n)+(t-r)*(n-r)),o=f2(o),r>n&&(o=ur-o),o/=ur),[o*360,a,i]};J.prototype.hsi=function(){return h2(this._rgb)};const p2=(...e)=>new J(...e,"hsi");Te.hsi=p2,Se.format.hsi=u2,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsi"),$e(e)==="array"&&e.length===3)return"hsi"}});const m2=(e,t,n)=>os(e,t,n,"hsi");It.hsi=m2;const ac=(...e)=>{e=Pe(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]},Kp=(...e)=>{e=Pe(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const o=jp(t,n,r),s=Up(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]};J.prototype.hsl=function(){return Kp(this._rgb)};const g2=(...e)=>new J(...e,"hsl");Te.hsl=g2,Se.format.hsl=ac,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsl"),$e(e)==="array"&&e.length===3)return"hsl"}});const b2=(e,t,n)=>os(e,t,n,"hsl");It.hsl=b2;const{floor:v2}=Math,y2=(...e)=>{e=Pe(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=v2(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:w2,max:_2}=Math,E2=(...e)=>{e=Pe(e,"rgb");let[t,n,r]=e;const o=w2(t,n,r),s=_2(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]};J.prototype.hsv=function(){return E2(this._rgb)};const k2=(...e)=>new J(...e,"hsv");Te.hsv=k2,Se.format.hsv=y2,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"hsv"),$e(e)==="array"&&e.length===3)return"hsv"}});const x2=(e,t,n)=>os(e,t,n,"hsv");It.hsv=x2;function Xa(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 lc=(...e)=>{e=Pe(e,"lab");const[t,n,r,...o]=e,[s,i,a]=A2([t,n,r]),[l,u,c]=qp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]};function A2(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=Xa(n,e);return Xa(t,r.map(o=>o**3))}const uc=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),s=zp(t,n,r);return[...C2(s),...o.length>0&&o[0]<1?[o[0]]:[]]};function C2(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=Xa(t,e);return Xa(n,r.map(o=>Math.cbrt(o)))}J.prototype.oklab=function(){return uc(this._rgb)},Object.assign(Te,{oklab:(...e)=>new J(...e,"oklab")}),Se.format.oklab=lc,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"oklab"),$e(e)==="array"&&e.length===3)return"oklab"}});const O2=(e,t,n)=>{const r=e.oklab(),o=t.oklab();return new J(r[0]+n*(o[0]-r[0]),r[1]+n*(o[1]-r[1]),r[2]+n*(o[2]-r[2]),"oklab")};It.oklab=O2;const S2=(e,t,n)=>os(e,t,n,"oklch");It.oklch=S2;const{pow:cc,sqrt:dc,PI:fc,cos:Gp,sin:Qp,atan2:N2}=Math,P2=(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 J(d)),t==="lrgb")return T2(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*fc;l+=Gp(f)*n[0],u+=Qp(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 m=0;m<i.length;m++)if(!isNaN(h[m]))if(a[m]+=n[f+1],t.charAt(m)==="h"){const y=h[m]/180*fc;l+=Gp(y)*n[f+1],u+=Qp(y)*n[f+1]}else i[m]+=h[m]*n[f+1]});for(let d=0;d<i.length;d++)if(t.charAt(d)==="h"){let f=N2(u/a[d],l/a[d])/fc*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 J(i,t).alpha(c>.99999?1:c,!0)},T2=(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]+=cc(a[0],2)*i,r[1]+=cc(a[1],2)*i,r[2]+=cc(a[2],2)*i,r[3]+=a[3]*i}return r[0]=dc(r[0]),r[1]=dc(r[1]),r[2]=dc(r[2]),r[3]>.9999999&&(r[3]=1),new J(Gu(r))},{pow:I2}=Math;function Ja(e){let t="rgb",n=Te("#ccc"),r=0,o=[0,1],s=[],i=[0,0],a=!1,l=[],u=!1,c=0,d=1,f=!1,h={},m=!0,y=1;const x=function(E){if(E=E||["#fff","#000"],E&&$e(E)==="string"&&Te.brewer&&Te.brewer[E.toLowerCase()]&&(E=Te.brewer[E.toLowerCase()]),$e(E)==="array"){E.length===1&&(E=[E[0],E[0]]),E=E.slice(0);for(let O=0;O<E.length;O++)E[O]=Te(E[O]);s.length=0;for(let O=0;O<E.length;O++)s.push(O/(E.length-1))}return I(),l=E},P=function(E){if(a!=null){const O=a.length-1;let T=0;for(;T<O&&E>=a[T];)T++;return T-1}return 0};let C=E=>E,U=E=>E;const M=function(E,O){let T,A;if(O==null&&(O=!1),isNaN(E)||E===null)return n;O?A=E:a&&a.length>2?A=P(E)/(a.length-2):d!==c?A=(E-c)/(d-c):A=1,A=U(A),O||(A=C(A)),y!==1&&(A=I2(A,y)),A=i[0]+A*(1-i[0]-i[1]),A=_o(A,0,1);const R=Math.floor(A*1e4);if(m&&h[R])T=h[R];else{if($e(l)==="array")for(let B=0;B<s.length;B++){const q=s[B];if(A<=q){T=l[B];break}if(A>=q&&B===s.length-1){T=l[B];break}if(A>q&&A<s[B+1]){A=(A-q)/(s[B+1]-q),T=Te.interpolate(l[B],l[B+1],A,t);break}}else $e(l)==="function"&&(T=l(A));m&&(h[R]=T)}return T};var I=()=>h={};x(e);const V=function(E){const O=Te(M(E));return u&&O[u]?O[u]():O};return V.classes=function(E){if(E!=null){if($e(E)==="array")a=E,o=[E[0],E[E.length-1]];else{const O=Te.analyze(o);E===0?a=[O.min,O.max]:a=Te.limits(O,"e",E)}return V}return a},V.domain=function(E){if(!arguments.length)return o;c=E[0],d=E[E.length-1],s=[];const O=l.length;if(E.length===O&&c!==d)for(let T of Array.from(E))s.push((T-c)/(d-c));else{for(let T=0;T<O;T++)s.push(T/(O-1));if(E.length>2){const T=E.map((R,B)=>B/(E.length-1)),A=E.map(R=>(R-c)/(d-c));A.every((R,B)=>T[B]===R)||(U=R=>{if(R<=0||R>=1)return R;let B=0;for(;R>=A[B+1];)B++;const q=(R-A[B])/(A[B+1]-A[B]);return T[B]+q*(T[B+1]-T[B])})}}return o=[c,d],V},V.mode=function(E){return arguments.length?(t=E,I(),V):t},V.range=function(E,O){return x(E),V},V.out=function(E){return u=E,V},V.spread=function(E){return arguments.length?(r=E,V):r},V.correctLightness=function(E){return E==null&&(E=!0),f=E,I(),f?C=function(O){const T=M(0,!0).lab()[0],A=M(1,!0).lab()[0],R=T>A;let B=M(O,!0).lab()[0];const q=T+(A-T)*O;let be=B-q,pe=0,he=1,oe=20;for(;Math.abs(be)>.01&&oe-- >0;)(function(){return R&&(be*=-1),be<0?(pe=O,O+=(he-O)*.5):(he=O,O+=(pe-O)*.5),B=M(O,!0).lab()[0],be=B-q})();return O}:C=O=>O,V},V.padding=function(E){return E!=null?($e(E)==="number"&&(E=[E,E]),i=E,V):i},V.colors=function(E,O){arguments.length<2&&(O="hex");let T=[];if(arguments.length===0)T=l.slice(0);else if(E===1)T=[V(.5)];else if(E>1){const A=o[0],R=o[1]-A;T=D2(0,E).map(B=>V(A+B/(E-1)*R))}else{e=[];let A=[];if(a&&a.length>2)for(let R=1,B=a.length,q=1<=B;q?R<B:R>B;q?R++:R--)A.push((a[R-1]+a[R])*.5);else A=o;T=A.map(R=>V(R))}return Te[O]&&(T=T.map(A=>A[O]())),T},V.cache=function(E){return E!=null?(m=E,V):m},V.gamma=function(E){return E!=null?(y=E,V):y},V.nodata=function(E){return E!=null?(n=Te(E),V):n},V}function D2(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 $2=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},M2=function(e){let t,n,r,o;if(e=e.map(s=>new J(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 J(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 J(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 J(a,"lab")}}else if(e.length>=5){let s,i,a;s=e.map(l=>l.lab()),a=e.length-1,i=$2(a),t=function(l){const u=1-l,c=[0,1,2].map(d=>s.reduce((f,h,m)=>f+i[m]*u**(a-m)*l**m*h[d],0));return new J(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},V2=e=>{const t=M2(e);return t.scale=()=>Ja(t),t},{round:Xp}=Math;J.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Xp)},J.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:Xp(t):t)},Object.assign(Te,{rgb:(...e)=>new J(...e,"rgb")}),Se.format.rgb=(...e)=>{const t=Pe(e,"rgba");return t[3]===void 0&&(t[3]=1),t},Se.autodetect.push({p:3,test:(...e)=>{if(e=Pe(e,"rgba"),$e(e)==="array"&&(e.length===3||e.length===4&&$e(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Sn=(e,t,n)=>{if(!Sn[n])throw new Error("unknown blend mode "+n);return Sn[n](e,t)},Ur=e=>(t,n)=>{const r=Te(n).rgb(),o=Te(t).rgb();return Te.rgb(e(r,o))},Br=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},L2=e=>e,R2=(e,t)=>e*t/255,j2=(e,t)=>e>t?t:e,U2=(e,t)=>e>t?e:t,B2=(e,t)=>255*(1-(1-e/255)*(1-t/255)),F2=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),H2=(e,t)=>255*(1-(1-t/255)/(e/255)),q2=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);Sn.normal=Ur(Br(L2)),Sn.multiply=Ur(Br(R2)),Sn.screen=Ur(Br(B2)),Sn.overlay=Ur(Br(F2)),Sn.darken=Ur(Br(j2)),Sn.lighten=Ur(Br(U2)),Sn.dodge=Ur(Br(q2)),Sn.burn=Ur(Br(H2));const{pow:z2,sin:W2,cos:Z2}=Math;function Y2(e=300,t=-1.5,n=1,r=1,o=[0,1]){let s=0,i;$e(o)==="array"?i=o[1]-o[0]:(i=0,o=[o,o]);const a=function(l){const u=ur*((e+120)/360+t*l),c=z2(o[0]+i*l,r),f=(s!==0?n[0]+l*s:n)*c*(1-c)/2,h=Z2(u),m=W2(u),y=c+f*(-.14861*h+1.78277*m),x=c+f*(-.29227*h-.90649*m),P=c+f*(1.97294*h);return Te(Gu([y*255,x*255,P*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,$e(n)==="array"?(s=n[1]-n[0],s===0&&(n=n[1])):s=0,a)},a.lightness=function(l){return l==null?o:($e(l)==="array"?(o=l,i=l[1]-l[0]):(o=[l,l],i=0),a)},a.scale=()=>Te.scale(a),a.hue(n),a}const K2="0123456789abcdef",{floor:G2,random:Q2}=Math,X2=()=>{let e="#";for(let t=0;t<6;t++)e+=K2.charAt(G2(Q2()*16));return new J(e,"hex")},{log:Jp,pow:J2,floor:eE,abs:tE}=Math;function em(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return $e(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&$e(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)=>tm(n,r,o),n}function tm(e,t="equal",n=7){$e(e)=="array"&&(e=em(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*Jp(r),l=Math.LOG10E*Jp(o);i.push(r);for(let u=1;u<n;u++)i.push(J2(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=eE(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 x=1;x<n;x++)h.push(r+x/n*(o-r));for(h.push(o);d;){for(let P=0;P<n;P++)c[P]=0;for(let P=0;P<l;P++){const C=s[P];let U=Number.MAX_VALUE,M;for(let I=0;I<n;I++){const V=tE(h[I]-C);V<U&&(U=V,M=I),c[M]++,u[P]=M}}const x=new Array(n);for(let P=0;P<n;P++)x[P]=null;for(let P=0;P<l;P++)a=u[P],x[a]===null?x[a]=s[P]:x[a]+=s[P];for(let P=0;P<n;P++)x[P]*=1/c[P];d=!1;for(let P=0;P<n;P++)if(x[P]!==h[P]){d=!0;break}h=x,f++,f>200&&(d=!1)}const m={};for(let x=0;x<n;x++)m[x]=[];for(let x=0;x<l;x++)a=u[x],m[a].push(s[x]);let y=[];for(let x=0;x<n;x++)y.push(m[x][0]),y.push(m[x][m[x].length-1]);y=y.sort((x,P)=>x-P),i.push(y[0]);for(let x=1;x<y.length;x+=2){const P=y[x];!isNaN(P)&&i.indexOf(P)===-1&&i.push(P)}}return i}const nE=(e,t)=>{e=new J(e),t=new J(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};/**
24
24
  * @license
25
25
  *
26
26
  * The APCA contrast prediction algorithm is based of the formulas published
@@ -32,4 +32,4 @@ This will fail in production.`);a=hi,a._s.has(r)||(s?Du(r,t,o,a):ip(r,o,a),Me.NO
32
32
  *
33
33
  * You can read more about the APCA Readability Criterion at
34
34
  * https://readtech.org/ARC/
35
- */const nm=.027,rE=5e-4,oE=.1,rm=1.14,el=.022,om=1.414,sE=(e,t)=>{e=new J(e),t=new J(t),e.alpha()<1&&(e=ns(t,e,e.alpha(),"rgb"));const n=sm(...e.rgb()),r=sm(...t.rgb()),o=n>=el?n:n+Math.pow(el-n,om),s=r>=el?r:r+Math.pow(el-r,om),i=Math.pow(s,.56)-Math.pow(o,.57),a=Math.pow(s,.65)-Math.pow(o,.62),l=Math.abs(s-o)<rE?0:o<s?i*rm:a*rm;return(Math.abs(l)<oE?0:l>0?l-nm:l+nm)*100};function sm(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:dr,pow:ht,min:iE,max:aE,atan2:im,abs:am,cos:tl,sin:lm,exp:lE,PI:um}=Math;function uE(e,t,n=1,r=1,o=1){var s=function(wt){return 360*wt/(2*um)},i=function(wt){return 2*um*wt/360};e=new J(e),t=new J(t);const[a,l,u]=Array.from(e.lab()),[c,d,f]=Array.from(t.lab()),h=(a+c)/2,m=dr(ht(l,2)+ht(u,2)),y=dr(ht(d,2)+ht(f,2)),x=(m+y)/2,P=.5*(1-dr(ht(x,7)/(ht(x,7)+ht(25,7)))),C=l*(1+P),U=d*(1+P),M=dr(ht(C,2)+ht(u,2)),I=dr(ht(U,2)+ht(f,2)),V=(M+I)/2,E=s(im(u,C)),O=s(im(f,U)),T=E>=0?E:E+360,A=O>=0?O:O+360,R=am(T-A)>180?(T+A+360)/2:(T+A)/2,B=1-.17*tl(i(R-30))+.24*tl(i(2*R))+.32*tl(i(3*R+6))-.2*tl(i(4*R-63));let q=A-T;q=am(q)<=180?q:A<=T?q+360:q-360,q=2*dr(M*I)*lm(i(q)/2);const be=c-a,pe=I-M,he=1+.015*ht(h-50,2)/dr(20+ht(h-50,2)),oe=1+.045*V,ue=1+.015*V*B,Be=30*lE(-ht((R-275)/25,2)),ot=-(2*dr(ht(V,7)/(ht(V,7)+ht(25,7))))*lm(2*i(Be)),$t=dr(ht(be/(n*he),2)+ht(pe/(r*oe),2)+ht(q/(o*ue),2)+ot*(pe/(r*oe))*(q/(o*ue)));return aE(0,iE(100,$t))}function cE(e,t,n="lab"){e=new J(e),t=new J(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 dE=(...e)=>{try{return new J(...e),!0}catch{return!1}},fE={cool(){return Ja([Te.hsl(180,1,.9),Te.hsl(250,.7,.4)])},hot(){return Ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},hc={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"]},cm=Object.keys(hc),dm=new Map(cm.map(e=>[e.toLowerCase(),e])),hE=typeof Proxy=="function"?new Proxy(hc,{get(e,t){const n=t.toLowerCase();if(dm.has(n))return e[dm.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(cm)}}):hc,pE=(...e)=>{e=Pe(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:fm}=Math,mE=(...e)=>{let[t,n,r]=Pe(e,"rgb");t=t/255,n=n/255,r=r/255;const o=1-fm(t,fm(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]};J.prototype.cmyk=function(){return mE(this._rgb)},Object.assign(Te,{cmyk:(...e)=>new J(...e,"cmyk")}),Se.format.cmyk=pE,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"cmyk"),$e(e)==="array"&&e.length===4)return"cmyk"}});const gE=(...e)=>{const t=Pe(e,"hsla");let n=es(e)||"lsa";return t[0]=ln(t[0]||0)+"deg",t[1]=ln(t[1]*100)+"%",t[2]=ln(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(" ")})`},bE=(...e)=>{const t=Pe(e,"lab");let n=es(e)||"lab";return t[0]=ln(t[0])+"%",t[1]=ln(t[1]),t[2]=ln(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},vE=(...e)=>{const t=Pe(e,"lch");let n=es(e)||"lab";return t[0]=ln(t[0])+"%",t[1]=ln(t[1]),t[2]=isNaN(t[2])?"none":ln(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(" ")})`},yE=(...e)=>{const t=Pe(e,"lab");return t[0]=ln(t[0]*100)+"%",t[1]=Qu(t[1]),t[2]=Qu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},hm=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=uc(t,n,r),[l,u,c]=Zp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},wE=(...e)=>{const t=Pe(e,"lch");return t[0]=ln(t[0]*100)+"%",t[1]=Qu(t[1]),t[2]=isNaN(t[2])?"none":ln(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:pc}=Math,_E=(...e)=>{const t=Pe(e,"rgba");let n=es(e)||"rgb";if(n.substr(0,3)==="hsl")return gE(Kp(t),n);if(n.substr(0,3)==="lab"){const r=Ai();cr("d50");const o=bE(tc(t),n);return cr(r),o}if(n.substr(0,3)==="lch"){const r=Ai();cr("d50");const o=vE(sc(t),n);return cr(r),o}return n.substr(0,5)==="oklab"?yE(uc(t)):n.substr(0,5)==="oklch"?wE(hm(t)):(t[0]=pc(t[0]),t[1]=pc(t[1]),t[2]=pc(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(" ")})`)},pm=(...e)=>{e=Pe(e,"lch");const[t,n,r,...o]=e,[s,i,a]=Wp(t,n,r),[l,u,c]=lc(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},fr=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Nn=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,nl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,un=/\s*/.source,is=/\s+/.source,mc=/\s*,\s*/.source,rl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,as=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,mm=new RegExp("^rgba?\\("+un+[fr,fr,fr].join(is)+as+"\\)$"),gm=new RegExp("^rgb\\("+un+[fr,fr,fr].join(mc)+un+"\\)$"),bm=new RegExp("^rgba\\("+un+[fr,fr,fr,Nn].join(mc)+un+"\\)$"),vm=new RegExp("^hsla?\\("+un+[rl,nl,nl].join(is)+as+"\\)$"),ym=new RegExp("^hsl?\\("+un+[rl,nl,nl].join(mc)+un+"\\)$"),wm=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,_m=new RegExp("^lab\\("+un+[Nn,Nn,Nn].join(is)+as+"\\)$"),Em=new RegExp("^lch\\("+un+[Nn,Nn,rl].join(is)+as+"\\)$"),km=new RegExp("^oklab\\("+un+[Nn,Nn,Nn].join(is)+as+"\\)$"),xm=new RegExp("^oklch\\("+un+[Nn,Nn,rl].join(is)+as+"\\)$"),{round:Am}=Math,ls=e=>e.map((t,n)=>n<=2?_o(Am(t),0,255):t),pt=(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),qt=(e,t)=>e==="none"?t:e,gc=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Se.format.named)try{return Se.format.named(e)}catch{}if((t=e.match(mm))||(t=e.match(gm))){let n=t.slice(1,4);for(let o=0;o<3;o++)n[o]=+pt(qt(n[o],0),0,255);n=ls(n);const r=t[4]!==void 0?+pt(t[4],0,1):1;return n[3]=r,n}if(t=e.match(bm)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+pt(n[r],0,255);return n}if((t=e.match(vm))||(t=e.match(ym))){const n=t.slice(1,4);n[0]=+qt(n[0].replace("deg",""),0),n[1]=+pt(qt(n[1],0),0,100)*.01,n[2]=+pt(qt(n[2],0),0,100)*.01;const r=ls(ac(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}if(t=e.match(wm)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=ac(n);for(let o=0;o<3;o++)r[o]=Am(r[o]);return r[3]=+t[4],r}if(t=e.match(_m)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,100),n[1]=pt(qt(n[1],0),-125,125,!0),n[2]=pt(qt(n[2],0),-125,125,!0);const r=Ai();cr("d50");const o=ls(Ju(n));cr(r);const s=t[4]!==void 0?+pt(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Em)){const n=t.slice(1,4);n[0]=pt(n[0],0,100),n[1]=pt(qt(n[1],0),0,150,!1),n[2]=+qt(n[2].replace("deg",""),0);const r=Ai();cr("d50");const o=ls(oc(n));cr(r);const s=t[4]!==void 0?+pt(t[4],0,1):1;return o[3]=s,o}if(t=e.match(km)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,1),n[1]=pt(qt(n[1],0),-.4,.4,!0),n[2]=pt(qt(n[2],0),-.4,.4,!0);const r=ls(lc(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}if(t=e.match(xm)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,1),n[1]=pt(qt(n[1],0),0,.4,!1),n[2]=+qt(n[2].replace("deg",""),0);const r=ls(pm(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}};gc.test=e=>mm.test(e)||vm.test(e)||_m.test(e)||Em.test(e)||km.test(e)||xm.test(e)||gm.test(e)||bm.test(e)||ym.test(e)||wm.test(e)||e==="transparent",J.prototype.css=function(e){return _E(this._rgb,e)};const EE=(...e)=>new J(...e,"css");Te.css=EE,Se.format.css=gc,Se.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&gc.test(e))return"css"}}),Se.format.gl=(...e)=>{const t=Pe(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const kE=(...e)=>new J(...e,"gl");Te.gl=kE,J.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},J.prototype.hex=function(e){return Hp(this._rgb,e)};const xE=(...e)=>new J(...e,"hex");Te.hex=xE,Se.format.hex=Fp,Se.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:ol}=Math,Cm=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*ol(r),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*ol(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*ol(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*ol(r),o=255),[n,r,o,1]},{round:AE}=Math,CE=(...e)=>{const t=Pe(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=Cm(a);l[2]/l[0]>=r/n?s=a:o=a}return AE(a)};J.prototype.temp=J.prototype.kelvin=J.prototype.temperature=function(){return CE(this._rgb)};const bc=(...e)=>new J(...e,"temp");Object.assign(Te,{temp:bc,kelvin:bc,temperature:bc}),Se.format.temp=Se.format.kelvin=Se.format.temperature=Cm,J.prototype.oklch=function(){return hm(this._rgb)},Object.assign(Te,{oklch:(...e)=>new J(...e,"oklch")}),Se.format.oklch=pm,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"oklch"),$e(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Te,{analyze:em,average:P2,bezier:V2,blend:Sn,brewer:hE,Color:J,colors:ts,contrast:nE,contrastAPCA:sE,cubehelix:Y2,deltaE:uE,distance:cE,input:Se,interpolate:ns,limits:tm,mix:ns,random:X2,scale:Ja,scales:fE,valid:dE});const OE=[{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 SE(e){const r=OE.filter(i=>i.reference).map(i=>({...i,shades:i.shades.map(a=>({...a,delta:Te.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(Te(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 NE(e){const t=Te(e),n=SE(t),r=t.get("hsl.h"),o=Te(n.closestShade.hexcode).get("hsl.h"),s=r-o,i=s===0?o.toString():s>0?`+${s}`:s.toString(),a=t.get("hsl.s")/Te(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=Te(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 us extends Error{constructor(){super(),this.name="IndiscriminateError"}}const PE={},TE={fill:"none",viewBox:"0 0 24 24"};function IE(e,t){return p(),_("svg",TE,t[0]||(t[0]=[L("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),L("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 zt=ar(PE,[["render",IE],["__scopeId","data-v-687bcaf0"]]),DE={"aria-hidden":"true"},Ci=le({__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=fe(at),r=Z(()=>t.success?t.successLabel??t.label:t.error?t.errorLabel??t.label:t.label),o=Z(()=>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 p(),H(ru(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:k(()=>[L("div",DE,[s.working?(p(),H(zt,{key:0})):s.success?(p(),H(b(Uw),{key:1})):s.error?(p(),H(b(Hw),{key:2})):s.icon?(p(),H(ru(s.icon),{key:3})):z("",!0)]),N(" "+$(r.value),1)]),_:1},8,["type","disabled","data-success","data-error","data-working","data-variant","data-size","data-corners","data-background","data-icon-visible"])}}}),Ve=le({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},icon:{},variant:{},size:{},noReset:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=j(!1),r=j(!1),o=j(!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 us)return;o.value=!0,await Ht(2500),o.value=!1}}return(i,a)=>(p(),H(Ci,{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"]))}}),$E={},ME={class:"moonbase:text-body"};function VE(e,t){return p(),_("span",ME,[Nt(e.$slots,"default")])}const Ke=ar($E,[["render",VE]]),LE={},RE={class:"moonbase:text-subtext"};function jE(e,t){return p(),_("span",RE,[Nt(e.$slots,"default")])}const ye=ar(LE,[["render",jE]]),UE={class:"moonbase:about"},BE=le({__name:"About",setup(e){const t=Ce(),n="1.0.25";return(r,o)=>(p(),_("div",UE,[o[2]||(o[2]=ch('<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)),v(b(Ap),{as:"h3"},{default:k(()=>o[0]||(o[0]=[N(" Moonbase Embedded Storefront ")])),_:1,__:[0]}),v(ye,null,{default:k(()=>[N(" Version "+$(b(n)),1)]),_:1}),v(Ke,null,{default:k(()=>o[1]||(o[1]=[N(" This store is using the "),L("a",{href:"https://moonbase.sh/solutions/payments",target:"_blank"},"Moonbase Embedded Storefront",-1),N(" module to accept payments, provide authentication and power software licensing. ")])),_:1,__:[1]}),v(Ve,{label:"Close",variant:"primary",handler:()=>b(t).reset()},null,8,["handler"])]))}});var Dt=(e=>(e.SignedIn="signed-in",e.SignedUp="signed-up",e.SignedOut="signed-out",e.RedeemedVoucher="redeemed-voucher",e.StorefrontUpdated="storefront-updated",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))(Dt||{});const FE=["data-corners","data-variant"],HE={class:"moonbase:card-content"},nn=le({__name:"MoonCard",setup(e){const t=fe(at);return(n,r)=>{var o,s;return p(),_("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},[L("div",HE,[Nt(n.$slots,"default")]),Nt(n.$slots,"addon")],8,FE)}}}),qE=["data-corners"],zE=["href"],WE=["src"],ZE=["src"],YE={key:2,class:"moonbase:image-placeholder"},At=le({__name:"ProductIcon",props:{url:{},href:{},size:{}},setup(e){const t=fe(at);return(n,r)=>{var o;return p(),_("div",{class:"moonbase:product-icon",style:Vo({width:`${n.size}px`,height:`${n.size}px`}),"data-corners":(o=b(t))==null?void 0:o.theme.corners},[n.href&&n.url?(p(),_("a",{key:0,href:n.href},[L("img",{src:n.url,alt:""},null,8,WE)],8,zE)):n.url?(p(),_("img",{key:1,src:n.url,alt:""},null,8,ZE)):(p(),_("div",YE,[v(b(Bw))]))],12,qE)}}}),KE={},GE={class:"moonbase:text-title"};function QE(e,t){return p(),_("h4",GE,[Nt(e.$slots,"default")])}const hr=ar(KE,[["render",QE]]),XE={class:"moonbase:product-card-content"},JE=["href"],Om=le({__name:"ProductCard",props:{product:{}},setup(e){return(t,n)=>(p(),H(nn,{class:"moonbase:product-card"},{default:k(()=>[v(At,{url:t.product.iconUrl,size:72},null,8,["url"]),L("div",XE,[v(hr,null,{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.name),1)]}),_:1}),v(ye,null,{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.tagline),1)]}),_:1}),t.product.website?(p(),_("a",{key:0,class:"moonbase:product-card-website",href:t.product.website,target:"_blank",rel:"noopener noreferrer"},[v(b(Ku)),n[0]||(n[0]=N(" Visit website "))],8,JE)):z("",!0),Nt(t.$slots,"description")]),Nt(t.$slots,"default")]),_:3}))}}),e5={class:"moonbase:auto-activation"},t5={key:0,class:"moonbase:loader"},n5={key:1,class:"moonbase:loader"},r5={key:2,class:"moonbase:loader"},o5={key:3},s5={key:1,class:"moonbase:loader"},i5={key:2,class:"moonbase:loader"},a5={key:3,class:"moonbase:loader"},l5={key:4,class:"moonbase:auto-activation-content"},u5={key:0,class:"moonbase:auto-activation-option"},c5={class:"moonbase:auto-activation-cta"},d5={key:1,class:"moonbase:auto-activation-option"},f5={class:"moonbase:auto-activation-cta"},h5={key:2,class:"moonbase:auto-activation-option"},p5={key:3,class:"moonbase:auto-activation-option"},m5={class:"moonbase:auto-activation-cta"},g5={key:4,class:"moonbase:auto-activation-option"},b5={key:4,class:"moonbase:auto-activation-cta"},v5={key:5,class:"moonbase:auto-activation-cta"},y5=le({__name:"AutoActivation",setup(e){const t=Ce(),{user:n,loaded:r}=Re(),o=fe(Hr),s=t.getParameter("token"),{activationRequest:i,loading:a,fulfilling:l,completing:u,error:c,fulfillLicense:d,fulfillTrial:f}=e1(s),h=fe(Ft);Ze(i,E=>{var O;!l.value&&!u.value&&(E==null?void 0:E.status)===mn.Requested&&((O=E==null?void 0:E.licenseEligibility)!=null&&O.eligible)&&d(),(E==null?void 0:E.status)===mn.Completed&&(o==null||o(Dt.ActivatedProduct,{product:E.product,fulfillmentType:E.fulfillmentType,user:n.value}))},{deep:!0});const m=Z(()=>{if(i.value)return b(fi(i.value.product.id))}),y=Z(()=>m.value&&m.value.defaultVariation),{currency:x,addToCart:P,setQuantity:C}=Bn();function U(){t.show(te.Product,W.ViewProduct,{product_id:i.value.product.id})}function M(){t.enqueue(te.Activation,W.ActivateProduct,t.parameters??void 0),t.show(te.Authentication,W.SignIn)}function I(){if(!m.value)return;const E=P(m.value);C(E,1),t.enqueue(te.Activation,W.ActivateProduct,t.parameters),t.show(te.Cart,W.ViewCart)}function V(){var E;t.enqueue(te.Activation,W.ActivateProduct,{...t.parameters,product_id:((E=i.value)==null?void 0:E.product.id)??""}),n.value?t.show(te.Customer,W.RedeemVoucher):t.show(te.Redeem,W.RedeemVoucher)}return(E,O)=>{var T,A,R,B,q,be,pe;return p(),_("div",e5,[b(a)||!b(r)||!((T=b(h))!=null&&T.loadedStorefront)?(p(),_("div",t5,[v(zt)])):b(c)?(p(),_("div",n5,[v(qe,null,{default:k(()=>O[0]||(O[0]=[N(" Uh oh ")])),_:1,__:[0]}),v(Ke,null,{default:k(()=>[N($(b(c)),1)]),_:1})])):b(i)?(p(),_("div",o5,[b(i).product?(p(),H(Om,{key:0,product:b(i).product},null,8,["product"])):z("",!0),((A=b(i))==null?void 0:A.status)===b(mn).Cancelled?(p(),_("div",s5,[v(qe,null,{default:k(()=>O[3]||(O[3]=[N(" Uh oh ")])),_:1,__:[3]}),v(Ke,null,{default:k(()=>O[4]||(O[4]=[N(" This activation request was cancelled, open your app to try again. ")])),_:1,__:[4]})])):b(l)||b(u)?(p(),_("div",i5,[v(zt),v(Ke,null,{default:k(()=>[N(" Activating "+$(b(i).product.name)+"... ",1)]),_:1})])):((R=b(i))==null?void 0:R.status)===b(mn).Completed?(p(),_("div",a5,[v(qe,null,{default:k(()=>O[5]||(O[5]=[N(" Done! ")])),_:1,__:[5]}),v(Ke,null,{default:k(()=>O[6]||(O[6]=[N(" Your product is activated. "),L("br",null,null,-1),N(" You may close this window and return to the app. ")])),_:1,__:[6]})])):(p(),_("div",l5,[y.value?(p(),_("div",u5,[v(qe,null,{default:k(()=>O[7]||(O[7]=[N(" Option 1: Purchase product ")])),_:1,__:[7]}),v(Ke,null,{default:k(()=>[N(" Buy a copy of "+$(m.value.name)+" for ",1),L("strong",null,$(b(xt)(m.value.defaultVariation.price[b(x)],b(x))),1),O[8]||(O[8]=N(". "))]),_:1,__:[8]}),L("span",c5,[v(Ve,{label:"Purchase",variant:"primary",handler:()=>I()},null,8,["handler"])])])):z("",!0),b(n)?!b(n).ownedProducts||!((B=b(n).ownedProducts)!=null&&B.includes(b(i).product.id))&&!b(n).subscribedProducts||!((q=b(n).subscribedProducts)!=null&&q.includes(b(i).product.id))?(p(),_("div",h5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[10]||(O[10]=[N(" You don't own any licenses for this product. ")])),_:1,__:[10]})])):(be=b(n).ownedProducts)!=null&&be.includes(b(i).product.id)||(pe=b(n).subscribedProducts)!=null&&pe.includes(b(i).product.id)?(p(),_("div",p5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[11]||(O[11]=[N(" 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]}),L("span",m5,[v(Ve,{label:"Licenses",variant:"secondary",handler:()=>U()},null,8,["handler"])])])):z("",!0):(p(),_("div",d5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[9]||(O[9]=[N(" Please sign in to use a license for this product. ")])),_:1,__:[9]}),L("span",f5,[v(Ve,{label:"Sign in",variant:"secondary",handler:()=>M()},null,8,["handler"])])])),b(i).trialEligibility?(p(),_("div",g5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"3":"2")+": Start trial ",1)]),_:1}),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(p(),H(Ke,{key:0},{default:k(()=>O[12]||(O[12]=[N(" You need to be signed in to start a trial for this product. ")])),_:1,__:[12]})):b(i).trialEligibility.eligible&&b(i).trialEligibility.existing?(p(),H(Ke,{key:1},{default:k(()=>[N(" You are eligible for a "+$(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial of which you have "+$(b(i).trialEligibility.numberOfDaysRemaining)+" days remaining. ",1)]),_:1})):b(i).trialEligibility.eligible?(p(),H(Ke,{key:2},{default:k(()=>[N(" You are eligible for a "+$(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial. ",1)]),_:1})):(p(),H(Ke,{key:3},{default:k(()=>O[13]||(O[13]=[N(" This device or product is not eligible for a trial. ")])),_:1,__:[13]})),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(p(),_("span",b5,[v(Ve,{label:"Sign in",variant:"secondary",handler:()=>M()},null,8,["handler"])])):b(i).trialEligibility.eligible?(p(),_("span",v5,[v(Ve,{label:"Start trial",variant:"secondary",handler:b(f)},null,8,["handler"])])):z("",!0)])):z("",!0),O[15]||(O[15]=L("div",{class:"moonbase:grow"},null,-1)),v(ye,{class:"moonbase:auto-activation-redeem"},{default:k(()=>[O[14]||(O[14]=N(" Have a voucher code? ")),L("button",{type:"button",onClick:V}," Redeem now ")]),_:1,__:[14]})]))])):(p(),_("div",r5,[v(qe,null,{default:k(()=>O[1]||(O[1]=[N(" Uh oh ")])),_:1,__:[1]}),v(Ke,null,{default:k(()=>O[2]||(O[2]=[N(" Could not find activation request ")])),_:1,__:[2]})]))])}}}),w5={},_5={class:"moonbase:text-caption"};function E5(e,t){return p(),_("span",_5,[Nt(e.$slots,"default")])}const Wt=ar(w5,[["render",E5]]),k5=["data-corners"],x5=["accept"],A5={"data-error":""},C5=le({__name:"DeviceTokenInput",props:{error:{}},emits:["input","error"],setup(e,{emit:t}){const n=t,r=fe(at),o=j(!1),s=Z(()=>{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 p(),_("div",{class:Rs(["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]=Lr(()=>{},["prevent","stop"])),onDragstart:c[1]||(c[1]=Lr(()=>{},["prevent","stop"])),onDragend:c[2]||(c[2]=Lr(h=>o.value=!1,["prevent","stop"])),onDragover:c[3]||(c[3]=Lr(h=>o.value=!0,["prevent","stop"])),onDragenter:c[4]||(c[4]=Lr(h=>o.value=!0,["prevent","stop"])),onDragleave:c[5]||(c[5]=Lr(h=>o.value=!1,["prevent","stop"])),onDrop:Lr(a,["prevent","stop"])},[v(b(Fw)),c[6]||(c[6]=L("label",{for:"fallback-input"},[L("span",{class:"moonbase:underline"},"Choose a machine file"),N(" or drag here to upload ")],-1)),L("input",{id:"fallback-input",type:"file",accept:s.value,class:"moonbase:sr-only",onChange:l},null,40,x5),L("p",A5,$((f=u.error)==null?void 0:f.message),1)],42,k5)}}}),O5={class:"moonbase:manual-activation"},S5={key:1,class:"moonbase:loader"},N5={key:2,class:"moonbase:manual-activation-content"},P5=le({__name:"ManualActivation",setup(e){const t=fe(at),{activateProduct:n}=fo(),r=Yi.Offline,o=j(0),s=j(null),i=j(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)=>(p(),_("div",O5,[v(Ke,null,{default:k(()=>u[2]||(u[2]=[N(" 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]}),v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[o.value===0?(p(),H(C5,{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?(p(),_("div",S5,[v(zt)])):o.value===2&&i.value?(p(),_("div",N5,[v(qe,null,{default:k(()=>u[3]||(u[3]=[N(" Success! ")])),_:1,__:[3]}),v(Ke,null,{default:k(()=>u[4]||(u[4]=[N(" Your license can be downloaded below: ")])),_:1,__:[4]}),i.value.license.product?(p(),H(Om,{key:0,product:i.value.license.product},{description:k(()=>[v(Wt,null,{default:k(()=>[N($(i.value.license.activeNumberOfActivations)+" of "+$(i.value.license.maxNumberOfActivations)+" devices activated ",1)]),_:1})]),default:k(()=>{var c;return[v(Xo,{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:k(()=>[v(b(Dp))]),_:1},8,["href","download"])]}),_:1},8,["product"])):z("",!0),u[5]||(u[5]=L("div",null,null,-1)),u[6]||(u[6]=L("div",null,null,-1))])):z("",!0)]),_:1})]))}}),T5={class:"moonbase:activation"},I5=le({__name:"Activation",setup(e){const t=Ce();return(n,r)=>(p(),_("div",T5,[b(t).getParameter("token")?(p(),H(y5,{key:0})):(p(),H(P5,{key:1}))]))}}),D5=["disabled"],Sm=Symbol("form-state"),zn=le({__name:"MoonForm",props:{handler:{type:Function},disabled:{type:Boolean},noReset:{type:Boolean}},setup(e){const t=e,n=j(!1),r=j(!1),o=j(!1),s=Z(()=>t.disabled||n.value||r.value||!1);Yt(Sm,{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)=>(p(),_("form",{disabled:s.value,onSubmit:Lr(i,["prevent"])},[Nt(a.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,D5))}}),$5=["hidden"],M5=["for"],V5=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby","data-corners"],L5=["id"],R5=["id"],Ct=le({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=fe(at);return(n,r)=>{var o;return p(),_("div",{class:"moonbase:input",hidden:n.hidden||void 0},[L("label",{for:`mb-${n.name}`},$(n.label),9,M5),L("input",vu({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,V5),n.error?(p(),_("p",{key:0,id:`mb-${n.name}-error`,class:"moonbase:input-hint","data-type":"error"},$(n.error),9,L5)):n.hint?(p(),_("p",{key:1,id:`mb-${n.name}-hint`,class:"moonbase:input-hint"},$(n.hint),9,R5)):z("",!0)],8,$5)}}}),Wn=le({__name:"MoonSubmitButton",props:{label:{},success:{},error:{},variant:{},size:{}},setup(e){const{working:t,isSuccess:n,isError:r,disabled:o}=fe(Sm);return(s,i)=>(p(),H(Ci,{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"]))}}),j5=["data-visible"],U5={class:"moonbase:sign-in-actions"},B5=["data-corners"],F5=le({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(at),i=fe(Hr),a=j(r.getParameter("email")??""),l=j(""),u=j(null);async function c(){u.value=null;try{const d=await o.signIn(a.value,l.value);i==null||i(Dt.SignedIn,{user:d}),Ht(1500).then(()=>n("signedIn",d))}catch(d){throw d instanceof Ar?u.value="User not found":u.value=d.message,d}}return(d,f)=>(p(),H(zn,{handler:c,class:"moonbase:sign-in"},{default:k(()=>{var h,m,y;return[v(Ct,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),v(Ct,{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=x=>l.value=x),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),L("span",{class:"moonbase:error","data-visible":!!u.value||void 0},$(u.value),9,j5),v(Wn,{success:"Signed in",label:"Sign in",error:"Error"}),L("div",U5,[(h=b(s))!=null&&h.auth.signUp.enabled?(p(),H(Ve,{key:0,label:"Create account",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).SignUp,{email:a.value})},null,8,["handler"])):z("",!0),v(Ve,{label:"Forgot password",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).ForgotPassword,{email:a.value})},null,8,["handler"])]),(m=b(s))!=null&&m.auth.signIn.hint?(p(),_("div",{key:0,class:"moonbase:sign-in-hint","data-corners":(y=b(s))==null?void 0:y.theme.corners},[v(b(qw)),v(ye,null,{default:k(()=>[N($(b(s).auth.signIn.hint),1)]),_:1})],8,B5)):z("",!0)]}),_:1}))}}),sl="data:image/png;base64,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",vc={default:[{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)}],lax:[{title:"Password must be at least 6 characters long",test:e=>e.length>=6}]},H5={key:0,class:"moonbase:loader"},q5={key:1,class:"moonbase:error","data-visible":""},z5={class:"moonbase:connectable-providers"},W5={class:"moonbase:provider-info"},Z5=["src","alt"],Y5={key:0,class:"moonbase:password-validation"},K5=["data-visible"],G5=le({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ce(),{confirmAccount:o,resetPassword:s,signIn:i}=Re(),a=fe(at),l=j(!0),u=j(null),c=j(!1),d=j(null),f=j(""),h=j(!1),m=j(null),y=Z(()=>{var O;return(((O=d.value)==null?void 0:O.connectedAccounts)??[]).filter(T=>!T.isConnected)}),x=Z(()=>vc[(a==null?void 0:a.value.auth.passwords)??"default"]),P=Z(()=>x.value.some(O=>!O.test(f.value)));Ue(async()=>{try{const O=r.getParameter("email"),T=r.getParameter("code");if(!O||!T)throw new Error("Link is broken");u.value=await o(O,T)}catch(O){O instanceof Ar?m.value="Could not find a user to confirm":m.value=O.message}l.value=!1});async function C(){var O,T;if(m.value=null,!!((O=u.value)!=null&&O.resetPasswordToken))try{const A=r.getParameter("email");await s(A,f.value,(T=u.value)==null?void 0:T.resetPasswordToken);const R=await i(A,f.value);if((R.connectedAccounts??[]).some(q=>!q.isConnected)){d.value=R,c.value=!0;return}Ht(1500).then(()=>n("confirmedAccount",R))}catch(A){throw m.value=A.message,A}}function U(O){switch(O){case"iLok":return"iLok"}}function M(O){switch(O){case"iLok":return"Link your iLok account to streamline license delivery and activation."}}function I(O){switch(O){case"iLok":return sl}}function V(O){r.show(te.Customer,W.ConnectAccount,{provider_id:O})}function E(){d.value&&n("confirmedAccount",d.value)}return(O,T)=>(p(),H(zn,{handler:C,disabled:P.value,class:"moonbase:confirm-account"},{default:k(()=>[l.value?(p(),_("div",H5,[v(zt)])):u.value?(p(),_(de,{key:2},[c.value?(p(),_(de,{key:0},[v(hr,null,{default:k(()=>T[2]||(T[2]=[N("Connect your accounts")])),_:1,__:[2]}),v(Ke,null,{default:k(()=>T[3]||(T[3]=[N(" You can connect these external account providers now or later from your account settings. ")])),_:1,__:[3]}),L("ul",z5,[(p(!0),_(de,null,rt(y.value,A=>(p(),_("li",{key:A.provider},[L("div",W5,[I(A.provider)?(p(),_("img",{key:0,src:I(A.provider),alt:U(A.provider),class:"moonbase:provider-logo"},null,8,Z5)):z("",!0),L("div",null,[v(qe,null,{default:k(()=>[N($(U(A.provider)),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(M(A.provider)),1)]),_:2},1024)])]),v(Ve,{label:"Connect",handler:()=>V(A.provider)},null,8,["handler"])]))),128))]),v(Ve,{label:"Continue",variant:"secondary",handler:E})],64)):(p(),_(de,{key:1},[v(hr,null,{default:k(()=>[N(" Hi "+$(u.value.name)+", ",1)]),_:1}),v(Ke,null,{default:k(()=>T[4]||(T[4]=[N(" Please create a new password for your account: ")])),_:1,__:[4]}),v(Ct,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),v(Ct,{modelValue:f.value,"onUpdate:modelValue":T[0]||(T[0]=A=>f.value=A),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:T[1]||(T[1]=A=>h.value=!0)},null,8,["modelValue"]),h.value&&P.value?(p(),_("div",Y5,[(p(!0),_(de,null,rt(x.value.filter(A=>!A.test(f.value)),A=>(p(),H(ye,{key:A.title,"data-error":""},{default:k(()=>[N($(A.title),1)]),_:2},1024))),128))])):z("",!0),v(Wn,{success:"Password saved",label:"Save password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!m.value||void 0},$(m.value),9,K5)],64))],64)):(p(),_("div",q5,$(m.value),1))]),_:1},8,["disabled"]))}}),Q5={class:"moonbase:confirm-email-change"},X5={key:0,class:"moonbase:loader"},J5={key:1,class:"moonbase:error","data-visible":""},ek=le({__name:"ConfirmEmail",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ce(),{user:o,confirmEmail:s}=Re(),i=j(!0),a=j(null);return Ue(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)=>(p(),_("div",Q5,[i.value?(p(),_("div",X5,[v(zt)])):a.value?(p(),_("div",J5,$(a.value),1)):(p(),_(de,{key:2},[v(qe,null,{default:k(()=>u[0]||(u[0]=[N(" Success! ")])),_:1,__:[0]}),u[1]||(u[1]=L("p",null," Thanks for confirming your new email. ",-1)),b(o)?(p(),H(Ve,{key:0,handler:()=>b(r).show(b(te).Customer,b(W).ViewAccount,void 0,!0),label:"Continue"},null,8,["handler"])):z("",!0)],64))]))}}),tk={class:"moonbase:confirm-email-change"},nk={key:0,class:"moonbase:loader"},rk={key:1,class:"moonbase:error","data-visible":""},ok=le({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ce(),{user:o,confirmEmailChange:s}=Re(),i=j(!0),a=j(null);return Ue(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 p(),_("div",tk,[i.value?(p(),_("div",nk,[v(zt)])):a.value?(p(),_("div",rk,$(a.value),1)):(p(),_(de,{key:2},[L("h3",null," Hi "+$((c=b(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=L("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}}),sk=["data-visible"],ik=le({__name:"ForgotPassword",setup(e){const t=Ce(),n=Re(),r=j(t.getParameter("email")??""),o=j(null),s=j(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Ht(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Ar?o.value="User not found":o.value=a.message,a}}return(a,l)=>(p(),H(zn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:k(({disabled:u})=>[l[1]||(l[1]=L("p",null," Please enter your email address below. You will receive an email message with instructions on how to reset your password. ",-1)),v(Ct,{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"]),v(Wn,{success:"Email sent",label:"Reset password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!o.value||void 0},$(o.value),9,sk)]),_:1,__:[1]}))}}),ak={key:0,class:"moonbase:password-validation"},lk=["data-visible"],uk=le({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(at),i=Z(()=>r.getParameter("email")),a=j(""),l=j(!1),u=j(null),c=Z(()=>vc[(s==null?void 0:s.value.auth.passwords)??"default"]),d=Z(()=>c.value.some(h=>!h.test(a.value)));Ue(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(u.value="Link broken, please try again")});async function f(){u.value=null;const h=r.getParameter("code");if(h)try{await o.resetPassword(i.value,a.value,h);const m=await o.signIn(i.value,a.value);Ht(1500).then(()=>n("passwordReset",m))}catch(m){throw u.value=m.message,m}}return(h,m)=>(p(),H(zn,{handler:f,disabled:d.value,class:"moonbase:reset-password"},{default:k(()=>[L("h3",null," Hi "+$(i.value)+", ",1),m[2]||(m[2]=L("p",null," Please create a new password for your account: ",-1)),v(Ct,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),v(Ct,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=y=>a.value=y),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:m[1]||(m[1]=y=>l.value=!0)},null,8,["modelValue"]),l.value&&d.value?(p(),_("div",ak,[(p(!0),_(de,null,rt(c.value.filter(y=>!y.test(a.value)),y=>(p(),H(ye,{key:y.title,"data-error":""},{default:k(()=>[N($(y.title),1)]),_:2},1024))),128))])):z("",!0),v(Wn,{success:"Password saved",label:"Save password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!u.value||void 0},$(u.value),9,lk)]),_:1,__:[2]},8,["disabled"]))}}),ck={class:"moonbase:checkbox"},dk={class:"moonbase:checkbox-container"},fk=["id","name","checked","disabled","aria-invalid","aria-describedby"],hk={class:"moonbase:checkbox-description"},pk=["for"],mk=["id"],gk=["id"],Nm=le({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(p(),_("div",ck,[L("div",dk,[L("input",vu({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,fk)]),L("div",hk,[L("label",{for:`mb-${t.name}`},$(t.label),9,pk),t.error?(p(),_("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},$(t.error),9,mk)):t.hint?(p(),_("p",{key:1,id:`mb-${t.name}-hint`},$(t.hint),9,gk)):z("",!0)])]))}}),bk={key:0,class:"moonbase:password-validation"},vk=["href"],yk=["href"],wk=["data-visible"],_k=le({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(_c),i=fe(Hr),a=fe(at),l=j(""),u=j(r.getParameter("email")??""),c=j(""),d=j(!1),f=j((a==null?void 0:a.value.auth.signUp.marketingConsent)===Po.OptOut||(a==null?void 0:a.value.auth.signUp.marketingConsent)===Po.OptedInByDefault),h=j(null),m=Z(()=>vc[(a==null?void 0:a.value.auth.passwords)??"default"]),y=Z(()=>m.value.some(P=>!P.test(c.value)));async function x(){h.value=null;try{const P=await o.signUp(l.value,u.value,c.value,null,!0,!0,f.value);i==null||i(Dt.SignedUp,{user:P}),Ht(1500).then(()=>n("signedUp",P))}catch(P){throw h.value=P.message,P}}return(P,C)=>(p(),H(zn,{handler:x,disabled:y.value,class:"moonbase:sign-up"},{default:k(()=>{var U;return[v(Ct,{modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=M=>l.value=M),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),v(Ct,{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=M=>u.value=M),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),v(Ct,{modelValue:c.value,"onUpdate:modelValue":C[2]||(C[2]=M=>c.value=M),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:"",onBlur:C[3]||(C[3]=M=>d.value=!0)},null,8,["modelValue"]),d.value&&y.value?(p(),_("div",bk,[(p(!0),_(de,null,rt(m.value.filter(M=>!M.test(c.value)),M=>(p(),H(ye,{key:M.title,"data-error":""},{default:k(()=>[N($(M.title),1)]),_:2},1024))),128))])):z("",!0),((U=b(a))==null?void 0:U.auth.signUp.marketingConsent)!==b(Po).OptOut?(p(),H(Nm,{key:1,modelValue:f.value,"onUpdate:modelValue":C[4]||(C[4]=M=>f.value=M),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"])):z("",!0),v(ye,null,{default:k(()=>{var M;return[C[5]||(C[5]=N(" By signing up, you accept our ")),L("a",{href:`${b(s)}/terms-of-use`,target:"_blank",rel:"noopener"},"terms",8,vk),C[6]||(C[6]=N(" and ")),L("a",{href:`${b(s)}/privacy-policy`,target:"_blank",rel:"noopener"},"privacy policy",8,yk),C[7]||(C[7]=N(". ")),((M=b(a))==null?void 0:M.auth.signUp.marketingConsent)===b(Po).OptOut?(p(),_(de,{key:0},[N(" You also agree to receive updates and offers by email. ")],64)):z("",!0)]}),_:1,__:[5,6,7]}),v(Wn,{success:"Signed up",label:"Sign up",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!h.value||void 0},$(h.value),9,wk),v(Ve,{label:"I already have an account",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).SignIn,{email:u.value})},null,8,["handler"])]}),_:1},8,["disabled"]))}}),Ek={class:"moonbase:authentication"},kk={key:0,class:"moonbase:loader"},xk=le({__name:"Authentication",setup(e){const t=Ce(),{loaded:n}=Re();return(r,o)=>(p(),_("div",Ek,[v(ui,{name:b(t).direction===b(Mu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:k(()=>[b(n)?b(t).intent===b(W).SignIn?(p(),H(F5,{key:1,onSignedIn:o[0]||(o[0]=s=>b(t).dequeue())})):b(t).intent===b(W).SignUp?(p(),H(_k,{key:2,onSignedUp:o[1]||(o[1]=s=>b(t).next?b(t).dequeue():b(t).show(b(te).Customer,b(W).ViewAccount,void 0,!0))})):b(t).intent===b(W).ConfirmAccount?(p(),H(G5,{key:3,onConfirmedAccount:o[2]||(o[2]=s=>b(t).show(b(te).Customer,b(W).ViewProducts,void 0,!0))})):b(t).intent===b(W).ConfirmEmail?(p(),H(ek,{key:4})):b(t).intent===b(W).ConfirmEmailChange?(p(),H(ok,{key:5})):b(t).intent===b(W).ForgotPassword?(p(),H(ik,{key:6})):b(t).intent===b(W).ResetPassword?(p(),H(uk,{key:7,onPasswordReset:o[3]||(o[3]=s=>b(t).show(b(te).Customer,b(W).ViewAccount,void 0))})):z("",!0):(p(),_("div",kk,[v(zt)]))]),_:1},8,["name"])]))}}),Ak={},Ck={class:"moonbase:text-subtext-bold"};function Ok(e,t){return p(),_("span",Ck,[Nt(e.$slots,"default")])}const et=ar(Ak,[["render",Ok]]);function il(){const e=fe(Ft);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 Sk=["data-corners","data-cards"],Pm=le({__name:"Counter",props:{modelValue:{}},emits:["update:modelValue"],setup(e){const t=fe(at);return(n,r)=>{var o,s;return p(),_("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},[L("button",{onClick:r[0]||(r[0]=i=>n.$emit("update:modelValue",n.modelValue-1))},[v(b(zw))]),v(ye,null,{default:k(()=>[N($(n.modelValue.toString().padStart(2,"0")),1)]),_:1}),L("button",{onClick:r[1]||(r[1]=i=>n.$emit("update:modelValue",n.modelValue+1))},[v(b(Ww))])],8,Sk)}}});function Oi(e){switch(e){case kr.Daily:return"day";case kr.Weekly:return"week";case kr.Monthly:return"month";case kr.Quarterly:return"quarter";case kr.Yearly:return"year"}throw new Error("Unknown cycle length")}const Nk={class:"moonbase:bundle-cart-item-content"},Pk={key:0,class:"moonbase:bundle-cart-item-total"},Tk={key:0,class:"moonbase:discount"},Ik={class:"moonbase:bundle-cart-item-summary"},Dk=["data-open"],$k=["data-open"],Mk={class:"moonbase:bundle-cart-item-product-list-item-content"},Vk={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Lk=le({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=Va(t.lineItem.bundleId),r=fe(at),o=Bn(),s=j(!1),i=j(null),a=Z(()=>{var l;return((l=t.lineItem.price)==null?void 0:l[o.currency.value])===0});return Ze(s,l=>{i.value&&(i.value.style.height=l?`${i.value.scrollHeight}px`:"0px")}),(l,u)=>{var c;return p(),H(nn,{class:"moonbase:bundle-cart-item"},xa({default:k(()=>{var d,f,h,m,y,x,P;return[v(At,{url:(d=l.lineItem.bundle)==null?void 0:d.iconUrl,size:72},null,8,["url"]),L("div",Nk,[v(et,null,{default:k(()=>{var C;return[N($((C=l.lineItem.bundle)==null?void 0:C.name),1)]}),_:1}),v(ye,{class:"moonbase:bundle-cart-item-tagline","data-truncate":l.lineItem.variation&&l.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)||void 0},{default:k(()=>{var C;return[N($((C=l.lineItem.bundle)==null?void 0:C.tagline),1)]}),_:1},8,["data-truncate"]),l.lineItem.variation&&l.lineItem.variation.id!==((y=(m=b(n))==null?void 0:m.defaultVariation)==null?void 0:y.id)?(p(),H(ye,{key:0,class:"moonbase:bundle-cart-item-variation"},{default:k(()=>[N($(l.lineItem.variation.name),1)]),_:1})):z("",!0)]),l.lineItem.variation?(p(),_("div",Pk,[v(On,null,{default:k(()=>{var C;return[l.lineItem.variation.hasDiscount?(p(),_("span",Tk,$(b(xt)(l.lineItem.variation.originalPrice[l.currency]*l.lineItem.quantity,l.currency)),1)):z("",!0),N(" "+$(b(xt)(l.lineItem.variation.price[l.currency]*l.lineItem.quantity,l.currency))+" ",1),((C=l.lineItem.variation)==null?void 0:C.recurrence.type)==="Recurring"?(p(),H(Ke,{key:1},{default:k(()=>[N(" / "+$(b(Oi)(l.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):z("",!0)]}),_:1}),(a.value?((x=b(r))==null?void 0:x.cart.leadMagnets.quantity)==="selectable":((P=b(r))==null?void 0:P.cart.quantity)==="selectable")?(p(),H(Pm,{key:0,"model-value":l.lineItem.quantity,"onUpdate:modelValue":u[0]||(u[0]=C=>b(o).setQuantity(l.lineItem,C))},null,8,["model-value"])):(p(),H(Ve,{key:1,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(l.lineItem,0)},null,8,["handler"]))])):z("",!0)]}),_:2},[(c=b(r))!=null&&c.cart.bundles.showProducts?{name:"addon",fn:k(()=>{var d;return[L("div",Ik,[l.lineItem.bundle?(p(),_("button",{key:0,onClick:u[1]||(u[1]=f=>s.value=!s.value)},[v(et,null,{default:k(()=>{var f,h,m;return[N($((f=l.lineItem.bundle)==null?void 0:f.products.filter(y=>y.included).length)+" ",1),(h=l.lineItem.bundle)!=null&&h.products.some(y=>!y.included)?(p(),_(de,{key:0},[N(" of "+$((m=l.lineItem.bundle)==null?void 0:m.products.length),1)],64)):z("",!0),u[2]||(u[2]=N(" products "))]}),_:1,__:[2]}),v(ye,null,{default:k(()=>[N($(s.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},u[3]||(u[3]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,Dk))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:i,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(p(!0),_(de,null,rt(((d=l.lineItem.bundle)==null?void 0:d.products)||[],f=>(p(),_("div",{key:f.id,class:"moonbase:bundle-cart-item-product-list-item"},[v(At,{url:f==null?void 0:f.iconUrl,size:48},null,8,["url"]),L("div",Mk,[v(et,{"data-included":f.included||void 0},{default:k(()=>[f.included?(p(),_("svg",Vk,u[4]||(u[4]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):z("",!0),N(" "+$(f==null?void 0:f.name),1)]),_:2},1032,["data-included"]),f.included?f!=null&&f.tagline?(p(),H(ye,{key:1},{default:k(()=>[N($(f.tagline),1)]),_:2},1024)):z("",!0):(p(),H(ye,{key:0},{default:k(()=>u[5]||(u[5]=[N(" You already own this ")])),_:1,__:[5]}))])]))),128))],8,$k)]}),key:"0"}:void 0]),1024)}}}),Rk={class:"moonbase:cart-offer-target-list-item"},jk={class:"moonbase:cart-offer-target-list-item-content"},Uk=["href"],Bk={class:"moonbase:cart-offer-target-list-item-cta"},Fk={key:0,class:"moonbase:discount"},Hk=le({__name:"OfferMultiTargetItem",props:{offer:{},target:{}},setup(e){const t=e,n=fe(at),{addToCart:r,currency:o}=Bn(),s=Z(()=>{var l;return(l=t.target.defaultVariation)==null?void 0:l.originalPrice}),i=Z(()=>t.target.defaultVariation?Pl.subtract(t.target.defaultVariation.price,Ji.apply(t.offer.discount,t.target.defaultVariation.price)):s.value),a=Z(()=>!$u(s.value,i.value));return(l,u)=>(p(),_("div",Rk,[v(At,{url:l.target.iconUrl,href:l.target.type==="Product"?l.target.website:void 0,size:48},null,8,["url","href"]),L("div",jk,[v(et,null,{default:k(()=>[l.target.type==="Product"&&l.target.website?(p(),_("a",{key:0,href:l.target.website},$(l.target.name),9,Uk)):(p(),_(de,{key:1},[N($(l.target.name),1)],64))]),_:1}),l.target.tagline?(p(),H(ye,{key:0},{default:k(()=>[N($(l.target.tagline),1)]),_:1})):z("",!0)]),L("div",Bk,[i.value?(p(),H(On,{key:0},{default:k(()=>[a.value&&s.value?(p(),_("span",Fk,$(b(xt)(s.value[b(o)],b(o))),1)):z("",!0),N(" "+$(b(xt)(i.value[b(o)],b(o))),1)]),_:1})):z("",!0),v(Ve,{label:"Add to cart",variant:"secondary",size:"small",handler:()=>{var c;return b(r)(l.target,void 0,l.offer,{bundleBehaviour:(c=b(n))==null?void 0:c.cart.bundles.onAdd})}},null,8,["handler"])])]))}}),qk={class:"moonbase:cart-offer--multi-target-icons"},zk={class:"moonbase:cart-offer--multi-target-content"},Wk=["data-open"],Zk=le({__name:"OfferMultiTargetUpsell",props:{offer:{},targets:{}},setup(e){const t=e,n=j(!1),r=j(null);Ze(n,s=>{r.value&&(r.value.style.height=s?`${r.value.scrollHeight}px`:"0px")});const o=Z(()=>Math.max(36,96/t.targets.length*1.5));return(s,i)=>(p(),H(nn,{class:"moonbase:cart-offer--multi-target"},{addon:k(()=>[L("div",{ref_key:"targetListRef",ref:r,class:"moonbase:cart-offer-target-list",style:{height:"0px"},"data-open":n.value||void 0},[(p(!0),_(de,null,rt(s.targets,a=>(p(),H(Hk,{key:a.id,target:a,offer:s.offer},null,8,["target","offer"]))),128))],8,Wk)]),default:k(()=>[L("div",qk,[(p(!0),_(de,null,rt(s.targets,(a,l)=>(p(),H(At,{key:`${a.type}/${a.id}`,url:a.iconUrl,size:o.value,style:Vo({position:"absolute",top:`${l*(96-o.value)/(s.targets.length-1)}px`,left:`${l*(96-o.value)/(s.targets.length-1)}px`,zIndex:l})},null,8,["url","size","style"]))),128))]),L("div",zk,[v(et,{class:"moonbase:cart-offer--multi-target-name"},{default:k(()=>[N($(s.offer.discount.name),1)]),_:1}),s.offer.discount.description?(p(),H(ye,{key:0,class:"moonbase:cart-offer--multi-target-description"},{default:k(()=>[N($(s.offer.discount.description),1)]),_:1})):z("",!0),v(Ve,{label:"Select product",variant:n.value?"primary":"secondary",size:"small",handler:()=>n.value=!n.value},null,8,["variant","handler"])])]),_:1}))}}),Yk={class:"moonbase:cart-offer-content"},Kk=["href"],Gk={class:"moonbase:cart-offer-cta"},Qk={key:0,class:"moonbase:discount"},Xk={class:"moonbase:cart-offer-bundle-summary"},Jk=["data-open"],ex=["data-open"],tx={class:"moonbase:cart-offer-bundle-product-list-item-content"},nx={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},rx=["href"],ox=le({__name:"OfferUpsell",props:{offer:{},target:{}},setup(e){const t=e,n=fe(at),{addToCart:r,currency:o}=Bn(),s=j(!1),i=j(null);Ze(s,c=>{i.value&&(i.value.style.height=c?`${i.value.scrollHeight}px`:"0px")});const a=Z(()=>{var c;return(c=t.target.defaultVariation)==null?void 0:c.originalPrice}),l=Z(()=>t.target.defaultVariation?Pl.subtract(t.target.defaultVariation.price,Ji.apply(t.offer.discount,t.target.defaultVariation.price)):a.value),u=Z(()=>!$u(a.value,l.value));return(c,d)=>(p(),H(nn,{class:"moonbase:cart-offer"},xa({default:k(()=>[v(At,{url:c.target.iconUrl,href:c.target.type==="Product"?c.target.website:void 0,size:64},null,8,["url","href"]),L("div",Yk,[v(et,{class:"moonbase:cart-offer-name"},{default:k(()=>[c.target.type==="Product"&&c.target.website?(p(),_("a",{key:0,href:c.target.website},$(c.offer.discount.name),9,Kk)):(p(),_(de,{key:1},[N($(c.offer.discount.name),1)],64))]),_:1}),c.offer.discount.description?(p(),H(ye,{key:0,class:"moonbase:cart-offer-description"},{default:k(()=>[N($(c.offer.discount.description),1)]),_:1})):z("",!0)]),L("div",Gk,[l.value?(p(),H(On,{key:0},{default:k(()=>[u.value&&a.value?(p(),_("span",Qk,$(b(xt)(a.value[b(o)],b(o))),1)):z("",!0),N(" "+$(b(xt)(l.value[b(o)],b(o))),1)]),_:1})):z("",!0),v(Ve,{label:"Add to cart",variant:"secondary",size:"small",handler:()=>{var f;return b(r)(c.target,void 0,c.offer,{bundleBehaviour:(f=b(n))==null?void 0:f.cart.bundles.onAdd})}},null,8,["handler"])])]),_:2},[c.target.type==="Bundle"?{name:"addon",fn:k(()=>{var f;return[L("div",Xk,[c.target?(p(),_("button",{key:0,onClick:d[0]||(d[0]=h=>s.value=!s.value)},[v(et,null,{default:k(()=>{var h,m,y;return[N(" Contains "+$((h=c.target)==null?void 0:h.products.filter(x=>x.included).length)+" ",1),(m=c.target)!=null&&m.products.some(x=>!x.included)?(p(),_(de,{key:0},[N(" of "+$((y=c.target)==null?void 0:y.products.length),1)],64)):z("",!0),d[1]||(d[1]=N(" products "))]}),_:1,__:[1]}),v(ye,null,{default:k(()=>[N($(s.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},d[2]||(d[2]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,Jk))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:i,class:"moonbase:cart-offer-bundle-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(p(!0),_(de,null,rt(((f=c.target)==null?void 0:f.products)||[],h=>(p(),_("div",{key:h.id,class:"moonbase:cart-offer-bundle-product-list-item"},[v(At,{url:h.iconUrl,href:h.website,size:48},null,8,["url","href"]),L("div",tx,[v(et,{"data-included":h.included||void 0},{default:k(()=>[h.included?(p(),_("svg",nx,d[3]||(d[3]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):z("",!0),h.website?(p(),_("a",{key:1,href:h.website},$(h.name),9,rx)):(p(),_(de,{key:2},[N($(h.name),1)],64))]),_:2},1032,["data-included"]),h.included?h.tagline?(p(),H(ye,{key:1},{default:k(()=>[N($(h.tagline),1)]),_:2},1024)):z("",!0):(p(),H(ye,{key:0},{default:k(()=>d[4]||(d[4]=[N(" You already own this ")])),_:1,__:[4]}))])]))),128))],8,ex)]}),key:"0"}:void 0]),1024))}}),sx={class:"moonbase:product-cart-item-content"},ix={class:"moonbase:product-cart-item-total"},ax={key:0,class:"moonbase:discount"},lx=le({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=fi(t.lineItem.productId),r=fe(at),o=Bn(),s=Z(()=>{var u;return((u=t.lineItem.price)==null?void 0:u[o.currency.value])===0});function i(u){var d;if(!u.variation)throw new Error("No variation found");const c=l(u);return(c==null?void 0:c.price[t.currency])??((d=u.variation)==null?void 0:d.price[t.currency])}function a(u){return!!l(u)}function l(u){var d,f;const c=((f=(d=u.variation)==null?void 0:d.pricingTiers)==null?void 0:f.filter(h=>u.quantity>=h.minQuantity))??[];return c.length>0?c[c.length-1]:null}return(u,c)=>(p(),H(nn,{class:"moonbase:product-cart-item"},{default:k(()=>{var d,f,h,m,y,x,P;return[v(At,{url:(d=u.lineItem.product)==null?void 0:d.iconUrl,size:72},null,8,["url"]),L("div",sx,[v(et,null,{default:k(()=>{var C;return[N($((C=u.lineItem.product)==null?void 0:C.name),1)]}),_:1}),v(ye,{class:"moonbase:product-cart-item-tagline","data-truncate":u.lineItem.variation&&u.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)||void 0},{default:k(()=>{var C;return[N($((C=u.lineItem.product)==null?void 0:C.tagline),1)]}),_:1},8,["data-truncate"]),u.lineItem.variation&&u.lineItem.variation.id!==((y=(m=b(n))==null?void 0:m.defaultVariation)==null?void 0:y.id)?(p(),H(ye,{key:0,class:"moonbase:product-cart-item-variation"},{default:k(()=>[N($(u.lineItem.variation.name),1)]),_:1})):z("",!0)]),L("div",ix,[u.lineItem.variation?(p(),H(On,{key:0},{default:k(()=>{var C;return[u.lineItem.variation.hasDiscount||a(u.lineItem)?(p(),_("span",ax,$(b(xt)(u.lineItem.variation.originalPrice[u.currency]*u.lineItem.quantity,u.currency)),1)):z("",!0),N(" "+$(b(xt)(i(u.lineItem)*u.lineItem.quantity,u.currency))+" ",1),((C=u.lineItem.variation)==null?void 0:C.recurrence.type)==="Recurring"?(p(),H(Ke,{key:1},{default:k(()=>[N(" / "+$(b(Oi)(u.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):z("",!0)]}),_:1})):z("",!0),(s.value?((x=b(r))==null?void 0:x.cart.leadMagnets.quantity)==="selectable":((P=b(r))==null?void 0:P.cart.quantity)==="selectable")?(p(),H(Pm,{key:1,"model-value":u.lineItem.quantity,"onUpdate:modelValue":c[0]||(c[0]=C=>b(o).setQuantity(u.lineItem,C))},null,8,["model-value"])):(p(),H(Ve,{key:2,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(u.lineItem,0)},null,8,["handler"]))])]}),_:1}))}}),ux={class:"moonbase:cart"},cx=["data-background"],dx=["data-corners"],fx={class:"moonbase:cart-total"},hx={"data-error":""},px=le({__name:"Cart",setup(e){const t=il(),n=Re(),{items:r,total:o,currency:s,checkout:i}=Bn(),a=fe(at),l=o1(),u=Z(()=>l.value.length===0?null:l.value.find(f=>Array.isArray(f.target)?f.target.some(h=>!h.owned):!f.target.owned)||l.value[0]),c=j(null);async function d(){c.value=null;try{const f=await i({redirect:(a==null?void 0:a.value.checkout.redirect)??!1,returnUrl:n.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0});if(!(f!=null&&f.completed))throw new us}catch(f){if(c.value=f.message,!(f instanceof us))if(f instanceof gn)t.reportProblem("error",{type:f.name,title:f.title,detail:f.detail,status:f.status,errors:f.errors?Object.fromEntries(Object.entries(f.errors).map(([h,m])=>[h,[m]])):void 0,instance:"Cart.vue:startCheckout"});else{const h=f;t.reportProblem("error",{type:h.name,title:h.message,instance:"Cart.vue:startCheckout"})}throw f}}return(f,h)=>{var m,y,x;return p(),_("div",ux,[b(r).length>0?(p(),_("ul",{key:0,role:"list",class:"moonbase:cart-items","data-background":(m=b(a))==null?void 0:m.theme.colors.background},[(p(!0),_(de,null,rt(b(r),P=>(p(),_("li",{key:P.id},[P.type==="Product"?(p(),H(lx,{key:0,"line-item":P,currency:b(s)},null,8,["line-item","currency"])):P.type==="Bundle"?(p(),H(Lk,{key:1,"line-item":P,currency:b(s)},null,8,["line-item","currency"])):z("",!0)]))),128)),u.value?(p(),_(de,{key:0},[h[0]||(h[0]=L("li",{class:"moonbase:grow"},null,-1)),L("li",null,[(y=b(a))!=null&&y.cart.offers.label?(p(),H(et,{key:0},{default:k(()=>{var P;return[N($((P=b(a))==null?void 0:P.cart.offers.label),1)]}),_:1})):z("",!0),b(Dn).relevantTargets(u.value,b(r)).length!==1?(p(),H(Zk,{key:1,offer:u.value,targets:b(Dn).relevantTargets(u.value,b(r))},null,8,["offer","targets"])):(p(),H(ox,{key:2,offer:u.value,target:Array.isArray(u.value.target)?b(Dn).relevantTargets(u.value,b(r))[0]:u.value.target},null,8,["offer","target"]))])],64)):z("",!0)],8,cx)):(p(),_("div",{key:1,class:"moonbase:cart-empty","data-corners":(x=b(a))==null?void 0:x.theme.corners},[v(b(Zw)),v(et,null,{default:k(()=>h[1]||(h[1]=[N(" Your cart is empty ")])),_:1,__:[1]})],8,dx)),L("div",fx,[h[2]||(h[2]=L("label",null," Total ",-1)),L("span",null,$(b(xt)(b(o).amount,b(o).currency)),1),h[3]||(h[3]=L("p",null," Sales tax to be calculated at checkout ",-1)),L("p",hx,$(c.value),1)]),v(Ve,{handler:d,disabled:b(r).length===0,label:"Checkout",error:c.value?"Error":"Cancelled",variant:"primary"},null,8,["disabled","error"])])}}});function mx(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}function yc(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}function gx(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"})])}const bx={class:"moonbase:connected-account-card"},vx={class:"moonbase:account-provider"},yx=["src","alt"],wx={key:0,class:"moonbase:pending-fulfillments"},_x=le({__name:"ConnectedAccountCard",props:{account:{}},setup(e){const t=e,n=Ce(),{disconnectAccount:r}=Re(),o=j(!1),s=j(null);function i(d){switch(d){case"iLok":return"iLok"}}function a(d){switch(d){case"iLok":return sl}}function l(d){switch(d){case"iLok":return"Link your iLok account to streamline license delivery and activation."}}async function u(){s.value=null,o.value=!0;try{await r(t.account.provider)}catch(d){s.value=d}finally{o.value=!1}}function c(){n.show(te.Customer,W.ConnectAccount,{provider_id:t.account.provider})}return(d,f)=>(p(),_("li",bx,[L("div",vx,[a(d.account.provider)?(p(),_("img",{key:0,src:a(d.account.provider),alt:i(d.account.provider)},null,8,yx)):z("",!0),L("div",null,[v(qe,null,{default:k(()=>[N($(i(d.account.provider)),1)]),_:1}),d.account.isConnected?(p(),_(de,{key:0},[d.account.accountId?(p(),H(ye,{key:0},{default:k(()=>[N(" Account ID: "+$(d.account.accountId),1)]),_:1})):z("",!0)],64)):(p(),H(ye,{key:1},{default:k(()=>[N($(l(d.account.provider)),1)]),_:1}))])]),d.account.pendingLicenseFulfillments?(p(),_("div",wx,[v(b(gx)),v(ye,null,{default:k(()=>f[0]||(f[0]=[N(" You have pending iLok licenses, connect your account to receive them. ")])),_:1,__:[0]})])):z("",!0),d.account.isConnected?(p(),H(Ve,{key:1,label:o.value?"Disconnecting...":"Disconnect",variant:"danger",handler:u,disabled:o.value},null,8,["label","disabled"])):z("",!0),s.value?(p(),H(On,{key:2,class:"moonbase:disconnect-error"},{default:k(()=>[N($(s.value.message),1)]),_:1})):z("",!0),d.account.isConnected?z("",!0):(p(),H(Ve,{key:3,label:"Connect",variant:"secondary",handler:c}))]))}}),Ex={class:"moonbase:account"},kx={key:0,class:"moonbase:error"},xx={key:1,class:"moonbase:notification"},Ax={key:0,class:"moonbase:error"},Cx={key:0,class:"moonbase:connected-accounts"},Ox=le({__name:"Account",setup(e){var U,M,I;const t=Ce(),{user:n,update:r,setPassword:o,signOut:s}=Re(),i=fe(Hr),a=j(((U=n.value)==null?void 0:U.name)??""),l=j(((M=n.value)==null?void 0:M.email)??""),u=j(((I=n.value)==null?void 0:I.communicationPreferences)??{newsletterOptIn:!1}),c=j(null),d=j(!1),f=j(""),h=j(""),m=j(null),y=Z(()=>{var V;return((V=n.value)==null?void 0:V.connectedAccounts)??[]});async function x(){c.value=null,d.value=!1;try{(await r(a.value,l.value,void 0,u.value)).needsEmailConfirmationToken&&(d.value=!0)}catch(V){throw c.value=V,V}}async function P(){m.value=null;try{await o(f.value,h.value),f.value="",h.value=""}catch(V){throw m.value=V,V}}async function C(){const V={...n.value};await s(),i==null||i(Dt.SignedOut,{user:V}),t.reset()}return(V,E)=>(p(),_("div",Ex,[v(zn,{handler:x},{default:k(()=>[v(Ct,{modelValue:a.value,"onUpdate:modelValue":E[0]||(E[0]=O=>a.value=O),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),v(Ct,{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=O=>l.value=O),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),v(Nm,{modelValue:u.value.newsletterOptIn,"onUpdate:modelValue":E[2]||(E[2]=O=>u.value.newsletterOptIn=O),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),v(Wn,{label:"Update",error:"Error",success:"Updated"}),c.value?(p(),_("p",kx,$(c.value.message),1)):d.value?(p(),_("p",xx," You need to confirm your new email address, please check your inbox ")):z("",!0)]),_:1}),v(zn,{handler:P},{default:k(()=>[v(Ct,{modelValue:f.value,"onUpdate:modelValue":E[3]||(E[3]=O=>f.value=O),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),v(Ct,{modelValue:h.value,"onUpdate:modelValue":E[4]||(E[4]=O=>h.value=O),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),v(Wn,{label:"Change password",error:"Error",success:"Password changed"}),m.value?(p(),_("p",Ax,$(m.value.message),1)):z("",!0)]),_:1}),v(Ve,{label:"Log out",success:"Logged out",error:"Error",variant:"subtle",handler:C}),y.value.length>0?(p(),_("section",Cx,[v(hr,null,{default:k(()=>E[5]||(E[5]=[N("Connected accounts")])),_:1,__:[5]}),v(Ke,null,{default:k(()=>E[6]||(E[6]=[N(" Connect your account with external providers to enable additional features. ")])),_:1,__:[6]}),L("ul",null,[(p(!0),_(de,null,rt(y.value,O=>(p(),H(_x,{key:`${O.provider}-${O.accountId}`,account:O},null,8,["account"]))),128))])])):z("",!0)]))}}),Sx={key:0,class:"moonbase:connect-account"},Nx={class:"moonbase:provider-header"},Px=["src","alt"],Tx={key:0,class:"moonbase:loader"},Ix={key:0,class:"moonbase:connected-status"},Dx={key:0,class:"moonbase:depositing"},$x={key:1,class:"moonbase:licenses-deposited"},Mx=le({__name:"ConnectAccount",setup(e){const t=Ce(),{user:n,getConnectionUrl:r,refreshUser:o}=Re(),s=j(!0),i=j(!1),a=j(!1),l=j(null),u=j(""),c=t.getParameter("provider_id"),d=Z(()=>{var U;return((U=n.value)==null?void 0:U.connectedAccounts.some(M=>M.provider===c&&M.isConnected))??!1}),f=Z(()=>{var U;return((U=n.value)==null?void 0:U.connectedAccounts.some(M=>c&&[Is.iLok].includes(c)&&M.pendingLicenseFulfillments))??!1});Ue(async()=>{if(c&&(await o(),s.value=!1,d.value&&f.value)){for(i.value=!0;f.value;)await Ht(2e3),await o();i.value=!1,a.value=!0}});function h(U){switch(U){case"iLok":return"iLok"}}function m(U){switch(U){case"iLok":return sl}}function y(U){switch(U){case"iLok":return"Link your iLok account to streamline license delivery and activation for all your purchases."}}function x(U){switch(U){case"iLok":return!0;default:return!1}}async function P(){if(c){l.value=null;try{if(x(c)&&!u.value){l.value=new Error("Please enter your login ID");return}const U=window.location.href.split("?")[0],M=await r(c,U,u.value||void 0);window.location.href=M}catch(U){throw l.value=U,U}}}function C(){t.history.length>0?t.back():t.show(te.Customer,W.ViewAccount,void 0,!0)}return(U,M)=>b(c)?(p(),_("div",Sx,[L("div",Nx,[m(b(c))?(p(),_("img",{key:0,src:m(b(c)),alt:h(b(c)),class:"moonbase:provider-logo"},null,8,Px)):z("",!0),v(qe,null,{default:k(()=>[N($(h(b(c))),1)]),_:1})]),v(ye,{class:"moonbase:description"},{default:k(()=>[N($(y(b(c))),1)]),_:1}),s.value?(p(),_("div",Tx,[v(zt)])):(p(),_(de,{key:1},[d.value?(p(),_("div",Ix,[v(et,{class:"moonbase:success"},{default:k(()=>[N(" Successfully connected your "+$(h(b(c)))+" account. ",1)]),_:1}),i.value?(p(),_("div",Dx,[v(zt),v(ye,null,{default:k(()=>M[1]||(M[1]=[N("Depositing licenses to your account...")])),_:1,__:[1]})])):a.value?(p(),_("div",$x,[v(b(yc)),v(ye,null,{default:k(()=>M[2]||(M[2]=[N("Licenses deposited to your account.")])),_:1,__:[2]})])):z("",!0),v(Ve,{label:"Back to account",handler:C})])):(p(),H(zn,{key:1,handler:P,class:"moonbase:connect-form"},{default:k(()=>[x(b(c))?(p(),H(Ct,{key:0,modelValue:u.value,"onUpdate:modelValue":M[0]||(M[0]=I=>u.value=I),label:`${h(b(c))} Login ID`,name:`${b(c)}-login-id`,placeholder:`Enter your ${h(b(c))} username`},null,8,["modelValue","label","name","placeholder"])):z("",!0),v(Wn,{label:"Connect"}),v(Ci,{type:"anchor",label:"Create account",variant:"subtle",href:"https://www.ilok.com/#!registration",icon:b(Ku),target:"_blank",rel:"noopener noreferrer"},null,8,["icon"])]),_:1})),l.value?(p(),H(et,{key:2,class:"moonbase:error"},{default:k(()=>[N($(l.value.message),1)]),_:1})):z("",!0)],64))])):z("",!0)}}),Tm=e=>e.includes("."),Vx={class:"moonbase:products"},Lx={key:0,class:"moonbase:loader"},Rx={key:1,class:"moonbase:loader"},jx=["data-is-sub-product"],Ux={key:0,class:"moonbase:products-item-sub-product-icon"},Bx={class:"moonbase:products-item-content"},Fx=le({__name:"Products",setup(e){const t=Ce(),{getProducts:n}=fo(),r=j(null);return Ue(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)=>(p(),_("div",Vx,[r.value?r.value.length===0?(p(),_("div",Rx," No products found ")):z("",!0):(p(),_("div",Lx,[v(zt),s[0]||(s[0]=N(" Loading products.. "))])),(p(!0),_(de,null,rt(r.value||[],i=>(p(),_("div",{key:i.id,class:"moonbase:products-item","data-is-sub-product":b(Tm)(i.id)||void 0},[b(Tm)(i.id)?(p(),_("div",Ux,s[1]||(s[1]=[L("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m16.49 12 3.75 3.75m0 0-3.75 3.75m3.75-3.75H3.74V4.499"})],-1)]))):z("",!0),v(At,{url:i.iconUrl,size:48},null,8,["url"]),L("div",Bx,[v(et,null,{default:k(()=>[N($(i.name),1)]),_:2},1024),i.numberOfLicenses||i.subscriptionLicenses?(p(),H(ye,{key:0},{default:k(()=>[N($((i.numberOfLicenses??0)+(i.subscriptionLicenses??0))+" licenses ",1)]),_:2},1024)):z("",!0)]),L("div",null,[v(Xo,{variant:"subtle",onClick:a=>b(t).show(b(te).Product,b(W).ViewProduct,{product_id:i.id})},{default:k(()=>[v(b(Ip)),s[2]||(s[2]=L("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[2]},1032,["onClick"])])],8,jx))),128))]))}}),Hx={class:"moonbase:bundle-redemption-item-content"},qx={class:"moonbase:bundle-redemption-item-summary"},zx=["data-open"],Wx=["data-open"],Im=le({__name:"BundleRedemptionItem",props:{bundle:{},quantity:{}},setup(e){const t=j(!1),n=j(null);return Ze(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>(p(),H(nn,{class:"moonbase:bundle-redemption-item"},{addon:k(()=>{var s;return[L("div",qx,[r.bundle?(p(),_("button",{key:0,onClick:o[0]||(o[0]=i=>t.value=!t.value)},[v(et,null,{default:k(()=>{var i;return[N($((i=r.bundle)==null?void 0:i.products.length)+" products ",1)]}),_:1}),v(ye,null,{default:k(()=>[N($(t.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[1]||(o[1]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,zx))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-redemption-item-product-list",style:{height:"0px"},"data-open":t.value||void 0},[(p(!0),_(de,null,rt(((s=r.bundle)==null?void 0:s.products)||[],i=>(p(),_("div",{key:i.id},[v(At,{url:i.iconUrl,size:48},null,8,["url"]),L("div",null,[v(et,null,{default:k(()=>[N($(i.name),1)]),_:2},1024),i.tagline?(p(),H(ye,{key:0},{default:k(()=>[N($(i.tagline),1)]),_:2},1024)):z("",!0)])]))),128))],8,Wx)]}),default:k(()=>[v(At,{url:r.bundle.iconUrl,size:72},null,8,["url"]),L("div",Hx,[v(et,null,{default:k(()=>{var s;return[N($((s=r.bundle)==null?void 0:s.name),1)]}),_:1}),v(ye,{class:"moonbase:bundle-redemption-item-tagline"},{default:k(()=>{var s;return[N($((s=r.bundle)==null?void 0:s.tagline),1)]}),_:1})])]),_:1}))}}),Zx={class:"moonbase:product-redemption-item-content"},Dm=le({__name:"ProductRedemptionItem",props:{product:{},quantity:{}},setup(e){return(t,n)=>(p(),H(nn,{class:"moonbase:product-redemption-item"},{default:k(()=>[v(At,{url:t.product.iconUrl,size:72},null,8,["url"]),L("div",Zx,[v(et,null,{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.name),1)]}),_:1}),v(ye,{class:"moonbase:product-redemption-item-tagline"},{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.tagline),1)]}),_:1})])]),_:1}))}}),Yx={class:"moonbase:redeem"},Kx=["data-visible"],Gx={key:1,class:"moonbase:redeem-voucher"},Qx={key:0,class:"moonbase:redeem-voucher-content"},Xx={key:1,class:"moonbase:redeem-voucher-return"},Jx=le({__name:"Redeem",setup(e){const{redeem:t}=Bh(),n=Ce(),r=Re(),o=fe(Hr),s=j(null),i=j(null),a=j(n.getParameter("code")||"");async function l(){i.value=null;try{const u=await t(a.value);s.value=u,o==null||o(Dt.RedeemedVoucher,{voucher:u,user:r.user.value})}catch(u){throw i.value=u,u}}return(u,c)=>(p(),_("div",Yx,[v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[s.value?(p(),_("div",Gx,[L("div",null,[v(hr,null,{default:k(()=>[N($(s.value.name),1)]),_:1}),s.value.description?(p(),H(qe,{key:0},{default:k(()=>[N(' "'+$(s.value.description)+'" ',1)]),_:1})):z("",!0),v(ye,null,{default:k(()=>[v(b(jw)),c[2]||(c[2]=N(" Licenses have been added to your account. "))]),_:1,__:[2]}),v(ye,null,{default:k(()=>[c[3]||(c[3]=N(" Code: ")),L("strong",null,$(s.value.code),1)]),_:1,__:[3]})]),v(qe,null,{default:k(()=>c[4]||(c[4]=[N(" Voucher summary ")])),_:1,__:[4]}),s.value.redeemsProducts.length>0||s.value.redeemsBundles.length>0?(p(),_("div",Qx,[(p(!0),_(de,null,rt(s.value.redeemsProducts,({value:d,quantity:f})=>(p(),H(Dm,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(p(!0),_(de,null,rt(s.value.redeemsBundles,({value:d,quantity:f})=>(p(),H(Im,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):z("",!0),b(n).next&&b(n).next[0]===b(te).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,m;return f.id===((m=(h=b(n).next)==null?void 0:h[2])==null?void 0:m.product_id)})))?(p(),_("div",Xx,[v(Ve,{label:"Return to activation",variant:"primary",icon:b(Rw),handler:()=>b(n).dequeue()},null,8,["icon","handler"])])):z("",!0)])):(p(),H(zn,{key:0,handler:l},{default:k(()=>{var d;return[v(Ke,null,{default:k(()=>c[1]||(c[1]=[N(" Do you have a voucher you want to redeem? "),L("br",null,null,-1),N(" Please enter the code below: ")])),_:1,__:[1]}),v(Ct,{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"]),v(Wn,{label:"Redeem voucher",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!i.value||void 0},$((d=i.value)==null?void 0:d.message),9,Kx)]}),_:1}))]),_:1})]))}}),e3=["data-status"],t3=["data-fulfilled"],$m=le({__name:"MilestoneProgressBar",props:{progress:{}},setup(e){return(t,n)=>(p(),_("div",{class:"moonbase:milestone-progress-bar",style:Vo({gridTemplateColumns:`repeat(${t.progress.toNormalizedCycleNumber-t.progress.fromNormalizedCycleNumber+1}, 1fr)`})},[(p(!0),_(de,null,rt(Array(t.progress.toNormalizedCycleNumber-t.progress.fromNormalizedCycleNumber+1),(r,o)=>(p(),_("div",{key:o},[L("div",{"data-status":o+1<t.progress.currentNormalizedCycleNumber+(t.progress.currentCycleIsCompleted?1:0)?"done":o+1===t.progress.currentNormalizedCycleNumber+(t.progress.currentCycleIsCompleted?1:0)?"in-progress":"future"},null,8,e3),t.progress.events[o+1]?(p(),_("span",{key:0,"data-fulfilled":t.progress.events[o+1].some(s=>s.fulfilled)||void 0},null,8,t3)):z("",!0)]))),128))],4))}}),Mm=6048e5,n3=864e5,al=43200,Vm=1440,Lm=Symbol.for("constructDateFrom");function pr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Lm in e?e[Lm](t):e instanceof Date?new e.constructor(t):new Date(t)}function yt(e,t){return pr(t||e,e)}let r3={};function Si(){return r3}function Ni(e,t){var a,l,u,c;const n=Si(),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=yt(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 ll(e,t){return Ni(e,{...t,weekStartsOn:1})}function Rm(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=pr(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=ll(o),i=pr(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=ll(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ul(e){const t=yt(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 cl(e,...t){const n=pr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function jm(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function o3(e,t,n){const[r,o]=cl(n==null?void 0:n.in,e,t),s=jm(r),i=jm(o),a=+s-ul(s),l=+i-ul(i);return Math.round((a-l)/n3)}function s3(e,t){const n=Rm(e,t),r=pr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ll(r)}function dl(e,t){const n=+yt(e)-+yt(t);return n<0?-1:n>0?1:n}function i3(e){return pr(e,Date.now())}function a3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function l3(e){return!(!a3(e)&&typeof e!="number"||isNaN(+yt(e)))}function u3(e,t,n){const[r,o]=cl(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function c3(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function d3(e,t){return+yt(e)-+yt(t)}function f3(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function h3(e,t){const n=yt(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 p3(e,t){const n=yt(e,t==null?void 0:t.in);return+f3(n,t)==+h3(n,t)}function m3(e,t,n){const[r,o,s]=cl(n==null?void 0:n.in,e,e,t),i=dl(o,s),a=Math.abs(u3(o,s));if(a<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*a);let l=dl(o,s)===-i;p3(r)&&a===1&&dl(r,s)===1&&(l=!1);const u=i*(a-+l);return u===0?0:u}function g3(e,t,n){const r=d3(e,t)/1e3;return c3(n==null?void 0:n.roundingMethod)(r)}function b3(e,t){const n=yt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const v3={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"}},y3=(e,t,n)=>{let r;const o=v3[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 wc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const w3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},E3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k3={date:wc({formats:w3,defaultWidth:"full"}),time:wc({formats:_3,defaultWidth:"full"}),dateTime:wc({formats:E3,defaultWidth:"full"})},x3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},A3=(e,t,n,r)=>x3[e];function Pi(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 C3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S3={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"]},N3={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"]},P3={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"}},T3={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"}},I3={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:Pi({values:C3,defaultWidth:"wide"}),quarter:Pi({values:O3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pi({values:S3,defaultWidth:"wide"}),day:Pi({values:N3,defaultWidth:"wide"}),dayPeriod:Pi({values:P3,defaultWidth:"wide",formattingValues:T3,defaultFormattingWidth:"wide"})};function Ti(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)?$3(a,d=>d.test(i)):D3(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 D3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function $3(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function M3(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 V3=/^(\d+)(th|st|nd|rd)?/i,L3=/\d+/i,R3={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},j3={any:[/^b/i,/^(a|c)/i]},U3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},B3={any:[/1/i,/2/i,/3/i,/4/i]},F3={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},H3={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]},q3={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},z3={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]},W3={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},Z3={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}},Y3={ordinalNumber:M3({matchPattern:V3,parsePattern:L3,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:R3,defaultMatchWidth:"wide",parsePatterns:j3,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:U3,defaultMatchWidth:"wide",parsePatterns:B3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:F3,defaultMatchWidth:"wide",parsePatterns:H3,defaultParseWidth:"any"}),day:Ti({matchPatterns:q3,defaultMatchWidth:"wide",parsePatterns:z3,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:W3,defaultMatchWidth:"any",parsePatterns:Z3,defaultParseWidth:"any"})},Um={code:"en-US",formatDistance:y3,formatLong:k3,formatRelative:A3,localize:I3,match:Y3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function K3(e,t){const n=yt(e,t==null?void 0:t.in);return o3(n,b3(n))+1}function G3(e,t){const n=yt(e,t==null?void 0:t.in),r=+ll(n)-+s3(n);return Math.round(r/Mm)+1}function Bm(e,t){var c,d,f,h;const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Si(),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=pr((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Ni(i,t),l=pr((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=Ni(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function Q3(e,t){var a,l,u,c;const n=Si(),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=Bm(e,t),s=pr((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Ni(s,t)}function X3(e,t){const n=yt(e,t==null?void 0:t.in),r=+Ni(n,t)-+Q3(n,t);return Math.round(r/Mm)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Fr={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)}},cs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fm={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 Fr.y(e,t)},Y:function(e,t,n,r){const o=Bm(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=Rm(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 Fr.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=X3(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=G3(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"}):Fr.d(e,t)},D:function(e,t,n){const r=K3(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=cs.noon:r===0?o=cs.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=cs.evening:r>=12?o=cs.afternoon:r>=4?o=cs.morning:o=cs.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 Fr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fr.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"}):Fr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fr.s(e,t)},S:function(e,t){return Fr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return qm(r);case"XXXX":case"XX":return Eo(r);case"XXXXX":case"XXX":default:return Eo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return qm(r);case"xxxx":case"xx":return Eo(r);case"xxxxx":case"xxx":default:return Eo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hm(r,":");case"OOOO":default:return"GMT"+Eo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hm(r,":");case"zzzz":default:return"GMT"+Eo(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 Hm(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 qm(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Eo(e,t)}function Eo(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 zm=(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"})}},Wm=(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"})}},J3={p:Wm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return zm(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}}",zm(r,t)).replace("{{time}}",Wm(o,t))}},e4=/^D+$/,t4=/^Y+$/,n4=["D","DD","YY","YYYY"];function r4(e){return e4.test(e)}function o4(e){return t4.test(e)}function s4(e,t,n){const r=i4(e,t,n);if(console.warn(r),n4.includes(e))throw new RangeError(r)}function i4(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 a4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u4=/^'([^]*?)'?$/,c4=/''/g,d4=/[a-zA-Z]/;function f4(e,t,n){var c,d,f,h;const r=Si(),o=r.locale??Um,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=yt(e,n==null?void 0:n.in);if(!l3(a))throw new RangeError("Invalid time value");let l=t.match(l4).map(m=>{const y=m[0];if(y==="p"||y==="P"){const x=J3[y];return x(m,o.formatLong)}return m}).join("").match(a4).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const y=m[0];if(y==="'")return{isToken:!1,value:h4(m)};if(Fm[y])return{isToken:!0,value:m};if(y.match(d4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const y=m.value;(o4(y)||r4(y))&&s4(y,t,String(e));const x=Fm[y[0]];return x(a,y,o.localize,u)}).join("")}function h4(e){const t=e.match(u4);return t?t[1].replace(c4,"'"):e}function p4(e,t,n){const r=Si(),o=(n==null?void 0:n.locale)??r.locale??Um,s=2520,i=dl(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]=cl(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=g3(u,l),d=(ul(u)-ul(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<Vm){const m=Math.round(f/60);return o.formatDistance("aboutXHours",m,a)}else{if(f<s)return o.formatDistance("xDays",1,a);if(f<al){const m=Math.round(f/Vm);return o.formatDistance("xDays",m,a)}else if(f<al*2)return h=Math.round(f/al),o.formatDistance("aboutXMonths",h,a)}if(h=m3(u,l),h<12){const m=Math.round(f/al);return o.formatDistance("xMonths",m,a)}else{const m=h%12,y=Math.trunc(h/12);return m<3?o.formatDistance("aboutXYears",y,a):m<9?o.formatDistance("overXYears",y,a):o.formatDistance("almostXYears",y+1,a)}}function m4(e,t){return p4(e,i3(e),t)}function g4(e){return m4(e,{addSuffix:!0})}function ds(e,t){return f4(e,t||"PPP")}const b4={class:"moonbase:subscriptions"},v4={key:0,class:"moonbase:loader"},y4={key:1,class:"moonbase:loader"},w4=["data-subscription-status"],_4={class:"moonbase:subscriptions-item-content"},E4={class:"moonbase:subscriptions-item-content"},k4={key:0,class:"moonbase:subscriptions-item-milestone-progress"},x4={class:"moonbase:subscriptions-item-milestone-progress-title"},A4=le({__name:"Subscriptions",setup(e){const t=Ce(),{getSubscriptions:n}=fo(),r=j(new Date),o=j(null);return Ue(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)=>(p(),_("div",b4,[o.value?o.value.length===0?(p(),_("div",y4," No subscriptions found ")):z("",!0):(p(),_("div",v4,[v(zt),i[0]||(i[0]=N(" Loading subscriptions.. "))])),(p(!0),_(de,null,rt(o.value||[],a=>(p(),_(de,{key:a.id},[L("div",{"data-subscription-status":a.status,class:"moonbase:subscriptions-item"},[a.content.type==="Product"?(p(),_(de,{key:0},[v(At,{url:a.content.product.iconUrl,size:48},null,8,["url"]),L("div",_4,[v(et,null,{default:k(()=>[N($(a.content.quantity)+" x "+$(a.content.product.name),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(a.status===b(Cr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+$(b(ds)(a.expiresAt)),1)]),_:2},1024)])],64)):(p(),_(de,{key:1},[v(At,{url:a.content.bundle.iconUrl,size:48},null,8,["url"]),L("div",E4,[v(et,null,{default:k(()=>[N($(a.content.quantity)+" x "+$(a.content.bundle.name),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(a.status===b(Cr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+$(b(ds)(a.expiresAt)),1)]),_:2},1024)])],64)),L("div",null,[v(Xo,{variant:"subtle",onClick:l=>b(t).show(b(te).Subscription,b(W).ManageSubscription,{subscription_id:a.id})},{default:k(()=>[v(b(Ip)),i[1]||(i[1]=L("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])],8,w4),a.milestoneProgress?(p(),_("div",k4,[L("div",x4,[v(et,null,{default:k(()=>[N($(a.milestoneProgress.title),1)]),_:2},1024),v(Wt,null,{default:k(()=>[N($(a.milestoneProgress.currentNormalizedCycleNumber-(a.milestoneProgress.currentCycleIsCompleted?0:1))+" / "+$(a.milestoneProgress.toNormalizedCycleNumber)+" "+$(b(Oi)(a.cycleLength))+"s ",1)]),_:2},1024)]),v($m,{progress:a.milestoneProgress},null,8,["progress"])])):z("",!0)],64))),128))]))}}),C4={class:"moonbase:customer"},O4=le({__name:"Customer",setup(e){const t=Ce(),{user:n}=Re(),r=fe(at),o=Z(()=>[{intent:W.ViewProducts,title:"Products",content:Fx},{intent:W.ViewSubscriptions,title:"Subscriptions",content:A4,predicate:()=>{var l;return((l=n.value)==null?void 0:l.hasSubscriptions)??!1}},{intent:W.ViewAccount,title:"Account",content:Ox},{intent:W.RedeemVoucher,title:"Redeem",content:Jx}].filter(l=>l.predicate===void 0||l.predicate())),s=Z(()=>t.intent===W.ConnectAccount),i=Z(()=>o.value.findIndex(l=>l.intent===t.intent));function a(l){t.intent=o.value[l].intent}return(l,u)=>(p(),_("div",C4,[s.value?(p(),H(Mx,{key:0})):(p(),H(b(Aw),{key:1,"selected-index":i.value,onChange:a},{default:k(()=>{var c,d;return[v(b(Cw),{"data-corners":(c=b(r))==null?void 0:c.theme.corners,"data-background":(d=b(r))==null?void 0:d.theme.colors.background},{default:k(()=>[(p(!0),_(de,null,rt(o.value,f=>(p(),H(b(Ow),{key:f.intent},{default:k(()=>[N($(f.title),1)]),_:2},1024))),128))]),_:1},8,["data-corners","data-background"]),v(b(Sw),null,{default:k(()=>[(p(!0),_(de,null,rt(o.value,f=>(p(),H(b(Nw),{key:f.intent},{default:k(()=>[(p(),H(ru(f.content)))]),_:2},1024))),128))]),_:1})]}),_:1},8,["selected-index"]))]))}}),S4={class:"moonbase:product-card-content"},N4=["data-open"],P4=le({__name:"ProductCard",props:{product:{}},setup(e){const t=j(!1),n=j(null),r=Z(()=>n.value&&n.value.$el&&n.value.$el.scrollHeight>n.value.$el.clientHeight);return(o,s)=>(p(),H(nn,{class:"moonbase:product-card"},{addon:k(()=>[L("div",{class:"moonbase:product-card-description","data-open":t.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:n},{default:k(()=>[N($(o.product.description),1)]),_:1},512),!t.value&&r.value?(p(),_("button",{key:0,onClick:s[0]||(s[0]=i=>t.value=!0)},[v(et,null,{default:k(()=>s[1]||(s[1]=[N(" read more ")])),_:1,__:[1]})])):z("",!0)],8,N4)]),default:k(()=>[v(At,{url:o.product.iconUrl,size:72},null,8,["url"]),L("div",S4,[v(hr,null,{default:k(()=>{var i;return[N($((i=o.product)==null?void 0:i.name),1)]}),_:1}),v(ye,{class:"moonbase:product-card-tagline"},{default:k(()=>{var i;return[N($((i=o.product)==null?void 0:i.tagline),1)]}),_:1})])]),_:1}))}});function T4(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 I4={class:"moonbase:product-downloads"},D4=["data-open"],$4={key:1,class:"moonbase:product-downloads-content"},M4={key:2,class:"moonbase:product-downloads-content"},V4={key:3,class:"moonbase:product-downloads-content"},L4={key:4,class:"moonbase:product-downloads-content"},R4={class:"moonbase:product-downloads-list"},j4={class:"moonbase:product-downloads-download-actions"},U4=le({__name:"ProductDownloads",props:{product:{}},setup(e){const t=e,n=Ce(),r=Re(),o=il(),s=fe(Hr),{downloadProduct:i}=fo(),a=j(!1),l=j(null),u=Z(()=>l.value&&l.value.$el&&l.value.$el.scrollHeight>l.value.$el.clientHeight);function c(){n.enqueue(te.Product,W.DownloadProduct,n.parameters??void 0),n.show(te.Authentication,W.SignIn)}const d=[pn.Windows,pn.Mac,pn.Linux,pn.Universal];function f(){var C;const P=(((C=navigator.userAgentData)==null?void 0:C.platform)??navigator.platform??"Unknown").toLowerCase();return/mac/.test(P)?pn.Mac:/win/.test(P)?pn.Windows:/linux/.test(P)?pn.Linux:pn.Universal}const h=f(),m=[h,...d.filter(P=>P!==h)],y=Z(()=>m.flatMap(P=>[...(t.product.downloads??[]).filter(C=>C.platform===P)]));async function x(P){try{await i(P),s==null||s(Dt.DownloadedProduct,{product:t.product,download:P,user:r.user.value})}catch(C){if(C instanceof gn)o.reportProblem("error",{type:C.name,title:C.title,detail:C.detail,status:C.status,errors:C.errors?Object.fromEntries(Object.entries(C.errors).map(([U,M])=>[U,[M]])):void 0,instance:"ProductDownloads.vue:startDownload"});else{const U=C;o.reportProblem("error",{type:U.name,title:U.message,instance:"ProductDownloads.vue:startDownload"})}throw C}}return(P,C)=>(p(),_("div",I4,[v(qe,null,{default:k(()=>[C[1]||(C[1]=N(" Downloads ")),v(ye,null,{default:k(()=>[N(" Version "+$(P.product.version),1)]),_:1})]),_:1,__:[1]}),P.product.releaseDescription?(p(),_("div",{key:0,class:"moonbase:product-downloads-description","data-open":a.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:l},{default:k(()=>[N($(P.product.releaseDescription),1)]),_:1},512),!a.value&&u.value?(p(),_("button",{key:0,onClick:C[0]||(C[0]=U=>a.value=!0)},[v(et,null,{default:k(()=>C[2]||(C[2]=[N(" read more ")])),_:1,__:[2]})])):z("",!0)],8,D4)):z("",!0),P.product.downloadsNeedsUser&&P.product.downloadsNeedsOwnership&&!P.product.numberOfLicenses&&!P.product.subscriptionLicenses?(p(),_("div",$4,[v(Ke,{"data-center":""},{default:k(()=>C[3]||(C[3]=[N(" This product requires ownership to download ")])),_:1,__:[3]}),v(Ve,{label:"Sign in",handler:c})])):P.product.downloadsNeedsUser&&!b(r).user.value?(p(),_("div",M4,[v(Ke,{"data-center":""},{default:k(()=>C[4]||(C[4]=[N(" This product requires an account to download ")])),_:1,__:[4]}),v(Ve,{label:"Sign in",handler:c})])):P.product.downloadsNeedsOwnership&&!P.product.numberOfLicenses&&!P.product.subscriptionLicenses?(p(),_("div",V4,[v(Ke,{"data-center":""},{default:k(()=>C[5]||(C[5]=[N(" This product requires ownership to download ")])),_:1,__:[5]})])):(p(),_("div",L4,[L("div",R4,[(p(!0),_(de,null,rt(y.value,U=>(p(),H(nn,{key:U.key,class:"moonbase:product-downloads-download"},{addon:k(()=>[L("div",j4,[v(Ve,{label:U.platform===b(pn).Universal?"Download":`Download for ${U.platform}`,variant:U.platform===b(h)?"primary":"secondary","no-reset":!0,handler:()=>x(U),icon:b(Vw)},null,8,["label","variant","handler","icon"])])]),default:k(()=>[L("div",null,[v(qe,null,{default:k(()=>[N($(U.name),1)]),_:2},1024),v(Wt,null,{default:k(()=>[N($(U.platform)+" - "+$(b(T4)(U.size)),1)]),_:2},1024)])]),_:2},1024))),128))]),y.value.length===0?(p(),H(Ke,{key:0,"data-center":""},{default:k(()=>C[6]||(C[6]=[N(" No downloadable files found ")])),_:1,__:[6]})):z("",!0)]))]))}}),B4=["href"],F4=le({__name:"LinkifiedText",props:{text:{}},setup(e){const t=e,n=/\b((?:https?:\/\/|www\.)[^\s<>"'`]+?)(?=[)\]}>,.!?;:'"]?(?:\s|$))/gi;function r(i){return/^www\./i.test(i)?`https://${i}`:i}function o(i){const a=[];if(!i)return a;let l=0;for(const u of i.matchAll(n)){const c=u[0],d=u.index??0;d>l&&a.push({type:"text",text:i.slice(l,d)});const f=c.replace(/[)\]}>,.!?;:'"]+$/g,()=>""),h=f,m=r(f);h.length>0&&a.push({type:"url",text:h,href:m});const y=c.slice(f.length);y&&a.push({type:"text",text:y}),l=d+c.length}return l<i.length&&a.push({type:"text",text:i.slice(l)}),a}const s=Z(()=>o(t.text));return(i,a)=>(p(!0),_(de,null,rt(s.value,(l,u)=>(p(),_(de,{key:u},[l.type==="url"?(p(),_("a",{key:0,href:l.href,target:"_blank",rel:"noopener noreferrer nofollow"},$(l.text),9,B4)):(p(),_(de,{key:1},[N($(l.text),1)],64))],64))),128))}}),H4={key:0,class:"moonbase:product-license-external-content"},q4={key:1,class:"moonbase:product-license-external-content"},z4={key:2,class:"moonbase:product-license-external-content"},W4={key:3,class:"moonbase:product-license-account-connection"},Z4={class:"moonbase:account-provider"},Y4=["src"],K4=["data-open"],G4=le({__name:"ProductLicense",props:{license:{},product:{}},setup(e){const t=Ce(),n=j(!1),r=j(null),o=Z(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>(p(),H(nn,{class:"moonbase:product-license"},xa({default:k(()=>[L("div",null,[v(Wt,null,{default:k(()=>[N($(s.product.name)+" license ",1)]),_:1}),!s.license.externalFulfillment&&!s.license.requiredConnectedAccount?(p(),H(qe,{key:0},{default:k(()=>[N($(s.license.id),1)]),_:1})):z("",!0)])]),_:2},[s.license.externalFulfillment||s.license.fulfillmentMessage||s.license.requiredConnectedAccount?{name:"addon",fn:k(()=>{var a,l;return[typeof s.license.externalFulfillment=="string"?(p(),_("div",H4,[v(On,null,{default:k(()=>i[1]||(i[1]=[N(" Key code: ")])),_:1,__:[1]}),L("code",null,$(s.license.externalFulfillment),1)])):((a=s.license.externalFulfillment)==null?void 0:a.type)==="file"?(p(),_("div",q4,[v(On,null,{default:k(()=>i[2]||(i[2]=[N(" License file ")])),_:1,__:[2]}),v(Ci,{type:"anchor",href:`data:${s.license.externalFulfillment.contentType};base64,${s.license.externalFulfillment.data}`,download:s.license.externalFulfillment.fileName,label:`Download ${s.license.externalFulfillment.fileName}`,variant:"secondary",icon:b(Dp)},null,8,["href","download","label","icon"])])):((l=s.license.externalFulfillment)==null?void 0:l.type)==="iLok"?(p(),_("div",z4,[v(On,null,{default:k(()=>[v(b(mx)),i[3]||(i[3]=N(" Deposited to your iLok account "))]),_:1,__:[3]})])):s.license.status===b(Cl).Pending&&s.license.requiredConnectedAccount==="iLok"?(p(),_("div",W4,[L("div",Z4,[L("img",{src:b(sl),alt:"iLok"},null,8,Y4),L("div",null,[v(qe,null,{default:k(()=>i[4]||(i[4]=[N("iLok")])),_:1,__:[4]}),v(ye,null,{default:k(()=>i[5]||(i[5]=[N("Connect your account to receive your license")])),_:1,__:[5]})])]),v(Ve,{handler:()=>b(t).show(b(te).Customer,b(W).ConnectAccount,{provider_id:b(Is).iLok}),label:"Connect",variant:"primary"},null,8,["handler"])])):z("",!0),s.license.fulfillmentMessage?(p(),_("div",{key:4,class:"moonbase:product-license-fulfillment-message","data-open":n.value||void 0},[v(ye,{ref_key:"messageRef",ref:r},{default:k(()=>[v(F4,{text:s.license.fulfillmentMessage},null,8,["text"])]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[0]||(i[0]=u=>n.value=!0)},[v(et,null,{default:k(()=>i[6]||(i[6]=[N(" read more ")])),_:1,__:[6]})])):z("",!0)],8,K4)):z("",!0)]}),key:"0"}:void 0]),1024))}}),Q4={class:"moonbase:product-licenses"},X4={key:0,class:"moonbase:loader"},J4={key:1,class:"moonbase:empty"},eA={key:0,class:"moonbase:loader"},tA={key:1,class:"moonbase:product-licenses-activations"},nA={key:0},rA={class:"moonbase:product-licenses-activation-actions"},oA={key:2,class:"moonbase:loader"},sA={key:3,class:"moonbase:product-licenses-licenses"},iA=le({__name:"ProductLicenses",props:{product:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,getProductLicenses:s,revokeActivation:i}=fo(),a=il(),l=j(null),u=j(null),c=j(!0);Ue(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,m;return(m=l.value)==null?void 0:m.splice((h=l.value)==null?void 0:h.indexOf(f),1)})}catch(h){if(h instanceof gn)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(([m,y])=>[m,[y]])):void 0,instance:"ProductLicenses.vue:revoke"});else{const m=h;a.reportProblem("error",{type:m.name,title:m.message,instance:"ProductLicenses.vue:revoke"})}throw h}}return(f,h)=>(p(),_("div",Q4,[v(qe,null,{default:k(()=>[h[0]||(h[0]=N(" Licenses ")),f.product.maxActivations&&f.product.maxActivations>0?(p(),H(ye,{key:0},{default:k(()=>[N($(f.product.currentActivations??0)+" of "+$(f.product.maxActivations)+" seats used ",1)]),_:1})):z("",!0)]),_:1,__:[0]}),c.value?(p(),_("div",X4,[v(zt)])):!f.product.numberOfLicenses&&!f.product.subscriptionLicenses?(p(),_("div",J4,[v(Ke,null,{default:k(()=>h[1]||(h[1]=[N(" You don't own any licenses for this product yet ")])),_:1,__:[1]}),f.product&&f.product.website?(p(),H(Ci,{key:0,type:"anchor",href:f.product.website,label:"Purchase",icon:b(Ku)},null,8,["href","icon"])):z("",!0)])):z("",!0),c.value?z("",!0):(p(),_(de,{key:2},[f.product.maxActivations&&f.product.maxActivations>0&&!f.product.currentActivations?(p(),_("div",eA,[v(b($p)),v(qe,null,{default:k(()=>h[2]||(h[2]=[N(" No activations yet ")])),_:1,__:[2]})])):z("",!0),f.product.maxActivations&&l.value?(p(),_("div",tA,[(p(!0),_(de,null,rt(l.value??[],m=>(p(),H(nn,{key:m.id,class:"moonbase:product-licenses-activation"},xa({default:k(()=>[L("div",null,[v(Wt,null,{default:k(()=>h[3]||(h[3]=[N(" Device ")])),_:1,__:[3]}),v(qe,null,{default:k(()=>[N($(m.name),1)]),_:2},1024)]),L("div",null,[v(Wt,null,{default:k(()=>h[4]||(h[4]=[N(" Activation ")])),_:1,__:[4]}),v(qe,null,{default:k(()=>[N($(m.activationMethod),1)]),_:2},1024)]),m.lastValidatedAt?(p(),_("div",nA,[v(Wt,null,{default:k(()=>h[5]||(h[5]=[N(" First activated ")])),_:1,__:[5]}),v(qe,null,{default:k(()=>[N($(b(g4)(m.firstValidatedAt)),1)]),_:2},1024)])):z("",!0)]),_:2},[m.activationMethod===b(Yi).Online?{name:"addon",fn:k(()=>[L("div",rA,[v(Ve,{label:"Revoke",variant:"secondary","no-reset":!0,handler:()=>d(m)},null,8,["handler"])])]),key:"0"}:void 0]),1024))),128))])):z("",!0),(!u.value||u.value.length===0)&&!f.product.maxActivations&&(f.product.numberOfLicenses||f.product.subscriptionLicenses)?(p(),_("div",oA,[v(b($p)),f.product.numberOfLicenses?(p(),H(qe,{key:0},{default:k(()=>[N(" You own "+$(f.product.numberOfLicenses)+" license"+$(f.product.numberOfLicenses!==1?"s":"")+" for this product ",1)]),_:1})):z("",!0),f.product.subscriptionLicenses?(p(),H(qe,{key:1},{default:k(()=>[N(" You have "+$(f.product.subscriptionLicenses)+" subscription license"+$(f.product.subscriptionLicenses!==1?"s":"")+" for this product ",1)]),_:1})):z("",!0)])):f.product.externalLicenses&&u.value?(p(),_("div",sA,[(p(!0),_(de,null,rt((u.value??[]).filter(m=>m.externalFulfillment||m.requiredConnectedAccount),m=>(p(),H(G4,{key:m.id,license:m,product:f.product},null,8,["license","product"]))),128))])):z("",!0)],64))]))}}),aA={class:"moonbase:download-product"},lA={key:0,class:"moonbase:loader"},uA={key:1,class:"moonbase:loader"},cA={key:2,class:"moonbase:loader"},dA={key:3},fA=le({__name:"Product",setup(e){const t=Ce(),n=Re(),{loaded:r}=Re(),{getProduct:o}=fo(),s=j(null),i=j(null),a=j(!0);return Ue(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)=>(p(),_("div",aA,[a.value||!b(r)?(p(),_("div",lA,[v(zt)])):i.value?(p(),_("div",uA,$(i.value),1)):s.value?(p(),_("div",dA,[v(P4,{product:s.value},null,8,["product"]),s.value.downloads?(p(),H(U4,{key:0,product:s.value},null,8,["product"])):z("",!0),b(n).user.value?(p(),H(iA,{key:1,product:s.value,onRevoked:u[0]||(u[0]=c=>s.value.currentActivations=(s.value.currentActivations??1)-1)},null,8,["product"])):z("",!0)])):(p(),_("div",cA," Could not find product "))]))}}),hA={class:"moonbase:peek"},pA=["data-visible"],mA={key:1,class:"moonbase:peek-voucher"},gA={key:0,class:"moonbase:peek-voucher-content"},bA={class:"moonbase:peek-voucher-auth"},vA=le({__name:"Redeem",setup(e){const{peek:t}=Bh(),n=Ce(),r=j(null),o=j(null),s=j(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(te.Customer,W.RedeemVoucher,{code:s.value}),n.show(te.Authentication,W.SignIn)}function l(){n.enqueue(te.Customer,W.RedeemVoucher,{code:s.value}),n.show(te.Authentication,W.SignUp)}return(u,c)=>(p(),_("div",hA,[v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[r.value?(p(),_("div",mA,[L("div",null,[v(hr,null,{default:k(()=>[N($(r.value.name),1)]),_:1}),r.value.description?(p(),H(qe,{key:0},{default:k(()=>[N(' "'+$(r.value.description)+'" ',1)]),_:1})):z("",!0),v(ye,null,{default:k(()=>[c[2]||(c[2]=N(" Code: ")),L("strong",null,$(r.value.code),1)]),_:1,__:[2]})]),v(qe,null,{default:k(()=>c[3]||(c[3]=[N(" Voucher summary ")])),_:1,__:[3]}),r.value.redeemsProducts.length>0||r.value.redeemsBundles.length>0?(p(),_("div",gA,[(p(!0),_(de,null,rt(r.value.redeemsProducts,({value:d,quantity:f})=>(p(),H(Dm,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(p(!0),_(de,null,rt(r.value.redeemsBundles,({value:d,quantity:f})=>(p(),H(Im,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):z("",!0),L("div",bA,[v(Ke,null,{default:k(()=>c[4]||(c[4]=[N(" Sign in or create an account to redeem products ")])),_:1,__:[4]}),v(Ve,{label:"Sign in",variant:"primary",handler:a}),v(Ve,{label:"Create account",variant:"subtle",handler:l})])])):(p(),H(zn,{key:0,handler:i},{default:k(()=>{var d;return[v(Ke,null,{default:k(()=>c[1]||(c[1]=[N(" Do you have a voucher you want to redeem? "),L("br",null,null,-1),N(" Please enter the code below: ")])),_:1,__:[1]}),v(Ct,{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"]),v(Wn,{label:"Redeem voucher",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!o.value||void 0},$((d=o.value)==null?void 0:d.message),9,pA)]}),_:1}))]),_:1})]))}}),yA={class:"moonbase:subscription-content-card-content"},wA=["data-open"],_A={class:"moonbase:subscription-content-card-content"},EA=["data-open"],kA=le({__name:"ContentCard",props:{subscription:{}},setup(e){const t=j(new Date),n=j(!1),r=j(null),o=Z(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>s.subscription.content.type==="Product"?(p(),H(nn,{key:0,class:"moonbase:subscription-content-card"},{addon:k(()=>[L("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:r},{default:k(()=>[N($(s.subscription.content.product.description),1)]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[0]||(i[0]=a=>n.value=!0)},[v(et,null,{default:k(()=>i[2]||(i[2]=[N(" read more ")])),_:1,__:[2]})])):z("",!0)],8,wA)]),default:k(()=>[v(At,{url:s.subscription.content.product.iconUrl,size:72},null,8,["url"]),L("div",yA,[v(hr,null,{default:k(()=>{var a;return[N($((a=s.subscription.content.product)==null?void 0:a.name),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-tagline"},{default:k(()=>{var a;return[N($((a=s.subscription.content.product)==null?void 0:a.tagline),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-expiry"},{default:k(()=>[N($(s.subscription.status===b(Cr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),L("strong",null,$(b(ds)(s.subscription.expiresAt)),1)]),_:1})])]),_:1})):(p(),H(nn,{key:1,class:"moonbase:subscription-content-card"},{addon:k(()=>[L("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:r},{default:k(()=>[N($(s.subscription.content.bundle.description),1)]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[1]||(i[1]=a=>n.value=!0)},[v(et,null,{default:k(()=>i[3]||(i[3]=[N(" read more ")])),_:1,__:[3]})])):z("",!0)],8,EA)]),default:k(()=>[v(At,{url:s.subscription.content.bundle.iconUrl,size:72},null,8,["url"]),L("div",_A,[v(hr,null,{default:k(()=>{var a;return[N($((a=s.subscription.content.bundle)==null?void 0:a.name),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-tagline"},{default:k(()=>{var a;return[N($((a=s.subscription.content.bundle)==null?void 0:a.tagline),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-expiry"},{default:k(()=>[N($(s.subscription.status===b(Cr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),L("strong",null,$(b(ds)(s.subscription.expiresAt)),1)]),_:1})])]),_:1}))}}),xA={class:"moonbase:milestone-rewards"},AA={class:"moonbase:milestone-rewards-list"},CA={key:0},OA={key:1},SA=le({__name:"MilestoneRewards",props:{progress:{}},setup(e){return(t,n)=>(p(),_("div",xA,[v(et,null,{default:k(()=>n[0]||(n[0]=[N(" Rewards: ")])),_:1,__:[0]}),L("div",AA,[(p(!0),_(de,null,rt(Object.values(t.progress.events).flatMap(r=>r).filter(r=>r.fulfilled),r=>(p(),_("div",{key:r.milestoneId,class:"moonbase:milestone-rewards-item"},[v(ye,null,{default:k(()=>[N($(r.message),1)]),_:2},1024),r.type==="CouponCodeMilestone"&&r.fulfilled&&r.code?(p(),_("div",CA,[v(Wt,null,{default:k(()=>n[1]||(n[1]=[N(" Your coupon code: ")])),_:1,__:[1]}),n[2]||(n[2]=L("br",null,null,-1)),L("code",null,$(r.code),1)])):r.type==="PerpetualLicenseConversionMilestone"&&r.fulfilled?(p(),_("div",OA,[v(Wt,null,{default:k(()=>[v(b(yc),{class:"moonbase:success-icon"}),n[3]||(n[3]=N(" Your licenses have been converted to perpetual licenses. "))]),_:1,__:[3]})])):z("",!0)]))),128))])]))}}),NA={class:"moonbase:subscription"},PA={key:0,class:"moonbase:loader"},TA={key:1,class:"moonbase:loader"},IA={key:2,class:"moonbase:loader"},DA={key:3},$A={key:0,class:"moonbase:subscription-milestones"},MA={class:"moonbase:subscription-milestone-progress-title"},VA={class:"moonbase:subscription-actions"},LA=le({__name:"Subscription",setup(e){const t=Ce(),{loaded:n}=Re(),r=il(),{getSubscription:o,renewSubscription:s,cancelSubscription:i,updateSubscriptionPaymentMethod:a}=fo(),l=j(null),u=j(new Date),c=j(null),d=j(!0);Ue(async()=>{const y=t.getParameter("subscription_id");if(!y){c.value="Link is broken";return}try{l.value=await o(y)}catch(x){c.value=x.message}d.value=!1});async function f(){if(!l.value)return;if((await s(l.value.id,{redirect:!1})).completed){const x=await o(l.value.id);Ht(1500).then(()=>l.value=x)}else throw new us}async function h(){l.value&&(l.value=await i(l.value.id))}async function m(){if(l.value){c.value=null;try{const y=await a(l.value,{returnUrl:`${window.location.pathname}?mb_intent=${W.ManageSubscription}&mb_subscription_id=${l.value.id}`});if(y!=null&&y.completed)l.value=await o(l.value.id);else throw new us}catch(y){if(c.value=y.message,!(y instanceof us))if(y instanceof gn)r.reportProblem("error",{type:y.name,title:y.title,detail:y.detail,status:y.status,errors:y.errors?Object.fromEntries(Object.entries(y.errors).map(([x,P])=>[x,[P]])):void 0,instance:"Subscription.vue:startUpdate"});else{const x=y;r.reportProblem("error",{type:x.name,title:x.message,instance:"Subscription.vue:startUpdate"})}throw y}}}return(y,x)=>(p(),_("div",NA,[d.value||!b(n)?(p(),_("div",PA,[v(zt)])):c.value?(p(),_("div",TA,$(c.value),1)):l.value?(p(),_("div",DA,[v(kA,{subscription:l.value},null,8,["subscription"]),l.value.milestoneProgress?(p(),_("div",$A,[L("div",MA,[v(et,null,{default:k(()=>[N($(l.value.milestoneProgress.title),1)]),_:1}),v(Wt,null,{default:k(()=>[N($(l.value.milestoneProgress.currentNormalizedCycleNumber-(l.value.milestoneProgress.currentCycleIsCompleted?0:1))+" / "+$(l.value.milestoneProgress.toNormalizedCycleNumber)+" "+$(b(Oi)(l.value.cycleLength))+"s ",1)]),_:1})]),v($m,{progress:l.value.milestoneProgress},null,8,["progress"]),l.value.milestoneProgress.description?(p(),H(Wt,{key:0},{default:k(()=>[N($(l.value.milestoneProgress.description),1)]),_:1})):z("",!0),Object.values(l.value.milestoneProgress.events).flatMap(P=>P).some(P=>P.fulfilled)?(p(),H(SA,{key:1,progress:l.value.milestoneProgress},null,8,["progress"])):z("",!0)])):z("",!0),L("div",VA,[l.value.status===b(Cr).Active?(p(),_(de,{key:0},[v(Ve,{label:"Update payment method",variant:"secondary",handler:m}),v(Ve,{label:"Cancel subscription",variant:"danger",handler:h}),v(Wt,null,{default:k(()=>[x[1]||(x[1]=N(" 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 ")),L("strong",null,$(b(xt)(l.value.total.due)),1),N(" per "+$(b(Oi)(l.value.cycleLength))+" for this subscription",1),l.value.paymentMethod?(p(),_(de,{key:0},[x[0]||(x[0]=N(" using payment method ")),L("strong",null,$(l.value.paymentMethod),1)],64)):z("",!0),x[2]||(x[2]=N(". "))]),_:1,__:[1,2]})],64)):l.value.status===b(Cr).Completed?(p(),H(Wt,{key:1},{default:k(()=>[v(b(yc),{class:"moonbase:success-icon"}),x[3]||(x[3]=N(" This subscription has been completed, and cannot be renewed. "))]),_:1,__:[3]})):(p(),_(de,{key:2},[l.value.nextPaymentScheduledAt&&l.value.cancellable?(p(),_(de,{key:0},[v(Ve,{label:"Continue subscription",variant:"primary",handler:f}),v(Ve,{label:"Cancel subscription",variant:"danger",handler:h}),v(Wt,null,{default:k(()=>[N(" We could not renew this subscription on the expiry date, the next attempt will be "+$(b(ds)(l.value.nextPaymentScheduledAt))+". To make sure you can use your products un-interrupted, continue the subscription, or cancel it if you do not wish to keep using these products. ",1)]),_:1})],64)):(p(),_(de,{key:1},[v(Ve,{label:"Continue subscription",variant:"primary",handler:f}),v(Wt,null,{default:k(()=>[N(" This subscription has been stopped, and "+$(l.value.expiresAt>u.value?"expires":"expired")+" "+$(b(ds)(l.value.expiresAt))+". If you want to continue using the products after this date, you may continue the subscription to regain access. ",1)]),_:1})],64))],64))])])):(p(),_("div",IA," Could not find subscription "))]))}}),RA=le({__name:"App",setup(e){const t=fe(at),n=Ce();Ze(()=>[n.active,n.intent,n.parameters],([o,s,i])=>{Ye("UI updated",{view:o,intent:s,parameters:Ee(i)})});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 Ze(()=>t==null?void 0:t.value.theme.colors.primary,o=>{if(!o)return;let s=o;typeof s=="string"&&(s=Object.fromEntries(NE(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}),Ze(()=>t==null?void 0:t.value.theme.dark,o=>{o?document.documentElement.classList.add("moonbase:dark"):document.documentElement.classList.remove("moonbase:dark")},{immediate:!0}),P_(),T_(),(o,s)=>{var i;return p(),_(de,null,[(i=b(t))!=null&&i.toolbar.enabled?(p(),H(g_,{key:0})):z("",!0),v(l_,null,{default:k(()=>[b(n).active===b(te).Cart?(p(),H(px,{key:0})):b(n).active===b(te).Authentication?(p(),H(xk,{key:1})):b(n).active===b(te).Activation?(p(),H(I5,{key:2})):b(n).active===b(te).Product?(p(),H(fA,{key:3})):b(n).active===b(te).Subscription?(p(),H(LA,{key:4})):b(n).active===b(te).Customer?(p(),H(O4,{key:5})):b(n).active===b(te).Redeem?(p(),H(vA,{key:6})):b(n).active===b(te).About?(p(),H(BE,{key:7})):z("",!0)]),_:1})],64)}}});function fl(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof HTMLElement)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(fl(e)&&fl(n)){for(const r in e)if(Object.prototype.hasOwnProperty.call(n,r)){const o=n[r];fl(o)&&fl(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}function jA(e){const t=n=>Array.isArray(n)?n.map(r=>t(r)):Je(n)||_n(n)||Ro(n)?t(Ee(n)):n&&typeof n=="object"?Object.keys(n).reduce((r,o)=>(r[o]=t(n[o]),r),{}):n;return t(e)}const _c=Symbol("url"),Zm=Symbol("moonbase_instance"),mr=(e,t)=>window.dispatchEvent(new CustomEvent(`moonbase-storefront-${e}`,{detail:jA(t)})),Hr=Symbol("event-emitter");class UA{constructor(){ko(this,"initialized",!1);ko(this,"pinia");ko(this,"storefront");ko(this,"options")}async setup(t,n){var u,c;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}Ye("Given options:",n),this.options=j(hl(((u=this.options)==null?void 0:u.value)??ap,n??{})),Ye("Merged options:",this.options.value);const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase");const o=this.options.value.target??document.body;Ye("Mounting to target element",o),o.append(r);let s=t;if(t.includes(".moonbase.sh")){const d=/^(https:\/\/[a-z\-]+\.(?:beta\.)?moonbase\.sh)(.+)/.exec(t);d&&d.length>1&&d[1]&&(s=d[1],console.warn(`Moonbase url set up incorrectly, should be ${s}, was ${t}`))}this.storefront=l1(s),this.pinia=D1(),$y(RA).use(this.storefront).use(this.pinia).provide(at,this.options).provide(_c,s.replace(/\/$/,"")).provide(Hr,mr).provide(Zm,this).mount("#moonbase"),this.initialized=!0,window&&window.location&&this.handleLocationIntent(window.location);const a=Ce(this.pinia),l=Re(this.storefront);this.storefront.onStorefrontUpdated(d=>{mr(Dt.StorefrontUpdated,{storefront:d,user:l.user.value})}),(c=this.storefront)==null||c.onCheckoutInitiated((d,f)=>{mr(Dt.CheckoutInitiated,{order:d,total:f,user:l.user.value})}),this.storefront.onCheckoutClosed(d=>{mr(Dt.CheckoutClosed,{order:this.storefront.currentOrder.value,user:l.user.value}),d===W.ViewProducts&&(l.user.value?a.show(te.Customer,W.ViewProducts):a.show(te.Cart,W.ViewCart))}),this.storefront.onCheckoutCompleted(d=>{mr(Dt.CheckoutCompleted,{order:d,user:l.user.value})})}configure(t){var r;Ye("Given options:",t);const n=hl(((r=this.options)==null?void 0:r.value)??ap,t??{});Ye("Merged options:",n),this.options?this.options.value=n:this.options=j(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(W).includes(r)){const o=Object.fromEntries([...n.entries()].filter(([i])=>i.startsWith("mb_")).map(([i,a])=>[i.substring(3),a]));if(r===W.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");Ce(this.pinia).show(te.Authentication,W.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");Ce(this.pinia).show(te.Authentication,W.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ConfirmAccount,t)}confirm_email(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ConfirmEmail,t)}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Authentication,W.ConfirmEmailChange,t):(n.enqueue(te.Authentication,W.ConfirmEmailChange,t),n.show(te.Authentication,W.SignIn))}connect_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.provider_id){const s=Object.values(Is).find(i=>i.toLowerCase()===t.provider_id.toLowerCase());s&&(t.provider_id=s)}const n=Ce(this.pinia),r=Re(this.storefront),o=t;r.user.value?n.show(te.Customer,W.ConnectAccount,o):(n.enqueue(te.Customer,W.ConnectAccount,o),n.show(te.Authentication,W.SignIn))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewAccount):(t.enqueue(te.Customer,W.ViewAccount),t.show(te.Authentication,W.SignIn))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewProducts):(t.enqueue(te.Customer,W.ViewProducts),t.show(te.Authentication,W.SignIn))}view_subscriptions(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewSubscriptions):(t.enqueue(te.Customer,W.ViewSubscriptions),t.show(te.Authentication,W.SignIn))}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Customer,W.RedeemVoucher,t):n.show(te.Redeem,W.RedeemVoucher,t)}view_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Product,W.ViewProduct,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Product,W.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia),r=Re(this.storefront);!(t!=null&&t.token)&&!r.user.value?(n.enqueue(te.Activation,W.ActivateProduct,t),n.show(te.Authentication,W.SignIn)):n.show(te.Activation,W.ActivateProduct,t)}manage_subscription(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Subscription,W.ManageSubscription,t):(n.enqueue(te.Subscription,W.ManageSubscription,t),n.show(te.Authentication,W.SignIn))}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Cart,W.ViewCart)}async add_to_cart(t){var s,i,a,l,u,c,d,f,h,m,y,x,P,C,U,M,I,V;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=Bn(this.storefront),r=Re(this.storefront),o=t.offer_id?r1(t.offer_id):null;if(t!=null&&t.product_id){const E=fi(t.product_id,this.storefront);if(E.value){let O=n.addToCart(E.value,(s=E.value.variations)==null?void 0:s.find(A=>A.id===t.variation_id),(o==null?void 0:o.value)||void 0);const T=((i=O.price)==null?void 0:i[n.currency.value])===0;t!=null&&t.quantity&&(O=n.setQuantity(O,O.quantity+t.quantity-1)),(T?((a=this.options)==null?void 0:a.value.cart.leadMagnets.quantity)==="single":((l=this.options)==null?void 0:l.value.cart.quantity)==="single")&&(O=n.setQuantity(O,1)),mr(Dt.AddedToCart,{item:O,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const O=fi(t.product_id,this.storefront);if(O.value){let T=n.addToCart(O.value,(u=O.value.variations)==null?void 0:u.find(R=>R.id===t.variation_id),(o==null?void 0:o.value)||void 0);const A=((c=T.price)==null?void 0:c[n.currency.value])===0;t!=null&&t.quantity&&(T=n.setQuantity(T,T.quantity+t.quantity-1)),(A?((d=this.options)==null?void 0:d.value.cart.leadMagnets.quantity)==="single":((f=this.options)==null?void 0:f.value.cart.quantity)==="single")&&(T=n.setQuantity(T,1)),mr(Dt.AddedToCart,{item:T,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 E=Va(t.bundle_id,this.storefront);if(E.value){const O=(h=E.value.variations)==null?void 0:h.find(R=>R.id===t.variation_id);let T=n.addToCart(E.value,O,(o==null?void 0:o.value)||void 0,{bundleBehaviour:(m=this.options)==null?void 0:m.value.cart.bundles.onAdd});const A=((y=T.price)==null?void 0:y[n.currency.value])===0;t!=null&&t.quantity&&(T=n.setQuantity(T,T.quantity+t.quantity-1)),(A?((x=this.options)==null?void 0:x.value.cart.leadMagnets.quantity)==="single":((P=this.options)==null?void 0:P.value.cart.quantity)==="single")&&(T=n.setQuantity(T,1)),mr(Dt.AddedToCart,{item:T,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const O=Va(t.bundle_id,this.storefront);if(O.value){const T=(C=O.value.variations)==null?void 0:C.find(B=>B.id===t.variation_id);let A=n.addToCart(O.value,T,(o==null?void 0:o.value)||void 0,{bundleBehaviour:(U=this.options)==null?void 0:U.value.cart.bundles.onAdd});const R=((M=A.price)==null?void 0:M[n.currency.value])===0;t!=null&&t.quantity&&(A=n.setQuantity(A,A.quantity+t.quantity-1)),(R?((I=this.options)==null?void 0:I.value.cart.leadMagnets.quantity)==="single":((V=this.options)==null?void 0:V.value.cart.quantity)==="single")&&(A=n.setQuantity(A,1)),mr(Dt.AddedToCart,{item:A,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&&Ce(this.pinia).show(te.Cart,W.AddToCart)}async purchase(t){var s,i,a,l,u;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(s=this.storefront)!=null&&s.loadedStorefront||await((i=this.storefront)==null?void 0:i.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 c of n){if(!c.product_id&&!c.bundle_id)throw new Error("You need to provide a product or bundle ID when purchasing");if(c.product_id){const d=fi(c.product_id,this.storefront);if(d.value)r.push({item:d.value,variation:(a=d.value.variations)==null?void 0:a.find(f=>f.id===c.variation_id),quantity:c.quantity});else throw new Error(`Product '${c.product_id}' not found`)}if(c.bundle_id){const d=Va(c.bundle_id,this.storefront);if(d.value)r.push({item:d.value,variation:(l=d.value.variations)==null?void 0:l.find(f=>f.id===c.variation_id),quantity:c.quantity});else throw new Error(`Bundle '${c.bundle_id}' not found`)}}const o=Re(this.storefront);await n1(r,{redirect:((u=this.options)==null?void 0:u.value.checkout.redirect)||!1,returnUrl:o.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0},this.storefront)}checkout(t){var o;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;const n=Bn(this.storefront),r=Re(this.storefront);n.checkout({redirect:((o=this.options)==null?void 0:o.value.checkout.redirect)||!1,returnUrl:r.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0})}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");Ce(this.pinia).show(te.About,W.ViewAbout)}}const pl=new UA;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=pl),_t.MoonbaseEvent=Dt,_t.MoonbaseIntent=W,_t.default=pl,_t.eventEmitterKey=Hr,_t.instanceKey=Zm,_t.urlKey=_c,Object.defineProperties(_t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
35
+ */const nm=.027,rE=5e-4,oE=.1,rm=1.14,el=.022,om=1.414,sE=(e,t)=>{e=new J(e),t=new J(t),e.alpha()<1&&(e=ns(t,e,e.alpha(),"rgb"));const n=sm(...e.rgb()),r=sm(...t.rgb()),o=n>=el?n:n+Math.pow(el-n,om),s=r>=el?r:r+Math.pow(el-r,om),i=Math.pow(s,.56)-Math.pow(o,.57),a=Math.pow(s,.65)-Math.pow(o,.62),l=Math.abs(s-o)<rE?0:o<s?i*rm:a*rm;return(Math.abs(l)<oE?0:l>0?l-nm:l+nm)*100};function sm(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:dr,pow:ht,min:iE,max:aE,atan2:im,abs:am,cos:tl,sin:lm,exp:lE,PI:um}=Math;function uE(e,t,n=1,r=1,o=1){var s=function(wt){return 360*wt/(2*um)},i=function(wt){return 2*um*wt/360};e=new J(e),t=new J(t);const[a,l,u]=Array.from(e.lab()),[c,d,f]=Array.from(t.lab()),h=(a+c)/2,m=dr(ht(l,2)+ht(u,2)),y=dr(ht(d,2)+ht(f,2)),x=(m+y)/2,P=.5*(1-dr(ht(x,7)/(ht(x,7)+ht(25,7)))),C=l*(1+P),U=d*(1+P),M=dr(ht(C,2)+ht(u,2)),I=dr(ht(U,2)+ht(f,2)),V=(M+I)/2,E=s(im(u,C)),O=s(im(f,U)),T=E>=0?E:E+360,A=O>=0?O:O+360,R=am(T-A)>180?(T+A+360)/2:(T+A)/2,B=1-.17*tl(i(R-30))+.24*tl(i(2*R))+.32*tl(i(3*R+6))-.2*tl(i(4*R-63));let q=A-T;q=am(q)<=180?q:A<=T?q+360:q-360,q=2*dr(M*I)*lm(i(q)/2);const be=c-a,pe=I-M,he=1+.015*ht(h-50,2)/dr(20+ht(h-50,2)),oe=1+.045*V,ue=1+.015*V*B,Be=30*lE(-ht((R-275)/25,2)),ot=-(2*dr(ht(V,7)/(ht(V,7)+ht(25,7))))*lm(2*i(Be)),$t=dr(ht(be/(n*he),2)+ht(pe/(r*oe),2)+ht(q/(o*ue),2)+ot*(pe/(r*oe))*(q/(o*ue)));return aE(0,iE(100,$t))}function cE(e,t,n="lab"){e=new J(e),t=new J(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 dE=(...e)=>{try{return new J(...e),!0}catch{return!1}},fE={cool(){return Ja([Te.hsl(180,1,.9),Te.hsl(250,.7,.4)])},hot(){return Ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},hc={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"]},cm=Object.keys(hc),dm=new Map(cm.map(e=>[e.toLowerCase(),e])),hE=typeof Proxy=="function"?new Proxy(hc,{get(e,t){const n=t.toLowerCase();if(dm.has(n))return e[dm.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(cm)}}):hc,pE=(...e)=>{e=Pe(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:fm}=Math,mE=(...e)=>{let[t,n,r]=Pe(e,"rgb");t=t/255,n=n/255,r=r/255;const o=1-fm(t,fm(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]};J.prototype.cmyk=function(){return mE(this._rgb)},Object.assign(Te,{cmyk:(...e)=>new J(...e,"cmyk")}),Se.format.cmyk=pE,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"cmyk"),$e(e)==="array"&&e.length===4)return"cmyk"}});const gE=(...e)=>{const t=Pe(e,"hsla");let n=es(e)||"lsa";return t[0]=ln(t[0]||0)+"deg",t[1]=ln(t[1]*100)+"%",t[2]=ln(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(" ")})`},bE=(...e)=>{const t=Pe(e,"lab");let n=es(e)||"lab";return t[0]=ln(t[0])+"%",t[1]=ln(t[1]),t[2]=ln(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},vE=(...e)=>{const t=Pe(e,"lch");let n=es(e)||"lab";return t[0]=ln(t[0])+"%",t[1]=ln(t[1]),t[2]=isNaN(t[2])?"none":ln(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(" ")})`},yE=(...e)=>{const t=Pe(e,"lab");return t[0]=ln(t[0]*100)+"%",t[1]=Qu(t[1]),t[2]=Qu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},hm=(...e)=>{const[t,n,r,...o]=Pe(e,"rgb"),[s,i,a]=uc(t,n,r),[l,u,c]=Zp(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},wE=(...e)=>{const t=Pe(e,"lch");return t[0]=ln(t[0]*100)+"%",t[1]=Qu(t[1]),t[2]=isNaN(t[2])?"none":ln(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:pc}=Math,_E=(...e)=>{const t=Pe(e,"rgba");let n=es(e)||"rgb";if(n.substr(0,3)==="hsl")return gE(Kp(t),n);if(n.substr(0,3)==="lab"){const r=Ai();cr("d50");const o=bE(tc(t),n);return cr(r),o}if(n.substr(0,3)==="lch"){const r=Ai();cr("d50");const o=vE(sc(t),n);return cr(r),o}return n.substr(0,5)==="oklab"?yE(uc(t)):n.substr(0,5)==="oklch"?wE(hm(t)):(t[0]=pc(t[0]),t[1]=pc(t[1]),t[2]=pc(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(" ")})`)},pm=(...e)=>{e=Pe(e,"lch");const[t,n,r,...o]=e,[s,i,a]=Wp(t,n,r),[l,u,c]=lc(s,i,a);return[l,u,c,...o.length>0&&o[0]<1?[o[0]]:[]]},fr=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Nn=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,nl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,un=/\s*/.source,is=/\s+/.source,mc=/\s*,\s*/.source,rl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,as=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,mm=new RegExp("^rgba?\\("+un+[fr,fr,fr].join(is)+as+"\\)$"),gm=new RegExp("^rgb\\("+un+[fr,fr,fr].join(mc)+un+"\\)$"),bm=new RegExp("^rgba\\("+un+[fr,fr,fr,Nn].join(mc)+un+"\\)$"),vm=new RegExp("^hsla?\\("+un+[rl,nl,nl].join(is)+as+"\\)$"),ym=new RegExp("^hsl?\\("+un+[rl,nl,nl].join(mc)+un+"\\)$"),wm=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,_m=new RegExp("^lab\\("+un+[Nn,Nn,Nn].join(is)+as+"\\)$"),Em=new RegExp("^lch\\("+un+[Nn,Nn,rl].join(is)+as+"\\)$"),km=new RegExp("^oklab\\("+un+[Nn,Nn,Nn].join(is)+as+"\\)$"),xm=new RegExp("^oklch\\("+un+[Nn,Nn,rl].join(is)+as+"\\)$"),{round:Am}=Math,ls=e=>e.map((t,n)=>n<=2?_o(Am(t),0,255):t),pt=(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),qt=(e,t)=>e==="none"?t:e,gc=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Se.format.named)try{return Se.format.named(e)}catch{}if((t=e.match(mm))||(t=e.match(gm))){let n=t.slice(1,4);for(let o=0;o<3;o++)n[o]=+pt(qt(n[o],0),0,255);n=ls(n);const r=t[4]!==void 0?+pt(t[4],0,1):1;return n[3]=r,n}if(t=e.match(bm)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+pt(n[r],0,255);return n}if((t=e.match(vm))||(t=e.match(ym))){const n=t.slice(1,4);n[0]=+qt(n[0].replace("deg",""),0),n[1]=+pt(qt(n[1],0),0,100)*.01,n[2]=+pt(qt(n[2],0),0,100)*.01;const r=ls(ac(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}if(t=e.match(wm)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=ac(n);for(let o=0;o<3;o++)r[o]=Am(r[o]);return r[3]=+t[4],r}if(t=e.match(_m)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,100),n[1]=pt(qt(n[1],0),-125,125,!0),n[2]=pt(qt(n[2],0),-125,125,!0);const r=Ai();cr("d50");const o=ls(Ju(n));cr(r);const s=t[4]!==void 0?+pt(t[4],0,1):1;return o[3]=s,o}if(t=e.match(Em)){const n=t.slice(1,4);n[0]=pt(n[0],0,100),n[1]=pt(qt(n[1],0),0,150,!1),n[2]=+qt(n[2].replace("deg",""),0);const r=Ai();cr("d50");const o=ls(oc(n));cr(r);const s=t[4]!==void 0?+pt(t[4],0,1):1;return o[3]=s,o}if(t=e.match(km)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,1),n[1]=pt(qt(n[1],0),-.4,.4,!0),n[2]=pt(qt(n[2],0),-.4,.4,!0);const r=ls(lc(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}if(t=e.match(xm)){const n=t.slice(1,4);n[0]=pt(qt(n[0],0),0,1),n[1]=pt(qt(n[1],0),0,.4,!1),n[2]=+qt(n[2].replace("deg",""),0);const r=ls(pm(n)),o=t[4]!==void 0?+pt(t[4],0,1):1;return r[3]=o,r}};gc.test=e=>mm.test(e)||vm.test(e)||_m.test(e)||Em.test(e)||km.test(e)||xm.test(e)||gm.test(e)||bm.test(e)||ym.test(e)||wm.test(e)||e==="transparent",J.prototype.css=function(e){return _E(this._rgb,e)};const EE=(...e)=>new J(...e,"css");Te.css=EE,Se.format.css=gc,Se.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&gc.test(e))return"css"}}),Se.format.gl=(...e)=>{const t=Pe(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const kE=(...e)=>new J(...e,"gl");Te.gl=kE,J.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},J.prototype.hex=function(e){return Hp(this._rgb,e)};const xE=(...e)=>new J(...e,"hex");Te.hex=xE,Se.format.hex=Fp,Se.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:ol}=Math,Cm=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*ol(r),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*ol(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*ol(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*ol(r),o=255),[n,r,o,1]},{round:AE}=Math,CE=(...e)=>{const t=Pe(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=Cm(a);l[2]/l[0]>=r/n?s=a:o=a}return AE(a)};J.prototype.temp=J.prototype.kelvin=J.prototype.temperature=function(){return CE(this._rgb)};const bc=(...e)=>new J(...e,"temp");Object.assign(Te,{temp:bc,kelvin:bc,temperature:bc}),Se.format.temp=Se.format.kelvin=Se.format.temperature=Cm,J.prototype.oklch=function(){return hm(this._rgb)},Object.assign(Te,{oklch:(...e)=>new J(...e,"oklch")}),Se.format.oklch=pm,Se.autodetect.push({p:2,test:(...e)=>{if(e=Pe(e,"oklch"),$e(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Te,{analyze:em,average:P2,bezier:V2,blend:Sn,brewer:hE,Color:J,colors:ts,contrast:nE,contrastAPCA:sE,cubehelix:Y2,deltaE:uE,distance:cE,input:Se,interpolate:ns,limits:tm,mix:ns,random:X2,scale:Ja,scales:fE,valid:dE});const OE=[{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 SE(e){const r=OE.filter(i=>i.reference).map(i=>({...i,shades:i.shades.map(a=>({...a,delta:Te.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(Te(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 NE(e){const t=Te(e),n=SE(t),r=t.get("hsl.h"),o=Te(n.closestShade.hexcode).get("hsl.h"),s=r-o,i=s===0?o.toString():s>0?`+${s}`:s.toString(),a=t.get("hsl.s")/Te(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=Te(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 us extends Error{constructor(){super(),this.name="IndiscriminateError"}}const PE={},TE={fill:"none",viewBox:"0 0 24 24"};function IE(e,t){return p(),_("svg",TE,t[0]||(t[0]=[L("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),L("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 zt=ar(PE,[["render",IE],["__scopeId","data-v-687bcaf0"]]),DE={"aria-hidden":"true"},Ci=le({__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=fe(it),r=Z(()=>t.success?t.successLabel??t.label:t.error?t.errorLabel??t.label:t.label),o=Z(()=>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 p(),H(ru(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:k(()=>[L("div",DE,[s.working?(p(),H(zt,{key:0})):s.success?(p(),H(b(Uw),{key:1})):s.error?(p(),H(b(Hw),{key:2})):s.icon?(p(),H(ru(s.icon),{key:3})):z("",!0)]),N(" "+$(r.value),1)]),_:1},8,["type","disabled","data-success","data-error","data-working","data-variant","data-size","data-corners","data-background","data-icon-visible"])}}}),Ve=le({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},icon:{},variant:{},size:{},noReset:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e,n=j(!1),r=j(!1),o=j(!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 us)return;o.value=!0,await Ht(2500),o.value=!1}}return(i,a)=>(p(),H(Ci,{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"]))}}),$E={},ME={class:"moonbase:text-body"};function VE(e,t){return p(),_("span",ME,[Nt(e.$slots,"default")])}const Ke=ar($E,[["render",VE]]),LE={},RE={class:"moonbase:text-subtext"};function jE(e,t){return p(),_("span",RE,[Nt(e.$slots,"default")])}const ye=ar(LE,[["render",jE]]),UE={class:"moonbase:about"},BE=le({__name:"About",setup(e){const t=Ce(),n="1.0.27";return(r,o)=>(p(),_("div",UE,[o[2]||(o[2]=ch('<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)),v(b(Ap),{as:"h3"},{default:k(()=>o[0]||(o[0]=[N(" Moonbase Embedded Storefront ")])),_:1,__:[0]}),v(ye,null,{default:k(()=>[N(" Version "+$(b(n)),1)]),_:1}),v(Ke,null,{default:k(()=>o[1]||(o[1]=[N(" This store is using the "),L("a",{href:"https://moonbase.sh/solutions/payments",target:"_blank"},"Moonbase Embedded Storefront",-1),N(" module to accept payments, provide authentication and power software licensing. ")])),_:1,__:[1]}),v(Ve,{label:"Close",variant:"primary",handler:()=>b(t).reset()},null,8,["handler"])]))}});var Dt=(e=>(e.SignedIn="signed-in",e.SignedUp="signed-up",e.SignedOut="signed-out",e.RedeemedVoucher="redeemed-voucher",e.StorefrontUpdated="storefront-updated",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))(Dt||{});const FE=["data-corners","data-variant"],HE={class:"moonbase:card-content"},nn=le({__name:"MoonCard",setup(e){const t=fe(it);return(n,r)=>{var o,s;return p(),_("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},[L("div",HE,[Nt(n.$slots,"default")]),Nt(n.$slots,"addon")],8,FE)}}}),qE=["data-corners"],zE=["href"],WE=["src"],ZE=["src"],YE={key:2,class:"moonbase:image-placeholder"},At=le({__name:"ProductIcon",props:{url:{},href:{},size:{}},setup(e){const t=fe(it);return(n,r)=>{var o;return p(),_("div",{class:"moonbase:product-icon",style:Vo({width:`${n.size}px`,height:`${n.size}px`}),"data-corners":(o=b(t))==null?void 0:o.theme.corners},[n.href&&n.url?(p(),_("a",{key:0,href:n.href},[L("img",{src:n.url,alt:""},null,8,WE)],8,zE)):n.url?(p(),_("img",{key:1,src:n.url,alt:""},null,8,ZE)):(p(),_("div",YE,[v(b(Bw))]))],12,qE)}}}),KE={},GE={class:"moonbase:text-title"};function QE(e,t){return p(),_("h4",GE,[Nt(e.$slots,"default")])}const hr=ar(KE,[["render",QE]]),XE={class:"moonbase:product-card-content"},JE=["href"],Om=le({__name:"ProductCard",props:{product:{}},setup(e){const t=fe(it);return(n,r)=>(p(),H(nn,{class:"moonbase:product-card"},{default:k(()=>{var o,s;return[v(At,{url:n.product.iconUrl,size:72},null,8,["url"]),L("div",XE,[v(hr,null,{default:k(()=>{var i;return[N($((i=n.product)==null?void 0:i.name),1)]}),_:1}),v(ye,null,{default:k(()=>{var i;return[N($((i=n.product)==null?void 0:i.tagline),1)]}),_:1}),(o=b(t))!=null&&o.activation.websiteLink.enabled&&n.product.website?(p(),_("a",{key:0,class:"moonbase:product-card-website",href:n.product.website,target:"_blank",rel:"noopener noreferrer"},[v(b(Ku)),N(" "+$((s=b(t))==null?void 0:s.activation.websiteLink.label),1)],8,JE)):z("",!0),Nt(n.$slots,"description")]),Nt(n.$slots,"default")]}),_:3}))}}),e5={class:"moonbase:auto-activation"},t5={key:0,class:"moonbase:loader"},n5={key:1,class:"moonbase:loader"},r5={key:2,class:"moonbase:loader"},o5={key:3},s5={key:1,class:"moonbase:loader"},i5={key:2,class:"moonbase:loader"},a5={key:3,class:"moonbase:loader"},l5={key:4,class:"moonbase:auto-activation-content"},u5={key:0,class:"moonbase:auto-activation-option"},c5={class:"moonbase:auto-activation-cta"},d5={key:1,class:"moonbase:auto-activation-option"},f5={class:"moonbase:auto-activation-cta"},h5={key:2,class:"moonbase:auto-activation-option"},p5={key:3,class:"moonbase:auto-activation-option"},m5={class:"moonbase:auto-activation-cta"},g5={key:4,class:"moonbase:auto-activation-option"},b5={key:4,class:"moonbase:auto-activation-cta"},v5={key:5,class:"moonbase:auto-activation-cta"},y5=le({__name:"AutoActivation",setup(e){const t=Ce(),{user:n,loaded:r}=Re(),o=fe(Hr),s=t.getParameter("token"),{activationRequest:i,loading:a,fulfilling:l,completing:u,error:c,fulfillLicense:d,fulfillTrial:f}=e1(s),h=fe(Ft);Ze(i,E=>{var O;!l.value&&!u.value&&(E==null?void 0:E.status)===mn.Requested&&((O=E==null?void 0:E.licenseEligibility)!=null&&O.eligible)&&d(),(E==null?void 0:E.status)===mn.Completed&&(o==null||o(Dt.ActivatedProduct,{product:E.product,fulfillmentType:E.fulfillmentType,user:n.value}))},{deep:!0});const m=Z(()=>{if(i.value)return b(fi(i.value.product.id))}),y=Z(()=>m.value&&m.value.defaultVariation),{currency:x,addToCart:P,setQuantity:C}=Bn();function U(){t.show(te.Product,W.ViewProduct,{product_id:i.value.product.id})}function M(){t.enqueue(te.Activation,W.ActivateProduct,t.parameters??void 0),t.show(te.Authentication,W.SignIn)}function I(){if(!m.value)return;const E=P(m.value);C(E,1),t.enqueue(te.Activation,W.ActivateProduct,t.parameters),t.show(te.Cart,W.ViewCart)}function V(){var E;t.enqueue(te.Activation,W.ActivateProduct,{...t.parameters,product_id:((E=i.value)==null?void 0:E.product.id)??""}),n.value?t.show(te.Customer,W.RedeemVoucher):t.show(te.Redeem,W.RedeemVoucher)}return(E,O)=>{var T,A,R,B,q,be,pe;return p(),_("div",e5,[b(a)||!b(r)||!((T=b(h))!=null&&T.loadedStorefront)?(p(),_("div",t5,[v(zt)])):b(c)?(p(),_("div",n5,[v(qe,null,{default:k(()=>O[0]||(O[0]=[N(" Uh oh ")])),_:1,__:[0]}),v(Ke,null,{default:k(()=>[N($(b(c)),1)]),_:1})])):b(i)?(p(),_("div",o5,[b(i).product?(p(),H(Om,{key:0,product:b(i).product},null,8,["product"])):z("",!0),((A=b(i))==null?void 0:A.status)===b(mn).Cancelled?(p(),_("div",s5,[v(qe,null,{default:k(()=>O[3]||(O[3]=[N(" Uh oh ")])),_:1,__:[3]}),v(Ke,null,{default:k(()=>O[4]||(O[4]=[N(" This activation request was cancelled, open your app to try again. ")])),_:1,__:[4]})])):b(l)||b(u)?(p(),_("div",i5,[v(zt),v(Ke,null,{default:k(()=>[N(" Activating "+$(b(i).product.name)+"... ",1)]),_:1})])):((R=b(i))==null?void 0:R.status)===b(mn).Completed?(p(),_("div",a5,[v(qe,null,{default:k(()=>O[5]||(O[5]=[N(" Done! ")])),_:1,__:[5]}),v(Ke,null,{default:k(()=>O[6]||(O[6]=[N(" Your product is activated. "),L("br",null,null,-1),N(" You may close this window and return to the app. ")])),_:1,__:[6]})])):(p(),_("div",l5,[y.value?(p(),_("div",u5,[v(qe,null,{default:k(()=>O[7]||(O[7]=[N(" Option 1: Purchase product ")])),_:1,__:[7]}),v(Ke,null,{default:k(()=>[N(" Buy a copy of "+$(m.value.name)+" for ",1),L("strong",null,$(b(xt)(m.value.defaultVariation.price[b(x)],b(x))),1),O[8]||(O[8]=N(". "))]),_:1,__:[8]}),L("span",c5,[v(Ve,{label:"Purchase",variant:"primary",handler:()=>I()},null,8,["handler"])])])):z("",!0),b(n)?!b(n).ownedProducts||!((B=b(n).ownedProducts)!=null&&B.includes(b(i).product.id))&&!b(n).subscribedProducts||!((q=b(n).subscribedProducts)!=null&&q.includes(b(i).product.id))?(p(),_("div",h5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[10]||(O[10]=[N(" You don't own any licenses for this product. ")])),_:1,__:[10]})])):(be=b(n).ownedProducts)!=null&&be.includes(b(i).product.id)||(pe=b(n).subscribedProducts)!=null&&pe.includes(b(i).product.id)?(p(),_("div",p5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[11]||(O[11]=[N(" 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]}),L("span",m5,[v(Ve,{label:"Licenses",variant:"secondary",handler:()=>U()},null,8,["handler"])])])):z("",!0):(p(),_("div",d5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"2":"1")+": Use license ",1)]),_:1}),v(Ke,null,{default:k(()=>O[9]||(O[9]=[N(" Please sign in to use a license for this product. ")])),_:1,__:[9]}),L("span",f5,[v(Ve,{label:"Sign in",variant:"secondary",handler:()=>M()},null,8,["handler"])])])),b(i).trialEligibility?(p(),_("div",g5,[v(qe,null,{default:k(()=>[N(" Option "+$(y.value?"3":"2")+": Start trial ",1)]),_:1}),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(p(),H(Ke,{key:0},{default:k(()=>O[12]||(O[12]=[N(" You need to be signed in to start a trial for this product. ")])),_:1,__:[12]})):b(i).trialEligibility.eligible&&b(i).trialEligibility.existing?(p(),H(Ke,{key:1},{default:k(()=>[N(" You are eligible for a "+$(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial of which you have "+$(b(i).trialEligibility.numberOfDaysRemaining)+" days remaining. ",1)]),_:1})):b(i).trialEligibility.eligible?(p(),H(Ke,{key:2},{default:k(()=>[N(" You are eligible for a "+$(b(i).trialEligibility.numberOfDaysPerProduct)+" day trial. ",1)]),_:1})):(p(),H(Ke,{key:3},{default:k(()=>O[13]||(O[13]=[N(" This device or product is not eligible for a trial. ")])),_:1,__:[13]})),b(i).trialEligibility.eligible&&b(i).trialEligibility.requiresAccount&&!b(n)?(p(),_("span",b5,[v(Ve,{label:"Sign in",variant:"secondary",handler:()=>M()},null,8,["handler"])])):b(i).trialEligibility.eligible?(p(),_("span",v5,[v(Ve,{label:"Start trial",variant:"secondary",handler:b(f)},null,8,["handler"])])):z("",!0)])):z("",!0),O[15]||(O[15]=L("div",{class:"moonbase:grow"},null,-1)),v(ye,{class:"moonbase:auto-activation-redeem"},{default:k(()=>[O[14]||(O[14]=N(" Have a voucher code? ")),L("button",{type:"button",onClick:V}," Redeem now ")]),_:1,__:[14]})]))])):(p(),_("div",r5,[v(qe,null,{default:k(()=>O[1]||(O[1]=[N(" Uh oh ")])),_:1,__:[1]}),v(Ke,null,{default:k(()=>O[2]||(O[2]=[N(" Could not find activation request ")])),_:1,__:[2]})]))])}}}),w5={},_5={class:"moonbase:text-caption"};function E5(e,t){return p(),_("span",_5,[Nt(e.$slots,"default")])}const Wt=ar(w5,[["render",E5]]),k5=["data-corners"],x5=["accept"],A5={"data-error":""},C5=le({__name:"DeviceTokenInput",props:{error:{}},emits:["input","error"],setup(e,{emit:t}){const n=t,r=fe(it),o=j(!1),s=Z(()=>{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 p(),_("div",{class:Rs(["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]=Lr(()=>{},["prevent","stop"])),onDragstart:c[1]||(c[1]=Lr(()=>{},["prevent","stop"])),onDragend:c[2]||(c[2]=Lr(h=>o.value=!1,["prevent","stop"])),onDragover:c[3]||(c[3]=Lr(h=>o.value=!0,["prevent","stop"])),onDragenter:c[4]||(c[4]=Lr(h=>o.value=!0,["prevent","stop"])),onDragleave:c[5]||(c[5]=Lr(h=>o.value=!1,["prevent","stop"])),onDrop:Lr(a,["prevent","stop"])},[v(b(Fw)),c[6]||(c[6]=L("label",{for:"fallback-input"},[L("span",{class:"moonbase:underline"},"Choose a machine file"),N(" or drag here to upload ")],-1)),L("input",{id:"fallback-input",type:"file",accept:s.value,class:"moonbase:sr-only",onChange:l},null,40,x5),L("p",A5,$((f=u.error)==null?void 0:f.message),1)],42,k5)}}}),O5={class:"moonbase:manual-activation"},S5={key:1,class:"moonbase:loader"},N5={key:2,class:"moonbase:manual-activation-content"},P5=le({__name:"ManualActivation",setup(e){const t=fe(it),{activateProduct:n}=fo(),r=Yi.Offline,o=j(0),s=j(null),i=j(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)=>(p(),_("div",O5,[v(Ke,null,{default:k(()=>u[2]||(u[2]=[N(" 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]}),v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[o.value===0?(p(),H(C5,{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?(p(),_("div",S5,[v(zt)])):o.value===2&&i.value?(p(),_("div",N5,[v(qe,null,{default:k(()=>u[3]||(u[3]=[N(" Success! ")])),_:1,__:[3]}),v(Ke,null,{default:k(()=>u[4]||(u[4]=[N(" Your license can be downloaded below: ")])),_:1,__:[4]}),i.value.license.product?(p(),H(Om,{key:0,product:i.value.license.product},{description:k(()=>[v(Wt,null,{default:k(()=>[N($(i.value.license.activeNumberOfActivations)+" of "+$(i.value.license.maxNumberOfActivations)+" devices activated ",1)]),_:1})]),default:k(()=>{var c;return[v(Xo,{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:k(()=>[v(b(Dp))]),_:1},8,["href","download"])]}),_:1},8,["product"])):z("",!0),u[5]||(u[5]=L("div",null,null,-1)),u[6]||(u[6]=L("div",null,null,-1))])):z("",!0)]),_:1})]))}}),T5={class:"moonbase:activation"},I5=le({__name:"Activation",setup(e){const t=Ce();return(n,r)=>(p(),_("div",T5,[b(t).getParameter("token")?(p(),H(y5,{key:0})):(p(),H(P5,{key:1}))]))}}),D5=["disabled"],Sm=Symbol("form-state"),zn=le({__name:"MoonForm",props:{handler:{type:Function},disabled:{type:Boolean},noReset:{type:Boolean}},setup(e){const t=e,n=j(!1),r=j(!1),o=j(!1),s=Z(()=>t.disabled||n.value||r.value||!1);Yt(Sm,{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)=>(p(),_("form",{disabled:s.value,onSubmit:Lr(i,["prevent"])},[Nt(a.$slots,"default",{working:n.value,isSuccess:r.value,isError:o.value,disabled:n.value||r.value})],40,D5))}}),$5=["hidden"],M5=["for"],V5=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby","data-corners"],L5=["id"],R5=["id"],Ct=le({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=fe(it);return(n,r)=>{var o;return p(),_("div",{class:"moonbase:input",hidden:n.hidden||void 0},[L("label",{for:`mb-${n.name}`},$(n.label),9,M5),L("input",vu({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,V5),n.error?(p(),_("p",{key:0,id:`mb-${n.name}-error`,class:"moonbase:input-hint","data-type":"error"},$(n.error),9,L5)):n.hint?(p(),_("p",{key:1,id:`mb-${n.name}-hint`,class:"moonbase:input-hint"},$(n.hint),9,R5)):z("",!0)],8,$5)}}}),Wn=le({__name:"MoonSubmitButton",props:{label:{},success:{},error:{},variant:{},size:{}},setup(e){const{working:t,isSuccess:n,isError:r,disabled:o}=fe(Sm);return(s,i)=>(p(),H(Ci,{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"]))}}),j5=["data-visible"],U5={class:"moonbase:sign-in-actions"},B5=["data-corners"],F5=le({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(it),i=fe(Hr),a=j(r.getParameter("email")??""),l=j(""),u=j(null);async function c(){u.value=null;try{const d=await o.signIn(a.value,l.value);i==null||i(Dt.SignedIn,{user:d}),Ht(1500).then(()=>n("signedIn",d))}catch(d){throw d instanceof Ar?u.value="User not found":u.value=d.message,d}}return(d,f)=>(p(),H(zn,{handler:c,class:"moonbase:sign-in"},{default:k(()=>{var h,m,y;return[v(Ct,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=x=>a.value=x),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),v(Ct,{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=x=>l.value=x),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),L("span",{class:"moonbase:error","data-visible":!!u.value||void 0},$(u.value),9,j5),v(Wn,{success:"Signed in",label:"Sign in",error:"Error"}),L("div",U5,[(h=b(s))!=null&&h.auth.signUp.enabled?(p(),H(Ve,{key:0,label:"Create account",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).SignUp,{email:a.value})},null,8,["handler"])):z("",!0),v(Ve,{label:"Forgot password",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).ForgotPassword,{email:a.value})},null,8,["handler"])]),(m=b(s))!=null&&m.auth.signIn.hint?(p(),_("div",{key:0,class:"moonbase:sign-in-hint","data-corners":(y=b(s))==null?void 0:y.theme.corners},[v(b(qw)),v(ye,null,{default:k(()=>[N($(b(s).auth.signIn.hint),1)]),_:1})],8,B5)):z("",!0)]}),_:1}))}}),sl="data:image/png;base64,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",vc={default:[{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)}],lax:[{title:"Password must be at least 6 characters long",test:e=>e.length>=6}]},H5={key:0,class:"moonbase:loader"},q5={key:1,class:"moonbase:error","data-visible":""},z5={class:"moonbase:connectable-providers"},W5={class:"moonbase:provider-info"},Z5=["src","alt"],Y5={key:0,class:"moonbase:password-validation"},K5=["data-visible"],G5=le({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ce(),{confirmAccount:o,resetPassword:s,signIn:i}=Re(),a=fe(it),l=j(!0),u=j(null),c=j(!1),d=j(null),f=j(""),h=j(!1),m=j(null),y=Z(()=>{var O;return(((O=d.value)==null?void 0:O.connectedAccounts)??[]).filter(T=>!T.isConnected)}),x=Z(()=>vc[(a==null?void 0:a.value.auth.passwords)??"default"]),P=Z(()=>x.value.some(O=>!O.test(f.value)));Ue(async()=>{try{const O=r.getParameter("email"),T=r.getParameter("code");if(!O||!T)throw new Error("Link is broken");u.value=await o(O,T)}catch(O){O instanceof Ar?m.value="Could not find a user to confirm":m.value=O.message}l.value=!1});async function C(){var O,T;if(m.value=null,!!((O=u.value)!=null&&O.resetPasswordToken))try{const A=r.getParameter("email");await s(A,f.value,(T=u.value)==null?void 0:T.resetPasswordToken);const R=await i(A,f.value);if((R.connectedAccounts??[]).some(q=>!q.isConnected)){d.value=R,c.value=!0;return}Ht(1500).then(()=>n("confirmedAccount",R))}catch(A){throw m.value=A.message,A}}function U(O){switch(O){case"iLok":return"iLok"}}function M(O){switch(O){case"iLok":return"Link your iLok account to streamline license delivery and activation."}}function I(O){switch(O){case"iLok":return sl}}function V(O){r.show(te.Customer,W.ConnectAccount,{provider_id:O})}function E(){d.value&&n("confirmedAccount",d.value)}return(O,T)=>(p(),H(zn,{handler:C,disabled:P.value,class:"moonbase:confirm-account"},{default:k(()=>[l.value?(p(),_("div",H5,[v(zt)])):u.value?(p(),_(de,{key:2},[c.value?(p(),_(de,{key:0},[v(hr,null,{default:k(()=>T[2]||(T[2]=[N("Connect your accounts")])),_:1,__:[2]}),v(Ke,null,{default:k(()=>T[3]||(T[3]=[N(" You can connect these external account providers now or later from your account settings. ")])),_:1,__:[3]}),L("ul",z5,[(p(!0),_(de,null,rt(y.value,A=>(p(),_("li",{key:A.provider},[L("div",W5,[I(A.provider)?(p(),_("img",{key:0,src:I(A.provider),alt:U(A.provider),class:"moonbase:provider-logo"},null,8,Z5)):z("",!0),L("div",null,[v(qe,null,{default:k(()=>[N($(U(A.provider)),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(M(A.provider)),1)]),_:2},1024)])]),v(Ve,{label:"Connect",handler:()=>V(A.provider)},null,8,["handler"])]))),128))]),v(Ve,{label:"Continue",variant:"secondary",handler:E})],64)):(p(),_(de,{key:1},[v(hr,null,{default:k(()=>[N(" Hi "+$(u.value.name)+", ",1)]),_:1}),v(Ke,null,{default:k(()=>T[4]||(T[4]=[N(" Please create a new password for your account: ")])),_:1,__:[4]}),v(Ct,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),v(Ct,{modelValue:f.value,"onUpdate:modelValue":T[0]||(T[0]=A=>f.value=A),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:T[1]||(T[1]=A=>h.value=!0)},null,8,["modelValue"]),h.value&&P.value?(p(),_("div",Y5,[(p(!0),_(de,null,rt(x.value.filter(A=>!A.test(f.value)),A=>(p(),H(ye,{key:A.title,"data-error":""},{default:k(()=>[N($(A.title),1)]),_:2},1024))),128))])):z("",!0),v(Wn,{success:"Password saved",label:"Save password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!m.value||void 0},$(m.value),9,K5)],64))],64)):(p(),_("div",q5,$(m.value),1))]),_:1},8,["disabled"]))}}),Q5={class:"moonbase:confirm-email-change"},X5={key:0,class:"moonbase:loader"},J5={key:1,class:"moonbase:error","data-visible":""},ek=le({__name:"ConfirmEmail",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ce(),{user:o,confirmEmail:s}=Re(),i=j(!0),a=j(null);return Ue(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)=>(p(),_("div",Q5,[i.value?(p(),_("div",X5,[v(zt)])):a.value?(p(),_("div",J5,$(a.value),1)):(p(),_(de,{key:2},[v(qe,null,{default:k(()=>u[0]||(u[0]=[N(" Success! ")])),_:1,__:[0]}),u[1]||(u[1]=L("p",null," Thanks for confirming your new email. ",-1)),b(o)?(p(),H(Ve,{key:0,handler:()=>b(r).show(b(te).Customer,b(W).ViewAccount,void 0,!0),label:"Continue"},null,8,["handler"])):z("",!0)],64))]))}}),tk={class:"moonbase:confirm-email-change"},nk={key:0,class:"moonbase:loader"},rk={key:1,class:"moonbase:error","data-visible":""},ok=le({__name:"ConfirmEmailChange",emits:["confirmed"],setup(e,{emit:t}){const n=t,r=Ce(),{user:o,confirmEmailChange:s}=Re(),i=j(!0),a=j(null);return Ue(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 p(),_("div",tk,[i.value?(p(),_("div",nk,[v(zt)])):a.value?(p(),_("div",rk,$(a.value),1)):(p(),_(de,{key:2},[L("h3",null," Hi "+$((c=b(o))==null?void 0:c.name)+", ",1),u[0]||(u[0]=L("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1))],64))])}}}),sk=["data-visible"],ik=le({__name:"ForgotPassword",setup(e){const t=Ce(),n=Re(),r=j(t.getParameter("email")??""),o=j(null),s=j(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Ht(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Ar?o.value="User not found":o.value=a.message,a}}return(a,l)=>(p(),H(zn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:k(({disabled:u})=>[l[1]||(l[1]=L("p",null," Please enter your email address below. You will receive an email message with instructions on how to reset your password. ",-1)),v(Ct,{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"]),v(Wn,{success:"Email sent",label:"Reset password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!o.value||void 0},$(o.value),9,sk)]),_:1,__:[1]}))}}),ak={key:0,class:"moonbase:password-validation"},lk=["data-visible"],uk=le({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(it),i=Z(()=>r.getParameter("email")),a=j(""),l=j(!1),u=j(null),c=Z(()=>vc[(s==null?void 0:s.value.auth.passwords)??"default"]),d=Z(()=>c.value.some(h=>!h.test(a.value)));Ue(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(u.value="Link broken, please try again")});async function f(){u.value=null;const h=r.getParameter("code");if(h)try{await o.resetPassword(i.value,a.value,h);const m=await o.signIn(i.value,a.value);Ht(1500).then(()=>n("passwordReset",m))}catch(m){throw u.value=m.message,m}}return(h,m)=>(p(),H(zn,{handler:f,disabled:d.value,class:"moonbase:reset-password"},{default:k(()=>[L("h3",null," Hi "+$(i.value)+", ",1),m[2]||(m[2]=L("p",null," Please create a new password for your account: ",-1)),v(Ct,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),v(Ct,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=y=>a.value=y),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:"",onBlur:m[1]||(m[1]=y=>l.value=!0)},null,8,["modelValue"]),l.value&&d.value?(p(),_("div",ak,[(p(!0),_(de,null,rt(c.value.filter(y=>!y.test(a.value)),y=>(p(),H(ye,{key:y.title,"data-error":""},{default:k(()=>[N($(y.title),1)]),_:2},1024))),128))])):z("",!0),v(Wn,{success:"Password saved",label:"Save password",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!u.value||void 0},$(u.value),9,lk)]),_:1,__:[2]},8,["disabled"]))}}),ck={class:"moonbase:checkbox"},dk={class:"moonbase:checkbox-container"},fk=["id","name","checked","disabled","aria-invalid","aria-describedby"],hk={class:"moonbase:checkbox-description"},pk=["for"],mk=["id"],gk=["id"],Nm=le({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(p(),_("div",ck,[L("div",dk,[L("input",vu({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,fk)]),L("div",hk,[L("label",{for:`mb-${t.name}`},$(t.label),9,pk),t.error?(p(),_("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},$(t.error),9,mk)):t.hint?(p(),_("p",{key:1,id:`mb-${t.name}-hint`},$(t.hint),9,gk)):z("",!0)])]))}}),bk={key:0,class:"moonbase:password-validation"},vk=["href"],yk=["href"],wk=["data-visible"],_k=le({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ce(),o=Re(),s=fe(_c),i=fe(Hr),a=fe(it),l=j(""),u=j(r.getParameter("email")??""),c=j(""),d=j(!1),f=j((a==null?void 0:a.value.auth.signUp.marketingConsent)===Po.OptOut||(a==null?void 0:a.value.auth.signUp.marketingConsent)===Po.OptedInByDefault),h=j(null),m=Z(()=>vc[(a==null?void 0:a.value.auth.passwords)??"default"]),y=Z(()=>m.value.some(P=>!P.test(c.value)));async function x(){h.value=null;try{const P=await o.signUp(l.value,u.value,c.value,null,!0,!0,f.value);i==null||i(Dt.SignedUp,{user:P}),Ht(1500).then(()=>n("signedUp",P))}catch(P){throw h.value=P.message,P}}return(P,C)=>(p(),H(zn,{handler:x,disabled:y.value,class:"moonbase:sign-up"},{default:k(()=>{var U;return[v(Ct,{modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=M=>l.value=M),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),v(Ct,{modelValue:u.value,"onUpdate:modelValue":C[1]||(C[1]=M=>u.value=M),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),v(Ct,{modelValue:c.value,"onUpdate:modelValue":C[2]||(C[2]=M=>c.value=M),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:"",onBlur:C[3]||(C[3]=M=>d.value=!0)},null,8,["modelValue"]),d.value&&y.value?(p(),_("div",bk,[(p(!0),_(de,null,rt(m.value.filter(M=>!M.test(c.value)),M=>(p(),H(ye,{key:M.title,"data-error":""},{default:k(()=>[N($(M.title),1)]),_:2},1024))),128))])):z("",!0),((U=b(a))==null?void 0:U.auth.signUp.marketingConsent)!==b(Po).OptOut?(p(),H(Nm,{key:1,modelValue:f.value,"onUpdate:modelValue":C[4]||(C[4]=M=>f.value=M),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"])):z("",!0),v(ye,null,{default:k(()=>{var M;return[C[5]||(C[5]=N(" By signing up, you accept our ")),L("a",{href:`${b(s)}/terms-of-use`,target:"_blank",rel:"noopener"},"terms",8,vk),C[6]||(C[6]=N(" and ")),L("a",{href:`${b(s)}/privacy-policy`,target:"_blank",rel:"noopener"},"privacy policy",8,yk),C[7]||(C[7]=N(". ")),((M=b(a))==null?void 0:M.auth.signUp.marketingConsent)===b(Po).OptOut?(p(),_(de,{key:0},[N(" You also agree to receive updates and offers by email. ")],64)):z("",!0)]}),_:1,__:[5,6,7]}),v(Wn,{success:"Signed up",label:"Sign up",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!h.value||void 0},$(h.value),9,wk),v(Ve,{label:"I already have an account",variant:"subtle",handler:()=>b(r).show(b(te).Authentication,b(W).SignIn,{email:u.value})},null,8,["handler"])]}),_:1},8,["disabled"]))}}),Ek={class:"moonbase:authentication"},kk={key:0,class:"moonbase:loader"},xk=le({__name:"Authentication",setup(e){const t=Ce(),{loaded:n}=Re();return(r,o)=>(p(),_("div",Ek,[v(ui,{name:b(t).direction===b(Mu).Forward?"moonbase:slide-left":"moonbase:slide-right",mode:"out-in"},{default:k(()=>[b(n)?b(t).intent===b(W).SignIn?(p(),H(F5,{key:1,onSignedIn:o[0]||(o[0]=s=>b(t).dequeue())})):b(t).intent===b(W).SignUp?(p(),H(_k,{key:2,onSignedUp:o[1]||(o[1]=s=>b(t).next?b(t).dequeue():b(t).show(b(te).Customer,b(W).ViewAccount,void 0,!0))})):b(t).intent===b(W).ConfirmAccount?(p(),H(G5,{key:3,onConfirmedAccount:o[2]||(o[2]=s=>b(t).show(b(te).Customer,b(W).ViewProducts,void 0,!0))})):b(t).intent===b(W).ConfirmEmail?(p(),H(ek,{key:4})):b(t).intent===b(W).ConfirmEmailChange?(p(),H(ok,{key:5})):b(t).intent===b(W).ForgotPassword?(p(),H(ik,{key:6})):b(t).intent===b(W).ResetPassword?(p(),H(uk,{key:7,onPasswordReset:o[3]||(o[3]=s=>b(t).show(b(te).Customer,b(W).ViewAccount,void 0))})):z("",!0):(p(),_("div",kk,[v(zt)]))]),_:1},8,["name"])]))}}),Ak={},Ck={class:"moonbase:text-subtext-bold"};function Ok(e,t){return p(),_("span",Ck,[Nt(e.$slots,"default")])}const et=ar(Ak,[["render",Ok]]);function il(){const e=fe(Ft);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 Sk=["data-corners","data-cards"],Pm=le({__name:"Counter",props:{modelValue:{}},emits:["update:modelValue"],setup(e){const t=fe(it);return(n,r)=>{var o,s;return p(),_("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},[L("button",{onClick:r[0]||(r[0]=i=>n.$emit("update:modelValue",n.modelValue-1))},[v(b(zw))]),v(ye,null,{default:k(()=>[N($(n.modelValue.toString().padStart(2,"0")),1)]),_:1}),L("button",{onClick:r[1]||(r[1]=i=>n.$emit("update:modelValue",n.modelValue+1))},[v(b(Ww))])],8,Sk)}}});function Oi(e){switch(e){case kr.Daily:return"day";case kr.Weekly:return"week";case kr.Monthly:return"month";case kr.Quarterly:return"quarter";case kr.Yearly:return"year"}throw new Error("Unknown cycle length")}const Nk={class:"moonbase:bundle-cart-item-content"},Pk={key:0,class:"moonbase:bundle-cart-item-total"},Tk={key:0,class:"moonbase:discount"},Ik={class:"moonbase:bundle-cart-item-summary"},Dk=["data-open"],$k=["data-open"],Mk={class:"moonbase:bundle-cart-item-product-list-item-content"},Vk={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Lk=le({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=Va(t.lineItem.bundleId),r=fe(it),o=Bn(),s=j(!1),i=j(null),a=Z(()=>{var l;return((l=t.lineItem.price)==null?void 0:l[o.currency.value])===0});return Ze(s,l=>{i.value&&(i.value.style.height=l?`${i.value.scrollHeight}px`:"0px")}),(l,u)=>{var c;return p(),H(nn,{class:"moonbase:bundle-cart-item"},xa({default:k(()=>{var d,f,h,m,y,x,P;return[v(At,{url:(d=l.lineItem.bundle)==null?void 0:d.iconUrl,size:72},null,8,["url"]),L("div",Nk,[v(et,null,{default:k(()=>{var C;return[N($((C=l.lineItem.bundle)==null?void 0:C.name),1)]}),_:1}),v(ye,{class:"moonbase:bundle-cart-item-tagline","data-truncate":l.lineItem.variation&&l.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)||void 0},{default:k(()=>{var C;return[N($((C=l.lineItem.bundle)==null?void 0:C.tagline),1)]}),_:1},8,["data-truncate"]),l.lineItem.variation&&l.lineItem.variation.id!==((y=(m=b(n))==null?void 0:m.defaultVariation)==null?void 0:y.id)?(p(),H(ye,{key:0,class:"moonbase:bundle-cart-item-variation"},{default:k(()=>[N($(l.lineItem.variation.name),1)]),_:1})):z("",!0)]),l.lineItem.variation?(p(),_("div",Pk,[v(On,null,{default:k(()=>{var C;return[l.lineItem.variation.hasDiscount?(p(),_("span",Tk,$(b(xt)(l.lineItem.variation.originalPrice[l.currency]*l.lineItem.quantity,l.currency)),1)):z("",!0),N(" "+$(b(xt)(l.lineItem.variation.price[l.currency]*l.lineItem.quantity,l.currency))+" ",1),((C=l.lineItem.variation)==null?void 0:C.recurrence.type)==="Recurring"?(p(),H(Ke,{key:1},{default:k(()=>[N(" / "+$(b(Oi)(l.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):z("",!0)]}),_:1}),(a.value?((x=b(r))==null?void 0:x.cart.leadMagnets.quantity)==="selectable":((P=b(r))==null?void 0:P.cart.quantity)==="selectable")?(p(),H(Pm,{key:0,"model-value":l.lineItem.quantity,"onUpdate:modelValue":u[0]||(u[0]=C=>b(o).setQuantity(l.lineItem,C))},null,8,["model-value"])):(p(),H(Ve,{key:1,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(l.lineItem,0)},null,8,["handler"]))])):z("",!0)]}),_:2},[(c=b(r))!=null&&c.cart.bundles.showProducts?{name:"addon",fn:k(()=>{var d;return[L("div",Ik,[l.lineItem.bundle?(p(),_("button",{key:0,onClick:u[1]||(u[1]=f=>s.value=!s.value)},[v(et,null,{default:k(()=>{var f,h,m;return[N($((f=l.lineItem.bundle)==null?void 0:f.products.filter(y=>y.included).length)+" ",1),(h=l.lineItem.bundle)!=null&&h.products.some(y=>!y.included)?(p(),_(de,{key:0},[N(" of "+$((m=l.lineItem.bundle)==null?void 0:m.products.length),1)],64)):z("",!0),u[2]||(u[2]=N(" products "))]}),_:1,__:[2]}),v(ye,null,{default:k(()=>[N($(s.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},u[3]||(u[3]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,Dk))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:i,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(p(!0),_(de,null,rt(((d=l.lineItem.bundle)==null?void 0:d.products)||[],f=>(p(),_("div",{key:f.id,class:"moonbase:bundle-cart-item-product-list-item"},[v(At,{url:f==null?void 0:f.iconUrl,size:48},null,8,["url"]),L("div",Mk,[v(et,{"data-included":f.included||void 0},{default:k(()=>[f.included?(p(),_("svg",Vk,u[4]||(u[4]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):z("",!0),N(" "+$(f==null?void 0:f.name),1)]),_:2},1032,["data-included"]),f.included?f!=null&&f.tagline?(p(),H(ye,{key:1},{default:k(()=>[N($(f.tagline),1)]),_:2},1024)):z("",!0):(p(),H(ye,{key:0},{default:k(()=>u[5]||(u[5]=[N(" You already own this ")])),_:1,__:[5]}))])]))),128))],8,$k)]}),key:"0"}:void 0]),1024)}}}),Rk={class:"moonbase:cart-offer-target-list-item"},jk={class:"moonbase:cart-offer-target-list-item-content"},Uk=["href"],Bk={class:"moonbase:cart-offer-target-list-item-cta"},Fk={key:0,class:"moonbase:discount"},Hk=le({__name:"OfferMultiTargetItem",props:{offer:{},target:{}},setup(e){const t=e,n=fe(it),{addToCart:r,currency:o}=Bn(),s=Z(()=>{var l;return(l=t.target.defaultVariation)==null?void 0:l.originalPrice}),i=Z(()=>t.target.defaultVariation?Pl.subtract(t.target.defaultVariation.price,Ji.apply(t.offer.discount,t.target.defaultVariation.price)):s.value),a=Z(()=>!$u(s.value,i.value));return(l,u)=>(p(),_("div",Rk,[v(At,{url:l.target.iconUrl,href:l.target.type==="Product"?l.target.website:void 0,size:48},null,8,["url","href"]),L("div",jk,[v(et,null,{default:k(()=>[l.target.type==="Product"&&l.target.website?(p(),_("a",{key:0,href:l.target.website},$(l.target.name),9,Uk)):(p(),_(de,{key:1},[N($(l.target.name),1)],64))]),_:1}),l.target.tagline?(p(),H(ye,{key:0},{default:k(()=>[N($(l.target.tagline),1)]),_:1})):z("",!0)]),L("div",Bk,[i.value?(p(),H(On,{key:0},{default:k(()=>[a.value&&s.value?(p(),_("span",Fk,$(b(xt)(s.value[b(o)],b(o))),1)):z("",!0),N(" "+$(b(xt)(i.value[b(o)],b(o))),1)]),_:1})):z("",!0),v(Ve,{label:"Add to cart",variant:"secondary",size:"small",handler:()=>{var c;return b(r)(l.target,void 0,l.offer,{bundleBehaviour:(c=b(n))==null?void 0:c.cart.bundles.onAdd})}},null,8,["handler"])])]))}}),qk={class:"moonbase:cart-offer--multi-target-icons"},zk={class:"moonbase:cart-offer--multi-target-content"},Wk=["data-open"],Zk=le({__name:"OfferMultiTargetUpsell",props:{offer:{},targets:{}},setup(e){const t=e,n=j(!1),r=j(null);Ze(n,s=>{r.value&&(r.value.style.height=s?`${r.value.scrollHeight}px`:"0px")});const o=Z(()=>Math.max(36,96/t.targets.length*1.5));return(s,i)=>(p(),H(nn,{class:"moonbase:cart-offer--multi-target"},{addon:k(()=>[L("div",{ref_key:"targetListRef",ref:r,class:"moonbase:cart-offer-target-list",style:{height:"0px"},"data-open":n.value||void 0},[(p(!0),_(de,null,rt(s.targets,a=>(p(),H(Hk,{key:a.id,target:a,offer:s.offer},null,8,["target","offer"]))),128))],8,Wk)]),default:k(()=>[L("div",qk,[(p(!0),_(de,null,rt(s.targets,(a,l)=>(p(),H(At,{key:`${a.type}/${a.id}`,url:a.iconUrl,size:o.value,style:Vo({position:"absolute",top:`${l*(96-o.value)/(s.targets.length-1)}px`,left:`${l*(96-o.value)/(s.targets.length-1)}px`,zIndex:l})},null,8,["url","size","style"]))),128))]),L("div",zk,[v(et,{class:"moonbase:cart-offer--multi-target-name"},{default:k(()=>[N($(s.offer.discount.name),1)]),_:1}),s.offer.discount.description?(p(),H(ye,{key:0,class:"moonbase:cart-offer--multi-target-description"},{default:k(()=>[N($(s.offer.discount.description),1)]),_:1})):z("",!0),v(Ve,{label:"Select product",variant:n.value?"primary":"secondary",size:"small",handler:()=>n.value=!n.value},null,8,["variant","handler"])])]),_:1}))}}),Yk={class:"moonbase:cart-offer-content"},Kk=["href"],Gk={class:"moonbase:cart-offer-cta"},Qk={key:0,class:"moonbase:discount"},Xk={class:"moonbase:cart-offer-bundle-summary"},Jk=["data-open"],ex=["data-open"],tx={class:"moonbase:cart-offer-bundle-product-list-item-content"},nx={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},rx=["href"],ox=le({__name:"OfferUpsell",props:{offer:{},target:{}},setup(e){const t=e,n=fe(it),{addToCart:r,currency:o}=Bn(),s=j(!1),i=j(null);Ze(s,c=>{i.value&&(i.value.style.height=c?`${i.value.scrollHeight}px`:"0px")});const a=Z(()=>{var c;return(c=t.target.defaultVariation)==null?void 0:c.originalPrice}),l=Z(()=>t.target.defaultVariation?Pl.subtract(t.target.defaultVariation.price,Ji.apply(t.offer.discount,t.target.defaultVariation.price)):a.value),u=Z(()=>!$u(a.value,l.value));return(c,d)=>(p(),H(nn,{class:"moonbase:cart-offer"},xa({default:k(()=>[v(At,{url:c.target.iconUrl,href:c.target.type==="Product"?c.target.website:void 0,size:64},null,8,["url","href"]),L("div",Yk,[v(et,{class:"moonbase:cart-offer-name"},{default:k(()=>[c.target.type==="Product"&&c.target.website?(p(),_("a",{key:0,href:c.target.website},$(c.offer.discount.name),9,Kk)):(p(),_(de,{key:1},[N($(c.offer.discount.name),1)],64))]),_:1}),c.offer.discount.description?(p(),H(ye,{key:0,class:"moonbase:cart-offer-description"},{default:k(()=>[N($(c.offer.discount.description),1)]),_:1})):z("",!0)]),L("div",Gk,[l.value?(p(),H(On,{key:0},{default:k(()=>[u.value&&a.value?(p(),_("span",Qk,$(b(xt)(a.value[b(o)],b(o))),1)):z("",!0),N(" "+$(b(xt)(l.value[b(o)],b(o))),1)]),_:1})):z("",!0),v(Ve,{label:"Add to cart",variant:"secondary",size:"small",handler:()=>{var f;return b(r)(c.target,void 0,c.offer,{bundleBehaviour:(f=b(n))==null?void 0:f.cart.bundles.onAdd})}},null,8,["handler"])])]),_:2},[c.target.type==="Bundle"?{name:"addon",fn:k(()=>{var f;return[L("div",Xk,[c.target?(p(),_("button",{key:0,onClick:d[0]||(d[0]=h=>s.value=!s.value)},[v(et,null,{default:k(()=>{var h,m,y;return[N(" Contains "+$((h=c.target)==null?void 0:h.products.filter(x=>x.included).length)+" ",1),(m=c.target)!=null&&m.products.some(x=>!x.included)?(p(),_(de,{key:0},[N(" of "+$((y=c.target)==null?void 0:y.products.length),1)],64)):z("",!0),d[1]||(d[1]=N(" products "))]}),_:1,__:[1]}),v(ye,null,{default:k(()=>[N($(s.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":s.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},d[2]||(d[2]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,Jk))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:i,class:"moonbase:cart-offer-bundle-product-list",style:{height:"0px"},"data-open":s.value||void 0},[(p(!0),_(de,null,rt(((f=c.target)==null?void 0:f.products)||[],h=>(p(),_("div",{key:h.id,class:"moonbase:cart-offer-bundle-product-list-item"},[v(At,{url:h.iconUrl,href:h.website,size:48},null,8,["url","href"]),L("div",tx,[v(et,{"data-included":h.included||void 0},{default:k(()=>[h.included?(p(),_("svg",nx,d[3]||(d[3]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))):z("",!0),h.website?(p(),_("a",{key:1,href:h.website},$(h.name),9,rx)):(p(),_(de,{key:2},[N($(h.name),1)],64))]),_:2},1032,["data-included"]),h.included?h.tagline?(p(),H(ye,{key:1},{default:k(()=>[N($(h.tagline),1)]),_:2},1024)):z("",!0):(p(),H(ye,{key:0},{default:k(()=>d[4]||(d[4]=[N(" You already own this ")])),_:1,__:[4]}))])]))),128))],8,ex)]}),key:"0"}:void 0]),1024))}}),sx={class:"moonbase:product-cart-item-content"},ix={class:"moonbase:product-cart-item-total"},ax={key:0,class:"moonbase:discount"},lx=le({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){const t=e,n=fi(t.lineItem.productId),r=fe(it),o=Bn(),s=Z(()=>{var u;return((u=t.lineItem.price)==null?void 0:u[o.currency.value])===0});function i(u){var d;if(!u.variation)throw new Error("No variation found");const c=l(u);return(c==null?void 0:c.price[t.currency])??((d=u.variation)==null?void 0:d.price[t.currency])}function a(u){return!!l(u)}function l(u){var d,f;const c=((f=(d=u.variation)==null?void 0:d.pricingTiers)==null?void 0:f.filter(h=>u.quantity>=h.minQuantity))??[];return c.length>0?c[c.length-1]:null}return(u,c)=>(p(),H(nn,{class:"moonbase:product-cart-item"},{default:k(()=>{var d,f,h,m,y,x,P;return[v(At,{url:(d=u.lineItem.product)==null?void 0:d.iconUrl,size:72},null,8,["url"]),L("div",sx,[v(et,null,{default:k(()=>{var C;return[N($((C=u.lineItem.product)==null?void 0:C.name),1)]}),_:1}),v(ye,{class:"moonbase:product-cart-item-tagline","data-truncate":u.lineItem.variation&&u.lineItem.variation.id!==((h=(f=b(n))==null?void 0:f.defaultVariation)==null?void 0:h.id)||void 0},{default:k(()=>{var C;return[N($((C=u.lineItem.product)==null?void 0:C.tagline),1)]}),_:1},8,["data-truncate"]),u.lineItem.variation&&u.lineItem.variation.id!==((y=(m=b(n))==null?void 0:m.defaultVariation)==null?void 0:y.id)?(p(),H(ye,{key:0,class:"moonbase:product-cart-item-variation"},{default:k(()=>[N($(u.lineItem.variation.name),1)]),_:1})):z("",!0)]),L("div",ix,[u.lineItem.variation?(p(),H(On,{key:0},{default:k(()=>{var C;return[u.lineItem.variation.hasDiscount||a(u.lineItem)?(p(),_("span",ax,$(b(xt)(u.lineItem.variation.originalPrice[u.currency]*u.lineItem.quantity,u.currency)),1)):z("",!0),N(" "+$(b(xt)(i(u.lineItem)*u.lineItem.quantity,u.currency))+" ",1),((C=u.lineItem.variation)==null?void 0:C.recurrence.type)==="Recurring"?(p(),H(Ke,{key:1},{default:k(()=>[N(" / "+$(b(Oi)(u.lineItem.variation.recurrence.cycleLength)),1)]),_:1})):z("",!0)]}),_:1})):z("",!0),(s.value?((x=b(r))==null?void 0:x.cart.leadMagnets.quantity)==="selectable":((P=b(r))==null?void 0:P.cart.quantity)==="selectable")?(p(),H(Pm,{key:1,"model-value":u.lineItem.quantity,"onUpdate:modelValue":c[0]||(c[0]=C=>b(o).setQuantity(u.lineItem,C))},null,8,["model-value"])):(p(),H(Ve,{key:2,label:"Remove",variant:"subtle-danger",size:"small",handler:()=>b(o).setQuantity(u.lineItem,0)},null,8,["handler"]))])]}),_:1}))}}),ux={class:"moonbase:cart"},cx=["data-background"],dx=["data-corners"],fx={class:"moonbase:cart-total"},hx={"data-error":""},px=le({__name:"Cart",setup(e){const t=il(),n=Re(),{items:r,total:o,currency:s,checkout:i}=Bn(),a=fe(it),l=o1(),u=Z(()=>l.value.length===0?null:l.value.find(f=>Array.isArray(f.target)?f.target.some(h=>!h.owned):!f.target.owned)||l.value[0]),c=j(null);async function d(){c.value=null;try{const f=await i({redirect:(a==null?void 0:a.value.checkout.redirect)??!1,returnUrl:n.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0});if(!(f!=null&&f.completed))throw new us}catch(f){if(c.value=f.message,!(f instanceof us))if(f instanceof gn)t.reportProblem("error",{type:f.name,title:f.title,detail:f.detail,status:f.status,errors:f.errors?Object.fromEntries(Object.entries(f.errors).map(([h,m])=>[h,[m]])):void 0,instance:"Cart.vue:startCheckout"});else{const h=f;t.reportProblem("error",{type:h.name,title:h.message,instance:"Cart.vue:startCheckout"})}throw f}}return(f,h)=>{var m,y,x;return p(),_("div",ux,[b(r).length>0?(p(),_("ul",{key:0,role:"list",class:"moonbase:cart-items","data-background":(m=b(a))==null?void 0:m.theme.colors.background},[(p(!0),_(de,null,rt(b(r),P=>(p(),_("li",{key:P.id},[P.type==="Product"?(p(),H(lx,{key:0,"line-item":P,currency:b(s)},null,8,["line-item","currency"])):P.type==="Bundle"?(p(),H(Lk,{key:1,"line-item":P,currency:b(s)},null,8,["line-item","currency"])):z("",!0)]))),128)),u.value?(p(),_(de,{key:0},[h[0]||(h[0]=L("li",{class:"moonbase:grow"},null,-1)),L("li",null,[(y=b(a))!=null&&y.cart.offers.label?(p(),H(et,{key:0},{default:k(()=>{var P;return[N($((P=b(a))==null?void 0:P.cart.offers.label),1)]}),_:1})):z("",!0),b(Dn).relevantTargets(u.value,b(r)).length!==1?(p(),H(Zk,{key:1,offer:u.value,targets:b(Dn).relevantTargets(u.value,b(r))},null,8,["offer","targets"])):(p(),H(ox,{key:2,offer:u.value,target:Array.isArray(u.value.target)?b(Dn).relevantTargets(u.value,b(r))[0]:u.value.target},null,8,["offer","target"]))])],64)):z("",!0)],8,cx)):(p(),_("div",{key:1,class:"moonbase:cart-empty","data-corners":(x=b(a))==null?void 0:x.theme.corners},[v(b(Zw)),v(et,null,{default:k(()=>h[1]||(h[1]=[N(" Your cart is empty ")])),_:1,__:[1]})],8,dx)),L("div",fx,[h[2]||(h[2]=L("label",null," Total ",-1)),L("span",null,$(b(xt)(b(o).amount,b(o).currency)),1),h[3]||(h[3]=L("p",null," Sales tax to be calculated at checkout ",-1)),L("p",hx,$(c.value),1)]),v(Ve,{handler:d,disabled:b(r).length===0,label:"Checkout",error:c.value?"Error":"Cancelled",variant:"primary"},null,8,["disabled","error"])])}}});function mx(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}function yc(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}function gx(e,t){return p(),_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[L("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"})])}const bx={class:"moonbase:connected-account-card"},vx={class:"moonbase:account-provider"},yx=["src","alt"],wx={key:0,class:"moonbase:pending-fulfillments"},_x=le({__name:"ConnectedAccountCard",props:{account:{}},setup(e){const t=e,n=Ce(),{disconnectAccount:r}=Re(),o=j(!1),s=j(null);function i(d){switch(d){case"iLok":return"iLok"}}function a(d){switch(d){case"iLok":return sl}}function l(d){switch(d){case"iLok":return"Link your iLok account to streamline license delivery and activation."}}async function u(){s.value=null,o.value=!0;try{await r(t.account.provider)}catch(d){s.value=d}finally{o.value=!1}}function c(){n.show(te.Customer,W.ConnectAccount,{provider_id:t.account.provider})}return(d,f)=>(p(),_("li",bx,[L("div",vx,[a(d.account.provider)?(p(),_("img",{key:0,src:a(d.account.provider),alt:i(d.account.provider)},null,8,yx)):z("",!0),L("div",null,[v(qe,null,{default:k(()=>[N($(i(d.account.provider)),1)]),_:1}),d.account.isConnected?(p(),_(de,{key:0},[d.account.accountId?(p(),H(ye,{key:0},{default:k(()=>[N(" Account ID: "+$(d.account.accountId),1)]),_:1})):z("",!0)],64)):(p(),H(ye,{key:1},{default:k(()=>[N($(l(d.account.provider)),1)]),_:1}))])]),d.account.pendingLicenseFulfillments?(p(),_("div",wx,[v(b(gx)),v(ye,null,{default:k(()=>f[0]||(f[0]=[N(" You have pending iLok licenses, connect your account to receive them. ")])),_:1,__:[0]})])):z("",!0),d.account.isConnected?(p(),H(Ve,{key:1,label:o.value?"Disconnecting...":"Disconnect",variant:"danger",handler:u,disabled:o.value},null,8,["label","disabled"])):z("",!0),s.value?(p(),H(On,{key:2,class:"moonbase:disconnect-error"},{default:k(()=>[N($(s.value.message),1)]),_:1})):z("",!0),d.account.isConnected?z("",!0):(p(),H(Ve,{key:3,label:"Connect",variant:"secondary",handler:c}))]))}}),Ex={class:"moonbase:account"},kx={key:0,class:"moonbase:error"},xx={key:1,class:"moonbase:notification"},Ax={key:0,class:"moonbase:error"},Cx={key:0,class:"moonbase:connected-accounts"},Ox=le({__name:"Account",setup(e){var U,M,I;const t=Ce(),{user:n,update:r,setPassword:o,signOut:s}=Re(),i=fe(Hr),a=j(((U=n.value)==null?void 0:U.name)??""),l=j(((M=n.value)==null?void 0:M.email)??""),u=j(((I=n.value)==null?void 0:I.communicationPreferences)??{newsletterOptIn:!1}),c=j(null),d=j(!1),f=j(""),h=j(""),m=j(null),y=Z(()=>{var V;return((V=n.value)==null?void 0:V.connectedAccounts)??[]});async function x(){c.value=null,d.value=!1;try{(await r(a.value,l.value,void 0,u.value)).needsEmailConfirmationToken&&(d.value=!0)}catch(V){throw c.value=V,V}}async function P(){m.value=null;try{await o(f.value,h.value),f.value="",h.value=""}catch(V){throw m.value=V,V}}async function C(){const V={...n.value};await s(),i==null||i(Dt.SignedOut,{user:V}),t.reset()}return(V,E)=>(p(),_("div",Ex,[v(zn,{handler:x},{default:k(()=>[v(Ct,{modelValue:a.value,"onUpdate:modelValue":E[0]||(E[0]=O=>a.value=O),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),v(Ct,{modelValue:l.value,"onUpdate:modelValue":E[1]||(E[1]=O=>l.value=O),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),v(Nm,{modelValue:u.value.newsletterOptIn,"onUpdate:modelValue":E[2]||(E[2]=O=>u.value.newsletterOptIn=O),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),v(Wn,{label:"Update",error:"Error",success:"Updated"}),c.value?(p(),_("p",kx,$(c.value.message),1)):d.value?(p(),_("p",xx," You need to confirm your new email address, please check your inbox ")):z("",!0)]),_:1}),v(zn,{handler:P},{default:k(()=>[v(Ct,{modelValue:f.value,"onUpdate:modelValue":E[3]||(E[3]=O=>f.value=O),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),v(Ct,{modelValue:h.value,"onUpdate:modelValue":E[4]||(E[4]=O=>h.value=O),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),v(Wn,{label:"Change password",error:"Error",success:"Password changed"}),m.value?(p(),_("p",Ax,$(m.value.message),1)):z("",!0)]),_:1}),v(Ve,{label:"Log out",success:"Logged out",error:"Error",variant:"subtle",handler:C}),y.value.length>0?(p(),_("section",Cx,[v(hr,null,{default:k(()=>E[5]||(E[5]=[N("Connected accounts")])),_:1,__:[5]}),v(Ke,null,{default:k(()=>E[6]||(E[6]=[N(" Connect your account with external providers to enable additional features. ")])),_:1,__:[6]}),L("ul",null,[(p(!0),_(de,null,rt(y.value,O=>(p(),H(_x,{key:`${O.provider}-${O.accountId}`,account:O},null,8,["account"]))),128))])])):z("",!0)]))}}),Sx={key:0,class:"moonbase:connect-account"},Nx={class:"moonbase:provider-header"},Px=["src","alt"],Tx={key:0,class:"moonbase:loader"},Ix={key:0,class:"moonbase:connected-status"},Dx={key:0,class:"moonbase:depositing"},$x={key:1,class:"moonbase:licenses-deposited"},Mx=le({__name:"ConnectAccount",setup(e){const t=Ce(),{user:n,getConnectionUrl:r,refreshUser:o}=Re(),s=j(!0),i=j(!1),a=j(!1),l=j(null),u=j(""),c=t.getParameter("provider_id"),d=Z(()=>{var U;return((U=n.value)==null?void 0:U.connectedAccounts.some(M=>M.provider===c&&M.isConnected))??!1}),f=Z(()=>{var U;return((U=n.value)==null?void 0:U.connectedAccounts.some(M=>c&&[Is.iLok].includes(c)&&M.pendingLicenseFulfillments))??!1});Ue(async()=>{if(c&&(await o(),s.value=!1,d.value&&f.value)){for(i.value=!0;f.value;)await Ht(2e3),await o();i.value=!1,a.value=!0}});function h(U){switch(U){case"iLok":return"iLok"}}function m(U){switch(U){case"iLok":return sl}}function y(U){switch(U){case"iLok":return"Link your iLok account to streamline license delivery and activation for all your purchases."}}function x(U){switch(U){case"iLok":return!0;default:return!1}}async function P(){if(c){l.value=null;try{if(x(c)&&!u.value){l.value=new Error("Please enter your login ID");return}const U=window.location.href.split("?")[0],M=await r(c,U,u.value||void 0);window.location.href=M}catch(U){throw l.value=U,U}}}function C(){t.history.length>0?t.back():t.show(te.Customer,W.ViewAccount,void 0,!0)}return(U,M)=>b(c)?(p(),_("div",Sx,[L("div",Nx,[m(b(c))?(p(),_("img",{key:0,src:m(b(c)),alt:h(b(c)),class:"moonbase:provider-logo"},null,8,Px)):z("",!0),v(qe,null,{default:k(()=>[N($(h(b(c))),1)]),_:1})]),v(ye,{class:"moonbase:description"},{default:k(()=>[N($(y(b(c))),1)]),_:1}),s.value?(p(),_("div",Tx,[v(zt)])):(p(),_(de,{key:1},[d.value?(p(),_("div",Ix,[v(et,{class:"moonbase:success"},{default:k(()=>[N(" Successfully connected your "+$(h(b(c)))+" account. ",1)]),_:1}),i.value?(p(),_("div",Dx,[v(zt),v(ye,null,{default:k(()=>M[1]||(M[1]=[N("Depositing licenses to your account...")])),_:1,__:[1]})])):a.value?(p(),_("div",$x,[v(b(yc)),v(ye,null,{default:k(()=>M[2]||(M[2]=[N("Licenses deposited to your account.")])),_:1,__:[2]})])):z("",!0),v(Ve,{label:"Back to account",handler:C})])):(p(),H(zn,{key:1,handler:P,class:"moonbase:connect-form"},{default:k(()=>[x(b(c))?(p(),H(Ct,{key:0,modelValue:u.value,"onUpdate:modelValue":M[0]||(M[0]=I=>u.value=I),label:`${h(b(c))} Login ID`,name:`${b(c)}-login-id`,placeholder:`Enter your ${h(b(c))} username`},null,8,["modelValue","label","name","placeholder"])):z("",!0),v(Wn,{label:"Connect"}),v(Ci,{type:"anchor",label:"Create account",variant:"subtle",href:"https://www.ilok.com/#!registration",icon:b(Ku),target:"_blank",rel:"noopener noreferrer"},null,8,["icon"])]),_:1})),l.value?(p(),H(et,{key:2,class:"moonbase:error"},{default:k(()=>[N($(l.value.message),1)]),_:1})):z("",!0)],64))])):z("",!0)}}),Tm=e=>e.includes("."),Vx={class:"moonbase:products"},Lx={key:0,class:"moonbase:loader"},Rx={key:1,class:"moonbase:loader"},jx=["data-is-sub-product"],Ux={key:0,class:"moonbase:products-item-sub-product-icon"},Bx={class:"moonbase:products-item-content"},Fx=le({__name:"Products",setup(e){const t=Ce(),{getProducts:n}=fo(),r=j(null);return Ue(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)=>(p(),_("div",Vx,[r.value?r.value.length===0?(p(),_("div",Rx," No products found ")):z("",!0):(p(),_("div",Lx,[v(zt),s[0]||(s[0]=N(" Loading products.. "))])),(p(!0),_(de,null,rt(r.value||[],i=>(p(),_("div",{key:i.id,class:"moonbase:products-item","data-is-sub-product":b(Tm)(i.id)||void 0},[b(Tm)(i.id)?(p(),_("div",Ux,s[1]||(s[1]=[L("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m16.49 12 3.75 3.75m0 0-3.75 3.75m3.75-3.75H3.74V4.499"})],-1)]))):z("",!0),v(At,{url:i.iconUrl,size:48},null,8,["url"]),L("div",Bx,[v(et,null,{default:k(()=>[N($(i.name),1)]),_:2},1024),i.numberOfLicenses||i.subscriptionLicenses?(p(),H(ye,{key:0},{default:k(()=>[N($((i.numberOfLicenses??0)+(i.subscriptionLicenses??0))+" licenses ",1)]),_:2},1024)):z("",!0)]),L("div",null,[v(Xo,{variant:"subtle",onClick:a=>b(t).show(b(te).Product,b(W).ViewProduct,{product_id:i.id})},{default:k(()=>[v(b(Ip)),s[2]||(s[2]=L("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[2]},1032,["onClick"])])],8,jx))),128))]))}}),Hx={class:"moonbase:bundle-redemption-item-content"},qx={class:"moonbase:bundle-redemption-item-summary"},zx=["data-open"],Wx=["data-open"],Im=le({__name:"BundleRedemptionItem",props:{bundle:{},quantity:{}},setup(e){const t=j(!1),n=j(null);return Ze(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>(p(),H(nn,{class:"moonbase:bundle-redemption-item"},{addon:k(()=>{var s;return[L("div",qx,[r.bundle?(p(),_("button",{key:0,onClick:o[0]||(o[0]=i=>t.value=!t.value)},[v(et,null,{default:k(()=>{var i;return[N($((i=r.bundle)==null?void 0:i.products.length)+" products ",1)]}),_:1}),v(ye,null,{default:k(()=>[N($(t.value?"Hide":"Show")+" ",1),(p(),_("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o[1]||(o[1]=[L("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)]),8,zx))]),_:1})])):z("",!0)]),L("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-redemption-item-product-list",style:{height:"0px"},"data-open":t.value||void 0},[(p(!0),_(de,null,rt(((s=r.bundle)==null?void 0:s.products)||[],i=>(p(),_("div",{key:i.id},[v(At,{url:i.iconUrl,size:48},null,8,["url"]),L("div",null,[v(et,null,{default:k(()=>[N($(i.name),1)]),_:2},1024),i.tagline?(p(),H(ye,{key:0},{default:k(()=>[N($(i.tagline),1)]),_:2},1024)):z("",!0)])]))),128))],8,Wx)]}),default:k(()=>[v(At,{url:r.bundle.iconUrl,size:72},null,8,["url"]),L("div",Hx,[v(et,null,{default:k(()=>{var s;return[N($((s=r.bundle)==null?void 0:s.name),1)]}),_:1}),v(ye,{class:"moonbase:bundle-redemption-item-tagline"},{default:k(()=>{var s;return[N($((s=r.bundle)==null?void 0:s.tagline),1)]}),_:1})])]),_:1}))}}),Zx={class:"moonbase:product-redemption-item-content"},Dm=le({__name:"ProductRedemptionItem",props:{product:{},quantity:{}},setup(e){return(t,n)=>(p(),H(nn,{class:"moonbase:product-redemption-item"},{default:k(()=>[v(At,{url:t.product.iconUrl,size:72},null,8,["url"]),L("div",Zx,[v(et,null,{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.name),1)]}),_:1}),v(ye,{class:"moonbase:product-redemption-item-tagline"},{default:k(()=>{var r;return[N($((r=t.product)==null?void 0:r.tagline),1)]}),_:1})])]),_:1}))}}),Yx={class:"moonbase:redeem"},Kx=["data-visible"],Gx={key:1,class:"moonbase:redeem-voucher"},Qx={key:0,class:"moonbase:redeem-voucher-content"},Xx={key:1,class:"moonbase:redeem-voucher-return"},Jx=le({__name:"Redeem",setup(e){const{redeem:t}=Bh(),n=Ce(),r=Re(),o=fe(Hr),s=j(null),i=j(null),a=j(n.getParameter("code")||"");async function l(){i.value=null;try{const u=await t(a.value);s.value=u,o==null||o(Dt.RedeemedVoucher,{voucher:u,user:r.user.value})}catch(u){throw i.value=u,u}}return(u,c)=>(p(),_("div",Yx,[v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[s.value?(p(),_("div",Gx,[L("div",null,[v(hr,null,{default:k(()=>[N($(s.value.name),1)]),_:1}),s.value.description?(p(),H(qe,{key:0},{default:k(()=>[N(' "'+$(s.value.description)+'" ',1)]),_:1})):z("",!0),v(ye,null,{default:k(()=>[v(b(jw)),c[2]||(c[2]=N(" Licenses have been added to your account. "))]),_:1,__:[2]}),v(ye,null,{default:k(()=>[c[3]||(c[3]=N(" Code: ")),L("strong",null,$(s.value.code),1)]),_:1,__:[3]})]),v(qe,null,{default:k(()=>c[4]||(c[4]=[N(" Voucher summary ")])),_:1,__:[4]}),s.value.redeemsProducts.length>0||s.value.redeemsBundles.length>0?(p(),_("div",Qx,[(p(!0),_(de,null,rt(s.value.redeemsProducts,({value:d,quantity:f})=>(p(),H(Dm,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(p(!0),_(de,null,rt(s.value.redeemsBundles,({value:d,quantity:f})=>(p(),H(Im,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):z("",!0),b(n).next&&b(n).next[0]===b(te).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,m;return f.id===((m=(h=b(n).next)==null?void 0:h[2])==null?void 0:m.product_id)})))?(p(),_("div",Xx,[v(Ve,{label:"Return to activation",variant:"primary",icon:b(Rw),handler:()=>b(n).dequeue()},null,8,["icon","handler"])])):z("",!0)])):(p(),H(zn,{key:0,handler:l},{default:k(()=>{var d;return[v(Ke,null,{default:k(()=>c[1]||(c[1]=[N(" Do you have a voucher you want to redeem? "),L("br",null,null,-1),N(" Please enter the code below: ")])),_:1,__:[1]}),v(Ct,{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"]),v(Wn,{label:"Redeem voucher",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!i.value||void 0},$((d=i.value)==null?void 0:d.message),9,Kx)]}),_:1}))]),_:1})]))}}),e3=["data-status"],t3=["data-fulfilled"],$m=le({__name:"MilestoneProgressBar",props:{progress:{}},setup(e){return(t,n)=>(p(),_("div",{class:"moonbase:milestone-progress-bar",style:Vo({gridTemplateColumns:`repeat(${t.progress.toNormalizedCycleNumber-t.progress.fromNormalizedCycleNumber+1}, 1fr)`})},[(p(!0),_(de,null,rt(Array(t.progress.toNormalizedCycleNumber-t.progress.fromNormalizedCycleNumber+1),(r,o)=>(p(),_("div",{key:o},[L("div",{"data-status":o+1<t.progress.currentNormalizedCycleNumber+(t.progress.currentCycleIsCompleted?1:0)?"done":o+1===t.progress.currentNormalizedCycleNumber+(t.progress.currentCycleIsCompleted?1:0)?"in-progress":"future"},null,8,e3),t.progress.events[o+1]?(p(),_("span",{key:0,"data-fulfilled":t.progress.events[o+1].some(s=>s.fulfilled)||void 0},null,8,t3)):z("",!0)]))),128))],4))}}),Mm=6048e5,n3=864e5,al=43200,Vm=1440,Lm=Symbol.for("constructDateFrom");function pr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Lm in e?e[Lm](t):e instanceof Date?new e.constructor(t):new Date(t)}function yt(e,t){return pr(t||e,e)}let r3={};function Si(){return r3}function Ni(e,t){var a,l,u,c;const n=Si(),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=yt(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 ll(e,t){return Ni(e,{...t,weekStartsOn:1})}function Rm(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=pr(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=ll(o),i=pr(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=ll(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ul(e){const t=yt(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 cl(e,...t){const n=pr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function jm(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function o3(e,t,n){const[r,o]=cl(n==null?void 0:n.in,e,t),s=jm(r),i=jm(o),a=+s-ul(s),l=+i-ul(i);return Math.round((a-l)/n3)}function s3(e,t){const n=Rm(e,t),r=pr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ll(r)}function dl(e,t){const n=+yt(e)-+yt(t);return n<0?-1:n>0?1:n}function i3(e){return pr(e,Date.now())}function a3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function l3(e){return!(!a3(e)&&typeof e!="number"||isNaN(+yt(e)))}function u3(e,t,n){const[r,o]=cl(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function c3(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function d3(e,t){return+yt(e)-+yt(t)}function f3(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function h3(e,t){const n=yt(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 p3(e,t){const n=yt(e,t==null?void 0:t.in);return+f3(n,t)==+h3(n,t)}function m3(e,t,n){const[r,o,s]=cl(n==null?void 0:n.in,e,e,t),i=dl(o,s),a=Math.abs(u3(o,s));if(a<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-i*a);let l=dl(o,s)===-i;p3(r)&&a===1&&dl(r,s)===1&&(l=!1);const u=i*(a-+l);return u===0?0:u}function g3(e,t,n){const r=d3(e,t)/1e3;return c3(n==null?void 0:n.roundingMethod)(r)}function b3(e,t){const n=yt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const v3={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"}},y3=(e,t,n)=>{let r;const o=v3[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 wc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const w3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},E3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k3={date:wc({formats:w3,defaultWidth:"full"}),time:wc({formats:_3,defaultWidth:"full"}),dateTime:wc({formats:E3,defaultWidth:"full"})},x3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},A3=(e,t,n,r)=>x3[e];function Pi(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 C3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},O3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S3={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"]},N3={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"]},P3={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"}},T3={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"}},I3={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:Pi({values:C3,defaultWidth:"wide"}),quarter:Pi({values:O3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pi({values:S3,defaultWidth:"wide"}),day:Pi({values:N3,defaultWidth:"wide"}),dayPeriod:Pi({values:P3,defaultWidth:"wide",formattingValues:T3,defaultFormattingWidth:"wide"})};function Ti(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)?$3(a,d=>d.test(i)):D3(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 D3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function $3(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function M3(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 V3=/^(\d+)(th|st|nd|rd)?/i,L3=/\d+/i,R3={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},j3={any:[/^b/i,/^(a|c)/i]},U3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},B3={any:[/1/i,/2/i,/3/i,/4/i]},F3={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},H3={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]},q3={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},z3={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]},W3={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},Z3={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}},Y3={ordinalNumber:M3({matchPattern:V3,parsePattern:L3,valueCallback:e=>parseInt(e,10)}),era:Ti({matchPatterns:R3,defaultMatchWidth:"wide",parsePatterns:j3,defaultParseWidth:"any"}),quarter:Ti({matchPatterns:U3,defaultMatchWidth:"wide",parsePatterns:B3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ti({matchPatterns:F3,defaultMatchWidth:"wide",parsePatterns:H3,defaultParseWidth:"any"}),day:Ti({matchPatterns:q3,defaultMatchWidth:"wide",parsePatterns:z3,defaultParseWidth:"any"}),dayPeriod:Ti({matchPatterns:W3,defaultMatchWidth:"any",parsePatterns:Z3,defaultParseWidth:"any"})},Um={code:"en-US",formatDistance:y3,formatLong:k3,formatRelative:A3,localize:I3,match:Y3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function K3(e,t){const n=yt(e,t==null?void 0:t.in);return o3(n,b3(n))+1}function G3(e,t){const n=yt(e,t==null?void 0:t.in),r=+ll(n)-+s3(n);return Math.round(r/Mm)+1}function Bm(e,t){var c,d,f,h;const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Si(),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=pr((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Ni(i,t),l=pr((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=Ni(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function Q3(e,t){var a,l,u,c;const n=Si(),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=Bm(e,t),s=pr((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Ni(s,t)}function X3(e,t){const n=yt(e,t==null?void 0:t.in),r=+Ni(n,t)-+Q3(n,t);return Math.round(r/Mm)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Fr={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)}},cs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fm={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 Fr.y(e,t)},Y:function(e,t,n,r){const o=Bm(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=Rm(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 Fr.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=X3(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ge(o,t.length)},I:function(e,t,n){const r=G3(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"}):Fr.d(e,t)},D:function(e,t,n){const r=K3(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=cs.noon:r===0?o=cs.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=cs.evening:r>=12?o=cs.afternoon:r>=4?o=cs.morning:o=cs.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 Fr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fr.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"}):Fr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fr.s(e,t)},S:function(e,t){return Fr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return qm(r);case"XXXX":case"XX":return Eo(r);case"XXXXX":case"XXX":default:return Eo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return qm(r);case"xxxx":case"xx":return Eo(r);case"xxxxx":case"xxx":default:return Eo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hm(r,":");case"OOOO":default:return"GMT"+Eo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hm(r,":");case"zzzz":default:return"GMT"+Eo(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 Hm(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 qm(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):Eo(e,t)}function Eo(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 zm=(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"})}},Wm=(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"})}},J3={p:Wm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return zm(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}}",zm(r,t)).replace("{{time}}",Wm(o,t))}},e4=/^D+$/,t4=/^Y+$/,n4=["D","DD","YY","YYYY"];function r4(e){return e4.test(e)}function o4(e){return t4.test(e)}function s4(e,t,n){const r=i4(e,t,n);if(console.warn(r),n4.includes(e))throw new RangeError(r)}function i4(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 a4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u4=/^'([^]*?)'?$/,c4=/''/g,d4=/[a-zA-Z]/;function f4(e,t,n){var c,d,f,h;const r=Si(),o=r.locale??Um,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=yt(e,n==null?void 0:n.in);if(!l3(a))throw new RangeError("Invalid time value");let l=t.match(l4).map(m=>{const y=m[0];if(y==="p"||y==="P"){const x=J3[y];return x(m,o.formatLong)}return m}).join("").match(a4).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const y=m[0];if(y==="'")return{isToken:!1,value:h4(m)};if(Fm[y])return{isToken:!0,value:m};if(y.match(d4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(m=>{if(!m.isToken)return m.value;const y=m.value;(o4(y)||r4(y))&&s4(y,t,String(e));const x=Fm[y[0]];return x(a,y,o.localize,u)}).join("")}function h4(e){const t=e.match(u4);return t?t[1].replace(c4,"'"):e}function p4(e,t,n){const r=Si(),o=(n==null?void 0:n.locale)??r.locale??Um,s=2520,i=dl(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]=cl(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),c=g3(u,l),d=(ul(u)-ul(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<Vm){const m=Math.round(f/60);return o.formatDistance("aboutXHours",m,a)}else{if(f<s)return o.formatDistance("xDays",1,a);if(f<al){const m=Math.round(f/Vm);return o.formatDistance("xDays",m,a)}else if(f<al*2)return h=Math.round(f/al),o.formatDistance("aboutXMonths",h,a)}if(h=m3(u,l),h<12){const m=Math.round(f/al);return o.formatDistance("xMonths",m,a)}else{const m=h%12,y=Math.trunc(h/12);return m<3?o.formatDistance("aboutXYears",y,a):m<9?o.formatDistance("overXYears",y,a):o.formatDistance("almostXYears",y+1,a)}}function m4(e,t){return p4(e,i3(e),t)}function g4(e){return m4(e,{addSuffix:!0})}function ds(e,t){return f4(e,t||"PPP")}const b4={class:"moonbase:subscriptions"},v4={key:0,class:"moonbase:loader"},y4={key:1,class:"moonbase:loader"},w4=["data-subscription-status"],_4={class:"moonbase:subscriptions-item-content"},E4={class:"moonbase:subscriptions-item-content"},k4={key:0,class:"moonbase:subscriptions-item-milestone-progress"},x4={class:"moonbase:subscriptions-item-milestone-progress-title"},A4=le({__name:"Subscriptions",setup(e){const t=Ce(),{getSubscriptions:n}=fo(),r=j(new Date),o=j(null);return Ue(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)=>(p(),_("div",b4,[o.value?o.value.length===0?(p(),_("div",y4," No subscriptions found ")):z("",!0):(p(),_("div",v4,[v(zt),i[0]||(i[0]=N(" Loading subscriptions.. "))])),(p(!0),_(de,null,rt(o.value||[],a=>(p(),_(de,{key:a.id},[L("div",{"data-subscription-status":a.status,class:"moonbase:subscriptions-item"},[a.content.type==="Product"?(p(),_(de,{key:0},[v(At,{url:a.content.product.iconUrl,size:48},null,8,["url"]),L("div",_4,[v(et,null,{default:k(()=>[N($(a.content.quantity)+" x "+$(a.content.product.name),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(a.status===b(Cr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+$(b(ds)(a.expiresAt)),1)]),_:2},1024)])],64)):(p(),_(de,{key:1},[v(At,{url:a.content.bundle.iconUrl,size:48},null,8,["url"]),L("div",E4,[v(et,null,{default:k(()=>[N($(a.content.quantity)+" x "+$(a.content.bundle.name),1)]),_:2},1024),v(ye,null,{default:k(()=>[N($(a.status===b(Cr).Active?"Renews":a.expiresAt>r.value?"Expires":"Expired")+" "+$(b(ds)(a.expiresAt)),1)]),_:2},1024)])],64)),L("div",null,[v(Xo,{variant:"subtle",onClick:l=>b(t).show(b(te).Subscription,b(W).ManageSubscription,{subscription_id:a.id})},{default:k(()=>[v(b(Ip)),i[1]||(i[1]=L("span",{class:"moonbase:clickable"},null,-1))]),_:2,__:[1]},1032,["onClick"])])],8,w4),a.milestoneProgress?(p(),_("div",k4,[L("div",x4,[v(et,null,{default:k(()=>[N($(a.milestoneProgress.title),1)]),_:2},1024),v(Wt,null,{default:k(()=>[N($(a.milestoneProgress.currentNormalizedCycleNumber-(a.milestoneProgress.currentCycleIsCompleted?0:1))+" / "+$(a.milestoneProgress.toNormalizedCycleNumber)+" "+$(b(Oi)(a.cycleLength))+"s ",1)]),_:2},1024)]),v($m,{progress:a.milestoneProgress},null,8,["progress"])])):z("",!0)],64))),128))]))}}),C4={class:"moonbase:customer"},O4=le({__name:"Customer",setup(e){const t=Ce(),{user:n}=Re(),r=fe(it),o=Z(()=>[{intent:W.ViewProducts,title:"Products",content:Fx},{intent:W.ViewSubscriptions,title:"Subscriptions",content:A4,predicate:()=>{var l;return((l=n.value)==null?void 0:l.hasSubscriptions)??!1}},{intent:W.ViewAccount,title:"Account",content:Ox},{intent:W.RedeemVoucher,title:"Redeem",content:Jx}].filter(l=>l.predicate===void 0||l.predicate())),s=Z(()=>t.intent===W.ConnectAccount),i=Z(()=>o.value.findIndex(l=>l.intent===t.intent));function a(l){t.intent=o.value[l].intent}return(l,u)=>(p(),_("div",C4,[s.value?(p(),H(Mx,{key:0})):(p(),H(b(Aw),{key:1,"selected-index":i.value,onChange:a},{default:k(()=>{var c,d;return[v(b(Cw),{"data-corners":(c=b(r))==null?void 0:c.theme.corners,"data-background":(d=b(r))==null?void 0:d.theme.colors.background},{default:k(()=>[(p(!0),_(de,null,rt(o.value,f=>(p(),H(b(Ow),{key:f.intent},{default:k(()=>[N($(f.title),1)]),_:2},1024))),128))]),_:1},8,["data-corners","data-background"]),v(b(Sw),null,{default:k(()=>[(p(!0),_(de,null,rt(o.value,f=>(p(),H(b(Nw),{key:f.intent},{default:k(()=>[(p(),H(ru(f.content)))]),_:2},1024))),128))]),_:1})]}),_:1},8,["selected-index"]))]))}}),S4={class:"moonbase:product-card-content"},N4=["data-open"],P4=le({__name:"ProductCard",props:{product:{}},setup(e){const t=j(!1),n=j(null),r=Z(()=>n.value&&n.value.$el&&n.value.$el.scrollHeight>n.value.$el.clientHeight);return(o,s)=>(p(),H(nn,{class:"moonbase:product-card"},{addon:k(()=>[L("div",{class:"moonbase:product-card-description","data-open":t.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:n},{default:k(()=>[N($(o.product.description),1)]),_:1},512),!t.value&&r.value?(p(),_("button",{key:0,onClick:s[0]||(s[0]=i=>t.value=!0)},[v(et,null,{default:k(()=>s[1]||(s[1]=[N(" read more ")])),_:1,__:[1]})])):z("",!0)],8,N4)]),default:k(()=>[v(At,{url:o.product.iconUrl,size:72},null,8,["url"]),L("div",S4,[v(hr,null,{default:k(()=>{var i;return[N($((i=o.product)==null?void 0:i.name),1)]}),_:1}),v(ye,{class:"moonbase:product-card-tagline"},{default:k(()=>{var i;return[N($((i=o.product)==null?void 0:i.tagline),1)]}),_:1})])]),_:1}))}});function T4(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 I4={class:"moonbase:product-downloads"},D4=["data-open"],$4={key:1,class:"moonbase:product-downloads-content"},M4={key:2,class:"moonbase:product-downloads-content"},V4={key:3,class:"moonbase:product-downloads-content"},L4={key:4,class:"moonbase:product-downloads-content"},R4={class:"moonbase:product-downloads-list"},j4={class:"moonbase:product-downloads-download-actions"},U4=le({__name:"ProductDownloads",props:{product:{}},setup(e){const t=e,n=Ce(),r=Re(),o=il(),s=fe(Hr),{downloadProduct:i}=fo(),a=j(!1),l=j(null),u=Z(()=>l.value&&l.value.$el&&l.value.$el.scrollHeight>l.value.$el.clientHeight);function c(){n.enqueue(te.Product,W.DownloadProduct,n.parameters??void 0),n.show(te.Authentication,W.SignIn)}const d=[pn.Windows,pn.Mac,pn.Linux,pn.Universal];function f(){var C;const P=(((C=navigator.userAgentData)==null?void 0:C.platform)??navigator.platform??"Unknown").toLowerCase();return/mac/.test(P)?pn.Mac:/win/.test(P)?pn.Windows:/linux/.test(P)?pn.Linux:pn.Universal}const h=f(),m=[h,...d.filter(P=>P!==h)],y=Z(()=>m.flatMap(P=>[...(t.product.downloads??[]).filter(C=>C.platform===P)]));async function x(P){try{await i(P),s==null||s(Dt.DownloadedProduct,{product:t.product,download:P,user:r.user.value})}catch(C){if(C instanceof gn)o.reportProblem("error",{type:C.name,title:C.title,detail:C.detail,status:C.status,errors:C.errors?Object.fromEntries(Object.entries(C.errors).map(([U,M])=>[U,[M]])):void 0,instance:"ProductDownloads.vue:startDownload"});else{const U=C;o.reportProblem("error",{type:U.name,title:U.message,instance:"ProductDownloads.vue:startDownload"})}throw C}}return(P,C)=>(p(),_("div",I4,[v(qe,null,{default:k(()=>[C[1]||(C[1]=N(" Downloads ")),v(ye,null,{default:k(()=>[N(" Version "+$(P.product.version),1)]),_:1})]),_:1,__:[1]}),P.product.releaseDescription?(p(),_("div",{key:0,class:"moonbase:product-downloads-description","data-open":a.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:l},{default:k(()=>[N($(P.product.releaseDescription),1)]),_:1},512),!a.value&&u.value?(p(),_("button",{key:0,onClick:C[0]||(C[0]=U=>a.value=!0)},[v(et,null,{default:k(()=>C[2]||(C[2]=[N(" read more ")])),_:1,__:[2]})])):z("",!0)],8,D4)):z("",!0),P.product.downloadsNeedsUser&&P.product.downloadsNeedsOwnership&&!P.product.numberOfLicenses&&!P.product.subscriptionLicenses?(p(),_("div",$4,[v(Ke,{"data-center":""},{default:k(()=>C[3]||(C[3]=[N(" This product requires ownership to download ")])),_:1,__:[3]}),v(Ve,{label:"Sign in",handler:c})])):P.product.downloadsNeedsUser&&!b(r).user.value?(p(),_("div",M4,[v(Ke,{"data-center":""},{default:k(()=>C[4]||(C[4]=[N(" This product requires an account to download ")])),_:1,__:[4]}),v(Ve,{label:"Sign in",handler:c})])):P.product.downloadsNeedsOwnership&&!P.product.numberOfLicenses&&!P.product.subscriptionLicenses?(p(),_("div",V4,[v(Ke,{"data-center":""},{default:k(()=>C[5]||(C[5]=[N(" This product requires ownership to download ")])),_:1,__:[5]})])):(p(),_("div",L4,[L("div",R4,[(p(!0),_(de,null,rt(y.value,U=>(p(),H(nn,{key:U.key,class:"moonbase:product-downloads-download"},{addon:k(()=>[L("div",j4,[v(Ve,{label:U.platform===b(pn).Universal?"Download":`Download for ${U.platform}`,variant:U.platform===b(h)?"primary":"secondary","no-reset":!0,handler:()=>x(U),icon:b(Vw)},null,8,["label","variant","handler","icon"])])]),default:k(()=>[L("div",null,[v(qe,null,{default:k(()=>[N($(U.name),1)]),_:2},1024),v(Wt,null,{default:k(()=>[N($(U.platform)+" - "+$(b(T4)(U.size)),1)]),_:2},1024)])]),_:2},1024))),128))]),y.value.length===0?(p(),H(Ke,{key:0,"data-center":""},{default:k(()=>C[6]||(C[6]=[N(" No downloadable files found ")])),_:1,__:[6]})):z("",!0)]))]))}}),B4=["href"],F4=le({__name:"LinkifiedText",props:{text:{}},setup(e){const t=e,n=/\b((?:https?:\/\/|www\.)[^\s<>"'`]+?)(?=[)\]}>,.!?;:'"]?(?:\s|$))/gi;function r(i){return/^www\./i.test(i)?`https://${i}`:i}function o(i){const a=[];if(!i)return a;let l=0;for(const u of i.matchAll(n)){const c=u[0],d=u.index??0;d>l&&a.push({type:"text",text:i.slice(l,d)});const f=c.replace(/[)\]}>,.!?;:'"]+$/g,()=>""),h=f,m=r(f);h.length>0&&a.push({type:"url",text:h,href:m});const y=c.slice(f.length);y&&a.push({type:"text",text:y}),l=d+c.length}return l<i.length&&a.push({type:"text",text:i.slice(l)}),a}const s=Z(()=>o(t.text));return(i,a)=>(p(!0),_(de,null,rt(s.value,(l,u)=>(p(),_(de,{key:u},[l.type==="url"?(p(),_("a",{key:0,href:l.href,target:"_blank",rel:"noopener noreferrer nofollow"},$(l.text),9,B4)):(p(),_(de,{key:1},[N($(l.text),1)],64))],64))),128))}}),H4={key:0,class:"moonbase:product-license-external-content"},q4={key:1,class:"moonbase:product-license-external-content"},z4={key:2,class:"moonbase:product-license-external-content"},W4={key:3,class:"moonbase:product-license-account-connection"},Z4={class:"moonbase:account-provider"},Y4=["src"],K4=["data-open"],G4=le({__name:"ProductLicense",props:{license:{},product:{}},setup(e){const t=Ce(),n=j(!1),r=j(null),o=Z(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>(p(),H(nn,{class:"moonbase:product-license"},xa({default:k(()=>[L("div",null,[v(Wt,null,{default:k(()=>[N($(s.product.name)+" license ",1)]),_:1}),!s.license.externalFulfillment&&!s.license.requiredConnectedAccount?(p(),H(qe,{key:0},{default:k(()=>[N($(s.license.id),1)]),_:1})):z("",!0)])]),_:2},[s.license.externalFulfillment||s.license.fulfillmentMessage||s.license.requiredConnectedAccount?{name:"addon",fn:k(()=>{var a,l;return[typeof s.license.externalFulfillment=="string"?(p(),_("div",H4,[v(On,null,{default:k(()=>i[1]||(i[1]=[N(" Key code: ")])),_:1,__:[1]}),L("code",null,$(s.license.externalFulfillment),1)])):((a=s.license.externalFulfillment)==null?void 0:a.type)==="file"?(p(),_("div",q4,[v(On,null,{default:k(()=>i[2]||(i[2]=[N(" License file ")])),_:1,__:[2]}),v(Ci,{type:"anchor",href:`data:${s.license.externalFulfillment.contentType};base64,${s.license.externalFulfillment.data}`,download:s.license.externalFulfillment.fileName,label:`Download ${s.license.externalFulfillment.fileName}`,variant:"secondary",icon:b(Dp)},null,8,["href","download","label","icon"])])):((l=s.license.externalFulfillment)==null?void 0:l.type)==="iLok"?(p(),_("div",z4,[v(On,null,{default:k(()=>[v(b(mx)),i[3]||(i[3]=N(" Deposited to your iLok account "))]),_:1,__:[3]})])):s.license.status===b(Cl).Pending&&s.license.requiredConnectedAccount==="iLok"?(p(),_("div",W4,[L("div",Z4,[L("img",{src:b(sl),alt:"iLok"},null,8,Y4),L("div",null,[v(qe,null,{default:k(()=>i[4]||(i[4]=[N("iLok")])),_:1,__:[4]}),v(ye,null,{default:k(()=>i[5]||(i[5]=[N("Connect your account to receive your license")])),_:1,__:[5]})])]),v(Ve,{handler:()=>b(t).show(b(te).Customer,b(W).ConnectAccount,{provider_id:b(Is).iLok}),label:"Connect",variant:"primary"},null,8,["handler"])])):z("",!0),s.license.fulfillmentMessage?(p(),_("div",{key:4,class:"moonbase:product-license-fulfillment-message","data-open":n.value||void 0},[v(ye,{ref_key:"messageRef",ref:r},{default:k(()=>[v(F4,{text:s.license.fulfillmentMessage},null,8,["text"])]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[0]||(i[0]=u=>n.value=!0)},[v(et,null,{default:k(()=>i[6]||(i[6]=[N(" read more ")])),_:1,__:[6]})])):z("",!0)],8,K4)):z("",!0)]}),key:"0"}:void 0]),1024))}}),Q4={class:"moonbase:product-licenses"},X4={key:0,class:"moonbase:loader"},J4={key:1,class:"moonbase:empty"},eA={key:0,class:"moonbase:loader"},tA={key:1,class:"moonbase:product-licenses-activations"},nA={key:0},rA={class:"moonbase:product-licenses-activation-actions"},oA={key:2,class:"moonbase:loader"},sA={key:3,class:"moonbase:product-licenses-licenses"},iA=le({__name:"ProductLicenses",props:{product:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,getProductLicenses:s,revokeActivation:i}=fo(),a=il(),l=j(null),u=j(null),c=j(!0);Ue(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,m;return(m=l.value)==null?void 0:m.splice((h=l.value)==null?void 0:h.indexOf(f),1)})}catch(h){if(h instanceof gn)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(([m,y])=>[m,[y]])):void 0,instance:"ProductLicenses.vue:revoke"});else{const m=h;a.reportProblem("error",{type:m.name,title:m.message,instance:"ProductLicenses.vue:revoke"})}throw h}}return(f,h)=>(p(),_("div",Q4,[v(qe,null,{default:k(()=>[h[0]||(h[0]=N(" Licenses ")),f.product.maxActivations&&f.product.maxActivations>0?(p(),H(ye,{key:0},{default:k(()=>[N($(f.product.currentActivations??0)+" of "+$(f.product.maxActivations)+" seats used ",1)]),_:1})):z("",!0)]),_:1,__:[0]}),c.value?(p(),_("div",X4,[v(zt)])):!f.product.numberOfLicenses&&!f.product.subscriptionLicenses?(p(),_("div",J4,[v(Ke,null,{default:k(()=>h[1]||(h[1]=[N(" You don't own any licenses for this product yet ")])),_:1,__:[1]}),f.product&&f.product.website?(p(),H(Ci,{key:0,type:"anchor",href:f.product.website,label:"Purchase",icon:b(Ku)},null,8,["href","icon"])):z("",!0)])):z("",!0),c.value?z("",!0):(p(),_(de,{key:2},[f.product.maxActivations&&f.product.maxActivations>0&&!f.product.currentActivations?(p(),_("div",eA,[v(b($p)),v(qe,null,{default:k(()=>h[2]||(h[2]=[N(" No activations yet ")])),_:1,__:[2]})])):z("",!0),f.product.maxActivations&&l.value?(p(),_("div",tA,[(p(!0),_(de,null,rt(l.value??[],m=>(p(),H(nn,{key:m.id,class:"moonbase:product-licenses-activation"},xa({default:k(()=>[L("div",null,[v(Wt,null,{default:k(()=>h[3]||(h[3]=[N(" Device ")])),_:1,__:[3]}),v(qe,null,{default:k(()=>[N($(m.name),1)]),_:2},1024)]),L("div",null,[v(Wt,null,{default:k(()=>h[4]||(h[4]=[N(" Activation ")])),_:1,__:[4]}),v(qe,null,{default:k(()=>[N($(m.activationMethod),1)]),_:2},1024)]),m.lastValidatedAt?(p(),_("div",nA,[v(Wt,null,{default:k(()=>h[5]||(h[5]=[N(" First activated ")])),_:1,__:[5]}),v(qe,null,{default:k(()=>[N($(b(g4)(m.firstValidatedAt)),1)]),_:2},1024)])):z("",!0)]),_:2},[m.activationMethod===b(Yi).Online?{name:"addon",fn:k(()=>[L("div",rA,[v(Ve,{label:"Revoke",variant:"secondary","no-reset":!0,handler:()=>d(m)},null,8,["handler"])])]),key:"0"}:void 0]),1024))),128))])):z("",!0),(!u.value||u.value.length===0)&&!f.product.maxActivations&&(f.product.numberOfLicenses||f.product.subscriptionLicenses)?(p(),_("div",oA,[v(b($p)),f.product.numberOfLicenses?(p(),H(qe,{key:0},{default:k(()=>[N(" You own "+$(f.product.numberOfLicenses)+" license"+$(f.product.numberOfLicenses!==1?"s":"")+" for this product ",1)]),_:1})):z("",!0),f.product.subscriptionLicenses?(p(),H(qe,{key:1},{default:k(()=>[N(" You have "+$(f.product.subscriptionLicenses)+" subscription license"+$(f.product.subscriptionLicenses!==1?"s":"")+" for this product ",1)]),_:1})):z("",!0)])):f.product.externalLicenses&&u.value?(p(),_("div",sA,[(p(!0),_(de,null,rt((u.value??[]).filter(m=>m.externalFulfillment||m.requiredConnectedAccount),m=>(p(),H(G4,{key:m.id,license:m,product:f.product},null,8,["license","product"]))),128))])):z("",!0)],64))]))}}),aA={class:"moonbase:download-product"},lA={key:0,class:"moonbase:loader"},uA={key:1,class:"moonbase:loader"},cA={key:2,class:"moonbase:loader"},dA={key:3},fA=le({__name:"Product",setup(e){const t=Ce(),n=Re(),{loaded:r}=Re(),{getProduct:o}=fo(),s=j(null),i=j(null),a=j(!0);return Ue(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)=>(p(),_("div",aA,[a.value||!b(r)?(p(),_("div",lA,[v(zt)])):i.value?(p(),_("div",uA,$(i.value),1)):s.value?(p(),_("div",dA,[v(P4,{product:s.value},null,8,["product"]),s.value.downloads?(p(),H(U4,{key:0,product:s.value},null,8,["product"])):z("",!0),b(n).user.value?(p(),H(iA,{key:1,product:s.value,onRevoked:u[0]||(u[0]=c=>s.value.currentActivations=(s.value.currentActivations??1)-1)},null,8,["product"])):z("",!0)])):(p(),_("div",cA," Could not find product "))]))}}),hA={class:"moonbase:peek"},pA=["data-visible"],mA={key:1,class:"moonbase:peek-voucher"},gA={key:0,class:"moonbase:peek-voucher-content"},bA={class:"moonbase:peek-voucher-auth"},vA=le({__name:"Redeem",setup(e){const{peek:t}=Bh(),n=Ce(),r=j(null),o=j(null),s=j(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(te.Customer,W.RedeemVoucher,{code:s.value}),n.show(te.Authentication,W.SignIn)}function l(){n.enqueue(te.Customer,W.RedeemVoucher,{code:s.value}),n.show(te.Authentication,W.SignUp)}return(u,c)=>(p(),_("div",hA,[v(ui,{mode:"out-in",name:"moonbase:slide-left"},{default:k(()=>[r.value?(p(),_("div",mA,[L("div",null,[v(hr,null,{default:k(()=>[N($(r.value.name),1)]),_:1}),r.value.description?(p(),H(qe,{key:0},{default:k(()=>[N(' "'+$(r.value.description)+'" ',1)]),_:1})):z("",!0),v(ye,null,{default:k(()=>[c[2]||(c[2]=N(" Code: ")),L("strong",null,$(r.value.code),1)]),_:1,__:[2]})]),v(qe,null,{default:k(()=>c[3]||(c[3]=[N(" Voucher summary ")])),_:1,__:[3]}),r.value.redeemsProducts.length>0||r.value.redeemsBundles.length>0?(p(),_("div",gA,[(p(!0),_(de,null,rt(r.value.redeemsProducts,({value:d,quantity:f})=>(p(),H(Dm,{key:d.id,product:d,quantity:f},null,8,["product","quantity"]))),128)),(p(!0),_(de,null,rt(r.value.redeemsBundles,({value:d,quantity:f})=>(p(),H(Im,{key:d.id,bundle:d,quantity:f},null,8,["bundle","quantity"]))),128))])):z("",!0),L("div",bA,[v(Ke,null,{default:k(()=>c[4]||(c[4]=[N(" Sign in or create an account to redeem products ")])),_:1,__:[4]}),v(Ve,{label:"Sign in",variant:"primary",handler:a}),v(Ve,{label:"Create account",variant:"subtle",handler:l})])])):(p(),H(zn,{key:0,handler:i},{default:k(()=>{var d;return[v(Ke,null,{default:k(()=>c[1]||(c[1]=[N(" Do you have a voucher you want to redeem? "),L("br",null,null,-1),N(" Please enter the code below: ")])),_:1,__:[1]}),v(Ct,{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"]),v(Wn,{label:"Redeem voucher",error:"Error"}),L("span",{class:"moonbase:error","data-visible":!!o.value||void 0},$((d=o.value)==null?void 0:d.message),9,pA)]}),_:1}))]),_:1})]))}}),yA={class:"moonbase:subscription-content-card-content"},wA=["data-open"],_A={class:"moonbase:subscription-content-card-content"},EA=["data-open"],kA=le({__name:"ContentCard",props:{subscription:{}},setup(e){const t=j(new Date),n=j(!1),r=j(null),o=Z(()=>r.value&&r.value.$el&&r.value.$el.scrollHeight>r.value.$el.clientHeight);return(s,i)=>s.subscription.content.type==="Product"?(p(),H(nn,{key:0,class:"moonbase:subscription-content-card"},{addon:k(()=>[L("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:r},{default:k(()=>[N($(s.subscription.content.product.description),1)]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[0]||(i[0]=a=>n.value=!0)},[v(et,null,{default:k(()=>i[2]||(i[2]=[N(" read more ")])),_:1,__:[2]})])):z("",!0)],8,wA)]),default:k(()=>[v(At,{url:s.subscription.content.product.iconUrl,size:72},null,8,["url"]),L("div",yA,[v(hr,null,{default:k(()=>{var a;return[N($((a=s.subscription.content.product)==null?void 0:a.name),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-tagline"},{default:k(()=>{var a;return[N($((a=s.subscription.content.product)==null?void 0:a.tagline),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-expiry"},{default:k(()=>[N($(s.subscription.status===b(Cr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),L("strong",null,$(b(ds)(s.subscription.expiresAt)),1)]),_:1})])]),_:1})):(p(),H(nn,{key:1,class:"moonbase:subscription-content-card"},{addon:k(()=>[L("div",{class:"moonbase:subscription-content-card-description","data-open":n.value||void 0},[v(ye,{ref_key:"descriptionRef",ref:r},{default:k(()=>[N($(s.subscription.content.bundle.description),1)]),_:1},512),!n.value&&o.value?(p(),_("button",{key:0,onClick:i[1]||(i[1]=a=>n.value=!0)},[v(et,null,{default:k(()=>i[3]||(i[3]=[N(" read more ")])),_:1,__:[3]})])):z("",!0)],8,EA)]),default:k(()=>[v(At,{url:s.subscription.content.bundle.iconUrl,size:72},null,8,["url"]),L("div",_A,[v(hr,null,{default:k(()=>{var a;return[N($((a=s.subscription.content.bundle)==null?void 0:a.name),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-tagline"},{default:k(()=>{var a;return[N($((a=s.subscription.content.bundle)==null?void 0:a.tagline),1)]}),_:1}),v(ye,{class:"moonbase:subscription-content-card-expiry"},{default:k(()=>[N($(s.subscription.status===b(Cr).Active?"Renews":s.subscription.expiresAt>t.value?"Expires":"Expired")+" ",1),L("strong",null,$(b(ds)(s.subscription.expiresAt)),1)]),_:1})])]),_:1}))}}),xA={class:"moonbase:milestone-rewards"},AA={class:"moonbase:milestone-rewards-list"},CA={key:0},OA={key:1},SA=le({__name:"MilestoneRewards",props:{progress:{}},setup(e){return(t,n)=>(p(),_("div",xA,[v(et,null,{default:k(()=>n[0]||(n[0]=[N(" Rewards: ")])),_:1,__:[0]}),L("div",AA,[(p(!0),_(de,null,rt(Object.values(t.progress.events).flatMap(r=>r).filter(r=>r.fulfilled),r=>(p(),_("div",{key:r.milestoneId,class:"moonbase:milestone-rewards-item"},[v(ye,null,{default:k(()=>[N($(r.message),1)]),_:2},1024),r.type==="CouponCodeMilestone"&&r.fulfilled&&r.code?(p(),_("div",CA,[v(Wt,null,{default:k(()=>n[1]||(n[1]=[N(" Your coupon code: ")])),_:1,__:[1]}),n[2]||(n[2]=L("br",null,null,-1)),L("code",null,$(r.code),1)])):r.type==="PerpetualLicenseConversionMilestone"&&r.fulfilled?(p(),_("div",OA,[v(Wt,null,{default:k(()=>[v(b(yc),{class:"moonbase:success-icon"}),n[3]||(n[3]=N(" Your licenses have been converted to perpetual licenses. "))]),_:1,__:[3]})])):z("",!0)]))),128))])]))}}),NA={class:"moonbase:subscription"},PA={key:0,class:"moonbase:loader"},TA={key:1,class:"moonbase:loader"},IA={key:2,class:"moonbase:loader"},DA={key:3},$A={key:0,class:"moonbase:subscription-milestones"},MA={class:"moonbase:subscription-milestone-progress-title"},VA={class:"moonbase:subscription-actions"},LA=le({__name:"Subscription",setup(e){const t=Ce(),{loaded:n}=Re(),r=il(),{getSubscription:o,renewSubscription:s,cancelSubscription:i,updateSubscriptionPaymentMethod:a}=fo(),l=j(null),u=j(new Date),c=j(null),d=j(!0);Ue(async()=>{const y=t.getParameter("subscription_id");if(!y){c.value="Link is broken";return}try{l.value=await o(y)}catch(x){c.value=x.message}d.value=!1});async function f(){if(!l.value)return;if((await s(l.value.id,{redirect:!1})).completed){const x=await o(l.value.id);Ht(1500).then(()=>l.value=x)}else throw new us}async function h(){l.value&&(l.value=await i(l.value.id))}async function m(){if(l.value){c.value=null;try{const y=await a(l.value,{returnUrl:`${window.location.pathname}?mb_intent=${W.ManageSubscription}&mb_subscription_id=${l.value.id}`});if(y!=null&&y.completed)l.value=await o(l.value.id);else throw new us}catch(y){if(c.value=y.message,!(y instanceof us))if(y instanceof gn)r.reportProblem("error",{type:y.name,title:y.title,detail:y.detail,status:y.status,errors:y.errors?Object.fromEntries(Object.entries(y.errors).map(([x,P])=>[x,[P]])):void 0,instance:"Subscription.vue:startUpdate"});else{const x=y;r.reportProblem("error",{type:x.name,title:x.message,instance:"Subscription.vue:startUpdate"})}throw y}}}return(y,x)=>(p(),_("div",NA,[d.value||!b(n)?(p(),_("div",PA,[v(zt)])):c.value?(p(),_("div",TA,$(c.value),1)):l.value?(p(),_("div",DA,[v(kA,{subscription:l.value},null,8,["subscription"]),l.value.milestoneProgress?(p(),_("div",$A,[L("div",MA,[v(et,null,{default:k(()=>[N($(l.value.milestoneProgress.title),1)]),_:1}),v(Wt,null,{default:k(()=>[N($(l.value.milestoneProgress.currentNormalizedCycleNumber-(l.value.milestoneProgress.currentCycleIsCompleted?0:1))+" / "+$(l.value.milestoneProgress.toNormalizedCycleNumber)+" "+$(b(Oi)(l.value.cycleLength))+"s ",1)]),_:1})]),v($m,{progress:l.value.milestoneProgress},null,8,["progress"]),l.value.milestoneProgress.description?(p(),H(Wt,{key:0},{default:k(()=>[N($(l.value.milestoneProgress.description),1)]),_:1})):z("",!0),Object.values(l.value.milestoneProgress.events).flatMap(P=>P).some(P=>P.fulfilled)?(p(),H(SA,{key:1,progress:l.value.milestoneProgress},null,8,["progress"])):z("",!0)])):z("",!0),L("div",VA,[l.value.status===b(Cr).Active?(p(),_(de,{key:0},[v(Ve,{label:"Update payment method",variant:"secondary",handler:m}),v(Ve,{label:"Cancel subscription",variant:"danger",handler:h}),v(Wt,null,{default:k(()=>[x[1]||(x[1]=N(" 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 ")),L("strong",null,$(b(xt)(l.value.total.due)),1),N(" per "+$(b(Oi)(l.value.cycleLength))+" for this subscription",1),l.value.paymentMethod?(p(),_(de,{key:0},[x[0]||(x[0]=N(" using payment method ")),L("strong",null,$(l.value.paymentMethod),1)],64)):z("",!0),x[2]||(x[2]=N(". "))]),_:1,__:[1,2]})],64)):l.value.status===b(Cr).Completed?(p(),H(Wt,{key:1},{default:k(()=>[v(b(yc),{class:"moonbase:success-icon"}),x[3]||(x[3]=N(" This subscription has been completed, and cannot be renewed. "))]),_:1,__:[3]})):(p(),_(de,{key:2},[l.value.nextPaymentScheduledAt&&l.value.cancellable?(p(),_(de,{key:0},[v(Ve,{label:"Continue subscription",variant:"primary",handler:f}),v(Ve,{label:"Cancel subscription",variant:"danger",handler:h}),v(Wt,null,{default:k(()=>[N(" We could not renew this subscription on the expiry date, the next attempt will be "+$(b(ds)(l.value.nextPaymentScheduledAt))+". To make sure you can use your products un-interrupted, continue the subscription, or cancel it if you do not wish to keep using these products. ",1)]),_:1})],64)):(p(),_(de,{key:1},[v(Ve,{label:"Continue subscription",variant:"primary",handler:f}),v(Wt,null,{default:k(()=>[N(" This subscription has been stopped, and "+$(l.value.expiresAt>u.value?"expires":"expired")+" "+$(b(ds)(l.value.expiresAt))+". If you want to continue using the products after this date, you may continue the subscription to regain access. ",1)]),_:1})],64))],64))])])):(p(),_("div",IA," Could not find subscription "))]))}}),RA=le({__name:"App",setup(e){const t=fe(it),n=Ce();Ze(()=>[n.active,n.intent,n.parameters],([o,s,i])=>{Ye("UI updated",{view:o,intent:s,parameters:Ee(i)})});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 Ze(()=>t==null?void 0:t.value.theme.colors.primary,o=>{if(!o)return;let s=o;typeof s=="string"&&(s=Object.fromEntries(NE(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}),Ze(()=>t==null?void 0:t.value.theme.dark,o=>{o?document.documentElement.classList.add("moonbase:dark"):document.documentElement.classList.remove("moonbase:dark")},{immediate:!0}),P_(),T_(),(o,s)=>{var i;return p(),_(de,null,[(i=b(t))!=null&&i.toolbar.enabled?(p(),H(g_,{key:0})):z("",!0),v(l_,null,{default:k(()=>[b(n).active===b(te).Cart?(p(),H(px,{key:0})):b(n).active===b(te).Authentication?(p(),H(xk,{key:1})):b(n).active===b(te).Activation?(p(),H(I5,{key:2})):b(n).active===b(te).Product?(p(),H(fA,{key:3})):b(n).active===b(te).Subscription?(p(),H(LA,{key:4})):b(n).active===b(te).Customer?(p(),H(O4,{key:5})):b(n).active===b(te).Redeem?(p(),H(vA,{key:6})):b(n).active===b(te).About?(p(),H(BE,{key:7})):z("",!0)]),_:1})],64)}}});function fl(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof HTMLElement)}function hl(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(fl(e)&&fl(n)){for(const r in e)if(Object.prototype.hasOwnProperty.call(n,r)){const o=n[r];fl(o)&&fl(e[r])?e[r]=hl(e[r],o):o!==void 0&&(e[r]=o)}}return hl(e,...t)}function jA(e){const t=n=>Array.isArray(n)?n.map(r=>t(r)):Je(n)||_n(n)||Ro(n)?t(Ee(n)):n&&typeof n=="object"?Object.keys(n).reduce((r,o)=>(r[o]=t(n[o]),r),{}):n;return t(e)}const _c=Symbol("url"),Zm=Symbol("moonbase_instance"),mr=(e,t)=>window.dispatchEvent(new CustomEvent(`moonbase-storefront-${e}`,{detail:jA(t)})),Hr=Symbol("event-emitter");class UA{constructor(){ko(this,"initialized",!1);ko(this,"pinia");ko(this,"storefront");ko(this,"options")}async setup(t,n){var u,c;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}Ye("Given options:",n),this.options=j(hl(((u=this.options)==null?void 0:u.value)??ap,n??{})),Ye("Merged options:",this.options.value);const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase");const o=this.options.value.target??document.body;Ye("Mounting to target element",o),o.append(r);let s=t;if(t.includes(".moonbase.sh")){const d=/^(https:\/\/[a-z\-]+\.(?:beta\.)?moonbase\.sh)(.+)/.exec(t);d&&d.length>1&&d[1]&&(s=d[1],console.warn(`Moonbase url set up incorrectly, should be ${s}, was ${t}`))}this.storefront=l1(s),this.pinia=D1(),$y(RA).use(this.storefront).use(this.pinia).provide(it,this.options).provide(_c,s.replace(/\/$/,"")).provide(Hr,mr).provide(Zm,this).mount("#moonbase"),this.initialized=!0,window&&window.location&&this.handleLocationIntent(window.location);const a=Ce(this.pinia),l=Re(this.storefront);this.storefront.onStorefrontUpdated(d=>{mr(Dt.StorefrontUpdated,{storefront:d,user:l.user.value})}),(c=this.storefront)==null||c.onCheckoutInitiated((d,f)=>{mr(Dt.CheckoutInitiated,{order:d,total:f,user:l.user.value})}),this.storefront.onCheckoutClosed(d=>{mr(Dt.CheckoutClosed,{order:this.storefront.currentOrder.value,user:l.user.value}),d===W.ViewProducts&&(l.user.value?a.show(te.Customer,W.ViewProducts):a.show(te.Cart,W.ViewCart))}),this.storefront.onCheckoutCompleted(d=>{mr(Dt.CheckoutCompleted,{order:d,user:l.user.value})})}configure(t){var r;Ye("Given options:",t);const n=hl(((r=this.options)==null?void 0:r.value)??ap,t??{});Ye("Merged options:",n),this.options?this.options.value=n:this.options=j(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(W).includes(r)){const o=Object.fromEntries([...n.entries()].filter(([i])=>i.startsWith("mb_")).map(([i,a])=>[i.substring(3),a]));if(r===W.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");Ce(this.pinia).show(te.Authentication,W.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");Ce(this.pinia).show(te.Authentication,W.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ConfirmAccount,t)}confirm_email(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Authentication,W.ConfirmEmail,t)}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Authentication,W.ConfirmEmailChange,t):(n.enqueue(te.Authentication,W.ConfirmEmailChange,t),n.show(te.Authentication,W.SignIn))}connect_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.provider_id){const s=Object.values(Is).find(i=>i.toLowerCase()===t.provider_id.toLowerCase());s&&(t.provider_id=s)}const n=Ce(this.pinia),r=Re(this.storefront),o=t;r.user.value?n.show(te.Customer,W.ConnectAccount,o):(n.enqueue(te.Customer,W.ConnectAccount,o),n.show(te.Authentication,W.SignIn))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewAccount):(t.enqueue(te.Customer,W.ViewAccount),t.show(te.Authentication,W.SignIn))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewProducts):(t.enqueue(te.Customer,W.ViewProducts),t.show(te.Authentication,W.SignIn))}view_subscriptions(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ce(this.pinia);Re(this.storefront).user.value?t.show(te.Customer,W.ViewSubscriptions):(t.enqueue(te.Customer,W.ViewSubscriptions),t.show(te.Authentication,W.SignIn))}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Customer,W.RedeemVoucher,t):n.show(te.Redeem,W.RedeemVoucher,t)}view_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Product,W.ViewProduct,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Product,W.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia),r=Re(this.storefront);!(t!=null&&t.token)&&!r.user.value?(n.enqueue(te.Activation,W.ActivateProduct,t),n.show(te.Authentication,W.SignIn)):n.show(te.Activation,W.ActivateProduct,t)}manage_subscription(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ce(this.pinia);Re(this.storefront).user.value?n.show(te.Subscription,W.ManageSubscription,t):(n.enqueue(te.Subscription,W.ManageSubscription,t),n.show(te.Authentication,W.SignIn))}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ce(this.pinia).show(te.Cart,W.ViewCart)}async add_to_cart(t){var s,i,a,l,u,c,d,f,h,m,y,x,P,C,U,M,I,V;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=Bn(this.storefront),r=Re(this.storefront),o=t.offer_id?r1(t.offer_id):null;if(t!=null&&t.product_id){const E=fi(t.product_id,this.storefront);if(E.value){let O=n.addToCart(E.value,(s=E.value.variations)==null?void 0:s.find(A=>A.id===t.variation_id),(o==null?void 0:o.value)||void 0);const T=((i=O.price)==null?void 0:i[n.currency.value])===0;t!=null&&t.quantity&&(O=n.setQuantity(O,O.quantity+t.quantity-1)),(T?((a=this.options)==null?void 0:a.value.cart.leadMagnets.quantity)==="single":((l=this.options)==null?void 0:l.value.cart.quantity)==="single")&&(O=n.setQuantity(O,1)),mr(Dt.AddedToCart,{item:O,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const O=fi(t.product_id,this.storefront);if(O.value){let T=n.addToCart(O.value,(u=O.value.variations)==null?void 0:u.find(R=>R.id===t.variation_id),(o==null?void 0:o.value)||void 0);const A=((c=T.price)==null?void 0:c[n.currency.value])===0;t!=null&&t.quantity&&(T=n.setQuantity(T,T.quantity+t.quantity-1)),(A?((d=this.options)==null?void 0:d.value.cart.leadMagnets.quantity)==="single":((f=this.options)==null?void 0:f.value.cart.quantity)==="single")&&(T=n.setQuantity(T,1)),mr(Dt.AddedToCart,{item:T,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 E=Va(t.bundle_id,this.storefront);if(E.value){const O=(h=E.value.variations)==null?void 0:h.find(R=>R.id===t.variation_id);let T=n.addToCart(E.value,O,(o==null?void 0:o.value)||void 0,{bundleBehaviour:(m=this.options)==null?void 0:m.value.cart.bundles.onAdd});const A=((y=T.price)==null?void 0:y[n.currency.value])===0;t!=null&&t.quantity&&(T=n.setQuantity(T,T.quantity+t.quantity-1)),(A?((x=this.options)==null?void 0:x.value.cart.leadMagnets.quantity)==="single":((P=this.options)==null?void 0:P.value.cart.quantity)==="single")&&(T=n.setQuantity(T,1)),mr(Dt.AddedToCart,{item:T,currency:n.currency.value,user:r.user.value})}else{await this.storefront.loadedStorefrontPromise;const O=Va(t.bundle_id,this.storefront);if(O.value){const T=(C=O.value.variations)==null?void 0:C.find(B=>B.id===t.variation_id);let A=n.addToCart(O.value,T,(o==null?void 0:o.value)||void 0,{bundleBehaviour:(U=this.options)==null?void 0:U.value.cart.bundles.onAdd});const R=((M=A.price)==null?void 0:M[n.currency.value])===0;t!=null&&t.quantity&&(A=n.setQuantity(A,A.quantity+t.quantity-1)),(R?((I=this.options)==null?void 0:I.value.cart.leadMagnets.quantity)==="single":((V=this.options)==null?void 0:V.value.cart.quantity)==="single")&&(A=n.setQuantity(A,1)),mr(Dt.AddedToCart,{item:A,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&&Ce(this.pinia).show(te.Cart,W.AddToCart)}async purchase(t){var s,i,a,l,u;if(!this.initialized)throw new Error("Moonbase has not been set up yet");(s=this.storefront)!=null&&s.loadedStorefront||await((i=this.storefront)==null?void 0:i.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 c of n){if(!c.product_id&&!c.bundle_id)throw new Error("You need to provide a product or bundle ID when purchasing");if(c.product_id){const d=fi(c.product_id,this.storefront);if(d.value)r.push({item:d.value,variation:(a=d.value.variations)==null?void 0:a.find(f=>f.id===c.variation_id),quantity:c.quantity});else throw new Error(`Product '${c.product_id}' not found`)}if(c.bundle_id){const d=Va(c.bundle_id,this.storefront);if(d.value)r.push({item:d.value,variation:(l=d.value.variations)==null?void 0:l.find(f=>f.id===c.variation_id),quantity:c.quantity});else throw new Error(`Bundle '${c.bundle_id}' not found`)}}const o=Re(this.storefront);await n1(r,{redirect:((u=this.options)==null?void 0:u.value.checkout.redirect)||!1,returnUrl:o.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0},this.storefront)}checkout(t){var o;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;const n=Bn(this.storefront),r=Re(this.storefront);n.checkout({redirect:((o=this.options)==null?void 0:o.value.checkout.redirect)||!1,returnUrl:r.user.value?`${window.location.pathname}?mb_intent=view_products`:void 0})}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");Ce(this.pinia).show(te.About,W.ViewAbout)}}const pl=new UA;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=pl),_t.MoonbaseEvent=Dt,_t.MoonbaseIntent=W,_t.default=pl,_t.eventEmitterKey=Hr,_t.instanceKey=Zm,_t.urlKey=_c,Object.defineProperties(_t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});