@drocketxx/pm2me 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
(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 r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=s(o);fetch(o.href,r)}})();function Ao(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const be={},us=[],bt=()=>{},di=()=>!1,yn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),To=e=>e.startsWith("onUpdate:"),Oe=Object.assign,Mo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ql=Object.prototype.hasOwnProperty,pe=(e,t)=>Ql.call(e,t),ee=Array.isArray,ds=e=>Ws(e)==="[object Map]",bs=e=>Ws(e)==="[object Set]",nr=e=>Ws(e)==="[object Date]",oe=e=>typeof e=="function",$e=e=>typeof e=="string",yt=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",fi=e=>(he(e)||oe(e))&&oe(e.then)&&oe(e.catch),pi=Object.prototype.toString,Ws=e=>pi.call(e),Zl=e=>Ws(e).slice(8,-1),hi=e=>Ws(e)==="[object Object]",Ro=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ts=Ao(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ea=/-\w/g,ot=wn(e=>e.replace(ea,t=>t.slice(1).toUpperCase())),ta=/\B([A-Z])/g,Gt=wn(e=>e.replace(ta,"-$1").toLowerCase()),_n=wn(e=>e.charAt(0).toUpperCase()+e.slice(1)),jn=wn(e=>e?`on${_n(e)}`:""),Ht=(e,t)=>!Object.is(e,t),en=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},mi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},kn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sa=e=>{const t=$e(e)?Number(e):NaN;return isNaN(t)?e:t};let or;const Cn=()=>or||(or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Rt(e){if(ee(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=$e(n)?ia(n):Rt(n);if(o)for(const r in o)t[r]=o[r]}return t}else if($e(e)||he(e))return e}const na=/;(?![^(]*\))/g,oa=/:([^]+)/,ra=/\/\*[^]*?\*\//g;function ia(e){const t={};return e.replace(ra,"").split(na).forEach(s=>{if(s){const n=s.split(oa);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ne(e){let t="";if($e(e))t=e;else if(ee(e))for(let s=0;s<e.length;s++){const n=ne(e[s]);n&&(t+=n+" ")}else if(he(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const la="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa=Ao(la);function gi(e){return!!e||e===""}function ca(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Wt(e[n],t[n]);return s}function Wt(e,t){if(e===t)return!0;let s=nr(e),n=nr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=yt(e),n=yt(t),s||n)return e===t;if(s=ee(e),n=ee(t),s||n)return s&&n?ca(e,t):!1;if(s=he(e),n=he(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const a=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(a&&!c||!a&&c||!Wt(e[l],t[l]))return!1}}return String(e)===String(t)}function Oo(e,t){return e.findIndex(s=>Wt(s,t))}const vi=e=>!!(e&&e.__v_isRef===!0),j=e=>$e(e)?e:e==null?"":ee(e)||he(e)&&(e.toString===pi||!oe(e.toString))?vi(e)?j(e.value):JSON.stringify(e,bi,2):String(e),bi=(e,t)=>vi(t)?bi(e,t.value):ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Dn(n,r)+" =>"]=o,s),{})}:bs(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Dn(s))}:yt(t)?Dn(t):he(t)&&!ee(t)&&!hi(t)?String(t):t,Dn=(e,t="")=>{var s;return yt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ge;class ua{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ge,!t&&Ge&&(this.index=(Ge.scopes||(Ge.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[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)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ge;try{return Ge=this,t()}finally{Ge=s}}}on(){++this._on===1&&(this.prevScope=Ge,Ge=this)}off(){this._on>0&&--this._on===0&&(Ge=this.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){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[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 da(){return Ge}let we;const Vn=new WeakSet;class xi{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,Ge&&Ge.active&&Ge.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vn.has(this)&&(Vn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rr(this),_i(this);const t=we,s=it;we=this,it=!0;try{return this.fn()}finally{ki(this),we=t,it=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)No(t);this.deps=this.depsTail=void 0,rr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){so(this)&&this.run()}get dirty(){return so(this)}}let yi=0,Ms,Rs;function wi(e,t=!1){if(e.flags|=8,t){e.next=Rs,Rs=e;return}e.next=Ms,Ms=e}function Bo(){yi++}function Po(){if(--yi>0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ms;){let t=Ms;for(Ms=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 _i(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ki(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),No(n),fa(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function so(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ci(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ci(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ls)||(e.globalVersion=Ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!so(e))))return;e.flags|=2;const t=e.dep,s=we,n=it;we=e,it=!0;try{_i(e);const o=e.fn(e._value);(t.version===0||Ht(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{we=s,it=n,ki(e),e.flags&=-3}}function No(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 r=s.computed.deps;r;r=r.nextDep)No(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function fa(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let it=!0;const Si=[];function Ot(){Si.push(it),it=!1}function Bt(){const e=Si.pop();it=e===void 0?!0:e}function rr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let Ls=0;class pa{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 Io{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||!it||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new pa(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,Ei(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++,Ls++,this.notify(t)}notify(t){Bo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Po()}}}function Ei(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)Ei(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const no=new WeakMap,ss=Symbol(""),oo=Symbol(""),js=Symbol("");function Ie(e,t,s){if(it&&we){let n=no.get(e);n||no.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Io),o.map=n,o.key=s),o.track()}}function $t(e,t,s,n,o,r){const l=no.get(e);if(!l){Ls++;return}const a=c=>{c&&c.trigger()};if(Bo(),t==="clear")l.forEach(a);else{const c=ee(e),p=c&&Ro(s);if(c&&s==="length"){const u=Number(n);l.forEach((h,b)=>{(b==="length"||b===js||!yt(b)&&b>=u)&&a(h)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),p&&a(l.get(js)),t){case"add":c?p&&a(l.get("length")):(a(l.get(ss)),ds(e)&&a(l.get(oo)));break;case"delete":c||(a(l.get(ss)),ds(e)&&a(l.get(oo)));break;case"set":ds(e)&&a(l.get(ss));break}}Po()}function ls(e){const t=de(e);return t===e?t:(Ie(t,"iterate",js),st(e)?t:t.map(at))}function Sn(e){return Ie(e=de(e),"iterate",js),e}function jt(e,t){return Pt(e)?hs(ns(e)?at(t):t):at(t)}const ha={__proto__:null,[Symbol.iterator](){return Hn(this,Symbol.iterator,e=>jt(this,e))},concat(...e){return ls(this).concat(...e.map(t=>ee(t)?ls(t):t))},entries(){return Hn(this,"entries",e=>(e[1]=jt(this,e[1]),e))},every(e,t){return _t(this,"every",e,t,void 0,arguments)},filter(e,t){return _t(this,"filter",e,t,s=>s.map(n=>jt(this,n)),arguments)},find(e,t){return _t(this,"find",e,t,s=>jt(this,s),arguments)},findIndex(e,t){return _t(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _t(this,"findLast",e,t,s=>jt(this,s),arguments)},findLastIndex(e,t){return _t(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _t(this,"forEach",e,t,void 0,arguments)},includes(...e){return Fn(this,"includes",e)},indexOf(...e){return Fn(this,"indexOf",e)},join(e){return ls(this).join(e)},lastIndexOf(...e){return Fn(this,"lastIndexOf",e)},map(e,t){return _t(this,"map",e,t,void 0,arguments)},pop(){return ws(this,"pop")},push(...e){return ws(this,"push",e)},reduce(e,...t){return ir(this,"reduce",e,t)},reduceRight(e,...t){return ir(this,"reduceRight",e,t)},shift(){return ws(this,"shift")},some(e,t){return _t(this,"some",e,t,void 0,arguments)},splice(...e){return ws(this,"splice",e)},toReversed(){return ls(this).toReversed()},toSorted(e){return ls(this).toSorted(e)},toSpliced(...e){return ls(this).toSpliced(...e)},unshift(...e){return ws(this,"unshift",e)},values(){return Hn(this,"values",e=>jt(this,e))}};function Hn(e,t,s){const n=Sn(e),o=n[t]();return n!==e&&!st(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const ma=Array.prototype;function _t(e,t,s,n,o,r){const l=Sn(e),a=l!==e&&!st(e),c=l[t];if(c!==ma[t]){const h=c.apply(e,r);return a?at(h):h}let p=s;l!==e&&(a?p=function(h,b){return s.call(this,jt(e,h),b,e)}:s.length>2&&(p=function(h,b){return s.call(this,h,b,e)}));const u=c.call(l,p,n);return a&&o?o(u):u}function ir(e,t,s,n){const o=Sn(e);let r=s;return o!==e&&(st(e)?s.length>3&&(r=function(l,a,c){return s.call(this,l,a,c,e)}):r=function(l,a,c){return s.call(this,l,jt(e,a),c,e)}),o[t](r,...n)}function Fn(e,t,s){const n=de(e);Ie(n,"iterate",js);const o=n[t](...s);return(o===-1||o===!1)&&Do(s[0])?(s[0]=de(s[0]),n[t](...s)):o}function ws(e,t,s=[]){Ot(),Bo();const n=de(e)[t].apply(e,s);return Po(),Bt(),n}const ga=Ao("__proto__,__v_isRef,__isVue"),$i=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function va(e){yt(e)||(e=String(e));const t=de(this);return Ie(t,"has",e),t.hasOwnProperty(e)}class Ai{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,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?$a:Oi:r?Ri:Mi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=ee(t);if(!o){let c;if(l&&(c=ha[s]))return c;if(s==="hasOwnProperty")return va}const a=Reflect.get(t,s,je(t)?t:n);if((yt(s)?$i.has(s):ga(s))||(o||Ie(t,"get",s),r))return a;if(je(a)){const c=l&&Ro(s)?a:a.value;return o&&he(c)?io(c):c}return he(a)?o?io(a):En(a):a}}class Ti extends Ai{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const l=ee(t)&&Ro(s);if(!this._isShallow){const p=Pt(r);if(!st(n)&&!Pt(n)&&(r=de(r),n=de(n)),!l&&je(r)&&!je(n))return p||(r.value=n),!0}const a=l?Number(s)<t.length:pe(t,s),c=Reflect.set(t,s,n,je(t)?t:o);return t===de(o)&&(a?Ht(n,r)&&$t(t,"set",s,n):$t(t,"add",s,n)),c}deleteProperty(t,s){const n=pe(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&$t(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!yt(s)||!$i.has(s))&&Ie(t,"has",s),n}ownKeys(t){return Ie(t,"iterate",ee(t)?"length":ss),Reflect.ownKeys(t)}}class ba extends Ai{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const xa=new Ti,ya=new ba,wa=new Ti(!0);const ro=e=>e,Gs=e=>Reflect.getPrototypeOf(e);function _a(e,t,s){return function(...n){const o=this.__v_raw,r=de(o),l=ds(r),a=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,p=o[e](...n),u=s?ro:t?hs:at;return!t&&Ie(r,"iterate",c?oo:ss),Oe(Object.create(p),{next(){const{value:h,done:b}=p.next();return b?{value:h,done:b}:{value:a?[u(h[0]),u(h[1])]:u(h),done:b}}})}}function Js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ka(e,t){const s={get(o){const r=this.__v_raw,l=de(r),a=de(o);e||(Ht(o,a)&&Ie(l,"get",o),Ie(l,"get",a));const{has:c}=Gs(l),p=t?ro:e?hs:at;if(c.call(l,o))return p(r.get(o));if(c.call(l,a))return p(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ie(de(o),"iterate",ss),o.size},has(o){const r=this.__v_raw,l=de(r),a=de(o);return e||(Ht(o,a)&&Ie(l,"has",o),Ie(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,c=de(a),p=t?ro:e?hs:at;return!e&&Ie(c,"iterate",ss),a.forEach((u,h)=>o.call(r,p(u),p(h),l))}};return Oe(s,e?{add:Js("add"),set:Js("set"),delete:Js("delete"),clear:Js("clear")}:{add(o){!t&&!st(o)&&!Pt(o)&&(o=de(o));const r=de(this);return Gs(r).has.call(r,o)||(r.add(o),$t(r,"add",o,o)),this},set(o,r){!t&&!st(r)&&!Pt(r)&&(r=de(r));const l=de(this),{has:a,get:c}=Gs(l);let p=a.call(l,o);p||(o=de(o),p=a.call(l,o));const u=c.call(l,o);return l.set(o,r),p?Ht(r,u)&&$t(l,"set",o,r):$t(l,"add",o,r),this},delete(o){const r=de(this),{has:l,get:a}=Gs(r);let c=l.call(r,o);c||(o=de(o),c=l.call(r,o)),a&&a.call(r,o);const p=r.delete(o);return c&&$t(r,"delete",o,void 0),p},clear(){const o=de(this),r=o.size!==0,l=o.clear();return r&&$t(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=_a(o,e,t)}),s}function Lo(e,t){const s=ka(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(pe(s,o)&&o in n?s:n,o,r)}const Ca={get:Lo(!1,!1)},Sa={get:Lo(!1,!0)},Ea={get:Lo(!0,!1)};const Mi=new WeakMap,Ri=new WeakMap,Oi=new WeakMap,$a=new WeakMap;function Aa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ta(e){return e.__v_skip||!Object.isExtensible(e)?0:Aa(Zl(e))}function En(e){return Pt(e)?e:jo(e,!1,xa,Ca,Mi)}function Bi(e){return jo(e,!1,wa,Sa,Ri)}function io(e){return jo(e,!0,ya,Ea,Oi)}function jo(e,t,s,n,o){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Ta(e);if(r===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function ns(e){return Pt(e)?ns(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function Do(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Ma(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&mi(e,"__v_skip",!0),e}const at=e=>he(e)?En(e):e,hs=e=>he(e)?io(e):e;function je(e){return e?e.__v_isRef===!0:!1}function F(e){return Pi(e,!1)}function Ra(e){return Pi(e,!0)}function Pi(e,t){return je(e)?e:new Oa(e,t)}class Oa{constructor(t,s){this.dep=new Io,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:de(t),this._value=s?t:at(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||st(t)||Pt(t);t=n?t:de(t),Ht(t,s)&&(this._rawValue=t,this._value=n?t:at(t),this.dep.trigger())}}function Ft(e){return je(e)?e.value:e}const Ba={get:(e,t,s)=>t==="__v_raw"?e:Ft(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return je(o)&&!je(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Ni(e){return ns(e)?e:new Proxy(e,Ba)}class Pa{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Io(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ls-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 wi(this,!0),!0}get value(){const t=this.dep.track();return Ci(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Na(e,t,s=!1){let n,o;return oe(e)?n=e:(n=e.get,o=e.set),new Pa(n,o,s)}const Ys={},un=new WeakMap;let Zt;function Ia(e,t=!1,s=Zt){if(s){let n=un.get(s);n||un.set(s,n=[]),n.push(e)}}function La(e,t,s=be){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:c}=s,p=D=>o?D:st(D)||o===!1||o===0?At(D,1):At(D);let u,h,b,y,A=!1,$=!1;if(je(e)?(h=()=>e.value,A=st(e)):ns(e)?(h=()=>p(e),A=!0):ee(e)?($=!0,A=e.some(D=>ns(D)||st(D)),h=()=>e.map(D=>{if(je(D))return D.value;if(ns(D))return p(D);if(oe(D))return c?c(D,2):D()})):oe(e)?t?h=c?()=>c(e,2):e:h=()=>{if(b){Ot();try{b()}finally{Bt()}}const D=Zt;Zt=u;try{return c?c(e,3,[y]):e(y)}finally{Zt=D}}:h=bt,t&&o){const D=h,te=o===!0?1/0:o;h=()=>At(D(),te)}const L=da(),U=()=>{u.stop(),L&&L.active&&Mo(L.effects,u)};if(r&&t){const D=t;t=(...te)=>{D(...te),U()}}let N=$?new Array(e.length).fill(Ys):Ys;const z=D=>{if(!(!(u.flags&1)||!u.dirty&&!D))if(t){const te=u.run();if(o||A||($?te.some((ae,re)=>Ht(ae,N[re])):Ht(te,N))){b&&b();const ae=Zt;Zt=u;try{const re=[te,N===Ys?void 0:$&&N[0]===Ys?[]:N,y];N=te,c?c(t,3,re):t(...re)}finally{Zt=ae}}}else u.run()};return a&&a(z),u=new xi(h),u.scheduler=l?()=>l(z,!1):z,y=D=>Ia(D,!1,u),b=u.onStop=()=>{const D=un.get(u);if(D){if(c)c(D,4);else for(const te of D)te();un.delete(u)}},t?n?z(!0):N=u.run():l?l(z.bind(null,!0),!0):u.run(),U.pause=u.pause.bind(u),U.resume=u.resume.bind(u),U.stop=U,U}function At(e,t=1/0,s){if(t<=0||!he(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,je(e))At(e.value,t,s);else if(ee(e))for(let n=0;n<e.length;n++)At(e[n],t,s);else if(bs(e)||ds(e))e.forEach(n=>{At(n,t,s)});else if(hi(e)){for(const n in e)At(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&At(e[n],t,s)}return e}function qs(e,t,s,n){try{return n?e(...n):e()}catch(o){$n(o,t,s)}}function ct(e,t,s,n){if(oe(e)){const o=qs(e,t,s,n);return o&&fi(o)&&o.catch(r=>{$n(r,t,s)}),o}if(ee(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ct(e[r],t,s,n));return o}}function $n(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||be;if(t){let a=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,c,p)===!1)return}a=a.parent}if(r){Ot(),qs(r,null,10,[e,c,p]),Bt();return}}ja(e,s,o,n,l)}function ja(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Fe=[];let mt=-1;const fs=[];let Dt=null,as=0;const Ii=Promise.resolve();let dn=null;function Mt(e){const t=dn||Ii;return e?t.then(this?e.bind(this):e):t}function Da(e){let t=mt+1,s=Fe.length;for(;t<s;){const n=t+s>>>1,o=Fe[n],r=Ds(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function Vo(e){if(!(e.flags&1)){const t=Ds(e),s=Fe[Fe.length-1];!s||!(e.flags&2)&&t>=Ds(s)?Fe.push(e):Fe.splice(Da(t),0,e),e.flags|=1,Li()}}function Li(){dn||(dn=Ii.then(Di))}function Va(e){ee(e)?fs.push(...e):Dt&&e.id===-1?Dt.splice(as+1,0,e):e.flags&1||(fs.push(e),e.flags|=1),Li()}function lr(e,t,s=mt+1){for(;s<Fe.length;s++){const n=Fe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Fe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ji(e){if(fs.length){const t=[...new Set(fs)].sort((s,n)=>Ds(s)-Ds(n));if(fs.length=0,Dt){Dt.push(...t);return}for(Dt=t,as=0;as<Dt.length;as++){const s=Dt[as];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Dt=null,as=0}}const Ds=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Di(e){try{for(mt=0;mt<Fe.length;mt++){const t=Fe[mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),qs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mt<Fe.length;mt++){const t=Fe[mt];t&&(t.flags&=-2)}mt=-1,Fe.length=0,ji(),dn=null,(Fe.length||fs.length)&&Di()}}let Ye=null,Vi=null;function fn(e){const t=Ye;return Ye=e,Vi=e&&e.type.__scopeId||null,t}function lo(e,t=Ye,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&mn(-1);const r=fn(t);let l;try{l=e(...o)}finally{fn(r),n._d&&mn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ke(e,t){if(Ye===null)return e;const s=On(Ye),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,c=be]=t[o];r&&(oe(r)&&(r={mounted:r,updated:r}),r.deep&&At(l),n.push({dir:r,instance:s,value:l,oldValue:void 0,arg:a,modifiers:c}))}return e}function Jt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let c=a.dir[n];c&&(Ot(),ct(c,s,8,[e.el,a,e,t]),Bt())}}function tn(e,t){if(Le){let s=Le.provides;const n=Le.parent&&Le.parent.provides;n===s&&(s=Le.provides=Object.create(n)),s[e]=t}}function lt(e,t,s=!1){const n=bl();if(n||ps){let o=ps?ps._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&&oe(t)?t.call(n&&n.proxy):t}}const Ha=Symbol.for("v-scx"),Fa=()=>lt(Ha);function Ut(e,t,s){return Hi(e,t,s)}function Hi(e,t,s=be){const{immediate:n,deep:o,flush:r,once:l}=s,a=Oe({},s),c=t&&n||!t&&r!=="post";let p;if(Fs){if(r==="sync"){const y=Fa();p=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=bt,y.resume=bt,y.pause=bt,y}}const u=Le;a.call=(y,A,$)=>ct(y,u,A,$);let h=!1;r==="post"?a.scheduler=y=>{Ke(y,u&&u.suspense)}:r!=="sync"&&(h=!0,a.scheduler=(y,A)=>{A?y():Vo(y)}),a.augmentJob=y=>{t&&(y.flags|=4),h&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const b=La(e,t,a);return Fs&&(p?p.push(b):c&&b()),b}function Ua(e,t,s){const n=this.proxy,o=$e(e)?e.includes(".")?Fi(n,e):()=>n[e]:e.bind(n,n);let r;oe(t)?r=t:(r=t.handler,s=t);const l=Ks(this),a=Hi(o,r.bind(n),s);return l(),a}function Fi(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 za=Symbol("_vte"),Ui=e=>e.__isTeleport,gt=Symbol("_leaveCb"),_s=Symbol("_enterCb");function Wa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return rs(()=>{e.isMounted=!0}),Qi(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],zi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},Wi=e=>{const t=e.subTree;return t.component?Wi(t.component):t},qa={name:"BaseTransition",props:zi,setup(e,{slots:t}){const s=bl(),n=Wa();return()=>{const o=t.default&&Gi(t.default(),!0);if(!o||!o.length)return;const r=qi(o),l=de(e),{mode:a}=l;if(n.isLeaving)return Un(r);const c=ar(r);if(!c)return Un(r);let p=ao(c,l,n,s,h=>p=h);c.type!==Ue&&Vs(c,p);let u=s.subTree&&ar(s.subTree);if(u&&u.type!==Ue&&!es(u,c)&&Wi(s).type!==Ue){let h=ao(u,l,n,s);if(Vs(u,h),a==="out-in"&&c.type!==Ue)return n.isLeaving=!0,h.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete h.afterLeave,u=void 0},Un(r);a==="in-out"&&c.type!==Ue?h.delayLeave=(b,y,A)=>{const $=Ki(n,u);$[String(u.key)]=u,b[gt]=()=>{y(),b[gt]=void 0,delete p.delayedLeave,u=void 0},p.delayedLeave=()=>{A(),delete p.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function qi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Ue){t=s;break}}return t}const Ka=qa;function Ki(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 ao(e,t,s,n,o){const{appear:r,mode:l,persisted:a=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:b,onLeave:y,onAfterLeave:A,onLeaveCancelled:$,onBeforeAppear:L,onAppear:U,onAfterAppear:N,onAppearCancelled:z}=t,D=String(e.key),te=Ki(s,e),ae=(C,B)=>{C&&ct(C,n,9,B)},re=(C,B)=>{const Q=B[1];ae(C,B),ee(C)?C.every(I=>I.length<=1)&&Q():C.length<=1&&Q()},X={mode:l,persisted:a,beforeEnter(C){let B=c;if(!s.isMounted)if(r)B=L||c;else return;C[gt]&&C[gt](!0);const Q=te[D];Q&&es(e,Q)&&Q.el[gt]&&Q.el[gt](),ae(B,[C])},enter(C){if(te[D]===e)return;let B=p,Q=u,I=h;if(!s.isMounted)if(r)B=U||p,Q=N||u,I=z||h;else return;let W=!1;C[_s]=G=>{W||(W=!0,G?ae(I,[C]):ae(Q,[C]),X.delayedLeave&&X.delayedLeave(),C[_s]=void 0)};const k=C[_s].bind(null,!1);B?re(B,[C,k]):k()},leave(C,B){const Q=String(e.key);if(C[_s]&&C[_s](!0),s.isUnmounting)return B();ae(b,[C]);let I=!1;C[gt]=k=>{I||(I=!0,B(),k?ae($,[C]):ae(A,[C]),C[gt]=void 0,te[Q]===e&&delete te[Q])};const W=C[gt].bind(null,!1);te[Q]=e,y?re(y,[C,W]):W()},clone(C){const B=ao(C,t,s,n,o);return o&&o(B),B}};return X}function Un(e){if(An(e))return e=qt(e),e.children=null,e}function ar(e){if(!An(e))return Ui(e.type)&&e.children?qi(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&&oe(s.default))return s.default()}}function Vs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,s){let n=[],o=0;for(let r=0;r<e.length;r++){let l=e[r];const a=s==null?l.key:String(s)+String(l.key!=null?l.key:r);l.type===ve?(l.patchFlag&128&&o++,n=n.concat(Gi(l.children,t,a))):(t||l.type!==Ue)&&n.push(a!=null?qt(l,{key:a}):l)}if(o>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Ji(e,t){return oe(e)?Oe({name:e.name},t,{setup:e}):e}function Yi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function cr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const pn=new WeakMap;function Os(e,t,s,n,o=!1){if(ee(e)){e.forEach(($,L)=>Os($,t&&(ee(t)?t[L]:t),s,n,o));return}if(Bs(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Os(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?On(n.component):n.el,l=o?null:r,{i:a,r:c}=e,p=t&&t.r,u=a.refs===be?a.refs={}:a.refs,h=a.setupState,b=de(h),y=h===be?di:$=>cr(u,$)?!1:pe(b,$),A=($,L)=>!(L&&cr(u,L));if(p!=null&&p!==c){if(ur(t),$e(p))u[p]=null,y(p)&&(h[p]=null);else if(je(p)){const $=t;A(p,$.k)&&(p.value=null),$.k&&(u[$.k]=null)}}if(oe(c))qs(c,a,12,[l,u]);else{const $=$e(c),L=je(c);if($||L){const U=()=>{if(e.f){const N=$?y(c)?h[c]:u[c]:A()||!e.k?c.value:u[e.k];if(o)ee(N)&&Mo(N,r);else if(ee(N))N.includes(r)||N.push(r);else if($)u[c]=[r],y(c)&&(h[c]=u[c]);else{const z=[r];A(c,e.k)&&(c.value=z),e.k&&(u[e.k]=z)}}else $?(u[c]=l,y(c)&&(h[c]=l)):L&&(A(c,e.k)&&(c.value=l),e.k&&(u[e.k]=l))};if(l){const N=()=>{U(),pn.delete(e)};N.id=-1,pn.set(e,N),Ke(N,s)}else ur(e),U()}}}function ur(e){const t=pn.get(e);t&&(t.flags|=8,pn.delete(e))}Cn().requestIdleCallback;Cn().cancelIdleCallback;const Bs=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive;function Ga(e,t){Xi(e,"a",t)}function Ja(e,t){Xi(e,"da",t)}function Xi(e,t,s=Le){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Tn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)An(o.parent.vnode)&&Ya(n,t,s,o),o=o.parent}}function Ya(e,t,s,n){const o=Tn(t,e,n,!0);is(()=>{Mo(n[t],o)},s)}function Tn(e,t,s=Le,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{Ot();const a=Ks(s),c=ct(t,s,e,l);return a(),Bt(),c});return n?o.unshift(r):o.push(r),r}}const Nt=e=>(t,s=Le)=>{(!Fs||e==="sp")&&Tn(e,(...n)=>t(...n),s)},Xa=Nt("bm"),rs=Nt("m"),Qa=Nt("bu"),Za=Nt("u"),Qi=Nt("bum"),is=Nt("um"),ec=Nt("sp"),tc=Nt("rtg"),sc=Nt("rtc");function nc(e,t=Le){Tn("ec",e,t)}const oc="components";function rc(e,t){return lc(oc,e,!0,t)||e}const ic=Symbol.for("v-ndc");function lc(e,t,s=!0,n=!1){const o=Ye||Le;if(o){const r=o.type;{const a=qc(r,!1);if(a&&(a===t||a===ot(t)||a===_n(ot(t))))return r}const l=dr(o[e]||r[e],t)||dr(o.appContext[e],t);return!l&&n?r:l}}function dr(e,t){return e&&(e[t]||e[ot(t)]||e[_n(ot(t))])}function ze(e,t,s,n){let o;const r=s,l=ee(e);if(l||$e(e)){const a=l&&ns(e);let c=!1,p=!1;a&&(c=!st(e),p=Pt(e),e=Sn(e)),o=new Array(e.length);for(let u=0,h=e.length;u<h;u++)o[u]=t(c?p?hs(at(e[u])):at(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(he(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,p=a.length;c<p;c++){const u=a[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const co=e=>e?xl(e)?On(e):co(e.parent):null,Ps=Oe(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=>co(e.parent),$root:e=>co(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>el(e),$forceUpdate:e=>e.f||(e.f=()=>{Vo(e.update)}),$nextTick:e=>e.n||(e.n=Mt.bind(e.proxy)),$watch:e=>Ua.bind(e)}),zn=(e,t)=>e!==be&&!e.__isScriptSetup&&pe(e,t),ac={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:c}=e;if(t[0]!=="$"){const b=l[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(zn(n,t))return l[t]=1,n[t];if(o!==be&&pe(o,t))return l[t]=2,o[t];if(pe(r,t))return l[t]=3,r[t];if(s!==be&&pe(s,t))return l[t]=4,s[t];uo&&(l[t]=0)}}const p=Ps[t];let u,h;if(p)return t==="$attrs"&&Ie(e.attrs,"get",""),p(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==be&&pe(s,t))return l[t]=4,s[t];if(h=c.config.globalProperties,pe(h,t))return h[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return zn(o,t)?(o[t]=s,!0):n!==be&&pe(n,t)?(n[t]=s,!0):pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:l}},a){let c;return!!(s[a]||e!==be&&a[0]!=="$"&&pe(e,a)||zn(t,a)||pe(r,a)||pe(n,a)||pe(Ps,a)||pe(o.config.globalProperties,a)||(c=l.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:pe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function fr(e){return ee(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let uo=!0;function cc(e){const t=el(e),s=e.proxy,n=e.ctx;uo=!1,t.beforeCreate&&pr(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:l,watch:a,provide:c,inject:p,created:u,beforeMount:h,mounted:b,beforeUpdate:y,updated:A,activated:$,deactivated:L,beforeDestroy:U,beforeUnmount:N,destroyed:z,unmounted:D,render:te,renderTracked:ae,renderTriggered:re,errorCaptured:X,serverPrefetch:C,expose:B,inheritAttrs:Q,components:I,directives:W,filters:k}=t;if(p&&uc(p,n,null),l)for(const le in l){const ie=l[le];oe(ie)&&(n[le]=ie.bind(s))}if(o){const le=o.call(s,s);he(le)&&(e.data=En(le))}if(uo=!0,r)for(const le in r){const ie=r[le],Ae=oe(ie)?ie.bind(s,s):oe(ie.get)?ie.get.bind(s,s):bt,_e=!oe(ie)&&oe(ie.set)?ie.set.bind(s):bt,Se=Ne({get:Ae,set:_e});Object.defineProperty(n,le,{enumerable:!0,configurable:!0,get:()=>Se.value,set:xe=>Se.value=xe})}if(a)for(const le in a)Zi(a[le],n,s,le);if(c){const le=oe(c)?c.call(s):c;Reflect.ownKeys(le).forEach(ie=>{tn(ie,le[ie])})}u&&pr(u,e,"c");function me(le,ie){ee(ie)?ie.forEach(Ae=>le(Ae.bind(s))):ie&&le(ie.bind(s))}if(me(Xa,h),me(rs,b),me(Qa,y),me(Za,A),me(Ga,$),me(Ja,L),me(nc,X),me(sc,ae),me(tc,re),me(Qi,N),me(is,D),me(ec,C),ee(B))if(B.length){const le=e.exposed||(e.exposed={});B.forEach(ie=>{Object.defineProperty(le,ie,{get:()=>s[ie],set:Ae=>s[ie]=Ae,enumerable:!0})})}else e.exposed||(e.exposed={});te&&e.render===bt&&(e.render=te),Q!=null&&(e.inheritAttrs=Q),I&&(e.components=I),W&&(e.directives=W),C&&Yi(e)}function uc(e,t,s=bt){ee(e)&&(e=fo(e));for(const n in e){const o=e[n];let r;he(o)?"default"in o?r=lt(o.from||n,o.default,!0):r=lt(o.from||n):r=lt(o),je(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function pr(e,t,s){ct(ee(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Zi(e,t,s,n){let o=n.includes(".")?Fi(s,n):()=>s[n];if($e(e)){const r=t[e];oe(r)&&Ut(o,r)}else if(oe(e))Ut(o,e.bind(s));else if(he(e))if(ee(e))e.forEach(r=>Zi(r,t,s,n));else{const r=oe(e.handler)?e.handler.bind(s):t[e.handler];oe(r)&&Ut(o,r,e)}}function el(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(p=>hn(c,p,l,!0)),hn(c,t,l)),he(t)&&r.set(t,c),c}function hn(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&hn(e,r,s,!0),o&&o.forEach(l=>hn(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=dc[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const dc={data:hr,props:mr,emits:mr,methods:$s,computed:$s,beforeCreate:Ve,created:Ve,beforeMount:Ve,mounted:Ve,beforeUpdate:Ve,updated:Ve,beforeDestroy:Ve,beforeUnmount:Ve,destroyed:Ve,unmounted:Ve,activated:Ve,deactivated:Ve,errorCaptured:Ve,serverPrefetch:Ve,components:$s,directives:$s,watch:pc,provide:hr,inject:fc};function hr(e,t){return t?e?function(){return Oe(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function fc(e,t){return $s(fo(e),fo(t))}function fo(e){if(ee(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ve(e,t){return e?[...new Set([].concat(e,t))]:t}function $s(e,t){return e?Oe(Object.create(null),e,t):t}function mr(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:Oe(Object.create(null),fr(e),fr(t??{})):t}function pc(e,t){if(!e)return t;if(!t)return e;const s=Oe(Object.create(null),e);for(const n in t)s[n]=Ve(e[n],t[n]);return s}function tl(){return{app:null,config:{isNativeTag:di,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 hc=0;function mc(e,t){return function(n,o=null){oe(n)||(n=Oe({},n)),o!=null&&!he(o)&&(o=null);const r=tl(),l=new WeakSet,a=[];let c=!1;const p=r.app={_uid:hc++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Gc,get config(){return r.config},set config(u){},use(u,...h){return l.has(u)||(u&&oe(u.install)?(l.add(u),u.install(p,...h)):oe(u)&&(l.add(u),u(p,...h))),p},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),p},component(u,h){return h?(r.components[u]=h,p):r.components[u]},directive(u,h){return h?(r.directives[u]=h,p):r.directives[u]},mount(u,h,b){if(!c){const y=p._ceVNode||Te(n,o);return y.appContext=r,b===!0?b="svg":b===!1&&(b=void 0),e(y,u,b),c=!0,p._container=u,u.__vue_app__=p,On(y.component)}},onUnmount(u){a.push(u)},unmount(){c&&(ct(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(u,h){return r.provides[u]=h,p},runWithContext(u){const h=ps;ps=p;try{return u()}finally{ps=h}}};return p}}let ps=null;const gc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ot(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function vc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||be;let o=s;const r=t.startsWith("update:"),l=r&&gc(n,t.slice(7));l&&(l.trim&&(o=s.map(u=>$e(u)?u.trim():u)),l.number&&(o=s.map(kn)));let a,c=n[a=jn(t)]||n[a=jn(ot(t))];!c&&r&&(c=n[a=jn(Gt(t))]),c&&ct(c,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ct(p,e,6,o)}}const bc=new WeakMap;function sl(e,t,s=!1){const n=s?bc:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let l={},a=!1;if(!oe(e)){const c=p=>{const u=sl(p,t,!0);u&&(a=!0,Oe(l,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(he(e)&&n.set(e,null),null):(ee(r)?r.forEach(c=>l[c]=null):Oe(l,r),he(e)&&n.set(e,l),l)}function Mn(e,t){return!e||!yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,Gt(t))||pe(e,t))}function gr(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:c,render:p,renderCache:u,props:h,data:b,setupState:y,ctx:A,inheritAttrs:$}=e,L=fn(e);let U,N;try{if(s.shapeFlag&4){const D=o||n,te=D;U=vt(p.call(te,D,u,h,y,b,A)),N=a}else{const D=t;U=vt(D.length>1?D(h,{attrs:a,slots:l,emit:c}):D(h,null)),N=t.props?a:xc(a)}}catch(D){Ns.length=0,$n(D,e,1),U=Te(Ue)}let z=U;if(N&&$!==!1){const D=Object.keys(N),{shapeFlag:te}=z;D.length&&te&7&&(r&&D.some(To)&&(N=yc(N,r)),z=qt(z,N,!1,!0))}return s.dirs&&(z=qt(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(s.dirs):s.dirs),s.transition&&Vs(z,s.transition),U=z,fn(L),U}const xc=e=>{let t;for(const s in e)(s==="class"||s==="style"||yn(s))&&((t||(t={}))[s]=e[s]);return t},yc=(e,t)=>{const s={};for(const n in e)(!To(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function wc(e,t,s){const{props:n,children:o,component:r}=e,{props:l,children:a,patchFlag:c}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?vr(n,l,p):!!l;if(c&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const b=u[h];if(nl(l,n,b)&&!Mn(p,b))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?vr(n,l,p):!0:!!l;return!1}function vr(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 r=n[o];if(nl(t,e,r)&&!Mn(s,r))return!0}return!1}function nl(e,t,s){const n=e[s],o=t[s];return s==="style"&&he(n)&&he(o)?!Wt(n,o):n!==o}function _c({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const ol={},rl=()=>Object.create(ol),il=e=>Object.getPrototypeOf(e)===ol;function kc(e,t,s,n=!1){const o={},r=rl();e.propsDefaults=Object.create(null),ll(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Bi(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Cc(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:l}}=e,a=de(o),[c]=e.propsOptions;let p=!1;if((n||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let b=u[h];if(Mn(e.emitsOptions,b))continue;const y=t[b];if(c)if(pe(r,b))y!==r[b]&&(r[b]=y,p=!0);else{const A=ot(b);o[A]=po(c,a,A,y,e,!1)}else y!==r[b]&&(r[b]=y,p=!0)}}}else{ll(e,t,o,r)&&(p=!0);let u;for(const h in a)(!t||!pe(t,h)&&((u=Gt(h))===h||!pe(t,u)))&&(c?s&&(s[h]!==void 0||s[u]!==void 0)&&(o[h]=po(c,a,h,void 0,e,!0)):delete o[h]);if(r!==a)for(const h in r)(!t||!pe(t,h))&&(delete r[h],p=!0)}p&&$t(e.attrs,"set","")}function ll(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let c in t){if(Ts(c))continue;const p=t[c];let u;o&&pe(o,u=ot(c))?!r||!r.includes(u)?s[u]=p:(a||(a={}))[u]=p:Mn(e.emitsOptions,c)||(!(c in n)||p!==n[c])&&(n[c]=p,l=!0)}if(r){const c=de(s),p=a||be;for(let u=0;u<r.length;u++){const h=r[u];s[h]=po(o,c,h,p[h],e,!pe(p,h))}}return l}function po(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=pe(l,"default");if(a&&n===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&oe(c)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const u=Ks(o);n=p[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[1]&&(n===""||n===Gt(s))&&(n=!0))}return n}const Sc=new WeakMap;function al(e,t,s=!1){const n=s?Sc:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,l={},a=[];let c=!1;if(!oe(e)){const u=h=>{c=!0;const[b,y]=al(h,t,!0);Oe(l,b),y&&a.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return he(e)&&n.set(e,us),us;if(ee(r))for(let u=0;u<r.length;u++){const h=ot(r[u]);br(h)&&(l[h]=be)}else if(r)for(const u in r){const h=ot(u);if(br(h)){const b=r[u],y=l[h]=ee(b)||oe(b)?{type:b}:Oe({},b),A=y.type;let $=!1,L=!0;if(ee(A))for(let U=0;U<A.length;++U){const N=A[U],z=oe(N)&&N.name;if(z==="Boolean"){$=!0;break}else z==="String"&&(L=!1)}else $=oe(A)&&A.name==="Boolean";y[0]=$,y[1]=L,($||pe(y,"default"))&&a.push(h)}}const p=[l,a];return he(e)&&n.set(e,p),p}function br(e){return e[0]!=="$"&&!Ts(e)}const Ho=e=>e==="_"||e==="_ctx"||e==="$stable",Fo=e=>ee(e)?e.map(vt):[vt(e)],Ec=(e,t,s)=>{if(t._n)return t;const n=lo((...o)=>Fo(t(...o)),s);return n._c=!1,n},cl=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Ho(o))continue;const r=e[o];if(oe(r))t[o]=Ec(o,r,n);else if(r!=null){const l=Fo(r);t[o]=()=>l}}},ul=(e,t)=>{const s=Fo(t);e.slots.default=()=>s},dl=(e,t,s)=>{for(const n in t)(s||!Ho(n))&&(e[n]=t[n])},$c=(e,t,s)=>{const n=e.slots=rl();if(e.vnode.shapeFlag&32){const o=t._;o?(dl(n,t,s),s&&mi(n,"_",o,!0)):cl(t,n)}else t&&ul(e,t)},Ac=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,l=be;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:dl(o,t,s):(r=!t.$stable,cl(t,o)),l=t}else t&&(ul(e,t),l={default:1});if(r)for(const a in o)!Ho(a)&&l[a]==null&&delete o[a]},Ke=Bc;function Tc(e){return Mc(e)}function Mc(e,t){const s=Cn();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:l,createText:a,createComment:c,setText:p,setElementText:u,parentNode:h,nextSibling:b,setScopeId:y=bt,insertStaticContent:A}=e,$=(d,g,x,S=null,E=null,M=null,H=void 0,V=null,P=!!g.dynamicChildren)=>{if(d===g)return;d&&!es(d,g)&&(S=O(d),xe(d,E,M,!0),d=null),g.patchFlag===-2&&(P=!1,g.dynamicChildren=null);const{type:R,ref:Y,shapeFlag:q}=g;switch(R){case Rn:L(d,g,x,S);break;case Ue:U(d,g,x,S);break;case sn:d==null&&N(g,x,S,H);break;case ve:I(d,g,x,S,E,M,H,V,P);break;default:q&1?te(d,g,x,S,E,M,H,V,P):q&6?W(d,g,x,S,E,M,H,V,P):(q&64||q&128)&&R.process(d,g,x,S,E,M,H,V,P,f)}Y!=null&&E?Os(Y,d&&d.ref,M,g||d,!g):Y==null&&d&&d.ref!=null&&Os(d.ref,null,M,d,!0)},L=(d,g,x,S)=>{if(d==null)n(g.el=a(g.children),x,S);else{const E=g.el=d.el;g.children!==d.children&&p(E,g.children)}},U=(d,g,x,S)=>{d==null?n(g.el=c(g.children||""),x,S):g.el=d.el},N=(d,g,x,S)=>{[d.el,d.anchor]=A(d.children,g,x,S,d.el,d.anchor)},z=({el:d,anchor:g},x,S)=>{let E;for(;d&&d!==g;)E=b(d),n(d,x,S),d=E;n(g,x,S)},D=({el:d,anchor:g})=>{let x;for(;d&&d!==g;)x=b(d),o(d),d=x;o(g)},te=(d,g,x,S,E,M,H,V,P)=>{if(g.type==="svg"?H="svg":g.type==="math"&&(H="mathml"),d==null)ae(g,x,S,E,M,H,V,P);else{const R=d.el&&d.el._isVueCE?d.el:null;try{R&&R._beginPatch(),C(d,g,E,M,H,V,P)}finally{R&&R._endPatch()}}},ae=(d,g,x,S,E,M,H,V)=>{let P,R;const{props:Y,shapeFlag:q,transition:Z,dirs:se}=d;if(P=d.el=l(d.type,M,Y&&Y.is,Y),q&8?u(P,d.children):q&16&&X(d.children,P,null,S,E,Wn(d,M),H,V),se&&Jt(d,null,S,"created"),re(P,d,d.scopeId,H,S),Y){for(const ye in Y)ye!=="value"&&!Ts(ye)&&r(P,ye,null,Y[ye],M,S);"value"in Y&&r(P,"value",null,Y.value,M),(R=Y.onVnodeBeforeMount)&&ht(R,S,d)}se&&Jt(d,null,S,"beforeMount");const ue=Rc(E,Z);ue&&Z.beforeEnter(P),n(P,g,x),((R=Y&&Y.onVnodeMounted)||ue||se)&&Ke(()=>{R&&ht(R,S,d),ue&&Z.enter(P),se&&Jt(d,null,S,"mounted")},E)},re=(d,g,x,S,E)=>{if(x&&y(d,x),S)for(let M=0;M<S.length;M++)y(d,S[M]);if(E){let M=E.subTree;if(g===M||ml(M.type)&&(M.ssContent===g||M.ssFallback===g)){const H=E.vnode;re(d,H,H.scopeId,H.slotScopeIds,E.parent)}}},X=(d,g,x,S,E,M,H,V,P=0)=>{for(let R=P;R<d.length;R++){const Y=d[R]=V?Et(d[R]):vt(d[R]);$(null,Y,g,x,S,E,M,H,V)}},C=(d,g,x,S,E,M,H)=>{const V=g.el=d.el;let{patchFlag:P,dynamicChildren:R,dirs:Y}=g;P|=d.patchFlag&16;const q=d.props||be,Z=g.props||be;let se;if(x&&Yt(x,!1),(se=Z.onVnodeBeforeUpdate)&&ht(se,x,g,d),Y&&Jt(g,d,x,"beforeUpdate"),x&&Yt(x,!0),(q.innerHTML&&Z.innerHTML==null||q.textContent&&Z.textContent==null)&&u(V,""),R?B(d.dynamicChildren,R,V,x,S,Wn(g,E),M):H||ie(d,g,V,null,x,S,Wn(g,E),M,!1),P>0){if(P&16)Q(V,q,Z,x,E);else if(P&2&&q.class!==Z.class&&r(V,"class",null,Z.class,E),P&4&&r(V,"style",q.style,Z.style,E),P&8){const ue=g.dynamicProps;for(let ye=0;ye<ue.length;ye++){const ge=ue[ye],We=q[ge],qe=Z[ge];(qe!==We||ge==="value")&&r(V,ge,We,qe,E,x)}}P&1&&d.children!==g.children&&u(V,g.children)}else!H&&R==null&&Q(V,q,Z,x,E);((se=Z.onVnodeUpdated)||Y)&&Ke(()=>{se&&ht(se,x,g,d),Y&&Jt(g,d,x,"updated")},S)},B=(d,g,x,S,E,M,H)=>{for(let V=0;V<g.length;V++){const P=d[V],R=g[V],Y=P.el&&(P.type===ve||!es(P,R)||P.shapeFlag&198)?h(P.el):x;$(P,R,Y,null,S,E,M,H,!0)}},Q=(d,g,x,S,E)=>{if(g!==x){if(g!==be)for(const M in g)!Ts(M)&&!(M in x)&&r(d,M,g[M],null,E,S);for(const M in x){if(Ts(M))continue;const H=x[M],V=g[M];H!==V&&M!=="value"&&r(d,M,V,H,E,S)}"value"in x&&r(d,"value",g.value,x.value,E)}},I=(d,g,x,S,E,M,H,V,P)=>{const R=g.el=d?d.el:a(""),Y=g.anchor=d?d.anchor:a("");let{patchFlag:q,dynamicChildren:Z,slotScopeIds:se}=g;se&&(V=V?V.concat(se):se),d==null?(n(R,x,S),n(Y,x,S),X(g.children||[],x,Y,E,M,H,V,P)):q>0&&q&64&&Z&&d.dynamicChildren&&d.dynamicChildren.length===Z.length?(B(d.dynamicChildren,Z,x,E,M,H,V),(g.key!=null||E&&g===E.subTree)&&fl(d,g,!0)):ie(d,g,x,Y,E,M,H,V,P)},W=(d,g,x,S,E,M,H,V,P)=>{g.slotScopeIds=V,d==null?g.shapeFlag&512?E.ctx.activate(g,x,S,H,P):k(g,x,S,E,M,H,P):G(d,g,P)},k=(d,g,x,S,E,M,H)=>{const V=d.component=Hc(d,S,E);if(An(d)&&(V.ctx.renderer=f),Fc(V,!1,H),V.asyncDep){if(E&&E.registerDep(V,me,H),!d.el){const P=V.subTree=Te(Ue);U(null,P,g,x),d.placeholder=P.el}}else me(V,d,g,x,E,M,H)},G=(d,g,x)=>{const S=g.component=d.component;if(wc(d,g,x))if(S.asyncDep&&!S.asyncResolved){le(S,g,x);return}else S.next=g,S.update();else g.el=d.el,S.vnode=g},me=(d,g,x,S,E,M,H)=>{const V=()=>{if(d.isMounted){let{next:q,bu:Z,u:se,parent:ue,vnode:ye}=d;{const ft=pl(d);if(ft){q&&(q.el=ye.el,le(d,q,H)),ft.asyncDep.then(()=>{Ke(()=>{d.isUnmounted||R()},E)});return}}let ge=q,We;Yt(d,!1),q?(q.el=ye.el,le(d,q,H)):q=ye,Z&&en(Z),(We=q.props&&q.props.onVnodeBeforeUpdate)&&ht(We,ue,q,ye),Yt(d,!0);const qe=gr(d),dt=d.subTree;d.subTree=qe,$(dt,qe,h(dt.el),O(dt),d,E,M),q.el=qe.el,ge===null&&_c(d,qe.el),se&&Ke(se,E),(We=q.props&&q.props.onVnodeUpdated)&&Ke(()=>ht(We,ue,q,ye),E)}else{let q;const{el:Z,props:se}=g,{bm:ue,m:ye,parent:ge,root:We,type:qe}=d,dt=Bs(g);Yt(d,!1),ue&&en(ue),!dt&&(q=se&&se.onVnodeBeforeMount)&&ht(q,ge,g),Yt(d,!0);{We.ce&&We.ce._hasShadowRoot()&&We.ce._injectChildStyle(qe);const ft=d.subTree=gr(d);$(null,ft,x,S,d,E,M),g.el=ft.el}if(ye&&Ke(ye,E),!dt&&(q=se&&se.onVnodeMounted)){const ft=g;Ke(()=>ht(q,ge,ft),E)}(g.shapeFlag&256||ge&&Bs(ge.vnode)&&ge.vnode.shapeFlag&256)&&d.a&&Ke(d.a,E),d.isMounted=!0,g=x=S=null}};d.scope.on();const P=d.effect=new xi(V);d.scope.off();const R=d.update=P.run.bind(P),Y=d.job=P.runIfDirty.bind(P);Y.i=d,Y.id=d.uid,P.scheduler=()=>Vo(Y),Yt(d,!0),R()},le=(d,g,x)=>{g.component=d;const S=d.vnode.props;d.vnode=g,d.next=null,Cc(d,g.props,S,x),Ac(d,g.children,x),Ot(),lr(d),Bt()},ie=(d,g,x,S,E,M,H,V,P=!1)=>{const R=d&&d.children,Y=d?d.shapeFlag:0,q=g.children,{patchFlag:Z,shapeFlag:se}=g;if(Z>0){if(Z&128){_e(R,q,x,S,E,M,H,V,P);return}else if(Z&256){Ae(R,q,x,S,E,M,H,V,P);return}}se&8?(Y&16&&Ee(R,E,M),q!==R&&u(x,q)):Y&16?se&16?_e(R,q,x,S,E,M,H,V,P):Ee(R,E,M,!0):(Y&8&&u(x,""),se&16&&X(q,x,S,E,M,H,V,P))},Ae=(d,g,x,S,E,M,H,V,P)=>{d=d||us,g=g||us;const R=d.length,Y=g.length,q=Math.min(R,Y);let Z;for(Z=0;Z<q;Z++){const se=g[Z]=P?Et(g[Z]):vt(g[Z]);$(d[Z],se,x,null,E,M,H,V,P)}R>Y?Ee(d,E,M,!0,!1,q):X(g,x,S,E,M,H,V,P,q)},_e=(d,g,x,S,E,M,H,V,P)=>{let R=0;const Y=g.length;let q=d.length-1,Z=Y-1;for(;R<=q&&R<=Z;){const se=d[R],ue=g[R]=P?Et(g[R]):vt(g[R]);if(es(se,ue))$(se,ue,x,null,E,M,H,V,P);else break;R++}for(;R<=q&&R<=Z;){const se=d[q],ue=g[Z]=P?Et(g[Z]):vt(g[Z]);if(es(se,ue))$(se,ue,x,null,E,M,H,V,P);else break;q--,Z--}if(R>q){if(R<=Z){const se=Z+1,ue=se<Y?g[se].el:S;for(;R<=Z;)$(null,g[R]=P?Et(g[R]):vt(g[R]),x,ue,E,M,H,V,P),R++}}else if(R>Z)for(;R<=q;)xe(d[R],E,M,!0),R++;else{const se=R,ue=R,ye=new Map;for(R=ue;R<=Z;R++){const Je=g[R]=P?Et(g[R]):vt(g[R]);Je.key!=null&&ye.set(Je.key,R)}let ge,We=0;const qe=Z-ue+1;let dt=!1,ft=0;const ys=new Array(qe);for(R=0;R<qe;R++)ys[R]=0;for(R=se;R<=q;R++){const Je=d[R];if(We>=qe){xe(Je,E,M,!0);continue}let pt;if(Je.key!=null)pt=ye.get(Je.key);else for(ge=ue;ge<=Z;ge++)if(ys[ge-ue]===0&&es(Je,g[ge])){pt=ge;break}pt===void 0?xe(Je,E,M,!0):(ys[pt-ue]=R+1,pt>=ft?ft=pt:dt=!0,$(Je,g[pt],x,null,E,M,H,V,P),We++)}const er=dt?Oc(ys):us;for(ge=er.length-1,R=qe-1;R>=0;R--){const Je=ue+R,pt=g[Je],tr=g[Je+1],sr=Je+1<Y?tr.el||hl(tr):S;ys[R]===0?$(null,pt,x,sr,E,M,H,V,P):dt&&(ge<0||R!==er[ge]?Se(pt,x,sr,2):ge--)}}},Se=(d,g,x,S,E=null)=>{const{el:M,type:H,transition:V,children:P,shapeFlag:R}=d;if(R&6){Se(d.component.subTree,g,x,S);return}if(R&128){d.suspense.move(g,x,S);return}if(R&64){H.move(d,g,x,f);return}if(H===ve){n(M,g,x);for(let q=0;q<P.length;q++)Se(P[q],g,x,S);n(d.anchor,g,x);return}if(H===sn){z(d,g,x);return}if(S!==2&&R&1&&V)if(S===0)V.beforeEnter(M),n(M,g,x),Ke(()=>V.enter(M),E);else{const{leave:q,delayLeave:Z,afterLeave:se}=V,ue=()=>{d.ctx.isUnmounted?o(M):n(M,g,x)},ye=()=>{M._isLeaving&&M[gt](!0),q(M,()=>{ue(),se&&se()})};Z?Z(M,ue,ye):ye()}else n(M,g,x)},xe=(d,g,x,S=!1,E=!1)=>{const{type:M,props:H,ref:V,children:P,dynamicChildren:R,shapeFlag:Y,patchFlag:q,dirs:Z,cacheIndex:se}=d;if(q===-2&&(E=!1),V!=null&&(Ot(),Os(V,null,x,d,!0),Bt()),se!=null&&(g.renderCache[se]=void 0),Y&256){g.ctx.deactivate(d);return}const ue=Y&1&&Z,ye=!Bs(d);let ge;if(ye&&(ge=H&&H.onVnodeBeforeUnmount)&&ht(ge,g,d),Y&6)Pe(d.component,x,S);else{if(Y&128){d.suspense.unmount(x,S);return}ue&&Jt(d,null,g,"beforeUnmount"),Y&64?d.type.remove(d,g,x,f,S):R&&!R.hasOnce&&(M!==ve||q>0&&q&64)?Ee(R,g,x,!1,!0):(M===ve&&q&384||!E&&Y&16)&&Ee(P,g,x),S&&De(d)}(ye&&(ge=H&&H.onVnodeUnmounted)||ue)&&Ke(()=>{ge&&ht(ge,g,d),ue&&Jt(d,null,g,"unmounted")},x)},De=d=>{const{type:g,el:x,anchor:S,transition:E}=d;if(g===ve){Qe(x,S);return}if(g===sn){D(d);return}const M=()=>{o(x),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(d.shapeFlag&1&&E&&!E.persisted){const{leave:H,delayLeave:V}=E,P=()=>H(x,M);V?V(d.el,M,P):P()}else M()},Qe=(d,g)=>{let x;for(;d!==g;)x=b(d),o(d),d=x;o(g)},Pe=(d,g,x)=>{const{bum:S,scope:E,job:M,subTree:H,um:V,m:P,a:R}=d;xr(P),xr(R),S&&en(S),E.stop(),M&&(M.flags|=8,xe(H,d,g,x)),V&&Ke(V,g),Ke(()=>{d.isUnmounted=!0},g)},Ee=(d,g,x,S=!1,E=!1,M=0)=>{for(let H=M;H<d.length;H++)xe(d[H],g,x,S,E)},O=d=>{if(d.shapeFlag&6)return O(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const g=b(d.anchor||d.el),x=g&&g[za];return x?b(x):g};let T=!1;const m=(d,g,x)=>{let S;d==null?g._vnode&&(xe(g._vnode,null,null,!0),S=g._vnode.component):$(g._vnode||null,d,g,null,null,null,x),g._vnode=d,T||(T=!0,lr(S),ji(),T=!1)},f={p:$,um:xe,m:Se,r:De,mt:k,mc:X,pc:ie,pbc:B,n:O,o:e};return{render:m,hydrate:void 0,createApp:mc(m)}}function Wn({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 Yt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Rc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fl(e,t,s=!1){const n=e.children,o=t.children;if(ee(n)&&ee(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=Et(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&fl(l,a)),a.type===Rn&&(a.patchFlag===-1&&(a=o[r]=Et(a)),a.el=l.el),a.type===Ue&&!a.el&&(a.el=l.el)}}function Oc(e){const t=e.slice(),s=[0];let n,o,r,l,a;const c=e.length;for(n=0;n<c;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<p?r=a+1:l=a;p<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function pl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pl(t)}function xr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hl(t.subTree):null}const ml=e=>e.__isSuspense;function Bc(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Va(e)}const ve=Symbol.for("v-fgt"),Rn=Symbol.for("v-txt"),Ue=Symbol.for("v-cmt"),sn=Symbol.for("v-stc"),Ns=[];let Xe=null;function w(e=!1){Ns.push(Xe=e?null:[])}function Pc(){Ns.pop(),Xe=Ns[Ns.length-1]||null}let Hs=1;function mn(e,t=!1){Hs+=e,e<0&&Xe&&t&&(Xe.hasOnce=!0)}function gl(e){return e.dynamicChildren=Hs>0?Xe||us:null,Pc(),Hs>0&&Xe&&Xe.push(e),e}function _(e,t,s,n,o,r){return gl(i(e,t,s,n,o,r,!0))}function Nc(e,t,s,n,o){return gl(Te(e,t,s,n,o,!0))}function gn(e){return e?e.__v_isVNode===!0:!1}function es(e,t){return e.type===t.type&&e.key===t.key}const vl=({key:e})=>e??null,nn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||je(e)||oe(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===ve?0:1,l=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vl(t),ref:t&&nn(t),scopeId:Vi,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ye};return a?(Uo(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=$e(s)?8:16),Hs>0&&!l&&Xe&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Xe.push(c),c}const Te=Ic;function Ic(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===ic)&&(e=Ue),gn(e)){const a=qt(e,t,!0);return s&&Uo(a,s),Hs>0&&!r&&Xe&&(a.shapeFlag&6?Xe[Xe.indexOf(e)]=a:Xe.push(a)),a.patchFlag=-2,a}if(Kc(e)&&(e=e.__vccOpts),t){t=Lc(t);let{class:a,style:c}=t;a&&!$e(a)&&(t.class=ne(a)),he(c)&&(Do(c)&&!ee(c)&&(c=Oe({},c)),t.style=Rt(c))}const l=$e(e)?1:ml(e)?128:Ui(e)?64:he(e)?4:oe(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function Lc(e){return e?Do(e)||il(e)?Oe({},e):e:null}function qt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:c}=e,p=t?jc(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&vl(p),ref:t&&t.ref?s&&r?ee(r)?r.concat(nn(t)):[r,nn(t)]:nn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qt(e.ssContent),ssFallback:e.ssFallback&&qt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Vs(u,c.clone(u)),u}function K(e=" ",t=0){return Te(Rn,null,e,t)}function tt(e,t){const s=Te(sn,null,e);return s.staticCount=t,s}function J(e="",t=!1){return t?(w(),Nc(Ue,null,e)):Te(Ue,null,e)}function vt(e){return e==null||typeof e=="boolean"?Te(Ue):ee(e)?Te(ve,null,e.slice()):gn(e)?Et(e):Te(Rn,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qt(e)}function Uo(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ee(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!il(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[K(t)]):s=8);e.children=t,e.shapeFlag|=s}function jc(...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=ne([t.class,n.class]));else if(o==="style")t.style=Rt([t.style,n.style]);else if(yn(o)){const r=t[o],l=n[o];l&&r!==l&&!(ee(r)&&r.includes(l))&&(t[o]=r?[].concat(r,l):l)}else o!==""&&(t[o]=n[o])}return t}function ht(e,t,s,n=null){ct(e,t,7,[s,n])}const Dc=tl();let Vc=0;function Hc(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||Dc,r={uid:Vc++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ua(!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:al(n,o),emitsOptions:sl(n,o),emit:null,emitted:null,propsDefaults:be,inheritAttrs:n.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=vc.bind(null,r),e.ce&&e.ce(r),r}let Le=null;const bl=()=>Le||Ye;let vn,ho;{const e=Cn(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(l=>l(r)):o[0](r)}};vn=t("__VUE_INSTANCE_SETTERS__",s=>Le=s),ho=t("__VUE_SSR_SETTERS__",s=>Fs=s)}const Ks=e=>{const t=Le;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},yr=()=>{Le&&Le.scope.off(),vn(null)};function xl(e){return e.vnode.shapeFlag&4}let Fs=!1;function Fc(e,t=!1,s=!1){t&&ho(t);const{props:n,children:o}=e.vnode,r=xl(e);kc(e,n,r,t),$c(e,o,s||t);const l=r?Uc(e,t):void 0;return t&&ho(!1),l}function Uc(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ac);const{setup:n}=s;if(n){Ot();const o=e.setupContext=n.length>1?Wc(e):null,r=Ks(e),l=qs(n,e,0,[e.props,o]),a=fi(l);if(Bt(),r(),(a||e.sp)&&!Bs(e)&&Yi(e),a){if(l.then(yr,yr),t)return l.then(c=>{wr(e,c)}).catch(c=>{$n(c,e,0)});e.asyncDep=l}else wr(e,l)}else yl(e)}function wr(e,t,s){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ni(t)),yl(e)}function yl(e,t,s){const n=e.type;e.render||(e.render=n.render||bt);{const o=Ks(e);Ot();try{cc(e)}finally{Bt(),o()}}}const zc={get(e,t){return Ie(e,"get",""),e[t]}};function Wc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,zc),slots:e.slots,emit:e.emit,expose:t}}function On(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(Ma(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ps)return Ps[s](e)},has(t,s){return s in t||s in Ps}})):e.proxy}function qc(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function Kc(e){return oe(e)&&"__vccOpts"in e}const Ne=(e,t)=>Na(e,t,Fs);function zo(e,t,s){try{mn(-1);const n=arguments.length;return n===2?he(t)&&!ee(t)?gn(t)?Te(e,null,[t]):Te(e,t):Te(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&gn(s)&&(s=[s]),Te(e,t,s))}finally{mn(1)}}const Gc="3.5.29";let mo;const _r=typeof window<"u"&&window.trustedTypes;if(_r)try{mo=_r.createPolicy("vue",{createHTML:e=>e})}catch{}const wl=mo?e=>mo.createHTML(e):e=>e,Jc="http://www.w3.org/2000/svg",Yc="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,kr=St&&St.createElement("template"),Xc={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(Jc,e):t==="mathml"?St.createElementNS(Yc,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,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{kr.innerHTML=wl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=kr.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},It="transition",ks="animation",Us=Symbol("_vtc"),_l={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},Qc=Oe({},zi,_l),Zc=e=>(e.displayName="Transition",e.props=Qc,e),Cr=Zc((e,{slots:t})=>zo(Ka,eu(e),t)),Xt=(e,t=[])=>{ee(e)?e.forEach(s=>s(...t)):e&&e(...t)},Sr=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function eu(e){const t={};for(const I in e)I in _l||(t[I]=e[I]);if(e.css===!1)return t;const{name:s="v",type:n,duration:o,enterFromClass:r=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:c=r,appearActiveClass:p=l,appearToClass:u=a,leaveFromClass:h=`${s}-leave-from`,leaveActiveClass:b=`${s}-leave-active`,leaveToClass:y=`${s}-leave-to`}=e,A=tu(o),$=A&&A[0],L=A&&A[1],{onBeforeEnter:U,onEnter:N,onEnterCancelled:z,onLeave:D,onLeaveCancelled:te,onBeforeAppear:ae=U,onAppear:re=N,onAppearCancelled:X=z}=t,C=(I,W,k,G)=>{I._enterCancelled=G,Qt(I,W?u:a),Qt(I,W?p:l),k&&k()},B=(I,W)=>{I._isLeaving=!1,Qt(I,h),Qt(I,y),Qt(I,b),W&&W()},Q=I=>(W,k)=>{const G=I?re:N,me=()=>C(W,I,k);Xt(G,[W,me]),Er(()=>{Qt(W,I?c:r),kt(W,I?u:a),Sr(G)||$r(W,n,$,me)})};return Oe(t,{onBeforeEnter(I){Xt(U,[I]),kt(I,r),kt(I,l)},onBeforeAppear(I){Xt(ae,[I]),kt(I,c),kt(I,p)},onEnter:Q(!1),onAppear:Q(!0),onLeave(I,W){I._isLeaving=!0;const k=()=>B(I,W);kt(I,h),I._enterCancelled?(kt(I,b),Mr(I)):(Mr(I),kt(I,b)),Er(()=>{I._isLeaving&&(Qt(I,h),kt(I,y),Sr(D)||$r(I,n,L,k))}),Xt(D,[I,k])},onEnterCancelled(I){C(I,!1,void 0,!0),Xt(z,[I])},onAppearCancelled(I){C(I,!0,void 0,!0),Xt(X,[I])},onLeaveCancelled(I){B(I),Xt(te,[I])}})}function tu(e){if(e==null)return null;if(he(e))return[qn(e.enter),qn(e.leave)];{const t=qn(e);return[t,t]}}function qn(e){return sa(e)}function kt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Us]||(e[Us]=new Set)).add(t)}function Qt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Us];s&&(s.delete(t),s.size||(e[Us]=void 0))}function Er(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let su=0;function $r(e,t,s,n){const o=e._endId=++su,r=()=>{o===e._endId&&n()};if(s!=null)return setTimeout(r,s);const{type:l,timeout:a,propCount:c}=nu(e,t);if(!l)return n();const p=l+"end";let u=0;const h=()=>{e.removeEventListener(p,b),r()},b=y=>{y.target===e&&++u>=c&&h()};setTimeout(()=>{u<c&&h()},a+1),e.addEventListener(p,b)}function nu(e,t){const s=window.getComputedStyle(e),n=A=>(s[A]||"").split(", "),o=n(`${It}Delay`),r=n(`${It}Duration`),l=Ar(o,r),a=n(`${ks}Delay`),c=n(`${ks}Duration`),p=Ar(a,c);let u=null,h=0,b=0;t===It?l>0&&(u=It,h=l,b=r.length):t===ks?p>0&&(u=ks,h=p,b=c.length):(h=Math.max(l,p),u=h>0?l>p?It:ks:null,b=u?u===It?r.length:c.length:0);const y=u===It&&/\b(?:transform|all)(?:,|$)/.test(n(`${It}Property`).toString());return{type:u,timeout:h,propCount:b,hasTransform:y}}function Ar(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Tr(s)+Tr(e[n])))}function Tr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Mr(e){return(e?e.ownerDocument:document).body.offsetHeight}function ou(e,t,s){const n=e[Us];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const bn=Symbol("_vod"),kl=Symbol("_vsh"),ru={name:"show",beforeMount(e,{value:t},{transition:s}){e[bn]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Cs(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),Cs(e,!0),n.enter(e)):n.leave(e,()=>{Cs(e,!1)}):Cs(e,t))},beforeUnmount(e,{value:t}){Cs(e,t)}};function Cs(e,t){e.style.display=t?e[bn]:"none",e[kl]=!t}const iu=Symbol(""),lu=/(?:^|;)\s*display\s*:/;function au(e,t,s){const n=e.style,o=$e(s);let r=!1;if(s&&!o){if(t)if($e(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&on(n,a,"")}else for(const l in t)s[l]==null&&on(n,l,"");for(const l in s)l==="display"&&(r=!0),on(n,l,s[l])}else if(o){if(t!==s){const l=n[iu];l&&(s+=";"+l),n.cssText=s,r=lu.test(s)}}else t&&e.removeAttribute("style");bn in e&&(e[bn]=r?n.display:"",e[kl]&&(n.display="none"))}const Rr=/\s*!important$/;function on(e,t,s){if(ee(s))s.forEach(n=>on(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=cu(e,t);Rr.test(s)?e.setProperty(Gt(n),s.replace(Rr,""),"important"):e[n]=s}}const Or=["Webkit","Moz","ms"],Kn={};function cu(e,t){const s=Kn[t];if(s)return s;let n=ot(t);if(n!=="filter"&&n in e)return Kn[t]=n;n=_n(n);for(let o=0;o<Or.length;o++){const r=Or[o]+n;if(r in e)return Kn[t]=r}return t}const Br="http://www.w3.org/1999/xlink";function Pr(e,t,s,n,o,r=aa(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Br,t.slice(6,t.length)):e.setAttributeNS(Br,t,s):s==null||r&&!gi(s)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(s)?String(s):s)}function Nr(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?wl(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=gi(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function Tt(e,t,s,n){e.addEventListener(t,s,n)}function uu(e,t,s,n){e.removeEventListener(t,s,n)}const Ir=Symbol("_vei");function du(e,t,s,n,o=null){const r=e[Ir]||(e[Ir]={}),l=r[t];if(n&&l)l.value=n;else{const[a,c]=fu(t);if(n){const p=r[t]=mu(n,o);Tt(e,a,p,c)}else l&&(uu(e,a,l,c),r[t]=void 0)}}const Lr=/(?:Once|Passive|Capture)$/;function fu(e){let t;if(Lr.test(e)){t={};let n;for(;n=e.match(Lr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Gt(e.slice(2)),t]}let Gn=0;const pu=Promise.resolve(),hu=()=>Gn||(pu.then(()=>Gn=0),Gn=Date.now());function mu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ct(gu(n,s.value),t,5,[n])};return s.value=e,s.attached=hu(),s}function gu(e,t){if(ee(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const jr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vu=(e,t,s,n,o,r)=>{const l=o==="svg";t==="class"?ou(e,n,l):t==="style"?au(e,s,n):yn(t)?To(t)||du(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bu(e,t,n,l))?(Nr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pr(e,t,n,l,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(n))?Nr(e,ot(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Pr(e,t,n,l))};function bu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&jr(t)&&oe(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 jr(t)&&$e(s)?!1:t in e}const Kt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?s=>en(t,s):t};function xu(e){e.target.composing=!0}function Dr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const nt=Symbol("_assign");function Vr(e,t,s){return t&&(e=e.trim()),s&&(e=kn(e)),e}const Be={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[nt]=Kt(o);const r=n||o.props&&o.props.type==="number";Tt(e,t?"change":"input",l=>{l.target.composing||e[nt](Vr(e.value,s,r))}),(s||r)&&Tt(e,"change",()=>{e.value=Vr(e.value,s,r)}),t||(Tt(e,"compositionstart",xu),Tt(e,"compositionend",Dr),Tt(e,"change",Dr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},l){if(e[nt]=Kt(l),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?kn(e.value):e.value,c=t??"";a!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c))}},go={deep:!0,created(e,t,s){e[nt]=Kt(s),Tt(e,"change",()=>{const n=e._modelValue,o=ms(e),r=e.checked,l=e[nt];if(ee(n)){const a=Oo(n,o),c=a!==-1;if(r&&!c)l(n.concat(o));else if(!r&&c){const p=[...n];p.splice(a,1),l(p)}}else if(bs(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(Cl(e,r))})},mounted:Hr,beforeUpdate(e,t,s){e[nt]=Kt(s),Hr(e,t,s)}};function Hr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(ee(t))o=Oo(t,n.props.value)>-1;else if(bs(t))o=t.has(n.props.value);else{if(t===s)return;o=Wt(t,Cl(e,!0))}e.checked!==o&&(e.checked=o)}const rn={created(e,{value:t},s){e.checked=Wt(t,s.props.value),e[nt]=Kt(s),Tt(e,"change",()=>{e[nt](ms(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[nt]=Kt(n),t!==s&&(e.checked=Wt(t,n.props.value))}},vo={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=bs(t);Tt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?kn(ms(l)):ms(l));e[nt](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Mt(()=>{e._assigning=!1})}),e[nt]=Kt(n)},mounted(e,{value:t}){Fr(e,t)},beforeUpdate(e,t,s){e[nt]=Kt(s)},updated(e,{value:t}){e._assigning||Fr(e,t)}};function Fr(e,t){const s=e.multiple,n=ee(t);if(!(s&&!n&&!bs(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=ms(l);if(s)if(n){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(p=>String(p)===String(a)):l.selected=Oo(t,a)>-1}else l.selected=t.has(a);else if(Wt(ms(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ms(e){return"_value"in e?e._value:e.value}function Cl(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const yu={created(e,t,s){Xs(e,t,s,null,"created")},mounted(e,t,s){Xs(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){Xs(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){Xs(e,t,s,n,"updated")}};function wu(e,t){switch(e){case"SELECT":return vo;case"TEXTAREA":return Be;default:switch(t){case"checkbox":return go;case"radio":return rn;default:return Be}}}function Xs(e,t,s,n,o){const l=wu(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const _u=["ctrl","shift","alt","meta"],ku={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)=>_u.some(s=>e[`${s}Key`]&&!t.includes(s))},Bn=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...r)=>{for(let l=0;l<t.length;l++){const a=ku[t[l]];if(a&&a(o,t))return}return e(o,...r)}))},Cu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=Gt(o.key);if(t.some(l=>l===r||Cu[l]===r))return e(o)}))},Su=Oe({patchProp:vu},Xc);let Ur;function Eu(){return Ur||(Ur=Tc(Su))}const $u=((...e)=>{const t=Eu().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Tu(n);if(!o)return;const r=t._component;!oe(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Au(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Au(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tu(e){return $e(e)?document.querySelector(e):e}const Mu="/icon.png";const cs=typeof document<"u";function Sl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ru(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Sl(e.default)}const fe=Object.assign;function Jn(e,t){const s={};for(const n in t){const o=t[n];s[n]=ut(o)?o.map(e):e(o)}return s}const Is=()=>{},ut=Array.isArray;function zr(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}let Ce=(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 El=Symbol("");Ce.MATCHER_NOT_FOUND+"",Ce.NAVIGATION_GUARD_REDIRECT+"",Ce.NAVIGATION_ABORTED+"",Ce.NAVIGATION_CANCELLED+"",Ce.NAVIGATION_DUPLICATED+"";function gs(e,t){return fe(new Error,{type:e,[El]:!0},t)}function Ct(e,t){return e instanceof Error&&El in e&&(t==null||!!(e.type&t))}const Ou=["params","query","hash"];function Bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of Ou)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}const Pu=Symbol(""),Wr=Symbol(""),Pn=Symbol(""),Wo=Symbol(""),bo=Symbol("");function qo(){return lt(Pn)}function Nu(e){return lt(Wo)}const $l=/#/g,Iu=/&/g,Lu=/\//g,ju=/=/g,Du=/\?/g,Al=/\+/g,Vu=/%5B/g,Hu=/%5D/g,Tl=/%5E/g,Fu=/%60/g,Ml=/%7B/g,Uu=/%7C/g,Rl=/%7D/g,zu=/%20/g;function Ko(e){return e==null?"":encodeURI(""+e).replace(Uu,"|").replace(Vu,"[").replace(Hu,"]")}function Wu(e){return Ko(e).replace(Ml,"{").replace(Rl,"}").replace(Tl,"^")}function xo(e){return Ko(e).replace(Al,"%2B").replace(zu,"+").replace($l,"%23").replace(Iu,"%26").replace(Fu,"`").replace(Ml,"{").replace(Rl,"}").replace(Tl,"^")}function qu(e){return xo(e).replace(ju,"%3D")}function Ku(e){return Ko(e).replace($l,"%23").replace(Du,"%3F")}function Gu(e){return Ku(e).replace(Lu,"%2F")}function zs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ju=/\/$/,Yu=e=>e.replace(Ju,"");function Yn(e,t,s="/"){let n,o={},r="",l="";const a=t.indexOf("#");let c=t.indexOf("?");return c=a>=0&&c>a?-1:c,c>=0&&(n=t.slice(0,c),r=t.slice(c,a>0?a:t.length),o=e(r.slice(1))),a>=0&&(n=n||t.slice(0,a),l=t.slice(a,t.length)),n=ed(n??t,s),{fullPath:n+r+l,path:n,query:o,hash:zs(l)}}function Xu(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function qr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Qu(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&vs(t.matched[n],s.matched[o])&&Ol(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function vs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ol(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Zu(e[s],t[s]))return!1;return!0}function Zu(e,t){return ut(e)?Kr(e,t):ut(t)?Kr(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Kr(e,t){return ut(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function ed(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 r=s.length-1,l,a;for(l=0;l<n.length;l++)if(a=n[l],a!==".")if(a==="..")r>1&&r--;else break;return s.slice(0,r).join("/")+"/"+n.slice(l).join("/")}const Lt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let yo=(function(e){return e.pop="pop",e.push="push",e})({}),Xn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function td(e){if(!e)if(cs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Yu(e)}const sd=/^[^#]+#/;function nd(e,t){return e.replace(sd,"#")+t}function od(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 Nn=()=>({left:window.scrollX,top:window.scrollY});function rd(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=od(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 Gr(e,t){return(history.state?history.state.position-t:-1)+e}const wo=new Map;function id(e,t){wo.set(e,t)}function ld(e){const t=wo.get(e);return wo.delete(e),t}function ad(e){return typeof e=="string"||e&&typeof e=="object"}function Bl(e){return typeof e=="string"||typeof e=="symbol"}function cd(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(Al," "),r=o.indexOf("="),l=zs(r<0?o:o.slice(0,r)),a=r<0?null:zs(o.slice(r+1));if(l in t){let c=t[l];ut(c)||(c=t[l]=[c]),c.push(a)}else t[l]=a}return t}function Jr(e){let t="";for(let s in e){const n=e[s];if(s=qu(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(ut(n)?n.map(o=>o&&xo(o)):[n&&xo(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function ud(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=ut(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}function Ss(){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 Vt(e,t,s,n,o,r=l=>l()){const l=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((a,c)=>{const p=b=>{b===!1?c(gs(Ce.NAVIGATION_ABORTED,{from:s,to:t})):b instanceof Error?c(b):ad(b)?c(gs(Ce.NAVIGATION_GUARD_REDIRECT,{from:t,to:b})):(l&&n.enterCallbacks[o]===l&&typeof b=="function"&&l.push(b),a())},u=r(()=>e.call(n&&n.instances[o],t,s,p));let h=Promise.resolve(u);e.length<3&&(h=h.then(p)),h.catch(b=>c(b))})}function Qn(e,t,s,n,o=r=>r()){const r=[];for(const l of e)for(const a in l.components){let c=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(Sl(c)){const p=(c.__vccOpts||c)[t];p&&r.push(Vt(p,s,n,l,a,o))}else{let p=c();r.push(()=>p.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const h=Ru(u)?u.default:u;l.mods[a]=u,l.components[a]=h;const b=(h.__vccOpts||h)[t];return b&&Vt(b,s,n,l,a,o)()}))}}return r}function dd(e,t){const s=[],n=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let l=0;l<r;l++){const a=t.matched[l];a&&(e.matched.find(p=>vs(p,a))?n.push(a):s.push(a));const c=e.matched[l];c&&(t.matched.find(p=>vs(p,c))||o.push(c))}return[s,n,o]}let fd=()=>location.protocol+"//"+location.host;function Pl(e,t){const{pathname:s,search:n,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,a=o.slice(l);return a[0]!=="/"&&(a="/"+a),qr(a,"")}return qr(s,e)+n+o}function pd(e,t,s,n){let o=[],r=[],l=null;const a=({state:b})=>{const y=Pl(e,location),A=s.value,$=t.value;let L=0;if(b){if(s.value=y,t.value=b,l&&l===A){l=null;return}L=$?b.position-$.position:0}else n(y);o.forEach(U=>{U(s.value,A,{delta:L,type:yo.pop,direction:L?L>0?Xn.forward:Xn.back:Xn.unknown})})};function c(){l=s.value}function p(b){o.push(b);const y=()=>{const A=o.indexOf(b);A>-1&&o.splice(A,1)};return r.push(y),y}function u(){if(document.visibilityState==="hidden"){const{history:b}=window;if(!b.state)return;b.replaceState(fe({},b.state,{scroll:Nn()}),"")}}function h(){for(const b of r)b();r=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:p,destroy:h}}function Yr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?Nn():null}}function hd(e){const{history:t,location:s}=window,n={value:Pl(e,s)},o={value:t.state};o.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,p,u){const h=e.indexOf("#"),b=h>-1?(s.host&&document.querySelector("base")?e:e.slice(h))+c:fd()+e+c;try{t[u?"replaceState":"pushState"](p,"",b),o.value=p}catch(y){console.error(y),s[u?"replace":"assign"](b)}}function l(c,p){r(c,fe({},t.state,Yr(o.value.back,c,o.value.forward,!0),p,{position:o.value.position}),!0),n.value=c}function a(c,p){const u=fe({},o.value,t.state,{forward:c,scroll:Nn()});r(u.current,u,!0),r(c,fe({},Yr(n.value,c,null),{position:u.position+1},p),!1),n.value=c}return{location:n,state:o,push:a,replace:l}}function md(e){e=td(e);const t=hd(e),s=pd(e,t.state,t.location,t.replace);function n(r,l=!0){l||s.pauseListeners(),history.go(r)}const o=fe({location:"",base:e,go:n,createHref:nd.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}let ts=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Re=(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})(Re||{});const gd={type:ts.Static,value:""},vd=/[a-zA-Z0-9_]/;function bd(e){if(!e)return[[]];if(e==="/")return[[gd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${s})/"${p}": ${y}`)}let s=Re.Static,n=s;const o=[];let r;function l(){r&&o.push(r),r=[]}let a=0,c,p="",u="";function h(){p&&(s===Re.Static?r.push({type:ts.Static,value:p}):s===Re.Param||s===Re.ParamRegExp||s===Re.ParamRegExpEnd?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),r.push({type:ts.Param,value:p,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),p="")}function b(){p+=c}for(;a<e.length;){if(c=e[a++],c==="\\"&&s!==Re.ParamRegExp){n=s,s=Re.EscapeNext;continue}switch(s){case Re.Static:c==="/"?(p&&h(),l()):c===":"?(h(),s=Re.Param):b();break;case Re.EscapeNext:b(),s=n;break;case Re.Param:c==="("?s=Re.ParamRegExp:vd.test(c)?b():(h(),s=Re.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--);break;case Re.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:s=Re.ParamRegExpEnd:u+=c;break;case Re.ParamRegExpEnd:h(),s=Re.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--,u="";break;default:t("Unknown state");break}}return s===Re.ParamRegExp&&t(`Unfinished custom RegExp for param "${p}"`),h(),l(),o}const Xr="[^/]+?",xd={sensitive:!1,strict:!1,start:!0,end:!0};var He=(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})(He||{});const yd=/[.+*?^${}()[\]/\\]/g;function wd(e,t){const s=fe({},xd,t),n=[];let o=s.start?"^":"";const r=[];for(const p of e){const u=p.length?[]:[He.Root];s.strict&&!p.length&&(o+="/");for(let h=0;h<p.length;h++){const b=p[h];let y=He.Segment+(s.sensitive?He.BonusCaseSensitive:0);if(b.type===ts.Static)h||(o+="/"),o+=b.value.replace(yd,"\\$&"),y+=He.Static;else if(b.type===ts.Param){const{value:A,repeatable:$,optional:L,regexp:U}=b;r.push({name:A,repeatable:$,optional:L});const N=U||Xr;if(N!==Xr){y+=He.BonusCustomRegExp;try{new RegExp(`(${N})`)}catch(D){throw new Error(`Invalid custom RegExp for param "${A}" (${N}): `+D.message)}}let z=$?`((?:${N})(?:/(?:${N}))*)`:`(${N})`;h||(z=L&&p.length<2?`(?:/${z})`:"/"+z),L&&(z+="?"),o+=z,y+=He.Dynamic,L&&(y+=He.BonusOptional),$&&(y+=He.BonusRepeatable),N===".*"&&(y+=He.BonusWildcard)}u.push(y)}n.push(u)}if(s.strict&&s.end){const p=n.length-1;n[p][n[p].length-1]+=He.BonusStrict}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const l=new RegExp(o,s.sensitive?"":"i");function a(p){const u=p.match(l),h={};if(!u)return null;for(let b=1;b<u.length;b++){const y=u[b]||"",A=r[b-1];h[A.name]=y&&A.repeatable?y.split("/"):y}return h}function c(p){let u="",h=!1;for(const b of e){(!h||!u.endsWith("/"))&&(u+="/"),h=!1;for(const y of b)if(y.type===ts.Static)u+=y.value;else if(y.type===ts.Param){const{value:A,repeatable:$,optional:L}=y,U=A in p?p[A]:"";if(ut(U)&&!$)throw new Error(`Provided param "${A}" is an array but it is not repeatable (* or + modifiers)`);const N=ut(U)?U.join("/"):U;if(!N)if(L)b.length<2&&(u.endsWith("/")?u=u.slice(0,-1):h=!0);else throw new Error(`Missing required param "${A}"`);u+=N}}return u||"/"}return{re:l,score:n,keys:r,parse:a,stringify:c}}function _d(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]===He.Static+He.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===He.Static+He.Segment?1:-1:0}function Nl(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const r=_d(n[s],o[s]);if(r)return r;s++}if(Math.abs(o.length-n.length)===1){if(Qr(n))return 1;if(Qr(o))return-1}return o.length-n.length}function Qr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const kd={strict:!1,end:!0,sensitive:!1};function Cd(e,t,s){const n=wd(bd(e.path),s),o=fe(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Sd(e,t){const s=[],n=new Map;t=zr(kd,t);function o(h){return n.get(h)}function r(h,b,y){const A=!y,$=ei(h);$.aliasOf=y&&y.record;const L=zr(t,h),U=[$];if("alias"in h){const D=typeof h.alias=="string"?[h.alias]:h.alias;for(const te of D)U.push(ei(fe({},$,{components:y?y.record.components:$.components,path:te,aliasOf:y?y.record:$})))}let N,z;for(const D of U){const{path:te}=D;if(b&&te[0]!=="/"){const ae=b.record.path,re=ae[ae.length-1]==="/"?"":"/";D.path=b.record.path+(te&&re+te)}if(N=Cd(D,b,L),y?y.alias.push(N):(z=z||N,z!==N&&z.alias.push(N),A&&h.name&&!ti(N)&&l(h.name)),Il(N)&&c(N),$.children){const ae=$.children;for(let re=0;re<ae.length;re++)r(ae[re],N,y&&y.children[re])}y=y||N}return z?()=>{l(z)}:Is}function l(h){if(Bl(h)){const b=n.get(h);b&&(n.delete(h),s.splice(s.indexOf(b),1),b.children.forEach(l),b.alias.forEach(l))}else{const b=s.indexOf(h);b>-1&&(s.splice(b,1),h.record.name&&n.delete(h.record.name),h.children.forEach(l),h.alias.forEach(l))}}function a(){return s}function c(h){const b=Ad(h,s);s.splice(b,0,h),h.record.name&&!ti(h)&&n.set(h.record.name,h)}function p(h,b){let y,A={},$,L;if("name"in h&&h.name){if(y=n.get(h.name),!y)throw gs(Ce.MATCHER_NOT_FOUND,{location:h});L=y.record.name,A=fe(Zr(b.params,y.keys.filter(z=>!z.optional).concat(y.parent?y.parent.keys.filter(z=>z.optional):[]).map(z=>z.name)),h.params&&Zr(h.params,y.keys.map(z=>z.name))),$=y.stringify(A)}else if(h.path!=null)$=h.path,y=s.find(z=>z.re.test($)),y&&(A=y.parse($),L=y.record.name);else{if(y=b.name?n.get(b.name):s.find(z=>z.re.test(b.path)),!y)throw gs(Ce.MATCHER_NOT_FOUND,{location:h,currentLocation:b});L=y.record.name,A=fe({},b.params,h.params),$=y.stringify(A)}const U=[];let N=y;for(;N;)U.unshift(N.record),N=N.parent;return{name:L,path:$,params:A,matched:U,meta:$d(U)}}e.forEach(h=>r(h));function u(){s.length=0,n.clear()}return{addRoute:r,resolve:p,removeRoute:l,clearRoutes:u,getRoutes:a,getRecordMatcher:o}}function Zr(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function ei(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ed(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 Ed(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 ti(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $d(e){return e.reduce((t,s)=>fe(t,s.meta),{})}function Ad(e,t){let s=0,n=t.length;for(;s!==n;){const r=s+n>>1;Nl(e,t[r])<0?n=r:s=r+1}const o=Td(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function Td(e){let t=e;for(;t=t.parent;)if(Il(t)&&Nl(e,t)===0)return t}function Il({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function si(e){const t=lt(Pn),s=lt(Wo),n=Ne(()=>{const c=Ft(e.to);return t.resolve(c)}),o=Ne(()=>{const{matched:c}=n.value,{length:p}=c,u=c[p-1],h=s.matched;if(!u||!h.length)return-1;const b=h.findIndex(vs.bind(null,u));if(b>-1)return b;const y=ni(c[p-2]);return p>1&&ni(u)===y&&h[h.length-1].path!==y?h.findIndex(vs.bind(null,c[p-2])):b}),r=Ne(()=>o.value>-1&&Pd(s.params,n.value.params)),l=Ne(()=>o.value>-1&&o.value===s.matched.length-1&&Ol(s.params,n.value.params));function a(c={}){if(Bd(c)){const p=t[Ft(e.replace)?"replace":"push"](Ft(e.to)).catch(Is);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>p),p}return Promise.resolve()}return{route:n,href:Ne(()=>n.value.href),isActive:r,isExactActive:l,navigate:a}}function Md(e){return e.length===1?e[0]:e}const Rd=Ji({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:si,setup(e,{slots:t}){const s=En(si(e)),{options:n}=lt(Pn),o=Ne(()=>({[oi(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[oi(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const r=t.default&&Md(t.default(s));return e.custom?r:zo("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),Od=Rd;function Bd(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(!ut(o)||o.length!==n.length||n.some((r,l)=>r.valueOf()!==o[l].valueOf()))return!1}return!0}function ni(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const oi=(e,t,s)=>e??t??s,Nd=Ji({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=lt(bo),o=Ne(()=>e.route||n.value),r=lt(Wr,0),l=Ne(()=>{let p=Ft(r);const{matched:u}=o.value;let h;for(;(h=u[p])&&!h.components;)p++;return p}),a=Ne(()=>o.value.matched[l.value]);tn(Wr,Ne(()=>l.value+1)),tn(Pu,a),tn(bo,o);const c=F();return Ut(()=>[c.value,a.value,e.name],([p,u,h],[b,y,A])=>{u&&(u.instances[h]=p,y&&y!==u&&p&&p===b&&(u.leaveGuards.size||(u.leaveGuards=y.leaveGuards),u.updateGuards.size||(u.updateGuards=y.updateGuards))),p&&u&&(!y||!vs(u,y)||!b)&&(u.enterCallbacks[h]||[]).forEach($=>$(p))},{flush:"post"}),()=>{const p=o.value,u=e.name,h=a.value,b=h&&h.components[u];if(!b)return ri(s.default,{Component:b,route:p});const y=h.props[u],A=y?y===!0?p.params:typeof y=="function"?y(p):y:null,L=zo(b,fe({},A,t,{onVnodeUnmounted:U=>{U.component.isUnmounted&&(h.instances[u]=null)},ref:c}));return ri(s.default,{Component:L,route:p})||L}}});function ri(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Id=Nd;function Ld(e){const t=Sd(e.routes,e),s=e.parseQuery||cd,n=e.stringifyQuery||Jr,o=e.history,r=Ss(),l=Ss(),a=Ss(),c=Ra(Lt);let p=Lt;cs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Jn.bind(null,O=>""+O),h=Jn.bind(null,Gu),b=Jn.bind(null,zs);function y(O,T){let m,f;return Bl(O)?(m=t.getRecordMatcher(O),f=T):f=O,t.addRoute(f,m)}function A(O){const T=t.getRecordMatcher(O);T&&t.removeRoute(T)}function $(){return t.getRoutes().map(O=>O.record)}function L(O){return!!t.getRecordMatcher(O)}function U(O,T){if(T=fe({},T||c.value),typeof O=="string"){const x=Yn(s,O,T.path),S=t.resolve({path:x.path},T),E=o.createHref(x.fullPath);return fe(x,S,{params:b(S.params),hash:zs(x.hash),redirectedFrom:void 0,href:E})}let m;if(O.path!=null)m=fe({},O,{path:Yn(s,O.path,T.path).path});else{const x=fe({},O.params);for(const S in x)x[S]==null&&delete x[S];m=fe({},O,{params:h(x)}),T.params=h(T.params)}const f=t.resolve(m,T),v=O.hash||"";f.params=u(b(f.params));const d=Xu(n,fe({},O,{hash:Wu(v),path:f.path})),g=o.createHref(d);return fe({fullPath:d,hash:v,query:n===Jr?ud(O.query):O.query||{}},f,{redirectedFrom:void 0,href:g})}function N(O){return typeof O=="string"?Yn(s,O,c.value.path):fe({},O)}function z(O,T){if(p!==O)return gs(Ce.NAVIGATION_CANCELLED,{from:T,to:O})}function D(O){return re(O)}function te(O){return D(fe(N(O),{replace:!0}))}function ae(O,T){const m=O.matched[O.matched.length-1];if(m&&m.redirect){const{redirect:f}=m;let v=typeof f=="function"?f(O,T):f;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=N(v):{path:v},v.params={}),fe({query:O.query,hash:O.hash,params:v.path!=null?{}:O.params},v)}}function re(O,T){const m=p=U(O),f=c.value,v=O.state,d=O.force,g=O.replace===!0,x=ae(m,f);if(x)return re(fe(N(x),{state:typeof x=="object"?fe({},v,x.state):v,force:d,replace:g}),T||m);const S=m;S.redirectedFrom=T;let E;return!d&&Qu(n,f,m)&&(E=gs(Ce.NAVIGATION_DUPLICATED,{to:S,from:f}),Se(f,f,!0,!1)),(E?Promise.resolve(E):B(S,f)).catch(M=>Ct(M)?Ct(M,Ce.NAVIGATION_GUARD_REDIRECT)?M:_e(M):ie(M,S,f)).then(M=>{if(M){if(Ct(M,Ce.NAVIGATION_GUARD_REDIRECT))return re(fe({replace:g},N(M.to),{state:typeof M.to=="object"?fe({},v,M.to.state):v,force:d}),T||S)}else M=I(S,f,!0,g,v);return Q(S,f,M),M})}function X(O,T){const m=z(O,T);return m?Promise.reject(m):Promise.resolve()}function C(O){const T=Qe.values().next().value;return T&&typeof T.runWithContext=="function"?T.runWithContext(O):O()}function B(O,T){let m;const[f,v,d]=dd(O,T);m=Qn(f.reverse(),"beforeRouteLeave",O,T);for(const x of f)x.leaveGuards.forEach(S=>{m.push(Vt(S,O,T))});const g=X.bind(null,O,T);return m.push(g),Ee(m).then(()=>{m=[];for(const x of r.list())m.push(Vt(x,O,T));return m.push(g),Ee(m)}).then(()=>{m=Qn(v,"beforeRouteUpdate",O,T);for(const x of v)x.updateGuards.forEach(S=>{m.push(Vt(S,O,T))});return m.push(g),Ee(m)}).then(()=>{m=[];for(const x of d)if(x.beforeEnter)if(ut(x.beforeEnter))for(const S of x.beforeEnter)m.push(Vt(S,O,T));else m.push(Vt(x.beforeEnter,O,T));return m.push(g),Ee(m)}).then(()=>(O.matched.forEach(x=>x.enterCallbacks={}),m=Qn(d,"beforeRouteEnter",O,T,C),m.push(g),Ee(m))).then(()=>{m=[];for(const x of l.list())m.push(Vt(x,O,T));return m.push(g),Ee(m)}).catch(x=>Ct(x,Ce.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function Q(O,T,m){a.list().forEach(f=>C(()=>f(O,T,m)))}function I(O,T,m,f,v){const d=z(O,T);if(d)return d;const g=T===Lt,x=cs?history.state:{};m&&(f||g?o.replace(O.fullPath,fe({scroll:g&&x&&x.scroll},v)):o.push(O.fullPath,v)),c.value=O,Se(O,T,m,g),_e()}let W;function k(){W||(W=o.listen((O,T,m)=>{if(!Pe.listening)return;const f=U(O),v=ae(f,Pe.currentRoute.value);if(v){re(fe(v,{replace:!0,force:!0}),f).catch(Is);return}p=f;const d=c.value;cs&&id(Gr(d.fullPath,m.delta),Nn()),B(f,d).catch(g=>Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_CANCELLED)?g:Ct(g,Ce.NAVIGATION_GUARD_REDIRECT)?(re(fe(N(g.to),{force:!0}),f).then(x=>{Ct(x,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&!m.delta&&m.type===yo.pop&&o.go(-1,!1)}).catch(Is),Promise.reject()):(m.delta&&o.go(-m.delta,!1),ie(g,f,d))).then(g=>{g=g||I(f,d,!1),g&&(m.delta&&!Ct(g,Ce.NAVIGATION_CANCELLED)?o.go(-m.delta,!1):m.type===yo.pop&&Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Q(f,d,g)}).catch(Is)}))}let G=Ss(),me=Ss(),le;function ie(O,T,m){_e(O);const f=me.list();return f.length?f.forEach(v=>v(O,T,m)):console.error(O),Promise.reject(O)}function Ae(){return le&&c.value!==Lt?Promise.resolve():new Promise((O,T)=>{G.add([O,T])})}function _e(O){return le||(le=!O,k(),G.list().forEach(([T,m])=>O?m(O):T()),G.reset()),O}function Se(O,T,m,f){const{scrollBehavior:v}=e;if(!cs||!v)return Promise.resolve();const d=!m&&ld(Gr(O.fullPath,0))||(f||!m)&&history.state&&history.state.scroll||null;return Mt().then(()=>v(O,T,d)).then(g=>g&&rd(g)).catch(g=>ie(g,O,T))}const xe=O=>o.go(O);let De;const Qe=new Set,Pe={currentRoute:c,listening:!0,addRoute:y,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:L,getRoutes:$,resolve:U,options:e,push:D,replace:te,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:l.add,afterEach:a.add,onError:me.add,isReady:Ae,install(O){O.component("RouterLink",Od),O.component("RouterView",Id),O.config.globalProperties.$router=Pe,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(c)}),cs&&!De&&c.value===Lt&&(De=!0,D(o.location).catch(f=>{}));const T={};for(const f in Lt)Object.defineProperty(T,f,{get:()=>c.value[f],enumerable:!0});O.provide(Pn,Pe),O.provide(Wo,Bi(T)),O.provide(bo,c);const m=O.unmount;Qe.add(O),O.unmount=function(){Qe.delete(O),Qe.size<1&&(p=Lt,W&&W(),W=null,c.value=Lt,De=!1,le=!1),m()}}};function Ee(O){return O.reduce((T,m)=>T.then(()=>C(m)),Promise.resolve())}return Pe}const jd={class:"min-h-screen bg-slate-900 text-slate-200 font-sans"},Dd={key:0,class:"border-b border-slate-800 bg-slate-900/50 backdrop-blur-xl sticky top-0 z-50"},Vd={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},Hd={class:"flex justify-between h-16 items-center"},Fd={class:"flex items-center space-x-3"},Ud={class:"flex items-center space-x-1 sm:space-x-2"},zd={__name:"App",setup(e){const t=qo(),s=Nu(),n=F(!!localStorage.getItem("pm2me_token"));Ut(s,()=>{n.value=!!localStorage.getItem("pm2me_token")});const o=()=>{localStorage.removeItem("pm2me_token"),n.value=!1,t.push("/login")};return(r,l)=>{const a=rc("router-view");return w(),_("div",jd,[n.value&&!["/setup","/login"].includes(r.$route.path)?(w(),_("nav",Dd,[i("div",Vd,[i("div",Hd,[i("div",Fd,[i("img",{src:Mu,alt:"PM2Me",class:"w-8 h-8 rounded-lg shadow-lg shadow-blue-500/30 cursor-pointer",onClick:l[0]||(l[0]=c=>r.$router.push("/"))}),i("span",{class:"text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-400 cursor-pointer",onClick:l[1]||(l[1]=c=>r.$router.push("/"))},"PM2Me")]),i("div",Ud,[i("button",{onClick:l[2]||(l[2]=c=>r.$router.push("/")),class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[6]||(l[6]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})],-1),i("span",null,"Home",-1)])],2),i("button",{onClick:[l[3]||(l[3]=c=>r.$router.push("/settings")),l[4]||(l[4]=Bn(c=>r.$router.push("/nginx"),["prevent"]))],class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/nginx"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[7]||(l[7]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})],-1),i("span",null,"Nginx",-1)])],2),i("button",{onClick:l[5]||(l[5]=c=>r.$router.push("/settings")),class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/settings"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[8]||(l[8]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),i("span",null,"Settings",-1)])],2),l[10]||(l[10]=i("div",{class:"w-px h-4 bg-slate-800 mx-1 hidden sm:block"},null,-1)),i("button",{onClick:o,class:"flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium text-slate-400 hover:text-red-400 hover:bg-red-400/10 transition-all duration-200"},[...l[9]||(l[9]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),i("span",{class:"hidden sm:inline"},"Logout",-1)])])])])])])):J("",!0),i("main",null,[Te(a)])])}}},Wd={class:"min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"},qd={class:"max-w-md w-full space-y-8 bg-slate-800 p-10 rounded-2xl shadow-2xl border border-slate-700/50 backdrop-blur-sm relative overflow-hidden"},Kd={class:"rounded-md shadow-sm -space-y-px"},Gd={key:0,class:"text-red-400 text-sm text-center bg-red-400/10 py-2 rounded-lg border border-red-400/20"},Jd=["disabled"],Yd={key:0,class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24"},Xd={key:1,class:"absolute left-0 inset-y-0 flex items-center pl-3"},Qd={__name:"Login",setup(e){const t=qo(),s=F(""),n=F(""),o=F(!1);rs(async()=>{try{(await(await fetch("/api/setup/status")).json()).needsSetup&&(window.location.href="/setup")}catch{}});const r=async()=>{o.value=!0,n.value="";try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:s.value})}),a=await l.json();l.ok&&a.token?(localStorage.setItem("pm2me_token",a.token),t.push("/")):n.value=a.error||"Login failed"}catch{n.value="Failed to connect to server"}finally{o.value=!1}};return(l,a)=>(w(),_("div",Wd,[i("div",qd,[a[5]||(a[5]=tt('<div class="absolute -top-10 -right-10 w-40 h-40 bg-blue-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="absolute -bottom-10 -left-10 w-40 h-40 bg-indigo-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="relative z-10 text-center"><div class="mx-auto w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white text-3xl font-bold shadow-lg shadow-blue-500/30 mb-6"> P </div><h2 class="mt-2 text-3xl font-extrabold text-white tracking-tight">PM2Me</h2><p class="mt-2 text-sm text-slate-400">Sign in to manage your deployments</p></div>',3)),i("form",{class:"relative z-10 mt-8 space-y-6",onSubmit:Bn(r,["prevent"])},[i("div",Kd,[i("div",null,[a[1]||(a[1]=i("label",{for:"password",class:"sr-only"},"Password",-1)),ke(i("input",{id:"password","onUpdate:modelValue":a[0]||(a[0]=c=>s.value=c),name:"password",type:"password",required:"",class:"appearance-none rounded-lg relative block w-full px-4 py-3 border border-slate-600 bg-slate-900/50 placeholder-slate-400 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 sm:text-sm",placeholder:"Admin Password (or set initial)"},null,512),[[Be,s.value]])])]),n.value?(w(),_("div",Gd,j(n.value),1)):J("",!0),i("div",null,[i("button",{type:"submit",disabled:o.value,class:"group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-lg text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 focus:ring-offset-slate-900 shadow-lg shadow-blue-500/30 transition-all duration-200 disabled:opacity-70 disabled:cursor-not-allowed"},[o.value?(w(),_("svg",Yd,[...a[2]||(a[2]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("span",Xd,[...a[3]||(a[3]=[i("svg",{class:"h-5 w-5 text-indigo-300 group-hover:text-indigo-200 transition-colors",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[i("path",{"fill-rule":"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z","clip-rule":"evenodd"})],-1)])])),a[4]||(a[4]=K(" Sign in ",-1))],8,Jd)])],32)])]))}},wt=Object.create(null);wt.open="0";wt.close="1";wt.ping="2";wt.pong="3";wt.message="4";wt.upgrade="5";wt.noop="6";const ln=Object.create(null);Object.keys(wt).forEach(e=>{ln[wt[e]]=e});const _o={type:"error",data:"parser error"},Ll=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jl=typeof ArrayBuffer=="function",Dl=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Go=({type:e,data:t},s,n)=>Ll&&t instanceof Blob?s?n(t):ii(t,n):jl&&(t instanceof ArrayBuffer||Dl(t))?s?n(t):ii(new Blob([t]),n):n(wt[e]+(t||"")),ii=(e,t)=>{const s=new FileReader;return s.onload=function(){const n=s.result.split(",")[1];t("b"+(n||""))},s.readAsDataURL(e)};function li(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zn;function Zd(e,t){if(Ll&&e.data instanceof Blob)return e.data.arrayBuffer().then(li).then(t);if(jl&&(e.data instanceof ArrayBuffer||Dl(e.data)))return t(li(e.data));Go(e,!1,s=>{Zn||(Zn=new TextEncoder),t(Zn.encode(s))})}const ai="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",As=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ai.length;e++)As[ai.charCodeAt(e)]=e;const ef=e=>{let t=e.length*.75,s=e.length,n,o=0,r,l,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const p=new ArrayBuffer(t),u=new Uint8Array(p);for(n=0;n<s;n+=4)r=As[e.charCodeAt(n)],l=As[e.charCodeAt(n+1)],a=As[e.charCodeAt(n+2)],c=As[e.charCodeAt(n+3)],u[o++]=r<<2|l>>4,u[o++]=(l&15)<<4|a>>2,u[o++]=(a&3)<<6|c&63;return p},tf=typeof ArrayBuffer=="function",Jo=(e,t)=>{if(typeof e!="string")return{type:"message",data:Vl(e,t)};const s=e.charAt(0);return s==="b"?{type:"message",data:sf(e.substring(1),t)}:ln[s]?e.length>1?{type:ln[s],data:e.substring(1)}:{type:ln[s]}:_o},sf=(e,t)=>{if(tf){const s=ef(e);return Vl(s,t)}else return{base64:!0,data:e}},Vl=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Hl="",nf=(e,t)=>{const s=e.length,n=new Array(s);let o=0;e.forEach((r,l)=>{Go(r,!1,a=>{n[l]=a,++o===s&&t(n.join(Hl))})})},of=(e,t)=>{const s=e.split(Hl),n=[];for(let o=0;o<s.length;o++){const r=Jo(s[o],t);if(n.push(r),r.type==="error")break}return n};function rf(){return new TransformStream({transform(e,t){Zd(e,s=>{const n=s.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const r=new DataView(o.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{o=new Uint8Array(9);const r=new DataView(o.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(s)})}})}let eo;function Qs(e){return e.reduce((t,s)=>t+s.length,0)}function Zs(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let n=0;for(let o=0;o<t;o++)s[o]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),s}function lf(e,t){eo||(eo=new TextDecoder);const s=[];let n=0,o=-1,r=!1;return new TransformStream({transform(l,a){for(s.push(l);;){if(n===0){if(Qs(s)<1)break;const c=Zs(s,1);r=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Qs(s)<2)break;const c=Zs(s,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Qs(s)<8)break;const c=Zs(s,8),p=new DataView(c.buffer,c.byteOffset,c.length),u=p.getUint32(0);if(u>Math.pow(2,21)-1){a.enqueue(_o);break}o=u*Math.pow(2,32)+p.getUint32(4),n=3}else{if(Qs(s)<o)break;const c=Zs(s,o);a.enqueue(Jo(r?c:eo.decode(c),t)),n=0}if(o===0||o>e){a.enqueue(_o);break}}}})}const Fl=4;function Me(e){if(e)return af(e)}function af(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+e];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<s.length;o++)if(n=s[o],n===t||n.fn===t){s.splice(o,1);break}return s.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(s){s=s.slice(0);for(var n=0,o=s.length;n<o;++n)s[n].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const In=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,s)=>s(t,0),et=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cf="arraybuffer";function Ul(e,...t){return t.reduce((s,n)=>(e.hasOwnProperty(n)&&(s[n]=e[n]),s),{})}const uf=et.setTimeout,df=et.clearTimeout;function Ln(e,t){t.useNativeTimers?(e.setTimeoutFn=uf.bind(et),e.clearTimeoutFn=df.bind(et)):(e.setTimeoutFn=et.setTimeout.bind(et),e.clearTimeoutFn=et.clearTimeout.bind(et))}const ff=1.33;function pf(e){return typeof e=="string"?hf(e):Math.ceil((e.byteLength||e.size)*ff)}function hf(e){let t=0,s=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(n++,s+=4);return s}function zl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mf(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}function gf(e){let t={},s=e.split("&");for(let n=0,o=s.length;n<o;n++){let r=s[n].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}class vf extends Error{constructor(t,s,n){super(t),this.description=s,this.context=n,this.type="TransportError"}}class Yo extends Me{constructor(t){super(),this.writable=!1,Ln(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,n){return super.emitReserved("error",new vf(t,s,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=Jo(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,s={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const s=mf(t);return s.length?"?"+s:""}}class bf extends Yo{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const s=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||s()})),this.writable||(n++,this.once("drain",function(){--n||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};of(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nf(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=zl()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let Wl=!1;try{Wl=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xf=Wl;function yf(){}class wf extends bf{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let n=location.port;n||(n=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,s){const n=this.request({method:"POST",data:t});n.on("success",s),n.on("error",(o,r)=>{this.onError("xhr post error",o,r)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,n)=>{this.onError("xhr poll error",s,n)}),this.pollXhr=t}}class xt extends Me{constructor(t,s,n){super(),this.createRequest=t,Ln(this,n),this._opts=n,this._method=n.method||"GET",this._uri=s,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const s=Ul(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(s);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=xt.requestsCount++,xt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=yf,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xt.requestsCount=0;xt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ci);else if(typeof addEventListener=="function"){const e="onpagehide"in et?"pagehide":"unload";addEventListener(e,ci,!1)}}function ci(){for(let e in xt.requests)xt.requests.hasOwnProperty(e)&&xt.requests[e].abort()}const _f=(function(){const e=ql({xdomain:!1});return e&&e.responseType!==null})();class kf extends wf{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=_f&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xt(ql,this.uri(),t)}}function ql(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||xf))return new XMLHttpRequest}catch{}if(!t)try{return new et[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Kl=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Cf extends Yo{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,n=Kl?{}:Ul(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;Go(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}o&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=zl()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const to=et.WebSocket||et.MozWebSocket;class Sf extends Cf{createSocket(t,s,n){return Kl?new to(t,s,n):s?new to(t,s):new to(t)}doWrite(t,s){this.ws.send(s)}}class Ef extends Yo{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=lf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(s).getReader(),o=rf();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const r=()=>{n.read().then(({done:a,value:c})=>{a||(this.onPacket(c),r())}).catch(a=>{})};r();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;this._writer.write(n).then(()=>{o&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const $f={websocket:Sf,webtransport:Ef,polling:kf},Af=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Tf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ko(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),n=e.indexOf("]");s!=-1&&n!=-1&&(e=e.substring(0,s)+e.substring(s,n).replace(/:/g,";")+e.substring(n,e.length));let o=Af.exec(e||""),r={},l=14;for(;l--;)r[Tf[l]]=o[l]||"";return s!=-1&&n!=-1&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Mf(r,r.path),r.queryKey=Rf(r,r.query),r}function Mf(e,t){const s=/\/{2,9}/g,n=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Rf(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,r){o&&(s[o]=r)}),s}const Co=typeof addEventListener=="function"&&typeof removeEventListener=="function",an=[];Co&&addEventListener("offline",()=>{an.forEach(e=>e())},!1);class zt extends Me{constructor(t,s){if(super(),this.binaryType=cf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const n=ko(t);s.hostname=n.host,s.secure=n.protocol==="https"||n.protocol==="wss",s.port=n.port,n.query&&(s.query=n.query)}else s.host&&(s.hostname=ko(s.host).host);Ln(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(n=>{const o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gf(this.opts.query)),Co&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},an.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Fl,s.transport=t,this.id&&(s.sid=this.id);const n=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&zt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",zt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(s+=pf(o)),n>0&&s>this._maxPayload)return this.writeBuffer.slice(0,n);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,In(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,n){return this._sendPacket("message",t,s,n),this}send(t,s,n){return this._sendPacket("message",t,s,n),this}_sendPacket(t,s,n,o){if(typeof s=="function"&&(o=s,s=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:t,data:s,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},n=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(zt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Co&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=an.indexOf(this._offlineEventListener);n!==-1&&an.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}zt.protocol=Fl;class Of extends zt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let s=this.createTransport(t),n=!1;zt.priorWebsocketSuccess=!1;const o=()=>{n||(s.send([{type:"ping",data:"probe"}]),s.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;zt.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=s.name,this.emitReserved("upgradeError",b)}}))};function r(){n||(n=!0,u(),s.close(),s=null)}const l=h=>{const b=new Error("probe error: "+h);b.transport=s.name,r(),this.emitReserved("upgradeError",b)};function a(){l("transport closed")}function c(){l("socket closed")}function p(h){s&&h.name!==s.name&&r()}const u=()=>{s.removeListener("open",o),s.removeListener("error",l),s.removeListener("close",a),this.off("close",c),this.off("upgrading",p)};s.once("open",o),s.once("error",l),s.once("close",a),this.once("close",c),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&s.push(t[n]);return s}}let Bf=class extends Of{constructor(t,s={}){const n=typeof t=="object"?t:s;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>$f[o]).filter(o=>!!o)),super(t,n)}};function Pf(e,t="",s){let n=e;s=s||typeof location<"u"&&location,e==null&&(e=s.protocol+"//"+s.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=s.protocol+e:e=s.host+e),/^(https?|wss?):\/\//.test(e)||(typeof s<"u"?e=s.protocol+"//"+e:e="https://"+e),n=ko(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+t,n.href=n.protocol+"://"+r+(s&&s.port===n.port?"":":"+n.port),n}const Nf=typeof ArrayBuffer=="function",If=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Gl=Object.prototype.toString,Lf=typeof Blob=="function"||typeof Blob<"u"&&Gl.call(Blob)==="[object BlobConstructor]",jf=typeof File=="function"||typeof File<"u"&&Gl.call(File)==="[object FileConstructor]";function Xo(e){return Nf&&(e instanceof ArrayBuffer||If(e))||Lf&&e instanceof Blob||jf&&e instanceof File}function cn(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let s=0,n=e.length;s<n;s++)if(cn(e[s]))return!0;return!1}if(Xo(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return cn(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&cn(e[s]))return!0;return!1}function Df(e){const t=[],s=e.data,n=e;return n.data=So(s,t),n.attachments=t.length,{packet:n,buffers:t}}function So(e,t){if(!e)return e;if(Xo(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}else if(Array.isArray(e)){const s=new Array(e.length);for(let n=0;n<e.length;n++)s[n]=So(e[n],t);return s}else if(typeof e=="object"&&!(e instanceof Date)){const s={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=So(e[n],t));return s}return e}function Vf(e,t){return e.data=Eo(e.data,t),delete e.attachments,e}function Eo(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=Eo(e[s],t);else if(typeof e=="object")for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=Eo(e[s],t));return e}const Hf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ce;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ce||(ce={}));class Ff{constructor(t){this.replacer=t}encode(t){return(t.type===ce.EVENT||t.type===ce.ACK)&&cn(t)?this.encodeAsBinary({type:t.type===ce.EVENT?ce.BINARY_EVENT:ce.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let s=""+t.type;return(t.type===ce.BINARY_EVENT||t.type===ce.BINARY_ACK)&&(s+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(s+=t.nsp+","),t.id!=null&&(s+=t.id),t.data!=null&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=Df(t),n=this.encodeAsString(s.packet),o=s.buffers;return o.unshift(n),o}}class Qo extends Me{constructor(t){super(),this.reviver=t}add(t){let s;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(t);const n=s.type===ce.BINARY_EVENT;n||s.type===ce.BINARY_ACK?(s.type=n?ce.EVENT:ce.ACK,this.reconstructor=new Uf(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Xo(t)||t.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let s=0;const n={type:Number(t.charAt(0))};if(ce[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===ce.BINARY_EVENT||n.type===ce.BINARY_ACK){const r=s+1;for(;t.charAt(++s)!=="-"&&s!=t.length;);const l=t.substring(r,s);if(l!=Number(l)||t.charAt(s)!=="-")throw new Error("Illegal attachments");n.attachments=Number(l)}if(t.charAt(s+1)==="/"){const r=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););n.nsp=t.substring(r,s)}else n.nsp="/";const o=t.charAt(s+1);if(o!==""&&Number(o)==o){const r=s+1;for(;++s;){const l=t.charAt(s);if(l==null||Number(l)!=l){--s;break}if(s===t.length)break}n.id=Number(t.substring(r,s+1))}if(t.charAt(++s)){const r=this.tryParse(t.substr(s));if(Qo.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case ce.CONNECT:return ui(s);case ce.DISCONNECT:return s===void 0;case ce.CONNECT_ERROR:return typeof s=="string"||ui(s);case ce.EVENT:case ce.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Hf.indexOf(s[0])===-1);case ce.ACK:case ce.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uf{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Vf(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function ui(e){return Object.prototype.toString.call(e)==="[object Object]"}const zf=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qo,Encoder:Ff,get PacketType(){return ce}},Symbol.toStringTag,{value:"Module"}));function rt(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const Wf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Jl extends Me{constructor(t,s,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[rt(t,"open",this.onopen.bind(this)),rt(t,"packet",this.onpacket.bind(this)),rt(t,"error",this.onerror.bind(this)),rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var n,o,r;if(Wf.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const l={type:ce.EVENT,data:s};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const u=this.ids++,h=s.pop();this._registerAckCallback(u,h),l.id=u}const a=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,s){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=s;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);s.call(this,new Error("operation has timed out"))},o),l=(...a)=>{this.io.clearTimeoutFn(r),s.apply(this,a)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...s){return new Promise((n,o)=>{const r=(l,a)=>l?o(l):n(a);r.withError=!0,s.push(r),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...r)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(o)):(this._queue.shift(),s&&s(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ce.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ce.EVENT:case ce.BINARY_EVENT:this.onevent(t);break;case ce.ACK:case ce.BINARY_ACK:this.onack(t);break;case ce.DISCONNECT:this.ondisconnect();break;case ce.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const n of s)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let n=!1;return function(...o){n||(n=!0,s.packet({type:ce.ACK,id:t,data:o}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const s=this._anyOutgoingListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const n of s)n.apply(this,t.data)}}}function xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-s:e+s}return Math.min(e,this.max)|0};xs.prototype.reset=function(){this.attempts=0};xs.prototype.setMin=function(e){this.ms=e};xs.prototype.setMax=function(e){this.max=e};xs.prototype.setJitter=function(e){this.jitter=e};class $o extends Me{constructor(t,s){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ln(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((n=s.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const o=s.parser||zf;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bf(this.uri,this.opts);const s=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=rt(s,"open",function(){n.onopen(),t&&t()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},l=rt(s,"error",r);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{o(),r(new Error("timeout")),s.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(rt(t,"ping",this.onping.bind(this)),rt(t,"data",this.ondata.bind(this)),rt(t,"error",this.onerror.bind(this)),rt(t,"close",this.onclose.bind(this)),rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){In(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Jl(this,t,s),this.nsps[t]=n),n}_destroy(t){const s=Object.keys(this.nsps);for(const n of s)if(this.nsps[n].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let n=0;n<s.length;n++)this.engine.write(s[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},s);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Es={};function os(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const s=Pf(e,t.path||"/socket.io"),n=s.source,o=s.id,r=s.path,l=Es[o]&&r in Es[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let c;return a?c=new $o(n,t):(Es[o]||(Es[o]=new $o(n,t)),c=Es[o]),s.query&&!t.query&&(t.query=s.queryKey),c.socket(s.path,t)}Object.assign(os,{Manager:$o,Socket:Jl,io:os,connect:os});const Zo=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},qf={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 bg-slate-900/80 backdrop-blur-sm"},Kf={class:"bg-slate-800 rounded-2xl shadow-xl border border-slate-700 w-full max-w-2xl flex flex-col max-h-[90vh]"},Gf={class:"flex items-center justify-between p-6 border-b border-slate-700"},Jf={class:"text-xl font-bold text-white"},Yf={class:"overflow-y-auto p-6 flex-1 custom-scrollbar"},Xf={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Qf={class:"md:col-span-2"},Zf={class:"flex space-x-2"},e0=["label"],t0=["value"],s0=["disabled"],n0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},o0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},r0={key:0,class:"mt-2 text-xs text-yellow-500"},i0={class:"md:col-span-2"},l0={class:"flex space-x-2"},a0={key:0,value:"",disabled:""},c0=["value"],u0=["disabled"],d0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},f0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},p0={class:"md:col-span-2"},h0={class:"md:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-4"},m0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-blue-500/30 transition-colors"},g0={class:"relative inline-flex items-center cursor-pointer"},v0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-emerald-500/30 transition-colors"},b0={class:"relative inline-flex items-center cursor-pointer"},x0={class:"md:col-span-2"},y0={class:"flex items-center space-x-6 mb-4"},w0={class:"inline-flex items-center cursor-pointer"},_0={class:"inline-flex items-center cursor-pointer"},k0={class:"inline-flex items-center cursor-pointer"},C0={key:0,class:"pl-2 border-l-2 border-slate-600"},S0={class:"flex items-center"},E0={key:1,class:"pl-2 border-l-2 border-slate-600 mt-4"},$0={class:"flex items-center"},A0={class:"md:col-span-2"},T0={class:"flex items-center justify-between mb-2"},M0={class:"flex gap-2"},R0={class:"space-y-3"},O0=["onUpdate:modelValue","title"],B0=["onUpdate:modelValue"],P0=["onClick"],N0={key:0,class:"text-xs text-yellow-500 flex items-center"},I0={key:1,class:"text-sm text-slate-500 italic py-1 px-2 border border-dashed border-slate-700 rounded text-center"},L0={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-between items-center rounded-b-2xl"},j0={class:"flex space-x-4"},D0=["disabled"],V0={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},H0={__name:"DeployModal",props:{isOpen:Boolean,appToEdit:Object},emits:["close","deploy","delete"],setup(e,{emit:t}){const s=e,n=t,o=F({name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0}),r=F(""),l=F([]),a=F(!1),c=F("npm"),p=F([]),u=F(!1),h=F([]),b=F(!1),y=F(!1),A=Ne(()=>{const X=p.value.map(C=>C.name.trim()).filter(C=>C!=="");return X.filter((C,B)=>X.indexOf(C)!==B)});Ut(()=>s.isOpen,async X=>{if(X)if(l.value.length===0&&await $(),s.appToEdit){y.value=!0,o.value.name=s.appToEdit.name,o.value.branch=s.appToEdit.branch,o.value.buildScript=s.appToEdit.buildScript||"",o.value.autoSync=!!s.appToEdit.autoSync,o.value.zeroDowntime=s.appToEdit.zeroDowntime!==!1,s.appToEdit.ecosystemFile?c.value="ecosystem":s.appToEdit.pm2Script&&s.appToEdit.pm2Script!=="npm"?(c.value="script",o.value.customScript=s.appToEdit.pm2Script):(c.value="npm",o.value.npmScript=s.appToEdit.pm2Args?s.appToEdit.pm2Args.replace("run ",""):"start");const C=Object.keys(s.appToEdit.env||{});p.value=C.map(Q=>({name:Q,value:s.appToEdit.env[Q]}));let B=null;for(const Q of l.value){const I=Q.repositories.find(W=>W.cloneUrl===s.appToEdit.repoUrl);if(I){B={url:I.cloneUrl,token:Q.token,name:I.name};break}}B&&(r.value=B,await te(),o.value.branch=s.appToEdit.branch)}else y.value=!1,o.value={name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0},r.value="",c.value="npm",p.value=[],h.value=[]}),Ut(r,X=>{X&&X.name&&!y.value&&(o.value.name=X.name),h.value=[],X&&X.url&&te()});const $=async()=>{a.value=!0;try{const X=await fetch("/api/git/repositories",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});l.value=await X.json()}catch{console.error("Failed to load repositories")}finally{a.value=!1}},L=()=>{p.value.push({name:"",value:""})},U=X=>{p.value.splice(X,1)},N=F(null),z=()=>{N.value&&N.value.click()},D=X=>{const C=X.target.files[0];if(!C)return;const B=new FileReader;B.onload=Q=>{const W=Q.target.result.split(`
|
|
2
|
-
`);let k=0;const G=[...
|
|
3
|
-
npm run build`},null,512),[[Be,o.value.buildScript]])]),i("div",h0,[i("div",m0,[C[25]||(C[25]=tt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400 group-hover:bg-blue-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Auto Sync</span><span class="block text-[10px] text-slate-500" data-v-20522177>Auto pull & deploy on push</span></div></div>',1)),i("label",g0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":C[6]||(C[6]=B=>o.value.autoSync=B),class:"sr-only peer"},null,512),[[go,o.value.autoSync]]),C[24]||(C[24]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-blue-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"},null,-1))])]),i("div",v0,[C[27]||(C[27]=tt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400 group-hover:bg-emerald-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Zero Downtime</span><span class="block text-[10px] text-slate-500" data-v-20522177>Use PM2 reload</span></div></div>',1)),i("label",b0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":C[7]||(C[7]=B=>o.value.zeroDowntime=B),class:"sr-only peer"},null,512),[[go,o.value.zeroDowntime]]),C[26]||(C[26]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-emerald-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"},null,-1))])])]),i("div",x0,[C[34]||(C[34]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"PM2 Execution Mode",-1)),i("div",y0,[i("label",w0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[8]||(C[8]=B=>c.value=B),value:"npm",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[28]||(C[28]=i("span",{class:"ml-2 text-slate-300"},"Run NPM Script",-1))]),i("label",_0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[9]||(C[9]=B=>c.value=B),value:"ecosystem",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[29]||(C[29]=i("span",{class:"ml-2 text-slate-300"},"Ecosystem File",-1))]),i("label",k0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[10]||(C[10]=B=>c.value=B),value:"script",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[30]||(C[30]=i("span",{class:"ml-2 text-slate-300"},"Run Custom Script",-1))])]),c.value==="npm"?(w(),_("div",C0,[C[32]||(C[32]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"NPM Script Name (e.g. start, dev, prod)",-1)),i("div",S0,[C[31]||(C[31]=i("span",{class:"text-slate-500 mr-2 font-mono"},"npm run",-1)),ke(i("input",{"onUpdate:modelValue":C[11]||(C[11]=B=>o.value.npmScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"start"},null,512),[[Be,o.value.npmScript]])])])):J("",!0),c.value==="script"?(w(),_("div",E0,[C[33]||(C[33]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"Script Path (e.g. app.js, dist/main.js)",-1)),i("div",$0,[ke(i("input",{"onUpdate:modelValue":C[12]||(C[12]=B=>o.value.customScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"app.js"},null,512),[[Be,o.value.customScript]])])])):J("",!0)]),i("div",A0,[i("div",T0,[C[37]||(C[37]=i("label",{class:"block text-sm font-medium text-slate-300"},"Environment Variables",-1)),i("div",M0,[i("button",{type:"button",onClick:z,class:"text-xs px-2 py-1 bg-slate-700 text-slate-300 hover:bg-slate-600 rounded border border-slate-600 transition-colors flex items-center"},[...C[35]||(C[35]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),K(" Import .env ",-1)])]),i("input",{type:"file",ref_key:"envFileInput",ref:N,onChange:D,accept:".env, *.*",class:"hidden"},null,544),i("button",{type:"button",onClick:L,class:"text-xs px-2 py-1 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 rounded border border-blue-500/20 transition-colors flex items-center"},[...C[36]||(C[36]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),K(" Add Variable ",-1)])])])]),i("div",R0,[(w(!0),_(ve,null,ze(p.value,(B,Q)=>(w(),_("div",{key:Q,class:"flex items-center gap-2"},[ke(i("input",{"onUpdate:modelValue":I=>B.name=I,type:"text",class:ne(["w-1/3 bg-slate-900 border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",A.value.includes(B.name)&&B.name.trim()!==""?"border-yellow-500 text-yellow-400 focus:ring-yellow-500":"border-slate-600 text-white focus:ring-blue-500"]),placeholder:"KEY",title:A.value.includes(B.name)&&B.name.trim()!==""?"Duplicate key":""},null,10,O0),[[Be,B.name]]),C[39]||(C[39]=i("span",{class:"text-slate-500"},"=",-1)),ke(i("input",{"onUpdate:modelValue":I=>B.value=I,type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"VALUE"},null,8,B0),[[Be,B.value]]),i("button",{type:"button",onClick:I=>U(Q),class:"p-1.5 text-red-400 hover:bg-red-500/10 hover:text-red-300 rounded transition-colors",title:"Remove"},[...C[38]||(C[38]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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,P0)]))),128)),A.value.length>0?(w(),_("div",N0,[...C[40]||(C[40]=[i("svg",{class:"w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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"})],-1),K(" Warning: Duplicate environment variable keys detected. ",-1)])])):J("",!0),p.value.length===0?(w(),_("div",I0," No environment variables defined. ")):J("",!0)])])])],32)]),i("div",L0,[i("div",null,[e.appToEdit?(w(),_("button",{key:0,type:"button",onClick:re,class:"px-4 py-2.5 text-sm font-medium text-red-400 hover:text-white bg-red-500/10 hover:bg-red-500 rounded-lg transition-colors border border-red-500/20"}," Delete Application ")):J("",!0)]),i("div",j0,[i("button",{type:"button",onClick:C[13]||(C[13]=B=>X.$emit("close")),class:"px-5 py-2.5 text-sm font-medium text-slate-300 hover:text-white bg-slate-700 hover:bg-slate-600 rounded-lg transition-colors border border-slate-600"},"Cancel"),i("button",{onClick:ae,disabled:b.value,class:"px-5 py-2.5 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 rounded-lg transition-all shadow-lg shadow-blue-500/30 disabled:opacity-70 flex items-center"},[b.value?(w(),_("svg",V0,[...C[41]||(C[41]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):J("",!0),K(" "+j(e.appToEdit?"Update App":"Deploy App"),1)],8,D0)])])])])):J("",!0)}},F0=Zo(H0,[["__scopeId","data-v-20522177"]]),U0={class:"flex items-center space-x-3 overflow-hidden"},z0={class:"text-[10px] font-mono text-slate-400 font-bold tracking-widest truncate uppercase"},W0={class:"flex items-center space-x-1 ml-4"},q0={key:0,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},K0={key:1,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},G0={class:"text-slate-600 opacity-50 select-none mr-2"},J0={__name:"LogViewer",props:{isOpen:Boolean,appId:String,appName:String},emits:["close"],setup(e,{emit:t}){const s=e,n=F([]),o=F(null),r=F(!1),l=F(!1),a=F({x:window.innerWidth-850,y:window.innerHeight-550});let c=null;const p=u=>{l.value=!0;const h=u.clientX-a.value.x,b=u.clientY-a.value.y,y=$=>{let L=$.clientX-h,U=$.clientY-b;const N=20,z=r.value?300:800;r.value,L=Math.max(-z+N,Math.min(L,window.innerWidth-N)),U=Math.max(0,Math.min(U,window.innerHeight-N)),a.value.x=L,a.value.y=U},A=()=>{l.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",A)};return Ut(()=>s.isOpen,u=>{u&&s.appId?(n.value=[],(a.value.x<0||a.value.x>window.innerWidth-100)&&(a.value.x=window.innerWidth-(r.value?350:850)),(a.value.y<0||a.value.y>window.innerHeight-100)&&(a.value.y=window.innerHeight-(r.value?100:550)),fetch(`/api/deploy/${s.appId}/logs`,{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}).then(h=>h.text()).then(h=>{h&&(n.value=h.split(`
|
|
4
|
-
`).filter(b=>b.trim()),Mt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})),c=os(),c.on(`deploy-log-${s.appId}`,b=>{let y=b;if(typeof b!="string")try{y=new TextDecoder().decode(b)}catch{y=String(b)}n.value.push(y.trim()),Mt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})})}).catch(h=>console.error("Failed to fetch deploy logs",h))):c&&(c.disconnect(),c=null)}),is(()=>{c&&c.disconnect()}),(u,h)=>e.isOpen?(w(),_("div",{key:0,class:ne(["fixed z-[60] flex flex-col shadow-2xl border border-slate-700 overflow-hidden ring-1 ring-slate-800",{"transition-all duration-300":!l.value}]),style:Rt({left:a.value.x+"px",top:a.value.y+"px",width:r.value?"300px":"800px",height:r.value?"44px":"500px",maxHeight:"90vh",maxWidth:"95vw","will-change":"left, top"})},[i("div",{class:"flex items-center justify-between p-3 bg-slate-800/90 backdrop-blur-md border-b border-slate-700 cursor-move select-none",onMousedown:p},[i("div",U0,[h[2]||(h[2]=i("div",{class:"flex space-x-1.5 flex-shrink-0"},[i("div",{class:"w-3 h-3 rounded-full bg-red-500 shadow-sm shadow-red-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-yellow-500 shadow-sm shadow-yellow-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-green-500 shadow-sm shadow-green-900/50"})],-1)),i("span",z0," console : "+j(e.appName),1)]),i("div",W0,[i("button",{onClick:h[0]||(h[0]=b=>r.value=!r.value),class:"p-1 hover:bg-slate-700 rounded transition-colors text-slate-400 hover:text-white",title:"Minimize/Expand"},[r.value?(w(),_("svg",K0,[...h[4]||(h[4]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)])])):(w(),_("svg",q0,[...h[3]||(h[3]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 12H4"},null,-1)])]))]),i("button",{onClick:h[1]||(h[1]=b=>u.$emit("close")),class:"p-1 hover:bg-red-500/20 rounded transition-colors text-slate-400 hover:text-red-400",title:"Close"},[...h[5]||(h[5]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])],32),ke(i("div",{class:"flex-1 overflow-y-auto p-4 font-mono text-sm leading-relaxed custom-scrollbar bg-black",ref_key:"logContainer",ref:o},[(w(!0),_(ve,null,ze(n.value,(b,y)=>(w(),_("div",{key:y,class:ne([{"text-emerald-400 font-bold":b.includes("successfully")||b.includes("Done")||b.includes("Completed"),"text-red-400":b.toLowerCase().includes("err")||b.toLowerCase().includes("fail"),"text-indigo-400 font-bold tracking-tight":b.includes("[SYSTEM]")||b.includes("[pm2me]"),"text-blue-400":b.includes("Starting")||b.includes("Cloning")||b.includes("Synchronizing"),"text-slate-300":!b.toLowerCase().includes("err")&&!b.includes("successfully")&&!b.includes("[SYSTEM]")&&!b.includes("[pm2me]")&&!b.includes("Starting")},"break-words whitespace-pre-wrap py-0.5 border-b border-slate-900/50 last:border-0"])},[i("span",G0,"["+j(new Date().toLocaleTimeString())+"]",1),K(j(b),1)],2))),128))],512),[[ru,!r.value]])],6)):J("",!0)}},Y0=Zo(J0,[["__scopeId","data-v-550ff13e"]]),X0={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-8"},Q0={class:"bg-slate-800/80 backdrop-blur-sm p-4 rounded-2xl border border-slate-700 shadow-lg group hover:border-purple-500/50 transition-all duration-300"},Z0={class:"flex flex-col space-y-1"},ep={class:"flex items-center justify-between"},tp={class:"text-sm font-bold text-white font-mono"},sp={class:"flex items-center justify-between"},np={class:"text-sm font-bold text-white font-mono"},op={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-blue-500/50 transition-all duration-300"},rp={class:"flex items-end justify-between"},ip={class:"text-2xl font-bold text-white tracking-tight"},lp={class:"text-xs text-slate-500 mt-1 truncate max-w-[150px]"},ap={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},cp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-emerald-500/50 transition-all duration-300"},up={class:"flex items-end justify-between"},dp={class:"text-2xl font-bold text-white tracking-tight"},fp={class:"text-xs text-slate-500 mt-1"},pp={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},hp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-orange-500/50 transition-all duration-300"},mp={class:"flex items-end justify-between"},gp={class:"text-2xl font-bold text-white tracking-tight"},vp={class:"text-xs text-slate-500 mt-1"},bp={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},xp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-indigo-500/50 transition-all duration-300"},yp={class:"flex flex-col"},wp={class:"text-2xl font-bold text-white tracking-tight"},_p={class:"text-xs text-slate-500 mt-1"},kp={__name:"ServerStats",setup(e){const t=F({cpu:{usage:0,model:"Loading...",cores:0},memory:{total:0,free:0,used:0,percentage:0},disk:{total:0,free:0,used:0,percentage:0},network:{down:0,up:0},uptime:0,hostname:"..."});let s=null;const n=async()=>{try{const a=await fetch("/api/system/stats",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});a.ok&&(t.value=await a.json())}catch(a){console.error("Failed to fetch system stats",a)}},o=a=>{if(a===0)return"0 B/s";const c=1024,p=["B/s","KB/s","MB/s","GB/s"],u=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,u)).toFixed(1))+" "+p[u]},r=a=>{if(a===0)return"0 B";const c=1024,p=["B","KB","MB","GB","TB"],u=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,u)).toFixed(2))+" "+p[u]},l=a=>{const c=Math.floor(a/86400),p=Math.floor(a%(3600*24)/3600),u=Math.floor(a%3600/60);return c>0?`${c}d ${p}h ${u}m`:p>0?`${p}h ${u}m`:`${u}m`};return rs(()=>{n(),s=os(window.location.origin),s.on("system-stats",a=>{t.value=a}),s.on("connect_error",a=>{console.error("Socket connection error:",a)})}),is(()=>{s&&s.disconnect()}),(a,c)=>(w(),_("div",X0,[i("div",Q0,[c[2]||(c[2]=tt('<div class="flex items-center justify-between mb-2"><span class="text-slate-400 text-xs font-medium">Network</span><div class="p-1.5 bg-purple-500/10 rounded-lg text-purple-400"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg></div></div>',1)),i("div",Z0,[i("div",ep,[c[0]||(c[0]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"})]),K(" Down ")],-1)),i("div",tp,j(o(t.value.network.down)),1)]),i("div",sp,[c[1]||(c[1]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 10l7-7m0 0l7 7m-7-7v18"})]),K(" Up ")],-1)),i("div",np,j(o(t.value.network.up)),1)])])]),i("div",op,[c[3]||(c[3]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Processor</span><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div></div>',1)),i("div",rp,[i("div",null,[i("div",ip,j(t.value.cpu.usage.toFixed(1))+"%",1),i("div",lp,j(t.value.cpu.model),1)]),i("div",ap,[i("div",{class:"h-full bg-blue-500 rounded-full transition-all duration-500",style:Rt({width:t.value.cpu.usage+"%"})},null,4)])])]),i("div",cp,[c[4]||(c[4]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Memory (RAM)</span><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",up,[i("div",null,[i("div",dp,j(t.value.memory.percentage.toFixed(1))+"%",1),i("div",fp,j(r(t.value.memory.used))+" / "+j(r(t.value.memory.total)),1)]),i("div",pp,[i("div",{class:"h-full bg-emerald-500 rounded-full transition-all duration-500",style:Rt({width:t.value.memory.percentage+"%"})},null,4)])])]),i("div",hp,[c[5]||(c[5]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Storage (C:)</span><div class="p-2 bg-orange-500/10 rounded-lg text-orange-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"></path></svg></div></div>',1)),i("div",mp,[i("div",null,[i("div",gp,j(t.value.disk.percentage.toFixed(1))+"%",1),i("div",vp,j(r(t.value.disk.used))+" / "+j(r(t.value.disk.total)),1)]),i("div",bp,[i("div",{class:"h-full bg-orange-500 rounded-full transition-all duration-500",style:Rt({width:t.value.disk.percentage+"%"})},null,4)])])]),i("div",xp,[c[6]||(c[6]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">System Uptime</span><div class="p-2 bg-indigo-500/10 rounded-lg text-indigo-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",yp,[i("div",wp,j(l(t.value.uptime)),1),i("div",_p,j(t.value.hostname),1)])])]))}},Cp={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-8"},Sp={class:"flex items-center space-x-4"},Ep={key:0,class:"animate-spin w-5 h-5 text-slate-400",fill:"none",viewBox:"0 0 24 24"},$p={key:1,class:"w-5 h-5 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ap={key:2,class:"w-5 h-5 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Tp={key:3,class:"w-5 h-5 text-emerald-400",fill:"currentColor",viewBox:"0 0 20 20"},Mp={key:0,class:"text-sm font-semibold text-slate-400"},Rp={key:1,class:"text-sm font-semibold text-red-400"},Op={key:2,class:"text-sm font-semibold text-amber-400"},Bp={key:3,class:"text-sm font-semibold text-emerald-400"},Pp={key:4,class:"text-xs text-slate-500 mt-0.5"},Np={class:"text-slate-300 font-mono"},Ip={key:0},Lp={class:"text-amber-300 font-mono"},jp={key:5,class:"text-xs text-slate-500 mt-0.5"},Dp={class:"flex items-center space-x-2 flex-shrink-0"},Vp={key:0,disabled:"",class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-slate-700 text-slate-400 cursor-wait"},Hp=["disabled"],Fp={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-4 sm:space-y-0"},Up={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},zp={class:"flex items-start justify-between mb-4 gap-3"},Wp={class:"flex items-start space-x-3 min-w-0 flex-1"},qp={class:"min-w-0 flex-1"},Kp={class:"flex items-center gap-2 flex-wrap"},Gp=["title"],Jp={class:"flex items-center space-x-2 text-xs font-medium mt-1.5"},Yp={class:"relative flex h-2 w-2 flex-shrink-0"},Xp={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},Qp={key:0,class:"text-slate-500 whitespace-nowrap"},Zp={class:"flex items-center space-x-1.5 flex-shrink-0"},eh=["onClick"],th=["onClick"],sh=["onClick"],nh={class:"grid grid-cols-2 gap-4 mb-4 text-sm"},oh={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},rh={class:"font-semibold text-slate-200"},ih={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},lh={class:"font-semibold text-slate-200"},ah={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},ch={class:"font-semibold text-slate-200"},uh={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},dh={class:"font-semibold text-slate-200"},fh={key:0,class:"mb-4 text-[11px] bg-slate-900/50 border border-slate-700/50 p-2 rounded-lg text-slate-400 font-mono flex items-start",title:"Latest Commit"},ph={class:"truncate"},hh={key:1,class:"mb-4 text-[10px] bg-red-500/10 border border-red-500/20 p-2 rounded-lg text-red-400 font-mono flex flex-col gap-1 shadow-[0_0_10px_rgba(239,68,68,0.1)]"},mh={class:"flex items-start"},gh={class:"truncate opacity-80"},vh={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},bh={class:"flex items-center justify-between mb-4 px-1"},xh={key:0,class:"flex items-center gap-2"},yh={key:0,class:"relative flex h-2 w-2"},wh={class:"relative flex items-center justify-between px-4 pb-2"},_h={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},kh={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ch={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},Sh={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},Eh={class:"mt-auto grid grid-cols-3 gap-2"},$h=["onClick","disabled"],Ah={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Th={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},Mh=["onClick","disabled"],Rh={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Oh={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},Bh=["onClick","disabled"],Ph={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Nh={key:1,class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ih=["onClick","disabled"],Lh={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},jh={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Dh={key:2,class:"ml-1 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},Vh={key:0,class:"absolute inset-0 bg-blue-500/5 animate-pulse rounded-2xl blur-xl -z-10"},Hh={class:"flex items-start justify-between mb-4 gap-3"},Fh={class:"flex items-start space-x-3 min-w-0 flex-1"},Uh={key:0,class:"animate-spin h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},zh={key:1,class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Wh={class:"min-w-0 flex-1"},qh=["title"],Kh={class:"flex items-center space-x-2 text-xs font-medium mt-1.5 flex-wrap"},Gh={key:0,class:"text-[10px] bg-slate-700/50 border border-slate-600 px-1.5 py-0.5 rounded text-slate-300 font-mono inline-block max-w-full truncate align-bottom mt-1 sm:mt-0",title:"Deployed Commit"},Jh={class:"flex items-center space-x-1.5 flex-shrink-0"},Yh=["onClick"],Xh=["onClick"],Qh={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},Zh={class:"flex items-center justify-between mb-4 px-1"},em={class:"flex items-center gap-2"},tm={key:0,class:"relative flex h-2 w-2"},sm={class:"relative flex items-center justify-between px-4 pb-2"},nm={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},om={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},rm={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},im={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},lm=["onClick","disabled"],am={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},cm={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},um={key:2,class:"ml-2 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},dm={key:0,class:"flex flex-col items-center justify-center p-12 bg-slate-800/30 rounded-3xl border border-slate-700/50 border-dashed"},fm={key:1,class:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-900/90 backdrop-blur-md"},pm={class:"bg-slate-800 border border-slate-700 rounded-3xl shadow-2xl max-w-md w-full p-8 text-center transform transition-all scale-100"},hm={class:"text-slate-400 mb-8 leading-relaxed"},mm={class:"text-white font-semibold"},gm={class:"flex flex-col sm:flex-row gap-3"},vm={__name:"Dashboard",setup(e){const t=F([]),s=F([]),n=F(!1),o=F(!1),r=F(""),l=F(""),a=F(null),c=F({}),p=F({}),u=F({}),h=F({}),b=F(!1),y=F(null),A=F({loaded:!1,installed:!1,version:null,latestVersion:null,hasUpdate:!1,isChecking:!1,isActing:!1}),$=async()=>{A.value.isChecking=!0;try{const f=await(await fetch("/api/pm2/version-check",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();A.value={...A.value,...f,loaded:!0,isChecking:!1}}catch{A.value.isChecking=!1,A.value.loaded=!0}},L=async()=>{A.value.isActing=!0;try{await fetch("/api/pm2/install-update",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await $()}catch{}finally{A.value.isActing=!1}};let U=null,N;const z=Ne(()=>{const m=(t.value||[]).map(f=>f?.name).filter(Boolean);return(s.value||[]).filter(f=>f&&!m.includes(f.name))}),D=async()=>{try{const f={Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},[v,d]=await Promise.all([fetch("/api/pm2/list",{headers:f}),fetch("/api/apps",{headers:f})]);if(v.ok&&(t.value=await v.json()),d.ok){const g=await d.json();s.value=g.map(x=>{let S=x.pipelineState;return S==="online"&&(S="hidden"),x.pipelineState=u.value[x.id]||S||"hidden",x})}t.value=t.value.map(g=>{if(!g)return null;const x=s.value.find(S=>S&&S.name===g.name);return x?(g.id=x.id,g.commitHash=x.commitHash,g.commitMessage=x.commitMessage,g.rollbackOccurred=x.rollbackOccurred,g.failedCommitHash=x.failedCommitHash,g.failedCommitMessage=x.failedCommitMessage,g.pipelineState=u.value[x.id]||x.pipelineState||"hidden"):g.pipelineState="hidden",g}).filter(Boolean),s.value.forEach(g=>{te(g.id)})}catch(m){console.error("Fetch apps error:",m)}},te=async m=>{try{const f=localStorage.getItem("pm2me_token"),d=await(await fetch(`/api/apps/${m}/sync-status`,{headers:{Authorization:`Bearer ${f}`}})).json();d.behindCount!==void 0&&(p.value[m]=d.behindCount)}catch(f){console.error("Failed to fetch sync status",f)}},ae=m=>{const f=s.value.find(v=>v.name===m);return f?f.id:null},re=async(m,f)=>{const v=`${f}-${m}`;c.value[v]=!0;try{await fetch(`/api/pm2/${m}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:f})}),await D()}catch{alert(`Failed to ${m} app`)}finally{c.value[v]=!1}},X=async m=>{try{await fetch(`/api/apps/${m}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch(f){console.error("Failed to remove db app",f)}},C=async m=>{m&&B(m)},B=m=>{y.value=m,b.value=!0},Q=async()=>{const m=y.value;if(m){b.value=!1,y.value=null;try{await fetch("/api/pm2/delete",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:m.name})})}catch{console.error("Failed to delete PM2 process, proceeding to DB removal")}await X(m.id)}},I=async(m,f)=>{const v=`${f||m}-deploy`;c.value[v]=!0;try{await fetch(`/api/deploy/${m}`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch{alert("Failed to trigger deployment restart.")}finally{c.value[v]=!1}},W=m=>{const f=s.value.find(v=>v.name===m.name);if(!f){alert("Cannot deploy this app as it was not deployed via PM2Me (No config found).");return}I(f.id,m.name)},k=m=>{l.value=m.name;const f=s.value.find(v=>v.name===m.name);r.value=f?f.id:m.name,o.value=!0},G=m=>{l.value=m.name,r.value=m.id,o.value=!0},me=(m,f=!1)=>{let v=m;if(f&&(v=s.value.find(d=>d.name===m.name),!v)){alert("Cannot edit this app as it was not deployed via PM2Me (No config found).");return}a.value=v,n.value=!0},le=m=>{if(!m)return"0s";const f=Date.now()-m,v=Math.floor(f/1e3),d=Math.floor(v/(3600*24)),g=Math.floor(v%(3600*24)/3600),x=Math.floor(v%3600/60);return d>0?`${d}d ${g}h`:g>0?`${g}h ${x}m`:x>0?`${x}m`:`${v}s`},ie=m=>{if(!m)return"0 B";const f=1024,v=["B","KB","MB","GB"],d=Math.floor(Math.log(m)/Math.log(f));return parseFloat((m/Math.pow(f,d)).toFixed(2))+" "+v[d]},Ae=m=>m==="online"?"bg-emerald-500":m==="stopping"||m==="stopped"?"bg-amber-500":m==="errored"?"bg-red-500":"bg-slate-500",_e=m=>m==="online"?"text-emerald-400":m==="stopping"||m==="stopped"?"text-amber-400":m==="errored"?"text-red-400":"text-slate-400",Se=["pulling","building","starting","online"],xe=m=>({pulling:"Pull",building:"Build",starting:"Run",online:"Online"})[m]||m,De=m=>m&&typeof m=="string"&&m.startsWith("failed:")?m.split(":")[1]:m,Qe=m=>{const f=De(m),v=Se.indexOf(f);if(v===-1)return"0%";const d=v/(Se.length-1)*100;return`calc(${d}% - ${d/100*48}px)`},Pe=(m,f)=>{if(f==="online"&&m==="online")return!0;const v=De(f),d=Se.indexOf(m),g=Se.indexOf(v);return d<g},Ee=(m,f)=>O(m,f)?"bg-red-500 border-red-400 shadow-[0_0_15px_rgba(239,68,68,0.6)] border-0 scale-110":Pe(m,f)?m==="online"&&f==="online"?"bg-gradient-to-br from-emerald-500 to-green-600 shadow-[0_0_15px_rgba(16,185,129,0.5)] border-0 scale-110":"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-[0_0_10px_rgba(99,102,241,0.4)] border-0":De(f)===m?"bg-slate-800 border-[1.5px] border-blue-400 shadow-[0_0_15px_rgba(96,165,250,0.5)] scale-110":"bg-slate-800/50 border border-slate-700/50 backdrop-blur-sm shadow-inner",O=(m,f)=>f&&typeof f=="string"&&f.startsWith("failed:")?m===f.split(":")[1]:f==="failed"&&m==="starting",T=()=>{U||(U=os()),s.value.forEach(m=>{U.off(`pipeline-state-${m.id}`),U.on(`pipeline-state-${m.id}`,f=>{h.value[m.id]&&(clearTimeout(h.value[m.id]),delete h.value[m.id]),u.value[m.id]=f;const v=d=>{const g=t.value.find(S=>S.name===m.name);g&&(g.pipelineState=d);const x=s.value.find(S=>S.id===m.id);x&&(x.pipelineState=d)};v(f),f==="online"&&(D(),h.value[m.id]=setTimeout(()=>{u.value[m.id]="hidden",v("hidden")},2e3))})})};return rs(async()=>{await D(),T(),N=setInterval(D,12345),$()}),is(()=>{U&&U.disconnect(),clearInterval(N)}),(m,f)=>(w(),_("div",Cp,[Te(kp),i("div",{class:ne(["rounded-2xl border flex items-center justify-between px-6 py-4 shadow-xl backdrop-blur-sm transition-all",!A.value.loaded||A.value.isChecking?"bg-slate-800/60 border-slate-700":A.value.installed?A.value.hasUpdate?"bg-amber-500/5 border-amber-500/30":"bg-emerald-500/5 border-emerald-500/20":"bg-red-500/5 border-red-500/30"])},[i("div",Sp,[i("div",{class:ne(["w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",!A.value.loaded||A.value.isChecking?"bg-slate-700":A.value.installed?A.value.hasUpdate?"bg-amber-500/20":"bg-emerald-500/20":"bg-red-500/20"])},[!A.value.loaded||A.value.isChecking?(w(),_("svg",Ep,[...f[5]||(f[5]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):A.value.installed?A.value.hasUpdate?(w(),_("svg",Ap,[...f[7]||(f[7]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):(w(),_("svg",Tp,[...f[8]||(f[8]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(w(),_("svg",$p,[...f[6]||(f[6]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M5.07 19H19a2 2 0 001.75-2.96L13.75 4a2 2 0 00-3.5 0L3.25 16.04A2 2 0 005.07 19z"},null,-1)])]))],2),i("div",null,[!A.value.loaded||A.value.isChecking?(w(),_("p",Mp,"Checking PM2 status...")):A.value.installed?A.value.hasUpdate?(w(),_("p",Op,"PM2 update available")):(w(),_("p",Bp,"PM2 is up to date")):(w(),_("p",Rp,"PM2 is not installed")),A.value.loaded&&!A.value.isChecking&&A.value.installed?(w(),_("p",Pp,[f[10]||(f[10]=K(" Installed: ",-1)),i("span",Np,"v"+j(A.value.version),1),A.value.hasUpdate?(w(),_("span",Ip,[f[9]||(f[9]=K(" → Latest: ",-1)),i("span",Lp,"v"+j(A.value.latestVersion),1)])):J("",!0)])):A.value.loaded&&!A.value.isChecking&&!A.value.installed?(w(),_("p",jp,"PM2 is required to run and manage applications")):J("",!0)])]),i("div",Dp,[A.value.loaded&&!A.value.isChecking&&A.value.isActing?(w(),_("button",Vp,[f[11]||(f[11]=i("svg",{class:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),K(" "+j(A.value.installed?"Updating...":"Installing..."),1)])):A.value.loaded&&!A.value.isChecking&&!A.value.installed?(w(),_("button",{key:1,onClick:L,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all shadow-lg shadow-blue-500/20"},[...f[12]||(f[12]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1),K(" Install PM2 ",-1)])])):A.value.loaded&&!A.value.isChecking&&A.value.hasUpdate?(w(),_("button",{key:2,onClick:L,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-amber-500 hover:bg-amber-400 text-white transition-all shadow-lg shadow-amber-500/20"},[...f[13]||(f[13]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Update PM2 ",-1)])])):J("",!0),i("button",{onClick:$,disabled:A.value.isChecking,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":A.value.isChecking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...f[14]||(f[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,Hp)])],2),i("div",Fp,[f[16]||(f[16]=i("div",null,[i("h1",{class:"text-3xl font-bold text-white tracking-tight"},"Applications"),i("p",{class:"text-sm text-slate-400 mt-1"},"Manage and monitor your PM2 deployments")],-1)),i("button",{onClick:f[0]||(f[0]=v=>n.value=!0),class:"flex items-center px-4 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white text-sm font-medium rounded-xl transition-all shadow-lg shadow-blue-500/30 transform hover:-translate-y-0.5"},[...f[15]||(f[15]=[i("svg",{class:"h-5 w-5 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),K(" Deploy New App ",-1)])])]),i("div",Up,[(w(!0),_(ve,null,ze(t.value,v=>(w(),_("div",{key:v.pm_id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 p-6 flex flex-col transition-all hover:border-slate-600 hover:shadow-2xl"},[i("div",zp,[i("div",Wp,[f[17]||(f[17]=i("div",{class:"w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600 flex-shrink-0 mt-0.5"},[i("svg",{class:"h-6 w-6 text-slate-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})])],-1)),i("div",qp,[i("div",Kp,[i("h2",{class:"text-lg font-bold text-white truncate",title:v.name},j(v.name),9,Gp)]),i("div",Jp,[i("span",Yp,[v.pm2_env.status==="online"?(w(),_("span",Xp)):J("",!0),i("span",{class:ne(["relative inline-flex rounded-full h-2 w-2",Ae(v.pm2_env.status)])},null,2)]),i("span",{class:ne([_e(v.pm2_env.status),"capitalize"])},j(v.pm2_env.status),3),v.pm2_env.pm_uptime?(w(),_("span",Qp,j(le(v.pm2_env.pm_uptime)),1)):J("",!0)])])]),i("div",Zp,[v.id?(w(),_("button",{key:0,onClick:d=>me(v,!0),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[18]||(f[18]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,eh)):J("",!0),i("button",{onClick:d=>k(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[19]||(f[19]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])],8,th),i("button",{onClick:d=>B(v),class:"p-2 text-slate-400 hover:text-red-400 bg-slate-700/50 hover:bg-red-500/10 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Delete Application"},[...f[20]||(f[20]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])]),i("div",nh,[i("div",oh,[f[21]||(f[21]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"CPU Usage",-1)),i("p",rh,j(v.monit?v.monit.cpu:0)+"%",1)]),i("div",ih,[f[22]||(f[22]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Memory",-1)),i("p",lh,j(ie(v.monit?v.monit.memory:0)),1)]),i("div",ah,[f[23]||(f[23]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Restarts",-1)),i("p",ch,j(v.pm2_env.restart_time),1)]),i("div",uh,[f[24]||(f[24]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"App Id",-1)),i("p",dh,j(v.pm_id),1)])]),v.commitMessage?(w(),_("div",fh,[f[25]||(f[25]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",ph,j(v.commitMessage),1)])):J("",!0),v.rollbackOccurred&&v.failedCommitMessage?(w(),_("div",hh,[f[27]||(f[27]=i("div",{class:"flex items-center gap-1 font-bold uppercase tracking-wider text-[9px]"},[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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"})]),K(" Deployment Failed - Rolled Back ")],-1)),i("div",mh,[f[26]||(f[26]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-red-500/60",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",gh,j(v.failedCommitMessage),1)]),f[28]||(f[28]=i("p",{class:"text-[9px] text-red-500/50 mt-1 italic"},"The system is currently running on the previous stable version.",-1))])):J("",!0),Te(Cr,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:lo(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(w(),_("div",vh,[i("div",bh,[f[30]||(f[30]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),K(" Deployment State ")],-1)),v.pipelineState?(w(),_("div",xh,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(w(),_("span",yh,[...f[29]||(f[29]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):J("",!0),i("span",{class:ne(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},j(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])):J("",!0)]),i("div",wh,[f[33]||(f[33]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:ne(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Rt({width:Qe(v.pipelineState)})},null,6),(w(),_(ve,null,ze(["pulling","building","starting","online"],(d,g)=>i("div",{key:d,class:"relative z-10 flex flex-col items-center group"},[g<3?(w(),_("div",{key:0,class:ne(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Pe(d,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):J("",!0),i("div",{class:ne(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(d,v.pipelineState)])},[v.pipelineState===d&&v.pipelineState!=="online"?(w(),_("div",{key:0,class:ne(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):J("",!0),Pe(d,v.pipelineState)?(w(),_("svg",_h,[...f[31]||(f[31]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&O(d,v.pipelineState)?(w(),_("svg",kh,[...f[32]||(f[32]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===d?(w(),_("div",Ch)):(w(),_("div",Sh))],2),i("span",{class:ne(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===d?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Pe(d,v.pipelineState)?"text-slate-300":"text-slate-500"])},j(xe(d)),3)])),64))])])):J("",!0)]),_:2},1024),i("div",Eh,[v.pm2_env.status==="online"?(w(),_("button",{key:0,onClick:d=>re("stop",v.name),disabled:c.value[`${v.name}-stop`],class:"flex items-center justify-center p-2 text-sm font-medium text-amber-500 bg-amber-500/10 hover:bg-amber-500/20 rounded-lg transition-colors border border-amber-500/20"},[c.value[`${v.name}-stop`]?(w(),_("svg",Ah,[...f[34]||(f[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Th,[...f[35]||(f[35]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z","clip-rule":"evenodd"},null,-1)])])),K(" "+j(c.value[`${v.name}-stop`]?"Stopping":"Stop"),1)],8,$h)):(w(),_("button",{key:1,onClick:d=>re("start",v.name),disabled:c.value[`${v.name}-start`],class:"flex items-center justify-center p-2 text-sm font-medium text-emerald-500 bg-emerald-500/10 hover:bg-emerald-500/20 rounded-lg transition-colors border border-emerald-500/20"},[c.value[`${v.name}-start`]?(w(),_("svg",Rh,[...f[36]||(f[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Oh,[...f[37]||(f[37]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z","clip-rule":"evenodd"},null,-1)])])),K(" "+j(c.value[`${v.name}-start`]?"Starting":"Start"),1)],8,Mh)),i("button",{onClick:d=>re("restart",v.name),disabled:c.value[`${v.name}-restart`],class:"flex items-center justify-center p-2 text-sm font-medium text-blue-400 bg-blue-400/10 hover:bg-blue-400/20 rounded-lg transition-colors border border-blue-400/20"},[c.value[`${v.name}-restart`]?(w(),_("svg",Ph,[...f[38]||(f[38]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Nh,[...f[39]||(f[39]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])),K(" "+j(c.value[`${v.name}-restart`]?"...":"Restart"),1)],8,Bh),v.id?(w(),_("button",{key:2,onClick:d=>W(v),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 text-nowrap"},[c.value[`${v.name}-deploy`]?(w(),_("svg",Lh,[...f[40]||(f[40]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",jh,[...f[41]||(f[41]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+j(c.value[`${v.name}-deploy`]?"Syncing":"Sync")+" ",1),!c.value[`${v.name}-deploy`]&&p.value[ae(v.name)]?(w(),_("span",Dh,j(p.value[ae(v.name)]),1)):J("",!0)],8,Ih)):J("",!0)])]))),128)),(w(!0),_(ve,null,ze(z.value,v=>(w(),_("div",{key:v.id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700/50 p-6 flex flex-col relative overflow-hidden"},[v.status==="deploying"?(w(),_("div",Vh)):J("",!0),i("div",Hh,[i("div",Fh,[i("div",{class:ne(["w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600 flex-shrink-0 mt-0.5",v.status==="deploying"?"text-blue-500":"text-red-500"])},[v.status==="deploying"?(w(),_("svg",Uh,[...f[42]||(f[42]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",zh,[...f[43]||(f[43]=[i("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"},null,-1)])]))],2),i("div",Wh,[i("h2",{class:"text-lg font-bold text-white truncate",title:v.name},j(v.name),9,qh),i("div",Kh,[i("span",{class:ne(["capitalize flex-shrink-0",v.status==="deploying"?"text-blue-400":"text-red-400"])},j(v.status),3),v.commitMessage?(w(),_("span",Gh,[f[44]||(f[44]=i("svg",{class:"w-3 h-3 inline pb-[1px] mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),K(j(v.commitMessage),1)])):J("",!0)])])]),i("div",Jh,[i("button",{onClick:d=>me(v,!1),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[45]||(f[45]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,Yh),i("button",{onClick:d=>G(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[46]||(f[46]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])],8,Xh)])]),Te(Cr,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:lo(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(w(),_("div",Qh,[i("div",Zh,[f[48]||(f[48]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),K(" Deployment State ")],-1)),i("div",em,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(w(),_("span",tm,[...f[47]||(f[47]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):J("",!0),i("span",{class:ne(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},j(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])]),i("div",sm,[f[51]||(f[51]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:ne(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Rt({width:Qe(v.pipelineState)})},null,6),(w(),_(ve,null,ze(["pulling","building","starting","online"],(d,g)=>i("div",{key:d,class:"relative z-10 flex flex-col items-center group"},[g<3?(w(),_("div",{key:0,class:ne(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Pe(d,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):J("",!0),i("div",{class:ne(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(d,v.pipelineState)])},[v.pipelineState===d&&v.pipelineState!=="online"?(w(),_("div",{key:0,class:ne(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):J("",!0),Pe(d,v.pipelineState)?(w(),_("svg",nm,[...f[49]||(f[49]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&O(d,v.pipelineState)?(w(),_("svg",om,[...f[50]||(f[50]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===d?(w(),_("div",rm)):(w(),_("div",im))],2),i("span",{class:ne(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===d?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Pe(d,v.pipelineState)?"text-slate-300":"text-slate-500"])},j(xe(d)),3)])),64))])])):J("",!0)]),_:2},1024),v.status!=="deploying"?(w(),_("button",{key:1,onClick:d=>I(v.id),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 mt-auto text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 w-full"},[c.value[`${v.name}-deploy`]?(w(),_("svg",am,[...f[52]||(f[52]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",cm,[...f[53]||(f[53]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+j(c.value[`${v.name}-deploy`]?"Syncing...":"Deploy")+" ",1),!c.value[`${v.name}-deploy`]&&p.value[v.id]?(w(),_("span",um,j(p.value[v.id]),1)):J("",!0)],8,lm)):J("",!0)]))),128))]),t.value.length===0&&z.value.length===0?(w(),_("div",dm,[f[54]||(f[54]=tt('<div class="w-20 h-20 rounded-full bg-slate-800 flex items-center justify-center mb-6 shadow-inner ring-1 ring-slate-700/50"><svg class="h-10 w-10 text-slate-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"></path></svg></div><h3 class="text-xl font-bold text-white mb-2">No Applications Found</h3><p class="text-slate-400 text-center max-w-sm mb-6">You haven't deployed any applications yet or PM2 is not managing any processes.</p>',3)),i("button",{onClick:f[1]||(f[1]=v=>n.value=!0),class:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all shadow-lg border border-slate-600"}," Deploy Your First App ")])):J("",!0),Te(F0,{isOpen:n.value,appToEdit:a.value,onClose:f[2]||(f[2]=v=>{n.value=!1,a.value=null}),onDeploy:D,onDelete:C},null,8,["isOpen","appToEdit"]),Te(Y0,{isOpen:o.value,appId:r.value,appName:l.value,onClose:f[3]||(f[3]=v=>o.value=!1)},null,8,["isOpen","appId","appName"]),b.value?(w(),_("div",fm,[i("div",pm,[f[57]||(f[57]=i("div",{class:"w-20 h-20 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-6 border border-red-500/20"},[i("svg",{class:"w-10 h-10 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),f[58]||(f[58]=i("h3",{class:"text-2xl font-bold text-white mb-2"},"Delete Application?",-1)),i("p",hm,[f[55]||(f[55]=K(" Are you sure you want to delete ",-1)),i("span",mm,j(y.value?.name),1),f[56]||(f[56]=K("? This will stop the PM2 process and permanently remove the configuration. ",-1))]),i("div",gm,[i("button",{onClick:f[4]||(f[4]=v=>{b.value=!1,y.value=null}),class:"flex-1 px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all border border-slate-600"}," Keep Application "),i("button",{onClick:Q,class:"flex-1 px-6 py-3 bg-red-600 hover:bg-red-500 text-white font-bold rounded-xl transition-all shadow-lg shadow-red-600/20"}," Yes, Delete it ")])])])):J("",!0)]))}},bm={class:"max-w-4xl mx-auto px-4 py-8"},xm={class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},ym={class:"p-6 space-y-6"},wm={class:"space-y-3 mb-4"},_m={class:"flex items-center space-x-3"},km=["src","alt"],Cm={class:"text-white font-medium"},Sm=["onClick"],Em={key:0,class:"text-sm text-slate-500 italic"},$m={class:"flex gap-2"},Am=["disabled"],Tm={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Mm={key:1},Rm={key:2},Om={class:"flex items-center justify-between mb-2"},Bm={class:"relative"},Pm=["value"],Nm={class:"flex items-center justify-between mb-2"},Im={class:"flex items-center space-x-3"},Lm={class:"relative"},jm=["type"],Dm={key:0,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Vm={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Hm={class:"mt-4 p-4 bg-blue-500/5 border border-blue-500/20 rounded-xl space-y-3"},Fm={class:"text-xs text-slate-400 space-y-2 list-decimal list-inside"},Um={class:"text-blue-300 font-mono"},zm={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Wm={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-end"},qm=["disabled"],Km={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Gm={key:1,class:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Jm={class:"mt-8 bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},Ym={class:"p-6 border-b border-slate-700 flex items-center justify-between"},Xm=["disabled"],Qm={class:"p-6"},Zm={class:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6"},e1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700"},t1={class:"text-lg font-bold text-white font-mono"},s1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700"},n1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700 flex flex-col justify-center"},o1={key:0,class:"inline-flex items-center gap-1.5 text-amber-400 text-sm font-medium"},r1={key:1,class:"inline-flex items-center gap-1.5 text-emerald-400 text-sm font-medium"},i1={key:2,class:"text-slate-500 text-sm italic"},l1={key:3,class:"text-slate-500 text-sm"},a1={key:0,class:"mb-4 p-4 bg-slate-900/60 rounded-xl border border-slate-700"},c1={class:"text-xs text-slate-300 whitespace-pre-wrap font-mono max-h-32 overflow-y-auto"},u1=["href"],d1={key:1,class:"flex items-center gap-4"},f1=["disabled"],p1={key:0,class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},h1={key:1,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},m1={key:2,class:"mt-4 p-4 bg-slate-900/80 rounded-xl border border-slate-700 font-mono text-xs text-slate-300 whitespace-pre-wrap max-h-40 overflow-y-auto"},g1={class:"mt-8 bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},v1={class:"p-6 border-b border-slate-700 flex items-center justify-between"},b1={class:"overflow-x-auto"},x1={class:"w-full text-left border-collapse"},y1={class:"divide-y divide-slate-700/50"},w1={class:"px-6 py-4 text-slate-300 font-mono whitespace-nowrap"},_1={class:"px-6 py-4"},k1={class:"px-6 py-4 text-slate-300"},C1={class:"px-6 py-4"},S1={key:0,class:"text-emerald-400 flex items-center"},E1={key:1,class:"text-red-400 flex items-center"},$1={key:2,class:"text-slate-400 flex items-center"},A1=["title"],T1={key:0},M1={__name:"Settings",setup(e){const t=F({webhookSecret:"",discordWebhook:"",telegramBotToken:"",telegramChatId:""}),s=F([]),n=F(!1),o=F(!1),r=F(!1),l=F(""),a=F(!1),c=F(""),p=F([]),u=F({current:null,latest:null,hasUpdate:!1,releaseUrl:null,changelog:""}),h=F(!1),b=F(!1),y=F(!1),A=F("");let $=null;const L=W=>W?new Date(W).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):"-",U=Ne(()=>window.location.origin+"/api/webhook"),N=()=>{const W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let k="";for(let G=0;G<32;G++)k+=W.charAt(Math.floor(Math.random()*W.length));t.value.webhookSecret=k,a.value=!0},z=async(W,k)=>{if(W)try{await navigator.clipboard.writeText(W),c.value=k,setTimeout(()=>{c.value===k&&(c.value="")},2e3)}catch(G){console.error("Failed to copy text: ",G)}},D=async()=>{try{const W=await fetch("/api/git/accounts",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});s.value=await W.json()}catch{console.error("Failed to load accounts")}},te=async()=>{if(l.value){o.value=!0;try{const k=await(await fetch("/api/git/accounts",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({token:l.value})})).json();k.success?(l.value="",await D()):alert(k.error||"Invalid GitHub Token")}catch{alert("Error connecting to GitHub")}finally{o.value=!1}}},ae=async W=>{if(confirm("Are you sure you want to disconnect this account?"))try{await fetch(`/api/git/accounts/${W}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch{alert("Failed to delete account")}},re=async()=>{try{const k=await(await fetch("/api/settings",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();t.value={...t.value,...k}}catch(W){console.error("Failed to load settings",W)}},X=async()=>{n.value=!0;try{await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify(t.value)}),alert("Settings Saved Successfully")}catch{alert("Failed to save settings")}finally{n.value=!1}},C=async()=>{r.value=!0;try{const W=await fetch("/api/settings/webhook-logs",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});p.value=await W.json()}catch{console.error("Failed to load webhook logs")}finally{r.value=!1}},B=()=>{$||($=os()),$.off("webhook-log"),$.on("webhook-log",W=>{p.value.unshift(W),p.value.length>50&&(p.value=p.value.slice(0,50))})},Q=async()=>{h.value=!0;try{const W=await fetch("/api/system/version-check",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});u.value=await W.json(),b.value=!0}finally{h.value=!1}},I=async()=>{if(confirm("Update PM2Me? The server will restart.")){y.value=!0,A.value="";try{const k=await(await fetch("/api/system/update",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`,"Content-Type":"application/json"}})).json();A.value=k.output||k.error||"Done",k.success&&await Q()}finally{y.value=!1}}};return rs(async()=>{re(),D(),await C(),B(),Q()}),is(()=>{$&&$.disconnect()}),(W,k)=>(w(),_("div",bm,[k[56]||(k[56]=i("h1",{class:"text-3xl font-bold text-white tracking-tight mb-8"},"Settings",-1)),i("div",xm,[k[37]||(k[37]=tt('<div class="p-6 border-b border-slate-700"><h2 class="text-xl font-bold text-white flex items-center"><svg class="w-6 h-6 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg> System Configurations </h2><p class="text-sm text-slate-400 mt-1">Configure Webhooks and Integrations</p></div>',1)),i("div",ym,[i("div",null,[k[9]||(k[9]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Connected GitHub Accounts",-1)),i("div",wm,[(w(!0),_(ve,null,ze(s.value,G=>(w(),_("div",{key:G.id,class:"flex items-center justify-between p-3 bg-slate-900 border border-slate-700 rounded-lg"},[i("div",_m,[i("img",{src:G.avatarUrl,alt:G.username,class:"w-8 h-8 rounded-full border border-slate-600"},null,8,km),i("span",Cm,"@"+j(G.username),1)]),i("button",{type:"button",onClick:me=>ae(G.id),class:"text-sm text-red-400 hover:text-red-300 transition-colors"},"Disconnect",8,Sm)]))),128)),s.value.length===0?(w(),_("p",Em,"No accounts connected yet.")):J("",!0)]),k[10]||(k[10]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Add New Account (Personal Access Token)",-1)),i("div",$m,[ke(i("input",{type:"password","onUpdate:modelValue":k[0]||(k[0]=G=>l.value=G),class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"ghp_xxxxxxxxxxxxxxxxxxxx"},null,512),[[Be,l.value]]),i("button",{type:"button",onClick:te,disabled:o.value,class:"px-5 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50 whitespace-nowrap font-medium flex items-center"},[o.value?(w(),_("svg",Tm,[...k[8]||(k[8]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):J("",!0),o.value?(w(),_("span",Mm,"Testing...")):(w(),_("span",Rm,"Connect"))],8,Am)]),k[11]||(k[11]=i("p",{class:"mt-1 text-xs text-slate-500"},"Used to fetch repositories and branches automatically when deploying. ",-1))]),k[31]||(k[31]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[i("div",Om,[k[13]||(k[13]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook URL",-1)),i("button",{onClick:k[1]||(k[1]=G=>z(U.value,"URL")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[k[12]||(k[12]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),K(" "+j(c.value==="URL"?"Copied!":"Copy URL"),1)])]),i("div",Bm,[i("input",{type:"text",value:U.value,readonly:"",class:"w-full bg-slate-900/50 border border-slate-700 rounded-lg px-4 py-2.5 text-slate-400 text-sm font-mono outline-none transition-all cursor-default",placeholder:"Calculating..."},null,8,Pm)]),k[14]||(k[14]=i("p",{class:"mt-1 text-[11px] text-slate-500 italic"},"Provide this URL to your GitHub repository's Webhook settings.",-1))]),i("div",null,[i("div",Nm,[k[17]||(k[17]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook Secret",-1)),i("div",Im,[i("button",{onClick:N,class:"text-xs text-emerald-400 hover:text-emerald-300 flex items-center transition-colors"},[...k[15]||(k[15]=[i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Generate ",-1)])]),i("button",{onClick:k[2]||(k[2]=G=>z(t.value.webhookSecret,"Secret")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[k[16]||(k[16]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),K(" "+j(c.value==="Secret"?"Copied!":"Copy Secret"),1)])])]),i("div",Lm,[ke(i("input",{type:a.value?"text":"password","onUpdate:modelValue":k[3]||(k[3]=G=>t.value.webhookSecret=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all pr-12",placeholder:"Secret for verifying GitHub payloads"},null,8,jm),[[yu,t.value.webhookSecret]]),i("button",{onClick:k[4]||(k[4]=G=>a.value=!a.value),class:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 p-1"},[a.value?(w(),_("svg",Dm,[...k[18]||(k[18]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.882 9.882L9.881 9.882M9.882 9.882A3.001 3.001 0 0014.15 14.15l-4.268-4.268zm7.665 7.665l2.484 2.484M15.904 15.904a10.023 10.023 0 01-3.904 1.096m-4.06-1.121A10.053 10.053 0 013 12c.5-2.015 1.581-3.76 3.061-5.061m10.878 10.878l-4.243-4.243m4.243 4.243L19 19m-4.732-4.732l-4.242-4.242M4.732 4.732L2 2"},null,-1)])])):(w(),_("svg",Vm,[...k[19]||(k[19]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])]))])]),i("div",Hm,[k[26]||(k[26]=i("h3",{class:"text-sm font-bold text-blue-400 flex items-center"},[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),K(" How to setup GitHub Webhook ")],-1)),i("ol",Fm,[k[21]||(k[21]=i("li",null,"Open your repository on GitHub.",-1)),k[22]||(k[22]=i("li",null,[K("Go to "),i("span",{class:"text-slate-200"},"Settings"),K(" > "),i("span",{class:"text-slate-200"},"Webhooks"),K(" > "),i("span",{class:"text-slate-200"},"Add webhook"),K(". ")],-1)),i("li",null,[k[20]||(k[20]=K("Payload URL: ",-1)),i("span",Um,j(U.value),1)]),k[23]||(k[23]=i("li",null,[K("Content type: "),i("span",{class:"text-orange-400 font-bold"},"application/json")],-1)),k[24]||(k[24]=i("li",null,[K("Secret: "),i("span",{class:"text-slate-200"},"Paste your Webhook Secret above")],-1)),k[25]||(k[25]=i("li",null,[K("Which events: "),i("span",{class:"text-slate-200"},"Just the push event"),K(".")],-1))]),k[27]||(k[27]=i("p",{class:"text-[10px] text-slate-500 italic"},"This allows PM2Me to automatically deploy your apps when you push code.",-1))])]),k[32]||(k[32]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[k[28]||(k[28]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Discord Webhook URL",-1)),ke(i("input",{type:"url","onUpdate:modelValue":k[5]||(k[5]=G=>t.value.discordWebhook=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"https://discord.com/api/webhooks/..."},null,512),[[Be,t.value.discordWebhook]])]),k[33]||(k[33]=i("hr",{class:"border-slate-700"},null,-1)),i("div",zm,[i("div",null,[k[29]||(k[29]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Bot Token",-1)),ke(i("input",{type:"password","onUpdate:modelValue":k[6]||(k[6]=G=>t.value.telegramBotToken=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"},null,512),[[Be,t.value.telegramBotToken]])]),i("div",null,[k[30]||(k[30]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Chat ID",-1)),ke(i("input",{type:"text","onUpdate:modelValue":k[7]||(k[7]=G=>t.value.telegramChatId=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"-1001234567890"},null,512),[[Be,t.value.telegramChatId]])])])]),i("div",Wm,[i("button",{onClick:X,disabled:n.value,class:"px-6 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-medium rounded-lg transition-all shadow-lg flex items-center disabled:opacity-70"},[n.value?(w(),_("svg",Km,[...k[34]||(k[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Gm,[...k[35]||(k[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])),k[36]||(k[36]=K(" Save Settings ",-1))],8,qm)])]),i("div",Jm,[i("div",Ym,[k[40]||(k[40]=i("div",null,[i("h2",{class:"text-xl font-bold text-white flex items-center gap-2"},[i("svg",{class:"w-5 h-5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})]),K(" App Version ")]),i("p",{class:"text-sm text-slate-400 mt-1"},"Check for updates and manage the PM2Me version")],-1)),i("button",{onClick:Q,disabled:h.value,class:"flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-medium bg-slate-700 hover:bg-slate-600 text-slate-300 transition-all disabled:opacity-50"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":h.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...k[38]||(k[38]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2)),k[39]||(k[39]=K(" Check for Update ",-1))],8,Xm)]),i("div",Qm,[i("div",Zm,[i("div",e1,[k[41]||(k[41]=i("p",{class:"text-xs text-slate-500 mb-1"},"Current Version",-1)),i("p",t1,"v"+j(u.value.current||"..."),1)]),i("div",s1,[k[42]||(k[42]=i("p",{class:"text-xs text-slate-500 mb-1"},"Latest Release",-1)),i("p",{class:ne(["text-lg font-bold font-mono",u.value.hasUpdate?"text-amber-400":"text-emerald-400"])},j(u.value.latest?"v"+u.value.latest:"-"),3)]),i("div",n1,[u.value.hasUpdate?(w(),_("span",o1,[...k[43]||(k[43]=[i("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),K(" Update available! ",-1)])])):u.value.latest?(w(),_("span",r1,[...k[44]||(k[44]=[i("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),K(" Up to date ",-1)])])):b.value?(w(),_("span",i1," No releases found on GitHub ")):(w(),_("span",l1,"Not checked"))])]),u.value.changelog?(w(),_("div",a1,[k[45]||(k[45]=i("p",{class:"text-xs text-slate-500 mb-2 font-medium uppercase tracking-wider"},"Release Notes",-1)),i("pre",c1,j(u.value.changelog),1),u.value.releaseUrl?(w(),_("a",{key:0,href:u.value.releaseUrl,target:"_blank",class:"inline-flex items-center gap-1 mt-2 text-xs text-blue-400 hover:text-blue-300"}," View on GitHub → ",8,u1)):J("",!0)])):J("",!0),u.value.hasUpdate?(w(),_("div",d1,[i("button",{onClick:I,disabled:y.value,class:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-semibold bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-50"},[y.value?(w(),_("svg",p1,[...k[46]||(k[46]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_("svg",h1,[...k[47]||(k[47]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+j(y.value?"Updating...":"Update Now"),1)],8,f1),k[48]||(k[48]=i("p",{class:"text-xs text-slate-500"},"Server will restart after update",-1))])):J("",!0),A.value?(w(),_("div",m1,j(A.value),1)):J("",!0)])]),i("div",g1,[i("div",v1,[k[50]||(k[50]=i("div",null,[i("h2",{class:"text-xl font-bold text-white flex items-center"},[i("svg",{class:"w-6 h-6 mr-2 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),K(" Webhook History ")]),i("p",{class:"text-sm text-slate-400 mt-1"},"Last 50 recorded events (Push, Ping, etc.)")],-1)),i("button",{onClick:C,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh Logs"},[(w(),_("svg",{class:ne(["w-5 h-5",{"animate-spin":r.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...k[49]||(k[49]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))])]),i("div",b1,[i("table",x1,[k[55]||(k[55]=i("thead",{class:"bg-slate-900/50 text-slate-400 text-xs font-medium uppercase tracking-wider"},[i("tr",null,[i("th",{class:"px-6 py-3 border-b border-slate-700"},"Time"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Event"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Repository"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Status"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Details")])],-1)),i("tbody",y1,[(w(!0),_(ve,null,ze(p.value,G=>(w(),_("tr",{key:G.id,class:"hover:bg-slate-700/30 transition-colors text-sm"},[i("td",w1,j(L(G.timestamp)),1),i("td",_1,[i("span",{class:ne(["px-2 py-0.5 rounded text-[10px] font-bold uppercase",G.eventType==="push"?"bg-blue-500/20 text-blue-400":"bg-slate-700 text-slate-400"])},j(G.eventType),3)]),i("td",k1,j(G.repository),1),i("td",C1,[G.status==="success"?(w(),_("span",S1,[...k[51]||(k[51]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),K(" Success ",-1)])])):G.status==="error"?(w(),_("span",E1,[...k[52]||(k[52]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1),K(" Error ",-1)])])):(w(),_("span",$1,[k[53]||(k[53]=i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),K(" "+j(G.status),1)]))]),i("td",{class:"px-6 py-4 text-slate-500 text-xs truncate max-w-xs",title:G.details},j(G.details),9,A1)]))),128)),p.value.length===0?(w(),_("tr",T1,[...k[54]||(k[54]=[i("td",{colspan:"5",class:"px-6 py-12 text-center text-slate-500 italic"},' No webhook events recorded yet. Perform a Push or click "Test" on GitHub. ',-1)])])):J("",!0)])])])])]))}},R1={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6"},O1={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4"},B1={class:"flex items-center gap-3"},P1={class:"relative flex h-2 w-2"},N1={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},I1=["disabled"],L1={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},j1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},D1={class:"text-sm font-semibold text-slate-200 flex items-center gap-2"},V1={class:"text-lg"},H1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},F1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},U1={class:"text-xs font-mono text-slate-300 break-all"},z1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-5"},W1={class:"flex flex-wrap gap-3"},q1=["disabled"],K1=["disabled"],G1=["disabled"],J1=["disabled"],Y1=["disabled"],X1={key:0,class:"flex items-center gap-2 text-slate-400 text-sm"},Q1={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},Z1={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},eg={class:"bg-slate-800/60 rounded-2xl border border-slate-700 overflow-hidden"},tg={class:"flex",style:{"min-height":"600px"}},sg={class:"flex-shrink-0 bg-slate-900/60 border-r border-slate-700",style:{width:"220px"}},ng={class:"flex items-center justify-between px-3 py-2 border-b border-slate-700/50"},og={key:0,class:"px-2 py-2 border-b border-slate-700/50"},rg={class:"flex gap-1 mt-1"},ig={class:"overflow-y-auto",style:{"max-height":"560px"}},lg={key:0,class:"px-3 py-4 text-xs text-slate-600 text-center"},ag=["onClick"],cg={class:"flex-1 text-xs font-mono truncate"},ug=["onClick"],dg={key:1,class:"border-t border-slate-700/50 p-2"},fg=["disabled"],pg={key:0,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},hg={class:"text-[10px] text-slate-600 text-center mt-1"},mg={class:"flex-1 flex flex-col overflow-hidden"},gg={class:"flex items-center justify-between px-4 py-3 border-b border-slate-700 bg-slate-900/30"},vg={class:"flex items-center gap-2"},bg={class:"text-sm font-semibold text-slate-300"},xg={class:"text-xs text-slate-600 font-mono"},yg={key:0,class:"text-xs text-amber-400 flex items-center gap-1"},wg={class:"flex items-center gap-2"},_g=["disabled"],kg={key:0,class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Cg={key:1,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},Sg={key:0,class:"flex-1 flex items-center justify-center text-slate-600 text-sm"},Eg={class:"flex overflow-hidden flex-1",style:{background:"#030712"}},$g=["textContent"],Ag=["innerHTML"],Tg={class:"flex items-center justify-between px-4 py-1.5 border-t border-slate-800 text-xs font-mono",style:{background:"#020617"}},Mg={class:"flex items-center gap-4"},Rg={key:0,class:"text-slate-300"},Og={key:1,class:"text-slate-600 text-xs"},Bg={class:"text-slate-600"},Pg={__name:"Nginx",setup(e){const t=()=>localStorage.getItem("pm2me_token"),s=()=>({Authorization:`Bearer ${t()}`,"Content-Type":"application/json"}),n=F({os:"",confFile:"",confDir:"",installed:!1,version:""}),o=F({running:!1,checking:!1}),r=F([]),l=F(!0),a=F(null),c=F(""),p=F(!1),u=F(!1),h=F(!1),b=F(null),y=F(!1),A=F(!1),$=F(!1),L=F(""),U=F(null),N=F(null),z=F(null),D=F(!1),te=F({line:1,col:1}),ae=/^(server_name|server|location|upstream|http|events|listen|root|index|include|proxy_pass|proxy_set_header|proxy_hide_header|proxy_redirect|proxy_connect_timeout|proxy_read_timeout|proxy_send_timeout|fastcgi_pass|fastcgi_param|fastcgi_index|ssl_certificate|ssl_certificate_key|ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers|ssl_session_cache|ssl_session_timeout|add_header|return|rewrite|if|set|map|geo|break|last|redirect|permanent|worker_processes|worker_connections|keepalive_timeout|keepalive|gzip|gzip_types|gzip_comp_level|gzip_min_length|gzip_vary|client_max_body_size|client_body_timeout|client_header_timeout|access_log|error_log|log_format|sendfile|tcp_nopush|tcp_nodelay|default_type|charset|expires|autoindex|alias|deny|allow|auth_basic|auth_basic_user_file|limit_req|limit_req_zone|limit_conn|limit_conn_zone|resolver|resolver_timeout|user|pid|daemon|types|pcre_jit|load_module|open_file_cache|open_file_cache_valid|error_page|try_files|internal|proxy_cache|proxy_cache_valid|proxy_buffering)\b/,re=T=>!T||/[\s;{}()"',]/.test(T);function X(T){return T.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function C(T){const m=T.match(/^(\s*)(#.*)$/);if(m)return`${X(m[1])}<span class="hl-comment">${X(m[2])}</span>`;let f="",v=0;for(;v<T.length;){const d=T.slice(v),g=T[v-1];if(T[v]==="#"&&(v===0||/\s/.test(g))){f+=`<span class="hl-comment">${X(d)}</span>`;break}if(T[v]==='"'){let E=v+1;for(;E<T.length&&T[E]!=='"';)T[E]==="\\"&&E++,E++;f+=`<span class="hl-string">${X(T.slice(v,E+1))}</span>`,v=E+1;continue}if(T[v]==="'"){let E=v+1;for(;E<T.length&&T[E]!=="'";)T[E]==="\\"&&E++,E++;f+=`<span class="hl-string">${X(T.slice(v,E+1))}</span>`,v=E+1;continue}if(T[v]==="$"){const E=d.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)/);if(E){f+=`<span class="hl-variable">${X(E[1])}</span>`,v+=E[1].length;continue}}const x=d.match(ae);if(x&&re(g)&&re(T[v+x[1].length])){f+=`<span class="hl-keyword">${x[1]}</span>`,v+=x[1].length;continue}const S=d.match(/^(on|off|none|any)\b/);if(S&&re(g)){f+=`<span class="hl-special">${S[1]}</span>`,v+=S[1].length;continue}if(/\d/.test(T[v])&&re(g)){const E=d.match(/^(\d+[a-z]*)/);if(E&&re(T[v+E[1].length])){f+=`<span class="hl-number">${E[1]}</span>`,v+=E[1].length;continue}}if(T[v]==="{"||T[v]==="}"){f+=`<span class="hl-brace">${T[v]}</span>`,v++;continue}if(T[v]===";"){f+='<span class="hl-semi">;</span>',v++;continue}f+=X(T[v]),v++}return f}const B=Ne(()=>c.value.split(`
|
|
1
|
+
(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 r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=s(o);fetch(o.href,r)}})();function Ao(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const be={},cs=[],bt=()=>{},di=()=>!1,yn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),To=e=>e.startsWith("onUpdate:"),Oe=Object.assign,Mo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ql=Object.prototype.hasOwnProperty,pe=(e,t)=>Ql.call(e,t),ee=Array.isArray,us=e=>Ws(e)==="[object Map]",bs=e=>Ws(e)==="[object Set]",nr=e=>Ws(e)==="[object Date]",oe=e=>typeof e=="function",$e=e=>typeof e=="string",yt=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",fi=e=>(he(e)||oe(e))&&oe(e.then)&&oe(e.catch),pi=Object.prototype.toString,Ws=e=>pi.call(e),Zl=e=>Ws(e).slice(8,-1),hi=e=>Ws(e)==="[object Object]",Ro=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ts=Ao(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ea=/-\w/g,ot=wn(e=>e.replace(ea,t=>t.slice(1).toUpperCase())),ta=/\B([A-Z])/g,Kt=wn(e=>e.replace(ta,"-$1").toLowerCase()),_n=wn(e=>e.charAt(0).toUpperCase()+e.slice(1)),jn=wn(e=>e?`on${_n(e)}`:""),Ht=(e,t)=>!Object.is(e,t),en=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},mi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},kn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sa=e=>{const t=$e(e)?Number(e):NaN;return isNaN(t)?e:t};let or;const Cn=()=>or||(or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Rt(e){if(ee(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=$e(n)?ia(n):Rt(n);if(o)for(const r in o)t[r]=o[r]}return t}else if($e(e)||he(e))return e}const na=/;(?![^(]*\))/g,oa=/:([^]+)/,ra=/\/\*[^]*?\*\//g;function ia(e){const t={};return e.replace(ra,"").split(na).forEach(s=>{if(s){const n=s.split(oa);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ne(e){let t="";if($e(e))t=e;else if(ee(e))for(let s=0;s<e.length;s++){const n=ne(e[s]);n&&(t+=n+" ")}else if(he(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const la="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa=Ao(la);function gi(e){return!!e||e===""}function ca(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=zt(e[n],t[n]);return s}function zt(e,t){if(e===t)return!0;let s=nr(e),n=nr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=yt(e),n=yt(t),s||n)return e===t;if(s=ee(e),n=ee(t),s||n)return s&&n?ca(e,t):!1;if(s=he(e),n=he(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const a=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(a&&!c||!a&&c||!zt(e[l],t[l]))return!1}}return String(e)===String(t)}function Oo(e,t){return e.findIndex(s=>zt(s,t))}const vi=e=>!!(e&&e.__v_isRef===!0),L=e=>$e(e)?e:e==null?"":ee(e)||he(e)&&(e.toString===pi||!oe(e.toString))?vi(e)?L(e.value):JSON.stringify(e,bi,2):String(e),bi=(e,t)=>vi(t)?bi(e,t.value):us(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Dn(n,r)+" =>"]=o,s),{})}:bs(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Dn(s))}:yt(t)?Dn(t):he(t)&&!ee(t)&&!hi(t)?String(t):t,Dn=(e,t="")=>{var s;return yt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ge;class ua{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ge,!t&&Ge&&(this.index=(Ge.scopes||(Ge.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[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)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ge;try{return Ge=this,t()}finally{Ge=s}}}on(){++this._on===1&&(this.prevScope=Ge,Ge=this)}off(){this._on>0&&--this._on===0&&(Ge=this.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){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[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 da(){return Ge}let we;const Vn=new WeakSet;class xi{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,Ge&&Ge.active&&Ge.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vn.has(this)&&(Vn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rr(this),_i(this);const t=we,s=it;we=this,it=!0;try{return this.fn()}finally{ki(this),we=t,it=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)No(t);this.deps=this.depsTail=void 0,rr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){so(this)&&this.run()}get dirty(){return so(this)}}let yi=0,Ms,Rs;function wi(e,t=!1){if(e.flags|=8,t){e.next=Rs,Rs=e;return}e.next=Ms,Ms=e}function Bo(){yi++}function Po(){if(--yi>0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ms;){let t=Ms;for(Ms=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 _i(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ki(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),No(n),fa(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function so(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ci(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ci(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ls)||(e.globalVersion=Ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!so(e))))return;e.flags|=2;const t=e.dep,s=we,n=it;we=e,it=!0;try{_i(e);const o=e.fn(e._value);(t.version===0||Ht(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{we=s,it=n,ki(e),e.flags&=-3}}function No(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 r=s.computed.deps;r;r=r.nextDep)No(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function fa(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let it=!0;const Si=[];function Ot(){Si.push(it),it=!1}function Bt(){const e=Si.pop();it=e===void 0?!0:e}function rr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let Ls=0;class pa{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 Io{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||!it||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new pa(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,Ei(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++,Ls++,this.notify(t)}notify(t){Bo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Po()}}}function Ei(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)Ei(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const no=new WeakMap,ss=Symbol(""),oo=Symbol(""),js=Symbol("");function Ie(e,t,s){if(it&&we){let n=no.get(e);n||no.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Io),o.map=n,o.key=s),o.track()}}function $t(e,t,s,n,o,r){const l=no.get(e);if(!l){Ls++;return}const a=c=>{c&&c.trigger()};if(Bo(),t==="clear")l.forEach(a);else{const c=ee(e),h=c&&Ro(s);if(c&&s==="length"){const u=Number(n);l.forEach((p,b)=>{(b==="length"||b===js||!yt(b)&&b>=u)&&a(p)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),h&&a(l.get(js)),t){case"add":c?h&&a(l.get("length")):(a(l.get(ss)),us(e)&&a(l.get(oo)));break;case"delete":c||(a(l.get(ss)),us(e)&&a(l.get(oo)));break;case"set":us(e)&&a(l.get(ss));break}}Po()}function is(e){const t=de(e);return t===e?t:(Ie(t,"iterate",js),st(e)?t:t.map(at))}function Sn(e){return Ie(e=de(e),"iterate",js),e}function jt(e,t){return Pt(e)?hs(ns(e)?at(t):t):at(t)}const ha={__proto__:null,[Symbol.iterator](){return Hn(this,Symbol.iterator,e=>jt(this,e))},concat(...e){return is(this).concat(...e.map(t=>ee(t)?is(t):t))},entries(){return Hn(this,"entries",e=>(e[1]=jt(this,e[1]),e))},every(e,t){return _t(this,"every",e,t,void 0,arguments)},filter(e,t){return _t(this,"filter",e,t,s=>s.map(n=>jt(this,n)),arguments)},find(e,t){return _t(this,"find",e,t,s=>jt(this,s),arguments)},findIndex(e,t){return _t(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _t(this,"findLast",e,t,s=>jt(this,s),arguments)},findLastIndex(e,t){return _t(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _t(this,"forEach",e,t,void 0,arguments)},includes(...e){return Fn(this,"includes",e)},indexOf(...e){return Fn(this,"indexOf",e)},join(e){return is(this).join(e)},lastIndexOf(...e){return Fn(this,"lastIndexOf",e)},map(e,t){return _t(this,"map",e,t,void 0,arguments)},pop(){return ws(this,"pop")},push(...e){return ws(this,"push",e)},reduce(e,...t){return ir(this,"reduce",e,t)},reduceRight(e,...t){return ir(this,"reduceRight",e,t)},shift(){return ws(this,"shift")},some(e,t){return _t(this,"some",e,t,void 0,arguments)},splice(...e){return ws(this,"splice",e)},toReversed(){return is(this).toReversed()},toSorted(e){return is(this).toSorted(e)},toSpliced(...e){return is(this).toSpliced(...e)},unshift(...e){return ws(this,"unshift",e)},values(){return Hn(this,"values",e=>jt(this,e))}};function Hn(e,t,s){const n=Sn(e),o=n[t]();return n!==e&&!st(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const ma=Array.prototype;function _t(e,t,s,n,o,r){const l=Sn(e),a=l!==e&&!st(e),c=l[t];if(c!==ma[t]){const p=c.apply(e,r);return a?at(p):p}let h=s;l!==e&&(a?h=function(p,b){return s.call(this,jt(e,p),b,e)}:s.length>2&&(h=function(p,b){return s.call(this,p,b,e)}));const u=c.call(l,h,n);return a&&o?o(u):u}function ir(e,t,s,n){const o=Sn(e);let r=s;return o!==e&&(st(e)?s.length>3&&(r=function(l,a,c){return s.call(this,l,a,c,e)}):r=function(l,a,c){return s.call(this,l,jt(e,a),c,e)}),o[t](r,...n)}function Fn(e,t,s){const n=de(e);Ie(n,"iterate",js);const o=n[t](...s);return(o===-1||o===!1)&&Do(s[0])?(s[0]=de(s[0]),n[t](...s)):o}function ws(e,t,s=[]){Ot(),Bo();const n=de(e)[t].apply(e,s);return Po(),Bt(),n}const ga=Ao("__proto__,__v_isRef,__isVue"),$i=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function va(e){yt(e)||(e=String(e));const t=de(this);return Ie(t,"has",e),t.hasOwnProperty(e)}class Ai{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,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?$a:Oi:r?Ri:Mi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=ee(t);if(!o){let c;if(l&&(c=ha[s]))return c;if(s==="hasOwnProperty")return va}const a=Reflect.get(t,s,je(t)?t:n);if((yt(s)?$i.has(s):ga(s))||(o||Ie(t,"get",s),r))return a;if(je(a)){const c=l&&Ro(s)?a:a.value;return o&&he(c)?io(c):c}return he(a)?o?io(a):En(a):a}}class Ti extends Ai{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const l=ee(t)&&Ro(s);if(!this._isShallow){const h=Pt(r);if(!st(n)&&!Pt(n)&&(r=de(r),n=de(n)),!l&&je(r)&&!je(n))return h||(r.value=n),!0}const a=l?Number(s)<t.length:pe(t,s),c=Reflect.set(t,s,n,je(t)?t:o);return t===de(o)&&(a?Ht(n,r)&&$t(t,"set",s,n):$t(t,"add",s,n)),c}deleteProperty(t,s){const n=pe(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&$t(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!yt(s)||!$i.has(s))&&Ie(t,"has",s),n}ownKeys(t){return Ie(t,"iterate",ee(t)?"length":ss),Reflect.ownKeys(t)}}class ba extends Ai{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const xa=new Ti,ya=new ba,wa=new Ti(!0);const ro=e=>e,Gs=e=>Reflect.getPrototypeOf(e);function _a(e,t,s){return function(...n){const o=this.__v_raw,r=de(o),l=us(r),a=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,h=o[e](...n),u=s?ro:t?hs:at;return!t&&Ie(r,"iterate",c?oo:ss),Oe(Object.create(h),{next(){const{value:p,done:b}=h.next();return b?{value:p,done:b}:{value:a?[u(p[0]),u(p[1])]:u(p),done:b}}})}}function Js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ka(e,t){const s={get(o){const r=this.__v_raw,l=de(r),a=de(o);e||(Ht(o,a)&&Ie(l,"get",o),Ie(l,"get",a));const{has:c}=Gs(l),h=t?ro:e?hs:at;if(c.call(l,o))return h(r.get(o));if(c.call(l,a))return h(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ie(de(o),"iterate",ss),o.size},has(o){const r=this.__v_raw,l=de(r),a=de(o);return e||(Ht(o,a)&&Ie(l,"has",o),Ie(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,c=de(a),h=t?ro:e?hs:at;return!e&&Ie(c,"iterate",ss),a.forEach((u,p)=>o.call(r,h(u),h(p),l))}};return Oe(s,e?{add:Js("add"),set:Js("set"),delete:Js("delete"),clear:Js("clear")}:{add(o){!t&&!st(o)&&!Pt(o)&&(o=de(o));const r=de(this);return Gs(r).has.call(r,o)||(r.add(o),$t(r,"add",o,o)),this},set(o,r){!t&&!st(r)&&!Pt(r)&&(r=de(r));const l=de(this),{has:a,get:c}=Gs(l);let h=a.call(l,o);h||(o=de(o),h=a.call(l,o));const u=c.call(l,o);return l.set(o,r),h?Ht(r,u)&&$t(l,"set",o,r):$t(l,"add",o,r),this},delete(o){const r=de(this),{has:l,get:a}=Gs(r);let c=l.call(r,o);c||(o=de(o),c=l.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return c&&$t(r,"delete",o,void 0),h},clear(){const o=de(this),r=o.size!==0,l=o.clear();return r&&$t(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=_a(o,e,t)}),s}function Lo(e,t){const s=ka(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(pe(s,o)&&o in n?s:n,o,r)}const Ca={get:Lo(!1,!1)},Sa={get:Lo(!1,!0)},Ea={get:Lo(!0,!1)};const Mi=new WeakMap,Ri=new WeakMap,Oi=new WeakMap,$a=new WeakMap;function Aa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ta(e){return e.__v_skip||!Object.isExtensible(e)?0:Aa(Zl(e))}function En(e){return Pt(e)?e:jo(e,!1,xa,Ca,Mi)}function Bi(e){return jo(e,!1,wa,Sa,Ri)}function io(e){return jo(e,!0,ya,Ea,Oi)}function jo(e,t,s,n,o){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Ta(e);if(r===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function ns(e){return Pt(e)?ns(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function Do(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Ma(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&mi(e,"__v_skip",!0),e}const at=e=>he(e)?En(e):e,hs=e=>he(e)?io(e):e;function je(e){return e?e.__v_isRef===!0:!1}function F(e){return Pi(e,!1)}function Ra(e){return Pi(e,!0)}function Pi(e,t){return je(e)?e:new Oa(e,t)}class Oa{constructor(t,s){this.dep=new Io,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:de(t),this._value=s?t:at(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||st(t)||Pt(t);t=n?t:de(t),Ht(t,s)&&(this._rawValue=t,this._value=n?t:at(t),this.dep.trigger())}}function ds(e){return je(e)?e.value:e}const Ba={get:(e,t,s)=>t==="__v_raw"?e:ds(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return je(o)&&!je(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Ni(e){return ns(e)?e:new Proxy(e,Ba)}class Pa{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Io(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ls-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 wi(this,!0),!0}get value(){const t=this.dep.track();return Ci(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Na(e,t,s=!1){let n,o;return oe(e)?n=e:(n=e.get,o=e.set),new Pa(n,o,s)}const Ys={},un=new WeakMap;let Zt;function Ia(e,t=!1,s=Zt){if(s){let n=un.get(s);n||un.set(s,n=[]),n.push(e)}}function La(e,t,s=be){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:c}=s,h=D=>o?D:st(D)||o===!1||o===0?At(D,1):At(D);let u,p,b,y,A=!1,S=!1;if(je(e)?(p=()=>e.value,A=st(e)):ns(e)?(p=()=>h(e),A=!0):ee(e)?(S=!0,A=e.some(D=>ns(D)||st(D)),p=()=>e.map(D=>{if(je(D))return D.value;if(ns(D))return h(D);if(oe(D))return c?c(D,2):D()})):oe(e)?t?p=c?()=>c(e,2):e:p=()=>{if(b){Ot();try{b()}finally{Bt()}}const D=Zt;Zt=u;try{return c?c(e,3,[y]):e(y)}finally{Zt=D}}:p=bt,t&&o){const D=p,te=o===!0?1/0:o;p=()=>At(D(),te)}const j=da(),U=()=>{u.stop(),j&&j.active&&Mo(j.effects,u)};if(r&&t){const D=t;t=(...te)=>{D(...te),U()}}let N=S?new Array(e.length).fill(Ys):Ys;const z=D=>{if(!(!(u.flags&1)||!u.dirty&&!D))if(t){const te=u.run();if(o||A||(S?te.some((ae,re)=>Ht(ae,N[re])):Ht(te,N))){b&&b();const ae=Zt;Zt=u;try{const re=[te,N===Ys?void 0:S&&N[0]===Ys?[]:N,y];N=te,c?c(t,3,re):t(...re)}finally{Zt=ae}}}else u.run()};return a&&a(z),u=new xi(p),u.scheduler=l?()=>l(z,!1):z,y=D=>Ia(D,!1,u),b=u.onStop=()=>{const D=un.get(u);if(D){if(c)c(D,4);else for(const te of D)te();un.delete(u)}},t?n?z(!0):N=u.run():l?l(z.bind(null,!0),!0):u.run(),U.pause=u.pause.bind(u),U.resume=u.resume.bind(u),U.stop=U,U}function At(e,t=1/0,s){if(t<=0||!he(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,je(e))At(e.value,t,s);else if(ee(e))for(let n=0;n<e.length;n++)At(e[n],t,s);else if(bs(e)||us(e))e.forEach(n=>{At(n,t,s)});else if(hi(e)){for(const n in e)At(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&At(e[n],t,s)}return e}function qs(e,t,s,n){try{return n?e(...n):e()}catch(o){$n(o,t,s)}}function ct(e,t,s,n){if(oe(e)){const o=qs(e,t,s,n);return o&&fi(o)&&o.catch(r=>{$n(r,t,s)}),o}if(ee(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ct(e[r],t,s,n));return o}}function $n(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||be;if(t){let a=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const u=a.ec;if(u){for(let p=0;p<u.length;p++)if(u[p](e,c,h)===!1)return}a=a.parent}if(r){Ot(),qs(r,null,10,[e,c,h]),Bt();return}}ja(e,s,o,n,l)}function ja(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Fe=[];let mt=-1;const fs=[];let Dt=null,ls=0;const Ii=Promise.resolve();let dn=null;function Mt(e){const t=dn||Ii;return e?t.then(this?e.bind(this):e):t}function Da(e){let t=mt+1,s=Fe.length;for(;t<s;){const n=t+s>>>1,o=Fe[n],r=Ds(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function Vo(e){if(!(e.flags&1)){const t=Ds(e),s=Fe[Fe.length-1];!s||!(e.flags&2)&&t>=Ds(s)?Fe.push(e):Fe.splice(Da(t),0,e),e.flags|=1,Li()}}function Li(){dn||(dn=Ii.then(Di))}function Va(e){ee(e)?fs.push(...e):Dt&&e.id===-1?Dt.splice(ls+1,0,e):e.flags&1||(fs.push(e),e.flags|=1),Li()}function lr(e,t,s=mt+1){for(;s<Fe.length;s++){const n=Fe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Fe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ji(e){if(fs.length){const t=[...new Set(fs)].sort((s,n)=>Ds(s)-Ds(n));if(fs.length=0,Dt){Dt.push(...t);return}for(Dt=t,ls=0;ls<Dt.length;ls++){const s=Dt[ls];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Dt=null,ls=0}}const Ds=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Di(e){try{for(mt=0;mt<Fe.length;mt++){const t=Fe[mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),qs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mt<Fe.length;mt++){const t=Fe[mt];t&&(t.flags&=-2)}mt=-1,Fe.length=0,ji(),dn=null,(Fe.length||fs.length)&&Di()}}let Ye=null,Vi=null;function fn(e){const t=Ye;return Ye=e,Vi=e&&e.type.__scopeId||null,t}function lo(e,t=Ye,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&mn(-1);const r=fn(t);let l;try{l=e(...o)}finally{fn(r),n._d&&mn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ke(e,t){if(Ye===null)return e;const s=On(Ye),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,c=be]=t[o];r&&(oe(r)&&(r={mounted:r,updated:r}),r.deep&&At(l),n.push({dir:r,instance:s,value:l,oldValue:void 0,arg:a,modifiers:c}))}return e}function Jt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let c=a.dir[n];c&&(Ot(),ct(c,s,8,[e.el,a,e,t]),Bt())}}function tn(e,t){if(Le){let s=Le.provides;const n=Le.parent&&Le.parent.provides;n===s&&(s=Le.provides=Object.create(n)),s[e]=t}}function lt(e,t,s=!1){const n=bl();if(n||ps){let o=ps?ps._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&&oe(t)?t.call(n&&n.proxy):t}}const Ha=Symbol.for("v-scx"),Fa=()=>lt(Ha);function Ft(e,t,s){return Hi(e,t,s)}function Hi(e,t,s=be){const{immediate:n,deep:o,flush:r,once:l}=s,a=Oe({},s),c=t&&n||!t&&r!=="post";let h;if(Fs){if(r==="sync"){const y=Fa();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=bt,y.resume=bt,y.pause=bt,y}}const u=Le;a.call=(y,A,S)=>ct(y,u,A,S);let p=!1;r==="post"?a.scheduler=y=>{Ke(y,u&&u.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(y,A)=>{A?y():Vo(y)}),a.augmentJob=y=>{t&&(y.flags|=4),p&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const b=La(e,t,a);return Fs&&(h?h.push(b):c&&b()),b}function Ua(e,t,s){const n=this.proxy,o=$e(e)?e.includes(".")?Fi(n,e):()=>n[e]:e.bind(n,n);let r;oe(t)?r=t:(r=t.handler,s=t);const l=Ks(this),a=Hi(o,r.bind(n),s);return l(),a}function Fi(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 za=Symbol("_vte"),Ui=e=>e.__isTeleport,gt=Symbol("_leaveCb"),_s=Symbol("_enterCb");function Wa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Gt(()=>{e.isMounted=!0}),Qi(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],zi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},Wi=e=>{const t=e.subTree;return t.component?Wi(t.component):t},qa={name:"BaseTransition",props:zi,setup(e,{slots:t}){const s=bl(),n=Wa();return()=>{const o=t.default&&Gi(t.default(),!0);if(!o||!o.length)return;const r=qi(o),l=de(e),{mode:a}=l;if(n.isLeaving)return Un(r);const c=ar(r);if(!c)return Un(r);let h=ao(c,l,n,s,p=>h=p);c.type!==Ue&&Vs(c,h);let u=s.subTree&&ar(s.subTree);if(u&&u.type!==Ue&&!es(u,c)&&Wi(s).type!==Ue){let p=ao(u,l,n,s);if(Vs(u,p),a==="out-in"&&c.type!==Ue)return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete p.afterLeave,u=void 0},Un(r);a==="in-out"&&c.type!==Ue?p.delayLeave=(b,y,A)=>{const S=Ki(n,u);S[String(u.key)]=u,b[gt]=()=>{y(),b[gt]=void 0,delete h.delayedLeave,u=void 0},h.delayedLeave=()=>{A(),delete h.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function qi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Ue){t=s;break}}return t}const Ka=qa;function Ki(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 ao(e,t,s,n,o){const{appear:r,mode:l,persisted:a=!1,onBeforeEnter:c,onEnter:h,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:b,onLeave:y,onAfterLeave:A,onLeaveCancelled:S,onBeforeAppear:j,onAppear:U,onAfterAppear:N,onAppearCancelled:z}=t,D=String(e.key),te=Ki(s,e),ae=(C,B)=>{C&&ct(C,n,9,B)},re=(C,B)=>{const Q=B[1];ae(C,B),ee(C)?C.every(I=>I.length<=1)&&Q():C.length<=1&&Q()},X={mode:l,persisted:a,beforeEnter(C){let B=c;if(!s.isMounted)if(r)B=j||c;else return;C[gt]&&C[gt](!0);const Q=te[D];Q&&es(e,Q)&&Q.el[gt]&&Q.el[gt](),ae(B,[C])},enter(C){if(te[D]===e)return;let B=h,Q=u,I=p;if(!s.isMounted)if(r)B=U||h,Q=N||u,I=z||p;else return;let W=!1;C[_s]=G=>{W||(W=!0,G?ae(I,[C]):ae(Q,[C]),X.delayedLeave&&X.delayedLeave(),C[_s]=void 0)};const k=C[_s].bind(null,!1);B?re(B,[C,k]):k()},leave(C,B){const Q=String(e.key);if(C[_s]&&C[_s](!0),s.isUnmounting)return B();ae(b,[C]);let I=!1;C[gt]=k=>{I||(I=!0,B(),k?ae(S,[C]):ae(A,[C]),C[gt]=void 0,te[Q]===e&&delete te[Q])};const W=C[gt].bind(null,!1);te[Q]=e,y?re(y,[C,W]):W()},clone(C){const B=ao(C,t,s,n,o);return o&&o(B),B}};return X}function Un(e){if(An(e))return e=Wt(e),e.children=null,e}function ar(e){if(!An(e))return Ui(e.type)&&e.children?qi(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&&oe(s.default))return s.default()}}function Vs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,s){let n=[],o=0;for(let r=0;r<e.length;r++){let l=e[r];const a=s==null?l.key:String(s)+String(l.key!=null?l.key:r);l.type===ve?(l.patchFlag&128&&o++,n=n.concat(Gi(l.children,t,a))):(t||l.type!==Ue)&&n.push(a!=null?Wt(l,{key:a}):l)}if(o>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Ji(e,t){return oe(e)?Oe({name:e.name},t,{setup:e}):e}function Yi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function cr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const pn=new WeakMap;function Os(e,t,s,n,o=!1){if(ee(e)){e.forEach((S,j)=>Os(S,t&&(ee(t)?t[j]:t),s,n,o));return}if(Bs(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Os(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?On(n.component):n.el,l=o?null:r,{i:a,r:c}=e,h=t&&t.r,u=a.refs===be?a.refs={}:a.refs,p=a.setupState,b=de(p),y=p===be?di:S=>cr(u,S)?!1:pe(b,S),A=(S,j)=>!(j&&cr(u,j));if(h!=null&&h!==c){if(ur(t),$e(h))u[h]=null,y(h)&&(p[h]=null);else if(je(h)){const S=t;A(h,S.k)&&(h.value=null),S.k&&(u[S.k]=null)}}if(oe(c))qs(c,a,12,[l,u]);else{const S=$e(c),j=je(c);if(S||j){const U=()=>{if(e.f){const N=S?y(c)?p[c]:u[c]:A()||!e.k?c.value:u[e.k];if(o)ee(N)&&Mo(N,r);else if(ee(N))N.includes(r)||N.push(r);else if(S)u[c]=[r],y(c)&&(p[c]=u[c]);else{const z=[r];A(c,e.k)&&(c.value=z),e.k&&(u[e.k]=z)}}else S?(u[c]=l,y(c)&&(p[c]=l)):j&&(A(c,e.k)&&(c.value=l),e.k&&(u[e.k]=l))};if(l){const N=()=>{U(),pn.delete(e)};N.id=-1,pn.set(e,N),Ke(N,s)}else ur(e),U()}}}function ur(e){const t=pn.get(e);t&&(t.flags|=8,pn.delete(e))}Cn().requestIdleCallback;Cn().cancelIdleCallback;const Bs=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive;function Ga(e,t){Xi(e,"a",t)}function Ja(e,t){Xi(e,"da",t)}function Xi(e,t,s=Le){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Tn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)An(o.parent.vnode)&&Ya(n,t,s,o),o=o.parent}}function Ya(e,t,s,n){const o=Tn(t,e,n,!0);rs(()=>{Mo(n[t],o)},s)}function Tn(e,t,s=Le,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{Ot();const a=Ks(s),c=ct(t,s,e,l);return a(),Bt(),c});return n?o.unshift(r):o.push(r),r}}const Nt=e=>(t,s=Le)=>{(!Fs||e==="sp")&&Tn(e,(...n)=>t(...n),s)},Xa=Nt("bm"),Gt=Nt("m"),Qa=Nt("bu"),Za=Nt("u"),Qi=Nt("bum"),rs=Nt("um"),ec=Nt("sp"),tc=Nt("rtg"),sc=Nt("rtc");function nc(e,t=Le){Tn("ec",e,t)}const oc="components";function rc(e,t){return lc(oc,e,!0,t)||e}const ic=Symbol.for("v-ndc");function lc(e,t,s=!0,n=!1){const o=Ye||Le;if(o){const r=o.type;{const a=qc(r,!1);if(a&&(a===t||a===ot(t)||a===_n(ot(t))))return r}const l=dr(o[e]||r[e],t)||dr(o.appContext[e],t);return!l&&n?r:l}}function dr(e,t){return e&&(e[t]||e[ot(t)]||e[_n(ot(t))])}function ze(e,t,s,n){let o;const r=s,l=ee(e);if(l||$e(e)){const a=l&&ns(e);let c=!1,h=!1;a&&(c=!st(e),h=Pt(e),e=Sn(e)),o=new Array(e.length);for(let u=0,p=e.length;u<p;u++)o[u]=t(c?h?hs(at(e[u])):at(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(he(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,h=a.length;c<h;c++){const u=a[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}const co=e=>e?xl(e)?On(e):co(e.parent):null,Ps=Oe(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=>co(e.parent),$root:e=>co(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>el(e),$forceUpdate:e=>e.f||(e.f=()=>{Vo(e.update)}),$nextTick:e=>e.n||(e.n=Mt.bind(e.proxy)),$watch:e=>Ua.bind(e)}),zn=(e,t)=>e!==be&&!e.__isScriptSetup&&pe(e,t),ac={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:c}=e;if(t[0]!=="$"){const b=l[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(zn(n,t))return l[t]=1,n[t];if(o!==be&&pe(o,t))return l[t]=2,o[t];if(pe(r,t))return l[t]=3,r[t];if(s!==be&&pe(s,t))return l[t]=4,s[t];uo&&(l[t]=0)}}const h=Ps[t];let u,p;if(h)return t==="$attrs"&&Ie(e.attrs,"get",""),h(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(s!==be&&pe(s,t))return l[t]=4,s[t];if(p=c.config.globalProperties,pe(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return zn(o,t)?(o[t]=s,!0):n!==be&&pe(n,t)?(n[t]=s,!0):pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:l}},a){let c;return!!(s[a]||e!==be&&a[0]!=="$"&&pe(e,a)||zn(t,a)||pe(r,a)||pe(n,a)||pe(Ps,a)||pe(o.config.globalProperties,a)||(c=l.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:pe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function fr(e){return ee(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let uo=!0;function cc(e){const t=el(e),s=e.proxy,n=e.ctx;uo=!1,t.beforeCreate&&pr(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:l,watch:a,provide:c,inject:h,created:u,beforeMount:p,mounted:b,beforeUpdate:y,updated:A,activated:S,deactivated:j,beforeDestroy:U,beforeUnmount:N,destroyed:z,unmounted:D,render:te,renderTracked:ae,renderTriggered:re,errorCaptured:X,serverPrefetch:C,expose:B,inheritAttrs:Q,components:I,directives:W,filters:k}=t;if(h&&uc(h,n,null),l)for(const le in l){const ie=l[le];oe(ie)&&(n[le]=ie.bind(s))}if(o){const le=o.call(s,s);he(le)&&(e.data=En(le))}if(uo=!0,r)for(const le in r){const ie=r[le],Ae=oe(ie)?ie.bind(s,s):oe(ie.get)?ie.get.bind(s,s):bt,_e=!oe(ie)&&oe(ie.set)?ie.set.bind(s):bt,Se=Ne({get:Ae,set:_e});Object.defineProperty(n,le,{enumerable:!0,configurable:!0,get:()=>Se.value,set:xe=>Se.value=xe})}if(a)for(const le in a)Zi(a[le],n,s,le);if(c){const le=oe(c)?c.call(s):c;Reflect.ownKeys(le).forEach(ie=>{tn(ie,le[ie])})}u&&pr(u,e,"c");function me(le,ie){ee(ie)?ie.forEach(Ae=>le(Ae.bind(s))):ie&&le(ie.bind(s))}if(me(Xa,p),me(Gt,b),me(Qa,y),me(Za,A),me(Ga,S),me(Ja,j),me(nc,X),me(sc,ae),me(tc,re),me(Qi,N),me(rs,D),me(ec,C),ee(B))if(B.length){const le=e.exposed||(e.exposed={});B.forEach(ie=>{Object.defineProperty(le,ie,{get:()=>s[ie],set:Ae=>s[ie]=Ae,enumerable:!0})})}else e.exposed||(e.exposed={});te&&e.render===bt&&(e.render=te),Q!=null&&(e.inheritAttrs=Q),I&&(e.components=I),W&&(e.directives=W),C&&Yi(e)}function uc(e,t,s=bt){ee(e)&&(e=fo(e));for(const n in e){const o=e[n];let r;he(o)?"default"in o?r=lt(o.from||n,o.default,!0):r=lt(o.from||n):r=lt(o),je(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function pr(e,t,s){ct(ee(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Zi(e,t,s,n){let o=n.includes(".")?Fi(s,n):()=>s[n];if($e(e)){const r=t[e];oe(r)&&Ft(o,r)}else if(oe(e))Ft(o,e.bind(s));else if(he(e))if(ee(e))e.forEach(r=>Zi(r,t,s,n));else{const r=oe(e.handler)?e.handler.bind(s):t[e.handler];oe(r)&&Ft(o,r,e)}}function el(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(h=>hn(c,h,l,!0)),hn(c,t,l)),he(t)&&r.set(t,c),c}function hn(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&hn(e,r,s,!0),o&&o.forEach(l=>hn(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=dc[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const dc={data:hr,props:mr,emits:mr,methods:$s,computed:$s,beforeCreate:Ve,created:Ve,beforeMount:Ve,mounted:Ve,beforeUpdate:Ve,updated:Ve,beforeDestroy:Ve,beforeUnmount:Ve,destroyed:Ve,unmounted:Ve,activated:Ve,deactivated:Ve,errorCaptured:Ve,serverPrefetch:Ve,components:$s,directives:$s,watch:pc,provide:hr,inject:fc};function hr(e,t){return t?e?function(){return Oe(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function fc(e,t){return $s(fo(e),fo(t))}function fo(e){if(ee(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ve(e,t){return e?[...new Set([].concat(e,t))]:t}function $s(e,t){return e?Oe(Object.create(null),e,t):t}function mr(e,t){return e?ee(e)&&ee(t)?[...new Set([...e,...t])]:Oe(Object.create(null),fr(e),fr(t??{})):t}function pc(e,t){if(!e)return t;if(!t)return e;const s=Oe(Object.create(null),e);for(const n in t)s[n]=Ve(e[n],t[n]);return s}function tl(){return{app:null,config:{isNativeTag:di,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 hc=0;function mc(e,t){return function(n,o=null){oe(n)||(n=Oe({},n)),o!=null&&!he(o)&&(o=null);const r=tl(),l=new WeakSet,a=[];let c=!1;const h=r.app={_uid:hc++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Gc,get config(){return r.config},set config(u){},use(u,...p){return l.has(u)||(u&&oe(u.install)?(l.add(u),u.install(h,...p)):oe(u)&&(l.add(u),u(h,...p))),h},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),h},component(u,p){return p?(r.components[u]=p,h):r.components[u]},directive(u,p){return p?(r.directives[u]=p,h):r.directives[u]},mount(u,p,b){if(!c){const y=h._ceVNode||Te(n,o);return y.appContext=r,b===!0?b="svg":b===!1&&(b=void 0),e(y,u,b),c=!0,h._container=u,u.__vue_app__=h,On(y.component)}},onUnmount(u){a.push(u)},unmount(){c&&(ct(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(u,p){return r.provides[u]=p,h},runWithContext(u){const p=ps;ps=h;try{return u()}finally{ps=p}}};return h}}let ps=null;const gc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ot(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function vc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||be;let o=s;const r=t.startsWith("update:"),l=r&&gc(n,t.slice(7));l&&(l.trim&&(o=s.map(u=>$e(u)?u.trim():u)),l.number&&(o=s.map(kn)));let a,c=n[a=jn(t)]||n[a=jn(ot(t))];!c&&r&&(c=n[a=jn(Kt(t))]),c&&ct(c,e,6,o);const h=n[a+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ct(h,e,6,o)}}const bc=new WeakMap;function sl(e,t,s=!1){const n=s?bc:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let l={},a=!1;if(!oe(e)){const c=h=>{const u=sl(h,t,!0);u&&(a=!0,Oe(l,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(he(e)&&n.set(e,null),null):(ee(r)?r.forEach(c=>l[c]=null):Oe(l,r),he(e)&&n.set(e,l),l)}function Mn(e,t){return!e||!yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,Kt(t))||pe(e,t))}function gr(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:c,render:h,renderCache:u,props:p,data:b,setupState:y,ctx:A,inheritAttrs:S}=e,j=fn(e);let U,N;try{if(s.shapeFlag&4){const D=o||n,te=D;U=vt(h.call(te,D,u,p,y,b,A)),N=a}else{const D=t;U=vt(D.length>1?D(p,{attrs:a,slots:l,emit:c}):D(p,null)),N=t.props?a:xc(a)}}catch(D){Ns.length=0,$n(D,e,1),U=Te(Ue)}let z=U;if(N&&S!==!1){const D=Object.keys(N),{shapeFlag:te}=z;D.length&&te&7&&(r&&D.some(To)&&(N=yc(N,r)),z=Wt(z,N,!1,!0))}return s.dirs&&(z=Wt(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(s.dirs):s.dirs),s.transition&&Vs(z,s.transition),U=z,fn(j),U}const xc=e=>{let t;for(const s in e)(s==="class"||s==="style"||yn(s))&&((t||(t={}))[s]=e[s]);return t},yc=(e,t)=>{const s={};for(const n in e)(!To(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function wc(e,t,s){const{props:n,children:o,component:r}=e,{props:l,children:a,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?vr(n,l,h):!!l;if(c&8){const u=t.dynamicProps;for(let p=0;p<u.length;p++){const b=u[p];if(nl(l,n,b)&&!Mn(h,b))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?vr(n,l,h):!0:!!l;return!1}function vr(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 r=n[o];if(nl(t,e,r)&&!Mn(s,r))return!0}return!1}function nl(e,t,s){const n=e[s],o=t[s];return s==="style"&&he(n)&&he(o)?!zt(n,o):n!==o}function _c({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const ol={},rl=()=>Object.create(ol),il=e=>Object.getPrototypeOf(e)===ol;function kc(e,t,s,n=!1){const o={},r=rl();e.propsDefaults=Object.create(null),ll(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Bi(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Cc(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:l}}=e,a=de(o),[c]=e.propsOptions;let h=!1;if((n||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let p=0;p<u.length;p++){let b=u[p];if(Mn(e.emitsOptions,b))continue;const y=t[b];if(c)if(pe(r,b))y!==r[b]&&(r[b]=y,h=!0);else{const A=ot(b);o[A]=po(c,a,A,y,e,!1)}else y!==r[b]&&(r[b]=y,h=!0)}}}else{ll(e,t,o,r)&&(h=!0);let u;for(const p in a)(!t||!pe(t,p)&&((u=Kt(p))===p||!pe(t,u)))&&(c?s&&(s[p]!==void 0||s[u]!==void 0)&&(o[p]=po(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!pe(t,p))&&(delete r[p],h=!0)}h&&$t(e.attrs,"set","")}function ll(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let c in t){if(Ts(c))continue;const h=t[c];let u;o&&pe(o,u=ot(c))?!r||!r.includes(u)?s[u]=h:(a||(a={}))[u]=h:Mn(e.emitsOptions,c)||(!(c in n)||h!==n[c])&&(n[c]=h,l=!0)}if(r){const c=de(s),h=a||be;for(let u=0;u<r.length;u++){const p=r[u];s[p]=po(o,c,p,h[p],e,!pe(h,p))}}return l}function po(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=pe(l,"default");if(a&&n===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&oe(c)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const u=Ks(o);n=h[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[1]&&(n===""||n===Kt(s))&&(n=!0))}return n}const Sc=new WeakMap;function al(e,t,s=!1){const n=s?Sc:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,l={},a=[];let c=!1;if(!oe(e)){const u=p=>{c=!0;const[b,y]=al(p,t,!0);Oe(l,b),y&&a.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return he(e)&&n.set(e,cs),cs;if(ee(r))for(let u=0;u<r.length;u++){const p=ot(r[u]);br(p)&&(l[p]=be)}else if(r)for(const u in r){const p=ot(u);if(br(p)){const b=r[u],y=l[p]=ee(b)||oe(b)?{type:b}:Oe({},b),A=y.type;let S=!1,j=!0;if(ee(A))for(let U=0;U<A.length;++U){const N=A[U],z=oe(N)&&N.name;if(z==="Boolean"){S=!0;break}else z==="String"&&(j=!1)}else S=oe(A)&&A.name==="Boolean";y[0]=S,y[1]=j,(S||pe(y,"default"))&&a.push(p)}}const h=[l,a];return he(e)&&n.set(e,h),h}function br(e){return e[0]!=="$"&&!Ts(e)}const Ho=e=>e==="_"||e==="_ctx"||e==="$stable",Fo=e=>ee(e)?e.map(vt):[vt(e)],Ec=(e,t,s)=>{if(t._n)return t;const n=lo((...o)=>Fo(t(...o)),s);return n._c=!1,n},cl=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Ho(o))continue;const r=e[o];if(oe(r))t[o]=Ec(o,r,n);else if(r!=null){const l=Fo(r);t[o]=()=>l}}},ul=(e,t)=>{const s=Fo(t);e.slots.default=()=>s},dl=(e,t,s)=>{for(const n in t)(s||!Ho(n))&&(e[n]=t[n])},$c=(e,t,s)=>{const n=e.slots=rl();if(e.vnode.shapeFlag&32){const o=t._;o?(dl(n,t,s),s&&mi(n,"_",o,!0)):cl(t,n)}else t&&ul(e,t)},Ac=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,l=be;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:dl(o,t,s):(r=!t.$stable,cl(t,o)),l=t}else t&&(ul(e,t),l={default:1});if(r)for(const a in o)!Ho(a)&&l[a]==null&&delete o[a]},Ke=Bc;function Tc(e){return Mc(e)}function Mc(e,t){const s=Cn();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:l,createText:a,createComment:c,setText:h,setElementText:u,parentNode:p,nextSibling:b,setScopeId:y=bt,insertStaticContent:A}=e,S=(d,g,x,E=null,$=null,M=null,H=void 0,V=null,P=!!g.dynamicChildren)=>{if(d===g)return;d&&!es(d,g)&&(E=O(d),xe(d,$,M,!0),d=null),g.patchFlag===-2&&(P=!1,g.dynamicChildren=null);const{type:R,ref:Y,shapeFlag:q}=g;switch(R){case Rn:j(d,g,x,E);break;case Ue:U(d,g,x,E);break;case sn:d==null&&N(g,x,E,H);break;case ve:I(d,g,x,E,$,M,H,V,P);break;default:q&1?te(d,g,x,E,$,M,H,V,P):q&6?W(d,g,x,E,$,M,H,V,P):(q&64||q&128)&&R.process(d,g,x,E,$,M,H,V,P,f)}Y!=null&&$?Os(Y,d&&d.ref,M,g||d,!g):Y==null&&d&&d.ref!=null&&Os(d.ref,null,M,d,!0)},j=(d,g,x,E)=>{if(d==null)n(g.el=a(g.children),x,E);else{const $=g.el=d.el;g.children!==d.children&&h($,g.children)}},U=(d,g,x,E)=>{d==null?n(g.el=c(g.children||""),x,E):g.el=d.el},N=(d,g,x,E)=>{[d.el,d.anchor]=A(d.children,g,x,E,d.el,d.anchor)},z=({el:d,anchor:g},x,E)=>{let $;for(;d&&d!==g;)$=b(d),n(d,x,E),d=$;n(g,x,E)},D=({el:d,anchor:g})=>{let x;for(;d&&d!==g;)x=b(d),o(d),d=x;o(g)},te=(d,g,x,E,$,M,H,V,P)=>{if(g.type==="svg"?H="svg":g.type==="math"&&(H="mathml"),d==null)ae(g,x,E,$,M,H,V,P);else{const R=d.el&&d.el._isVueCE?d.el:null;try{R&&R._beginPatch(),C(d,g,$,M,H,V,P)}finally{R&&R._endPatch()}}},ae=(d,g,x,E,$,M,H,V)=>{let P,R;const{props:Y,shapeFlag:q,transition:Z,dirs:se}=d;if(P=d.el=l(d.type,M,Y&&Y.is,Y),q&8?u(P,d.children):q&16&&X(d.children,P,null,E,$,Wn(d,M),H,V),se&&Jt(d,null,E,"created"),re(P,d,d.scopeId,H,E),Y){for(const ye in Y)ye!=="value"&&!Ts(ye)&&r(P,ye,null,Y[ye],M,E);"value"in Y&&r(P,"value",null,Y.value,M),(R=Y.onVnodeBeforeMount)&&ht(R,E,d)}se&&Jt(d,null,E,"beforeMount");const ue=Rc($,Z);ue&&Z.beforeEnter(P),n(P,g,x),((R=Y&&Y.onVnodeMounted)||ue||se)&&Ke(()=>{R&&ht(R,E,d),ue&&Z.enter(P),se&&Jt(d,null,E,"mounted")},$)},re=(d,g,x,E,$)=>{if(x&&y(d,x),E)for(let M=0;M<E.length;M++)y(d,E[M]);if($){let M=$.subTree;if(g===M||ml(M.type)&&(M.ssContent===g||M.ssFallback===g)){const H=$.vnode;re(d,H,H.scopeId,H.slotScopeIds,$.parent)}}},X=(d,g,x,E,$,M,H,V,P=0)=>{for(let R=P;R<d.length;R++){const Y=d[R]=V?Et(d[R]):vt(d[R]);S(null,Y,g,x,E,$,M,H,V)}},C=(d,g,x,E,$,M,H)=>{const V=g.el=d.el;let{patchFlag:P,dynamicChildren:R,dirs:Y}=g;P|=d.patchFlag&16;const q=d.props||be,Z=g.props||be;let se;if(x&&Yt(x,!1),(se=Z.onVnodeBeforeUpdate)&&ht(se,x,g,d),Y&&Jt(g,d,x,"beforeUpdate"),x&&Yt(x,!0),(q.innerHTML&&Z.innerHTML==null||q.textContent&&Z.textContent==null)&&u(V,""),R?B(d.dynamicChildren,R,V,x,E,Wn(g,$),M):H||ie(d,g,V,null,x,E,Wn(g,$),M,!1),P>0){if(P&16)Q(V,q,Z,x,$);else if(P&2&&q.class!==Z.class&&r(V,"class",null,Z.class,$),P&4&&r(V,"style",q.style,Z.style,$),P&8){const ue=g.dynamicProps;for(let ye=0;ye<ue.length;ye++){const ge=ue[ye],We=q[ge],qe=Z[ge];(qe!==We||ge==="value")&&r(V,ge,We,qe,$,x)}}P&1&&d.children!==g.children&&u(V,g.children)}else!H&&R==null&&Q(V,q,Z,x,$);((se=Z.onVnodeUpdated)||Y)&&Ke(()=>{se&&ht(se,x,g,d),Y&&Jt(g,d,x,"updated")},E)},B=(d,g,x,E,$,M,H)=>{for(let V=0;V<g.length;V++){const P=d[V],R=g[V],Y=P.el&&(P.type===ve||!es(P,R)||P.shapeFlag&198)?p(P.el):x;S(P,R,Y,null,E,$,M,H,!0)}},Q=(d,g,x,E,$)=>{if(g!==x){if(g!==be)for(const M in g)!Ts(M)&&!(M in x)&&r(d,M,g[M],null,$,E);for(const M in x){if(Ts(M))continue;const H=x[M],V=g[M];H!==V&&M!=="value"&&r(d,M,V,H,$,E)}"value"in x&&r(d,"value",g.value,x.value,$)}},I=(d,g,x,E,$,M,H,V,P)=>{const R=g.el=d?d.el:a(""),Y=g.anchor=d?d.anchor:a("");let{patchFlag:q,dynamicChildren:Z,slotScopeIds:se}=g;se&&(V=V?V.concat(se):se),d==null?(n(R,x,E),n(Y,x,E),X(g.children||[],x,Y,$,M,H,V,P)):q>0&&q&64&&Z&&d.dynamicChildren&&d.dynamicChildren.length===Z.length?(B(d.dynamicChildren,Z,x,$,M,H,V),(g.key!=null||$&&g===$.subTree)&&fl(d,g,!0)):ie(d,g,x,Y,$,M,H,V,P)},W=(d,g,x,E,$,M,H,V,P)=>{g.slotScopeIds=V,d==null?g.shapeFlag&512?$.ctx.activate(g,x,E,H,P):k(g,x,E,$,M,H,P):G(d,g,P)},k=(d,g,x,E,$,M,H)=>{const V=d.component=Hc(d,E,$);if(An(d)&&(V.ctx.renderer=f),Fc(V,!1,H),V.asyncDep){if($&&$.registerDep(V,me,H),!d.el){const P=V.subTree=Te(Ue);U(null,P,g,x),d.placeholder=P.el}}else me(V,d,g,x,$,M,H)},G=(d,g,x)=>{const E=g.component=d.component;if(wc(d,g,x))if(E.asyncDep&&!E.asyncResolved){le(E,g,x);return}else E.next=g,E.update();else g.el=d.el,E.vnode=g},me=(d,g,x,E,$,M,H)=>{const V=()=>{if(d.isMounted){let{next:q,bu:Z,u:se,parent:ue,vnode:ye}=d;{const ft=pl(d);if(ft){q&&(q.el=ye.el,le(d,q,H)),ft.asyncDep.then(()=>{Ke(()=>{d.isUnmounted||R()},$)});return}}let ge=q,We;Yt(d,!1),q?(q.el=ye.el,le(d,q,H)):q=ye,Z&&en(Z),(We=q.props&&q.props.onVnodeBeforeUpdate)&&ht(We,ue,q,ye),Yt(d,!0);const qe=gr(d),dt=d.subTree;d.subTree=qe,S(dt,qe,p(dt.el),O(dt),d,$,M),q.el=qe.el,ge===null&&_c(d,qe.el),se&&Ke(se,$),(We=q.props&&q.props.onVnodeUpdated)&&Ke(()=>ht(We,ue,q,ye),$)}else{let q;const{el:Z,props:se}=g,{bm:ue,m:ye,parent:ge,root:We,type:qe}=d,dt=Bs(g);Yt(d,!1),ue&&en(ue),!dt&&(q=se&&se.onVnodeBeforeMount)&&ht(q,ge,g),Yt(d,!0);{We.ce&&We.ce._hasShadowRoot()&&We.ce._injectChildStyle(qe);const ft=d.subTree=gr(d);S(null,ft,x,E,d,$,M),g.el=ft.el}if(ye&&Ke(ye,$),!dt&&(q=se&&se.onVnodeMounted)){const ft=g;Ke(()=>ht(q,ge,ft),$)}(g.shapeFlag&256||ge&&Bs(ge.vnode)&&ge.vnode.shapeFlag&256)&&d.a&&Ke(d.a,$),d.isMounted=!0,g=x=E=null}};d.scope.on();const P=d.effect=new xi(V);d.scope.off();const R=d.update=P.run.bind(P),Y=d.job=P.runIfDirty.bind(P);Y.i=d,Y.id=d.uid,P.scheduler=()=>Vo(Y),Yt(d,!0),R()},le=(d,g,x)=>{g.component=d;const E=d.vnode.props;d.vnode=g,d.next=null,Cc(d,g.props,E,x),Ac(d,g.children,x),Ot(),lr(d),Bt()},ie=(d,g,x,E,$,M,H,V,P=!1)=>{const R=d&&d.children,Y=d?d.shapeFlag:0,q=g.children,{patchFlag:Z,shapeFlag:se}=g;if(Z>0){if(Z&128){_e(R,q,x,E,$,M,H,V,P);return}else if(Z&256){Ae(R,q,x,E,$,M,H,V,P);return}}se&8?(Y&16&&Ee(R,$,M),q!==R&&u(x,q)):Y&16?se&16?_e(R,q,x,E,$,M,H,V,P):Ee(R,$,M,!0):(Y&8&&u(x,""),se&16&&X(q,x,E,$,M,H,V,P))},Ae=(d,g,x,E,$,M,H,V,P)=>{d=d||cs,g=g||cs;const R=d.length,Y=g.length,q=Math.min(R,Y);let Z;for(Z=0;Z<q;Z++){const se=g[Z]=P?Et(g[Z]):vt(g[Z]);S(d[Z],se,x,null,$,M,H,V,P)}R>Y?Ee(d,$,M,!0,!1,q):X(g,x,E,$,M,H,V,P,q)},_e=(d,g,x,E,$,M,H,V,P)=>{let R=0;const Y=g.length;let q=d.length-1,Z=Y-1;for(;R<=q&&R<=Z;){const se=d[R],ue=g[R]=P?Et(g[R]):vt(g[R]);if(es(se,ue))S(se,ue,x,null,$,M,H,V,P);else break;R++}for(;R<=q&&R<=Z;){const se=d[q],ue=g[Z]=P?Et(g[Z]):vt(g[Z]);if(es(se,ue))S(se,ue,x,null,$,M,H,V,P);else break;q--,Z--}if(R>q){if(R<=Z){const se=Z+1,ue=se<Y?g[se].el:E;for(;R<=Z;)S(null,g[R]=P?Et(g[R]):vt(g[R]),x,ue,$,M,H,V,P),R++}}else if(R>Z)for(;R<=q;)xe(d[R],$,M,!0),R++;else{const se=R,ue=R,ye=new Map;for(R=ue;R<=Z;R++){const Je=g[R]=P?Et(g[R]):vt(g[R]);Je.key!=null&&ye.set(Je.key,R)}let ge,We=0;const qe=Z-ue+1;let dt=!1,ft=0;const ys=new Array(qe);for(R=0;R<qe;R++)ys[R]=0;for(R=se;R<=q;R++){const Je=d[R];if(We>=qe){xe(Je,$,M,!0);continue}let pt;if(Je.key!=null)pt=ye.get(Je.key);else for(ge=ue;ge<=Z;ge++)if(ys[ge-ue]===0&&es(Je,g[ge])){pt=ge;break}pt===void 0?xe(Je,$,M,!0):(ys[pt-ue]=R+1,pt>=ft?ft=pt:dt=!0,S(Je,g[pt],x,null,$,M,H,V,P),We++)}const er=dt?Oc(ys):cs;for(ge=er.length-1,R=qe-1;R>=0;R--){const Je=ue+R,pt=g[Je],tr=g[Je+1],sr=Je+1<Y?tr.el||hl(tr):E;ys[R]===0?S(null,pt,x,sr,$,M,H,V,P):dt&&(ge<0||R!==er[ge]?Se(pt,x,sr,2):ge--)}}},Se=(d,g,x,E,$=null)=>{const{el:M,type:H,transition:V,children:P,shapeFlag:R}=d;if(R&6){Se(d.component.subTree,g,x,E);return}if(R&128){d.suspense.move(g,x,E);return}if(R&64){H.move(d,g,x,f);return}if(H===ve){n(M,g,x);for(let q=0;q<P.length;q++)Se(P[q],g,x,E);n(d.anchor,g,x);return}if(H===sn){z(d,g,x);return}if(E!==2&&R&1&&V)if(E===0)V.beforeEnter(M),n(M,g,x),Ke(()=>V.enter(M),$);else{const{leave:q,delayLeave:Z,afterLeave:se}=V,ue=()=>{d.ctx.isUnmounted?o(M):n(M,g,x)},ye=()=>{M._isLeaving&&M[gt](!0),q(M,()=>{ue(),se&&se()})};Z?Z(M,ue,ye):ye()}else n(M,g,x)},xe=(d,g,x,E=!1,$=!1)=>{const{type:M,props:H,ref:V,children:P,dynamicChildren:R,shapeFlag:Y,patchFlag:q,dirs:Z,cacheIndex:se}=d;if(q===-2&&($=!1),V!=null&&(Ot(),Os(V,null,x,d,!0),Bt()),se!=null&&(g.renderCache[se]=void 0),Y&256){g.ctx.deactivate(d);return}const ue=Y&1&&Z,ye=!Bs(d);let ge;if(ye&&(ge=H&&H.onVnodeBeforeUnmount)&&ht(ge,g,d),Y&6)Pe(d.component,x,E);else{if(Y&128){d.suspense.unmount(x,E);return}ue&&Jt(d,null,g,"beforeUnmount"),Y&64?d.type.remove(d,g,x,f,E):R&&!R.hasOnce&&(M!==ve||q>0&&q&64)?Ee(R,g,x,!1,!0):(M===ve&&q&384||!$&&Y&16)&&Ee(P,g,x),E&&De(d)}(ye&&(ge=H&&H.onVnodeUnmounted)||ue)&&Ke(()=>{ge&&ht(ge,g,d),ue&&Jt(d,null,g,"unmounted")},x)},De=d=>{const{type:g,el:x,anchor:E,transition:$}=d;if(g===ve){Qe(x,E);return}if(g===sn){D(d);return}const M=()=>{o(x),$&&!$.persisted&&$.afterLeave&&$.afterLeave()};if(d.shapeFlag&1&&$&&!$.persisted){const{leave:H,delayLeave:V}=$,P=()=>H(x,M);V?V(d.el,M,P):P()}else M()},Qe=(d,g)=>{let x;for(;d!==g;)x=b(d),o(d),d=x;o(g)},Pe=(d,g,x)=>{const{bum:E,scope:$,job:M,subTree:H,um:V,m:P,a:R}=d;xr(P),xr(R),E&&en(E),$.stop(),M&&(M.flags|=8,xe(H,d,g,x)),V&&Ke(V,g),Ke(()=>{d.isUnmounted=!0},g)},Ee=(d,g,x,E=!1,$=!1,M=0)=>{for(let H=M;H<d.length;H++)xe(d[H],g,x,E,$)},O=d=>{if(d.shapeFlag&6)return O(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const g=b(d.anchor||d.el),x=g&&g[za];return x?b(x):g};let T=!1;const m=(d,g,x)=>{let E;d==null?g._vnode&&(xe(g._vnode,null,null,!0),E=g._vnode.component):S(g._vnode||null,d,g,null,null,null,x),g._vnode=d,T||(T=!0,lr(E),ji(),T=!1)},f={p:S,um:xe,m:Se,r:De,mt:k,mc:X,pc:ie,pbc:B,n:O,o:e};return{render:m,hydrate:void 0,createApp:mc(m)}}function Wn({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 Yt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Rc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fl(e,t,s=!1){const n=e.children,o=t.children;if(ee(n)&&ee(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=Et(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&fl(l,a)),a.type===Rn&&(a.patchFlag===-1&&(a=o[r]=Et(a)),a.el=l.el),a.type===Ue&&!a.el&&(a.el=l.el)}}function Oc(e){const t=e.slice(),s=[0];let n,o,r,l,a;const c=e.length;for(n=0;n<c;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<h?r=a+1:l=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function pl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pl(t)}function xr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hl(t.subTree):null}const ml=e=>e.__isSuspense;function Bc(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Va(e)}const ve=Symbol.for("v-fgt"),Rn=Symbol.for("v-txt"),Ue=Symbol.for("v-cmt"),sn=Symbol.for("v-stc"),Ns=[];let Xe=null;function w(e=!1){Ns.push(Xe=e?null:[])}function Pc(){Ns.pop(),Xe=Ns[Ns.length-1]||null}let Hs=1;function mn(e,t=!1){Hs+=e,e<0&&Xe&&t&&(Xe.hasOnce=!0)}function gl(e){return e.dynamicChildren=Hs>0?Xe||cs:null,Pc(),Hs>0&&Xe&&Xe.push(e),e}function _(e,t,s,n,o,r){return gl(i(e,t,s,n,o,r,!0))}function Nc(e,t,s,n,o){return gl(Te(e,t,s,n,o,!0))}function gn(e){return e?e.__v_isVNode===!0:!1}function es(e,t){return e.type===t.type&&e.key===t.key}const vl=({key:e})=>e??null,nn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||je(e)||oe(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===ve?0:1,l=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vl(t),ref:t&&nn(t),scopeId:Vi,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ye};return a?(Uo(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=$e(s)?8:16),Hs>0&&!l&&Xe&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Xe.push(c),c}const Te=Ic;function Ic(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===ic)&&(e=Ue),gn(e)){const a=Wt(e,t,!0);return s&&Uo(a,s),Hs>0&&!r&&Xe&&(a.shapeFlag&6?Xe[Xe.indexOf(e)]=a:Xe.push(a)),a.patchFlag=-2,a}if(Kc(e)&&(e=e.__vccOpts),t){t=Lc(t);let{class:a,style:c}=t;a&&!$e(a)&&(t.class=ne(a)),he(c)&&(Do(c)&&!ee(c)&&(c=Oe({},c)),t.style=Rt(c))}const l=$e(e)?1:ml(e)?128:Ui(e)?64:he(e)?4:oe(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function Lc(e){return e?Do(e)||il(e)?Oe({},e):e:null}function Wt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:c}=e,h=t?jc(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&vl(h),ref:t&&t.ref?s&&r?ee(r)?r.concat(nn(t)):[r,nn(t)]:nn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?l===-1?16:l|16:l,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&&Vs(u,c.clone(u)),u}function K(e=" ",t=0){return Te(Rn,null,e,t)}function tt(e,t){const s=Te(sn,null,e);return s.staticCount=t,s}function J(e="",t=!1){return t?(w(),Nc(Ue,null,e)):Te(Ue,null,e)}function vt(e){return e==null||typeof e=="boolean"?Te(Ue):ee(e)?Te(ve,null,e.slice()):gn(e)?Et(e):Te(Rn,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Wt(e)}function Uo(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ee(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!il(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[K(t)]):s=8);e.children=t,e.shapeFlag|=s}function jc(...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=ne([t.class,n.class]));else if(o==="style")t.style=Rt([t.style,n.style]);else if(yn(o)){const r=t[o],l=n[o];l&&r!==l&&!(ee(r)&&r.includes(l))&&(t[o]=r?[].concat(r,l):l)}else o!==""&&(t[o]=n[o])}return t}function ht(e,t,s,n=null){ct(e,t,7,[s,n])}const Dc=tl();let Vc=0;function Hc(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||Dc,r={uid:Vc++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ua(!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:al(n,o),emitsOptions:sl(n,o),emit:null,emitted:null,propsDefaults:be,inheritAttrs:n.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=vc.bind(null,r),e.ce&&e.ce(r),r}let Le=null;const bl=()=>Le||Ye;let vn,ho;{const e=Cn(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(l=>l(r)):o[0](r)}};vn=t("__VUE_INSTANCE_SETTERS__",s=>Le=s),ho=t("__VUE_SSR_SETTERS__",s=>Fs=s)}const Ks=e=>{const t=Le;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},yr=()=>{Le&&Le.scope.off(),vn(null)};function xl(e){return e.vnode.shapeFlag&4}let Fs=!1;function Fc(e,t=!1,s=!1){t&&ho(t);const{props:n,children:o}=e.vnode,r=xl(e);kc(e,n,r,t),$c(e,o,s||t);const l=r?Uc(e,t):void 0;return t&&ho(!1),l}function Uc(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ac);const{setup:n}=s;if(n){Ot();const o=e.setupContext=n.length>1?Wc(e):null,r=Ks(e),l=qs(n,e,0,[e.props,o]),a=fi(l);if(Bt(),r(),(a||e.sp)&&!Bs(e)&&Yi(e),a){if(l.then(yr,yr),t)return l.then(c=>{wr(e,c)}).catch(c=>{$n(c,e,0)});e.asyncDep=l}else wr(e,l)}else yl(e)}function wr(e,t,s){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=Ni(t)),yl(e)}function yl(e,t,s){const n=e.type;e.render||(e.render=n.render||bt);{const o=Ks(e);Ot();try{cc(e)}finally{Bt(),o()}}}const zc={get(e,t){return Ie(e,"get",""),e[t]}};function Wc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,zc),slots:e.slots,emit:e.emit,expose:t}}function On(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(Ma(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ps)return Ps[s](e)},has(t,s){return s in t||s in Ps}})):e.proxy}function qc(e,t=!0){return oe(e)?e.displayName||e.name:e.name||t&&e.__name}function Kc(e){return oe(e)&&"__vccOpts"in e}const Ne=(e,t)=>Na(e,t,Fs);function zo(e,t,s){try{mn(-1);const n=arguments.length;return n===2?he(t)&&!ee(t)?gn(t)?Te(e,null,[t]):Te(e,t):Te(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&gn(s)&&(s=[s]),Te(e,t,s))}finally{mn(1)}}const Gc="3.5.29";let mo;const _r=typeof window<"u"&&window.trustedTypes;if(_r)try{mo=_r.createPolicy("vue",{createHTML:e=>e})}catch{}const wl=mo?e=>mo.createHTML(e):e=>e,Jc="http://www.w3.org/2000/svg",Yc="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,kr=St&&St.createElement("template"),Xc={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(Jc,e):t==="mathml"?St.createElementNS(Yc,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,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{kr.innerHTML=wl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=kr.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},It="transition",ks="animation",Us=Symbol("_vtc"),_l={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},Qc=Oe({},zi,_l),Zc=e=>(e.displayName="Transition",e.props=Qc,e),Cr=Zc((e,{slots:t})=>zo(Ka,eu(e),t)),Xt=(e,t=[])=>{ee(e)?e.forEach(s=>s(...t)):e&&e(...t)},Sr=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function eu(e){const t={};for(const I in e)I in _l||(t[I]=e[I]);if(e.css===!1)return t;const{name:s="v",type:n,duration:o,enterFromClass:r=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:c=r,appearActiveClass:h=l,appearToClass:u=a,leaveFromClass:p=`${s}-leave-from`,leaveActiveClass:b=`${s}-leave-active`,leaveToClass:y=`${s}-leave-to`}=e,A=tu(o),S=A&&A[0],j=A&&A[1],{onBeforeEnter:U,onEnter:N,onEnterCancelled:z,onLeave:D,onLeaveCancelled:te,onBeforeAppear:ae=U,onAppear:re=N,onAppearCancelled:X=z}=t,C=(I,W,k,G)=>{I._enterCancelled=G,Qt(I,W?u:a),Qt(I,W?h:l),k&&k()},B=(I,W)=>{I._isLeaving=!1,Qt(I,p),Qt(I,y),Qt(I,b),W&&W()},Q=I=>(W,k)=>{const G=I?re:N,me=()=>C(W,I,k);Xt(G,[W,me]),Er(()=>{Qt(W,I?c:r),kt(W,I?u:a),Sr(G)||$r(W,n,S,me)})};return Oe(t,{onBeforeEnter(I){Xt(U,[I]),kt(I,r),kt(I,l)},onBeforeAppear(I){Xt(ae,[I]),kt(I,c),kt(I,h)},onEnter:Q(!1),onAppear:Q(!0),onLeave(I,W){I._isLeaving=!0;const k=()=>B(I,W);kt(I,p),I._enterCancelled?(kt(I,b),Mr(I)):(Mr(I),kt(I,b)),Er(()=>{I._isLeaving&&(Qt(I,p),kt(I,y),Sr(D)||$r(I,n,j,k))}),Xt(D,[I,k])},onEnterCancelled(I){C(I,!1,void 0,!0),Xt(z,[I])},onAppearCancelled(I){C(I,!0,void 0,!0),Xt(X,[I])},onLeaveCancelled(I){B(I),Xt(te,[I])}})}function tu(e){if(e==null)return null;if(he(e))return[qn(e.enter),qn(e.leave)];{const t=qn(e);return[t,t]}}function qn(e){return sa(e)}function kt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Us]||(e[Us]=new Set)).add(t)}function Qt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Us];s&&(s.delete(t),s.size||(e[Us]=void 0))}function Er(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let su=0;function $r(e,t,s,n){const o=e._endId=++su,r=()=>{o===e._endId&&n()};if(s!=null)return setTimeout(r,s);const{type:l,timeout:a,propCount:c}=nu(e,t);if(!l)return n();const h=l+"end";let u=0;const p=()=>{e.removeEventListener(h,b),r()},b=y=>{y.target===e&&++u>=c&&p()};setTimeout(()=>{u<c&&p()},a+1),e.addEventListener(h,b)}function nu(e,t){const s=window.getComputedStyle(e),n=A=>(s[A]||"").split(", "),o=n(`${It}Delay`),r=n(`${It}Duration`),l=Ar(o,r),a=n(`${ks}Delay`),c=n(`${ks}Duration`),h=Ar(a,c);let u=null,p=0,b=0;t===It?l>0&&(u=It,p=l,b=r.length):t===ks?h>0&&(u=ks,p=h,b=c.length):(p=Math.max(l,h),u=p>0?l>h?It:ks:null,b=u?u===It?r.length:c.length:0);const y=u===It&&/\b(?:transform|all)(?:,|$)/.test(n(`${It}Property`).toString());return{type:u,timeout:p,propCount:b,hasTransform:y}}function Ar(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Tr(s)+Tr(e[n])))}function Tr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Mr(e){return(e?e.ownerDocument:document).body.offsetHeight}function ou(e,t,s){const n=e[Us];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const bn=Symbol("_vod"),kl=Symbol("_vsh"),ru={name:"show",beforeMount(e,{value:t},{transition:s}){e[bn]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Cs(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),Cs(e,!0),n.enter(e)):n.leave(e,()=>{Cs(e,!1)}):Cs(e,t))},beforeUnmount(e,{value:t}){Cs(e,t)}};function Cs(e,t){e.style.display=t?e[bn]:"none",e[kl]=!t}const iu=Symbol(""),lu=/(?:^|;)\s*display\s*:/;function au(e,t,s){const n=e.style,o=$e(s);let r=!1;if(s&&!o){if(t)if($e(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&on(n,a,"")}else for(const l in t)s[l]==null&&on(n,l,"");for(const l in s)l==="display"&&(r=!0),on(n,l,s[l])}else if(o){if(t!==s){const l=n[iu];l&&(s+=";"+l),n.cssText=s,r=lu.test(s)}}else t&&e.removeAttribute("style");bn in e&&(e[bn]=r?n.display:"",e[kl]&&(n.display="none"))}const Rr=/\s*!important$/;function on(e,t,s){if(ee(s))s.forEach(n=>on(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=cu(e,t);Rr.test(s)?e.setProperty(Kt(n),s.replace(Rr,""),"important"):e[n]=s}}const Or=["Webkit","Moz","ms"],Kn={};function cu(e,t){const s=Kn[t];if(s)return s;let n=ot(t);if(n!=="filter"&&n in e)return Kn[t]=n;n=_n(n);for(let o=0;o<Or.length;o++){const r=Or[o]+n;if(r in e)return Kn[t]=r}return t}const Br="http://www.w3.org/1999/xlink";function Pr(e,t,s,n,o,r=aa(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Br,t.slice(6,t.length)):e.setAttributeNS(Br,t,s):s==null||r&&!gi(s)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(s)?String(s):s)}function Nr(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?wl(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=gi(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function Tt(e,t,s,n){e.addEventListener(t,s,n)}function uu(e,t,s,n){e.removeEventListener(t,s,n)}const Ir=Symbol("_vei");function du(e,t,s,n,o=null){const r=e[Ir]||(e[Ir]={}),l=r[t];if(n&&l)l.value=n;else{const[a,c]=fu(t);if(n){const h=r[t]=mu(n,o);Tt(e,a,h,c)}else l&&(uu(e,a,l,c),r[t]=void 0)}}const Lr=/(?:Once|Passive|Capture)$/;function fu(e){let t;if(Lr.test(e)){t={};let n;for(;n=e.match(Lr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Kt(e.slice(2)),t]}let Gn=0;const pu=Promise.resolve(),hu=()=>Gn||(pu.then(()=>Gn=0),Gn=Date.now());function mu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ct(gu(n,s.value),t,5,[n])};return s.value=e,s.attached=hu(),s}function gu(e,t){if(ee(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const jr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vu=(e,t,s,n,o,r)=>{const l=o==="svg";t==="class"?ou(e,n,l):t==="style"?au(e,s,n):yn(t)?To(t)||du(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bu(e,t,n,l))?(Nr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pr(e,t,n,l,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(n))?Nr(e,ot(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Pr(e,t,n,l))};function bu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&jr(t)&&oe(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 jr(t)&&$e(s)?!1:t in e}const qt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?s=>en(t,s):t};function xu(e){e.target.composing=!0}function Dr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const nt=Symbol("_assign");function Vr(e,t,s){return t&&(e=e.trim()),s&&(e=kn(e)),e}const Be={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[nt]=qt(o);const r=n||o.props&&o.props.type==="number";Tt(e,t?"change":"input",l=>{l.target.composing||e[nt](Vr(e.value,s,r))}),(s||r)&&Tt(e,"change",()=>{e.value=Vr(e.value,s,r)}),t||(Tt(e,"compositionstart",xu),Tt(e,"compositionend",Dr),Tt(e,"change",Dr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},l){if(e[nt]=qt(l),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?kn(e.value):e.value,c=t??"";a!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c))}},go={deep:!0,created(e,t,s){e[nt]=qt(s),Tt(e,"change",()=>{const n=e._modelValue,o=ms(e),r=e.checked,l=e[nt];if(ee(n)){const a=Oo(n,o),c=a!==-1;if(r&&!c)l(n.concat(o));else if(!r&&c){const h=[...n];h.splice(a,1),l(h)}}else if(bs(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(Cl(e,r))})},mounted:Hr,beforeUpdate(e,t,s){e[nt]=qt(s),Hr(e,t,s)}};function Hr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(ee(t))o=Oo(t,n.props.value)>-1;else if(bs(t))o=t.has(n.props.value);else{if(t===s)return;o=zt(t,Cl(e,!0))}e.checked!==o&&(e.checked=o)}const rn={created(e,{value:t},s){e.checked=zt(t,s.props.value),e[nt]=qt(s),Tt(e,"change",()=>{e[nt](ms(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[nt]=qt(n),t!==s&&(e.checked=zt(t,n.props.value))}},vo={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=bs(t);Tt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?kn(ms(l)):ms(l));e[nt](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Mt(()=>{e._assigning=!1})}),e[nt]=qt(n)},mounted(e,{value:t}){Fr(e,t)},beforeUpdate(e,t,s){e[nt]=qt(s)},updated(e,{value:t}){e._assigning||Fr(e,t)}};function Fr(e,t){const s=e.multiple,n=ee(t);if(!(s&&!n&&!bs(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=ms(l);if(s)if(n){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(h=>String(h)===String(a)):l.selected=Oo(t,a)>-1}else l.selected=t.has(a);else if(zt(ms(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ms(e){return"_value"in e?e._value:e.value}function Cl(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const yu={created(e,t,s){Xs(e,t,s,null,"created")},mounted(e,t,s){Xs(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){Xs(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){Xs(e,t,s,n,"updated")}};function wu(e,t){switch(e){case"SELECT":return vo;case"TEXTAREA":return Be;default:switch(t){case"checkbox":return go;case"radio":return rn;default:return Be}}}function Xs(e,t,s,n,o){const l=wu(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const _u=["ctrl","shift","alt","meta"],ku={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)=>_u.some(s=>e[`${s}Key`]&&!t.includes(s))},Bn=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...r)=>{for(let l=0;l<t.length;l++){const a=ku[t[l]];if(a&&a(o,t))return}return e(o,...r)}))},Cu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=Kt(o.key);if(t.some(l=>l===r||Cu[l]===r))return e(o)}))},Su=Oe({patchProp:vu},Xc);let Ur;function Eu(){return Ur||(Ur=Tc(Su))}const $u=((...e)=>{const t=Eu().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Tu(n);if(!o)return;const r=t._component;!oe(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Au(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Au(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tu(e){return $e(e)?document.querySelector(e):e}const Mu="/icon.png";const as=typeof document<"u";function Sl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ru(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Sl(e.default)}const fe=Object.assign;function Jn(e,t){const s={};for(const n in t){const o=t[n];s[n]=ut(o)?o.map(e):e(o)}return s}const Is=()=>{},ut=Array.isArray;function zr(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}let Ce=(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 El=Symbol("");Ce.MATCHER_NOT_FOUND+"",Ce.NAVIGATION_GUARD_REDIRECT+"",Ce.NAVIGATION_ABORTED+"",Ce.NAVIGATION_CANCELLED+"",Ce.NAVIGATION_DUPLICATED+"";function gs(e,t){return fe(new Error,{type:e,[El]:!0},t)}function Ct(e,t){return e instanceof Error&&El in e&&(t==null||!!(e.type&t))}const Ou=["params","query","hash"];function Bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of Ou)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}const Pu=Symbol(""),Wr=Symbol(""),Pn=Symbol(""),Wo=Symbol(""),bo=Symbol("");function qo(){return lt(Pn)}function Nu(e){return lt(Wo)}const $l=/#/g,Iu=/&/g,Lu=/\//g,ju=/=/g,Du=/\?/g,Al=/\+/g,Vu=/%5B/g,Hu=/%5D/g,Tl=/%5E/g,Fu=/%60/g,Ml=/%7B/g,Uu=/%7C/g,Rl=/%7D/g,zu=/%20/g;function Ko(e){return e==null?"":encodeURI(""+e).replace(Uu,"|").replace(Vu,"[").replace(Hu,"]")}function Wu(e){return Ko(e).replace(Ml,"{").replace(Rl,"}").replace(Tl,"^")}function xo(e){return Ko(e).replace(Al,"%2B").replace(zu,"+").replace($l,"%23").replace(Iu,"%26").replace(Fu,"`").replace(Ml,"{").replace(Rl,"}").replace(Tl,"^")}function qu(e){return xo(e).replace(ju,"%3D")}function Ku(e){return Ko(e).replace($l,"%23").replace(Du,"%3F")}function Gu(e){return Ku(e).replace(Lu,"%2F")}function zs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ju=/\/$/,Yu=e=>e.replace(Ju,"");function Yn(e,t,s="/"){let n,o={},r="",l="";const a=t.indexOf("#");let c=t.indexOf("?");return c=a>=0&&c>a?-1:c,c>=0&&(n=t.slice(0,c),r=t.slice(c,a>0?a:t.length),o=e(r.slice(1))),a>=0&&(n=n||t.slice(0,a),l=t.slice(a,t.length)),n=ed(n??t,s),{fullPath:n+r+l,path:n,query:o,hash:zs(l)}}function Xu(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function qr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Qu(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&vs(t.matched[n],s.matched[o])&&Ol(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function vs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ol(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Zu(e[s],t[s]))return!1;return!0}function Zu(e,t){return ut(e)?Kr(e,t):ut(t)?Kr(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Kr(e,t){return ut(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function ed(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 r=s.length-1,l,a;for(l=0;l<n.length;l++)if(a=n[l],a!==".")if(a==="..")r>1&&r--;else break;return s.slice(0,r).join("/")+"/"+n.slice(l).join("/")}const Lt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let yo=(function(e){return e.pop="pop",e.push="push",e})({}),Xn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function td(e){if(!e)if(as){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Yu(e)}const sd=/^[^#]+#/;function nd(e,t){return e.replace(sd,"#")+t}function od(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 Nn=()=>({left:window.scrollX,top:window.scrollY});function rd(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=od(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 Gr(e,t){return(history.state?history.state.position-t:-1)+e}const wo=new Map;function id(e,t){wo.set(e,t)}function ld(e){const t=wo.get(e);return wo.delete(e),t}function ad(e){return typeof e=="string"||e&&typeof e=="object"}function Bl(e){return typeof e=="string"||typeof e=="symbol"}function cd(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(Al," "),r=o.indexOf("="),l=zs(r<0?o:o.slice(0,r)),a=r<0?null:zs(o.slice(r+1));if(l in t){let c=t[l];ut(c)||(c=t[l]=[c]),c.push(a)}else t[l]=a}return t}function Jr(e){let t="";for(let s in e){const n=e[s];if(s=qu(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(ut(n)?n.map(o=>o&&xo(o)):[n&&xo(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function ud(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=ut(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}function Ss(){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 Vt(e,t,s,n,o,r=l=>l()){const l=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((a,c)=>{const h=b=>{b===!1?c(gs(Ce.NAVIGATION_ABORTED,{from:s,to:t})):b instanceof Error?c(b):ad(b)?c(gs(Ce.NAVIGATION_GUARD_REDIRECT,{from:t,to:b})):(l&&n.enterCallbacks[o]===l&&typeof b=="function"&&l.push(b),a())},u=r(()=>e.call(n&&n.instances[o],t,s,h));let p=Promise.resolve(u);e.length<3&&(p=p.then(h)),p.catch(b=>c(b))})}function Qn(e,t,s,n,o=r=>r()){const r=[];for(const l of e)for(const a in l.components){let c=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(Sl(c)){const h=(c.__vccOpts||c)[t];h&&r.push(Vt(h,s,n,l,a,o))}else{let h=c();r.push(()=>h.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const p=Ru(u)?u.default:u;l.mods[a]=u,l.components[a]=p;const b=(p.__vccOpts||p)[t];return b&&Vt(b,s,n,l,a,o)()}))}}return r}function dd(e,t){const s=[],n=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let l=0;l<r;l++){const a=t.matched[l];a&&(e.matched.find(h=>vs(h,a))?n.push(a):s.push(a));const c=e.matched[l];c&&(t.matched.find(h=>vs(h,c))||o.push(c))}return[s,n,o]}let fd=()=>location.protocol+"//"+location.host;function Pl(e,t){const{pathname:s,search:n,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,a=o.slice(l);return a[0]!=="/"&&(a="/"+a),qr(a,"")}return qr(s,e)+n+o}function pd(e,t,s,n){let o=[],r=[],l=null;const a=({state:b})=>{const y=Pl(e,location),A=s.value,S=t.value;let j=0;if(b){if(s.value=y,t.value=b,l&&l===A){l=null;return}j=S?b.position-S.position:0}else n(y);o.forEach(U=>{U(s.value,A,{delta:j,type:yo.pop,direction:j?j>0?Xn.forward:Xn.back:Xn.unknown})})};function c(){l=s.value}function h(b){o.push(b);const y=()=>{const A=o.indexOf(b);A>-1&&o.splice(A,1)};return r.push(y),y}function u(){if(document.visibilityState==="hidden"){const{history:b}=window;if(!b.state)return;b.replaceState(fe({},b.state,{scroll:Nn()}),"")}}function p(){for(const b of r)b();r=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:h,destroy:p}}function Yr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?Nn():null}}function hd(e){const{history:t,location:s}=window,n={value:Pl(e,s)},o={value:t.state};o.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,h,u){const p=e.indexOf("#"),b=p>-1?(s.host&&document.querySelector("base")?e:e.slice(p))+c:fd()+e+c;try{t[u?"replaceState":"pushState"](h,"",b),o.value=h}catch(y){console.error(y),s[u?"replace":"assign"](b)}}function l(c,h){r(c,fe({},t.state,Yr(o.value.back,c,o.value.forward,!0),h,{position:o.value.position}),!0),n.value=c}function a(c,h){const u=fe({},o.value,t.state,{forward:c,scroll:Nn()});r(u.current,u,!0),r(c,fe({},Yr(n.value,c,null),{position:u.position+1},h),!1),n.value=c}return{location:n,state:o,push:a,replace:l}}function md(e){e=td(e);const t=hd(e),s=pd(e,t.state,t.location,t.replace);function n(r,l=!0){l||s.pauseListeners(),history.go(r)}const o=fe({location:"",base:e,go:n,createHref:nd.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}let ts=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Re=(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})(Re||{});const gd={type:ts.Static,value:""},vd=/[a-zA-Z0-9_]/;function bd(e){if(!e)return[[]];if(e==="/")return[[gd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${s})/"${h}": ${y}`)}let s=Re.Static,n=s;const o=[];let r;function l(){r&&o.push(r),r=[]}let a=0,c,h="",u="";function p(){h&&(s===Re.Static?r.push({type:ts.Static,value:h}):s===Re.Param||s===Re.ParamRegExp||s===Re.ParamRegExpEnd?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),r.push({type:ts.Param,value:h,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),h="")}function b(){h+=c}for(;a<e.length;){if(c=e[a++],c==="\\"&&s!==Re.ParamRegExp){n=s,s=Re.EscapeNext;continue}switch(s){case Re.Static:c==="/"?(h&&p(),l()):c===":"?(p(),s=Re.Param):b();break;case Re.EscapeNext:b(),s=n;break;case Re.Param:c==="("?s=Re.ParamRegExp:vd.test(c)?b():(p(),s=Re.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--);break;case Re.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:s=Re.ParamRegExpEnd:u+=c;break;case Re.ParamRegExpEnd:p(),s=Re.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--,u="";break;default:t("Unknown state");break}}return s===Re.ParamRegExp&&t(`Unfinished custom RegExp for param "${h}"`),p(),l(),o}const Xr="[^/]+?",xd={sensitive:!1,strict:!1,start:!0,end:!0};var He=(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})(He||{});const yd=/[.+*?^${}()[\]/\\]/g;function wd(e,t){const s=fe({},xd,t),n=[];let o=s.start?"^":"";const r=[];for(const h of e){const u=h.length?[]:[He.Root];s.strict&&!h.length&&(o+="/");for(let p=0;p<h.length;p++){const b=h[p];let y=He.Segment+(s.sensitive?He.BonusCaseSensitive:0);if(b.type===ts.Static)p||(o+="/"),o+=b.value.replace(yd,"\\$&"),y+=He.Static;else if(b.type===ts.Param){const{value:A,repeatable:S,optional:j,regexp:U}=b;r.push({name:A,repeatable:S,optional:j});const N=U||Xr;if(N!==Xr){y+=He.BonusCustomRegExp;try{new RegExp(`(${N})`)}catch(D){throw new Error(`Invalid custom RegExp for param "${A}" (${N}): `+D.message)}}let z=S?`((?:${N})(?:/(?:${N}))*)`:`(${N})`;p||(z=j&&h.length<2?`(?:/${z})`:"/"+z),j&&(z+="?"),o+=z,y+=He.Dynamic,j&&(y+=He.BonusOptional),S&&(y+=He.BonusRepeatable),N===".*"&&(y+=He.BonusWildcard)}u.push(y)}n.push(u)}if(s.strict&&s.end){const h=n.length-1;n[h][n[h].length-1]+=He.BonusStrict}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const l=new RegExp(o,s.sensitive?"":"i");function a(h){const u=h.match(l),p={};if(!u)return null;for(let b=1;b<u.length;b++){const y=u[b]||"",A=r[b-1];p[A.name]=y&&A.repeatable?y.split("/"):y}return p}function c(h){let u="",p=!1;for(const b of e){(!p||!u.endsWith("/"))&&(u+="/"),p=!1;for(const y of b)if(y.type===ts.Static)u+=y.value;else if(y.type===ts.Param){const{value:A,repeatable:S,optional:j}=y,U=A in h?h[A]:"";if(ut(U)&&!S)throw new Error(`Provided param "${A}" is an array but it is not repeatable (* or + modifiers)`);const N=ut(U)?U.join("/"):U;if(!N)if(j)b.length<2&&(u.endsWith("/")?u=u.slice(0,-1):p=!0);else throw new Error(`Missing required param "${A}"`);u+=N}}return u||"/"}return{re:l,score:n,keys:r,parse:a,stringify:c}}function _d(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]===He.Static+He.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===He.Static+He.Segment?1:-1:0}function Nl(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const r=_d(n[s],o[s]);if(r)return r;s++}if(Math.abs(o.length-n.length)===1){if(Qr(n))return 1;if(Qr(o))return-1}return o.length-n.length}function Qr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const kd={strict:!1,end:!0,sensitive:!1};function Cd(e,t,s){const n=wd(bd(e.path),s),o=fe(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Sd(e,t){const s=[],n=new Map;t=zr(kd,t);function o(p){return n.get(p)}function r(p,b,y){const A=!y,S=ei(p);S.aliasOf=y&&y.record;const j=zr(t,p),U=[S];if("alias"in p){const D=typeof p.alias=="string"?[p.alias]:p.alias;for(const te of D)U.push(ei(fe({},S,{components:y?y.record.components:S.components,path:te,aliasOf:y?y.record:S})))}let N,z;for(const D of U){const{path:te}=D;if(b&&te[0]!=="/"){const ae=b.record.path,re=ae[ae.length-1]==="/"?"":"/";D.path=b.record.path+(te&&re+te)}if(N=Cd(D,b,j),y?y.alias.push(N):(z=z||N,z!==N&&z.alias.push(N),A&&p.name&&!ti(N)&&l(p.name)),Il(N)&&c(N),S.children){const ae=S.children;for(let re=0;re<ae.length;re++)r(ae[re],N,y&&y.children[re])}y=y||N}return z?()=>{l(z)}:Is}function l(p){if(Bl(p)){const b=n.get(p);b&&(n.delete(p),s.splice(s.indexOf(b),1),b.children.forEach(l),b.alias.forEach(l))}else{const b=s.indexOf(p);b>-1&&(s.splice(b,1),p.record.name&&n.delete(p.record.name),p.children.forEach(l),p.alias.forEach(l))}}function a(){return s}function c(p){const b=Ad(p,s);s.splice(b,0,p),p.record.name&&!ti(p)&&n.set(p.record.name,p)}function h(p,b){let y,A={},S,j;if("name"in p&&p.name){if(y=n.get(p.name),!y)throw gs(Ce.MATCHER_NOT_FOUND,{location:p});j=y.record.name,A=fe(Zr(b.params,y.keys.filter(z=>!z.optional).concat(y.parent?y.parent.keys.filter(z=>z.optional):[]).map(z=>z.name)),p.params&&Zr(p.params,y.keys.map(z=>z.name))),S=y.stringify(A)}else if(p.path!=null)S=p.path,y=s.find(z=>z.re.test(S)),y&&(A=y.parse(S),j=y.record.name);else{if(y=b.name?n.get(b.name):s.find(z=>z.re.test(b.path)),!y)throw gs(Ce.MATCHER_NOT_FOUND,{location:p,currentLocation:b});j=y.record.name,A=fe({},b.params,p.params),S=y.stringify(A)}const U=[];let N=y;for(;N;)U.unshift(N.record),N=N.parent;return{name:j,path:S,params:A,matched:U,meta:$d(U)}}e.forEach(p=>r(p));function u(){s.length=0,n.clear()}return{addRoute:r,resolve:h,removeRoute:l,clearRoutes:u,getRoutes:a,getRecordMatcher:o}}function Zr(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function ei(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ed(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 Ed(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 ti(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $d(e){return e.reduce((t,s)=>fe(t,s.meta),{})}function Ad(e,t){let s=0,n=t.length;for(;s!==n;){const r=s+n>>1;Nl(e,t[r])<0?n=r:s=r+1}const o=Td(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function Td(e){let t=e;for(;t=t.parent;)if(Il(t)&&Nl(e,t)===0)return t}function Il({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function si(e){const t=lt(Pn),s=lt(Wo),n=Ne(()=>{const c=ds(e.to);return t.resolve(c)}),o=Ne(()=>{const{matched:c}=n.value,{length:h}=c,u=c[h-1],p=s.matched;if(!u||!p.length)return-1;const b=p.findIndex(vs.bind(null,u));if(b>-1)return b;const y=ni(c[h-2]);return h>1&&ni(u)===y&&p[p.length-1].path!==y?p.findIndex(vs.bind(null,c[h-2])):b}),r=Ne(()=>o.value>-1&&Pd(s.params,n.value.params)),l=Ne(()=>o.value>-1&&o.value===s.matched.length-1&&Ol(s.params,n.value.params));function a(c={}){if(Bd(c)){const h=t[ds(e.replace)?"replace":"push"](ds(e.to)).catch(Is);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>h),h}return Promise.resolve()}return{route:n,href:Ne(()=>n.value.href),isActive:r,isExactActive:l,navigate:a}}function Md(e){return e.length===1?e[0]:e}const Rd=Ji({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:si,setup(e,{slots:t}){const s=En(si(e)),{options:n}=lt(Pn),o=Ne(()=>({[oi(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[oi(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const r=t.default&&Md(t.default(s));return e.custom?r:zo("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),Od=Rd;function Bd(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(!ut(o)||o.length!==n.length||n.some((r,l)=>r.valueOf()!==o[l].valueOf()))return!1}return!0}function ni(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const oi=(e,t,s)=>e??t??s,Nd=Ji({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=lt(bo),o=Ne(()=>e.route||n.value),r=lt(Wr,0),l=Ne(()=>{let h=ds(r);const{matched:u}=o.value;let p;for(;(p=u[h])&&!p.components;)h++;return h}),a=Ne(()=>o.value.matched[l.value]);tn(Wr,Ne(()=>l.value+1)),tn(Pu,a),tn(bo,o);const c=F();return Ft(()=>[c.value,a.value,e.name],([h,u,p],[b,y,A])=>{u&&(u.instances[p]=h,y&&y!==u&&h&&h===b&&(u.leaveGuards.size||(u.leaveGuards=y.leaveGuards),u.updateGuards.size||(u.updateGuards=y.updateGuards))),h&&u&&(!y||!vs(u,y)||!b)&&(u.enterCallbacks[p]||[]).forEach(S=>S(h))},{flush:"post"}),()=>{const h=o.value,u=e.name,p=a.value,b=p&&p.components[u];if(!b)return ri(s.default,{Component:b,route:h});const y=p.props[u],A=y?y===!0?h.params:typeof y=="function"?y(h):y:null,j=zo(b,fe({},A,t,{onVnodeUnmounted:U=>{U.component.isUnmounted&&(p.instances[u]=null)},ref:c}));return ri(s.default,{Component:j,route:h})||j}}});function ri(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Id=Nd;function Ld(e){const t=Sd(e.routes,e),s=e.parseQuery||cd,n=e.stringifyQuery||Jr,o=e.history,r=Ss(),l=Ss(),a=Ss(),c=Ra(Lt);let h=Lt;as&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Jn.bind(null,O=>""+O),p=Jn.bind(null,Gu),b=Jn.bind(null,zs);function y(O,T){let m,f;return Bl(O)?(m=t.getRecordMatcher(O),f=T):f=O,t.addRoute(f,m)}function A(O){const T=t.getRecordMatcher(O);T&&t.removeRoute(T)}function S(){return t.getRoutes().map(O=>O.record)}function j(O){return!!t.getRecordMatcher(O)}function U(O,T){if(T=fe({},T||c.value),typeof O=="string"){const x=Yn(s,O,T.path),E=t.resolve({path:x.path},T),$=o.createHref(x.fullPath);return fe(x,E,{params:b(E.params),hash:zs(x.hash),redirectedFrom:void 0,href:$})}let m;if(O.path!=null)m=fe({},O,{path:Yn(s,O.path,T.path).path});else{const x=fe({},O.params);for(const E in x)x[E]==null&&delete x[E];m=fe({},O,{params:p(x)}),T.params=p(T.params)}const f=t.resolve(m,T),v=O.hash||"";f.params=u(b(f.params));const d=Xu(n,fe({},O,{hash:Wu(v),path:f.path})),g=o.createHref(d);return fe({fullPath:d,hash:v,query:n===Jr?ud(O.query):O.query||{}},f,{redirectedFrom:void 0,href:g})}function N(O){return typeof O=="string"?Yn(s,O,c.value.path):fe({},O)}function z(O,T){if(h!==O)return gs(Ce.NAVIGATION_CANCELLED,{from:T,to:O})}function D(O){return re(O)}function te(O){return D(fe(N(O),{replace:!0}))}function ae(O,T){const m=O.matched[O.matched.length-1];if(m&&m.redirect){const{redirect:f}=m;let v=typeof f=="function"?f(O,T):f;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=N(v):{path:v},v.params={}),fe({query:O.query,hash:O.hash,params:v.path!=null?{}:O.params},v)}}function re(O,T){const m=h=U(O),f=c.value,v=O.state,d=O.force,g=O.replace===!0,x=ae(m,f);if(x)return re(fe(N(x),{state:typeof x=="object"?fe({},v,x.state):v,force:d,replace:g}),T||m);const E=m;E.redirectedFrom=T;let $;return!d&&Qu(n,f,m)&&($=gs(Ce.NAVIGATION_DUPLICATED,{to:E,from:f}),Se(f,f,!0,!1)),($?Promise.resolve($):B(E,f)).catch(M=>Ct(M)?Ct(M,Ce.NAVIGATION_GUARD_REDIRECT)?M:_e(M):ie(M,E,f)).then(M=>{if(M){if(Ct(M,Ce.NAVIGATION_GUARD_REDIRECT))return re(fe({replace:g},N(M.to),{state:typeof M.to=="object"?fe({},v,M.to.state):v,force:d}),T||E)}else M=I(E,f,!0,g,v);return Q(E,f,M),M})}function X(O,T){const m=z(O,T);return m?Promise.reject(m):Promise.resolve()}function C(O){const T=Qe.values().next().value;return T&&typeof T.runWithContext=="function"?T.runWithContext(O):O()}function B(O,T){let m;const[f,v,d]=dd(O,T);m=Qn(f.reverse(),"beforeRouteLeave",O,T);for(const x of f)x.leaveGuards.forEach(E=>{m.push(Vt(E,O,T))});const g=X.bind(null,O,T);return m.push(g),Ee(m).then(()=>{m=[];for(const x of r.list())m.push(Vt(x,O,T));return m.push(g),Ee(m)}).then(()=>{m=Qn(v,"beforeRouteUpdate",O,T);for(const x of v)x.updateGuards.forEach(E=>{m.push(Vt(E,O,T))});return m.push(g),Ee(m)}).then(()=>{m=[];for(const x of d)if(x.beforeEnter)if(ut(x.beforeEnter))for(const E of x.beforeEnter)m.push(Vt(E,O,T));else m.push(Vt(x.beforeEnter,O,T));return m.push(g),Ee(m)}).then(()=>(O.matched.forEach(x=>x.enterCallbacks={}),m=Qn(d,"beforeRouteEnter",O,T,C),m.push(g),Ee(m))).then(()=>{m=[];for(const x of l.list())m.push(Vt(x,O,T));return m.push(g),Ee(m)}).catch(x=>Ct(x,Ce.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function Q(O,T,m){a.list().forEach(f=>C(()=>f(O,T,m)))}function I(O,T,m,f,v){const d=z(O,T);if(d)return d;const g=T===Lt,x=as?history.state:{};m&&(f||g?o.replace(O.fullPath,fe({scroll:g&&x&&x.scroll},v)):o.push(O.fullPath,v)),c.value=O,Se(O,T,m,g),_e()}let W;function k(){W||(W=o.listen((O,T,m)=>{if(!Pe.listening)return;const f=U(O),v=ae(f,Pe.currentRoute.value);if(v){re(fe(v,{replace:!0,force:!0}),f).catch(Is);return}h=f;const d=c.value;as&&id(Gr(d.fullPath,m.delta),Nn()),B(f,d).catch(g=>Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_CANCELLED)?g:Ct(g,Ce.NAVIGATION_GUARD_REDIRECT)?(re(fe(N(g.to),{force:!0}),f).then(x=>{Ct(x,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&!m.delta&&m.type===yo.pop&&o.go(-1,!1)}).catch(Is),Promise.reject()):(m.delta&&o.go(-m.delta,!1),ie(g,f,d))).then(g=>{g=g||I(f,d,!1),g&&(m.delta&&!Ct(g,Ce.NAVIGATION_CANCELLED)?o.go(-m.delta,!1):m.type===yo.pop&&Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Q(f,d,g)}).catch(Is)}))}let G=Ss(),me=Ss(),le;function ie(O,T,m){_e(O);const f=me.list();return f.length?f.forEach(v=>v(O,T,m)):console.error(O),Promise.reject(O)}function Ae(){return le&&c.value!==Lt?Promise.resolve():new Promise((O,T)=>{G.add([O,T])})}function _e(O){return le||(le=!O,k(),G.list().forEach(([T,m])=>O?m(O):T()),G.reset()),O}function Se(O,T,m,f){const{scrollBehavior:v}=e;if(!as||!v)return Promise.resolve();const d=!m&&ld(Gr(O.fullPath,0))||(f||!m)&&history.state&&history.state.scroll||null;return Mt().then(()=>v(O,T,d)).then(g=>g&&rd(g)).catch(g=>ie(g,O,T))}const xe=O=>o.go(O);let De;const Qe=new Set,Pe={currentRoute:c,listening:!0,addRoute:y,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:j,getRoutes:S,resolve:U,options:e,push:D,replace:te,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:l.add,afterEach:a.add,onError:me.add,isReady:Ae,install(O){O.component("RouterLink",Od),O.component("RouterView",Id),O.config.globalProperties.$router=Pe,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>ds(c)}),as&&!De&&c.value===Lt&&(De=!0,D(o.location).catch(f=>{}));const T={};for(const f in Lt)Object.defineProperty(T,f,{get:()=>c.value[f],enumerable:!0});O.provide(Pn,Pe),O.provide(Wo,Bi(T)),O.provide(bo,c);const m=O.unmount;Qe.add(O),O.unmount=function(){Qe.delete(O),Qe.size<1&&(h=Lt,W&&W(),W=null,c.value=Lt,De=!1,le=!1),m()}}};function Ee(O){return O.reduce((T,m)=>T.then(()=>C(m)),Promise.resolve())}return Pe}const jd={class:"min-h-screen bg-slate-900 text-slate-200 font-sans"},Dd={key:0,class:"border-b border-slate-800 bg-slate-900/50 backdrop-blur-xl sticky top-0 z-50"},Vd={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},Hd={class:"flex justify-between h-16 items-center"},Fd={class:"flex items-center space-x-3"},Ud={class:"flex items-center space-x-1 sm:space-x-2"},zd={__name:"App",setup(e){const t=qo(),s=Nu(),n=F(!!localStorage.getItem("pm2me_token"));Ft(s,()=>{n.value=!!localStorage.getItem("pm2me_token")});const o=()=>{localStorage.removeItem("pm2me_token"),n.value=!1,t.push("/login")};return(r,l)=>{const a=rc("router-view");return w(),_("div",jd,[n.value&&!["/setup","/login"].includes(r.$route.path)?(w(),_("nav",Dd,[i("div",Vd,[i("div",Hd,[i("div",Fd,[i("img",{src:Mu,alt:"PM2Me",class:"w-8 h-8 rounded-lg shadow-lg shadow-blue-500/30 cursor-pointer",onClick:l[0]||(l[0]=c=>r.$router.push("/"))}),i("span",{class:"text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-400 cursor-pointer",onClick:l[1]||(l[1]=c=>r.$router.push("/"))},"PM2Me")]),i("div",Ud,[i("button",{onClick:l[2]||(l[2]=c=>r.$router.push("/")),class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[6]||(l[6]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})],-1),i("span",null,"Home",-1)])],2),i("button",{onClick:[l[3]||(l[3]=c=>r.$router.push("/settings")),l[4]||(l[4]=Bn(c=>r.$router.push("/nginx"),["prevent"]))],class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/nginx"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[7]||(l[7]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})],-1),i("span",null,"Nginx",-1)])],2),i("button",{onClick:l[5]||(l[5]=c=>r.$router.push("/settings")),class:ne(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/settings"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[8]||(l[8]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),i("span",null,"Settings",-1)])],2),l[10]||(l[10]=i("div",{class:"w-px h-4 bg-slate-800 mx-1 hidden sm:block"},null,-1)),i("button",{onClick:o,class:"flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium text-slate-400 hover:text-red-400 hover:bg-red-400/10 transition-all duration-200"},[...l[9]||(l[9]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),i("span",{class:"hidden sm:inline"},"Logout",-1)])])])])])])):J("",!0),i("main",null,[Te(a)])])}}},Wd={class:"min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"},qd={class:"max-w-md w-full space-y-8 bg-slate-800 p-10 rounded-2xl shadow-2xl border border-slate-700/50 backdrop-blur-sm relative overflow-hidden"},Kd={class:"rounded-md shadow-sm -space-y-px"},Gd={key:0,class:"text-red-400 text-sm text-center bg-red-400/10 py-2 rounded-lg border border-red-400/20"},Jd=["disabled"],Yd={key:0,class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24"},Xd={key:1,class:"absolute left-0 inset-y-0 flex items-center pl-3"},Qd={__name:"Login",setup(e){const t=qo(),s=F(""),n=F(""),o=F(!1);Gt(async()=>{try{(await(await fetch("/api/setup/status")).json()).needsSetup&&(window.location.href="/setup")}catch{}});const r=async()=>{o.value=!0,n.value="";try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:s.value})}),a=await l.json();l.ok&&a.token?(localStorage.setItem("pm2me_token",a.token),t.push("/")):n.value=a.error||"Login failed"}catch{n.value="Failed to connect to server"}finally{o.value=!1}};return(l,a)=>(w(),_("div",Wd,[i("div",qd,[a[5]||(a[5]=tt('<div class="absolute -top-10 -right-10 w-40 h-40 bg-blue-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="absolute -bottom-10 -left-10 w-40 h-40 bg-indigo-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="relative z-10 text-center"><div class="mx-auto w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white text-3xl font-bold shadow-lg shadow-blue-500/30 mb-6"> P </div><h2 class="mt-2 text-3xl font-extrabold text-white tracking-tight">PM2Me</h2><p class="mt-2 text-sm text-slate-400">Sign in to manage your deployments</p></div>',3)),i("form",{class:"relative z-10 mt-8 space-y-6",onSubmit:Bn(r,["prevent"])},[i("div",Kd,[i("div",null,[a[1]||(a[1]=i("label",{for:"password",class:"sr-only"},"Password",-1)),ke(i("input",{id:"password","onUpdate:modelValue":a[0]||(a[0]=c=>s.value=c),name:"password",type:"password",required:"",class:"appearance-none rounded-lg relative block w-full px-4 py-3 border border-slate-600 bg-slate-900/50 placeholder-slate-400 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 sm:text-sm",placeholder:"Admin Password (or set initial)"},null,512),[[Be,s.value]])])]),n.value?(w(),_("div",Gd,L(n.value),1)):J("",!0),i("div",null,[i("button",{type:"submit",disabled:o.value,class:"group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-lg text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 focus:ring-offset-slate-900 shadow-lg shadow-blue-500/30 transition-all duration-200 disabled:opacity-70 disabled:cursor-not-allowed"},[o.value?(w(),_("svg",Yd,[...a[2]||(a[2]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("span",Xd,[...a[3]||(a[3]=[i("svg",{class:"h-5 w-5 text-indigo-300 group-hover:text-indigo-200 transition-colors",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[i("path",{"fill-rule":"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z","clip-rule":"evenodd"})],-1)])])),a[4]||(a[4]=K(" Sign in ",-1))],8,Jd)])],32)])]))}},wt=Object.create(null);wt.open="0";wt.close="1";wt.ping="2";wt.pong="3";wt.message="4";wt.upgrade="5";wt.noop="6";const ln=Object.create(null);Object.keys(wt).forEach(e=>{ln[wt[e]]=e});const _o={type:"error",data:"parser error"},Ll=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jl=typeof ArrayBuffer=="function",Dl=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Go=({type:e,data:t},s,n)=>Ll&&t instanceof Blob?s?n(t):ii(t,n):jl&&(t instanceof ArrayBuffer||Dl(t))?s?n(t):ii(new Blob([t]),n):n(wt[e]+(t||"")),ii=(e,t)=>{const s=new FileReader;return s.onload=function(){const n=s.result.split(",")[1];t("b"+(n||""))},s.readAsDataURL(e)};function li(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zn;function Zd(e,t){if(Ll&&e.data instanceof Blob)return e.data.arrayBuffer().then(li).then(t);if(jl&&(e.data instanceof ArrayBuffer||Dl(e.data)))return t(li(e.data));Go(e,!1,s=>{Zn||(Zn=new TextEncoder),t(Zn.encode(s))})}const ai="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",As=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ai.length;e++)As[ai.charCodeAt(e)]=e;const ef=e=>{let t=e.length*.75,s=e.length,n,o=0,r,l,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),u=new Uint8Array(h);for(n=0;n<s;n+=4)r=As[e.charCodeAt(n)],l=As[e.charCodeAt(n+1)],a=As[e.charCodeAt(n+2)],c=As[e.charCodeAt(n+3)],u[o++]=r<<2|l>>4,u[o++]=(l&15)<<4|a>>2,u[o++]=(a&3)<<6|c&63;return h},tf=typeof ArrayBuffer=="function",Jo=(e,t)=>{if(typeof e!="string")return{type:"message",data:Vl(e,t)};const s=e.charAt(0);return s==="b"?{type:"message",data:sf(e.substring(1),t)}:ln[s]?e.length>1?{type:ln[s],data:e.substring(1)}:{type:ln[s]}:_o},sf=(e,t)=>{if(tf){const s=ef(e);return Vl(s,t)}else return{base64:!0,data:e}},Vl=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Hl="",nf=(e,t)=>{const s=e.length,n=new Array(s);let o=0;e.forEach((r,l)=>{Go(r,!1,a=>{n[l]=a,++o===s&&t(n.join(Hl))})})},of=(e,t)=>{const s=e.split(Hl),n=[];for(let o=0;o<s.length;o++){const r=Jo(s[o],t);if(n.push(r),r.type==="error")break}return n};function rf(){return new TransformStream({transform(e,t){Zd(e,s=>{const n=s.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const r=new DataView(o.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{o=new Uint8Array(9);const r=new DataView(o.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(s)})}})}let eo;function Qs(e){return e.reduce((t,s)=>t+s.length,0)}function Zs(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let n=0;for(let o=0;o<t;o++)s[o]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),s}function lf(e,t){eo||(eo=new TextDecoder);const s=[];let n=0,o=-1,r=!1;return new TransformStream({transform(l,a){for(s.push(l);;){if(n===0){if(Qs(s)<1)break;const c=Zs(s,1);r=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Qs(s)<2)break;const c=Zs(s,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Qs(s)<8)break;const c=Zs(s,8),h=new DataView(c.buffer,c.byteOffset,c.length),u=h.getUint32(0);if(u>Math.pow(2,21)-1){a.enqueue(_o);break}o=u*Math.pow(2,32)+h.getUint32(4),n=3}else{if(Qs(s)<o)break;const c=Zs(s,o);a.enqueue(Jo(r?c:eo.decode(c),t)),n=0}if(o===0||o>e){a.enqueue(_o);break}}}})}const Fl=4;function Me(e){if(e)return af(e)}function af(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+e];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<s.length;o++)if(n=s[o],n===t||n.fn===t){s.splice(o,1);break}return s.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(s){s=s.slice(0);for(var n=0,o=s.length;n<o;++n)s[n].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const In=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,s)=>s(t,0),et=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cf="arraybuffer";function Ul(e,...t){return t.reduce((s,n)=>(e.hasOwnProperty(n)&&(s[n]=e[n]),s),{})}const uf=et.setTimeout,df=et.clearTimeout;function Ln(e,t){t.useNativeTimers?(e.setTimeoutFn=uf.bind(et),e.clearTimeoutFn=df.bind(et)):(e.setTimeoutFn=et.setTimeout.bind(et),e.clearTimeoutFn=et.clearTimeout.bind(et))}const ff=1.33;function pf(e){return typeof e=="string"?hf(e):Math.ceil((e.byteLength||e.size)*ff)}function hf(e){let t=0,s=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(n++,s+=4);return s}function zl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mf(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}function gf(e){let t={},s=e.split("&");for(let n=0,o=s.length;n<o;n++){let r=s[n].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}class vf extends Error{constructor(t,s,n){super(t),this.description=s,this.context=n,this.type="TransportError"}}class Yo extends Me{constructor(t){super(),this.writable=!1,Ln(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,n){return super.emitReserved("error",new vf(t,s,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=Jo(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,s={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const s=mf(t);return s.length?"?"+s:""}}class bf extends Yo{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const s=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||s()})),this.writable||(n++,this.once("drain",function(){--n||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};of(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nf(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=zl()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let Wl=!1;try{Wl=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xf=Wl;function yf(){}class wf extends bf{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let n=location.port;n||(n=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,s){const n=this.request({method:"POST",data:t});n.on("success",s),n.on("error",(o,r)=>{this.onError("xhr post error",o,r)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,n)=>{this.onError("xhr poll error",s,n)}),this.pollXhr=t}}class xt extends Me{constructor(t,s,n){super(),this.createRequest=t,Ln(this,n),this._opts=n,this._method=n.method||"GET",this._uri=s,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const s=Ul(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(s);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=xt.requestsCount++,xt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=yf,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xt.requestsCount=0;xt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ci);else if(typeof addEventListener=="function"){const e="onpagehide"in et?"pagehide":"unload";addEventListener(e,ci,!1)}}function ci(){for(let e in xt.requests)xt.requests.hasOwnProperty(e)&&xt.requests[e].abort()}const _f=(function(){const e=ql({xdomain:!1});return e&&e.responseType!==null})();class kf extends wf{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=_f&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xt(ql,this.uri(),t)}}function ql(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||xf))return new XMLHttpRequest}catch{}if(!t)try{return new et[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Kl=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Cf extends Yo{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,n=Kl?{}:Ul(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;Go(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}o&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=zl()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const to=et.WebSocket||et.MozWebSocket;class Sf extends Cf{createSocket(t,s,n){return Kl?new to(t,s,n):s?new to(t,s):new to(t)}doWrite(t,s){this.ws.send(s)}}class Ef extends Yo{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=lf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(s).getReader(),o=rf();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const r=()=>{n.read().then(({done:a,value:c})=>{a||(this.onPacket(c),r())}).catch(a=>{})};r();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;this._writer.write(n).then(()=>{o&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const $f={websocket:Sf,webtransport:Ef,polling:kf},Af=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Tf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ko(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),n=e.indexOf("]");s!=-1&&n!=-1&&(e=e.substring(0,s)+e.substring(s,n).replace(/:/g,";")+e.substring(n,e.length));let o=Af.exec(e||""),r={},l=14;for(;l--;)r[Tf[l]]=o[l]||"";return s!=-1&&n!=-1&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Mf(r,r.path),r.queryKey=Rf(r,r.query),r}function Mf(e,t){const s=/\/{2,9}/g,n=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Rf(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,r){o&&(s[o]=r)}),s}const Co=typeof addEventListener=="function"&&typeof removeEventListener=="function",an=[];Co&&addEventListener("offline",()=>{an.forEach(e=>e())},!1);class Ut extends Me{constructor(t,s){if(super(),this.binaryType=cf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const n=ko(t);s.hostname=n.host,s.secure=n.protocol==="https"||n.protocol==="wss",s.port=n.port,n.query&&(s.query=n.query)}else s.host&&(s.hostname=ko(s.host).host);Ln(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(n=>{const o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gf(this.opts.query)),Co&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},an.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Fl,s.transport=t,this.id&&(s.sid=this.id);const n=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ut.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",Ut.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(s+=pf(o)),n>0&&s>this._maxPayload)return this.writeBuffer.slice(0,n);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,In(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,n){return this._sendPacket("message",t,s,n),this}send(t,s,n){return this._sendPacket("message",t,s,n),this}_sendPacket(t,s,n,o){if(typeof s=="function"&&(o=s,s=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:t,data:s,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},n=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Ut.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Co&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=an.indexOf(this._offlineEventListener);n!==-1&&an.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}Ut.protocol=Fl;class Of extends Ut{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let s=this.createTransport(t),n=!1;Ut.priorWebsocketSuccess=!1;const o=()=>{n||(s.send([{type:"ping",data:"probe"}]),s.once("packet",p=>{if(!n)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Ut.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=s.name,this.emitReserved("upgradeError",b)}}))};function r(){n||(n=!0,u(),s.close(),s=null)}const l=p=>{const b=new Error("probe error: "+p);b.transport=s.name,r(),this.emitReserved("upgradeError",b)};function a(){l("transport closed")}function c(){l("socket closed")}function h(p){s&&p.name!==s.name&&r()}const u=()=>{s.removeListener("open",o),s.removeListener("error",l),s.removeListener("close",a),this.off("close",c),this.off("upgrading",h)};s.once("open",o),s.once("error",l),s.once("close",a),this.once("close",c),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&s.push(t[n]);return s}}let Bf=class extends Of{constructor(t,s={}){const n=typeof t=="object"?t:s;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>$f[o]).filter(o=>!!o)),super(t,n)}};function Pf(e,t="",s){let n=e;s=s||typeof location<"u"&&location,e==null&&(e=s.protocol+"//"+s.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=s.protocol+e:e=s.host+e),/^(https?|wss?):\/\//.test(e)||(typeof s<"u"?e=s.protocol+"//"+e:e="https://"+e),n=ko(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+t,n.href=n.protocol+"://"+r+(s&&s.port===n.port?"":":"+n.port),n}const Nf=typeof ArrayBuffer=="function",If=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Gl=Object.prototype.toString,Lf=typeof Blob=="function"||typeof Blob<"u"&&Gl.call(Blob)==="[object BlobConstructor]",jf=typeof File=="function"||typeof File<"u"&&Gl.call(File)==="[object FileConstructor]";function Xo(e){return Nf&&(e instanceof ArrayBuffer||If(e))||Lf&&e instanceof Blob||jf&&e instanceof File}function cn(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let s=0,n=e.length;s<n;s++)if(cn(e[s]))return!0;return!1}if(Xo(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return cn(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&cn(e[s]))return!0;return!1}function Df(e){const t=[],s=e.data,n=e;return n.data=So(s,t),n.attachments=t.length,{packet:n,buffers:t}}function So(e,t){if(!e)return e;if(Xo(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}else if(Array.isArray(e)){const s=new Array(e.length);for(let n=0;n<e.length;n++)s[n]=So(e[n],t);return s}else if(typeof e=="object"&&!(e instanceof Date)){const s={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=So(e[n],t));return s}return e}function Vf(e,t){return e.data=Eo(e.data,t),delete e.attachments,e}function Eo(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=Eo(e[s],t);else if(typeof e=="object")for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=Eo(e[s],t));return e}const Hf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ce;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ce||(ce={}));class Ff{constructor(t){this.replacer=t}encode(t){return(t.type===ce.EVENT||t.type===ce.ACK)&&cn(t)?this.encodeAsBinary({type:t.type===ce.EVENT?ce.BINARY_EVENT:ce.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let s=""+t.type;return(t.type===ce.BINARY_EVENT||t.type===ce.BINARY_ACK)&&(s+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(s+=t.nsp+","),t.id!=null&&(s+=t.id),t.data!=null&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=Df(t),n=this.encodeAsString(s.packet),o=s.buffers;return o.unshift(n),o}}class Qo extends Me{constructor(t){super(),this.reviver=t}add(t){let s;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(t);const n=s.type===ce.BINARY_EVENT;n||s.type===ce.BINARY_ACK?(s.type=n?ce.EVENT:ce.ACK,this.reconstructor=new Uf(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Xo(t)||t.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let s=0;const n={type:Number(t.charAt(0))};if(ce[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===ce.BINARY_EVENT||n.type===ce.BINARY_ACK){const r=s+1;for(;t.charAt(++s)!=="-"&&s!=t.length;);const l=t.substring(r,s);if(l!=Number(l)||t.charAt(s)!=="-")throw new Error("Illegal attachments");n.attachments=Number(l)}if(t.charAt(s+1)==="/"){const r=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););n.nsp=t.substring(r,s)}else n.nsp="/";const o=t.charAt(s+1);if(o!==""&&Number(o)==o){const r=s+1;for(;++s;){const l=t.charAt(s);if(l==null||Number(l)!=l){--s;break}if(s===t.length)break}n.id=Number(t.substring(r,s+1))}if(t.charAt(++s)){const r=this.tryParse(t.substr(s));if(Qo.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case ce.CONNECT:return ui(s);case ce.DISCONNECT:return s===void 0;case ce.CONNECT_ERROR:return typeof s=="string"||ui(s);case ce.EVENT:case ce.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Hf.indexOf(s[0])===-1);case ce.ACK:case ce.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uf{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Vf(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function ui(e){return Object.prototype.toString.call(e)==="[object Object]"}const zf=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qo,Encoder:Ff,get PacketType(){return ce}},Symbol.toStringTag,{value:"Module"}));function rt(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const Wf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Jl extends Me{constructor(t,s,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[rt(t,"open",this.onopen.bind(this)),rt(t,"packet",this.onpacket.bind(this)),rt(t,"error",this.onerror.bind(this)),rt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var n,o,r;if(Wf.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const l={type:ce.EVENT,data:s};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const u=this.ids++,p=s.pop();this._registerAckCallback(u,p),l.id=u}const a=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,s){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=s;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);s.call(this,new Error("operation has timed out"))},o),l=(...a)=>{this.io.clearTimeoutFn(r),s.apply(this,a)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...s){return new Promise((n,o)=>{const r=(l,a)=>l?o(l):n(a);r.withError=!0,s.push(r),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...r)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(o)):(this._queue.shift(),s&&s(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ce.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ce.EVENT:case ce.BINARY_EVENT:this.onevent(t);break;case ce.ACK:case ce.BINARY_ACK:this.onack(t);break;case ce.DISCONNECT:this.ondisconnect();break;case ce.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const n of s)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let n=!1;return function(...o){n||(n=!0,s.packet({type:ce.ACK,id:t,data:o}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const s=this._anyOutgoingListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const n of s)n.apply(this,t.data)}}}function xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-s:e+s}return Math.min(e,this.max)|0};xs.prototype.reset=function(){this.attempts=0};xs.prototype.setMin=function(e){this.ms=e};xs.prototype.setMax=function(e){this.max=e};xs.prototype.setJitter=function(e){this.jitter=e};class $o extends Me{constructor(t,s){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ln(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((n=s.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const o=s.parser||zf;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bf(this.uri,this.opts);const s=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=rt(s,"open",function(){n.onopen(),t&&t()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},l=rt(s,"error",r);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{o(),r(new Error("timeout")),s.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(rt(t,"ping",this.onping.bind(this)),rt(t,"data",this.ondata.bind(this)),rt(t,"error",this.onerror.bind(this)),rt(t,"close",this.onclose.bind(this)),rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){In(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Jl(this,t,s),this.nsps[t]=n),n}_destroy(t){const s=Object.keys(this.nsps);for(const n of s)if(this.nsps[n].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let n=0;n<s.length;n++)this.engine.write(s[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},s);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Es={};function os(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const s=Pf(e,t.path||"/socket.io"),n=s.source,o=s.id,r=s.path,l=Es[o]&&r in Es[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let c;return a?c=new $o(n,t):(Es[o]||(Es[o]=new $o(n,t)),c=Es[o]),s.query&&!t.query&&(t.query=s.queryKey),c.socket(s.path,t)}Object.assign(os,{Manager:$o,Socket:Jl,io:os,connect:os});const Zo=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},qf={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 bg-slate-900/80 backdrop-blur-sm"},Kf={class:"bg-slate-800 rounded-2xl shadow-xl border border-slate-700 w-full max-w-2xl flex flex-col max-h-[90vh]"},Gf={class:"flex items-center justify-between p-6 border-b border-slate-700"},Jf={class:"text-xl font-bold text-white"},Yf={class:"overflow-y-auto p-6 flex-1 custom-scrollbar"},Xf={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Qf={class:"md:col-span-2"},Zf={class:"flex space-x-2"},e0=["label"],t0=["value"],s0=["disabled"],n0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},o0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},r0={key:0,class:"mt-2 text-xs text-yellow-500"},i0={class:"md:col-span-2"},l0={class:"flex space-x-2"},a0={key:0,value:"",disabled:""},c0=["value"],u0=["disabled"],d0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},f0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},p0={class:"md:col-span-2"},h0={class:"md:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-4"},m0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-blue-500/30 transition-colors"},g0={class:"relative inline-flex items-center cursor-pointer"},v0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-emerald-500/30 transition-colors"},b0={class:"relative inline-flex items-center cursor-pointer"},x0={class:"md:col-span-2"},y0={class:"flex items-center space-x-6 mb-4"},w0={class:"inline-flex items-center cursor-pointer"},_0={class:"inline-flex items-center cursor-pointer"},k0={class:"inline-flex items-center cursor-pointer"},C0={key:0,class:"pl-2 border-l-2 border-slate-600"},S0={class:"flex items-center"},E0={key:1,class:"pl-2 border-l-2 border-slate-600 mt-4"},$0={class:"flex items-center"},A0={class:"md:col-span-2"},T0={class:"flex items-center justify-between mb-2"},M0={class:"flex gap-2"},R0={class:"space-y-3"},O0=["onUpdate:modelValue","title"],B0=["onUpdate:modelValue"],P0=["onClick"],N0={key:0,class:"text-xs text-yellow-500 flex items-center"},I0={key:1,class:"text-sm text-slate-500 italic py-1 px-2 border border-dashed border-slate-700 rounded text-center"},L0={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-between items-center rounded-b-2xl"},j0={class:"flex space-x-4"},D0=["disabled"],V0={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},H0={__name:"DeployModal",props:{isOpen:Boolean,appToEdit:Object},emits:["close","deploy","delete"],setup(e,{emit:t}){const s=e,n=t,o=F({name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0}),r=F(""),l=F([]),a=F(!1),c=F("npm"),h=F([]),u=F(!1),p=F([]),b=F(!1),y=F(!1),A=Ne(()=>{const X=h.value.map(C=>C.name.trim()).filter(C=>C!=="");return X.filter((C,B)=>X.indexOf(C)!==B)});Ft(()=>s.isOpen,async X=>{if(X)if(l.value.length===0&&await S(),s.appToEdit){y.value=!0,o.value.name=s.appToEdit.name,o.value.branch=s.appToEdit.branch,o.value.buildScript=s.appToEdit.buildScript||"",o.value.autoSync=!!s.appToEdit.autoSync,o.value.zeroDowntime=s.appToEdit.zeroDowntime!==!1,s.appToEdit.ecosystemFile?c.value="ecosystem":s.appToEdit.pm2Script&&s.appToEdit.pm2Script!=="npm"?(c.value="script",o.value.customScript=s.appToEdit.pm2Script):(c.value="npm",o.value.npmScript=s.appToEdit.pm2Args?s.appToEdit.pm2Args.replace("run ",""):"start");const C=Object.keys(s.appToEdit.env||{});h.value=C.map(Q=>({name:Q,value:s.appToEdit.env[Q]}));let B=null;for(const Q of l.value){const I=Q.repositories.find(W=>W.cloneUrl===s.appToEdit.repoUrl);if(I){B={url:I.cloneUrl,token:Q.token,name:I.name};break}}B&&(r.value=B,await te(),o.value.branch=s.appToEdit.branch)}else y.value=!1,o.value={name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0},r.value="",c.value="npm",h.value=[],p.value=[]}),Ft(r,X=>{X&&X.name&&!y.value&&(o.value.name=X.name),p.value=[],X&&X.url&&te()});const S=async()=>{a.value=!0;try{const X=await fetch("/api/git/repositories",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});l.value=await X.json()}catch{console.error("Failed to load repositories")}finally{a.value=!1}},j=()=>{h.value.push({name:"",value:""})},U=X=>{h.value.splice(X,1)},N=F(null),z=()=>{N.value&&N.value.click()},D=X=>{const C=X.target.files[0];if(!C)return;const B=new FileReader;B.onload=Q=>{const W=Q.target.result.split(`
|
|
2
|
+
`);let k=0;const G=[...h.value];W.forEach(me=>{let le=me.trim();if(!le||le.startsWith("#"))return;le.startsWith("export ")&&(le=le.substring(7).trim());const ie=le.match(/^([^=]+)=(.*)$/);if(ie){let Ae=ie[1].trim(),_e=ie[2].trim();(_e.startsWith('"')&&_e.endsWith('"')||_e.startsWith("'")&&_e.endsWith("'"))&&(_e=_e.substring(1,_e.length-1));const Se=G.findIndex(xe=>xe.name===Ae);if(Se>=0)G[Se].value=_e,k++;else{const xe=G.findIndex(De=>De.name.trim()===""&&De.value.trim()==="");xe>=0?(G[xe].name=Ae,G[xe].value=_e):G.push({name:Ae,value:_e}),k++}}}),h.value=G,k===0&&alert("No valid environment variables found in this file."),X.target.value=""},B.readAsText(C)},te=async()=>{if(!r.value||!r.value.url){alert("Please select a repository first");return}u.value=!0,p.value=[];try{const C=await(await fetch("/api/git/branches",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({repoUrl:r.value.url,token:r.value.token})})).json();C.length>0?(p.value=C,o.value.branch=C.find(B=>B==="main"||B==="master")||C[0]):alert("No branches found or repo is private (needs token)")}catch{alert("Failed to fetch branches")}finally{u.value=!1}},ae=async()=>{let X={};if(h.value.forEach(B=>{B.name.trim()&&(X[B.name.trim()]=B.value.trim())}),!r.value||!r.value.url){alert("Please select a repository");return}const C={...o.value,repoUrl:r.value.url,token:r.value.token,env:X,pm2Script:c.value==="script"?o.value.customScript:c.value==="npm"?"npm":null,pm2Args:c.value==="npm"?`run ${o.value.npmScript||"start"}`:null,ecosystemFile:c.value==="ecosystem"?"ecosystem.config.cjs":null};b.value=!0;try{const B=s.appToEdit?`/api/apps/${s.appToEdit.id}`:"/api/apps",Q=s.appToEdit?"PUT":"POST",W=await(await fetch(B,{method:Q,headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify(C)})).json();fetch(`/api/deploy/${s.appToEdit?s.appToEdit.id:W.id}`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),n("deploy"),n("close")}catch{alert("Failed to save app configuration")}finally{b.value=!1}},re=()=>{n("delete",s.appToEdit),n("close")};return(X,C)=>e.isOpen?(w(),_("div",qf,[i("div",Kf,[i("div",Gf,[i("h3",Jf,L(e.appToEdit?"Edit Application":"Deploy New Application"),1),i("button",{onClick:C[0]||(C[0]=B=>X.$emit("close")),class:"text-slate-400 hover:text-white transition-colors"},[...C[14]||(C[14]=[i("svg",{class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),i("div",Yf,[i("form",{onSubmit:Bn(ae,["prevent"]),class:"space-y-6"},[i("div",Xf,[i("div",Qf,[C[18]||(C[18]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"GitHub Repository",-1)),i("div",Zf,[ke(i("select",{"onUpdate:modelValue":C[1]||(C[1]=B=>r.value=B),required:"",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all appearance-none cursor-pointer"},[C[15]||(C[15]=i("option",{value:"",disabled:""},"Select a repository...",-1)),(w(!0),_(ve,null,ze(l.value,B=>(w(),_("optgroup",{key:B.accountId,label:"@"+B.account},[(w(!0),_(ve,null,ze(B.repositories,Q=>(w(),_("option",{key:Q.id,value:{url:Q.cloneUrl,token:B.token,name:Q.name}},L(Q.name)+" "+L(Q.private?"🔒":""),9,t0))),128))],8,e0))),128))],512),[[vo,r.value]]),i("button",{type:"button",onClick:S,disabled:a.value,class:"px-3 py-2 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50",title:"Refresh Repositories"},[a.value?(w(),_("svg",n0,[...C[16]||(C[16]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",o0,[...C[17]||(C[17]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])]))],8,s0)]),l.value.length===0?(w(),_("p",r0,"No repositories found. Go to Settings to connect a GitHub Account.")):J("",!0)]),i("div",i0,[C[19]||(C[19]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"App Name",-1)),ke(i("input",{"onUpdate:modelValue":C[2]||(C[2]=B=>o.value.name=B),onInput:C[3]||(C[3]=B=>y.value=!0),required:"",type:"text",class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500",placeholder:"my-awesome-app"},null,544),[[Be,o.value.name]])]),i("div",null,[C[22]||(C[22]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Branch",-1)),i("div",l0,[ke(i("select",{"onUpdate:modelValue":C[4]||(C[4]=B=>o.value.branch=B),required:"",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all appearance-none cursor-pointer"},[p.value.length===0?(w(),_("option",a0,"Select a repository first...")):J("",!0),(w(!0),_(ve,null,ze(p.value,B=>(w(),_("option",{key:B,value:B},L(B),9,c0))),128))],512),[[vo,o.value.branch]]),i("button",{type:"button",onClick:te,disabled:u.value||!r.value,class:"px-3 py-2 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50",title:"Refresh Branches"},[u.value?(w(),_("svg",d0,[...C[20]||(C[20]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",f0,[...C[21]||(C[21]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])]))],8,u0)])]),i("div",p0,[C[23]||(C[23]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Build Script (Optional)",-1)),ke(i("textarea",{"onUpdate:modelValue":C[5]||(C[5]=B=>o.value.buildScript=B),rows:"2",class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 custom-scrollbar",placeholder:`npm install
|
|
3
|
+
npm run build`},null,512),[[Be,o.value.buildScript]])]),i("div",h0,[i("div",m0,[C[25]||(C[25]=tt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400 group-hover:bg-blue-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Auto Sync</span><span class="block text-[10px] text-slate-500" data-v-20522177>Auto pull & deploy on push</span></div></div>',1)),i("label",g0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":C[6]||(C[6]=B=>o.value.autoSync=B),class:"sr-only peer"},null,512),[[go,o.value.autoSync]]),C[24]||(C[24]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-blue-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"},null,-1))])]),i("div",v0,[C[27]||(C[27]=tt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400 group-hover:bg-emerald-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Zero Downtime</span><span class="block text-[10px] text-slate-500" data-v-20522177>Use PM2 reload</span></div></div>',1)),i("label",b0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":C[7]||(C[7]=B=>o.value.zeroDowntime=B),class:"sr-only peer"},null,512),[[go,o.value.zeroDowntime]]),C[26]||(C[26]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-emerald-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"},null,-1))])])]),i("div",x0,[C[34]||(C[34]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"PM2 Execution Mode",-1)),i("div",y0,[i("label",w0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[8]||(C[8]=B=>c.value=B),value:"npm",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[28]||(C[28]=i("span",{class:"ml-2 text-slate-300"},"Run NPM Script",-1))]),i("label",_0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[9]||(C[9]=B=>c.value=B),value:"ecosystem",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[29]||(C[29]=i("span",{class:"ml-2 text-slate-300"},"Ecosystem File",-1))]),i("label",k0,[ke(i("input",{type:"radio","onUpdate:modelValue":C[10]||(C[10]=B=>c.value=B),value:"script",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),C[30]||(C[30]=i("span",{class:"ml-2 text-slate-300"},"Run Custom Script",-1))])]),c.value==="npm"?(w(),_("div",C0,[C[32]||(C[32]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"NPM Script Name (e.g. start, dev, prod)",-1)),i("div",S0,[C[31]||(C[31]=i("span",{class:"text-slate-500 mr-2 font-mono"},"npm run",-1)),ke(i("input",{"onUpdate:modelValue":C[11]||(C[11]=B=>o.value.npmScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"start"},null,512),[[Be,o.value.npmScript]])])])):J("",!0),c.value==="script"?(w(),_("div",E0,[C[33]||(C[33]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"Script Path (e.g. app.js, dist/main.js)",-1)),i("div",$0,[ke(i("input",{"onUpdate:modelValue":C[12]||(C[12]=B=>o.value.customScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"app.js"},null,512),[[Be,o.value.customScript]])])])):J("",!0)]),i("div",A0,[i("div",T0,[C[37]||(C[37]=i("label",{class:"block text-sm font-medium text-slate-300"},"Environment Variables",-1)),i("div",M0,[i("button",{type:"button",onClick:z,class:"text-xs px-2 py-1 bg-slate-700 text-slate-300 hover:bg-slate-600 rounded border border-slate-600 transition-colors flex items-center"},[...C[35]||(C[35]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),K(" Import .env ",-1)])]),i("input",{type:"file",ref_key:"envFileInput",ref:N,onChange:D,accept:".env, *.*",class:"hidden"},null,544),i("button",{type:"button",onClick:j,class:"text-xs px-2 py-1 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 rounded border border-blue-500/20 transition-colors flex items-center"},[...C[36]||(C[36]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),K(" Add Variable ",-1)])])])]),i("div",R0,[(w(!0),_(ve,null,ze(h.value,(B,Q)=>(w(),_("div",{key:Q,class:"flex items-center gap-2"},[ke(i("input",{"onUpdate:modelValue":I=>B.name=I,type:"text",class:ne(["w-1/3 bg-slate-900 border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",A.value.includes(B.name)&&B.name.trim()!==""?"border-yellow-500 text-yellow-400 focus:ring-yellow-500":"border-slate-600 text-white focus:ring-blue-500"]),placeholder:"KEY",title:A.value.includes(B.name)&&B.name.trim()!==""?"Duplicate key":""},null,10,O0),[[Be,B.name]]),C[39]||(C[39]=i("span",{class:"text-slate-500"},"=",-1)),ke(i("input",{"onUpdate:modelValue":I=>B.value=I,type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"VALUE"},null,8,B0),[[Be,B.value]]),i("button",{type:"button",onClick:I=>U(Q),class:"p-1.5 text-red-400 hover:bg-red-500/10 hover:text-red-300 rounded transition-colors",title:"Remove"},[...C[38]||(C[38]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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,P0)]))),128)),A.value.length>0?(w(),_("div",N0,[...C[40]||(C[40]=[i("svg",{class:"w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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"})],-1),K(" Warning: Duplicate environment variable keys detected. ",-1)])])):J("",!0),h.value.length===0?(w(),_("div",I0," No environment variables defined. ")):J("",!0)])])])],32)]),i("div",L0,[i("div",null,[e.appToEdit?(w(),_("button",{key:0,type:"button",onClick:re,class:"px-4 py-2.5 text-sm font-medium text-red-400 hover:text-white bg-red-500/10 hover:bg-red-500 rounded-lg transition-colors border border-red-500/20"}," Delete Application ")):J("",!0)]),i("div",j0,[i("button",{type:"button",onClick:C[13]||(C[13]=B=>X.$emit("close")),class:"px-5 py-2.5 text-sm font-medium text-slate-300 hover:text-white bg-slate-700 hover:bg-slate-600 rounded-lg transition-colors border border-slate-600"},"Cancel"),i("button",{onClick:ae,disabled:b.value,class:"px-5 py-2.5 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 rounded-lg transition-all shadow-lg shadow-blue-500/30 disabled:opacity-70 flex items-center"},[b.value?(w(),_("svg",V0,[...C[41]||(C[41]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):J("",!0),K(" "+L(e.appToEdit?"Update App":"Deploy App"),1)],8,D0)])])])])):J("",!0)}},F0=Zo(H0,[["__scopeId","data-v-20522177"]]),U0={class:"flex items-center space-x-3 overflow-hidden"},z0={class:"text-[10px] font-mono text-slate-400 font-bold tracking-widest truncate uppercase"},W0={class:"flex items-center space-x-1 ml-4"},q0={key:0,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},K0={key:1,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},G0={class:"text-slate-600 opacity-50 select-none mr-2"},J0={__name:"LogViewer",props:{isOpen:Boolean,appId:String,appName:String},emits:["close"],setup(e,{emit:t}){const s=e,n=F([]),o=F(null),r=F(!1),l=F(!1),a=F({x:window.innerWidth-850,y:window.innerHeight-550});let c=null;const h=u=>{l.value=!0;const p=u.clientX-a.value.x,b=u.clientY-a.value.y,y=S=>{let j=S.clientX-p,U=S.clientY-b;const N=20,z=r.value?300:800;r.value,j=Math.max(-z+N,Math.min(j,window.innerWidth-N)),U=Math.max(0,Math.min(U,window.innerHeight-N)),a.value.x=j,a.value.y=U},A=()=>{l.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",A)};return Ft(()=>s.isOpen,u=>{u&&s.appId?(n.value=[],(a.value.x<0||a.value.x>window.innerWidth-100)&&(a.value.x=window.innerWidth-(r.value?350:850)),(a.value.y<0||a.value.y>window.innerHeight-100)&&(a.value.y=window.innerHeight-(r.value?100:550)),fetch(`/api/deploy/${s.appId}/logs`,{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}).then(p=>p.text()).then(p=>{p&&(n.value=p.split(`
|
|
4
|
+
`).filter(b=>b.trim()),Mt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})),c=os(),c.on(`deploy-log-${s.appId}`,b=>{let y=b;if(typeof b!="string")try{y=new TextDecoder().decode(b)}catch{y=String(b)}n.value.push(y.trim()),Mt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})})}).catch(p=>console.error("Failed to fetch deploy logs",p))):c&&(c.disconnect(),c=null)}),rs(()=>{c&&c.disconnect()}),(u,p)=>e.isOpen?(w(),_("div",{key:0,class:ne(["fixed z-[60] flex flex-col shadow-2xl border border-slate-700 overflow-hidden ring-1 ring-slate-800",{"transition-all duration-300":!l.value}]),style:Rt({left:a.value.x+"px",top:a.value.y+"px",width:r.value?"300px":"800px",height:r.value?"44px":"500px",maxHeight:"90vh",maxWidth:"95vw","will-change":"left, top"})},[i("div",{class:"flex items-center justify-between p-3 bg-slate-800/90 backdrop-blur-md border-b border-slate-700 cursor-move select-none",onMousedown:h},[i("div",U0,[p[2]||(p[2]=i("div",{class:"flex space-x-1.5 flex-shrink-0"},[i("div",{class:"w-3 h-3 rounded-full bg-red-500 shadow-sm shadow-red-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-yellow-500 shadow-sm shadow-yellow-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-green-500 shadow-sm shadow-green-900/50"})],-1)),i("span",z0," console : "+L(e.appName),1)]),i("div",W0,[i("button",{onClick:p[0]||(p[0]=b=>r.value=!r.value),class:"p-1 hover:bg-slate-700 rounded transition-colors text-slate-400 hover:text-white",title:"Minimize/Expand"},[r.value?(w(),_("svg",K0,[...p[4]||(p[4]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)])])):(w(),_("svg",q0,[...p[3]||(p[3]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 12H4"},null,-1)])]))]),i("button",{onClick:p[1]||(p[1]=b=>u.$emit("close")),class:"p-1 hover:bg-red-500/20 rounded transition-colors text-slate-400 hover:text-red-400",title:"Close"},[...p[5]||(p[5]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])],32),ke(i("div",{class:"flex-1 overflow-y-auto p-4 font-mono text-sm leading-relaxed custom-scrollbar bg-black",ref_key:"logContainer",ref:o},[(w(!0),_(ve,null,ze(n.value,(b,y)=>(w(),_("div",{key:y,class:ne([{"text-emerald-400 font-bold":b.includes("successfully")||b.includes("Done")||b.includes("Completed"),"text-red-400":b.toLowerCase().includes("err")||b.toLowerCase().includes("fail"),"text-indigo-400 font-bold tracking-tight":b.includes("[SYSTEM]")||b.includes("[pm2me]"),"text-blue-400":b.includes("Starting")||b.includes("Cloning")||b.includes("Synchronizing"),"text-slate-300":!b.toLowerCase().includes("err")&&!b.includes("successfully")&&!b.includes("[SYSTEM]")&&!b.includes("[pm2me]")&&!b.includes("Starting")},"break-words whitespace-pre-wrap py-0.5 border-b border-slate-900/50 last:border-0"])},[i("span",G0,"["+L(new Date().toLocaleTimeString())+"]",1),K(L(b),1)],2))),128))],512),[[ru,!r.value]])],6)):J("",!0)}},Y0=Zo(J0,[["__scopeId","data-v-550ff13e"]]),X0={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-8"},Q0={class:"bg-slate-800/80 backdrop-blur-sm p-4 rounded-2xl border border-slate-700 shadow-lg group hover:border-purple-500/50 transition-all duration-300"},Z0={class:"flex flex-col space-y-1"},ep={class:"flex items-center justify-between"},tp={class:"text-sm font-bold text-white font-mono"},sp={class:"flex items-center justify-between"},np={class:"text-sm font-bold text-white font-mono"},op={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-blue-500/50 transition-all duration-300"},rp={class:"flex items-end justify-between"},ip={class:"text-2xl font-bold text-white tracking-tight"},lp={class:"text-xs text-slate-500 mt-1 truncate max-w-[150px]"},ap={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},cp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-emerald-500/50 transition-all duration-300"},up={class:"flex items-end justify-between"},dp={class:"text-2xl font-bold text-white tracking-tight"},fp={class:"text-xs text-slate-500 mt-1"},pp={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},hp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-orange-500/50 transition-all duration-300"},mp={class:"flex items-end justify-between"},gp={class:"text-2xl font-bold text-white tracking-tight"},vp={class:"text-xs text-slate-500 mt-1"},bp={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},xp={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-indigo-500/50 transition-all duration-300"},yp={class:"flex flex-col"},wp={class:"text-2xl font-bold text-white tracking-tight"},_p={class:"text-xs text-slate-500 mt-1"},kp={__name:"ServerStats",setup(e){const t=F({cpu:{usage:0,model:"Loading...",cores:0},memory:{total:0,free:0,used:0,percentage:0},disk:{total:0,free:0,used:0,percentage:0},network:{down:0,up:0},uptime:0,hostname:"..."});let s=null;const n=async()=>{try{const a=await fetch("/api/system/stats",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});a.ok&&(t.value=await a.json())}catch(a){console.error("Failed to fetch system stats",a)}},o=a=>{if(a===0)return"0 B/s";const c=1024,h=["B/s","KB/s","MB/s","GB/s"],u=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,u)).toFixed(1))+" "+h[u]},r=a=>{if(a===0)return"0 B";const c=1024,h=["B","KB","MB","GB","TB"],u=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,u)).toFixed(2))+" "+h[u]},l=a=>{const c=Math.floor(a/86400),h=Math.floor(a%(3600*24)/3600),u=Math.floor(a%3600/60);return c>0?`${c}d ${h}h ${u}m`:h>0?`${h}h ${u}m`:`${u}m`};return Gt(()=>{n(),s=os(window.location.origin),s.on("system-stats",a=>{t.value=a}),s.on("connect_error",a=>{console.error("Socket connection error:",a)})}),rs(()=>{s&&s.disconnect()}),(a,c)=>(w(),_("div",X0,[i("div",Q0,[c[2]||(c[2]=tt('<div class="flex items-center justify-between mb-2"><span class="text-slate-400 text-xs font-medium">Network</span><div class="p-1.5 bg-purple-500/10 rounded-lg text-purple-400"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg></div></div>',1)),i("div",Z0,[i("div",ep,[c[0]||(c[0]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"})]),K(" Down ")],-1)),i("div",tp,L(o(t.value.network.down)),1)]),i("div",sp,[c[1]||(c[1]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 10l7-7m0 0l7 7m-7-7v18"})]),K(" Up ")],-1)),i("div",np,L(o(t.value.network.up)),1)])])]),i("div",op,[c[3]||(c[3]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Processor</span><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div></div>',1)),i("div",rp,[i("div",null,[i("div",ip,L(t.value.cpu.usage.toFixed(1))+"%",1),i("div",lp,L(t.value.cpu.model),1)]),i("div",ap,[i("div",{class:"h-full bg-blue-500 rounded-full transition-all duration-500",style:Rt({width:t.value.cpu.usage+"%"})},null,4)])])]),i("div",cp,[c[4]||(c[4]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Memory (RAM)</span><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",up,[i("div",null,[i("div",dp,L(t.value.memory.percentage.toFixed(1))+"%",1),i("div",fp,L(r(t.value.memory.used))+" / "+L(r(t.value.memory.total)),1)]),i("div",pp,[i("div",{class:"h-full bg-emerald-500 rounded-full transition-all duration-500",style:Rt({width:t.value.memory.percentage+"%"})},null,4)])])]),i("div",hp,[c[5]||(c[5]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Storage (C:)</span><div class="p-2 bg-orange-500/10 rounded-lg text-orange-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"></path></svg></div></div>',1)),i("div",mp,[i("div",null,[i("div",gp,L(t.value.disk.percentage.toFixed(1))+"%",1),i("div",vp,L(r(t.value.disk.used))+" / "+L(r(t.value.disk.total)),1)]),i("div",bp,[i("div",{class:"h-full bg-orange-500 rounded-full transition-all duration-500",style:Rt({width:t.value.disk.percentage+"%"})},null,4)])])]),i("div",xp,[c[6]||(c[6]=tt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">System Uptime</span><div class="p-2 bg-indigo-500/10 rounded-lg text-indigo-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",yp,[i("div",wp,L(l(t.value.uptime)),1),i("div",_p,L(t.value.hostname),1)])])]))}},Cp={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-8"},Sp={class:"flex items-center space-x-4"},Ep={key:0,class:"animate-spin w-5 h-5 text-slate-400",fill:"none",viewBox:"0 0 24 24"},$p={key:1,class:"w-5 h-5 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ap={key:2,class:"w-5 h-5 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Tp={key:3,class:"w-5 h-5 text-emerald-400",fill:"currentColor",viewBox:"0 0 20 20"},Mp={key:0,class:"text-sm font-semibold text-slate-400"},Rp={key:1,class:"text-sm font-semibold text-red-400"},Op={key:2,class:"text-sm font-semibold text-amber-400"},Bp={key:3,class:"text-sm font-semibold text-emerald-400"},Pp={key:4,class:"text-xs text-slate-500 mt-0.5"},Np={class:"text-slate-300 font-mono"},Ip={key:0},Lp={class:"text-amber-300 font-mono"},jp={key:5,class:"text-xs text-slate-500 mt-0.5"},Dp={class:"flex items-center space-x-2 flex-shrink-0"},Vp={key:0,disabled:"",class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-slate-700 text-slate-400 cursor-wait"},Hp=["disabled"],Fp={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-4 sm:space-y-0"},Up={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},zp={class:"flex items-start justify-between mb-4 gap-3"},Wp={class:"flex items-start space-x-3 min-w-0 flex-1"},qp={class:"min-w-0 flex-1"},Kp={class:"flex items-center gap-2 flex-wrap"},Gp=["title"],Jp={class:"flex items-center space-x-2 text-xs font-medium mt-1.5"},Yp={class:"relative flex h-2 w-2 flex-shrink-0"},Xp={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},Qp={key:0,class:"text-slate-500 whitespace-nowrap"},Zp={class:"flex items-center space-x-1.5 flex-shrink-0"},eh=["onClick"],th=["onClick"],sh=["onClick"],nh={class:"grid grid-cols-2 gap-4 mb-4 text-sm"},oh={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},rh={class:"font-semibold text-slate-200"},ih={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},lh={class:"font-semibold text-slate-200"},ah={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},ch={class:"font-semibold text-slate-200"},uh={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},dh={class:"font-semibold text-slate-200"},fh={key:0,class:"mb-4 text-[11px] bg-slate-900/50 border border-slate-700/50 p-2 rounded-lg text-slate-400 font-mono flex items-start",title:"Latest Commit"},ph={class:"truncate"},hh={key:1,class:"mb-4 text-[10px] bg-red-500/10 border border-red-500/20 p-2 rounded-lg text-red-400 font-mono flex flex-col gap-1 shadow-[0_0_10px_rgba(239,68,68,0.1)]"},mh={class:"flex items-start"},gh={class:"truncate opacity-80"},vh={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},bh={class:"flex items-center justify-between mb-4 px-1"},xh={key:0,class:"flex items-center gap-2"},yh={key:0,class:"relative flex h-2 w-2"},wh={class:"relative flex items-center justify-between px-4 pb-2"},_h={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},kh={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ch={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},Sh={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},Eh={class:"mt-auto grid grid-cols-3 gap-2"},$h=["onClick","disabled"],Ah={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Th={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},Mh=["onClick","disabled"],Rh={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Oh={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},Bh=["onClick","disabled"],Ph={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Nh={key:1,class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ih=["onClick","disabled"],Lh={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},jh={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Dh={key:2,class:"ml-1 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},Vh={key:0,class:"absolute inset-0 bg-blue-500/5 animate-pulse rounded-2xl blur-xl -z-10"},Hh={class:"flex items-start justify-between mb-4 gap-3"},Fh={class:"flex items-start space-x-3 min-w-0 flex-1"},Uh={key:0,class:"animate-spin h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},zh={key:1,class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Wh={class:"min-w-0 flex-1"},qh=["title"],Kh={class:"flex items-center space-x-2 text-xs font-medium mt-1.5 flex-wrap"},Gh={key:0,class:"text-[10px] bg-slate-700/50 border border-slate-600 px-1.5 py-0.5 rounded text-slate-300 font-mono inline-block max-w-full truncate align-bottom mt-1 sm:mt-0",title:"Deployed Commit"},Jh={class:"flex items-center space-x-1.5 flex-shrink-0"},Yh=["onClick"],Xh=["onClick"],Qh={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},Zh={class:"flex items-center justify-between mb-4 px-1"},em={class:"flex items-center gap-2"},tm={key:0,class:"relative flex h-2 w-2"},sm={class:"relative flex items-center justify-between px-4 pb-2"},nm={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},om={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},rm={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},im={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},lm=["onClick","disabled"],am={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},cm={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},um={key:2,class:"ml-2 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},dm={key:0,class:"flex flex-col items-center justify-center p-12 bg-slate-800/30 rounded-3xl border border-slate-700/50 border-dashed"},fm={key:1,class:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-900/90 backdrop-blur-md"},pm={class:"bg-slate-800 border border-slate-700 rounded-3xl shadow-2xl max-w-md w-full p-8 text-center transform transition-all scale-100"},hm={class:"text-slate-400 mb-8 leading-relaxed"},mm={class:"text-white font-semibold"},gm={class:"flex flex-col sm:flex-row gap-3"},vm={__name:"Dashboard",setup(e){const t=F([]),s=F([]),n=F(!1),o=F(!1),r=F(""),l=F(""),a=F(null),c=F({}),h=F({}),u=F({}),p=F({}),b=F(!1),y=F(null),A=F({loaded:!1,installed:!1,version:null,latestVersion:null,hasUpdate:!1,isChecking:!1,isActing:!1}),S=async()=>{A.value.isChecking=!0;try{const f=await(await fetch("/api/pm2/version-check",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();A.value={...A.value,...f,loaded:!0,isChecking:!1}}catch{A.value.isChecking=!1,A.value.loaded=!0}},j=async()=>{A.value.isActing=!0;try{await fetch("/api/pm2/install-update",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await S()}catch{}finally{A.value.isActing=!1}};let U=null,N;const z=Ne(()=>{const m=(t.value||[]).map(f=>f?.name).filter(Boolean);return(s.value||[]).filter(f=>f&&!m.includes(f.name))}),D=async()=>{try{const f={Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},[v,d]=await Promise.all([fetch("/api/pm2/list",{headers:f}),fetch("/api/apps",{headers:f})]);if(v.ok&&(t.value=await v.json()),d.ok){const g=await d.json();s.value=g.map(x=>{let E=x.pipelineState;return E==="online"&&(E="hidden"),x.pipelineState=u.value[x.id]||E||"hidden",x})}t.value=t.value.map(g=>{if(!g)return null;const x=s.value.find(E=>E&&E.name===g.name);return x?(g.id=x.id,g.commitHash=x.commitHash,g.commitMessage=x.commitMessage,g.rollbackOccurred=x.rollbackOccurred,g.failedCommitHash=x.failedCommitHash,g.failedCommitMessage=x.failedCommitMessage,g.pipelineState=u.value[x.id]||x.pipelineState||"hidden"):g.pipelineState="hidden",g}).filter(Boolean),s.value.forEach(g=>{te(g.id)})}catch(m){console.error("Fetch apps error:",m)}},te=async m=>{try{const f=localStorage.getItem("pm2me_token"),d=await(await fetch(`/api/apps/${m}/sync-status`,{headers:{Authorization:`Bearer ${f}`}})).json();d.behindCount!==void 0&&(h.value[m]=d.behindCount)}catch(f){console.error("Failed to fetch sync status",f)}},ae=m=>{const f=s.value.find(v=>v.name===m);return f?f.id:null},re=async(m,f)=>{const v=`${f}-${m}`;c.value[v]=!0;try{await fetch(`/api/pm2/${m}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:f})}),await D()}catch{alert(`Failed to ${m} app`)}finally{c.value[v]=!1}},X=async m=>{try{await fetch(`/api/apps/${m}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch(f){console.error("Failed to remove db app",f)}},C=async m=>{m&&B(m)},B=m=>{y.value=m,b.value=!0},Q=async()=>{const m=y.value;if(m){b.value=!1,y.value=null;try{await fetch("/api/pm2/delete",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:m.name})})}catch{console.error("Failed to delete PM2 process, proceeding to DB removal")}await X(m.id)}},I=async(m,f)=>{const v=`${f||m}-deploy`;c.value[v]=!0;try{await fetch(`/api/deploy/${m}`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch{alert("Failed to trigger deployment restart.")}finally{c.value[v]=!1}},W=m=>{const f=s.value.find(v=>v.name===m.name);if(!f){alert("Cannot deploy this app as it was not deployed via PM2Me (No config found).");return}I(f.id,m.name)},k=m=>{l.value=m.name;const f=s.value.find(v=>v.name===m.name);r.value=f?f.id:m.name,o.value=!0},G=m=>{l.value=m.name,r.value=m.id,o.value=!0},me=(m,f=!1)=>{let v=m;if(f&&(v=s.value.find(d=>d.name===m.name),!v)){alert("Cannot edit this app as it was not deployed via PM2Me (No config found).");return}a.value=v,n.value=!0},le=m=>{if(!m)return"0s";const f=Date.now()-m,v=Math.floor(f/1e3),d=Math.floor(v/(3600*24)),g=Math.floor(v%(3600*24)/3600),x=Math.floor(v%3600/60);return d>0?`${d}d ${g}h`:g>0?`${g}h ${x}m`:x>0?`${x}m`:`${v}s`},ie=m=>{if(!m)return"0 B";const f=1024,v=["B","KB","MB","GB"],d=Math.floor(Math.log(m)/Math.log(f));return parseFloat((m/Math.pow(f,d)).toFixed(2))+" "+v[d]},Ae=m=>m==="online"?"bg-emerald-500":m==="stopping"||m==="stopped"?"bg-amber-500":m==="errored"?"bg-red-500":"bg-slate-500",_e=m=>m==="online"?"text-emerald-400":m==="stopping"||m==="stopped"?"text-amber-400":m==="errored"?"text-red-400":"text-slate-400",Se=["pulling","building","starting","online"],xe=m=>({pulling:"Pull",building:"Build",starting:"Run",online:"Online"})[m]||m,De=m=>m&&typeof m=="string"&&m.startsWith("failed:")?m.split(":")[1]:m,Qe=m=>{const f=De(m),v=Se.indexOf(f);if(v===-1)return"0%";const d=v/(Se.length-1)*100;return`calc(${d}% - ${d/100*48}px)`},Pe=(m,f)=>{if(f==="online"&&m==="online")return!0;const v=De(f),d=Se.indexOf(m),g=Se.indexOf(v);return d<g},Ee=(m,f)=>O(m,f)?"bg-red-500 border-red-400 shadow-[0_0_15px_rgba(239,68,68,0.6)] border-0 scale-110":Pe(m,f)?m==="online"&&f==="online"?"bg-gradient-to-br from-emerald-500 to-green-600 shadow-[0_0_15px_rgba(16,185,129,0.5)] border-0 scale-110":"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-[0_0_10px_rgba(99,102,241,0.4)] border-0":De(f)===m?"bg-slate-800 border-[1.5px] border-blue-400 shadow-[0_0_15px_rgba(96,165,250,0.5)] scale-110":"bg-slate-800/50 border border-slate-700/50 backdrop-blur-sm shadow-inner",O=(m,f)=>f&&typeof f=="string"&&f.startsWith("failed:")?m===f.split(":")[1]:f==="failed"&&m==="starting",T=()=>{U||(U=os()),s.value.forEach(m=>{U.off(`pipeline-state-${m.id}`),U.on(`pipeline-state-${m.id}`,f=>{p.value[m.id]&&(clearTimeout(p.value[m.id]),delete p.value[m.id]),u.value[m.id]=f;const v=d=>{const g=t.value.find(E=>E.name===m.name);g&&(g.pipelineState=d);const x=s.value.find(E=>E.id===m.id);x&&(x.pipelineState=d)};v(f),f==="online"&&(D(),p.value[m.id]=setTimeout(()=>{u.value[m.id]="hidden",v("hidden")},2e3))})})};return Gt(async()=>{await D(),T(),N=setInterval(D,12345),S()}),rs(()=>{U&&U.disconnect(),clearInterval(N)}),(m,f)=>(w(),_("div",Cp,[Te(kp),i("div",{class:ne(["rounded-2xl border flex items-center justify-between px-6 py-4 shadow-xl backdrop-blur-sm transition-all",!A.value.loaded||A.value.isChecking?"bg-slate-800/60 border-slate-700":A.value.installed?A.value.hasUpdate?"bg-amber-500/5 border-amber-500/30":"bg-emerald-500/5 border-emerald-500/20":"bg-red-500/5 border-red-500/30"])},[i("div",Sp,[i("div",{class:ne(["w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",!A.value.loaded||A.value.isChecking?"bg-slate-700":A.value.installed?A.value.hasUpdate?"bg-amber-500/20":"bg-emerald-500/20":"bg-red-500/20"])},[!A.value.loaded||A.value.isChecking?(w(),_("svg",Ep,[...f[5]||(f[5]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):A.value.installed?A.value.hasUpdate?(w(),_("svg",Ap,[...f[7]||(f[7]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):(w(),_("svg",Tp,[...f[8]||(f[8]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(w(),_("svg",$p,[...f[6]||(f[6]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M5.07 19H19a2 2 0 001.75-2.96L13.75 4a2 2 0 00-3.5 0L3.25 16.04A2 2 0 005.07 19z"},null,-1)])]))],2),i("div",null,[!A.value.loaded||A.value.isChecking?(w(),_("p",Mp,"Checking PM2 status...")):A.value.installed?A.value.hasUpdate?(w(),_("p",Op,"PM2 update available")):(w(),_("p",Bp,"PM2 is up to date")):(w(),_("p",Rp,"PM2 is not installed")),A.value.loaded&&!A.value.isChecking&&A.value.installed?(w(),_("p",Pp,[f[10]||(f[10]=K(" Installed: ",-1)),i("span",Np,"v"+L(A.value.version),1),A.value.hasUpdate?(w(),_("span",Ip,[f[9]||(f[9]=K(" → Latest: ",-1)),i("span",Lp,"v"+L(A.value.latestVersion),1)])):J("",!0)])):A.value.loaded&&!A.value.isChecking&&!A.value.installed?(w(),_("p",jp,"PM2 is required to run and manage applications")):J("",!0)])]),i("div",Dp,[A.value.loaded&&!A.value.isChecking&&A.value.isActing?(w(),_("button",Vp,[f[11]||(f[11]=i("svg",{class:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),K(" "+L(A.value.installed?"Updating...":"Installing..."),1)])):A.value.loaded&&!A.value.isChecking&&!A.value.installed?(w(),_("button",{key:1,onClick:j,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all shadow-lg shadow-blue-500/20"},[...f[12]||(f[12]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1),K(" Install PM2 ",-1)])])):A.value.loaded&&!A.value.isChecking&&A.value.hasUpdate?(w(),_("button",{key:2,onClick:j,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-amber-500 hover:bg-amber-400 text-white transition-all shadow-lg shadow-amber-500/20"},[...f[13]||(f[13]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Update PM2 ",-1)])])):J("",!0),i("button",{onClick:S,disabled:A.value.isChecking,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":A.value.isChecking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...f[14]||(f[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,Hp)])],2),i("div",Fp,[f[16]||(f[16]=i("div",null,[i("h1",{class:"text-3xl font-bold text-white tracking-tight"},"Applications"),i("p",{class:"text-sm text-slate-400 mt-1"},"Manage and monitor your PM2 deployments")],-1)),i("button",{onClick:f[0]||(f[0]=v=>n.value=!0),class:"flex items-center px-4 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white text-sm font-medium rounded-xl transition-all shadow-lg shadow-blue-500/30 transform hover:-translate-y-0.5"},[...f[15]||(f[15]=[i("svg",{class:"h-5 w-5 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),K(" Deploy New App ",-1)])])]),i("div",Up,[(w(!0),_(ve,null,ze(t.value,v=>(w(),_("div",{key:v.pm_id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 p-6 flex flex-col transition-all hover:border-slate-600 hover:shadow-2xl"},[i("div",zp,[i("div",Wp,[f[17]||(f[17]=i("div",{class:"w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600 flex-shrink-0 mt-0.5"},[i("svg",{class:"h-6 w-6 text-slate-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})])],-1)),i("div",qp,[i("div",Kp,[i("h2",{class:"text-lg font-bold text-white truncate",title:v.name},L(v.name),9,Gp)]),i("div",Jp,[i("span",Yp,[v.pm2_env.status==="online"?(w(),_("span",Xp)):J("",!0),i("span",{class:ne(["relative inline-flex rounded-full h-2 w-2",Ae(v.pm2_env.status)])},null,2)]),i("span",{class:ne([_e(v.pm2_env.status),"capitalize"])},L(v.pm2_env.status),3),v.pm2_env.pm_uptime?(w(),_("span",Qp,L(le(v.pm2_env.pm_uptime)),1)):J("",!0)])])]),i("div",Zp,[v.id?(w(),_("button",{key:0,onClick:d=>me(v,!0),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[18]||(f[18]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,eh)):J("",!0),i("button",{onClick:d=>k(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[19]||(f[19]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])],8,th),i("button",{onClick:d=>B(v),class:"p-2 text-slate-400 hover:text-red-400 bg-slate-700/50 hover:bg-red-500/10 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Delete Application"},[...f[20]||(f[20]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])]),i("div",nh,[i("div",oh,[f[21]||(f[21]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"CPU Usage",-1)),i("p",rh,L(v.monit?v.monit.cpu:0)+"%",1)]),i("div",ih,[f[22]||(f[22]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Memory",-1)),i("p",lh,L(ie(v.monit?v.monit.memory:0)),1)]),i("div",ah,[f[23]||(f[23]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Restarts",-1)),i("p",ch,L(v.pm2_env.restart_time),1)]),i("div",uh,[f[24]||(f[24]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"App Id",-1)),i("p",dh,L(v.pm_id),1)])]),v.commitMessage?(w(),_("div",fh,[f[25]||(f[25]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",ph,L(v.commitMessage),1)])):J("",!0),v.rollbackOccurred&&v.failedCommitMessage?(w(),_("div",hh,[f[27]||(f[27]=i("div",{class:"flex items-center gap-1 font-bold uppercase tracking-wider text-[9px]"},[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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"})]),K(" Deployment Failed - Rolled Back ")],-1)),i("div",mh,[f[26]||(f[26]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-red-500/60",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",gh,L(v.failedCommitMessage),1)]),f[28]||(f[28]=i("p",{class:"text-[9px] text-red-500/50 mt-1 italic"},"The system is currently running on the previous stable version.",-1))])):J("",!0),Te(Cr,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:lo(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(w(),_("div",vh,[i("div",bh,[f[30]||(f[30]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),K(" Deployment State ")],-1)),v.pipelineState?(w(),_("div",xh,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(w(),_("span",yh,[...f[29]||(f[29]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):J("",!0),i("span",{class:ne(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},L(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])):J("",!0)]),i("div",wh,[f[33]||(f[33]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:ne(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Rt({width:Qe(v.pipelineState)})},null,6),(w(),_(ve,null,ze(["pulling","building","starting","online"],(d,g)=>i("div",{key:d,class:"relative z-10 flex flex-col items-center group"},[g<3?(w(),_("div",{key:0,class:ne(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Pe(d,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):J("",!0),i("div",{class:ne(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(d,v.pipelineState)])},[v.pipelineState===d&&v.pipelineState!=="online"?(w(),_("div",{key:0,class:ne(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):J("",!0),Pe(d,v.pipelineState)?(w(),_("svg",_h,[...f[31]||(f[31]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&O(d,v.pipelineState)?(w(),_("svg",kh,[...f[32]||(f[32]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===d?(w(),_("div",Ch)):(w(),_("div",Sh))],2),i("span",{class:ne(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===d?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Pe(d,v.pipelineState)?"text-slate-300":"text-slate-500"])},L(xe(d)),3)])),64))])])):J("",!0)]),_:2},1024),i("div",Eh,[v.pm2_env.status==="online"?(w(),_("button",{key:0,onClick:d=>re("stop",v.name),disabled:c.value[`${v.name}-stop`],class:"flex items-center justify-center p-2 text-sm font-medium text-amber-500 bg-amber-500/10 hover:bg-amber-500/20 rounded-lg transition-colors border border-amber-500/20"},[c.value[`${v.name}-stop`]?(w(),_("svg",Ah,[...f[34]||(f[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Th,[...f[35]||(f[35]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z","clip-rule":"evenodd"},null,-1)])])),K(" "+L(c.value[`${v.name}-stop`]?"Stopping":"Stop"),1)],8,$h)):(w(),_("button",{key:1,onClick:d=>re("start",v.name),disabled:c.value[`${v.name}-start`],class:"flex items-center justify-center p-2 text-sm font-medium text-emerald-500 bg-emerald-500/10 hover:bg-emerald-500/20 rounded-lg transition-colors border border-emerald-500/20"},[c.value[`${v.name}-start`]?(w(),_("svg",Rh,[...f[36]||(f[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Oh,[...f[37]||(f[37]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z","clip-rule":"evenodd"},null,-1)])])),K(" "+L(c.value[`${v.name}-start`]?"Starting":"Start"),1)],8,Mh)),i("button",{onClick:d=>re("restart",v.name),disabled:c.value[`${v.name}-restart`],class:"flex items-center justify-center p-2 text-sm font-medium text-blue-400 bg-blue-400/10 hover:bg-blue-400/20 rounded-lg transition-colors border border-blue-400/20"},[c.value[`${v.name}-restart`]?(w(),_("svg",Ph,[...f[38]||(f[38]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Nh,[...f[39]||(f[39]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])),K(" "+L(c.value[`${v.name}-restart`]?"...":"Restart"),1)],8,Bh),v.id?(w(),_("button",{key:2,onClick:d=>W(v),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 text-nowrap"},[c.value[`${v.name}-deploy`]?(w(),_("svg",Lh,[...f[40]||(f[40]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",jh,[...f[41]||(f[41]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+L(c.value[`${v.name}-deploy`]?"Syncing":"Sync")+" ",1),!c.value[`${v.name}-deploy`]&&h.value[ae(v.name)]?(w(),_("span",Dh,L(h.value[ae(v.name)]),1)):J("",!0)],8,Ih)):J("",!0)])]))),128)),(w(!0),_(ve,null,ze(z.value,v=>(w(),_("div",{key:v.id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700/50 p-6 flex flex-col relative overflow-hidden"},[v.status==="deploying"?(w(),_("div",Vh)):J("",!0),i("div",Hh,[i("div",Fh,[i("div",{class:ne(["w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600 flex-shrink-0 mt-0.5",v.status==="deploying"?"text-blue-500":"text-red-500"])},[v.status==="deploying"?(w(),_("svg",Uh,[...f[42]||(f[42]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",zh,[...f[43]||(f[43]=[i("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"},null,-1)])]))],2),i("div",Wh,[i("h2",{class:"text-lg font-bold text-white truncate",title:v.name},L(v.name),9,qh),i("div",Kh,[i("span",{class:ne(["capitalize flex-shrink-0",v.status==="deploying"?"text-blue-400":"text-red-400"])},L(v.status),3),v.commitMessage?(w(),_("span",Gh,[f[44]||(f[44]=i("svg",{class:"w-3 h-3 inline pb-[1px] mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),K(L(v.commitMessage),1)])):J("",!0)])])]),i("div",Jh,[i("button",{onClick:d=>me(v,!1),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[45]||(f[45]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,Yh),i("button",{onClick:d=>G(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[46]||(f[46]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)])],8,Xh)])]),Te(Cr,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:lo(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(w(),_("div",Qh,[i("div",Zh,[f[48]||(f[48]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),K(" Deployment State ")],-1)),i("div",em,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(w(),_("span",tm,[...f[47]||(f[47]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):J("",!0),i("span",{class:ne(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},L(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])]),i("div",sm,[f[51]||(f[51]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:ne(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Rt({width:Qe(v.pipelineState)})},null,6),(w(),_(ve,null,ze(["pulling","building","starting","online"],(d,g)=>i("div",{key:d,class:"relative z-10 flex flex-col items-center group"},[g<3?(w(),_("div",{key:0,class:ne(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Pe(d,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):J("",!0),i("div",{class:ne(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(d,v.pipelineState)])},[v.pipelineState===d&&v.pipelineState!=="online"?(w(),_("div",{key:0,class:ne(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):J("",!0),Pe(d,v.pipelineState)?(w(),_("svg",nm,[...f[49]||(f[49]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&O(d,v.pipelineState)?(w(),_("svg",om,[...f[50]||(f[50]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===d?(w(),_("div",rm)):(w(),_("div",im))],2),i("span",{class:ne(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===d?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Pe(d,v.pipelineState)?"text-slate-300":"text-slate-500"])},L(xe(d)),3)])),64))])])):J("",!0)]),_:2},1024),v.status!=="deploying"?(w(),_("button",{key:1,onClick:d=>I(v.id),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 mt-auto text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 w-full"},[c.value[`${v.name}-deploy`]?(w(),_("svg",am,[...f[52]||(f[52]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",cm,[...f[53]||(f[53]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+L(c.value[`${v.name}-deploy`]?"Syncing...":"Deploy")+" ",1),!c.value[`${v.name}-deploy`]&&h.value[v.id]?(w(),_("span",um,L(h.value[v.id]),1)):J("",!0)],8,lm)):J("",!0)]))),128))]),t.value.length===0&&z.value.length===0?(w(),_("div",dm,[f[54]||(f[54]=tt('<div class="w-20 h-20 rounded-full bg-slate-800 flex items-center justify-center mb-6 shadow-inner ring-1 ring-slate-700/50"><svg class="h-10 w-10 text-slate-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"></path></svg></div><h3 class="text-xl font-bold text-white mb-2">No Applications Found</h3><p class="text-slate-400 text-center max-w-sm mb-6">You haven't deployed any applications yet or PM2 is not managing any processes.</p>',3)),i("button",{onClick:f[1]||(f[1]=v=>n.value=!0),class:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all shadow-lg border border-slate-600"}," Deploy Your First App ")])):J("",!0),Te(F0,{isOpen:n.value,appToEdit:a.value,onClose:f[2]||(f[2]=v=>{n.value=!1,a.value=null}),onDeploy:D,onDelete:C},null,8,["isOpen","appToEdit"]),Te(Y0,{isOpen:o.value,appId:r.value,appName:l.value,onClose:f[3]||(f[3]=v=>o.value=!1)},null,8,["isOpen","appId","appName"]),b.value?(w(),_("div",fm,[i("div",pm,[f[57]||(f[57]=i("div",{class:"w-20 h-20 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-6 border border-red-500/20"},[i("svg",{class:"w-10 h-10 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),f[58]||(f[58]=i("h3",{class:"text-2xl font-bold text-white mb-2"},"Delete Application?",-1)),i("p",hm,[f[55]||(f[55]=K(" Are you sure you want to delete ",-1)),i("span",mm,L(y.value?.name),1),f[56]||(f[56]=K("? This will stop the PM2 process and permanently remove the configuration. ",-1))]),i("div",gm,[i("button",{onClick:f[4]||(f[4]=v=>{b.value=!1,y.value=null}),class:"flex-1 px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all border border-slate-600"}," Keep Application "),i("button",{onClick:Q,class:"flex-1 px-6 py-3 bg-red-600 hover:bg-red-500 text-white font-bold rounded-xl transition-all shadow-lg shadow-red-600/20"}," Yes, Delete it ")])])])):J("",!0)]))}},bm={class:"max-w-4xl mx-auto px-4 py-8"},xm={class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},ym={class:"p-6 space-y-6"},wm={class:"space-y-3 mb-4"},_m={class:"flex items-center space-x-3"},km=["src","alt"],Cm={class:"text-white font-medium"},Sm=["onClick"],Em={key:0,class:"text-sm text-slate-500 italic"},$m={class:"flex gap-2"},Am=["disabled"],Tm={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Mm={key:1},Rm={key:2},Om={class:"flex items-center justify-between mb-2"},Bm={class:"relative"},Pm=["value"],Nm={class:"flex items-center justify-between mb-2"},Im={class:"flex items-center space-x-3"},Lm={class:"relative"},jm=["type"],Dm={key:0,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Vm={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Hm={class:"mt-4 p-4 bg-blue-500/5 border border-blue-500/20 rounded-xl space-y-3"},Fm={class:"text-xs text-slate-400 space-y-2 list-decimal list-inside"},Um={class:"text-blue-300 font-mono"},zm={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Wm={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-end"},qm=["disabled"],Km={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Gm={key:1,class:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Jm={class:"mt-8 bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},Ym={class:"p-6 border-b border-slate-700 flex items-center justify-between"},Xm=["disabled"],Qm={class:"p-6"},Zm={class:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6"},e1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700"},t1={class:"text-lg font-bold text-white font-mono"},s1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700"},n1={class:"bg-slate-900/60 rounded-xl p-4 border border-slate-700 flex flex-col justify-center"},o1={key:0,class:"inline-flex items-center gap-1.5 text-amber-400 text-sm font-medium"},r1={key:1,class:"inline-flex items-center gap-1.5 text-emerald-400 text-sm font-medium"},i1={key:2,class:"text-slate-500 text-sm italic"},l1={key:3,class:"text-slate-500 text-sm"},a1={key:0,class:"mb-4 p-4 bg-slate-900/60 rounded-xl border border-slate-700"},c1={class:"text-xs text-slate-300 whitespace-pre-wrap font-mono max-h-32 overflow-y-auto"},u1=["href"],d1={key:1,class:"flex items-center gap-4"},f1=["disabled"],p1={key:0,class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},h1={key:1,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},m1={key:2,class:"mt-4 p-4 bg-slate-900/80 rounded-xl border border-slate-700 font-mono text-xs text-slate-300 whitespace-pre-wrap max-h-40 overflow-y-auto"},g1={class:"mt-8 bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},v1={class:"p-6 border-b border-slate-700 flex items-center justify-between"},b1={class:"overflow-x-auto"},x1={class:"w-full text-left border-collapse"},y1={class:"divide-y divide-slate-700/50"},w1={class:"px-6 py-4 text-slate-300 font-mono whitespace-nowrap"},_1={class:"px-6 py-4"},k1={class:"px-6 py-4 text-slate-300"},C1={class:"px-6 py-4"},S1={key:0,class:"text-emerald-400 flex items-center"},E1={key:1,class:"text-red-400 flex items-center"},$1={key:2,class:"text-slate-400 flex items-center"},A1=["title"],T1={key:0},M1={__name:"Settings",setup(e){const t=F({webhookSecret:"",discordWebhook:"",telegramBotToken:"",telegramChatId:""}),s=F([]),n=F(!1),o=F(!1),r=F(!1),l=F(""),a=F(!1),c=F(""),h=F([]),u=F({current:null,latest:null,hasUpdate:!1,releaseUrl:null,changelog:""}),p=F(!1),b=F(!1),y=F(!1),A=F("");let S=null;const j=W=>W?new Date(W).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):"-",U=Ne(()=>window.location.origin+"/api/webhook"),N=()=>{const W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let k="";for(let G=0;G<32;G++)k+=W.charAt(Math.floor(Math.random()*W.length));t.value.webhookSecret=k,a.value=!0},z=async(W,k)=>{if(W)try{await navigator.clipboard.writeText(W),c.value=k,setTimeout(()=>{c.value===k&&(c.value="")},2e3)}catch(G){console.error("Failed to copy text: ",G)}},D=async()=>{try{const W=await fetch("/api/git/accounts",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});s.value=await W.json()}catch{console.error("Failed to load accounts")}},te=async()=>{if(l.value){o.value=!0;try{const k=await(await fetch("/api/git/accounts",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({token:l.value})})).json();k.success?(l.value="",await D()):alert(k.error||"Invalid GitHub Token")}catch{alert("Error connecting to GitHub")}finally{o.value=!1}}},ae=async W=>{if(confirm("Are you sure you want to disconnect this account?"))try{await fetch(`/api/git/accounts/${W}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await D()}catch{alert("Failed to delete account")}},re=async()=>{try{const k=await(await fetch("/api/settings",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();t.value={...t.value,...k}}catch(W){console.error("Failed to load settings",W)}},X=async()=>{n.value=!0;try{await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify(t.value)}),alert("Settings Saved Successfully")}catch{alert("Failed to save settings")}finally{n.value=!1}},C=async()=>{r.value=!0;try{const W=await fetch("/api/settings/webhook-logs",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});h.value=await W.json()}catch{console.error("Failed to load webhook logs")}finally{r.value=!1}},B=()=>{S||(S=os()),S.off("webhook-log"),S.on("webhook-log",W=>{h.value.unshift(W),h.value.length>50&&(h.value=h.value.slice(0,50))})},Q=async()=>{p.value=!0;try{const W=await fetch("/api/system/version-check",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});u.value=await W.json(),b.value=!0}finally{p.value=!1}},I=async()=>{if(confirm("Update PM2Me? The server will restart.")){y.value=!0,A.value="";try{const k=await(await fetch("/api/system/update",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`,"Content-Type":"application/json"}})).json();A.value=k.output||k.error||"Done",k.success&&await Q()}finally{y.value=!1}}};return Gt(async()=>{re(),D(),await C(),B(),Q()}),rs(()=>{S&&S.disconnect()}),(W,k)=>(w(),_("div",bm,[k[56]||(k[56]=i("h1",{class:"text-3xl font-bold text-white tracking-tight mb-8"},"Settings",-1)),i("div",xm,[k[37]||(k[37]=tt('<div class="p-6 border-b border-slate-700"><h2 class="text-xl font-bold text-white flex items-center"><svg class="w-6 h-6 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg> System Configurations </h2><p class="text-sm text-slate-400 mt-1">Configure Webhooks and Integrations</p></div>',1)),i("div",ym,[i("div",null,[k[9]||(k[9]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Connected GitHub Accounts",-1)),i("div",wm,[(w(!0),_(ve,null,ze(s.value,G=>(w(),_("div",{key:G.id,class:"flex items-center justify-between p-3 bg-slate-900 border border-slate-700 rounded-lg"},[i("div",_m,[i("img",{src:G.avatarUrl,alt:G.username,class:"w-8 h-8 rounded-full border border-slate-600"},null,8,km),i("span",Cm,"@"+L(G.username),1)]),i("button",{type:"button",onClick:me=>ae(G.id),class:"text-sm text-red-400 hover:text-red-300 transition-colors"},"Disconnect",8,Sm)]))),128)),s.value.length===0?(w(),_("p",Em,"No accounts connected yet.")):J("",!0)]),k[10]||(k[10]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Add New Account (Personal Access Token)",-1)),i("div",$m,[ke(i("input",{type:"password","onUpdate:modelValue":k[0]||(k[0]=G=>l.value=G),class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"ghp_xxxxxxxxxxxxxxxxxxxx"},null,512),[[Be,l.value]]),i("button",{type:"button",onClick:te,disabled:o.value,class:"px-5 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50 whitespace-nowrap font-medium flex items-center"},[o.value?(w(),_("svg",Tm,[...k[8]||(k[8]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):J("",!0),o.value?(w(),_("span",Mm,"Testing...")):(w(),_("span",Rm,"Connect"))],8,Am)]),k[11]||(k[11]=i("p",{class:"mt-1 text-xs text-slate-500"},"Used to fetch repositories and branches automatically when deploying. ",-1))]),k[31]||(k[31]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[i("div",Om,[k[13]||(k[13]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook URL",-1)),i("button",{onClick:k[1]||(k[1]=G=>z(U.value,"URL")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[k[12]||(k[12]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),K(" "+L(c.value==="URL"?"Copied!":"Copy URL"),1)])]),i("div",Bm,[i("input",{type:"text",value:U.value,readonly:"",class:"w-full bg-slate-900/50 border border-slate-700 rounded-lg px-4 py-2.5 text-slate-400 text-sm font-mono outline-none transition-all cursor-default",placeholder:"Calculating..."},null,8,Pm)]),k[14]||(k[14]=i("p",{class:"mt-1 text-[11px] text-slate-500 italic"},"Provide this URL to your GitHub repository's Webhook settings.",-1))]),i("div",null,[i("div",Nm,[k[17]||(k[17]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook Secret",-1)),i("div",Im,[i("button",{onClick:N,class:"text-xs text-emerald-400 hover:text-emerald-300 flex items-center transition-colors"},[...k[15]||(k[15]=[i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Generate ",-1)])]),i("button",{onClick:k[2]||(k[2]=G=>z(t.value.webhookSecret,"Secret")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[k[16]||(k[16]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),K(" "+L(c.value==="Secret"?"Copied!":"Copy Secret"),1)])])]),i("div",Lm,[ke(i("input",{type:a.value?"text":"password","onUpdate:modelValue":k[3]||(k[3]=G=>t.value.webhookSecret=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all pr-12",placeholder:"Secret for verifying GitHub payloads"},null,8,jm),[[yu,t.value.webhookSecret]]),i("button",{onClick:k[4]||(k[4]=G=>a.value=!a.value),class:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 p-1"},[a.value?(w(),_("svg",Dm,[...k[18]||(k[18]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.882 9.882L9.881 9.882M9.882 9.882A3.001 3.001 0 0014.15 14.15l-4.268-4.268zm7.665 7.665l2.484 2.484M15.904 15.904a10.023 10.023 0 01-3.904 1.096m-4.06-1.121A10.053 10.053 0 013 12c.5-2.015 1.581-3.76 3.061-5.061m10.878 10.878l-4.243-4.243m4.243 4.243L19 19m-4.732-4.732l-4.242-4.242M4.732 4.732L2 2"},null,-1)])])):(w(),_("svg",Vm,[...k[19]||(k[19]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])]))])]),i("div",Hm,[k[26]||(k[26]=i("h3",{class:"text-sm font-bold text-blue-400 flex items-center"},[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),K(" How to setup GitHub Webhook ")],-1)),i("ol",Fm,[k[21]||(k[21]=i("li",null,"Open your repository on GitHub.",-1)),k[22]||(k[22]=i("li",null,[K("Go to "),i("span",{class:"text-slate-200"},"Settings"),K(" > "),i("span",{class:"text-slate-200"},"Webhooks"),K(" > "),i("span",{class:"text-slate-200"},"Add webhook"),K(". ")],-1)),i("li",null,[k[20]||(k[20]=K("Payload URL: ",-1)),i("span",Um,L(U.value),1)]),k[23]||(k[23]=i("li",null,[K("Content type: "),i("span",{class:"text-orange-400 font-bold"},"application/json")],-1)),k[24]||(k[24]=i("li",null,[K("Secret: "),i("span",{class:"text-slate-200"},"Paste your Webhook Secret above")],-1)),k[25]||(k[25]=i("li",null,[K("Which events: "),i("span",{class:"text-slate-200"},"Just the push event"),K(".")],-1))]),k[27]||(k[27]=i("p",{class:"text-[10px] text-slate-500 italic"},"This allows PM2Me to automatically deploy your apps when you push code.",-1))])]),k[32]||(k[32]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[k[28]||(k[28]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Discord Webhook URL",-1)),ke(i("input",{type:"url","onUpdate:modelValue":k[5]||(k[5]=G=>t.value.discordWebhook=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"https://discord.com/api/webhooks/..."},null,512),[[Be,t.value.discordWebhook]])]),k[33]||(k[33]=i("hr",{class:"border-slate-700"},null,-1)),i("div",zm,[i("div",null,[k[29]||(k[29]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Bot Token",-1)),ke(i("input",{type:"password","onUpdate:modelValue":k[6]||(k[6]=G=>t.value.telegramBotToken=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"},null,512),[[Be,t.value.telegramBotToken]])]),i("div",null,[k[30]||(k[30]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Chat ID",-1)),ke(i("input",{type:"text","onUpdate:modelValue":k[7]||(k[7]=G=>t.value.telegramChatId=G),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"-1001234567890"},null,512),[[Be,t.value.telegramChatId]])])])]),i("div",Wm,[i("button",{onClick:X,disabled:n.value,class:"px-6 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-medium rounded-lg transition-all shadow-lg flex items-center disabled:opacity-70"},[n.value?(w(),_("svg",Km,[...k[34]||(k[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(w(),_("svg",Gm,[...k[35]||(k[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])),k[36]||(k[36]=K(" Save Settings ",-1))],8,qm)])]),i("div",Jm,[i("div",Ym,[k[40]||(k[40]=i("div",null,[i("h2",{class:"text-xl font-bold text-white flex items-center gap-2"},[i("svg",{class:"w-5 h-5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})]),K(" App Version ")]),i("p",{class:"text-sm text-slate-400 mt-1"},"Check for updates and manage the PM2Me version")],-1)),i("button",{onClick:Q,disabled:p.value,class:"flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-medium bg-slate-700 hover:bg-slate-600 text-slate-300 transition-all disabled:opacity-50"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":p.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...k[38]||(k[38]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2)),k[39]||(k[39]=K(" Check for Update ",-1))],8,Xm)]),i("div",Qm,[i("div",Zm,[i("div",e1,[k[41]||(k[41]=i("p",{class:"text-xs text-slate-500 mb-1"},"Current Version",-1)),i("p",t1,"v"+L(u.value.current||"..."),1)]),i("div",s1,[k[42]||(k[42]=i("p",{class:"text-xs text-slate-500 mb-1"},"Latest Release",-1)),i("p",{class:ne(["text-lg font-bold font-mono",u.value.hasUpdate?"text-amber-400":"text-emerald-400"])},L(u.value.latest?"v"+u.value.latest:"-"),3)]),i("div",n1,[u.value.hasUpdate?(w(),_("span",o1,[...k[43]||(k[43]=[i("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),K(" Update available! ",-1)])])):u.value.latest?(w(),_("span",r1,[...k[44]||(k[44]=[i("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),K(" Up to date ",-1)])])):b.value?(w(),_("span",i1," No releases found on GitHub ")):(w(),_("span",l1,"Not checked"))])]),u.value.changelog?(w(),_("div",a1,[k[45]||(k[45]=i("p",{class:"text-xs text-slate-500 mb-2 font-medium uppercase tracking-wider"},"Release Notes",-1)),i("pre",c1,L(u.value.changelog),1),u.value.releaseUrl?(w(),_("a",{key:0,href:u.value.releaseUrl,target:"_blank",class:"inline-flex items-center gap-1 mt-2 text-xs text-blue-400 hover:text-blue-300"}," View on GitHub → ",8,u1)):J("",!0)])):J("",!0),u.value.hasUpdate?(w(),_("div",d1,[i("button",{onClick:I,disabled:y.value,class:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-semibold bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-50"},[y.value?(w(),_("svg",p1,[...k[46]||(k[46]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_("svg",h1,[...k[47]||(k[47]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),K(" "+L(y.value?"Updating...":"Update Now"),1)],8,f1),k[48]||(k[48]=i("p",{class:"text-xs text-slate-500"},"Server will restart after update",-1))])):J("",!0),A.value?(w(),_("div",m1,L(A.value),1)):J("",!0)])]),i("div",g1,[i("div",v1,[k[50]||(k[50]=i("div",null,[i("h2",{class:"text-xl font-bold text-white flex items-center"},[i("svg",{class:"w-6 h-6 mr-2 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),K(" Webhook History ")]),i("p",{class:"text-sm text-slate-400 mt-1"},"Last 50 recorded events (Push, Ping, etc.)")],-1)),i("button",{onClick:C,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh Logs"},[(w(),_("svg",{class:ne(["w-5 h-5",{"animate-spin":r.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...k[49]||(k[49]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))])]),i("div",b1,[i("table",x1,[k[55]||(k[55]=i("thead",{class:"bg-slate-900/50 text-slate-400 text-xs font-medium uppercase tracking-wider"},[i("tr",null,[i("th",{class:"px-6 py-3 border-b border-slate-700"},"Time"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Event"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Repository"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Status"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Details")])],-1)),i("tbody",y1,[(w(!0),_(ve,null,ze(h.value,G=>(w(),_("tr",{key:G.id,class:"hover:bg-slate-700/30 transition-colors text-sm"},[i("td",w1,L(j(G.timestamp)),1),i("td",_1,[i("span",{class:ne(["px-2 py-0.5 rounded text-[10px] font-bold uppercase",G.eventType==="push"?"bg-blue-500/20 text-blue-400":"bg-slate-700 text-slate-400"])},L(G.eventType),3)]),i("td",k1,L(G.repository),1),i("td",C1,[G.status==="success"?(w(),_("span",S1,[...k[51]||(k[51]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),K(" Success ",-1)])])):G.status==="error"?(w(),_("span",E1,[...k[52]||(k[52]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1),K(" Error ",-1)])])):(w(),_("span",$1,[k[53]||(k[53]=i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),K(" "+L(G.status),1)]))]),i("td",{class:"px-6 py-4 text-slate-500 text-xs truncate max-w-xs",title:G.details},L(G.details),9,A1)]))),128)),h.value.length===0?(w(),_("tr",T1,[...k[54]||(k[54]=[i("td",{colspan:"5",class:"px-6 py-12 text-center text-slate-500 italic"},' No webhook events recorded yet. Perform a Push or click "Test" on GitHub. ',-1)])])):J("",!0)])])])])]))}},R1={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6"},O1={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4"},B1={class:"flex items-center gap-3"},P1={class:"relative flex h-2 w-2"},N1={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},I1=["disabled"],L1={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},j1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},D1={class:"text-sm font-semibold text-slate-200 flex items-center gap-2"},V1={class:"text-lg"},H1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},F1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},U1={class:"text-xs font-mono text-slate-300 break-all"},z1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-5"},W1={class:"flex flex-wrap gap-3"},q1=["disabled"],K1=["disabled"],G1=["disabled"],J1=["disabled"],Y1=["disabled"],X1={key:0,class:"flex items-center gap-2 text-slate-400 text-sm"},Q1={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},Z1={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},eg={class:"bg-slate-800/60 rounded-2xl border border-slate-700 overflow-hidden"},tg={class:"flex",style:{"min-height":"600px"}},sg={class:"flex-shrink-0 bg-slate-900/60 border-r border-slate-700",style:{width:"220px"}},ng={class:"flex items-center justify-between px-3 py-2 border-b border-slate-700/50"},og={key:0,class:"px-2 py-2 border-b border-slate-700/50"},rg={class:"flex gap-1 mt-1"},ig={class:"overflow-y-auto",style:{"max-height":"560px"}},lg={key:0,class:"px-3 py-4 text-xs text-slate-600 text-center"},ag=["onClick"],cg={class:"flex-1 text-xs font-mono truncate"},ug=["onClick"],dg={key:1,class:"border-t border-slate-700/50 p-2"},fg=["disabled"],pg={key:0,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},hg={class:"text-[10px] text-slate-600 text-center mt-1"},mg={class:"flex-1 flex flex-col overflow-hidden"},gg={class:"flex items-center justify-between px-4 py-3 border-b border-slate-700 bg-slate-900/30"},vg={class:"flex items-center gap-2"},bg={class:"text-sm font-semibold text-slate-300"},xg={class:"text-xs text-slate-600 font-mono"},yg={key:0,class:"text-xs text-amber-400 flex items-center gap-1"},wg={class:"flex items-center gap-2"},_g=["disabled"],kg={key:0,class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Cg={key:1,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},Sg={key:0,class:"flex-1 flex items-center justify-center text-slate-600 text-sm"},Eg={class:"flex overflow-hidden flex-1",style:{background:"#030712"}},$g=["textContent"],Ag=["innerHTML"],Tg={class:"flex items-center justify-between px-4 py-1.5 border-t border-slate-800 text-xs font-mono",style:{background:"#020617"}},Mg={class:"flex items-center gap-4"},Rg={key:0,class:"text-slate-300"},Og={key:1,class:"text-slate-600 text-xs"},Bg={class:"text-slate-600"},Pg={__name:"Nginx",setup(e){const t=()=>localStorage.getItem("pm2me_token"),s=()=>({Authorization:`Bearer ${t()}`,"Content-Type":"application/json"}),n=F({os:"",confFile:"",confDir:"",installed:!1,version:""}),o=F({running:!1,checking:!1}),r=F([]),l=F(!0),a=F(null),c=F(""),h=F(!1),u=F(!1),p=F(!1),b=F(null),y=F(!1),A=F(!1),S=F(!1),j=F(""),U=F(null),N=F(null),z=F(null),D=F(!1),te=F({line:1,col:1}),ae=/^(server_name|server|location|upstream|http|events|listen|root|index|include|proxy_pass|proxy_set_header|proxy_hide_header|proxy_redirect|proxy_connect_timeout|proxy_read_timeout|proxy_send_timeout|fastcgi_pass|fastcgi_param|fastcgi_index|ssl_certificate|ssl_certificate_key|ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers|ssl_session_cache|ssl_session_timeout|add_header|return|rewrite|if|set|map|geo|break|last|redirect|permanent|worker_processes|worker_connections|keepalive_timeout|keepalive|gzip|gzip_types|gzip_comp_level|gzip_min_length|gzip_vary|client_max_body_size|client_body_timeout|client_header_timeout|access_log|error_log|log_format|sendfile|tcp_nopush|tcp_nodelay|default_type|charset|expires|autoindex|alias|deny|allow|auth_basic|auth_basic_user_file|limit_req|limit_req_zone|limit_conn|limit_conn_zone|resolver|resolver_timeout|user|pid|daemon|types|pcre_jit|load_module|open_file_cache|open_file_cache_valid|error_page|try_files|internal|proxy_cache|proxy_cache_valid|proxy_buffering)\b/,re=T=>!T||/[\s;{}()"',]/.test(T);function X(T){return T.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function C(T){const m=T.match(/^(\s*)(#.*)$/);if(m)return`${X(m[1])}<span class="hl-comment">${X(m[2])}</span>`;let f="",v=0;for(;v<T.length;){const d=T.slice(v),g=T[v-1];if(T[v]==="#"&&(v===0||/\s/.test(g))){f+=`<span class="hl-comment">${X(d)}</span>`;break}if(T[v]==='"'){let $=v+1;for(;$<T.length&&T[$]!=='"';)T[$]==="\\"&&$++,$++;f+=`<span class="hl-string">${X(T.slice(v,$+1))}</span>`,v=$+1;continue}if(T[v]==="'"){let $=v+1;for(;$<T.length&&T[$]!=="'";)T[$]==="\\"&&$++,$++;f+=`<span class="hl-string">${X(T.slice(v,$+1))}</span>`,v=$+1;continue}if(T[v]==="$"){const $=d.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)/);if($){f+=`<span class="hl-variable">${X($[1])}</span>`,v+=$[1].length;continue}}const x=d.match(ae);if(x&&re(g)&&re(T[v+x[1].length])){f+=`<span class="hl-keyword">${x[1]}</span>`,v+=x[1].length;continue}const E=d.match(/^(on|off|none|any)\b/);if(E&&re(g)){f+=`<span class="hl-special">${E[1]}</span>`,v+=E[1].length;continue}if(/\d/.test(T[v])&&re(g)){const $=d.match(/^(\d+[a-z]*)/);if($&&re(T[v+$[1].length])){f+=`<span class="hl-number">${$[1]}</span>`,v+=$[1].length;continue}}if(T[v]==="{"||T[v]==="}"){f+=`<span class="hl-brace">${T[v]}</span>`,v++;continue}if(T[v]===";"){f+='<span class="hl-semi">;</span>',v++;continue}f+=X(T[v]),v++}return f}const B=Ne(()=>c.value.split(`
|
|
5
5
|
`).map(C).join(`
|
|
6
6
|
`)),Q=Ne(()=>Math.max(1,c.value.split(`
|
|
7
7
|
`).length)),I=T=>{const m=T.target,v=m.value.substring(0,m.selectionStart).split(`
|
|
8
|
-
`);te.value={line:v.length,col:v[v.length-1].length+1}},W=()=>{!z.value||!N.value||(N.value.scrollTop=z.value.scrollTop)},k=async()=>{if(await Mt(),!U.value||!z.value)return;const T=z.value.querySelector('[aria-hidden="true"]');T&&(U.value.style.height=T.offsetHeight+"px")},G=T=>{
|
|
9
|
-
`);if(f===v)c.value=d.slice(0,f)+x+d.slice(v),Mt(()=>{m.selectionStart=m.selectionEnd=f+x.length,I({target:m}),k()});else{let
|
|
10
|
-
`),Mt(()=>{m.selectionStart=f+x.length,m.selectionEnd=v+V,I({target:m}),k()})}
|
|
11
|
-
`);let
|
|
12
|
-
`),p.value=!0;const P=V?-2:2;Mt(()=>{m.selectionStart=Math.max(0,f+P),m.selectionEnd=Math.max(0,v+(M-E+1)*P),I({target:m})});return}},le=async()=>{const T=await fetch("/api/nginx/info",{headers:s()});n.value=await T.json()},ie=async()=>{o.value.checking=!0;try{o.value.running=(await(await fetch("/api/nginx/status",{headers:s()})).json()).running}finally{o.value.checking=!1}},Ae=async()=>{const m=await(await fetch("/api/nginx/files",{headers:s()})).json();r.value=m.files||[],l.value=m.isWindows,!a.value&&r.value.length>0&&await _e(r.value[0])},_e=async T=>{p.value&&a.value&&!confirm(`Discard unsaved changes to ${a.value.name}?`)||(a.value=T,p.value=!1,await Se())},Se=async()=>{if(!a.value)return;const m=await(await fetch(`/api/nginx/config?file=${encodeURIComponent(a.value.path)}`,{headers:s()})).json();c.value=m.content,p.value=!1,await k()},xe=async()=>{if(a.value){u.value=!0;try{await fetch("/api/nginx/config",{method:"POST",headers:s(),body:JSON.stringify({content:c.value,file:a.value.path})}),p.value=!1}finally{u.value=!1}}},De=async()=>{if(a.value){A.value=!0;try{const T=a.value.enabled?"/api/nginx/disable":"/api/nginx/enable";await fetch(T,{method:"POST",headers:s(),body:JSON.stringify({filePath:a.value.path,name:a.value.name})}),await Ae();const m=r.value.find(f=>f.path===a.value?.path);m&&(a.value=m)}finally{A.value=!1}}},Qe=async()=>{if(!L.value.trim())return;const m=await(await fetch("/api/nginx/files/new",{method:"POST",headers:s(),body:JSON.stringify({name:L.value.trim()})})).json();if($.value=!1,L.value="",m.success){await Ae();const f=r.value.find(v=>v.name===m.name);f&&await _e(f)}},Pe=async T=>{confirm(`Delete ${T.name}?`)&&(await fetch("/api/nginx/files",{method:"DELETE",headers:s(),body:JSON.stringify({filePath:T.path})}),a.value?.path===T.path&&(a.value=null,c.value=""),await Ae())},Ee=async T=>{h.value=!0,b.value=null;try{const f=await(await fetch("/api/nginx/action",{method:"POST",headers:s(),body:JSON.stringify({action:T})})).json();b.value=f.output||f.error||"",y.value=f.success,["start","reload","stop","quit"].includes(T)&&setTimeout(ie,800)}finally{h.value=!1}};let O=null;return rs(async()=>{await le(),await ie(),await Ae(),O=setInterval(ie,5e3)}),is(()=>clearInterval(O)),(T,m)=>(w(),_("div",R1,[i("div",O1,[m[15]||(m[15]=tt('<div data-v-8287dcd4><h1 class="text-3xl font-bold text-white tracking-tight flex items-center gap-3" data-v-8287dcd4><div class="w-10 h-10 rounded-xl bg-emerald-500/20 flex items-center justify-center border border-emerald-500/30" data-v-8287dcd4><svg class="w-5 h-5 text-emerald-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-8287dcd4><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01" data-v-8287dcd4></path></svg></div> Nginx </h1><p class="text-sm text-slate-400 mt-1" data-v-8287dcd4>Manage nginx configuration and process</p></div>',1)),i("div",B1,[i("div",{class:ne(["flex items-center gap-2 px-4 py-2 rounded-xl border text-sm font-medium",o.value.running?"bg-emerald-500/10 border-emerald-500/30 text-emerald-400":"bg-slate-800 border-slate-700 text-slate-400"])},[i("span",P1,[o.value.running?(w(),_("span",N1)):J("",!0),i("span",{class:ne(["relative inline-flex rounded-full h-2 w-2",o.value.running?"bg-emerald-400":"bg-slate-500"])},null,2)]),K(" "+j(o.value.running?"Running":"Stopped"),1)],2),i("button",{onClick:ie,disabled:o.value.checking,class:"p-2 text-slate-400 hover:text-white transition-colors rounded-lg hover:bg-slate-800"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":o.value.checking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...m[14]||(m[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,I1)])]),i("div",L1,[i("div",j1,[m[16]||(m[16]=i("p",{class:"text-xs text-slate-500 mb-1"},"OS Platform",-1)),i("p",D1,[i("span",V1,j(n.value.os==="windows"?"🪟":"🐧"),1),K(" "+j(n.value.os==="windows"?"Windows":"Linux"),1)])]),i("div",H1,[m[17]||(m[17]=i("p",{class:"text-xs text-slate-500 mb-1"},"Nginx Version",-1)),i("p",{class:ne(["text-sm font-semibold",n.value.installed?"text-emerald-400":"text-red-400"])},j(n.value.installed?`v${n.value.version}`:"Not installed"),3)]),i("div",F1,[m[18]||(m[18]=i("p",{class:"text-xs text-slate-500 mb-1"},"Config Dir",-1)),i("p",U1,j(n.value.confDir),1)])]),i("div",z1,[m[27]||(m[27]=i("h2",{class:"text-sm font-semibold text-slate-300 mb-4"},"Process Control",-1)),i("div",W1,[i("button",{onClick:m[0]||(m[0]=f=>Ee("test")),disabled:h.value,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-blue-600/20 hover:bg-blue-600/40 border border-blue-500/30 text-blue-400 disabled:opacity-50"},[...m[19]||(m[19]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),K(" Test Config ",-1)])],8,q1),i("button",{onClick:m[1]||(m[1]=f=>Ee("start")),disabled:h.value||o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-emerald-600/20 hover:bg-emerald-600/40 border border-emerald-500/30 text-emerald-400 disabled:opacity-30"},[...m[20]||(m[20]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),K(" Start ",-1)])],8,K1),i("button",{onClick:m[2]||(m[2]=f=>Ee("reload")),disabled:h.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-amber-500/20 hover:bg-amber-500/40 border border-amber-500/30 text-amber-400 disabled:opacity-30"},[...m[21]||(m[21]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Reload ",-1)])],8,G1),i("button",{onClick:m[3]||(m[3]=f=>Ee("quit")),disabled:h.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-slate-700 hover:bg-slate-600 border border-slate-600 text-slate-300 disabled:opacity-30"},[...m[22]||(m[22]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"})],-1),K(" Quit ",-1)])],8,J1),i("button",{onClick:m[4]||(m[4]=f=>Ee("stop")),disabled:h.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-red-600/20 hover:bg-red-600/40 border border-red-500/30 text-red-400 disabled:opacity-30"},[...m[23]||(m[23]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),K(" Stop ",-1)])],8,Y1),h.value?(w(),_("div",X1,[...m[24]||(m[24]=[i("svg",{class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1),K(" Running... ",-1)])])):J("",!0)]),b.value!==null?(w(),_("div",{key:0,class:ne(["mt-4 rounded-xl bg-slate-900/80 border p-4 font-mono text-sm whitespace-pre-wrap",y.value?"border-emerald-500/30 text-emerald-300":"border-red-500/30 text-red-300"])},[i("div",{class:ne(["flex items-center gap-2 mb-2 text-xs font-sans",y.value?"text-emerald-500":"text-red-500"])},[y.value?(w(),_("svg",Q1,[...m[25]||(m[25]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(w(),_("svg",Z1,[...m[26]||(m[26]=[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1)])])),K(" "+j(y.value?"Success":"Error"),1)],2),K(" "+j(b.value||"(no output)"),1)],2)):J("",!0)]),i("div",eg,[i("div",tg,[i("div",sg,[i("div",ng,[m[29]||(m[29]=i("span",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider"},"Files",-1)),i("button",{onClick:m[5]||(m[5]=f=>$.value=!0),title:"New file",class:"p-1 rounded hover:bg-slate-700 text-slate-500 hover:text-white transition-colors"},[...m[28]||(m[28]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])])]),$.value?(w(),_("div",og,[ke(i("input",{"onUpdate:modelValue":m[6]||(m[6]=f=>L.value=f),onKeydown:[xn(Qe,["enter"]),m[7]||(m[7]=xn(f=>{$.value=!1,L.value=""},["escape"]))],placeholder:"filename.conf",class:"w-full bg-slate-800 border border-blue-500/50 rounded px-2 py-1 text-xs text-slate-200 focus:outline-none focus:border-blue-400",autofocus:""},null,544),[[Be,L.value]]),i("div",rg,[i("button",{onClick:Qe,class:"flex-1 text-xs px-2 py-1 bg-blue-600/30 hover:bg-blue-600/50 text-blue-400 rounded"},"Create"),i("button",{onClick:m[8]||(m[8]=f=>{$.value=!1,L.value=""}),class:"flex-1 text-xs px-2 py-1 bg-slate-700 hover:bg-slate-600 text-slate-400 rounded"},"Cancel")])])):J("",!0),i("div",ig,[r.value.length===0?(w(),_("div",lg,"No config files found")):J("",!0),(w(!0),_(ve,null,ze(r.value,f=>(w(),_("div",{key:f.path,onClick:v=>_e(f),class:ne(["group flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors border-l-2",a.value?.path===f.path?"bg-slate-700/60 border-blue-500 text-slate-100":"border-transparent hover:bg-slate-800/60 text-slate-400 hover:text-slate-200"])},[m[31]||(m[31]=i("svg",{class:"w-3.5 h-3.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),i("span",cg,j(f.name),1),!l.value&&f.enabledPath?(w(),_("span",{key:0,class:ne(["text-[10px] px-1 rounded font-medium flex-shrink-0",f.enabled?"bg-emerald-500/20 text-emerald-400":"bg-slate-700 text-slate-500"])},j(f.enabled?"on":"off"),3)):J("",!0),f.name!=="nginx.conf"?(w(),_("button",{key:1,onClick:Bn(v=>Pe(f),["stop"]),class:"opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-red-500/20 text-slate-500 hover:text-red-400 transition-all flex-shrink-0",title:"Delete"},[...m[30]||(m[30]=[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,ug)):J("",!0)],10,ag))),128))]),!l.value&&a.value&&a.value.enabledPath?(w(),_("div",dg,[i("button",{onClick:De,disabled:A.value,class:ne(["w-full text-xs px-3 py-2 rounded-lg font-medium transition-all flex items-center justify-center gap-1.5",a.value.enabled?"bg-red-600/20 hover:bg-red-600/30 border border-red-500/30 text-red-400":"bg-emerald-600/20 hover:bg-emerald-600/30 border border-emerald-500/30 text-emerald-400"])},[A.value?(w(),_("svg",pg,[...m[32]||(m[32]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_(ve,{key:1},[K(j(a.value.enabled?"⛔ Disable site":"✅ Enable site"),1)],64))],10,fg),i("p",hg,j(a.value.enabled?"Will unlink from sites-enabled":"Will symlink to sites-enabled"),1)])):J("",!0)]),i("div",mg,[i("div",gg,[i("div",vg,[m[34]||(m[34]=i("svg",{class:"w-4 h-4 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),i("span",bg,j(a.value?.name||"No file selected"),1),i("span",xg,j(a.value?.path),1),p.value?(w(),_("span",yg,[...m[33]||(m[33]=[i("svg",{class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 8 8"},[i("circle",{cx:"4",cy:"4",r:"4"})],-1),K(" Unsaved ",-1)])])):J("",!0)]),i("div",wg,[i("button",{onClick:xe,disabled:u.value||!p.value||!a.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-40"},[u.value?(w(),_("svg",Cg,[...m[36]||(m[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_("svg",kg,[...m[35]||(m[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"},null,-1)])])),m[37]||(m[37]=K(" Save ",-1))],8,_g),i("button",{onClick:Se,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-slate-700 hover:bg-slate-600 text-slate-300 transition-all"},[...m[38]||(m[38]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),K(" Reload ",-1)])])])]),a.value?(w(),_(ve,{key:1},[i("div",Eg,[i("div",{ref_key:"gutterRef",ref:N,class:"select-none flex-shrink-0 text-right font-mono text-[13px] leading-relaxed border-r border-slate-800",style:{"min-width":"3.5rem",overflow:"hidden","pointer-events":"none",padding:"12px 10px 12px 8px",background:"#020617"}},[(w(!0),_(ve,null,ze(Q.value,f=>(w(),_("div",{key:f,class:ne(["transition-colors",f===te.value.line&&D.value?"text-slate-300":"text-slate-600"])},j(f),3))),128))],512),i("div",{ref_key:"scrollWrap",ref:z,class:"relative flex-1 editor-scroll",style:{"overflow-y":"scroll","overflow-x":"auto"},onScroll:W},[i("div",{"aria-hidden":"true",class:"invisible pointer-events-none whitespace-pre editor-line-height",style:{padding:"12px 16px"},textContent:j(c.value+`
|
|
13
|
-
`)},null,8,$g),i("pre",{ref:"highlightPre","aria-hidden":"true",class:"absolute top-0 left-0 w-full m-0 pointer-events-none editor-line-height whitespace-pre",style:{padding:"12px 16px"},innerHTML:B.value},null,8,Ag),ke(i("textarea",{ref_key:"editorRef",ref:U,"onUpdate:modelValue":m[9]||(m[9]=f=>c.value=f),onInput:G,onClick:m[10]||(m[10]=f=>I(f)),onKeydown:me,onKeyup:m[11]||(m[11]=f=>I(f)),onFocus:m[12]||(m[12]=f=>D.value=!0),onBlur:m[13]||(m[13]=f=>D.value=!1),spellcheck:"false",class:"absolute top-0 left-0 w-full focus:outline-none resize-none editor-textarea editor-line-height",style:{padding:"12px 16px",height:"100%","caret-color":"#60a5fa",color:"transparent",background:"transparent","tab-size":"4","white-space":"pre",overflow:"hidden","z-index":"1"},placeholder:""},null,544),[[Be,c.value]])],544)]),i("div",Tg,[i("div",Mg,[D.value?(w(),_("span",Rg,"Ln "+
|
|
8
|
+
`);te.value={line:v.length,col:v[v.length-1].length+1}},W=()=>{!z.value||!N.value||(N.value.scrollTop=z.value.scrollTop)},k=async()=>{if(await Mt(),!U.value||!z.value)return;const T=z.value.querySelector('[aria-hidden="true"]');T&&(U.value.style.height=T.offsetHeight+"px")},G=T=>{h.value=!0,I(T),k()},me=T=>{const m=T.target,{selectionStart:f,selectionEnd:v,value:d}=m;if(T.key==="s"&&(T.ctrlKey||T.metaKey)){T.preventDefault(),xe();return}if(T.key==="Tab"&&!T.ctrlKey&&!T.metaKey){T.preventDefault();const x=" ",E=d.split(`
|
|
9
|
+
`);if(f===v)c.value=d.slice(0,f)+x+d.slice(v),Mt(()=>{m.selectionStart=m.selectionEnd=f+x.length,I({target:m}),k()});else{let $=0,M=0,H=0;for(let P=0;P<E.length;P++){const R=$+E[P].length;$<=f&&f<=R+1&&(M=P),$<=v&&v<=R+1&&(H=P),$+=E[P].length+1}const V=(H-M+1)*x.length;for(let P=M;P<=H;P++)E[P]=T.shiftKey?E[P].replace(new RegExp(`^ {1,${x.length}}`),""):x+E[P];c.value=E.join(`
|
|
10
|
+
`),Mt(()=>{m.selectionStart=f+x.length,m.selectionEnd=v+V,I({target:m}),k()})}h.value=!0;return}if((T.key==="/"||T.code==="Slash"||T.code==="NumpadDivide")&&(T.ctrlKey||T.metaKey)){T.preventDefault();const x=d.split(`
|
|
11
|
+
`);let E=0,$=0,M=0;for(let R=0;R<x.length;R++){const Y=E+x[R].length;E<=f&&f<=Y+1&&($=R),E<=v&&v<=Y+1&&(M=R),E+=x[R].length+1}if(M>$){let R=0;for(let Y=0;Y<M;Y++)R+=x[Y].length+1;v===R&&M--}for(;M>$&&x[M].trim()==="";)M--;const H=x.slice($,M+1).filter(R=>R.trim()!==""),V=H.length>0&&H.every(R=>/^\s*#/.test(R));for(let R=$;R<=M;R++)x[R].trim()!==""&&(x[R]=V?x[R].replace(/^(\s*)# ?/,"$1"):x[R].replace(/^(\s*)/,"$1# "));c.value=x.join(`
|
|
12
|
+
`),h.value=!0;const P=V?-2:2;Mt(()=>{m.selectionStart=Math.max(0,f+P),m.selectionEnd=Math.max(0,v+(M-$+1)*P),I({target:m})});return}},le=async()=>{const T=await fetch("/api/nginx/info",{headers:s()});n.value=await T.json()},ie=async()=>{o.value.checking=!0;try{o.value.running=(await(await fetch("/api/nginx/status",{headers:s()})).json()).running}finally{o.value.checking=!1}},Ae=async()=>{const m=await(await fetch("/api/nginx/files",{headers:s()})).json();r.value=m.files||[],l.value=m.isWindows,!a.value&&r.value.length>0&&await _e(r.value[0])},_e=async T=>{h.value&&a.value&&!confirm(`Discard unsaved changes to ${a.value.name}?`)||(a.value=T,h.value=!1,await Se())},Se=async()=>{if(!a.value)return;const m=await(await fetch(`/api/nginx/config?file=${encodeURIComponent(a.value.path)}`,{headers:s()})).json();c.value=m.content,h.value=!1,await k()},xe=async()=>{if(a.value){u.value=!0;try{await fetch("/api/nginx/config",{method:"POST",headers:s(),body:JSON.stringify({content:c.value,file:a.value.path})}),h.value=!1}finally{u.value=!1}}},De=async()=>{if(a.value){A.value=!0;try{const T=a.value.enabled?"/api/nginx/disable":"/api/nginx/enable";await fetch(T,{method:"POST",headers:s(),body:JSON.stringify({filePath:a.value.path,name:a.value.name})}),await Ae();const m=r.value.find(f=>f.path===a.value?.path);m&&(a.value=m)}finally{A.value=!1}}},Qe=async()=>{if(!j.value.trim())return;const m=await(await fetch("/api/nginx/files/new",{method:"POST",headers:s(),body:JSON.stringify({name:j.value.trim()})})).json();if(S.value=!1,j.value="",m.success){await Ae();const f=r.value.find(v=>v.name===m.name);f&&await _e(f)}},Pe=async T=>{confirm(`Delete ${T.name}?`)&&(await fetch("/api/nginx/files",{method:"DELETE",headers:s(),body:JSON.stringify({filePath:T.path})}),a.value?.path===T.path&&(a.value=null,c.value=""),await Ae())},Ee=async T=>{p.value=!0,b.value=null;try{const f=await(await fetch("/api/nginx/action",{method:"POST",headers:s(),body:JSON.stringify({action:T})})).json();b.value=f.output||f.error||"",y.value=f.success,["start","reload","stop","quit"].includes(T)&&setTimeout(ie,800)}finally{p.value=!1}};let O=null;return Gt(async()=>{await le(),await ie(),await Ae(),O=setInterval(ie,5e3)}),rs(()=>clearInterval(O)),(T,m)=>(w(),_("div",R1,[i("div",O1,[m[15]||(m[15]=tt('<div data-v-8287dcd4><h1 class="text-3xl font-bold text-white tracking-tight flex items-center gap-3" data-v-8287dcd4><div class="w-10 h-10 rounded-xl bg-emerald-500/20 flex items-center justify-center border border-emerald-500/30" data-v-8287dcd4><svg class="w-5 h-5 text-emerald-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-8287dcd4><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01" data-v-8287dcd4></path></svg></div> Nginx </h1><p class="text-sm text-slate-400 mt-1" data-v-8287dcd4>Manage nginx configuration and process</p></div>',1)),i("div",B1,[i("div",{class:ne(["flex items-center gap-2 px-4 py-2 rounded-xl border text-sm font-medium",o.value.running?"bg-emerald-500/10 border-emerald-500/30 text-emerald-400":"bg-slate-800 border-slate-700 text-slate-400"])},[i("span",P1,[o.value.running?(w(),_("span",N1)):J("",!0),i("span",{class:ne(["relative inline-flex rounded-full h-2 w-2",o.value.running?"bg-emerald-400":"bg-slate-500"])},null,2)]),K(" "+L(o.value.running?"Running":"Stopped"),1)],2),i("button",{onClick:ie,disabled:o.value.checking,class:"p-2 text-slate-400 hover:text-white transition-colors rounded-lg hover:bg-slate-800"},[(w(),_("svg",{class:ne(["w-4 h-4",{"animate-spin":o.value.checking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...m[14]||(m[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,I1)])]),i("div",L1,[i("div",j1,[m[16]||(m[16]=i("p",{class:"text-xs text-slate-500 mb-1"},"OS Platform",-1)),i("p",D1,[i("span",V1,L(n.value.os==="windows"?"🪟":"🐧"),1),K(" "+L(n.value.os==="windows"?"Windows":"Linux"),1)])]),i("div",H1,[m[17]||(m[17]=i("p",{class:"text-xs text-slate-500 mb-1"},"Nginx Version",-1)),i("p",{class:ne(["text-sm font-semibold",n.value.installed?"text-emerald-400":"text-red-400"])},L(n.value.installed?`v${n.value.version}`:"Not installed"),3)]),i("div",F1,[m[18]||(m[18]=i("p",{class:"text-xs text-slate-500 mb-1"},"Config Dir",-1)),i("p",U1,L(n.value.confDir),1)])]),i("div",z1,[m[27]||(m[27]=i("h2",{class:"text-sm font-semibold text-slate-300 mb-4"},"Process Control",-1)),i("div",W1,[i("button",{onClick:m[0]||(m[0]=f=>Ee("test")),disabled:p.value,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-blue-600/20 hover:bg-blue-600/40 border border-blue-500/30 text-blue-400 disabled:opacity-50"},[...m[19]||(m[19]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),K(" Test Config ",-1)])],8,q1),i("button",{onClick:m[1]||(m[1]=f=>Ee("start")),disabled:p.value||o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-emerald-600/20 hover:bg-emerald-600/40 border border-emerald-500/30 text-emerald-400 disabled:opacity-30"},[...m[20]||(m[20]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),K(" Start ",-1)])],8,K1),i("button",{onClick:m[2]||(m[2]=f=>Ee("reload")),disabled:p.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-amber-500/20 hover:bg-amber-500/40 border border-amber-500/30 text-amber-400 disabled:opacity-30"},[...m[21]||(m[21]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),K(" Reload ",-1)])],8,G1),i("button",{onClick:m[3]||(m[3]=f=>Ee("quit")),disabled:p.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-slate-700 hover:bg-slate-600 border border-slate-600 text-slate-300 disabled:opacity-30"},[...m[22]||(m[22]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"})],-1),K(" Quit ",-1)])],8,J1),i("button",{onClick:m[4]||(m[4]=f=>Ee("stop")),disabled:p.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-red-600/20 hover:bg-red-600/40 border border-red-500/30 text-red-400 disabled:opacity-30"},[...m[23]||(m[23]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),K(" Stop ",-1)])],8,Y1),p.value?(w(),_("div",X1,[...m[24]||(m[24]=[i("svg",{class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1),K(" Running... ",-1)])])):J("",!0)]),b.value!==null?(w(),_("div",{key:0,class:ne(["mt-4 rounded-xl bg-slate-900/80 border p-4 font-mono text-sm whitespace-pre-wrap",y.value?"border-emerald-500/30 text-emerald-300":"border-red-500/30 text-red-300"])},[i("div",{class:ne(["flex items-center gap-2 mb-2 text-xs font-sans",y.value?"text-emerald-500":"text-red-500"])},[y.value?(w(),_("svg",Q1,[...m[25]||(m[25]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(w(),_("svg",Z1,[...m[26]||(m[26]=[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1)])])),K(" "+L(y.value?"Success":"Error"),1)],2),K(" "+L(b.value||"(no output)"),1)],2)):J("",!0)]),i("div",eg,[i("div",tg,[i("div",sg,[i("div",ng,[m[29]||(m[29]=i("span",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider"},"Files",-1)),i("button",{onClick:m[5]||(m[5]=f=>S.value=!0),title:"New file",class:"p-1 rounded hover:bg-slate-700 text-slate-500 hover:text-white transition-colors"},[...m[28]||(m[28]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])])]),S.value?(w(),_("div",og,[ke(i("input",{"onUpdate:modelValue":m[6]||(m[6]=f=>j.value=f),onKeydown:[xn(Qe,["enter"]),m[7]||(m[7]=xn(f=>{S.value=!1,j.value=""},["escape"]))],placeholder:"filename.conf",class:"w-full bg-slate-800 border border-blue-500/50 rounded px-2 py-1 text-xs text-slate-200 focus:outline-none focus:border-blue-400",autofocus:""},null,544),[[Be,j.value]]),i("div",rg,[i("button",{onClick:Qe,class:"flex-1 text-xs px-2 py-1 bg-blue-600/30 hover:bg-blue-600/50 text-blue-400 rounded"},"Create"),i("button",{onClick:m[8]||(m[8]=f=>{S.value=!1,j.value=""}),class:"flex-1 text-xs px-2 py-1 bg-slate-700 hover:bg-slate-600 text-slate-400 rounded"},"Cancel")])])):J("",!0),i("div",ig,[r.value.length===0?(w(),_("div",lg,"No config files found")):J("",!0),(w(!0),_(ve,null,ze(r.value,f=>(w(),_("div",{key:f.path,onClick:v=>_e(f),class:ne(["group flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors border-l-2",a.value?.path===f.path?"bg-slate-700/60 border-blue-500 text-slate-100":"border-transparent hover:bg-slate-800/60 text-slate-400 hover:text-slate-200"])},[m[31]||(m[31]=i("svg",{class:"w-3.5 h-3.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),i("span",cg,L(f.name),1),!l.value&&f.enabledPath?(w(),_("span",{key:0,class:ne(["text-[10px] px-1 rounded font-medium flex-shrink-0",f.enabled?"bg-emerald-500/20 text-emerald-400":"bg-slate-700 text-slate-500"])},L(f.enabled?"on":"off"),3)):J("",!0),f.name!=="nginx.conf"?(w(),_("button",{key:1,onClick:Bn(v=>Pe(f),["stop"]),class:"opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-red-500/20 text-slate-500 hover:text-red-400 transition-all flex-shrink-0",title:"Delete"},[...m[30]||(m[30]=[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,ug)):J("",!0)],10,ag))),128))]),!l.value&&a.value&&a.value.enabledPath?(w(),_("div",dg,[i("button",{onClick:De,disabled:A.value,class:ne(["w-full text-xs px-3 py-2 rounded-lg font-medium transition-all flex items-center justify-center gap-1.5",a.value.enabled?"bg-red-600/20 hover:bg-red-600/30 border border-red-500/30 text-red-400":"bg-emerald-600/20 hover:bg-emerald-600/30 border border-emerald-500/30 text-emerald-400"])},[A.value?(w(),_("svg",pg,[...m[32]||(m[32]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_(ve,{key:1},[K(L(a.value.enabled?"⛔ Disable site":"✅ Enable site"),1)],64))],10,fg),i("p",hg,L(a.value.enabled?"Will unlink from sites-enabled":"Will symlink to sites-enabled"),1)])):J("",!0)]),i("div",mg,[i("div",gg,[i("div",vg,[m[34]||(m[34]=i("svg",{class:"w-4 h-4 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("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)),i("span",bg,L(a.value?.name||"No file selected"),1),i("span",xg,L(a.value?.path),1),h.value?(w(),_("span",yg,[...m[33]||(m[33]=[i("svg",{class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 8 8"},[i("circle",{cx:"4",cy:"4",r:"4"})],-1),K(" Unsaved ",-1)])])):J("",!0)]),i("div",wg,[i("button",{onClick:xe,disabled:u.value||!h.value||!a.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-40"},[u.value?(w(),_("svg",Cg,[...m[36]||(m[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_("svg",kg,[...m[35]||(m[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"},null,-1)])])),m[37]||(m[37]=K(" Save ",-1))],8,_g),i("button",{onClick:Se,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-slate-700 hover:bg-slate-600 text-slate-300 transition-all"},[...m[38]||(m[38]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),K(" Reload ",-1)])])])]),a.value?(w(),_(ve,{key:1},[i("div",Eg,[i("div",{ref_key:"gutterRef",ref:N,class:"select-none flex-shrink-0 text-right font-mono text-[13px] leading-relaxed border-r border-slate-800",style:{"min-width":"3.5rem",overflow:"hidden","pointer-events":"none",padding:"12px 10px 12px 8px",background:"#020617"}},[(w(!0),_(ve,null,ze(Q.value,f=>(w(),_("div",{key:f,class:ne(["transition-colors",f===te.value.line&&D.value?"text-slate-300":"text-slate-600"])},L(f),3))),128))],512),i("div",{ref_key:"scrollWrap",ref:z,class:"relative flex-1 editor-scroll",style:{"overflow-y":"scroll","overflow-x":"auto"},onScroll:W},[i("div",{"aria-hidden":"true",class:"invisible pointer-events-none whitespace-pre editor-line-height",style:{padding:"12px 16px"},textContent:L(c.value+`
|
|
13
|
+
`)},null,8,$g),i("pre",{ref:"highlightPre","aria-hidden":"true",class:"absolute top-0 left-0 w-full m-0 pointer-events-none editor-line-height whitespace-pre",style:{padding:"12px 16px"},innerHTML:B.value},null,8,Ag),ke(i("textarea",{ref_key:"editorRef",ref:U,"onUpdate:modelValue":m[9]||(m[9]=f=>c.value=f),onInput:G,onClick:m[10]||(m[10]=f=>I(f)),onKeydown:me,onKeyup:m[11]||(m[11]=f=>I(f)),onFocus:m[12]||(m[12]=f=>D.value=!0),onBlur:m[13]||(m[13]=f=>D.value=!1),spellcheck:"false",class:"absolute top-0 left-0 w-full focus:outline-none resize-none editor-textarea editor-line-height",style:{padding:"12px 16px",height:"100%","caret-color":"#60a5fa",color:"transparent",background:"transparent","tab-size":"4","white-space":"pre",overflow:"hidden","z-index":"1"},placeholder:""},null,544),[[Be,c.value]])],544)]),i("div",Tg,[i("div",Mg,[D.value?(w(),_("span",Rg,"Ln "+L(te.value.line)+", Col "+L(te.value.col),1)):(w(),_("span",Og,"Ctrl+S Save · Ctrl+/ Comment · Tab Indent"))]),i("div",Bg,L(Q.value)+" lines",1)])],64)):(w(),_("div",Sg," Select a file from the sidebar to edit "))])])])]))}},Ng=Zo(Pg,[["__scopeId","data-v-8287dcd4"]]),Ig={class:"min-h-screen flex items-center justify-center px-4",style:{background:"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)"}},Lg={class:"w-full max-w-lg"},jg={class:"flex items-center justify-center gap-2 mb-8"},Dg={key:0,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Vg={key:1},Hg={class:"bg-slate-800/80 backdrop-blur-md rounded-3xl border border-slate-700 p-8 shadow-2xl"},Fg={key:0},Ug={class:"space-y-4"},zg={key:0,class:"text-red-400 text-xs mt-1"},Wg={key:0,class:"mt-4 p-3 bg-red-500/10 border border-red-500/20 rounded-xl text-red-400 text-sm"},qg=["disabled"],Kg={key:1},Gg=["placeholder"],Jg={class:"text-slate-500 text-xs mt-1.5"},Yg={class:"flex flex-wrap gap-2 mt-4"},Xg=["onClick"],Qg={key:0,class:"mt-4 p-3 bg-red-500/10 border border-red-500/20 rounded-xl text-red-400 text-sm"},Zg={class:"flex gap-3 mt-6"},ev=["disabled"],tv={key:0,class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},sv={class:"text-center text-slate-600 text-xs mt-6"},nv={__name:"Setup",setup(e){qo();const t=F(1),s=F(""),n=F(""),o=F(""),r=F(!1),l=F(""),a=F("1.0.0"),c=Ne(()=>n.value.length>0&&s.value!==n.value),h=F(!1),u=F("/opt/pm2me/apps"),p=F(["/opt/pm2me/apps","/home/apps","/var/pm2me/apps"]);Gt(async()=>{try{const S=await(await fetch("/api/setup/info")).json();h.value=S.isWindows,u.value=S.defaultPath,p.value=S.pathPresets,S.version&&(a.value=S.version)}catch(A){console.error("Failed to fetch server OS info:",A)}});const b=()=>{if(l.value="",!s.value){l.value="Password is required";return}if(c.value){l.value="Passwords do not match";return}o.value=o.value||u.value,t.value=2},y=async()=>{if(!o.value){l.value="Apps path is required";return}r.value=!0,l.value="";try{const A=await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adminPassword:s.value,appsPath:o.value})}),S=await A.json();if(!A.ok){l.value=S.error||"Setup failed";return}window.location.href="/login"}catch(A){l.value=A.message}finally{r.value=!1}};return(A,S)=>(w(),_("div",Ig,[i("div",Lg,[S[16]||(S[16]=tt('<div class="text-center mb-8"><div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-blue-500/20 border border-blue-500/30 mb-4"><svg class="w-8 h-8 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></div><h1 class="text-3xl font-bold text-white">PM2Me Setup</h1><p class="text-slate-400 mt-1 text-sm">Configure your instance in a few steps</p></div>',1)),i("div",jg,[(w(),_(ve,null,ze(2,j=>i("div",{key:j,class:"flex items-center gap-2"},[i("div",{class:ne(["w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all",t.value>j?"bg-emerald-500 text-white":t.value===j?"bg-blue-500 text-white":"bg-slate-700 text-slate-500"])},[t.value>j?(w(),_("svg",Dg,[...S[4]||(S[4]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):(w(),_("span",Vg,L(j),1))],2),j<2?(w(),_("div",{key:0,class:ne(["w-12 h-0.5 rounded",t.value>j?"bg-emerald-500":"bg-slate-700"])},null,2)):J("",!0)])),64))]),i("div",Hg,[t.value===1?(w(),_("div",Fg,[S[8]||(S[8]=i("h2",{class:"text-xl font-semibold text-white mb-1"},"Admin Password",-1)),S[9]||(S[9]=i("p",{class:"text-slate-400 text-sm mb-6"},"Set a secure password for your PM2Me admin account.",-1)),i("div",Ug,[i("div",null,[S[5]||(S[5]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1.5"},"Password",-1)),ke(i("input",{"onUpdate:modelValue":S[0]||(S[0]=j=>s.value=j),type:"password",placeholder:"Enter admin password",class:"w-full bg-slate-900/80 border border-slate-600 rounded-xl px-4 py-3 text-sm text-white focus:outline-none focus:border-blue-500 transition-colors",onKeydown:xn(b,["enter"])},null,544),[[Be,s.value]])]),i("div",null,[S[6]||(S[6]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1.5"},"Confirm Password",-1)),ke(i("input",{"onUpdate:modelValue":S[1]||(S[1]=j=>n.value=j),type:"password",placeholder:"Confirm password",class:"w-full bg-slate-900/80 border border-slate-600 rounded-xl px-4 py-3 text-sm text-white focus:outline-none focus:border-blue-500 transition-colors",onKeydown:xn(b,["enter"])},null,544),[[Be,n.value]]),c.value?(w(),_("p",zg,"Passwords do not match")):J("",!0)])]),l.value?(w(),_("div",Wg,L(l.value),1)):J("",!0),i("button",{onClick:b,disabled:!s.value||c.value,class:"mt-6 w-full py-3 rounded-xl font-semibold text-sm bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2"},[...S[7]||(S[7]=[K(" Continue ",-1),i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])],8,qg)])):J("",!0),t.value===2?(w(),_("div",Kg,[S[14]||(S[14]=i("h2",{class:"text-xl font-semibold text-white mb-1"},"Apps Storage Path",-1)),S[15]||(S[15]=i("p",{class:"text-slate-400 text-sm mb-6"},"Where should PM2Me store your deployed apps?",-1)),i("div",null,[S[10]||(S[10]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1.5"},"Directory Path",-1)),ke(i("input",{"onUpdate:modelValue":S[2]||(S[2]=j=>o.value=j),type:"text",placeholder:u.value,class:"w-full bg-slate-900/80 border border-slate-600 rounded-xl px-4 py-3 text-sm text-white font-mono focus:outline-none focus:border-blue-500 transition-colors"},null,8,Gg),[[Be,o.value]]),i("p",Jg,"Directory will be created if it doesn't exist. (Server OS: "+L(h.value?"Windows":"Linux")+")",1)]),i("div",Yg,[(w(!0),_(ve,null,ze(p.value,j=>(w(),_("button",{key:j,onClick:U=>o.value=j,class:"text-xs px-3 py-1.5 rounded-lg bg-slate-700 hover:bg-slate-600 text-slate-300 font-mono transition-colors"},L(j),9,Xg))),128))]),l.value?(w(),_("div",Qg,L(l.value),1)):J("",!0),i("div",Zg,[i("button",{onClick:S[3]||(S[3]=j=>t.value=1),class:"px-4 py-3 rounded-xl text-sm text-slate-400 hover:text-white bg-slate-700 hover:bg-slate-600 transition-all"}," Back "),i("button",{onClick:y,disabled:!o.value||r.value,class:"flex-1 py-3 rounded-xl font-semibold text-sm bg-emerald-600 hover:bg-emerald-500 text-white transition-all disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2"},[r.value?(w(),_("svg",tv,[...S[11]||(S[11]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(w(),_(ve,{key:1},[S[12]||(S[12]=i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)),S[13]||(S[13]=K(" Complete Setup ",-1))],64))],8,ev)])])):J("",!0)]),i("p",sv,"PM2Me v"+L(a.value),1)])]))}},ov=[{path:"/setup",name:"Setup",component:nv},{path:"/login",name:"Login",component:Qd},{path:"/",name:"Dashboard",component:vm,meta:{requiresAuth:!0}},{path:"/nginx",name:"Nginx",component:Ng,meta:{requiresAuth:!0}},{path:"/settings",name:"Settings",component:M1,meta:{requiresAuth:!0}}],Yl=Ld({history:md(),routes:ov});Yl.beforeEach(async(e,t,s)=>{let n=!1;try{n=(await(await fetch("/api/setup/status")).json()).needsSetup}catch{n=!1}if(!n&&e.name==="Setup")return s({name:"Login"});if(n&&e.name!=="Setup")return s({name:"Setup"});const o=localStorage.getItem("pm2me_token");if(e.meta.requiresAuth&&!o)return s({name:"Login"});s()});const Xl=$u(zd);Xl.use(Yl);Xl.mount("#app");
|