Files
vnt/vnt-web/static/assets/index-CU8fPWbk.js
T

175 lines
209 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function Ho(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ke={},bs=[],_t=()=>{},Tr=()=>!1,An=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),In=e=>e.startsWith("onUpdate:"),Pe=Object.assign,Wo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Sa=Object.prototype.hasOwnProperty,ve=(e,t)=>Sa.call(e,t),X=Array.isArray,xs=e=>tn(e)==="[object Map]",Rn=e=>tn(e)==="[object Set]",xl=e=>tn(e)==="[object Date]",le=e=>typeof e=="function",Ce=e=>typeof e=="string",Xe=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",$r=e=>(be(e)||le(e))&&le(e.then)&&le(e.catch),Ar=Object.prototype.toString,tn=e=>Ar.call(e),Ea=e=>tn(e).slice(8,-1),Ir=e=>tn(e)==="[object Object]",Pn=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,js=Ho(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),On=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Ta=/-\w/g,Ge=On(e=>e.replace(Ta,t=>t.slice(1).toUpperCase())),$a=/\B([A-Z])/g,as=On(e=>e.replace($a,"-$1").toLowerCase()),Mn=On(e=>e.charAt(0).toUpperCase()+e.slice(1)),to=On(e=>e?`on${Mn(e)}`:""),xt=(e,t)=>!Object.is(e,t),pn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Rr=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ko=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Aa=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let _l;const Ln=()=>_l||(_l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sn(e){if(X(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=Ce(n)?Oa(n):sn(n);if(o)for(const l in o)t[l]=o[l]}return t}else if(Ce(e)||be(e))return e}const Ia=/;(?![^(]*\))/g,Ra=/:([^]+)/,Pa=/\/\*[^]*?\*\//g;function Oa(e){const t={};return e.replace(Pa,"").split(Ia).forEach(s=>{if(s){const n=s.split(Ra);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(Ce(e))t=e;else if(X(e))for(let s=0;s<e.length;s++){const n=G(e[s]);n&&(t+=n+" ")}else if(be(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ma="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",La=Ho(Ma);function Pr(e){return!!e||e===""}function Na(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=nn(e[n],t[n]);return s}function nn(e,t){if(e===t)return!0;let s=xl(e),n=xl(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Xe(e),n=Xe(t),s||n)return e===t;if(s=X(e),n=X(t),s||n)return s&&n?Na(e,t):!1;if(s=be(e),n=be(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,l=Object.keys(t).length;if(o!==l)return!1;for(const r in e){const i=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(i&&!c||!i&&c||!nn(e[r],t[r]))return!1}}return String(e)===String(t)}function Or(e,t){return e.findIndex(s=>nn(s,t))}const Mr=e=>!!(e&&e.__v_isRef===!0),N=e=>Ce(e)?e:e==null?"":X(e)||be(e)&&(e.toString===Ar||!le(e.toString))?Mr(e)?N(e.value):JSON.stringify(e,Lr,2):String(e),Lr=(e,t)=>Mr(t)?Lr(e,t.value):xs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],l)=>(s[so(n,l)+" =>"]=o,s),{})}:Rn(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>so(s))}:Xe(t)?so(t):be(t)&&!X(t)&&!Ir(t)?String(t):t,so=(e,t="")=>{var s;return Xe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Me;class Nr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Me&&(Me.active?(this.parent=Me,this.index=(Me.scopes||(Me.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const o=this.scopes.slice();for(t=0,s=o.length;t<s;t++)o[t].resume()}const n=this.effects.slice();for(t=0,s=n.length;t<s;t++)n[t].resume()}}run(t){if(this._active){const s=Me;try{return Me=this,t()}finally{Me=s}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){if(this._on>0&&--this._on===0){if(Me===this)Me=this.prevScope;else{let t=Me;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(s=0,n=o.length;s<n;s++)o[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Vr(e){return new Nr(e)}function jr(){return Me}function Va(e,t=!1){Me&&Me.cleanups.push(e)}let we;const no=new WeakSet;class Dr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Me&&(Me.active?Me.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,no.has(this)&&(no.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Fr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yl(this),Ur(this);const t=we,s=lt;we=this,lt=!0;try{return this.fn()}finally{Hr(this),we=t,lt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)zo(t);this.deps=this.depsTail=void 0,yl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?no.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ko(this)&&this.run()}get dirty(){return ko(this)}}let Br=0,Ds,Bs;function Fr(e,t=!1){if(e.flags|=8,t){e.next=Bs,Bs=e;return}e.next=Ds,Ds=e}function Go(){Br++}function qo(){if(--Br>0)return;if(Bs){let t=Bs;for(Bs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ds;){let t=Ds;for(Ds=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Ur(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Hr(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),zo(n),ja(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function ko(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Wr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Wr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gs)||(e.globalVersion=Gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ko(e))))return;e.flags|=2;const t=e.dep,s=we,n=lt;we=e,lt=!0;try{Ur(e);const o=e.fn(e._value);(t.version===0||xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{we=s,lt=n,Hr(e),e.flags&=-3}}function zo(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)zo(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function ja(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let lt=!0;const Kr=[];function Rt(){Kr.push(lt),lt=!1}function Pt(){const e=Kr.pop();lt=e===void 0?!0:e}function yl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let Gs=0;class Da{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!we||!lt||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new Da(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,Gr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=we.depsTail,s.nextDep=void 0,we.depsTail.nextDep=s,we.depsTail=s,we.deps===s&&(we.deps=n)}return s}trigger(t){this.version++,Gs++,this.notify(t)}notify(t){Go();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{qo()}}}function Gr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Gr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const mn=new WeakMap,os=Symbol(""),wo=Symbol(""),qs=Symbol("");function je(e,t,s){if(lt&&we){let n=mn.get(e);n||mn.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Zo),o.map=n,o.key=s),o.track()}}function Tt(e,t,s,n,o,l){const r=mn.get(e);if(!r){Gs++;return}const i=c=>{c&&c.trigger()};if(Go(),t==="clear")r.forEach(i);else{const c=X(e),f=c&&Pn(s);if(c&&s==="length"){const u=Number(n);r.forEach((p,g)=>{(g==="length"||g===qs||!Xe(g)&&g>=u)&&i(p)})}else switch((s!==void 0||r.has(void 0))&&i(r.get(s)),f&&i(r.get(qs)),t){case"add":c?f&&i(r.get("length")):(i(r.get(os)),xs(e)&&i(r.get(wo)));break;case"delete":c||(i(r.get(os)),xs(e)&&i(r.get(wo)));break;case"set":xs(e)&&i(r.get(os));break}}qo()}function Ba(e,t){const s=mn.get(e);return s&&s.get(t)}function ds(e){const t=pe(e);return t===e?t:(je(t,"iterate",qs),Ye(e)?t:t.map(rt))}function Nn(e){return je(e=pe(e),"iterate",qs),e}function gt(e,t){return Mt(e)?ks(At(e)?rt(t):t):rt(t)}const Fa={__proto__:null,[Symbol.iterator](){return oo(this,Symbol.iterator,e=>gt(this,e))},concat(...e){return ds(this).concat(...e.map(t=>X(t)?ds(t):t))},entries(){return oo(this,"entries",e=>(e[1]=gt(this,e[1]),e))},every(e,t){return wt(this,"every",e,t,void 0,arguments)},filter(e,t){return wt(this,"filter",e,t,s=>s.map(n=>gt(this,n)),arguments)},find(e,t){return wt(this,"find",e,t,s=>gt(this,s),arguments)},findIndex(e,t){return wt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return wt(this,"findLast",e,t,s=>gt(this,s),arguments)},findLastIndex(e,t){return wt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return wt(this,"forEach",e,t,void 0,arguments)},includes(...e){return lo(this,"includes",e)},indexOf(...e){return lo(this,"indexOf",e)},join(e){return ds(this).join(e)},lastIndexOf(...e){return lo(this,"lastIndexOf",e)},map(e,t){return wt(this,"map",e,t,void 0,arguments)},pop(){return As(this,"pop")},push(...e){return As(this,"push",e)},reduce(e,...t){return kl(this,"reduce",e,t)},reduceRight(e,...t){return kl(this,"reduceRight",e,t)},shift(){return As(this,"shift")},some(e,t){return wt(this,"some",e,t,void 0,arguments)},splice(...e){return As(this,"splice",e)},toReversed(){return ds(this).toReversed()},toSorted(e){return ds(this).toSorted(e)},toSpliced(...e){return ds(this).toSpliced(...e)},unshift(...e){return As(this,"unshift",e)},values(){return oo(this,"values",e=>gt(this,e))}};function oo(e,t,s){const n=Nn(e),o=n[t]();return n!==e&&!Ye(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=s(l.value)),l}),o}const Ua=Array.prototype;function wt(e,t,s,n,o,l){const r=Nn(e),i=r!==e&&!Ye(e),c=r[t];if(c!==Ua[t]){const p=c.apply(e,l);return i?rt(p):p}let f=s;r!==e&&(i?f=function(p,g){return s.call(this,gt(e,p),g,e)}:s.length>2&&(f=function(p,g){return s.call(this,p,g,e)}));const u=c.call(r,f,n);return i&&o?o(u):u}function kl(e,t,s,n){const o=Nn(e),l=o!==e&&!Ye(e);let r=s,i=!1;o!==e&&(l?(i=n.length===0,r=function(f,u,p){return i&&(i=!1,f=gt(e,f)),s.call(this,f,gt(e,u),p,e)}):s.length>3&&(r=function(f,u,p){return s.call(this,f,u,p,e)}));const c=o[t](r,...n);return i?gt(e,c):c}function lo(e,t,s){const n=pe(e);je(n,"iterate",qs);const o=n[t](...s);return(o===-1||o===!1)&&Vn(s[0])?(s[0]=pe(s[0]),n[t](...s)):o}function As(e,t,s=[]){Rt(),Go();const n=pe(e)[t].apply(e,s);return qo(),Pt(),n}const Ha=Ho("__proto__,__v_isRef,__isVue"),qr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xe));function Wa(e){Xe(e)||(e=String(e));const t=pe(this);return je(t,"has",e),t.hasOwnProperty(e)}class zr{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return l;if(s==="__v_raw")return n===(o?l?ec:Qr:l?Yr:Jr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=X(t);if(!o){let c;if(r&&(c=Fa[s]))return c;if(s==="hasOwnProperty")return Wa}const i=Reflect.get(t,s,$e(t)?t:n);if((Xe(s)?qr.has(s):Ha(s))||(o||je(t,"get",s),l))return i;if($e(i)){const c=r&&Pn(s)?i:i.value;return o&&be(c)?So(c):c}return be(i)?o?So(i):Ot(i):i}}class Zr extends zr{constructor(t=!1){super(!1,t)}set(t,s,n,o){let l=t[s];const r=X(t)&&Pn(s);if(!this._isShallow){const f=Mt(l);if(!Ye(n)&&!Mt(n)&&(l=pe(l),n=pe(n)),!r&&$e(l)&&!$e(n))return f||(l.value=n),!0}const i=r?Number(s)<t.length:ve(t,s),c=Reflect.set(t,s,n,$e(t)?t:o);return t===pe(o)&&c&&(i?xt(n,l)&&Tt(t,"set",s,n):Tt(t,"add",s,n)),c}deleteProperty(t,s){const n=ve(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&Tt(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!Xe(s)||!qr.has(s))&&je(t,"has",s),n}ownKeys(t){return je(t,"iterate",X(t)?"length":os),Reflect.ownKeys(t)}}class Ka extends zr{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ga=new Zr,qa=new Ka,za=new Zr(!0);const Co=e=>e,an=e=>Reflect.getPrototypeOf(e);function Za(e,t,s){return function(...n){const o=this.__v_raw,l=pe(o),r=xs(l),i=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,f=o[e](...n),u=s?Co:t?ks:rt;return!t&&je(l,"iterate",c?wo:os),Pe(Object.create(f),{next(){const{value:p,done:g}=f.next();return g?{value:p,done:g}:{value:i?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function cn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ja(e,t){const s={get(o){const l=this.__v_raw,r=pe(l),i=pe(o);e||(xt(o,i)&&je(r,"get",o),je(r,"get",i));const{has:c}=an(r),f=t?Co:e?ks:rt;if(c.call(r,o))return f(l.get(o));if(c.call(r,i))return f(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&je(pe(o),"iterate",os),o.size},has(o){const l=this.__v_raw,r=pe(l),i=pe(o);return e||(xt(o,i)&&je(r,"has",o),je(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,c=pe(i),f=t?Co:e?ks:rt;return!e&&je(c,"iterate",os),i.forEach((u,p)=>o.call(l,f(u),f(p),r))}};return Pe(s,e?{add:cn("add"),set:cn("set"),delete:cn("delete"),clear:cn("clear")}:{add(o){const l=pe(this),r=an(l),i=pe(o),c=!t&&!Ye(o)&&!Mt(o)?i:o;return r.has.call(l,c)||xt(o,c)&&r.has.call(l,o)||xt(i,c)&&r.has.call(l,i)||(l.add(c),Tt(l,"add",c,c)),this},set(o,l){!t&&!Ye(l)&&!Mt(l)&&(l=pe(l));const r=pe(this),{has:i,get:c}=an(r);let f=i.call(r,o);f||(o=pe(o),f=i.call(r,o));const u=c.call(r,o);return r.set(o,l),f?xt(l,u)&&Tt(r,"set",o,l):Tt(r,"add",o,l),this},delete(o){const l=pe(this),{has:r,get:i}=an(l);let c=r.call(l,o);c||(o=pe(o),c=r.call(l,o)),i&&i.call(l,o);const f=l.delete(o);return c&&Tt(l,"delete",o,void 0),f},clear(){const o=pe(this),l=o.size!==0,r=o.clear();return l&&Tt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Za(o,e,t)}),s}function Jo(e,t){const s=Ja(e,t);return(n,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(ve(s,o)&&o in n?s:n,o,l)}const Ya={get:Jo(!1,!1)},Qa={get:Jo(!1,!0)},Xa={get:Jo(!0,!1)};const Jr=new WeakMap,Yr=new WeakMap,Qr=new WeakMap,ec=new WeakMap;function tc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ot(e){return Mt(e)?e:Yo(e,!1,Ga,Ya,Jr)}function Xr(e){return Yo(e,!1,za,Qa,Yr)}function So(e){return Yo(e,!0,qa,Xa,Qr)}function Yo(e,t,s,n,o){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=tc(Ea(e));if(r===0)return e;const i=new Proxy(e,r===2?n:s);return o.set(e,i),i}function At(e){return Mt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function Ye(e){return!!(e&&e.__v_isShallow)}function Vn(e){return e?!!e.__v_raw:!1}function pe(e){const t=e&&e.__v_raw;return t?pe(t):e}function Qo(e){return!ve(e,"__v_skip")&&Object.isExtensible(e)&&Rr(e,"__v_skip",!0),e}const rt=e=>be(e)?Ot(e):e,ks=e=>be(e)?So(e):e;function $e(e){return e?e.__v_isRef===!0:!1}function Z(e){return ei(e,!1)}function sc(e){return ei(e,!0)}function ei(e,t){return $e(e)?e:new nc(e,t)}class nc{constructor(t,s){this.dep=new Zo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:pe(t),this._value=s?t:rt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ye(t)||Mt(t);t=n?t:pe(t),xt(t,s)&&(this._rawValue=t,this._value=n?t:rt(t),this.dep.trigger())}}function R(e){return $e(e)?e.value:e}const oc={get:(e,t,s)=>t==="__v_raw"?e:R(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return $e(o)&&!$e(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function ti(e){return At(e)?e:new Proxy(e,oc)}function lc(e){const t=X(e)?new Array(e.length):{};for(const s in e)t[s]=ic(e,s);return t}class rc{constructor(t,s,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Xe(s)?s:String(s),this._raw=pe(t);let o=!0,l=t;if(!X(t)||Xe(this._key)||!Pn(this._key))do o=!Vn(l)||Ye(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=R(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&$e(this._raw[this._key])){const s=this._object[this._key];if($e(s)){s.value=t;return}}this._object[this._key]=t}get dep(){return Ba(this._raw,this._key)}}function ic(e,t,s){return new rc(e,t,s)}class ac{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Zo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return Fr(this,!0),!0}get value(){const t=this.dep.track();return Wr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function cc(e,t,s=!1){let n,o;return le(e)?n=e:(n=e.get,o=e.set),new ac(n,o,s)}const un={},gn=new WeakMap;let Qt;function uc(e,t=!1,s=Qt){if(s){let n=gn.get(s);n||gn.set(s,n=[]),n.push(e)}}function fc(e,t,s=ke){const{immediate:n,deep:o,once:l,scheduler:r,augmentJob:i,call:c}=s,f=b=>o?b:Ye(b)||o===!1||o===0?$t(b,1):$t(b);let u,p,g,h,C=!1,w=!1;if($e(e)?(p=()=>e.value,C=Ye(e)):At(e)?(p=()=>f(e),C=!0):X(e)?(w=!0,C=e.some(b=>At(b)||Ye(b)),p=()=>e.map(b=>{if($e(b))return b.value;if(At(b))return f(b);if(le(b))return c?c(b,2):b()})):le(e)?t?p=c?()=>c(e,2):e:p=()=>{if(g){Rt();try{g()}finally{Pt()}}const b=Qt;Qt=u;try{return c?c(e,3,[h]):e(h)}finally{Qt=b}}:p=_t,t&&o){const b=p,x=o===!0?1/0:o;p=()=>$t(b(),x)}const L=jr(),T=()=>{u.stop(),L&&L.active&&Wo(L.effects,u)};if(l&&t){const b=t;t=(...x)=>{const V=b(...x);return T(),V}}let y=w?new Array(e.length).fill(un):un;const d=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const x=u.run();if(b||o||C||(w?x.some((V,j)=>xt(V,y[j])):xt(x,y))){g&&g();const V=Qt;Qt=u;try{const j=[x,y===un?void 0:w&&y[0]===un?[]:y,h];y=x,c?c(t,3,j):t(...j)}finally{Qt=V}}}else u.run()};return i&&i(d),u=new Dr(p),u.scheduler=r?()=>r(d,!1):d,h=b=>uc(b,!1,u),g=u.onStop=()=>{const b=gn.get(u);if(b){if(c)c(b,4);else for(const x of b)x();gn.delete(u)}},t?n?d(!0):y=u.run():r?r(d.bind(null,!0),!0):u.run(),T.pause=u.pause.bind(u),T.resume=u.resume.bind(u),T.stop=T,T}function $t(e,t=1/0,s){if(t<=0||!be(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,$e(e))$t(e.value,t,s);else if(X(e))for(let n=0;n<e.length;n++)$t(e[n],t,s);else if(Rn(e)||xs(e))e.forEach(n=>{$t(n,t,s)});else if(Ir(e)){for(const n in e)$t(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&$t(e[n],t,s)}return e}function on(e,t,s,n){try{return n?e(...n):e()}catch(o){jn(o,t,s)}}function ot(e,t,s,n){if(le(e)){const o=on(e,t,s,n);return o&&$r(o)&&o.catch(l=>{jn(l,t,s)}),o}if(X(e)){const o=[];for(let l=0;l<e.length;l++)o.push(ot(e[l],t,s,n));return o}}function jn(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||ke;if(t){let i=t.parent;const c=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${s}`;for(;i;){const u=i.ec;if(u){for(let p=0;p<u.length;p++)if(u[p](e,c,f)===!1)return}i=i.parent}if(l){Rt(),on(l,null,10,[e,c,f]),Pt();return}}dc(e,s,o,n,r)}function dc(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Ke=[];let mt=-1;const _s=[];let Ut=null,gs=0;const si=Promise.resolve();let vn=null;function yt(e){const t=vn||si;return e?t.then(this?e.bind(this):e):t}function pc(e){let t=mt+1,s=Ke.length;for(;t<s;){const n=t+s>>>1,o=Ke[n],l=zs(o);l<e||l===e&&o.flags&2?t=n+1:s=n}return t}function Xo(e){if(!(e.flags&1)){const t=zs(e),s=Ke[Ke.length-1];!s||!(e.flags&2)&&t>=zs(s)?Ke.push(e):Ke.splice(pc(t),0,e),e.flags|=1,ni()}}function ni(){vn||(vn=si.then(li))}function hc(e){if(!X(e))Ut&&e.id===-1?Ut.splice(gs+1,0,e):e.flags&1||(_s.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)_s.push(e[t]);ni()}function wl(e,t,s=mt+1){for(;s<Ke.length;s++){const n=Ke[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ke.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function oi(e){if(_s.length){const t=[...new Set(_s)].sort((s,n)=>zs(s)-zs(n));if(_s.length=0,Ut){for(let s=0;s<t.length;s++)Ut.push(t[s]);return}for(Ut=t,gs=0;gs<Ut.length;gs++){const s=Ut[gs];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ut=null,gs=0}}const zs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function li(e){try{for(mt=0;mt<Ke.length;mt++){const t=Ke[mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),on(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mt<Ke.length;mt++){const t=Ke[mt];t&&(t.flags&=-2)}mt=-1,Ke.length=0,oi(),vn=null,(Ke.length||_s.length)&&li()}}let Ne=null,ri=null;function bn(e){const t=Ne;return Ne=e,ri=e&&e.type.__scopeId||null,t}function Ee(e,t=Ne,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&kn(-1);const l=bn(t),r=It.length;let i;try{i=e(...o)}finally{for(let c=It.length;c>r;c--)ll();bn(l),n._d&&kn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function xe(e,t){if(Ne===null)return e;const s=Gn(Ne),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[l,r,i,c=ke]=t[o];l&&(le(l)&&(l={mounted:l,updated:l}),l.deep&&$t(r),n.push({dir:l,instance:s,value:r,oldValue:void 0,arg:i,modifiers:c}))}return e}function Gt(e,t,s,n){const o=e.dirs,l=t&&t.dirs;for(let r=0;r<o.length;r++){const i=o[r];l&&(i.oldValue=l[r].value);let c=i.dir[n];c&&(Rt(),ot(c,s,8,[e.el,i,e,t]),Pt())}}function Fs(e,t){if(Be){let s=Be.provides;const n=Be.parent&&Be.parent.provides;n===s&&(s=Be.provides=Object.create(n)),s[e]=t}}function Qe(e,t,s=!1){const n=Ts();if(n||ls){let o=ls?ls._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&le(t)?t.call(n&&n.proxy):t}}function mc(){return!!(Ts()||ls)}const gc=Symbol.for("v-scx"),vc=()=>Qe(gc);function Ve(e,t,s){return ii(e,t,s)}function ii(e,t,s=ke){const{immediate:n,deep:o,flush:l,once:r}=s,i=Pe({},s),c=t&&n||!t&&l!=="post";let f;if(Xs){if(l==="sync"){const h=vc();f=h.__watcherHandles||(h.__watcherHandles=[])}else if(!c){const h=()=>{};return h.stop=_t,h.resume=_t,h.pause=_t,h}}const u=Be;i.call=(h,C,w)=>ot(h,u,C,w);let p=!1;l==="post"?i.scheduler=h=>{He(h,u&&u.suspense)}:l!=="sync"&&(p=!0,i.scheduler=(h,C)=>{C?h():Xo(h)}),i.augmentJob=h=>{t&&(h.flags|=4),p&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const g=fc(e,t,i);return Xs&&(f?f.push(g):c&&g()),g}function bc(e,t,s){const n=this.proxy,o=Ce(e)?e.includes(".")?ai(n,e):()=>n[e]:e.bind(n,n);let l;le(t)?l=t:(l=t.handler,s=t);const r=ln(this),i=ii(o,l.bind(n),s);return r(),i}function ai(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const Dt=new WeakMap,ci=Symbol("_vte"),Dn=e=>e.__isTeleport,Xt=e=>e&&(e.disabled||e.disabled===""),xc=e=>e&&(e.defer||e.defer===""),Cl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Sl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Eo=(e,t)=>{const s=e&&e.to;return Ce(s)?t?t(s):null:s},_c={name:"Teleport",__isTeleport:!0,process(e,t,s,n,o,l,r,i,c,f){const{mc:u,pc:p,pbc:g,o:{insert:h,querySelector:C,createText:w,createComment:L,parentNode:T}}=f,y=Xt(t.props);let{dynamicChildren:d}=t;const b=(j,H,M)=>{j.shapeFlag&16&&u(j.children,H,M,o,l,r,i,c)},x=(j=t)=>{const H=Xt(j.props),M=j.target=Eo(j.props,C),z=To(M,j,w,h);M&&(r!=="svg"&&Cl(M)?r="svg":r!=="mathml"&&Sl(M)&&(r="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(M),H||(b(j,M,z),Ms(j,!1)))},V=j=>{const H=()=>{if(Dt.get(j)===H){if(Dt.delete(j),Xt(j.props)){const M=T(j.el)||s;b(j,M,j.anchor),Ms(j,!0)}x(j)}};Dt.set(j,H),He(H,l)};if(e==null){const j=t.el=w(""),H=t.anchor=w("");if(h(j,s,n),h(H,s,n),xc(t.props)||l&&l.pendingBranch){V(t);return}y&&(b(t,s,H),Ms(t,!0)),x()}else{t.el=e.el;const j=t.anchor=e.anchor,H=Dt.get(e);if(H){H.flags|=8,Dt.delete(e),V(t);return}t.targetStart=e.targetStart;const M=t.target=e.target,z=t.targetAnchor=e.targetAnchor,oe=Xt(e.props),F=oe?s:M,J=oe?j:z;if(r==="svg"||Cl(M)?r="svg":(r==="mathml"||Sl(M))&&(r="mathml"),d?(g(e.dynamicChildren,d,F,o,l,r,i),ol(e,t,!0)):c||p(e,t,F,J,o,l,r,i,!1),y)oe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):fn(t,s,j,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=Eo(t.props,C);P&&(t.target=P,fn(t,P,null,f,0))}else oe&&fn(t,M,z,f,1);Ms(t,y)}},remove(e,t,s,{um:n,o:{remove:o}},l){const{shapeFlag:r,children:i,anchor:c,targetStart:f,targetAnchor:u,target:p,props:g}=e,h=Xt(g),C=l||!h,w=Dt.get(e);if(w&&(w.flags|=8,Dt.delete(e)),p&&(o(f),o(u)),l&&o(c),!w&&(h||p)&&r&16)for(let L=0;L<i.length;L++){const T=i[L];n(T,t,s,C,!!T.dynamicChildren)}},move:fn,hydrate:yc};function fn(e,t,s,{o:{insert:n},m:o},l=2){l===0&&n(e.targetAnchor,t,s);const{el:r,anchor:i,shapeFlag:c,children:f,props:u}=e,p=l===2;if(p&&n(r,t,s),!Dt.has(e)&&(!p||Xt(u))&&c&16)for(let g=0;g<f.length;g++)o(f[g],t,s,2);p&&n(i,t,s)}function yc(e,t,s,n,o,l,{o:{nextSibling:r,parentNode:i,querySelector:c,insert:f,createText:u}},p){function g(L,T){let y=T;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,L._lpa=t.targetAnchor&&r(t.targetAnchor);break}}y=r(y)}}function h(L,T){T.anchor=p(r(L),T,i(L),s,n,o,l)}const C=t.target=Eo(t.props,c),w=Xt(t.props);if(C){const L=C._lpa||C.firstChild;t.shapeFlag&16&&(w?(h(e,t),g(C,L),t.targetAnchor||To(C,t,u,f,i(e)===C?e:null)):(t.anchor=r(e),g(C,L),t.targetAnchor||To(C,t,u,f),p(L&&r(L),t,C,s,n,o,l))),Ms(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const el=_c;function Ms(e,t){const s=e.ctx;if(s&&s.ut){let n,o;for(t?(n=e.el,o=e.anchor):(n=e.targetStart,o=e.targetAnchor);n&&n!==o;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function To(e,t,s,n,o=null){const l=t.targetStart=s(""),r=t.targetAnchor=s("");return l[ci]=r,e&&(n(l,e,o),n(r,e,o)),r}const nt=Symbol("_leaveCb"),Is=Symbol("_enterCb");function ui(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return at(()=>{e.isMounted=!0}),Un(()=>{e.isUnmounting=!0}),e}const st=[Function,Array],fi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:st,onEnter:st,onAfterEnter:st,onEnterCancelled:st,onBeforeLeave:st,onLeave:st,onAfterLeave:st,onLeaveCancelled:st,onBeforeAppear:st,onAppear:st,onAfterAppear:st,onAppearCancelled:st},di=e=>{const t=e.subTree;return t.component?di(t.component):t},kc={name:"BaseTransition",props:fi,setup(e,{slots:t}){const s=Ts(),n=ui();return()=>{const o=t.default&&tl(t.default(),!0),l=o&&o.length?pi(o):s.subTree?re():void 0;if(!l)return;const r=pe(e),{mode:i}=r;if(n.isLeaving)return ro(l);const c=xn(l);if(!c)return ro(l);let f=Zs(c,r,n,s,p=>f=p);c.type!==De&&is(c,f);let u=s.subTree&&xn(s.subTree);if(u&&u.type!==De&&!es(u,c)&&di(s).type!==De){let p=Zs(u,r,n,s);if(is(u,p),i==="out-in"&&c.type!==De)return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete p.afterLeave,u=void 0},ro(l);i==="in-out"&&c.type!==De?p.delayLeave=(g,h,C)=>{const w=hi(n,u);w[String(u.key)]=u,g[nt]=()=>{h(),g[nt]=void 0,delete f.delayedLeave,u=void 0},f.delayedLeave=()=>{C(),delete f.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return l}}};function pi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==De){t=s;break}}return t}const wc=kc;function hi(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Zs(e,t,s,n,o){const{appear:l,mode:r,persisted:i=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:g,onLeave:h,onAfterLeave:C,onLeaveCancelled:w,onBeforeAppear:L,onAppear:T,onAfterAppear:y,onAppearCancelled:d}=t,b=String(e.key),x=hi(s,e),V=(M,z)=>{M&&ot(M,n,9,z)},j=(M,z)=>{const oe=z[1];V(M,z),X(M)?M.every(F=>F.length<=1)&&oe():M.length<=1&&oe()},H={mode:r,persisted:i,beforeEnter(M){let z=c;if(!s.isMounted)if(l)z=L||c;else return;M[nt]&&M[nt](!0);const oe=x[b];oe&&es(e,oe)&&oe.el[nt]&&oe.el[nt](),V(z,[M])},enter(M){if(x[b]===e)return;let z=f,oe=u,F=p;if(!s.isMounted)if(l)z=T||f,oe=y||u,F=d||p;else return;let J=!1;M[Is]=te=>{J||(J=!0,te?V(F,[M]):V(oe,[M]),H.delayedLeave&&H.delayedLeave(),M[Is]=void 0)};const P=M[Is].bind(null,!1);z?j(z,[M,P]):P()},leave(M,z){const oe=String(e.key);if(M[Is]&&M[Is](!0),s.isUnmounting)return z();V(g,[M]);let F=!1;M[nt]=P=>{F||(F=!0,z(),P?V(w,[M]):V(C,[M]),M[nt]=void 0,x[oe]===e&&delete x[oe])};const J=M[nt].bind(null,!1);x[oe]=e,h?j(h,[M,J]):J()},clone(M){const z=Zs(M,t,s,n,o);return o&&o(z),z}};return H}function ro(e){if(Bn(e))return e=Wt(e),e.children=null,e}function xn(e){if(!Bn(e))return Dn(e.type)&&e.children?pi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&le(s.default))return s.default()}}function is(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;is(Dn(s.type)&&xn(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function tl(e,t=!1,s){let n=[],o=0;for(let l=0;l<e.length;l++){let r=e[l];const i=s==null?r.key:String(s)+String(r.key!=null?r.key:l);r.type===ae?(r.patchFlag&128&&o++,n=n.concat(tl(r.children,t,i))):(t||r.type!==De)&&n.push(i!=null?Wt(r,{key:i}):r)}if(o>1)for(let l=0;l<n.length;l++)n[l].patchFlag=-2;return n}function mi(e,t){return le(e)?Pe({name:e.name},t,{setup:e}):e}function Cc(){const e=Ts();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function gi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function El(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const _n=new WeakMap;function Us(e,t,s,n,o=!1){if(X(e)){e.forEach((w,L)=>Us(w,t&&(X(t)?t[L]:t),s,n,o));return}if(ys(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Us(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Gn(n.component):n.el,r=o?null:l,{i,r:c}=e,f=t&&t.r,u=i.refs===ke?i.refs={}:i.refs,p=i.setupState,g=pe(p),h=p===ke?Tr:w=>El(u,w)?!1:ve(g,w),C=(w,L)=>!(L&&El(u,L));if(f!=null&&f!==c){if(Tl(t),Ce(f))u[f]=null,h(f)&&(p[f]=null);else if($e(f)){const w=t;C(f,w.k)&&(f.value=null),w.k&&(u[w.k]=null)}}if(le(c))on(c,i,12,[r,u]);else{const w=Ce(c),L=$e(c);if(w||L){const T=()=>{if(e.f){const y=w?h(c)?p[c]:u[c]:C()||!e.k?c.value:u[e.k];if(o)X(y)&&Wo(y,l);else if(X(y))y.includes(l)||y.push(l);else if(w)u[c]=[l],h(c)&&(p[c]=u[c]);else{const d=[l];C(c,e.k)&&(c.value=d),e.k&&(u[e.k]=d)}}else w?(u[c]=r,h(c)&&(p[c]=r)):L&&(C(c,e.k)&&(c.value=r),e.k&&(u[e.k]=r))};if(r){const y=()=>{T(),_n.delete(e)};y.id=-1,_n.set(e,y),He(y,s)}else Tl(e),T()}}}function Tl(e){const t=_n.get(e);t&&(t.flags|=8,_n.delete(e))}Ln().requestIdleCallback;Ln().cancelIdleCallback;const ys=e=>!!e.type.__asyncLoader,Bn=e=>e.type.__isKeepAlive;function Sc(e,t){vi(e,"a",t)}function Ec(e,t){vi(e,"da",t)}function vi(e,t,s=Be){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Fn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Bn(o.parent.vnode)&&Tc(n,t,s,o),o=o.parent}}function Tc(e,t,s,n){const o=Fn(t,e,n,!0);Es(()=>{Wo(n[t],o)},s)}function Fn(e,t,s=Be,n=!1){if(s){const o=s[e]||(s[e]=[]),l=t.__weh||(t.__weh=(...r)=>{Rt();const i=ln(s),c=ot(t,s,e,r);return i(),Pt(),c});return n?o.unshift(l):o.push(l),l}}const Lt=e=>(t,s=Be)=>{(!Xs||e==="sp")&&Fn(e,(...n)=>t(...n),s)},$c=Lt("bm"),at=Lt("m"),Ac=Lt("bu"),bi=Lt("u"),Un=Lt("bum"),Es=Lt("um"),Ic=Lt("sp"),Rc=Lt("rtg"),Pc=Lt("rtc");function Oc(e,t=Be){Fn("ec",e,t)}const xi="components";function Hn(e,t){return yi(xi,e,!0,t)||e}const _i=Symbol.for("v-ndc");function Mc(e){return Ce(e)?yi(xi,e,!1)||e:e||_i}function yi(e,t,s=!0,n=!1){const o=Ne||Be;if(o){const l=o.type;{const i=gu(l,!1);if(i&&(i===t||i===Ge(t)||i===Mn(Ge(t))))return l}const r=$l(o[e]||l[e],t)||$l(o.appContext[e],t);return!r&&n?l:r}}function $l(e,t){return e&&(e[t]||e[Ge(t)]||e[Mn(Ge(t))])}function Te(e,t,s,n){let o;const l=s,r=X(e);if(r||Ce(e)){const i=r&&At(e);let c=!1,f=!1;i&&(c=!Ye(e),f=Mt(e),e=Nn(e)),o=new Array(e.length);for(let u=0,p=e.length;u<p;u++)o[u]=t(c?f?ks(rt(e[u])):rt(e[u]):e[u],u,void 0,l)}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,l)}else if(be(e))if(e[Symbol.iterator])o=Array.from(e,(i,c)=>t(i,c,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let c=0,f=i.length;c<f;c++){const u=i[c];o[c]=t(e[u],u,c,l)}}else o=[];return o}function io(e,t,s,n,o,l){if(s==null&&(s={}),Ne.ce||Ne.parent&&ys(Ne.parent)&&Ne.parent.ce){const f=s,u=Object.keys(f).length>0;return t!=="default"&&(f.name=t),k(),Re(ae,null,[fe("slot",f,n)],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1);const i=It.length;k();let c;try{const f=r&&ki(r(s)),u=s.key||l||f&&f.key;c=Re(ae,{key:(u&&!Xe(u)?u:`_${t}`)+(!f&&n?"_fb":"")},f||(n?n():[]),f&&e._===1?64:-2)}catch(f){for(let u=It.length;u>i;u--)ll();throw f}finally{r&&r._c&&(r._d=!0)}return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function ki(e){return e.some(t=>Ys(t)?!(t.type===De||t.type===ae&&!ki(t.children)):!0)?e:null}const $o=e=>e?Ui(e)?Gn(e):$o(e.parent):null,Hs=Pe(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=>$o(e.parent),$root:e=>$o(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ci(e),$forceUpdate:e=>e.f||(e.f=()=>{Xo(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>bc.bind(e)}),ao=(e,t)=>e!==ke&&!e.__isScriptSetup&&ve(e,t),Lc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:l,accessCache:r,type:i,appContext:c}=e;if(t[0]!=="$"){const g=r[t];if(g!==void 0)switch(g){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return l[t]}else{if(ao(n,t))return r[t]=1,n[t];if(o!==ke&&ve(o,t))return r[t]=2,o[t];if(ve(l,t))return r[t]=3,l[t];if(s!==ke&&ve(s,t))return r[t]=4,s[t];Ao&&(r[t]=0)}}const f=Hs[t];let u,p;if(f)return t==="$attrs"&&je(e.attrs,"get",""),f(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(s!==ke&&ve(s,t))return r[t]=4,s[t];if(p=c.config.globalProperties,ve(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:l}=e;return ao(o,t)?(o[t]=s,!0):n!==ke&&ve(n,t)?(n[t]=s,!0):ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:l,type:r}},i){let c;return!!(s[i]||e!==ke&&i[0]!=="$"&&ve(e,i)||ao(t,i)||ve(l,i)||ve(n,i)||ve(Hs,i)||ve(o.config.globalProperties,i)||(c=r.__cssModules)&&c[i])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ve(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Al(e){return X(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ao=!0;function Nc(e){const t=Ci(e),s=e.proxy,n=e.ctx;Ao=!1,t.beforeCreate&&Il(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:c,inject:f,created:u,beforeMount:p,mounted:g,beforeUpdate:h,updated:C,activated:w,deactivated:L,beforeDestroy:T,beforeUnmount:y,destroyed:d,unmounted:b,render:x,renderTracked:V,renderTriggered:j,errorCaptured:H,serverPrefetch:M,expose:z,inheritAttrs:oe,components:F,directives:J,filters:P}=t;if(f&&Vc(f,n,null),r)for(const se in r){const ie=r[se];le(ie)&&(n[se]=ie.bind(s))}if(o){const se=o.call(s,s);be(se)&&(e.data=Ot(se))}if(Ao=!0,l)for(const se in l){const ie=l[se],Fe=le(ie)?ie.bind(s,s):le(ie.get)?ie.get.bind(s,s):_t,qe=!le(ie)&&le(ie.set)?ie.set.bind(s):_t,ct=he({get:Fe,set:qe});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>ct.value,set:ze=>ct.value=ze})}if(i)for(const se in i)wi(i[se],n,s,se);if(c){const se=le(c)?c.call(s):c;Reflect.ownKeys(se).forEach(ie=>{Fs(ie,se[ie])})}u&&Il(u,e,"c");function ue(se,ie){X(ie)?ie.forEach(Fe=>se(Fe.bind(s))):ie&&se(ie.bind(s))}if(ue($c,p),ue(at,g),ue(Ac,h),ue(bi,C),ue(Sc,w),ue(Ec,L),ue(Oc,H),ue(Pc,V),ue(Rc,j),ue(Un,y),ue(Es,b),ue(Ic,M),X(z))if(z.length){const se=e.exposed||(e.exposed={});z.forEach(ie=>{Object.defineProperty(se,ie,{get:()=>s[ie],set:Fe=>s[ie]=Fe,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===_t&&(e.render=x),oe!=null&&(e.inheritAttrs=oe),F&&(e.components=F),J&&(e.directives=J),M&&gi(e)}function Vc(e,t,s=_t){X(e)&&(e=Io(e));for(const n in e){const o=e[n];let l;be(o)?"default"in o?l=Qe(o.from||n,o.default,!0):l=Qe(o.from||n):l=Qe(o),$e(l)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[n]=l}}function Il(e,t,s){ot(X(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function wi(e,t,s,n){let o=n.includes(".")?ai(s,n):()=>s[n];if(Ce(e)){const l=t[e];le(l)&&Ve(o,l)}else if(le(e))Ve(o,e.bind(s));else if(be(e))if(X(e))e.forEach(l=>wi(l,t,s,n));else{const l=le(e.handler)?e.handler.bind(s):t[e.handler];le(l)&&Ve(o,l,e)}}function Ci(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let c;return i?c=i:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(f=>yn(c,f,r,!0)),yn(c,t,r)),be(t)&&l.set(t,c),c}function yn(e,t,s,n=!1){const{mixins:o,extends:l}=t;l&&yn(e,l,s,!0),o&&o.forEach(r=>yn(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const i=jc[r]||s&&s[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const jc={data:Rl,props:Pl,emits:Pl,methods:Ls,computed:Ls,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Ls,directives:Ls,watch:Bc,provide:Rl,inject:Dc};function Rl(e,t){return t?e?function(){return Pe(le(e)?e.call(this,this):e,le(t)?t.call(this,this):t)}:t:e}function Dc(e,t){return Ls(Io(e),Io(t))}function Io(e){if(X(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ue(e,t){return e?[...new Set([].concat(e,t))]:t}function Ls(e,t){return e?Pe(Object.create(null),e,t):t}function Pl(e,t){return e?X(e)&&X(t)?[...new Set([...e,...t])]:Pe(Object.create(null),Al(e),Al(t??{})):t}function Bc(e,t){if(!e)return t;if(!t)return e;const s=Pe(Object.create(null),e);for(const n in t)s[n]=Ue(e[n],t[n]);return s}function Si(){return{app:null,config:{isNativeTag:Tr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Fc=0;function Uc(e,t){return function(n,o=null){le(n)||(n=Pe({},n)),o!=null&&!be(o)&&(o=null);const l=Si(),r=new WeakSet,i=[];let c=!1;const f=l.app={_uid:Fc++,_component:n,_props:o,_container:null,_context:l,_instance:null,version:bu,get config(){return l.config},set config(u){},use(u,...p){return r.has(u)||(u&&le(u.install)?(r.add(u),u.install(f,...p)):le(u)&&(r.add(u),u(f,...p))),f},mixin(u){return l.mixins.includes(u)||l.mixins.push(u),f},component(u,p){return p?(l.components[u]=p,f):l.components[u]},directive(u,p){return p?(l.directives[u]=p,f):l.directives[u]},mount(u,p,g){if(!c){const h=f._ceVNode||fe(n,o);return h.appContext=l,g===!0?g="svg":g===!1&&(g=void 0),e(h,u,g),c=!0,f._container=u,u.__vue_app__=f,Gn(h.component)}},onUnmount(u){i.push(u)},unmount(){c&&(ot(i,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(u,p){return l.provides[u]=p,f},runWithContext(u){const p=ls;ls=f;try{return u()}finally{ls=p}}};return f}}let ls=null;const Hc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ge(t)}Modifiers`]||e[`${as(t)}Modifiers`];function Wc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ke;let o=s;const l=t.startsWith("update:"),r=l&&Hc(n,t.slice(7));r&&(r.trim&&(o=s.map(u=>Ce(u)?u.trim():u)),r.number&&(o=s.map(Ko)));let i,c=n[i=to(t)]||n[i=to(Ge(t))];!c&&l&&(c=n[i=to(as(t))]),c&&ot(c,e,6,o);const f=n[i+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ot(f,e,6,o)}}const Kc=new WeakMap;function Ei(e,t,s=!1){const n=s?Kc:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!le(e)){const c=f=>{const u=Ei(f,t,!0);u&&(i=!0,Pe(r,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!l&&!i?(be(e)&&n.set(e,null),null):(X(l)?l.forEach(c=>r[c]=null):Pe(r,l),be(e)&&n.set(e,r),r)}function Wn(e,t){return!e||!An(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ve(e,t[0].toLowerCase()+t.slice(1))||ve(e,as(t))||ve(e,t))}function Ol(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:c,render:f,renderCache:u,props:p,data:g,setupState:h,ctx:C,inheritAttrs:w}=e,L=bn(e);let T,y;try{if(s.shapeFlag&4){const b=o||n,x=b;T=vt(f.call(x,b,u,p,h,g,C)),y=i}else{const b=t;T=vt(b.length>1?b(p,{attrs:i,slots:r,emit:c}):b(p,null)),y=t.props?i:Gc(i)}}catch(b){It.length=0,jn(b,e,1),T=fe(De)}let d=T;if(y&&w!==!1){const b=Object.keys(y),{shapeFlag:x}=d;b.length&&x&7&&(l&&b.some(In)&&(y=qc(y,l)),d=Wt(d,y,!1,!0))}if(s.dirs&&(d=Wt(d,null,!1,!0),d.dirs=d.dirs?d.dirs.concat(s.dirs):s.dirs),s.transition){const b=Dn(d.type)&&xn(d)||d;is(b,s.transition)}return T=d,bn(L),T}const Gc=e=>{let t;for(const s in e)(s==="class"||s==="style"||An(s))&&((t||(t={}))[s]=e[s]);return t},qc=(e,t)=>{const s={};for(const n in e)(!In(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function zc(e,t,s){const{props:n,children:o,component:l}=e,{props:r,children:i,patchFlag:c}=t,f=l.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Ml(n,r,f):!!r;if(c&8){const u=t.dynamicProps;for(let p=0;p<u.length;p++){const g=u[p];if(Ti(r,n,g)&&!Wn(f,g))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:n===r?!1:n?r?Ml(n,r,f):!0:!!r;return!1}function Ml(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const l=n[o];if(Ti(t,e,l)&&!Wn(s,l))return!0}return!1}function Ti(e,t,s){const n=e[s],o=t[s];return s==="style"&&be(n)&&be(o)?!nn(n,o):n!==o}function Zc({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const $i={},Ai=()=>Object.create($i),Ii=e=>Object.getPrototypeOf(e)===$i;function Jc(e,t,s,n=!1){const o={},l=Ai();e.propsDefaults=Object.create(null),Ri(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);s?e.props=n?o:Xr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Yc(e,t,s,n){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=pe(o),[c]=e.propsOptions;let f=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let p=0;p<u.length;p++){let g=u[p];if(Wn(e.emitsOptions,g))continue;const h=t[g];if(c)if(ve(l,g))h!==l[g]&&(l[g]=h,f=!0);else{const C=Ge(g);o[C]=Ro(c,i,C,h,e,!1)}else h!==l[g]&&(l[g]=h,f=!0)}}}else{Ri(e,t,o,l)&&(f=!0);let u;for(const p in i)(!t||!ve(t,p)&&((u=as(p))===p||!ve(t,u)))&&(c?s&&(s[p]!==void 0||s[u]!==void 0)&&(o[p]=Ro(c,i,p,void 0,e,!0)):delete o[p]);if(l!==i)for(const p in l)(!t||!ve(t,p))&&(delete l[p],f=!0)}f&&Tt(e.attrs,"set","")}function Ri(e,t,s,n){const[o,l]=e.propsOptions;let r=!1,i;if(t)for(let c in t){if(js(c))continue;const f=t[c];let u;o&&ve(o,u=Ge(c))?!l||!l.includes(u)?s[u]=f:(i||(i={}))[u]=f:Wn(e.emitsOptions,c)||(!(c in n)||f!==n[c])&&(n[c]=f,r=!0)}if(l){const c=pe(s),f=i||ke;for(let u=0;u<l.length;u++){const p=l[u];s[p]=Ro(o,c,p,f[p],e,!ve(f,p))}}return r}function Ro(e,t,s,n,o,l){const r=e[s];if(r!=null){const i=ve(r,"default");if(i&&n===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&le(c)){const{propsDefaults:f}=o;if(s in f)n=f[s];else{const u=ln(o);n=f[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}r[0]&&(l&&!i?n=!1:r[1]&&(n===""||n===as(s))&&(n=!0))}return n}const Qc=new WeakMap;function Pi(e,t,s=!1){const n=s?Qc:t.propsCache,o=n.get(e);if(o)return o;const l=e.props,r={},i=[];let c=!1;if(!le(e)){const u=p=>{c=!0;const[g,h]=Pi(p,t,!0);Pe(r,g),h&&i.push(...h)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!c)return be(e)&&n.set(e,bs),bs;if(X(l))for(let u=0;u<l.length;u++){const p=Ge(l[u]);Ll(p)&&(r[p]=ke)}else if(l)for(const u in l){const p=Ge(u);if(Ll(p)){const g=l[u],h=r[p]=X(g)||le(g)?{type:g}:Pe({},g),C=h.type;let w=!1,L=!0;if(X(C))for(let T=0;T<C.length;++T){const y=C[T],d=le(y)&&y.name;if(d==="Boolean"){w=!0;break}else d==="String"&&(L=!1)}else w=le(C)&&C.name==="Boolean";h[0]=w,h[1]=L,(w||ve(h,"default"))&&i.push(p)}}const f=[r,i];return be(e)&&n.set(e,f),f}function Ll(e){return e[0]!=="$"&&!js(e)}const sl=e=>e==="_"||e==="_ctx"||e==="$stable",nl=e=>X(e)?e.map(vt):[vt(e)],Xc=(e,t,s)=>{if(t._n)return t;const n=Ee((...o)=>nl(t(...o)),s);return n._c=!1,n},Oi=(e,t,s)=>{const n=e._ctx;for(const o in e){if(sl(o))continue;const l=e[o];if(le(l))t[o]=Xc(o,l,n);else if(l!=null){const r=nl(l);t[o]=()=>r}}},Mi=(e,t)=>{const s=nl(t);e.slots.default=()=>s},Li=(e,t,s)=>{for(const n in t)(s||!sl(n))&&(e[n]=t[n])},eu=(e,t,s)=>{const n=e.slots=Ai();if(e.vnode.shapeFlag&32){const o=t._;o?(Li(n,t,s),s&&Rr(n,"_",o,!0)):Oi(t,n)}else t&&Mi(e,t)},tu=(e,t,s)=>{const{vnode:n,slots:o}=e;let l=!0,r=ke;if(n.shapeFlag&32){const i=t._;i?s&&i===1?l=!1:Li(o,t,s):(l=!t.$stable,Oi(t,o)),r=t}else t&&(Mi(e,t),r={default:1});if(l)for(const i in o)!sl(i)&&r[i]==null&&delete o[i]},He=ru;function su(e){return nu(e)}function nu(e,t){const s=Ln();s.__VUE__=!0;const{insert:n,remove:o,patchProp:l,createElement:r,createText:i,createComment:c,setText:f,setElementText:u,parentNode:p,nextSibling:g,setScopeId:h=_t,insertStaticContent:C}=e,w=(m,v,_,$=null,I=null,E=null,U=void 0,B=null,D=!!v.dynamicChildren)=>{if(m===v)return;m&&!es(m,v)&&($=A(m),ze(m,I,E,!0),m=null),v.patchFlag===-2&&(D=!1,v.dynamicChildren=null);const{type:O,ref:ee,shapeFlag:K}=v;switch(O){case Kn:L(m,v,_,$);break;case De:T(m,v,_,$);break;case uo:m==null&&y(v,_,$,U);break;case ae:F(m,v,_,$,I,E,U,B,D);break;default:K&1?x(m,v,_,$,I,E,U,B,D):K&6?J(m,v,_,$,I,E,U,B,D):(K&64||K&128)&&O.process(m,v,_,$,I,E,U,B,D,Y)}ee!=null&&I?Us(ee,m&&m.ref,E,v||m,!v):ee==null&&m&&m.ref!=null&&Us(m.ref,null,E,m,!0)},L=(m,v,_,$)=>{if(m==null)n(v.el=i(v.children),_,$);else{const I=v.el=m.el;v.children!==m.children&&f(I,v.children)}},T=(m,v,_,$)=>{m==null?n(v.el=c(v.children||""),_,$):v.el=m.el},y=(m,v,_,$)=>{[m.el,m.anchor]=C(m.children,v,_,$,m.el,m.anchor)},d=({el:m,anchor:v},_,$)=>{let I;for(;m&&m!==v;)I=g(m),n(m,_,$),m=I;n(v,_,$)},b=({el:m,anchor:v})=>{let _;for(;m&&m!==v;)_=g(m),o(m),m=_;o(v)},x=(m,v,_,$,I,E,U,B,D)=>{if(v.type==="svg"?U="svg":v.type==="math"&&(U="mathml"),m==null)V(v,_,$,I,E,U,B,D);else{const O=m.el&&m.el._isVueCE?m.el:null;try{O&&O._beginPatch(),M(m,v,I,E,U,B,D)}finally{O&&O._endPatch()}}},V=(m,v,_,$,I,E,U,B)=>{let D,O;const{props:ee,shapeFlag:K,transition:Q,dirs:ne}=m;if(D=m.el=r(m.type,E,ee&&ee.is,ee),K&8?u(D,m.children):K&16&&H(m.children,D,null,$,I,co(m,E),U,B),ne&&Gt(m,null,$,"created"),j(D,m,m.scopeId,U,$),ee){for(const ye in ee)ye!=="value"&&!js(ye)&&l(D,ye,null,ee[ye],E,$);"value"in ee&&l(D,"value",null,ee.value,E),(O=ee.onVnodeBeforeMount)&&pt(O,$,m)}ne&&Gt(m,null,$,"beforeMount");const me=ou(I,Q);me&&Q.beforeEnter(D),n(D,v,_),((O=ee&&ee.onVnodeMounted)||me||ne)&&He(()=>{O&&pt(O,$,m),me&&Q.enter(D),ne&&Gt(m,null,$,"mounted")},I)},j=(m,v,_,$,I)=>{if(_&&h(m,_),$)for(let E=0;E<$.length;E++)h(m,$[E]);if(I){let E=I.subTree;if(v===E||ji(E.type)&&(E.ssContent===v||E.ssFallback===v)){const U=I.vnode;j(m,U,U.scopeId,U.slotScopeIds,I.parent)}}},H=(m,v,_,$,I,E,U,B,D=0)=>{for(let O=D;O<m.length;O++){const ee=m[O]=B?Et(m[O]):vt(m[O]);w(null,ee,v,_,$,I,E,U,B)}},M=(m,v,_,$,I,E,U)=>{const B=v.el=m.el;let{patchFlag:D,dynamicChildren:O,dirs:ee}=v;D|=m.patchFlag&16;const K=m.props||ke,Q=v.props||ke;let ne;if(_&&qt(_,!1),(ne=Q.onVnodeBeforeUpdate)&&pt(ne,_,v,m),ee&&Gt(v,m,_,"beforeUpdate"),_&&qt(_,!0),O&&(!m.dynamicChildren||m.dynamicChildren.length!==O.length)&&(D=0,U=!1,O=null),(K.innerHTML&&Q.innerHTML==null||K.textContent&&Q.textContent==null)&&u(B,""),O?z(m.dynamicChildren,O,B,_,$,co(v,I),E):U||ie(m,v,B,null,_,$,co(v,I),E,!1),D>0){if(D&16)oe(B,K,Q,_,I);else if(D&2&&K.class!==Q.class&&l(B,"class",null,Q.class,I),D&4&&l(B,"style",K.style,Q.style,I),D&8){const me=v.dynamicProps;for(let ye=0;ye<me.length;ye++){const _e=me[ye],Ae=K[_e],Le=Q[_e];(Le!==Ae||_e==="value")&&l(B,_e,Ae,Le,I,_)}}D&1&&m.children!==v.children&&u(B,v.children)}else!U&&O==null&&oe(B,K,Q,_,I);((ne=Q.onVnodeUpdated)||ee)&&He(()=>{ne&&pt(ne,_,v,m),ee&&Gt(v,m,_,"updated")},$)},z=(m,v,_,$,I,E,U)=>{for(let B=0;B<v.length;B++){const D=m[B],O=v[B],ee=D.el&&(D.type===ae||!es(D,O)||D.shapeFlag&198)?p(D.el):_;w(D,O,ee,null,$,I,E,U,!0)}},oe=(m,v,_,$,I)=>{if(v!==_){if(v!==ke)for(const E in v)!js(E)&&!(E in _)&&l(m,E,v[E],null,I,$);for(const E in _){if(js(E))continue;const U=_[E],B=v[E];U!==B&&E!=="value"&&l(m,E,B,U,I,$)}"value"in _&&l(m,"value",v.value,_.value,I)}},F=(m,v,_,$,I,E,U,B,D)=>{const O=v.el=m?m.el:i(""),ee=v.anchor=m?m.anchor:i("");let{patchFlag:K,dynamicChildren:Q,slotScopeIds:ne}=v;ne&&(B=B?B.concat(ne):ne),m==null?(n(O,_,$),n(ee,_,$),H(v.children||[],_,ee,I,E,U,B,D)):K>0&&K&64&&Q&&m.dynamicChildren&&m.dynamicChildren.length===Q.length?(z(m.dynamicChildren,Q,_,I,E,U,B),(v.key!=null||I&&v===I.subTree)&&ol(m,v,!0)):ie(m,v,_,ee,I,E,U,B,D)},J=(m,v,_,$,I,E,U,B,D)=>{v.slotScopeIds=B,m==null?v.shapeFlag&512?I.ctx.activate(v,_,$,U,D):P(v,_,$,I,E,U,D):te(m,v,D)},P=(m,v,_,$,I,E,U)=>{const B=m.component=fu(m,$,I);if(Bn(m)&&(B.ctx.renderer=Y),du(B,!1,U),B.asyncDep){if(I&&I.registerDep(B,ue,U),!m.el){const D=B.subTree=fe(De);T(null,D,v,_),m.placeholder=D.el}}else ue(B,m,v,_,I,E,U)},te=(m,v,_)=>{const $=v.component=m.component;if(zc(m,v,_))if($.asyncDep&&!$.asyncResolved){se($,v,_);return}else $.next=v,$.update();else v.el=m.el,$.vnode=v},ue=(m,v,_,$,I,E,U)=>{const B=()=>{if(m.isMounted){let{next:K,bu:Q,u:ne,parent:me,vnode:ye}=m;{const ft=Ni(m);if(ft){K&&(K.el=ye.el,se(m,K,U)),ft.asyncDep.then(()=>{He(()=>{m.isUnmounted||O()},I)});return}}let _e=K,Ae;qt(m,!1),K?(K.el=ye.el,se(m,K,U)):K=ye,Q&&pn(Q),(Ae=K.props&&K.props.onVnodeBeforeUpdate)&&pt(Ae,me,K,ye),qt(m,!0);const Le=Ol(m),ut=m.subTree;m.subTree=Le,w(ut,Le,p(ut.el),A(ut),m,I,E),K.el=Le.el,_e===null&&Zc(m,Le.el),ne&&He(ne,I),(Ae=K.props&&K.props.onVnodeUpdated)&&He(()=>pt(Ae,me,K,ye),I)}else{let K;const{el:Q,props:ne}=v,{bm:me,m:ye,parent:_e,root:Ae,type:Le}=m,ut=ys(v);qt(m,!1),me&&pn(me),!ut&&(K=ne&&ne.onVnodeBeforeMount)&&pt(K,_e,v),qt(m,!0);{Ae.ce&&Ae.ce._hasShadowRoot()&&Ae.ce._injectChildStyle(Le,m.parent?m.parent.type:void 0);const ft=m.subTree=Ol(m);w(null,ft,_,$,m,I,E),v.el=ft.el}if(ye&&He(ye,I),!ut&&(K=ne&&ne.onVnodeMounted)){const ft=v;He(()=>pt(K,_e,ft),I)}(v.shapeFlag&256||_e&&ys(_e.vnode)&&_e.vnode.shapeFlag&256)&&m.a&&He(m.a,I),m.isMounted=!0,v=_=$=null}};m.scope.on();const D=m.effect=new Dr(B);m.scope.off();const O=m.update=D.run.bind(D),ee=m.job=D.runIfDirty.bind(D);ee.i=m,ee.id=m.uid,D.scheduler=()=>Xo(ee),qt(m,!0),O()},se=(m,v,_)=>{v.component=m;const $=m.vnode.props;m.vnode=v,m.next=null,Yc(m,v.props,$,_),tu(m,v.children,_),Rt(),wl(m),Pt()},ie=(m,v,_,$,I,E,U,B,D=!1)=>{const O=m&&m.children,ee=m?m.shapeFlag:0,K=v.children,{patchFlag:Q,shapeFlag:ne}=v;if(Q>0){if(Q&128){qe(O,K,_,$,I,E,U,B,D);return}else if(Q&256){Fe(O,K,_,$,I,E,U,B,D);return}}ne&8?(ee&16&&tt(O,I,E),K!==O&&u(_,K)):ee&16?ne&16?qe(O,K,_,$,I,E,U,B,D):tt(O,I,E,!0):(ee&8&&u(_,""),ne&16&&H(K,_,$,I,E,U,B,D))},Fe=(m,v,_,$,I,E,U,B,D)=>{m=m||bs,v=v||bs;const O=m.length,ee=v.length,K=Math.min(O,ee);let Q;for(Q=0;Q<K;Q++){const ne=v[Q]=D?Et(v[Q]):vt(v[Q]);w(m[Q],ne,_,null,I,E,U,B,D)}O>ee?tt(m,I,E,!0,!1,K):H(v,_,$,I,E,U,B,D,K)},qe=(m,v,_,$,I,E,U,B,D)=>{let O=0;const ee=v.length;let K=m.length-1,Q=ee-1;for(;O<=K&&O<=Q;){const ne=m[O],me=v[O]=D?Et(v[O]):vt(v[O]);if(es(ne,me))w(ne,me,_,null,I,E,U,B,D);else break;O++}for(;O<=K&&O<=Q;){const ne=m[K],me=v[Q]=D?Et(v[Q]):vt(v[Q]);if(es(ne,me))w(ne,me,_,null,I,E,U,B,D);else break;K--,Q--}if(O>K){if(O<=Q){const ne=Q+1,me=ne<ee?v[ne].el:$;for(;O<=Q;)w(null,v[O]=D?Et(v[O]):vt(v[O]),_,me,I,E,U,B,D),O++}}else if(O>Q)for(;O<=K;)ze(m[O],I,E,!0),O++;else{const ne=O,me=O,ye=new Map;for(O=me;O<=Q;O++){const Ze=v[O]=D?Et(v[O]):vt(v[O]);Ze.key!=null&&ye.set(Ze.key,O)}let _e,Ae=0;const Le=Q-me+1;let ut=!1,ft=0;const $s=new Array(Le);for(O=0;O<Le;O++)$s[O]=0;for(O=ne;O<=K;O++){const Ze=m[O];if(Ae>=Le){ze(Ze,I,E,!0);continue}let dt;if(Ze.key!=null)dt=ye.get(Ze.key);else for(_e=me;_e<=Q;_e++)if($s[_e-me]===0&&es(Ze,v[_e])){dt=_e;break}dt===void 0?ze(Ze,I,E,!0):($s[dt-me]=O+1,dt>=ft?ft=dt:ut=!0,w(Ze,v[dt],_,null,I,E,U,B,D),Ae++)}const gl=ut?lu($s):bs;for(_e=gl.length-1,O=Le-1;O>=0;O--){const Ze=me+O,dt=v[Ze],vl=v[Ze+1],bl=Ze+1<ee?vl.el||Vi(vl):$;$s[O]===0?w(null,dt,_,bl,I,E,U,B,D):ut&&(_e<0||O!==gl[_e]?ct(dt,_,bl,2):_e--)}}},ct=(m,v,_,$,I=null)=>{const{el:E,type:U,transition:B,children:D,shapeFlag:O}=m;if(O&6){ct(m.component.subTree,v,_,$);return}if(O&128){m.suspense.move(v,_,$);return}if(O&64){U.move(m,v,_,Y);return}if(U===ae){n(E,v,_);for(let K=0;K<D.length;K++)ct(D[K],v,_,$);n(m.anchor,v,_);return}if(U===uo){d(m,v,_);return}if($!==2&&O&1&&B)if($===0)B.persisted&&!E[nt]?n(E,v,_):(B.beforeEnter(E),n(E,v,_),He(()=>B.enter(E),I));else{const{leave:K,delayLeave:Q,afterLeave:ne}=B,me=()=>{m.ctx.isUnmounted?o(E):n(E,v,_)},ye=()=>{const _e=E._isLeaving||!!E[nt];E._isLeaving&&E[nt](!0),B.persisted&&!_e?me():K(E,()=>{me(),ne&&ne()})};Q?Q(E,me,ye):ye()}else n(E,v,_)},ze=(m,v,_,$=!1,I=!1)=>{const{type:E,props:U,ref:B,children:D,dynamicChildren:O,shapeFlag:ee,patchFlag:K,dirs:Q,cacheIndex:ne,memo:me}=m;if(K===-2&&(I=!1),B!=null&&(Rt(),Us(B,null,_,m,!0),Pt()),ne!=null&&(v.renderCache[ne]=void 0),ee&256){v.ctx.deactivate(m);return}const ye=ee&1&&Q,_e=!ys(m);let Ae;if(_e&&(Ae=U&&U.onVnodeBeforeUnmount)&&pt(Ae,v,m),ee&6)Kt(m.component,_,$);else{if(ee&128){m.suspense.unmount(_,$);return}ye&&Gt(m,null,v,"beforeUnmount"),ee&64?m.type.remove(m,v,_,Y,$):O&&!O.hasOnce&&(E!==ae||K>0&&K&64)?tt(O,v,_,!1,!0):(E===ae&&K&384||!I&&ee&16)&&tt(D,v,_),$&&us(m)}const Le=me!=null&&ne==null;(_e&&(Ae=U&&U.onVnodeUnmounted)||ye||Le)&&He(()=>{Ae&&pt(Ae,v,m),ye&&Gt(m,null,v,"unmounted"),Le&&(m.el=null)},_)},us=m=>{const{type:v,el:_,anchor:$,transition:I}=m;if(v===ae){fs(_,$);return}if(v===uo){b(m);return}const E=()=>{o(_),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(m.shapeFlag&1&&I&&!I.persisted){const{leave:U,delayLeave:B}=I,D=()=>U(_,E);B?B(m.el,E,D):D()}else E()},fs=(m,v)=>{let _;for(;m!==v;)_=g(m),o(m),m=_;o(v)},Kt=(m,v,_)=>{const{bum:$,scope:I,job:E,subTree:U,um:B,m:D,a:O}=m;Nl(D),Nl(O),$&&pn($),I.stop(),E&&(E.flags|=8,ze(U,m,v,_)),B&&He(B,v),He(()=>{m.isUnmounted=!0},v)},tt=(m,v,_,$=!1,I=!1,E=0)=>{for(let U=E;U<m.length;U++)ze(m[U],v,_,$,I)},A=m=>{if(m.shapeFlag&6)return A(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const v=g(m.anchor||m.el),_=v&&v[ci];return _?g(_):v};let q=!1;const W=(m,v,_)=>{let $;m==null?v._vnode&&(ze(v._vnode,null,null,!0),$=v._vnode.component):w(v._vnode||null,m,v,null,null,null,_),v._vnode=m,q||(q=!0,wl($),oi(),q=!1)},Y={p:w,um:ze,m:ct,r:us,mt:P,mc:H,pc:ie,pbc:z,n:A,o:e};return{render:W,hydrate:void 0,createApp:Uc(W)}}function co({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function qt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ou(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ol(e,t,s=!1){const n=e.children,o=t.children;if(X(n)&&X(o))for(let l=0;l<n.length;l++){const r=n[l];let i=o[l];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=o[l]=Et(o[l]),i.el=r.el),!s&&i.patchFlag!==-2&&ol(r,i)),i.type===Kn&&(i.patchFlag===-1&&(i=o[l]=Et(i)),i.el=r.el),i.type===De&&!i.el&&(i.el=r.el)}}function lu(e){const t=e.slice(),s=[0];let n,o,l,r,i;const c=e.length;for(n=0;n<c;n++){const f=e[n];if(f!==0){if(o=s[s.length-1],e[o]<f){t[n]=o,s.push(n);continue}for(l=0,r=s.length-1;l<r;)i=l+r>>1,e[s[i]]<f?l=i+1:r=i;f<e[s[l]]&&(l>0&&(t[n]=s[l-1]),s[l]=n)}}for(l=s.length,r=s[l-1];l-- >0;)s[l]=r,r=t[r];return s}function Ni(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ni(t)}function Nl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Vi(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Vi(t.subTree):null}const ji=e=>e.__isSuspense;function ru(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):hc(e)}const ae=Symbol.for("v-fgt"),Kn=Symbol.for("v-txt"),De=Symbol.for("v-cmt"),uo=Symbol.for("v-stc"),It=[];let Je=null;function k(e=!1){It.push(Je=e?null:[])}function ll(){It.pop(),Je=It[It.length-1]||null}let Js=1;function kn(e,t=!1){Js+=e,e<0&&Je&&t&&(Je.hasOnce=!0)}function Di(e){return e.dynamicChildren=Js>0?Je||bs:null,ll(),Js>0&&Je&&Je.push(e),e}function S(e,t,s,n,o,l){return Di(a(e,t,s,n,o,l,!0))}function Re(e,t,s,n,o){return Di(fe(e,t,s,n,o,!0))}function Ys(e){return e?e.__v_isVNode===!0:!1}function es(e,t){return e.type===t.type&&e.key===t.key}const Bi=({key:e})=>e??null,hn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||$e(e)||le(e)?{i:Ne,r:e,k:t,f:!!s}:e:null);function a(e,t=null,s=null,n=0,o=null,l=e===ae?0:1,r=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Bi(t),ref:t&&hn(t),scopeId:ri,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ne};return i?(wn(c,s),l&128&&e.normalize(c)):s&&(c.shapeFlag|=Ce(s)?8:16),Js>0&&!r&&Je&&(c.patchFlag>0||l&6)&&c.patchFlag!==32&&Je.push(c),c}const fe=iu;function iu(e,t=null,s=null,n=0,o=null,l=!1){if((!e||e===_i)&&(e=De),Ys(e)){const i=Wt(e,t,!0);return s&&wn(i,s),Js>0&&!l&&Je&&(i.shapeFlag&6?Je[Je.indexOf(e)]=i:Je.push(i)),i.patchFlag=-2,i}if(vu(e)&&(e=e.__vccOpts),t){t=au(t);let{class:i,style:c}=t;i&&!Ce(i)&&(t.class=G(i)),be(c)&&(Vn(c)&&!X(c)&&(c=Pe({},c)),t.style=sn(c))}const r=Ce(e)?1:ji(e)?128:Dn(e)?64:be(e)?4:le(e)?2:0;return a(e,t,s,n,o,r,l,!0)}function au(e){return e?Vn(e)||Ii(e)?Pe({},e):e:null}function Wt(e,t,s=!1,n=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:c}=e,f=t?Fi(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Bi(f),ref:t&&t.ref?s&&l?X(l)?l.concat(hn(t)):[l,hn(t)]:hn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ae?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Wt(e.ssContent),ssFallback:e.ssFallback&&Wt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&is(u,c.clone(u)),u}function ce(e=" ",t=0){return fe(Kn,null,e,t)}function re(e="",t=!1){return t?(k(),Re(De,null,e)):fe(De,null,e)}function vt(e){return e==null||typeof e=="boolean"?fe(De):X(e)?fe(ae,null,e.slice()):Ys(e)?Et(e):fe(Kn,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Wt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(X(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),wn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Ii(t)?t._ctx=Ne:o===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(le(t)){if(n&65){wn(e,{default:t});return}t={default:t,_ctx:Ne},s=32}else t=String(t),n&64?(s=16,t=[ce(t)]):s=8;e.children=t,e.shapeFlag|=s}function Fi(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=sn([t.style,n.style]);else if(An(o)){const l=t[o],r=n[o];r&&l!==r&&!(X(l)&&l.includes(r))?t[o]=l?[].concat(l,r):r:r==null&&l==null&&!In(o)&&(t[o]=r)}else o!==""&&(t[o]=n[o])}return t}function pt(e,t,s,n=null){ot(e,t,7,[s,n])}const cu=Si();let uu=0;function fu(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||cu,l={uid:uu++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Nr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Pi(n,o),emitsOptions:Ei(n,o),emit:null,emitted:null,propsDefaults:ke,inheritAttrs:n.inheritAttrs,ctx:ke,data:ke,props:ke,attrs:ke,slots:ke,refs:ke,setupState:ke,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Wc.bind(null,l),e.ce&&e.ce(l),l}let Be=null;const Ts=()=>Be||Ne;let Cn,Qs;{const e=Ln(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};Cn=t("__VUE_INSTANCE_SETTERS__",s=>Be=s),Qs=t("__VUE_SSR_SETTERS__",s=>Xs=s)}const ln=e=>{const t=Be;return Cn(e),e.scope.on(),()=>{e.scope.off(),Cn(t)}},Vl=()=>{Be&&Be.scope.off(),Cn(null)};function Ui(e){return e.vnode.shapeFlag&4}let Xs=!1;function du(e,t=!1,s=!1){t&&Qs(t);const{props:n,children:o}=e.vnode,l=Ui(e);Jc(e,n,l,t),eu(e,o,s||t);const r=l?pu(e,t):void 0;return t&&Qs(!1),r}function pu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Lc);const{setup:n}=s;if(n){Rt();const o=e.setupContext=n.length>1?mu(e):null,l=ln(e),r=on(n,e,0,[e.props,o]),i=$r(r);if(Pt(),l(),(i||e.sp)&&!ys(e)&&gi(e),i){if(r.then(Vl,Vl),t)return r.then(c=>{Qs(!0);try{jl(e,c,t)}finally{Qs(!1)}}).catch(c=>{jn(c,e,0)});e.asyncDep=r}else jl(e,r)}else Hi(e)}function jl(e,t,s){le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ti(t)),Hi(e)}function Hi(e,t,s){const n=e.type;e.render||(e.render=n.render||_t);{const o=ln(e);Rt();try{Nc(e)}finally{Pt(),o()}}}const hu={get(e,t){return je(e,"get",""),e[t]}};function mu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,hu),slots:e.slots,emit:e.emit,expose:t}}function Gn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ti(Qo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Hs)return Hs[s](e)},has(t,s){return s in t||s in Hs}})):e.proxy}function gu(e,t=!0){return le(e)?e.displayName||e.name:e.name||t&&e.__name}function vu(e){return le(e)&&"__vccOpts"in e}const he=(e,t)=>cc(e,t,Xs);function rl(e,t,s){try{kn(-1);const n=arguments.length;return n===2?be(t)&&!X(t)?Ys(t)?fe(e,null,[t]):fe(e,t):fe(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Ys(s)&&(s=[s]),fe(e,t,s))}finally{kn(1)}}const bu="3.5.41";let Po;const Dl=typeof window<"u"&&window.trustedTypes;if(Dl)try{Po=Dl.createPolicy("vue",{createHTML:e=>e})}catch{}const Wi=Po?e=>Po.createHTML(e):e=>e,xu="http://www.w3.org/2000/svg",_u="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,Bl=St&&St.createElement("template"),yu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?St.createElementNS(xu,e):t==="mathml"?St.createElementNS(_u,e):s?St.createElement(e,{is:s}):St.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,l){const r=s?s.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===l||!(o=o.nextSibling)););else{Bl.innerHTML=Wi(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const i=Bl.content;if(n==="svg"||n==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Nt="transition",Rs="animation",ws=Symbol("_vtc"),Ki={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},Gi=Pe({},fi,Ki),ku=e=>(e.displayName="Transition",e.props=Gi,e),Sn=ku((e,{slots:t})=>rl(wc,qi(e),t)),zt=(e,t=[])=>{X(e)?e.forEach(s=>s(...t)):e&&e(...t)},Fl=e=>e?X(e)?e.some(t=>t.length>1):e.length>1:!1;function qi(e){const t={};for(const F in e)F in Ki||(t[F]=e[F]);if(e.css===!1)return t;const{name:s="v",type:n,duration:o,enterFromClass:l=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:i=`${s}-enter-to`,appearFromClass:c=l,appearActiveClass:f=r,appearToClass:u=i,leaveFromClass:p=`${s}-leave-from`,leaveActiveClass:g=`${s}-leave-active`,leaveToClass:h=`${s}-leave-to`}=e,C=wu(o),w=C&&C[0],L=C&&C[1],{onBeforeEnter:T,onEnter:y,onEnterCancelled:d,onLeave:b,onLeaveCancelled:x,onBeforeAppear:V=T,onAppear:j=y,onAppearCancelled:H=d}=t,M=(F,J,P,te)=>{F._enterCancelled=te,Bt(F,J?u:i),Bt(F,J?f:r),P&&P()},z=(F,J)=>{F._isLeaving=!1,Bt(F,p),Bt(F,h),Bt(F,g),J&&J()},oe=F=>(J,P)=>{const te=F?j:y,ue=()=>M(J,F,P);zt(te,[J,ue]),Ul(()=>{Bt(J,F?c:l),ht(J,F?u:i),Fl(te)||Hl(J,n,w,ue)})};return Pe(t,{onBeforeEnter(F){zt(T,[F]),ht(F,l),ht(F,r)},onBeforeAppear(F){zt(V,[F]),ht(F,c),ht(F,f)},onEnter:oe(!1),onAppear:oe(!0),onLeave(F,J){F._isLeaving=!0;const P=()=>z(F,J);ht(F,p),F._enterCancelled?(ht(F,g),Oo(F)):(Oo(F),ht(F,g)),Ul(()=>{F._isLeaving&&(Bt(F,p),ht(F,h),Fl(b)||Hl(F,n,L,P))}),zt(b,[F,P])},onEnterCancelled(F){M(F,!1,void 0,!0),zt(d,[F])},onAppearCancelled(F){M(F,!0,void 0,!0),zt(H,[F])},onLeaveCancelled(F){z(F),zt(x,[F])}})}function wu(e){if(e==null)return null;if(be(e))return[fo(e.enter),fo(e.leave)];{const t=fo(e);return[t,t]}}function fo(e){return Aa(e)}function ht(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[ws]||(e[ws]=new Set)).add(t)}function Bt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[ws];s&&(s.delete(t),s.size||(e[ws]=void 0))}function Ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Cu=0;function Hl(e,t,s,n){const o=e._endId=++Cu,l=()=>{o===e._endId&&n()};if(s!=null)return setTimeout(l,s);const{type:r,timeout:i,propCount:c}=zi(e,t);if(!r)return n();const f=r+"end";let u=0;const p=()=>{e.removeEventListener(f,g),l()},g=h=>{h.target===e&&++u>=c&&p()};setTimeout(()=>{u<c&&p()},i+1),e.addEventListener(f,g)}function zi(e,t){const s=window.getComputedStyle(e),n=C=>(s[C]||"").split(", "),o=n(`${Nt}Delay`),l=n(`${Nt}Duration`),r=Wl(o,l),i=n(`${Rs}Delay`),c=n(`${Rs}Duration`),f=Wl(i,c);let u=null,p=0,g=0;t===Nt?r>0&&(u=Nt,p=r,g=l.length):t===Rs?f>0&&(u=Rs,p=f,g=c.length):(p=Math.max(r,f),u=p>0?r>f?Nt:Rs:null,g=u?u===Nt?l.length:c.length:0);const h=u===Nt&&/\b(?:transform|all)(?:,|$)/.test(n(`${Nt}Property`).toString());return{type:u,timeout:p,propCount:g,hasTransform:h}}function Wl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Kl(s)+Kl(e[n])))}function Kl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Oo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Su(e,t,s){const n=e[ws];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const En=Symbol("_vod"),il=Symbol("_vsh"),Gl={name:"show",beforeMount(e,{value:t},{transition:s}){e[En]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Ps(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Ps(e,!0),n.enter(e)):n.leave(e,()=>{Ps(e,!1)}):Ps(e,t))},beforeUnmount(e,{value:t}){Ps(e,t)}};function Ps(e,t){e.style.display=t?e[En]:"none",e[il]=!t}const Eu=Symbol(""),Tu=/(?:^|;)\s*display\s*:/;function $u(e,t,s){const n=e.style,o=Ce(s);let l=!1;if(s&&!o){if(t)if(Ce(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();s[i]==null&&Ns(n,i,"")}else for(const r in t)s[r]==null&&Ns(n,r,"");for(const r in s){r==="display"&&(l=!0);const i=s[r];i!=null?Iu(e,r,!Ce(t)&&t?t[r]:void 0,i)||Ns(n,r,i):Ns(n,r,"")}}else if(o){if(t!==s){const r=n[Eu];r&&(s+=";"+r),n.cssText=s,l=Tu.test(s)}}else t&&e.removeAttribute("style");En in e&&(e[En]=l?n.display:"",e[il]&&(n.display="none"))}const ql=/\s*!important$/;function Ns(e,t,s){if(X(s))s.forEach(n=>Ns(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Au(e,t);ql.test(s)?e.setProperty(as(n),s.replace(ql,""),"important"):e[n]=s}}const zl=["Webkit","Moz","ms"],po={};function Au(e,t){const s=po[t];if(s)return s;let n=Ge(t);if(n!=="filter"&&n in e)return po[t]=n;n=Mn(n);for(let o=0;o<zl.length;o++){const l=zl[o]+n;if(l in e)return po[t]=l}return t}function Iu(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ce(n)&&s===n}const Zl="http://www.w3.org/1999/xlink";function Jl(e,t,s,n,o,l=La(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zl,t.slice(6,t.length)):e.setAttributeNS(Zl,t,s):s==null||l&&!Pr(s)?e.removeAttribute(t):e.setAttribute(t,l?"":Xe(s)?String(s):s)}function Yl(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Wi(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const i=l==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(i!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const i=typeof e[t];i==="boolean"?s=Pr(s):s==null&&i==="string"?(s="",r=!0):i==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(o||t)}function ts(e,t,s,n){e.addEventListener(t,s,n)}function Ru(e,t,s,n){e.removeEventListener(t,s,n)}const Ql=Symbol("_vei");function Pu(e,t,s,n,o=null){const l=e[Ql]||(e[Ql]={}),r=l[t];if(n&&r)r.value=n;else{const[i,c]=Lu(t);if(n){const f=l[t]=ju(n,o);ts(e,i,f,c)}else r&&(Ru(e,i,r,c),l[t]=void 0)}}const Ou=/(Once|Passive|Capture)$/,Mu=/^on:?(?:Once|Passive|Capture)$/;function Lu(e){let t,s;for(;(s=e.match(Ou))&&!Mu.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):as(e.slice(2)),t]}let ho=0;const Nu=Promise.resolve(),Vu=()=>ho||(Nu.then(()=>ho=0),ho=Date.now());function ju(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(X(o)){const l=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{l.call(n),n._stopped=!0};const r=o.slice(),i=[n];for(let c=0;c<r.length&&!n._stopped;c++){const f=r[c];f&&ot(f,t,5,i)}}else ot(o,t,5,[n])};return s.value=e,s.attached=Vu(),s}const Xl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Du=(e,t,s,n,o,l)=>{const r=o==="svg";t==="class"?Su(e,n,r):t==="style"?$u(e,s,n):An(t)?In(t)||Pu(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Bu(e,t,n,r))?(Yl(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jl(e,t,n,r,l,t!=="value")):e._isVueCE&&(Fu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(n)))?Yl(e,Ge(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Jl(e,t,n,r))};function Bu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xl(t)&&le(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Xl(t)&&Ce(s)?!1:t in e}function Fu(e,t){const s=e._def.props;if(!s)return!1;const n=Ge(t);return Array.isArray(s)?s.some(o=>Ge(o)===n):Object.keys(s).some(o=>Ge(o)===n)}const Zi=new WeakMap,Ji=new WeakMap,Tn=Symbol("_moveCb"),er=Symbol("_enterCb"),Uu=e=>(delete e.props.mode,e),Hu=Uu({name:"TransitionGroup",props:Pe({},Gi,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=Ts(),n=ui();let o,l;return bi(()=>{if(!o.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!qu(o[0].el,s.vnode.el,r)){o=[];return}o.forEach(Wu),o.forEach(Ku);const i=o.filter(Gu);Oo(s.vnode.el),i.forEach(c=>{const f=c.el,u=f.style;ht(f,r),u.transform=u.webkitTransform=u.transitionDuration="";const p=f[Tn]=g=>{g&&g.target!==f||(!g||g.propertyName.endsWith("transform"))&&(f.removeEventListener("transitionend",p),f[Tn]=null,Bt(f,r))};f.addEventListener("transitionend",p)}),o=[]}),()=>{const r=pe(e),i=qi(r);let c=r.tag||ae;if(o=[],l)for(let f=0;f<l.length;f++){const u=l[f];u.el&&u.el instanceof Element&&!u.el[il]&&(o.push(u),is(u,Zs(u,i,n,s)),Zi.set(u,Yi(u.el)))}l=t.default?tl(t.default()):[];for(let f=0;f<l.length;f++){const u=l[f];u.key!=null&&is(u,Zs(u,i,n,s))}return fe(c,null,l)}}}),al=Hu;function Wu(e){const t=e.el;t[Tn]&&t[Tn](),t[er]&&t[er]()}function Ku(e){Ji.set(e,Yi(e.el))}function Gu(e){const t=Zi.get(e),s=Ji.get(e),n=t.left-s.left,o=t.top-s.top;if(n||o){const l=e.el,r=l.style,i=l.getBoundingClientRect();let c=1,f=1;return l.offsetWidth&&(c=i.width/l.offsetWidth),l.offsetHeight&&(f=i.height/l.offsetHeight),(!Number.isFinite(c)||c===0)&&(c=1),(!Number.isFinite(f)||f===0)&&(f=1),Math.abs(c-1)<.01&&(c=1),Math.abs(f-1)<.01&&(f=1),r.transform=r.webkitTransform=`translate(${n/c}px,${o/f}px)`,r.transitionDuration="0s",e}}function Yi(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function qu(e,t,s){const n=e.cloneNode(),o=e[ws];o&&o.forEach(i=>{i.split(/\s+/).forEach(c=>c&&n.classList.remove(c))}),s.split(/\s+/).forEach(i=>i&&n.classList.add(i)),n.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(n);const{hasTransform:r}=zi(n);return l.removeChild(n),r}const $n=e=>{const t=e.props["onUpdate:modelValue"]||!1;return X(t)?s=>pn(t,s):t};function zu(e){e.target.composing=!0}function tr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ss=Symbol("_assign"),dn=Symbol("_initialValue");function mo(e,t,s){return t&&(e=e.trim()),s&&(e=Ko(e)),e}const Ie={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e.parentNode&&(e.type==="text"?e[dn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[dn]=e.defaultValue.replace(/\r\n?/g,`
`))),e[ss]=$n(o);const l=n||o.props&&o.props.type==="number";ts(e,t?"change":"input",r=>{r.target.composing||e[ss](mo(e.value,s,l))}),(s||l)&&ts(e,"change",()=>{e.value=mo(e.value,s,l)}),t||(ts(e,"compositionstart",zu),ts(e,"compositionend",tr),ts(e,"change",tr))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const o=t??"",l=e[dn];delete e[dn],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[ss](mo(e.value,s,n)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:l}},r){if(e[ss]=$n(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?Ko(e.value):e.value,c=t??"";if(i===c)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},Zt={deep:!0,created(e,t,s){e[ss]=$n(s),ts(e,"change",()=>{const n=e._modelValue,o=Zu(e),l=e.checked,r=e[ss];if(X(n)){const i=Or(n,o),c=i!==-1;if(l&&!c)r(n.concat(o));else if(!l&&c){const f=[...n];f.splice(i,1),r(f)}}else if(Rn(n)){const i=new Set(n);l?i.add(o):i.delete(o),r(i)}else r(Qi(e,l))})},mounted:sr,beforeUpdate(e,t,s){e[ss]=$n(s),sr(e,t,s)}};function sr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(X(t))o=Or(t,n.props.value)>-1;else if(Rn(t))o=t.has(n.props.value);else{if(t===s)return;o=nn(t,Qi(e,!0))}e.checked!==o&&(e.checked=o)}function Zu(e){return"_value"in e?e._value:e.value}function Qi(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ju=["ctrl","shift","alt","meta"],Yu={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)=>Ju.some(s=>e[`${s}Key`]&&!t.includes(s))},rs=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...l)=>{for(let r=0;r<t.length;r++){const i=Yu[t[r]];if(i&&i(o,t))return}return e(o,...l)}))},Qu=Pe({patchProp:Du},yu);let nr;function Xu(){return nr||(nr=su(Qu))}const ef=((...e)=>{const t=Xu().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=sf(n);if(!o)return;const l=t._component;!le(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=s(o,!1,tf(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function tf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sf(e){return Ce(e)?document.querySelector(e):e}let Xi;const qn=e=>Xi=e,ea=Symbol();function Mo(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ws;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ws||(Ws={}));function nf(){const e=Vr(!0),t=e.run(()=>Z({}));let s=[],n=[];const o=Qo({install(l){qn(o),o._a=l,l.provide(ea,o),l.config.globalProperties.$pinia=o,n.forEach(r=>s.push(r)),n=[]},use(l){return this._a?s.push(l):n.push(l),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return o}const ta=()=>{};function or(e,t,s,n=ta){e.add(t);const o=()=>{e.delete(t)&&n()};return!s&&jr()&&Va(o),o}function ps(e,...t){e.forEach(s=>{s(...t)})}const of=e=>e(),lr=Symbol(),go=Symbol();function Lo(e,t){e instanceof Map&&t instanceof Map?t.forEach((s,n)=>e.set(n,s)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],o=e[s];Mo(o)&&Mo(n)&&e.hasOwnProperty(s)&&!$e(n)&&!At(n)?e[s]=Lo(o,n):e[s]=n}return e}const lf=Symbol();function rf(e){return!Mo(e)||!Object.prototype.hasOwnProperty.call(e,lf)}const{assign:Ft}=Object;function af(e){return!!($e(e)&&e.effect)}function cf(e,t,s,n){const{state:o,actions:l,getters:r}=t,i=s.state.value[e];let c;function f(){i||(s.state.value[e]=o?o():{});const u=lc(s.state.value[e]);return Ft(u,l,Object.keys(r||{}).reduce((p,g)=>(p[g]=Qo(he(()=>{qn(s);const h=s._s.get(e);return r[g].call(h,h)})),p),{}))}return c=sa(e,f,t,s,n,!0),c}function sa(e,t,s={},n,o,l){let r;const i=Ft({actions:{}},s),c={deep:!0};let f,u,p=new Set,g=new Set,h;const C=n.state.value[e];!l&&!C&&(n.state.value[e]={});let w;function L(H){let M;f=u=!1,typeof H=="function"?(H(n.state.value[e]),M={type:Ws.patchFunction,storeId:e,events:h}):(Lo(n.state.value[e],H),M={type:Ws.patchObject,payload:H,storeId:e,events:h});const z=w=Symbol();yt().then(()=>{w===z&&(f=!0)}),u=!0,ps(p,M,n.state.value[e])}const T=l?function(){const{state:M}=s,z=M?M():{};this.$patch(oe=>{Ft(oe,z)})}:ta;function y(){r.stop(),p.clear(),g.clear(),n._s.delete(e)}const d=(H,M="")=>{if(lr in H)return H[go]=M,H;const z=function(){qn(n);const oe=Array.from(arguments),F=new Set,J=new Set;function P(se){F.add(se)}function te(se){J.add(se)}ps(g,{args:oe,name:z[go],store:x,after:P,onError:te});let ue;try{ue=H.apply(this&&this.$id===e?this:x,oe)}catch(se){throw ps(J,se),se}return ue instanceof Promise?ue.then(se=>(ps(F,se),se)).catch(se=>(ps(J,se),Promise.reject(se))):(ps(F,ue),ue)};return z[lr]=!0,z[go]=M,z},b={_p:n,$id:e,$onAction:or.bind(null,g),$patch:L,$reset:T,$subscribe(H,M={}){const z=or(p,H,M.detached,()=>oe()),oe=r.run(()=>Ve(()=>n.state.value[e],F=>{(M.flush==="sync"?u:f)&&H({storeId:e,type:Ws.direct,events:h},F)},Ft({},c,M)));return z},$dispose:y},x=Ot(b);n._s.set(e,x);const j=(n._a&&n._a.runWithContext||of)(()=>n._e.run(()=>(r=Vr()).run(()=>t({action:d}))));for(const H in j){const M=j[H];if($e(M)&&!af(M)||At(M))l||(C&&rf(M)&&($e(M)?M.value=C[H]:Lo(M,C[H])),n.state.value[e][H]=M);else if(typeof M=="function"){const z=d(M,H);j[H]=z,i.actions[H]=M}}return Ft(x,j),Ft(pe(x),j),Object.defineProperty(x,"$state",{get:()=>n.state.value[e],set:H=>{L(M=>{Ft(M,H)})}}),n._p.forEach(H=>{Ft(x,r.run(()=>H({store:x,app:n._a,pinia:n,options:i})))}),C&&l&&s.hydrate&&s.hydrate(x.$state,C),f=!0,u=!0,x}function cl(e,t,s){let n;const o=typeof t=="function";n=o?s:t;function l(r,i){const c=mc();return r=r||(c?Qe(ea,null):null),r&&qn(r),r=Xi,r._s.has(e)||(o?sa(e,t,n,r):cf(e,n,r)),r._s.get(e)}return l.$id=e,l}const vs=typeof document<"u";function na(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function uf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&na(e.default)}const ge=Object.assign;function vo(e,t){const s={};for(const n in t){const o=t[n];s[n]=it(o)?o.map(e):e(o)}return s}const Ks=()=>{},it=Array.isArray;function rr(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}const oa=/#/g,ff=/&/g,df=/\//g,pf=/=/g,hf=/\?/g,la=/\+/g,mf=/%5B/g,gf=/%5D/g,ra=/%5E/g,vf=/%60/g,ia=/%7B/g,bf=/%7C/g,aa=/%7D/g,xf=/%20/g;function ul(e){return e==null?"":encodeURI(""+e).replace(bf,"|").replace(mf,"[").replace(gf,"]")}function _f(e){return ul(e).replace(ia,"{").replace(aa,"}").replace(ra,"^")}function No(e){return ul(e).replace(la,"%2B").replace(xf,"+").replace(oa,"%23").replace(ff,"%26").replace(vf,"`").replace(ia,"{").replace(aa,"}").replace(ra,"^")}function yf(e){return No(e).replace(pf,"%3D")}function kf(e){return ul(e).replace(oa,"%23").replace(hf,"%3F")}function wf(e){return kf(e).replace(df,"%2F")}function en(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Cf=/\/$/,Sf=e=>e.replace(Cf,"");function bo(e,t,s="/"){let n,o={},l="",r="";const i=t.indexOf("#");let c=t.indexOf("?");return c=i>=0&&c>i?-1:c,c>=0&&(n=t.slice(0,c),l=t.slice(c,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(n=n||t.slice(0,i),r=t.slice(i,t.length)),n=Af(n??t,s),{fullPath:n+l+r,path:n,query:o,hash:en(r)}}function Ef(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function ir(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Tf(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&Cs(t.matched[n],s.matched[o])&&ca(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function Cs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ca(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!$f(e[s],t[s]))return!1;return!0}function $f(e,t){return it(e)?ar(e,t):it(t)?ar(t,e):e?.valueOf()===t?.valueOf()}function ar(e,t){return it(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function Af(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),o=n[n.length-1];(o===".."||o===".")&&n.push("");let l=s.length-1,r,i;for(r=0;r<n.length;r++)if(i=n[r],i!==".")if(i==="..")l>1&&l--;else break;return s.slice(0,l).join("/")+"/"+n.slice(r).join("/")}const Vt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Vo=(function(e){return e.pop="pop",e.push="push",e})({}),xo=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function If(e){if(!e)if(vs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Sf(e)}const Rf=/^[^#]+#/;function Pf(e,t){return e.replace(Rf,"#")+t}function Of(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const zn=()=>({left:window.scrollX,top:window.scrollY});function Mf(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=Of(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function cr(e,t){return(history.state?history.state.position-t:-1)+e}const jo=new Map;function Lf(e,t){jo.set(e,t)}function Nf(e){const t=jo.get(e);return jo.delete(e),t}function Vf(e){return typeof e=="string"||e&&typeof e=="object"}function ua(e){return typeof e=="string"||typeof e=="symbol"}let Se=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const fa=Symbol("");Se.MATCHER_NOT_FOUND+"",Se.NAVIGATION_GUARD_REDIRECT+"",Se.NAVIGATION_ABORTED+"",Se.NAVIGATION_CANCELLED+"",Se.NAVIGATION_DUPLICATED+"";function Ss(e,t){return ge(new Error,{type:e,[fa]:!0},t)}function Ct(e,t){return e instanceof Error&&fa in e&&(t==null||!!(e.type&t))}const jf=["params","query","hash"];function Df(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of jf)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Bf(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<s.length;++n){const o=s[n].replace(la," "),l=o.indexOf("="),r=en(l<0?o:o.slice(0,l)),i=l<0?null:en(o.slice(l+1));if(r in t){let c=t[r];it(c)||(c=t[r]=[c]),c.push(i)}else t[r]=i}return t}function ur(e){let t="";for(let s in e){const n=e[s];if(s=yf(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(it(n)?n.map(o=>o&&No(o)):[n&&No(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Ff(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=it(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}const Uf=Symbol(""),fr=Symbol(""),Zn=Symbol(""),fl=Symbol(""),Do=Symbol("");function Os(){let e=[];function t(n){return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Ht(e,t,s,n,o,l=r=>r()){const r=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const f=g=>{g===!1?c(Ss(Se.NAVIGATION_ABORTED,{from:s,to:t})):g instanceof Error?c(g):Vf(g)?c(Ss(Se.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(r&&n.enterCallbacks[o]===r&&typeof g=="function"&&r.push(g),i())},u=l(()=>e.call(n&&n.instances[o],t,s,f));let p=Promise.resolve(u);e.length<3&&(p=p.then(f)),p.catch(g=>c(g))})}function _o(e,t,s,n,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let c=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(na(c)){const f=(c.__vccOpts||c)[t];f&&l.push(Ht(f,s,n,r,i,o))}else{let f=c();l.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const p=uf(u)?u.default:u;r.mods[i]=u,r.components[i]=p;const g=(p.__vccOpts||p)[t];return g&&Ht(g,s,n,r,i,o)()}))}}return l}function Hf(e,t){const s=[],n=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;r<l;r++){const i=t.matched[r];i&&(e.matched.find(f=>Cs(f,i))?n.push(i):s.push(i));const c=e.matched[r];c&&(t.matched.find(f=>Cs(f,c))||o.push(c))}return[s,n,o]}let Wf=()=>location.protocol+"//"+location.host;function da(e,t){const{pathname:s,search:n,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),ir(i,"")}return ir(s,e)+n+o}function Kf(e,t,s,n){let o=[],l=[],r=null;const i=({state:g})=>{const h=da(e,location),C=s.value,w=t.value;let L=0;if(g){if(s.value=h,t.value=g,r&&r===C){r=null;return}L=w?g.position-w.position:0}else n(h);o.forEach(T=>{T(s.value,C,{delta:L,type:Vo.pop,direction:L?L>0?xo.forward:xo.back:xo.unknown})})};function c(){r=s.value}function f(g){o.push(g);const h=()=>{const C=o.indexOf(g);C>-1&&o.splice(C,1)};return l.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ge({},g.state,{scroll:zn()}),"")}}function p(){for(const g of l)g();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:f,destroy:p}}function dr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?zn():null}}function Gf(e){const{history:t,location:s}=window,n={value:da(e,s)},o={value:t.state};o.value||l(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(c,f,u){const p=e.indexOf("#"),g=p>-1?(s.host&&document.querySelector("base")?e:e.slice(p))+c:Wf()+e+c;try{t[u?"replaceState":"pushState"](f,"",g),o.value=f}catch(h){console.error(h),s[u?"replace":"assign"](g)}}function r(c,f){l(c,ge({},t.state,dr(o.value.back,c,o.value.forward,!0),f,{position:o.value.position}),!0),n.value=c}function i(c,f){const u=ge({},o.value,t.state,{forward:c,scroll:zn()});l(u.current,u,!0),l(c,ge({},dr(n.value,c,null),{position:u.position+1},f),!1),n.value=c}return{location:n,state:o,push:i,replace:r}}function qf(e){e=If(e);const t=Gf(e),s=Kf(e,t.state,t.location,t.replace);function n(l,r=!0){r||s.pauseListeners(),history.go(l)}const o=ge({location:"",base:e,go:n,createHref:Pf.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function zf(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),qf(e)}let ns=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Oe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Oe||{});const Zf={type:ns.Static,value:""},Jf=/[a-zA-Z0-9_]/;function Yf(e){if(!e)return[[]];if(e==="/")return[[Zf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${s})/"${f}": ${h}`)}let s=Oe.Static,n=s;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,c,f="",u="";function p(){f&&(s===Oe.Static?l.push({type:ns.Static,value:f}):s===Oe.Param||s===Oe.ParamRegExp||s===Oe.ParamRegExpEnd?(l.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),l.push({type:ns.Param,value:f,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=c}for(;i<e.length;){if(c=e[i++],c==="\\"&&s!==Oe.ParamRegExp){n=s,s=Oe.EscapeNext;continue}switch(s){case Oe.Static:c==="/"?(f&&p(),r()):c===":"?(p(),s=Oe.Param):g();break;case Oe.EscapeNext:g(),s=n;break;case Oe.Param:c==="("?s=Oe.ParamRegExp:Jf.test(c)?g():(p(),s=Oe.Static,c!=="*"&&c!=="?"&&c!=="+"&&i--);break;case Oe.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:s=Oe.ParamRegExpEnd:u+=c;break;case Oe.ParamRegExpEnd:p(),s=Oe.Static,c!=="*"&&c!=="?"&&c!=="+"&&i--,u="";break;default:t("Unknown state");break}}return s===Oe.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),p(),r(),o}const pr="[^/]+?",Qf={sensitive:!1,strict:!1,start:!0,end:!0};var We=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(We||{});const Xf=/[.+*?^${}()[\]/\\]/g;function ed(e,t){const s=ge({},Qf,t),n=[];let o=s.start?"^":"";const l=[];for(const f of e){const u=f.length?[]:[We.Root];s.strict&&!f.length&&(o+="/");for(let p=0;p<f.length;p++){const g=f[p];let h=We.Segment+(s.sensitive?We.BonusCaseSensitive:0);if(g.type===ns.Static)p||(o+="/"),o+=g.value.replace(Xf,"\\$&"),h+=We.Static;else if(g.type===ns.Param){const{value:C,repeatable:w,optional:L,regexp:T}=g;l.push({name:C,repeatable:w,optional:L});const y=T||pr;if(y!==pr){h+=We.BonusCustomRegExp;try{`${y}`}catch(b){throw new Error(`Invalid custom RegExp for param "${C}" (${y}): `+b.message)}}let d=w?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;p||(d=L&&f.length<2?`(?:/${d})`:"/"+d),L&&(d+="?"),o+=d,h+=We.Dynamic,L&&(h+=We.BonusOptional),w&&(h+=We.BonusRepeatable),y===".*"&&(h+=We.BonusWildcard)}u.push(h)}n.push(u)}if(s.strict&&s.end){const f=n.length-1;n[f][n[f].length-1]+=We.BonusStrict}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const r=new RegExp(o,s.sensitive?"":"i");function i(f){const u=f.match(r),p={};if(!u)return null;for(let g=1;g<u.length;g++){const h=u[g]||"",C=l[g-1];p[C.name]=h&&C.repeatable?h.split("/"):h}return p}function c(f){let u="",p=!1;for(const g of e){(!p||!u.endsWith("/"))&&(u+="/"),p=!1;for(const h of g)if(h.type===ns.Static)u+=h.value;else if(h.type===ns.Param){const{value:C,repeatable:w,optional:L}=h,T=C in f?f[C]:"";if(it(T)&&!w)throw new Error(`Provided param "${C}" is an array but it is not repeatable (* or + modifiers)`);const y=it(T)?T.join("/"):T;if(!y)if(L)g.length<2&&(u.endsWith("/")?u=u.slice(0,-1):p=!0);else throw new Error(`Missing required param "${C}"`);u+=y}}return u||"/"}return{re:r,score:n,keys:l,parse:i,stringify:c}}function td(e,t){let s=0;for(;s<e.length&&s<t.length;){const n=t[s]-e[s];if(n)return n;s++}return e.length<t.length?e.length===1&&e[0]===We.Static+We.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===We.Static+We.Segment?1:-1:0}function pa(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const l=td(n[s],o[s]);if(l)return l;s++}if(Math.abs(o.length-n.length)===1){if(hr(n))return 1;if(hr(o))return-1}return o.length-n.length}function hr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const sd={strict:!1,end:!0,sensitive:!1};function nd(e,t,s){const n=ed(Yf(e.path),s),o=ge(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function od(e,t){const s=[],n=new Map;t=rr(sd,t);function o(p){return n.get(p)}function l(p,g,h){const C=!h,w=gr(p);w.aliasOf=h&&h.record;const L=rr(t,p),T=[w];if("alias"in p){const b=typeof p.alias=="string"?[p.alias]:p.alias;for(const x of b)T.push(gr(ge({},w,{components:h?h.record.components:w.components,path:x,aliasOf:h?h.record:w})))}let y,d;for(const b of T){const{path:x}=b;if(g&&x[0]!=="/"){const V=g.record.path,j=V[V.length-1]==="/"?"":"/";b.path=g.record.path+(x&&j+x)}if(y=nd(b,g,L),h?h.alias.push(y):(d=d||y,d!==y&&d.alias.push(y),C&&p.name&&!vr(y)&&r(p.name)),ha(y)&&c(y),w.children){const V=w.children;for(let j=0;j<V.length;j++)l(V[j],y,h&&h.children[j])}h=h||y}return d?()=>{r(d)}:Ks}function r(p){if(ua(p)){const g=n.get(p);g&&(n.delete(p),s.splice(s.indexOf(g),1),g.children.forEach(r),g.alias.forEach(r))}else{const g=s.indexOf(p);g>-1&&(s.splice(g,1),p.record.name&&n.delete(p.record.name),p.children.forEach(r),p.alias.forEach(r))}}function i(){return s}function c(p){const g=id(p,s);s.splice(g,0,p),p.record.name&&!vr(p)&&n.set(p.record.name,p)}function f(p,g){let h,C={},w,L;if("name"in p&&p.name){if(h=n.get(p.name),!h)throw Ss(Se.MATCHER_NOT_FOUND,{location:p});L=h.record.name,C=ge(mr(g.params,h.keys.filter(d=>!d.optional).concat(h.parent?h.parent.keys.filter(d=>d.optional):[]).map(d=>d.name)),p.params&&mr(p.params,h.keys.map(d=>d.name))),w=h.stringify(C)}else if(p.path!=null)w=p.path,h=s.find(d=>d.re.test(w)),h&&(C=h.parse(w),L=h.record.name);else{if(h=g.name?n.get(g.name):s.find(d=>d.re.test(g.path)),!h)throw Ss(Se.MATCHER_NOT_FOUND,{location:p,currentLocation:g});L=h.record.name,C=ge({},g.params,p.params),w=h.stringify(C)}const T=[];let y=h;for(;y;)T.unshift(y.record),y=y.parent;return{name:L,path:w,params:C,matched:T,meta:rd(T)}}e.forEach(p=>l(p));function u(){s.length=0,n.clear()}return{addRoute:l,resolve:f,removeRoute:r,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function mr(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function gr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ld(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ld(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function vr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function rd(e){return e.reduce((t,s)=>ge(t,s.meta),{})}function id(e,t){let s=0,n=t.length;for(;s!==n;){const l=s+n>>1;pa(e,t[l])<0?n=l:s=l+1}const o=ad(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function ad(e){let t=e;for(;t=t.parent;)if(ha(t)&&pa(e,t)===0)return t}function ha({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function br(e){const t=Qe(Zn),s=Qe(fl),n=he(()=>{const c=R(e.to);return t.resolve(c)}),o=he(()=>{const{matched:c}=n.value,{length:f}=c,u=c[f-1],p=s.matched;if(!u||!p.length)return-1;const g=p.findIndex(Cs.bind(null,u));if(g>-1)return g;const h=xr(c[f-2]);return f>1&&xr(u)===h&&p[p.length-1].path!==h?p.findIndex(Cs.bind(null,c[f-2])):g}),l=he(()=>o.value>-1&&pd(s.params,n.value.params)),r=he(()=>o.value>-1&&o.value===s.matched.length-1&&ca(s.params,n.value.params));function i(c={}){if(dd(c)){const f=t[R(e.replace)?"replace":"push"](R(e.to)).catch(Ks);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:n,href:he(()=>n.value.href),isActive:l,isExactActive:r,navigate:i}}function cd(e){return e.length===1?e[0]:e}const ud=mi({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"},viewTransition:Boolean},useLink:br,setup(e,{slots:t}){const s=Ot(br(e)),{options:n}=Qe(Zn),o=he(()=>({[_r(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[_r(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const l=t.default&&cd(t.default(s));return e.custom?l:rl("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},l)}}}),fd=ud;function dd(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 pd(e,t){for(const s in t){const n=t[s],o=e[s];if(typeof n=="string"){if(n!==o)return!1}else if(!it(o)||o.length!==n.length||n.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function xr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const _r=(e,t,s)=>e??t??s,hd=mi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=Qe(Do),o=he(()=>e.route||n.value),l=Qe(fr,0),r=he(()=>{let f=R(l);const{matched:u}=o.value;let p;for(;(p=u[f])&&!p.components;)f++;return f}),i=he(()=>o.value.matched[r.value]);Fs(fr,he(()=>r.value+1)),Fs(Uf,i),Fs(Do,o);const c=Z();return Ve(()=>[c.value,i.value,e.name],([f,u,p],[g,h,C])=>{u&&(u.instances[p]=f,h&&h!==u&&f&&f===g&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),f&&u&&(!h||!Cs(u,h)||!g)&&(u.enterCallbacks[p]||[]).forEach(w=>w(f))},{flush:"post"}),()=>{const f=o.value,u=e.name,p=i.value,g=p&&p.components[u];if(!g)return yr(s.default,{Component:g,route:f});const h=p.props[u],C=h?h===!0?f.params:typeof h=="function"?h(f):h:null,L=rl(g,ge({},C,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(p.instances[u]=null)},ref:c}));return yr(s.default,{Component:L,route:f})||L}}});function yr(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const md=hd;function gd(e){const t=od(e.routes,e),s=e.parseQuery||Bf,n=e.stringifyQuery||ur,o=e.history,l=Os(),r=Os(),i=Os(),c=sc(Vt);let f=Vt;vs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vo.bind(null,A=>""+A),p=vo.bind(null,wf),g=vo.bind(null,en);function h(A,q){let W,Y;return ua(A)?(W=t.getRecordMatcher(A),Y=q):Y=A,t.addRoute(Y,W)}function C(A){const q=t.getRecordMatcher(A);q&&t.removeRoute(q)}function w(){return t.getRoutes().map(A=>A.record)}function L(A){return!!t.getRecordMatcher(A)}function T(A,q){if(q=ge({},q||c.value),typeof A=="string"){const _=bo(s,A,q.path),$=t.resolve({path:_.path},q),I=o.createHref(_.fullPath);return ge(_,$,{params:g($.params),hash:en(_.hash),redirectedFrom:void 0,href:I})}let W;if(A.path!=null)W=ge({},A,{path:bo(s,A.path,q.path).path});else{const _=ge({},A.params);for(const $ in _)_[$]==null&&delete _[$];W=ge({},A,{params:p(_)}),q.params=p(q.params)}const Y=t.resolve(W,q),de=A.hash||"";Y.params=u(g(Y.params));const m=Ef(n,ge({},A,{hash:_f(de),path:Y.path})),v=o.createHref(m);return ge({fullPath:m,hash:de,query:n===ur?Ff(A.query):A.query||{}},Y,{redirectedFrom:void 0,href:v})}function y(A){return typeof A=="string"?bo(s,A,c.value.path):ge({},A)}function d(A,q){if(f!==A)return Ss(Se.NAVIGATION_CANCELLED,{from:q,to:A})}function b(A){return j(A)}function x(A){return b(ge(y(A),{replace:!0}))}function V(A,q){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:Y}=W;let de=typeof Y=="function"?Y(A,q):Y;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=y(de):{path:de},de.params={}),ge({query:A.query,hash:A.hash,params:de.path!=null?{}:A.params},de)}}function j(A,q){const W=f=T(A),Y=c.value,de=A.state,m=A.force,v=A.replace===!0,_=V(W,Y);if(_)return j(ge(y(_),{state:typeof _=="object"?ge({},de,_.state):de,force:m,replace:v}),q||W);const $=W;$.redirectedFrom=q;let I;return!m&&Tf(n,Y,W)&&(I=Ss(Se.NAVIGATION_DUPLICATED,{to:$,from:Y}),ct(Y,Y,!0,!1)),(I?Promise.resolve(I):z($,Y)).catch(E=>Ct(E)?Ct(E,Se.NAVIGATION_GUARD_REDIRECT)?E:qe(E):ie(E,$,Y)).then(E=>{if(E){if(Ct(E,Se.NAVIGATION_GUARD_REDIRECT))return j(ge({replace:v},y(E.to),{state:typeof E.to=="object"?ge({},de,E.to.state):de,force:m}),q||$)}else E=F($,Y,!0,v,de);return oe($,Y,E),E})}function H(A,q){const W=d(A,q);return W?Promise.reject(W):Promise.resolve()}function M(A){const q=fs.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(A):A()}function z(A,q){let W;const[Y,de,m]=Hf(A,q);W=_o(Y.reverse(),"beforeRouteLeave",A,q);for(const _ of Y)_.leaveGuards.forEach($=>{W.push(Ht($,A,q))});const v=H.bind(null,A,q);return W.push(v),tt(W).then(()=>{W=[];for(const _ of l.list())W.push(Ht(_,A,q));return W.push(v),tt(W)}).then(()=>{W=_o(de,"beforeRouteUpdate",A,q);for(const _ of de)_.updateGuards.forEach($=>{W.push(Ht($,A,q))});return W.push(v),tt(W)}).then(()=>{W=[];for(const _ of m)if(_.beforeEnter)if(it(_.beforeEnter))for(const $ of _.beforeEnter)W.push(Ht($,A,q));else W.push(Ht(_.beforeEnter,A,q));return W.push(v),tt(W)}).then(()=>(A.matched.forEach(_=>_.enterCallbacks={}),W=_o(m,"beforeRouteEnter",A,q,M),W.push(v),tt(W))).then(()=>{W=[];for(const _ of r.list())W.push(Ht(_,A,q));return W.push(v),tt(W)}).catch(_=>Ct(_,Se.NAVIGATION_CANCELLED)?_:Promise.reject(_))}function oe(A,q,W){i.list().forEach(Y=>M(()=>Y(A,q,W)))}function F(A,q,W,Y,de){const m=d(A,q);if(m)return m;const v=q===Vt,_=vs?history.state:{};W&&(Y||v?o.replace(A.fullPath,ge({scroll:v&&_&&_.scroll},de)):o.push(A.fullPath,de)),c.value=A,ct(A,q,W,v),qe()}let J;function P(){J||(J=o.listen((A,q,W)=>{if(!Kt.listening)return;const Y=T(A),de=V(Y,Kt.currentRoute.value);if(de){j(ge(de,{replace:!0,force:!0}),Y).catch(Ks);return}f=Y;const m=c.value;vs&&Lf(cr(m.fullPath,W.delta),zn()),z(Y,m).catch(v=>Ct(v,Se.NAVIGATION_ABORTED|Se.NAVIGATION_CANCELLED)?v:Ct(v,Se.NAVIGATION_GUARD_REDIRECT)?(j(ge(y(v.to),{force:!0}),Y).then(_=>{Ct(_,Se.NAVIGATION_ABORTED|Se.NAVIGATION_DUPLICATED)&&!W.delta&&W.type===Vo.pop&&o.go(-1,!1)}).catch(Ks),Promise.reject()):(W.delta&&o.go(-W.delta,!1),ie(v,Y,m))).then(v=>{v=v||F(Y,m,!1),v&&(W.delta&&!Ct(v,Se.NAVIGATION_CANCELLED)?o.go(-W.delta,!1):W.type===Vo.pop&&Ct(v,Se.NAVIGATION_ABORTED|Se.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),oe(Y,m,v)}).catch(Ks)}))}let te=Os(),ue=Os(),se;function ie(A,q,W){qe(A);const Y=ue.list();return Y.length?Y.forEach(de=>de(A,q,W)):console.error(A),Promise.reject(A)}function Fe(){return se&&c.value!==Vt?Promise.resolve():new Promise((A,q)=>{te.add([A,q])})}function qe(A){return se||(se=!A,P(),te.list().forEach(([q,W])=>A?W(A):q()),te.reset()),A}function ct(A,q,W,Y){const{scrollBehavior:de}=e;if(!vs||!de)return Promise.resolve();const m=!W&&Nf(cr(A.fullPath,0))||(Y||!W)&&history.state&&history.state.scroll||null;return yt().then(()=>de(A,q,m)).then(v=>v&&Mf(v)).catch(v=>ie(v,A,q))}const ze=A=>o.go(A);let us;const fs=new Set,Kt={currentRoute:c,listening:!0,addRoute:h,removeRoute:C,clearRoutes:t.clearRoutes,hasRoute:L,getRoutes:w,resolve:T,options:e,push:b,replace:x,go:ze,back:()=>ze(-1),forward:()=>ze(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:ue.add,isReady:Fe,install(A){A.component("RouterLink",fd),A.component("RouterView",md),A.config.globalProperties.$router=Kt,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>R(c)}),vs&&!us&&c.value===Vt&&(us=!0,b(o.location).catch(Y=>{}));const q={};for(const Y in Vt)Object.defineProperty(q,Y,{get:()=>c.value[Y],enumerable:!0});A.provide(Zn,Kt),A.provide(fl,Xr(q)),A.provide(Do,c);const W=A.unmount;fs.add(A),A.unmount=function(){fs.delete(A),fs.size<1&&(f=Vt,J&&J(),J=null,c.value=Vt,us=!1,se=!1),W()}}};function tt(A){return A.reduce((q,W)=>q.then(()=>M(W)),Promise.resolve())}return Kt}function vd(){return Qe(Zn)}function ma(e){return Qe(fl)}const Jn="vnt-web-access-token",bt=!!globalThis.__VNT_DESKTOP__,Vs=new URL(window.location.href),Bo=Vs.searchParams.get("token")||"";Bo&&(localStorage.setItem(Jn,Bo),Vs.searchParams.delete("token"),window.history.replaceState({},"",`${Vs.pathname}${Vs.search}${Vs.hash}`));const Yn=Z(bt?"":Bo||localStorage.getItem(Jn)||""),dl=Z(bt||!!Yn.value),ga=()=>Yn.value,bd=e=>{const t=e.trim();localStorage.setItem(Jn,t),Yn.value=t,dl.value=!!t},xd=()=>{localStorage.removeItem(Jn),Yn.value="",dl.value=!1},et=async(e,t={})=>{if(globalThis.__VNT_IPC_REQUEST__){const r=await globalThis.__VNT_IPC_REQUEST__({method:t.method||"GET",path:e,body:t.body||null});if(r.code!==0)throw new Error(r.msg||"请求失败");return r.data}const s=new Headers(t.headers||{}),n=ga();n&&s.set("Authorization",`Bearer ${n}`);const o=await fetch(e,{...t,headers:s}),l=await o.json();if(o.status===401&&xd(),l.code!==0)throw new Error(l.msg||"请求失败");return l.data},va={"Content-Type":"application/json"},_d=e=>et(`/api/info?file_name=${encodeURIComponent(e)}`),yd=e=>et(`/api/peers?file_name=${encodeURIComponent(e)}`),kd=e=>et(`/api/routes?file_name=${encodeURIComponent(e)}`),wd=e=>et(`/api/start/status?file_name=${encodeURIComponent(e)}`),ba=()=>et("/api/version"),kr=()=>et("/api/runtime"),Cd=()=>et("/api/instances"),Sd=e=>et(`/api/instance?file_name=${encodeURIComponent(e)}`,{method:"DELETE"}),pl=(e,t)=>et(e,{method:"POST",headers:va,body:JSON.stringify({file_name:t})}),Ed=e=>pl("/api/start",e),xa=e=>pl("/api/stop",e),Td=e=>pl("/api/restart",e),$d=()=>et("/api/config/list"),Ad=e=>et(`/api/config?file_name=${encodeURIComponent(e)}`),Id=(e,t)=>et("/api/config",{method:"POST",headers:va,body:JSON.stringify({file_name:e||null,config:t})}),Rd=e=>et(`/api/config?file_name=${encodeURIComponent(e)}`,{method:"DELETE"});let Pd=0;const cs=cl("ui",()=>{const e=Z([]),t=(i,c,f=3e3)=>{const u=++Pd;e.value.push({id:u,type:i,message:c}),setTimeout(()=>{e.value=e.value.filter(p=>p.id!==u)},f)},s={success:i=>t("success",i),error:i=>t("error",i,4500),info:i=>t("info",i)},n=Ot({show:!1,title:"",message:"",danger:!1,confirmText:"确定",resolve:null});return{toasts:e,toast:s,confirmState:n,confirm:({title:i="确认操作",message:c="",danger:f=!1,confirmText:u="确定"}={})=>new Promise(p=>{n.show=!0,n.title=i,n.message=c,n.danger=f,n.confirmText=u,n.resolve=p}),confirmOk:()=>{n.show=!1,n.resolve&&n.resolve(!0),n.resolve=null},confirmCancel:()=>{n.show=!1,n.resolve&&n.resolve(!1),n.resolve=null}}}),_a=cl("startLog",()=>{const e=Z(!1),t=Z([]),s=Z("stopped"),n=Z(null),o=Z(null);let l=null,r=null,i=null,c=null;const f=({fetchInstances:T,instanceList:y,configList:d})=>{r=T,i=y,c=d},u=he(()=>{if(!n.value)return"";const T=(i?.value||[]).find(d=>d.file_name===n.value);if(T)return T.config_name||T.file_name;const y=(c?.value||[]).find(d=>d.file_name===n.value);return y?y.config_name||y.file_name:n.value}),p=async()=>{if(n.value)try{const T=await wd(n.value);t.value=T.logs||[],s.value=T.status,yt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)}),s.value==="running"?(g(),r&&r(),e.value=!1):s.value==="stopped"&&t.value.length>0&&(g(),r&&r())}catch(T){console.error(T)}},g=()=>{l&&(clearInterval(l),l=null)},h=()=>{g(),l=setInterval(p,1e3),p()};return{showStartLog:e,startLogs:t,startStatus:s,logFileName:n,logContainer:o,logConfigName:u,bindApp:f,openStartLog:T=>{n.value=T,t.value=[],s.value="starting",e.value=!0,h()},pollStartStatus:p,startPolling:h,stopPolling:g,cancelStart:async()=>{g();const T=n.value;if(T)try{await xa(T),t.value.push("启动已手动取消")}catch{}s.value="stopped",r&&r()},close:()=>{e.value=!1}}}),kt=cl("app",()=>{const e=cs(),t=_a(),s=Z({}),n=Z([]),o=Z(null),l=Z([]),r=Z({}),i=Z({}),c=Z(!document.hidden),f=()=>{c.value=!document.hidden};let u=null;const p=he(()=>n.value.filter(P=>P.status==="running").length),g=he(()=>n.value.filter(P=>P.status==="starting").length),h=he(()=>p.value>0?`运行中 x${p.value}`:g.value>0?"启动中...":"未启动"),C=he(()=>o.value&&s.value[o.value]||null),w=he(()=>{if(!o.value)return"";const P=n.value.find(te=>te.file_name===o.value);return P?P.config_name||P.file_name:o.value}),L=Z(""),T=async()=>{try{L.value=await ba()||""}catch(P){console.error("Fetch version error",P)}},y=he(()=>!!(C.value&&C.value.server_info&&C.value.server_info.some(P=>P.connected))),d=he(()=>{const P=C.value;return!P||!P.server_info||!P.server_info.length?"未配置服务器":`${P.server_info.filter(te=>te.connected).length} / ${P.server_info.length} 已连接`}),b=P=>s.value[P]||{},x=async P=>{try{s.value[P]=await _d(P)}catch(te){console.error("Fetch info error",te)}},V=async()=>{try{const P=await Cd()||[];n.value=P;for(const te of Object.keys(s.value))P.some(ue=>ue.file_name===te)||delete s.value[te];for(const te of Object.keys(i.value)){const ue=P.find(se=>se.file_name===te);(!ue||ue.status==="stopped")&&delete i.value[te]}if(!o.value||!P.some(te=>te.file_name===o.value)){const te=P.find(ue=>ue.status==="running");o.value=te?te.file_name:P.length>0?P[0].file_name:null}for(const te of P)te.status==="running"&&x(te.file_name)}catch(P){console.error("Fetch instances error",P)}},j=async()=>{try{l.value=await $d()||[]}catch(P){console.error("Fetch list error",P)}},H=async P=>{if(!P){e.toast.error("请先选择一个配置");return}if(!r.value[P]){r.value[P]=!0;try{await Ed(P),t.openStartLog(P),V()}catch(te){e.toast.error("启动失败: "+te.message)}finally{r.value[P]=!1}}},M=async P=>{if(!(!P||r.value[P])){r.value[P]=!0,i.value[P]=!0;try{await xa(P),e.toast.success("已停止"),t.logFileName===P&&(t.stopPolling(),t.showStartLog=!1),V()}catch(te){e.toast.error("停止失败: "+te.message),console.error(te),delete i.value[P]}finally{r.value[P]=!1}}},z=async P=>{if(!(!P||r.value[P])){r.value[P]=!0;try{await Td(P),t.openStartLog(P),V()}catch(te){e.toast.error("重启失败: "+te.message)}finally{r.value[P]=!1}}},oe=async P=>{if(!(!P||r.value[P])){r.value[P]=!0;try{await Sd(P),e.toast.success("已移除"),t.logFileName===P&&(t.stopPolling(),t.showStartLog=!1),o.value===P&&(o.value=null),V()}catch(te){e.toast.error("移除失败: "+te.message)}finally{r.value[P]=!1}}};t.bindApp({fetchInstances:V,instanceList:n,configList:l});const F=async()=>{if(!bt&&!ga())return;document.addEventListener("visibilitychange",f),T(),await V(),j();const P=n.value.find(te=>te.status==="starting");P&&t.openStartLog(P.file_name),u=setInterval(()=>{c.value&&V()},3e3)},J=()=>{document.removeEventListener("visibilitychange",f),t.stopPolling(),u&&clearInterval(u)};return Ts()&&(at(F),Es(J)),{instances:s,instanceList:n,selectedInstance:o,configList:l,loadingMap:r,stoppingMap:i,isPageVisible:c,runningCount:p,startingCount:g,headerStatusText:h,selectedInfo:C,selectedConfigName:w,version:L,isServerConnected:y,serverStatusText:d,infoOf:b,fetchInstances:V,fetchInstanceInfo:x,fetchConfigList:j,startVnt:H,stopVnt:M,restartVnt:z,dismissInstance:oe}}),Od=[{to:"/",label:"网络总览",shortLabel:"总览",icon:"M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z"},{to:"/instances",label:"运行实例",shortLabel:"实例",icon:"M4 18V8m5 10V4m6 14v-7m5 7V6"},{to:"/peers",label:"在线设备",shortLabel:"设备",icon:"M15 19a6 6 0 0 0-12 0m18 0a5 5 0 0 0-5-5m-7-3a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 0a3 3 0 1 0 0-6"},{to:"/routes",label:"路由表",shortLabel:"路由",icon:"M6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm12 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM8 6h6a4 4 0 0 1 4 4v2m-3-3 3 3 3-3M16 18h-6a4 4 0 0 1-4-4v-2"},{to:"/config",label:"组网配置",shortLabel:"配置",icon:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm7.4-.5a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3A1.7 1.7 0 0 0 14 21v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14h-.2v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6 1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1Z"},{to:"/web-access",label:"Web 访问",shortLabel:"Web",desktopOnly:!0,icon:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 0c2.2-2.5 3.3-5.5 3.3-9S14.2 5.5 12 3m0 18c-2.2-2.5-3.3-5.5-3.3-9S9.8 5.5 12 3M3.5 9h17m-17 6h17"},{to:"/about",label:"关于",shortLabel:"关于",icon:"M12 17v-6m0-4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}],ya=()=>Od.filter(e=>!e.desktopOnly||globalThis.__VNT_DESKTOP__),Qn="/assets/vnt-icon-CtSHy0mt.png",Md={class:"flex h-full min-h-0 flex-col bg-white dark:bg-slate-900"},Ld={class:"flex h-16 shrink-0 items-center gap-3 border-b border-slate-200 px-5 dark:border-slate-800"},Nd=["src"],Vd={class:"mx-3 mt-4 flex items-center gap-3 rounded-xl border border-slate-200 bg-slate-50 px-3 py-3 dark:border-slate-700 dark:bg-slate-800/60"},jd={class:"min-w-0"},Dd={class:"mt-0.5 truncate text-xs font-medium text-slate-700 dark:text-slate-200"},Bd={class:"mt-4 flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto px-3","aria-label":"主导航"},Fd={class:"h-[18px] w-[18px] shrink-0 fill-none stroke-current",viewBox:"0 0 24 24"},Ud=["d"],Hd={class:"mx-3 mt-3 shrink-0 border-t border-slate-200 px-1 py-4 dark:border-slate-800"},Wd={class:"flex items-center gap-2 text-xs text-slate-400"},Kd={class:"ml-auto font-mono text-[10px]"},wr={__name:"AppSidebar",emits:["navigate"],setup(e){const t=ma(),s=kt(),n=ya();return(o,l)=>{const r=Hn("router-link");return k(),S("div",Md,[a("div",Ld,[a("img",{src:R(Qn),alt:"",class:"h-8 w-8 shrink-0"},null,8,Nd),l[1]||(l[1]=a("div",null,[a("div",{class:"text-sm font-bold tracking-wide text-slate-900 dark:text-white"},"VNT"),a("div",{class:"text-[9px] font-semibold tracking-[0.18em] text-slate-400"},"CONTROL CENTER")],-1))]),a("div",Vd,[a("span",{class:G(["h-2.5 w-2.5 shrink-0 rounded-full",R(s).runningCount>0?"bg-green-500":R(s).startingCount>0?"animate-pulse bg-amber-400":"bg-slate-300 dark:bg-slate-600"])},null,2),a("div",jd,[l[2]||(l[2]=a("div",{class:"text-[9px] font-semibold tracking-wider text-slate-400"},"虚拟网络",-1)),a("div",Dd,N(R(s).headerStatusText),1)])]),a("nav",Bd,[(k(!0),S(ae,null,Te(R(n),i=>(k(),Re(r,{key:i.to,to:i.to,class:G(["flex min-h-10 items-center gap-3 rounded-lg px-3 text-sm font-medium transition-colors",R(t).path===i.to?"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-300":"text-slate-500 hover:bg-slate-100 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-white"]),onClick:l[0]||(l[0]=c=>o.$emit("navigate"))},{default:Ee(()=>[(k(),S("svg",Fd,[a("path",{d:i.icon,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.7"},null,8,Ud)])),a("span",null,N(i.label),1)]),_:2},1032,["to","class"]))),128))]),a("div",Hd,[a("div",Wd,[a("span",{class:G(["h-1.5 w-1.5 rounded-full",R(s).version?"bg-green-500":"bg-amber-400"])},null,2),a("span",null,N(R(s).version?"本地服务正常":"正在连接服务…"),1),a("span",Kd,"v"+N(R(s).version||"2.0"),1)])])])}}},Gd={key:0,class:"flex shrink-0 items-center justify-between gap-3 border-b border-slate-200 bg-slate-50/60 px-6 py-4 dark:border-slate-700 dark:bg-slate-800/50"},qd={class:"custom-scrollbar min-h-0 flex-1 overflow-y-auto"},zd={key:1,class:"flex shrink-0 items-center justify-end gap-3 border-t border-slate-200 bg-slate-50/60 px-6 py-4 dark:border-slate-700 dark:bg-slate-800/50"},hl={__name:"AppModal",props:{show:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},panelClass:{type:String,default:"w-full max-w-2xl"}},emits:["close"],setup(e,{emit:t}){const s=e,n=t,o=r=>{s.escClosable&&r.key==="Escape"&&n("close")};Ve(()=>s.show,r=>{r?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Es(()=>window.removeEventListener("keydown",o));const l=()=>{s.maskClosable&&n("close")};return(r,i)=>(k(),Re(el,{to:"body"},[fe(Sn,{name:"modal"},{default:Ee(()=>[e.show?(k(),S("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4 backdrop-blur-sm",onClick:rs(l,["self"])},[a("div",{class:G(["modal-panel flex max-h-[90vh] flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900",e.panelClass])},[r.$slots.header?(k(),S("div",Gd,[io(r.$slots,"header")])):re("",!0),a("div",qd,[io(r.$slots,"body")]),r.$slots.footer?(k(),S("div",zd,[io(r.$slots,"footer")])):re("",!0)],2)])):re("",!0)]),_:3})]))}},Zd={class:"w-auto min-w-[260px] max-w-[320px] rounded-lg border border-slate-200 bg-white p-4 text-left text-sm text-slate-600 shadow-2xl dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200"},Jd={class:"relative z-10 mb-2 flex items-center justify-between border-b border-slate-200 pb-2 dark:border-slate-600"},Yd={class:"badge-green border border-green-200 dark:border-green-800"},Qd={key:0,class:"relative z-10 mb-3"},Xd={class:"flex flex-wrap gap-1"},ep={key:1,class:"relative z-10"},tp={class:"whitespace-normal break-all rounded border border-slate-200 bg-slate-50 p-1.5 font-mono text-xs leading-relaxed text-slate-600 dark:border-slate-700/50 dark:bg-slate-900/50 dark:text-slate-200"},sp={__name:"AppTooltip",setup(e,{expose:t}){const s=Z({show:!1,x:0,y:0,info:null});let n=null;const o=(c,f)=>{if(!f.nat_info)return;n&&(clearTimeout(n),n=null);const u=c.currentTarget.getBoundingClientRect();s.value={show:!0,x:u.left+u.width/2,y:u.bottom+10,info:f.nat_info}},l=()=>{n=setTimeout(()=>{s.value.show=!1},100)},r=()=>{n&&(clearTimeout(n),n=null)},i=()=>{s.value.show=!1};return t({showPeerTooltip:o,hidePeerTooltip:l}),(c,f)=>(k(),Re(el,{to:"body"},[s.value.show?(k(),S("div",{key:0,style:sn({top:s.value.y+"px",left:s.value.x+"px"}),class:"fixed z-[9999] mt-1 -translate-x-1/2 transform",onMouseenter:r,onMouseleave:i},[a("div",Zd,[f[3]||(f[3]=a("div",{class:"absolute -top-2 left-1/2 h-4 w-4 -translate-x-1/2 rotate-45 transform border-l border-t border-slate-200 bg-white dark:border-slate-600 dark:bg-slate-800"},null,-1)),a("div",Jd,[f[0]||(f[0]=a("span",{class:"text-xs font-bold uppercase text-slate-400"},"NAT Type",-1)),a("span",Yd,N(s.value.info.nat_type),1)]),s.value.info.public_ips&&s.value.info.public_ips.length>0?(k(),S("div",Qd,[f[1]||(f[1]=a("span",{class:"mb-1 block text-xs text-slate-400"},"Public IPv4:",-1)),a("div",Xd,[(k(!0),S(ae,null,Te(s.value.info.public_ips,u=>(k(),S("span",{key:u,class:"rounded border border-slate-200 bg-slate-100 px-1.5 py-0.5 font-mono text-xs tabular-nums text-slate-600 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-200"},N(u),1))),128))])])):re("",!0),s.value.info.ipv6?(k(),S("div",ep,[f[2]||(f[2]=a("span",{class:"mb-1 block text-xs text-slate-400"},"IPv6:",-1)),a("div",tp,N(s.value.info.ipv6),1)])):re("",!0)])],36)):re("",!0)]))}},np={class:"text-lg font-bold text-slate-900 flex items-center gap-2 dark:text-white"},op={key:0,class:"w-5 h-5 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},lp={class:"px-6 py-5 text-sm text-slate-600 break-all dark:text-slate-300"},rp={__name:"ConfirmHost",setup(e){const t=cs();return(s,n)=>(k(),Re(hl,{show:R(t).confirmState.show,"panel-class":"w-full max-w-sm",onClose:R(t).confirmCancel},{header:Ee(()=>[a("h3",np,[R(t).confirmState.danger?(k(),S("svg",op,[...n[2]||(n[2]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)])])):re("",!0),ce(" "+N(R(t).confirmState.title),1)])]),body:Ee(()=>[a("p",lp,N(R(t).confirmState.message),1)]),footer:Ee(()=>[a("button",{class:"btn-ghost",onClick:n[0]||(n[0]=(...o)=>R(t).confirmCancel&&R(t).confirmCancel(...o))},"取消"),a("button",{class:G(R(t).confirmState.danger?"btn-danger":"btn-primary"),onClick:n[1]||(n[1]=(...o)=>R(t).confirmOk&&R(t).confirmOk(...o))},N(R(t).confirmState.confirmText),3)]),_:1},8,["show","onClose"]))}},ip={class:"pointer-events-none fixed right-4 top-4 z-[100] flex flex-col items-end gap-2"},ap={class:"flex items-center gap-2 px-4 py-2.5"},cp=["d"],up={class:"break-all text-sm text-slate-700 dark:text-slate-200"},fp={__name:"ToastHost",setup(e){const t=cs(),s=l=>l==="success"?"bg-green-500":l==="error"?"bg-red-500":"bg-indigo-500",n=l=>l==="success"?"text-green-500":l==="error"?"text-red-500":"text-indigo-500",o=l=>l==="success"?"M5 13l4 4L19 7":l==="error"?"M6 18L18 6M6 6l12 12":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z";return(l,r)=>(k(),Re(el,{to:"body"},[a("div",ip,[fe(al,{name:"toast"},{default:Ee(()=>[(k(!0),S(ae,null,Te(R(t).toasts,i=>(k(),S("div",{key:i.id,class:"pointer-events-auto flex max-w-sm items-stretch overflow-hidden rounded-lg border border-slate-200 bg-white shadow-lg dark:border-slate-700 dark:bg-slate-800"},[a("span",{class:G(["w-1 shrink-0",s(i.type)])},null,2),a("div",ap,[(k(),S("svg",{class:G(["h-4 w-4 shrink-0",n(i.type)]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:o(i.type)},null,8,cp)],2)),a("span",up,N(i.message),1)])]))),128))]),_:1})])]))}},dp={class:"grid h-[100dvh] place-items-center overflow-y-auto bg-slate-50 p-4 text-slate-700 dark:bg-slate-950 dark:text-slate-200"},pp={class:"mb-7 flex items-center gap-3"},hp=["src"],mp=["disabled"],gp={__name:"AccessGate",setup(e){const t=Z(""),s=()=>{t.value.trim()&&(bd(t.value),window.location.reload())};return(n,o)=>(k(),S("main",dp,[a("form",{class:"w-full max-w-md rounded-2xl border border-slate-200 bg-white p-6 shadow-sm sm:p-8 dark:border-slate-800 dark:bg-slate-900",onSubmit:rs(s,["prevent"])},[a("div",pp,[a("img",{src:R(Qn),alt:"",class:"h-10 w-10 shrink-0"},null,8,hp),o[1]||(o[1]=a("div",null,[a("h1",{class:"text-lg font-bold text-slate-900 dark:text-white"},"访问 VNT 控制台"),a("p",{class:"mt-0.5 text-xs text-slate-400"},"请输入桌面端 Web 访问设置中的令牌")],-1))]),o[2]||(o[2]=a("label",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200",for:"access-token"},"访问令牌",-1)),xe(a("input",{id:"access-token","onUpdate:modelValue":o[0]||(o[0]=l=>t.value=l),class:"input font-mono",type:"password",autocomplete:"current-password",autofocus:"",placeholder:"粘贴访问令牌"},null,512),[[Ie,t.value]]),a("button",{class:"btn-primary mt-5 w-full",type:"submit",disabled:!t.value.trim()},"进入控制台",8,mp),o[3]||(o[3]=a("p",{class:"mt-5 text-center text-xs leading-5 text-slate-400"},"令牌只保存在当前浏览器中,可随时在桌面端重新生成。",-1))],32)]))}},vp={key:1,class:"flex h-[100dvh] min-h-0 overflow-hidden bg-slate-50 text-slate-700 dark:bg-slate-950 dark:text-slate-200"},bp={class:"hidden w-60 shrink-0 border-r border-slate-200 dark:border-slate-800 lg:block"},xp={key:0,class:"fixed inset-0 z-40 lg:hidden"},_p={class:"drawer-panel relative h-full w-[min(82vw,288px)] border-r border-slate-200 shadow-2xl dark:border-slate-700"},yp={class:"flex min-w-0 flex-1 flex-col"},kp={class:"flex h-16 shrink-0 items-center gap-3 border-b border-slate-200 bg-white/90 px-4 backdrop-blur lg:px-6 dark:border-slate-800 dark:bg-slate-900/90"},wp={class:"min-w-0"},Cp={class:"truncate text-lg font-bold text-slate-900 dark:text-white"},Sp={class:"ml-auto flex items-center gap-2"},Ep={class:"flex h-8 items-center gap-2 rounded-lg border border-slate-200 bg-white px-2.5 text-xs font-medium text-slate-500 sm:px-3 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300"},Tp={class:"hidden sm:inline"},$p=["title","aria-label"],Ap={key:0,class:"h-4 w-4 fill-none stroke-current",viewBox:"0 0 24 24"},Ip={key:1,class:"h-4 w-4 fill-none stroke-current",viewBox:"0 0 24 24"},Rp={class:"custom-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-auto"},Pp={class:"mx-auto w-full max-w-7xl px-4 py-5 sm:px-5 lg:px-7 lg:py-6"},Op={class:"flex min-w-0 items-center gap-3"},Mp={class:"truncate text-base font-bold text-slate-900 sm:text-lg dark:text-white"},Lp={class:"max-w-[40%] truncate font-mono text-xs text-indigo-600 dark:text-indigo-400"},Np={class:"break-all"},Vp={key:0,class:"animate-pulse text-indigo-600 dark:text-indigo-400"},jp={__name:"App",setup(e){const t=kt(),s=_a(),n=ma(),o=vd(),l=Z(null);Fs("peerTooltip",l);const r=Z(!1),i=ya(),c=he(()=>i.find(C=>C.to===n.path)||i[0]),f=localStorage.getItem("vnt-theme"),u=Z(f?f==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches),p=()=>document.documentElement.classList.toggle("dark",u.value),g=()=>{u.value=!u.value,localStorage.setItem("vnt-theme",u.value?"dark":"light"),p()};p(),Ve(()=>n.path,()=>{r.value=!1});const h=C=>{if(!(C.ctrlKey||C.metaKey)||C.altKey)return;const w=Number(C.key)-1;w>=0&&w<i.length&&(C.preventDefault(),o.push(i[w].to))};return at(()=>window.addEventListener("keydown",h)),Un(()=>window.removeEventListener("keydown",h)),(C,w)=>{const L=Hn("router-view");return!R(bt)&&!R(dl)?(k(),Re(gp,{key:0})):(k(),S("div",vp,[a("aside",bp,[fe(wr)]),fe(Sn,{name:"drawer"},{default:Ee(()=>[r.value?(k(),S("div",xp,[a("button",{class:"absolute inset-0 bg-slate-950/45 backdrop-blur-[2px]","aria-label":"关闭导航",onClick:w[0]||(w[0]=T=>r.value=!1)}),a("aside",_p,[fe(wr,{onNavigate:w[1]||(w[1]=T=>r.value=!1)})])])):re("",!0)]),_:1}),a("div",yp,[a("header",kp,[a("button",{class:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-slate-500 hover:bg-slate-100 hover:text-slate-900 lg:hidden dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-white","aria-label":"打开导航",onClick:w[2]||(w[2]=T=>r.value=!0)},[...w[5]||(w[5]=[a("svg",{class:"h-5 w-5 fill-none stroke-current",viewBox:"0 0 24 24"},[a("path",{d:"M4 7h16M4 12h16M4 17h16","stroke-linecap":"round","stroke-width":"2"})],-1)])]),a("div",wp,[a("h1",Cp,N(c.value.label),1),w[6]||(w[6]=a("p",{class:"hidden text-xs text-slate-400 sm:block"},"VNT 虚拟局域网管理",-1))]),a("div",Sp,[a("div",Ep,[a("span",{class:G(["h-1.5 w-1.5 rounded-full",R(t).runningCount>0?"bg-green-500":R(t).startingCount>0?"animate-pulse bg-amber-400":"bg-slate-300 dark:bg-slate-600"])},null,2),a("span",Tp,N(R(t).headerStatusText),1)]),a("button",{class:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 bg-white text-slate-500 hover:border-indigo-300 hover:text-indigo-600 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-400 dark:hover:border-indigo-500 dark:hover:text-indigo-400",title:u.value?"切换浅色模式":"切换深色模式","aria-label":u.value?"切换浅色模式":"切换深色模式",onClick:g},[u.value?(k(),S("svg",Ap,[...w[7]||(w[7]=[a("circle",{cx:"12",cy:"12",r:"4"},null,-1),a("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4","stroke-linecap":"round","stroke-width":"1.7"},null,-1)])])):(k(),S("svg",Ip,[...w[8]||(w[8]=[a("path",{d:"M20.5 15.2A8.5 8.5 0 0 1 8.8 3.5 8.5 8.5 0 1 0 20.5 15.2Z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.7"},null,-1)])]))],8,$p)])]),a("main",Rp,[a("div",Pp,[fe(L,null,{default:Ee(({Component:T})=>[fe(Sn,{name:"fade",mode:"out-in"},{default:Ee(()=>[(k(),Re(Mc(T)))]),_:2},1024)]),_:1})])])]),fe(hl,{show:R(s).showStartLog,"mask-closable":R(s).startStatus!=="starting","esc-closable":R(s).startStatus!=="starting","panel-class":"w-full max-w-2xl",onClose:R(s).close},{header:Ee(()=>[a("div",Op,[a("span",{class:G(["h-2 w-2 shrink-0 rounded-full",R(s).startStatus==="starting"?"animate-pulse bg-amber-400":R(s).startStatus==="running"?"bg-green-500":"bg-red-500"])},null,2),a("h3",Mp,N(R(s).startStatus==="starting"?"正在建立虚拟网络":R(s).startStatus==="running"?"网络已连接":"连接未完成"),1)]),a("span",Lp,N(R(s).logConfigName),1)]),body:Ee(()=>[a("div",{ref:T=>R(s).logContainer=T,class:"custom-scrollbar h-64 space-y-2 overflow-y-auto border-y border-slate-200 bg-slate-50 p-4 font-mono text-xs text-slate-600 sm:h-80 sm:p-6 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-300"},[(k(!0),S(ae,null,Te(R(s).startLogs,(T,y)=>(k(),S("div",{key:y,class:"flex gap-3"},[w[9]||(w[9]=a("span",{class:"text-indigo-600 dark:text-indigo-400"},"",-1)),a("span",Np,N(T),1)]))),128)),R(s).startStatus==="starting"?(k(),S("div",Vp,"等待下一阶段…")):re("",!0)],512)]),footer:Ee(()=>[R(s).startStatus==="starting"?(k(),S("button",{key:0,class:"btn-ghost",onClick:w[3]||(w[3]=(...T)=>R(s).cancelStart&&R(s).cancelStart(...T))},"取消连接")):(k(),S("button",{key:1,class:"btn-primary",onClick:w[4]||(w[4]=(...T)=>R(s).close&&R(s).close(...T))},"完成"))]),_:1},8,["show","mask-closable","esc-closable","onClose"]),fe(fp),fe(rp),fe(sp,{ref_key:"tooltipRef",ref:l},null,512)]))}}},Xn=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},Dp=["aria-expanded","disabled"],Bp=["aria-selected","disabled","data-option-index","onMouseenter","onClick"],Fp={class:"min-w-0 flex-1 truncate"},Up={key:0,class:"h-4 w-4 shrink-0 fill-none stroke-current",viewBox:"0 0 24 24","aria-hidden":"true"},Hp={key:0,class:"px-3 py-4 text-center text-xs text-slate-400"},Wp=Object.assign({inheritAttrs:!1},{__name:"AppSelect",props:{modelValue:{default:null},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,n=t,o=Z(null),l=Z(null),r=Z(!1),i=Z(-1),c=`app-select-${Cc().replaceAll(":","")}`,f=he(()=>s.options.findIndex(y=>Object.is(y.value,s.modelValue))),u=he(()=>s.options[f.value]||null),p=(y,d)=>{if(!s.options.length)return-1;let b=y;for(let x=0;x<s.options.length;x+=1)if(b=(b+d+s.options.length)%s.options.length,!s.options[b]?.disabled)return b;return-1},g=async()=>{s.disabled||(r.value=!0,i.value=f.value>=0?f.value:p(-1,1),await yt(),o.value?.querySelector(`[data-option-index="${i.value}"]`)?.scrollIntoView({block:"nearest"}))},h=(y=!1)=>{r.value=!1,y&&l.value?.focus()},C=y=>{y.disabled||(n("update:modelValue",y.value),h(!0))},w=y=>{i.value=p(i.value,y),yt(()=>{o.value?.querySelector(`[data-option-index="${i.value}"]`)?.scrollIntoView({block:"nearest"})})},L=y=>{if(!s.disabled){if(y.key==="ArrowDown"||y.key==="ArrowUp"){y.preventDefault(),r.value?w(y.key==="ArrowDown"?1:-1):g();return}if(y.key==="Enter"||y.key===" "){y.preventDefault(),r.value?i.value>=0&&C(s.options[i.value]):g();return}if(y.key==="Escape"&&r.value){y.preventDefault(),h(!0);return}y.key==="Home"&&r.value?(y.preventDefault(),i.value=p(-1,1)):y.key==="End"&&r.value?(y.preventDefault(),i.value=p(0,-1)):y.key==="Tab"&&h()}},T=y=>{r.value&&!o.value?.contains(y.target)&&h()};return Ve(()=>s.disabled,y=>{y&&h()}),at(()=>document.addEventListener("pointerdown",T)),Un(()=>document.removeEventListener("pointerdown",T)),(y,d)=>(k(),S("div",{ref_key:"root",ref:o,class:"relative w-full"},[a("button",Fi({ref_key:"trigger",ref:l},y.$attrs,{type:"button",role:"combobox","aria-expanded":r.value,"aria-controls":c,"aria-haspopup":"listbox",disabled:e.disabled,class:["input flex min-h-10 items-center justify-between gap-3 text-left",r.value?"border-indigo-500 ring-2 ring-indigo-500/25":""],onClick:d[0]||(d[0]=b=>r.value?h():g()),onKeydown:L}),[a("span",{class:G(["min-w-0 flex-1 truncate",u.value?"":"text-slate-400 dark:text-slate-500"])},N(u.value?.label||e.placeholder),3),(k(),S("svg",{class:G(["h-4 w-4 shrink-0 fill-none stroke-current text-slate-400 transition-transform duration-150",r.value?"rotate-180 text-indigo-500":""]),viewBox:"0 0 24 24","aria-hidden":"true"},[...d[1]||(d[1]=[a("path",{d:"m7 10 5 5 5-5","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.8"},null,-1)])],2))],16,Dp),fe(Sn,{name:"select-menu"},{default:Ee(()=>[r.value?(k(),S("div",{key:0,id:c,role:"listbox",class:"custom-scrollbar absolute z-40 mt-1.5 max-h-60 w-full overflow-y-auto rounded-xl border border-slate-200 bg-white p-1.5 shadow-xl shadow-slate-900/10 dark:border-slate-700 dark:bg-slate-800 dark:shadow-black/30"},[(k(!0),S(ae,null,Te(e.options,(b,x)=>(k(),S("button",{key:`${String(b.value)}-${x}`,type:"button",role:"option","aria-selected":Object.is(b.value,e.modelValue),disabled:b.disabled,"data-option-index":x,class:G(["flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40",[Object.is(b.value,e.modelValue)?"bg-indigo-50 font-medium text-indigo-700 dark:bg-indigo-500/15 dark:text-indigo-300":"text-slate-600 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-slate-700/70",i.value===x&&!Object.is(b.value,e.modelValue)?"bg-slate-100 dark:bg-slate-700/70":""]]),onMouseenter:V=>i.value=x,onClick:V=>C(b)},[a("span",Fp,N(b.label),1),Object.is(b.value,e.modelValue)?(k(),S("svg",Up,[...d[2]||(d[2]=[a("path",{d:"m5 12 4 4L19 6","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)])])):re("",!0)],42,Bp))),128)),e.options.length===0?(k(),S("div",Hp,"暂无可选项")):re("",!0)])):re("",!0)]),_:1})],512))}}),ml=Xn(Wp,[["__scopeId","data-v-2fb2198c"]]),Kp={class:"card"},Gp={key:0,class:"flex flex-wrap items-center justify-between gap-3"},qp={key:1,class:"text-sm muted"},zp={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-end"},Zp={class:"flex-1"},Jp=["disabled"],Yp={key:0,class:"animate-spin"},ka={__name:"StartPanel",setup(e){const t=kt(),s=cs(),n=Z(""),o=he(()=>t.configList.filter(i=>!t.instanceList.some(c=>c.file_name===i.file_name))),l=he(()=>o.value.map(i=>({value:i.file_name,label:i.config_name||i.file_name})));Ve(o,i=>{i.some(c=>c.file_name===n.value)||(n.value=i.length?i[0].file_name:"")},{immediate:!0});const r=()=>{if(!n.value){s.toast.error("请先选择一个配置");return}t.startVnt(n.value)};return(i,c)=>{const f=Hn("router-link");return k(),S("div",Kp,[c[5]||(c[5]=a("h2",{class:"mb-4 text-base font-bold text-slate-900 dark:text-white"},"启动组网",-1)),R(t).configList.length===0?(k(),S("div",Gp,[c[2]||(c[2]=a("p",{class:"text-sm muted"},"还没有任何配置,先创建一个组网配置吧。",-1)),fe(f,{to:"/config",class:"btn-primary btn-sm"},{default:Ee(()=>[...c[1]||(c[1]=[ce("去新建配置",-1)])]),_:1})])):o.value.length===0?(k(),S("div",qp," 所有配置均已启动。 ")):(k(),S("div",zp,[a("div",Zp,[c[3]||(c[3]=a("label",{class:"mb-1.5 block text-xs font-medium muted"},"选择配置",-1)),fe(ml,{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),options:l.value,placeholder:"请选择配置…","aria-label":"选择配置"},null,8,["modelValue","options"])]),a("button",{class:"btn-primary px-8",disabled:!n.value||!!R(t).loadingMap[n.value],onClick:r},[R(t).loadingMap[n.value]?(k(),S("span",Yp,"⟳")):re("",!0),c[4]||(c[4]=ce(" 启动 ",-1))],8,Jp)]))])}}},Qp={class:"flex items-center justify-between gap-2"},Xp=["title"],e0={class:"flex shrink-0 items-center gap-1.5"},t0={key:0,class:"badge-yellow",title:"配置文件在启动后被修改,重启实例后生效"},s0={class:"mt-2 text-sm"},n0={class:"ml-1 font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},o0={class:"mt-3 flex gap-4 text-xs muted"},l0={class:"font-bold tabular-nums text-blue-600 dark:text-blue-400"},r0={class:"font-bold tabular-nums text-green-600 dark:text-green-400"},i0={class:"font-bold tabular-nums text-slate-400"},a0={class:"mt-4 flex flex-wrap justify-end gap-2"},c0={key:0,class:"flex items-center gap-1.5 text-xs muted"},u0=["disabled"],f0={key:0,class:"animate-spin"},d0=["disabled"],p0={key:0,class:"animate-spin"},h0=["disabled"],m0={key:0,class:"animate-spin"},wa={__name:"InstanceCard",props:{inst:{type:Object,required:!0},selectable:{type:Boolean,default:!1}},setup(e){const t=e,s=kt(),n=cs(),o=he(()=>s.infoOf(t.inst.file_name)),l=he(()=>!!s.loadingMap[t.inst.file_name]),r=he(()=>!!s.stoppingMap[t.inst.file_name]),i=he(()=>t.inst.config_name||t.inst.file_name),c=C=>r.value?"badge-yellow":C==="running"?"badge-green":C==="starting"?"badge-blue":"badge-gray",f=C=>r.value?"停止中":C==="running"?"运行中":C==="starting"?"启动中":"已停止",u=()=>{t.selectable&&(s.selectedInstance=t.inst.file_name)},p=async()=>{await n.confirm({title:"停止组网",message:`确定要停止 ${i.value} 吗?`,danger:!0,confirmText:"停止"})&&s.stopVnt(t.inst.file_name)},g=async()=>{await n.confirm({title:"重启组网",message:`确定要重启 ${i.value} 吗?`})&&s.restartVnt(t.inst.file_name)},h=async()=>{await n.confirm({title:"移除实例",message:`确定要移除已停止的实例 ${i.value} 吗?`,danger:!0,confirmText:"移除"})&&s.dismissInstance(t.inst.file_name)};return(C,w)=>(k(),S("div",{class:G(["card",[e.selectable?"cursor-pointer":"",e.selectable&&R(s).selectedInstance===e.inst.file_name?"ring-2 ring-indigo-500 dark:ring-indigo-400":""]]),onClick:u},[a("div",Qp,[a("h3",{class:"truncate text-base font-bold text-slate-900 dark:text-white",title:e.inst.file_name},N(i.value),9,Xp),a("div",e0,[o.value.config_changed?(k(),S("span",t0," 配置发生变化 ")):re("",!0),a("span",{class:G([c(e.inst.status),r.value?"animate-pulse":""])},N(f(e.inst.status)),3)])]),a("div",s0,[w[0]||(w[0]=a("span",{class:"muted"},"虚拟 IP:",-1)),a("span",n0,N(o.value.ip||"-"),1)]),a("div",o0,[a("span",null,[w[1]||(w[1]=ce(" 在线 ",-1)),a("span",l0,N(o.value.online_client_num||0),1)]),a("span",null,[w[2]||(w[2]=ce(" 直连 ",-1)),a("span",r0,N(o.value.direct_client_num||0),1)]),a("span",null,[w[3]||(w[3]=ce(" 离线 ",-1)),a("span",i0,N(o.value.offline_client_num||0),1)])]),a("div",a0,[r.value?(k(),S("span",c0,[...w[4]||(w[4]=[a("span",{class:"inline-block animate-spin"},"⟳",-1),ce(" 正在停止,请稍候... ",-1)])])):(k(),S(ae,{key:1},[e.inst.status==="running"||e.inst.status==="stopped"?(k(),S("button",{key:0,class:"btn-primary btn-sm",disabled:l.value,onClick:rs(g,["stop"])},[l.value?(k(),S("span",f0,"⟳")):re("",!0),ce(" "+N(e.inst.status==="stopped"?"重新启动":"重启"),1)],8,u0)):re("",!0),e.inst.status!=="stopped"?(k(),S("button",{key:1,class:"btn-danger btn-sm",disabled:l.value,onClick:rs(p,["stop"])},[l.value?(k(),S("span",p0,"⟳")):re("",!0),w[5]||(w[5]=ce(" 停止 ",-1))],8,d0)):re("",!0),e.inst.status==="stopped"?(k(),S("button",{key:2,class:"btn-ghost btn-sm",disabled:l.value,onClick:rs(h,["stop"])},[l.value?(k(),S("span",m0,"⟳")):re("",!0),w[6]||(w[6]=ce(" 移除 ",-1))],8,h0)):re("",!0)],64))])],2))}},g0={class:"card p-12 text-center text-slate-500 dark:text-slate-400"},rn={__name:"EmptyState",props:{text:{type:String,default:"暂无数据"}},setup(e){return(t,s)=>(k(),S("div",g0,[s[0]||(s[0]=a("svg",{class:"w-12 h-12 mx-auto mb-3 text-slate-300 dark:text-slate-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})],-1)),a("p",null,N(e.text),1)]))}},v0={class:"space-y-6"},b0={class:"flex flex-wrap items-end justify-between gap-4"},x0={class:"page-subtitle"},_0={class:"grid grid-cols-2 gap-4 lg:grid-cols-4"},y0={class:"card"},k0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},w0={class:"ml-1 text-sm font-normal muted"},C0={class:"card"},S0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},E0={class:"card"},T0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},$0={class:"card"},A0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},I0={class:"text-sm font-normal muted"},R0={key:1,class:"muted"},P0={class:"mb-3 flex items-center justify-between"},O0={__name:"DashboardView",setup(e){const t=kt(),s=he(()=>Object.values(t.instances).reduce((l,r)=>l+(r?.online_client_num||0),0)),n=he(()=>{const l=t.instanceList.filter(i=>i.status==="running");return{connected:l.filter(i=>t.instances[i.file_name]?.server_info?.some(f=>f.connected)).length,total:l.length}}),o=he(()=>t.runningCount>0?`运行中 ${t.runningCount} 个实例`:t.startingCount>0?"有实例正在启动...":"全部实例已停止");return(l,r)=>{const i=Hn("router-link");return k(),S("div",v0,[a("div",b0,[a("div",null,[r[0]||(r[0]=a("h1",{class:"page-title"},"总览",-1)),a("p",x0,N(o.value),1)]),fe(i,{to:"/config",class:"btn-ghost btn-sm"},{default:Ee(()=>[...r[1]||(r[1]=[ce("管理配置",-1)])]),_:1})]),a("div",_0,[a("div",y0,[r[2]||(r[2]=a("div",{class:"text-xs font-medium muted"},"运行实例",-1)),a("div",k0,[ce(N(R(t).runningCount),1),a("span",w0,"/ "+N(R(t).instanceList.length),1)])]),a("div",C0,[r[3]||(r[3]=a("div",{class:"text-xs font-medium muted"},"配置总数",-1)),a("div",S0,N(R(t).configList.length),1)]),a("div",E0,[r[4]||(r[4]=a("div",{class:"text-xs font-medium muted"},"在线设备",-1)),a("div",T0,N(s.value),1)]),a("div",$0,[r[5]||(r[5]=a("div",{class:"text-xs font-medium muted"},"服务器连接",-1)),a("div",A0,[n.value.total>0?(k(),S(ae,{key:0},[a("span",{class:G(n.value.connected>0?"text-green-600 dark:text-green-400":"text-red-500")},N(n.value.connected),3),a("span",I0,"/ "+N(n.value.total)+" 已连接",1)],64)):(k(),S("span",R0,"-"))])])]),fe(ka),a("div",null,[a("div",P0,[r[7]||(r[7]=a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"实例概览",-1)),fe(i,{to:"/instances",class:"text-sm font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400"},{default:Ee(()=>[...r[6]||(r[6]=[ce("查看详情 →",-1)])]),_:1})]),R(t).instanceList.length===0?(k(),Re(rn,{key:0,text:R(t).configList.length===0?"暂无配置,请先新建配置":"暂无运行中的组网,请在上方选择配置启动"},null,8,["text"])):(k(),Re(al,{key:1,name:"card-list",tag:"div",class:"grid grid-cols-1 gap-4 md:grid-cols-2"},{default:Ee(()=>[(k(!0),S(ae,null,Te(R(t).instanceList,c=>(k(),Re(wa,{key:c.file_name,inst:c},null,8,["inst"]))),128))]),_:1}))])])}}},M0={class:"space-y-6"},L0={class:"card"},N0={class:"mb-4 text-lg font-bold text-slate-900 dark:text-white"},V0={class:"ml-2 text-sm font-medium text-indigo-600 dark:text-indigo-400"},j0={class:"grid grid-cols-1 gap-4 text-sm md:grid-cols-2"},D0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},B0={class:"font-mono tabular-nums text-slate-900 dark:text-white"},F0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},U0={class:"font-mono text-slate-900 dark:text-white"},H0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},W0={class:"font-mono text-slate-900 dark:text-white"},K0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},G0={class:"font-mono tabular-nums text-slate-900 dark:text-white"},q0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},z0={class:"font-mono text-indigo-600 dark:text-indigo-400"},Z0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},J0=["title"],Y0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},Q0={class:"text-slate-900 dark:text-white"},X0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},eh=["title"],th={class:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-4"},sh={class:"text-sm text-slate-600 dark:text-slate-300"},nh={class:"mt-4"},oh={class:"flex flex-wrap gap-2"},lh={key:0,class:"text-xs text-slate-400"},rh={class:"card p-0 overflow-hidden"},ih={class:"custom-scrollbar max-h-[400px] overflow-x-auto"},ah={class:"table"},ch={class:"font-mono"},uh={class:"tabular-nums"},fh={key:0},dh={__name:"InstancesView",setup(e){const t=kt();return(s,n)=>(k(),S("div",M0,[n[13]||(n[13]=a("div",null,[a("h1",{class:"page-title"},"实例"),a("p",{class:"page-subtitle"},"管理组网实例,点击卡片查看详情")],-1)),fe(ka),R(t).instanceList.length===0?(k(),Re(rn,{key:0,text:"暂无运行中的组网,请在上方选择配置启动"})):(k(),Re(al,{key:1,name:"card-list",tag:"div",class:"grid grid-cols-1 gap-4 md:grid-cols-2"},{default:Ee(()=>[(k(!0),S(ae,null,Te(R(t).instanceList,o=>(k(),Re(wa,{key:o.file_name,inst:o,selectable:""},null,8,["inst"]))),128))]),_:1})),R(t).selectedInstance&&R(t).selectedInfo?(k(),S(ae,{key:2},[a("div",L0,[a("h2",N0,[n[0]||(n[0]=ce(" 网络详情 ",-1)),a("span",V0,N(R(t).selectedConfigName),1)]),a("div",j0,[a("div",D0,[n[1]||(n[1]=a("span",{class:"muted"},"虚拟 IP / 掩码",-1)),a("span",B0,N(R(t).selectedInfo.ip||"-")+" / "+N(R(t).selectedInfo.prefix_len||"-"),1)]),a("div",F0,[n[2]||(n[2]=a("span",{class:"muted"},"网关",-1)),a("span",U0,N(R(t).selectedInfo.gateway||"-"),1)]),a("div",H0,[n[3]||(n[3]=a("span",{class:"muted"},"网络编号",-1)),a("span",W0,N(R(t).selectedInfo.network_code||"-"),1)]),a("div",K0,[n[4]||(n[4]=a("span",{class:"muted"},"MTU",-1)),a("span",G0,N(R(t).selectedInfo.mtu||""),1)]),a("div",q0,[n[5]||(n[5]=a("span",{class:"muted"},"NAT 类型",-1)),a("span",z0,N(R(t).selectedInfo.nat_type||"Unknown"),1)]),a("div",Z0,[n[6]||(n[6]=a("span",{class:"muted"},"Public IPv6",-1)),a("span",{class:"max-w-[200px] truncate font-mono text-slate-900 dark:text-white",title:R(t).selectedInfo.public_ipv6},N(R(t).selectedInfo.public_ipv6||"-"),9,J0)]),a("div",Y0,[n[7]||(n[7]=a("span",{class:"muted"},"设备名称",-1)),a("span",Q0,N(R(t).selectedInfo.name||"-"),1)]),a("div",X0,[n[8]||(n[8]=a("span",{class:"muted"},"设备 ID",-1)),a("span",{class:"max-w-[200px] truncate font-mono text-xs text-slate-500 dark:text-slate-400",title:R(t).selectedInfo.device_id},N(R(t).selectedInfo.device_id||"-"),9,eh)])]),a("div",th,[(k(),S(ae,null,Te([{key:"encrypt",label:"加密"},{key:"compress",label:"压缩"},{key:"fec",label:"FEC纠错"},{key:"rtx",label:"QUIC传输"}],o=>a("div",{key:o.key,class:"flex items-center gap-2 rounded-lg bg-slate-50 px-3 py-2 dark:bg-slate-800/50"},[a("span",{class:G(["h-2 w-2 rounded-full",R(t).selectedInfo[o.key]?"bg-green-500":"bg-slate-300 dark:bg-slate-600"])},null,2),a("span",sh,N(o.label),1)])),64))]),a("div",nh,[n[9]||(n[9]=a("span",{class:"mb-2 block text-sm muted"},"Public IPv4s",-1)),a("div",oh,[(k(!0),S(ae,null,Te(R(t).selectedInfo.public_ipv4s,o=>(k(),S("span",{key:o,class:"rounded border border-slate-200 bg-slate-50 px-2 py-1 font-mono text-xs tabular-nums text-green-700 dark:border-slate-600 dark:bg-slate-800 dark:text-green-300"},N(o),1))),128)),!R(t).selectedInfo.public_ipv4s||R(t).selectedInfo.public_ipv4s.length===0?(k(),S("span",lh,"无")):re("",!0)])])]),a("div",rh,[n[12]||(n[12]=a("div",{class:"border-b border-slate-200 px-6 py-4 dark:border-slate-700"},[a("h2",{class:"text-lg font-bold text-slate-900 dark:text-white"},"服务器连接列表")],-1)),a("div",ih,[a("table",ah,[n[11]||(n[11]=a("thead",null,[a("tr",null,[a("th",null,"地址"),a("th",null,"状态"),a("th",null,"延迟"),a("th",null,"版本")])],-1)),a("tbody",null,[(k(!0),S(ae,null,Te(R(t).selectedInfo.server_info,(o,l)=>(k(),S("tr",{key:l},[a("td",ch,N(o.server),1),a("td",null,[a("span",{class:G(o.connected?"badge-green":"badge-red")},N(o.connected?"已连接":"未连接"),3)]),a("td",uh,N(o.server_rtt?o.server_rtt+" ms":"-"),1),a("td",null,N(o.server_version||"-"),1)]))),128)),!R(t).selectedInfo.server_info||R(t).selectedInfo.server_info.length===0?(k(),S("tr",fh,[...n[10]||(n[10]=[a("td",{colspan:"4",class:"text-center text-slate-400"},"暂无数据",-1)])])):re("",!0)])])])])],64)):re("",!0)]))}},Fo=()=>({config_name:"",network_code:"",server:[""],ip:"",mtu:null,rtx:!1,fec:!1,compress:!1,no_punch:!1,input:[],output:[],no_nat:!1,no_tun:!1,port_mapping:[],allow_mapping:!1,device_name:"",device_id:"",tun_name:"",outbound_interface:"",password:"",cert_mode:"skip",fingerprint:"",udp_stun:[],tcp_stun:[],tunnel_port:null}),Cr=e=>{const t=Fo(),s=e.split(`
`);for(const n of s){const o=n.trim();if(!(!o||o.startsWith("#"))){if(o.includes("config_name")){const l=o.match(/config_name\s*=\s*"([^"]*)"/);l&&(t.config_name=l[1])}else if(o.includes("network_code")){const l=o.match(/network_code\s*=\s*"([^"]*)"/);l&&(t.network_code=l[1])}else if(o.startsWith("server")){const l=o.match(/server\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.server=r.map(i=>i.replace(/"/g,"")))}}else if(o.includes("ip =")){const l=o.match(/ip\s*=\s*"([^"]*)"/);l&&(t.ip=l[1])}else if(o.includes("mtu =")){const l=o.match(/mtu\s*=\s*(\d+)/);l&&(t.mtu=parseInt(l[1]))}else if(o.match(/^rtx\s*=/))t.rtx=o.includes("true");else if(o.match(/^fec\s*=/))t.fec=o.includes("true");else if(o.match(/^compress\s*=/))t.compress=o.includes("true");else if(o.match(/^no_punch\s*=/))t.no_punch=o.includes("true");else if(o.startsWith("input")){const l=o.match(/input\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.input=r.map(i=>i.replace(/"/g,"")))}}else if(o.startsWith("output")){const l=o.match(/output\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.output=r.map(i=>i.replace(/"/g,"")))}}else if(o.match(/^no_nat\s*=/))t.no_nat=o.includes("true");else if(o.match(/^no_tun\s*=/))t.no_tun=o.includes("true");else if(o.startsWith("port_mapping")){const l=o.match(/port_mapping\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.port_mapping=r.map(i=>i.replace(/"/g,"")))}}else if(o.match(/^allow_mapping\s*=/))t.allow_mapping=o.includes("true");else if(o.includes("device_name")){const l=o.match(/device_name\s*=\s*"([^"]*)"/);l&&(t.device_name=l[1])}else if(o.includes("device_id")){const l=o.match(/device_id\s*=\s*"([^"]*)"/);l&&(t.device_id=l[1])}else if(o.includes("tun_name")){const l=o.match(/tun_name\s*=\s*"([^"]*)"/);l&&(t.tun_name=l[1])}else if(o.includes("outbound_interface")){const l=o.match(/outbound_interface\s*=\s*"([^"]*)"/);l&&(t.outbound_interface=l[1])}else if(o.includes("password =")){const l=o.match(/password\s*=\s*"([^"]*)"/);l&&(t.password=l[1])}else if(o.includes("cert_mode")){const l=o.match(/cert_mode\s*=\s*"([^"]*)"/);if(l){const r=l[1];r.startsWith("finger:")?(t.cert_mode="finger",t.fingerprint=r.substring(7)):t.cert_mode=r}}else if(o.startsWith("udp_stun")){const l=o.match(/udp_stun\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.udp_stun=r.map(i=>i.replace(/"/g,"")))}}else if(o.startsWith("tcp_stun")){const l=o.match(/tcp_stun\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.tcp_stun=r.map(i=>i.replace(/"/g,"")))}}}}return t},yo=e=>{let t="";e.config_name&&(t+=`# 配置名称
config_name = "${e.config_name}"
`),t+=`
# --- 网络配置 ---
`,t+=`# 网络编号,相同网络编号的会组在同一个虚拟网 (必填)
`,t+=`network_code = "${e.network_code}"
`;const s=e.server.filter(c=>c.trim());s.length>0&&(t+=`# 服务器地址列表(支持 quic / tcp / wss / dynamic) (必填)
`,t+=`# dynamic 协议使用dns txt解析记录值
`,t+=`server = [${s.map(c=>`"${c}"`).join(", ")}]
`),e.ip&&(t+=`
# 自定义虚拟 IP (可选)
`,t+=`ip = "${e.ip}"
`),e.rtx&&(t+=`
# 是否启用quic优化传输 (默认 false)
`,t+=`# 开启后传输过程几乎不会丢包,但是延迟可能会有波动
`,t+=`rtx = true
`),e.fec&&(t+=`
# 是否启用 FEC 前向纠错 (默认 false)
`,t+=`# 开启后可以减少丢包率,损失带宽但是延迟比较稳定,带宽充足时可以使用此功能
`,t+=`fec = true
`),e.no_punch&&(t+=`
# 是否关闭 P2P 打洞 (默认 false)
`,t+=`no_punch = true
`),e.compress&&(t+=`
# 是否启用 LZ4 压缩 (默认 false)
`,t+=`compress = true
`);const n=e.input.filter(c=>c.trim());n.length>0&&(t+=`
# 入栈监听网段 (逗号分隔的 CIDR 和目标 IP),用于点对网,将指定网段的流量发送到目标节点
`,t+=`# 例如192.168.0.0/24,10.26.0.2 表示将192.168.0.0/24网段的数据转发到10.26.0.2
`,t+=`input = [${n.map(c=>`"${c}"`).join(", ")}]
`);const o=e.output.filter(c=>c.trim());o.length>0&&(t+=`
# 出栈允许网段,用于点对网,允许指定网段的转发
`,t+=`output = [${o.map(c=>`"${c}"`).join(", ")}]
`),e.no_nat&&(t+=`
# 是否关闭内置子网NAT,关闭后需要配置网卡转发,否则无法使用点对网
`,t+=`# 通常关闭内置子网NAT,使用系统的网卡转发,点对网性能会更好
`,t+=`no_nat = true
`),e.no_tun&&(t+=`
# 是否关闭TUN虚拟网卡,关闭后只能充当流量出口或者进行端口映射,关闭后无需管理员权限
`,t+=`no_tun = true
`);const l=e.port_mapping.filter(c=>c.trim());l.length>0&&(t+=`
# 端口映射,格式为:协议://本地监听地址-目标虚拟IP-目标映射地址
`,t+=`# 端口映射用于在本地监听指定端口,并将收到的网络流量经由指定虚拟节点转发到目标地址
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80 表示将本地tcp的81端口的数据转发到10.0.0.2:80
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-192.168.1.10:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到192.168.1.10:80
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-anyonehost:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到anyonehost:80
`,t+=`port_mapping = [${l.map(c=>`"${c}"`).join(", ")}]
`),e.allow_mapping&&(t+=`
# 是否允许作为端口映射出口,开启后其他设备才可使用本设备的ip为"目标虚拟IP"
`,t+=`# 开启后虚拟网络其他设备可以使用此设备当跳板访问其他网络
`,t+=`allow_mapping = true
`),e.mtu&&(t+=`
# MTU 设置
`,t+=`mtu = ${e.mtu}
`),t+=`
# --- 设备配置 ---
`,e.device_name&&(t+=`
# 设备名称 (可选,默认读取本机 hostname)
`,t+=`device_name = "${e.device_name}"
`),e.device_id&&(t+=`
# 设备 ID (可选,不填自动生成,不同设备ID不能相同)
`,t+=`device_id = "${e.device_id}"
`),e.tun_name&&(t+=`
# 虚拟网卡名称
`,t+=`tun_name = "${e.tun_name}"
`),e.outbound_interface&&(t+=`
# 绑定对外通信 Socket 的出口网卡名称(用于服务端通信、P2P 打洞及转发流量)
`,t+=`outbound_interface = "${e.outbound_interface}"
`),t+=`
# --- 安全配置 ---
`,e.password&&(t+=`
# 组网加密密码 (可选)
`,t+=`password = "${e.password}"
`),e.cert_mode&&e.cert_mode!=="skip"&&(t+=`
# 证书校验方式:
`,t+=`# skip 跳过验证(默认)
`,t+=`# standard 使用系统证书验证
`,t+=`# finger 使用证书指纹验证,服务端启动时日志会输出指纹
`,e.cert_mode==="finger"&&e.fingerprint?t+=`cert_mode = "finger:${e.fingerprint}"
`:t+=`cert_mode = "${e.cert_mode}"
`);const r=e.udp_stun.filter(c=>c.trim());r.length>0&&(t+=`
# 自定义UDP STUN地址,不设置则用默认stun
`,t+=`udp_stun = [${r.map(c=>`"${c}"`).join(", ")}]
`);const i=e.tcp_stun.filter(c=>c.trim());return i.length>0&&(t+=`
# 自定义TCP STUN地址,不设置则用默认stun
`,t+=`tcp_stun = [${i.map(c=>`"${c}"`).join(", ")}]
`),t},ph=`# config_name = "配置名称"
# --- 网络配置 ---
# 网络编号,相同网络编号的会组在同一个虚拟网 (必填)
network_code = "your_network_code"
# 服务器地址列表(支持 quic / tcp / wss / dynamic) (必填)
# dynamic 协议使用dns txt解析记录值
server = ["quic://1.2.3.4:29872"]
# ===简单使用以下参数可以不动===
# 自定义虚拟 IP (可选)
# ip = "10.10.0.2"
# 是否启用quic优化传输 (默认 false,设置为true时开启)
# 开启后传输过程几乎不会丢包,但是延迟会有波动
# rtx = false
# 是否启用 FEC 前向纠错,损失一定带宽来提升网络稳定性(默认 false,设置为true时开启)
# 开启后可以减少丢包率,损失带宽但是延迟比较稳定,带宽充足时可以使用此功能
# fec = false
# 是否关闭 P2P 打洞 (默认 false,设置为true时关闭)
# no_punch = false
# 是否启用 LZ4 压缩 (默认 false,设置为true时开启)
# compress = false
# 入栈监听网段 (逗号分隔的 CIDR 和目标 IP),用于点对网,将指定网段的流量发送到目标节点
# input = ["192.168.0.0/24,10.26.0.2", "192.168.1.0/24,10.26.0.3"]
# 出栈允许网段,用于点对网,允许指定网段的转发
# output = ["0.0.0.0/0"]
# 是否关闭内置子网NAT,关闭(设为true)后需要配置网卡转发,否则无法使用点对网。通常关闭内置子网NAT,使用系统的网卡转发,点对网性能会更好
# no_nat = false
# 是否关闭TUN虚拟网卡,关闭(设为true)后只能充当流量出口或者进行端口映射,关闭后无需管理员权限
# no_tun = false
# 端口映射,格式为:协议://本地监听地址-目标虚拟IP-目标映射地址
# 端口映射用于在本地监听指定端口,并将收到的网络流量经由指定虚拟节点转发到目标地址,从而实现跨网络或内网服务访问
# 例如 port_mapping = ["tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80"]
# tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80 则表示将本地tcp的81端口的数据转发到10.0.0.2:80
# tcp://0.0.0.0:81-10.0.0.2-192.168.1.10:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到192.168.1.10:80
# tcp://0.0.0.0:81-10.0.0.2-anyonehost:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到anyonehost:80
# port_mapping = []
# 是否允许作为端口映射出口,开启(设置为true)后其他设备才可使用本设备的ip为"目标虚拟IP"
# 开启后虚拟网络其他设备可以使用此设备当跳板访问其他网络
# allow_mapping = false
# MTU 设置
# mtu = 1400
# --- 设备配置 ---
# 设备名称 (可选,默认读取本机 hostname)
# device_name = "my-device"
# 设备 ID (可选,不填自动生成,不同设备ID不能相同)
# device_id = "device-id-xxxx"
# 虚拟网卡名称
# tun_name = "vnt-tun"
# 绑定对外通信 Socket 的出口网卡名称(例如 Ethernet、Wi-Fi、eth0
# outbound_interface = "Ethernet"
# --- 安全配置 ---
# 加密密码 (可选)
# password = "123456"
# 证书校验方式:
# skip 跳过验证(默认)
# standard 使用系统证书验证
# finger 使用证书指纹验证,服务端启动时日志会输出指纹,
# 例如 finger:3bdd8675606837cdf95d5e13445606315762315a78555f9da652940a25feaec1
# cert_mode = "skip"
# --- 其他配置 ---
# 自定义stun地址,分别用于udp打洞和tcp打洞,需要单独配置,不设置则用默认stun
# udp_stun = ["stun.chat.bilibili.com"]
# tcp_stun = ["stun.nextcloud.com:443"]`,hh={class:"text-lg font-bold text-slate-900 dark:text-white"},mh={class:"flex items-center gap-4"},gh={class:"flex rounded-lg border border-slate-300 bg-slate-100 p-1 dark:border-slate-600 dark:bg-slate-800"},vh={key:0,class:"text-sm text-slate-500 font-mono hidden md:block"},bh={class:"h-full overflow-y-auto scrollbar-hide p-6"},xh={class:"max-w-4xl mx-auto space-y-6"},_h={class:"card"},yh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},kh={class:"mt-4"},wh={class:"space-y-2"},Ch=["onUpdate:modelValue"],Sh=["onClick"],Eh={class:"card"},Th={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},$h={class:"card"},Ah={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ih={class:"card"},Rh={class:"space-y-4"},Ph={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Oh={key:0},Mh={class:"card"},Lh={class:"space-y-4"},Nh={class:"space-y-2"},Vh=["onUpdate:modelValue"],jh=["onClick"],Dh={class:"space-y-2"},Bh=["onUpdate:modelValue"],Fh=["onClick"],Uh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Hh={class:"card"},Wh={class:"space-y-4"},Kh={class:"space-y-2"},Gh=["onUpdate:modelValue"],qh=["onClick"],zh={class:"card"},Zh={class:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4"},Jh={class:"card"},Yh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Qh={class:"space-y-2"},Xh=["onUpdate:modelValue"],em=["onClick"],tm={class:"space-y-2"},sm=["onUpdate:modelValue"],nm=["onClick"],om={class:"h-full"},lm={class:"flex-1 text-left text-xs text-slate-500"},rm={key:0},im={key:1},Jt="h-5 w-5 rounded border-slate-300 bg-white text-indigo-600 focus:ring-indigo-500 dark:border-slate-600 dark:bg-slate-700",Yt="flex cursor-pointer items-center justify-between gap-2 rounded-lg border border-slate-200 bg-slate-50 p-3 transition-colors hover:bg-slate-100 dark:border-slate-700 dark:bg-slate-800/50 dark:hover:bg-slate-800",hs="shrink-0 rounded-lg bg-red-50 px-3 py-2 text-red-500 transition-colors hover:bg-red-100 dark:bg-red-900/20 dark:text-red-500 dark:hover:bg-red-900/40",ms="flex w-full items-center justify-center gap-1 rounded-lg bg-slate-100 px-3 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700",jt="text-md mb-4 flex items-center font-bold text-slate-900 dark:text-white",am={__name:"ConfigEditor",props:{show:{type:Boolean,default:!1},fileName:{type:String,default:null}},emits:["close","saved"],setup(e,{emit:t}){const s=e,n=t,o=cs(),l=Z(""),r=Z(""),i=Z("new"),c=Z("form"),f=Z(""),u=Z(!1),p=Z(!1),g=Z(!1),h=Z(Fo()),C=[{value:"skip",label:"跳过验证(默认)"},{value:"standard",label:"系统证书验证"},{value:"finger",label:"证书指纹验证"}];Ve(()=>s.show,async y=>{if(y)if(r.value=s.fileName||"",i.value=s.fileName?"edit":"new",c.value="form",u.value=!1,p.value=!1,s.fileName)try{const d=await Ad(s.fileName);l.value=d,f.value=d,g.value=!0,h.value=Cr(d),yt(()=>{g.value=!1})}catch(d){o.toast.error("获取配置失败: "+d.message),n("close")}else f.value="",h.value=Fo(),l.value=ph});const w=()=>{c.value==="toml"?(c.value="form",g.value=!0,h.value=Cr(l.value),yt(()=>{g.value=!1})):c.value="form"},L=()=>{c.value==="form"&&(p.value?(l.value=yo(h.value),p.value=!1):f.value&&!u.value?l.value=f.value:l.value=yo(h.value)),c.value="toml"};Ve(l,(y,d)=>{c.value==="toml"&&d!==void 0&&(u.value=!0)}),Ve(h,()=>{c.value==="form"&&s.show&&!g.value&&(p.value=!0)},{deep:!0});const T=async()=>{try{let y=l.value;if(c.value==="form"){if(!h.value.network_code.trim()){o.toast.error("请填写网络编号");return}if(h.value.server.filter(b=>b.trim()).length===0){o.toast.error("请至少填写一个服务器地址");return}y=yo(h.value)}await Id(r.value||null,y),o.toast.success("配置已保存"),n("close"),n("saved")}catch(y){o.toast.error("保存失败: "+y.message)}};return(y,d)=>(k(),Re(hl,{show:e.show,"mask-closable":!1,"panel-class":"w-full max-w-6xl h-[85vh]",onClose:d[27]||(d[27]=b=>n("close"))},{header:Ee(()=>[a("h3",hh,N(i.value==="new"?"新建配置":"编辑配置"),1),a("div",mh,[a("div",gh,[a("button",{onClick:w,class:G([c.value==="form"?"bg-white text-slate-900 shadow-sm dark:bg-indigo-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white","px-4 py-1.5 rounded text-sm font-medium transition-colors flex items-center"])},[...d[28]||(d[28]=[a("svg",{class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),ce(" 表单模式 ",-1)])],2),a("button",{onClick:L,class:G([c.value==="toml"?"bg-white text-slate-900 shadow-sm dark:bg-indigo-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white","px-4 py-1.5 rounded text-sm font-medium transition-colors flex items-center"])},[...d[29]||(d[29]=[a("svg",{class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})],-1),ce(" TOML模式 ",-1)])],2)]),r.value?(k(),S("div",vh,N(r.value),1)):re("",!0)])]),body:Ee(()=>[xe(a("div",bh,[a("div",xh,[a("div",_h,[a("h4",{class:G(jt)},[...d[30]||(d[30]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),ce(" 基础配置 ",-1)])]),a("div",yh,[a("div",null,[d[31]||(d[31]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"配置名称",-1)),xe(a("input",{"onUpdate:modelValue":d[0]||(d[0]=b=>h.value.config_name=b),type:"text",placeholder:"例如: 我的VPN配置",class:"input"},null,512),[[Ie,h.value.config_name]])]),a("div",null,[d[32]||(d[32]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 网络编号 "),a("span",{class:"text-red-500"},"*")],-1)),xe(a("input",{"onUpdate:modelValue":d[1]||(d[1]=b=>h.value.network_code=b),type:"text",placeholder:"例如: my_network",required:"",class:"input"},null,512),[[Ie,h.value.network_code]])])]),a("div",kh,[d[35]||(d[35]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 服务器地址 "),a("span",{class:"text-red-500"},"*"),a("span",{class:"text-xs text-slate-500 ml-2"},"支持 quic:// tcp:// wss:// dynamic://")],-1)),a("div",wh,[(k(!0),S(ae,null,Te(h.value.server,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.server[x]=V,type:"text",placeholder:"例如: quic://1.2.3.4:29872",class:"input flex-1"},null,8,Ch),[[Ie,h.value.server[x]]]),h.value.server.length>1?(k(),S("button",{key:0,onClick:V=>h.value.server.splice(x,1),class:G(hs)},[...d[33]||(d[33]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,Sh)):re("",!0)]))),128)),a("button",{onClick:d[2]||(d[2]=b=>h.value.server.push("")),class:G(ms)},[...d[34]||(d[34]=[a("svg",{class:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),ce(" 添加服务器 ",-1)])])])])]),a("div",Eh,[a("h4",{class:G(jt)},[...d[36]||(d[36]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1),ce(" 网络设置 ",-1)])]),a("div",Th,[a("div",null,[d[37]||(d[37]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 自定义虚拟IP "),a("span",{class:"text-xs text-slate-500 ml-1"},"(可选)")],-1)),xe(a("input",{"onUpdate:modelValue":d[3]||(d[3]=b=>h.value.ip=b),type:"text",placeholder:"例如: 10.26.0.2",class:"input"},null,512),[[Ie,h.value.ip]])]),a("div",null,[d[38]||(d[38]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"MTU",-1)),xe(a("input",{"onUpdate:modelValue":d[4]||(d[4]=b=>h.value.mtu=b),type:"number",placeholder:"1380",class:"input"},null,512),[[Ie,h.value.mtu,void 0,{number:!0}]])]),a("div",null,[d[39]||(d[39]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"隧道端口",-1)),xe(a("input",{"onUpdate:modelValue":d[5]||(d[5]=b=>h.value.tunnel_port=b),type:"number",placeholder:"0 (自动分配)",class:"input"},null,512),[[Ie,h.value.tunnel_port,void 0,{number:!0}]])])])]),a("div",$h,[a("h4",{class:G(jt)},[...d[40]||(d[40]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),ce(" 传输优化 ",-1)])]),a("div",Ah,[a("label",{class:G(Yt)},[d[41]||(d[41]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"QUIC传输优化"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"重传丢包")],-1)),xe(a("input",{"onUpdate:modelValue":d[6]||(d[6]=b=>h.value.rtx=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.rtx]])]),a("label",{class:G(Yt)},[d[42]||(d[42]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"FEC前向纠错"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"损失部分带宽提升稳定性")],-1)),xe(a("input",{"onUpdate:modelValue":d[7]||(d[7]=b=>h.value.fec=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.fec]])]),a("label",{class:G(Yt)},[d[43]||(d[43]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"LZ4压缩"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"减少传输数据量")],-1)),xe(a("input",{"onUpdate:modelValue":d[8]||(d[8]=b=>h.value.compress=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.compress]])]),a("label",{class:G(Yt)},[d[44]||(d[44]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭P2P打洞"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"仅通过服务器中转")],-1)),xe(a("input",{"onUpdate:modelValue":d[9]||(d[9]=b=>h.value.no_punch=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.no_punch]])])])]),a("div",Ih,[a("h4",{class:G(jt)},[...d[45]||(d[45]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})],-1),ce(" 安全配置 ",-1)])]),a("div",Rh,[a("div",Ph,[a("div",null,[d[46]||(d[46]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"组网加密密码(连接公共服务器时建议填写,同一组网密码需要相同)",-1)),xe(a("input",{"onUpdate:modelValue":d[10]||(d[10]=b=>h.value.password=b),type:"password",placeholder:"留空则不加密",class:"input"},null,512),[[Ie,h.value.password]])]),a("div",null,[d[47]||(d[47]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"服务端证书校验模式",-1)),fe(ml,{modelValue:h.value.cert_mode,"onUpdate:modelValue":d[11]||(d[11]=b=>h.value.cert_mode=b),options:C,"aria-label":"服务端证书校验模式"},null,8,["modelValue"])])]),h.value.cert_mode==="finger"?(k(),S("div",Oh,[d[48]||(d[48]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 证书指纹 "),a("span",{class:"text-xs text-slate-500 ml-1"},"(服务端启动时日志会输出指纹)")],-1)),xe(a("input",{"onUpdate:modelValue":d[12]||(d[12]=b=>h.value.fingerprint=b),type:"text",placeholder:"例如: 3bdd8675606837cdf95d5e13445606315762315a78555f9da652940a25feaec1",class:"input font-mono text-sm"},null,512),[[Ie,h.value.fingerprint]])])):re("",!0)])]),a("div",Mh,[a("h4",{class:G(jt)},[...d[49]||(d[49]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 01-.806-.98L15 9m0 0V7m0 2v6"})],-1),ce(" NAT与路由 (点对网) ",-1)])]),a("div",Lh,[a("div",null,[d[51]||(d[51]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 入栈网段 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: CIDR,目标IP")],-1)),a("div",Nh,[(k(!0),S(ae,null,Te(h.value.input,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.input[x]=V,type:"text",placeholder:"例如: 192.168.0.0/24,10.26.0.2",class:"input flex-1"},null,8,Vh),[[Ie,h.value.input[x]]]),a("button",{onClick:V=>h.value.input.splice(x,1),class:G(hs)},[...d[50]||(d[50]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,jh)]))),128)),a("button",{onClick:d[13]||(d[13]=b=>h.value.input.push("")),class:G(ms)}," + 添加入栈网段 ")])]),a("div",null,[d[53]||(d[53]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 出栈网段 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: CIDR (允许转发的网段)")],-1)),a("div",Dh,[(k(!0),S(ae,null,Te(h.value.output,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.output[x]=V,type:"text",placeholder:"例如: 0.0.0.0/0",class:"input flex-1"},null,8,Bh),[[Ie,h.value.output[x]]]),a("button",{onClick:V=>h.value.output.splice(x,1),class:G(hs)},[...d[52]||(d[52]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Fh)]))),128)),a("button",{onClick:d[14]||(d[14]=b=>h.value.output.push("")),class:G(ms)}," + 添加出栈网段 ")])]),a("div",Uh,[a("label",{class:G(Yt)},[d[54]||(d[54]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭内置NAT"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"使用系统网卡转发")],-1)),xe(a("input",{"onUpdate:modelValue":d[15]||(d[15]=b=>h.value.no_nat=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.no_nat]])]),a("label",{class:G(Yt)},[d[55]||(d[55]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭TUN网卡"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"仅作流量出口或端口映射")],-1)),xe(a("input",{"onUpdate:modelValue":d[16]||(d[16]=b=>h.value.no_tun=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.no_tun]])])])])]),a("div",Hh,[a("h4",{class:G(jt)},[...d[56]||(d[56]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),ce(" 端口映射 ",-1)])]),a("div",Wh,[a("div",null,[d[58]||(d[58]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ce(" 映射规则 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: 协议://监听地址-虚拟IP-目标地址")],-1)),a("div",Kh,[(k(!0),S(ae,null,Te(h.value.port_mapping,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.port_mapping[x]=V,type:"text",placeholder:"例如: tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80",class:"input flex-1 font-mono"},null,8,Gh),[[Ie,h.value.port_mapping[x]]]),a("button",{onClick:V=>h.value.port_mapping.splice(x,1),class:G(hs)},[...d[57]||(d[57]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,qh)]))),128)),a("button",{onClick:d[17]||(d[17]=b=>h.value.port_mapping.push("")),class:G(ms)}," + 添加映射规则 ")])]),a("label",{class:G(Yt)},[d[59]||(d[59]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"允许作为映射出口"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"允许其他设备使用本机作跳板")],-1)),xe(a("input",{"onUpdate:modelValue":d[18]||(d[18]=b=>h.value.allow_mapping=b),type:"checkbox",class:G(Jt)},null,512),[[Zt,h.value.allow_mapping]])])])]),a("div",zh,[a("h4",{class:G(jt)},[...d[60]||(d[60]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1),ce(" 设备配置 ",-1)])]),a("div",Zh,[a("div",null,[d[61]||(d[61]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"设备名称",-1)),xe(a("input",{"onUpdate:modelValue":d[19]||(d[19]=b=>h.value.device_name=b),type:"text",placeholder:"默认为主机名",class:"input"},null,512),[[Ie,h.value.device_name]])]),a("div",null,[d[62]||(d[62]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"设备ID",-1)),xe(a("input",{"onUpdate:modelValue":d[20]||(d[20]=b=>h.value.device_id=b),type:"text",placeholder:"自动生成",class:"input"},null,512),[[Ie,h.value.device_id]])]),a("div",null,[d[63]||(d[63]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"虚拟网卡名",-1)),xe(a("input",{"onUpdate:modelValue":d[21]||(d[21]=b=>h.value.tun_name=b),type:"text",placeholder:"默认为vnt-tun",class:"input"},null,512),[[Ie,h.value.tun_name]])]),a("div",null,[d[64]||(d[64]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"绑定出口网卡",-1)),xe(a("input",{"onUpdate:modelValue":d[22]||(d[22]=b=>h.value.outbound_interface=b),type:"text",placeholder:"例如 Ethernet、Wi-Fi、eth0",class:"input"},null,512),[[Ie,h.value.outbound_interface]]),d[65]||(d[65]=a("p",{class:"mt-1.5 text-xs leading-5 text-slate-400"},"服务端通信、P2P 打洞及转发流量将使用此网卡",-1))])])]),a("div",Jh,[a("h4",{class:G(jt)},[...d[66]||(d[66]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),ce(" STUN配置 (高级) ",-1)])]),a("div",Yh,[a("div",null,[d[68]||(d[68]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"UDP STUN服务器",-1)),a("div",Qh,[(k(!0),S(ae,null,Te(h.value.udp_stun,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.udp_stun[x]=V,type:"text",placeholder:"例如: stun.l.google.com:19302",class:"input flex-1"},null,8,Xh),[[Ie,h.value.udp_stun[x]]]),a("button",{onClick:V=>h.value.udp_stun.splice(x,1),class:G(hs)},[...d[67]||(d[67]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,em)]))),128)),a("button",{onClick:d[23]||(d[23]=b=>h.value.udp_stun.push("")),class:G(ms)}," + 添加UDP STUN ")])]),a("div",null,[d[70]||(d[70]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"TCP STUN服务器",-1)),a("div",tm,[(k(!0),S(ae,null,Te(h.value.tcp_stun,(b,x)=>(k(),S("div",{key:x,class:"flex gap-2"},[xe(a("input",{"onUpdate:modelValue":V=>h.value.tcp_stun[x]=V,type:"text",placeholder:"例如: stun.nextcloud.com:443",class:"input flex-1"},null,8,sm),[[Ie,h.value.tcp_stun[x]]]),a("button",{onClick:V=>h.value.tcp_stun.splice(x,1),class:G(hs)},[...d[69]||(d[69]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,nm)]))),128)),a("button",{onClick:d[24]||(d[24]=b=>h.value.tcp_stun.push("")),class:G(ms)}," + 添加TCP STUN ")])])])])])],512),[[Gl,c.value==="form"]]),xe(a("div",om,[xe(a("textarea",{"onUpdate:modelValue":d[25]||(d[25]=b=>l.value=b),class:"h-full w-full resize-none bg-slate-50 p-4 font-mono text-sm text-slate-800 focus:outline-none dark:bg-slate-950 dark:text-slate-200",spellcheck:"false",placeholder:"# 在此处输入 TOML 配置..."},null,512),[[Ie,l.value]])],512),[[Gl,c.value==="toml"]])]),footer:Ee(()=>[a("div",lm,[c.value==="form"?(k(),S("span",rm,"填写完成后保存即可生成配置文件")):(k(),S("span",im,"* 请使用标准 TOML 格式"))]),a("button",{class:"btn-ghost",onClick:d[26]||(d[26]=b=>n("close"))},"取消"),a("button",{class:"btn-primary",onClick:T},"保存配置")]),_:1},8,["show"]))}},cm={class:"space-y-6"},um={class:"flex items-end justify-between gap-4"},fm={key:1,class:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"},dm=["onClick"],pm={key:0,class:"absolute right-0 top-0 rounded-bl bg-green-500 px-2 py-1 text-xs text-white"},hm={key:1,class:"absolute right-0 top-0 rounded-bl bg-indigo-500 px-2 py-1 text-xs text-white"},mm={class:"flex items-start"},gm={class:"overflow-hidden"},vm=["title"],bm=["title"],xm={class:"config-card-actions mt-4 flex justify-end transition-opacity"},_m=["onClick"],ym=["onClick"],km={__name:"ConfigView",setup(e){const t=kt(),s=cs(),n=Z(!1),o=Z(null),l=u=>{const p=t.instanceList.find(g=>g.file_name===u);return p?p.status:null},r=u=>{const p=l(u);return p==="running"?"ring-2 ring-green-500/60":p==="starting"?"ring-2 ring-indigo-500/60":""},i=u=>{o.value=u,n.value=!0},c=()=>{t.fetchConfigList()},f=async u=>{if(await s.confirm({title:"删除配置",message:`确定要删除配置 ${u} 吗?`,danger:!0,confirmText:"删除"}))try{await Rd(u),s.toast.success("配置已删除"),t.fetchConfigList()}catch(g){s.toast.error(g.message)}};return at(()=>t.fetchConfigList()),(u,p)=>(k(),S("div",cm,[a("div",um,[p[3]||(p[3]=a("div",null,[a("h1",{class:"page-title"},"配置"),a("p",{class:"page-subtitle"},"管理组网配置文件")],-1)),a("button",{class:"btn-primary",onClick:p[0]||(p[0]=g=>i(null))},[...p[2]||(p[2]=[a("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),ce(" 新建配置 ",-1)])])]),R(t).configList.length===0?(k(),Re(rn,{key:0,text:"暂无配置,点击右上角新建"})):(k(),S("div",fm,[(k(!0),S(ae,null,Te(R(t).configList,g=>(k(),S("div",{key:g.file_name,class:G([r(g.file_name),"card group relative flex min-h-[140px] cursor-pointer flex-col justify-between overflow-hidden"]),onClick:h=>i(g.file_name)},[l(g.file_name)==="running"?(k(),S("div",pm," 运行中 ")):l(g.file_name)==="starting"?(k(),S("div",hm," 启动中 ")):re("",!0),a("div",mm,[p[4]||(p[4]=a("div",{class:"mr-3 mt-1 rounded-lg bg-indigo-50 p-2 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"},[a("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1)),a("div",gm,[a("h3",{class:"truncate text-lg font-bold text-slate-900 dark:text-white",title:g.config_name},N(g.config_name||"Unnamed"),9,vm),a("p",{class:"truncate font-mono text-xs text-slate-400",title:g.file_name},N(g.file_name),9,bm)])]),a("div",xm,[a("button",{class:"mr-4 text-sm text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",onClick:rs(h=>i(g.file_name),["stop"])}," 编辑 ",8,_m),a("button",{class:"text-sm text-red-500 hover:text-red-400",onClick:rs(h=>f(g.file_name),["stop"])}," 删除 ",8,ym)])],10,dm))),128))])),fe(am,{show:n.value,"file-name":o.value,onClose:p[1]||(p[1]=g=>n.value=!1),onSaved:c},null,8,["show","file-name"])]))}},wm=Xn(km,[["__scopeId","data-v-b7dce6ea"]]),Cm=e=>{if(!e)return"-";const t=new Date(e*1e3),s=n=>n<10?"0"+n:n;return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`},Sr=e=>{if(e===0||e===void 0||e===null)return"0B";const t=["B","KB","MB","GB","TB"];let s=0,n=e;for(;n>=1024&&s<t.length-1;)n/=1024,s++;return s===0?n+t[s]:n.toFixed(2)+t[s]},Uo=e=>{if(e===0||e===void 0||e===null)return"0B/s";const t=["B/s","KB/s","MB/s","GB/s"];let s=0,n=e;for(;n>=1024&&s<t.length-1;)n/=1024,s++;return s===0?n+t[s]:n.toFixed(2)+t[s]},Sm=e=>{const t=[1024,10240,102400,1048576,10485760,104857600,1073741824];for(const s of t)if(e<=s)return s;return Math.ceil(e/(1024*1024*1024))*1024*1024*1024},Ca={__name:"StatusDot",props:{status:{type:String,default:"stopped"},size:{type:String,default:"w-2.5 h-2.5"}},setup(e){const t=s=>s==="running"?"bg-green-500":s==="starting"?"bg-blue-500 animate-pulse":"bg-slate-400 dark:bg-slate-500";return(s,n)=>(k(),S("span",{class:G(["rounded-full inline-block shrink-0",[e.size,t(e.status)]])},null,2))}},Em={class:"flex items-center gap-4 mb-2 text-xs text-slate-400"},Tm={class:"ml-auto"},$m={__name:"SpeedChart",props:{history:{type:Object,required:!0},size:{type:Number,default:60}},setup(e,{expose:t}){const s=e,n=Z(null),o=Z(""),l=()=>{const r=n.value;if(!r)return;const i=r.getContext("2d"),c=s.history?s.history.tx:[],f=s.history?s.history.rx:[],u=s.size,p=window.devicePixelRatio||1,g=r.getBoundingClientRect();if(g.width===0)return;r.width=g.width*p,r.height=g.height*p,i.setTransform(p,0,0,p,0,0);const h=g.width,C=g.height,L=document.documentElement.classList.contains("dark")?{bg:"#0c1222",grid:"rgba(71, 85, 105, 0.3)",rx:"#60a5fa",rxFill:"rgba(96, 165, 250, 0.15)",tx:"#4ade80",txFill:"rgba(74, 222, 128, 0.15)"}:{bg:"#f8fafc",grid:"rgba(148, 163, 184, 0.35)",rx:"#3b82f6",rxFill:"rgba(59, 130, 246, 0.12)",tx:"#22c55e",txFill:"rgba(34, 197, 94, 0.12)"},T=8,y=4,d=0,x=h-d-0,V=C-T-y;i.fillStyle=L.bg,i.fillRect(0,0,h,C);const j=[...c,...f];let H=j.length>0?Math.max(...j):0;H<1024&&(H=1024);const M=Sm(H);o.value="峰值: "+Uo(M);const z=4;i.strokeStyle=L.grid,i.lineWidth=1;for(let J=0;J<=z;J++){const P=T+V/z*J;i.beginPath(),i.moveTo(d,P),i.lineTo(d+x,P),i.stroke()}const oe=6;for(let J=0;J<=oe;J++){const P=d+x/oe*J;i.beginPath(),i.moveTo(P,T),i.lineTo(P,T+V),i.stroke()}const F=(J,P,te)=>{if(J.length<2)return;const ue=x/(u-1),se=u-J.length;i.beginPath(),i.moveTo(d+se*ue,T+V);for(let ie=0;ie<J.length;ie++){const Fe=d+(se+ie)*ue,qe=T+V-J[ie]/M*V;i.lineTo(Fe,qe)}i.lineTo(d+(se+J.length-1)*ue,T+V),i.closePath(),i.fillStyle=te,i.fill(),i.beginPath();for(let ie=0;ie<J.length;ie++){const Fe=d+(se+ie)*ue,qe=T+V-J[ie]/M*V;ie===0?i.moveTo(Fe,qe):i.lineTo(Fe,qe)}i.strokeStyle=P,i.lineWidth=1.5,i.stroke()};F(f,L.rx,L.rxFill),F(c,L.tx,L.txFill)};return at(()=>yt(l)),Ve(()=>[s.history?.tx?.length,s.history?.rx?.length,s.history?.tx?.at(-1),s.history?.rx?.at(-1)],()=>yt(l)),t({draw:l}),(r,i)=>(k(),S("div",null,[a("div",Em,[i[0]||(i[0]=a("span",{class:"flex items-center"},[a("span",{class:"inline-block w-3 h-0.5 bg-green-400 mr-1"}),ce("上传速度")],-1)),i[1]||(i[1]=a("span",{class:"flex items-center"},[a("span",{class:"inline-block w-3 h-0.5 bg-blue-400 mr-1"}),ce("下载速度")],-1)),a("span",Tm,N(o.value),1)]),a("canvas",{ref_key:"canvasRef",ref:n,class:"rounded w-full block h-[150px]"},null,512)]))}},Am={class:"space-y-4"},Im={key:0,class:"scrollbar-hide flex items-center gap-2 overflow-x-auto"},Rm=["onClick"],Pm={key:2,class:"card overflow-hidden p-0"},Om={class:"flex items-center justify-between border-b border-slate-200 px-6 py-4 dark:border-slate-700"},Mm={class:"flex gap-4 text-sm muted"},Lm={class:"font-medium tabular-nums text-slate-900 dark:text-white"},Nm={class:"font-medium tabular-nums text-slate-900 dark:text-white"},Vm={class:"custom-scrollbar max-h-[600px] overflow-x-auto"},jm={class:"table peer-table"},Dm={class:"transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50"},Bm=["onClick"],Fm={class:"font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},Um=["onMouseenter"],Hm={class:"hidden text-xs text-slate-400 md:table-cell"},Wm={class:"flex items-center gap-2"},Km={key:0,class:"tooltip"},Gm={key:1,class:"tooltip"},qm={key:2,class:"tooltip cursor-help"},zm={class:"tooltip-text"},Zm={key:1,class:"text-yellow-600 dark:text-yellow-400"},Jm={key:2,class:"text-slate-400"},Ym={class:"tabular-nums"},Qm=["title"],Xm={key:1,class:"text-slate-400"},eg={class:"text-xs"},tg={key:0,class:"leading-relaxed"},sg={class:"text-green-600 tabular-nums dark:text-green-400"},ng={class:"text-blue-600 tabular-nums dark:text-blue-400"},og={key:1,class:"text-slate-400"},lg={class:"hidden font-mono text-xs text-slate-400 md:table-cell"},rg={key:0},ig={colspan:"10",class:"p-0"},ag={class:"border-t border-slate-200 bg-slate-50 px-4 py-3 dark:border-slate-700/50 dark:bg-slate-950/60"},cg=60,ug={__name:"PeersView",setup(e){const t=kt(),s=Qe("peerTooltip"),n=(d,b)=>s.value?.showPeerTooltip(d,b),o=()=>s.value?.hidePeerTooltip(),l=Z([]);let r=null,i={},c=0;const f=Ot({}),u=Ot({}),p=d=>{f[d]=!f[d]},g=()=>{const d=t.instanceList.find(b=>b.file_name===t.selectedInstance);return d?d.status:null},h=()=>{l.value=[],i={},c=0;for(const d in u)delete u[d];for(const d in f)delete f[d]},C=async()=>{if(!t.selectedInstance||g()!=="running"){h();return}try{const d=await yd(t.selectedInstance)||[],b=Date.now(),x=c>0?(b-c)/1e3:0,V={};for(const j of d)if(j.traffic){const H=j.ip,M=i[H];if(M&&x>0){const z=Math.max(0,j.traffic.tx_bytes-M.tx_bytes),oe=Math.max(0,j.traffic.rx_bytes-M.rx_bytes);j.traffic.tx_speed=Math.round(z/x),j.traffic.rx_speed=Math.round(oe/x)}else j.traffic.tx_speed=0,j.traffic.rx_speed=0;V[H]={tx_bytes:j.traffic.tx_bytes,rx_bytes:j.traffic.rx_bytes},u[H]||(u[H]={tx:[],rx:[]}),u[H].tx.push(j.traffic.tx_speed),u[H].rx.push(j.traffic.rx_speed),u[H].tx.length>cg&&(u[H].tx.shift(),u[H].rx.shift())}i=V,c=b,l.value=d}catch(d){console.error(d)}};at(()=>{C(),r=setInterval(()=>{t.isPageVisible&&C()},3e3)}),Es(()=>{r&&clearInterval(r)}),Ve(()=>t.selectedInstance,()=>{h(),C()}),Ve(g,d=>{d==="running"&&C()});const w=d=>d.metric===1?"font-medium text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400",L=d=>{const b=d.metric===1,x=d.protocol.includes("Tcp");return b?x?"打洞TCP直连":"打洞UDP直连":x?"客户端TCP中继":"客户端UDP中继"},T=d=>d===3?"己方加密对方未加密":d===4?"己方未加密对方加密":d===5?"密钥不一致":"未知错误",y=d=>t.selectedInstance===d?"border-indigo-600 bg-indigo-600 text-white dark:border-indigo-500 dark:bg-indigo-500":"border-slate-300 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700";return(d,b)=>(k(),S("div",Am,[b[8]||(b[8]=a("div",null,[a("h1",{class:"page-title"},"设备列表"),a("p",{class:"page-subtitle"},"查看各实例的设备连接与流量状况")],-1)),R(t).instanceList.length>0?(k(),S("div",Im,[(k(!0),S(ae,null,Te(R(t).instanceList,x=>(k(),S("button",{key:x.file_name,onClick:V=>R(t).selectedInstance=x.file_name,class:G([y(x.file_name),"flex shrink-0 items-center rounded-lg border px-4 py-2 text-sm font-medium transition-colors"])},[fe(Ca,{status:x.status,size:"w-2 h-2",class:"mr-2"},null,8,["status"]),ce(" "+N(x.config_name||x.file_name),1)],10,Rm))),128))])):re("",!0),R(t).selectedInstance?(k(),S("div",Pm,[a("div",Om,[b[2]||(b[2]=a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"设备列表",-1)),a("div",Mm,[a("span",null,[b[0]||(b[0]=ce(" Online: ",-1)),a("span",Lm,N(l.value.filter(x=>x.online).length),1)]),a("span",null,[b[1]||(b[1]=ce(" Total: ",-1)),a("span",Nm,N(l.value.length),1)])])]),a("div",Vm,[a("table",jm,[b[7]||(b[7]=a("thead",null,[a("tr",null,[a("th",{class:"w-8 px-2"}),a("th",null,"IP地址"),a("th",null,"名称"),a("th",{class:"hidden md:table-cell"},"版本"),a("th",null,"状态"),a("th",null,"模式"),a("th",null,"延迟"),a("th",null,"丢包率"),a("th",null,"流量"),a("th",{class:"hidden md:table-cell"},"最后在线")])],-1)),a("tbody",null,[(k(!0),S(ae,null,Te(l.value,x=>(k(),S(ae,{key:x.ip},[a("tr",Dm,[a("td",{class:"cursor-pointer select-none px-2 text-center",onClick:V=>p(x.ip)},[(k(),S("svg",{class:G(["inline-block h-4 w-4 text-slate-400 transition-transform duration-200",{"rotate-90":f[x.ip]}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...b[3]||(b[3]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))],8,Bm),a("td",Fm,[a("span",{class:"cursor-help border-b border-dotted border-indigo-400/50 pb-0.5",onMouseenter:V=>n(V,x),onMouseleave:o},N(x.ip),41,Um)]),a("td",null,N(x.name||"-"),1),a("td",Hm,N(x.version||"-"),1),a("td",null,[a("div",Wm,[a("span",{class:G(x.online?"badge-green":"badge-gray")},N(x.online?"在线":"离线"),3),x.online&&x.key_equal===1?(k(),S("div",Km,[...b[4]||(b[4]=[a("svg",{class:"h-4 w-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})],-1),a("span",{class:"tooltip-text"},"双方加密传输",-1)])])):x.online&&x.key_equal===2?(k(),S("div",Gm,[...b[5]||(b[5]=[a("svg",{class:"h-4 w-4 text-yellow-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})],-1),a("span",{class:"tooltip-text"},"双方未加密",-1)])])):x.online&&[3,4,5].includes(x.key_equal)?(k(),S("div",qm,[b[6]||(b[6]=a("svg",{class:"h-4 w-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),a("span",zm,N(T(x.key_equal)),1)])):re("",!0)])]),a("td",null,[x.online&&x.route?(k(),S("span",{key:0,class:G(w(x.route))},N(L(x.route)),3)):x.online?(k(),S("span",Zm,"服务器中继")):(k(),S("span",Jm,"-"))]),a("td",Ym,N(x.route?x.route.rtt+" ms":"-"),1),a("td",null,[x.packet_loss?(k(),S("span",{key:0,class:G(x.packet_loss.loss_rate>10?"text-red-600 dark:text-red-400":x.packet_loss.loss_rate>5?"text-yellow-600 dark:text-yellow-400":"text-green-600 dark:text-green-400"),title:"Sent: "+x.packet_loss.sent+", Received: "+x.packet_loss.received},N(x.packet_loss.loss_rate.toFixed(1))+"%",11,Qm)):(k(),S("span",Xm,"-"))]),a("td",eg,[x.traffic?(k(),S("div",tg,[a("div",sg," ↑ "+N(R(Sr)(x.traffic.tx_bytes))+" ("+N(R(Uo)(x.traffic.tx_speed))+") ",1),a("div",ng," ↓ "+N(R(Sr)(x.traffic.rx_bytes))+" ("+N(R(Uo)(x.traffic.rx_speed))+") ",1)])):(k(),S("span",og,"-"))]),a("td",lg,N(R(Cm)(x.last_connected_time)),1)]),f[x.ip]?(k(),S("tr",rg,[a("td",ig,[a("div",ag,[fe($m,{history:u[x.ip]||{tx:[],rx:[]},size:60},null,8,["history"])])])])):re("",!0)],64))),128))])])])])):(k(),Re(rn,{key:1,text:"暂无运行中的组网实例"}))]))}},fg=Xn(ug,[["__scopeId","data-v-c64dc8e9"]]),dg={class:"space-y-4"},pg={key:0,class:"scrollbar-hide flex items-center gap-2 overflow-x-auto"},hg=["onClick"],mg={key:2,class:"card overflow-hidden p-0"},gg={class:"custom-scrollbar max-h-[600px] overflow-x-auto"},vg={class:"table"},bg=["rowspan"],xg={class:"font-mono tabular-nums text-yellow-700 dark:text-yellow-300"},_g={class:"tabular-nums"},yg={class:"tabular-nums"},kg={__name:"RoutesView",setup(e){const t=kt(),s=Z([]);let n=null;const o=()=>{const i=t.instanceList.find(c=>c.file_name===t.selectedInstance);return i?i.status:null},l=async()=>{if(!t.selectedInstance||o()!=="running"){s.value=[];return}try{s.value=await kd(t.selectedInstance)||[]}catch(i){console.error(i)}};at(()=>{l(),n=setInterval(()=>{t.isPageVisible&&l()},3e3)}),Es(()=>{n&&clearInterval(n)}),Ve(()=>t.selectedInstance,()=>{l()}),Ve(o,i=>{i==="running"&&l()});const r=i=>t.selectedInstance===i?"border-indigo-600 bg-indigo-600 text-white dark:border-indigo-500 dark:bg-indigo-500":"border-slate-300 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700";return(i,c)=>(k(),S("div",dg,[c[2]||(c[2]=a("div",null,[a("h1",{class:"page-title"},"路由"),a("p",{class:"page-subtitle"},"查看各实例的路由表")],-1)),R(t).instanceList.length>0?(k(),S("div",pg,[(k(!0),S(ae,null,Te(R(t).instanceList,f=>(k(),S("button",{key:f.file_name,onClick:u=>R(t).selectedInstance=f.file_name,class:G([r(f.file_name),"flex shrink-0 items-center rounded-lg border px-4 py-2 text-sm font-medium transition-colors"])},[fe(Ca,{status:f.status,size:"w-2 h-2",class:"mr-2"},null,8,["status"]),ce(" "+N(f.config_name||f.file_name),1)],10,hg))),128))])):re("",!0),R(t).selectedInstance?(k(),S("div",mg,[c[1]||(c[1]=a("div",{class:"border-b border-slate-200 px-6 py-4 dark:border-slate-700"},[a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"路由表")],-1)),a("div",gg,[a("table",vg,[c[0]||(c[0]=a("thead",null,[a("tr",null,[a("th",null,"目标节点IP"),a("th",null,"目标网络"),a("th",null,"跳数"),a("th",null,"延迟")])],-1)),a("tbody",null,[(k(!0),S(ae,null,Te(s.value,f=>(k(),S(ae,{key:f.ip},[(k(!0),S(ae,null,Te(f.routes,(u,p)=>(k(),S("tr",{key:p,class:"hover:bg-slate-50 dark:hover:bg-slate-800/50"},[p===0?(k(),S("td",{key:0,rowspan:f.routes.length,class:"font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},N(f.ip),9,bg)):re("",!0),a("td",xg,N(u.addr),1),a("td",_g,N(u.metric),1),a("td",yg,N(u.rtt)+" ms",1)]))),128))],64))),128))])])])])):(k(),Re(rn,{key:1,text:"暂无运行中的组网实例"}))]))}},wg={class:"mx-auto max-w-4xl space-y-5"},Cg={key:0,class:"card text-sm text-slate-400"},Sg={key:1,class:"card border-red-200 text-sm text-red-600 dark:border-red-900 dark:text-red-300"},Eg={class:"card space-y-6"},Tg={class:"flex items-start justify-between gap-5"},$g=["aria-checked","disabled"],Ag={class:"grid gap-5 sm:grid-cols-2"},Ig={class:"block"},Rg=["disabled"],Pg={class:"block"},Og={class:"mb-2 flex items-center justify-between gap-3"},Mg=["disabled"],Lg={class:"block min-w-0 truncate rounded-lg border border-slate-200 bg-slate-50 px-3 py-2.5 text-xs text-slate-600 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-300"},Ng={key:0,class:"border-t border-slate-200 pt-5 dark:border-slate-800"},Vg={key:0,class:"text-xs text-green-600 dark:text-green-400"},jg={key:1,class:"text-xs text-red-600 dark:text-red-400"},Dg={class:"card"},Bg={class:"flex items-start gap-3"},Fg={class:"min-w-0 flex-1"},Ug={class:"text-sm font-semibold text-slate-900 dark:text-white"},Hg={class:"mt-1 text-xs text-slate-400"},Wg={key:0,class:"mt-4 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2.5 font-mono text-xs text-slate-600 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-300"},Kg={class:"block truncate"},Gg={key:1,class:"mt-3 flex flex-wrap gap-2"},qg={__name:"WebAccessView",setup(e){const t=globalThis.__VNT_WEB_ACCESS__,s=Ot({enabled:!1,port:19099,global:!1,token:""}),n=Z(null),o=Z(!0),l=Z(!1),r=Z(""),i=Z(""),c=[{value:!1,label:"仅本机(推荐)"},{value:!0,label:"局域网内所有设备"}],f=y=>{n.value=y,Object.assign(s,{enabled:y.enabled,port:y.port,global:y.global,token:y.token})},u=async()=>{o.value=!0,i.value="";try{if(!t)throw new Error("Web 访问设置仅在桌面客户端中提供");f(await t.status())}catch(y){i.value=y.message||String(y)}finally{o.value=!1}},p=async(y,d)=>{l.value=!0,i.value="",r.value="";try{f(await t.update({...s,...y,port:Number(y.port??s.port)})),r.value=d}catch(b){const x=b.message||String(b);try{f(await t.status())}catch{}i.value=x}finally{l.value=!1}},g=async()=>{const y=!s.enabled;await p({enabled:y},y?"Web 服务已启动":"Web 服务已关闭")},h=async()=>{const y=await t.generateToken();await p({token:y},s.enabled?"新令牌已生效,Web 服务已重新加载":"新令牌已生成")},C=async()=>{s.enabled||await p({},"监听设置已自动保存")},w=async y=>{s.global=y,await C()},L=async()=>{await navigator.clipboard.writeText(n.value.url),r.value="访问地址已复制"},T=async()=>{await t.openUrl(n.value.url)};return at(u),(y,d)=>(k(),S("div",wg,[d[7]||(d[7]=a("div",{class:"page-title"},[a("div",null,[a("h2",null,"Web 访问"),a("p",null,"从浏览器访问当前 VNT 进程,API 请求由持久访问令牌保护。")])],-1)),o.value?(k(),S("div",Cg,"正在读取 Web 服务状态…")):R(t)?(k(),S(ae,{key:2},[a("section",Eg,[a("div",Tg,[d[1]||(d[1]=a("div",null,[a("h3",{class:"text-sm font-semibold text-slate-900 dark:text-white"},"启用 Web 服务")],-1)),a("button",{type:"button",role:"switch","aria-label":"启用 Web 服务","aria-checked":s.enabled,disabled:l.value,class:G(["web-switch transition-colors disabled:opacity-50",s.enabled?"bg-indigo-600 dark:bg-indigo-500":"bg-slate-300 dark:bg-slate-600"]),onClick:g},[a("span",{class:G(["web-switch-knob bg-white shadow-sm",{"web-switch-knob-on":s.enabled}])},null,2)],10,$g)]),a("div",Ag,[a("label",Ig,[d[2]||(d[2]=a("span",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200"},"监听端口",-1)),xe(a("input",{"onUpdate:modelValue":d[0]||(d[0]=b=>s.port=b),class:"input font-mono",type:"number",min:"1",max:"65535",disabled:l.value||s.enabled,onChange:C},null,40,Rg),[[Ie,s.port,void 0,{number:!0}]])]),a("label",Pg,[d[3]||(d[3]=a("span",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200"},"监听范围",-1)),fe(ml,{"model-value":s.global,options:c,disabled:l.value||s.enabled,"aria-label":"监听范围","onUpdate:modelValue":w},null,8,["model-value","disabled"])])]),d[6]||(d[6]=a("p",{class:"-mt-3 text-xs text-slate-400"},"端口和监听范围会自动保存;需要修改时请先关闭 Web 服务。",-1)),a("div",null,[a("div",Og,[d[4]||(d[4]=a("span",{class:"text-sm font-medium text-slate-700 dark:text-slate-200"},"访问令牌",-1)),a("button",{class:"text-xs font-medium text-indigo-600 hover:text-indigo-500 disabled:opacity-50 dark:text-indigo-400",type:"button",disabled:l.value,onClick:h},"更换令牌",8,Mg)]),a("code",Lg,N(s.token),1),d[5]||(d[5]=a("p",{class:"mt-2 text-xs text-slate-400"},"更换令牌后,已登录的浏览器需要使用新令牌重新鉴权。",-1))]),r.value||i.value?(k(),S("div",Ng,[r.value?(k(),S("span",Vg,N(r.value),1)):re("",!0),i.value?(k(),S("span",jg,N(i.value),1)):re("",!0)])):re("",!0)]),a("section",Dg,[a("div",Bg,[a("span",{class:G(["mt-1 h-2.5 w-2.5 shrink-0 rounded-full",n.value?.running?"bg-green-500":"bg-slate-300 dark:bg-slate-600"])},null,2),a("div",Fg,[a("div",Ug,N(n.value?.running?"运行中":"未运行"),1),a("div",Hg,"监听地址:"+N(n.value?.listenAddress),1),n.value?.running?(k(),S("div",Wg,[a("span",Kg,N(n.value.url),1)])):re("",!0),n.value?.running?(k(),S("div",Gg,[a("button",{class:"btn-primary btn-sm",type:"button",onClick:T},"打开浏览器"),a("button",{class:"btn-ghost btn-sm",type:"button",onClick:L},"复制访问地址")])):re("",!0)])])])],64)):(k(),S("div",Sg,N(i.value),1))]))}},zg=Xn(qg,[["__scopeId","data-v-a6f46239"]]),Zg={class:"mx-auto max-w-3xl space-y-5"},Jg={class:"card flex items-center gap-4"},Yg=["src"],Qg={class:"min-w-0"},Xg={class:"mt-2 font-mono text-xs text-slate-400"},ev={class:"card"},tv={class:"card"},sv={class:"flex flex-wrap items-start justify-between gap-4"},nv={class:"mt-2 text-sm text-slate-500 dark:text-slate-400"},ov=["disabled"],lv={key:1,class:"mt-4"},rv={class:"mb-1.5 flex justify-between text-xs text-slate-400"},iv={class:"h-1.5 overflow-hidden rounded-full bg-slate-200 dark:bg-slate-700"},av={key:2,class:"mt-4 flex flex-wrap gap-2"},cv=["disabled"],uv={key:3,class:"mt-4 text-xs leading-5 text-slate-400"},Er="https://github.com/vnt-dev/vnt",fv="https://api.github.com/repos/vnt-dev/vnt/releases?per_page=20",dv={__name:"AboutView",setup(e){const t=`${Er}/releases`,s=kt(),n=Z(bt?"desktop":""),o=Z(!1),l=Z(!1),r=Z(null),i=Z(""),c=Z(""),f=Z(0),u=Z(0),p=he(()=>s.version||"2.0.0"),g=he(()=>u.value?Math.min(100,Math.round(f.value/u.value*100)):0),h=d=>{const b=String(d||"").trim().match(/^v?(\d+)\.(\d+)\.(\d+)(?:[+-].*)?$/);return b?b.slice(1).map(Number):null},C=(d,b)=>{const x=h(d),V=h(b);if(!x||!V)return 0;for(let j=0;j<3;j+=1)if(x[j]!==V[j])return x[j]>V[j]?1:-1;return 0},w=async d=>{globalThis.__VNT_WEB_ACCESS__?.openUrl?await globalThis.__VNT_WEB_ACCESS__.openUrl(d):window.open(d,"_blank","noopener,noreferrer")},L=async()=>{const d=await fetch(fv,{headers:{Accept:"application/vnd.github+json"},cache:"no-store"});if(!d.ok)throw new Error(`GitHub 返回 ${d.status}`);const b=(await d.json()).filter(V=>!V.draft&&!V.prerelease&&h(V.tag_name));b.sort((V,j)=>C(j.tag_name,V.tag_name));const x=b[0];if(!x)throw new Error("没有找到可用的发布版本");return{version:x.tag_name.replace(/^v/,""),body:x.body||"",url:x.html_url||t}},T=async()=>{o.value=!0,i.value="",c.value="",r.value=null;try{if(bt){let b;try{b=await globalThis.__VNT_UPDATER__?.check()}catch{const x=await L();if(C(x.version,p.value)<=0){i.value="latest",c.value="当前已是最新版本";return}r.value={...x,manualOnly:!0},i.value="update",c.value=`发现新版本 v${x.version},该版本暂未提供自动更新包。`;return}if(!b){i.value="latest",c.value="当前已是最新版本";return}r.value={...b,url:t},i.value="update",c.value=`发现新版本 v${b.version},可以直接下载并更新。`;return}n.value||=await kr();const d=await L();if(C(d.version,p.value)<=0){i.value="latest",c.value="当前已是最新版本";return}r.value=d,i.value="update",c.value=n.value==="desktop_web"?`发现新版本 v${d.version},请回到 VNT Desktop 的“关于”页面完成更新。`:`发现新版本 v${d.version},请下载新版本并替换当前 vnt2_web 程序。`}catch(d){i.value="error",c.value=`检查更新失败:${d?.message||d}`}finally{o.value=!1}},y=async()=>{l.value=!0,f.value=0,u.value=0,c.value="正在准备下载更新…";try{await globalThis.__VNT_UPDATER__.downloadAndInstall(d=>{f.value=d.downloaded,u.value=d.contentLength,c.value=d.event==="Finished"?"下载完成,正在安装…":"正在下载更新…"})}catch(d){i.value="error",c.value=`更新失败:${d?.message||d}`,l.value=!1}};return at(async()=>{if(!s.version)try{s.version=await ba()}catch{}if(!bt)try{n.value=await kr()}catch{n.value="standalone_web"}}),(d,b)=>(k(),S("div",Zg,[b[9]||(b[9]=a("div",null,[a("h1",{class:"page-title"},"关于"),a("p",{class:"page-subtitle"},"VNT 客户端信息与软件更新")],-1)),a("section",Jg,[a("img",{src:R(Qn),alt:"VNT",class:"h-16 w-16 shrink-0 rounded-2xl"},null,8,Yg),a("div",Qg,[b[2]||(b[2]=a("h2",{class:"text-lg font-bold text-slate-900 dark:text-white"},"VNT",-1)),b[3]||(b[3]=a("p",{class:"mt-1 text-sm text-slate-500 dark:text-slate-400"},"简单、高效的异地组网与内网穿透工具",-1)),a("p",Xg,"当前版本 v"+N(p.value),1)])]),a("section",ev,[b[5]||(b[5]=a("h2",{class:"text-sm font-semibold text-slate-900 dark:text-white"},"开源项目",-1)),b[6]||(b[6]=a("p",{class:"mt-2 text-sm leading-6 text-slate-500 dark:text-slate-400"},"项目代码、使用说明和问题反馈均托管在 GitHub。",-1)),a("button",{class:"btn-ghost mt-4",type:"button",onClick:b[0]||(b[0]=x=>w(Er))},[...b[4]||(b[4]=[a("svg",{class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},[a("path",{d:"M14 5h5v5m0-5-9 9M19 13v5a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.8"})],-1),ce(" github.com/vnt-dev/vnt ",-1)])])]),a("section",tv,[a("div",sv,[a("div",null,[b[7]||(b[7]=a("h2",{class:"text-sm font-semibold text-slate-900 dark:text-white"},"软件更新",-1)),a("p",nv,N(R(bt)?"检查并安装 VNT Desktop 的最新版本。":"检查 GitHub 上发布的最新版本。"),1)]),a("button",{class:"btn-primary",type:"button",disabled:o.value||l.value,onClick:T},N(o.value?"正在检查…":"检查更新"),9,ov)]),c.value?(k(),S("div",{key:0,class:G(["mt-5 rounded-lg border px-4 py-3 text-sm",i.value==="error"?"border-red-200 bg-red-50 text-red-700 dark:border-red-900 dark:bg-red-950/40 dark:text-red-300":i.value==="update"?"border-indigo-200 bg-indigo-50 text-indigo-700 dark:border-indigo-900 dark:bg-indigo-950/40 dark:text-indigo-300":"border-slate-200 bg-slate-50 text-slate-600 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-300"])},N(c.value),3)):re("",!0),l.value&&u.value?(k(),S("div",lv,[a("div",rv,[b[8]||(b[8]=a("span",null,"下载进度",-1)),a("span",null,N(g.value)+"%",1)]),a("div",iv,[a("div",{class:"h-full rounded-full bg-indigo-600 transition-[width] dark:bg-indigo-500",style:sn({width:`${g.value}%`})},null,4)])])):re("",!0),i.value==="update"?(k(),S("div",av,[R(bt)&&!r.value?.manualOnly?(k(),S("button",{key:0,class:"btn-primary",type:"button",disabled:l.value,onClick:y},N(l.value?"正在更新…":"下载并更新"),9,cv)):r.value?.manualOnly||n.value==="standalone_web"?(k(),S("button",{key:1,class:"btn-ghost",type:"button",onClick:b[1]||(b[1]=x=>w(r.value?.url||t))},"查看发布版本")):re("",!0)])):re("",!0),R(bt)?(k(),S("p",uv,"安装更新时桌面客户端可能自动退出,完成后将重新启动。")):re("",!0)])]))}},pv=[{path:"/",component:O0},{path:"/instances",component:dh},{path:"/general",redirect:"/instances"},{path:"/config",component:wm},{path:"/peers",component:fg},{path:"/routes",component:kg},{path:"/web-access",component:zg},{path:"/about",component:dv}],hv=gd({history:zf(),routes:pv}),eo=document.querySelector('link[rel~="icon"]')||document.createElement("link");eo.rel="icon";eo.type="image/png";eo.href=Qn;document.head.appendChild(eo);ef(jp).use(nf()).use(hv).mount("#app");