sensorium-mcp 2.17.17 → 2.17.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/claude-keeper.js +1 -1
- package/dist/claude-keeper.js.map +1 -1
- package/dist/dashboard/routes/threads.d.ts.map +1 -1
- package/dist/dashboard/routes/threads.js +8 -0
- package/dist/dashboard/routes/threads.js.map +1 -1
- package/dist/dashboard/spa.html +8 -8
- package/dist/data/memory/schema.d.ts.map +1 -1
- package/dist/data/memory/schema.js +11 -0
- package/dist/data/memory/schema.js.map +1 -1
- package/dist/data/memory/thread-registry.d.ts +3 -1
- package/dist/data/memory/thread-registry.d.ts.map +1 -1
- package/dist/data/memory/thread-registry.js +9 -3
- package/dist/data/memory/thread-registry.js.map +1 -1
- package/dist/tools/delegate-tool.d.ts.map +1 -1
- package/dist/tools/delegate-tool.js +27 -4
- package/dist/tools/delegate-tool.js.map +1 -1
- package/dist/watcher-service.d.ts.map +1 -1
- package/dist/watcher-service.js +4 -1
- package/dist/watcher-service.js.map +1 -1
- package/package.json +1 -1
package/dist/dashboard/spa.html
CHANGED
|
@@ -49,27 +49,27 @@
|
|
|
49
49
|
* @vue/shared v3.5.31
|
|
50
50
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
51
51
|
* @license MIT
|
|
52
|
-
**/function
|
|
52
|
+
**/function ln(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ue={},Mt=[],tt=()=>{},fo=()=>!1,ks=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ts=e=>e.startsWith("onUpdate:"),$e=Object.assign,an=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},vr=Object.prototype.hasOwnProperty,ne=(e,t)=>vr.call(e,t),z=Array.isArray,Ot=e=>ls(e)==="[object Map]",Ft=e=>ls(e)==="[object Set]",En=e=>ls(e)==="[object Date]",Z=e=>typeof e=="function",me=e=>typeof e=="string",nt=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",po=e=>(ae(e)||Z(e))&&Z(e.then)&&Z(e.catch),ho=Object.prototype.toString,ls=e=>ho.call(e),yr=e=>ls(e).slice(8,-1),mo=e=>ls(e)==="[object Object]",cn=e=>me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jt=ln(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$s=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},br=/-\w/g,De=$s(e=>e.replace(br,t=>t.slice(1).toUpperCase())),_r=/\B([A-Z])/g,_t=$s(e=>e.replace(_r,"-$1").toLowerCase()),As=$s(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fs=$s(e=>e?`on${As(e)}`:""),et=(e,t)=>!Object.is(e,t),hs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Es=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Ps=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Is(e){if(z(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=me(n)?kr(n):Is(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(me(e)||ae(e))return e}const wr=/;(?![^(]*\))/g,Sr=/:([^]+)/,Cr=/\/\*[^]*?\*\//g;function kr(e){const t={};return e.replace(Cr,"").split(wr).forEach(s=>{if(s){const n=s.split(Sr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Y(e){let t="";if(me(e))t=e;else if(z(e))for(let s=0;s<e.length;s++){const n=Y(e[s]);n&&(t+=n+" ")}else if(ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$r=ln(Tr);function xo(e){return!!e||e===""}function Ar(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Vt(e[n],t[n]);return s}function Vt(e,t){if(e===t)return!0;let s=En(e),n=En(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=nt(e),n=nt(t),s||n)return e===t;if(s=z(e),n=z(t),s||n)return s&&n?Ar(e,t):!1;if(s=ae(e),n=ae(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const a=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(a&&!c||!a&&c||!Vt(e[i],t[i]))return!1}}return String(e)===String(t)}function un(e,t){return e.findIndex(s=>Vt(s,t))}const vo=e=>!!(e&&e.__v_isRef===!0),$=e=>me(e)?e:e==null?"":z(e)||ae(e)&&(e.toString===ho||!Z(e.toString))?vo(e)?$(e.value):JSON.stringify(e,yo,2):String(e),yo=(e,t)=>vo(t)?yo(e,t.value):Ot(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Vs(n,r)+" =>"]=o,s),{})}:Ft(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Vs(s))}:nt(t)?Vs(t):ae(t)&&!z(t)&&!mo(t)?String(t):t,Vs=(e,t="")=>{var s;return nt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
53
53
|
* @vue/reactivity v3.5.31
|
|
54
54
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
55
55
|
* @license MIT
|
|
56
|
-
**/let Ne;class Ar{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ne,!t&&Ne&&(this.index=(Ne.scopes||(Ne.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ne;try{return Ne=this,t()}finally{Ne=s}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){this._on>0&&--this._on===0&&(Ne=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Er(){return Ne}let he;const Ls=new WeakSet;class yo{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,Ne&&Ne.active&&Ne.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ls.has(this)&&(Ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||_o(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Pn(this),wo(this);const t=he,s=We;he=this,We=!0;try{return this.fn()}finally{So(this),he=t,We=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,Pn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let bo=0,zt,Jt;function _o(e,t=!1){if(e.flags|=8,t){e.next=Jt,Jt=e;return}e.next=zt,zt=e}function cn(){bo++}function un(){if(--bo>0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=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 wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function So(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),dn(n),Pr(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function zs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Co(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Co(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=he,n=We;he=e,We=!0;try{wo(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{he=s,We=n,So(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)dn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let We=!0;const To=[];function dt(){To.push(We),We=!1}function ft(){const e=To.pop();We=e===void 0?!0:e}function Pn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=he;he=void 0;try{t()}finally{he=s}}}let Qt=0;class Ir{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 fn{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(!he||!We||he===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==he)s=this.activeLink=new Ir(he,this),he.deps?(s.prevDep=he.depsTail,he.depsTail.nextDep=s,he.depsTail=s):he.deps=he.depsTail=s,ko(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=he.depsTail,s.nextDep=void 0,he.depsTail.nextDep=s,he.depsTail=s,he.deps===s&&(he.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){cn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function ko(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)ko(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,Ct=Symbol(""),qs=Symbol(""),Xt=Symbol("");function Ee(e,t,s){if(We&&he){let n=Js.get(e);n||Js.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new fn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Js.get(e);if(!i){Qt++;return}const a=c=>{c&&c.trigger()};if(cn(),t==="clear")i.forEach(a);else{const c=z(e),h=c&&ln(s);if(c&&s==="length"){const d=Number(n);i.forEach((p,m)=>{(m==="length"||m===Xt||!nt(m)&&m>=d)&&a(p)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),h&&a(i.get(Xt)),t){case"add":c?h&&a(i.get("length")):(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"delete":c||(a(i.get(Ct)),It(e)&&a(i.get(qs)));break;case"set":It(e)&&a(i.get(Ct));break}}un()}function At(e){const t=oe(e);return t===e?t:(Ee(t,"iterate",Xt),He(e)?t:t.map(ze))}function Ps(e){return Ee(e=oe(e),"iterate",Xt),e}function Qe(e,t){return pt(e)?Rt(Tt(e)?ze(t):t):ze(t)}const Mr={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return At(this).concat(...e.map(t=>z(t)?At(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Qe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Qe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Qe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Vs(this,"includes",e)},indexOf(...e){return Vs(this,"indexOf",e)},join(e){return At(this).join(e)},lastIndexOf(...e){return Vs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Ht(this,"pop")},push(...e){return Ht(this,"push",e)},reduce(e,...t){return In(this,"reduce",e,t)},reduceRight(e,...t){return In(this,"reduceRight",e,t)},shift(){return Ht(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Ht(this,"splice",e)},toReversed(){return At(this).toReversed()},toSorted(e){return At(this).toSorted(e)},toSpliced(...e){return At(this).toSpliced(...e)},unshift(...e){return Ht(this,"unshift",e)},values(){return Fs(this,"values",e=>Qe(this,e))}};function Fs(e,t,s){const n=Ps(e),o=n[t]();return n!==e&&!He(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Or=Array.prototype;function rt(e,t,s,n,o,r){const i=Ps(e),a=i!==e&&!He(e),c=i[t];if(c!==Or[t]){const p=c.apply(e,r);return a?ze(p):p}let h=s;i!==e&&(a?h=function(p,m){return s.call(this,Qe(e,p),m,e)}:s.length>2&&(h=function(p,m){return s.call(this,p,m,e)}));const d=c.call(i,h,n);return a&&o?o(d):d}function In(e,t,s,n){const o=Ps(e),r=o!==e&&!He(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(h,d,p){return a&&(a=!1,h=Qe(e,h)),s.call(this,h,Qe(e,d),p,e)}):s.length>3&&(i=function(h,d,p){return s.call(this,h,d,p,e)}));const c=o[t](i,...n);return a?Qe(e,c):c}function Vs(e,t,s){const n=oe(e);Ee(n,"iterate",Xt);const o=n[t](...s);return(o===-1||o===!1)&&gn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Ht(e,t,s=[]){dt(),cn();const n=oe(e)[t].apply(e,s);return un(),ft(),n}const Rr=on("__proto__,__v_isRef,__isVue"),$o=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function Dr(e){nt(e)||(e=String(e));const t=oe(this);return Ee(t,"has",e),t.hasOwnProperty(e)}class Ao{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Wr:Mo:r?Io:Po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=z(t);if(!o){let c;if(i&&(c=Mr[s]))return c;if(s==="hasOwnProperty")return Dr}const a=Reflect.get(t,s,Ie(t)?t:n);if((nt(s)?$o.has(s):Rr(s))||(o||Ee(t,"get",s),r))return a;if(Ie(a)){const c=i&&ln(s)?a:a.value;return o&&ae(c)?Ys(c):c}return ae(a)?o?Ys(a):hn(a):a}}class Eo extends Ao{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=z(t)&&ln(s);if(!this._isShallow){const h=pt(r);if(!He(n)&&!pt(n)&&(r=oe(r),n=oe(n)),!i&&Ie(r)&&!Ie(n))return h||(r.value=n),!0}const a=i?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?et(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!nt(s)||!$o.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",z(t)?"length":Ct),Reflect.ownKeys(t)}}class jr extends Ao{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Nr=new Eo,Lr=new jr,Fr=new Eo(!0);const Gs=e=>e,as=e=>Reflect.getPrototypeOf(e);function Vr(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),i=It(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,h=o[e](...n),d=s?Gs:t?Rt:ze;return!t&&Ee(r,"iterate",c?qs:Ct),ke(Object.create(h),{next(){const{value:p,done:m}=h.next();return m?{value:p,done:m}:{value:a?[d(p[0]),d(p[1])]:d(p),done:m}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hr(e,t){const s={get(o){const r=this.__v_raw,i=oe(r),a=oe(o);e||(et(o,a)&&Ee(i,"get",o),Ee(i,"get",a));const{has:c}=as(i),h=t?Gs:e?Rt:ze;if(c.call(i,o))return h(r.get(o));if(c.call(i,a))return h(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ee(oe(o),"iterate",Ct),o.size},has(o){const r=this.__v_raw,i=oe(r),a=oe(o);return e||(et(o,a)&&Ee(i,"has",o),Ee(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=oe(a),h=t?Gs:e?Rt:ze;return!e&&Ee(c,"iterate",Ct),a.forEach((d,p)=>o.call(r,h(d),h(p),i))}};return ke(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(o){const r=oe(this),i=as(r),a=oe(o),c=!t&&!He(o)&&!pt(o)?a:o;return i.has.call(r,c)||et(o,c)&&i.has.call(r,o)||et(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!He(r)&&!pt(r)&&(r=oe(r));const i=oe(this),{has:a,get:c}=as(i);let h=a.call(i,o);h||(o=oe(o),h=a.call(i,o));const d=c.call(i,o);return i.set(o,r),h?et(r,d)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=oe(this),{has:i,get:a}=as(r);let c=i.call(r,o);c||(o=oe(o),c=i.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return c&&at(r,"delete",o,void 0),h},clear(){const o=oe(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Vr(o,e,t)}),s}function pn(e,t){const s=Hr(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(re(s,o)&&o in n?s:n,o,r)}const Ur={get:pn(!1,!1)},Br={get:pn(!1,!0)},Kr={get:pn(!0,!1)};const Po=new WeakMap,Io=new WeakMap,Mo=new WeakMap,Wr=new WeakMap;function zr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jr(e){return e.__v_skip||!Object.isExtensible(e)?0:zr(vr(e))}function hn(e){return pt(e)?e:mn(e,!1,Nr,Ur,Po)}function qr(e){return mn(e,!1,Fr,Br,Io)}function Ys(e){return mn(e,!0,Lr,Kr,Mo)}function mn(e,t,s,n,o){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Jr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function Tt(e){return pt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function He(e){return!!(e&&e.__v_isShallow)}function gn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Gr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&mo(e,"__v_skip",!0),e}const ze=e=>ae(e)?hn(e):e,Rt=e=>ae(e)?Ys(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function j(e){return Yr(e,!1)}function Yr(e,t){return Ie(e)?e:new Zr(e,t)}class Zr{constructor(t,s){this.dep=new fn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||He(t)||pt(t);t=n?t:oe(t),et(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Qr(e){return Ie(e)?e.value:e}const Xr={get:(e,t,s)=>t==="__v_raw"?e:Qr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ie(o)&&!Ie(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Oo(e){return Tt(e)?e:new Proxy(e,Xr)}class ei{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new fn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return _o(this,!0),!0}get value(){const t=this.dep.track();return Co(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ti(e,t,s=!1){let n,o;return Y(e)?n=e:(n=e.get,o=e.set),new ei(n,o,s)}const us={},xs=new WeakMap;let St;function si(e,t=!1,s=St){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(e)}}function ni(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,h=V=>o?V:He(V)||o===!1||o===0?ct(V,1):ct(V);let d,p,m,v,F=!1,D=!1;if(Ie(e)?(p=()=>e.value,F=He(e)):Tt(e)?(p=()=>h(e),F=!0):z(e)?(D=!0,F=e.some(V=>Tt(V)||He(V)),p=()=>e.map(V=>{if(Ie(V))return V.value;if(Tt(V))return h(V);if(Y(V))return c?c(V,2):V()})):Y(e)?t?p=c?()=>c(e,2):e:p=()=>{if(m){dt();try{m()}finally{ft()}}const V=St;St=d;try{return c?c(e,3,[v]):e(v)}finally{St=V}}:p=tt,t&&o){const V=p,le=o===!0?1/0:o;p=()=>ct(V(),le)}const B=Er(),E=()=>{d.stop(),B&&B.active&&rn(B.effects,d)};if(r&&t){const V=t;t=(...le)=>{V(...le),E()}}let H=D?new Array(e.length).fill(us):us;const Z=V=>{if(!(!(d.flags&1)||!d.dirty&&!V))if(t){const le=d.run();if(o||F||(D?le.some((de,J)=>et(de,H[J])):et(le,H))){m&&m();const de=St;St=d;try{const J=[le,H===us?void 0:D&&H[0]===us?[]:H,v];H=le,c?c(t,3,J):t(...J)}finally{St=de}}}else d.run()};return a&&a(Z),d=new yo(p),d.scheduler=i?()=>i(Z,!1):Z,v=V=>si(V,!1,d),m=d.onStop=()=>{const V=xs.get(d);if(V){if(c)c(V,4);else for(const le of V)le();xs.delete(d)}},t?n?Z(!0):H=d.run():i?i(Z.bind(null,!0),!0):d.run(),E.pause=d.pause.bind(d),E.resume=d.resume.bind(d),E.stop=E,E}function ct(e,t=1/0,s){if(t<=0||!ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ct(e.value,t,s);else if(z(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Nt(e)||It(e))e.forEach(n=>{ct(n,t,s)});else if(ho(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
|
|
56
|
+
**/let je;class Er{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=je,!t&&je&&(this.index=(je.scopes||(je.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=je;try{return je=this,t()}finally{je=s}}}on(){++this._on===1&&(this.prevScope=je,je=this)}off(){this._on>0&&--this._on===0&&(je=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Pr(){return je}let pe;const Hs=new WeakSet;class bo{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,je&&je.active&&je.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Hs.has(this)&&(Hs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,In(this),So(this);const t=pe,s=Ke;pe=this,Ke=!0;try{return this.fn()}finally{Co(this),pe=t,Ke=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)pn(t);this.deps=this.depsTail=void 0,In(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Hs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let _o=0,qt,Gt;function wo(e,t=!1){if(e.flags|=8,t){e.next=Gt,Gt=e;return}e.next=qt,qt=e}function dn(){_o++}function fn(){if(--_o>0)return;if(Gt){let t=Gt;for(Gt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;qt;){let t=qt;for(qt=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 So(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Co(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),pn(n),Ir(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}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&&(ko(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ko(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===es)||(e.globalVersion=es,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=pe,n=Ke;pe=e,Ke=!0;try{So(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{pe=s,Ke=n,Co(e),e.flags&=-3}}function pn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)pn(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ir(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ke=!0;const To=[];function dt(){To.push(Ke),Ke=!1}function ft(){const e=To.pop();Ke=e===void 0?!0:e}function In(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=pe;pe=void 0;try{t()}finally{pe=s}}}let es=0;class Mr{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 hn{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(!pe||!Ke||pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==pe)s=this.activeLink=new Mr(pe,this),pe.deps?(s.prevDep=pe.depsTail,pe.depsTail.nextDep=s,pe.depsTail=s):pe.deps=pe.depsTail=s,$o(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=pe.depsTail,s.nextDep=void 0,pe.depsTail.nextDep=s,pe.depsTail=s,pe.deps===s&&(pe.deps=n)}return s}trigger(t){this.version++,es++,this.notify(t)}notify(t){dn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{fn()}}}function $o(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)$o(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Ys=new WeakMap,Tt=Symbol(""),Zs=Symbol(""),ts=Symbol("");function Ae(e,t,s){if(Ke&&pe){let n=Ys.get(e);n||Ys.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new hn),o.map=n,o.key=s),o.track()}}function at(e,t,s,n,o,r){const i=Ys.get(e);if(!i){es++;return}const a=c=>{c&&c.trigger()};if(dn(),t==="clear")i.forEach(a);else{const c=z(e),h=c&&cn(s);if(c&&s==="length"){const d=Number(n);i.forEach((p,m)=>{(m==="length"||m===ts||!nt(m)&&m>=d)&&a(p)})}else switch((s!==void 0||i.has(void 0))&&a(i.get(s)),h&&a(i.get(ts)),t){case"add":c?h&&a(i.get("length")):(a(i.get(Tt)),Ot(e)&&a(i.get(Zs)));break;case"delete":c||(a(i.get(Tt)),Ot(e)&&a(i.get(Zs)));break;case"set":Ot(e)&&a(i.get(Tt));break}}fn()}function Pt(e){const t=se(e);return t===e?t:(Ae(t,"iterate",ts),Ve(e)?t:t.map(We))}function Ms(e){return Ae(e=se(e),"iterate",ts),e}function Qe(e,t){return pt(e)?jt($t(e)?We(t):t):We(t)}const Or={__proto__:null,[Symbol.iterator](){return Us(this,Symbol.iterator,e=>Qe(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>z(t)?Pt(t):t))},entries(){return Us(this,"entries",e=>(e[1]=Qe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Qe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Qe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Qe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bs(this,"includes",e)},indexOf(...e){return Bs(this,"indexOf",e)},join(e){return Pt(this).join(e)},lastIndexOf(...e){return Bs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Ut(this,"pop")},push(...e){return Ut(this,"push",e)},reduce(e,...t){return Mn(this,"reduce",e,t)},reduceRight(e,...t){return Mn(this,"reduceRight",e,t)},shift(){return Ut(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Ut(this,"splice",e)},toReversed(){return Pt(this).toReversed()},toSorted(e){return Pt(this).toSorted(e)},toSpliced(...e){return Pt(this).toSpliced(...e)},unshift(...e){return Ut(this,"unshift",e)},values(){return Us(this,"values",e=>Qe(this,e))}};function Us(e,t,s){const n=Ms(e),o=n[t]();return n!==e&&!Ve(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const Dr=Array.prototype;function rt(e,t,s,n,o,r){const i=Ms(e),a=i!==e&&!Ve(e),c=i[t];if(c!==Dr[t]){const p=c.apply(e,r);return a?We(p):p}let h=s;i!==e&&(a?h=function(p,m){return s.call(this,Qe(e,p),m,e)}:s.length>2&&(h=function(p,m){return s.call(this,p,m,e)}));const d=c.call(i,h,n);return a&&o?o(d):d}function Mn(e,t,s,n){const o=Ms(e),r=o!==e&&!Ve(e);let i=s,a=!1;o!==e&&(r?(a=n.length===0,i=function(h,d,p){return a&&(a=!1,h=Qe(e,h)),s.call(this,h,Qe(e,d),p,e)}):s.length>3&&(i=function(h,d,p){return s.call(this,h,d,p,e)}));const c=o[t](i,...n);return a?Qe(e,c):c}function Bs(e,t,s){const n=se(e);Ae(n,"iterate",ts);const o=n[t](...s);return(o===-1||o===!1)&&vn(s[0])?(s[0]=se(s[0]),n[t](...s)):o}function Ut(e,t,s=[]){dt(),dn();const n=se(e)[t].apply(e,s);return fn(),ft(),n}const Rr=ln("__proto__,__v_isRef,__isVue"),Ao=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function jr(e){nt(e)||(e=String(e));const t=se(this);return Ae(t,"has",e),t.hasOwnProperty(e)}class Eo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?zr:Oo:r?Mo:Io).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=z(t);if(!o){let c;if(i&&(c=Or[s]))return c;if(s==="hasOwnProperty")return jr}const a=Reflect.get(t,s,Pe(t)?t:n);if((nt(s)?Ao.has(s):Rr(s))||(o||Ae(t,"get",s),r))return a;if(Pe(a)){const c=i&&cn(s)?a:a.value;return o&&ae(c)?Xs(c):c}return ae(a)?o?Xs(a):gn(a):a}}class Po extends Eo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const i=z(t)&&cn(s);if(!this._isShallow){const h=pt(r);if(!Ve(n)&&!pt(n)&&(r=se(r),n=se(n)),!i&&Pe(r)&&!Pe(n))return h||(r.value=n),!0}const a=i?Number(s)<t.length:ne(t,s),c=Reflect.set(t,s,n,Pe(t)?t:o);return t===se(o)&&(a?et(n,r)&&at(t,"set",s,n):at(t,"add",s,n)),c}deleteProperty(t,s){const n=ne(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&at(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!nt(s)||!Ao.has(s))&&Ae(t,"has",s),n}ownKeys(t){return Ae(t,"iterate",z(t)?"length":Tt),Reflect.ownKeys(t)}}class Nr extends Eo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Lr=new Po,Fr=new Nr,Vr=new Po(!0);const Qs=e=>e,us=e=>Reflect.getPrototypeOf(e);function Hr(e,t,s){return function(...n){const o=this.__v_raw,r=se(o),i=Ot(r),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,h=o[e](...n),d=s?Qs:t?jt:We;return!t&&Ae(r,"iterate",c?Zs:Tt),$e(Object.create(h),{next(){const{value:p,done:m}=h.next();return m?{value:p,done:m}:{value:a?[d(p[0]),d(p[1])]:d(p),done:m}}})}}function ds(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ur(e,t){const s={get(o){const r=this.__v_raw,i=se(r),a=se(o);e||(et(o,a)&&Ae(i,"get",o),Ae(i,"get",a));const{has:c}=us(i),h=t?Qs:e?jt:We;if(c.call(i,o))return h(r.get(o));if(c.call(i,a))return h(r.get(a));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ae(se(o),"iterate",Tt),o.size},has(o){const r=this.__v_raw,i=se(r),a=se(o);return e||(et(o,a)&&Ae(i,"has",o),Ae(i,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const i=this,a=i.__v_raw,c=se(a),h=t?Qs:e?jt:We;return!e&&Ae(c,"iterate",Tt),a.forEach((d,p)=>o.call(r,h(d),h(p),i))}};return $e(s,e?{add:ds("add"),set:ds("set"),delete:ds("delete"),clear:ds("clear")}:{add(o){const r=se(this),i=us(r),a=se(o),c=!t&&!Ve(o)&&!pt(o)?a:o;return i.has.call(r,c)||et(o,c)&&i.has.call(r,o)||et(a,c)&&i.has.call(r,a)||(r.add(c),at(r,"add",c,c)),this},set(o,r){!t&&!Ve(r)&&!pt(r)&&(r=se(r));const i=se(this),{has:a,get:c}=us(i);let h=a.call(i,o);h||(o=se(o),h=a.call(i,o));const d=c.call(i,o);return i.set(o,r),h?et(r,d)&&at(i,"set",o,r):at(i,"add",o,r),this},delete(o){const r=se(this),{has:i,get:a}=us(r);let c=i.call(r,o);c||(o=se(o),c=i.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return c&&at(r,"delete",o,void 0),h},clear(){const o=se(this),r=o.size!==0,i=o.clear();return r&&at(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Hr(o,e,t)}),s}function mn(e,t){const s=Ur(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(ne(s,o)&&o in n?s:n,o,r)}const Br={get:mn(!1,!1)},Kr={get:mn(!1,!0)},Wr={get:mn(!0,!1)};const Io=new WeakMap,Mo=new WeakMap,Oo=new WeakMap,zr=new WeakMap;function Jr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qr(e){return e.__v_skip||!Object.isExtensible(e)?0:Jr(yr(e))}function gn(e){return pt(e)?e:xn(e,!1,Lr,Br,Io)}function Gr(e){return xn(e,!1,Vr,Kr,Mo)}function Xs(e){return xn(e,!0,Fr,Wr,Oo)}function xn(e,t,s,n,o){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=qr(e);if(r===0)return e;const i=o.get(e);if(i)return i;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function $t(e){return pt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function vn(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Yr(e){return!ne(e,"__v_skip")&&Object.isExtensible(e)&&go(e,"__v_skip",!0),e}const We=e=>ae(e)?gn(e):e,jt=e=>ae(e)?Xs(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function j(e){return Zr(e,!1)}function Zr(e,t){return Pe(e)?e:new Qr(e,t)}class Qr{constructor(t,s){this.dep=new hn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:se(t),this._value=s?t:We(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ve(t)||pt(t);t=n?t:se(t),et(t,s)&&(this._rawValue=t,this._value=n?t:We(t),this.dep.trigger())}}function Xr(e){return Pe(e)?e.value:e}const ei={get:(e,t,s)=>t==="__v_raw"?e:Xr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Pe(o)&&!Pe(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Do(e){return $t(e)?e:new Proxy(e,ei)}class ti{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new hn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=es-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&pe!==this)return wo(this,!0),!0}get value(){const t=this.dep.track();return ko(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function si(e,t,s=!1){let n,o;return Z(e)?n=e:(n=e.get,o=e.set),new ti(n,o,s)}const fs={},ys=new WeakMap;let kt;function ni(e,t=!1,s=kt){if(s){let n=ys.get(s);n||ys.set(s,n=[]),n.push(e)}}function oi(e,t,s=ue){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:a,call:c}=s,h=F=>o?F:Ve(F)||o===!1||o===0?ct(F,1):ct(F);let d,p,m,k,V=!1,A=!1;if(Pe(e)?(p=()=>e.value,V=Ve(e)):$t(e)?(p=()=>h(e),V=!0):z(e)?(A=!0,V=e.some(F=>$t(F)||Ve(F)),p=()=>e.map(F=>{if(Pe(F))return F.value;if($t(F))return h(F);if(Z(F))return c?c(F,2):F()})):Z(e)?t?p=c?()=>c(e,2):e:p=()=>{if(m){dt();try{m()}finally{ft()}}const F=kt;kt=d;try{return c?c(e,3,[k]):e(k)}finally{kt=F}}:p=tt,t&&o){const F=p,re=o===!0?1/0:o;p=()=>ct(F(),re)}const H=Pr(),O=()=>{d.stop(),H&&H.active&&an(H.effects,d)};if(r&&t){const F=t;t=(...re)=>{F(...re),O()}}let L=A?new Array(e.length).fill(fs):fs;const W=F=>{if(!(!(d.flags&1)||!d.dirty&&!F))if(t){const re=d.run();if(o||V||(A?re.some((we,J)=>et(we,L[J])):et(re,L))){m&&m();const we=kt;kt=d;try{const J=[re,L===fs?void 0:A&&L[0]===fs?[]:L,k];L=re,c?c(t,3,J):t(...J)}finally{kt=we}}}else d.run()};return a&&a(W),d=new bo(p),d.scheduler=i?()=>i(W,!1):W,k=F=>ni(F,!1,d),m=d.onStop=()=>{const F=ys.get(d);if(F){if(c)c(F,4);else for(const re of F)re();ys.delete(d)}},t?n?W(!0):L=d.run():i?i(W.bind(null,!0),!0):d.run(),O.pause=d.pause.bind(d),O.resume=d.resume.bind(d),O.stop=O,O}function ct(e,t=1/0,s){if(t<=0||!ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Pe(e))ct(e.value,t,s);else if(z(e))for(let n=0;n<e.length;n++)ct(e[n],t,s);else if(Ft(e)||Ot(e))e.forEach(n=>{ct(n,t,s)});else if(mo(e)){for(const n in e)ct(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ct(e[n],t,s)}return e}/**
|
|
57
57
|
* @vue/runtime-core v3.5.31
|
|
58
58
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
59
59
|
* @license MIT
|
|
60
|
-
**/function is(e,t,s,n){try{return n?e(...n):e()}catch(o){Is(o,t,s)}}function ot(e,t,s,n){if(Y(e)){const o=is(e,t,s,n);return o&&fo(o)&&o.catch(r=>{Is(r,t,s)}),o}if(z(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ot(e[r],t,s,n));return o}}function Is(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,h)===!1)return}a=a.parent}if(r){dt(),is(r,null,10,[e,c,h]),ft();return}}oi(e,s,o,n,i)}function oi(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Ze=-1;const Mt=[];let mt=null,Et=0;const Ro=Promise.resolve();let vs=null;function Do(e){const t=vs||Ro;return e?t.then(this?e.bind(this):e):t}function ri(e){let t=Ze+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[n],r=es(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function xn(e){if(!(e.flags&1)){const t=es(e),s=Re[Re.length-1];!s||!(e.flags&2)&&t>=es(s)?Re.push(e):Re.splice(ri(t),0,e),e.flags|=1,jo()}}function jo(){vs||(vs=Ro.then(Lo))}function ii(e){z(e)?Mt.push(...e):mt&&e.id===-1?mt.splice(Et+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),jo()}function Mn(e,t,s=Ze+1){for(;s<Re.length;s++){const n=Re[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Re.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function No(e){if(Mt.length){const t=[...new Set(Mt)].sort((s,n)=>es(s)-es(n));if(Mt.length=0,mt){mt.push(...t);return}for(mt=t,Et=0;Et<mt.length;Et++){const s=mt[Et];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}mt=null,Et=0}}const es=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lo(e){try{for(Ze=0;Ze<Re.length;Ze++){const t=Re[Ze];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ze<Re.length;Ze++){const t=Re[Ze];t&&(t.flags&=-2)}Ze=-1,Re.length=0,No(),vs=null,(Re.length||Mt.length)&&Lo()}}let Fe=null,Fo=null;function ys(e){const t=Fe;return Fe=e,Fo=e&&e.type.__scopeId||null,t}function li(e,t=Fe,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=ys(t);let i;try{i=e(...o)}finally{ys(r),n._d&&Kn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function me(e,t){if(Fe===null)return e;const s=Ds(Fe),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function _t(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),ot(c,s,8,[e.el,a,e,t]),ft())}}function ai(e,t){if(Pe){let s=Pe.provides;const n=Pe.parent&&Pe.parent.provides;n===s&&(s=Pe.provides=Object.create(n)),s[e]=t}}function ps(e,t,s=!1){const n=al();if(n||Ot){let o=Ot?Ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Y(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),ui=()=>ps(ci);function Hs(e,t,s){return Vo(e,t,s)}function Vo(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=ke({},s),c=t&&n||!t&&r!=="post";let h;if(ss){if(r==="sync"){const v=ui();h=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=tt,v.resume=tt,v.pause=tt,v}}const d=Pe;a.call=(v,F,D)=>ot(v,d,F,D);let p=!1;r==="post"?a.scheduler=v=>{je(v,d&&d.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(v,F)=>{F?v():xn(v)}),a.augmentJob=v=>{t&&(v.flags|=4),p&&(v.flags|=2,d&&(v.id=d.uid,v.i=d))};const m=ni(e,t,a);return ss&&(h?h.push(m):c&&m()),m}function di(e,t,s){const n=this.proxy,o=xe(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const i=ls(this),a=Vo(o,r.bind(n),s);return i(),a}function Ho(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const fi=Symbol("_vte"),pi=e=>e.__isTeleport,hi=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 kt(e,t){return Y(e)?ke({name:e.name},t,{setup:e}):e}function Uo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function On(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bs=new WeakMap;function qt(e,t,s,n,o=!1){if(z(e)){e.forEach((D,B)=>qt(D,t&&(z(t)?t[B]:t),s,n,o));return}if(Gt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&qt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ds(n.component):n.el,i=o?null:r,{i:a,r:c}=e,h=t&&t.r,d=a.refs===ue?a.refs={}:a.refs,p=a.setupState,m=oe(p),v=p===ue?uo:D=>On(d,D)?!1:re(m,D),F=(D,B)=>!(B&&On(d,B));if(h!=null&&h!==c){if(Rn(t),xe(h))d[h]=null,v(h)&&(p[h]=null);else if(Ie(h)){const D=t;F(h,D.k)&&(h.value=null),D.k&&(d[D.k]=null)}}if(Y(c))is(c,a,12,[i,d]);else{const D=xe(c),B=Ie(c);if(D||B){const E=()=>{if(e.f){const H=D?v(c)?p[c]:d[c]:F()||!e.k?c.value:d[e.k];if(o)z(H)&&rn(H,r);else if(z(H))H.includes(r)||H.push(r);else if(D)d[c]=[r],v(c)&&(p[c]=d[c]);else{const Z=[r];F(c,e.k)&&(c.value=Z),e.k&&(d[e.k]=Z)}}else D?(d[c]=i,v(c)&&(p[c]=i)):B&&(F(c,e.k)&&(c.value=i),e.k&&(d[e.k]=i))};if(i){const H=()=>{E(),bs.delete(e)};H.id=-1,bs.set(e,H),je(H,s)}else Rn(e),E()}}}function Rn(e){const t=bs.get(e);t&&(t.flags|=8,bs.delete(e))}As().requestIdleCallback;As().cancelIdleCallback;const Gt=e=>!!e.type.__asyncLoader,Bo=e=>e.type.__isKeepAlive;function mi(e,t){Ko(e,"a",t)}function gi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Pe){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ms(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Bo(o.parent.vnode)&&xi(n,t,s,o),o=o.parent}}function xi(e,t,s,n){const o=Ms(t,e,n,!0);yn(()=>{rn(n[t],o)},s)}function Ms(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=ls(s),c=ot(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Pe)=>{(!ss||e==="sp")&&Ms(e,(...n)=>t(...n),s)},vi=ht("bm"),bt=ht("m"),yi=ht("bu"),bi=ht("u"),_i=ht("bum"),yn=ht("um"),wi=ht("sp"),Si=ht("rtg"),Ci=ht("rtc");function Ti(e,t=Pe){Ms("ec",e,t)}const ki="components",Wo=Symbol.for("v-ndc");function $i(e){return xe(e)?Ai(ki,e,!1)||e:e||Wo}function Ai(e,t,s=!0,n=!1){const o=Fe||Pe;if(o){const r=o.type;{const a=pl(r,!1);if(a&&(a===t||a===De(t)||a===ks(De(t))))return r}const i=Dn(o[e]||r[e],t)||Dn(o.appContext[e],t);return!i&&n?r:i}}function Dn(e,t){return e&&(e[t]||e[De(t)]||e[ks(De(t))])}function _e(e,t,s,n){let o;const r=s,i=z(e);if(i||xe(e)){const a=i&&Tt(e);let c=!1,h=!1;a&&(c=!He(e),h=pt(e),e=Ps(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(c?h?Rt(ze(e[d])):ze(e[d]):e[d],d,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ae(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,h=a.length;c<h;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const Zs=e=>e?pr(e)?Ds(e):Zs(e.parent):null,Yt=ke(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=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Jo(e),$forceUpdate:e=>e.f||(e.f=()=>{xn(e.update)}),$nextTick:e=>e.n||(e.n=Do.bind(e.proxy)),$watch:e=>di.bind(e)}),Us=(e,t)=>e!==ue&&!e.__isScriptSetup&&re(e,t),Ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Us(n,t))return i[t]=1,n[t];if(o!==ue&&re(o,t))return i[t]=2,o[t];if(re(r,t))return i[t]=3,r[t];if(s!==ue&&re(s,t))return i[t]=4,s[t];Qs&&(i[t]=0)}}const h=Yt[t];let d,p;if(h)return t==="$attrs"&&Ee(e.attrs,"get",""),h(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==ue&&re(s,t))return i[t]=4,s[t];if(p=c.config.globalProperties,re(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Us(o,t)?(o[t]=s,!0):n!==ue&&re(n,t)?(n[t]=s,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&re(e,a)||Us(t,a)||re(r,a)||re(n,a)||re(Yt,a)||re(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:re(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function jn(e){return z(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Qs=!0;function Pi(e){const t=Jo(e),s=e.proxy,n=e.ctx;Qs=!1,t.beforeCreate&&Nn(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:h,created:d,beforeMount:p,mounted:m,beforeUpdate:v,updated:F,activated:D,deactivated:B,beforeDestroy:E,beforeUnmount:H,destroyed:Z,unmounted:V,render:le,renderTracked:de,renderTriggered:J,errorCaptured:N,serverPrefetch:W,expose:fe,inheritAttrs:te,components:Se,directives:be,filters:Ue}=t;if(h&&Ii(h,n,null),i)for(const se in i){const X=i[se];Y(X)&&(n[se]=X.bind(s))}if(o){const se=o.call(s,s);ae(se)&&(e.data=hn(se))}if(Qs=!0,r)for(const se in r){const X=r[se],Me=Y(X)?X.bind(s,s):Y(X.get)?X.get.bind(s,s):tt,L=!Y(X)&&Y(X.set)?X.set.bind(s):tt,b=Ke({get:Me,set:L});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>b.value,set:x=>b.value=x})}if(a)for(const se in a)zo(a[se],n,s,se);if(c){const se=Y(c)?c.call(s):c;Reflect.ownKeys(se).forEach(X=>{ai(X,se[X])})}d&&Nn(d,e,"c");function ge(se,X){z(X)?X.forEach(Me=>se(Me.bind(s))):X&&se(X.bind(s))}if(ge(vi,p),ge(bt,m),ge(yi,v),ge(bi,F),ge(mi,D),ge(gi,B),ge(Ti,N),ge(Ci,de),ge(Si,J),ge(_i,H),ge(yn,V),ge(wi,W),z(fe))if(fe.length){const se=e.exposed||(e.exposed={});fe.forEach(X=>{Object.defineProperty(se,X,{get:()=>s[X],set:Me=>s[X]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===tt&&(e.render=le),te!=null&&(e.inheritAttrs=te),Se&&(e.components=Se),be&&(e.directives=be),W&&Uo(e)}function Ii(e,t,s=tt){z(e)&&(e=Xs(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=ps(o.from||n,o.default,!0):r=ps(o.from||n):r=ps(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function Nn(e,t,s){ot(z(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function zo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(xe(e)){const r=t[e];Y(r)&&Hs(o,r)}else if(Y(e))Hs(o,e.bind(s));else if(ae(e))if(z(e))e.forEach(r=>zo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Hs(o,r,e)}}function Jo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(h=>_s(c,h,i,!0)),_s(c,t,i)),ae(t)&&r.set(t,c),c}function _s(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&_s(e,r,s,!0),o&&o.forEach(i=>_s(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Mi[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Mi={data:Ln,props:Fn,emits:Fn,methods:Kt,computed:Kt,beforeCreate:Oe,created:Oe,beforeMount:Oe,mounted:Oe,beforeUpdate:Oe,updated:Oe,beforeDestroy:Oe,beforeUnmount:Oe,destroyed:Oe,unmounted:Oe,activated:Oe,deactivated:Oe,errorCaptured:Oe,serverPrefetch:Oe,components:Kt,directives:Kt,watch:Ri,provide:Ln,inject:Oi};function Ln(e,t){return t?e?function(){return ke(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Oi(e,t){return Kt(Xs(e),Xs(t))}function Xs(e){if(z(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Oe(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?ke(Object.create(null),e,t):t}function Fn(e,t){return e?z(e)&&z(t)?[...new Set([...e,...t])]:ke(Object.create(null),jn(e),jn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=ke(Object.create(null),e);for(const n in t)s[n]=Oe(e[n],t[n]);return s}function qo(){return{app:null,config:{isNativeTag:uo,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 Di=0;function ji(e,t){return function(n,o=null){Y(n)||(n=ke({},n)),o!=null&&!ae(o)&&(o=null);const r=qo(),i=new WeakSet,a=[];let c=!1;const h=r.app={_uid:Di++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:ml,get config(){return r.config},set config(d){},use(d,...p){return i.has(d)||(d&&Y(d.install)?(i.add(d),d.install(h,...p)):Y(d)&&(i.add(d),d(h,...p))),h},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),h},component(d,p){return p?(r.components[d]=p,h):r.components[d]},directive(d,p){return p?(r.directives[d]=p,h):r.directives[d]},mount(d,p,m){if(!c){const v=h._ceVNode||st(n,o);return v.appContext=r,m===!0?m="svg":m===!1&&(m=void 0),e(v,d,m),c=!0,h._container=d,d.__vue_app__=h,Ds(v.component)}},onUnmount(d){a.push(d)},unmount(){c&&(ot(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(d,p){return r.provides[d]=p,h},runWithContext(d){const p=Ot;Ot=h;try{return d()}finally{Ot=p}}};return h}}let Ot=null;const Ni=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${yt(t)}Modifiers`];function Li(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&Ni(n,t.slice(7));i&&(i.trim&&(o=s.map(d=>xe(d)?d.trim():d)),i.number&&(o=s.map($s)));let a,c=n[a=js(t)]||n[a=js(De(t))];!c&&r&&(c=n[a=js(yt(t))]),c&&ot(c,e,6,o);const h=n[a+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(h,e,6,o)}}const Fi=new WeakMap;function Go(e,t,s=!1){const n=s?Fi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Y(e)){const c=h=>{const d=Go(h,t,!0);d&&(a=!0,ke(i,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ae(e)&&n.set(e,null),null):(z(r)?r.forEach(c=>i[c]=null):ke(i,r),ae(e)&&n.set(e,i),i)}function Os(e,t){return!e||!Ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,yt(t))||re(e,t))}function Vn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:h,renderCache:d,props:p,data:m,setupState:v,ctx:F,inheritAttrs:D}=e,B=ys(e);let E,H;try{if(s.shapeFlag&4){const V=o||n,le=V;E=Xe(h.call(le,V,d,p,v,m,F)),H=a}else{const V=t;E=Xe(V.length>1?V(p,{attrs:a,slots:i,emit:c}):V(p,null)),H=t.props?a:Vi(a)}}catch(V){Zt.length=0,Is(V,e,1),E=st(vt)}let Z=E;if(H&&D!==!1){const V=Object.keys(H),{shapeFlag:le}=Z;V.length&&le&7&&(r&&V.some(Cs)&&(H=Hi(H,r)),Z=Dt(Z,H,!1,!0))}return s.dirs&&(Z=Dt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(s.dirs):s.dirs),s.transition&&vn(Z,s.transition),E=Z,ys(B),E}const Vi=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ss(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const n in e)(!Cs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Hn(n,i,h):!!i;if(c&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const m=d[p];if(Yo(i,n,m)&&!Os(h,m))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Hn(n,i,h):!0:!!i;return!1}function Hn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Yo(t,e,r)&&!Os(s,r))return!0}return!1}function Yo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ae(n)&&ae(o)?!Lt(n,o):n!==o}function Bi({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Zo={},Qo=()=>Object.create(Zo),Xo=e=>Object.getPrototypeOf(e)===Zo;function Ki(e,t,s,n=!1){const o={},r=Qo();e.propsDefaults=Object.create(null),er(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:qr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Wi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=oe(o),[c]=e.propsOptions;let h=!1;if((n||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(Os(e.emitsOptions,m))continue;const v=t[m];if(c)if(re(r,m))v!==r[m]&&(r[m]=v,h=!0);else{const F=De(m);o[F]=en(c,a,F,v,e,!1)}else v!==r[m]&&(r[m]=v,h=!0)}}}else{er(e,t,o,r)&&(h=!0);let d;for(const p in a)(!t||!re(t,p)&&((d=yt(p))===p||!re(t,d)))&&(c?s&&(s[p]!==void 0||s[d]!==void 0)&&(o[p]=en(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!re(t,p))&&(delete r[p],h=!0)}h&&at(e.attrs,"set","")}function er(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Wt(c))continue;const h=t[c];let d;o&&re(o,d=De(c))?!r||!r.includes(d)?s[d]=h:(a||(a={}))[d]=h:Os(e.emitsOptions,c)||(!(c in n)||h!==n[c])&&(n[c]=h,i=!0)}if(r){const c=oe(s),h=a||ue;for(let d=0;d<r.length;d++){const p=r[d];s[p]=en(o,c,p,h[p],e,!re(h,p))}}return i}function en(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=re(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Y(c)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const d=ls(o);n=h[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===yt(s))&&(n=!0))}return n}const zi=new WeakMap;function tr(e,t,s=!1){const n=s?zi:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Y(e)){const d=p=>{c=!0;const[m,v]=tr(p,t,!0);ke(i,m),v&&a.push(...v)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return ae(e)&&n.set(e,Pt),Pt;if(z(r))for(let d=0;d<r.length;d++){const p=De(r[d]);Un(p)&&(i[p]=ue)}else if(r)for(const d in r){const p=De(d);if(Un(p)){const m=r[d],v=i[p]=z(m)||Y(m)?{type:m}:ke({},m),F=v.type;let D=!1,B=!0;if(z(F))for(let E=0;E<F.length;++E){const H=F[E],Z=Y(H)&&H.name;if(Z==="Boolean"){D=!0;break}else Z==="String"&&(B=!1)}else D=Y(F)&&F.name==="Boolean";v[0]=D,v[1]=B,(D||re(v,"default"))&&a.push(p)}}const h=[i,a];return ae(e)&&n.set(e,h),h}function Un(e){return e[0]!=="$"&&!Wt(e)}const bn=e=>e==="_"||e==="_ctx"||e==="$stable",_n=e=>z(e)?e.map(Xe):[Xe(e)],Ji=(e,t,s)=>{if(t._n)return t;const n=li((...o)=>_n(t(...o)),s);return n._c=!1,n},sr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(bn(o))continue;const r=e[o];if(Y(r))t[o]=Ji(o,r,n);else if(r!=null){const i=_n(r);t[o]=()=>i}}},nr=(e,t)=>{const s=_n(t);e.slots.default=()=>s},or=(e,t,s)=>{for(const n in t)(s||!bn(n))&&(e[n]=t[n])},qi=(e,t,s)=>{const n=e.slots=Qo();if(e.vnode.shapeFlag&32){const o=t._;o?(or(n,t,s),s&&mo(n,"_",o,!0)):sr(t,n)}else t&&nr(e,t)},Gi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:or(o,t,s):(r=!t.$stable,sr(t,o)),i=t}else t&&(nr(e,t),i={default:1});if(r)for(const a in o)!bn(a)&&i[a]==null&&delete o[a]},je=el;function Yi(e){return Zi(e)}function Zi(e,t){const s=As();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:h,setElementText:d,parentNode:p,nextSibling:m,setScopeId:v=tt,insertStaticContent:F}=e,D=(u,f,g,T=null,y=null,_=null,O=void 0,I=null,A=!!f.dynamicChildren)=>{if(u===f)return;u&&!Ut(u,f)&&(T=ne(u),x(u,y,_,!0),u=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:w,ref:K,shapeFlag:R}=f;switch(w){case Rs:B(u,f,g,T);break;case vt:E(u,f,g,T);break;case hs:u==null&&H(f,g,T,O);break;case ie:Se(u,f,g,T,y,_,O,I,A);break;default:R&1?le(u,f,g,T,y,_,O,I,A):R&6?be(u,f,g,T,y,_,O,I,A):(R&64||R&128)&&w.process(u,f,g,T,y,_,O,I,A,Ft)}K!=null&&y?qt(K,u&&u.ref,_,f||u,!f):K==null&&u&&u.ref!=null&&qt(u.ref,null,_,u,!0)},B=(u,f,g,T)=>{if(u==null)n(f.el=a(f.children),g,T);else{const y=f.el=u.el;f.children!==u.children&&h(y,f.children)}},E=(u,f,g,T)=>{u==null?n(f.el=c(f.children||""),g,T):f.el=u.el},H=(u,f,g,T)=>{[u.el,u.anchor]=F(u.children,f,g,T,u.el,u.anchor)},Z=({el:u,anchor:f},g,T)=>{let y;for(;u&&u!==f;)y=m(u),n(u,g,T),u=y;n(f,g,T)},V=({el:u,anchor:f})=>{let g;for(;u&&u!==f;)g=m(u),o(u),u=g;o(f)},le=(u,f,g,T,y,_,O,I,A)=>{if(f.type==="svg"?O="svg":f.type==="math"&&(O="mathml"),u==null)de(f,g,T,y,_,O,I,A);else{const w=u.el&&u.el._isVueCE?u.el:null;try{w&&w._beginPatch(),W(u,f,y,_,O,I,A)}finally{w&&w._endPatch()}}},de=(u,f,g,T,y,_,O,I)=>{let A,w;const{props:K,shapeFlag:R,transition:U,dirs:q}=u;if(A=u.el=i(u.type,_,K&&K.is,K),R&8?d(A,u.children):R&16&&N(u.children,A,null,T,y,Bs(u,_),O,I),q&&_t(u,null,T,"created"),J(A,u,u.scopeId,O,T),K){for(const ce in K)ce!=="value"&&!Wt(ce)&&r(A,ce,null,K[ce],_,T);"value"in K&&r(A,"value",null,K.value,_),(w=K.onVnodeBeforeMount)&&Ye(w,T,u)}q&&_t(u,null,T,"beforeMount");const ee=Qi(y,U);ee&&U.beforeEnter(A),n(A,f,g),((w=K&&K.onVnodeMounted)||ee||q)&&je(()=>{try{w&&Ye(w,T,u),ee&&U.enter(A),q&&_t(u,null,T,"mounted")}finally{}},y)},J=(u,f,g,T,y)=>{if(g&&v(u,g),T)for(let _=0;_<T.length;_++)v(u,T[_]);if(y){let _=y.subTree;if(f===_||ar(_.type)&&(_.ssContent===f||_.ssFallback===f)){const O=y.vnode;J(u,O,O.scopeId,O.slotScopeIds,y.parent)}}},N=(u,f,g,T,y,_,O,I,A=0)=>{for(let w=A;w<u.length;w++){const K=u[w]=I?lt(u[w]):Xe(u[w]);D(null,K,f,g,T,y,_,O,I)}},W=(u,f,g,T,y,_,O)=>{const I=f.el=u.el;let{patchFlag:A,dynamicChildren:w,dirs:K}=f;A|=u.patchFlag&16;const R=u.props||ue,U=f.props||ue;let q;if(g&&wt(g,!1),(q=U.onVnodeBeforeUpdate)&&Ye(q,g,f,u),K&&_t(f,u,g,"beforeUpdate"),g&&wt(g,!0),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&d(I,""),w?fe(u.dynamicChildren,w,I,g,T,Bs(f,y),_):O||X(u,f,I,null,g,T,Bs(f,y),_,!1),A>0){if(A&16)te(I,R,U,g,y);else if(A&2&&R.class!==U.class&&r(I,"class",null,U.class,y),A&4&&r(I,"style",R.style,U.style,y),A&8){const ee=f.dynamicProps;for(let ce=0;ce<ee.length;ce++){const pe=ee[ce],ve=R[pe],Te=U[pe];(Te!==ve||pe==="value")&&r(I,pe,ve,Te,y,g)}}A&1&&u.children!==f.children&&d(I,f.children)}else!O&&w==null&&te(I,R,U,g,y);((q=U.onVnodeUpdated)||K)&&je(()=>{q&&Ye(q,g,f,u),K&&_t(f,u,g,"updated")},T)},fe=(u,f,g,T,y,_,O)=>{for(let I=0;I<f.length;I++){const A=u[I],w=f[I],K=A.el&&(A.type===ie||!Ut(A,w)||A.shapeFlag&198)?p(A.el):g;D(A,w,K,null,T,y,_,O,!0)}},te=(u,f,g,T,y)=>{if(f!==g){if(f!==ue)for(const _ in f)!Wt(_)&&!(_ in g)&&r(u,_,f[_],null,y,T);for(const _ in g){if(Wt(_))continue;const O=g[_],I=f[_];O!==I&&_!=="value"&&r(u,_,I,O,y,T)}"value"in g&&r(u,"value",f.value,g.value,y)}},Se=(u,f,g,T,y,_,O,I,A)=>{const w=f.el=u?u.el:a(""),K=f.anchor=u?u.anchor:a("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:q}=f;q&&(I=I?I.concat(q):q),u==null?(n(w,g,T),n(K,g,T),N(f.children||[],g,K,y,_,O,I,A)):R>0&&R&64&&U&&u.dynamicChildren&&u.dynamicChildren.length===U.length?(fe(u.dynamicChildren,U,g,y,_,O,I),(f.key!=null||y&&f===y.subTree)&&rr(u,f,!0)):X(u,f,g,K,y,_,O,I,A)},be=(u,f,g,T,y,_,O,I,A)=>{f.slotScopeIds=I,u==null?f.shapeFlag&512?y.ctx.activate(f,g,T,O,A):Ue(f,g,T,y,_,O,A):$t(u,f,A)},Ue=(u,f,g,T,y,_,O)=>{const I=u.component=ll(u,T,y);if(Bo(u)&&(I.ctx.renderer=Ft),cl(I,!1,O),I.asyncDep){if(y&&y.registerDep(I,ge,O),!u.el){const A=I.subTree=st(vt);E(null,A,f,g),u.placeholder=A.el}}else ge(I,u,f,g,y,_,O)},$t=(u,f,g)=>{const T=f.component=u.component;if(Ui(u,f,g))if(T.asyncDep&&!T.asyncResolved){se(T,f,g);return}else T.next=f,T.update();else f.el=u.el,T.vnode=f},ge=(u,f,g,T,y,_,O)=>{const I=()=>{if(u.isMounted){let{next:R,bu:U,u:q,parent:ee,vnode:ce}=u;{const qe=ir(u);if(qe){R&&(R.el=ce.el,se(u,R,O)),qe.asyncDep.then(()=>{je(()=>{u.isUnmounted||w()},y)});return}}let pe=R,ve;wt(u,!1),R?(R.el=ce.el,se(u,R,O)):R=ce,U&&fs(U),(ve=R.props&&R.props.onVnodeBeforeUpdate)&&Ye(ve,ee,R,ce),wt(u,!0);const Te=Vn(u),Je=u.subTree;u.subTree=Te,D(Je,Te,p(Je.el),ne(Je),u,y,_),R.el=Te.el,pe===null&&Bi(u,Te.el),q&&je(q,y),(ve=R.props&&R.props.onVnodeUpdated)&&je(()=>Ye(ve,ee,R,ce),y)}else{let R;const{el:U,props:q}=f,{bm:ee,m:ce,parent:pe,root:ve,type:Te}=u,Je=Gt(f);wt(u,!1),ee&&fs(ee),!Je&&(R=q&&q.onVnodeBeforeMount)&&Ye(R,pe,f),wt(u,!0);{ve.ce&&ve.ce._hasShadowRoot()&&ve.ce._injectChildStyle(Te,u.parent?u.parent.type:void 0);const qe=u.subTree=Vn(u);D(null,qe,g,T,u,y,_),f.el=qe.el}if(ce&&je(ce,y),!Je&&(R=q&&q.onVnodeMounted)){const qe=f;je(()=>Ye(R,pe,qe),y)}(f.shapeFlag&256||pe&&Gt(pe.vnode)&&pe.vnode.shapeFlag&256)&&u.a&&je(u.a,y),u.isMounted=!0,f=g=T=null}};u.scope.on();const A=u.effect=new yo(I);u.scope.off();const w=u.update=A.run.bind(A),K=u.job=A.runIfDirty.bind(A);K.i=u,K.id=u.uid,A.scheduler=()=>xn(K),wt(u,!0),w()},se=(u,f,g)=>{f.component=u;const T=u.vnode.props;u.vnode=f,u.next=null,Wi(u,f.props,T,g),Gi(u,f.children,g),dt(),Mn(u),ft()},X=(u,f,g,T,y,_,O,I,A=!1)=>{const w=u&&u.children,K=u?u.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:q}=f;if(U>0){if(U&128){L(w,R,g,T,y,_,O,I,A);return}else if(U&256){Me(w,R,g,T,y,_,O,I,A);return}}q&8?(K&16&&$e(w,y,_),R!==w&&d(g,R)):K&16?q&16?L(w,R,g,T,y,_,O,I,A):$e(w,y,_,!0):(K&8&&d(g,""),q&16&&N(R,g,T,y,_,O,I,A))},Me=(u,f,g,T,y,_,O,I,A)=>{u=u||Pt,f=f||Pt;const w=u.length,K=f.length,R=Math.min(w,K);let U;for(U=0;U<R;U++){const q=f[U]=A?lt(f[U]):Xe(f[U]);D(u[U],q,g,null,y,_,O,I,A)}w>K?$e(u,y,_,!0,!1,R):N(f,g,T,y,_,O,I,A,R)},L=(u,f,g,T,y,_,O,I,A)=>{let w=0;const K=f.length;let R=u.length-1,U=K-1;for(;w<=R&&w<=U;){const q=u[w],ee=f[w]=A?lt(f[w]):Xe(f[w]);if(Ut(q,ee))D(q,ee,g,null,y,_,O,I,A);else break;w++}for(;w<=R&&w<=U;){const q=u[R],ee=f[U]=A?lt(f[U]):Xe(f[U]);if(Ut(q,ee))D(q,ee,g,null,y,_,O,I,A);else break;R--,U--}if(w>R){if(w<=U){const q=U+1,ee=q<K?f[q].el:T;for(;w<=U;)D(null,f[w]=A?lt(f[w]):Xe(f[w]),g,ee,y,_,O,I,A),w++}}else if(w>U)for(;w<=R;)x(u[w],y,_,!0),w++;else{const q=w,ee=w,ce=new Map;for(w=ee;w<=U;w++){const Le=f[w]=A?lt(f[w]):Xe(f[w]);Le.key!=null&&ce.set(Le.key,w)}let pe,ve=0;const Te=U-ee+1;let Je=!1,qe=0;const Vt=new Array(Te);for(w=0;w<Te;w++)Vt[w]=0;for(w=q;w<=R;w++){const Le=u[w];if(ve>=Te){x(Le,y,_,!0);continue}let Ge;if(Le.key!=null)Ge=ce.get(Le.key);else for(pe=ee;pe<=U;pe++)if(Vt[pe-ee]===0&&Ut(Le,f[pe])){Ge=pe;break}Ge===void 0?x(Le,y,_,!0):(Vt[Ge-ee]=w+1,Ge>=qe?qe=Ge:Je=!0,D(Le,f[Ge],g,null,y,_,O,I,A),ve++)}const Tn=Je?Xi(Vt):Pt;for(pe=Tn.length-1,w=Te-1;w>=0;w--){const Le=ee+w,Ge=f[Le],kn=f[Le+1],$n=Le+1<K?kn.el||lr(kn):T;Vt[w]===0?D(null,Ge,g,$n,y,_,O,I,A):Je&&(pe<0||w!==Tn[pe]?b(Ge,g,$n,2):pe--)}}},b=(u,f,g,T,y=null)=>{const{el:_,type:O,transition:I,children:A,shapeFlag:w}=u;if(w&6){b(u.component.subTree,f,g,T);return}if(w&128){u.suspense.move(f,g,T);return}if(w&64){O.move(u,f,g,Ft);return}if(O===ie){n(_,f,g);for(let R=0;R<A.length;R++)b(A[R],f,g,T);n(u.anchor,f,g);return}if(O===hs){Z(u,f,g);return}if(T!==2&&w&1&&I)if(T===0)I.beforeEnter(_),n(_,f,g),je(()=>I.enter(_),y);else{const{leave:R,delayLeave:U,afterLeave:q}=I,ee=()=>{u.ctx.isUnmounted?o(_):n(_,f,g)},ce=()=>{_._isLeaving&&_[hi](!0),R(_,()=>{ee(),q&&q()})};U?U(_,ee,ce):ce()}else n(_,f,g)},x=(u,f,g,T=!1,y=!1)=>{const{type:_,props:O,ref:I,children:A,dynamicChildren:w,shapeFlag:K,patchFlag:R,dirs:U,cacheIndex:q,memo:ee}=u;if(R===-2&&(y=!1),I!=null&&(dt(),qt(I,null,g,u,!0),ft()),q!=null&&(f.renderCache[q]=void 0),K&256){f.ctx.deactivate(u);return}const ce=K&1&&U,pe=!Gt(u);let ve;if(pe&&(ve=O&&O.onVnodeBeforeUnmount)&&Ye(ve,f,u),K&6)P(u.component,g,T);else{if(K&128){u.suspense.unmount(g,T);return}ce&&_t(u,null,f,"beforeUnmount"),K&64?u.type.remove(u,f,g,Ft,T):w&&!w.hasOnce&&(_!==ie||R>0&&R&64)?$e(w,f,g,!1,!0):(_===ie&&R&384||!y&&K&16)&&$e(A,f,g),T&&M(u)}const Te=ee!=null&&q==null;(pe&&(ve=O&&O.onVnodeUnmounted)||ce||Te)&&je(()=>{ve&&Ye(ve,f,u),ce&&_t(u,null,f,"unmounted"),Te&&(u.el=null)},g)},M=u=>{const{type:f,el:g,anchor:T,transition:y}=u;if(f===ie){k(g,T);return}if(f===hs){V(u);return}const _=()=>{o(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(u.shapeFlag&1&&y&&!y.persisted){const{leave:O,delayLeave:I}=y,A=()=>O(g,_);I?I(u.el,_,A):A()}else _()},k=(u,f)=>{let g;for(;u!==f;)g=m(u),o(u),u=g;o(f)},P=(u,f,g)=>{const{bum:T,scope:y,job:_,subTree:O,um:I,m:A,a:w}=u;Bn(A),Bn(w),T&&fs(T),y.stop(),_&&(_.flags|=8,x(O,u,f,g)),I&&je(I,f),je(()=>{u.isUnmounted=!0},f)},$e=(u,f,g,T=!1,y=!1,_=0)=>{for(let O=_;O<u.length;O++)x(u[O],f,g,T,y)},ne=u=>{if(u.shapeFlag&6)return ne(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=m(u.anchor||u.el),g=f&&f[fi];return g?m(g):f};let Ae=!1;const Cn=(u,f,g)=>{let T;u==null?f._vnode&&(x(f._vnode,null,null,!0),T=f._vnode.component):D(f._vnode||null,u,f,null,null,null,g),f._vnode=u,Ae||(Ae=!0,Mn(T),No(),Ae=!1)},Ft={p:D,um:x,m:b,r:M,mt:Ue,mc:N,pc:X,pbc:fe,n:ne,o:e};return{render:Cn,hydrate:void 0,createApp:ji(Cn)}}function Bs({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 wt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rr(e,t,s=!1){const n=e.children,o=t.children;if(z(n)&&z(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&rr(i,a)),a.type===Rs&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===vt&&!a.el&&(a.el=i.el)}}function Xi(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<h?r=a+1:i=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function ir(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ir(t)}function Bn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lr(t.subTree):null}const ar=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?z(e)?t.effects.push(...e):t.effects.push(e):ii(e)}const ie=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),hs=Symbol.for("v-stc"),Zt=[];let Ve=null;function S(e=!1){Zt.push(Ve=e?null:[])}function tl(){Zt.pop(),Ve=Zt[Zt.length-1]||null}let ts=1;function Kn(e,t=!1){ts+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function cr(e){return e.dynamicChildren=ts>0?Ve||Pt:null,tl(),ts>0&&Ve&&Ve.push(e),e}function C(e,t,s,n,o,r){return cr(l(e,t,s,n,o,r,!0))}function ur(e,t,s,n,o){return cr(st(e,t,s,n,o,!0))}function dr(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const fr=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Ie(e)||Y(e)?{i:Fe,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fr(t),ref:t&&ms(t),scopeId:Fo,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fe};return a?(wn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=xe(s)?8:16),ts>0&&!i&&Ve&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ve.push(c),c}const st=sl;function sl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===Wo)&&(e=vt),dr(e)){const a=Dt(e,t,!0);return s&&wn(a,s),ts>0&&!r&&Ve&&(a.shapeFlag&6?Ve[Ve.indexOf(e)]=a:Ve.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=nl(t);let{class:a,style:c}=t;a&&!xe(a)&&(t.class=G(a)),ae(c)&&(gn(c)&&!z(c)&&(c=ke({},c)),t.style=Es(c))}const i=xe(e)?1:ar(e)?128:pi(e)?64:ae(e)?4:Y(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function nl(e){return e?gn(e)||Xo(e)?ke({},e):e:null}function Dt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,h=t?ol(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&fr(h),ref:t&&t.ref?s&&r?z(r)?r.concat(ms(t)):[r,ms(t)]:ms(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ie?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&vn(d,c.clone(d)),d}function gt(e=" ",t=0){return st(Rs,null,e,t)}function Be(e,t){const s=st(hs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(S(),ur(vt,null,e)):st(vt,null,e)}function Xe(e){return e==null||typeof e=="boolean"?st(vt):z(e)?st(ie,null,e.slice()):dr(e)?lt(e):st(Rs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(z(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),wn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Xo(t)?t._ctx=Fe:o===3&&Fe&&(Fe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Fe},s=32):(t=String(t),n&64?(s=16,t=[gt(t)]):s=8);e.children=t,e.shapeFlag|=s}function ol(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=Es([t.style,n.style]);else if(Ss(o)){const r=t[o],i=n[o];i&&r!==i&&!(z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Cs(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ye(e,t,s,n=null){ot(e,t,7,[s,n])}const rl=qo();let il=0;function ll(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||rl,r={uid:il++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ar(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tr(n,o),emitsOptions:Go(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Li.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const al=()=>Pe||Fe;let ws,tn;{const e=As(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};ws=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),tn=t("__VUE_SSR_SETTERS__",s=>ss=s)}const ls=e=>{const t=Pe;return ws(e),e.scope.on(),()=>{e.scope.off(),ws(t)}},Wn=()=>{Pe&&Pe.scope.off(),ws(null)};function pr(e){return e.vnode.shapeFlag&4}let ss=!1;function cl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:o}=e.vnode,r=pr(e);Ki(e,n,r,t),qi(e,o,s||t);const i=r?ul(e,t):void 0;return t&&tn(!1),i}function ul(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ei);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?fl(e):null,r=ls(e),i=is(n,e,0,[e.props,o]),a=fo(i);if(ft(),r(),(a||e.sp)&&!Gt(e)&&Uo(e),a){if(i.then(Wn,Wn),t)return i.then(c=>{zn(e,c)}).catch(c=>{Is(c,e,0)});e.asyncDep=i}else zn(e,i)}else hr(e)}function zn(e,t,s){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Oo(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=ls(e);dt();try{Pi(e)}finally{ft(),o()}}}const dl={get(e,t){return Ee(e,"get",""),e[t]}};function fl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,dl),slots:e.slots,emit:e.emit,expose:t}}function Ds(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Oo(Gr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Yt)return Yt[s](e)},has(t,s){return s in t||s in Yt}})):e.proxy}function pl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Y(e)&&"__vccOpts"in e}const Ke=(e,t)=>ti(e,t,ss),ml="3.5.31";/**
|
|
60
|
+
**/function as(e,t,s,n){try{return n?e(...n):e()}catch(o){Os(o,t,s)}}function ot(e,t,s,n){if(Z(e)){const o=as(e,t,s,n);return o&&po(o)&&o.catch(r=>{Os(r,t,s)}),o}if(z(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ot(e[r],t,s,n));return o}}function Os(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ue;if(t){let a=t.parent;const c=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,h)===!1)return}a=a.parent}if(r){dt(),as(r,null,10,[e,c,h]),ft();return}}ri(e,s,o,n,i)}function ri(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Oe=[];let Ze=-1;const Dt=[];let xt=null,It=0;const Ro=Promise.resolve();let bs=null;function jo(e){const t=bs||Ro;return e?t.then(this?e.bind(this):e):t}function ii(e){let t=Ze+1,s=Oe.length;for(;t<s;){const n=t+s>>>1,o=Oe[n],r=ss(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function yn(e){if(!(e.flags&1)){const t=ss(e),s=Oe[Oe.length-1];!s||!(e.flags&2)&&t>=ss(s)?Oe.push(e):Oe.splice(ii(t),0,e),e.flags|=1,No()}}function No(){bs||(bs=Ro.then(Fo))}function li(e){z(e)?Dt.push(...e):xt&&e.id===-1?xt.splice(It+1,0,e):e.flags&1||(Dt.push(e),e.flags|=1),No()}function On(e,t,s=Ze+1){for(;s<Oe.length;s++){const n=Oe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Oe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Lo(e){if(Dt.length){const t=[...new Set(Dt)].sort((s,n)=>ss(s)-ss(n));if(Dt.length=0,xt){xt.push(...t);return}for(xt=t,It=0;It<xt.length;It++){const s=xt[It];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}xt=null,It=0}}const ss=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Fo(e){try{for(Ze=0;Ze<Oe.length;Ze++){const t=Oe[Ze];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),as(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ze<Oe.length;Ze++){const t=Oe[Ze];t&&(t.flags&=-2)}Ze=-1,Oe.length=0,Lo(),bs=null,(Oe.length||Dt.length)&&Fo()}}let Le=null,Vo=null;function _s(e){const t=Le;return Le=e,Vo=e&&e.type.__scopeId||null,t}function ai(e,t=Le,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Wn(-1);const r=_s(t);let i;try{i=e(...o)}finally{_s(r),n._d&&Wn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(Le===null)return e;const s=Ns(Le),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,a,c=ue]=t[o];r&&(Z(r)&&(r={mounted:r,updated:r}),r.deep&&ct(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:a,modifiers:c}))}return e}function St(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];r&&(a.oldValue=r[i].value);let c=a.dir[n];c&&(dt(),ot(c,s,8,[e.el,a,e,t]),ft())}}function ci(e,t){if(Ee){let s=Ee.provides;const n=Ee.parent&&Ee.parent.provides;n===s&&(s=Ee.provides=Object.create(n)),s[e]=t}}function ms(e,t,s=!1){const n=cl();if(n||Rt){let o=Rt?Rt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&Z(t)?t.call(n&&n.proxy):t}}const ui=Symbol.for("v-scx"),di=()=>ms(ui);function Ks(e,t,s){return Ho(e,t,s)}function Ho(e,t,s=ue){const{immediate:n,deep:o,flush:r,once:i}=s,a=$e({},s),c=t&&n||!t&&r!=="post";let h;if(os){if(r==="sync"){const k=di();h=k.__watcherHandles||(k.__watcherHandles=[])}else if(!c){const k=()=>{};return k.stop=tt,k.resume=tt,k.pause=tt,k}}const d=Ee;a.call=(k,V,A)=>ot(k,d,V,A);let p=!1;r==="post"?a.scheduler=k=>{Re(k,d&&d.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(k,V)=>{V?k():yn(k)}),a.augmentJob=k=>{t&&(k.flags|=4),p&&(k.flags|=2,d&&(k.id=d.uid,k.i=d))};const m=oi(e,t,a);return os&&(h?h.push(m):c&&m()),m}function fi(e,t,s){const n=this.proxy,o=me(e)?e.includes(".")?Uo(n,e):()=>n[e]:e.bind(n,n);let r;Z(t)?r=t:(r=t.handler,s=t);const i=cs(this),a=Ho(o,r.bind(n),s);return i(),a}function Uo(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const pi=Symbol("_vte"),hi=e=>e.__isTeleport,mi=Symbol("_leaveCb");function bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bn(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 At(e,t){return Z(e)?$e({name:e.name},t,{setup:e}):e}function Bo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Dn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ws=new WeakMap;function Yt(e,t,s,n,o=!1){if(z(e)){e.forEach((A,H)=>Yt(A,t&&(z(t)?t[H]:t),s,n,o));return}if(Zt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Yt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ns(n.component):n.el,i=o?null:r,{i:a,r:c}=e,h=t&&t.r,d=a.refs===ue?a.refs={}:a.refs,p=a.setupState,m=se(p),k=p===ue?fo:A=>Dn(d,A)?!1:ne(m,A),V=(A,H)=>!(H&&Dn(d,H));if(h!=null&&h!==c){if(Rn(t),me(h))d[h]=null,k(h)&&(p[h]=null);else if(Pe(h)){const A=t;V(h,A.k)&&(h.value=null),A.k&&(d[A.k]=null)}}if(Z(c))as(c,a,12,[i,d]);else{const A=me(c),H=Pe(c);if(A||H){const O=()=>{if(e.f){const L=A?k(c)?p[c]:d[c]:V()||!e.k?c.value:d[e.k];if(o)z(L)&&an(L,r);else if(z(L))L.includes(r)||L.push(r);else if(A)d[c]=[r],k(c)&&(p[c]=d[c]);else{const W=[r];V(c,e.k)&&(c.value=W),e.k&&(d[e.k]=W)}}else A?(d[c]=i,k(c)&&(p[c]=i)):H&&(V(c,e.k)&&(c.value=i),e.k&&(d[e.k]=i))};if(i){const L=()=>{O(),ws.delete(e)};L.id=-1,ws.set(e,L),Re(L,s)}else Rn(e),O()}}}function Rn(e){const t=ws.get(e);t&&(t.flags|=8,ws.delete(e))}Ps().requestIdleCallback;Ps().cancelIdleCallback;const Zt=e=>!!e.type.__asyncLoader,Ko=e=>e.type.__isKeepAlive;function gi(e,t){Wo(e,"a",t)}function xi(e,t){Wo(e,"da",t)}function Wo(e,t,s=Ee){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ds(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Ko(o.parent.vnode)&&vi(n,t,s,o),o=o.parent}}function vi(e,t,s,n){const o=Ds(t,e,n,!0);_n(()=>{an(n[t],o)},s)}function Ds(e,t,s=Ee,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{dt();const a=cs(s),c=ot(t,s,e,i);return a(),ft(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Ee)=>{(!os||e==="sp")&&Ds(e,(...n)=>t(...n),s)},yi=ht("bm"),wt=ht("m"),bi=ht("bu"),_i=ht("u"),wi=ht("bum"),_n=ht("um"),Si=ht("sp"),Ci=ht("rtg"),ki=ht("rtc");function Ti(e,t=Ee){Ds("ec",e,t)}const $i="components",zo=Symbol.for("v-ndc");function Ai(e){return me(e)?Ei($i,e,!1)||e:e||zo}function Ei(e,t,s=!0,n=!1){const o=Le||Ee;if(o){const r=o.type;{const a=hl(r,!1);if(a&&(a===t||a===De(t)||a===As(De(t))))return r}const i=jn(o[e]||r[e],t)||jn(o.appContext[e],t);return!i&&n?r:i}}function jn(e,t){return e&&(e[t]||e[De(t)]||e[As(De(t))])}function be(e,t,s,n){let o;const r=s,i=z(e);if(i||me(e)){const a=i&&$t(e);let c=!1,h=!1;a&&(c=!Ve(e),h=pt(e),e=Ms(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(c?h?jt(We(e[d])):We(e[d]):e[d],d,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(ae(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,h=a.length;c<h;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const en=e=>e?hr(e)?Ns(e):en(e.parent):null,Qt=$e(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=>en(e.parent),$root:e=>en(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>qo(e),$forceUpdate:e=>e.f||(e.f=()=>{yn(e.update)}),$nextTick:e=>e.n||(e.n=jo.bind(e.proxy)),$watch:e=>fi.bind(e)}),Ws=(e,t)=>e!==ue&&!e.__isScriptSetup&&ne(e,t),Pi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Ws(n,t))return i[t]=1,n[t];if(o!==ue&&ne(o,t))return i[t]=2,o[t];if(ne(r,t))return i[t]=3,r[t];if(s!==ue&&ne(s,t))return i[t]=4,s[t];tn&&(i[t]=0)}}const h=Qt[t];let d,p;if(h)return t==="$attrs"&&Ae(e.attrs,"get",""),h(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==ue&&ne(s,t))return i[t]=4,s[t];if(p=c.config.globalProperties,ne(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Ws(o,t)?(o[t]=s,!0):n!==ue&&ne(n,t)?(n[t]=s,!0):ne(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:i}},a){let c;return!!(s[a]||e!==ue&&a[0]!=="$"&&ne(e,a)||Ws(t,a)||ne(r,a)||ne(n,a)||ne(Qt,a)||ne(o.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ne(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Nn(e){return z(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let tn=!0;function Ii(e){const t=qo(e),s=e.proxy,n=e.ctx;tn=!1,t.beforeCreate&&Ln(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:a,provide:c,inject:h,created:d,beforeMount:p,mounted:m,beforeUpdate:k,updated:V,activated:A,deactivated:H,beforeDestroy:O,beforeUnmount:L,destroyed:W,unmounted:F,render:re,renderTracked:we,renderTriggered:J,errorCaptured:M,serverPrefetch:K,expose:de,inheritAttrs:te,components:Se,directives:ke,filters:mt}=t;if(h&&Mi(h,n,null),i)for(const ie in i){const X=i[ie];Z(X)&&(n[ie]=X.bind(s))}if(o){const ie=o.call(s,s);ae(ie)&&(e.data=gn(ie))}if(tn=!0,r)for(const ie in r){const X=r[ie],He=Z(X)?X.bind(s,s):Z(X.get)?X.get.bind(s,s):tt,ze=!Z(X)&&Z(X.set)?X.set.bind(s):tt,Ie=Be({get:He,set:ze});Object.defineProperty(n,ie,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:Ce=>Ie.value=Ce})}if(a)for(const ie in a)Jo(a[ie],n,s,ie);if(c){const ie=Z(c)?c.call(s):c;Reflect.ownKeys(ie).forEach(X=>{ci(X,ie[X])})}d&&Ln(d,e,"c");function ge(ie,X){z(X)?X.forEach(He=>ie(He.bind(s))):X&&ie(X.bind(s))}if(ge(yi,p),ge(wt,m),ge(bi,k),ge(_i,V),ge(gi,A),ge(xi,H),ge(Ti,M),ge(ki,we),ge(Ci,J),ge(wi,L),ge(_n,F),ge(Si,K),z(de))if(de.length){const ie=e.exposed||(e.exposed={});de.forEach(X=>{Object.defineProperty(ie,X,{get:()=>s[X],set:He=>s[X]=He,enumerable:!0})})}else e.exposed||(e.exposed={});re&&e.render===tt&&(e.render=re),te!=null&&(e.inheritAttrs=te),Se&&(e.components=Se),ke&&(e.directives=ke),K&&Bo(e)}function Mi(e,t,s=tt){z(e)&&(e=sn(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=ms(o.from||n,o.default,!0):r=ms(o.from||n):r=ms(o),Pe(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function Ln(e,t,s){ot(z(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Jo(e,t,s,n){let o=n.includes(".")?Uo(s,n):()=>s[n];if(me(e)){const r=t[e];Z(r)&&Ks(o,r)}else if(Z(e))Ks(o,e.bind(s));else if(ae(e))if(z(e))e.forEach(r=>Jo(r,t,s,n));else{const r=Z(e.handler)?e.handler.bind(s):t[e.handler];Z(r)&&Ks(o,r,e)}}function qo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(h=>Ss(c,h,i,!0)),Ss(c,t,i)),ae(t)&&r.set(t,c),c}function Ss(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&Ss(e,r,s,!0),o&&o.forEach(i=>Ss(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const a=Oi[i]||s&&s[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Oi={data:Fn,props:Vn,emits:Vn,methods:Wt,computed:Wt,beforeCreate:Me,created:Me,beforeMount:Me,mounted:Me,beforeUpdate:Me,updated:Me,beforeDestroy:Me,beforeUnmount:Me,destroyed:Me,unmounted:Me,activated:Me,deactivated:Me,errorCaptured:Me,serverPrefetch:Me,components:Wt,directives:Wt,watch:Ri,provide:Fn,inject:Di};function Fn(e,t){return t?e?function(){return $e(Z(e)?e.call(this,this):e,Z(t)?t.call(this,this):t)}:t:e}function Di(e,t){return Wt(sn(e),sn(t))}function sn(e){if(z(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Me(e,t){return e?[...new Set([].concat(e,t))]:t}function Wt(e,t){return e?$e(Object.create(null),e,t):t}function Vn(e,t){return e?z(e)&&z(t)?[...new Set([...e,...t])]:$e(Object.create(null),Nn(e),Nn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=$e(Object.create(null),e);for(const n in t)s[n]=Me(e[n],t[n]);return s}function Go(){return{app:null,config:{isNativeTag:fo,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 ji=0;function Ni(e,t){return function(n,o=null){Z(n)||(n=$e({},n)),o!=null&&!ae(o)&&(o=null);const r=Go(),i=new WeakSet,a=[];let c=!1;const h=r.app={_uid:ji++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:gl,get config(){return r.config},set config(d){},use(d,...p){return i.has(d)||(d&&Z(d.install)?(i.add(d),d.install(h,...p)):Z(d)&&(i.add(d),d(h,...p))),h},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),h},component(d,p){return p?(r.components[d]=p,h):r.components[d]},directive(d,p){return p?(r.directives[d]=p,h):r.directives[d]},mount(d,p,m){if(!c){const k=h._ceVNode||st(n,o);return k.appContext=r,m===!0?m="svg":m===!1&&(m=void 0),e(k,d,m),c=!0,h._container=d,d.__vue_app__=h,Ns(k.component)}},onUnmount(d){a.push(d)},unmount(){c&&(ot(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(d,p){return r.provides[d]=p,h},runWithContext(d){const p=Rt;Rt=h;try{return d()}finally{Rt=p}}};return h}}let Rt=null;const Li=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${De(t)}Modifiers`]||e[`${_t(t)}Modifiers`];function Fi(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ue;let o=s;const r=t.startsWith("update:"),i=r&&Li(n,t.slice(7));i&&(i.trim&&(o=s.map(d=>me(d)?d.trim():d)),i.number&&(o=s.map(Es)));let a,c=n[a=Fs(t)]||n[a=Fs(De(t))];!c&&r&&(c=n[a=Fs(_t(t))]),c&&ot(c,e,6,o);const h=n[a+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ot(h,e,6,o)}}const Vi=new WeakMap;function Yo(e,t,s=!1){const n=s?Vi:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},a=!1;if(!Z(e)){const c=h=>{const d=Yo(h,t,!0);d&&(a=!0,$e(i,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ae(e)&&n.set(e,null),null):(z(r)?r.forEach(c=>i[c]=null):$e(i,r),ae(e)&&n.set(e,i),i)}function Rs(e,t){return!e||!ks(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,_t(t))||ne(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:a,emit:c,render:h,renderCache:d,props:p,data:m,setupState:k,ctx:V,inheritAttrs:A}=e,H=_s(e);let O,L;try{if(s.shapeFlag&4){const F=o||n,re=F;O=Xe(h.call(re,F,d,p,k,m,V)),L=a}else{const F=t;O=Xe(F.length>1?F(p,{attrs:a,slots:i,emit:c}):F(p,null)),L=t.props?a:Hi(a)}}catch(F){Xt.length=0,Os(F,e,1),O=st(bt)}let W=O;if(L&&A!==!1){const F=Object.keys(L),{shapeFlag:re}=W;F.length&&re&7&&(r&&F.some(Ts)&&(L=Ui(L,r)),W=Nt(W,L,!1,!0))}return s.dirs&&(W=Nt(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(s.dirs):s.dirs),s.transition&&bn(W,s.transition),O=W,_s(H),O}const Hi=e=>{let t;for(const s in e)(s==="class"||s==="style"||ks(s))&&((t||(t={}))[s]=e[s]);return t},Ui=(e,t)=>{const s={};for(const n in e)(!Ts(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Bi(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:a,patchFlag:c}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Un(n,i,h):!!i;if(c&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const m=d[p];if(Zo(i,n,m)&&!Rs(h,m))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===i?!1:n?i?Un(n,i,h):!0:!!i;return!1}function Un(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(Zo(t,e,r)&&!Rs(s,r))return!0}return!1}function Zo(e,t,s){const n=e[s],o=t[s];return s==="style"&&ae(n)&&ae(o)?!Vt(n,o):n!==o}function Ki({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Qo={},Xo=()=>Object.create(Qo),er=e=>Object.getPrototypeOf(e)===Qo;function Wi(e,t,s,n=!1){const o={},r=Xo();e.propsDefaults=Object.create(null),tr(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:Gr(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function zi(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,a=se(o),[c]=e.propsOptions;let h=!1;if((n||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(Rs(e.emitsOptions,m))continue;const k=t[m];if(c)if(ne(r,m))k!==r[m]&&(r[m]=k,h=!0);else{const V=De(m);o[V]=nn(c,a,V,k,e,!1)}else k!==r[m]&&(r[m]=k,h=!0)}}}else{tr(e,t,o,r)&&(h=!0);let d;for(const p in a)(!t||!ne(t,p)&&((d=_t(p))===p||!ne(t,d)))&&(c?s&&(s[p]!==void 0||s[d]!==void 0)&&(o[p]=nn(c,a,p,void 0,e,!0)):delete o[p]);if(r!==a)for(const p in r)(!t||!ne(t,p))&&(delete r[p],h=!0)}h&&at(e.attrs,"set","")}function tr(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Jt(c))continue;const h=t[c];let d;o&&ne(o,d=De(c))?!r||!r.includes(d)?s[d]=h:(a||(a={}))[d]=h:Rs(e.emitsOptions,c)||(!(c in n)||h!==n[c])&&(n[c]=h,i=!0)}if(r){const c=se(s),h=a||ue;for(let d=0;d<r.length;d++){const p=r[d];s[p]=nn(o,c,p,h[p],e,!ne(h,p))}}return i}function nn(e,t,s,n,o,r){const i=e[s];if(i!=null){const a=ne(i,"default");if(a&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&Z(c)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const d=cs(o);n=h[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!a?n=!1:i[1]&&(n===""||n===_t(s))&&(n=!0))}return n}const Ji=new WeakMap;function sr(e,t,s=!1){const n=s?Ji:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},a=[];let c=!1;if(!Z(e)){const d=p=>{c=!0;const[m,k]=sr(p,t,!0);$e(i,m),k&&a.push(...k)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return ae(e)&&n.set(e,Mt),Mt;if(z(r))for(let d=0;d<r.length;d++){const p=De(r[d]);Bn(p)&&(i[p]=ue)}else if(r)for(const d in r){const p=De(d);if(Bn(p)){const m=r[d],k=i[p]=z(m)||Z(m)?{type:m}:$e({},m),V=k.type;let A=!1,H=!0;if(z(V))for(let O=0;O<V.length;++O){const L=V[O],W=Z(L)&&L.name;if(W==="Boolean"){A=!0;break}else W==="String"&&(H=!1)}else A=Z(V)&&V.name==="Boolean";k[0]=A,k[1]=H,(A||ne(k,"default"))&&a.push(p)}}const h=[i,a];return ae(e)&&n.set(e,h),h}function Bn(e){return e[0]!=="$"&&!Jt(e)}const wn=e=>e==="_"||e==="_ctx"||e==="$stable",Sn=e=>z(e)?e.map(Xe):[Xe(e)],qi=(e,t,s)=>{if(t._n)return t;const n=ai((...o)=>Sn(t(...o)),s);return n._c=!1,n},nr=(e,t,s)=>{const n=e._ctx;for(const o in e){if(wn(o))continue;const r=e[o];if(Z(r))t[o]=qi(o,r,n);else if(r!=null){const i=Sn(r);t[o]=()=>i}}},or=(e,t)=>{const s=Sn(t);e.slots.default=()=>s},rr=(e,t,s)=>{for(const n in t)(s||!wn(n))&&(e[n]=t[n])},Gi=(e,t,s)=>{const n=e.slots=Xo();if(e.vnode.shapeFlag&32){const o=t._;o?(rr(n,t,s),s&&go(n,"_",o,!0)):nr(t,n)}else t&&or(e,t)},Yi=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=ue;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:rr(o,t,s):(r=!t.$stable,nr(t,o)),i=t}else t&&(or(e,t),i={default:1});if(r)for(const a in o)!wn(a)&&i[a]==null&&delete o[a]},Re=tl;function Zi(e){return Qi(e)}function Qi(e,t){const s=Ps();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:a,createComment:c,setText:h,setElementText:d,parentNode:p,nextSibling:m,setScopeId:k=tt,insertStaticContent:V}=e,A=(u,f,v,T=null,b=null,w=null,D=void 0,I=null,E=!!f.dynamicChildren)=>{if(u===f)return;u&&!Bt(u,f)&&(T=q(u),Ce(u,b,w,!0),u=null),f.patchFlag===-2&&(E=!1,f.dynamicChildren=null);const{type:S,ref:B,shapeFlag:R}=f;switch(S){case js:H(u,f,v,T);break;case bt:O(u,f,v,T);break;case gs:u==null&&L(f,v,T,D);break;case oe:Se(u,f,v,T,b,w,D,I,E);break;default:R&1?re(u,f,v,T,b,w,D,I,E):R&6?ke(u,f,v,T,b,w,D,I,E):(R&64||R&128)&&S.process(u,f,v,T,b,w,D,I,E,gt)}B!=null&&b?Yt(B,u&&u.ref,w,f||u,!f):B==null&&u&&u.ref!=null&&Yt(u.ref,null,w,u,!0)},H=(u,f,v,T)=>{if(u==null)n(f.el=a(f.children),v,T);else{const b=f.el=u.el;f.children!==u.children&&h(b,f.children)}},O=(u,f,v,T)=>{u==null?n(f.el=c(f.children||""),v,T):f.el=u.el},L=(u,f,v,T)=>{[u.el,u.anchor]=V(u.children,f,v,T,u.el,u.anchor)},W=({el:u,anchor:f},v,T)=>{let b;for(;u&&u!==f;)b=m(u),n(u,v,T),u=b;n(f,v,T)},F=({el:u,anchor:f})=>{let v;for(;u&&u!==f;)v=m(u),o(u),u=v;o(f)},re=(u,f,v,T,b,w,D,I,E)=>{if(f.type==="svg"?D="svg":f.type==="math"&&(D="mathml"),u==null)we(f,v,T,b,w,D,I,E);else{const S=u.el&&u.el._isVueCE?u.el:null;try{S&&S._beginPatch(),K(u,f,b,w,D,I,E)}finally{S&&S._endPatch()}}},we=(u,f,v,T,b,w,D,I)=>{let E,S;const{props:B,shapeFlag:R,transition:U,dirs:G}=u;if(E=u.el=i(u.type,w,B&&B.is,B),R&8?d(E,u.children):R&16&&M(u.children,E,null,T,b,zs(u,w),D,I),G&&St(u,null,T,"created"),J(E,u,u.scopeId,D,T),B){for(const ce in B)ce!=="value"&&!Jt(ce)&&r(E,ce,null,B[ce],w,T);"value"in B&&r(E,"value",null,B.value,w),(S=B.onVnodeBeforeMount)&&Ye(S,T,u)}G&&St(u,null,T,"beforeMount");const ee=Xi(b,U);ee&&U.beforeEnter(E),n(E,f,v),((S=B&&B.onVnodeMounted)||ee||G)&&Re(()=>{try{S&&Ye(S,T,u),ee&&U.enter(E),G&&St(u,null,T,"mounted")}finally{}},b)},J=(u,f,v,T,b)=>{if(v&&k(u,v),T)for(let w=0;w<T.length;w++)k(u,T[w]);if(b){let w=b.subTree;if(f===w||cr(w.type)&&(w.ssContent===f||w.ssFallback===f)){const D=b.vnode;J(u,D,D.scopeId,D.slotScopeIds,b.parent)}}},M=(u,f,v,T,b,w,D,I,E=0)=>{for(let S=E;S<u.length;S++){const B=u[S]=I?lt(u[S]):Xe(u[S]);A(null,B,f,v,T,b,w,D,I)}},K=(u,f,v,T,b,w,D)=>{const I=f.el=u.el;let{patchFlag:E,dynamicChildren:S,dirs:B}=f;E|=u.patchFlag&16;const R=u.props||ue,U=f.props||ue;let G;if(v&&Ct(v,!1),(G=U.onVnodeBeforeUpdate)&&Ye(G,v,f,u),B&&St(f,u,v,"beforeUpdate"),v&&Ct(v,!0),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&d(I,""),S?de(u.dynamicChildren,S,I,v,T,zs(f,b),w):D||X(u,f,I,null,v,T,zs(f,b),w,!1),E>0){if(E&16)te(I,R,U,v,b);else if(E&2&&R.class!==U.class&&r(I,"class",null,U.class,b),E&4&&r(I,"style",R.style,U.style,b),E&8){const ee=f.dynamicProps;for(let ce=0;ce<ee.length;ce++){const fe=ee[ce],xe=R[fe],Te=U[fe];(Te!==xe||fe==="value")&&r(I,fe,xe,Te,b,v)}}E&1&&u.children!==f.children&&d(I,f.children)}else!D&&S==null&&te(I,R,U,v,b);((G=U.onVnodeUpdated)||B)&&Re(()=>{G&&Ye(G,v,f,u),B&&St(f,u,v,"updated")},T)},de=(u,f,v,T,b,w,D)=>{for(let I=0;I<f.length;I++){const E=u[I],S=f[I],B=E.el&&(E.type===oe||!Bt(E,S)||E.shapeFlag&198)?p(E.el):v;A(E,S,B,null,T,b,w,D,!0)}},te=(u,f,v,T,b)=>{if(f!==v){if(f!==ue)for(const w in f)!Jt(w)&&!(w in v)&&r(u,w,f[w],null,b,T);for(const w in v){if(Jt(w))continue;const D=v[w],I=f[w];D!==I&&w!=="value"&&r(u,w,I,D,b,T)}"value"in v&&r(u,"value",f.value,v.value,b)}},Se=(u,f,v,T,b,w,D,I,E)=>{const S=f.el=u?u.el:a(""),B=f.anchor=u?u.anchor:a("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:G}=f;G&&(I=I?I.concat(G):G),u==null?(n(S,v,T),n(B,v,T),M(f.children||[],v,B,b,w,D,I,E)):R>0&&R&64&&U&&u.dynamicChildren&&u.dynamicChildren.length===U.length?(de(u.dynamicChildren,U,v,b,w,D,I),(f.key!=null||b&&f===b.subTree)&&ir(u,f,!0)):X(u,f,v,B,b,w,D,I,E)},ke=(u,f,v,T,b,w,D,I,E)=>{f.slotScopeIds=I,u==null?f.shapeFlag&512?b.ctx.activate(f,v,T,D,E):mt(f,v,T,b,w,D,E):Et(u,f,E)},mt=(u,f,v,T,b,w,D)=>{const I=u.component=al(u,T,b);if(Ko(u)&&(I.ctx.renderer=gt),ul(I,!1,D),I.asyncDep){if(b&&b.registerDep(I,ge,D),!u.el){const E=I.subTree=st(bt);O(null,E,f,v),u.placeholder=E.el}}else ge(I,u,f,v,b,w,D)},Et=(u,f,v)=>{const T=f.component=u.component;if(Bi(u,f,v))if(T.asyncDep&&!T.asyncResolved){ie(T,f,v);return}else T.next=f,T.update();else f.el=u.el,T.vnode=f},ge=(u,f,v,T,b,w,D)=>{const I=()=>{if(u.isMounted){let{next:R,bu:U,u:G,parent:ee,vnode:ce}=u;{const qe=lr(u);if(qe){R&&(R.el=ce.el,ie(u,R,D)),qe.asyncDep.then(()=>{Re(()=>{u.isUnmounted||S()},b)});return}}let fe=R,xe;Ct(u,!1),R?(R.el=ce.el,ie(u,R,D)):R=ce,U&&hs(U),(xe=R.props&&R.props.onVnodeBeforeUpdate)&&Ye(xe,ee,R,ce),Ct(u,!0);const Te=Hn(u),Je=u.subTree;u.subTree=Te,A(Je,Te,p(Je.el),q(Je),u,b,w),R.el=Te.el,fe===null&&Ki(u,Te.el),G&&Re(G,b),(xe=R.props&&R.props.onVnodeUpdated)&&Re(()=>Ye(xe,ee,R,ce),b)}else{let R;const{el:U,props:G}=f,{bm:ee,m:ce,parent:fe,root:xe,type:Te}=u,Je=Zt(f);Ct(u,!1),ee&&hs(ee),!Je&&(R=G&&G.onVnodeBeforeMount)&&Ye(R,fe,f),Ct(u,!0);{xe.ce&&xe.ce._hasShadowRoot()&&xe.ce._injectChildStyle(Te,u.parent?u.parent.type:void 0);const qe=u.subTree=Hn(u);A(null,qe,v,T,u,b,w),f.el=qe.el}if(ce&&Re(ce,b),!Je&&(R=G&&G.onVnodeMounted)){const qe=f;Re(()=>Ye(R,fe,qe),b)}(f.shapeFlag&256||fe&&Zt(fe.vnode)&&fe.vnode.shapeFlag&256)&&u.a&&Re(u.a,b),u.isMounted=!0,f=v=T=null}};u.scope.on();const E=u.effect=new bo(I);u.scope.off();const S=u.update=E.run.bind(E),B=u.job=E.runIfDirty.bind(E);B.i=u,B.id=u.uid,E.scheduler=()=>yn(B),Ct(u,!0),S()},ie=(u,f,v)=>{f.component=u;const T=u.vnode.props;u.vnode=f,u.next=null,zi(u,f.props,T,v),Yi(u,f.children,v),dt(),On(u),ft()},X=(u,f,v,T,b,w,D,I,E=!1)=>{const S=u&&u.children,B=u?u.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:G}=f;if(U>0){if(U&128){ze(S,R,v,T,b,w,D,I,E);return}else if(U&256){He(S,R,v,T,b,w,D,I,E);return}}G&8?(B&16&&x(S,b,w),R!==S&&d(v,R)):B&16?G&16?ze(S,R,v,T,b,w,D,I,E):x(S,b,w,!0):(B&8&&d(v,""),G&16&&M(R,v,T,b,w,D,I,E))},He=(u,f,v,T,b,w,D,I,E)=>{u=u||Mt,f=f||Mt;const S=u.length,B=f.length,R=Math.min(S,B);let U;for(U=0;U<R;U++){const G=f[U]=E?lt(f[U]):Xe(f[U]);A(u[U],G,v,null,b,w,D,I,E)}S>B?x(u,b,w,!0,!1,R):M(f,v,T,b,w,D,I,E,R)},ze=(u,f,v,T,b,w,D,I,E)=>{let S=0;const B=f.length;let R=u.length-1,U=B-1;for(;S<=R&&S<=U;){const G=u[S],ee=f[S]=E?lt(f[S]):Xe(f[S]);if(Bt(G,ee))A(G,ee,v,null,b,w,D,I,E);else break;S++}for(;S<=R&&S<=U;){const G=u[R],ee=f[U]=E?lt(f[U]):Xe(f[U]);if(Bt(G,ee))A(G,ee,v,null,b,w,D,I,E);else break;R--,U--}if(S>R){if(S<=U){const G=U+1,ee=G<B?f[G].el:T;for(;S<=U;)A(null,f[S]=E?lt(f[S]):Xe(f[S]),v,ee,b,w,D,I,E),S++}}else if(S>U)for(;S<=R;)Ce(u[S],b,w,!0),S++;else{const G=S,ee=S,ce=new Map;for(S=ee;S<=U;S++){const Ne=f[S]=E?lt(f[S]):Xe(f[S]);Ne.key!=null&&ce.set(Ne.key,S)}let fe,xe=0;const Te=U-ee+1;let Je=!1,qe=0;const Ht=new Array(Te);for(S=0;S<Te;S++)Ht[S]=0;for(S=G;S<=R;S++){const Ne=u[S];if(xe>=Te){Ce(Ne,b,w,!0);continue}let Ge;if(Ne.key!=null)Ge=ce.get(Ne.key);else for(fe=ee;fe<=U;fe++)if(Ht[fe-ee]===0&&Bt(Ne,f[fe])){Ge=fe;break}Ge===void 0?Ce(Ne,b,w,!0):(Ht[Ge-ee]=S+1,Ge>=qe?qe=Ge:Je=!0,A(Ne,f[Ge],v,null,b,w,D,I,E),xe++)}const Tn=Je?el(Ht):Mt;for(fe=Tn.length-1,S=Te-1;S>=0;S--){const Ne=ee+S,Ge=f[Ne],$n=f[Ne+1],An=Ne+1<B?$n.el||ar($n):T;Ht[S]===0?A(null,Ge,v,An,b,w,D,I,E):Je&&(fe<0||S!==Tn[fe]?Ie(Ge,v,An,2):fe--)}}},Ie=(u,f,v,T,b=null)=>{const{el:w,type:D,transition:I,children:E,shapeFlag:S}=u;if(S&6){Ie(u.component.subTree,f,v,T);return}if(S&128){u.suspense.move(f,v,T);return}if(S&64){D.move(u,f,v,gt);return}if(D===oe){n(w,f,v);for(let R=0;R<E.length;R++)Ie(E[R],f,v,T);n(u.anchor,f,v);return}if(D===gs){W(u,f,v);return}if(T!==2&&S&1&&I)if(T===0)I.beforeEnter(w),n(w,f,v),Re(()=>I.enter(w),b);else{const{leave:R,delayLeave:U,afterLeave:G}=I,ee=()=>{u.ctx.isUnmounted?o(w):n(w,f,v)},ce=()=>{w._isLeaving&&w[mi](!0),R(w,()=>{ee(),G&&G()})};U?U(w,ee,ce):ce()}else n(w,f,v)},Ce=(u,f,v,T=!1,b=!1)=>{const{type:w,props:D,ref:I,children:E,dynamicChildren:S,shapeFlag:B,patchFlag:R,dirs:U,cacheIndex:G,memo:ee}=u;if(R===-2&&(b=!1),I!=null&&(dt(),Yt(I,null,v,u,!0),ft()),G!=null&&(f.renderCache[G]=void 0),B&256){f.ctx.deactivate(u);return}const ce=B&1&&U,fe=!Zt(u);let xe;if(fe&&(xe=D&&D.onVnodeBeforeUnmount)&&Ye(xe,f,u),B&6)y(u.component,v,T);else{if(B&128){u.suspense.unmount(v,T);return}ce&&St(u,null,f,"beforeUnmount"),B&64?u.type.remove(u,f,v,gt,T):S&&!S.hasOnce&&(w!==oe||R>0&&R&64)?x(S,f,v,!1,!0):(w===oe&&R&384||!b&&B&16)&&x(E,f,v),T&&N(u)}const Te=ee!=null&&G==null;(fe&&(xe=D&&D.onVnodeUnmounted)||ce||Te)&&Re(()=>{xe&&Ye(xe,f,u),ce&&St(u,null,f,"unmounted"),Te&&(u.el=null)},v)},N=u=>{const{type:f,el:v,anchor:T,transition:b}=u;if(f===oe){g(v,T);return}if(f===gs){F(u);return}const w=()=>{o(v),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(u.shapeFlag&1&&b&&!b.persisted){const{leave:D,delayLeave:I}=b,E=()=>D(v,w);I?I(u.el,w,E):E()}else w()},g=(u,f)=>{let v;for(;u!==f;)v=m(u),o(u),u=v;o(f)},y=(u,f,v)=>{const{bum:T,scope:b,job:w,subTree:D,um:I,m:E,a:S}=u;Kn(E),Kn(S),T&&hs(T),b.stop(),w&&(w.flags|=8,Ce(D,u,f,v)),I&&Re(I,f),Re(()=>{u.isUnmounted=!0},f)},x=(u,f,v,T=!1,b=!1,w=0)=>{for(let D=w;D<u.length;D++)Ce(u[D],f,v,T,b)},q=u=>{if(u.shapeFlag&6)return q(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=m(u.anchor||u.el),v=f&&f[pi];return v?m(v):f};let ye=!1;const P=(u,f,v)=>{let T;u==null?f._vnode&&(Ce(f._vnode,null,null,!0),T=f._vnode.component):A(f._vnode||null,u,f,null,null,null,v),f._vnode=u,ye||(ye=!0,On(T),Lo(),ye=!1)},gt={p:A,um:Ce,m:Ie,r:N,mt,mc:M,pc:X,pbc:de,n:q,o:e};return{render:P,hydrate:void 0,createApp:Ni(P)}}function zs({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 Ct({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ir(e,t,s=!1){const n=e.children,o=t.children;if(z(n)&&z(o))for(let r=0;r<n.length;r++){const i=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=lt(o[r]),a.el=i.el),!s&&a.patchFlag!==-2&&ir(i,a)),a.type===js&&(a.patchFlag===-1&&(a=o[r]=lt(a)),a.el=i.el),a.type===bt&&!a.el&&(a.el=i.el)}}function el(e){const t=e.slice(),s=[0];let n,o,r,i,a;const c=e.length;for(n=0;n<c;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)a=r+i>>1,e[s[a]]<h?r=a+1:i=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function lr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:lr(t)}function Kn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ar(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ar(t.subTree):null}const cr=e=>e.__isSuspense;function tl(e,t){t&&t.pendingBranch?z(e)?t.effects.push(...e):t.effects.push(e):li(e)}const oe=Symbol.for("v-fgt"),js=Symbol.for("v-txt"),bt=Symbol.for("v-cmt"),gs=Symbol.for("v-stc"),Xt=[];let Fe=null;function _(e=!1){Xt.push(Fe=e?null:[])}function sl(){Xt.pop(),Fe=Xt[Xt.length-1]||null}let ns=1;function Wn(e,t=!1){ns+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function ur(e){return e.dynamicChildren=ns>0?Fe||Mt:null,sl(),ns>0&&Fe&&Fe.push(e),e}function C(e,t,s,n,o,r){return ur(l(e,t,s,n,o,r,!0))}function dr(e,t,s,n,o){return ur(st(e,t,s,n,o,!0))}function fr(e){return e?e.__v_isVNode===!0:!1}function Bt(e,t){return e.type===t.type&&e.key===t.key}const pr=({key:e})=>e??null,xs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?me(e)||Pe(e)||Z(e)?{i:Le,r:e,k:t,f:!!s}:e:null);function l(e,t=null,s=null,n=0,o=null,r=e===oe?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pr(t),ref:t&&xs(t),scopeId:Vo,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Le};return a?(Cn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=me(s)?8:16),ns>0&&!i&&Fe&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Fe.push(c),c}const st=nl;function nl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===zo)&&(e=bt),fr(e)){const a=Nt(e,t,!0);return s&&Cn(a,s),ns>0&&!r&&Fe&&(a.shapeFlag&6?Fe[Fe.indexOf(e)]=a:Fe.push(a)),a.patchFlag=-2,a}if(ml(e)&&(e=e.__vccOpts),t){t=ol(t);let{class:a,style:c}=t;a&&!me(a)&&(t.class=Y(a)),ae(c)&&(vn(c)&&!z(c)&&(c=$e({},c)),t.style=Is(c))}const i=me(e)?1:cr(e)?128:hi(e)?64:ae(e)?4:Z(e)?2:0;return l(e,t,s,n,o,i,r,!0)}function ol(e){return e?vn(e)||er(e)?$e({},e):e:null}function Nt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:a,transition:c}=e,h=t?rl(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&pr(h),ref:t&&t.ref?s&&r?z(r)?r.concat(xs(t)):[r,xs(t)]:xs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==oe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Nt(e.ssContent),ssFallback:e.ssFallback&&Nt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&bn(d,c.clone(d)),d}function vt(e=" ",t=0){return st(js,null,e,t)}function Ue(e,t){const s=st(gs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(_(),dr(bt,null,e)):st(bt,null,e)}function Xe(e){return e==null||typeof e=="boolean"?st(bt):z(e)?st(oe,null,e.slice()):fr(e)?lt(e):st(js,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Nt(e)}function Cn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(z(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Cn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!er(t)?t._ctx=Le:o===3&&Le&&(Le.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Z(t)?(t={default:t,_ctx:Le},s=32):(t=String(t),n&64?(s=16,t=[vt(t)]):s=8);e.children=t,e.shapeFlag|=s}function rl(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=Y([t.class,n.class]));else if(o==="style")t.style=Is([t.style,n.style]);else if(ks(o)){const r=t[o],i=n[o];i&&r!==i&&!(z(r)&&r.includes(i))?t[o]=r?[].concat(r,i):i:i==null&&r==null&&!Ts(o)&&(t[o]=i)}else o!==""&&(t[o]=n[o])}return t}function Ye(e,t,s,n=null){ot(e,t,7,[s,n])}const il=Go();let ll=0;function al(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||il,r={uid:ll++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Er(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:sr(n,o),emitsOptions:Yo(n,o),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:n.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Fi.bind(null,r),e.ce&&e.ce(r),r}let Ee=null;const cl=()=>Ee||Le;let Cs,on;{const e=Ps(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};Cs=t("__VUE_INSTANCE_SETTERS__",s=>Ee=s),on=t("__VUE_SSR_SETTERS__",s=>os=s)}const cs=e=>{const t=Ee;return Cs(e),e.scope.on(),()=>{e.scope.off(),Cs(t)}},zn=()=>{Ee&&Ee.scope.off(),Cs(null)};function hr(e){return e.vnode.shapeFlag&4}let os=!1;function ul(e,t=!1,s=!1){t&&on(t);const{props:n,children:o}=e.vnode,r=hr(e);Wi(e,n,r,t),Gi(e,o,s||t);const i=r?dl(e,t):void 0;return t&&on(!1),i}function dl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pi);const{setup:n}=s;if(n){dt();const o=e.setupContext=n.length>1?pl(e):null,r=cs(e),i=as(n,e,0,[e.props,o]),a=po(i);if(ft(),r(),(a||e.sp)&&!Zt(e)&&Bo(e),a){if(i.then(zn,zn),t)return i.then(c=>{Jn(e,c)}).catch(c=>{Os(c,e,0)});e.asyncDep=i}else Jn(e,i)}else mr(e)}function Jn(e,t,s){Z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Do(t)),mr(e)}function mr(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=cs(e);dt();try{Ii(e)}finally{ft(),o()}}}const fl={get(e,t){return Ae(e,"get",""),e[t]}};function pl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,fl),slots:e.slots,emit:e.emit,expose:t}}function Ns(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Do(Yr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Qt)return Qt[s](e)},has(t,s){return s in t||s in Qt}})):e.proxy}function hl(e,t=!0){return Z(e)?e.displayName||e.name:e.name||t&&e.__name}function ml(e){return Z(e)&&"__vccOpts"in e}const Be=(e,t)=>si(e,t,os),gl="3.5.31";/**
|
|
61
61
|
* @vue/runtime-dom v3.5.31
|
|
62
62
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
63
63
|
* @license MIT
|
|
64
|
-
**/let sn;const Jn=typeof window<"u"&&window.trustedTypes;if(Jn)try{sn=Jn.createPolicy("vue",{createHTML:e=>e})}catch{}const mr=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",xl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,qn=it&&it.createElement("template"),vl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?it.createElementNS(gl,e):t==="mathml"?it.createElementNS(xl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{qn.innerHTML=mr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=qn.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},yl=Symbol("_vtc");function bl(e,t,s){const n=e[yl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gn=Symbol("_vod"),_l=Symbol("_vsh"),wl=Symbol(""),Sl=/(?:^|;)\s*display\s*:/;function Cl(e,t,s){const n=e.style,o=xe(s);let r=!1;if(s&&!o){if(t)if(xe(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&gs(n,a,"")}else for(const i in t)s[i]==null&&gs(n,i,"");for(const i in s)i==="display"&&(r=!0),gs(n,i,s[i])}else if(o){if(t!==s){const i=n[wl];i&&(s+=";"+i),n.cssText=s,r=Sl.test(s)}}else t&&e.removeAttribute("style");Gn in e&&(e[Gn]=r?n.display:"",e[_l]&&(n.display="none"))}const Yn=/\s*!important$/;function gs(e,t,s){if(z(s))s.forEach(n=>gs(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(yt(n),s.replace(Yn,""),"important"):e[n]=s}}const Zn=["Webkit","Moz","ms"],Ks={};function Tl(e,t){const s=Ks[t];if(s)return s;let n=De(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=ks(n);for(let o=0;o<Zn.length;o++){const r=Zn[o]+n;if(r in e)return Ks[t]=r}return t}const Qn="http://www.w3.org/1999/xlink";function Xn(e,t,s,n,o,r=kr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qn,t.slice(6,t.length)):e.setAttributeNS(Qn,t,s):s==null||r&&!go(s)?e.removeAttribute(t):e.setAttribute(t,r?"":nt(s)?String(s):s)}function eo(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?mr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=go(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function xt(e,t,s,n){e.addEventListener(t,s,n)}function kl(e,t,s,n){e.removeEventListener(t,s,n)}const to=Symbol("_vei");function $l(e,t,s,n,o=null){const r=e[to]||(e[to]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=Al(t);if(n){const h=r[t]=Il(n,o);xt(e,a,h,c)}else i&&(kl(e,a,i,c),r[t]=void 0)}}const so=/(?:Once|Passive|Capture)$/;function Al(e){let t;if(so.test(e)){t={};let n;for(;n=e.match(so);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):yt(e.slice(2)),t]}let Ws=0;const El=Promise.resolve(),Pl=()=>Ws||(El.then(()=>Ws=0),Ws=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ot(Ml(n,s.value),t,5,[n])};return s.value=e,s.attached=Pl(),s}function Ml(e,t){if(z(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ol=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?bl(e,n,i):t==="style"?Cl(e,s,n):Ss(t)?Cs(t)||$l(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,i))?(eo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xn(e,t,n,i,r,t!=="value")):e._isVueCE&&(Dl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!xe(n)))?eo(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Xn(e,t,n,i))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&no(t)&&Y(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return no(t)&&xe(s)?!1:t in e}function Dl(e,t){const s=e._def.props;if(!s)return!1;const n=De(t);return Array.isArray(s)?s.some(o=>De(o)===n):Object.keys(s).some(o=>De(o)===n)}const jt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return z(t)?s=>fs(t,s):t};function jl(e){e.target.composing=!0}function oo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function ro(e,t,s){return t&&(e=e.trim()),s&&(e=$s(e)),e}const we={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=jt(o);const r=n||o.props&&o.props.type==="number";xt(e,t?"change":"input",i=>{i.target.composing||e[ut](ro(e.value,s,r))}),(s||r)&&xt(e,"change",()=>{e.value=ro(e.value,s,r)}),t||(xt(e,"compositionstart",jl),xt(e,"compositionend",oo),xt(e,"change",oo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=jt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?$s(e.value):e.value,c=t??"";if(a===c)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},io={deep:!0,created(e,t,s){e[ut]=jt(s),xt(e,"change",()=>{const n=e._modelValue,o=os(e),r=e.checked,i=e[ut];if(z(n)){const a=an(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const h=[...n];h.splice(a,1),i(h)}}else if(Nt(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(gr(e,r))})},mounted:lo,beforeUpdate(e,t,s){e[ut]=jt(s),lo(e,t,s)}};function lo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(z(t))o=an(t,n.props.value)>-1;else if(Nt(t))o=t.has(n.props.value);else{if(t===s)return;o=Lt(t,gr(e,!0))}e.checked!==o&&(e.checked=o)}const ns={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Nt(t);xt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?$s(os(i)):os(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Do(()=>{e._assigning=!1})}),e[ut]=jt(n)},mounted(e,{value:t}){ao(e,t)},beforeUpdate(e,t,s){e[ut]=jt(s)},updated(e,{value:t}){e._assigning||ao(e,t)}};function ao(e,t){const s=e.multiple,n=z(t);if(!(s&&!n&&!Nt(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=os(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(h=>String(h)===String(a)):i.selected=an(t,a)>-1}else i.selected=t.has(a);else if(Lt(os(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return"_value"in e?e._value:e.value}function gr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Nl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},nn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=yt(o.key);if(t.some(i=>i===r||Nl[i]===r))return e(o)}))},Ll=ke({patchProp:Ol},vl);let co;function Fl(){return co||(co=Yi(Ll))}const Vl=((...e)=>{const t=Fl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ul(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Hl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Hl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ul(e){return xe(e)?document.querySelector(e):e}let Sn="";function Bt(e){Sn=e}function Ce(){return Sn}async function ye(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Sn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Bl={class:"animate-fade-in"},Kl={key:0,class:"text-center py-12 text-textSecondary"},Wl={key:1,class:"text-center text-textSecondary py-12"},zl={key:2,class:"space-y-3"},Jl={class:"flex items-center justify-between"},ql={class:"flex items-center gap-3"},Gl={class:"font-medium"},Yl={class:"text-accentLight"},Zl={class:"text-textSecondary text-xs"},Ql={key:2,class:"text-muted italic"},Xl={class:"text-xs text-textSecondary font-mono"},ea={class:"text-right"},ta={class:"flex items-center gap-2 justify-end"},sa={class:"text-xs text-textSecondary"},na=kt({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=j([]),n=j(!0);async function o(){n.value=!0;try{const h=await ye("/api/status");s.value=(h.sessions||[]).slice().sort((d,p)=>d.status==="active"&&p.status!=="active"?-1:d.status!=="active"&&p.status==="active"?1:p.lastActivity-d.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var d;return(((d=t.status)==null?void 0:d.sessions)??s.value).slice().sort((p,m)=>p.status==="active"&&m.status!=="active"?-1:p.status!=="active"&&m.status==="active"?1:m.lastActivity-p.lastActivity)});function i(h){const d=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${d>0?` — ${d}m ago`:""}`,color:"text-muted"}:d<5?{label:"Active",color:"text-success"}:d<30?{label:`Idle ${d}m`,color:"text-warn"}:{label:`Dormant ${d}m`,color:"text-danger"}}function a(h){if(!h.lastWaitCallAt)return"";const d=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function c(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return bt(o),(h,d)=>(S(),C("div",Bl,[n.value&&r.value.length===0?(S(),C("div",Kl,"Loading sessions...")):r.value.length===0?(S(),C("div",Wl,"No sessions")):(S(),C("div",zl,[(S(!0),C(ie,null,_e(r.value,p=>(S(),C("div",{key:p.mcpSessionId,class:G(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[l("div",Jl,[l("div",ql,[l("span",{class:G(["w-2.5 h-2.5 rounded-full",p.status==="disconnected"?"bg-muted":Math.floor((Date.now()-p.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-p.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Gl,[p.topicName?(S(),C(ie,{key:0},[l("span",Yl,$(p.topicName),1),l("span",Zl," (thread "+$(p.threadId)+")",1)],64)):p.threadId!=null?(S(),C(ie,{key:1},[gt("Thread "+$(p.threadId),1)],64)):(S(),C("span",Ql,"Awaiting start_session…"))]),l("div",Xl,$(p.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ea,[l("div",ta,[l("span",{class:G(["text-sm font-medium",i(p).color])},$(i(p).label),3),a(p)?(S(),C("span",{key:0,class:G(["text-xs ml-2",c(p)])},$(a(p)),3)):Q("",!0)]),l("div",sa,$(p.transportType),1)])])],2))),128))]))]))}}),oa={class:"animate-fade-in"},ra={class:"flex flex-wrap items-center gap-3 mb-4"},ia={key:0,class:"text-center py-12 text-textSecondary"},la={key:1,class:"text-center py-12 text-textSecondary"},aa={key:2,class:"space-y-2"},ca={class:"flex items-start justify-between gap-3"},ua={class:"flex-1 min-w-0"},da={class:"flex items-center gap-2 mb-1"},fa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},pa={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={class:"text-xs text-textSecondary"},ma={class:"text-sm text-textPrimary leading-relaxed"},ga={class:"flex flex-wrap gap-1.5 mt-2"},xa={class:"text-right shrink-0"},va={class:"text-sm font-mono text-textSecondary"},ya={class:"text-xs text-muted"},ba={class:"text-xs text-muted"},_a=kt({__name:"MemoryNotesTab",setup(e){const t=j([]),s=j(!1),n=j(""),o=j("created_at"),r=j("");let i=null;async function a(){s.value=!0;try{const d=r.value.trim();let p;if(d)p=await ye(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const m=new URLSearchParams({limit:"50",sort:o.value});n.value&&m.set("type",n.value),p=await ye(`/api/notes?${m}`)}t.value=p}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function h(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),m=Math.floor(p/6e4);if(m<1)return"just now";if(m<60)return`${m}m ago`;const v=Math.floor(m/60);return v<24?`${v}h ago`:`${Math.floor(v/24)}d ago`}return bt(a),(d,p)=>(S(),C("div",oa,[l("div",ra,[me(l("input",{"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),onInput:c,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[we,r.value]]),me(l("select",{"onUpdate:modelValue":p[1]||(p[1]=m=>n.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[3]||(p[3]=[Be('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[ns,n.value]]),me(l("select",{"onUpdate:modelValue":p[2]||(p[2]=m=>o.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[4]||(p[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[ns,o.value]])]),s.value?(S(),C("div",ia,"Loading notes...")):t.value.length===0?(S(),C("div",la,"No notes found")):(S(),C("div",aa,[(S(!0),C(ie,null,_e(t.value,m=>(S(),C("div",{key:m.noteId,class:G(["glass rounded-xl p-4 animate-fade-in",`priority-${m.priority||0}`])},[l("div",ca,[l("div",ua,[l("div",da,[l("span",{class:G(["type-badge",`type-${m.type}`])},$(m.type),3),m.priority>=2?(S(),C("span",fa,"HIGH IMPORTANCE")):m.priority===1?(S(),C("span",pa,"NOTABLE")):Q("",!0),l("span",ha,$(m.noteId),1)]),l("p",ma,$(m.content),1),l("div",ga,[(S(!0),C(ie,null,_e(m.keywords||[],v=>(S(),C("span",{key:v,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(v),1))),128))])]),l("div",xa,[l("div",va,$(((Number(m.confidence)||0)*100).toFixed(0))+"%",1),l("div",ya,$(h(m.createdAt)),1),l("div",ba,$(m.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),wa={class:"animate-fade-in space-y-6"},Sa={class:"glass rounded-xl p-4"},Ca={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},ka={class:"flex flex-wrap items-center gap-3"},$a={key:0,class:"text-sm text-success"},Aa={class:"flex flex-wrap items-center gap-3 mb-4"},Ea={key:0,class:"text-sm text-success"},Pa={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Oa={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},Da={class:"mt-4"},ja=["innerHTML"],Na={class:"glass rounded-xl p-6"},La={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Fa={class:"flex items-center gap-2"},Va={key:0,class:"text-sm text-success"},Ha={class:"flex gap-2 mb-4"},Ua=["onClick"],Ba={key:0,class:"mb-3"},Ka=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},za={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ja={class:"flex items-center gap-2"},qa={key:0,class:"text-sm text-success"},Ga={class:"mb-4 flex flex-wrap items-center gap-3"},Ya={class:"flex items-center gap-2"},Za={class:"font-mono text-sm text-textPrimary"},Qa={key:0,class:"mb-3"},Xa={class:"flex flex-wrap gap-2 mb-3"},ec=["onClick"],tc={class:"mt-4"},sc=["innerHTML"],nc=kt({__name:"TemplatesTab",setup(e){function t(M){return M.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=j("copilot"),n=j(""),o=j(""),r=j(""),i=j(50),a=j(""),c=j(""),h=j(!0),d=j(""),p=j(!1),m=j({}),v=j("copilot"),F=j(""),D=j(""),B=j(!0),E=j(""),H=j(!1),Z=j([]),V=j("");async function le(){await Promise.all([de(),J(),N(),W(),fe()])}async function de(){try{const M=await ye("/api/settings/agent-type");s.value=M.agentType||"copilot"}catch{}}async function J(){try{const M=await ye("/api/settings/claude-mcp-config");o.value=M.path||""}catch{}}async function N(){try{const M=await ye("/api/settings/bootstrap-message-count");i.value=M.count??50}catch{}}async function W(){try{const M=await ye("/api/templates");if(M.templates&&M.templates.length>0){const k=M.templates[0];c.value=k.content||"",h.value=k.isDefault??!0}M.agentReminders&&(m.value=M.agentReminders)}catch{}}async function fe(){try{const[M,k,P]=await Promise.all([ye("/api/templates/drive"),ye("/api/templates/drive-presets"),ye("/api/settings/dmn-activation-hours")]);Z.value=k.presets||[],V.value=String(P.value??"not set"),M.custom?(D.value=M.custom,B.value=!1):(D.value=M.default||"",B.value=!0)}catch{}}async function te(){try{await ye("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await ye("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await W()}catch(M){n.value="Error: "+M.message}}async function Se(){try{await ye("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(M){a.value="Error: "+M.message}}async function be(){const M=o.value.trim();if(!M){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await ye("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:M})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(k){r.value="Error: "+k.message}}async function Ue(){try{const M=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!M.ok)throw new Error(M.statusText);h.value=!1,d.value="Saved ✓",setTimeout(()=>{d.value=""},3e3)}catch(M){d.value="Error: "+M.message}}async function $t(){if(confirm("Reset to default template? Your customizations will be lost."))try{const M=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!M.ok)throw new Error(M.statusText);await W(),d.value="Reset to default ✓",setTimeout(()=>{d.value=""},3e3)}catch(M){d.value="Error: "+M.message}}async function ge(){var P;const M=v.value,k=((P=m.value[M])==null?void 0:P.content)??"";try{const $e=await fetch(`/api/templates/reminders-${M}`,{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:k})});if(!$e.ok)throw new Error($e.statusText);m.value[M]={content:k,isDefault:!1},F.value=`Saved ${M} ✓`,setTimeout(()=>{F.value=""},3e3)}catch($e){F.value="Error: "+$e.message}}async function se(){const M=v.value;if(confirm(`Reset ${M} agent reminder? The custom template will be removed.`))try{const k=await fetch(`/api/templates/reminders-${M}`,{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!k.ok)throw new Error(k.statusText);await W(),F.value=`Reset ${M} ✓`,setTimeout(()=>{F.value=""},3e3)}catch(k){F.value="Error: "+k.message}}async function X(){const M=D.value;if(!M.trim()){E.value="Template is empty — load a preset first",setTimeout(()=>{E.value=""},3e3);return}try{const k=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:M})});if(!k.ok)throw new Error(k.statusText);B.value=!1,E.value="Saved ✓",setTimeout(()=>{E.value=""},3e3)}catch(k){E.value="Error: "+k.message}}async function Me(){if(confirm("Reset drive template? The custom template will be removed."))try{const M=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!M.ok)throw new Error(M.statusText);await fe(),E.value="Reset to default ✓",setTimeout(()=>{E.value=""},3e3)}catch(M){E.value="Error: "+M.message}}function L(M){D.value=M.content,B.value=!1}const b=Ke(()=>t(c.value)),x=Ke(()=>D.value?t(D.value):'<span style="color:#6b7280">(no template loaded)</span>');return bt(le),(M,k)=>{var P,$e;return S(),C("div",wa,[l("div",Sa,[l("div",Ca,[k[9]||(k[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),me(l("select",{"onUpdate:modelValue":k[0]||(k[0]=ne=>s.value=ne),onChange:te,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...k[8]||(k[8]=[Be('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[ns,s.value]]),n.value?(S(),C("span",Ta,$(n.value),1)):Q("",!0),k[10]||(k[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",ka,[k[11]||(k[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),me(l("input",{"onUpdate:modelValue":k[1]||(k[1]=ne=>o.value=ne),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[we,o.value]]),l("button",{onClick:be,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(S(),C("span",$a,$(r.value),1)):Q("",!0)]),l("div",Aa,[k[12]||(k[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),me(l("input",{"onUpdate:modelValue":k[2]||(k[2]=ne=>i.value=ne),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[we,i.value,void 0,{number:!0}]]),l("button",{onClick:Se,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(S(),C("span",Ea,$(a.value),1)):Q("",!0),k[13]||(k[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Pa,[l("div",Ia,[k[14]||(k[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Ma,[d.value?(S(),C("span",Oa,$(d.value),1)):Q("",!0),l("button",{onClick:$t,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:Ue,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),h.value?(S(),C("div",Ra,[...k[15]||(k[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),me(l("textarea",{"onUpdate:modelValue":k[3]||(k[3]=ne=>c.value=ne),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[we,c.value]]),l("div",Da,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[4]||(k[4]=ne=>p.value=!p.value)},[(S(),C("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",p.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[16]||(k[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[17]||(k[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),p.value?(S(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:b.value},null,8,ja)):Q("",!0)]),k[18]||(k[18]=Be('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),l("div",Na,[l("div",La,[k[19]||(k[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Fa,[F.value?(S(),C("span",Va,$(F.value),1)):Q("",!0),l("button",{onClick:se,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ha,[(S(),C(ie,null,_e(["copilot","claude","cursor","codex"],ne=>l("button",{key:ne,onClick:Ae=>v.value=ne,class:G(["px-4 py-2 rounded-xl text-sm font-medium transition",v.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},$(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((P=m.value[v.value])==null?void 0:P.isDefault)!==!1?(S(),C("div",Ba,[...k[20]||(k[20]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):Q("",!0),l("textarea",{value:(($e=m.value[v.value])==null?void 0:$e.content)??"",onInput:k[5]||(k[5]=ne=>{const Ae=ne.target;m.value[v.value]={content:Ae.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${v.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ka)]),l("div",Wa,[l("div",za,[k[21]||(k[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",Ja,[E.value?(S(),C("span",qa,$(E.value),1)):Q("",!0),l("button",{onClick:Me,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ga,[k[23]||(k[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Ya,[l("span",Za,$(V.value),1),k[22]||(k[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),k[24]||(k[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),B.value?(S(),C("div",Qa,[...k[25]||(k[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",Xa,[k[26]||(k[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(S(!0),C(ie,null,_e(Z.value,ne=>(S(),C("button",{key:ne.key,onClick:Ae=>L(ne),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},$(ne.label),9,ec))),128))]),me(l("textarea",{"onUpdate:modelValue":k[6]||(k[6]=ne=>D.value=ne),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[we,D.value]]),l("div",tc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:k[7]||(k[7]=ne=>H.value=!H.value)},[(S(),C("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",H.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...k[27]||(k[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),k[28]||(k[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),H.value?(S(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:x.value},null,8,sc)):Q("",!0)]),k[29]||(k[29]=Be('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),oc={class:"animate-fade-in"},rc={class:"glass rounded-xl p-6 mb-6"},ic={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},lc={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},ac={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},cc={class:"flex items-center gap-4 mb-3"},uc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},dc={class:"flex items-center gap-2"},fc={key:0,class:"text-sm text-warn"},pc={key:1,class:"text-center py-8 text-textSecondary text-sm"},hc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},gc=["onClick"],xc={class:"flex items-start justify-between gap-3"},vc={class:"flex-1 min-w-0"},yc={class:"flex items-center gap-2 mb-1"},bc={class:"font-medium text-sm"},_c={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},wc={class:"flex flex-wrap gap-1.5 mt-1"},Sc=["title"],Cc={key:0,class:"glass rounded-xl p-6"},Tc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kc={class:"text-lg font-semibold"},$c={class:"text-sm text-textSecondary mt-1"},Ac={class:"flex items-center gap-2"},Ec={key:0,class:"text-sm text-success"},Pc={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Oc={class:"flex items-end"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=kt({__name:"SkillsTab",setup(e){const t=j([]),s=j(!0),n=j(null),o=j(""),r=j(""),i=j(!1),a=j(""),c=j(""),h=j(!1),d=j(""),p=j(""),m=j(!1),v=j("");async function F(){s.value=!0;try{const J=await ye("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function D(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function B(J){const N={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return N[J]||N.unknown}function E(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,h.value=!1}function H(){n.value=null,c.value=""}function Z(J,N,W,fe){let te=`---
|
|
64
|
+
**/let rn;const qn=typeof window<"u"&&window.trustedTypes;if(qn)try{rn=qn.createPolicy("vue",{createHTML:e=>e})}catch{}const gr=rn?e=>rn.createHTML(e):e=>e,xl="http://www.w3.org/2000/svg",vl="http://www.w3.org/1998/Math/MathML",it=typeof document<"u"?document:null,Gn=it&&it.createElement("template"),yl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?it.createElementNS(xl,e):t==="mathml"?it.createElementNS(vl,e):s?it.createElement(e,{is:s}):it.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Gn.innerHTML=gr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Gn.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},bl=Symbol("_vtc");function _l(e,t,s){const n=e[bl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Yn=Symbol("_vod"),wl=Symbol("_vsh"),Sl=Symbol(""),Cl=/(?:^|;)\s*display\s*:/;function kl(e,t,s){const n=e.style,o=me(s);let r=!1;if(s&&!o){if(t)if(me(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();s[a]==null&&vs(n,a,"")}else for(const i in t)s[i]==null&&vs(n,i,"");for(const i in s)i==="display"&&(r=!0),vs(n,i,s[i])}else if(o){if(t!==s){const i=n[Sl];i&&(s+=";"+i),n.cssText=s,r=Cl.test(s)}}else t&&e.removeAttribute("style");Yn in e&&(e[Yn]=r?n.display:"",e[wl]&&(n.display="none"))}const Zn=/\s*!important$/;function vs(e,t,s){if(z(s))s.forEach(n=>vs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tl(e,t);Zn.test(s)?e.setProperty(_t(n),s.replace(Zn,""),"important"):e[n]=s}}const Qn=["Webkit","Moz","ms"],Js={};function Tl(e,t){const s=Js[t];if(s)return s;let n=De(t);if(n!=="filter"&&n in e)return Js[t]=n;n=As(n);for(let o=0;o<Qn.length;o++){const r=Qn[o]+n;if(r in e)return Js[t]=r}return t}const Xn="http://www.w3.org/1999/xlink";function eo(e,t,s,n,o,r=$r(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Xn,t.slice(6,t.length)):e.setAttributeNS(Xn,t,s):s==null||r&&!xo(s)?e.removeAttribute(t):e.setAttribute(t,r?"":nt(s)?String(s):s)}function to(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?gr(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=xo(s):s==null&&a==="string"?(s="",i=!0):a==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function yt(e,t,s,n){e.addEventListener(t,s,n)}function $l(e,t,s,n){e.removeEventListener(t,s,n)}const so=Symbol("_vei");function Al(e,t,s,n,o=null){const r=e[so]||(e[so]={}),i=r[t];if(n&&i)i.value=n;else{const[a,c]=El(t);if(n){const h=r[t]=Ml(n,o);yt(e,a,h,c)}else i&&($l(e,a,i,c),r[t]=void 0)}}const no=/(?:Once|Passive|Capture)$/;function El(e){let t;if(no.test(e)){t={};let n;for(;n=e.match(no);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_t(e.slice(2)),t]}let qs=0;const Pl=Promise.resolve(),Il=()=>qs||(Pl.then(()=>qs=0),qs=Date.now());function Ml(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ot(Ol(n,s.value),t,5,[n])};return s.value=e,s.attached=Il(),s}function Ol(e,t){if(z(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dl=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?_l(e,n,i):t==="style"?kl(e,s,n):ks(t)?Ts(t)||Al(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rl(e,t,n,i))?(to(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&eo(e,t,n,i,r,t!=="value")):e._isVueCE&&(jl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!me(n)))?to(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),eo(e,t,n,i))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&oo(t)&&Z(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return oo(t)&&me(s)?!1:t in e}function jl(e,t){const s=e._def.props;if(!s)return!1;const n=De(t);return Array.isArray(s)?s.some(o=>De(o)===n):Object.keys(s).some(o=>De(o)===n)}const Lt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return z(t)?s=>hs(t,s):t};function Nl(e){e.target.composing=!0}function ro(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign");function io(e,t,s){return t&&(e=e.trim()),s&&(e=Es(e)),e}const he={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=Lt(o);const r=n||o.props&&o.props.type==="number";yt(e,t?"change":"input",i=>{i.target.composing||e[ut](io(e.value,s,r))}),(s||r)&&yt(e,"change",()=>{e.value=io(e.value,s,r)}),t||(yt(e,"compositionstart",Nl),yt(e,"compositionend",ro),yt(e,"change",ro))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=Lt(i),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?Es(e.value):e.value,c=t??"";if(a===c)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},lo={deep:!0,created(e,t,s){e[ut]=Lt(s),yt(e,"change",()=>{const n=e._modelValue,o=is(e),r=e.checked,i=e[ut];if(z(n)){const a=un(n,o),c=a!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const h=[...n];h.splice(a,1),i(h)}}else if(Ft(n)){const a=new Set(n);r?a.add(o):a.delete(o),i(a)}else i(xr(e,r))})},mounted:ao,beforeUpdate(e,t,s){e[ut]=Lt(s),ao(e,t,s)}};function ao(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(z(t))o=un(t,n.props.value)>-1;else if(Ft(t))o=t.has(n.props.value);else{if(t===s)return;o=Vt(t,xr(e,!0))}e.checked!==o&&(e.checked=o)}const rs={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Ft(t);yt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?Es(is(i)):is(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,jo(()=>{e._assigning=!1})}),e[ut]=Lt(n)},mounted(e,{value:t}){co(e,t)},beforeUpdate(e,t,s){e[ut]=Lt(s)},updated(e,{value:t}){e._assigning||co(e,t)}};function co(e,t){const s=e.multiple,n=z(t);if(!(s&&!n&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],a=is(i);if(s)if(n){const c=typeof a;c==="string"||c==="number"?i.selected=t.some(h=>String(h)===String(a)):i.selected=un(t,a)>-1}else i.selected=t.has(a);else if(Vt(is(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function xr(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ll={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},zt=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=_t(o.key);if(t.some(i=>i===r||Ll[i]===r))return e(o)}))},Fl=$e({patchProp:Dl},yl);let uo;function Vl(){return uo||(uo=Zi(Fl))}const Hl=((...e)=>{const t=Vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Bl(n);if(!o)return;const r=t._component;!Z(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Ul(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Ul(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bl(e){return me(e)?document.querySelector(e):e}let kn="";function Kt(e){kn=e}function _e(){return kn}async function ve(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${kn}`,"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!s.ok){const n=new Error(s.statusText);throw n.status=s.status,n}return s.json()}const Kl={class:"animate-fade-in"},Wl={key:0,class:"text-center py-12 text-textSecondary"},zl={key:1,class:"text-center text-textSecondary py-12"},Jl={key:2,class:"space-y-3"},ql={class:"flex items-center justify-between"},Gl={class:"flex items-center gap-3"},Yl={class:"font-medium"},Zl={class:"text-accentLight"},Ql={class:"text-textSecondary text-xs"},Xl={key:2,class:"text-muted italic"},ea={class:"text-xs text-textSecondary font-mono"},ta={class:"text-right"},sa={class:"flex items-center gap-2 justify-end"},na={class:"text-xs text-textSecondary"},oa=At({__name:"SessionsTab",props:{status:{}},setup(e){const t=e,s=j([]),n=j(!0);async function o(){n.value=!0;try{const h=await ve("/api/status");s.value=(h.sessions||[]).slice().sort((d,p)=>d.status==="active"&&p.status!=="active"?-1:d.status!=="active"&&p.status==="active"?1:p.lastActivity-d.lastActivity)}finally{n.value=!1}}const r=Be(()=>{var d;return(((d=t.status)==null?void 0:d.sessions)??s.value).slice().sort((p,m)=>p.status==="active"&&m.status!=="active"?-1:p.status!=="active"&&m.status==="active"?1:m.lastActivity-p.lastActivity)});function i(h){const d=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${d>0?` — ${d}m ago`:""}`,color:"text-muted"}:d<5?{label:"Active",color:"text-success"}:d<30?{label:`Idle ${d}m`,color:"text-warn"}:{label:`Dormant ${d}m`,color:"text-danger"}}function a(h){if(!h.lastWaitCallAt)return"";const d=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function c(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return wt(o),(h,d)=>(_(),C("div",Kl,[n.value&&r.value.length===0?(_(),C("div",Wl,"Loading sessions...")):r.value.length===0?(_(),C("div",zl,"No sessions")):(_(),C("div",Jl,[(_(!0),C(oe,null,be(r.value,p=>(_(),C("div",{key:p.mcpSessionId,class:Y(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[l("div",ql,[l("div",Gl,[l("span",{class:Y(["w-2.5 h-2.5 rounded-full",p.status==="disconnected"?"bg-muted":Math.floor((Date.now()-p.lastActivity)/6e4)<5?"bg-success":Math.floor((Date.now()-p.lastActivity)/6e4)<30?"bg-warn":"bg-danger"])},null,2),l("div",null,[l("div",Yl,[p.topicName?(_(),C(oe,{key:0},[l("span",Zl,$(p.topicName),1),l("span",Ql," (thread "+$(p.threadId)+")",1)],64)):p.threadId!=null?(_(),C(oe,{key:1},[vt("Thread "+$(p.threadId),1)],64)):(_(),C("span",Xl,"Awaiting start_session…"))]),l("div",ea,$(p.mcpSessionId.slice(0,12))+"...",1)])]),l("div",ta,[l("div",sa,[l("span",{class:Y(["text-sm font-medium",i(p).color])},$(i(p).label),3),a(p)?(_(),C("span",{key:0,class:Y(["text-xs ml-2",c(p)])},$(a(p)),3)):Q("",!0)]),l("div",na,$(p.transportType),1)])])],2))),128))]))]))}}),ra={class:"animate-fade-in"},ia={class:"flex flex-wrap items-center gap-3 mb-4"},la={key:0,class:"text-center py-12 text-textSecondary"},aa={key:1,class:"text-center py-12 text-textSecondary"},ca={key:2,class:"space-y-2"},ua={class:"flex items-start justify-between gap-3"},da={class:"flex-1 min-w-0"},fa={class:"flex items-center gap-2 mb-1"},pa={key:0,class:"type-badge",style:{background:"rgba(239,68,68,0.15)",color:"#f87171"}},ha={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ma={class:"text-xs text-textSecondary"},ga={class:"text-sm text-textPrimary leading-relaxed"},xa={class:"flex flex-wrap gap-1.5 mt-2"},va={class:"text-right shrink-0"},ya={class:"text-sm font-mono text-textSecondary"},ba={class:"text-xs text-muted"},_a={class:"text-xs text-muted"},wa=At({__name:"MemoryNotesTab",setup(e){const t=j([]),s=j(!1),n=j(""),o=j("created_at"),r=j("");let i=null;async function a(){s.value=!0;try{const d=r.value.trim();let p;if(d)p=await ve(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const m=new URLSearchParams({limit:"50",sort:o.value});n.value&&m.set("type",n.value),p=await ve(`/api/notes?${m}`)}t.value=p}finally{s.value=!1}}function c(){i&&clearTimeout(i),i=setTimeout(a,300)}function h(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),m=Math.floor(p/6e4);if(m<1)return"just now";if(m<60)return`${m}m ago`;const k=Math.floor(m/60);return k<24?`${k}h ago`:`${Math.floor(k/24)}d ago`}return wt(a),(d,p)=>(_(),C("div",ra,[l("div",ia,[le(l("input",{"onUpdate:modelValue":p[0]||(p[0]=m=>r.value=m),onInput:c,type:"text",placeholder:"Search notes...",class:"flex-1 min-w-[200px] px-4 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,544),[[he,r.value]]),le(l("select",{"onUpdate:modelValue":p[1]||(p[1]=m=>n.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[3]||(p[3]=[Ue('<option value="">All types</option><option value="fact">Facts</option><option value="preference">Preferences</option><option value="pattern">Patterns</option><option value="entity">Entities</option><option value="relationship">Relationships</option>',6)])],544),[[rs,n.value]]),le(l("select",{"onUpdate:modelValue":p[2]||(p[2]=m=>o.value=m),onChange:a,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none"},[...p[4]||(p[4]=[l("option",{value:"created_at"},"Newest",-1),l("option",{value:"confidence"},"Confidence",-1),l("option",{value:"access_count"},"Most accessed",-1)])],544),[[rs,o.value]])]),s.value?(_(),C("div",la,"Loading notes...")):t.value.length===0?(_(),C("div",aa,"No notes found")):(_(),C("div",ca,[(_(!0),C(oe,null,be(t.value,m=>(_(),C("div",{key:m.noteId,class:Y(["glass rounded-xl p-4 animate-fade-in",`priority-${m.priority||0}`])},[l("div",ua,[l("div",da,[l("div",fa,[l("span",{class:Y(["type-badge",`type-${m.type}`])},$(m.type),3),m.priority>=2?(_(),C("span",pa,"HIGH IMPORTANCE")):m.priority===1?(_(),C("span",ha,"NOTABLE")):Q("",!0),l("span",ma,$(m.noteId),1)]),l("p",ga,$(m.content),1),l("div",xa,[(_(!0),C(oe,null,be(m.keywords||[],k=>(_(),C("span",{key:k,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(k),1))),128))])]),l("div",va,[l("div",ya,$(((Number(m.confidence)||0)*100).toFixed(0))+"%",1),l("div",ba,$(h(m.createdAt)),1),l("div",_a,$(m.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),Sa={class:"animate-fade-in space-y-6"},Ca={class:"glass rounded-xl p-4"},ka={class:"flex flex-wrap items-center gap-4 mb-4"},Ta={key:0,class:"text-sm text-success"},$a={class:"flex flex-wrap items-center gap-3"},Aa={key:0,class:"text-sm text-success"},Ea={class:"flex flex-wrap items-center gap-3 mb-4"},Pa={key:0,class:"text-sm text-success"},Ia={class:"glass rounded-xl p-6"},Ma={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Oa={class:"flex items-center gap-2"},Da={key:0,class:"text-sm text-success"},Ra={key:0,class:"mb-3"},ja={class:"mt-4"},Na=["innerHTML"],La={class:"glass rounded-xl p-6"},Fa={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Va={class:"flex items-center gap-2"},Ha={key:0,class:"text-sm text-success"},Ua={class:"flex gap-2 mb-4"},Ba=["onClick"],Ka={key:0,class:"mb-3"},Wa=["value","placeholder"],za={class:"glass rounded-xl p-6"},Ja={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},qa={class:"flex items-center gap-2"},Ga={key:0,class:"text-sm text-success"},Ya={class:"mb-4 flex flex-wrap items-center gap-3"},Za={class:"flex items-center gap-2"},Qa={class:"font-mono text-sm text-textPrimary"},Xa={key:0,class:"mb-3"},ec={class:"flex flex-wrap gap-2 mb-3"},tc=["onClick"],sc={class:"mt-4"},nc=["innerHTML"],oc=At({__name:"TemplatesTab",setup(e){function t(N){return N.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\{\{([A-Z_]+)\}\}/g,'<span class="text-accentLight" style="background:rgba(99,102,241,0.1);padding:0 2px;border-radius:3px">{{$1}}</span>')}const s=j("copilot"),n=j(""),o=j(""),r=j(""),i=j(50),a=j(""),c=j(""),h=j(!0),d=j(""),p=j(!1),m=j({}),k=j("copilot"),V=j(""),A=j(""),H=j(!0),O=j(""),L=j(!1),W=j([]),F=j("");async function re(){await Promise.all([we(),J(),M(),K(),de()])}async function we(){try{const N=await ve("/api/settings/agent-type");s.value=N.agentType||"copilot"}catch{}}async function J(){try{const N=await ve("/api/settings/claude-mcp-config");o.value=N.path||""}catch{}}async function M(){try{const N=await ve("/api/settings/bootstrap-message-count");i.value=N.count??50}catch{}}async function K(){try{const N=await ve("/api/templates");if(N.templates&&N.templates.length>0){const g=N.templates[0];c.value=g.content||"",h.value=g.isDefault??!0}N.agentReminders&&(m.value=N.agentReminders)}catch{}}async function de(){try{const[N,g,y]=await Promise.all([ve("/api/templates/drive"),ve("/api/templates/drive-presets"),ve("/api/settings/dmn-activation-hours")]);W.value=g.presets||[],F.value=String(y.value??"not set"),N.custom?(A.value=N.custom,H.value=!1):(A.value=N.default||"",H.value=!0)}catch{}}async function te(){try{await ve("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await ve("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await K()}catch(N){n.value="Error: "+N.message}}async function Se(){try{await ve("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:i.value})}),a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3)}catch(N){a.value="Error: "+N.message}}async function ke(){const N=o.value.trim();if(!N){r.value="Path is empty",setTimeout(()=>{r.value=""},3e3);return}try{await ve("/api/settings/claude-mcp-config",{method:"POST",body:JSON.stringify({path:N})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(g){r.value="Error: "+g.message}}async function mt(){try{const N=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:c.value})});if(!N.ok)throw new Error(N.statusText);h.value=!1,d.value="Saved ✓",setTimeout(()=>{d.value=""},3e3)}catch(N){d.value="Error: "+N.message}}async function Et(){if(confirm("Reset to default template? Your customizations will be lost."))try{const N=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!N.ok)throw new Error(N.statusText);await K(),d.value="Reset to default ✓",setTimeout(()=>{d.value=""},3e3)}catch(N){d.value="Error: "+N.message}}async function ge(){var y;const N=k.value,g=((y=m.value[N])==null?void 0:y.content)??"";try{const x=await fetch(`/api/templates/reminders-${N}`,{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:g})});if(!x.ok)throw new Error(x.statusText);m.value[N]={content:g,isDefault:!1},V.value=`Saved ${N} ✓`,setTimeout(()=>{V.value=""},3e3)}catch(x){V.value="Error: "+x.message}}async function ie(){const N=k.value;if(confirm(`Reset ${N} agent reminder? The custom template will be removed.`))try{const g=await fetch(`/api/templates/reminders-${N}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!g.ok)throw new Error(g.statusText);await K(),V.value=`Reset ${N} ✓`,setTimeout(()=>{V.value=""},3e3)}catch(g){V.value="Error: "+g.message}}async function X(){const N=A.value;if(!N.trim()){O.value="Template is empty — load a preset first",setTimeout(()=>{O.value=""},3e3);return}try{const g=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:N})});if(!g.ok)throw new Error(g.statusText);H.value=!1,O.value="Saved ✓",setTimeout(()=>{O.value=""},3e3)}catch(g){O.value="Error: "+g.message}}async function He(){if(confirm("Reset drive template? The custom template will be removed."))try{const N=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!N.ok)throw new Error(N.statusText);await de(),O.value="Reset to default ✓",setTimeout(()=>{O.value=""},3e3)}catch(N){O.value="Error: "+N.message}}function ze(N){A.value=N.content,H.value=!1}const Ie=Be(()=>t(c.value)),Ce=Be(()=>A.value?t(A.value):'<span style="color:#6b7280">(no template loaded)</span>');return wt(re),(N,g)=>{var y,x;return _(),C("div",Sa,[l("div",Ca,[l("div",ka,[g[9]||(g[9]=l("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),le(l("select",{"onUpdate:modelValue":g[0]||(g[0]=q=>s.value=q),onChange:te,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...g[8]||(g[8]=[Ue('<option value="copilot">Copilot</option><option value="copilot_claude">Copilot (Claude)</option><option value="copilot_codex">Copilot (Codex)</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="codex">Codex</option><option value="openai_codex">OpenAI Codex</option>',7)])],544),[[rs,s.value]]),n.value?(_(),C("span",Ta,$(n.value),1)):Q("",!0),g[10]||(g[10]=l("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),l("div",$a,[g[11]||(g[11]=l("label",{class:"text-sm font-medium text-textSecondary"},"Claude MCP Config Path",-1)),le(l("input",{"onUpdate:modelValue":g[1]||(g[1]=q=>o.value=q),type:"text",placeholder:"~/.claude/settings.json",class:"flex-1 min-w-[260px] px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted font-mono focus:outline-none focus:border-accent transition"},null,512),[[he,o.value]]),l("button",{onClick:ke,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save"),r.value?(_(),C("span",Aa,$(r.value),1)):Q("",!0)]),l("div",Ea,[g[12]||(g[12]=l("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),le(l("input",{"onUpdate:modelValue":g[2]||(g[2]=q=>i.value=q),type:"number",min:"0",max:"500",class:"w-24 px-3 py-2 rounded-xl bg-card border border-gray-700 text-text text-sm focus:border-accent focus:outline-none"},null,512),[[he,i.value,void 0,{number:!0}]]),l("button",{onClick:Se,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),a.value?(_(),C("span",Pa,$(a.value),1)):Q("",!0),g[13]||(g[13]=l("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),l("div",Ia,[l("div",Ma,[g[14]||(g[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Reminders Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),l("div",Oa,[d.value?(_(),C("span",Da,$(d.value),1)):Q("",!0),l("button",{onClick:Et,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:mt,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),h.value?(_(),C("div",Ra,[...g[15]||(g[15]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"USING DEFAULT — edit and save to customize",-1)])])):Q("",!0),le(l("textarea",{"onUpdate:modelValue":g[3]||(g[3]=q=>c.value=q),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Loading..."},null,512),[[he,c.value]]),l("div",ja,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:g[4]||(g[4]=q=>p.value=!p.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",p.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...g[16]||(g[16]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),g[17]||(g[17]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),p.value?(_(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:Ie.value},null,8,Na)):Q("",!0)]),g[18]||(g[18]=Ue('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{OPERATOR_MESSAGE}}</code> <span class="text-textSecondary">— latest operator message</span></div><div><code class="text-accentLight">{{THREAD_ID}}</code> <span class="text-textSecondary">— Telegram thread ID</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— formatted timestamp</span></div><div><code class="text-accentLight">{{UPTIME}}</code> <span class="text-textSecondary">— session uptime</span></div><div><code class="text-accentLight">{{VERSION}}</code> <span class="text-textSecondary">— package version</span></div><div><code class="text-accentLight">{{MODE}}</code> <span class="text-textSecondary">— "autonomous" or "standard"</span></div></div></details>',1))]),l("div",La,[l("div",Fa,[g[19]||(g[19]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),l("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),l("div",Va,[V.value?(_(),C("span",Ha,$(V.value),1)):Q("",!0),l("button",{onClick:ie,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset"),l("button",{onClick:ge,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ua,[(_(),C(oe,null,be(["copilot","claude","cursor","codex"],q=>l("button",{key:q,onClick:ye=>k.value=q,class:Y(["px-4 py-2 rounded-xl text-sm font-medium transition",k.value===q?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},$(q.charAt(0).toUpperCase()+q.slice(1)),11,Ba)),64))]),((y=m.value[k.value])==null?void 0:y.isDefault)!==!1?(_(),C("div",Ka,[...g[20]||(g[20]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"NO CUSTOM OVERRIDE — this agent uses only the base reminders",-1)])])):Q("",!0),l("textarea",{value:((x=m.value[k.value])==null?void 0:x.content)??"",onInput:g[5]||(g[5]=q=>{const ye=q.target;m.value[k.value]={content:ye.value,isDefault:!1}}),rows:"8",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:`Add ${k.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Wa)]),l("div",za,[l("div",Ja,[g[21]||(g[21]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),l("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),l("div",qa,[O.value?(_(),C("span",Ga,$(O.value),1)):Q("",!0),l("button",{onClick:He,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Reset to Default"),l("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ya,[g[23]||(g[23]=l("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),l("div",Za,[l("span",Qa,$(F.value),1),g[22]||(g[22]=l("span",{class:"text-sm text-textSecondary"},"hours",-1))]),g[24]||(g[24]=l("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),H.value?(_(),C("div",Xa,[...g[25]||(g[25]=[l("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),l("div",ec,[g[26]||(g[26]=l("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(_(!0),C(oe,null,be(W.value,q=>(_(),C("button",{key:q.key,onClick:ye=>ze(q),class:"px-3 py-1.5 rounded-lg bg-card hover:bg-cardHover border border-gray-700 text-xs text-textSecondary hover:text-textPrimary transition"},$(q.label),9,tc))),128))]),le(l("textarea",{"onUpdate:modelValue":g[6]||(g[6]=q=>A.value=q),rows:"15",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Load a preset or type a custom drive template..."},null,512),[[he,A.value]]),l("div",sc,[l("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:g[7]||(g[7]=q=>L.value=!L.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",L.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...g[27]||(g[27]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),g[28]||(g[28]=l("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),L.value?(_(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:Ce.value},null,8,nc)):Q("",!0)]),g[29]||(g[29]=Ue('<details class="mt-4"><summary class="text-sm font-medium text-textSecondary cursor-pointer hover:text-textPrimary transition">Available Variables</summary><div class="mt-2 glass rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"><div><code class="text-accentLight">{{IDLE_HOURS}}</code> <span class="text-textSecondary">— hours since last operator interaction</span></div><div><code class="text-accentLight">{{TIME}}</code> <span class="text-textSecondary">— ISO timestamp</span></div><div><code class="text-accentLight">{{PROBABILITY}}</code> <span class="text-textSecondary">— drive activation probability (0.2–1.0)</span></div></div></details>',1))])])}}}),rc={class:"animate-fade-in"},ic={class:"glass rounded-xl p-6 mb-6"},lc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ac={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},cc={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},uc={class:"flex items-center gap-4 mb-3"},dc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},fc={class:"flex items-center gap-2"},pc={key:0,class:"text-sm text-warn"},hc={key:1,class:"text-center py-8 text-textSecondary text-sm"},mc={key:2,class:"text-center text-textSecondary py-12"},gc={key:3,class:"space-y-2"},xc=["onClick"],vc={class:"flex items-start justify-between gap-3"},yc={class:"flex-1 min-w-0"},bc={class:"flex items-center gap-2 mb-1"},_c={class:"font-medium text-sm"},wc={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},Sc={class:"flex flex-wrap gap-1.5 mt-1"},Cc=["title"],kc={key:0,class:"glass rounded-xl p-6"},Tc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},$c={class:"text-lg font-semibold"},Ac={class:"text-sm text-textSecondary mt-1"},Ec={class:"flex items-center gap-2"},Pc={key:0,class:"text-sm text-success"},Ic={key:1,class:"text-sm text-warn"},Mc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Oc=["value"],Dc={class:"flex items-end"},Rc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},jc=At({__name:"SkillsTab",setup(e){const t=j([]),s=j(!0),n=j(null),o=j(""),r=j(""),i=j(!1),a=j(""),c=j(""),h=j(!1),d=j(""),p=j(""),m=j(!1),k=j("");async function V(){s.value=!0;try{const J=await ve("/api/skills");t.value=J.skills||[]}finally{s.value=!1}}function A(J){return J?J.includes(".remote-copilot-mcp")&&J.includes("skills")?"user":J.endsWith(".default.md")?"default":J.endsWith(".skill.md")?"project":"unknown":"unknown"}function H(J){const M={user:"background:rgba(99,102,241,0.15);color:#818cf8",default:"background:rgba(107,114,128,0.15);color:#9ca3af",project:"background:rgba(34,197,94,0.15);color:#4ade80",unknown:"background:rgba(107,114,128,0.15);color:#9ca3af"};return M[J]||M.unknown}function O(J){n.value=J,o.value=J.content,r.value=(J.triggers||[]).join(", "),i.value=!!J.replacesOrchestrator,h.value=!1}function L(){n.value=null,c.value=""}function W(J,M,K,de){let te=`---
|
|
65
65
|
name: ${J}
|
|
66
66
|
triggers:
|
|
67
|
-
`;return
|
|
68
|
-
`}),
|
|
67
|
+
`;return M.forEach(Se=>{te+=` - ${Se.trim()}
|
|
68
|
+
`}),K&&(te+=`replaces_orchestrator: true
|
|
69
69
|
`),te+=`---
|
|
70
70
|
|
|
71
|
-
`,te+
|
|
72
|
-
`);try{const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({content:fe})});if(!te.ok)throw new Error(te.statusText);v.value="Created ✓",h.value=!1,await F();const Se=t.value.find(be=>be.name===J);Se&&E(Se)}catch(te){v.value="Error: "+te.message}}return bt(F),(J,N)=>(S(),C("div",oc,[l("div",rc,[l("div",ic,[N[8]||(N[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:N[0]||(N[0]=W=>{h.value=!h.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),h.value?(S(),C("div",lc,[N[12]||(N[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",ac,[l("div",null,[N[9]||(N[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":N[1]||(N[1]=W=>d.value=W),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[we,d.value]])]),l("div",null,[N[10]||(N[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[2]||(N[2]=W=>p.value=W),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[we,p.value]])])]),l("div",cc,[l("label",uc,[me(l("input",{"onUpdate:modelValue":N[3]||(N[3]=W=>m.value=W),type:"checkbox",class:"rounded"},null,512),[[io,m.value]]),N[11]||(N[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",dc,[l("button",{onClick:de,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:N[4]||(N[4]=W=>h.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),v.value?(S(),C("span",fc,$(v.value),1)):Q("",!0)])])):Q("",!0),s.value?(S(),C("div",pc,"Loading...")):t.value.length===0?(S(),C("div",hc,"No skills loaded")):(S(),C("div",mc,[(S(!0),C(ie,null,_e(t.value,W=>{var fe;return S(),C("div",{key:W.name,onClick:te=>E(W),class:G(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((fe=n.value)==null?void 0:fe.name)===W.name?"border-accent":"border-transparent"])},[l("div",xc,[l("div",vc,[l("div",yc,[l("span",bc,$(W.name),1),l("span",{class:"type-badge",style:Es(B(D(W.source)))},$(D(W.source)),5),W.replacesOrchestrator?(S(),C("span",_c,"REPLACES ORCH")):Q("",!0)]),l("div",wc,[(S(!0),C(ie,null,_e(W.triggers||[],te=>(S(),C("span",{key:te,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(te),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:W.source||""},$((W.source||"").split(/[\\/]/).pop()||""),9,Sc)])],10,gc)}),128))]))]),n.value?(S(),C("div",Cc,[l("div",Tc,[l("div",null,[l("h3",kc,"Edit: "+$(n.value.name),1),l("p",$c,$(n.value.source||"(unknown source)"),1)]),l("div",Ac,[a.value?(S(),C("span",Ec,$(a.value),1)):Q("",!0),c.value?(S(),C("span",Pc,$(c.value),1)):Q("",!0),D(n.value.source)==="user"?(S(),C("button",{key:2,onClick:le,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):Q("",!0),l("button",{onClick:H,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),l("button",{onClick:V,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Ic,[l("div",null,[N[13]||(N[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Mc)]),l("div",null,[N[14]||(N[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),me(l("input",{"onUpdate:modelValue":N[5]||(N[5]=W=>r.value=W),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[we,r.value]])]),l("div",Oc,[l("label",Rc,[me(l("input",{"onUpdate:modelValue":N[6]||(N[6]=W=>i.value=W),type:"checkbox",class:"rounded"},null,512),[[io,i.value]]),N[15]||(N[15]=l("span",null,"Replaces orchestrator",-1))])])]),me(l("textarea",{"onUpdate:modelValue":N[7]||(N[7]=W=>o.value=W),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[we,o.value]])])):Q("",!0)]))}}),jc={class:"animate-fade-in space-y-6"},Nc={class:"glass rounded-xl p-6"},Lc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Fc={class:"flex items-center gap-3"},Vc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Hc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Bc={class:"flex justify-end"},Kc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},zc={key:1,class:"text-center py-8 text-danger text-sm"},Jc={key:2,class:"text-center py-12 text-textSecondary"},qc={key:3},Gc={class:"space-y-3"},Yc={class:"p-4"},Zc={class:"flex flex-wrap items-center gap-3"},Qc=["onBlur"],Xc=["onDblclick"],eu={class:"text-xs text-muted font-mono"},tu=["value","onChange"],su=["value"],nu={class:"text-xs text-muted"},ou={class:"ml-auto flex items-center gap-3"},ru={class:"flex items-center gap-1.5"},iu=["onClick"],lu={class:"flex items-center gap-1.5"},au=["onClick"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du=["onClick"],fu=["onClick"],pu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},mu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},gu=["value"],xu={class:"flex items-center gap-2"},vu=["onClick","disabled"],yu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},bu={key:0,class:"text-xs text-muted py-1"},_u={class:"text-sm font-medium"},wu={class:"text-xs text-muted font-mono"},Su=["value","onChange"],Cu=["value"],Tu={class:"text-xs text-muted"},ku={class:"ml-auto flex items-center gap-3"},$u={key:0,class:"flex items-center gap-1.5"},Au=["onClick"],Eu={key:1,class:"flex items-center gap-1.5"},Pu=["onClick"],Iu=["onClick"],Mu={key:4},Ou={class:"space-y-2"},Ru={class:"font-medium"},Du={class:"text-xs text-muted font-mono"},ju={class:"text-xs text-textSecondary"},Nu={class:"text-xs text-muted"},Lu=["onClick"],Fu={key:5},Vu={class:"space-y-2"},Hu={class:"font-medium"},Uu={class:"text-xs text-muted font-mono"},Bu=["value","onChange"],Ku=["value"],Wu={class:"text-xs text-muted"},zu={class:"ml-auto flex items-center gap-3"},Ju={class:"flex items-center gap-1.5"},qu=["onClick"],Gu={class:"flex items-center gap-1.5"},Yu=["onClick"],Zu=["onClick"],Qu={key:6},Xu={class:"space-y-2"},ed={class:"font-medium"},td={class:"text-xs text-muted font-mono"},sd=["value","onChange"],nd=["value"],od={class:"text-xs text-muted"},rd=["onClick"],id=kt({__name:"ThreadsTab",setup(e){const t=j([]),s=j(!0),n=j(""),o=j({}),r=j(new Set),i=j(!1),a=j({name:"",threadId:0,client:"claude"}),c=j(""),h=j(!1),d=j(null),p=j(""),m=j(null),v=j({name:"",threadId:0,client:"claude"}),F=j(""),D=j(!1),B=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],E={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},H=Ke(()=>t.value.filter(L=>L.type==="root")),Z=Ke(()=>t.value.filter(L=>L.type==="daily")),V=Ke(()=>t.value.filter(L=>L.type==="branch")),le=Ke(()=>t.value.filter(L=>L.type==="worker"));async function de(){s.value=!0,n.value="";try{const L=await ye("/api/threads");t.value=L.threads??[]}catch(L){n.value=L.message||"Failed to load threads"}finally{s.value=!1}}async function J(L){try{const b=await ye(`/api/threads/${L}/children`);o.value[L]=b.threads??[]}catch{o.value[L]=[]}}function N(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function W(){if(!(!a.value.name.trim()||!a.value.threadId)){h.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1})});if(!L.ok){const b=await L.json().catch(()=>({error:L.statusText}));throw new Error(b.error??L.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude"},i.value=!1,setTimeout(()=>{c.value=""},3e3),await de()}catch(L){c.value="Error: "+L.message}finally{h.value=!1}}}async function fe(L){if(!(!v.value.name.trim()||!v.value.threadId)){D.value=!0,F.value="";try{const b=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:v.value.threadId,name:v.value.name.trim(),type:"branch",rootThreadId:L,client:v.value.client})});if(!b.ok){const x=await b.json().catch(()=>({error:b.statusText}));throw new Error(x.error??b.statusText)}F.value="Branch created ✓",v.value={name:"",threadId:0,client:"claude"},m.value=null,setTimeout(()=>{F.value=""},3e3),await de(),J(L)}catch(b){F.value="Error: "+b.message}finally{D.value=!1}}}function te(L){d.value=L.threadId,p.value=L.name}async function Se(L){const b=p.value.trim();if(d.value=null,!!b)try{const x=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({name:b})});if(!x.ok)throw new Error(x.statusText);await de()}catch(x){n.value="Failed to rename thread: "+x.message}}async function be(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle keep-alive: "+b.message}}async function Ue(L,b){try{const x=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({client:b})});if(!x.ok)throw new Error(x.statusText);await de()}catch(x){n.value="Failed to change agent type: "+x.message}}async function $t(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle daily rotation: "+b.message}}async function ge(L){try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to toggle autonomous mode: "+b.message}}async function se(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const b=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${Ce()}`}});if(!b.ok)throw new Error(b.statusText);await de()}catch(b){n.value="Failed to archive: "+b.message}}function X(L){if(!L)return"—";const b=new Date(L),M=Date.now()-b.getTime();return M<6e4?"just now":M<36e5?`${Math.floor(M/6e4)}m ago`:M<864e5?`${Math.floor(M/36e5)}h ago`:b.toLocaleDateString()}function Me(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return bt(de),(L,b)=>(S(),C("div",jc,[l("div",Nc,[l("div",Lc,[b[10]||(b[10]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Fc,[c.value?(S(),C("span",{key:0,class:G([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(c.value),3)):Q("",!0),l("button",{onClick:b[0]||(b[0]=x=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},$(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:de,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(S(),C("div",Vc,[l("div",Hc,[l("div",null,[b[11]||(b[11]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),me(l("input",{"onUpdate:modelValue":b[1]||(b[1]=x=>a.value.name=x),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[we,a.value.name]])]),l("div",null,[b[12]||(b[12]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),me(l("input",{"onUpdate:modelValue":b[2]||(b[2]=x=>a.value.threadId=x),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[we,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[b[13]||(b[13]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),me(l("select",{"onUpdate:modelValue":b[3]||(b[3]=x=>a.value.client=x),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(S(),C(ie,null,_e(B,x=>l("option",{key:x,value:x},$(x),9,Uc)),64))],512),[[ns,a.value.client]])])]),l("div",Bc,[l("button",{onClick:W,disabled:h.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(h.value?"Creating…":"Create Root Thread"),9,Kc)])])):Q("",!0)]),s.value&&t.value.length===0?(S(),C("div",Wc,"Loading threads…")):n.value?(S(),C("div",zc,$(n.value),1)):t.value.length===0?(S(),C("div",Jc,"No threads registered")):Q("",!0),H.value.length>0?(S(),C("div",qc,[b[19]||(b[19]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Gc,[(S(!0),C(ie,null,_e(H.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl overflow-hidden"},[l("div",Yc,[l("div",Zc,[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),d.value===x.threadId?me((S(),C("input",{key:0,"onUpdate:modelValue":b[4]||(b[4]=P=>p.value=P),onBlur:P=>Se(x.threadId),onKeyup:[b[5]||(b[5]=nn(P=>P.target.blur(),["enter"])),b[6]||(b[6]=nn(P=>d.value=null,["escape"]))],class:"font-semibold bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-40",ref_for:!0,ref:"nameInput"},null,40,Qc)),[[we,p.value]]):(S(),C("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:P=>te(x),title:"Double-click to rename"},$(x.name),41,Xc)),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",eu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,su)),64))],40,tu),l("span",nu,$(X(x.lastActiveAt)),1),l("div",ou,[l("div",ru,[l("button",{onClick:P=>be(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,iu),b[14]||(b[14]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",lu,[l("button",{onClick:P=>$t(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,au),b[15]||(b[15]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",cu,[l("button",{onClick:P=>ge(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),b[16]||(b[16]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>N(x.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},$(r.value.has(x.threadId)?"▾ Children":"▸ Children"),9,du),l("button",{onClick:P=>{m.value=m.value===x.threadId?null:x.threadId,v.value={name:"",threadId:0,client:"claude"},F.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,fu),l("button",{onClick:P=>se(x),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,pu)])]),m.value===x.threadId?(S(),C("div",hu,[l("div",mu,[me(l("input",{"onUpdate:modelValue":b[7]||(b[7]=P=>v.value.name=P),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[we,v.value.name]]),me(l("input",{"onUpdate:modelValue":b[8]||(b[8]=P=>v.value.threadId=P),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[we,v.value.threadId,void 0,{number:!0}]]),me(l("select",{"onUpdate:modelValue":b[9]||(b[9]=P=>v.value.client=P),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,gu)),64))],512),[[ns,v.value.client]])]),l("div",xu,[l("button",{onClick:P=>fe(x.threadId),disabled:D.value||!v.value.name.trim()||!v.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},$(D.value?"Creating…":"Create Branch"),9,vu),F.value?(S(),C("span",{key:0,class:G([F.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},$(F.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(x.threadId)&&o.value[x.threadId]?(S(),C("div",yu,[o.value[x.threadId].length===0?(S(),C("div",bu,"No children")):Q("",!0),(S(!0),C(ie,null,_e(o.value[x.threadId],P=>{var $e,ne;return S(),C("div",{key:P.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[l("span",{class:G(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",($e=E[P.type])==null?void 0:$e.classes])},$((ne=E[P.type])==null?void 0:ne.emoji)+" "+$(P.type.toUpperCase()),3),l("span",_u,$(P.name),1),l("span",{class:G(["text-xs",Me(P.status)])},$(P.status),3),l("span",wu,"ID: "+$(P.threadId),1),l("select",{value:P.client,onChange:Ae=>Ue(P,Ae.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(S(),C(ie,null,_e(B,Ae=>l("option",{key:Ae,value:Ae},$(Ae),9,Cu)),64))],40,Su),l("span",Tu,$(X(P.lastActiveAt)),1),l("div",ku,[P.type==="branch"?(S(),C("div",$u,[l("button",{onClick:Ae=>be(P),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",P.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",P.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Au),b[17]||(b[17]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),P.type==="branch"?(S(),C("div",Eu,[l("button",{onClick:Ae=>ge(P),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",P.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",P.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Pu),b[18]||(b[18]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),P.type!=="root"?(S(),C("button",{key:2,onClick:Ae=>se(P),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Iu)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),Z.value.length>0?(S(),C("div",Mu,[b[20]||(b[20]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",Ou,[(S(!0),C(ie,null,_e(Z.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Ru,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",Du,"ID: "+$(x.threadId),1),l("span",ju,$(x.client),1),l("span",Nu,$(X(x.lastActiveAt)),1),l("button",{onClick:P=>se(x),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Lu)])}),128))])])):Q("",!0),V.value.length>0?(S(),C("div",Fu,[b[23]||(b[23]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Vu,[(S(!0),C(ie,null,_e(V.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Hu,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",Uu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,Ku)),64))],40,Bu),l("span",Wu,$(X(x.lastActiveAt)),1),l("div",zu,[l("div",Ju,[l("button",{onClick:P=>be(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,qu),b[21]||(b[21]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",Gu,[l("button",{onClick:P=>ge(x),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Yu),b[22]||(b[22]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>se(x),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Zu)])])}),128))])])):Q("",!0),le.value.length>0?(S(),C("div",Qu,[b[24]||(b[24]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",Xu,[(S(!0),C(ie,null,_e(le.value,x=>{var M,k;return S(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(M=E[x.type])==null?void 0:M.classes])},$((k=E[x.type])==null?void 0:k.emoji)+" "+$(x.type.toUpperCase()),3),l("span",ed,$(x.name),1),l("span",{class:G(["text-xs font-medium",Me(x.status)])},$(x.status),3),l("span",td,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>Ue(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(S(),C(ie,null,_e(B,P=>l("option",{key:P,value:P},$(P),9,nd)),64))],40,sd),l("span",od,$(X(x.lastActiveAt)),1),l("button",{onClick:P=>se(x),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,rd)])}),128))])])):Q("",!0)]))}}),ld={class:"animate-fade-in"},ad={class:"glass rounded-xl p-6 mb-6"},cd={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},ud={class:"flex items-center gap-3"},dd=["disabled"],fd={key:0,class:"text-center py-8 text-textSecondary text-sm"},pd={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},md={class:"flex items-center gap-4"},gd={class:"flex justify-between text-xs text-muted mt-2"},xd={class:"font-mono"},vd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},yd={class:"glass rounded-xl p-4 border border-gray-700/50"},bd={class:"flex items-center gap-4"},_d={class:"flex justify-between text-xs text-muted mt-2"},wd={class:"font-mono"},Sd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Cd={class:"grid grid-cols-3 gap-4"},Td={class:"text-sm font-medium text-textSecondary"},kd=kt({__name:"SettingsTab",setup(e){const t=j(!0),s=j(!1),n=j(""),o=j(50),r=j(50),i=j(1440),a=j(1440),c=Ke(()=>o.value!==r.value||i.value!==a.value);async function h(){t.value=!0;try{const[p,m]=await Promise.all([ye("/api/settings/bootstrap-message-count"),ye("/api/settings/wait-timeout")]);o.value=p.count,r.value=p.count,i.value=m.minutes,a.value=m.minutes}finally{t.value=!1}}async function d(){s.value=!0,n.value="";try{const p={Authorization:`Bearer ${Ce()}`,"Content-Type":"application/json"},[m,v]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:p,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:p,body:JSON.stringify({minutes:i.value})})]);for(const B of[m,v])if(!B.ok){const E=await B.json().catch(()=>({error:B.statusText}));throw new Error(E.error??B.statusText)}const F=await m.json(),D=await v.json();r.value=F.count,o.value=F.count,a.value=D.minutes,i.value=D.minutes,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(p){n.value="Error: "+p.message}finally{s.value=!1}}return bt(h),(p,m)=>(S(),C("div",ld,[l("div",ad,[l("div",cd,[m[4]||(m[4]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",ud,[n.value?(S(),C("span",{key:0,class:G([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(n.value),3)):Q("",!0),l("button",{onClick:d,disabled:s.value||t.value||!c.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(s.value?"Saving…":"Save"),9,dd)])]),t.value?(S(),C("div",fd,"Loading…")):(S(),C("div",pd,[l("div",hd,[m[8]||(m[8]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),m[9]||(m[9]=l("p",{class:"text-xs text-textSecondary mb-3"},[gt(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),gt(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",md,[me(l("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[we,o.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":m[1]||(m[1]=v=>o.value=v),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[we,o.value,void 0,{number:!0}]])]),l("div",gd,[m[5]||(m[5]=l("span",null,"Off",-1)),l("span",xd,$(o.value)+" messages",1),m[6]||(m[6]=l("span",null,"Max",-1))]),o.value===0?(S(),C("div",vd,[...m[7]||(m[7]=[gt(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),gt(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):Q("",!0)]),l("div",yd,[m[12]||(m[12]=l("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),m[13]||(m[13]=l("p",{class:"text-xs text-textSecondary mb-3"},[gt(" Maximum time (in minutes) a single "),l("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),gt(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),l("div",bd,[me(l("input",{"onUpdate:modelValue":m[2]||(m[2]=v=>i.value=v),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[we,i.value,void 0,{number:!0}]]),me(l("input",{"onUpdate:modelValue":m[3]||(m[3]=v=>i.value=v),type:"number",min:"1",max:"10080",class:"w-24 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[we,i.value,void 0,{number:!0}]])]),l("div",_d,[m[10]||(m[10]=l("span",null,"1 min",-1)),l("span",wd,$(i.value>=60?Math.floor(i.value/60)+"h "+i.value%60+"m":i.value+" min"),1),m[11]||(m[11]=l("span",null,"24h",-1))])]),l("div",Sd,[m[17]||(m[17]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",Cd,[l("div",null,[m[14]||(m[14]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:G(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},$(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[m[15]||(m[15]=l("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),l("span",Td,$(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),l("div",null,[m[16]||(m[16]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:G(["text-sm font-medium",c.value?"text-warn":"text-textSecondary"])},$(c.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),$d={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Ad={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Ed=["disabled"],Pd={key:0,class:"mt-3 text-sm text-danger"},Id={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Md={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Od={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Rd={class:"flex items-center gap-4"},Dd={class:"text-sm text-textSecondary font-mono"},jd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Nd={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Ld={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Fd={class:"text-2xl font-bold font-mono"},Vd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Hd={class:"text-2xl font-bold font-mono"},Ud={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Bd={class:"text-2xl font-bold font-mono"},Kd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Wd={class:"flex items-center gap-2 mb-2"},zd={class:"text-2xl font-bold font-mono"},Jd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},qd={class:"text-2xl font-bold font-mono"},Gd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Yd={class:"text-2xl font-bold font-mono"},Zd={class:"max-w-7xl mx-auto px-4 sm:px-6"},Qd={class:"flex gap-6 border-b border-gray-800/50 mb-6"},Xd=["onClick"],ef={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ds="sensorium_token",tf=kt({__name:"App",setup(e){const t=j(!1),s=j(""),n=j(""),o=j(!1),r=j(null),i=j("sessions");let a=null;const c=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"settings",label:"Settings"}],h={sessions:na,notes:_a,templates:nc,skills:Dc,threads:id,settings:kd},d=Ke(()=>h[i.value]),p=Ke(()=>{if(!r.value)return"—";const B=Math.floor(r.value.uptime),E=Math.floor(B/86400),H=Math.floor(B%86400/3600),Z=Math.floor(B%3600/60);return E>0?`${E}d ${H}h`:H>0?`${H}h ${Z}m`:`${Z}m`});async function m(){const B=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Bt(B),await F(),localStorage.setItem(ds,B),t.value=!0,D()}catch(E){const H=E;H.status===401?n.value="Invalid token":n.value=H.message??"Connection failed",Bt("")}finally{o.value=!1}}function v(){localStorage.removeItem(ds),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Bt("")}async function F(){r.value=await ye("/api/status")}function D(){a&&clearInterval(a),a=setInterval(F,3e4)}return bt(async()=>{const B=localStorage.getItem(ds);if(B){s.value=B;try{Bt(B),await F(),t.value=!0,D()}catch{localStorage.removeItem(ds),Bt("")}}}),yn(()=>{a&&clearInterval(a)}),(B,E)=>{var H,Z,V,le,de,J,N,W,fe,te,Se;return t.value?(S(),C("div",Id,[l("header",Md,[l("div",Od,[E[3]||(E[3]=Be('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),l("div",Rd,[E[2]||(E[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Dd,$(p.value),1),l("button",{onClick:v,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",jd,[l("div",Nd,[l("div",Ld,[E[4]||(E[4]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),l("div",Fd,$(((H=r.value)==null?void 0:H.activeSessions)??0),1)]),l("div",Vd,[E[5]||(E[5]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),l("div",Hd,$(((V=(Z=r.value)==null?void 0:Z.memory)==null?void 0:V.totalSemanticNotes)??0),1)]),l("div",Ud,[E[6]||(E[6]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),l("div",Bd,$(((de=(le=r.value)==null?void 0:le.memory)==null?void 0:de.totalEpisodes)??0),1)]),l("div",Kd,[l("div",Wd,[l("span",{class:G((((N=(J=r.value)==null?void 0:J.memory)==null?void 0:N.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...E[7]||(E[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),E[8]||(E[8]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",zd,$(((fe=(W=r.value)==null?void 0:W.memory)==null?void 0:fe.unconsolidatedEpisodes)??0),1)]),l("div",Jd,[E[9]||(E[9]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",qd,$(((Se=(te=r.value)==null?void 0:te.memory)==null?void 0:Se.totalProcedures)??0),1)]),l("div",Gd,[E[10]||(E[10]=Be('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),l("div",Yd,$(p.value),1)])])]),l("div",Zd,[l("nav",Qd,[(S(),C(ie,null,_e(c,be=>l("button",{key:be.id,onClick:Ue=>i.value=be.id,class:G(["pb-3 text-sm font-medium transition",i.value===be.id?"tab-active":"tab-inactive"])},$(be.label),11,Xd)),64))])]),l("div",ef,[(S(),ur($i(d.value),{status:r.value},null,8,["status"]))])])):(S(),C("div",$d,[l("div",Ad,[E[1]||(E[1]=Be('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),me(l("input",{"onUpdate:modelValue":E[0]||(E[0]=be=>s.value=be),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:nn(m,["enter"])},null,544),[[we,s.value]]),l("button",{onClick:m,disabled:o.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},$(o.value?"Connecting...":"Connect"),9,Ed),n.value?(S(),C("p",Pd,$(n.value),1)):Q("",!0)])]))}}});Vl(tf).mount("#app");</script>
|
|
71
|
+
`,te+de}async function F(){if(!n.value)return;const J=n.value.name;try{const M=r.value.split(",").map(Se=>Se.trim()).filter(Boolean),K=o.value;let de;K.trimStart().startsWith("---")?de=K:de=W(J,M,i.value,K);const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:de})});if(!te.ok)throw new Error(te.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await V()}catch(M){a.value="Error: "+M.message}}async function re(){if(!n.value)return;const J=n.value.name;try{const M=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!M.ok)throw new Error(M.statusText);L(),await V()}catch(M){c.value="Error: "+M.message}}async function we(){const J=d.value.trim(),M=p.value;if(!J){k.value="Name is required";return}const K=M.split(",").map(te=>te.trim()).filter(Boolean);if(!K.length){k.value="At least one trigger is required";return}const de=W(J,K,m.value,`\x3C!-- Write your skill instructions here -->
|
|
72
|
+
`);try{const te=await fetch(`/api/skills/${encodeURIComponent(J)}`,{method:"PUT",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({content:de})});if(!te.ok)throw new Error(te.statusText);k.value="Created ✓",h.value=!1,await V();const Se=t.value.find(ke=>ke.name===J);Se&&O(Se)}catch(te){k.value="Error: "+te.message}}return wt(V),(J,M)=>(_(),C("div",rc,[l("div",ic,[l("div",lc,[M[8]||(M[8]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Skill Library"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),l("button",{onClick:M[0]||(M[0]=K=>{h.value=!h.value,n.value=null}),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"}," + New Skill ")]),h.value?(_(),C("div",ac,[M[12]||(M[12]=l("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),l("div",cc,[l("div",null,[M[9]||(M[9]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),le(l("input",{"onUpdate:modelValue":M[1]||(M[1]=K=>d.value=K),type:"text",placeholder:"my-skill",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono focus:outline-none focus:border-accent transition"},null,512),[[he,d.value]])]),l("div",null,[M[10]||(M[10]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(l("input",{"onUpdate:modelValue":M[2]||(M[2]=K=>p.value=K),type:"text",placeholder:"trigger1, trigger2",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[he,p.value]])])]),l("div",uc,[l("label",dc,[le(l("input",{"onUpdate:modelValue":M[3]||(M[3]=K=>m.value=K),type:"checkbox",class:"rounded"},null,512),[[lo,m.value]]),M[11]||(M[11]=l("span",null,"Replaces orchestrator",-1))])]),l("div",fc,[l("button",{onClick:we,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),l("button",{onClick:M[4]||(M[4]=K=>h.value=!1),class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Cancel"),k.value?(_(),C("span",pc,$(k.value),1)):Q("",!0)])])):Q("",!0),s.value?(_(),C("div",hc,"Loading...")):t.value.length===0?(_(),C("div",mc,"No skills loaded")):(_(),C("div",gc,[(_(!0),C(oe,null,be(t.value,K=>{var de;return _(),C("div",{key:K.name,onClick:te=>O(K),class:Y(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((de=n.value)==null?void 0:de.name)===K.name?"border-accent":"border-transparent"])},[l("div",vc,[l("div",yc,[l("div",bc,[l("span",_c,$(K.name),1),l("span",{class:"type-badge",style:Is(H(A(K.source)))},$(A(K.source)),5),K.replacesOrchestrator?(_(),C("span",wc,"REPLACES ORCH")):Q("",!0)]),l("div",Sc,[(_(!0),C(oe,null,be(K.triggers||[],te=>(_(),C("span",{key:te,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},$(te),1))),128))])]),l("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:K.source||""},$((K.source||"").split(/[\\/]/).pop()||""),9,Cc)])],10,xc)}),128))]))]),n.value?(_(),C("div",kc,[l("div",Tc,[l("div",null,[l("h3",$c,"Edit: "+$(n.value.name),1),l("p",Ac,$(n.value.source||"(unknown source)"),1)]),l("div",Ec,[a.value?(_(),C("span",Pc,$(a.value),1)):Q("",!0),c.value?(_(),C("span",Ic,$(c.value),1)):Q("",!0),A(n.value.source)==="user"?(_(),C("button",{key:2,onClick:re,class:"px-4 py-2 rounded-xl bg-card hover:bg-red-900/40 border border-gray-700 hover:border-red-700 text-sm text-textSecondary hover:text-red-400 transition",title:"Remove user override (reverts to default)"},"Remove override")):Q("",!0),l("button",{onClick:L,class:"px-4 py-2 rounded-xl bg-card hover:bg-cardHover border border-gray-700 text-sm text-textSecondary hover:text-textPrimary transition"},"Close"),l("button",{onClick:F,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),l("div",Mc,[l("div",null,[M[13]||(M[13]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),l("input",{value:n.value.name,type:"text",readonly:"",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono opacity-60 cursor-not-allowed"},null,8,Oc)]),l("div",null,[M[14]||(M[14]=l("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(l("input",{"onUpdate:modelValue":M[5]||(M[5]=K=>r.value=K),type:"text",class:"w-full px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},null,512),[[he,r.value]])]),l("div",Dc,[l("label",Rc,[le(l("input",{"onUpdate:modelValue":M[6]||(M[6]=K=>i.value=K),type:"checkbox",class:"rounded"},null,512),[[lo,i.value]]),M[15]||(M[15]=l("span",null,"Replaces orchestrator",-1))])])]),le(l("textarea",{"onUpdate:modelValue":M[7]||(M[7]=K=>o.value=K),rows:"20",spellcheck:"false",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary font-mono text-sm leading-relaxed focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition resize-y",placeholder:"Skill body (markdown)..."},null,512),[[he,o.value]])])):Q("",!0)]))}}),Nc={class:"animate-fade-in space-y-6"},Lc={class:"glass rounded-xl p-6"},Fc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Vc={class:"flex items-center gap-3"},Hc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Uc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Bc=["value"],Kc={class:"flex justify-end"},Wc=["disabled"],zc={key:0,class:"text-center py-12 text-textSecondary"},Jc={key:1,class:"text-center py-8 text-danger text-sm"},qc={key:2,class:"text-center py-12 text-textSecondary"},Gc={key:3},Yc={class:"space-y-3"},Zc={class:"p-4"},Qc={class:"flex flex-wrap items-center gap-3"},Xc=["onBlur"],eu=["onDblclick"],tu={class:"text-xs text-muted font-mono"},su=["value","onChange"],nu=["value"],ou={class:"text-xs text-muted"},ru=["onKeyup","onBlur"],iu=["title","onDblclick"],lu={class:"ml-auto flex items-center gap-3"},au={class:"flex items-center gap-1.5"},cu=["onClick"],uu={class:"flex items-center gap-1.5"},du=["onClick"],fu={class:"flex items-center gap-1.5"},pu=["onClick"],hu=["onClick"],mu=["onClick"],gu=["onClick"],xu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},vu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},yu=["value"],bu={class:"flex items-center gap-2"},_u=["onClick","disabled"],wu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},Su={key:0,class:"text-xs text-muted py-1"},Cu={class:"text-sm font-medium"},ku={class:"text-xs text-muted font-mono"},Tu=["value","onChange"],$u=["value"],Au={class:"text-xs text-muted"},Eu={class:"ml-auto flex items-center gap-3"},Pu={key:0,class:"flex items-center gap-1.5"},Iu=["onClick"],Mu={key:1,class:"flex items-center gap-1.5"},Ou=["onClick"],Du=["onClick"],Ru={key:4},ju={class:"space-y-2"},Nu={class:"font-medium"},Lu={class:"text-xs text-muted font-mono"},Fu={class:"text-xs text-textSecondary"},Vu={class:"text-xs text-muted"},Hu=["onClick"],Uu={key:5},Bu={class:"space-y-2"},Ku={class:"font-medium"},Wu={class:"text-xs text-muted font-mono"},zu=["value","onChange"],Ju=["value"],qu={class:"text-xs text-muted"},Gu={class:"ml-auto flex items-center gap-3"},Yu={class:"flex items-center gap-1.5"},Zu=["onClick"],Qu={class:"flex items-center gap-1.5"},Xu=["onClick"],ed=["onClick"],td={key:6},sd={class:"space-y-2"},nd={class:"font-medium"},od={class:"text-xs text-muted font-mono"},rd=["value","onChange"],id=["value"],ld={class:"text-xs text-muted"},ad=["onClick"],cd=At({__name:"ThreadsTab",setup(e){const t=j([]),s=j(!0),n=j(""),o=j({}),r=j(new Set),i=j(!1),a=j({name:"",threadId:0,client:"claude",workingDirectory:""}),c=j(""),h=j(!1),d=j(null),p=j(""),m=j(null),k=j(""),V=j(null),A=j({name:"",threadId:0,client:"claude",workingDirectory:""}),H=j(""),O=j(!1),L=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],W={root:{emoji:"🟢",classes:"bg-green-500/20 text-green-400 border-green-500/30"},daily:{emoji:"🔵",classes:"bg-blue-500/20 text-blue-400 border-blue-500/30"},branch:{emoji:"🟣",classes:"bg-purple-500/20 text-purple-400 border-purple-500/30"},worker:{emoji:"🟡",classes:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30"}},F=Be(()=>t.value.filter(g=>g.type==="root")),re=Be(()=>t.value.filter(g=>g.type==="daily")),we=Be(()=>t.value.filter(g=>g.type==="branch")),J=Be(()=>t.value.filter(g=>g.type==="worker"));async function M(){s.value=!0,n.value="";try{const g=await ve("/api/threads");t.value=g.threads??[]}catch(g){n.value=g.message||"Failed to load threads"}finally{s.value=!1}}async function K(g){try{const y=await ve(`/api/threads/${g}/children`);o.value[g]=y.threads??[]}catch{o.value[g]=[]}}function de(g){r.value.has(g)?r.value.delete(g):(r.value.add(g),K(g))}async function te(){if(!(!a.value.name.trim()||!a.value.threadId)){h.value=!0,c.value="";try{const g=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:a.value.threadId,name:a.value.name.trim(),type:"root",client:a.value.client,keepAlive:!1,...a.value.workingDirectory.trim()?{workingDirectory:a.value.workingDirectory.trim()}:{}})});if(!g.ok){const y=await g.json().catch(()=>({error:g.statusText}));throw new Error(y.error??g.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude",workingDirectory:""},i.value=!1,setTimeout(()=>{c.value=""},3e3),await M()}catch(g){c.value="Error: "+g.message}finally{h.value=!1}}}async function Se(g){if(!(!A.value.name.trim()||!A.value.threadId)){O.value=!0,H.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:A.value.threadId,name:A.value.name.trim(),type:"branch",rootThreadId:g,client:A.value.client,...A.value.workingDirectory.trim()?{workingDirectory:A.value.workingDirectory.trim()}:{}})});if(!y.ok){const x=await y.json().catch(()=>({error:y.statusText}));throw new Error(x.error??y.statusText)}H.value="Branch created ✓",A.value={name:"",threadId:0,client:"claude",workingDirectory:""},V.value=null,setTimeout(()=>{H.value=""},3e3),await M(),K(g)}catch(y){H.value="Error: "+y.message}finally{O.value=!1}}}function ke(g){d.value=g.threadId,p.value=g.name}async function mt(g){const y=p.value.trim();if(d.value=null,!!y)try{const x=await fetch(`/api/threads/${g}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!x.ok)throw new Error(x.statusText);await M()}catch(x){n.value="Failed to rename thread: "+x.message}}function Et(g){m.value=g.threadId,k.value=g.workingDirectory??""}async function ge(g){const y=k.value.trim();m.value=null;try{const x=await fetch(`/api/threads/${g}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:y||null})});if(!x.ok)throw new Error(x.statusText);await M()}catch(x){n.value="Failed to update working directory: "+x.message}}async function ie(g){try{const y=await fetch(`/api/threads/${g.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!g.keepAlive})});if(!y.ok)throw new Error(y.statusText);await M()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function X(g,y){try{const x=await fetch(`/api/threads/${g.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!x.ok)throw new Error(x.statusText);await M()}catch(x){n.value="Failed to change agent type: "+x.message}}async function He(g){try{const y=await fetch(`/api/threads/${g.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!g.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await M()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function ze(g){try{const y=await fetch(`/api/threads/${g.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!g.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await M()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function Ie(g){if(confirm(`Archive thread "${g.name}" (${g.threadId})?`))try{const y=await fetch(`/api/threads/${g.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${_e()}`}});if(!y.ok)throw new Error(y.statusText);await M()}catch(y){n.value="Failed to archive: "+y.message}}function Ce(g){if(!g)return"—";const y=new Date(g),q=Date.now()-y.getTime();return q<6e4?"just now":q<36e5?`${Math.floor(q/6e4)}m ago`:q<864e5?`${Math.floor(q/36e5)}h ago`:y.toLocaleDateString()}function N(g){return g==="active"?"text-success":g==="archived"?"text-muted":"text-warn"}return wt(M),(g,y)=>(_(),C("div",Nc,[l("div",Lc,[l("div",Fc,[y[14]||(y[14]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Thread Registry"),l("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),l("div",Vc,[c.value?(_(),C("span",{key:0,class:Y([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(c.value),3)):Q("",!0),l("button",{onClick:y[0]||(y[0]=x=>i.value=!i.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},$(i.value?"Cancel":"+ New Root Thread"),1),l("button",{onClick:M,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),i.value?(_(),C("div",Hc,[l("div",Uc,[l("div",null,[y[15]||(y[15]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),le(l("input",{"onUpdate:modelValue":y[1]||(y[1]=x=>a.value.name=x),type:"text",placeholder:"e.g. Main Workspace",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[he,a.value.name]])]),l("div",null,[y[16]||(y[16]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),le(l("input",{"onUpdate:modelValue":y[2]||(y[2]=x=>a.value.threadId=x),type:"number",min:"1",placeholder:"Telegram thread ID",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[he,a.value.threadId,void 0,{number:!0}]])]),l("div",null,[y[17]||(y[17]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),le(l("select",{"onUpdate:modelValue":y[3]||(y[3]=x=>a.value.client=x),class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(_(),C(oe,null,be(L,x=>l("option",{key:x,value:x},$(x),9,Bc)),64))],512),[[rs,a.value.client]])])]),l("div",null,[y[18]||(y[18]=l("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),le(l("input",{"onUpdate:modelValue":y[4]||(y[4]=x=>a.value.workingDirectory=x),type:"text",placeholder:"e.g. C:\\src\\my-project",class:"w-full px-3 py-2 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[he,a.value.workingDirectory]])]),l("div",Kc,[l("button",{onClick:te,disabled:h.value||!a.value.name.trim()||!a.value.threadId,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(h.value?"Creating…":"Create Root Thread"),9,Wc)])])):Q("",!0)]),s.value&&t.value.length===0?(_(),C("div",zc,"Loading threads…")):n.value?(_(),C("div",Jc,$(n.value),1)):t.value.length===0?(_(),C("div",qc,"No threads registered")):Q("",!0),F.value.length>0?(_(),C("div",Gc,[y[24]||(y[24]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),l("div",Yc,[(_(!0),C(oe,null,be(F.value,x=>{var q,ye;return _(),C("div",{key:x.id,class:"glass rounded-xl overflow-hidden"},[l("div",Zc,[l("div",Qc,[l("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(q=W[x.type])==null?void 0:q.classes])},$((ye=W[x.type])==null?void 0:ye.emoji)+" "+$(x.type.toUpperCase()),3),d.value===x.threadId?le((_(),C("input",{key:0,"onUpdate:modelValue":y[5]||(y[5]=P=>p.value=P),onBlur:P=>mt(x.threadId),onKeyup:[y[6]||(y[6]=zt(P=>P.target.blur(),["enter"])),y[7]||(y[7]=zt(P=>d.value=null,["escape"]))],class:"font-semibold bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-40",ref_for:!0,ref:"nameInput"},null,40,Xc)),[[he,p.value]]):(_(),C("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:P=>ke(x),title:"Double-click to rename"},$(x.name),41,eu)),l("span",{class:Y(["text-xs font-medium",N(x.status)])},$(x.status),3),l("span",tu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>X(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(_(),C(oe,null,be(L,P=>l("option",{key:P,value:P},$(P),9,nu)),64))],40,su),l("span",ou,$(Ce(x.lastActiveAt)),1),m.value===x.threadId?le((_(),C("input",{key:2,"onUpdate:modelValue":y[8]||(y[8]=P=>k.value=P),onKeyup:[zt(P=>ge(x.threadId),["enter"]),y[9]||(y[9]=zt(P=>m.value=null,["escape"]))],onBlur:P=>ge(x.threadId),type:"text",placeholder:"Set working directory…",class:"text-xs font-mono bg-card border border-accent rounded px-1 py-0 text-textPrimary focus:outline-none w-48"},null,40,ru)),[[he,k.value]]):(_(),C("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(x.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:P=>Et(x)},"📁 "+$(x.workingDirectory??"—"),41,iu)),l("div",lu,[l("div",au,[l("button",{onClick:P=>ie(x),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,cu),y[19]||(y[19]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",uu,[l("button",{onClick:P=>He(x),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,du),y[20]||(y[20]=l("span",{class:"text-xs text-muted"},"Daily",-1))]),l("div",fu,[l("button",{onClick:P=>ze(x),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,pu),y[21]||(y[21]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>de(x.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},$(r.value.has(x.threadId)?"▾ Children":"▸ Children"),9,hu),l("button",{onClick:P=>{V.value=V.value===x.threadId?null:x.threadId,A.value={name:"",threadId:0,client:"claude"},H.value=""},class:"px-2 py-1 rounded-lg text-xs bg-purple-500/20 text-purple-400 border border-purple-500/30 hover:bg-purple-500/30 transition"}," + Branch ",8,mu),l("button",{onClick:P=>Ie(x),class:"px-2 py-1 rounded-lg text-xs bg-red-500/20 text-red-400 border border-red-500/30 hover:bg-red-500/30 transition"}," Archive ",8,gu)])]),V.value===x.threadId?(_(),C("div",xu,[l("div",vu,[le(l("input",{"onUpdate:modelValue":y[10]||(y[10]=P=>A.value.name=P),type:"text",placeholder:"Branch name",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[he,A.value.name]]),le(l("input",{"onUpdate:modelValue":y[11]||(y[11]=P=>A.value.threadId=P),type:"number",min:"1",placeholder:"Thread ID",class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition"},null,512),[[he,A.value.threadId,void 0,{number:!0}]]),le(l("select",{"onUpdate:modelValue":y[12]||(y[12]=P=>A.value.client=P),class:"px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition appearance-none"},[(_(),C(oe,null,be(L,P=>l("option",{key:P,value:P},$(P),9,yu)),64))],512),[[rs,A.value.client]])]),le(l("input",{"onUpdate:modelValue":y[13]||(y[13]=P=>A.value.workingDirectory=P),type:"text",placeholder:"Working directory (optional)",class:"w-full px-3 py-1.5 rounded-lg bg-card border border-gray-700 text-sm text-textPrimary placeholder-muted focus:outline-none focus:border-accent transition font-mono"},null,512),[[he,A.value.workingDirectory]]),l("div",bu,[l("button",{onClick:P=>Se(x.threadId),disabled:O.value||!A.value.name.trim()||!A.value.threadId,class:"px-3 py-1.5 rounded-lg bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-xs font-medium transition"},$(O.value?"Creating…":"Create Branch"),9,_u),H.value?(_(),C("span",{key:0,class:Y([H.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},$(H.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(x.threadId)&&o.value[x.threadId]?(_(),C("div",wu,[o.value[x.threadId].length===0?(_(),C("div",Su,"No children")):Q("",!0),(_(!0),C(oe,null,be(o.value[x.threadId],P=>{var gt,Ls;return _(),C("div",{key:P.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[l("span",{class:Y(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(gt=W[P.type])==null?void 0:gt.classes])},$((Ls=W[P.type])==null?void 0:Ls.emoji)+" "+$(P.type.toUpperCase()),3),l("span",Cu,$(P.name),1),l("span",{class:Y(["text-xs",N(P.status)])},$(P.status),3),l("span",ku,"ID: "+$(P.threadId),1),l("select",{value:P.client,onChange:u=>X(P,u.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(_(),C(oe,null,be(L,u=>l("option",{key:u,value:u},$(u),9,$u)),64))],40,Tu),l("span",Au,$(Ce(P.lastActiveAt)),1),l("div",Eu,[P.type==="branch"?(_(),C("div",Pu,[l("button",{onClick:u=>ie(P),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",P.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",P.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Iu),y[22]||(y[22]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),P.type==="branch"?(_(),C("div",Mu,[l("button",{onClick:u=>ze(P),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",P.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",P.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Ou),y[23]||(y[23]=l("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),P.type!=="root"?(_(),C("button",{key:2,onClick:u=>Ie(P),class:"px-2 py-0.5 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Du)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),re.value.length>0?(_(),C("div",Ru,[y[25]||(y[25]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),l("div",ju,[(_(!0),C(oe,null,be(re.value,x=>{var q,ye;return _(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(q=W[x.type])==null?void 0:q.classes])},$((ye=W[x.type])==null?void 0:ye.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Nu,$(x.name),1),l("span",{class:Y(["text-xs font-medium",N(x.status)])},$(x.status),3),l("span",Lu,"ID: "+$(x.threadId),1),l("span",Fu,$(x.client),1),l("span",Vu,$(Ce(x.lastActiveAt)),1),l("button",{onClick:P=>Ie(x),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,Hu)])}),128))])])):Q("",!0),we.value.length>0?(_(),C("div",Uu,[y[28]||(y[28]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),l("div",Bu,[(_(!0),C(oe,null,be(we.value,x=>{var q,ye;return _(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(q=W[x.type])==null?void 0:q.classes])},$((ye=W[x.type])==null?void 0:ye.emoji)+" "+$(x.type.toUpperCase()),3),l("span",Ku,$(x.name),1),l("span",{class:Y(["text-xs font-medium",N(x.status)])},$(x.status),3),l("span",Wu,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>X(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(_(),C(oe,null,be(L,P=>l("option",{key:P,value:P},$(P),9,Ju)),64))],40,zu),l("span",qu,$(Ce(x.lastActiveAt)),1),l("div",Gu,[l("div",Yu,[l("button",{onClick:P=>ie(x),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Zu),y[26]||(y[26]=l("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),l("div",Qu,[l("button",{onClick:P=>ze(x),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",x.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[l("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",x.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Xu),y[27]||(y[27]=l("span",{class:"text-xs text-muted"},"Auto",-1))]),l("button",{onClick:P=>Ie(x),class:"px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,ed)])])}),128))])])):Q("",!0),J.value.length>0?(_(),C("div",td,[y[29]||(y[29]=l("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),l("div",sd,[(_(!0),C(oe,null,be(J.value,x=>{var q,ye;return _(),C("div",{key:x.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[l("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(q=W[x.type])==null?void 0:q.classes])},$((ye=W[x.type])==null?void 0:ye.emoji)+" "+$(x.type.toUpperCase()),3),l("span",nd,$(x.name),1),l("span",{class:Y(["text-xs font-medium",N(x.status)])},$(x.status),3),l("span",od,"ID: "+$(x.threadId),1),l("select",{value:x.client,onChange:P=>X(x,P.target.value),class:"px-2 py-0.5 rounded-lg bg-card border border-gray-700 text-xs text-textPrimary focus:outline-none focus:border-accent transition appearance-none cursor-pointer",title:"Agent type"},[(_(),C(oe,null,be(L,P=>l("option",{key:P,value:P},$(P),9,id)),64))],40,rd),l("span",ld,$(Ce(x.lastActiveAt)),1),l("button",{onClick:P=>Ie(x),class:"ml-auto px-2 py-1 rounded-lg text-xs bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition"}," Archive ",8,ad)])}),128))])])):Q("",!0)]))}}),ud={class:"animate-fade-in"},dd={class:"glass rounded-xl p-6 mb-6"},fd={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},pd={class:"flex items-center gap-3"},hd=["disabled"],md={key:0,class:"text-center py-8 text-textSecondary text-sm"},gd={key:1,class:"space-y-6"},xd={class:"glass rounded-xl p-4 border border-gray-700/50"},vd={class:"flex items-center gap-4"},yd={class:"flex justify-between text-xs text-muted mt-2"},bd={class:"font-mono"},_d={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},wd={class:"glass rounded-xl p-4 border border-gray-700/50"},Sd={class:"flex items-center gap-4"},Cd={class:"flex justify-between text-xs text-muted mt-2"},kd={class:"font-mono"},Td={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},$d={class:"grid grid-cols-3 gap-4"},Ad={class:"text-sm font-medium text-textSecondary"},Ed=At({__name:"SettingsTab",setup(e){const t=j(!0),s=j(!1),n=j(""),o=j(50),r=j(50),i=j(1440),a=j(1440),c=Be(()=>o.value!==r.value||i.value!==a.value);async function h(){t.value=!0;try{const[p,m]=await Promise.all([ve("/api/settings/bootstrap-message-count"),ve("/api/settings/wait-timeout")]);o.value=p.count,r.value=p.count,i.value=m.minutes,a.value=m.minutes}finally{t.value=!1}}async function d(){s.value=!0,n.value="";try{const p={Authorization:`Bearer ${_e()}`,"Content-Type":"application/json"},[m,k]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:p,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:p,body:JSON.stringify({minutes:i.value})})]);for(const H of[m,k])if(!H.ok){const O=await H.json().catch(()=>({error:H.statusText}));throw new Error(O.error??H.statusText)}const V=await m.json(),A=await k.json();r.value=V.count,o.value=V.count,a.value=A.minutes,i.value=A.minutes,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch(p){n.value="Error: "+p.message}finally{s.value=!1}}return wt(h),(p,m)=>(_(),C("div",ud,[l("div",dd,[l("div",fd,[m[4]||(m[4]=l("div",null,[l("h3",{class:"text-lg font-semibold"},"Settings"),l("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),l("div",pd,[n.value?(_(),C("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},$(n.value),3)):Q("",!0),l("button",{onClick:d,disabled:s.value||t.value||!c.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},$(s.value?"Saving…":"Save"),9,hd)])]),t.value?(_(),C("div",md,"Loading…")):(_(),C("div",gd,[l("div",xd,[m[8]||(m[8]=l("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),m[9]||(m[9]=l("p",{class:"text-xs text-textSecondary mb-3"},[vt(" Number of recent messages injected into the agent's bootstrap context. Set to "),l("span",{class:"font-mono text-accentLight"},"0"),vt(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),l("div",vd,[le(l("input",{"onUpdate:modelValue":m[0]||(m[0]=k=>o.value=k),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[he,o.value,void 0,{number:!0}]]),le(l("input",{"onUpdate:modelValue":m[1]||(m[1]=k=>o.value=k),type:"number",min:"0",max:"200",class:"w-20 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[he,o.value,void 0,{number:!0}]])]),l("div",yd,[m[5]||(m[5]=l("span",null,"Off",-1)),l("span",bd,$(o.value)+" messages",1),m[6]||(m[6]=l("span",null,"Max",-1))]),o.value===0?(_(),C("div",_d,[...m[7]||(m[7]=[vt(" Message buffer injection is ",-1),l("strong",null,"disabled",-1),vt(". The agent will not see recent conversation history in its bootstrap context. Use this when VS Code (or another IDE) already provides conversation history. ",-1)])])):Q("",!0)]),l("div",wd,[m[12]||(m[12]=l("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),m[13]||(m[13]=l("p",{class:"text-xs text-textSecondary mb-3"},[vt(" Maximum time (in minutes) a single "),l("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),vt(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),l("div",Sd,[le(l("input",{"onUpdate:modelValue":m[2]||(m[2]=k=>i.value=k),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[he,i.value,void 0,{number:!0}]]),le(l("input",{"onUpdate:modelValue":m[3]||(m[3]=k=>i.value=k),type:"number",min:"1",max:"10080",class:"w-24 px-3 py-2 rounded-lg bg-surface border border-gray-700 text-sm text-textPrimary font-mono text-center focus:outline-none focus:border-accent transition"},null,512),[[he,i.value,void 0,{number:!0}]])]),l("div",Cd,[m[10]||(m[10]=l("span",null,"1 min",-1)),l("span",kd,$(i.value>=60?Math.floor(i.value/60)+"h "+i.value%60+"m":i.value+" min"),1),m[11]||(m[11]=l("span",null,"24h",-1))])]),l("div",Td,[m[17]||(m[17]=l("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),l("div",$d,[l("div",null,[m[14]||(m[14]=l("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),l("span",{class:Y(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},$(r.value>0?`${r.value} messages`:"Disabled"),3)]),l("div",null,[m[15]||(m[15]=l("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),l("span",Ad,$(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),l("div",null,[m[16]||(m[16]=l("div",{class:"text-xs text-muted mb-1"},"Status",-1)),l("span",{class:Y(["text-sm font-medium",c.value?"text-warn":"text-textSecondary"])},$(c.value?"Unsaved changes":"Saved"),3)])])])]))])]))}}),Pd={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Id={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Md=["disabled"],Od={key:0,class:"mt-3 text-sm text-danger"},Dd={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Rd={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},jd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Nd={class:"flex items-center gap-4"},Ld={class:"text-sm text-textSecondary font-mono"},Fd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Vd={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Hd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Ud={class:"text-2xl font-bold font-mono"},Bd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Kd={class:"text-2xl font-bold font-mono"},Wd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},zd={class:"text-2xl font-bold font-mono"},Jd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},qd={class:"flex items-center gap-2 mb-2"},Gd={class:"text-2xl font-bold font-mono"},Yd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Zd={class:"text-2xl font-bold font-mono"},Qd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Xd={class:"text-2xl font-bold font-mono"},ef={class:"max-w-7xl mx-auto px-4 sm:px-6"},tf={class:"flex gap-6 border-b border-gray-800/50 mb-6"},sf=["onClick"],nf={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ps="sensorium_token",of=At({__name:"App",setup(e){const t=j(!1),s=j(""),n=j(""),o=j(!1),r=j(null),i=j("sessions");let a=null;const c=[{id:"sessions",label:"Sessions"},{id:"notes",label:"Memory Notes"},{id:"templates",label:"Templates"},{id:"skills",label:"Skills"},{id:"threads",label:"Threads"},{id:"settings",label:"Settings"}],h={sessions:oa,notes:wa,templates:oc,skills:jc,threads:cd,settings:Ed},d=Be(()=>h[i.value]),p=Be(()=>{if(!r.value)return"—";const H=Math.floor(r.value.uptime),O=Math.floor(H/86400),L=Math.floor(H%86400/3600),W=Math.floor(H%3600/60);return O>0?`${O}d ${L}h`:L>0?`${L}h ${W}m`:`${W}m`});async function m(){const H=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Kt(H),await V(),localStorage.setItem(ps,H),t.value=!0,A()}catch(O){const L=O;L.status===401?n.value="Invalid token":n.value=L.message??"Connection failed",Kt("")}finally{o.value=!1}}function k(){localStorage.removeItem(ps),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Kt("")}async function V(){r.value=await ve("/api/status")}function A(){a&&clearInterval(a),a=setInterval(V,3e4)}return wt(async()=>{const H=localStorage.getItem(ps);if(H){s.value=H;try{Kt(H),await V(),t.value=!0,A()}catch{localStorage.removeItem(ps),Kt("")}}}),_n(()=>{a&&clearInterval(a)}),(H,O)=>{var L,W,F,re,we,J,M,K,de,te,Se;return t.value?(_(),C("div",Dd,[l("header",Rd,[l("div",jd,[O[3]||(O[3]=Ue('<div class="flex items-center gap-3"><div class="w-8 h-8 rounded-lg bg-gradient-to-br from-accent to-purple-500 flex items-center justify-center"><span class="text-white text-sm font-bold">S</span></div><div><h1 class="text-lg font-semibold tracking-tight">Sensorium MCP</h1><p class="text-xs text-textSecondary">Agent Dashboard</p></div></div>',1)),l("div",Nd,[O[2]||(O[2]=l("div",{class:"flex items-center gap-2 text-sm"},[l("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),l("span",{class:"text-textSecondary"},"Connected")],-1)),l("div",Ld,$(p.value),1),l("button",{onClick:k,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),l("div",Fd,[l("div",Vd,[l("div",Hd,[O[4]||(O[4]=Ue('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Sessions</span></div>',1)),l("div",Ud,$(((L=r.value)==null?void 0:L.activeSessions)??0),1)]),l("div",Bd,[O[5]||(O[5]=Ue('<div class="flex items-center gap-2 mb-2"><span class="text-accentLight"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Notes</span></div>',1)),l("div",Kd,$(((F=(W=r.value)==null?void 0:W.memory)==null?void 0:F.totalSemanticNotes)??0),1)]),l("div",Wd,[O[6]||(O[6]=Ue('<div class="flex items-center gap-2 mb-2"><span class="text-warn"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Episodes</span></div>',1)),l("div",zd,$(((we=(re=r.value)==null?void 0:re.memory)==null?void 0:we.totalEpisodes)??0),1)]),l("div",Jd,[l("div",qd,[l("span",{class:Y((((M=(J=r.value)==null?void 0:J.memory)==null?void 0:M.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...O[7]||(O[7]=[l("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),O[8]||(O[8]=l("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),l("div",Gd,$(((de=(K=r.value)==null?void 0:K.memory)==null?void 0:de.unconsolidatedEpisodes)??0),1)]),l("div",Yd,[O[9]||(O[9]=Ue('<div class="flex items-center gap-2 mb-2"><span class="text-accent"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Procedures</span></div>',1)),l("div",Zd,$(((Se=(te=r.value)==null?void 0:te.memory)==null?void 0:Se.totalProcedures)??0),1)]),l("div",Qd,[O[10]||(O[10]=Ue('<div class="flex items-center gap-2 mb-2"><span class="text-success"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"></path></svg></span><span class="text-xs text-textSecondary font-medium uppercase tracking-wider">Uptime</span></div>',1)),l("div",Xd,$(p.value),1)])])]),l("div",ef,[l("nav",tf,[(_(),C(oe,null,be(c,ke=>l("button",{key:ke.id,onClick:mt=>i.value=ke.id,class:Y(["pb-3 text-sm font-medium transition",i.value===ke.id?"tab-active":"tab-inactive"])},$(ke.label),11,sf)),64))])]),l("div",nf,[(_(),dr(Ai(d.value),{status:r.value},null,8,["status"]))])])):(_(),C("div",Pd,[l("div",Id,[O[1]||(O[1]=Ue('<div class="flex items-center gap-3 mb-6"><div class="w-10 h-10 rounded-xl bg-accent/20 flex items-center justify-center"><svg class="w-5 h-5 text-accent" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></div><div><h2 class="text-lg font-semibold">Sensorium MCP</h2><p class="text-sm text-textSecondary">Enter your API token</p></div></div>',1)),le(l("input",{"onUpdate:modelValue":O[0]||(O[0]=ke=>s.value=ke),type:"password",placeholder:"MCP_HTTP_SECRET",class:"w-full px-4 py-3 rounded-xl bg-surface border border-gray-700 text-textPrimary placeholder-muted focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition font-mono text-sm",onKeydown:zt(m,["enter"])},null,544),[[he,s.value]]),l("button",{onClick:m,disabled:o.value,class:"w-full mt-4 px-4 py-3 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white font-medium transition"},$(o.value?"Connecting...":"Connect"),9,Md),n.value?(_(),C("p",Od,$(n.value),1)):Q("",!0)])]))}}});Hl(of).mount("#app");</script>
|
|
73
73
|
<style rel="stylesheet" crossorigin>body{background:#0f1419}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#1a1f2e}::-webkit-scrollbar-thumb{background:#374151;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#4b5563}.glass{background:#1a1f2ecc;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid rgba(99,102,241,.1)}.stat-glow{box-shadow:0 0 20px #6366f114}.priority-2{border-left:3px solid #ef4444}.priority-1{border-left:3px solid #f59e0b}.priority-0{border-left:3px solid transparent}.type-badge{font-size:.65rem;padding:2px 6px;border-radius:9999px;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.type-fact{background:#3b82f626;color:#60a5fa}.type-preference{background:#a855f726;color:#c084fc}.type-pattern{background:#22c55e26;color:#4ade80}.type-entity{background:#fbbf2426;color:#fbbf24}.type-relationship{background:#f472b626;color:#f472b6}.tab-active{border-bottom:2px solid #6366f1;color:#e5e7eb}.tab-inactive{border-bottom:2px solid transparent;color:#6b7280}.tab-inactive:hover{color:#9ca3af}</style>
|
|
74
74
|
</head>
|
|
75
75
|
<body class="font-sans text-textPrimary min-h-screen">
|