var Gi=Object.defineProperty;var el=(e,t,n)=>t in e?Gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var vr=(e,t,n)=>(el(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function js(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r!!n[r.toLowerCase()]:r=>!!n[r]}const fe={},Ft=[],je=()=>{},tl=()=>!1,nl=/^on[^a-z]/,Un=e=>nl.test(e),Bs=e=>e.startsWith("onUpdate:"),ve=Object.assign,Us=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sl=Object.prototype.hasOwnProperty,G=(e,t)=>sl.call(e,t),j=Array.isArray,Nt=e=>vn(e)==="[object Map]",Hn=e=>vn(e)==="[object Set]",yr=e=>vn(e)==="[object Date]",z=e=>typeof e=="function",ge=e=>typeof e=="string",cn=e=>typeof e=="symbol",ue=e=>e!==null&&typeof e=="object",Po=e=>ue(e)&&z(e.then)&&z(e.catch),Oo=Object.prototype.toString,vn=e=>Oo.call(e),rl=e=>vn(e).slice(8,-1),So=e=>vn(e)==="[object Object]",Hs=e=>ge(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,An=js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Kn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ol=/-(\w)/g,Qe=Kn(e=>e.replace(ol,(t,n)=>n?n.toUpperCase():"")),il=/\B([A-Z])/g,At=Kn(e=>e.replace(il,"-$1").toLowerCase()),Wn=Kn(e=>e.charAt(0).toUpperCase()+e.slice(1)),is=Kn(e=>e?`on${Wn(e)}`:""),un=(e,t)=>!Object.is(e,t),In=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},vs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ll=e=>{const t=ge(e)?Number(e):NaN;return isNaN(t)?e:t};let Er;const ys=()=>Er||(Er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ks(e){if(j(e)){const t={};for(let n=0;n{if(n){const s=n.split(ul);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function xt(e){let t="";if(ge(e))t=e;else if(j(e))for(let n=0;nzn(n,t))}const ze=e=>ge(e)?e:e==null?"":j(e)||ue(e)&&(e.toString===Oo||!z(e.toString))?JSON.stringify(e,To,2):String(e),To=(e,t)=>t&&t.__v_isRef?To(e,t.value):Nt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:Hn(t)?{[`Set(${t.size})`]:[...t.values()]}:ue(t)&&!j(t)&&!So(t)?String(t):t;let ke;class ko{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ke,!t&&ke&&(this.index=(ke.scopes||(ke.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=ke;try{return ke=this,t()}finally{ke=n}}}on(){ke=this}off(){ke=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Do=e=>(e.w&dt)>0,$o=e=>(e.n&dt)>0,_l=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s{(a==="length"||a>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":j(e)?Hs(n)&&l.push(i.get("length")):(l.push(i.get(Pt)),Nt(e)&&l.push(i.get(bs)));break;case"delete":j(e)||(l.push(i.get(Pt)),Nt(e)&&l.push(i.get(bs)));break;case"set":Nt(e)&&l.push(i.get(Pt));break}if(l.length===1)l[0]&&ws(l[0]);else{const c=[];for(const u of l)u&&c.push(...u);ws(Ws(c))}}function ws(e,t){const n=j(e)?e:[...e];for(const s of n)s.computed&&wr(s);for(const s of n)s.computed||wr(s)}function wr(e,t){(e!==Ne||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function yl(e,t){var n;return(n=Mn.get(e))==null?void 0:n.get(t)}const El=js("__proto__,__v_isRef,__isVue"),Vo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(cn)),bl=qs(),wl=qs(!1,!0),Cl=qs(!0),Cr=xl();function xl(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Z(this);for(let o=0,i=this.length;o{e[t]=function(...n){Wt();const s=Z(this)[t].apply(this,n);return zt(),s}}),e}function Rl(e){const t=Z(this);return Ie(t,"has",e),t.hasOwnProperty(e)}function qs(e=!1,t=!1){return function(s,r,o){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&o===(e?t?Bl:Ko:t?Ho:Uo).get(s))return s;const i=j(s);if(!e){if(i&&G(Cr,r))return Reflect.get(Cr,r,o);if(r==="hasOwnProperty")return Rl}const l=Reflect.get(s,r,o);return(cn(r)?Vo.has(r):El(r))||(e||Ie(s,"get",r),t)?l:pe(l)?i&&Hs(r)?l:l.value:ue(l)?e?zo(l):qt(l):l}}const Pl=jo(),Ol=jo(!0);function jo(e=!1){return function(n,s,r,o){let i=n[s];if(jt(i)&&pe(i)&&!pe(r))return!1;if(!e&&(!Dn(r)&&!jt(r)&&(i=Z(i),r=Z(r)),!j(n)&&pe(i)&&!pe(r)))return i.value=r,!0;const l=j(n)&&Hs(s)?Number(s)e,qn=e=>Reflect.getPrototypeOf(e);function Cn(e,t,n=!1,s=!1){e=e.__v_raw;const r=Z(e),o=Z(t);n||(t!==o&&Ie(r,"get",t),Ie(r,"get",o));const{has:i}=qn(r),l=s?Js:n?Xs:an;if(i.call(r,t))return l(e.get(t));if(i.call(r,o))return l(e.get(o));e!==r&&e.get(t)}function xn(e,t=!1){const n=this.__v_raw,s=Z(n),r=Z(e);return t||(e!==r&&Ie(s,"has",e),Ie(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Rn(e,t=!1){return e=e.__v_raw,!t&&Ie(Z(e),"iterate",Pt),Reflect.get(e,"size",e)}function xr(e){e=Z(e);const t=Z(this);return qn(t).has.call(t,e)||(t.add(e),Ge(t,"add",e,e)),this}function Rr(e,t){t=Z(t);const n=Z(this),{has:s,get:r}=qn(n);let o=s.call(n,e);o||(e=Z(e),o=s.call(n,e));const i=r.call(n,e);return n.set(e,t),o?un(t,i)&&Ge(n,"set",e,t):Ge(n,"add",e,t),this}function Pr(e){const t=Z(this),{has:n,get:s}=qn(t);let r=n.call(t,e);r||(e=Z(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&Ge(t,"delete",e,void 0),o}function Or(){const e=Z(this),t=e.size!==0,n=e.clear();return t&&Ge(e,"clear",void 0,void 0),n}function Pn(e,t){return function(s,r){const o=this,i=o.__v_raw,l=Z(i),c=t?Js:e?Xs:an;return!e&&Ie(l,"iterate",Pt),i.forEach((u,a)=>s.call(r,c(u),c(a),o))}}function On(e,t,n){return function(...s){const r=this.__v_raw,o=Z(r),i=Nt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,u=r[e](...s),a=n?Js:t?Xs:an;return!t&&Ie(o,"iterate",c?bs:Pt),{next(){const{value:p,done:h}=u.next();return h?{value:p,done:h}:{value:l?[a(p[0]),a(p[1])]:a(p),done:h}},[Symbol.iterator](){return this}}}}function nt(e){return function(...t){return e==="delete"?!1:this}}function Ll(){const e={get(o){return Cn(this,o)},get size(){return Rn(this)},has:xn,add:xr,set:Rr,delete:Pr,clear:Or,forEach:Pn(!1,!1)},t={get(o){return Cn(this,o,!1,!0)},get size(){return Rn(this)},has:xn,add:xr,set:Rr,delete:Pr,clear:Or,forEach:Pn(!1,!0)},n={get(o){return Cn(this,o,!0)},get size(){return Rn(this,!0)},has(o){return xn.call(this,o,!0)},add:nt("add"),set:nt("set"),delete:nt("delete"),clear:nt("clear"),forEach:Pn(!0,!1)},s={get(o){return Cn(this,o,!0,!0)},get size(){return Rn(this,!0)},has(o){return xn.call(this,o,!0)},add:nt("add"),set:nt("set"),delete:nt("delete"),clear:nt("clear"),forEach:Pn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=On(o,!1,!1),n[o]=On(o,!0,!1),t[o]=On(o,!1,!0),s[o]=On(o,!0,!0)}),[e,n,t,s]}const[Ml,Dl,$l,Fl]=Ll();function Qs(e,t){const n=t?e?Fl:$l:e?Dl:Ml;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(G(n,r)&&r in s?n:s,r,o)}const Nl={get:Qs(!1,!1)},Vl={get:Qs(!1,!0)},jl={get:Qs(!0,!1)},Uo=new WeakMap,Ho=new WeakMap,Ko=new WeakMap,Bl=new WeakMap;function Ul(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Hl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ul(rl(e))}function qt(e){return jt(e)?e:Ys(e,!1,Bo,Nl,Uo)}function Wo(e){return Ys(e,!1,kl,Vl,Ho)}function zo(e){return Ys(e,!0,Tl,jl,Ko)}function Ys(e,t,n,s,r){if(!ue(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=Hl(e);if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function at(e){return jt(e)?at(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isReadonly)}function Dn(e){return!!(e&&e.__v_isShallow)}function qo(e){return at(e)||jt(e)}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function Jn(e){return Ln(e,"__v_skip",!0),e}const an=e=>ue(e)?qt(e):e,Xs=e=>ue(e)?zo(e):e;function Jo(e){ut&&Ne&&(e=Z(e),No(e.dep||(e.dep=Ws())))}function Qo(e,t){e=Z(e);const n=e.dep;n&&ws(n)}function pe(e){return!!(e&&e.__v_isRef===!0)}function Ee(e){return Yo(e,!1)}function Kl(e){return Yo(e,!0)}function Yo(e,t){return pe(e)?e:new Wl(e,t)}class Wl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Z(t),this._value=n?t:an(t)}get value(){return Jo(this),this._value}set value(t){const n=this.__v_isShallow||Dn(t)||jt(t);t=n?t:Z(t),un(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:an(t),Qo(this))}}function he(e){return pe(e)?e.value:e}const zl={get:(e,t,n)=>he(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pe(r)&&!pe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Xo(e){return at(e)?e:new Proxy(e,zl)}function ql(e){const t=j(e)?new Array(e.length):{};for(const n in e)t[n]=Ql(e,n);return t}class Jl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return yl(Z(this._object),this._key)}}function Ql(e,t,n){const s=e[t];return pe(s)?s:new Jl(e,t,n)}class Yl{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new zs(t,()=>{this._dirty||(this._dirty=!0,Qo(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=Z(this);return Jo(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Xl(e,t,n=!1){let s,r;const o=z(e);return o?(s=e,r=je):(s=e.get,r=e.set),new Yl(s,r,o||!r,n)}function ft(e,t,n,s){let r;try{r=s?e(...s):e()}catch(o){yn(o,t,n)}return r}function De(e,t,n,s){if(z(e)){const o=ft(e,t,n,s);return o&&Po(o)&&o.catch(i=>{yn(i,t,n)}),o}const r=[];for(let o=0;o>>1;dn(Re[s])qe&&Re.splice(t,1)}function tc(e){j(e)?Vt.push(...e):(!Ze||!Ze.includes(e,e.allowRecurse?Et+1:Et))&&Vt.push(e),Go()}function Sr(e,t=fn?qe+1:0){for(;tdn(n)-dn(s)),Et=0;Ete.id==null?1/0:e.id,nc=(e,t)=>{const n=dn(e)-dn(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ti(e){Cs=!1,fn=!0,Re.sort(nc);const t=je;try{for(qe=0;qege(m)?m.trim():m)),p&&(r=n.map(vs))}let l,c=s[l=is(t)]||s[l=is(Qe(t))];!c&&o&&(c=s[l=is(At(t))]),c&&De(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(u,e,6,r)}}function ni(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!z(e)){const c=u=>{const a=ni(u,t,!0);a&&(l=!0,ve(i,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(ue(e)&&s.set(e,null),null):(j(o)?o.forEach(c=>i[c]=null):ve(i,o),ue(e)&&s.set(e,i),i)}function Xn(e,t){return!e||!Un(t)?!1:(t=t.slice(2).replace(/Once$/,""),G(e,t[0].toLowerCase()+t.slice(1))||G(e,At(t))||G(e,t))}let be=null,Zn=null;function $n(e){const t=be;return be=e,Zn=e&&e.type.__scopeId||null,t}function Gs(e){Zn=e}function er(){Zn=null}function tr(e,t=be,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&jr(-1);const o=$n(t);let i;try{i=e(...r)}finally{$n(o),s._d&&jr(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function ls(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:o,propsOptions:[i],slots:l,attrs:c,emit:u,render:a,renderCache:p,data:h,setupState:m,ctx:E,inheritAttrs:x}=e;let A,k;const _=$n(e);try{if(n.shapeFlag&4){const T=r||s;A=We(a.call(T,T,p,o,m,h,E)),k=c}else{const T=t;A=We(T.length>1?T(o,{attrs:c,slots:l,emit:u}):T(o,null)),k=t.props?c:rc(c)}}catch(T){sn.length=0,yn(T,e,1),A=X($e)}let P=A;if(k&&x!==!1){const T=Object.keys(k),{shapeFlag:I}=P;T.length&&I&7&&(i&&T.some(Bs)&&(k=oc(k,i)),P=pt(P,k))}return n.dirs&&(P=pt(P),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&(P.transition=n.transition),A=P,$n(_),A}const rc=e=>{let t;for(const n in e)(n==="class"||n==="style"||Un(n))&&((t||(t={}))[n]=e[n]);return t},oc=(e,t)=>{const n={};for(const s in e)(!Bs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ic(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ar(s,i,u):!!i;if(c&8){const a=t.dynamicProps;for(let p=0;pe.__isSuspense;function uc(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):tc(e)}function Fn(e,t){return nr(e,null,t)}const Sn={};function en(e,t,n){return nr(e,t,n)}function nr(e,t,{immediate:n,deep:s,flush:r,onTrack:o,onTrigger:i}=fe){var l;const c=Mo()===((l=_e)==null?void 0:l.scope)?_e:null;let u,a=!1,p=!1;if(pe(e)?(u=()=>e.value,a=Dn(e)):at(e)?(u=()=>e,s=!0):j(e)?(p=!0,a=e.some(T=>at(T)||Dn(T)),u=()=>e.map(T=>{if(pe(T))return T.value;if(at(T))return Rt(T);if(z(T))return ft(T,c,2)})):z(e)?t?u=()=>ft(e,c,2):u=()=>{if(!(c&&c.isUnmounted))return h&&h(),De(e,c,3,[m])}:u=je,t&&s){const T=u;u=()=>Rt(T())}let h,m=T=>{h=_.onStop=()=>{ft(T,c,4)}},E;if(Ut)if(m=je,t?n&&De(t,c,3,[u(),p?[]:void 0,m]):u(),r==="sync"){const T=ru();E=T.__watcherHandles||(T.__watcherHandles=[])}else return je;let x=p?new Array(e.length).fill(Sn):Sn;const A=()=>{if(_.active)if(t){const T=_.run();(s||a||(p?T.some((I,q)=>un(I,x[q])):un(T,x)))&&(h&&h(),De(t,c,3,[T,x===Sn?void 0:p&&x[0]===Sn?[]:x,m]),x=T)}else _.run()};A.allowRecurse=!!t;let k;r==="sync"?k=A:r==="post"?k=()=>Ae(A,c&&c.suspense):(A.pre=!0,c&&(A.id=c.uid),k=()=>Yn(A));const _=new zs(u,k);t?n?A():x=_.run():r==="post"?Ae(_.run.bind(_),c&&c.suspense):_.run();const P=()=>{_.stop(),c&&c.scope&&Us(c.scope.effects,_)};return E&&E.push(P),P}function ac(e,t,n){const s=this.proxy,r=ge(e)?e.includes(".")?si(s,e):()=>s[e]:e.bind(s,s);let o;z(t)?o=t:(o=t.handler,n=t);const i=_e;Bt(this);const l=nr(r,o.bind(s),n);return i?Bt(i):St(),l}function si(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{Rt(n,t)});else if(So(e))for(const n in e)Rt(e[n],t);return e}function xs(e,t){const n=be;if(n===null)return e;const s=ns(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o{e.isMounted=!0}),ui(()=>{e.isUnmounting=!0}),e}const Me=[Function,Array],ri={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Me,onEnter:Me,onAfterEnter:Me,onEnterCancelled:Me,onBeforeLeave:Me,onLeave:Me,onAfterLeave:Me,onLeaveCancelled:Me,onBeforeAppear:Me,onAppear:Me,onAfterAppear:Me,onAppearCancelled:Me},dc={name:"BaseTransition",props:ri,setup(e,{slots:t}){const n=Yc(),s=fc();let r;return()=>{const o=t.default&&ii(t.default(),!0);if(!o||!o.length)return;let i=o[0];if(o.length>1){for(const x of o)if(x.type!==$e){i=x;break}}const l=Z(e),{mode:c}=l;if(s.isLeaving)return cs(i);const u=Ir(i);if(!u)return cs(i);const a=Rs(u,l,s,n);Ps(u,a);const p=n.subTree,h=p&&Ir(p);let m=!1;const{getTransitionKey:E}=u.type;if(E){const x=E();r===void 0?r=x:x!==r&&(r=x,m=!0)}if(h&&h.type!==$e&&(!bt(u,h)||m)){const x=Rs(h,l,s,n);if(Ps(h,x),c==="out-in")return s.isLeaving=!0,x.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&n.update()},cs(i);c==="in-out"&&u.type!==$e&&(x.delayLeave=(A,k,_)=>{const P=oi(s,h);P[String(h.key)]=h,A._leaveCb=()=>{k(),A._leaveCb=void 0,delete a.delayedLeave},a.delayedLeave=_})}return i}}},pc=dc;function oi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Rs(e,t,n,s){const{appear:r,mode:o,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:E,onBeforeAppear:x,onAppear:A,onAfterAppear:k,onAppearCancelled:_}=t,P=String(e.key),T=oi(n,e),I=(M,H)=>{M&&De(M,s,9,H)},q=(M,H)=>{const J=H[1];I(M,H),j(M)?M.every(le=>le.length<=1)&&J():M.length<=1&&J()},se={mode:o,persisted:i,beforeEnter(M){let H=l;if(!n.isMounted)if(r)H=x||l;else return;M._leaveCb&&M._leaveCb(!0);const J=T[P];J&&bt(e,J)&&J.el._leaveCb&&J.el._leaveCb(),I(H,[M])},enter(M){let H=c,J=u,le=a;if(!n.isMounted)if(r)H=A||c,J=k||u,le=_||a;else return;let $=!1;const ee=M._enterCb=we=>{$||($=!0,we?I(le,[M]):I(J,[M]),se.delayedLeave&&se.delayedLeave(),M._enterCb=void 0)};H?q(H,[M,ee]):ee()},leave(M,H){const J=String(e.key);if(M._enterCb&&M._enterCb(!0),n.isUnmounting)return H();I(p,[M]);let le=!1;const $=M._leaveCb=ee=>{le||(le=!0,H(),ee?I(E,[M]):I(m,[M]),M._leaveCb=void 0,T[J]===e&&delete T[J])};T[J]=e,h?q(h,[M,$]):$()},clone(M){return Rs(M,t,n,s)}};return se}function cs(e){if(En(e))return e=pt(e),e.children=null,e}function Ir(e){return En(e)?e.children?e.children[0]:void 0:e}function Ps(e,t){e.shapeFlag&6&&e.component?Ps(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 ii(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;ove({name:e.name},t,{setup:e}))():e}const tn=e=>!!e.type.__asyncLoader;function li(e){z(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:o,suspensible:i=!0,onError:l}=e;let c=null,u,a=0;const p=()=>(a++,c=null,h()),h=()=>{let m;return c||(m=c=t().catch(E=>{if(E=E instanceof Error?E:new Error(String(E)),l)return new Promise((x,A)=>{l(E,()=>x(p()),()=>A(E),a+1)});throw E}).then(E=>m!==c&&c?c:(E&&(E.__esModule||E[Symbol.toStringTag]==="Module")&&(E=E.default),u=E,E)))};return Le({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return u},setup(){const m=_e;if(u)return()=>us(u,m);const E=_=>{c=null,yn(_,m,13,!s)};if(i&&m.suspense||Ut)return h().then(_=>()=>us(_,m)).catch(_=>(E(_),()=>s?X(s,{error:_}):null));const x=Ee(!1),A=Ee(),k=Ee(!!r);return r&&setTimeout(()=>{k.value=!1},r),o!=null&&setTimeout(()=>{if(!x.value&&!A.value){const _=new Error(`Async component timed out after ${o}ms.`);E(_),A.value=_}},o),h().then(()=>{x.value=!0,m.parent&&En(m.parent.vnode)&&Yn(m.parent.update)}).catch(_=>{E(_),A.value=_}),()=>{if(x.value&&u)return us(u,m);if(A.value&&s)return X(s,{error:A.value});if(n&&!k.value)return X(n)}}})}function us(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,i=X(e,s,r);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const En=e=>e.type.__isKeepAlive;function hc(e,t){ci(e,"a",t)}function gc(e,t){ci(e,"da",t)}function ci(e,t,n=_e){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Gn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)En(r.parent.vnode)&&mc(s,t,n,r),r=r.parent}}function mc(e,t,n,s){const r=Gn(t,e,s,!0);sr(()=>{Us(s[t],r)},n)}function Gn(e,t,n=_e,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Wt(),Bt(n);const l=De(t,n,e,i);return St(),zt(),l});return s?r.unshift(o):r.push(o),o}}const et=e=>(t,n=_e)=>(!Ut||e==="sp")&&Gn(e,(...s)=>t(...s),n),_c=et("bm"),bn=et("m"),vc=et("bu"),yc=et("u"),ui=et("bum"),sr=et("um"),Ec=et("sp"),bc=et("rtg"),wc=et("rtc");function Cc(e,t=_e){Gn("ec",e,t)}const ai="components",fi=Symbol.for("v-ndc");function di(e){return ge(e)?xc(ai,e,!1)||e:e||fi}function xc(e,t,n=!0,s=!1){const r=be||_e;if(r){const o=r.type;if(e===ai){const l=tu(o,!1);if(l&&(l===t||l===Qe(t)||l===Wn(Qe(t))))return o}const i=Tr(r[e]||o[e],t)||Tr(r.appContext[e],t);return!i&&s?o:i}}function Tr(e,t){return e&&(e[t]||e[Qe(t)]||e[Wn(Qe(t))])}function pi(e,t,n,s){let r;const o=n&&n[s];if(j(e)||ge(e)){r=new Array(e.length);for(let i=0,l=e.length;it(i,l,void 0,o&&o[l]));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,c=i.length;lVn(t)?!(t.type===$e||t.type===ye&&!gi(t.children)):!0)?e:null}const Os=e=>e?Oi(e)?ns(e)||e.proxy:Os(e.parent):null,nn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Os(e.parent),$root:e=>Os(e.root),$emit:e=>e.emit,$options:e=>rr(e),$forceUpdate:e=>e.f||(e.f=()=>Yn(e.update)),$nextTick:e=>e.n||(e.n=Qn.bind(e.proxy)),$watch:e=>ac.bind(e)}),as=(e,t)=>e!==fe&&!e.__isScriptSetup&&G(e,t),Rc={get({_:e},t){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(as(s,t))return i[t]=1,s[t];if(r!==fe&&G(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&G(u,t))return i[t]=3,o[t];if(n!==fe&&G(n,t))return i[t]=4,n[t];Ss&&(i[t]=0)}}const a=nn[t];let p,h;if(a)return t==="$attrs"&&Ie(e,"get",t),a(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==fe&&G(n,t))return i[t]=4,n[t];if(h=c.config.globalProperties,G(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return as(r,t)?(r[t]=n,!0):s!==fe&&G(s,t)?(s[t]=n,!0):G(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==fe&&G(e,i)||as(t,i)||(l=o[0])&&G(l,i)||G(s,i)||G(nn,i)||G(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:G(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function kr(e){return j(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ss=!0;function Pc(e){const t=rr(e),n=e.proxy,s=e.ctx;Ss=!1,t.beforeCreate&&Lr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:u,created:a,beforeMount:p,mounted:h,beforeUpdate:m,updated:E,activated:x,deactivated:A,beforeDestroy:k,beforeUnmount:_,destroyed:P,unmounted:T,render:I,renderTracked:q,renderTriggered:se,errorCaptured:M,serverPrefetch:H,expose:J,inheritAttrs:le,components:$,directives:ee,filters:we}=t;if(u&&Oc(u,s,null),i)for(const ce in i){const te=i[ce];z(te)&&(s[ce]=te.bind(n))}if(r){const ce=r.call(n,n);ue(ce)&&(e.data=qt(ce))}if(Ss=!0,o)for(const ce in o){const te=o[ce],Ye=z(te)?te.bind(n,n):z(te.get)?te.get.bind(n,n):je,tt=!z(te)&&z(te.set)?te.set.bind(n):je,Ue=Ce({get:Ye,set:tt});Object.defineProperty(s,ce,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:Se=>Ue.value=Se})}if(l)for(const ce in l)mi(l[ce],s,n,ce);if(c){const ce=z(c)?c.call(n):c;Reflect.ownKeys(ce).forEach(te=>{Tn(te,ce[te])})}a&&Lr(a,e,"c");function Y(ce,te){j(te)?te.forEach(Ye=>ce(Ye.bind(n))):te&&ce(te.bind(n))}if(Y(_c,p),Y(bn,h),Y(vc,m),Y(yc,E),Y(hc,x),Y(gc,A),Y(Cc,M),Y(wc,q),Y(bc,se),Y(ui,_),Y(sr,T),Y(Ec,H),j(J))if(J.length){const ce=e.exposed||(e.exposed={});J.forEach(te=>{Object.defineProperty(ce,te,{get:()=>n[te],set:Ye=>n[te]=Ye})})}else e.exposed||(e.exposed={});I&&e.render===je&&(e.render=I),le!=null&&(e.inheritAttrs=le),$&&(e.components=$),ee&&(e.directives=ee)}function Oc(e,t,n=je){j(e)&&(e=As(e));for(const s in e){const r=e[s];let o;ue(r)?"default"in r?o=Je(r.from||s,r.default,!0):o=Je(r.from||s):o=Je(r),pe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Lr(e,t,n){De(j(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function mi(e,t,n,s){const r=s.includes(".")?si(n,s):()=>n[s];if(ge(e)){const o=t[e];z(o)&&en(r,o)}else if(z(e))en(r,e.bind(n));else if(ue(e))if(j(e))e.forEach(o=>mi(o,t,n,s));else{const o=z(e.handler)?e.handler.bind(n):t[e.handler];z(o)&&en(r,o,e)}}function rr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>Nn(c,u,i,!0)),Nn(c,t,i)),ue(t)&&o.set(t,c),c}function Nn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Nn(e,o,n,!0),r&&r.forEach(i=>Nn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Sc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Sc={data:Mr,props:Dr,emits:Dr,methods:Gt,computed:Gt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:Gt,directives:Gt,watch:Ic,provide:Mr,inject:Ac};function Mr(e,t){return t?e?function(){return ve(z(e)?e.call(this,this):e,z(t)?t.call(this,this):t)}:t:e}function Ac(e,t){return Gt(As(e),As(t))}function As(e){if(j(e)){const t={};for(let n=0;n1)return n&&z(t)?t.call(s&&s.proxy):t}}function Lc(){return!!(_e||be||pn)}function Mc(e,t,n,s=!1){const r={},o={};Ln(o,ts,1),e.propsDefaults=Object.create(null),vi(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Wo(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Dc(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Z(r),[c]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const a=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[h,m]=yi(p,t,!0);ve(i,h),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!o&&!c)return ue(e)&&s.set(e,Ft),Ft;if(j(o))for(let a=0;a-1,m[1]=x<0||E-1||G(m,"default"))&&l.push(p)}}}const u=[i,l];return ue(e)&&s.set(e,u),u}function $r(e){return e[0]!=="$"}function Fr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Nr(e,t){return Fr(e)===Fr(t)}function Vr(e,t){return j(t)?t.findIndex(n=>Nr(n,e)):z(t)&&Nr(t,e)?0:-1}const Ei=e=>e[0]==="_"||e==="$stable",or=e=>j(e)?e.map(We):[We(e)],$c=(e,t,n)=>{if(t._n)return t;const s=tr((...r)=>or(t(...r)),n);return s._c=!1,s},bi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Ei(r))continue;const o=e[r];if(z(o))t[r]=$c(r,o,s);else if(o!=null){const i=or(o);t[r]=()=>i}}},wi=(e,t)=>{const n=or(t);e.slots.default=()=>n},Fc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Z(t),Ln(t,"_",n)):bi(t,e.slots={})}else e.slots={},t&&wi(e,t);Ln(e.slots,ts,1)},Nc=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=fe;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(ve(r,t),!n&&l===1&&delete r._):(o=!t.$stable,bi(t,r)),i=t}else t&&(wi(e,t),i={default:1});if(o)for(const l in r)!Ei(l)&&!(l in i)&&delete r[l]};function Ts(e,t,n,s,r=!1){if(j(e)){e.forEach((h,m)=>Ts(h,t&&(j(t)?t[m]:t),n,s,r));return}if(tn(s)&&!r)return;const o=s.shapeFlag&4?ns(s.component)||s.component.proxy:s.el,i=r?null:o,{i:l,r:c}=e,u=t&&t.r,a=l.refs===fe?l.refs={}:l.refs,p=l.setupState;if(u!=null&&u!==c&&(ge(u)?(a[u]=null,G(p,u)&&(p[u]=null)):pe(u)&&(u.value=null)),z(c))ft(c,l,12,[i,a]);else{const h=ge(c),m=pe(c);if(h||m){const E=()=>{if(e.f){const x=h?G(p,c)?p[c]:a[c]:c.value;r?j(x)&&Us(x,o):j(x)?x.includes(o)||x.push(o):h?(a[c]=[o],G(p,c)&&(p[c]=a[c])):(c.value=[o],e.k&&(a[e.k]=c.value))}else h?(a[c]=i,G(p,c)&&(p[c]=i)):m&&(c.value=i,e.k&&(a[e.k]=i))};i?(E.id=-1,Ae(E,n)):E()}}}const Ae=uc;function Vc(e){return jc(e)}function jc(e,t){const n=ys();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:u,setElementText:a,parentNode:p,nextSibling:h,setScopeId:m=je,insertStaticContent:E}=e,x=(f,d,g,v=null,b=null,w=null,L=!1,R=null,O=!!d.dynamicChildren)=>{if(f===d)return;f&&!bt(f,d)&&(v=y(f),Se(f,b,w,!0),f=null),d.patchFlag===-2&&(O=!1,d.dynamicChildren=null);const{type:C,ref:B,shapeFlag:F}=d;switch(C){case es:A(f,d,g,v);break;case $e:k(f,d,g,v);break;case fs:f==null&&_(d,g,v,L);break;case ye:$(f,d,g,v,b,w,L,R,O);break;default:F&1?I(f,d,g,v,b,w,L,R,O):F&6?ee(f,d,g,v,b,w,L,R,O):(F&64||F&128)&&C.process(f,d,g,v,b,w,L,R,O,S)}B!=null&&b&&Ts(B,f&&f.ref,w,d||f,!d)},A=(f,d,g,v)=>{if(f==null)s(d.el=l(d.children),g,v);else{const b=d.el=f.el;d.children!==f.children&&u(b,d.children)}},k=(f,d,g,v)=>{f==null?s(d.el=c(d.children||""),g,v):d.el=f.el},_=(f,d,g,v)=>{[f.el,f.anchor]=E(f.children,d,g,v,f.el,f.anchor)},P=({el:f,anchor:d},g,v)=>{let b;for(;f&&f!==d;)b=h(f),s(f,g,v),f=b;s(d,g,v)},T=({el:f,anchor:d})=>{let g;for(;f&&f!==d;)g=h(f),r(f),f=g;r(d)},I=(f,d,g,v,b,w,L,R,O)=>{L=L||d.type==="svg",f==null?q(d,g,v,b,w,L,R,O):H(f,d,b,w,L,R,O)},q=(f,d,g,v,b,w,L,R)=>{let O,C;const{type:B,props:F,shapeFlag:U,transition:W,dirs:Q}=f;if(O=f.el=i(f.type,w,F&&F.is,F),U&8?a(O,f.children):U&16&&M(f.children,O,null,v,b,w&&B!=="foreignObject",L,R),Q&>(f,null,v,"created"),se(O,f,f.scopeId,L,v),F){for(const oe in F)oe!=="value"&&!An(oe)&&o(O,oe,null,F[oe],w,f.children,v,b,xe);"value"in F&&o(O,"value",null,F.value),(C=F.onVnodeBeforeMount)&&Ke(C,v,f)}Q&>(f,null,v,"beforeMount");const ae=(!b||b&&!b.pendingBranch)&&W&&!W.persisted;ae&&W.beforeEnter(O),s(O,d,g),((C=F&&F.onVnodeMounted)||ae||Q)&&Ae(()=>{C&&Ke(C,v,f),ae&&W.enter(O),Q&>(f,null,v,"mounted")},b)},se=(f,d,g,v,b)=>{if(g&&m(f,g),v)for(let w=0;w{for(let C=O;C{const R=d.el=f.el;let{patchFlag:O,dynamicChildren:C,dirs:B}=d;O|=f.patchFlag&16;const F=f.props||fe,U=d.props||fe;let W;g&&mt(g,!1),(W=U.onVnodeBeforeUpdate)&&Ke(W,g,d,f),B&>(d,f,g,"beforeUpdate"),g&&mt(g,!0);const Q=b&&d.type!=="foreignObject";if(C?J(f.dynamicChildren,C,R,g,v,Q,w):L||te(f,d,R,null,g,v,Q,w,!1),O>0){if(O&16)le(R,d,F,U,g,v,b);else if(O&2&&F.class!==U.class&&o(R,"class",null,U.class,b),O&4&&o(R,"style",F.style,U.style,b),O&8){const ae=d.dynamicProps;for(let oe=0;oe{W&&Ke(W,g,d,f),B&>(d,f,g,"updated")},v)},J=(f,d,g,v,b,w,L)=>{for(let R=0;R{if(g!==v){if(g!==fe)for(const R in g)!An(R)&&!(R in v)&&o(f,R,g[R],null,L,d.children,b,w,xe);for(const R in v){if(An(R))continue;const O=v[R],C=g[R];O!==C&&R!=="value"&&o(f,R,C,O,L,d.children,b,w,xe)}"value"in v&&o(f,"value",g.value,v.value)}},$=(f,d,g,v,b,w,L,R,O)=>{const C=d.el=f?f.el:l(""),B=d.anchor=f?f.anchor:l("");let{patchFlag:F,dynamicChildren:U,slotScopeIds:W}=d;W&&(R=R?R.concat(W):W),f==null?(s(C,g,v),s(B,g,v),M(d.children,g,B,b,w,L,R,O)):F>0&&F&64&&U&&f.dynamicChildren?(J(f.dynamicChildren,U,g,b,w,L,R),(d.key!=null||b&&d===b.subTree)&&Ci(f,d,!0)):te(f,d,g,B,b,w,L,R,O)},ee=(f,d,g,v,b,w,L,R,O)=>{d.slotScopeIds=R,f==null?d.shapeFlag&512?b.ctx.activate(d,g,v,L,O):we(d,g,v,b,w,L,O):Pe(f,d,O)},we=(f,d,g,v,b,w,L)=>{const R=f.component=Qc(f,v,b);if(En(f)&&(R.ctx.renderer=S),Xc(R),R.asyncDep){if(b&&b.registerDep(R,Y),!f.el){const O=R.subTree=X($e);k(null,O,d,g)}return}Y(R,f,d,g,b,w,L)},Pe=(f,d,g)=>{const v=d.component=f.component;if(ic(f,d,g))if(v.asyncDep&&!v.asyncResolved){ce(v,d,g);return}else v.next=d,ec(v.update),v.update();else d.el=f.el,v.vnode=d},Y=(f,d,g,v,b,w,L)=>{const R=()=>{if(f.isMounted){let{next:B,bu:F,u:U,parent:W,vnode:Q}=f,ae=B,oe;mt(f,!1),B?(B.el=Q.el,ce(f,B,L)):B=Q,F&&In(F),(oe=B.props&&B.props.onVnodeBeforeUpdate)&&Ke(oe,W,B,Q),mt(f,!0);const me=ls(f),Fe=f.subTree;f.subTree=me,x(Fe,me,p(Fe.el),y(Fe),f,b,w),B.el=me.el,ae===null&&lc(f,me.el),U&&Ae(U,b),(oe=B.props&&B.props.onVnodeUpdated)&&Ae(()=>Ke(oe,W,B,Q),b)}else{let B;const{el:F,props:U}=d,{bm:W,m:Q,parent:ae}=f,oe=tn(d);if(mt(f,!1),W&&In(W),!oe&&(B=U&&U.onVnodeBeforeMount)&&Ke(B,ae,d),mt(f,!0),F&&ne){const me=()=>{f.subTree=ls(f),ne(F,f.subTree,f,b,null)};oe?d.type.__asyncLoader().then(()=>!f.isUnmounted&&me()):me()}else{const me=f.subTree=ls(f);x(null,me,g,v,f,b,w),d.el=me.el}if(Q&&Ae(Q,b),!oe&&(B=U&&U.onVnodeMounted)){const me=d;Ae(()=>Ke(B,ae,me),b)}(d.shapeFlag&256||ae&&tn(ae.vnode)&&ae.vnode.shapeFlag&256)&&f.a&&Ae(f.a,b),f.isMounted=!0,d=g=v=null}},O=f.effect=new zs(R,()=>Yn(C),f.scope),C=f.update=()=>O.run();C.id=f.uid,mt(f,!0),C()},ce=(f,d,g)=>{d.component=f;const v=f.vnode.props;f.vnode=d,f.next=null,Dc(f,d.props,v,g),Nc(f,d.children,g),Wt(),Sr(),zt()},te=(f,d,g,v,b,w,L,R,O=!1)=>{const C=f&&f.children,B=f?f.shapeFlag:0,F=d.children,{patchFlag:U,shapeFlag:W}=d;if(U>0){if(U&128){tt(C,F,g,v,b,w,L,R,O);return}else if(U&256){Ye(C,F,g,v,b,w,L,R,O);return}}W&8?(B&16&&xe(C,b,w),F!==C&&a(g,F)):B&16?W&16?tt(C,F,g,v,b,w,L,R,O):xe(C,b,w,!0):(B&8&&a(g,""),W&16&&M(F,g,v,b,w,L,R,O))},Ye=(f,d,g,v,b,w,L,R,O)=>{f=f||Ft,d=d||Ft;const C=f.length,B=d.length,F=Math.min(C,B);let U;for(U=0;UB?xe(f,b,w,!0,!1,F):M(d,g,v,b,w,L,R,O,F)},tt=(f,d,g,v,b,w,L,R,O)=>{let C=0;const B=d.length;let F=f.length-1,U=B-1;for(;C<=F&&C<=U;){const W=f[C],Q=d[C]=O?lt(d[C]):We(d[C]);if(bt(W,Q))x(W,Q,g,null,b,w,L,R,O);else break;C++}for(;C<=F&&C<=U;){const W=f[F],Q=d[U]=O?lt(d[U]):We(d[U]);if(bt(W,Q))x(W,Q,g,null,b,w,L,R,O);else break;F--,U--}if(C>F){if(C<=U){const W=U+1,Q=WU)for(;C<=F;)Se(f[C],b,w,!0),C++;else{const W=C,Q=C,ae=new Map;for(C=Q;C<=U;C++){const Te=d[C]=O?lt(d[C]):We(d[C]);Te.key!=null&&ae.set(Te.key,C)}let oe,me=0;const Fe=U-Q+1;let Lt=!1,gr=0;const Qt=new Array(Fe);for(C=0;C=Fe){Se(Te,b,w,!0);continue}let He;if(Te.key!=null)He=ae.get(Te.key);else for(oe=Q;oe<=U;oe++)if(Qt[oe-Q]===0&&bt(Te,d[oe])){He=oe;break}He===void 0?Se(Te,b,w,!0):(Qt[He-Q]=C+1,He>=gr?gr=He:Lt=!0,x(Te,d[He],g,null,b,w,L,R,O),me++)}const mr=Lt?Bc(Qt):Ft;for(oe=mr.length-1,C=Fe-1;C>=0;C--){const Te=Q+C,He=d[Te],_r=Te+1{const{el:w,type:L,transition:R,children:O,shapeFlag:C}=f;if(C&6){Ue(f.component.subTree,d,g,v);return}if(C&128){f.suspense.move(d,g,v);return}if(C&64){L.move(f,d,g,S);return}if(L===ye){s(w,d,g);for(let F=0;FR.enter(w),b);else{const{leave:F,delayLeave:U,afterLeave:W}=R,Q=()=>s(w,d,g),ae=()=>{F(w,()=>{Q(),W&&W()})};U?U(w,Q,ae):ae()}else s(w,d,g)},Se=(f,d,g,v=!1,b=!1)=>{const{type:w,props:L,ref:R,children:O,dynamicChildren:C,shapeFlag:B,patchFlag:F,dirs:U}=f;if(R!=null&&Ts(R,null,g,f,!0),B&256){d.ctx.deactivate(f);return}const W=B&1&&U,Q=!tn(f);let ae;if(Q&&(ae=L&&L.onVnodeBeforeUnmount)&&Ke(ae,d,f),B&6)wn(f.component,g,v);else{if(B&128){f.suspense.unmount(g,v);return}W&>(f,null,d,"beforeUnmount"),B&64?f.type.remove(f,d,g,b,S,v):C&&(w!==ye||F>0&&F&64)?xe(C,d,g,!1,!0):(w===ye&&F&384||!b&&B&16)&&xe(O,d,g),v&&Tt(f)}(Q&&(ae=L&&L.onVnodeUnmounted)||W)&&Ae(()=>{ae&&Ke(ae,d,f),W&>(f,null,d,"unmounted")},g)},Tt=f=>{const{type:d,el:g,anchor:v,transition:b}=f;if(d===ye){kt(g,v);return}if(d===fs){T(f);return}const w=()=>{r(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(f.shapeFlag&1&&b&&!b.persisted){const{leave:L,delayLeave:R}=b,O=()=>L(g,w);R?R(f.el,w,O):O()}else w()},kt=(f,d)=>{let g;for(;f!==d;)g=h(f),r(f),f=g;r(d)},wn=(f,d,g)=>{const{bum:v,scope:b,update:w,subTree:L,um:R}=f;v&&In(v),b.stop(),w&&(w.active=!1,Se(L,f,d,g)),R&&Ae(R,d),Ae(()=>{f.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},xe=(f,d,g,v=!1,b=!1,w=0)=>{for(let L=w;Lf.shapeFlag&6?y(f.component.subTree):f.shapeFlag&128?f.suspense.next():h(f.anchor||f.el),D=(f,d,g)=>{f==null?d._vnode&&Se(d._vnode,null,null,!0):x(d._vnode||null,f,d,null,null,null,g),Sr(),ei(),d._vnode=f},S={p:x,um:Se,m:Ue,r:Tt,mt:we,mc:M,pc:te,pbc:J,n:y,o:e};let V,ne;return t&&([V,ne]=t(S)),{render:D,hydrate:V,createApp:kc(D,V)}}function mt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ci(e,t,n=!1){const s=e.children,r=t.children;if(j(s)&&j(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}const Uc=e=>e.__isTeleport,ye=Symbol.for("v-fgt"),es=Symbol.for("v-txt"),$e=Symbol.for("v-cmt"),fs=Symbol.for("v-stc"),sn=[];let Ve=null;function ie(e=!1){sn.push(Ve=e?null:[])}function Hc(){sn.pop(),Ve=sn[sn.length-1]||null}let hn=1;function jr(e){hn+=e}function xi(e){return e.dynamicChildren=hn>0?Ve||Ft:null,Hc(),hn>0&&Ve&&Ve.push(e),e}function de(e,t,n,s,r,o){return xi(K(e,t,n,s,r,o,!0))}function It(e,t,n,s,r){return xi(X(e,t,n,s,r,!0))}function Vn(e){return e?e.__v_isVNode===!0:!1}function bt(e,t){return e.type===t.type&&e.key===t.key}const ts="__vInternal",Ri=({key:e})=>e??null,kn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ge(e)||pe(e)||z(e)?{i:be,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,s=0,r=null,o=e===ye?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ri(t),ref:t&&kn(t),scopeId:Zn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:be};return l?(ir(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ge(n)?8:16),hn>0&&!i&&Ve&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ve.push(c),c}const X=Kc;function Kc(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===fi)&&(e=$e),Vn(e)){const l=pt(e,t,!0);return n&&ir(l,n),hn>0&&!o&&Ve&&(l.shapeFlag&6?Ve[Ve.indexOf(e)]=l:Ve.push(l)),l.patchFlag|=-2,l}if(nu(e)&&(e=e.__vccOpts),t){t=Wc(t);let{class:l,style:c}=t;l&&!ge(l)&&(t.class=xt(l)),ue(c)&&(qo(c)&&!j(c)&&(c=ve({},c)),t.style=Ks(c))}const i=ge(e)?1:cc(e)?128:Uc(e)?64:ue(e)?4:z(e)?2:0;return K(e,t,n,s,r,i,o,!0)}function Wc(e){return e?qo(e)||ts in e?ve({},e):e:null}function pt(e,t,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=e,l=t?zc(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ri(l),ref:t&&t.ref?n&&r?j(r)?r.concat(kn(t)):[r,kn(t)]:kn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ye?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&pt(e.ssContent),ssFallback:e.ssFallback&&pt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Pi(e=" ",t=0){return X(es,null,e,t)}function Ot(e="",t=!1){return t?(ie(),It($e,null,e)):X($e,null,e)}function We(e){return e==null||typeof e=="boolean"?X($e):j(e)?X(ye,null,e.slice()):typeof e=="object"?lt(e):X(es,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:pt(e)}function ir(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(j(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),ir(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(ts in t)?t._ctx=be:r===3&&be&&(be.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else z(t)?(t={default:t,_ctx:be},n=32):(t=String(t),s&64?(n=16,t=[Pi(t)]):n=8);e.children=t,e.shapeFlag|=n}function zc(...e){const t={};for(let n=0;n_e||be;let lr,Mt,Br="__VUE_INSTANCE_SETTERS__";(Mt=ys()[Br])||(Mt=ys()[Br]=[]),Mt.push(e=>_e=e),lr=e=>{Mt.length>1?Mt.forEach(t=>t(e)):Mt[0](e)};const Bt=e=>{lr(e),e.scope.on()},St=()=>{_e&&_e.scope.off(),lr(null)};function Oi(e){return e.vnode.shapeFlag&4}let Ut=!1;function Xc(e,t=!1){Ut=t;const{props:n,children:s}=e.vnode,r=Oi(e);Mc(e,n,r,t),Fc(e,s);const o=r?Zc(e,t):void 0;return Ut=!1,o}function Zc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Jn(new Proxy(e.ctx,Rc));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?eu(e):null;Bt(e),Wt();const o=ft(s,e,0,[e.props,r]);if(zt(),St(),Po(o)){if(o.then(St,St),t)return o.then(i=>{Ur(e,i,t)}).catch(i=>{yn(i,e,0)});e.asyncDep=o}else Ur(e,o,t)}else Si(e,t)}function Ur(e,t,n){z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ue(t)&&(e.setupState=Xo(t)),Si(e,n)}let Hr;function Si(e,t,n){const s=e.type;if(!e.render){if(!t&&Hr&&!s.render){const r=s.template||rr(e).template;if(r){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,u=ve(ve({isCustomElement:o,delimiters:l},i),c);s.render=Hr(r,u)}}e.render=s.render||je}Bt(e),Wt(),Pc(e),zt(),St()}function Gc(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return Ie(e,"get","$attrs"),t[n]}}))}function eu(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Gc(e)},slots:e.slots,emit:e.emit,expose:t}}function ns(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Xo(Jn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in nn)return nn[n](e)},has(t,n){return n in t||n in nn}}))}function tu(e,t=!0){return z(e)?e.displayName||e.name:e.name||t&&e.__name}function nu(e){return z(e)&&"__vccOpts"in e}const Ce=(e,t)=>Xl(e,t,Ut);function cr(e,t,n){const s=arguments.length;return s===2?ue(t)&&!j(t)?Vn(t)?X(e,null,[t]):X(e,t):X(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Vn(n)&&(n=[n]),X(e,t,n))}const su=Symbol.for("v-scx"),ru=()=>Je(su),ou="3.3.4",iu="http://www.w3.org/2000/svg",wt=typeof document<"u"?document:null,Kr=wt&&wt.createElement("template"),lu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?wt.createElementNS(iu,e):wt.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>wt.createTextNode(e),createComment:e=>wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Kr.innerHTML=s?`${e}`:e;const l=Kr.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function cu(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function uu(e,t,n){const s=e.style,r=ge(n);if(n&&!r){if(t&&!ge(t))for(const o in t)n[o]==null&&ks(s,o,"");for(const o in n)ks(s,o,n[o])}else{const o=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=o)}}const Wr=/\s*!important$/;function ks(e,t,n){if(j(n))n.forEach(s=>ks(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=au(e,t);Wr.test(n)?e.setProperty(At(s),n.replace(Wr,""),"important"):e[s]=n}}const zr=["Webkit","Moz","ms"],ds={};function au(e,t){const n=ds[t];if(n)return n;let s=Qe(t);if(s!=="filter"&&s in e)return ds[t]=s;s=Wn(s);for(let r=0;rps||(mu.then(()=>ps=0),ps=Date.now());function vu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;De(yu(s,n.value),t,5,[s])};return n.value=e,n.attached=_u(),n}function yu(e,t){if(j(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Qr=/^on[a-z]/,Eu=(e,t,n,s,r=!1,o,i,l,c)=>{t==="class"?cu(e,s,r):t==="style"?uu(e,n,s):Un(t)?Bs(t)||hu(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bu(e,t,s,r))?du(e,t,s,o,i,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),fu(e,t,s,r))};function bu(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&Qr.test(t)&&z(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Qr.test(t)&&ge(n)?!1:t in e}const st="transition",Yt="animation",ur=(e,{slots:t})=>cr(pc,wu(e),t);ur.displayName="Transition";const Ai={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};ur.props=ve({},ri,Ai);const _t=(e,t=[])=>{j(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yr=e=>e?j(e)?e.some(t=>t.length>1):e.length>1:!1;function wu(e){const t={};for(const $ in e)$ in Ai||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=i,appearToClass:a=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,E=Cu(r),x=E&&E[0],A=E&&E[1],{onBeforeEnter:k,onEnter:_,onEnterCancelled:P,onLeave:T,onLeaveCancelled:I,onBeforeAppear:q=k,onAppear:se=_,onAppearCancelled:M=P}=t,H=($,ee,we)=>{vt($,ee?a:l),vt($,ee?u:i),we&&we()},J=($,ee)=>{$._isLeaving=!1,vt($,p),vt($,m),vt($,h),ee&&ee()},le=$=>(ee,we)=>{const Pe=$?se:_,Y=()=>H(ee,$,we);_t(Pe,[ee,Y]),Xr(()=>{vt(ee,$?c:o),rt(ee,$?a:l),Yr(Pe)||Zr(ee,s,x,Y)})};return ve(t,{onBeforeEnter($){_t(k,[$]),rt($,o),rt($,i)},onBeforeAppear($){_t(q,[$]),rt($,c),rt($,u)},onEnter:le(!1),onAppear:le(!0),onLeave($,ee){$._isLeaving=!0;const we=()=>J($,ee);rt($,p),Pu(),rt($,h),Xr(()=>{$._isLeaving&&(vt($,p),rt($,m),Yr(T)||Zr($,s,A,we))}),_t(T,[$,we])},onEnterCancelled($){H($,!1),_t(P,[$])},onAppearCancelled($){H($,!0),_t(M,[$])},onLeaveCancelled($){J($),_t(I,[$])}})}function Cu(e){if(e==null)return null;if(ue(e))return[hs(e.enter),hs(e.leave)];{const t=hs(e);return[t,t]}}function hs(e){return ll(e)}function rt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function vt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Xr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xu=0;function Zr(e,t,n,s){const r=e._endId=++xu,o=()=>{r===e._endId&&s()};if(n)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=Ru(e,t);if(!i)return s();const u=i+"end";let a=0;const p=()=>{e.removeEventListener(u,h),o()},h=m=>{m.target===e&&++a>=c&&p()};setTimeout(()=>{a(n[E]||"").split(", "),r=s(`${st}Delay`),o=s(`${st}Duration`),i=Gr(r,o),l=s(`${Yt}Delay`),c=s(`${Yt}Duration`),u=Gr(l,c);let a=null,p=0,h=0;t===st?i>0&&(a=st,p=i,h=o.length):t===Yt?u>0&&(a=Yt,p=u,h=c.length):(p=Math.max(i,u),a=p>0?i>u?st:Yt:null,h=a?a===st?o.length:c.length:0);const m=a===st&&/\b(transform|all)(,|$)/.test(s(`${st}Property`).toString());return{type:a,timeout:p,propCount:h,hasTransform:m}}function Gr(e,t){for(;e.lengtheo(n)+eo(e[s])))}function eo(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Pu(){return document.body.offsetHeight}const jn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?n=>In(t,n):t};function Ou(e){e.target.composing=!0}function to(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const no={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e._assign=jn(r);const o=s||r.props&&r.props.type==="number";Ct(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=vs(l)),e._assign(l)}),n&&Ct(e,"change",()=>{e.value=e.value.trim()}),t||(Ct(e,"compositionstart",Ou),Ct(e,"compositionend",to),Ct(e,"change",to))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},o){if(e._assign=jn(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===t||(r||e.type==="number")&&vs(e.value)===t))return;const i=t??"";e.value!==i&&(e.value=i)}},Su={deep:!0,created(e,t,n){e._assign=jn(n),Ct(e,"change",()=>{const s=e._modelValue,r=Au(e),o=e.checked,i=e._assign;if(j(s)){const l=Io(s,r),c=l!==-1;if(o&&!c)i(s.concat(r));else if(!o&&c){const u=[...s];u.splice(l,1),i(u)}}else if(Hn(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(Ii(e,o))})},mounted:so,beforeUpdate(e,t,n){e._assign=jn(n),so(e,t,n)}};function so(e,{value:t,oldValue:n},s){e._modelValue=t,j(t)?e.checked=Io(t,s.props.value)>-1:Hn(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=zn(t,Ii(e,!0)))}function Au(e){return"_value"in e?e._value:e.value}function Ii(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Iu=["ctrl","shift","alt","meta"],Tu={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)=>Iu.some(n=>e[`${n}Key`]&&!t.includes(n))},yt=(e,t)=>(n,...s)=>{for(let r=0;rn=>{if(!("key"in n))return;const s=At(n.key);if(t.some(r=>r===s||ku[r]===s))return e(n)},Lu=ve({patchProp:Eu},lu);let ro;function Mu(){return ro||(ro=Vc(Lu))}const Du=(...e)=>{const t=Mu().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=$u(s);if(!r)return;const o=t._component;!z(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function $u(e){return ge(e)?document.querySelector(e):e}var Fu=!1;/*! * pinia v2.1.6 * (c) 2023 Eduardo San Martin Morote * @license MIT */let Ti;const ss=e=>Ti=e,ki=Symbol();function Ms(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(rn||(rn={}));function Nu(){const e=Lo(!0),t=e.run(()=>Ee({}));let n=[],s=[];const r=Jn({install(o){ss(r),r._a=o,o.provide(ki,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return!this._a&&!Fu?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Li=()=>{};function oo(e,t,n,s=Li){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Mo()&&ml(r),r}function Dt(e,...t){e.slice().forEach(n=>{n(...t)})}const Vu=e=>e();function Ds(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Ms(r)&&Ms(s)&&e.hasOwnProperty(n)&&!pe(s)&&!at(s)?e[n]=Ds(r,s):e[n]=s}return e}const ju=Symbol();function Bu(e){return!Ms(e)||!e.hasOwnProperty(ju)}const{assign:it}=Object;function Uu(e){return!!(pe(e)&&e.effect)}function Hu(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let c;function u(){l||(n.state.value[e]=r?r():{});const a=ql(n.state.value[e]);return it(a,o,Object.keys(i||{}).reduce((p,h)=>(p[h]=Jn(Ce(()=>{ss(n);const m=n._s.get(e);return i[h].call(m,m)})),p),{}))}return c=Mi(e,u,t,n,s,!0),c}function Mi(e,t,n={},s,r,o){let i;const l=it({actions:{}},n),c={deep:!0};let u,a,p=[],h=[],m;const E=s.state.value[e];!o&&!E&&(s.state.value[e]={}),Ee({});let x;function A(M){let H;u=a=!1,typeof M=="function"?(M(s.state.value[e]),H={type:rn.patchFunction,storeId:e,events:m}):(Ds(s.state.value[e],M),H={type:rn.patchObject,payload:M,storeId:e,events:m});const J=x=Symbol();Qn().then(()=>{x===J&&(u=!0)}),a=!0,Dt(p,H,s.state.value[e])}const k=o?function(){const{state:H}=n,J=H?H():{};this.$patch(le=>{it(le,J)})}:Li;function _(){i.stop(),p=[],h=[],s._s.delete(e)}function P(M,H){return function(){ss(s);const J=Array.from(arguments),le=[],$=[];function ee(Y){le.push(Y)}function we(Y){$.push(Y)}Dt(h,{args:J,name:M,store:I,after:ee,onError:we});let Pe;try{Pe=H.apply(this&&this.$id===e?this:I,J)}catch(Y){throw Dt($,Y),Y}return Pe instanceof Promise?Pe.then(Y=>(Dt(le,Y),Y)).catch(Y=>(Dt($,Y),Promise.reject(Y))):(Dt(le,Pe),Pe)}}const T={_p:s,$id:e,$onAction:oo.bind(null,h),$patch:A,$reset:k,$subscribe(M,H={}){const J=oo(p,M,H.detached,()=>le()),le=i.run(()=>en(()=>s.state.value[e],$=>{(H.flush==="sync"?a:u)&&M({storeId:e,type:rn.direct,events:m},$)},it({},c,H)));return J},$dispose:_},I=qt(T);s._s.set(e,I);const q=s._a&&s._a.runWithContext||Vu,se=s._e.run(()=>(i=Lo(),q(()=>i.run(t))));for(const M in se){const H=se[M];if(pe(H)&&!Uu(H)||at(H))o||(E&&Bu(H)&&(pe(H)?H.value=E[M]:Ds(H,E[M])),s.state.value[e][M]=H);else if(typeof H=="function"){const J=P(M,H);se[M]=J,l.actions[M]=H}}return it(I,se),it(Z(I),se),Object.defineProperty(I,"$state",{get:()=>s.state.value[e],set:M=>{A(H=>{it(H,M)})}}),s._p.forEach(M=>{it(I,i.run(()=>M({store:I,app:s._a,pinia:s,options:l})))}),E&&o&&n.hydrate&&n.hydrate(I.$state,E),u=!0,a=!0,I}function Ku(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function i(l,c){const u=Lc();return l=l||(u?Je(ki,null):null),l&&ss(l),l=Ti,l._s.has(s)||(o?Mi(s,t,r,l):Hu(s,r,l)),l._s.get(s)}return i.$id=s,i}const Wu="modulepreload",zu=function(e){return"/"+e},io={},N=function(t,n,s){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zu(o),o in io)return;io[o]=!0;const i=o.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(!!s)for(let a=r.length-1;a>=0;a--){const p=r[a];if(p.href===o&&(!i||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":Wu,i||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),i)return new Promise((a,p)=>{u.addEventListener("load",a),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},qu={class:"breadcrumb"},Ju={href:"#/"},Qu=["href"],Yu=Le({__name:"BreadCrumb",props:{path:{}},setup(e){const t=e,n=li(()=>N(()=>import("./home-7dc4bab9.js"),[]));return(s,r)=>(ie(),de("div",qu,[K("a",Ju,[(ie(),It(di(he(n))))]),(ie(!0),de(ye,null,pi(t.path,(o,i)=>(ie(),de("a",{key:i,href:`/#/${t.path.slice(0,i+1).join("/")}/`},ze(decodeURIComponent(o)),9,Qu))),128))]))}});const Xu=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))})},Zu={class:"action-button"},Gu=Le({__name:"SvgButton",props:{name:{}},setup(e){const t=e,n=li(()=>Xu(Object.assign({"../assets/svg/add-file.svg":()=>N(()=>import("./add-file-11465a08.js"),[]),"../assets/svg/add-folder.svg":()=>N(()=>import("./add-folder-9c5b4841.js"),[]),"../assets/svg/arrow.svg":()=>N(()=>import("./arrow-e499dca5.js"),[]),"../assets/svg/arrows-h.svg":()=>N(()=>import("./arrows-h-8faa57ad.js"),[]),"../assets/svg/arrows-v.svg":()=>N(()=>import("./arrows-v-e10a95cb.js"),[]),"../assets/svg/check.svg":()=>N(()=>import("./check-772a998d.js"),[]),"../assets/svg/code.svg":()=>N(()=>import("./code-2862018a.js"),[]),"../assets/svg/cog.svg":()=>N(()=>import("./cog-64ef50a2.js"),[]),"../assets/svg/copy.svg":()=>N(()=>import("./copy-2c077962.js"),[]),"../assets/svg/create-file.svg":()=>N(()=>import("./create-file-b81351f1.js"),[]),"../assets/svg/create-folder.svg":()=>N(()=>import("./create-folder-16f6c658.js"),[]),"../assets/svg/cross.svg":()=>N(()=>import("./cross-acfa5e74.js"),[]),"../assets/svg/disk.svg":()=>N(()=>import("./disk-569de811.js"),[]),"../assets/svg/download.svg":()=>N(()=>import("./download-5d96f406.js"),[]),"../assets/svg/exclamation.svg":()=>N(()=>import("./exclamation-8f020a0a.js"),[]),"../assets/svg/eye.svg":()=>N(()=>import("./eye-63dcf403.js"),[]),"../assets/svg/find.svg":()=>N(()=>import("./find-5c2ade58.js"),[]),"../assets/svg/fullscreen.svg":()=>N(()=>import("./fullscreen-46a2566a.js"),[]),"../assets/svg/github.svg":()=>N(()=>import("./github-81dce3f2.js"),[]),"../assets/svg/home.svg":()=>N(()=>import("./home-7dc4bab9.js"),[]),"../assets/svg/info.svg":()=>N(()=>import("./info-c202f876.js"),[]),"../assets/svg/link.svg":()=>N(()=>import("./link-c4978c6c.js"),[]),"../assets/svg/logo.svg":()=>N(()=>import("./logo-1da56ea0.js"),[]),"../assets/svg/loop.svg":()=>N(()=>import("./loop-5bc8349b.js"),[]),"../assets/svg/menu.svg":()=>N(()=>import("./menu-61fccc0e.js"),[]),"../assets/svg/next.svg":()=>N(()=>import("./next-477de089.js"),[]),"../assets/svg/open.svg":()=>N(()=>import("./open-bb96a7cd.js"),[]),"../assets/svg/paste.svg":()=>N(()=>import("./paste-3a29f252.js"),[]),"../assets/svg/pause.svg":()=>N(()=>import("./pause-ec2079ff.js"),[]),"../assets/svg/pencil.svg":()=>N(()=>import("./pencil-86564060.js"),[]),"../assets/svg/play.svg":()=>N(()=>import("./play-93031965.js"),[]),"../assets/svg/plus.svg":()=>N(()=>import("./plus-a85f2a41.js"),[]),"../assets/svg/previous.svg":()=>N(()=>import("./previous-bab629ce.js"),[]),"../assets/svg/reload.svg":()=>N(()=>import("./reload-cb83dbc6.js"),[]),"../assets/svg/rename.svg":()=>N(()=>import("./rename-dce2d0c0.js"),[]),"../assets/svg/scissors.svg":()=>N(()=>import("./scissors-2041a9a3.js"),[]),"../assets/svg/shuffle.svg":()=>N(()=>import("./shuffle-703964ca.js"),[]),"../assets/svg/signin.svg":()=>N(()=>import("./signin-6d243006.js"),[]),"../assets/svg/signout.svg":()=>N(()=>import("./signout-f9624576.js"),[]),"../assets/svg/skip.svg":()=>N(()=>import("./skip-45f0ec0f.js"),[]),"../assets/svg/spinner.svg":()=>N(()=>import("./spinner-b0b2075e.js"),[]),"../assets/svg/stop.svg":()=>N(()=>import("./stop-a1dfebee.js"),[]),"../assets/svg/trash.svg":()=>N(()=>import("./trash-2588306a.js"),[]),"../assets/svg/triangle.svg":()=>N(()=>import("./triangle-034f2bfd.js"),[]),"../assets/svg/unfullscreen.svg":()=>N(()=>import("./unfullscreen-c6a8154e.js"),[]),"../assets/svg/up-arrow.svg":()=>N(()=>import("./up-arrow-21259b3c.js"),[]),"../assets/svg/upload-cloud.svg":()=>N(()=>import("./upload-cloud-9a22e898.js"),[]),"../assets/svg/user-cog.svg":()=>N(()=>import("./user-cog-46ecb15f.js"),[]),"../assets/svg/user.svg":()=>N(()=>import("./user-0fc13e0d.js"),[]),"../assets/svg/volume-high.svg":()=>N(()=>import("./volume-high-a48b779b.js"),[]),"../assets/svg/volume-low.svg":()=>N(()=>import("./volume-low-d181aa34.js"),[]),"../assets/svg/volume-medium.svg":()=>N(()=>import("./volume-medium-c9d62b72.js"),[]),"../assets/svg/volume-mute.svg":()=>N(()=>import("./volume-mute-a1199b71.js"),[]),"../assets/svg/window-cross.svg":()=>N(()=>import("./window-cross-a75961a0.js"),[]),"../assets/svg/window.svg":()=>N(()=>import("./window-8c650b83.js"),[]),"../assets/svg/wordwrap.svg":()=>N(()=>import("./wordwrap-21b0d75b.js"),[]),"../assets/svg/zoomin.svg":()=>N(()=>import("./zoomin-8b52e558.js"),[]),"../assets/svg/zoomout.svg":()=>N(()=>import("./zoomout-7b0a12ad.js"),[])}),`../assets/svg/${t.name}.svg`));return(s,r)=>(ie(),de("button",Zu,[(ie(),It(di(he(n)))),hi(s.$slots,"default",{},void 0,!0)]))}});const Jt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Di=Jt(Gu,[["__scopeId","data-v-66d9b2b5"]]);function $i(e){if(e===0)return"empty";for(const t of[null,"kB","MB","GB","TB","PB","EB"]){if(e<1e4)return e.toLocaleString().replace(","," ")+(t?` ${t}`:"");e=Math.round(e/1e3)}return"huge"}function $s(e){const t=new Date(e*1e3),n=new Date,s=t.getTime()-n.getTime(),r=new Intl.RelativeTimeFormat("en",{numeric:"auto"});return Math.abs(s)<=5e3?"now":Math.abs(s)<=6e4?r.format(Math.round(s/1e3),"second"):Math.abs(s)<=36e5?r.format(Math.round(s/6e4),"minute"):Math.abs(s)<=864e5?r.format(Math.round(s/36e5),"hour"):Math.abs(s)<=6048e5?r.format(Math.round(s/864e5),"day"):t.toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"short",day:"numeric"})}var ar={};Object.defineProperty(ar,"__esModule",{value:!0});var Fi=ar.localeIncludes=void 0,ea=["position","locales"];function ta(e,t){if(e==null)return{};var n=na(e,t),s,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function na(e,t){if(e==null)return{};var n={},s=Object.keys(e),r,o;for(o=0;o=0)&&(n[r]=e[r]);return n}var sa=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=s.position,o=r===void 0?0:r,i=s.locales,l=ta(s,ea);if(t==null||n===void 0||n===null)throw new Error("localeIncludes requires at least 2 parameters");for(var c=t.length,u=n.length,a=c-u,p=o;p<=a;p++)if(t.substring(p,p+u).localeCompare(n,i,l)===0)return!0;return!1};Fi=ar.localeIncludes=sa;const ht=Ku({id:"documents",state:()=>({root:{},document:[],selected:new Set,uploadingDocuments:[],uploadCount:0,wsWatch:void 0,wsUpload:void 0,fileExplorer:null,error:"",user:{username:"",privileged:!1,isLoggedIn:!1,isOpenLoginModal:!1}}),actions:{updateTable(e){const t=[];for(const[n,s]of Object.entries(e)){const{id:r,size:o,mtime:i}=s,l={name:n,key:r,size:o,sizedisp:$i(o),mtime:i,modified:$s(i),type:"dir"in s?"folder":"file"};t.push(l)}t.sort((n,s)=>n.type===s.type?n.name.localeCompare(s.name,void 0,{numeric:!0,sensitivity:"base"}):n.type==="folder"?-1:1),this.document=t},setFilter(e){if(e==="")return this.updateTable({});function t(s,r){if("dir"in s)for(const[o,i]of Object.entries(s.dir)){const l=`${r}/${o}`;Fi(o,e,{usage:"search",numeric:!0,sensitivity:"base"})&&(n[l.slice(1)]=i),t(i,l)}}const n={};t(this.root,""),this.updateTable(n)},setActualDocument(e){e=decodeURIComponent(e);let t=this.root;const n=[];try{for(const s of e.split("/").slice(1))if(s){if(!("dir"in t))throw Error("Target folder not available");n.push(s),t=t.dir[s]}}catch(s){console.error("Cannot show requested folder",e,n.join("/"),s)}if(!("dir"in t)){this.document=[];return}this.updateTable(t.dir)},updateUploadingDocuments(e,t){for(const n of this.uploadingDocuments)n.key===e&&(n.progress=t)},pushUploadingDocuments(e){this.uploadCount++;const t={key:this.uploadCount,name:e,progress:0};return this.uploadingDocuments.push(t),t},deleteUploadingDocument(e){this.uploadingDocuments=this.uploadingDocuments.filter(t=>t.key!==e)},updateModified(){for(const e of this.document)"mtime"in e&&(e.modified=$s(e.mtime))},login(e,t){this.user.username=e,this.user.privileged=t,this.user.isLoggedIn=!0,this.user.isOpenLoginModal=!1}},getters:{mainDocument(){return this.document},isUserLogged(){return this.user.isLoggedIn}}}),ra=Le({__name:"UploadButton",setup(e){const t=Ee(),n=Ee(),s=ht(),r=a=>i(),o=Ee(!1),i=a=>{o.value||(o.value=!0)};async function l(a,p,h){const m=new FileReader,E=new Promise(A=>m.onload=A);m.readAsArrayBuffer(a.slice(p,h));const x=await E;if(x.target&&x.target instanceof FileReader)return x.target.result;throw new Error("Error loading file")}async function c(a,p,h){const m=s.wsUpload;if(m){const E=await l(a,p,h);m.send(JSON.stringify({name:a.name,size:a.size,start:p,end:h})),m.send(E)}}async function u(a){const p=a.target,h=1<<20;if(p&&p.files&&p.files.length>0){const m=p.files[0],E=Math.ceil(m.size/h),x=s.pushUploadingDocuments(m.name);r();for(let A=0;A{const h=Di;return ie(),de(ye,null,[K("template",null,[K("input",{ref_key:"fileUploadButton",ref:t,onChange:u,class:"upload-input",type:"file",multiple:""},null,544),K("input",{ref_key:"folderUploadButton",ref:n,onChange:u,class:"upload-input",type:"file",webkitdirectory:""},null,544)]),X(h,{name:"add-file",onClick:p[0]||(p[0]=m=>t.value.click())}),X(h,{name:"add-folder",onClick:p[1]||(p[1]=m=>n.value.click())})],64)}}}),Ni=e=>(Gs("data-v-d13721cd"),e=e(),er(),e),oa={class:"buttons"},ia=Ni(()=>K("div",{class:"smallgap"},null,-1)),la={class:"select-text"},ca=Ni(()=>K("div",{class:"spacer"},null,-1)),ua=["onKeyup"],aa=Le({__name:"HeaderMain",setup(e,{expose:t}){const n=ht(),s=Ee(!1),r=Ee(),o=()=>{s.value=!s.value,Qn(()=>{const l=r.value;l&&l.focus(),i()})},i=()=>{var l;n.setFilter(((l=r.value)==null?void 0:l.value)??"")};return t({toggleSearchInput:o}),(l,c)=>{const u=ra,a=Di;return ie(),de("nav",null,[K("div",oa,[X(u),X(a,{name:"create-folder",onClick:c[0]||(c[0]=()=>he(n).fileExplorer.newFolder())}),he(n).selected.size>0?(ie(),de(ye,{key:0},[ia,K("p",la,ze(he(n).selected.size)+" selected ➤",1),X(a,{name:"download"}),X(a,{name:"copy"}),X(a,{name:"paste"}),X(a,{name:"trash"}),K("button",{onClick:c[1]||(c[1]=p=>he(n).selected.clear())},"❌")],64)):Ot("",!0),ca,s.value?(ie(),de("input",{key:1,ref_key:"search",ref:r,type:"search",class:"margin-input",onKeyup:Ls(o,["esc"]),onInput:i},null,40,ua)):Ot("",!0),X(a,{name:"find",onClick:o}),X(a,{name:"cog",onClick:c[2]||(c[2]=p=>console.log("TODO open settings"))})])])}}});const fa=Jt(aa,[["__scopeId","data-v-d13721cd"]]),da={key:0},pa=K("button",{onclick:"dialog.close()"},"OK",-1),ha=Le({__name:"ModalDialog",props:{title:{default:""}},setup(e){const t=e,n=Ee(null);return bn(()=>{n.value.showModal()}),(s,r)=>(ie(),de("dialog",{ref_key:"dialog",ref:n},[t.title?(ie(),de("h1",da,ze(t.title),1)):Ot("",!0),K("div",null,[hi(s.$slots,"default",{},()=>[Pi(" Dialog with no content "),pa])])],512))}});class ga{async post(t,n){const s=await fetch(t,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:n!==void 0?JSON.stringify(n):void 0});let r;try{r=await s.json()}catch{throw new lo(s.status,`HTTP ${s.status} ${s.statusText}`)}if("error"in r)throw new lo(r.error.code,r.error.message);return r}}const Vi=new ga;class lo extends Error{constructor(n,s){super(s);vr(this,"code");this.code=n}}const ma="/login",_a="/logout ";async function va(e,t){return await Vi.post(ma,{username:e,password:t})}async function ya(){return await Vi.post(_a)}const fr=e=>(Gs("data-v-0167bcf4"),e=e(),er(),e),Ea=["onSubmit"],ba={class:"login-container"},wa=fr(()=>K("label",{for:"username"},"Username:",-1)),Ca=fr(()=>K("label",{for:"password"},"Password:",-1)),xa={key:0,class:"error-text"},Ra=fr(()=>K("input",{id:"submit",type:"submit",class:"button-login"},null,-1)),Pa=Le({__name:"LoginModal",setup(e){const t=Ee(!1),n=ht(),s=async()=>{try{await ya()}finally{location.reload()}},r=qt({username:"",password:"",error:""}),o=async()=>{try{r.error="",t.value=!0;const i=await va(r.username,r.password);console.log("Logged in",i),n.login(i.username,!!i.privileged)}catch(i){const l=i;l.name&&(r.error=l.message)}finally{t.value=!1}};return(i,l)=>{const c=ha;return ie(),de(ye,null,[he(n).isUserLogged?(ie(),de("button",{key:0,onClick:s,class:"action-button"}," Logout "+ze(he(n).user.username),1)):Ot("",!0),he(n).user.isOpenLoginModal?(ie(),It(c,{key:1,title:"Login"},{default:tr(()=>[K("form",{onSubmit:yt(o,["prevent"])},[K("div",ba,[wa,xs(K("input",{id:"username",name:"username",autocomplete:"username",required:"","onUpdate:modelValue":l[0]||(l[0]=u=>r.username=u)},null,512),[[no,r.username]]),Ca,xs(K("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":l[1]||(l[1]=u=>r.password=u)},null,512),[[no,r.password]])]),r.error.length>0?(ie(),de("h3",xa,ze(r.error),1)):Ot("",!0),Ra],40,Ea)]),_:1})):Ot("",!0)],64)}}});const Oa=Jt(Pa,[["__scopeId","data-v-0167bcf4"]]);/*! * vue-router v4.2.4 * (c) 2023 Eduardo San Martin Morote * @license MIT */const $t=typeof window<"u";function Sa(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const re=Object.assign;function gs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Be(r)?r.map(e):e(r)}return n}const on=()=>{},Be=Array.isArray,Aa=/\/$/,Ia=e=>e.replace(Aa,"");function ms(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=Ma(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function Ta(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function co(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ka(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Ht(t.matched[s],n.matched[r])&&ji(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ht(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ji(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!La(e[n],t[n]))return!1;return!0}function La(e,t){return Be(e)?uo(e,t):Be(t)?uo(t,e):e===t}function uo(e,t){return Be(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ma(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var gn;(function(e){e.pop="pop",e.push="push"})(gn||(gn={}));var ln;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ln||(ln={}));function Da(e){if(!e)if($t){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ia(e)}const $a=/^[^#]+#/;function Fa(e,t){return e.replace($a,"#")+t}function Na(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const rs=()=>({left:window.pageXOffset,top:window.pageYOffset});function Va(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Na(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ao(e,t){return(history.state?history.state.position-t:-1)+e}const Fs=new Map;function ja(e,t){Fs.set(e,t)}function Ba(e){const t=Fs.get(e);return Fs.delete(e),t}let Ua=()=>location.protocol+"//"+location.host;function Bi(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),co(c,"")}return co(n,e)+s+r}function Ha(e,t,n,s){let r=[],o=[],i=null;const l=({state:h})=>{const m=Bi(e,location),E=n.value,x=t.value;let A=0;if(h){if(n.value=m,t.value=h,i&&i===E){i=null;return}A=x?h.position-x.position:0}else s(m);r.forEach(k=>{k(n.value,E,{delta:A,type:gn.pop,direction:A?A>0?ln.forward:ln.back:ln.unknown})})};function c(){i=n.value}function u(h){r.push(h);const m=()=>{const E=r.indexOf(h);E>-1&&r.splice(E,1)};return o.push(m),m}function a(){const{history:h}=window;h.state&&h.replaceState(re({},h.state,{scroll:rs()}),"")}function p(){for(const h of o)h();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:c,listen:u,destroy:p}}function fo(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?rs():null}}function Ka(e){const{history:t,location:n}=window,s={value:Bi(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,u,a){const p=e.indexOf("#"),h=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+c:Ua()+e+c;try{t[a?"replaceState":"pushState"](u,"",h),r.value=u}catch(m){console.error(m),n[a?"replace":"assign"](h)}}function i(c,u){const a=re({},t.state,fo(r.value.back,c,r.value.forward,!0),u,{position:r.value.position});o(c,a,!0),s.value=c}function l(c,u){const a=re({},r.value,t.state,{forward:c,scroll:rs()});o(a.current,a,!0);const p=re({},fo(s.value,c,null),{position:a.position+1},u);o(c,p,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Wa(e){e=Da(e);const t=Ka(e),n=Ha(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=re({location:"",base:e,go:s,createHref:Fa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function za(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Wa(e)}function qa(e){return typeof e=="string"||e&&typeof e=="object"}function Ui(e){return typeof e=="string"||typeof e=="symbol"}const ot={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Hi=Symbol("");var po;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(po||(po={}));function Kt(e,t){return re(new Error,{type:e,[Hi]:!0},t)}function Xe(e,t){return e instanceof Error&&Hi in e&&(t==null||!!(e.type&t))}const ho="[^/]+?",Ja={sensitive:!1,strict:!1,start:!0,end:!0},Qa=/[.+*?^${}()[\]/\\]/g;function Ya(e,t){const n=re({},Ja,t),s=[];let r=n.start?"^":"";const o=[];for(const u of e){const a=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let p=0;pt.length?t.length===1&&t[0]===40+40?1:-1:0}function Za(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ga={type:0,value:""},ef=/[a-zA-Z0-9_]/;function tf(e){if(!e)return[[]];if(e==="/")return[[Ga]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${u}": ${m}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,u="",a="";function p(){u&&(n===0?o.push({type:0,value:u}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:u,regexp:a,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function h(){u+=c}for(;l{i(_)}:on}function i(a){if(Ui(a)){const p=s.get(a);p&&(s.delete(a),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(a);p>-1&&(n.splice(p,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function l(){return n}function c(a){let p=0;for(;p=0&&(a.record.path!==n[p].record.path||!Ki(a,n[p]));)p++;n.splice(p,0,a),a.record.name&&!_o(a)&&s.set(a.record.name,a)}function u(a,p){let h,m={},E,x;if("name"in a&&a.name){if(h=s.get(a.name),!h)throw Kt(1,{location:a});x=h.record.name,m=re(mo(p.params,h.keys.filter(_=>!_.optional).map(_=>_.name)),a.params&&mo(a.params,h.keys.map(_=>_.name))),E=h.stringify(m)}else if("path"in a)E=a.path,h=n.find(_=>_.re.test(E)),h&&(m=h.parse(E),x=h.record.name);else{if(h=p.name?s.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw Kt(1,{location:a,currentLocation:p});x=h.record.name,m=re({},p.params,a.params),E=h.stringify(m)}const A=[];let k=h;for(;k;)A.unshift(k.record),k=k.parent;return{name:x,path:E,params:m,matched:A,meta:lf(A)}}return e.forEach(a=>o(a)),{addRoute:o,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function mo(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function rf(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:of(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function of(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function _o(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function lf(e){return e.reduce((t,n)=>re(t,n.meta),{})}function vo(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Ki(e,t){return t.children.some(n=>n===e||Ki(e,n))}const Wi=/#/g,cf=/&/g,uf=/\//g,af=/=/g,ff=/\?/g,zi=/\+/g,df=/%5B/g,pf=/%5D/g,qi=/%5E/g,hf=/%60/g,Ji=/%7B/g,gf=/%7C/g,Qi=/%7D/g,mf=/%20/g;function dr(e){return encodeURI(""+e).replace(gf,"|").replace(df,"[").replace(pf,"]")}function _f(e){return dr(e).replace(Ji,"{").replace(Qi,"}").replace(qi,"^")}function Ns(e){return dr(e).replace(zi,"%2B").replace(mf,"+").replace(Wi,"%23").replace(cf,"%26").replace(hf,"`").replace(Ji,"{").replace(Qi,"}").replace(qi,"^")}function vf(e){return Ns(e).replace(af,"%3D")}function yf(e){return dr(e).replace(Wi,"%23").replace(ff,"%3F")}function Ef(e){return e==null?"":yf(e).replace(uf,"%2F")}function Bn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function bf(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&Ns(o)):[s&&Ns(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function wf(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Be(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Cf=Symbol(""),Eo=Symbol(""),pr=Symbol(""),Yi=Symbol(""),Vs=Symbol("");function Xt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ct(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,l)=>{const c=p=>{p===!1?l(Kt(4,{from:n,to:t})):p instanceof Error?l(p):qa(p)?l(Kt(2,{from:t,to:p})):(o&&s.enterCallbacks[r]===o&&typeof p=="function"&&o.push(p),i())},u=e.call(s&&s.instances[r],t,n,c);let a=Promise.resolve(u);e.length<3&&(a=a.then(c)),a.catch(p=>l(p))})}function _s(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let l=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(xf(l)){const u=(l.__vccOpts||l)[t];u&&r.push(ct(u,n,s,o,i))}else{let c=l();r.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const a=Sa(u)?u.default:u;o.components[i]=a;const h=(a.__vccOpts||a)[t];return h&&ct(h,n,s,o,i)()}))}}return r}function xf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function bo(e){const t=Je(pr),n=Je(Yi),s=Ce(()=>t.resolve(he(e.to))),r=Ce(()=>{const{matched:c}=s.value,{length:u}=c,a=c[u-1],p=n.matched;if(!a||!p.length)return-1;const h=p.findIndex(Ht.bind(null,a));if(h>-1)return h;const m=wo(c[u-2]);return u>1&&wo(a)===m&&p[p.length-1].path!==m?p.findIndex(Ht.bind(null,c[u-2])):h}),o=Ce(()=>r.value>-1&&Sf(n.params,s.value.params)),i=Ce(()=>r.value>-1&&r.value===n.matched.length-1&&ji(n.params,s.value.params));function l(c={}){return Of(c)?t[he(e.replace)?"replace":"push"](he(e.to)).catch(on):Promise.resolve()}return{route:s,href:Ce(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}const Rf=Le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:bo,setup(e,{slots:t}){const n=qt(bo(e)),{options:s}=Je(pr),r=Ce(()=>({[Co(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Co(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:cr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Pf=Rf;function Of(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Sf(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Be(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function wo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Co=(e,t,n)=>e??t??n,Af=Le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Je(Vs),r=Ce(()=>e.route||s.value),o=Je(Eo,0),i=Ce(()=>{let u=he(o);const{matched:a}=r.value;let p;for(;(p=a[u])&&!p.components;)u++;return u}),l=Ce(()=>r.value.matched[i.value]);Tn(Eo,Ce(()=>i.value+1)),Tn(Cf,l),Tn(Vs,r);const c=Ee();return en(()=>[c.value,l.value,e.name],([u,a,p],[h,m,E])=>{a&&(a.instances[p]=u,m&&m!==a&&u&&u===h&&(a.leaveGuards.size||(a.leaveGuards=m.leaveGuards),a.updateGuards.size||(a.updateGuards=m.updateGuards))),u&&a&&(!m||!Ht(a,m)||!h)&&(a.enterCallbacks[p]||[]).forEach(x=>x(u))},{flush:"post"}),()=>{const u=r.value,a=e.name,p=l.value,h=p&&p.components[a];if(!h)return xo(n.default,{Component:h,route:u});const m=p.props[a],E=m?m===!0?u.params:typeof m=="function"?m(u):m:null,A=cr(h,re({},E,t,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(p.instances[a]=null)},ref:c}));return xo(n.default,{Component:A,route:u})||A}}});function xo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Xi=Af;function If(e){const t=sf(e.routes,e),n=e.parseQuery||bf,s=e.stringifyQuery||yo,r=e.history,o=Xt(),i=Xt(),l=Xt(),c=Kl(ot);let u=ot;$t&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=gs.bind(null,y=>""+y),p=gs.bind(null,Ef),h=gs.bind(null,Bn);function m(y,D){let S,V;return Ui(y)?(S=t.getRecordMatcher(y),V=D):V=y,t.addRoute(V,S)}function E(y){const D=t.getRecordMatcher(y);D&&t.removeRoute(D)}function x(){return t.getRoutes().map(y=>y.record)}function A(y){return!!t.getRecordMatcher(y)}function k(y,D){if(D=re({},D||c.value),typeof y=="string"){const g=ms(n,y,D.path),v=t.resolve({path:g.path},D),b=r.createHref(g.fullPath);return re(g,v,{params:h(v.params),hash:Bn(g.hash),redirectedFrom:void 0,href:b})}let S;if("path"in y)S=re({},y,{path:ms(n,y.path,D.path).path});else{const g=re({},y.params);for(const v in g)g[v]==null&&delete g[v];S=re({},y,{params:p(g)}),D.params=p(D.params)}const V=t.resolve(S,D),ne=y.hash||"";V.params=a(h(V.params));const f=Ta(s,re({},y,{hash:_f(ne),path:V.path})),d=r.createHref(f);return re({fullPath:f,hash:ne,query:s===yo?wf(y.query):y.query||{}},V,{redirectedFrom:void 0,href:d})}function _(y){return typeof y=="string"?ms(n,y,c.value.path):re({},y)}function P(y,D){if(u!==y)return Kt(8,{from:D,to:y})}function T(y){return se(y)}function I(y){return T(re(_(y),{replace:!0}))}function q(y){const D=y.matched[y.matched.length-1];if(D&&D.redirect){const{redirect:S}=D;let V=typeof S=="function"?S(y):S;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=_(V):{path:V},V.params={}),re({query:y.query,hash:y.hash,params:"path"in V?{}:y.params},V)}}function se(y,D){const S=u=k(y),V=c.value,ne=y.state,f=y.force,d=y.replace===!0,g=q(S);if(g)return se(re(_(g),{state:typeof g=="object"?re({},ne,g.state):ne,force:f,replace:d}),D||S);const v=S;v.redirectedFrom=D;let b;return!f&&ka(s,V,S)&&(b=Kt(16,{to:v,from:V}),Ue(V,V,!0,!1)),(b?Promise.resolve(b):J(v,V)).catch(w=>Xe(w)?Xe(w,2)?w:tt(w):te(w,v,V)).then(w=>{if(w){if(Xe(w,2))return se(re({replace:d},_(w.to),{state:typeof w.to=="object"?re({},ne,w.to.state):ne,force:f}),D||v)}else w=$(v,V,!0,d,ne);return le(v,V,w),w})}function M(y,D){const S=P(y,D);return S?Promise.reject(S):Promise.resolve()}function H(y){const D=kt.values().next().value;return D&&typeof D.runWithContext=="function"?D.runWithContext(y):y()}function J(y,D){let S;const[V,ne,f]=Tf(y,D);S=_s(V.reverse(),"beforeRouteLeave",y,D);for(const g of V)g.leaveGuards.forEach(v=>{S.push(ct(v,y,D))});const d=M.bind(null,y,D);return S.push(d),xe(S).then(()=>{S=[];for(const g of o.list())S.push(ct(g,y,D));return S.push(d),xe(S)}).then(()=>{S=_s(ne,"beforeRouteUpdate",y,D);for(const g of ne)g.updateGuards.forEach(v=>{S.push(ct(v,y,D))});return S.push(d),xe(S)}).then(()=>{S=[];for(const g of f)if(g.beforeEnter)if(Be(g.beforeEnter))for(const v of g.beforeEnter)S.push(ct(v,y,D));else S.push(ct(g.beforeEnter,y,D));return S.push(d),xe(S)}).then(()=>(y.matched.forEach(g=>g.enterCallbacks={}),S=_s(f,"beforeRouteEnter",y,D),S.push(d),xe(S))).then(()=>{S=[];for(const g of i.list())S.push(ct(g,y,D));return S.push(d),xe(S)}).catch(g=>Xe(g,8)?g:Promise.reject(g))}function le(y,D,S){l.list().forEach(V=>H(()=>V(y,D,S)))}function $(y,D,S,V,ne){const f=P(y,D);if(f)return f;const d=D===ot,g=$t?history.state:{};S&&(V||d?r.replace(y.fullPath,re({scroll:d&&g&&g.scroll},ne)):r.push(y.fullPath,ne)),c.value=y,Ue(y,D,S,d),tt()}let ee;function we(){ee||(ee=r.listen((y,D,S)=>{if(!wn.listening)return;const V=k(y),ne=q(V);if(ne){se(re(ne,{replace:!0}),V).catch(on);return}u=V;const f=c.value;$t&&ja(ao(f.fullPath,S.delta),rs()),J(V,f).catch(d=>Xe(d,12)?d:Xe(d,2)?(se(d.to,V).then(g=>{Xe(g,20)&&!S.delta&&S.type===gn.pop&&r.go(-1,!1)}).catch(on),Promise.reject()):(S.delta&&r.go(-S.delta,!1),te(d,V,f))).then(d=>{d=d||$(V,f,!1),d&&(S.delta&&!Xe(d,8)?r.go(-S.delta,!1):S.type===gn.pop&&Xe(d,20)&&r.go(-1,!1)),le(V,f,d)}).catch(on)}))}let Pe=Xt(),Y=Xt(),ce;function te(y,D,S){tt(y);const V=Y.list();return V.length?V.forEach(ne=>ne(y,D,S)):console.error(y),Promise.reject(y)}function Ye(){return ce&&c.value!==ot?Promise.resolve():new Promise((y,D)=>{Pe.add([y,D])})}function tt(y){return ce||(ce=!y,we(),Pe.list().forEach(([D,S])=>y?S(y):D()),Pe.reset()),y}function Ue(y,D,S,V){const{scrollBehavior:ne}=e;if(!$t||!ne)return Promise.resolve();const f=!S&&Ba(ao(y.fullPath,0))||(V||!S)&&history.state&&history.state.scroll||null;return Qn().then(()=>ne(y,D,f)).then(d=>d&&Va(d)).catch(d=>te(d,y,D))}const Se=y=>r.go(y);let Tt;const kt=new Set,wn={currentRoute:c,listening:!0,addRoute:m,removeRoute:E,hasRoute:A,getRoutes:x,resolve:k,options:e,push:T,replace:I,go:Se,back:()=>Se(-1),forward:()=>Se(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:Y.add,isReady:Ye,install(y){const D=this;y.component("RouterLink",Pf),y.component("RouterView",Xi),y.config.globalProperties.$router=D,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>he(c)}),$t&&!Tt&&c.value===ot&&(Tt=!0,T(r.location).catch(ne=>{}));const S={};for(const ne in ot)Object.defineProperty(S,ne,{get:()=>c.value[ne],enumerable:!0});y.provide(pr,D),y.provide(Yi,Wo(S)),y.provide(Vs,c);const V=y.unmount;kt.add(y),y.unmount=function(){kt.delete(y),kt.size<1&&(u=ot,ee&&ee(),ee=null,c.value=ot,Tt=!1,ce=!1),V()}}};function xe(y){return y.reduce((D,S)=>D.then(()=>H(S)),Promise.resolve())}return wn}function Tf(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iHt(u,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(u=>Ht(u,c))||r.push(c))}return[n,s,r]}function mn(e,t){const n=new URL(e,location.origin.replace(/^http/,"ws")),s=new WebSocket(n);return s.onmessage=t,s}const Zi="/api/watch",kf="/api/upload";class Lf{constructor(t=ht()){this.store=t,this.handleWebSocketMessage=this.handleWebSocketMessage.bind(this)}handleWebSocketMessage(t){const n=JSON.parse(t.data);switch("error"in n&&(n.error.code===401?(this.store.user.isLoggedIn=!1,this.store.user.isOpenLoginModal=!0):this.store.error=n.error.message,setTimeout(()=>{this.store.wsWatch=mn(Zi,this.handleWebSocketMessage)},1e3)),!0){case!!n.root:this.handleRootMessage(n);break;case!!n.update:this.handleUpdateMessage(n);break;case!!n.error:this.handleError(n);break}}handleRootMessage({root:t}){this.store&&this.store.root&&(this.store.user.isLoggedIn=!0,this.store.root=t)}handleUpdateMessage(t){var s,r;let n=this.store.root;for(const o of t.update){if(o.deleted){delete n.dir[o.name];break}o.name!==void 0&&(n=(s=n.dir)[r=o.name]||(s[r]={})),o.id!==void 0&&(n.id=o.id),o.size!==void 0&&(n.size=o.size),o.mtime!==void 0&&(n.mtime=o.mtime),o.dir!==void 0&&(n.dir=o.dir)}}handleError(t){if(t.error.code===401){this.store.user.isOpenLoginModal=!0,this.store.user.isLoggedIn=!1;return}}}class Mf{constructor(t=ht()){this.store=t,this.handleWebSocketMessage=this.handleWebSocketMessage.bind(this)}handleWebSocketMessage(t){const n=JSON.parse(t.data);switch(!0){case!!n.written:this.handleWrittenMessage(n);break}}handleWrittenMessage(t){console.log("Written message",t.written)}}const Df=["value","onKeyup"],Ro=Le({__name:"FileRenameInput",props:{doc:{},rename:{type:Function},exit:{type:Function}},setup(e){const t=e,n=Ee(null);bn(()=>{const r=n.value.value.lastIndexOf(".");n.value.focus(),n.value.setSelectionRange(0,r>0?r:n.value.value.length)});const s=()=>{const r=n.value.value;t.exit(),!(t.doc.key!=="new"&&(r===t.doc.name||r.length===0))&&t.rename(t.doc,r)};return(r,o)=>(ie(),de("input",{ref_key:"input",ref:n,id:"FileRenameInput",type:"text",value:r.doc.name,onKeyup:[o[0]||(o[0]=Ls((...i)=>r.exit&&r.exit(...i),["esc"])),Ls(s,["enter"])]},null,40,Df))}});const hr=e=>(Gs("data-v-a775aa5c"),e=e(),er(),e),$f={class:"selection"},Ff=["indeterminate"],Nf=hr(()=>K("th",{class:"menu"},null,-1)),Vf={key:0,class:"folder"},jf=hr(()=>K("td",{class:"selection"},null,-1)),Bf={class:"name"},Uf={class:"modified right"},Hf={class:"size right"},Kf=hr(()=>K("td",{class:"menu"},null,-1)),Wf=["id","onClick","onContextmenu"],zf=["onClick"],qf=["checked","onChange"],Jf={class:"name"},Qf=["href","onFocus"],Yf=["onClick"],Xf={class:"modified right"},Zf={class:"size right"},Gf={class:"menu"},ed=["onClick"],td={key:1,class:"empty-container"},nd=Le({__name:"FileExplorer",props:{path:{},documents:{}},setup(e,{expose:t}){const n=e,s=ht(),r=Ce(()=>{const _=n.path;return _==="/"?"":_}),o=Ce(()=>`/files${r.value}`),i=_=>_.type==="folder"?`#${r.value}/${_.name}/`:`${o.value}/${_.name}`,l=Ee(null),c=Ee(null),u=(_,P)=>{const T=_.name,I=mn("/api/control",q=>{const se=JSON.parse(q.data);"error"in se?(console.error("Rename failed",se.error.message,se.error),_.name=T):console.log("Rename succeeded",se)});I.onopen=()=>{I.send(JSON.stringify({op:"rename",path:`${decodeURIComponent(r.value)}/${T}`,to:P}))},_.name=P};t({newFolder(){const _=Date.now()/1e3;c.value={key:"new",name:"New Folder",type:"folder",mtime:_,size:0,sizedisp:$i(0),modified:$s(_)}},toggleSelectAll(){console.log("Select"),A.value=!A.value},isCursor(){return l.value!==null&&c.value===null},cursorRename(){c.value=l.value},cursorSelect(){console.log("select",s.selected);const _=l.value;_&&(s.selected.has(_.key)?s.selected.delete(_.key):s.selected.add(_.key))},cursorMove(_){const P=E(n.documents);if(P.length===0){l.value=null;return}const T=(se,M)=>(se%M+M)%M,I=l.value!==null?P.indexOf(l.value):-1;l.value=P[T(I+_,P.length+1)]??null;const q=document.getElementById(`file-${l.value.key}`);q&&q.scrollIntoView({block:"center"})}}),Fn(()=>{if(l.value){const _=document.querySelector(`#file-${l.value.key} .name a`);_&&_.focus()}});const a=(_,P)=>{const T=mn("/api/control",I=>{const q=JSON.parse(I.data);"error"in q?(console.error("Mkdir failed",q.error.message,q.error),c.value=null):console.log("mkdir",q)});T.onopen=()=>{T.send(JSON.stringify({op:"mkdir",path:`${decodeURIComponent(r.value)}/${P}`}))},_.name=P},p=_=>{h.value=h.value===_?"":_},h=Ee(""),m={name:(_,P)=>_.name.localeCompare(P.name,void 0,{numeric:!0,sensitivity:"base"}),modified:(_,P)=>P.mtime-_.mtime,size:(_,P)=>P.size-_.size},E=_=>{const P=m[h.value],T=[..._];return P&&T.sort(P),T},x=Ce({get:()=>n.documents.length>0&&n.documents.some(_=>s.selected.has(_.key))&&!A.value,set:_=>{}}),A=Ce({get:()=>n.documents.length>0&&n.documents.every(_=>s.selected.has(_.key)),set:_=>{console.log("Setting allSelected",_);for(const P of n.documents)_?s.selected.add(P.key):s.selected.delete(P.key)}}),k=(_,P)=>{console.log("Context menu",_,P)};return(_,P)=>{var T;return n.documents.length||c.value?(ie(),de("table",{key:0,onBlur:P[6]||(P[6]=I=>l.value=null)},[K("thead",null,[K("tr",null,[K("th",$f,[xs(K("input",{type:"checkbox",tabindex:"-1","onUpdate:modelValue":P[0]||(P[0]=I=>A.value=I),indeterminate:x.value},null,8,Ff),[[Su,A.value]])]),K("th",{class:xt(["sortcolumn",{sortactive:h.value==="name"}]),onClick:P[1]||(P[1]=I=>p("name"))}," Name ",2),K("th",{class:xt(["sortcolumn modified right",{sortactive:h.value==="modified"}]),onClick:P[2]||(P[2]=I=>p("modified"))}," Modified ",2),K("th",{class:xt(["sortcolumn modified right",{sortactive:h.value==="size"}]),onClick:P[3]||(P[3]=I=>p("size"))}," Size ",2),Nf])]),K("tbody",null,[((T=c.value)==null?void 0:T.key)==="new"?(ie(),de("tr",Vf,[jf,K("td",Bf,[X(Ro,{doc:c.value,rename:a,exit:()=>{c.value=null}},null,8,["doc","exit"])]),K("td",Uf,ze(c.value.modified),1),K("td",Hf,ze(c.value.sizedisp),1),Kf])):Ot("",!0),(ie(!0),de(ye,null,pi(E(n.documents),I=>(ie(),de("tr",{key:I.key,id:`file-${I.key}`,class:xt({file:I.type==="file",folder:I.type==="folder",cursor:l.value===I}),onClick:q=>l.value=l.value===I?null:I,onContextmenu:yt(q=>k(q,I),["prevent"])},[K("td",{class:"selection",onClick:yt(q=>l.value=l.value===I?I:null,["stop"])},[K("input",{type:"checkbox",tabindex:"-1",checked:he(s).selected.has(I.key),onChange:q=>q.target.checked?he(s).selected.add(I.key):he(s).selected.delete(I.key)},null,40,qf)],8,zf),K("td",Jf,[c.value===I?(ie(),It(Ro,{key:0,doc:I,rename:u,exit:()=>{c.value=null}},null,8,["doc","exit"])):(ie(),de(ye,{key:1},[K("a",{href:i(I),tabindex:"-1",onContextmenu:P[4]||(P[4]=yt(()=>{},["stop"])),onClick:P[5]||(P[5]=yt(()=>{},["stop"])),onFocus:yt(q=>l.value=I,["stop"])},ze(I.name),41,Qf),K("button",{onClick:()=>c.value=I},"🖊️",8,Yf)],64))]),K("td",Xf,ze(I.modified),1),K("td",Zf,ze(I.sizedisp),1),K("td",Gf,[K("button",{tabindex:"-1",onClick:yt(q=>{l.value=I,k(q,I)},["stop"])},"⋮",8,ed)])],42,Wf))),128))])],32)):(ie(),de("div",td,"Nothing to see here"))}}});const sd=Jt(nd,[["__scopeId","data-v-a775aa5c"]]),rd=Le({__name:"ExplorerView",setup(e){const t=ht(),n=Ee();Fn(()=>{t.fileExplorer=n.value}),Fn(async()=>{const i=new String(_n.currentRoute.value.path);t.setActualDocument(i.toString())});function s(i){const l=i;l.style.transform="translateX(100%)"}function r(i,l){const c=i;setTimeout(()=>{c.style.transform="translateX(0)",l()},0)}function o(i,l){const c=i;c.style.transform="translateX(-100%)",setTimeout(l,200)}return(i,l)=>{const c=sd;return ie(),It(ur,{name:"slide-fade",mode:"out-in",onBeforeEnter:s,onEnter:r,onLeave:o},{default:tr(()=>[X(c,{ref_key:"fileExplorer",ref:n,path:he(_n).currentRoute.value.path,documents:he(t).mainDocument},null,8,["path","documents"])]),_:1})}}});const od=Jt(rd,[["__scopeId","data-v-fa6a91be"]]),_n=If({history:za("/"),routes:[{path:"/:pathMatch(.*)*",name:"explorer",component:od}]}),id=Le({__name:"App",setup(e){const t=ht(),n=Ce(()=>{const l=_n.currentRoute.value.path.split("/").filter(c=>c!=="");return{path:_n.currentRoute.value.path,pathList:l}});setInterval(t.updateModified,1e3),Fn(()=>{const l=new Lf,c=new Mf,u=mn(Zi,l.handleWebSocketMessage),a=mn(kf,c.handleWebSocketMessage);t.wsWatch=u,t.wsUpload=a});const s=Ee(null);let r=0,o=null;const i=l=>{if(l.repeat)return;console.log("key pressed",l);const c=t.fileExplorer.isCursor,u=l.type==="keyup";if(l.key==="ArrowUp")r=u?0:l.altKey?-10:-1;else if(l.key==="ArrowDown")r=u?0:l.altKey?10:1;else if(!u&&l.key==="f"&&(l.ctrlKey||l.metaKey))s.value.toggleSearchInput();else if(!u&&l.key==="a"&&(l.ctrlKey||l.metaKey))t.fileExplorer.toggleSelectAll();else if(c&&u&&!l.ctrlKey&&(l.key==="F2"||l.key==="r"))t.fileExplorer.cursorRename();else if(c&&l.code==="Space")u&&!l.altKey&&!l.ctrlKey&&t.fileExplorer.cursorSelect();else return;l.preventDefault(),o!==null&&clearInterval(o),o=null,r&&(o=setInterval(()=>{console.log("X"),t.fileExplorer.cursorMove(r)},30))};return bn(()=>{window.addEventListener("keydown",i),window.addEventListener("keyup",i)}),sr(()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",i)}),(l,c)=>{const u=Oa,a=fa,p=Yu;return ie(),de(ye,null,[X(u),K("header",null,[X(a,{ref_key:"headerMain",ref:s},null,512),X(p,{path:n.value.pathList},null,8,["path"])]),K("main",null,[X(he(Xi))])],64)}}});const ld=Jt(id,[["__scopeId","data-v-1ef1e934"]]),os=Du(ld);os.config.errorHandler=e=>{console.log(e)};os.use(Nu());os.use(_n);os.mount("#app");export{K as a,de as c,ie as o};