Mirror PilotVault's API Server layout and add the superadmin console,
plugin system, runtime PocketBase settings, and user/organization
management. The car domain (cars, service records, parts, sharing) is
carried over unchanged apart from the auth switch.
Layout: main.go -> cmd/server/main.go; module carcontrol/api ->
drivervault/apiserver. internal/api is split by concern (auth, users,
orgs, settings, plugins, status, health, respond).
Auth: replace the server-minted HS256 JWT and the sessions collection
with a PocketBase token proxy. /api/auth/login relays PocketBase's
{token, record}, and every protected request re-resolves that token
against PocketBase, so a role change or deletion takes effect at once
instead of waiting out a token. AUTH_SECRET is obsolete and internal/auth
is gone. Per-device session listing/revocation goes with it: PocketBase
tokens are stateless. Changing a password rotates the user's token key,
which invalidates every token already issued.
Roles: add superadmin alongside user/admin, plus an organizations
collection and users.organization. Admins are scoped to their own
organization; superadmins span all of them. Guards prevent changing your
own role, deleting your own account, an admin touching a superadmin, and
deleting an organization that still has members.
Plugins: new internal/plugins package with one contract over two kinds --
builtin (compiled in) and external (any HTTP service, registered at
runtime with no rebuild). State persists to plugins.json; secrets are
masked on read and preserved when saved back at the mask.
PocketBase settings: /api/admin/pb-config applies a new connection at
runtime and persists it to .env. It deliberately does not require a
working service account, so a wrong or unreachable connection can still
be fixed from the panel.
Panel: rebuilt as the superadmin console -- login gate, status, users,
organizations, PocketBase, plugins, and the endpoint reference.
Clients: update the Web App and Phone App for the PocketBase token shape,
the move of user management to /api/users ({users}/{user} envelopes, with
password resets folded into PATCH), and the removal of sessions. Both now
mirror the server's real guards rather than the old last-admin rule, and
parse PocketBase's field-level error shape.
Config: modern POCKETBASE_*/API_ADDR names with legacy PB_*/PORT
fallbacks, so existing .env files keep working. Also fixes /api/status
probing the Web App on 8090 instead of DriverVault's 5173.
Run scripts/setup-pocketbase.mjs to add the organizations collection and
grow users.role; every client must log in once more.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
97 KiB
JavaScript
18 lines
97 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/**
|
|
* @vue/shared v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function on(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const J={},xt=[],He=()=>{},ui=()=>!1,xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),de=Object.assign,rn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},wo=Object.prototype.hasOwnProperty,W=(e,t)=>wo.call(e,t),U=Array.isArray,wt=e=>Zt(e)==="[object Map]",At=e=>Zt(e)==="[object Set]",$n=e=>Zt(e)==="[object Date]",H=e=>typeof e=="function",ee=e=>typeof e=="string",Ve=e=>typeof e=="symbol",z=e=>e!==null&&typeof e=="object",fi=e=>(z(e)||H(e))&&H(e.then)&&H(e.catch),di=Object.prototype.toString,Zt=e=>di.call(e),So=e=>Zt(e).slice(8,-1),pi=e=>Zt(e)==="[object Object]",ln=e=>ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=on(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ss=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},To=/-\w/g,Ce=Ss(e=>e.replace(To,t=>t.slice(1).toUpperCase())),Co=/\B([A-Z])/g,rt=Ss(e=>e.replace(Co,"-$1").toLowerCase()),hi=Ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=Ss(e=>e?`on${hi(e)}`:""),Ne=(e,t)=>!Object.is(e,t),us=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},gi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let An;const Cs=()=>An||(An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function an(e){if(U(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=ee(n)?$o(n):an(n);if(i)for(const o in i)t[o]=i[o]}return t}else if(ee(e)||z(e))return e}const Eo=/;(?![^(]*\))/g,ko=/:([^]+)/,Po=/\/\*[^]*?\*\//g;function $o(e){const t={};return e.replace(Po,"").split(Eo).forEach(s=>{if(s){const n=s.split(ko);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function je(e){let t="";if(ee(e))t=e;else if(U(e))for(let s=0;s<e.length;s++){const n=je(e[s]);n&&(t+=n+" ")}else if(z(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ao="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Oo=on(Ao);function mi(e){return!!e||e===""}function Mo(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=nt(e[n],t[n]);return s}function nt(e,t){if(e===t)return!0;let s=$n(e),n=$n(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Ve(e),n=Ve(t),s||n)return e===t;if(s=U(e),n=U(t),s||n)return s&&n?Mo(e,t):!1;if(s=z(e),n=z(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!nt(e[r],t[r]))return!1}}return String(e)===String(t)}function cn(e,t){return e.findIndex(s=>nt(s,t))}const bi=e=>!!(e&&e.__v_isRef===!0),D=e=>ee(e)?e:e==null?"":U(e)||z(e)&&(e.toString===di||!H(e.toString))?bi(e)?D(e.value):JSON.stringify(e,vi,2):String(e),vi=(e,t)=>bi(t)?vi(e,t.value):wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ds(n,o)+" =>"]=i,s),{})}:At(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ds(s))}:Ve(t)?Ds(t):z(t)&&!U(t)&&!pi(t)?String(t):t,Ds=(e,t="")=>{var s;return Ve(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
* @vue/reactivity v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let re;class Ro{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&re&&(re.active?(this.parent=re,this.index=(re.scopes||(re.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)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=re;try{return re=this,t()}finally{re=s}}}on(){++this._on===1&&(this.prevScope=re,re=this)}off(){if(this._on>0&&--this._on===0){if(re===this)re=this.prevScope;else{let t=re;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){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 i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Io(){return re}let X;const Fs=new WeakSet;class _i{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,re&&(re.active?re.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fs.has(this)&&(Fs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,On(this),wi(this);const t=X,s=Ee;X=this,Ee=!0;try{return this.fn()}finally{Si(this),X=t,Ee=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,On(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let yi=0,Ht,Vt;function xi(e,t=!1){if(e.flags|=8,t){e.next=Vt,Vt=e;return}e.next=Ht,Ht=e}function un(){yi++}function fn(){if(--yi>0)return;if(Vt){let t=Vt;for(Vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ht;){let t=Ht;for(Ht=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 wi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Si(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),dn(n),Do(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ti(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ti(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gt)||(e.globalVersion=Gt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=X,n=Ee;X=e,Ee=!0;try{wi(e);const i=e.fn(e._value);(t.version===0||Ne(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{X=s,Ee=n,Si(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)dn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Do(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ee=!0;const Ci=[];function Be(){Ci.push(Ee),Ee=!1}function Ke(){const e=Ci.pop();Ee=e===void 0?!0:e}function On(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=X;X=void 0;try{t()}finally{X=s}}}let Gt=0;class Fo{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 pn{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(!X||!Ee||X===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==X)s=this.activeLink=new Fo(X,this),X.deps?(s.prevDep=X.depsTail,X.depsTail.nextDep=s,X.depsTail=s):X.deps=X.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=X.depsTail,s.nextDep=void 0,X.depsTail.nextDep=s,X.depsTail=s,X.deps===s&&(X.deps=n)}return s}trigger(t){this.version++,Gt++,this.notify(t)}notify(t){un();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{fn()}}}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 zs=new WeakMap,gt=Symbol(""),qs=Symbol(""),zt=Symbol("");function ae(e,t,s){if(Ee&&X){let n=zs.get(e);n||zs.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new pn),i.map=n,i.key=s),i.track()}}function qe(e,t,s,n,i,o){const r=zs.get(e);if(!r){Gt++;return}const l=a=>{a&&a.trigger()};if(un(),t==="clear")r.forEach(l);else{const a=U(e),p=a&&ln(s);if(a&&s==="length"){const u=Number(n);r.forEach((h,T)=>{(T==="length"||T===zt||!Ve(T)&&T>=u)&&l(h)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),p&&l(r.get(zt)),t){case"add":a?p&&l(r.get("length")):(l(r.get(gt)),wt(e)&&l(r.get(qs)));break;case"delete":a||(l(r.get(gt)),wt(e)&&l(r.get(qs)));break;case"set":wt(e)&&l(r.get(gt));break}}fn()}function _t(e){const t=K(e);return t===e?t:(ae(t,"iterate",zt),we(e)?t:t.map(ke))}function Es(e){return ae(e=K(e),"iterate",zt),e}function Le(e,t){return Xe(e)?Et(mt(e)?ke(t):t):ke(t)}const Lo={__proto__:null,[Symbol.iterator](){return Ls(this,Symbol.iterator,e=>Le(this,e))},concat(...e){return _t(this).concat(...e.map(t=>U(t)?_t(t):t))},entries(){return Ls(this,"entries",e=>(e[1]=Le(this,e[1]),e))},every(e,t){return We(this,"every",e,t,void 0,arguments)},filter(e,t){return We(this,"filter",e,t,s=>s.map(n=>Le(this,n)),arguments)},find(e,t){return We(this,"find",e,t,s=>Le(this,s),arguments)},findIndex(e,t){return We(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return We(this,"findLast",e,t,s=>Le(this,s),arguments)},findLastIndex(e,t){return We(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return We(this,"forEach",e,t,void 0,arguments)},includes(...e){return Us(this,"includes",e)},indexOf(...e){return Us(this,"indexOf",e)},join(e){return _t(this).join(e)},lastIndexOf(...e){return Us(this,"lastIndexOf",e)},map(e,t){return We(this,"map",e,t,void 0,arguments)},pop(){return Dt(this,"pop")},push(...e){return Dt(this,"push",e)},reduce(e,...t){return Mn(this,"reduce",e,t)},reduceRight(e,...t){return Mn(this,"reduceRight",e,t)},shift(){return Dt(this,"shift")},some(e,t){return We(this,"some",e,t,void 0,arguments)},splice(...e){return Dt(this,"splice",e)},toReversed(){return _t(this).toReversed()},toSorted(e){return _t(this).toSorted(e)},toSpliced(...e){return _t(this).toSpliced(...e)},unshift(...e){return Dt(this,"unshift",e)},values(){return Ls(this,"values",e=>Le(this,e))}};function Ls(e,t,s){const n=Es(e),i=n[t]();return n!==e&&!we(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Uo=Array.prototype;function We(e,t,s,n,i,o){const r=Es(e),l=r!==e&&!we(e),a=r[t];if(a!==Uo[t]){const h=a.apply(e,o);return l?ke(h):h}let p=s;r!==e&&(l?p=function(h,T){return s.call(this,Le(e,h),T,e)}:s.length>2&&(p=function(h,T){return s.call(this,h,T,e)}));const u=a.call(r,p,n);return l&&i?i(u):u}function Mn(e,t,s,n){const i=Es(e),o=i!==e&&!we(e);let r=s,l=!1;i!==e&&(o?(l=n.length===0,r=function(p,u,h){return l&&(l=!1,p=Le(e,p)),s.call(this,p,Le(e,u),h,e)}):s.length>3&&(r=function(p,u,h){return s.call(this,p,u,h,e)}));const a=i[t](r,...n);return l?Le(e,a):a}function Us(e,t,s){const n=K(e);ae(n,"iterate",zt);const i=n[t](...s);return(i===-1||i===!1)&&mn(s[0])?(s[0]=K(s[0]),n[t](...s)):i}function Dt(e,t,s=[]){Be(),un();const n=K(e)[t].apply(e,s);return fn(),Ke(),n}const No=on("__proto__,__v_isRef,__isVue"),ki=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ve));function Ho(e){Ve(e)||(e=String(e));const t=K(this);return ae(t,"has",e),t.hasOwnProperty(e)}class Pi{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?Yo:Mi:o?Oi:Ai).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=U(t);if(!i){let a;if(r&&(a=Lo[s]))return a;if(s==="hasOwnProperty")return Ho}const l=Reflect.get(t,s,fe(t)?t:n);if((Ve(s)?ki.has(s):No(s))||(i||ae(t,"get",s),o))return l;if(fe(l)){const a=r&&ln(s)?l:l.value;return i&&z(a)?Ys(a):a}return z(l)?i?Ys(l):qt(l):l}}class $i extends Pi{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];const r=U(t)&&ln(s);if(!this._isShallow){const p=Xe(o);if(!we(n)&&!Xe(n)&&(o=K(o),n=K(n)),!r&&fe(o)&&!fe(n))return p||(o.value=n),!0}const l=r?Number(s)<t.length:W(t,s),a=Reflect.set(t,s,n,fe(t)?t:i);return t===K(i)&&a&&(l?Ne(n,o)&&qe(t,"set",s,n):qe(t,"add",s,n)),a}deleteProperty(t,s){const n=W(t,s);t[s];const i=Reflect.deleteProperty(t,s);return i&&n&&qe(t,"delete",s,void 0),i}has(t,s){const n=Reflect.has(t,s);return(!Ve(s)||!ki.has(s))&&ae(t,"has",s),n}ownKeys(t){return ae(t,"iterate",U(t)?"length":gt),Reflect.ownKeys(t)}}class Vo extends Pi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const jo=new $i,Bo=new Vo,Ko=new $i(!0);const Js=e=>e,rs=e=>Reflect.getPrototypeOf(e);function Wo(e,t,s){return function(...n){const i=this.__v_raw,o=K(i),r=wt(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,p=i[e](...n),u=s?Js:t?Et:ke;return!t&&ae(o,"iterate",a?qs:gt),de(Object.create(p),{next(){const{value:h,done:T}=p.next();return T?{value:h,done:T}:{value:l?[u(h[0]),u(h[1])]:u(h),done:T}}})}}function ls(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Go(e,t){const s={get(i){const o=this.__v_raw,r=K(o),l=K(i);e||(Ne(i,l)&&ae(r,"get",i),ae(r,"get",l));const{has:a}=rs(r),p=t?Js:e?Et:ke;if(a.call(r,i))return p(o.get(i));if(a.call(r,l))return p(o.get(l));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!e&&ae(K(i),"iterate",gt),i.size},has(i){const o=this.__v_raw,r=K(o),l=K(i);return e||(Ne(i,l)&&ae(r,"has",i),ae(r,"has",l)),i===l?o.has(i):o.has(i)||o.has(l)},forEach(i,o){const r=this,l=r.__v_raw,a=K(l),p=t?Js:e?Et:ke;return!e&&ae(a,"iterate",gt),l.forEach((u,h)=>i.call(o,p(u),p(h),r))}};return de(s,e?{add:ls("add"),set:ls("set"),delete:ls("delete"),clear:ls("clear")}:{add(i){const o=K(this),r=rs(o),l=K(i),a=!t&&!we(i)&&!Xe(i)?l:i;return r.has.call(o,a)||Ne(i,a)&&r.has.call(o,i)||Ne(l,a)&&r.has.call(o,l)||(o.add(a),qe(o,"add",a,a)),this},set(i,o){!t&&!we(o)&&!Xe(o)&&(o=K(o));const r=K(this),{has:l,get:a}=rs(r);let p=l.call(r,i);p||(i=K(i),p=l.call(r,i));const u=a.call(r,i);return r.set(i,o),p?Ne(o,u)&&qe(r,"set",i,o):qe(r,"add",i,o),this},delete(i){const o=K(this),{has:r,get:l}=rs(o);let a=r.call(o,i);a||(i=K(i),a=r.call(o,i)),l&&l.call(o,i);const p=o.delete(i);return a&&qe(o,"delete",i,void 0),p},clear(){const i=K(this),o=i.size!==0,r=i.clear();return o&&qe(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Wo(i,e,t)}),s}function hn(e,t){const s=Go(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(W(s,i)&&i in n?s:n,i,o)}const zo={get:hn(!1,!1)},qo={get:hn(!1,!0)},Jo={get:hn(!0,!1)};const Ai=new WeakMap,Oi=new WeakMap,Mi=new WeakMap,Yo=new WeakMap;function Xo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qt(e){return Xe(e)?e:gn(e,!1,jo,zo,Ai)}function Zo(e){return gn(e,!1,Ko,qo,Oi)}function Ys(e){return gn(e,!0,Bo,Jo,Mi)}function gn(e,t,s,n,i){if(!z(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=i.get(e);if(o)return o;const r=Xo(So(e));if(r===0)return e;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function mt(e){return Xe(e)?mt(e.__v_raw):!!(e&&e.__v_isReactive)}function Xe(e){return!!(e&&e.__v_isReadonly)}function we(e){return!!(e&&e.__v_isShallow)}function mn(e){return e?!!e.__v_raw:!1}function K(e){const t=e&&e.__v_raw;return t?K(t):e}function Qo(e){return!W(e,"__v_skip")&&Object.isExtensible(e)&&gi(e,"__v_skip",!0),e}const ke=e=>z(e)?qt(e):e,Et=e=>z(e)?Ys(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function j(e){return er(e,!1)}function er(e,t){return fe(e)?e:new tr(e,t)}class tr{constructor(t,s){this.dep=new pn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:K(t),this._value=s?t:ke(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||we(t)||Xe(t);t=n?t:K(t),Ne(t,s)&&(this._rawValue=t,this._value=n?t:ke(t),this.dep.trigger())}}function se(e){return fe(e)?e.value:e}const sr={get:(e,t,s)=>t==="__v_raw"?e:se(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return fe(i)&&!fe(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function Ri(e){return mt(e)?e:new Proxy(e,sr)}class nr{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new pn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&X!==this)return xi(this,!0),!0}get value(){const t=this.dep.track();return Ti(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ir(e,t,s=!1){let n,i;return H(e)?n=e:(n=e.get,i=e.set),new nr(n,i,s)}const as={},ps=new WeakMap;let dt;function or(e,t=!1,s=dt){if(s){let n=ps.get(s);n||ps.set(s,n=[]),n.push(e)}}function rr(e,t,s=J){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:l,call:a}=s,p=R=>i?R:we(R)||i===!1||i===0?Je(R,1):Je(R);let u,h,T,$,F=!1,y=!1;if(fe(e)?(h=()=>e.value,F=we(e)):mt(e)?(h=()=>p(e),F=!0):U(e)?(y=!0,F=e.some(R=>mt(R)||we(R)),h=()=>e.map(R=>{if(fe(R))return R.value;if(mt(R))return p(R);if(H(R))return a?a(R,2):R()})):H(e)?t?h=a?()=>a(e,2):e:h=()=>{if(T){Be();try{T()}finally{Ke()}}const R=dt;dt=u;try{return a?a(e,3,[$]):e($)}finally{dt=R}}:h=He,t&&i){const R=h,ie=i===!0?1/0:i;h=()=>Je(R(),ie)}const S=Io(),x=()=>{u.stop(),S&&S.active&&rn(S.effects,u)};if(o&&t){const R=t;t=(...ie)=>{const $e=R(...ie);return x(),$e}}let C=y?new Array(e.length).fill(as):as;const M=R=>{if(!(!(u.flags&1)||!u.dirty&&!R))if(t){const ie=u.run();if(R||i||F||(y?ie.some(($e,Ae)=>Ne($e,C[Ae])):Ne(ie,C))){T&&T();const $e=dt;dt=u;try{const Ae=[ie,C===as?void 0:y&&C[0]===as?[]:C,$];C=ie,a?a(t,3,Ae):t(...Ae)}finally{dt=$e}}}else u.run()};return l&&l(M),u=new _i(h),u.scheduler=r?()=>r(M,!1):M,$=R=>or(R,!1,u),T=u.onStop=()=>{const R=ps.get(u);if(R){if(a)a(R,4);else for(const ie of R)ie();ps.delete(u)}},t?n?M(!0):C=u.run():r?r(M.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function Je(e,t=1/0,s){if(t<=0||!z(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,fe(e))Je(e.value,t,s);else if(U(e))for(let n=0;n<e.length;n++)Je(e[n],t,s);else if(At(e)||wt(e))e.forEach(n=>{Je(n,t,s)});else if(pi(e)){for(const n in e)Je(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Je(e[n],t,s)}return e}/**
|
|
* @vue/runtime-core v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Qt(e,t,s,n){try{return n?e(...n):e()}catch(i){ks(i,t,s)}}function Pe(e,t,s,n){if(H(e)){const i=Qt(e,t,s,n);return i&&fi(i)&&i.catch(o=>{ks(o,t,s)}),i}if(U(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Pe(e[o],t,s,n));return i}}function ks(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||J;if(t){let l=t.parent;const a=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const u=l.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,a,p)===!1)return}l=l.parent}if(o){Be(),Qt(o,null,10,[e,a,p]),Ke();return}}lr(e,s,i,n,r)}function lr(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const ge=[];let Fe=-1;const St=[];let st=null,yt=0;const Ii=Promise.resolve();let hs=null;function Di(e){const t=hs||Ii;return e?t.then(this?e.bind(this):e):t}function ar(e){let t=Fe+1,s=ge.length;for(;t<s;){const n=t+s>>>1,i=ge[n],o=Jt(i);o<e||o===e&&i.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=Jt(e),s=ge[ge.length-1];!s||!(e.flags&2)&&t>=Jt(s)?ge.push(e):ge.splice(ar(t),0,e),e.flags|=1,Fi()}}function Fi(){hs||(hs=Ii.then(Ui))}function cr(e){U(e)?St.push(...e):st&&e.id===-1?st.splice(yt+1,0,e):e.flags&1||(St.push(e),e.flags|=1),Fi()}function Rn(e,t,s=Fe+1){for(;s<ge.length;s++){const n=ge[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ge.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Li(e){if(St.length){const t=[...new Set(St)].sort((s,n)=>Jt(s)-Jt(n));if(St.length=0,st){st.push(...t);return}for(st=t,yt=0;yt<st.length;yt++){const s=st[yt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}st=null,yt=0}}const Jt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ui(e){try{for(Fe=0;Fe<ge.length;Fe++){const t=ge[Fe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Fe<ge.length;Fe++){const t=ge[Fe];t&&(t.flags&=-2)}Fe=-1,ge.length=0,Li(),hs=null,(ge.length||St.length)&&Ui()}}let xe=null,Ni=null;function gs(e){const t=xe;return xe=e,Ni=e&&e.type.__scopeId||null,t}function ur(e,t=xe,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&Kn(-1);const o=gs(t);let r;try{r=e(...i)}finally{gs(o),n._d&&Kn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function ue(e,t){if(xe===null)return e;const s=Os(xe),n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,r,l,a=J]=t[i];o&&(H(o)&&(o={mounted:o,updated:o}),o.deep&&Je(r),n.push({dir:o,instance:s,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function ut(e,t,s,n){const i=e.dirs,o=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];o&&(l.oldValue=o[r].value);let a=l.dir[n];a&&(Be(),Pe(a,s,8,[e.el,l,e,t]),Ke())}}function fr(e,t){if(me){let s=me.provides;const n=me.parent&&me.parent.provides;n===s&&(s=me.provides=Object.create(n)),s[e]=t}}function fs(e,t,s=!1){const n=al();if(n||Tt){let i=Tt?Tt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&H(t)?t.call(n&&n.proxy):t}}const dr=Symbol.for("v-scx"),pr=()=>fs(dr);function Ns(e,t,s){return Hi(e,t,s)}function Hi(e,t,s=J){const{immediate:n,deep:i,flush:o,once:r}=s,l=de({},s),a=t&&n||!t&&o!=="post";let p;if(Xt){if(o==="sync"){const $=pr();p=$.__watcherHandles||($.__watcherHandles=[])}else if(!a){const $=()=>{};return $.stop=He,$.resume=He,$.pause=He,$}}const u=me;l.call=($,F,y)=>Pe($,u,F,y);let h=!1;o==="post"?l.scheduler=$=>{be($,u&&u.suspense)}:o!=="sync"&&(h=!0,l.scheduler=($,F)=>{F?$():bn($)}),l.augmentJob=$=>{t&&($.flags|=4),h&&($.flags|=2,u&&($.id=u.uid,$.i=u))};const T=rr(e,t,l);return Xt&&(p?p.push(T):a&&T()),T}function hr(e,t,s){const n=this.proxy,i=ee(e)?e.includes(".")?Vi(n,e):()=>n[e]:e.bind(n,n);let o;H(t)?o=t:(o=t.handler,s=t);const r=es(this),l=Hi(i,o.bind(n),s);return r(),l}function Vi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const gr=Symbol("_vte"),mr=e=>e.__isTeleport,Hs=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(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 ji(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function In(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ms=new WeakMap;function jt(e,t,s,n,i=!1){if(U(e)){e.forEach((y,S)=>jt(y,t&&(U(t)?t[S]:t),s,n,i));return}if(Bt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&jt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Os(n.component):n.el,r=i?null:o,{i:l,r:a}=e,p=t&&t.r,u=l.refs===J?l.refs={}:l.refs,h=l.setupState,T=K(h),$=h===J?ui:y=>In(u,y)?!1:W(T,y),F=(y,S)=>!(S&&In(u,S));if(p!=null&&p!==a){if(Dn(t),ee(p))u[p]=null,$(p)&&(h[p]=null);else if(fe(p)){const y=t;F(p,y.k)&&(p.value=null),y.k&&(u[y.k]=null)}}if(H(a)){Be();try{Qt(a,l,12,[r,u])}finally{Ke()}}else{const y=ee(a),S=fe(a);if(y||S){const x=()=>{if(e.f){const C=y?$(a)?h[a]:u[a]:F()||!e.k?a.value:u[e.k];if(i)U(C)&&rn(C,o);else if(U(C))C.includes(o)||C.push(o);else if(y)u[a]=[o],$(a)&&(h[a]=u[a]);else{const M=[o];F(a,e.k)&&(a.value=M),e.k&&(u[e.k]=M)}}else y?(u[a]=r,$(a)&&(h[a]=r)):S&&(F(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const C=()=>{x(),ms.delete(e)};C.id=-1,ms.set(e,C),be(C,s)}else Dn(e),x()}}}function Dn(e){const t=ms.get(e);t&&(t.flags|=8,ms.delete(e))}Cs().requestIdleCallback;Cs().cancelIdleCallback;const Bt=e=>!!e.type.__asyncLoader,Bi=e=>e.type.__isKeepAlive;function br(e,t){Ki(e,"a",t)}function vr(e,t){Ki(e,"da",t)}function Ki(e,t,s=me){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Ps(t,n,s),s){let i=s.parent;for(;i&&i.parent;)Bi(i.parent.vnode)&&_r(n,t,s,i),i=i.parent}}function _r(e,t,s,n){const i=Ps(t,e,n,!0);_n(()=>{rn(n[t],i)},s)}function Ps(e,t,s=me,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Be();const l=es(s),a=Pe(t,s,e,r);return l(),Ke(),a});return n?i.unshift(o):i.push(o),o}}const Qe=e=>(t,s=me)=>{(!Xt||e==="sp")&&Ps(e,(...n)=>t(...n),s)},yr=Qe("bm"),vt=Qe("m"),xr=Qe("bu"),wr=Qe("u"),Sr=Qe("bum"),_n=Qe("um"),Tr=Qe("sp"),Cr=Qe("rtg"),Er=Qe("rtc");function kr(e,t=me){Ps("ec",e,t)}const Pr=Symbol.for("v-ndc");function Te(e,t,s,n){let i;const o=s,r=U(e);if(r||ee(e)){const l=r&&mt(e);let a=!1,p=!1;l&&(a=!we(e),p=Xe(e),e=Es(e)),i=new Array(e.length);for(let u=0,h=e.length;u<h;u++)i[u]=t(a?p?Et(ke(e[u])):ke(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,o)}else if(z(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,p=l.length;a<p;a++){const u=l[a];i[a]=t(e[u],u,a,o)}}else i=[];return i}const Xs=e=>e?fo(e)?Os(e):Xs(e.parent):null,Kt=de(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=>Xs(e.parent),$root:e=>Xs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gi(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=Di.bind(e.proxy)),$watch:e=>hr.bind(e)}),Vs=(e,t)=>e!==J&&!e.__isScriptSetup&&W(e,t),$r={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const T=r[t];if(T!==void 0)switch(T){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Vs(n,t))return r[t]=1,n[t];if(i!==J&&W(i,t))return r[t]=2,i[t];if(W(o,t))return r[t]=3,o[t];if(s!==J&&W(s,t))return r[t]=4,s[t];Zs&&(r[t]=0)}}const p=Kt[t];let u,h;if(p)return t==="$attrs"&&ae(e.attrs,"get",""),p(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(s!==J&&W(s,t))return r[t]=4,s[t];if(h=a.config.globalProperties,W(h,t))return h[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Vs(i,t)?(i[t]=s,!0):n!==J&&W(n,t)?(n[t]=s,!0):W(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:o,type:r}},l){let a;return!!(s[l]||e!==J&&l[0]!=="$"&&W(e,l)||Vs(t,l)||W(o,l)||W(n,l)||W(Kt,l)||W(i.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:W(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Fn(e){return U(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Zs=!0;function Ar(e){const t=Gi(e),s=e.proxy,n=e.ctx;Zs=!1,t.beforeCreate&&Ln(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:l,provide:a,inject:p,created:u,beforeMount:h,mounted:T,beforeUpdate:$,updated:F,activated:y,deactivated:S,beforeDestroy:x,beforeUnmount:C,destroyed:M,unmounted:R,render:ie,renderTracked:$e,renderTriggered:Ae,errorCaptured:et,serverPrefetch:ts,expose:lt,inheritAttrs:Ot,components:ss,directives:ns,filters:Ms}=t;if(p&&Or(p,n,null),r)for(const Z in r){const Y=r[Z];H(Y)&&(n[Z]=Y.bind(s))}if(i){const Z=i.call(s,s);z(Z)&&(e.data=qt(Z))}if(Zs=!0,o)for(const Z in o){const Y=o[Z],at=H(Y)?Y.bind(s,s):H(Y.get)?Y.get.bind(s,s):He,is=!H(Y)&&H(Y.set)?Y.set.bind(s):He,ct=bt({get:at,set:is});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>ct.value,set:Oe=>ct.value=Oe})}if(l)for(const Z in l)Wi(l[Z],n,s,Z);if(a){const Z=H(a)?a.call(s):a;Reflect.ownKeys(Z).forEach(Y=>{fr(Y,Z[Y])})}u&&Ln(u,e,"c");function pe(Z,Y){U(Y)?Y.forEach(at=>Z(at.bind(s))):Y&&Z(Y.bind(s))}if(pe(yr,h),pe(vt,T),pe(xr,$),pe(wr,F),pe(br,y),pe(vr,S),pe(kr,et),pe(Er,$e),pe(Cr,Ae),pe(Sr,C),pe(_n,R),pe(Tr,ts),U(lt))if(lt.length){const Z=e.exposed||(e.exposed={});lt.forEach(Y=>{Object.defineProperty(Z,Y,{get:()=>s[Y],set:at=>s[Y]=at,enumerable:!0})})}else e.exposed||(e.exposed={});ie&&e.render===He&&(e.render=ie),Ot!=null&&(e.inheritAttrs=Ot),ss&&(e.components=ss),ns&&(e.directives=ns),ts&&ji(e)}function Or(e,t,s=He){U(e)&&(e=Qs(e));for(const n in e){const i=e[n];let o;z(i)?"default"in i?o=fs(i.from||n,i.default,!0):o=fs(i.from||n):o=fs(i),fe(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function Ln(e,t,s){Pe(U(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Wi(e,t,s,n){let i=n.includes(".")?Vi(s,n):()=>s[n];if(ee(e)){const o=t[e];H(o)&&Ns(i,o)}else if(H(e))Ns(i,e.bind(s));else if(z(e))if(U(e))e.forEach(o=>Wi(o,t,s,n));else{const o=H(e.handler)?e.handler.bind(s):t[e.handler];H(o)&&Ns(i,o,e)}}function Gi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!i.length&&!s&&!n?a=t:(a={},i.length&&i.forEach(p=>bs(a,p,r,!0)),bs(a,t,r)),z(t)&&o.set(t,a),a}function bs(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&bs(e,o,s,!0),i&&i.forEach(r=>bs(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=Mr[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Mr={data:Un,props:Nn,emits:Nn,methods:Lt,computed:Lt,beforeCreate:he,created:he,beforeMount:he,mounted:he,beforeUpdate:he,updated:he,beforeDestroy:he,beforeUnmount:he,destroyed:he,unmounted:he,activated:he,deactivated:he,errorCaptured:he,serverPrefetch:he,components:Lt,directives:Lt,watch:Ir,provide:Un,inject:Rr};function Un(e,t){return t?e?function(){return de(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function Rr(e,t){return Lt(Qs(e),Qs(t))}function Qs(e){if(U(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function he(e,t){return e?[...new Set([].concat(e,t))]:t}function Lt(e,t){return e?de(Object.create(null),e,t):t}function Nn(e,t){return e?U(e)&&U(t)?[...new Set([...e,...t])]:de(Object.create(null),Fn(e),Fn(t??{})):t}function Ir(e,t){if(!e)return t;if(!t)return e;const s=de(Object.create(null),e);for(const n in t)s[n]=he(e[n],t[n]);return s}function zi(){return{app:null,config:{isNativeTag:ui,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 Dr=0;function Fr(e,t){return function(n,i=null){H(n)||(n=de({},n)),i!=null&&!z(i)&&(i=null);const o=zi(),r=new WeakSet,l=[];let a=!1;const p=o.app={_uid:Dr++,_component:n,_props:i,_container:null,_context:o,_instance:null,version:hl,get config(){return o.config},set config(u){},use(u,...h){return r.has(u)||(u&&H(u.install)?(r.add(u),u.install(p,...h)):H(u)&&(r.add(u),u(p,...h))),p},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),p},component(u,h){return h?(o.components[u]=h,p):o.components[u]},directive(u,h){return h?(o.directives[u]=h,p):o.directives[u]},mount(u,h,T){if(!a){const $=p._ceVNode||le(n,i);return $.appContext=o,T===!0?T="svg":T===!1&&(T=void 0),e($,u,T),a=!0,p._container=u,u.__vue_app__=p,Os($.component)}},onUnmount(u){l.push(u)},unmount(){a&&(Pe(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(u,h){return o.provides[u]=h,p},runWithContext(u){const h=Tt;Tt=p;try{return u()}finally{Tt=h}}};return p}}let Tt=null;const Lr=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ce(t)}Modifiers`]||e[`${rt(t)}Modifiers`];function Ur(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||J;let i=s;const o=t.startsWith("update:"),r=o&&Lr(n,t.slice(7));r&&(r.trim&&(i=s.map(u=>ee(u)?u.trim():u)),r.number&&(i=s.map(Ts)));let l,a=n[l=Is(t)]||n[l=Is(Ce(t))];!a&&o&&(a=n[l=Is(rt(t))]),a&&Pe(a,e,6,i);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Pe(p,e,6,i)}}const Nr=new WeakMap;function qi(e,t,s=!1){const n=s?Nr:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},l=!1;if(!H(e)){const a=p=>{const u=qi(p,t,!0);u&&(l=!0,de(r,u))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(z(e)&&n.set(e,null),null):(U(o)?o.forEach(a=>r[a]=null):de(r,o),z(e)&&n.set(e,r),r)}function $s(e,t){return!e||!xs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),W(e,t[0].toLowerCase()+t.slice(1))||W(e,rt(t))||W(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:l,emit:a,render:p,renderCache:u,props:h,data:T,setupState:$,ctx:F,inheritAttrs:y}=e,S=gs(e);let x,C;try{if(s.shapeFlag&4){const R=i||n,ie=R;x=Ue(p.call(ie,R,u,h,$,T,F)),C=l}else{const R=t;x=Ue(R.length>1?R(h,{attrs:l,slots:r,emit:a}):R(h,null)),C=t.props?l:Hr(l)}}catch(R){Wt.length=0,ks(R,e,1),x=le(it)}let M=x;if(C&&y!==!1){const R=Object.keys(C),{shapeFlag:ie}=M;R.length&&ie&7&&(o&&R.some(ws)&&(C=Vr(C,o)),M=kt(M,C,!1,!0))}return s.dirs&&(M=kt(M,null,!1,!0),M.dirs=M.dirs?M.dirs.concat(s.dirs):s.dirs),s.transition&&vn(M,s.transition),x=M,gs(S),x}const Hr=e=>{let t;for(const s in e)(s==="class"||s==="style"||xs(s))&&((t||(t={}))[s]=e[s]);return t},Vr=(e,t)=>{const s={};for(const n in e)(!ws(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function jr(e,t,s){const{props:n,children:i,component:o}=e,{props:r,children:l,patchFlag:a}=t,p=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Vn(n,r,p):!!r;if(a&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const T=u[h];if(Ji(r,n,T)&&!$s(p,T))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:n===r?!1:n?r?Vn(n,r,p):!0:!!r;return!1}function Vn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let i=0;i<n.length;i++){const o=n[i];if(Ji(t,e,o)&&!$s(s,o))return!0}return!1}function Ji(e,t,s){const n=e[s],i=t[s];return s==="style"&&z(n)&&z(i)?!nt(n,i):n!==i}function Br({vnode:e,parent:t,suspense:s},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.suspense.vnode.el=i.el=n,e=i),i===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Yi={},Xi=()=>Object.create(Yi),Zi=e=>Object.getPrototypeOf(e)===Yi;function Kr(e,t,s,n=!1){const i={},o=Xi();e.propsDefaults=Object.create(null),Qi(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);s?e.props=n?i:Zo(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Wr(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,l=K(i),[a]=e.propsOptions;let p=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let T=u[h];if($s(e.emitsOptions,T))continue;const $=t[T];if(a)if(W(o,T))$!==o[T]&&(o[T]=$,p=!0);else{const F=Ce(T);i[F]=en(a,l,F,$,e,!1)}else $!==o[T]&&(o[T]=$,p=!0)}}}else{Qi(e,t,i,o)&&(p=!0);let u;for(const h in l)(!t||!W(t,h)&&((u=rt(h))===h||!W(t,u)))&&(a?s&&(s[h]!==void 0||s[u]!==void 0)&&(i[h]=en(a,l,h,void 0,e,!0)):delete i[h]);if(o!==l)for(const h in o)(!t||!W(t,h))&&(delete o[h],p=!0)}p&&qe(e.attrs,"set","")}function Qi(e,t,s,n){const[i,o]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Nt(a))continue;const p=t[a];let u;i&&W(i,u=Ce(a))?!o||!o.includes(u)?s[u]=p:(l||(l={}))[u]=p:$s(e.emitsOptions,a)||(!(a in n)||p!==n[a])&&(n[a]=p,r=!0)}if(o){const a=K(s),p=l||J;for(let u=0;u<o.length;u++){const h=o[u];s[h]=en(i,a,h,p[h],e,!W(p,h))}}return r}function en(e,t,s,n,i,o){const r=e[s];if(r!=null){const l=W(r,"default");if(l&&n===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&H(a)){const{propsDefaults:p}=i;if(s in p)n=p[s];else{const u=es(i);n=p[s]=a.call(null,t),u()}}else n=a;i.ce&&i.ce._setProp(s,n)}r[0]&&(o&&!l?n=!1:r[1]&&(n===""||n===rt(s))&&(n=!0))}return n}const Gr=new WeakMap;function eo(e,t,s=!1){const n=s?Gr:t.propsCache,i=n.get(e);if(i)return i;const o=e.props,r={},l=[];let a=!1;if(!H(e)){const u=h=>{a=!0;const[T,$]=eo(h,t,!0);de(r,T),$&&l.push(...$)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return z(e)&&n.set(e,xt),xt;if(U(o))for(let u=0;u<o.length;u++){const h=Ce(o[u]);jn(h)&&(r[h]=J)}else if(o)for(const u in o){const h=Ce(u);if(jn(h)){const T=o[u],$=r[h]=U(T)||H(T)?{type:T}:de({},T),F=$.type;let y=!1,S=!0;if(U(F))for(let x=0;x<F.length;++x){const C=F[x],M=H(C)&&C.name;if(M==="Boolean"){y=!0;break}else M==="String"&&(S=!1)}else y=H(F)&&F.name==="Boolean";$[0]=y,$[1]=S,(y||W($,"default"))&&l.push(h)}}const p=[r,l];return z(e)&&n.set(e,p),p}function jn(e){return e[0]!=="$"&&!Nt(e)}const yn=e=>e==="_"||e==="_ctx"||e==="$stable",xn=e=>U(e)?e.map(Ue):[Ue(e)],zr=(e,t,s)=>{if(t._n)return t;const n=ur((...i)=>xn(t(...i)),s);return n._c=!1,n},to=(e,t,s)=>{const n=e._ctx;for(const i in e){if(yn(i))continue;const o=e[i];if(H(o))t[i]=zr(i,o,n);else if(o!=null){const r=xn(o);t[i]=()=>r}}},so=(e,t)=>{const s=xn(t);e.slots.default=()=>s},no=(e,t,s)=>{for(const n in t)(s||!yn(n))&&(e[n]=t[n])},qr=(e,t,s)=>{const n=e.slots=Xi();if(e.vnode.shapeFlag&32){const i=t._;i?(no(n,t,s),s&&gi(n,"_",i,!0)):to(t,n)}else t&&so(e,t)},Jr=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,r=J;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:no(i,t,s):(o=!t.$stable,to(t,i)),r=t}else t&&(so(e,t),r={default:1});if(o)for(const l in i)!yn(l)&&r[l]==null&&delete i[l]},be=el;function Yr(e){return Xr(e)}function Xr(e,t){const s=Cs();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:l,createComment:a,setText:p,setElementText:u,parentNode:h,nextSibling:T,setScopeId:$=He,insertStaticContent:F}=e,y=(c,f,g,_=null,v=null,m=null,A=void 0,P=null,k=!!f.dynamicChildren)=>{if(c===f)return;c&&!Ft(c,f)&&(_=os(c),Oe(c,v,m,!0),c=null),f.patchFlag===-2&&(k=!1,f.dynamicChildren=null);const{type:b,ref:L,shapeFlag:O}=f;switch(b){case As:S(c,f,g,_);break;case it:x(c,f,g,_);break;case Bs:c==null&&C(f,g,_,A);break;case Q:ss(c,f,g,_,v,m,A,P,k);break;default:O&1?ie(c,f,g,_,v,m,A,P,k):O&6?ns(c,f,g,_,v,m,A,P,k):(O&64||O&128)&&b.process(c,f,g,_,v,m,A,P,k,Rt)}L!=null&&v?jt(L,c&&c.ref,m,f||c,!f):L==null&&c&&c.ref!=null&&jt(c.ref,null,m,c,!0)},S=(c,f,g,_)=>{if(c==null)n(f.el=l(f.children),g,_);else{const v=f.el=c.el;f.children!==c.children&&p(v,f.children)}},x=(c,f,g,_)=>{c==null?n(f.el=a(f.children||""),g,_):f.el=c.el},C=(c,f,g,_)=>{[c.el,c.anchor]=F(c.children,f,g,_,c.el,c.anchor)},M=({el:c,anchor:f},g,_)=>{let v;for(;c&&c!==f;)v=T(c),n(c,g,_),c=v;n(f,g,_)},R=({el:c,anchor:f})=>{let g;for(;c&&c!==f;)g=T(c),i(c),c=g;i(f)},ie=(c,f,g,_,v,m,A,P,k)=>{if(f.type==="svg"?A="svg":f.type==="math"&&(A="mathml"),c==null)$e(f,g,_,v,m,A,P,k);else{const b=c.el&&c.el._isVueCE?c.el:null;try{b&&b._beginPatch(),ts(c,f,v,m,A,P,k)}finally{b&&b._endPatch()}}},$e=(c,f,g,_,v,m,A,P)=>{let k,b;const{props:L,shapeFlag:O,transition:I,dirs:N}=c;if(k=c.el=r(c.type,m,L&&L.is,L),O&8?u(k,c.children):O&16&&et(c.children,k,null,_,v,js(c,m),A,P),N&&ut(c,null,_,"created"),Ae(k,c,c.scopeId,A,_),L){for(const q in L)q!=="value"&&!Nt(q)&&o(k,q,null,L[q],m,_);"value"in L&&o(k,"value",null,L.value,m),(b=L.onVnodeBeforeMount)&&De(b,_,c)}N&&ut(c,null,_,"beforeMount");const B=Zr(v,I);B&&I.beforeEnter(k),n(k,f,g),((b=L&&L.onVnodeMounted)||B||N)&&be(()=>{try{b&&De(b,_,c),B&&I.enter(k),N&&ut(c,null,_,"mounted")}finally{}},v)},Ae=(c,f,g,_,v)=>{if(g&&$(c,g),_)for(let m=0;m<_.length;m++)$(c,_[m]);if(v){let m=v.subTree;if(f===m||lo(m.type)&&(m.ssContent===f||m.ssFallback===f)){const A=v.vnode;Ae(c,A,A.scopeId,A.slotScopeIds,v.parent)}}},et=(c,f,g,_,v,m,A,P,k=0)=>{for(let b=k;b<c.length;b++){const L=c[b]=P?ze(c[b]):Ue(c[b]);y(null,L,f,g,_,v,m,A,P)}},ts=(c,f,g,_,v,m,A)=>{const P=f.el=c.el;let{patchFlag:k,dynamicChildren:b,dirs:L}=f;k|=c.patchFlag&16;const O=c.props||J,I=f.props||J;let N;if(g&&ft(g,!1),(N=I.onVnodeBeforeUpdate)&&De(N,g,f,c),L&&ut(f,c,g,"beforeUpdate"),g&&ft(g,!0),b&&(!c.dynamicChildren||c.dynamicChildren.length!==b.length)&&(k=0,A=!1,b=null),(O.innerHTML&&I.innerHTML==null||O.textContent&&I.textContent==null)&&u(P,""),b?lt(c.dynamicChildren,b,P,g,_,js(f,v),m):A||Y(c,f,P,null,g,_,js(f,v),m,!1),k>0){if(k&16)Ot(P,O,I,g,v);else if(k&2&&O.class!==I.class&&o(P,"class",null,I.class,v),k&4&&o(P,"style",O.style,I.style,v),k&8){const B=f.dynamicProps;for(let q=0;q<B.length;q++){const G=B[q],te=O[G],oe=I[G];(oe!==te||G==="value")&&o(P,G,te,oe,v,g)}}k&1&&c.children!==f.children&&u(P,f.children)}else!A&&b==null&&Ot(P,O,I,g,v);((N=I.onVnodeUpdated)||L)&&be(()=>{N&&De(N,g,f,c),L&&ut(f,c,g,"updated")},_)},lt=(c,f,g,_,v,m,A)=>{for(let P=0;P<f.length;P++){const k=c[P],b=f[P],L=k.el&&(k.type===Q||!Ft(k,b)||k.shapeFlag&198)?h(k.el):g;y(k,b,L,null,_,v,m,A,!0)}},Ot=(c,f,g,_,v)=>{if(f!==g){if(f!==J)for(const m in f)!Nt(m)&&!(m in g)&&o(c,m,f[m],null,v,_);for(const m in g){if(Nt(m))continue;const A=g[m],P=f[m];A!==P&&m!=="value"&&o(c,m,P,A,v,_)}"value"in g&&o(c,"value",f.value,g.value,v)}},ss=(c,f,g,_,v,m,A,P,k)=>{const b=f.el=c?c.el:l(""),L=f.anchor=c?c.anchor:l("");let{patchFlag:O,dynamicChildren:I,slotScopeIds:N}=f;N&&(P=P?P.concat(N):N),c==null?(n(b,g,_),n(L,g,_),et(f.children||[],g,L,v,m,A,P,k)):O>0&&O&64&&I&&c.dynamicChildren&&c.dynamicChildren.length===I.length?(lt(c.dynamicChildren,I,g,v,m,A,P),(f.key!=null||v&&f===v.subTree)&&io(c,f,!0)):Y(c,f,g,L,v,m,A,P,k)},ns=(c,f,g,_,v,m,A,P,k)=>{f.slotScopeIds=P,c==null?f.shapeFlag&512?v.ctx.activate(f,g,_,A,k):Ms(f,g,_,v,m,A,k):Sn(c,f,k)},Ms=(c,f,g,_,v,m,A)=>{const P=c.component=ll(c,_,v);if(Bi(c)&&(P.ctx.renderer=Rt),cl(P,!1,A),P.asyncDep){if(v&&v.registerDep(P,pe,A),!c.el){const k=P.subTree=le(it);x(null,k,f,g),c.placeholder=k.el}}else pe(P,c,f,g,v,m,A)},Sn=(c,f,g)=>{const _=f.component=c.component;if(jr(c,f,g))if(_.asyncDep&&!_.asyncResolved){Z(_,f,g);return}else _.next=f,_.update();else f.el=c.el,_.vnode=f},pe=(c,f,g,_,v,m,A)=>{const P=()=>{if(c.isMounted){let{next:O,bu:I,u:N,parent:B,vnode:q}=c;{const Re=oo(c);if(Re){O&&(O.el=q.el,Z(c,O,A)),Re.asyncDep.then(()=>{be(()=>{c.isUnmounted||b()},v)});return}}let G=O,te;ft(c,!1),O?(O.el=q.el,Z(c,O,A)):O=q,I&&us(I),(te=O.props&&O.props.onVnodeBeforeUpdate)&&De(te,B,O,q),ft(c,!0);const oe=Hn(c),Me=c.subTree;c.subTree=oe,y(Me,oe,h(Me.el),os(Me),c,v,m),O.el=oe.el,G===null&&Br(c,oe.el),N&&be(N,v),(te=O.props&&O.props.onVnodeUpdated)&&be(()=>De(te,B,O,q),v)}else{let O;const{el:I,props:N}=f,{bm:B,m:q,parent:G,root:te,type:oe}=c,Me=Bt(f);ft(c,!1),B&&us(B),!Me&&(O=N&&N.onVnodeBeforeMount)&&De(O,G,f),ft(c,!0);{te.ce&&te.ce._hasShadowRoot()&&te.ce._injectChildStyle(oe,c.parent?c.parent.type:void 0);const Re=c.subTree=Hn(c);y(null,Re,g,_,c,v,m),f.el=Re.el}if(q&&be(q,v),!Me&&(O=N&&N.onVnodeMounted)){const Re=f;be(()=>De(O,G,Re),v)}(f.shapeFlag&256||G&&Bt(G.vnode)&&G.vnode.shapeFlag&256)&&c.a&&be(c.a,v),c.isMounted=!0,f=g=_=null}};c.scope.on();const k=c.effect=new _i(P);c.scope.off();const b=c.update=k.run.bind(k),L=c.job=k.runIfDirty.bind(k);L.i=c,L.id=c.uid,k.scheduler=()=>bn(L),ft(c,!0),b()},Z=(c,f,g)=>{f.component=c;const _=c.vnode.props;c.vnode=f,c.next=null,Wr(c,f.props,_,g),Jr(c,f.children,g),Be(),Rn(c),Ke()},Y=(c,f,g,_,v,m,A,P,k=!1)=>{const b=c&&c.children,L=c?c.shapeFlag:0,O=f.children,{patchFlag:I,shapeFlag:N}=f;if(I>0){if(I&128){is(b,O,g,_,v,m,A,P,k);return}else if(I&256){at(b,O,g,_,v,m,A,P,k);return}}N&8?(L&16&&Mt(b,v,m),O!==b&&u(g,O)):L&16?N&16?is(b,O,g,_,v,m,A,P,k):Mt(b,v,m,!0):(L&8&&u(g,""),N&16&&et(O,g,_,v,m,A,P,k))},at=(c,f,g,_,v,m,A,P,k)=>{c=c||xt,f=f||xt;const b=c.length,L=f.length,O=Math.min(b,L);let I;for(I=0;I<O;I++){const N=f[I]=k?ze(f[I]):Ue(f[I]);y(c[I],N,g,null,v,m,A,P,k)}b>L?Mt(c,v,m,!0,!1,O):et(f,g,_,v,m,A,P,k,O)},is=(c,f,g,_,v,m,A,P,k)=>{let b=0;const L=f.length;let O=c.length-1,I=L-1;for(;b<=O&&b<=I;){const N=c[b],B=f[b]=k?ze(f[b]):Ue(f[b]);if(Ft(N,B))y(N,B,g,null,v,m,A,P,k);else break;b++}for(;b<=O&&b<=I;){const N=c[O],B=f[I]=k?ze(f[I]):Ue(f[I]);if(Ft(N,B))y(N,B,g,null,v,m,A,P,k);else break;O--,I--}if(b>O){if(b<=I){const N=I+1,B=N<L?f[N].el:_;for(;b<=I;)y(null,f[b]=k?ze(f[b]):Ue(f[b]),g,B,v,m,A,P,k),b++}}else if(b>I)for(;b<=O;)Oe(c[b],v,m,!0),b++;else{const N=b,B=b,q=new Map;for(b=B;b<=I;b++){const _e=f[b]=k?ze(f[b]):Ue(f[b]);_e.key!=null&&q.set(_e.key,b)}let G,te=0;const oe=I-B+1;let Me=!1,Re=0;const It=new Array(oe);for(b=0;b<oe;b++)It[b]=0;for(b=N;b<=O;b++){const _e=c[b];if(te>=oe){Oe(_e,v,m,!0);continue}let Ie;if(_e.key!=null)Ie=q.get(_e.key);else for(G=B;G<=I;G++)if(It[G-B]===0&&Ft(_e,f[G])){Ie=G;break}Ie===void 0?Oe(_e,v,m,!0):(It[Ie-B]=b+1,Ie>=Re?Re=Ie:Me=!0,y(_e,f[Ie],g,null,v,m,A,P,k),te++)}const En=Me?Qr(It):xt;for(G=En.length-1,b=oe-1;b>=0;b--){const _e=B+b,Ie=f[_e],kn=f[_e+1],Pn=_e+1<L?kn.el||ro(kn):_;It[b]===0?y(null,Ie,g,Pn,v,m,A,P,k):Me&&(G<0||b!==En[G]?ct(Ie,g,Pn,2):G--)}}},ct=(c,f,g,_,v=null)=>{const{el:m,type:A,transition:P,children:k,shapeFlag:b}=c;if(b&6){ct(c.component.subTree,f,g,_);return}if(b&128){c.suspense.move(f,g,_);return}if(b&64){A.move(c,f,g,Rt);return}if(A===Q){n(m,f,g);for(let O=0;O<k.length;O++)ct(k[O],f,g,_);n(c.anchor,f,g);return}if(A===Bs){M(c,f,g);return}if(_!==2&&b&1&&P)if(_===0)P.persisted&&!m[Hs]?n(m,f,g):(P.beforeEnter(m),n(m,f,g),be(()=>P.enter(m),v));else{const{leave:O,delayLeave:I,afterLeave:N}=P,B=()=>{c.ctx.isUnmounted?i(m):n(m,f,g)},q=()=>{const G=m._isLeaving||!!m[Hs];m._isLeaving&&m[Hs](!0),P.persisted&&!G?B():O(m,()=>{B(),N&&N()})};I?I(m,B,q):q()}else n(m,f,g)},Oe=(c,f,g,_=!1,v=!1)=>{const{type:m,props:A,ref:P,children:k,dynamicChildren:b,shapeFlag:L,patchFlag:O,dirs:I,cacheIndex:N,memo:B}=c;if(O===-2&&(v=!1),P!=null&&(Be(),jt(P,null,g,c,!0),Ke()),N!=null&&(f.renderCache[N]=void 0),L&256){f.ctx.deactivate(c);return}const q=L&1&&I,G=!Bt(c);let te;if(G&&(te=A&&A.onVnodeBeforeUnmount)&&De(te,f,c),L&6)xo(c.component,g,_);else{if(L&128){c.suspense.unmount(g,_);return}q&&ut(c,null,f,"beforeUnmount"),L&64?c.type.remove(c,f,g,Rt,_):b&&!b.hasOnce&&(m!==Q||O>0&&O&64)?Mt(b,f,g,!1,!0):(m===Q&&O&384||!v&&L&16)&&Mt(k,f,g),_&&Tn(c)}const oe=B!=null&&N==null;(G&&(te=A&&A.onVnodeUnmounted)||q||oe)&&be(()=>{te&&De(te,f,c),q&&ut(c,null,f,"unmounted"),oe&&(c.el=null)},g)},Tn=c=>{const{type:f,el:g,anchor:_,transition:v}=c;if(f===Q){yo(g,_);return}if(f===Bs){R(c);return}const m=()=>{i(g),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(c.shapeFlag&1&&v&&!v.persisted){const{leave:A,delayLeave:P}=v,k=()=>A(g,m);P?P(c.el,m,k):k()}else m()},yo=(c,f)=>{let g;for(;c!==f;)g=T(c),i(c),c=g;i(f)},xo=(c,f,g)=>{const{bum:_,scope:v,job:m,subTree:A,um:P,m:k,a:b}=c;Bn(k),Bn(b),_&&us(_),v.stop(),m&&(m.flags|=8,Oe(A,c,f,g)),P&&be(P,f),be(()=>{c.isUnmounted=!0},f)},Mt=(c,f,g,_=!1,v=!1,m=0)=>{for(let A=m;A<c.length;A++)Oe(c[A],f,g,_,v)},os=c=>{if(c.shapeFlag&6)return os(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const f=T(c.anchor||c.el),g=f&&f[gr];return g?T(g):f};let Rs=!1;const Cn=(c,f,g)=>{let _;c==null?f._vnode&&(Oe(f._vnode,null,null,!0),_=f._vnode.component):y(f._vnode||null,c,f,null,null,null,g),f._vnode=c,Rs||(Rs=!0,Rn(_),Li(),Rs=!1)},Rt={p:y,um:Oe,m:ct,r:Tn,mt:Ms,mc:et,pc:Y,pbc:lt,n:os,o:e};return{render:Cn,hydrate:void 0,createApp:Fr(Cn)}}function js({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 ft({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function io(e,t,s=!1){const n=e.children,i=t.children;if(U(n)&&U(i))for(let o=0;o<n.length;o++){const r=n[o];let l=i[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[o]=ze(i[o]),l.el=r.el),!s&&l.patchFlag!==-2&&io(r,l)),l.type===As&&(l.patchFlag===-1&&(l=i[o]=ze(l)),l.el=r.el),l.type===it&&!l.el&&(l.el=r.el)}}function Qr(e){const t=e.slice(),s=[0];let n,i,o,r,l;const a=e.length;for(n=0;n<a;n++){const p=e[n];if(p!==0){if(i=s[s.length-1],e[i]<p){t[n]=i,s.push(n);continue}for(o=0,r=s.length-1;o<r;)l=o+r>>1,e[s[l]]<p?o=l+1:r=l;p<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=t[r];return s}function oo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:oo(t)}function Bn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ro(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ro(t.subTree):null}const lo=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?U(e)?t.effects.push(...e):t.effects.push(e):cr(e)}const Q=Symbol.for("v-fgt"),As=Symbol.for("v-txt"),it=Symbol.for("v-cmt"),Bs=Symbol.for("v-stc"),Wt=[];let ye=null;function w(e=!1){Wt.push(ye=e?null:[])}function tl(){Wt.pop(),ye=Wt[Wt.length-1]||null}let Yt=1;function Kn(e,t=!1){Yt+=e,e<0&&ye&&t&&(ye.hasOnce=!0)}function ao(e){return e.dynamicChildren=Yt>0?ye||xt:null,tl(),Yt>0&&ye&&ye.push(e),e}function E(e,t,s,n,i,o){return ao(d(e,t,s,n,i,o,!0))}function pt(e,t,s,n,i){return ao(le(e,t,s,n,i,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function Ft(e,t){return e.type===t.type&&e.key===t.key}const uo=({key:e})=>e??null,ds=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ee(e)||fe(e)||H(e)?{i:xe,r:e,k:t,f:!!s}:e:null);function d(e,t=null,s=null,n=0,i=null,o=e===Q?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uo(t),ref:t&&ds(t),scopeId:Ni,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:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:xe};return l?(vs(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=ee(s)?8:16),Yt>0&&!r&&ye&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&ye.push(a),a}const le=sl;function sl(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===Pr)&&(e=it),co(e)){const l=kt(e,t,!0);return s&&vs(l,s),Yt>0&&!o&&ye&&(l.shapeFlag&6?ye[ye.indexOf(e)]=l:ye.push(l)),l.patchFlag=-2,l}if(pl(e)&&(e=e.__vccOpts),t){t=nl(t);let{class:l,style:a}=t;l&&!ee(l)&&(t.class=je(l)),z(a)&&(mn(a)&&!U(a)&&(a=de({},a)),t.style=an(a))}const r=ee(e)?1:lo(e)?128:mr(e)?64:z(e)?4:H(e)?2:0;return d(e,t,s,n,i,r,o,!0)}function nl(e){return e?mn(e)||Zi(e)?de({},e):e:null}function kt(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:l,transition:a}=e,p=t?il(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&uo(p),ref:t&&t.ref?s&&o?U(o)?o.concat(ds(t)):[o,ds(t)]:ds(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Q?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&kt(e.ssContent),ssFallback:e.ssFallback&&kt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&vn(u,a.clone(u)),u}function Ze(e=" ",t=0){return le(As,null,e,t)}function V(e="",t=!1){return t?(w(),pt(it,null,e)):le(it,null,e)}function Ue(e){return e==null||typeof e=="boolean"?le(it):U(e)?le(Q,null,e.slice()):co(e)?ze(e):le(As,null,String(e))}function ze(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:kt(e)}function vs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(U(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),vs(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!Zi(t)?t._ctx=xe:i===3&&xe&&(xe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(H(t)){if(n&65){vs(e,{default:t});return}t={default:t,_ctx:xe},s=32}else t=String(t),n&64?(s=16,t=[Ze(t)]):s=8;e.children=t,e.shapeFlag|=s}function il(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const i in n)if(i==="class")t.class!==n.class&&(t.class=je([t.class,n.class]));else if(i==="style")t.style=an([t.style,n.style]);else if(xs(i)){const o=t[i],r=n[i];r&&o!==r&&!(U(o)&&o.includes(r))?t[i]=o?[].concat(o,r):r:r==null&&o==null&&!ws(i)&&(t[i]=r)}else i!==""&&(t[i]=n[i])}return t}function De(e,t,s,n=null){Pe(e,t,7,[s,n])}const ol=zi();let rl=0;function ll(e,t,s){const n=e.type,i=(t?t.appContext:e.appContext)||ol,o={uid:rl++,vnode:e,type:n,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ro(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:eo(n,i),emitsOptions:qi(n,i),emit:null,emitted:null,propsDefaults:J,inheritAttrs:n.inheritAttrs,ctx:J,data:J,props:J,attrs:J,slots:J,refs:J,setupState:J,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Ur.bind(null,o),e.ce&&e.ce(o),o}let me=null;const al=()=>me||xe;let _s,tn;{const e=Cs(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};_s=t("__VUE_INSTANCE_SETTERS__",s=>me=s),tn=t("__VUE_SSR_SETTERS__",s=>Xt=s)}const es=e=>{const t=me;return _s(e),e.scope.on(),()=>{e.scope.off(),_s(t)}},Wn=()=>{me&&me.scope.off(),_s(null)};function fo(e){return e.vnode.shapeFlag&4}let Xt=!1;function cl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:i}=e.vnode,o=fo(e);Kr(e,n,o,t),qr(e,i,s||t);const r=o?ul(e,t):void 0;return t&&tn(!1),r}function ul(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,$r);const{setup:n}=s;if(n){Be();const i=e.setupContext=n.length>1?dl(e):null,o=es(e),r=Qt(n,e,0,[e.props,i]),l=fi(r);if(Ke(),o(),(l||e.sp)&&!Bt(e)&&ji(e),l){if(r.then(Wn,Wn),t)return r.then(a=>{Gn(e,a)}).catch(a=>{ks(a,e,0)});e.asyncDep=r}else Gn(e,r)}else po(e)}function Gn(e,t,s){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:z(t)&&(e.setupState=Ri(t)),po(e)}function po(e,t,s){const n=e.type;e.render||(e.render=n.render||He);{const i=es(e);Be();try{Ar(e)}finally{Ke(),i()}}}const fl={get(e,t){return ae(e,"get",""),e[t]}};function dl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,fl),slots:e.slots,emit:e.emit,expose:t}}function Os(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ri(Qo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Kt)return Kt[s](e)},has(t,s){return s in t||s in Kt}})):e.proxy}function pl(e){return H(e)&&"__vccOpts"in e}const bt=(e,t)=>ir(e,t,Xt),hl="3.5.39";/**
|
|
* @vue/runtime-dom v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let sn;const zn=typeof window<"u"&&window.trustedTypes;if(zn)try{sn=zn.createPolicy("vue",{createHTML:e=>e})}catch{}const ho=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",ml="http://www.w3.org/1998/Math/MathML",Ge=typeof document<"u"?document:null,qn=Ge&&Ge.createElement("template"),bl={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 i=t==="svg"?Ge.createElementNS(gl,e):t==="mathml"?Ge.createElementNS(ml,e):s?Ge.createElement(e,{is:s}):Ge.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ge.createTextNode(e),createComment:e=>Ge.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ge.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{qn.innerHTML=ho(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=qn.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vl=Symbol("_vtc");function _l(e,t,s){const n=e[vl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Jn=Symbol("_vod"),yl=Symbol("_vsh"),xl=Symbol(""),wl=/(?:^|;)\s*display\s*:/;function Sl(e,t,s){const n=e.style,i=ee(s);let o=!1;if(s&&!i){if(t)if(ee(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Ut(n,l,"")}else for(const r in t)s[r]==null&&Ut(n,r,"");for(const r in s){r==="display"&&(o=!0);const l=s[r];l!=null?Cl(e,r,!ee(t)&&t?t[r]:void 0,l)||Ut(n,r,l):Ut(n,r,"")}}else if(i){if(t!==s){const r=n[xl];r&&(s+=";"+r),n.cssText=s,o=wl.test(s)}}else t&&e.removeAttribute("style");Jn in e&&(e[Jn]=o?n.display:"",e[yl]&&(n.display="none"))}const Yn=/\s*!important$/;function Ut(e,t,s){if(U(s))s.forEach(n=>Ut(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tl(e,t);Yn.test(s)?e.setProperty(rt(n),s.replace(Yn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],Ks={};function Tl(e,t){const s=Ks[t];if(s)return s;let n=Ce(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=hi(n);for(let i=0;i<Xn.length;i++){const o=Xn[i]+n;if(o in e)return Ks[t]=o}return t}function Cl(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ee(n)&&s===n}const Zn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,i,o=Oo(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zn,t.slice(6,t.length)):e.setAttributeNS(Zn,t,s):s==null||o&&!mi(s)?e.removeAttribute(t):e.setAttribute(t,o?"":Ve(s)?String(s):s)}function ei(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ho(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=mi(s):s==null&&l==="string"?(s="",r=!0):l==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(i||t)}function Ye(e,t,s,n){e.addEventListener(t,s,n)}function El(e,t,s,n){e.removeEventListener(t,s,n)}const ti=Symbol("_vei");function kl(e,t,s,n,i=null){const o=e[ti]||(e[ti]={}),r=o[t];if(n&&r)r.value=n;else{const[l,a]=Al(t);if(n){const p=o[t]=Rl(n,i);Ye(e,l,p,a)}else r&&(El(e,l,r,a),o[t]=void 0)}}const Pl=/(Once|Passive|Capture)$/,$l=/^on:?(?:Once|Passive|Capture)$/;function Al(e){let t,s;for(;(s=e.match(Pl))&&!$l.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):rt(e.slice(2)),t]}let Ws=0;const Ol=Promise.resolve(),Ml=()=>Ws||(Ol.then(()=>Ws=0),Ws=Date.now());function Rl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(U(i)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const r=i.slice(),l=[n];for(let a=0;a<r.length&&!n._stopped;a++){const p=r[a];p&&Pe(p,t,5,l)}}else Pe(i,t,5,[n])};return s.value=e,s.attached=Ml(),s}const si=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Il=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?_l(e,n,r):t==="style"?Sl(e,s,n):xs(t)?ws(t)||kl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dl(e,t,n,r))?(ei(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,r,o,t!=="value")):e._isVueCE&&(Fl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ee(n)))?ei(e,Ce(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Qn(e,t,n,r))};function Dl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&si(t)&&H(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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return si(t)&&ee(s)?!1:t in e}function Fl(e,t){const s=e._def.props;if(!s)return!1;const n=Ce(t);return Array.isArray(s)?s.some(i=>Ce(i)===n):Object.keys(s).some(i=>Ce(i)===n)}const ot=e=>{const t=e.props["onUpdate:modelValue"]||!1;return U(t)?s=>us(t,s):t};function Ll(e){e.target.composing=!0}function ni(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Se=Symbol("_assign");function ii(e,t,s){return t&&(e=e.trim()),s&&(e=Ts(e)),e}const ve={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[Se]=ot(i);const o=n||i.props&&i.props.type==="number";Ye(e,t?"change":"input",r=>{r.target.composing||e[Se](ii(e.value,s,o))}),(s||o)&&Ye(e,"change",()=>{e.value=ii(e.value,s,o)}),t||(Ye(e,"compositionstart",Ll),Ye(e,"compositionend",ni),Ye(e,"change",ni))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(e[Se]=ot(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ts(e.value):e.value,a=t??"";if(l===a)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===a)||(e.value=a)}},Ul={deep:!0,created(e,t,s){e[Se]=ot(s),Ye(e,"change",()=>{const n=e._modelValue,i=Pt(e),o=e.checked,r=e[Se];if(U(n)){const l=cn(n,i),a=l!==-1;if(o&&!a)r(n.concat(i));else if(!o&&a){const p=[...n];p.splice(l,1),r(p)}}else if(At(n)){const l=new Set(n);o?l.add(i):l.delete(i),r(l)}else r(go(e,o))})},mounted:oi,beforeUpdate(e,t,s){e[Se]=ot(s),oi(e,t,s)}};function oi(e,{value:t,oldValue:s},n){e._modelValue=t;let i;if(U(t))i=cn(t,n.props.value)>-1;else if(At(t))i=t.has(n.props.value);else{if(t===s)return;i=nt(t,go(e,!0))}e.checked!==i&&(e.checked=i)}const Nl={created(e,{value:t},s){e.checked=nt(t,s.props.value),e[Se]=ot(s),Ye(e,"change",()=>{e[Se](Pt(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Se]=ot(n),t!==s&&(e.checked=nt(t,n.props.value))}},ys={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const i=At(t);Ye(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?Ts(Pt(r)):Pt(r));e[Se](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Di(()=>{e._assigning=!1})}),e[Se]=ot(n)},mounted(e,{value:t}){ri(e,t)},beforeUpdate(e,t,s){e[Se]=ot(s)},updated(e,{value:t}){e._assigning||ri(e,t)}};function ri(e,t){const s=e.multiple,n=U(t);if(!(s&&!n&&!At(t))){for(let i=0,o=e.options.length;i<o;i++){const r=e.options[i],l=Pt(r);if(s)if(n){const a=typeof l;a==="string"||a==="number"?r.selected=t.some(p=>String(p)===String(l)):r.selected=cn(t,l)>-1}else r.selected=t.has(l);else if(nt(Pt(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Pt(e){return"_value"in e?e._value:e.value}function go(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Hl={created(e,t,s){cs(e,t,s,null,"created")},mounted(e,t,s){cs(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){cs(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){cs(e,t,s,n,"updated")}};function Vl(e,t){switch(e){case"SELECT":return ys;case"TEXTAREA":return ve;default:switch(t){case"checkbox":return Ul;case"radio":return Nl;default:return ve}}}function cs(e,t,s,n,i){const r=Vl(e.tagName,s.props&&s.props.type)[i];r&&r(e,t,s,n)}const jl=["ctrl","shift","alt","meta"],Bl={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)=>jl.some(s=>e[`${s}Key`]&&!t.includes(s))},Kl=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((i,...o)=>{for(let r=0;r<t.length;r++){const l=Bl[t[r]];if(l&&l(i,t))return}return e(i,...o)}))},Wl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Gl=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(i=>{if(!("key"in i))return;const o=rt(i.key);if(t.some(r=>r===o||Wl[r]===o))return e(i)}))},zl=de({patchProp:Il},bl);let li;function ql(){return li||(li=Yr(zl))}const Jl=((...e)=>{const t=ql().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=Xl(n);if(!i)return;const o=t._component;!H(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,Yl(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function Yl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xl(e){return ee(e)?document.querySelector(e):e}const mo="dh-panel-theme";function Zl(){var e;try{const t=localStorage.getItem(mo);if(t==="dark"||t==="light")return t}catch{}return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}const Ct=j(Zl());function bo(e){Ct.value=e,document.documentElement.classList.toggle("dark",e==="dark");try{localStorage.setItem(mo,e)}catch{}}function ai(){bo(Ct.value==="dark"?"light":"dark")}bo(Ct.value);const nn="dh-panel-token";function Ql(){try{return localStorage.getItem(nn)||""}catch{return""}}const $t=j(Ql()),ce=j(null),ht=bt(()=>{var e;return((e=ce.value)==null?void 0:e.role)==="superadmin"}),ci=bt(()=>{var e,t;return((e=ce.value)==null?void 0:e.role)==="admin"||((t=ce.value)==null?void 0:t.role)==="superadmin"});function vo(e){$t.value=e;try{e?localStorage.setItem(nn,e):localStorage.removeItem(nn)}catch{}}class ea extends Error{constructor(t,s,n){super(t),this.status=s,this.body=n}}function ta(e,t){if(!e||typeof e!="object")return`HTTP ${t}`;if(e.error)return e.error;const s=Object.entries(e.data||{}).map(([n,i])=>`${n}: ${(i==null?void 0:i.message)||i}`).filter(Boolean);return s.length?s.join("; "):e.message||`HTTP ${t}`}async function ne(e,{method:t="GET",body:s,auth:n=!0}={}){const i={};s!==void 0&&(i["Content-Type"]="application/json"),n&&$t.value&&(i.Authorization=$t.value);const o=await fetch(e,{method:t,headers:i,body:s===void 0?void 0:JSON.stringify(s)}),r=await o.text();let l=null;try{l=r?JSON.parse(r):null}catch{l=null}if(!o.ok)throw o.status===401&&n&&wn(),new ea(ta(l,o.status),o.status,l);return l}async function sa(e,t){const s=await ne("/api/auth/login",{method:"POST",body:{email:e,password:t},auth:!1});return vo(s.token),await _o(),ce.value}async function _o(){return ce.value=await ne("/api/identity"),ce.value}function wn(){vo(""),ce.value=null}async function na(){if(!$t.value)return null;try{return await _o()}catch{return wn(),null}}const ia={class:"mx-auto flex w-full max-w-sm flex-col gap-5 pt-24"},oa={class:"dh-card p-6"},ra={key:0,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},la=["disabled"],aa={__name:"LoginView",emits:["authenticated"],setup(e,{emit:t}){const s=t,n=j(""),i=j(""),o=j(""),r=j(!1),l=bt(()=>n.value.trim()!==""&&i.value!==""&&!r.value);async function a(){if(l.value){o.value="",r.value=!0;try{const p=await sa(n.value.trim(),i.value);s("authenticated",p)}catch(p){o.value=p.status===400||p.status===404?"Invalid email or password.":p.message||"Could not sign in.",i.value=""}finally{r.value=!1}}}return(p,u)=>(w(),E("div",ia,[d("div",oa,[u[4]||(u[4]=d("h1",{class:"text-lg font-bold tracking-[-0.02em] text-strong"},"Sign in",-1)),u[5]||(u[5]=d("p",{class:"mt-1 mb-5 text-sm text-body"}," Superadmin console for the DriverVault API Server. ",-1)),d("form",{class:"flex flex-col gap-4",onSubmit:Kl(a,["prevent"])},[d("div",null,[u[2]||(u[2]=d("label",{class:"dh-label",for:"login-email"},"Email",-1)),ue(d("input",{id:"login-email","onUpdate:modelValue":u[0]||(u[0]=h=>n.value=h),class:"dh-input",type:"email",autocomplete:"username",autofocus:"",placeholder:"you@example.com"},null,512),[[ve,n.value]])]),d("div",null,[u[3]||(u[3]=d("label",{class:"dh-label",for:"login-password"},"Password",-1)),ue(d("input",{id:"login-password","onUpdate:modelValue":u[1]||(u[1]=h=>i.value=h),class:"dh-input",type:"password",autocomplete:"current-password",placeholder:"••••••••"},null,512),[[ve,i.value]])]),o.value?(w(),E("p",ra,D(o.value),1)):V("",!0),d("button",{class:"dh-btn w-full",type:"submit",disabled:!l.value},D(r.value?"Signing in…":"Sign in"),9,la)],32)]),u[6]||(u[6]=d("p",{class:"eyebrow text-center"}," Authenticates against PocketBase through this server ",-1))]))}},ca={class:"dh-card overflow-hidden"},ua={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},fa={key:0,class:"dh-pill bg-danger-soft text-danger"},da={key:0,class:"px-5 py-4 text-sm text-danger"},pa={key:1,class:"w-full text-left text-sm"},ha={class:"px-5 py-3 font-medium text-strong"},ga={class:"data px-5 py-3 text-xs text-muted"},ma={class:"data px-5 py-3 text-right text-xs text-muted"},ba={class:"px-5 py-3 text-right"},va={key:2,class:"px-5 py-4 text-sm text-muted"},_a={__name:"StatusCard",setup(e){const t=j(null),s=j("");let n=null;async function i(){try{t.value=await ne("/api/status",{auth:!1}),s.value=""}catch(r){t.value=null,s.value=r.message||"unreachable"}}vt(()=>{i(),n=setInterval(i,1e4)}),_n(()=>clearInterval(n));const o=r=>r==="ok"?"bg-success-soft text-success":"bg-danger-soft text-danger";return(r,l)=>(w(),E("div",ca,[d("div",ua,[l[1]||(l[1]=d("div",{class:"text-base font-bold tracking-[-0.02em] text-strong"},"Status",-1)),s.value?(w(),E("span",fa,[...l[0]||(l[0]=[d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1),Ze("unreachable ",-1)])])):V("",!0)]),s.value?(w(),E("div",da,D(s.value),1)):t.value?(w(),E("table",pa,[d("tbody",null,[(w(!0),E(Q,null,Te([{key:"apiServer",label:"API Server",h:t.value.apiServer},{key:"pocketBase",label:"PocketBase",h:t.value.pocketBase},{key:"webApp",label:"Web App",h:t.value.webApp}],a=>(w(),E("tr",{key:a.key,class:"border-t border-subtle first:border-t-0"},[d("td",ha,D(a.label),1),d("td",ga,D(a.h.url||"this process"),1),d("td",ma,D(a.h.latencyMs!=null?a.h.latencyMs+"ms":"—"),1),d("td",ba,[d("span",{class:je(["dh-pill",o(a.h.status)])},[l[2]||(l[2]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ze(D(a.h.status),1)],2)])]))),128))])])):(w(),E("div",va,"Checking…"))]))}},ya={class:"dh-card overflow-hidden"},xa={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},wa={class:"flex flex-col gap-4 px-5 py-4"},Sa={class:"grid gap-4 sm:grid-cols-2"},Ta=["placeholder"],Ca={key:0,class:"data text-xs text-muted"},Ea={key:1,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},ka={key:2,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},Pa={class:"flex items-center gap-2"},$a=["disabled"],Aa=["disabled"],Oa={__name:"PocketBaseCard",setup(e){const t=j(null),s=j({url:"",adminEmail:"",adminPassword:""}),n=j(null),i=j(""),o=j(""),r=j(!1);async function l(){try{t.value=await ne("/api/admin/pb-config"),s.value={url:t.value.url,adminEmail:t.value.adminEmail,adminPassword:""},n.value=t.value.probe}catch(u){i.value=u.message}}vt(l);async function a(){i.value="",o.value="",r.value=!0;try{n.value=await ne("/api/admin/pb-config/test",{method:"POST",body:s.value}),o.value=n.value.superuser?"Connection OK — superuser authenticated.":n.value.reachable?"PocketBase is reachable, but the service account did not authenticate.":"PocketBase is not reachable at that address."}catch(u){i.value=u.message}finally{r.value=!1}}async function p(){i.value="",o.value="",r.value=!0;try{const u=await ne("/api/admin/pb-config",{method:"PUT",body:s.value});t.value=u.config,n.value=u.config.probe,s.value.adminPassword="",o.value=u.warning||"Saved. The server is now using this PocketBase."}catch(u){i.value=u.message}finally{r.value=!1}}return(u,h)=>{var T,$;return w(),E("div",ya,[d("div",xa,[h[4]||(h[4]=d("div",null,[d("div",{class:"text-base font-bold tracking-[-0.02em] text-strong"},"PocketBase"),d("p",{class:"mt-0.5 text-xs text-muted"},"Database connection used by every endpoint")],-1)),n.value?(w(),E("span",{key:0,class:je(["dh-pill",n.value.superuser?"bg-success-soft text-success":n.value.reachable?"bg-warning-soft text-warning":"bg-danger-soft text-danger"])},[h[3]||(h[3]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ze(" "+D(n.value.superuser?"connected":n.value.reachable?"no superuser":"unreachable"),1)],2)):V("",!0)]),d("div",wa,[d("div",null,[h[5]||(h[5]=d("label",{class:"dh-label",for:"pb-url"},"Base URL",-1)),ue(d("input",{id:"pb-url","onUpdate:modelValue":h[0]||(h[0]=F=>s.value.url=F),class:"dh-input",placeholder:"http://10.2.1.10:8027"},null,512),[[ve,s.value.url]])]),d("div",Sa,[d("div",null,[h[6]||(h[6]=d("label",{class:"dh-label",for:"pb-email"},"Superuser email",-1)),ue(d("input",{id:"pb-email","onUpdate:modelValue":h[1]||(h[1]=F=>s.value.adminEmail=F),class:"dh-input",autocomplete:"off"},null,512),[[ve,s.value.adminEmail]])]),d("div",null,[h[7]||(h[7]=d("label",{class:"dh-label",for:"pb-password"},"Superuser password",-1)),ue(d("input",{id:"pb-password","onUpdate:modelValue":h[2]||(h[2]=F=>s.value.adminPassword=F),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:(T=t.value)!=null&&T.adminConfigured?"unchanged":"not set"},null,8,Ta),[[ve,s.value.adminPassword]])])]),($=n.value)!=null&&$.detail?(w(),E("p",Ca,D(n.value.detail),1)):V("",!0),o.value?(w(),E("p",Ea,D(o.value),1)):V("",!0),i.value?(w(),E("p",ka,D(i.value),1)):V("",!0),d("div",Pa,[d("button",{class:"dh-btn",disabled:r.value,onClick:p},"Save & apply",8,$a),d("button",{class:"dh-btn-ghost",disabled:r.value,onClick:a},"Test connection",8,Aa),h[8]||(h[8]=d("span",{class:"flex-1"},null,-1)),h[9]||(h[9]=d("span",{class:"eyebrow"},"persisted to .env",-1))])])])}}},Ma={class:"dh-card overflow-hidden"},Ra={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ia={key:0,class:"border-b border-subtle bg-sunken px-5 py-4"},Da={class:"grid gap-3 sm:grid-cols-3"},Fa=["disabled"],La={key:1,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},Ua={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Na={class:"flex items-center gap-3 px-5 py-3"},Ha=["onClick"],Va={class:"font-semibold text-strong"},ja={class:"dh-pill bg-sunken text-muted"},Ba={key:0,class:"text-xs text-muted"},Ka=["disabled","onClick"],Wa=["disabled","onClick"],Ga={key:0,class:"bg-sunken px-5 py-4"},za={key:0,class:"data mb-3 text-xs text-muted"},qa={key:1,class:"grid gap-3 sm:grid-cols-2"},Ja={class:"dh-label"},Ya={key:0,class:"text-danger"},Xa=["onUpdate:modelValue"],Za=["value"],Qa=["onUpdate:modelValue","type","placeholder"],ec={key:2,class:"mt-1 text-xs text-muted"},tc={key:2,class:"text-xs text-muted"},sc={key:3,class:"mt-4"},nc={class:"data flex flex-col gap-1 text-xs text-muted"},ic={class:"text-strong"},oc={key:0},rc={key:1},lc={key:4,class:"data mt-3 text-xs text-body"},ac={class:"mt-4 flex items-center gap-2"},cc=["disabled","onClick"],uc=["disabled","onClick"],fc=["disabled","onClick"],dc={key:5,class:"eyebrow mt-2"},pc={__name:"PluginsCard",setup(e){const t=j([]),s=j(""),n=j(!1),i=j(null),o=qt({}),r=qt({}),l=j(!1),a=j({name:"",baseURL:"",provider:""});async function p(){try{const S=await ne("/api/admin/plugins");t.value=S.plugins||[],s.value=""}catch(S){s.value=S.message}}vt(p);function u(S){var C;if(i.value===S.name){i.value=null;return}const x={};for(const M of S.configFields||[])x[M.key]=((C=S.config)==null?void 0:C[M.key])??"";o[S.name]=x,i.value=S.name}async function h(S,x){n.value=!0,r[S.name]="";try{const C=await ne(`/api/admin/plugins/${encodeURIComponent(S.name)}`,{method:"PUT",body:{enabled:x,config:o[S.name]??{}}});r[S.name]=C.warning||"Saved.",await p()}catch(C){r[S.name]=C.message}finally{n.value=!1}}async function T(S){n.value=!0,r[S.name]="Checking…";try{const x=await ne(`/api/admin/plugins/${encodeURIComponent(S.name)}/health`,{method:"POST"});r[S.name]=`${x.health.status}${x.health.detail?" — "+x.health.detail:""}`,await p()}catch(x){r[S.name]=x.message}finally{n.value=!1}}async function $(S){if(confirm(`Remove the external plugin "${S.name}"? Its saved config is deleted.`)){n.value=!0;try{await ne(`/api/admin/plugins/${encodeURIComponent(S.name)}`,{method:"DELETE"}),i.value===S.name&&(i.value=null),await p()}catch(x){r[S.name]=x.message}finally{n.value=!1}}}async function F(){n.value=!0,s.value="";try{await ne("/api/admin/plugins",{method:"POST",body:a.value}),a.value={name:"",baseURL:"",provider:""},l.value=!1,await p()}catch(S){s.value=S.message}finally{n.value=!1}}const y=S=>S==="ok"?"bg-success-soft text-success":S==="degraded"?"bg-warning-soft text-warning":"bg-danger-soft text-danger";return(S,x)=>(w(),E("div",Ma,[d("div",Ra,[x[4]||(x[4]=d("div",null,[d("div",{class:"text-base font-bold tracking-[-0.02em] text-strong"},"Plugins"),d("p",{class:"mt-0.5 text-xs text-muted"},"Third-party service integrations")],-1)),d("button",{class:"dh-btn-ghost",onClick:x[0]||(x[0]=C=>l.value=!l.value)},D(l.value?"Cancel":"Register external"),1)]),l.value?(w(),E("div",Ia,[d("div",Da,[d("div",null,[x[5]||(x[5]=d("label",{class:"dh-label"},"Name",-1)),ue(d("input",{"onUpdate:modelValue":x[1]||(x[1]=C=>a.value.name=C),class:"dh-input",placeholder:"acme-parts"},null,512),[[ve,a.value.name]])]),d("div",null,[x[6]||(x[6]=d("label",{class:"dh-label"},"Base URL",-1)),ue(d("input",{"onUpdate:modelValue":x[2]||(x[2]=C=>a.value.baseURL=C),class:"dh-input",placeholder:"http://127.0.0.1:9100"},null,512),[[ve,a.value.baseURL]])]),d("div",null,[x[7]||(x[7]=d("label",{class:"dh-label"},"Provider",-1)),ue(d("input",{"onUpdate:modelValue":x[3]||(x[3]=C=>a.value.provider=C),class:"dh-input",placeholder:"ACME Corp"},null,512),[[ve,a.value.provider]])])]),d("button",{class:"dh-btn mt-3",disabled:n.value||!a.value.name||!a.value.baseURL,onClick:F}," Register ",8,Fa)])):V("",!0),s.value?(w(),E("p",La,D(s.value),1)):V("",!0),t.value.length?V("",!0):(w(),E("p",Ua," No plugins yet. Register an external one above, or compile a built-in connector. ")),(w(!0),E(Q,null,Te(t.value,C=>(w(),E("div",{key:C.name,class:"border-t border-subtle first:border-t-0"},[d("div",Na,[d("button",{class:"flex flex-1 items-center gap-3 text-left",onClick:M=>u(C)},[d("span",Va,D(C.name),1),d("span",ja,D(C.kind||"builtin"),1),C.provider?(w(),E("span",Ba,D(C.provider),1)):V("",!0),C.health?(w(),E("span",{key:1,class:je(["dh-pill",y(C.health.status)])},[x[8]||(x[8]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ze(D(C.health.status),1)],2)):V("",!0)],8,Ha),d("span",{class:je(["dh-pill",C.enabled?"bg-success-soft text-success":"bg-sunken text-muted"])},D(C.enabled?"enabled":"disabled"),3),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:M=>T(C)},"Health",8,Ka),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:M=>u(C)},D(i.value===C.name?"Close":"Configure"),9,Wa)]),i.value===C.name?(w(),E("div",Ga,[C.baseURL?(w(),E("div",za,D(C.baseURL),1)):V("",!0),(C.configFields||[]).length?(w(),E("div",qa,[(w(!0),E(Q,null,Te(C.configFields,M=>(w(),E("div",{key:M.key},[d("label",Ja,[Ze(D(M.label||M.key),1),M.required?(w(),E("span",Ya," *")):V("",!0)]),M.type==="select"?ue((w(),E("select",{key:0,"onUpdate:modelValue":R=>o[C.name][M.key]=R,class:"dh-select"},[(w(!0),E(Q,null,Te(M.options||[],R=>(w(),E("option",{key:R.value,value:R.value},D(R.label||R.value),9,Za))),128))],8,Xa)),[[ys,o[C.name][M.key]]]):ue((w(),E("input",{key:1,"onUpdate:modelValue":R=>o[C.name][M.key]=R,class:"dh-input",type:M.type==="password"?"password":M.type==="number"?"number":"text",placeholder:M.default||"",autocomplete:"off"},null,8,Qa)),[[Hl,o[C.name][M.key]]]),M.help?(w(),E("p",ec,D(M.help),1)):V("",!0)]))),128))])):(w(),E("p",tc,"This plugin takes no configuration.")),(C.capabilities||[]).length?(w(),E("div",sc,[x[9]||(x[9]=d("div",{class:"eyebrow mb-1.5"},"Capabilities",-1)),d("ul",nc,[(w(!0),E(Q,null,Te(C.capabilities,M=>(w(),E("li",{key:M.id},[d("span",ic,D(M.id),1),M.method||M.endpoint?(w(),E("span",oc," — "+D(M.method)+" "+D(M.endpoint),1)):V("",!0),M.description?(w(),E("span",rc," · "+D(M.description),1)):V("",!0)]))),128))])])):V("",!0),r[C.name]?(w(),E("p",lc,D(r[C.name]),1)):V("",!0),d("div",ac,[d("button",{class:"dh-btn",disabled:n.value,onClick:M=>h(C,!0)},D(C.enabled?"Save":"Save & enable"),9,cc),C.enabled?(w(),E("button",{key:0,class:"dh-btn-ghost",disabled:n.value,onClick:M=>h(C,!1)}," Disable ",8,uc)):V("",!0),x[10]||(x[10]=d("span",{class:"flex-1"},null,-1)),C.kind==="external"?(w(),E("button",{key:1,class:"dh-btn-danger",disabled:n.value,onClick:M=>$(C)}," Remove ",8,fc)):V("",!0)]),C.kind!=="external"?(w(),E("p",dc," Built-in plugins can be disabled but not removed ")):V("",!0)])):V("",!0)]))),128))]))}},hc={class:"dh-card overflow-hidden"},gc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},mc={class:"mt-0.5 text-xs text-muted"},bc={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},vc={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},_c={class:"grid gap-3 sm:grid-cols-2"},yc={class:"dh-label"},xc=["value"],wc={key:0},Sc=["value"],Tc={class:"mt-3 flex items-center gap-2"},Cc=["disabled"],Ec=["disabled"],kc={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Pc={key:3,class:"w-full text-left text-sm"},$c={class:"data px-5 py-2.5 text-xs text-strong"},Ac={key:0,class:"eyebrow ml-1"},Oc={class:"px-5 py-2.5 text-body"},Mc={class:"px-5 py-2.5 text-body"},Rc={class:"px-5 py-2.5"},Ic={class:"px-5 py-2.5 text-right whitespace-nowrap"},Dc=["onClick"],Fc=["disabled","onClick"],Lc={__name:"UsersCard",setup(e){const t=j([]),s=j([]),n=j(""),i=j(!1),o=j(null),r=j({}),l=bt(()=>ht.value?["user","admin","superadmin"]:["user","admin"]);async function a(){try{const[y,S]=await Promise.all([ne("/api/users"),ne("/api/orgs")]);t.value=y.users||[],s.value=S.organizations||[],n.value=""}catch(y){n.value=y.message}}vt(a);function p(){var y;o.value="new",r.value={email:"",name:"",password:"",role:"user",organization:ht.value?"":((y=ce.value)==null?void 0:y.organization)||""}}function u(y){o.value=y.id,r.value={email:y.email,name:y.name||"",password:"",role:y.role,organization:y.organization||""}}function h(){o.value=null,n.value=""}async function T(){i.value=!0,n.value="";try{if(o.value==="new")await ne("/api/users",{method:"POST",body:r.value});else{const y={...r.value};y.password||delete y.password,await ne(`/api/users/${o.value}`,{method:"PATCH",body:y})}o.value=null,await a()}catch(y){n.value=y.message}finally{i.value=!1}}async function $(y){if(confirm(`Delete ${y.email}? This cannot be undone.`)){i.value=!0,n.value="";try{await ne(`/api/users/${y.id}`,{method:"DELETE"}),await a()}catch(S){n.value=S.message}finally{i.value=!1}}}const F=y=>y==="superadmin"?"bg-info-soft text-info":y==="admin"?"bg-warning-soft text-warning":"bg-sunken text-muted";return(y,S)=>(w(),E("div",hc,[d("div",gc,[d("div",null,[S[5]||(S[5]=d("div",{class:"text-base font-bold tracking-[-0.02em] text-strong"},"Users",-1)),d("p",mc,D(se(ht)?"All organizations":"Your organization"),1)]),d("button",{class:"dh-btn",onClick:p},"New user")]),n.value?(w(),E("p",bc,D(n.value),1)):V("",!0),o.value?(w(),E("div",vc,[d("div",_c,[d("div",null,[S[6]||(S[6]=d("label",{class:"dh-label"},"Email",-1)),ue(d("input",{"onUpdate:modelValue":S[0]||(S[0]=x=>r.value.email=x),class:"dh-input",type:"email",autocomplete:"off"},null,512),[[ve,r.value.email]])]),d("div",null,[S[7]||(S[7]=d("label",{class:"dh-label"},"Name",-1)),ue(d("input",{"onUpdate:modelValue":S[1]||(S[1]=x=>r.value.name=x),class:"dh-input",autocomplete:"off"},null,512),[[ve,r.value.name]])]),d("div",null,[d("label",yc," Password"+D(o.value==="new"?"":" (blank = unchanged)"),1),ue(d("input",{"onUpdate:modelValue":S[2]||(S[2]=x=>r.value.password=x),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:"min 8 characters"},null,512),[[ve,r.value.password]])]),d("div",null,[S[8]||(S[8]=d("label",{class:"dh-label"},"Role",-1)),ue(d("select",{"onUpdate:modelValue":S[3]||(S[3]=x=>r.value.role=x),class:"dh-select"},[(w(!0),E(Q,null,Te(l.value,x=>(w(),E("option",{key:x,value:x},D(x),9,xc))),128))],512),[[ys,r.value.role]])]),se(ht)?(w(),E("div",wc,[S[10]||(S[10]=d("label",{class:"dh-label"},"Organization",-1)),ue(d("select",{"onUpdate:modelValue":S[4]||(S[4]=x=>r.value.organization=x),class:"dh-select"},[S[9]||(S[9]=d("option",{value:""},"— none —",-1)),(w(!0),E(Q,null,Te(s.value,x=>(w(),E("option",{key:x.id,value:x.id},D(x.name),9,Sc))),128))],512),[[ys,r.value.organization]])])):V("",!0)]),d("div",Tc,[d("button",{class:"dh-btn",disabled:i.value,onClick:T},D(o.value==="new"?"Create":"Save"),9,Cc),d("button",{class:"dh-btn-ghost",disabled:i.value,onClick:h},"Cancel",8,Ec)])])):V("",!0),t.value.length?(w(),E("table",Pc,[S[11]||(S[11]=d("thead",null,[d("tr",{class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},[d("th",null,"Email"),d("th",null,"Name"),d("th",null,"Organization"),d("th",null,"Role"),d("th")])],-1)),d("tbody",null,[(w(!0),E(Q,null,Te(t.value,x=>{var C,M;return w(),E("tr",{key:x.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[d("td",$c,[Ze(D(x.email)+" ",1),x.id===((C=se(ce))==null?void 0:C.id)?(w(),E("span",Ac,"you")):V("",!0)]),d("td",Oc,D(x.name||"—"),1),d("td",Mc,D(x.organizationName||"—"),1),d("td",Rc,[d("span",{class:je(["dh-pill",F(x.role)])},D(x.role),3)]),d("td",Ic,[d("button",{class:"dh-btn-ghost",onClick:R=>u(x)},"Edit",8,Dc),x.id!==((M=se(ce))==null?void 0:M.id)?(w(),E("button",{key:0,class:"dh-btn-danger ml-1.5",disabled:i.value,onClick:R=>$(x)}," Delete ",8,Fc)):V("",!0)])])}),128))])])):(w(),E("p",kc,"No users."))]))}},Uc={class:"dh-card overflow-hidden"},Nc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Hc={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},Vc={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},jc={class:"mt-3 flex items-center gap-2"},Bc=["disabled"],Kc=["disabled"],Wc={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Gc={key:3,class:"w-full text-left text-sm"},zc={class:"px-5 py-2.5 font-medium text-strong"},qc={class:"data px-5 py-2.5 text-xs text-muted"},Jc={class:"px-5 py-2.5 text-right whitespace-nowrap"},Yc=["onClick"],Xc=["disabled","onClick"],Zc={__name:"OrgsCard",setup(e){const t=j([]),s=j(""),n=j(!1),i=j(null),o=j("");async function r(){try{const T=await ne("/api/orgs");t.value=T.organizations||[],s.value=""}catch(T){s.value=T.message}}vt(r);function l(){i.value="new",o.value=""}function a(T){i.value=T.id,o.value=T.name}function p(){i.value=null,s.value=""}async function u(){n.value=!0,s.value="";try{i.value==="new"?await ne("/api/orgs",{method:"POST",body:{name:o.value}}):await ne(`/api/orgs/${i.value}`,{method:"PATCH",body:{name:o.value}}),i.value=null,await r()}catch(T){s.value=T.message}finally{n.value=!1}}async function h(T){if(confirm(`Delete the organization "${T.name}"?`)){n.value=!0,s.value="";try{await ne(`/api/orgs/${T.id}`,{method:"DELETE"}),await r()}catch($){s.value=$.message}finally{n.value=!1}}}return(T,$)=>(w(),E("div",Uc,[d("div",Nc,[$[1]||($[1]=d("div",null,[d("div",{class:"text-base font-bold tracking-[-0.02em] text-strong"},"Organizations"),d("p",{class:"mt-0.5 text-xs text-muted"},"Tenants users belong to")],-1)),se(ht)?(w(),E("button",{key:0,class:"dh-btn",onClick:l},"New organization")):V("",!0)]),s.value?(w(),E("p",Hc,D(s.value),1)):V("",!0),i.value?(w(),E("div",Vc,[$[2]||($[2]=d("label",{class:"dh-label"},"Name",-1)),ue(d("input",{"onUpdate:modelValue":$[0]||($[0]=F=>o.value=F),class:"dh-input",placeholder:"Acme Fleet",onKeyup:Gl(u,["enter"])},null,544),[[ve,o.value]]),d("div",jc,[d("button",{class:"dh-btn",disabled:n.value||!o.value.trim(),onClick:u},D(i.value==="new"?"Create":"Save"),9,Bc),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:p},"Cancel",8,Kc)])])):V("",!0),t.value.length?(w(),E("table",Gc,[$[3]||($[3]=d("thead",null,[d("tr",{class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},[d("th",null,"Name"),d("th",null,"ID"),d("th")])],-1)),d("tbody",null,[(w(!0),E(Q,null,Te(t.value,F=>(w(),E("tr",{key:F.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[d("td",zc,D(F.name),1),d("td",qc,D(F.id),1),d("td",Jc,[se(ht)?(w(),E(Q,{key:0},[d("button",{class:"dh-btn-ghost",onClick:y=>a(F)},"Rename",8,Yc),d("button",{class:"dh-btn-danger ml-1.5",disabled:n.value,onClick:y=>h(F)}," Delete ",8,Xc)],64)):V("",!0)])]))),128))])])):(w(),E("p",Wc," No organizations yet. "))]))}},Qc={class:"dh-card overflow-hidden"},eu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},tu={class:"text-base font-bold tracking-[-0.02em] text-strong"},su={class:"eyebrow"},nu={class:"w-full text-left text-sm"},iu={class:"data border-t border-subtle px-5 py-2.5 text-xs whitespace-nowrap"},ou={class:"text-strong"},ru={class:"border-t border-subtle px-5 py-2.5 text-body"},tt={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brandtext",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(w(),E("div",Qc,[d("div",eu,[d("div",tu,D(e.title),1),d("span",su,D(e.auth),1)]),d("table",nu,[n[0]||(n[0]=d("thead",null,[d("tr",{class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},[d("th",null,"Endpoint"),d("th",null,"Description")])],-1)),d("tbody",null,[(w(!0),E(Q,null,Te(e.endpoints,i=>(w(),E("tr",{key:i.method+i.path,class:"transition-colors hover:bg-sunken"},[d("td",iu,[d("span",{class:je(["font-semibold",t[i.method]])},D(i.method),3),d("span",ou,D(i.path),1)]),d("td",ru,D(i.desc),1)]))),128))])])]))}},lu={class:"mx-auto flex max-w-4xl flex-col gap-6 px-6 pt-12 pb-16"},au={class:"flex items-center gap-3"},cu={class:"inline-flex items-center gap-2.5 select-none"},uu={class:"h-8 w-8 shrink-0",viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},fu={transform:"translate(7 0) skewX(-13)"},du=["fill"],pu=["fill"],hu=["fill"],gu={key:0,class:"data hidden text-xs text-muted sm:inline"},mu={key:0},bu={key:1,class:"dh-pill bg-info-soft text-info"},vu=["title"],_u={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},yu={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},xu={key:0,class:"eyebrow py-16 text-center"},wu={class:"flex flex-wrap gap-1.5"},Su=["onClick"],Tu={key:6,class:"eyebrow text-center"},Cu={__name:"App",setup(e){const t=j(!0),s=j("overview");vt(async()=>{await na(),t.value=!1});const n=bt(()=>{const F=[{id:"overview",label:"Overview"}];return ci.value&&F.push({id:"users",label:"Users"},{id:"orgs",label:"Organizations"}),ht.value&&F.push({id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}),F.push({id:"api",label:"API"}),F});function i(){wn(),s.value="overview"}const o=bt(()=>Ct.value==="dark"?["#60a5fa","#93c5fd","#ffffff"]:["var(--brand-700)","var(--brand-500)","var(--brand-400)"]),r=[{method:"GET",path:"/api/health",desc:"Liveness probe (no auth)"},{method:"GET",path:"/api/status",desc:"Health of PocketBase + Web App"},{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a PocketBase token"},{method:"GET",path:"/api/auth/validate",desc:"Check whether a token is still valid"}],l=[{method:"GET",path:"/api/auth/me",desc:"Identity of the bearer token"},{method:"GET",path:"/api/identity",desc:"Identity incl. role + organization"}],a=[{method:"GET",path:"/api/cars",desc:"List owned + shared cars"},{method:"POST",path:"/api/cars",desc:"Create a car"},{method:"GET",path:"/api/cars/{id}",desc:"Fetch one car"},{method:"PATCH",path:"/api/cars/{id}",desc:"Update a car"},{method:"DELETE",path:"/api/cars/{id}",desc:"Delete a car (owner only)"},{method:"GET",path:"/api/cars/{id}/service-records",desc:"A car's service history"},{method:"GET",path:"/api/cars/{id}/parts",desc:"A car's parts catalog"},{method:"GET",path:"/api/cars/{id}/shares",desc:"Who a car is shared with (owner)"},{method:"POST",path:"/api/cars/{id}/shares",desc:"Share a car by email (owner)"},{method:"DELETE",path:"/api/cars/{id}/shares/{userId}",desc:"Revoke a share (owner)"}],p=[{method:"GET",path:"/api/service-records",desc:"List service records"},{method:"POST",path:"/api/service-records",desc:"Log a service record"},{method:"GET",path:"/api/service-records/{id}",desc:"Fetch one record"},{method:"PATCH",path:"/api/service-records/{id}",desc:"Update a record"},{method:"DELETE",path:"/api/service-records/{id}",desc:"Delete a record"}],u=[{method:"GET",path:"/api/parts",desc:"List parts"},{method:"POST",path:"/api/parts",desc:"Add a part"},{method:"GET",path:"/api/parts/{id}",desc:"Fetch one part"},{method:"PATCH",path:"/api/parts/{id}",desc:"Update a part"},{method:"DELETE",path:"/api/parts/{id}",desc:"Delete a part"}],h=[{method:"GET",path:"/api/me",desc:"Current user profile"},{method:"PATCH",path:"/api/me",desc:"Update profile"},{method:"POST",path:"/api/me/password",desc:"Change password"},{method:"POST",path:"/api/me/avatar",desc:"Upload avatar"},{method:"GET",path:"/api/me/avatar",desc:"Fetch avatar"},{method:"DELETE",path:"/api/me/avatar",desc:"Remove avatar"},{method:"POST",path:"/api/me/verify/request",desc:"Request email verification"},{method:"GET",path:"/api/me/export",desc:"Export your data"},{method:"POST",path:"/api/me/import",desc:"Import data"},{method:"POST",path:"/api/me/delete",desc:"Request account deletion"},{method:"POST",path:"/api/me/delete/cancel",desc:"Cancel deletion request"},{method:"DELETE",path:"/api/me",desc:"Finalize account deletion"}],T=[{method:"GET",path:"/api/users",desc:"List users (scoped by role)"},{method:"POST",path:"/api/users",desc:"Create a user"},{method:"PATCH",path:"/api/users/{id}",desc:"Update email / name / role / org / password"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user"},{method:"GET",path:"/api/orgs",desc:"List organizations"},{method:"POST",path:"/api/orgs",desc:"Create an organization (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an organization (superadmin)"}],$=[{method:"GET",path:"/api/admin/pb-config",desc:"PocketBase connection + live probe"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Probe a candidate connection"},{method:"PUT",path:"/api/admin/pb-config",desc:"Apply + persist a connection"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins (secrets masked)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin"},{method:"GET",path:"/api/admin/plugins/{name}",desc:"Fetch one plugin"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a health check now"}];return(F,y)=>(w(),E("div",lu,[d("div",au,[d("span",cu,[(w(),E("svg",uu,[d("g",fu,[d("rect",{x:"9",y:"16",width:"6",height:"16",rx:"3",fill:o.value[0]},null,8,du),d("rect",{x:"19",y:"12",width:"6",height:"24",rx:"3",fill:o.value[1]},null,8,pu),d("rect",{x:"29",y:"8",width:"6",height:"32",rx:"3",fill:o.value[2]},null,8,hu)])])),y[1]||(y[1]=d("span",{class:"text-2xl leading-none font-extrabold tracking-[-0.03em] italic"},[d("span",{class:"text-strong"},"Driver"),d("span",{class:"text-brandtext"},"Vault")],-1))]),y[5]||(y[5]=d("span",{class:"eyebrow mt-1.5"},"API server",-1)),y[6]||(y[6]=d("div",{class:"flex-1"},null,-1)),se(ce)?(w(),E("span",gu,[Ze(D(se(ce).email),1),se(ce).organizationName?(w(),E("span",mu," · "+D(se(ce).organizationName),1)):V("",!0)])):V("",!0),se(ce)?(w(),E("span",bu,D(se(ce).role),1)):V("",!0),d("button",{class:"dh-btn-ghost",title:se(Ct)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:y[0]||(y[0]=(...S)=>se(ai)&&se(ai)(...S))},[se(Ct)==="dark"?(w(),E("svg",_u,[...y[2]||(y[2]=[d("circle",{cx:"12",cy:"12",r:"4"},null,-1),d("path",{"stroke-linecap":"round",d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},null,-1)])])):(w(),E("svg",yu,[...y[3]||(y[3]=[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},null,-1)])])),y[4]||(y[4]=Ze(" Theme ",-1))],8,vu),se($t)?(w(),E("button",{key:2,class:"dh-btn-ghost",onClick:i},"Sign out")):V("",!0)]),t.value?(w(),E("p",xu,"Loading…")):se($t)?(w(),E(Q,{key:2},[d("nav",wu,[(w(!0),E(Q,null,Te(n.value,S=>(w(),E("button",{key:S.id,class:je(["dh-btn-ghost",s.value===S.id?"border-accent text-brandtext":""]),onClick:x=>s.value=S.id},D(S.label),11,Su))),128))]),s.value==="overview"?(w(),pt(_a,{key:0})):s.value==="users"?(w(),pt(Lc,{key:1})):s.value==="orgs"?(w(),pt(Zc,{key:2})):s.value==="pocketbase"?(w(),pt(Oa,{key:3})):s.value==="plugins"?(w(),pt(pc,{key:4})):s.value==="api"?(w(),E(Q,{key:5},[le(tt,{title:"Public",auth:"No auth",endpoints:r}),le(tt,{title:"Identity",auth:"Bearer token",endpoints:l}),le(tt,{title:"Cars",auth:"Bearer token",endpoints:a}),le(tt,{title:"Service records",auth:"Bearer token",endpoints:p}),le(tt,{title:"Parts",auth:"Bearer token",endpoints:u}),le(tt,{title:"Account",auth:"Bearer token",endpoints:h}),le(tt,{title:"Management",auth:"Admin / superadmin",endpoints:T}),le(tt,{title:"Superadmin",auth:"Superadmin",endpoints:$})],64)):V("",!0),!se(ci)&&s.value==="overview"?(w(),E("p",Tu," Signed in as a standard user — management sections need an admin role ")):V("",!0)],64)):(w(),pt(aa,{key:1})),y[7]||(y[7]=d("p",{class:"eyebrow text-center"},"DriverVault — car maintenance & service tracker.",-1))]))}};Jl(Cu).mount("#app");
|