sensorium-mcp 3.0.22 → 3.0.24
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/dashboard/routes/threads.d.ts +4 -0
- package/dist/dashboard/routes/threads.d.ts.map +1 -1
- package/dist/dashboard/routes/threads.js +63 -5
- package/dist/dashboard/routes/threads.js.map +1 -1
- package/dist/dashboard/routes/types.d.ts +2 -0
- package/dist/dashboard/routes/types.d.ts.map +1 -1
- package/dist/dashboard/routes/types.js.map +1 -1
- package/dist/dashboard/routes.d.ts.map +1 -1
- package/dist/dashboard/routes.js +10 -2
- package/dist/dashboard/routes.js.map +1 -1
- package/dist/dashboard/spa.html +10 -10
- package/dist/data/file-storage.d.ts.map +1 -1
- package/dist/data/file-storage.js +3 -8
- package/dist/data/file-storage.js.map +1 -1
- package/dist/data/memory/schema.d.ts.map +1 -1
- package/dist/data/memory/schema.js +1 -0
- package/dist/data/memory/schema.js.map +1 -1
- package/dist/data/memory/thread-registry.d.ts +2 -0
- package/dist/data/memory/thread-registry.d.ts.map +1 -1
- package/dist/data/memory/thread-registry.js +5 -0
- package/dist/data/memory/thread-registry.js.map +1 -1
- package/dist/http-server.d.ts +2 -1
- package/dist/http-server.d.ts.map +1 -1
- package/dist/http-server.js +2 -1
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/agent-spawn.service.d.ts.map +1 -1
- package/dist/services/agent-spawn.service.js +18 -10
- package/dist/services/agent-spawn.service.js.map +1 -1
- package/dist/services/dispatcher/lock.d.ts +1 -1
- package/dist/services/dispatcher/lock.d.ts.map +1 -1
- package/dist/services/dispatcher/lock.js +5 -4
- package/dist/services/dispatcher/lock.js.map +1 -1
- package/dist/services/dispatcher/poller.d.ts.map +1 -1
- package/dist/services/dispatcher/poller.js +9 -7
- package/dist/services/dispatcher/poller.js.map +1 -1
- package/dist/services/keeper.service.js +1 -1
- package/dist/services/keeper.service.js.map +1 -1
- package/dist/services/process.service.d.ts +1 -1
- package/dist/services/process.service.d.ts.map +1 -1
- package/dist/services/process.service.js +29 -14
- package/dist/services/process.service.js.map +1 -1
- package/dist/services/worker-cleanup.service.js +2 -2
- package/dist/services/worker-cleanup.service.js.map +1 -1
- package/dist/tools/session-tools.js +5 -3
- package/dist/tools/session-tools.js.map +1 -1
- package/dist/tools/wait/poll-loop.d.ts.map +1 -1
- package/dist/tools/wait/poll-loop.js +8 -7
- package/dist/tools/wait/poll-loop.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 ln(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const de={},
|
|
52
|
+
**/function ln(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const de={},Ot=[],nt=()=>{},fo=()=>!1,Ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),$s=e=>e.startsWith("onUpdate:"),Ae=Object.assign,an=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},vr=Object.prototype.hasOwnProperty,re=(e,t)=>vr.call(e,t),J=Array.isArray,Dt=e=>as(e)==="[object Map]",Vt=e=>as(e)==="[object Set]",En=e=>as(e)==="[object Date]",Y=e=>typeof e=="function",ve=e=>typeof e=="string",rt=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",po=e=>(ae(e)||Y(e))&&Y(e.then)&&Y(e.catch),ho=Object.prototype.toString,as=e=>ho.call(e),yr=e=>as(e).slice(8,-1),mo=e=>as(e)==="[object Object]",cn=e=>ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qt=ln(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),As=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},br=/-\w/g,De=As(e=>e.replace(br,t=>t.slice(1).toUpperCase())),_r=/\B([A-Z])/g,_t=As(e=>e.replace(_r,"-$1").toLowerCase()),Es=As(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fs=As(e=>e?`on${Es(e)}`:""),st=(e,t)=>!Object.is(e,t),ms=(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})},Is=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let In;const Ps=()=>In||(In=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ms(e){if(J(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=ve(n)?Cr(n):Ms(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(ve(e)||ae(e))return e}const wr=/;(?![^(]*\))/g,Sr=/:([^]+)/,kr=/\/\*[^]*?\*\//g;function Cr(e){const t={};return e.replace(kr,"").split(wr).forEach(s=>{if(s){const n=s.split(Sr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(ve(e))t=e;else if(J(e))for(let s=0;s<e.length;s++){const n=G(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=Ut(e[n],t[n]);return s}function Ut(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=rt(e),n=rt(t),s||n)return e===t;if(s=J(e),n=J(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 l in e){const a=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(a&&!u||!a&&u||!Ut(e[l],t[l]))return!1}}return String(e)===String(t)}function un(e,t){return e.findIndex(s=>Ut(s,t))}const vo=e=>!!(e&&e.__v_isRef===!0),_=e=>ve(e)?e:e==null?"":J(e)||ae(e)&&(e.toString===ho||!Y(e.toString))?vo(e)?_(e.value):JSON.stringify(e,yo,2):String(e),yo=(e,t)=>vo(t)?yo(e,t.value):Dt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Vs(n,r)+" =>"]=o,s),{})}:Vt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Vs(s))}:rt(t)?Vs(t):ae(t)&&!J(t)&&!mo(t)?String(t):t,Vs=(e,t="")=>{var s;return rt(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 Le;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=Le,!t&&Le&&(this.index=(Le.scopes||(Le.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=Le;try{return Le=this,t()}finally{Le=s}}}on(){++this._on===1&&(this.prevScope=Le,Le=this)}off(){this._on>0&&--this._on===0&&(Le=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 Le}let pe;const Us=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,Le&&Le.active&&Le.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Us.has(this)&&(Us.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,Mn(this),So(this);const t=pe,s=ze;pe=this,ze=!0;try{return this.fn()}finally{Co(this),pe=t,ze=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,Mn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Us.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),Mr(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=ze;pe=e,ze=!0;try{So(e);const o=e.fn(e._value);(t.version===0||tt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{pe=s,ze=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 Mr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ze=!0;const To=[];function ft(){To.push(ze),ze=!1}function pt(){const e=To.pop();ze=e===void 0?!0:e}function Mn(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 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 mn{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||!ze||pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==pe)s=this.activeLink=new Ir(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 Pe(e,t,s){if(ze&&pe){let n=Ys.get(e);n||Ys.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new mn),o.map=n,o.key=s),o.track()}}function ct(e,t,s,n,o,r){const l=Ys.get(e);if(!l){es++;return}const a=c=>{c&&c.trigger()};if(dn(),t==="clear")l.forEach(a);else{const c=q(e),m=c&&cn(s);if(c&&s==="length"){const d=Number(n);l.forEach((p,x)=>{(x==="length"||x===ts||!ot(x)&&x>=d)&&a(p)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),m&&a(l.get(ts)),t){case"add":c?m&&a(l.get("length")):(a(l.get(Tt)),Ot(e)&&a(l.get(Zs)));break;case"delete":c||(a(l.get(Tt)),Ot(e)&&a(l.get(Zs)));break;case"set":Ot(e)&&a(l.get(Tt));break}}fn()}function Pt(e){const t=oe(e);return t===e?t:(Pe(t,"iterate",ts),Be(e)?t:t.map(Je))}function Is(e){return Pe(e=oe(e),"iterate",ts),e}function Xe(e,t){return mt(e)?jt($t(e)?Je(t):t):Je(t)}const Or={__proto__:null,[Symbol.iterator](){return Hs(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>q(t)?Pt(t):t))},entries(){return Hs(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return it(this,"every",e,t,void 0,arguments)},filter(e,t){return it(this,"filter",e,t,s=>s.map(n=>Xe(this,n)),arguments)},find(e,t){return it(this,"find",e,t,s=>Xe(this,s),arguments)},findIndex(e,t){return it(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return it(this,"findLast",e,t,s=>Xe(this,s),arguments)},findLastIndex(e,t){return it(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return it(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 it(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 it(this,"some",e,t,void 0,arguments)},splice(...e){return Ht(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 Ht(this,"unshift",e)},values(){return Hs(this,"values",e=>Xe(this,e))}};function Hs(e,t,s){const n=Is(e),o=n[t]();return n!==e&&!Be(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 it(e,t,s,n,o,r){const l=Is(e),a=l!==e&&!Be(e),c=l[t];if(c!==Dr[t]){const p=c.apply(e,r);return a?Je(p):p}let m=s;l!==e&&(a?m=function(p,x){return s.call(this,Xe(e,p),x,e)}:s.length>2&&(m=function(p,x){return s.call(this,p,x,e)}));const d=c.call(l,m,n);return a&&o?o(d):d}function In(e,t,s,n){const o=Is(e),r=o!==e&&!Be(e);let l=s,a=!1;o!==e&&(r?(a=n.length===0,l=function(m,d,p){return a&&(a=!1,m=Xe(e,m)),s.call(this,m,Xe(e,d),p,e)}):s.length>3&&(l=function(m,d,p){return s.call(this,m,d,p,e)}));const c=o[t](l,...n);return a?Xe(e,c):c}function Bs(e,t,s){const n=oe(e);Pe(n,"iterate",ts);const o=n[t](...s);return(o===-1||o===!1)&&vn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Ht(e,t,s=[]){ft(),dn();const n=oe(e)[t].apply(e,s);return fn(),pt(),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(ot));function jr(e){ot(e)||(e=String(e));const t=oe(this);return Pe(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?Io:Mo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=q(t);if(!o){let c;if(l&&(c=Or[s]))return c;if(s==="hasOwnProperty")return jr}const a=Reflect.get(t,s,Ie(t)?t:n);if((ot(s)?Ao.has(s):Rr(s))||(o||Pe(t,"get",s),r))return a;if(Ie(a)){const c=l&&cn(s)?a:a.value;return o&&ce(c)?Xs(c):c}return ce(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 l=q(t)&&cn(s);if(!this._isShallow){const m=mt(r);if(!Be(n)&&!mt(n)&&(r=oe(r),n=oe(n)),!l&&Ie(r)&&!Ie(n))return m||(r.value=n),!0}const a=l?Number(s)<t.length:re(t,s),c=Reflect.set(t,s,n,Ie(t)?t:o);return t===oe(o)&&(a?tt(n,r)&&ct(t,"set",s,n):ct(t,"add",s,n)),c}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&ct(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!ot(s)||!Ao.has(s))&&Pe(t,"has",s),n}ownKeys(t){return Pe(t,"iterate",q(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 Ur(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),l=Ot(r),a=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,m=o[e](...n),d=s?Qs:t?jt:Je;return!t&&Pe(r,"iterate",c?Zs:Tt),Ee(Object.create(m),{next(){const{value:p,done:x}=m.next();return x?{value:p,done:x}:{value:a?[d(p[0]),d(p[1])]:d(p),done:x}}})}}function ds(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,l=oe(r),a=oe(o);e||(tt(o,a)&&Pe(l,"get",o),Pe(l,"get",a));const{has:c}=us(l),m=t?Qs:e?jt:Je;if(c.call(l,o))return m(r.get(o));if(c.call(l,a))return m(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Pe(oe(o),"iterate",Tt),o.size},has(o){const r=this.__v_raw,l=oe(r),a=oe(o);return e||(tt(o,a)&&Pe(l,"has",o),Pe(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,c=oe(a),m=t?Qs:e?jt:Je;return!e&&Pe(c,"iterate",Tt),a.forEach((d,p)=>o.call(r,m(d),m(p),l))}};return Ee(s,e?{add:ds("add"),set:ds("set"),delete:ds("delete"),clear:ds("clear")}:{add(o){const r=oe(this),l=us(r),a=oe(o),c=!t&&!Be(o)&&!mt(o)?a:o;return l.has.call(r,c)||tt(o,c)&&l.has.call(r,o)||tt(a,c)&&l.has.call(r,a)||(r.add(c),ct(r,"add",c,c)),this},set(o,r){!t&&!Be(r)&&!mt(r)&&(r=oe(r));const l=oe(this),{has:a,get:c}=us(l);let m=a.call(l,o);m||(o=oe(o),m=a.call(l,o));const d=c.call(l,o);return l.set(o,r),m?tt(r,d)&&ct(l,"set",o,r):ct(l,"add",o,r),this},delete(o){const r=oe(this),{has:l,get:a}=us(r);let c=l.call(r,o);c||(o=oe(o),c=l.call(r,o)),a&&a.call(r,o);const m=r.delete(o);return c&&ct(r,"delete",o,void 0),m},clear(){const o=oe(this),r=o.size!==0,l=o.clear();return r&&ct(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ur(o,e,t)}),s}function hn(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 Br={get:hn(!1,!1)},Wr={get:hn(!1,!0)},Kr={get:hn(!0,!1)};const Mo=new WeakMap,Io=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 mt(e)?e:xn(e,!1,Lr,Br,Mo)}function Gr(e){return xn(e,!1,Vr,Wr,Io)}function Xs(e){return xn(e,!0,Fr,Kr,Oo)}function xn(e,t,s,n,o){if(!ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=qr(e);if(r===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function $t(e){return mt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function mt(e){return!!(e&&e.__v_isReadonly)}function Be(e){return!!(e&&e.__v_isShallow)}function vn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Yr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&go(e,"__v_skip",!0),e}const Je=e=>ce(e)?gn(e):e,jt=e=>ce(e)?Xs(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function j(e){return Zr(e,!1)}function Zr(e,t){return Ie(e)?e:new Qr(e,t)}class Qr{constructor(t,s){this.dep=new mn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:oe(t),this._value=s?t:Je(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Be(t)||mt(t);t=n?t:oe(t),tt(t,s)&&(this._rawValue=t,this._value=n?t:Je(t),this.dep.trigger())}}function Xr(e){return Ie(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 Ie(o)&&!Ie(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 mn(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=de){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:c}=s,m=U=>o?U:Be(U)||o===!1||o===0?ut(U,1):ut(U);let d,p,x,A,B=!1,$=!1;if(Ie(e)?(p=()=>e.value,B=Be(e)):$t(e)?(p=()=>m(e),B=!0):q(e)?($=!0,B=e.some(U=>$t(U)||Be(U)),p=()=>e.map(U=>{if(Ie(U))return U.value;if($t(U))return m(U);if(Z(U))return c?c(U,2):U()})):Z(e)?t?p=c?()=>c(e,2):e:p=()=>{if(x){ft();try{x()}finally{pt()}}const U=kt;kt=d;try{return c?c(e,3,[A]):e(A)}finally{kt=U}}:p=st,t&&o){const U=p,ee=o===!0?1/0:o;p=()=>ut(U(),ee)}const v=Pr(),P=()=>{d.stop(),v&&v.active&&an(v.effects,d)};if(r&&t){const U=t;t=(...ee)=>{U(...ee),P()}}let F=$?new Array(e.length).fill(fs):fs;const W=U=>{if(!(!(d.flags&1)||!d.dirty&&!U))if(t){const ee=d.run();if(o||B||($?ee.some((he,K)=>tt(he,F[K])):tt(ee,F))){x&&x();const he=kt;kt=d;try{const K=[ee,F===fs?void 0:$&&F[0]===fs?[]:F,A];F=ee,c?c(t,3,K):t(...K)}finally{kt=he}}}else d.run()};return a&&a(W),d=new bo(p),d.scheduler=l?()=>l(W,!1):W,A=U=>ni(U,!1,d),x=d.onStop=()=>{const U=ys.get(d);if(U){if(c)c(U,4);else for(const ee of U)ee();ys.delete(d)}},t?n?W(!0):F=d.run():l?l(W.bind(null,!0),!0):d.run(),P.pause=d.pause.bind(d),P.resume=d.resume.bind(d),P.stop=P,P}function ut(e,t=1/0,s){if(t<=0||!ce(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ie(e))ut(e.value,t,s);else if(q(e))for(let n=0;n<e.length;n++)ut(e[n],t,s);else if(Ft(e)||Ot(e))e.forEach(n=>{ut(n,t,s)});else if(ho(e)){for(const n in e)ut(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ut(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 Ir(){return je}let pe;const Us=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,Us.has(this)&&(Us.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,Pn(this),So(this);const t=pe,s=ze;pe=this,ze=!0;try{return this.fn()}finally{ko(this),pe=t,ze=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,Pn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Us.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let _o=0,Gt,Yt;function wo(e,t=!1){if(e.flags|=8,t){e.next=Yt,Yt=e;return}e.next=Gt,Gt=e}function dn(){_o++}function fn(){if(--_o>0)return;if(Yt){let t=Yt;for(Yt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Gt;){let t=Gt;for(Gt=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 ko(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),pn(n),Pr(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&&(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===ts)||(e.globalVersion=ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=pe,n=ze;pe=e,ze=!0;try{So(e);const o=e.fn(e._value);(t.version===0||st(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{pe=s,ze=n,ko(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 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 ze=!0;const To=[];function pt(){To.push(ze),ze=!1}function ht(){const e=To.pop();ze=e===void 0?!0:e}function Pn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=pe;pe=void 0;try{t()}finally{pe=s}}}let ts=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||!ze||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++,ts++,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(""),ss=Symbol("");function Ee(e,t,s){if(ze&&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 ut(e,t,s,n,o,r){const l=Ys.get(e);if(!l){ts++;return}const a=u=>{u&&u.trigger()};if(dn(),t==="clear")l.forEach(a);else{const u=J(e),h=u&&cn(s);if(u&&s==="length"){const f=Number(n);l.forEach((p,v)=>{(v==="length"||v===ss||!rt(v)&&v>=f)&&a(p)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),h&&a(l.get(ss)),t){case"add":u?h&&a(l.get("length")):(a(l.get(Tt)),Dt(e)&&a(l.get(Zs)));break;case"delete":u||(a(l.get(Tt)),Dt(e)&&a(l.get(Zs)));break;case"set":Dt(e)&&a(l.get(Tt));break}}fn()}function Pt(e){const t=oe(e);return t===e?t:(Ee(t,"iterate",ss),Ue(e)?t:t.map(Je))}function Os(e){return Ee(e=oe(e),"iterate",ss),e}function et(e,t){return mt(e)?Nt($t(e)?Je(t):t):Je(t)}const Or={__proto__:null,[Symbol.iterator](){return Hs(this,Symbol.iterator,e=>et(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>J(t)?Pt(t):t))},entries(){return Hs(this,"entries",e=>(e[1]=et(this,e[1]),e))},every(e,t){return lt(this,"every",e,t,void 0,arguments)},filter(e,t){return lt(this,"filter",e,t,s=>s.map(n=>et(this,n)),arguments)},find(e,t){return lt(this,"find",e,t,s=>et(this,s),arguments)},findIndex(e,t){return lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return lt(this,"findLast",e,t,s=>et(this,s),arguments)},findLastIndex(e,t){return lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return lt(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 lt(this,"map",e,t,void 0,arguments)},pop(){return Bt(this,"pop")},push(...e){return Bt(this,"push",e)},reduce(e,...t){return Mn(this,"reduce",e,t)},reduceRight(e,...t){return Mn(this,"reduceRight",e,t)},shift(){return Bt(this,"shift")},some(e,t){return lt(this,"some",e,t,void 0,arguments)},splice(...e){return Bt(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 Bt(this,"unshift",e)},values(){return Hs(this,"values",e=>et(this,e))}};function Hs(e,t,s){const n=Os(e),o=n[t]();return n!==e&&!Ue(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 lt(e,t,s,n,o,r){const l=Os(e),a=l!==e&&!Ue(e),u=l[t];if(u!==Dr[t]){const p=u.apply(e,r);return a?Je(p):p}let h=s;l!==e&&(a?h=function(p,v){return s.call(this,et(e,p),v,e)}:s.length>2&&(h=function(p,v){return s.call(this,p,v,e)}));const f=u.call(l,h,n);return a&&o?o(f):f}function Mn(e,t,s,n){const o=Os(e),r=o!==e&&!Ue(e);let l=s,a=!1;o!==e&&(r?(a=n.length===0,l=function(h,f,p){return a&&(a=!1,h=et(e,h)),s.call(this,h,et(e,f),p,e)}):s.length>3&&(l=function(h,f,p){return s.call(this,h,f,p,e)}));const u=o[t](l,...n);return a?et(e,u):u}function Bs(e,t,s){const n=oe(e);Ee(n,"iterate",ss);const o=n[t](...s);return(o===-1||o===!1)&&vn(s[0])?(s[0]=oe(s[0]),n[t](...s)):o}function Bt(e,t,s=[]){pt(),dn();const n=oe(e)[t].apply(e,s);return fn(),ht(),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(rt));function jr(e){rt(e)||(e=String(e));const t=oe(this);return Ee(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:Po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=J(t);if(!o){let u;if(l&&(u=Or[s]))return u;if(s==="hasOwnProperty")return jr}const a=Reflect.get(t,s,Pe(t)?t:n);if((rt(s)?Ao.has(s):Rr(s))||(o||Ee(t,"get",s),r))return a;if(Pe(a)){const u=l&&cn(s)?a:a.value;return o&&ae(u)?Xs(u):u}return ae(a)?o?Xs(a):gn(a):a}}class Io extends Eo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const l=J(t)&&cn(s);if(!this._isShallow){const h=mt(r);if(!Ue(n)&&!mt(n)&&(r=oe(r),n=oe(n)),!l&&Pe(r)&&!Pe(n))return h||(r.value=n),!0}const a=l?Number(s)<t.length:re(t,s),u=Reflect.set(t,s,n,Pe(t)?t:o);return t===oe(o)&&(a?st(n,r)&&ut(t,"set",s,n):ut(t,"add",s,n)),u}deleteProperty(t,s){const n=re(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&ut(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!rt(s)||!Ao.has(s))&&Ee(t,"has",s),n}ownKeys(t){return Ee(t,"iterate",J(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 Io,Fr=new Nr,Vr=new Io(!0);const Qs=e=>e,ds=e=>Reflect.getPrototypeOf(e);function Ur(e,t,s){return function(...n){const o=this.__v_raw,r=oe(o),l=Dt(r),a=e==="entries"||e===Symbol.iterator&&l,u=e==="keys"&&l,h=o[e](...n),f=s?Qs:t?Nt:Je;return!t&&Ee(r,"iterate",u?Zs:Tt),Ae(Object.create(h),{next(){const{value:p,done:v}=h.next();return v?{value:p,done:v}:{value:a?[f(p[0]),f(p[1])]:f(p),done:v}}})}}function fs(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,l=oe(r),a=oe(o);e||(st(o,a)&&Ee(l,"get",o),Ee(l,"get",a));const{has:u}=ds(l),h=t?Qs:e?Nt:Je;if(u.call(l,o))return h(r.get(o));if(u.call(l,a))return h(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ee(oe(o),"iterate",Tt),o.size},has(o){const r=this.__v_raw,l=oe(r),a=oe(o);return e||(st(o,a)&&Ee(l,"has",o),Ee(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,u=oe(a),h=t?Qs:e?Nt:Je;return!e&&Ee(u,"iterate",Tt),a.forEach((f,p)=>o.call(r,h(f),h(p),l))}};return Ae(s,e?{add:fs("add"),set:fs("set"),delete:fs("delete"),clear:fs("clear")}:{add(o){const r=oe(this),l=ds(r),a=oe(o),u=!t&&!Ue(o)&&!mt(o)?a:o;return l.has.call(r,u)||st(o,u)&&l.has.call(r,o)||st(a,u)&&l.has.call(r,a)||(r.add(u),ut(r,"add",u,u)),this},set(o,r){!t&&!Ue(r)&&!mt(r)&&(r=oe(r));const l=oe(this),{has:a,get:u}=ds(l);let h=a.call(l,o);h||(o=oe(o),h=a.call(l,o));const f=u.call(l,o);return l.set(o,r),h?st(r,f)&&ut(l,"set",o,r):ut(l,"add",o,r),this},delete(o){const r=oe(this),{has:l,get:a}=ds(r);let u=l.call(r,o);u||(o=oe(o),u=l.call(r,o)),a&&a.call(r,o);const h=r.delete(o);return u&&ut(r,"delete",o,void 0),h},clear(){const o=oe(this),r=o.size!==0,l=o.clear();return r&&ut(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ur(o,e,t)}),s}function mn(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 Br={get:mn(!1,!1)},Wr={get:mn(!1,!0)},Kr={get:mn(!0,!1)};const Po=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 mt(e)?e:xn(e,!1,Lr,Br,Po)}function Gr(e){return xn(e,!1,Vr,Wr,Mo)}function Xs(e){return xn(e,!0,Fr,Kr,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 l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function $t(e){return mt(e)?$t(e.__v_raw):!!(e&&e.__v_isReactive)}function mt(e){return!!(e&&e.__v_isReadonly)}function Ue(e){return!!(e&&e.__v_isShallow)}function vn(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function Yr(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&go(e,"__v_skip",!0),e}const Je=e=>ae(e)?gn(e):e,Nt=e=>ae(e)?Xs(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function R(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:oe(t),this._value=s?t:Je(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ue(t)||mt(t);t=n?t:oe(t),st(t,s)&&(this._rawValue=t,this._value=n?t:Je(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=ts-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 Co(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 Y(e)?n=e:(n=e.get,o=e.set),new ti(n,o,s)}const ps={},bs=new WeakMap;let Ct;function ni(e,t=!1,s=Ct){if(s){let n=bs.get(s);n||bs.set(s,n=[]),n.push(e)}}function oi(e,t,s=de){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:u}=s,h=F=>o?F:Ue(F)||o===!1||o===0?dt(F,1):dt(F);let f,p,v,A,H=!1,$=!1;if(Pe(e)?(p=()=>e.value,H=Ue(e)):$t(e)?(p=()=>h(e),H=!0):J(e)?($=!0,H=e.some(F=>$t(F)||Ue(F)),p=()=>e.map(F=>{if(Pe(F))return F.value;if($t(F))return h(F);if(Y(F))return u?u(F,2):F()})):Y(e)?t?p=u?()=>u(e,2):e:p=()=>{if(v){pt();try{v()}finally{ht()}}const F=Ct;Ct=f;try{return u?u(e,3,[A]):e(A)}finally{Ct=F}}:p=nt,t&&o){const F=p,Z=o===!0?1/0:o;p=()=>dt(F(),Z)}const b=Ir(),I=()=>{f.stop(),b&&b.active&&an(b.effects,f)};if(r&&t){const F=t;t=(...Z)=>{F(...Z),I()}}let L=$?new Array(e.length).fill(ps):ps;const B=F=>{if(!(!(f.flags&1)||!f.dirty&&!F))if(t){const Z=f.run();if(o||H||($?Z.some((he,W)=>st(he,L[W])):st(Z,L))){v&&v();const he=Ct;Ct=f;try{const W=[Z,L===ps?void 0:$&&L[0]===ps?[]:L,A];L=Z,u?u(t,3,W):t(...W)}finally{Ct=he}}}else f.run()};return a&&a(B),f=new bo(p),f.scheduler=l?()=>l(B,!1):B,A=F=>ni(F,!1,f),v=f.onStop=()=>{const F=bs.get(f);if(F){if(u)u(F,4);else for(const Z of F)Z();bs.delete(f)}},t?n?B(!0):L=f.run():l?l(B.bind(null,!0),!0):f.run(),I.pause=f.pause.bind(f),I.resume=f.resume.bind(f),I.stop=I,I}function dt(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))dt(e.value,t,s);else if(J(e))for(let n=0;n<e.length;n++)dt(e[n],t,s);else if(Vt(e)||Dt(e))e.forEach(n=>{dt(n,t,s)});else if(mo(e)){for(const n in e)dt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&dt(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 as(e,t,s,n){try{return n?e(...n):e()}catch(o){Os(o,t,s)}}function rt(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(q(e)){const o=[];for(let r=0;r<e.length;r++)o.push(rt(e[r],t,s,n));return o}}function Os(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||de;if(t){let a=t.parent;const c=t.proxy,m=`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,m)===!1)return}a=a.parent}if(r){ft(),as(r,null,10,[e,c,m]),pt();return}}ri(e,s,o,n,l)}function ri(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Re=[];let Qe=-1;const Dt=[];let vt=null,Mt=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=Qe+1,s=Re.length;for(;t<s;){const n=t+s>>>1,o=Re[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=Re[Re.length-1];!s||!(e.flags&2)&&t>=ss(s)?Re.push(e):Re.splice(ii(t),0,e),e.flags|=1,No()}}function No(){bs||(bs=Ro.then(Fo))}function li(e){q(e)?Dt.push(...e):vt&&e.id===-1?vt.splice(Mt+1,0,e):e.flags&1||(Dt.push(e),e.flags|=1),No()}function On(e,t,s=Qe+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 Lo(e){if(Dt.length){const t=[...new Set(Dt)].sort((s,n)=>ss(s)-ss(n));if(Dt.length=0,vt){vt.push(...t);return}for(vt=t,Mt=0;Mt<vt.length;Mt++){const s=vt[Mt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}vt=null,Mt=0}}const ss=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Fo(e){try{for(Qe=0;Qe<Re.length;Qe++){const t=Re[Qe];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(;Qe<Re.length;Qe++){const t=Re[Qe];t&&(t.flags&=-2)}Qe=-1,Re.length=0,Lo(),bs=null,(Re.length||Dt.length)&&Fo()}}let Ve=null,Vo=null;function _s(e){const t=Ve;return Ve=e,Vo=e&&e.type.__scopeId||null,t}function ai(e,t=Ve,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Kn(-1);const r=_s(t);let l;try{l=e(...o)}finally{_s(r),n._d&&Kn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(Ve===null)return e;const s=Ns(Ve),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,c=de]=t[o];r&&(Z(r)&&(r={mounted:r,updated:r}),r.deep&&ut(l),n.push({dir:r,instance:s,value:l,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 l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let c=a.dir[n];c&&(ft(),rt(c,s,8,[e.el,a,e,t]),pt())}}function ci(e,t){if(Me){let s=Me.provides;const n=Me.parent&&Me.parent.provides;n===s&&(s=Me.provides=Object.create(n)),s[e]=t}}function hs(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=()=>hs(ui);function Ws(e,t,s){return Uo(e,t,s)}function Uo(e,t,s=de){const{immediate:n,deep:o,flush:r,once:l}=s,a=Ee({},s),c=t&&n||!t&&r!=="post";let m;if(os){if(r==="sync"){const A=di();m=A.__watcherHandles||(A.__watcherHandles=[])}else if(!c){const A=()=>{};return A.stop=st,A.resume=st,A.pause=st,A}}const d=Me;a.call=(A,B,$)=>rt(A,d,B,$);let p=!1;r==="post"?a.scheduler=A=>{Ne(A,d&&d.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(A,B)=>{B?A():yn(A)}),a.augmentJob=A=>{t&&(A.flags|=4),p&&(A.flags|=2,d&&(A.id=d.uid,A.i=d))};const x=oi(e,t,a);return os&&(m?m.push(x):c&&x()),x}function fi(e,t,s){const n=this.proxy,o=be(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Z(t)?r=t:(r=t.handler,s=t);const l=cs(this),a=Uo(o,r.bind(n),s);return l(),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 pi=Symbol("_vte"),mi=e=>e.__isTeleport,hi=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)?Ee({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(q(e)){e.forEach(($,v)=>Yt($,t&&(q(t)?t[v]: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,l=o?null:r,{i:a,r:c}=e,m=t&&t.r,d=a.refs===de?a.refs={}:a.refs,p=a.setupState,x=oe(p),A=p===de?fo:$=>Dn(d,$)?!1:re(x,$),B=($,v)=>!(v&&Dn(d,v));if(m!=null&&m!==c){if(Rn(t),be(m))d[m]=null,A(m)&&(p[m]=null);else if(Ie(m)){const $=t;B(m,$.k)&&(m.value=null),$.k&&(d[$.k]=null)}}if(Z(c))as(c,a,12,[l,d]);else{const $=be(c),v=Ie(c);if($||v){const P=()=>{if(e.f){const F=$?A(c)?p[c]:d[c]:B()||!e.k?c.value:d[e.k];if(o)q(F)&&an(F,r);else if(q(F))F.includes(r)||F.push(r);else if($)d[c]=[r],A(c)&&(p[c]=d[c]);else{const W=[r];B(c,e.k)&&(c.value=W),e.k&&(d[e.k]=W)}}else $?(d[c]=l,A(c)&&(p[c]=l)):v&&(B(c,e.k)&&(c.value=l),e.k&&(d[e.k]=l))};if(l){const F=()=>{P(),ws.delete(e)};F.id=-1,ws.set(e,F),Ne(F,s)}else Rn(e),P()}}}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,Wo=e=>e.type.__isKeepAlive;function gi(e,t){Ko(e,"a",t)}function xi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Me){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;)Wo(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=Me,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{ft();const a=cs(s),c=rt(t,s,e,l);return a(),pt(),c});return n?o.unshift(r):o.push(r),r}}const ht=e=>(t,s=Me)=>{(!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=Me){Ds("ec",e,t)}const $i="components",zo=Symbol.for("v-ndc");function Ai(e){return be(e)?Ei($i,e,!1)||e:e||zo}function Ei(e,t,s=!0,n=!1){const o=Ve||Me;if(o){const r=o.type;{const a=ml(r,!1);if(a&&(a===t||a===je(t)||a===As(je(t))))return r}const l=jn(o[e]||r[e],t)||jn(o.appContext[e],t);return!l&&n?r:l}}function jn(e,t){return e&&(e[t]||e[je(t)]||e[As(je(t))])}function Ce(e,t,s,n){let o;const r=s,l=q(e);if(l||be(e)){const a=l&&$t(e);let c=!1,m=!1;a&&(c=!Be(e),m=mt(e),e=Is(e)),o=new Array(e.length);for(let d=0,p=e.length;d<p;d++)o[d]=t(c?m?jt(Je(e[d])):Je(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(ce(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,m=a.length;c<m;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const en=e=>e?mr(e)?Ns(e):en(e.parent):null,Qt=Ee(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)}),Ks=(e,t)=>e!==de&&!e.__isScriptSetup&&re(e,t),Pi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:c}=e;if(t[0]!=="$"){const x=l[t];if(x!==void 0)switch(x){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Ks(n,t))return l[t]=1,n[t];if(o!==de&&re(o,t))return l[t]=2,o[t];if(re(r,t))return l[t]=3,r[t];if(s!==de&&re(s,t))return l[t]=4,s[t];tn&&(l[t]=0)}}const m=Qt[t];let d,p;if(m)return t==="$attrs"&&Pe(e.attrs,"get",""),m(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==de&&re(s,t))return l[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 Ks(o,t)?(o[t]=s,!0):n!==de&&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:l}},a){let c;return!!(s[a]||e!==de&&a[0]!=="$"&&re(e,a)||Ks(t,a)||re(r,a)||re(n,a)||re(Qt,a)||re(o.config.globalProperties,a)||(c=l.__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 Nn(e){return q(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let tn=!0;function Mi(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:l,watch:a,provide:c,inject:m,created:d,beforeMount:p,mounted:x,beforeUpdate:A,updated:B,activated:$,deactivated:v,beforeDestroy:P,beforeUnmount:F,destroyed:W,unmounted:U,render:ee,renderTracked:he,renderTriggered:K,errorCaptured:I,serverPrefetch:J,expose:me,inheritAttrs:se,components:Te,directives:$e,filters:gt}=t;if(m&&Ii(m,n,null),l)for(const ae in l){const X=l[ae];Z(X)&&(n[ae]=X.bind(s))}if(o){const ae=o.call(s,s);ce(ae)&&(e.data=gn(ae))}if(tn=!0,r)for(const ae in r){const X=r[ae],V=Z(X)?X.bind(s,s):Z(X.get)?X.get.bind(s,s):st,E=!Z(X)&&Z(X.set)?X.set.bind(s):st,ye=Ke({get:V,set:E});Object.defineProperty(n,ae,{enumerable:!0,configurable:!0,get:()=>ye.value,set:ge=>ye.value=ge})}if(a)for(const ae in a)Jo(a[ae],n,s,ae);if(c){const ae=Z(c)?c.call(s):c;Reflect.ownKeys(ae).forEach(X=>{ci(X,ae[X])})}d&&Ln(d,e,"c");function _e(ae,X){q(X)?X.forEach(V=>ae(V.bind(s))):X&&ae(X.bind(s))}if(_e(yi,p),_e(wt,x),_e(bi,A),_e(_i,B),_e(gi,$),_e(xi,v),_e(Ti,I),_e(ki,he),_e(Ci,K),_e(wi,F),_e(_n,U),_e(Si,J),q(me))if(me.length){const ae=e.exposed||(e.exposed={});me.forEach(X=>{Object.defineProperty(ae,X,{get:()=>s[X],set:V=>s[X]=V,enumerable:!0})})}else e.exposed||(e.exposed={});ee&&e.render===st&&(e.render=ee),se!=null&&(e.inheritAttrs=se),Te&&(e.components=Te),$e&&(e.directives=$e),J&&Bo(e)}function Ii(e,t,s=st){q(e)&&(e=sn(e));for(const n in e){const o=e[n];let r;ce(o)?"default"in o?r=hs(o.from||n,o.default,!0):r=hs(o.from||n):r=hs(o),Ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function Ln(e,t,s){rt(q(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Jo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(be(e)){const r=t[e];Z(r)&&Ws(o,r)}else if(Z(e))Ws(o,e.bind(s));else if(ce(e))if(q(e))e.forEach(r=>Jo(r,t,s,n));else{const r=Z(e.handler)?e.handler.bind(s):t[e.handler];Z(r)&&Ws(o,r,e)}}function qo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(m=>Ss(c,m,l,!0)),Ss(c,t,l)),ce(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(l=>Ss(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Oi[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Oi={data:Fn,props:Vn,emits:Vn,methods:Kt,computed:Kt,beforeCreate:De,created:De,beforeMount:De,mounted:De,beforeUpdate:De,updated:De,beforeDestroy:De,beforeUnmount:De,destroyed:De,unmounted:De,activated:De,deactivated:De,errorCaptured:De,serverPrefetch:De,components:Kt,directives:Kt,watch:Ri,provide:Fn,inject:Di};function Fn(e,t){return t?e?function(){return Ee(Z(e)?e.call(this,this):e,Z(t)?t.call(this,this):t)}:t:e}function Di(e,t){return Kt(sn(e),sn(t))}function sn(e){if(q(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function De(e,t){return e?[...new Set([].concat(e,t))]:t}function Kt(e,t){return e?Ee(Object.create(null),e,t):t}function Vn(e,t){return e?q(e)&&q(t)?[...new Set([...e,...t])]:Ee(Object.create(null),Nn(e),Nn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=Ee(Object.create(null),e);for(const n in t)s[n]=De(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=Ee({},n)),o!=null&&!ce(o)&&(o=null);const r=Go(),l=new WeakSet,a=[];let c=!1;const m=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 l.has(d)||(d&&Z(d.install)?(l.add(d),d.install(m,...p)):Z(d)&&(l.add(d),d(m,...p))),m},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),m},component(d,p){return p?(r.components[d]=p,m):r.components[d]},directive(d,p){return p?(r.directives[d]=p,m):r.directives[d]},mount(d,p,x){if(!c){const A=m._ceVNode||nt(n,o);return A.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e(A,d,x),c=!0,m._container=d,d.__vue_app__=m,Ns(A.component)}},onUnmount(d){a.push(d)},unmount(){c&&(rt(a,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(d,p){return r.provides[d]=p,m},runWithContext(d){const p=Rt;Rt=m;try{return d()}finally{Rt=p}}};return m}}let Rt=null;const Li=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${je(t)}Modifiers`]||e[`${_t(t)}Modifiers`];function Fi(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||de;let o=s;const r=t.startsWith("update:"),l=r&&Li(n,t.slice(7));l&&(l.trim&&(o=s.map(d=>be(d)?d.trim():d)),l.number&&(o=s.map(Es)));let a,c=n[a=Fs(t)]||n[a=Fs(je(t))];!c&&r&&(c=n[a=Fs(_t(t))]),c&&rt(c,e,6,o);const m=n[a+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,rt(m,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 l={},a=!1;if(!Z(e)){const c=m=>{const d=Yo(m,t,!0);d&&(a=!0,Ee(l,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(ce(e)&&n.set(e,null),null):(q(r)?r.forEach(c=>l[c]=null):Ee(l,r),ce(e)&&n.set(e,l),l)}function Rs(e,t){return!e||!ks(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,_t(t))||re(e,t))}function Un(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:c,render:m,renderCache:d,props:p,data:x,setupState:A,ctx:B,inheritAttrs:$}=e,v=_s(e);let P,F;try{if(s.shapeFlag&4){const U=o||n,ee=U;P=et(m.call(ee,U,d,p,A,x,B)),F=a}else{const U=t;P=et(U.length>1?U(p,{attrs:a,slots:l,emit:c}):U(p,null)),F=t.props?a:Ui(a)}}catch(U){Xt.length=0,Os(U,e,1),P=nt(bt)}let W=P;if(F&&$!==!1){const U=Object.keys(F),{shapeFlag:ee}=W;U.length&&ee&7&&(r&&U.some(Ts)&&(F=Hi(F,r)),W=Nt(W,F,!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),P=W,_s(v),P}const Ui=e=>{let t;for(const s in e)(s==="class"||s==="style"||ks(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(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:l,children:a,patchFlag:c}=t,m=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,l,m):!!l;if(c&8){const d=t.dynamicProps;for(let p=0;p<d.length;p++){const x=d[p];if(Zo(l,n,x)&&!Rs(m,x))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?Hn(n,l,m):!0:!!l;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(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"&&ce(n)&&ce(o)?!Vt(n,o):n!==o}function Wi({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 Ki(e,t,s,n=!1){const o={},r=Xo();e.propsDefaults=Object.create(null),tr(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=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:l}}=e,a=oe(o),[c]=e.propsOptions;let m=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let x=d[p];if(Rs(e.emitsOptions,x))continue;const A=t[x];if(c)if(re(r,x))A!==r[x]&&(r[x]=A,m=!0);else{const B=je(x);o[B]=nn(c,a,B,A,e,!1)}else A!==r[x]&&(r[x]=A,m=!0)}}}else{tr(e,t,o,r)&&(m=!0);let d;for(const p in a)(!t||!re(t,p)&&((d=_t(p))===p||!re(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||!re(t,p))&&(delete r[p],m=!0)}m&&ct(e.attrs,"set","")}function tr(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let c in t){if(Jt(c))continue;const m=t[c];let d;o&&re(o,d=je(c))?!r||!r.includes(d)?s[d]=m:(a||(a={}))[d]=m:Rs(e.emitsOptions,c)||(!(c in n)||m!==n[c])&&(n[c]=m,l=!0)}if(r){const c=oe(s),m=a||de;for(let d=0;d<r.length;d++){const p=r[d];s[p]=nn(o,c,p,m[p],e,!re(m,p))}}return l}function nn(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=re(l,"default");if(a&&n===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&Z(c)){const{propsDefaults:m}=o;if(s in m)n=m[s];else{const d=cs(o);n=m[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[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,l={},a=[];let c=!1;if(!Z(e)){const d=p=>{c=!0;const[x,A]=sr(p,t,!0);Ee(l,x),A&&a.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return ce(e)&&n.set(e,It),It;if(q(r))for(let d=0;d<r.length;d++){const p=je(r[d]);Bn(p)&&(l[p]=de)}else if(r)for(const d in r){const p=je(d);if(Bn(p)){const x=r[d],A=l[p]=q(x)||Z(x)?{type:x}:Ee({},x),B=A.type;let $=!1,v=!0;if(q(B))for(let P=0;P<B.length;++P){const F=B[P],W=Z(F)&&F.name;if(W==="Boolean"){$=!0;break}else W==="String"&&(v=!1)}else $=Z(B)&&B.name==="Boolean";A[0]=$,A[1]=v,($||re(A,"default"))&&a.push(p)}}const m=[l,a];return ce(e)&&n.set(e,m),m}function Bn(e){return e[0]!=="$"&&!Jt(e)}const wn=e=>e==="_"||e==="_ctx"||e==="$stable",Sn=e=>q(e)?e.map(et):[et(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 l=Sn(r);t[o]=()=>l}}},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,l=de;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:rr(o,t,s):(r=!t.$stable,nr(t,o)),l=t}else t&&(or(e,t),l={default:1});if(r)for(const a in o)!wn(a)&&l[a]==null&&delete o[a]},Ne=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:l,createText:a,createComment:c,setText:m,setElementText:d,parentNode:p,nextSibling:x,setScopeId:A=st,insertStaticContent:B}=e,$=(u,f,h,T=null,b=null,w=null,R=void 0,D=null,M=!!f.dynamicChildren)=>{if(u===f)return;u&&!Bt(u,f)&&(T=ve(u),ge(u,b,w,!0),u=null),f.patchFlag===-2&&(M=!1,f.dynamicChildren=null);const{type:S,ref:z,shapeFlag:N}=f;switch(S){case js:v(u,f,h,T);break;case bt:P(u,f,h,T);break;case gs:u==null&&F(f,h,T,R);break;case ie:Te(u,f,h,T,b,w,R,D,M);break;default:N&1?ee(u,f,h,T,b,w,R,D,M):N&6?$e(u,f,h,T,b,w,R,D,M):(N&64||N&128)&&S.process(u,f,h,T,b,w,R,D,M,xt)}z!=null&&b?Yt(z,u&&u.ref,w,f||u,!f):z==null&&u&&u.ref!=null&&Yt(u.ref,null,w,u,!0)},v=(u,f,h,T)=>{if(u==null)n(f.el=a(f.children),h,T);else{const b=f.el=u.el;f.children!==u.children&&m(b,f.children)}},P=(u,f,h,T)=>{u==null?n(f.el=c(f.children||""),h,T):f.el=u.el},F=(u,f,h,T)=>{[u.el,u.anchor]=B(u.children,f,h,T,u.el,u.anchor)},W=({el:u,anchor:f},h,T)=>{let b;for(;u&&u!==f;)b=x(u),n(u,h,T),u=b;n(f,h,T)},U=({el:u,anchor:f})=>{let h;for(;u&&u!==f;)h=x(u),o(u),u=h;o(f)},ee=(u,f,h,T,b,w,R,D,M)=>{if(f.type==="svg"?R="svg":f.type==="math"&&(R="mathml"),u==null)he(f,h,T,b,w,R,D,M);else{const S=u.el&&u.el._isVueCE?u.el:null;try{S&&S._beginPatch(),J(u,f,b,w,R,D,M)}finally{S&&S._endPatch()}}},he=(u,f,h,T,b,w,R,D)=>{let M,S;const{props:z,shapeFlag:N,transition:H,dirs:G}=u;if(M=u.el=l(u.type,w,z&&z.is,z),N&8?d(M,u.children):N&16&&I(u.children,M,null,T,b,zs(u,w),R,D),G&&St(u,null,T,"created"),K(M,u,u.scopeId,R,T),z){for(const ue in z)ue!=="value"&&!Jt(ue)&&r(M,ue,null,z[ue],w,T);"value"in z&&r(M,"value",null,z.value,w),(S=z.onVnodeBeforeMount)&&Ze(S,T,u)}G&&St(u,null,T,"beforeMount");const te=Xi(b,H);te&&H.beforeEnter(M),n(M,f,h),((S=z&&z.onVnodeMounted)||te||G)&&Ne(()=>{try{S&&Ze(S,T,u),te&&H.enter(M),G&&St(u,null,T,"mounted")}finally{}},b)},K=(u,f,h,T,b)=>{if(h&&A(u,h),T)for(let w=0;w<T.length;w++)A(u,T[w]);if(b){let w=b.subTree;if(f===w||cr(w.type)&&(w.ssContent===f||w.ssFallback===f)){const R=b.vnode;K(u,R,R.scopeId,R.slotScopeIds,b.parent)}}},I=(u,f,h,T,b,w,R,D,M=0)=>{for(let S=M;S<u.length;S++){const z=u[S]=D?at(u[S]):et(u[S]);$(null,z,f,h,T,b,w,R,D)}},J=(u,f,h,T,b,w,R)=>{const D=f.el=u.el;let{patchFlag:M,dynamicChildren:S,dirs:z}=f;M|=u.patchFlag&16;const N=u.props||de,H=f.props||de;let G;if(h&&Ct(h,!1),(G=H.onVnodeBeforeUpdate)&&Ze(G,h,f,u),z&&St(f,u,h,"beforeUpdate"),h&&Ct(h,!0),(N.innerHTML&&H.innerHTML==null||N.textContent&&H.textContent==null)&&d(D,""),S?me(u.dynamicChildren,S,D,h,T,zs(f,b),w):R||X(u,f,D,null,h,T,zs(f,b),w,!1),M>0){if(M&16)se(D,N,H,h,b);else if(M&2&&N.class!==H.class&&r(D,"class",null,H.class,b),M&4&&r(D,"style",N.style,H.style,b),M&8){const te=f.dynamicProps;for(let ue=0;ue<te.length;ue++){const fe=te[ue],we=N[fe],Ae=H[fe];(Ae!==we||fe==="value")&&r(D,fe,we,Ae,b,h)}}M&1&&u.children!==f.children&&d(D,f.children)}else!R&&S==null&&se(D,N,H,h,b);((G=H.onVnodeUpdated)||z)&&Ne(()=>{G&&Ze(G,h,f,u),z&&St(f,u,h,"updated")},T)},me=(u,f,h,T,b,w,R)=>{for(let D=0;D<f.length;D++){const M=u[D],S=f[D],z=M.el&&(M.type===ie||!Bt(M,S)||M.shapeFlag&198)?p(M.el):h;$(M,S,z,null,T,b,w,R,!0)}},se=(u,f,h,T,b)=>{if(f!==h){if(f!==de)for(const w in f)!Jt(w)&&!(w in h)&&r(u,w,f[w],null,b,T);for(const w in h){if(Jt(w))continue;const R=h[w],D=f[w];R!==D&&w!=="value"&&r(u,w,D,R,b,T)}"value"in h&&r(u,"value",f.value,h.value,b)}},Te=(u,f,h,T,b,w,R,D,M)=>{const S=f.el=u?u.el:a(""),z=f.anchor=u?u.anchor:a("");let{patchFlag:N,dynamicChildren:H,slotScopeIds:G}=f;G&&(D=D?D.concat(G):G),u==null?(n(S,h,T),n(z,h,T),I(f.children||[],h,z,b,w,R,D,M)):N>0&&N&64&&H&&u.dynamicChildren&&u.dynamicChildren.length===H.length?(me(u.dynamicChildren,H,h,b,w,R,D),(f.key!=null||b&&f===b.subTree)&&ir(u,f,!0)):X(u,f,h,z,b,w,R,D,M)},$e=(u,f,h,T,b,w,R,D,M)=>{f.slotScopeIds=D,u==null?f.shapeFlag&512?b.ctx.activate(f,h,T,R,M):gt(f,h,T,b,w,R,M):Et(u,f,M)},gt=(u,f,h,T,b,w,R)=>{const D=u.component=al(u,T,b);if(Wo(u)&&(D.ctx.renderer=xt),ul(D,!1,R),D.asyncDep){if(b&&b.registerDep(D,_e,R),!u.el){const M=D.subTree=nt(bt);P(null,M,f,h),u.placeholder=M.el}}else _e(D,u,f,h,b,w,R)},Et=(u,f,h)=>{const T=f.component=u.component;if(Bi(u,f,h))if(T.asyncDep&&!T.asyncResolved){ae(T,f,h);return}else T.next=f,T.update();else f.el=u.el,T.vnode=f},_e=(u,f,h,T,b,w,R)=>{const D=()=>{if(u.isMounted){let{next:N,bu:H,u:G,parent:te,vnode:ue}=u;{const Ge=lr(u);if(Ge){N&&(N.el=ue.el,ae(u,N,R)),Ge.asyncDep.then(()=>{Ne(()=>{u.isUnmounted||S()},b)});return}}let fe=N,we;Ct(u,!1),N?(N.el=ue.el,ae(u,N,R)):N=ue,H&&ms(H),(we=N.props&&N.props.onVnodeBeforeUpdate)&&Ze(we,te,N,ue),Ct(u,!0);const Ae=Un(u),qe=u.subTree;u.subTree=Ae,$(qe,Ae,p(qe.el),ve(qe),u,b,w),N.el=Ae.el,fe===null&&Wi(u,Ae.el),G&&Ne(G,b),(we=N.props&&N.props.onVnodeUpdated)&&Ne(()=>Ze(we,te,N,ue),b)}else{let N;const{el:H,props:G}=f,{bm:te,m:ue,parent:fe,root:we,type:Ae}=u,qe=Zt(f);Ct(u,!1),te&&ms(te),!qe&&(N=G&&G.onVnodeBeforeMount)&&Ze(N,fe,f),Ct(u,!0);{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(Ae,u.parent?u.parent.type:void 0);const Ge=u.subTree=Un(u);$(null,Ge,h,T,u,b,w),f.el=Ge.el}if(ue&&Ne(ue,b),!qe&&(N=G&&G.onVnodeMounted)){const Ge=f;Ne(()=>Ze(N,fe,Ge),b)}(f.shapeFlag&256||fe&&Zt(fe.vnode)&&fe.vnode.shapeFlag&256)&&u.a&&Ne(u.a,b),u.isMounted=!0,f=h=T=null}};u.scope.on();const M=u.effect=new bo(D);u.scope.off();const S=u.update=M.run.bind(M),z=u.job=M.runIfDirty.bind(M);z.i=u,z.id=u.uid,M.scheduler=()=>yn(z),Ct(u,!0),S()},ae=(u,f,h)=>{f.component=u;const T=u.vnode.props;u.vnode=f,u.next=null,zi(u,f.props,T,h),Yi(u,f.children,h),ft(),On(u),pt()},X=(u,f,h,T,b,w,R,D,M=!1)=>{const S=u&&u.children,z=u?u.shapeFlag:0,N=f.children,{patchFlag:H,shapeFlag:G}=f;if(H>0){if(H&128){E(S,N,h,T,b,w,R,D,M);return}else if(H&256){V(S,N,h,T,b,w,R,D,M);return}}G&8?(z&16&&g(S,b,w),N!==S&&d(h,N)):z&16?G&16?E(S,N,h,T,b,w,R,D,M):g(S,b,w,!0):(z&8&&d(h,""),G&16&&I(N,h,T,b,w,R,D,M))},V=(u,f,h,T,b,w,R,D,M)=>{u=u||It,f=f||It;const S=u.length,z=f.length,N=Math.min(S,z);let H;for(H=0;H<N;H++){const G=f[H]=M?at(f[H]):et(f[H]);$(u[H],G,h,null,b,w,R,D,M)}S>z?g(u,b,w,!0,!1,N):I(f,h,T,b,w,R,D,M,N)},E=(u,f,h,T,b,w,R,D,M)=>{let S=0;const z=f.length;let N=u.length-1,H=z-1;for(;S<=N&&S<=H;){const G=u[S],te=f[S]=M?at(f[S]):et(f[S]);if(Bt(G,te))$(G,te,h,null,b,w,R,D,M);else break;S++}for(;S<=N&&S<=H;){const G=u[N],te=f[H]=M?at(f[H]):et(f[H]);if(Bt(G,te))$(G,te,h,null,b,w,R,D,M);else break;N--,H--}if(S>N){if(S<=H){const G=H+1,te=G<z?f[G].el:T;for(;S<=H;)$(null,f[S]=M?at(f[S]):et(f[S]),h,te,b,w,R,D,M),S++}}else if(S>H)for(;S<=N;)ge(u[S],b,w,!0),S++;else{const G=S,te=S,ue=new Map;for(S=te;S<=H;S++){const Fe=f[S]=M?at(f[S]):et(f[S]);Fe.key!=null&&ue.set(Fe.key,S)}let fe,we=0;const Ae=H-te+1;let qe=!1,Ge=0;const Ut=new Array(Ae);for(S=0;S<Ae;S++)Ut[S]=0;for(S=G;S<=N;S++){const Fe=u[S];if(we>=Ae){ge(Fe,b,w,!0);continue}let Ye;if(Fe.key!=null)Ye=ue.get(Fe.key);else for(fe=te;fe<=H;fe++)if(Ut[fe-te]===0&&Bt(Fe,f[fe])){Ye=fe;break}Ye===void 0?ge(Fe,b,w,!0):(Ut[Ye-te]=S+1,Ye>=Ge?Ge=Ye:qe=!0,$(Fe,f[Ye],h,null,b,w,R,D,M),we++)}const Tn=qe?el(Ut):It;for(fe=Tn.length-1,S=Ae-1;S>=0;S--){const Fe=te+S,Ye=f[Fe],$n=f[Fe+1],An=Fe+1<z?$n.el||ar($n):T;Ut[S]===0?$(null,Ye,h,An,b,w,R,D,M):qe&&(fe<0||S!==Tn[fe]?ye(Ye,h,An,2):fe--)}}},ye=(u,f,h,T,b=null)=>{const{el:w,type:R,transition:D,children:M,shapeFlag:S}=u;if(S&6){ye(u.component.subTree,f,h,T);return}if(S&128){u.suspense.move(f,h,T);return}if(S&64){R.move(u,f,h,xt);return}if(R===ie){n(w,f,h);for(let N=0;N<M.length;N++)ye(M[N],f,h,T);n(u.anchor,f,h);return}if(R===gs){W(u,f,h);return}if(T!==2&&S&1&&D)if(T===0)D.beforeEnter(w),n(w,f,h),Ne(()=>D.enter(w),b);else{const{leave:N,delayLeave:H,afterLeave:G}=D,te=()=>{u.ctx.isUnmounted?o(w):n(w,f,h)},ue=()=>{w._isLeaving&&w[hi](!0),N(w,()=>{te(),G&&G()})};H?H(w,te,ue):ue()}else n(w,f,h)},ge=(u,f,h,T=!1,b=!1)=>{const{type:w,props:R,ref:D,children:M,dynamicChildren:S,shapeFlag:z,patchFlag:N,dirs:H,cacheIndex:G,memo:te}=u;if(N===-2&&(b=!1),D!=null&&(ft(),Yt(D,null,h,u,!0),pt()),G!=null&&(f.renderCache[G]=void 0),z&256){f.ctx.deactivate(u);return}const ue=z&1&&H,fe=!Zt(u);let we;if(fe&&(we=R&&R.onVnodeBeforeUnmount)&&Ze(we,f,u),z&6)y(u.component,h,T);else{if(z&128){u.suspense.unmount(h,T);return}ue&&St(u,null,f,"beforeUnmount"),z&64?u.type.remove(u,f,h,xt,T):S&&!S.hasOnce&&(w!==ie||N>0&&N&64)?g(S,f,h,!1,!0):(w===ie&&N&384||!b&&z&16)&&g(M,f,h),T&&ne(u)}const Ae=te!=null&&G==null;(fe&&(we=R&&R.onVnodeUnmounted)||ue||Ae)&&Ne(()=>{we&&Ze(we,f,u),ue&&St(u,null,f,"unmounted"),Ae&&(u.el=null)},h)},ne=u=>{const{type:f,el:h,anchor:T,transition:b}=u;if(f===ie){L(h,T);return}if(f===gs){U(u);return}const w=()=>{o(h),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(u.shapeFlag&1&&b&&!b.persisted){const{leave:R,delayLeave:D}=b,M=()=>R(h,w);D?D(u.el,w,M):M()}else w()},L=(u,f)=>{let h;for(;u!==f;)h=x(u),o(u),u=h;o(f)},y=(u,f,h)=>{const{bum:T,scope:b,job:w,subTree:R,um:D,m:M,a:S}=u;Wn(M),Wn(S),T&&ms(T),b.stop(),w&&(w.flags|=8,ge(R,u,f,h)),D&&Ne(D,f),Ne(()=>{u.isUnmounted=!0},f)},g=(u,f,h,T=!1,b=!1,w=0)=>{for(let R=w;R<u.length;R++)ge(u[R],f,h,T,b)},ve=u=>{if(u.shapeFlag&6)return ve(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=x(u.anchor||u.el),h=f&&f[pi];return h?x(h):f};let Oe=!1;const O=(u,f,h)=>{let T;u==null?f._vnode&&(ge(f._vnode,null,null,!0),T=f._vnode.component):$(f._vnode||null,u,f,null,null,null,h),f._vnode=u,Oe||(Oe=!0,On(T),Lo(),Oe=!1)},xt={p:$,um:ge,m:ye,r:ne,mt:gt,mc:I,pc:X,pbc:me,n:ve,o:e};return{render:O,hydrate:void 0,createApp:Ni(O)}}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(q(n)&&q(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=at(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&ir(l,a)),a.type===js&&(a.patchFlag===-1&&(a=o[r]=at(a)),a.el=l.el),a.type===bt&&!a.el&&(a.el=l.el)}}function el(e){const t=e.slice(),s=[0];let n,o,r,l,a;const c=e.length;for(n=0;n<c;n++){const m=e[n];if(m!==0){if(o=s[s.length-1],e[o]<m){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<m?r=a+1:l=a;m<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function lr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:lr(t)}function Wn(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?q(e)?t.effects.push(...e):t.effects.push(e):li(e)}const ie=Symbol.for("v-fgt"),js=Symbol.for("v-txt"),bt=Symbol.for("v-cmt"),gs=Symbol.for("v-stc"),Xt=[];let Ue=null;function _(e=!1){Xt.push(Ue=e?null:[])}function sl(){Xt.pop(),Ue=Xt[Xt.length-1]||null}let ns=1;function Kn(e,t=!1){ns+=e,e<0&&Ue&&t&&(Ue.hasOnce=!0)}function ur(e){return e.dynamicChildren=ns>0?Ue||It:null,sl(),ns>0&&Ue&&Ue.push(e),e}function C(e,t,s,n,o,r){return ur(i(e,t,s,n,o,r,!0))}function dr(e,t,s,n,o){return ur(nt(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?be(e)||Ie(e)||Z(e)?{i:Ve,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,l=!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:Ve};return a?(Cn(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=be(s)?8:16),ns>0&&!l&&Ue&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Ue.push(c),c}const nt=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&&Ue&&(a.shapeFlag&6?Ue[Ue.indexOf(e)]=a:Ue.push(a)),a.patchFlag=-2,a}if(hl(e)&&(e=e.__vccOpts),t){t=ol(t);let{class:a,style:c}=t;a&&!be(a)&&(t.class=Y(a)),ce(c)&&(vn(c)&&!q(c)&&(c=Ee({},c)),t.style=Ms(c))}const l=be(e)?1:cr(e)?128:mi(e)?64:ce(e)?4:Z(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function ol(e){return e?vn(e)||er(e)?Ee({},e):e:null}function Nt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:c}=e,m=t?rl(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&pr(m),ref:t&&t.ref?s&&r?q(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!==ie?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&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 He(e=" ",t=0){return nt(js,null,e,t)}function We(e,t){const s=nt(gs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(_(),dr(bt,null,e)):nt(bt,null,e)}function et(e){return e==null||typeof e=="boolean"?nt(bt):q(e)?nt(ie,null,e.slice()):fr(e)?at(e):nt(js,null,String(e))}function at(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(q(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=Ve:o===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Z(t)?(t={default:t,_ctx:Ve},s=32):(t=String(t),n&64?(s=16,t=[He(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=Ms([t.style,n.style]);else if(ks(o)){const r=t[o],l=n[o];l&&r!==l&&!(q(r)&&r.includes(l))?t[o]=r?[].concat(r,l):l:l==null&&r==null&&!Ts(o)&&(t[o]=l)}else o!==""&&(t[o]=n[o])}return t}function Ze(e,t,s,n=null){rt(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:de,inheritAttrs:n.inheritAttrs,ctx:de,data:de,props:de,attrs:de,slots:de,refs:de,setupState:de,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 Me=null;const cl=()=>Me||Ve;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(l=>l(r)):o[0](r)}};Cs=t("__VUE_INSTANCE_SETTERS__",s=>Me=s),on=t("__VUE_SSR_SETTERS__",s=>os=s)}const cs=e=>{const t=Me;return Cs(e),e.scope.on(),()=>{e.scope.off(),Cs(t)}},zn=()=>{Me&&Me.scope.off(),Cs(null)};function mr(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=mr(e);Ki(e,n,r,t),Gi(e,o,s||t);const l=r?dl(e,t):void 0;return t&&on(!1),l}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){ft();const o=e.setupContext=n.length>1?pl(e):null,r=cs(e),l=as(n,e,0,[e.props,o]),a=po(l);if(pt(),r(),(a||e.sp)&&!Zt(e)&&Bo(e),a){if(l.then(zn,zn),t)return l.then(c=>{Jn(e,c)}).catch(c=>{Os(c,e,0)});e.asyncDep=l}else Jn(e,l)}else hr(e)}function Jn(e,t,s){Z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ce(t)&&(e.setupState=Do(t)),hr(e)}function hr(e,t,s){const n=e.type;e.render||(e.render=n.render||st);{const o=cs(e);ft();try{Mi(e)}finally{pt(),o()}}}const fl={get(e,t){return Pe(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 ml(e,t=!0){return Z(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e){return Z(e)&&"__vccOpts"in e}const Ke=(e,t)=>si(e,t,os),gl="3.5.31";/**
|
|
60
|
+
**/function cs(e,t,s,n){try{return n?e(...n):e()}catch(o){Ds(o,t,s)}}function it(e,t,s,n){if(Y(e)){const o=cs(e,t,s,n);return o&&po(o)&&o.catch(r=>{Ds(r,t,s)}),o}if(J(e)){const o=[];for(let r=0;r<e.length;r++)o.push(it(e[r],t,s,n));return o}}function Ds(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||de;if(t){let a=t.parent;const u=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const f=a.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](e,u,h)===!1)return}a=a.parent}if(r){pt(),cs(r,null,10,[e,u,h]),ht();return}}ri(e,s,o,n,l)}function ri(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Oe=[];let Xe=-1;const Rt=[];let vt=null,Mt=0;const Ro=Promise.resolve();let _s=null;function jo(e){const t=_s||Ro;return e?t.then(this?e.bind(this):e):t}function ii(e){let t=Xe+1,s=Oe.length;for(;t<s;){const n=t+s>>>1,o=Oe[n],r=ns(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function yn(e){if(!(e.flags&1)){const t=ns(e),s=Oe[Oe.length-1];!s||!(e.flags&2)&&t>=ns(s)?Oe.push(e):Oe.splice(ii(t),0,e),e.flags|=1,No()}}function No(){_s||(_s=Ro.then(Fo))}function li(e){J(e)?Rt.push(...e):vt&&e.id===-1?vt.splice(Mt+1,0,e):e.flags&1||(Rt.push(e),e.flags|=1),No()}function On(e,t,s=Xe+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(Rt.length){const t=[...new Set(Rt)].sort((s,n)=>ns(s)-ns(n));if(Rt.length=0,vt){vt.push(...t);return}for(vt=t,Mt=0;Mt<vt.length;Mt++){const s=vt[Mt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}vt=null,Mt=0}}const ns=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Fo(e){try{for(Xe=0;Xe<Oe.length;Xe++){const t=Oe[Xe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),cs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xe<Oe.length;Xe++){const t=Oe[Xe];t&&(t.flags&=-2)}Xe=-1,Oe.length=0,Lo(),_s=null,(Oe.length||Rt.length)&&Fo()}}let Le=null,Vo=null;function ws(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&&Kn(-1);const r=ws(t);let l;try{l=e(...o)}finally{ws(r),n._d&&Kn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(Le===null)return e;const s=Ls(Le),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,u=de]=t[o];r&&(Y(r)&&(r={mounted:r,updated:r}),r.deep&&dt(l),n.push({dir:r,instance:s,value:l,oldValue:void 0,arg:a,modifiers:u}))}return e}function St(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let u=a.dir[n];u&&(pt(),it(u,s,8,[e.el,a,e,t]),ht())}}function ci(e,t){if(Ie){let s=Ie.provides;const n=Ie.parent&&Ie.parent.provides;n===s&&(s=Ie.provides=Object.create(n)),s[e]=t}}function gs(e,t,s=!1){const n=cl();if(n||jt){let o=jt?jt._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 ui=Symbol.for("v-scx"),di=()=>gs(ui);function Ws(e,t,s){return Uo(e,t,s)}function Uo(e,t,s=de){const{immediate:n,deep:o,flush:r,once:l}=s,a=Ae({},s),u=t&&n||!t&&r!=="post";let h;if(rs){if(r==="sync"){const A=di();h=A.__watcherHandles||(A.__watcherHandles=[])}else if(!u){const A=()=>{};return A.stop=nt,A.resume=nt,A.pause=nt,A}}const f=Ie;a.call=(A,H,$)=>it(A,f,H,$);let p=!1;r==="post"?a.scheduler=A=>{Re(A,f&&f.suspense)}:r!=="sync"&&(p=!0,a.scheduler=(A,H)=>{H?A():yn(A)}),a.augmentJob=A=>{t&&(A.flags|=4),p&&(A.flags|=2,f&&(A.id=f.uid,A.i=f))};const v=oi(e,t,a);return rs&&(h?h.push(v):u&&v()),v}function fi(e,t,s){const n=this.proxy,o=ve(e)?e.includes(".")?Ho(n,e):()=>n[e]:e.bind(n,n);let r;Y(t)?r=t:(r=t.handler,s=t);const l=us(this),a=Uo(o,r.bind(n),s);return l(),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 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 Y(e)?Ae({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 Ss=new WeakMap;function Zt(e,t,s,n,o=!1){if(J(e)){e.forEach(($,b)=>Zt($,t&&(J(t)?t[b]:t),s,n,o));return}if(Qt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Zt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Ls(n.component):n.el,l=o?null:r,{i:a,r:u}=e,h=t&&t.r,f=a.refs===de?a.refs={}:a.refs,p=a.setupState,v=oe(p),A=p===de?fo:$=>Dn(f,$)?!1:re(v,$),H=($,b)=>!(b&&Dn(f,b));if(h!=null&&h!==u){if(Rn(t),ve(h))f[h]=null,A(h)&&(p[h]=null);else if(Pe(h)){const $=t;H(h,$.k)&&(h.value=null),$.k&&(f[$.k]=null)}}if(Y(u))cs(u,a,12,[l,f]);else{const $=ve(u),b=Pe(u);if($||b){const I=()=>{if(e.f){const L=$?A(u)?p[u]:f[u]:H()||!e.k?u.value:f[e.k];if(o)J(L)&&an(L,r);else if(J(L))L.includes(r)||L.push(r);else if($)f[u]=[r],A(u)&&(p[u]=f[u]);else{const B=[r];H(u,e.k)&&(u.value=B),e.k&&(f[e.k]=B)}}else $?(f[u]=l,A(u)&&(p[u]=l)):b&&(H(u,e.k)&&(u.value=l),e.k&&(f[e.k]=l))};if(l){const L=()=>{I(),Ss.delete(e)};L.id=-1,Ss.set(e,L),Re(L,s)}else Rn(e),I()}}}function Rn(e){const t=Ss.get(e);t&&(t.flags|=8,Ss.delete(e))}Ps().requestIdleCallback;Ps().cancelIdleCallback;const Qt=e=>!!e.type.__asyncLoader,Wo=e=>e.type.__isKeepAlive;function gi(e,t){Ko(e,"a",t)}function xi(e,t){Ko(e,"da",t)}function Ko(e,t,s=Ie){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Rs(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Wo(o.parent.vnode)&&vi(n,t,s,o),o=o.parent}}function vi(e,t,s,n){const o=Rs(t,e,n,!0);_n(()=>{an(n[t],o)},s)}function Rs(e,t,s=Ie,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{pt();const a=us(s),u=it(t,s,e,l);return a(),ht(),u});return n?o.unshift(r):o.push(r),r}}const gt=e=>(t,s=Ie)=>{(!rs||e==="sp")&&Rs(e,(...n)=>t(...n),s)},yi=gt("bm"),wt=gt("m"),bi=gt("bu"),_i=gt("u"),wi=gt("bum"),_n=gt("um"),Si=gt("sp"),ki=gt("rtg"),Ci=gt("rtc");function Ti(e,t=Ie){Rs("ec",e,t)}const $i="components",zo=Symbol.for("v-ndc");function Ai(e){return ve(e)?Ei($i,e,!1)||e:e||zo}function Ei(e,t,s=!0,n=!1){const o=Le||Ie;if(o){const r=o.type;{const a=hl(r,!1);if(a&&(a===t||a===De(t)||a===Es(De(t))))return r}const l=jn(o[e]||r[e],t)||jn(o.appContext[e],t);return!l&&n?r:l}}function jn(e,t){return e&&(e[t]||e[De(t)]||e[Es(De(t))])}function Se(e,t,s,n){let o;const r=s,l=J(e);if(l||ve(e)){const a=l&&$t(e);let u=!1,h=!1;a&&(u=!Ue(e),h=mt(e),e=Os(e)),o=new Array(e.length);for(let f=0,p=e.length;f<p;f++)o[f]=t(u?h?Nt(Je(e[f])):Je(e[f]):e[f],f,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,u)=>t(a,u,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,h=a.length;u<h;u++){const f=a[u];o[u]=t(e[f],f,u,r)}}else o=[];return o}const en=e=>e?hr(e)?Ls(e):en(e.parent):null,Xt=Ae(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)}),Ks=(e,t)=>e!==de&&!e.__isScriptSetup&&re(e,t),Ii={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:u}=e;if(t[0]!=="$"){const v=l[t];if(v!==void 0)switch(v){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Ks(n,t))return l[t]=1,n[t];if(o!==de&&re(o,t))return l[t]=2,o[t];if(re(r,t))return l[t]=3,r[t];if(s!==de&&re(s,t))return l[t]=4,s[t];tn&&(l[t]=0)}}const h=Xt[t];let f,p;if(h)return t==="$attrs"&&Ee(e.attrs,"get",""),h(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(s!==de&&re(s,t))return l[t]=4,s[t];if(p=u.config.globalProperties,re(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Ks(o,t)?(o[t]=s,!0):n!==de&&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:l}},a){let u;return!!(s[a]||e!==de&&a[0]!=="$"&&re(e,a)||Ks(t,a)||re(r,a)||re(n,a)||re(Xt,a)||re(o.config.globalProperties,a)||(u=l.__cssModules)&&u[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 Nn(e){return J(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let tn=!0;function Pi(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:l,watch:a,provide:u,inject:h,created:f,beforeMount:p,mounted:v,beforeUpdate:A,updated:H,activated:$,deactivated:b,beforeDestroy:I,beforeUnmount:L,destroyed:B,unmounted:F,render:Z,renderTracked:he,renderTriggered:W,errorCaptured:j,serverPrefetch:z,expose:X,inheritAttrs:ee,components:ke,directives:Ce,filters:xt}=t;if(h&&Mi(h,n,null),l)for(const ce in l){const se=l[ce];Y(se)&&(n[ce]=se.bind(s))}if(o){const ce=o.call(s,s);ae(ce)&&(e.data=gn(ce))}if(tn=!0,r)for(const ce in r){const se=r[ce],V=Y(se)?se.bind(s,s):Y(se.get)?se.get.bind(s,s):nt,E=!Y(se)&&Y(se.set)?se.set.bind(s):nt,Te=Ke({get:V,set:E});Object.defineProperty(n,ce,{enumerable:!0,configurable:!0,get:()=>Te.value,set:ge=>Te.value=ge})}if(a)for(const ce in a)Jo(a[ce],n,s,ce);if(u){const ce=Y(u)?u.call(s):u;Reflect.ownKeys(ce).forEach(se=>{ci(se,ce[se])})}f&&Ln(f,e,"c");function we(ce,se){J(se)?se.forEach(V=>ce(V.bind(s))):se&&ce(se.bind(s))}if(we(yi,p),we(wt,v),we(bi,A),we(_i,H),we(gi,$),we(xi,b),we(Ti,j),we(Ci,he),we(ki,W),we(wi,L),we(_n,F),we(Si,z),J(X))if(X.length){const ce=e.exposed||(e.exposed={});X.forEach(se=>{Object.defineProperty(ce,se,{get:()=>s[se],set:V=>s[se]=V,enumerable:!0})})}else e.exposed||(e.exposed={});Z&&e.render===nt&&(e.render=Z),ee!=null&&(e.inheritAttrs=ee),ke&&(e.components=ke),Ce&&(e.directives=Ce),z&&Bo(e)}function Mi(e,t,s=nt){J(e)&&(e=sn(e));for(const n in e){const o=e[n];let r;ae(o)?"default"in o?r=gs(o.from||n,o.default,!0):r=gs(o.from||n):r=gs(o),Pe(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function Ln(e,t,s){it(J(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Jo(e,t,s,n){let o=n.includes(".")?Ho(s,n):()=>s[n];if(ve(e)){const r=t[e];Y(r)&&Ws(o,r)}else if(Y(e))Ws(o,e.bind(s));else if(ae(e))if(J(e))e.forEach(r=>Jo(r,t,s,n));else{const r=Y(e.handler)?e.handler.bind(s):t[e.handler];Y(r)&&Ws(o,r,e)}}function qo(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let u;return a?u=a:!o.length&&!s&&!n?u=t:(u={},o.length&&o.forEach(h=>ks(u,h,l,!0)),ks(u,t,l)),ae(t)&&r.set(t,u),u}function ks(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&ks(e,r,s,!0),o&&o.forEach(l=>ks(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Oi[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Oi={data:Fn,props:Vn,emits:Vn,methods:zt,computed:zt,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:zt,directives:zt,watch:Ri,provide:Fn,inject:Di};function Fn(e,t){return t?e?function(){return Ae(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function Di(e,t){return zt(sn(e),sn(t))}function sn(e){if(J(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 zt(e,t){return e?Ae(Object.create(null),e,t):t}function Vn(e,t){return e?J(e)&&J(t)?[...new Set([...e,...t])]:Ae(Object.create(null),Nn(e),Nn(t??{})):t}function Ri(e,t){if(!e)return t;if(!t)return e;const s=Ae(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){Y(n)||(n=Ae({},n)),o!=null&&!ae(o)&&(o=null);const r=Go(),l=new WeakSet,a=[];let u=!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(f){},use(f,...p){return l.has(f)||(f&&Y(f.install)?(l.add(f),f.install(h,...p)):Y(f)&&(l.add(f),f(h,...p))),h},mixin(f){return r.mixins.includes(f)||r.mixins.push(f),h},component(f,p){return p?(r.components[f]=p,h):r.components[f]},directive(f,p){return p?(r.directives[f]=p,h):r.directives[f]},mount(f,p,v){if(!u){const A=h._ceVNode||ot(n,o);return A.appContext=r,v===!0?v="svg":v===!1&&(v=void 0),e(A,f,v),u=!0,h._container=f,f.__vue_app__=h,Ls(A.component)}},onUnmount(f){a.push(f)},unmount(){u&&(it(a,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(f,p){return r.provides[f]=p,h},runWithContext(f){const p=jt;jt=h;try{return f()}finally{jt=p}}};return h}}let jt=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||de;let o=s;const r=t.startsWith("update:"),l=r&&Li(n,t.slice(7));l&&(l.trim&&(o=s.map(f=>ve(f)?f.trim():f)),l.number&&(o=s.map(Is)));let a,u=n[a=Fs(t)]||n[a=Fs(De(t))];!u&&r&&(u=n[a=Fs(_t(t))]),u&&it(u,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,it(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 l={},a=!1;if(!Y(e)){const u=h=>{const f=Yo(h,t,!0);f&&(a=!0,Ae(l,f))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!a?(ae(e)&&n.set(e,null),null):(J(r)?r.forEach(u=>l[u]=null):Ae(l,r),ae(e)&&n.set(e,l),l)}function js(e,t){return!e||!Ts(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,_t(t))||re(e,t))}function Un(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:u,render:h,renderCache:f,props:p,data:v,setupState:A,ctx:H,inheritAttrs:$}=e,b=ws(e);let I,L;try{if(s.shapeFlag&4){const F=o||n,Z=F;I=tt(h.call(Z,F,f,p,A,v,H)),L=a}else{const F=t;I=tt(F.length>1?F(p,{attrs:a,slots:l,emit:u}):F(p,null)),L=t.props?a:Ui(a)}}catch(F){es.length=0,Ds(F,e,1),I=ot(bt)}let B=I;if(L&&$!==!1){const F=Object.keys(L),{shapeFlag:Z}=B;F.length&&Z&7&&(r&&F.some($s)&&(L=Hi(L,r)),B=Lt(B,L,!1,!0))}return s.dirs&&(B=Lt(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(s.dirs):s.dirs),s.transition&&bn(B,s.transition),I=B,ws(b),I}const Ui=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ts(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const n in e)(!$s(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:l,children:a,patchFlag:u}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?Hn(n,l,h):!!l;if(u&8){const f=t.dynamicProps;for(let p=0;p<f.length;p++){const v=f[p];if(Zo(l,n,v)&&!js(h,v))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?Hn(n,l,h):!0:!!l;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(Zo(t,e,r)&&!js(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)?!Ut(n,o):n!==o}function Wi({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 Ki(e,t,s,n=!1){const o={},r=Xo();e.propsDefaults=Object.create(null),tr(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=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:l}}=e,a=oe(o),[u]=e.propsOptions;let h=!1;if((n||l>0)&&!(l&16)){if(l&8){const f=e.vnode.dynamicProps;for(let p=0;p<f.length;p++){let v=f[p];if(js(e.emitsOptions,v))continue;const A=t[v];if(u)if(re(r,v))A!==r[v]&&(r[v]=A,h=!0);else{const H=De(v);o[H]=nn(u,a,H,A,e,!1)}else A!==r[v]&&(r[v]=A,h=!0)}}}else{tr(e,t,o,r)&&(h=!0);let f;for(const p in a)(!t||!re(t,p)&&((f=_t(p))===p||!re(t,f)))&&(u?s&&(s[p]!==void 0||s[f]!==void 0)&&(o[p]=nn(u,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&&ut(e.attrs,"set","")}function tr(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let u in t){if(qt(u))continue;const h=t[u];let f;o&&re(o,f=De(u))?!r||!r.includes(f)?s[f]=h:(a||(a={}))[f]=h:js(e.emitsOptions,u)||(!(u in n)||h!==n[u])&&(n[u]=h,l=!0)}if(r){const u=oe(s),h=a||de;for(let f=0;f<r.length;f++){const p=r[f];s[p]=nn(o,u,p,h[p],e,!re(h,p))}}return l}function nn(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=re(l,"default");if(a&&n===void 0){const u=l.default;if(l.type!==Function&&!l.skipFactory&&Y(u)){const{propsDefaults:h}=o;if(s in h)n=h[s];else{const f=us(o);n=h[s]=u.call(null,t),f()}}else n=u;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[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,l={},a=[];let u=!1;if(!Y(e)){const f=p=>{u=!0;const[v,A]=sr(p,t,!0);Ae(l,v),A&&a.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!r&&!u)return ae(e)&&n.set(e,Ot),Ot;if(J(r))for(let f=0;f<r.length;f++){const p=De(r[f]);Bn(p)&&(l[p]=de)}else if(r)for(const f in r){const p=De(f);if(Bn(p)){const v=r[f],A=l[p]=J(v)||Y(v)?{type:v}:Ae({},v),H=A.type;let $=!1,b=!0;if(J(H))for(let I=0;I<H.length;++I){const L=H[I],B=Y(L)&&L.name;if(B==="Boolean"){$=!0;break}else B==="String"&&(b=!1)}else $=Y(H)&&H.name==="Boolean";A[0]=$,A[1]=b,($||re(A,"default"))&&a.push(p)}}const h=[l,a];return ae(e)&&n.set(e,h),h}function Bn(e){return e[0]!=="$"&&!qt(e)}const wn=e=>e==="_"||e==="_ctx"||e==="$stable",Sn=e=>J(e)?e.map(tt):[tt(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(Y(r))t[o]=qi(o,r,n);else if(r!=null){const l=Sn(r);t[o]=()=>l}}},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,l=de;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:rr(o,t,s):(r=!t.$stable,nr(t,o)),l=t}else t&&(or(e,t),l={default:1});if(r)for(const a in o)!wn(a)&&l[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:l,createText:a,createComment:u,setText:h,setElementText:f,parentNode:p,nextSibling:v,setScopeId:A=nt,insertStaticContent:H}=e,$=(d,c,g,k=null,y=null,C=null,D=void 0,M=null,P=!!c.dynamicChildren)=>{if(d===c)return;d&&!Wt(d,c)&&(k=qe(d),ge(d,y,C,!0),d=null),c.patchFlag===-2&&(P=!1,c.dynamicChildren=null);const{type:T,ref:K,shapeFlag:N}=c;switch(T){case Ns:b(d,c,g,k);break;case bt:I(d,c,g,k);break;case xs:d==null&&L(c,g,k,D);break;case ie:ke(d,c,g,k,y,C,D,M,P);break;default:N&1?Z(d,c,g,k,y,C,D,M,P):N&6?Ce(d,c,g,k,y,C,D,M,P):(N&64||N&128)&&T.process(d,c,g,k,y,C,D,M,P,m)}K!=null&&y?Zt(K,d&&d.ref,C,c||d,!c):K==null&&d&&d.ref!=null&&Zt(d.ref,null,C,d,!0)},b=(d,c,g,k)=>{if(d==null)n(c.el=a(c.children),g,k);else{const y=c.el=d.el;c.children!==d.children&&h(y,c.children)}},I=(d,c,g,k)=>{d==null?n(c.el=u(c.children||""),g,k):c.el=d.el},L=(d,c,g,k)=>{[d.el,d.anchor]=H(d.children,c,g,k,d.el,d.anchor)},B=({el:d,anchor:c},g,k)=>{let y;for(;d&&d!==c;)y=v(d),n(d,g,k),d=y;n(c,g,k)},F=({el:d,anchor:c})=>{let g;for(;d&&d!==c;)g=v(d),o(d),d=g;o(c)},Z=(d,c,g,k,y,C,D,M,P)=>{if(c.type==="svg"?D="svg":c.type==="math"&&(D="mathml"),d==null)he(c,g,k,y,C,D,M,P);else{const T=d.el&&d.el._isVueCE?d.el:null;try{T&&T._beginPatch(),z(d,c,y,C,D,M,P)}finally{T&&T._endPatch()}}},he=(d,c,g,k,y,C,D,M)=>{let P,T;const{props:K,shapeFlag:N,transition:U,dirs:q}=d;if(P=d.el=l(d.type,C,K&&K.is,K),N&8?f(P,d.children):N&16&&j(d.children,P,null,k,y,zs(d,C),D,M),q&&St(d,null,k,"created"),W(P,d,d.scopeId,D,k),K){for(const ue in K)ue!=="value"&&!qt(ue)&&r(P,ue,null,K[ue],C,k);"value"in K&&r(P,"value",null,K.value,C),(T=K.onVnodeBeforeMount)&&Qe(T,k,d)}q&&St(d,null,k,"beforeMount");const te=Xi(y,U);te&&U.beforeEnter(P),n(P,c,g),((T=K&&K.onVnodeMounted)||te||q)&&Re(()=>{try{T&&Qe(T,k,d),te&&U.enter(P),q&&St(d,null,k,"mounted")}finally{}},y)},W=(d,c,g,k,y)=>{if(g&&A(d,g),k)for(let C=0;C<k.length;C++)A(d,k[C]);if(y){let C=y.subTree;if(c===C||cr(C.type)&&(C.ssContent===c||C.ssFallback===c)){const D=y.vnode;W(d,D,D.scopeId,D.slotScopeIds,y.parent)}}},j=(d,c,g,k,y,C,D,M,P=0)=>{for(let T=P;T<d.length;T++){const K=d[T]=M?ct(d[T]):tt(d[T]);$(null,K,c,g,k,y,C,D,M)}},z=(d,c,g,k,y,C,D)=>{const M=c.el=d.el;let{patchFlag:P,dynamicChildren:T,dirs:K}=c;P|=d.patchFlag&16;const N=d.props||de,U=c.props||de;let q;if(g&&kt(g,!1),(q=U.onVnodeBeforeUpdate)&&Qe(q,g,c,d),K&&St(c,d,g,"beforeUpdate"),g&&kt(g,!0),(N.innerHTML&&U.innerHTML==null||N.textContent&&U.textContent==null)&&f(M,""),T?X(d.dynamicChildren,T,M,g,k,zs(c,y),C):D||se(d,c,M,null,g,k,zs(c,y),C,!1),P>0){if(P&16)ee(M,N,U,g,y);else if(P&2&&N.class!==U.class&&r(M,"class",null,U.class,y),P&4&&r(M,"style",N.style,U.style,y),P&8){const te=c.dynamicProps;for(let ue=0;ue<te.length;ue++){const fe=te[ue],be=N[fe],$e=U[fe];($e!==be||fe==="value")&&r(M,fe,be,$e,y,g)}}P&1&&d.children!==c.children&&f(M,c.children)}else!D&&T==null&&ee(M,N,U,g,y);((q=U.onVnodeUpdated)||K)&&Re(()=>{q&&Qe(q,g,c,d),K&&St(c,d,g,"updated")},k)},X=(d,c,g,k,y,C,D)=>{for(let M=0;M<c.length;M++){const P=d[M],T=c[M],K=P.el&&(P.type===ie||!Wt(P,T)||P.shapeFlag&198)?p(P.el):g;$(P,T,K,null,k,y,C,D,!0)}},ee=(d,c,g,k,y)=>{if(c!==g){if(c!==de)for(const C in c)!qt(C)&&!(C in g)&&r(d,C,c[C],null,y,k);for(const C in g){if(qt(C))continue;const D=g[C],M=c[C];D!==M&&C!=="value"&&r(d,C,M,D,y,k)}"value"in g&&r(d,"value",c.value,g.value,y)}},ke=(d,c,g,k,y,C,D,M,P)=>{const T=c.el=d?d.el:a(""),K=c.anchor=d?d.anchor:a("");let{patchFlag:N,dynamicChildren:U,slotScopeIds:q}=c;q&&(M=M?M.concat(q):q),d==null?(n(T,g,k),n(K,g,k),j(c.children||[],g,K,y,C,D,M,P)):N>0&&N&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(X(d.dynamicChildren,U,g,y,C,D,M),(c.key!=null||y&&c===y.subTree)&&ir(d,c,!0)):se(d,c,g,K,y,C,D,M,P)},Ce=(d,c,g,k,y,C,D,M,P)=>{c.slotScopeIds=M,d==null?c.shapeFlag&512?y.ctx.activate(c,g,k,D,P):xt(c,g,k,y,C,D,P):Et(d,c,P)},xt=(d,c,g,k,y,C,D)=>{const M=d.component=al(d,k,y);if(Wo(d)&&(M.ctx.renderer=m),ul(M,!1,D),M.asyncDep){if(y&&y.registerDep(M,we,D),!d.el){const P=M.subTree=ot(bt);I(null,P,c,g),d.placeholder=P.el}}else we(M,d,c,g,y,C,D)},Et=(d,c,g)=>{const k=c.component=d.component;if(Bi(d,c,g))if(k.asyncDep&&!k.asyncResolved){ce(k,c,g);return}else k.next=c,k.update();else c.el=d.el,k.vnode=c},we=(d,c,g,k,y,C,D)=>{const M=()=>{if(d.isMounted){let{next:N,bu:U,u:q,parent:te,vnode:ue}=d;{const Ye=lr(d);if(Ye){N&&(N.el=ue.el,ce(d,N,D)),Ye.asyncDep.then(()=>{Re(()=>{d.isUnmounted||T()},y)});return}}let fe=N,be;kt(d,!1),N?(N.el=ue.el,ce(d,N,D)):N=ue,U&&ms(U),(be=N.props&&N.props.onVnodeBeforeUpdate)&&Qe(be,te,N,ue),kt(d,!0);const $e=Un(d),Ge=d.subTree;d.subTree=$e,$(Ge,$e,p(Ge.el),qe(Ge),d,y,C),N.el=$e.el,fe===null&&Wi(d,$e.el),q&&Re(q,y),(be=N.props&&N.props.onVnodeUpdated)&&Re(()=>Qe(be,te,N,ue),y)}else{let N;const{el:U,props:q}=c,{bm:te,m:ue,parent:fe,root:be,type:$e}=d,Ge=Qt(c);kt(d,!1),te&&ms(te),!Ge&&(N=q&&q.onVnodeBeforeMount)&&Qe(N,fe,c),kt(d,!0);{be.ce&&be.ce._hasShadowRoot()&&be.ce._injectChildStyle($e,d.parent?d.parent.type:void 0);const Ye=d.subTree=Un(d);$(null,Ye,g,k,d,y,C),c.el=Ye.el}if(ue&&Re(ue,y),!Ge&&(N=q&&q.onVnodeMounted)){const Ye=c;Re(()=>Qe(N,fe,Ye),y)}(c.shapeFlag&256||fe&&Qt(fe.vnode)&&fe.vnode.shapeFlag&256)&&d.a&&Re(d.a,y),d.isMounted=!0,c=g=k=null}};d.scope.on();const P=d.effect=new bo(M);d.scope.off();const T=d.update=P.run.bind(P),K=d.job=P.runIfDirty.bind(P);K.i=d,K.id=d.uid,P.scheduler=()=>yn(K),kt(d,!0),T()},ce=(d,c,g)=>{c.component=d;const k=d.vnode.props;d.vnode=c,d.next=null,zi(d,c.props,k,g),Yi(d,c.children,g),pt(),On(d),ht()},se=(d,c,g,k,y,C,D,M,P=!1)=>{const T=d&&d.children,K=d?d.shapeFlag:0,N=c.children,{patchFlag:U,shapeFlag:q}=c;if(U>0){if(U&128){E(T,N,g,k,y,C,D,M,P);return}else if(U&256){V(T,N,g,k,y,C,D,M,P);return}}q&8?(K&16&&Be(T,y,C),N!==T&&f(g,N)):K&16?q&16?E(T,N,g,k,y,C,D,M,P):Be(T,y,C,!0):(K&8&&f(g,""),q&16&&j(N,g,k,y,C,D,M,P))},V=(d,c,g,k,y,C,D,M,P)=>{d=d||Ot,c=c||Ot;const T=d.length,K=c.length,N=Math.min(T,K);let U;for(U=0;U<N;U++){const q=c[U]=P?ct(c[U]):tt(c[U]);$(d[U],q,g,null,y,C,D,M,P)}T>K?Be(d,y,C,!0,!1,N):j(c,g,k,y,C,D,M,P,N)},E=(d,c,g,k,y,C,D,M,P)=>{let T=0;const K=c.length;let N=d.length-1,U=K-1;for(;T<=N&&T<=U;){const q=d[T],te=c[T]=P?ct(c[T]):tt(c[T]);if(Wt(q,te))$(q,te,g,null,y,C,D,M,P);else break;T++}for(;T<=N&&T<=U;){const q=d[N],te=c[U]=P?ct(c[U]):tt(c[U]);if(Wt(q,te))$(q,te,g,null,y,C,D,M,P);else break;N--,U--}if(T>N){if(T<=U){const q=U+1,te=q<K?c[q].el:k;for(;T<=U;)$(null,c[T]=P?ct(c[T]):tt(c[T]),g,te,y,C,D,M,P),T++}}else if(T>U)for(;T<=N;)ge(d[T],y,C,!0),T++;else{const q=T,te=T,ue=new Map;for(T=te;T<=U;T++){const Ne=c[T]=P?ct(c[T]):tt(c[T]);Ne.key!=null&&ue.set(Ne.key,T)}let fe,be=0;const $e=U-te+1;let Ge=!1,Ye=0;const Ht=new Array($e);for(T=0;T<$e;T++)Ht[T]=0;for(T=q;T<=N;T++){const Ne=d[T];if(be>=$e){ge(Ne,y,C,!0);continue}let Ze;if(Ne.key!=null)Ze=ue.get(Ne.key);else for(fe=te;fe<=U;fe++)if(Ht[fe-te]===0&&Wt(Ne,c[fe])){Ze=fe;break}Ze===void 0?ge(Ne,y,C,!0):(Ht[Ze-te]=T+1,Ze>=Ye?Ye=Ze:Ge=!0,$(Ne,c[Ze],g,null,y,C,D,M,P),be++)}const Tn=Ge?el(Ht):Ot;for(fe=Tn.length-1,T=$e-1;T>=0;T--){const Ne=te+T,Ze=c[Ne],$n=c[Ne+1],An=Ne+1<K?$n.el||ar($n):k;Ht[T]===0?$(null,Ze,g,An,y,C,D,M,P):Ge&&(fe<0||T!==Tn[fe]?Te(Ze,g,An,2):fe--)}}},Te=(d,c,g,k,y=null)=>{const{el:C,type:D,transition:M,children:P,shapeFlag:T}=d;if(T&6){Te(d.component.subTree,c,g,k);return}if(T&128){d.suspense.move(c,g,k);return}if(T&64){D.move(d,c,g,m);return}if(D===ie){n(C,c,g);for(let N=0;N<P.length;N++)Te(P[N],c,g,k);n(d.anchor,c,g);return}if(D===xs){B(d,c,g);return}if(k!==2&&T&1&&M)if(k===0)M.beforeEnter(C),n(C,c,g),Re(()=>M.enter(C),y);else{const{leave:N,delayLeave:U,afterLeave:q}=M,te=()=>{d.ctx.isUnmounted?o(C):n(C,c,g)},ue=()=>{C._isLeaving&&C[mi](!0),N(C,()=>{te(),q&&q()})};U?U(C,te,ue):ue()}else n(C,c,g)},ge=(d,c,g,k=!1,y=!1)=>{const{type:C,props:D,ref:M,children:P,dynamicChildren:T,shapeFlag:K,patchFlag:N,dirs:U,cacheIndex:q,memo:te}=d;if(N===-2&&(y=!1),M!=null&&(pt(),Zt(M,null,g,d,!0),ht()),q!=null&&(c.renderCache[q]=void 0),K&256){c.ctx.deactivate(d);return}const ue=K&1&&U,fe=!Qt(d);let be;if(fe&&(be=D&&D.onVnodeBeforeUnmount)&&Qe(be,c,d),K&6)It(d.component,g,k);else{if(K&128){d.suspense.unmount(g,k);return}ue&&St(d,null,c,"beforeUnmount"),K&64?d.type.remove(d,c,g,m,k):T&&!T.hasOnce&&(C!==ie||N>0&&N&64)?Be(T,c,g,!1,!0):(C===ie&&N&384||!y&&K&16)&&Be(P,c,g),k&&ne(d)}const $e=te!=null&&q==null;(fe&&(be=D&&D.onVnodeUnmounted)||ue||$e)&&Re(()=>{be&&Qe(be,c,d),ue&&St(d,null,c,"unmounted"),$e&&(d.el=null)},g)},ne=d=>{const{type:c,el:g,anchor:k,transition:y}=d;if(c===ie){He(g,k);return}if(c===xs){F(d);return}const C=()=>{o(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(d.shapeFlag&1&&y&&!y.persisted){const{leave:D,delayLeave:M}=y,P=()=>D(g,C);M?M(d.el,C,P):P()}else C()},He=(d,c)=>{let g;for(;d!==c;)g=v(d),o(d),d=g;o(c)},It=(d,c,g)=>{const{bum:k,scope:y,job:C,subTree:D,um:M,m:P,a:T}=d;Wn(P),Wn(T),k&&ms(k),y.stop(),C&&(C.flags|=8,ge(D,d,c,g)),M&&Re(M,c),Re(()=>{d.isUnmounted=!0},c)},Be=(d,c,g,k=!1,y=!1,C=0)=>{for(let D=C;D<d.length;D++)ge(d[D],c,g,k,y)},qe=d=>{if(d.shapeFlag&6)return qe(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const c=v(d.anchor||d.el),g=c&&c[pi];return g?v(g):c};let O=!1;const x=(d,c,g)=>{let k;d==null?c._vnode&&(ge(c._vnode,null,null,!0),k=c._vnode.component):$(c._vnode||null,d,c,null,null,null,g),c._vnode=d,O||(O=!0,On(k),Lo(),O=!1)},m={p:$,um:ge,m:Te,r:ne,mt:xt,mc:j,pc:se,pbc:X,n:qe,o:e};return{render:x,hydrate:void 0,createApp:Ni(x)}}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 kt({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(J(n)&&J(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=ct(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&ir(l,a)),a.type===Ns&&(a.patchFlag===-1&&(a=o[r]=ct(a)),a.el=l.el),a.type===bt&&!a.el&&(a.el=l.el)}}function el(e){const t=e.slice(),s=[0];let n,o,r,l,a;const u=e.length;for(n=0;n<u;n++){const h=e[n];if(h!==0){if(o=s[s.length-1],e[o]<h){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<h?r=a+1:l=a;h<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function lr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:lr(t)}function Wn(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?J(e)?t.effects.push(...e):t.effects.push(e):li(e)}const ie=Symbol.for("v-fgt"),Ns=Symbol.for("v-txt"),bt=Symbol.for("v-cmt"),xs=Symbol.for("v-stc"),es=[];let Fe=null;function w(e=!1){es.push(Fe=e?null:[])}function sl(){es.pop(),Fe=es[es.length-1]||null}let os=1;function Kn(e,t=!1){os+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function ur(e){return e.dynamicChildren=os>0?Fe||Ot:null,sl(),os>0&&Fe&&Fe.push(e),e}function S(e,t,s,n,o,r){return ur(i(e,t,s,n,o,r,!0))}function dr(e,t,s,n,o){return ur(ot(e,t,s,n,o,!0))}function fr(e){return e?e.__v_isVNode===!0:!1}function Wt(e,t){return e.type===t.type&&e.key===t.key}const pr=({key:e})=>e??null,vs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ve(e)||Pe(e)||Y(e)?{i:Le,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===ie?0:1,l=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pr(t),ref:t&&vs(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?(kn(u,s),r&128&&e.normalize(u)):s&&(u.shapeFlag|=ve(s)?8:16),os>0&&!l&&Fe&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&Fe.push(u),u}const ot=nl;function nl(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===zo)&&(e=bt),fr(e)){const a=Lt(e,t,!0);return s&&kn(a,s),os>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:u}=t;a&&!ve(a)&&(t.class=G(a)),ae(u)&&(vn(u)&&!J(u)&&(u=Ae({},u)),t.style=Ms(u))}const l=ve(e)?1:cr(e)?128:hi(e)?64:ae(e)?4:Y(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function ol(e){return e?vn(e)||er(e)?Ae({},e):e:null}function Lt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:u}=e,h=t?rl(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&pr(h),ref:t&&t.ref?s&&r?J(r)?r.concat(vs(t)):[r,vs(t)]:vs(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?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Lt(e.ssContent),ssFallback:e.ssFallback&&Lt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&bn(f,u.clone(f)),f}function Ve(e=" ",t=0){return ot(Ns,null,e,t)}function We(e,t){const s=ot(xs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(w(),dr(bt,null,e)):ot(bt,null,e)}function tt(e){return e==null||typeof e=="boolean"?ot(bt):J(e)?ot(ie,null,e.slice()):fr(e)?ct(e):ot(Ns,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Lt(e)}function kn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(J(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),kn(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 Y(t)?(t={default:t,_ctx:Le},s=32):(t=String(t),n&64?(s=16,t=[Ve(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=G([t.class,n.class]));else if(o==="style")t.style=Ms([t.style,n.style]);else if(Ts(o)){const r=t[o],l=n[o];l&&r!==l&&!(J(r)&&r.includes(l))?t[o]=r?[].concat(r,l):l:l==null&&r==null&&!$s(o)&&(t[o]=l)}else o!==""&&(t[o]=n[o])}return t}function Qe(e,t,s,n=null){it(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:de,inheritAttrs:n.inheritAttrs,ctx:de,data:de,props:de,attrs:de,slots:de,refs:de,setupState:de,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 Ie=null;const cl=()=>Ie||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(l=>l(r)):o[0](r)}};Cs=t("__VUE_INSTANCE_SETTERS__",s=>Ie=s),on=t("__VUE_SSR_SETTERS__",s=>rs=s)}const us=e=>{const t=Ie;return Cs(e),e.scope.on(),()=>{e.scope.off(),Cs(t)}},zn=()=>{Ie&&Ie.scope.off(),Cs(null)};function hr(e){return e.vnode.shapeFlag&4}let rs=!1;function ul(e,t=!1,s=!1){t&&on(t);const{props:n,children:o}=e.vnode,r=hr(e);Ki(e,n,r,t),Gi(e,o,s||t);const l=r?dl(e,t):void 0;return t&&on(!1),l}function dl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ii);const{setup:n}=s;if(n){pt();const o=e.setupContext=n.length>1?pl(e):null,r=us(e),l=cs(n,e,0,[e.props,o]),a=po(l);if(ht(),r(),(a||e.sp)&&!Qt(e)&&Bo(e),a){if(l.then(zn,zn),t)return l.then(u=>{Jn(e,u)}).catch(u=>{Ds(u,e,0)});e.asyncDep=l}else Jn(e,l)}else mr(e)}function Jn(e,t,s){Y(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||nt);{const o=us(e);pt();try{Pi(e)}finally{ht(),o()}}}const fl={get(e,t){return Ee(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 Ls(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 Xt)return Xt[s](e)},has(t,s){return s in t||s in Xt}})):e.proxy}function hl(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function ml(e){return Y(e)&&"__vccOpts"in e}const Ke=(e,t)=>si(e,t,rs),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 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",lt=typeof document<"u"?document:null,Gn=lt&<.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"?lt.createElementNS(xl,e):t==="mathml"?lt.createElementNS(vl,e):s?lt.createElement(e,{is:s}):lt.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>lt.createTextNode(e),createComment:e=>lt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>lt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{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[l?l.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=be(s);let r=!1;if(s&&!o){if(t)if(be(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&vs(n,a,"")}else for(const l in t)s[l]==null&&vs(n,l,"");for(const l in s)l==="display"&&(r=!0),vs(n,l,s[l])}else if(o){if(t!==s){const l=n[Sl];l&&(s+=";"+l),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(q(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=je(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?"":ot(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 l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=xo(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function 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]={}),l=r[t];if(n&&l)l.value=n;else{const[a,c]=El(t);if(n){const m=r[t]=Il(n,o);yt(e,a,m,c)}else l&&($l(e,a,l,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(),Ml=()=>qs||(Pl.then(()=>qs=0),qs=Date.now());function Il(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;rt(Ol(n,s.value),t,5,[n])};return s.value=e,s.attached=Ml(),s}function Ol(e,t){if(q(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 l=o==="svg";t==="class"?_l(e,n,l):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,l))?(to(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&eo(e,t,n,l,r,t!=="value")):e._isVueCE&&(jl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!be(n)))?to(e,je(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),eo(e,t,n,l))};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)&&be(s)?!1:t in e}function jl(e,t){const s=e._def.props;if(!s)return!1;const n=je(t);return Array.isArray(s)?s.some(o=>je(o)===n):Object.keys(s).some(o=>je(o)===n)}const Lt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return q(t)?s=>ms(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 dt=Symbol("_assign");function io(e,t,s){return t&&(e=e.trim()),s&&(e=Es(e)),e}const xe={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[dt]=Lt(o);const r=n||o.props&&o.props.type==="number";yt(e,t?"change":"input",l=>{l.target.composing||e[dt](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}},l){if(e[dt]=Lt(l),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 m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},lo={deep:!0,created(e,t,s){e[dt]=Lt(s),yt(e,"change",()=>{const n=e._modelValue,o=is(e),r=e.checked,l=e[dt];if(q(n)){const a=un(n,o),c=a!==-1;if(r&&!c)l(n.concat(o));else if(!r&&c){const m=[...n];m.splice(a,1),l(m)}}else if(Ft(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(xr(e,r))})},mounted:ao,beforeUpdate(e,t,s){e[dt]=Lt(s),ao(e,t,s)}};function ao(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(q(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,l=>l.selected).map(l=>s?Es(is(l)):is(l));e[dt](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,jo(()=>{e._assigning=!1})}),e[dt]=Lt(n)},mounted(e,{value:t}){co(e,t)},beforeUpdate(e,t,s){e[dt]=Lt(s)},updated(e,{value:t}){e._assigning||co(e,t)}};function co(e,t){const s=e.multiple,n=q(t);if(!(s&&!n&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=is(l);if(s)if(n){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(m=>String(m)===String(a)):l.selected=un(t,a)>-1}else l.selected=t.has(a);else if(Vt(is(l),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(l=>l===r||Ll[l]===r))return e(o)}))},Fl=Ee({patchProp:Dl},yl);let uo;function Vl(){return uo||(uo=Zi(Fl))}const Ul=((...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 l=s(o,!1,Hl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Hl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bl(e){return be(e)?document.querySelector(e):e}let kn="";function Wt(e){kn=e}function ke(){return kn}async function Se(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 Wl={class:"animate-fade-in"},Kl={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 m=await Se("/api/status");s.value=(m.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,x)=>p.status==="active"&&x.status!=="active"?-1:p.status!=="active"&&x.status==="active"?1:x.lastActivity-p.lastActivity)});function l(m){const d=Math.floor((Date.now()-m.lastActivity)/6e4);return m.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(m){if(!m.lastWaitCallAt)return"";const d=Math.floor((Date.now()-m.lastWaitCallAt)/6e4);return d<5?`Polling — ${d===0?"just now":d+"m ago"}`:`Last poll — ${d}m ago`}function c(m){return m.lastWaitCallAt?Math.floor((Date.now()-m.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return wt(o),(m,d)=>(_(),C("div",Wl,[n.value&&r.value.length===0?(_(),C("div",Kl,"Loading sessions...")):r.value.length===0?(_(),C("div",zl,"No sessions")):(_(),C("div",Jl,[(_(!0),C(ie,null,Ce(r.value,p=>(_(),C("div",{key:p.mcpSessionId,class:Y(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[i("div",ql,[i("div",Gl,[i("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),i("div",null,[i("div",Yl,[p.topicName?(_(),C(ie,{key:0},[i("span",Zl,k(p.topicName),1),i("span",Ql," (thread "+k(p.threadId)+")",1)],64)):p.threadId!=null?(_(),C(ie,{key:1},[He("Thread "+k(p.threadId),1)],64)):(_(),C("span",Xl,"Awaiting start_session…"))]),i("div",ea,k(p.mcpSessionId.slice(0,12))+"...",1)])]),i("div",ta,[i("div",sa,[i("span",{class:Y(["text-sm font-medium",l(p).color])},k(l(p).label),3),a(p)?(_(),C("span",{key:0,class:Y(["text-xs ml-2",c(p)])},k(a(p)),3)):Q("",!0)]),i("div",na,k(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"}},ma={key:1,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},ha={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 l=null;async function a(){s.value=!0;try{const d=r.value.trim();let p;if(d)p=await Se(`/api/search?q=${encodeURIComponent(d)}&limit=50`);else{const x=new URLSearchParams({limit:"50",sort:o.value});n.value&&x.set("type",n.value),p=await Se(`/api/notes?${x}`)}t.value=p}finally{s.value=!1}}function c(){l&&clearTimeout(l),l=setTimeout(a,300)}function m(d){if(!d)return"never";const p=Date.now()-new Date(d).getTime(),x=Math.floor(p/6e4);if(x<1)return"just now";if(x<60)return`${x}m ago`;const A=Math.floor(x/60);return A<24?`${A}h ago`:`${Math.floor(A/24)}d ago`}return wt(a),(d,p)=>(_(),C("div",ra,[i("div",ia,[le(i("input",{"onUpdate:modelValue":p[0]||(p[0]=x=>r.value=x),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),[[xe,r.value]]),le(i("select",{"onUpdate:modelValue":p[1]||(p[1]=x=>n.value=x),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]=[We('<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(i("select",{"onUpdate:modelValue":p[2]||(p[2]=x=>o.value=x),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]=[i("option",{value:"created_at"},"Newest",-1),i("option",{value:"confidence"},"Confidence",-1),i("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(ie,null,Ce(t.value,x=>(_(),C("div",{key:x.noteId,class:Y(["glass rounded-xl p-4 animate-fade-in",`priority-${x.priority||0}`])},[i("div",ua,[i("div",da,[i("div",fa,[i("span",{class:Y(["type-badge",`type-${x.type}`])},k(x.type),3),x.priority>=2?(_(),C("span",pa,"HIGH IMPORTANCE")):x.priority===1?(_(),C("span",ma,"NOTABLE")):Q("",!0),i("span",ha,k(x.noteId),1)]),i("p",ga,k(x.content),1),i("div",xa,[(_(!0),C(ie,null,Ce(x.keywords||[],A=>(_(),C("span",{key:A,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},k(A),1))),128))])]),i("div",va,[i("div",ya,k(((Number(x.confidence)||0)*100).toFixed(0))+"%",1),i("div",ba,k(m(x.createdAt)),1),i("div",_a,k(x.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 mb-4"},Aa={key:0,class:"text-sm text-success"},Ea={class:"glass rounded-xl p-6"},Pa={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Ma={class:"flex items-center gap-2"},Ia={key:0,class:"text-sm text-success"},Oa={key:0,class:"mb-3"},Da={class:"mt-4"},Ra=["innerHTML"],ja={class:"glass rounded-xl p-6"},Na={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},La={class:"flex items-center gap-2"},Fa={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ha={key:0,class:"mb-3"},Ba=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},Ka={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},za={class:"flex items-center gap-2"},Ja={key:0,class:"text-sm text-success"},qa={class:"mb-4 flex flex-wrap items-center gap-3"},Ga={class:"flex items-center gap-2"},Ya={class:"font-mono text-sm text-textPrimary"},Za={key:0,class:"mb-3"},Qa={class:"flex flex-wrap gap-2 mb-3"},Xa=["onClick"],ec={class:"mt-4"},tc=["innerHTML"],sc=At({__name:"TemplatesTab",setup(e){function t(V){return V.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(50),r=j(""),l=j(""),a=j(!0),c=j(""),m=j(!1),d=j({}),p=j("copilot"),x=j(""),A=j(""),B=j(!0),$=j(""),v=j(!1),P=j([]),F=j("");async function W(){await Promise.all([U(),ee(),he(),K()])}async function U(){try{const V=await Se("/api/settings/agent-type");s.value=V.agentType||"copilot"}catch{}}async function ee(){try{const V=await Se("/api/settings/bootstrap-message-count");o.value=V.count??50}catch{}}async function he(){try{const V=await Se("/api/templates");if(V.templates&&V.templates.length>0){const E=V.templates[0];l.value=E.content||"",a.value=E.isDefault??!0}V.agentReminders&&(d.value=V.agentReminders)}catch{}}async function K(){try{const[V,E,ye]=await Promise.all([Se("/api/templates/drive"),Se("/api/templates/drive-presets"),Se("/api/settings/dmn-activation-hours")]);P.value=E.presets||[],F.value=String(ye.value??"not set"),V.custom?(A.value=V.custom,B.value=!1):(A.value=V.default||"",B.value=!0)}catch{}}async function I(){try{await Se("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await Se("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await he()}catch(V){n.value="Error: "+V.message}}async function J(){try{await Se("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:o.value})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(V){r.value="Error: "+V.message}}async function me(){try{const V=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:l.value})});if(!V.ok)throw new Error(V.statusText);a.value=!1,c.value="Saved ✓",setTimeout(()=>{c.value=""},3e3)}catch(V){c.value="Error: "+V.message}}async function se(){if(confirm("Reset to default template? Your customizations will be lost."))try{const V=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!V.ok)throw new Error(V.statusText);await he(),c.value="Reset to default ✓",setTimeout(()=>{c.value=""},3e3)}catch(V){c.value="Error: "+V.message}}async function Te(){var ye;const V=p.value,E=((ye=d.value[V])==null?void 0:ye.content)??"";try{const ge=await fetch(`/api/templates/reminders-${V}`,{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:E})});if(!ge.ok)throw new Error(ge.statusText);d.value[V]={content:E,isDefault:!1},x.value=`Saved ${V} ✓`,setTimeout(()=>{x.value=""},3e3)}catch(ge){x.value="Error: "+ge.message}}async function $e(){const V=p.value;if(confirm(`Reset ${V} agent reminder? The custom template will be removed.`))try{const E=await fetch(`/api/templates/reminders-${V}`,{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!E.ok)throw new Error(E.statusText);await he(),x.value=`Reset ${V} ✓`,setTimeout(()=>{x.value=""},3e3)}catch(E){x.value="Error: "+E.message}}async function gt(){const V=A.value;if(!V.trim()){$.value="Template is empty — load a preset first",setTimeout(()=>{$.value=""},3e3);return}try{const E=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!E.ok)throw new Error(E.statusText);B.value=!1,$.value="Saved ✓",setTimeout(()=>{$.value=""},3e3)}catch(E){$.value="Error: "+E.message}}async function Et(){if(confirm("Reset drive template? The custom template will be removed."))try{const V=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!V.ok)throw new Error(V.statusText);await K(),$.value="Reset to default ✓",setTimeout(()=>{$.value=""},3e3)}catch(V){$.value="Error: "+V.message}}function _e(V){A.value=V.content,B.value=!1}const ae=Ke(()=>t(l.value)),X=Ke(()=>A.value?t(A.value):'<span style="color:#6b7280">(no template loaded)</span>');return wt(W),(V,E)=>{var ye,ge;return _(),C("div",Sa,[i("div",Ca,[i("div",ka,[E[8]||(E[8]=i("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),le(i("select",{"onUpdate:modelValue":E[0]||(E[0]=ne=>s.value=ne),onChange:I,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...E[7]||(E[7]=[We('<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,k(n.value),1)):Q("",!0),E[9]||(E[9]=i("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),i("div",$a,[E[10]||(E[10]=i("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),le(i("input",{"onUpdate:modelValue":E[1]||(E[1]=ne=>o.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),[[xe,o.value,void 0,{number:!0}]]),i("button",{onClick:J,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),r.value?(_(),C("span",Aa,k(r.value),1)):Q("",!0),E[11]||(E[11]=i("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),i("div",Ea,[i("div",Pa,[E[12]||(E[12]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Reminders Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),i("div",Ma,[c.value?(_(),C("span",Ia,k(c.value),1)):Q("",!0),i("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 to Default"),i("button",{onClick:me,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),a.value?(_(),C("div",Oa,[...E[13]||(E[13]=[i("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(i("textarea",{"onUpdate:modelValue":E[2]||(E[2]=ne=>l.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),[[xe,l.value]]),i("div",Da,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[3]||(E[3]=ne=>m.value=!m.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",m.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[14]||(E[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[15]||(E[15]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),m.value?(_(),C("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:ae.value},null,8,Ra)):Q("",!0)]),E[16]||(E[16]=We('<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))]),i("div",ja,[i("div",Na,[E[17]||(E[17]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),i("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),i("div",La,[x.value?(_(),C("span",Fa,k(x.value),1)):Q("",!0),i("button",{onClick:$e,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"),i("button",{onClick:Te,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Va,[(_(),C(ie,null,Ce(["copilot","claude","cursor","codex"],ne=>i("button",{key:ne,onClick:L=>p.value=ne,class:Y(["px-4 py-2 rounded-xl text-sm font-medium transition",p.value===ne?"bg-accent text-white":"bg-card hover:bg-cardHover border border-gray-700 text-textSecondary hover:text-textPrimary"])},k(ne.charAt(0).toUpperCase()+ne.slice(1)),11,Ua)),64))]),((ye=d.value[p.value])==null?void 0:ye.isDefault)!==!1?(_(),C("div",Ha,[...E[18]||(E[18]=[i("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),i("textarea",{value:((ge=d.value[p.value])==null?void 0:ge.content)??"",onInput:E[4]||(E[4]=ne=>{const L=ne.target;d.value[p.value]={content:L.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 ${p.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ba)]),i("div",Wa,[i("div",Ka,[E[19]||(E[19]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),i("div",za,[$.value?(_(),C("span",Ja,k($.value),1)):Q("",!0),i("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"),i("button",{onClick:gt,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",qa,[E[21]||(E[21]=i("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),i("div",Ga,[i("span",Ya,k(F.value),1),E[20]||(E[20]=i("span",{class:"text-sm text-textSecondary"},"hours",-1))]),E[22]||(E[22]=i("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),B.value?(_(),C("div",Za,[...E[23]||(E[23]=[i("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),i("div",Qa,[E[24]||(E[24]=i("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(_(!0),C(ie,null,Ce(P.value,ne=>(_(),C("button",{key:ne.key,onClick:L=>_e(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"},k(ne.label),9,Xa))),128))]),le(i("textarea",{"onUpdate:modelValue":E[5]||(E[5]=ne=>A.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),[[xe,A.value]]),i("div",ec,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[6]||(E[6]=ne=>v.value=!v.value)},[(_(),C("svg",{class:Y(["w-4 h-4 text-textSecondary transition-transform",v.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[25]||(E[25]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[26]||(E[26]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),v.value?(_(),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,tc)):Q("",!0)]),E[27]||(E[27]=We('<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))])])}}}),nc={class:"animate-fade-in"},oc={class:"glass rounded-xl p-6 mb-6"},rc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ic={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},lc={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},ac={class:"flex items-center gap-4 mb-3"},cc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},uc={class:"flex items-center gap-2"},dc={key:0,class:"text-sm text-warn"},fc={key:1,class:"text-center py-8 text-textSecondary text-sm"},pc={key:2,class:"text-center text-textSecondary py-12"},mc={key:3,class:"space-y-2"},hc=["onClick"],gc={class:"flex items-start justify-between gap-3"},xc={class:"flex-1 min-w-0"},vc={class:"flex items-center gap-2 mb-1"},yc={class:"font-medium text-sm"},bc={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},_c={class:"flex flex-wrap gap-1.5 mt-1"},wc=["title"],Sc={key:0,class:"glass rounded-xl p-6"},Cc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},kc={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},$c={class:"flex items-center gap-2"},Ac={key:0,class:"text-sm text-success"},Ec={key:1,class:"text-sm text-warn"},Pc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Mc=["value"],Ic={class:"flex items-end"},Oc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=At({__name:"SkillsTab",setup(e){const t=j([]),s=j(!0),n=j(null),o=j(""),r=j(""),l=j(!1),a=j(""),c=j(""),m=j(!1),d=j(""),p=j(""),x=j(!1),A=j("");async function B(){s.value=!0;try{const K=await Se("/api/skills");t.value=K.skills||[]}finally{s.value=!1}}function $(K){return K?K.includes(".remote-copilot-mcp")&&K.includes("skills")?"user":K.endsWith(".default.md")?"default":K.endsWith(".skill.md")?"project":"unknown":"unknown"}function v(K){const I={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 I[K]||I.unknown}function P(K){n.value=K,o.value=K.content,r.value=(K.triggers||[]).join(", "),l.value=!!K.replacesOrchestrator,m.value=!1}function F(){n.value=null,c.value=""}function W(K,I,J,me){let se=`---
|
|
65
|
-
name: ${
|
|
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",at=typeof document<"u"?document:null,Gn=at&&at.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"?at.createElementNS(xl,e):t==="mathml"?at.createElementNS(vl,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Gn.innerHTML=gr(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Gn.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[l?l.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(""),kl=/(?:^|;)\s*display\s*:/;function Cl(e,t,s){const n=e.style,o=ve(s);let r=!1;if(s&&!o){if(t)if(ve(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&ys(n,a,"")}else for(const l in t)s[l]==null&&ys(n,l,"");for(const l in s)l==="display"&&(r=!0),ys(n,l,s[l])}else if(o){if(t!==s){const l=n[Sl];l&&(s+=";"+l),n.cssText=s,r=kl.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 ys(e,t,s){if(J(s))s.forEach(n=>ys(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=Es(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?"":rt(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,u=s==null?e.type==="checkbox"?"on":"":String(s);(a!==u||!("_value"in e))&&(e.value=u),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=xo(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function 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]={}),l=r[t];if(n&&l)l.value=n;else{const[a,u]=El(t);if(n){const h=r[t]=Ml(n,o);yt(e,a,h,u)}else l&&($l(e,a,l,u),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 Il=Promise.resolve(),Pl=()=>qs||(Il.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;it(Ol(n,s.value),t,5,[n])};return s.value=e,s.attached=Pl(),s}function Ol(e,t){if(J(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 l=o==="svg";t==="class"?_l(e,n,l):t==="style"?Cl(e,s,n):Ts(t)?$s(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,l))?(to(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&eo(e,t,n,l,r,t!=="value")):e._isVueCE&&(jl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ve(n)))?to(e,De(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),eo(e,t,n,l))};function Rl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&oo(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 oo(t)&&ve(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 Ft=e=>{const t=e.props["onUpdate:modelValue"]||!1;return J(t)?s=>ms(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 ft=Symbol("_assign");function io(e,t,s){return t&&(e=e.trim()),s&&(e=Is(e)),e}const me={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ft]=Ft(o);const r=n||o.props&&o.props.type==="number";yt(e,t?"change":"input",l=>{l.target.composing||e[ft](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}},l){if(e[ft]=Ft(l),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?Is(e.value):e.value,u=t??"";if(a===u)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===u)||(e.value=u)}},lo={deep:!0,created(e,t,s){e[ft]=Ft(s),yt(e,"change",()=>{const n=e._modelValue,o=ls(e),r=e.checked,l=e[ft];if(J(n)){const a=un(n,o),u=a!==-1;if(r&&!u)l(n.concat(o));else if(!r&&u){const h=[...n];h.splice(a,1),l(h)}}else if(Vt(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(xr(e,r))})},mounted:ao,beforeUpdate(e,t,s){e[ft]=Ft(s),ao(e,t,s)}};function ao(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(J(t))o=un(t,n.props.value)>-1;else if(Vt(t))o=t.has(n.props.value);else{if(t===s)return;o=Ut(t,xr(e,!0))}e.checked!==o&&(e.checked=o)}const is={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Vt(t);yt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?Is(ls(l)):ls(l));e[ft](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,jo(()=>{e._assigning=!1})}),e[ft]=Ft(n)},mounted(e,{value:t}){co(e,t)},beforeUpdate(e,t,s){e[ft]=Ft(s)},updated(e,{value:t}){e._assigning||co(e,t)}};function co(e,t){const s=e.multiple,n=J(t);if(!(s&&!n&&!Vt(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=ls(l);if(s)if(n){const u=typeof a;u==="string"||u==="number"?l.selected=t.some(h=>String(h)===String(a)):l.selected=un(t,a)>-1}else l.selected=t.has(a);else if(Ut(ls(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ls(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"},Jt=(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(l=>l===r||Ll[l]===r))return e(o)}))},Fl=Ae({patchProp:Dl},yl);let uo;function Vl(){return uo||(uo=Zi(Fl))}const Ul=((...e)=>{const t=Vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Bl(n);if(!o)return;const r=t._component;!Y(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Hl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Hl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bl(e){return ve(e)?document.querySelector(e):e}let Cn="";function Kt(e){Cn=e}function xe(){return Cn}async function _e(e,t){const s=await fetch(e,{...t,headers:{Authorization:`Bearer ${Cn}`,"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 Wl={class:"animate-fade-in"},Kl={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=R([]),n=R(!0);async function o(){n.value=!0;try{const h=await _e("/api/status");s.value=(h.sessions||[]).slice().sort((f,p)=>f.status==="active"&&p.status!=="active"?-1:f.status!=="active"&&p.status==="active"?1:p.lastActivity-f.lastActivity)}finally{n.value=!1}}const r=Ke(()=>{var f;return(((f=t.status)==null?void 0:f.sessions)??s.value).slice().sort((p,v)=>p.status==="active"&&v.status!=="active"?-1:p.status!=="active"&&v.status==="active"?1:v.lastActivity-p.lastActivity)});function l(h){const f=Math.floor((Date.now()-h.lastActivity)/6e4);return h.status==="disconnected"?{label:`Disconnected${f>0?` — ${f}m ago`:""}`,color:"text-muted"}:f<5?{label:"Active",color:"text-success"}:f<30?{label:`Idle ${f}m`,color:"text-warn"}:{label:`Dormant ${f}m`,color:"text-danger"}}function a(h){if(!h.lastWaitCallAt)return"";const f=Math.floor((Date.now()-h.lastWaitCallAt)/6e4);return f<5?`Polling — ${f===0?"just now":f+"m ago"}`:`Last poll — ${f}m ago`}function u(h){return h.lastWaitCallAt?Math.floor((Date.now()-h.lastWaitCallAt)/6e4)<5?"text-success":"text-warn":""}return wt(o),(h,f)=>(w(),S("div",Wl,[n.value&&r.value.length===0?(w(),S("div",Kl,"Loading sessions...")):r.value.length===0?(w(),S("div",zl,"No sessions")):(w(),S("div",Jl,[(w(!0),S(ie,null,Se(r.value,p=>(w(),S("div",{key:p.mcpSessionId,class:G(["glass rounded-xl p-4 animate-slide-up",p.status==="disconnected"?"opacity-60":""])},[i("div",ql,[i("div",Gl,[i("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),i("div",null,[i("div",Yl,[p.topicName?(w(),S(ie,{key:0},[i("span",Zl,_(p.topicName),1),i("span",Ql," (thread "+_(p.threadId)+")",1)],64)):p.threadId!=null?(w(),S(ie,{key:1},[Ve("Thread "+_(p.threadId),1)],64)):(w(),S("span",Xl,"Awaiting start_session…"))]),i("div",ea,_(p.mcpSessionId.slice(0,12))+"...",1)])]),i("div",ta,[i("div",sa,[i("span",{class:G(["text-sm font-medium",l(p).color])},_(l(p).label),3),a(p)?(w(),S("span",{key:0,class:G(["text-xs ml-2",u(p)])},_(a(p)),3)):Q("",!0)]),i("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=R([]),s=R(!1),n=R(""),o=R("created_at"),r=R("");let l=null;async function a(){s.value=!0;try{const f=r.value.trim();let p;if(f)p=await _e(`/api/search?q=${encodeURIComponent(f)}&limit=50`);else{const v=new URLSearchParams({limit:"50",sort:o.value});n.value&&v.set("type",n.value),p=await _e(`/api/notes?${v}`)}t.value=p}finally{s.value=!1}}function u(){l&&clearTimeout(l),l=setTimeout(a,300)}function h(f){if(!f)return"never";const p=Date.now()-new Date(f).getTime(),v=Math.floor(p/6e4);if(v<1)return"just now";if(v<60)return`${v}m ago`;const A=Math.floor(v/60);return A<24?`${A}h ago`:`${Math.floor(A/24)}d ago`}return wt(a),(f,p)=>(w(),S("div",ra,[i("div",ia,[le(i("input",{"onUpdate:modelValue":p[0]||(p[0]=v=>r.value=v),onInput:u,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),[[me,r.value]]),le(i("select",{"onUpdate:modelValue":p[1]||(p[1]=v=>n.value=v),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]=[We('<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),[[is,n.value]]),le(i("select",{"onUpdate:modelValue":p[2]||(p[2]=v=>o.value=v),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]=[i("option",{value:"created_at"},"Newest",-1),i("option",{value:"confidence"},"Confidence",-1),i("option",{value:"access_count"},"Most accessed",-1)])],544),[[is,o.value]])]),s.value?(w(),S("div",la,"Loading notes...")):t.value.length===0?(w(),S("div",aa,"No notes found")):(w(),S("div",ca,[(w(!0),S(ie,null,Se(t.value,v=>(w(),S("div",{key:v.noteId,class:G(["glass rounded-xl p-4 animate-fade-in",`priority-${v.priority||0}`])},[i("div",ua,[i("div",da,[i("div",fa,[i("span",{class:G(["type-badge",`type-${v.type}`])},_(v.type),3),v.priority>=2?(w(),S("span",pa,"HIGH IMPORTANCE")):v.priority===1?(w(),S("span",ha,"NOTABLE")):Q("",!0),i("span",ma,_(v.noteId),1)]),i("p",ga,_(v.content),1),i("div",xa,[(w(!0),S(ie,null,Se(v.keywords||[],A=>(w(),S("span",{key:A,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},_(A),1))),128))])]),i("div",va,[i("div",ya,_(((Number(v.confidence)||0)*100).toFixed(0))+"%",1),i("div",ba,_(h(v.createdAt)),1),i("div",_a,_(v.accessCount??0)+" hits",1)])])],2))),128))]))]))}}),Sa={class:"animate-fade-in space-y-6"},ka={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"},$a={class:"flex flex-wrap items-center gap-3 mb-4"},Aa={key:0,class:"text-sm text-success"},Ea={class:"glass rounded-xl p-6"},Ia={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Pa={class:"flex items-center gap-2"},Ma={key:0,class:"text-sm text-success"},Oa={key:0,class:"mb-3"},Da={class:"mt-4"},Ra=["innerHTML"],ja={class:"glass rounded-xl p-6"},Na={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},La={class:"flex items-center gap-2"},Fa={key:0,class:"text-sm text-success"},Va={class:"flex gap-2 mb-4"},Ua=["onClick"],Ha={key:0,class:"mb-3"},Ba=["value","placeholder"],Wa={class:"glass rounded-xl p-6"},Ka={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},za={class:"flex items-center gap-2"},Ja={key:0,class:"text-sm text-success"},qa={class:"mb-4 flex flex-wrap items-center gap-3"},Ga={class:"flex items-center gap-2"},Ya={class:"font-mono text-sm text-textPrimary"},Za={key:0,class:"mb-3"},Qa={class:"flex flex-wrap gap-2 mb-3"},Xa=["onClick"],ec={class:"mt-4"},tc=["innerHTML"],sc=At({__name:"TemplatesTab",setup(e){function t(V){return V.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=R("copilot"),n=R(""),o=R(50),r=R(""),l=R(""),a=R(!0),u=R(""),h=R(!1),f=R({}),p=R("copilot"),v=R(""),A=R(""),H=R(!0),$=R(""),b=R(!1),I=R([]),L=R("");async function B(){await Promise.all([F(),Z(),he(),W()])}async function F(){try{const V=await _e("/api/settings/agent-type");s.value=V.agentType||"copilot"}catch{}}async function Z(){try{const V=await _e("/api/settings/bootstrap-message-count");o.value=V.count??50}catch{}}async function he(){try{const V=await _e("/api/templates");if(V.templates&&V.templates.length>0){const E=V.templates[0];l.value=E.content||"",a.value=E.isDefault??!0}V.agentReminders&&(f.value=V.agentReminders)}catch{}}async function W(){try{const[V,E,Te]=await Promise.all([_e("/api/templates/drive"),_e("/api/templates/drive-presets"),_e("/api/settings/dmn-activation-hours")]);I.value=E.presets||[],L.value=String(Te.value??"not set"),V.custom?(A.value=V.custom,H.value=!1):(A.value=V.default||"",H.value=!0)}catch{}}async function j(){try{await _e("/api/settings/agent-type",{method:"POST",body:JSON.stringify({agentType:s.value})}),await _e("/api/templates/reminders",{method:"DELETE"}),n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3),await he()}catch(V){n.value="Error: "+V.message}}async function z(){try{await _e("/api/settings/bootstrap-message-count",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:o.value})}),r.value="Saved ✓",setTimeout(()=>{r.value=""},3e3)}catch(V){r.value="Error: "+V.message}}async function X(){try{const V=await fetch("/api/templates/reminders",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:l.value})});if(!V.ok)throw new Error(V.statusText);a.value=!1,u.value="Saved ✓",setTimeout(()=>{u.value=""},3e3)}catch(V){u.value="Error: "+V.message}}async function ee(){if(confirm("Reset to default template? Your customizations will be lost."))try{const V=await fetch("/api/templates/reminders",{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!V.ok)throw new Error(V.statusText);await he(),u.value="Reset to default ✓",setTimeout(()=>{u.value=""},3e3)}catch(V){u.value="Error: "+V.message}}async function ke(){var Te;const V=p.value,E=((Te=f.value[V])==null?void 0:Te.content)??"";try{const ge=await fetch(`/api/templates/reminders-${V}`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:E})});if(!ge.ok)throw new Error(ge.statusText);f.value[V]={content:E,isDefault:!1},v.value=`Saved ${V} ✓`,setTimeout(()=>{v.value=""},3e3)}catch(ge){v.value="Error: "+ge.message}}async function Ce(){const V=p.value;if(confirm(`Reset ${V} agent reminder? The custom template will be removed.`))try{const E=await fetch(`/api/templates/reminders-${V}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!E.ok)throw new Error(E.statusText);await he(),v.value=`Reset ${V} ✓`,setTimeout(()=>{v.value=""},3e3)}catch(E){v.value="Error: "+E.message}}async function xt(){const V=A.value;if(!V.trim()){$.value="Template is empty — load a preset first",setTimeout(()=>{$.value=""},3e3);return}try{const E=await fetch("/api/templates/drive",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!E.ok)throw new Error(E.statusText);H.value=!1,$.value="Saved ✓",setTimeout(()=>{$.value=""},3e3)}catch(E){$.value="Error: "+E.message}}async function Et(){if(confirm("Reset drive template? The custom template will be removed."))try{const V=await fetch("/api/templates/drive",{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!V.ok)throw new Error(V.statusText);await W(),$.value="Reset to default ✓",setTimeout(()=>{$.value=""},3e3)}catch(V){$.value="Error: "+V.message}}function we(V){A.value=V.content,H.value=!1}const ce=Ke(()=>t(l.value)),se=Ke(()=>A.value?t(A.value):'<span style="color:#6b7280">(no template loaded)</span>');return wt(B),(V,E)=>{var Te,ge;return w(),S("div",Sa,[i("div",ka,[i("div",Ca,[E[8]||(E[8]=i("label",{class:"text-sm font-medium text-textSecondary"},"Agent Type",-1)),le(i("select",{"onUpdate:modelValue":E[0]||(E[0]=ne=>s.value=ne),onChange:j,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm text-textPrimary focus:outline-none focus:border-accent transition"},[...E[7]||(E[7]=[We('<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),[[is,s.value]]),n.value?(w(),S("span",Ta,_(n.value),1)):Q("",!0),E[9]||(E[9]=i("span",{class:"text-xs text-muted"},"Changes which default reminders template is used",-1))]),i("div",$a,[E[10]||(E[10]=i("label",{class:"text-sm font-medium text-textSecondary"},"Bootstrap Messages",-1)),le(i("input",{"onUpdate:modelValue":E[1]||(E[1]=ne=>o.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),[[me,o.value,void 0,{number:!0}]]),i("button",{onClick:z,class:"px-4 py-2 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/80 transition-colors"},"Save"),r.value?(w(),S("span",Aa,_(r.value),1)):Q("",!0),E[11]||(E[11]=i("span",{class:"text-xs text-muted"},"Number of recent messages injected as warm context (0 = off)",-1))])]),i("div",Ea,[i("div",Ia,[E[12]||(E[12]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Reminders Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Edit the system prompt template sent with every reminder")],-1)),i("div",Pa,[u.value?(w(),S("span",Ma,_(u.value),1)):Q("",!0),i("button",{onClick:ee,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"),i("button",{onClick:X,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),a.value?(w(),S("div",Oa,[...E[13]||(E[13]=[i("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(i("textarea",{"onUpdate:modelValue":E[2]||(E[2]=ne=>l.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),[[me,l.value]]),i("div",Da,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[3]||(E[3]=ne=>h.value=!h.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",h.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[14]||(E[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[15]||(E[15]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with highlighted variables",-1))]),h.value?(w(),S("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,Ra)):Q("",!0)]),E[16]||(E[16]=We('<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))]),i("div",ja,[i("div",Na,[E[17]||(E[17]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Agent-Specific Reminders"),i("p",{class:"text-sm text-textSecondary mt-1"},"Appended after the base reminders template — per agent type")],-1)),i("div",La,[v.value?(w(),S("span",Fa,_(v.value),1)):Q("",!0),i("button",{onClick:Ce,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"),i("button",{onClick:ke,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Va,[(w(),S(ie,null,Se(["copilot","claude","cursor","codex"],ne=>i("button",{key:ne,onClick:He=>p.value=ne,class:G(["px-4 py-2 rounded-xl text-sm font-medium transition",p.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))]),((Te=f.value[p.value])==null?void 0:Te.isDefault)!==!1?(w(),S("div",Ha,[...E[18]||(E[18]=[i("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),i("textarea",{value:((ge=f.value[p.value])==null?void 0:ge.content)??"",onInput:E[4]||(E[4]=ne=>{const He=ne.target;f.value[p.value]={content:He.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 ${p.value}-specific reminders (e.g. orchestrator hints, subagent policies)...`},null,40,Ba)]),i("div",Wa,[i("div",Ka,[E[19]||(E[19]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Drive Framing Template"),i("p",{class:"text-sm text-textSecondary mt-1"},"Customize the autonomous drive prompt sent when the operator is away")],-1)),i("div",za,[$.value?(w(),S("span",Ja,_($.value),1)):Q("",!0),i("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"),i("button",{onClick:xt,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",qa,[E[21]||(E[21]=i("label",{class:"text-sm text-textSecondary"},"Drive Activation Period:",-1)),i("div",Ga,[i("span",Ya,_(L.value),1),E[20]||(E[20]=i("span",{class:"text-sm text-textSecondary"},"hours",-1))]),E[22]||(E[22]=i("span",{class:"text-xs text-muted"},"(informational — set via DMN_ACTIVATION_HOURS env var)",-1))]),H.value?(w(),S("div",Za,[...E[23]||(E[23]=[i("span",{class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},"(Default — edit to override)",-1)])])):Q("",!0),i("div",Qa,[E[24]||(E[24]=i("span",{class:"text-sm text-textSecondary self-center"},"Presets:",-1)),(w(!0),S(ie,null,Se(I.value,ne=>(w(),S("button",{key:ne.key,onClick:He=>we(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,Xa))),128))]),le(i("textarea",{"onUpdate:modelValue":E[5]||(E[5]=ne=>A.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),[[me,A.value]]),i("div",ec,[i("div",{class:"flex items-center gap-2 mb-2 cursor-pointer select-none",onClick:E[6]||(E[6]=ne=>b.value=!b.value)},[(w(),S("svg",{class:G(["w-4 h-4 text-textSecondary transition-transform",b.value?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...E[25]||(E[25]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2)),E[26]||(E[26]=i("span",{class:"text-sm font-medium text-textSecondary"},"Preview with sample values",-1))]),b.value?(w(),S("div",{key:0,class:"glass rounded-xl p-4 font-mono text-sm leading-relaxed whitespace-pre-wrap break-words",innerHTML:se.value},null,8,tc)):Q("",!0)]),E[27]||(E[27]=We('<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))])])}}}),nc={class:"animate-fade-in"},oc={class:"glass rounded-xl p-6 mb-6"},rc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},ic={key:0,class:"glass rounded-xl p-4 mb-4 border border-accent/30"},lc={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3"},ac={class:"flex items-center gap-4 mb-3"},cc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer"},uc={class:"flex items-center gap-2"},dc={key:0,class:"text-sm text-warn"},fc={key:1,class:"text-center py-8 text-textSecondary text-sm"},pc={key:2,class:"text-center text-textSecondary py-12"},hc={key:3,class:"space-y-2"},mc=["onClick"],gc={class:"flex items-start justify-between gap-3"},xc={class:"flex-1 min-w-0"},vc={class:"flex items-center gap-2 mb-1"},yc={class:"font-medium text-sm"},bc={key:0,class:"type-badge",style:{background:"rgba(245,158,11,0.15)",color:"#fbbf24"}},_c={class:"flex flex-wrap gap-1.5 mt-1"},wc=["title"],Sc={key:0,class:"glass rounded-xl p-6"},kc={class:"flex flex-wrap items-center justify-between gap-4 mb-4"},Cc={class:"text-lg font-semibold"},Tc={class:"text-sm text-textSecondary mt-1"},$c={class:"flex items-center gap-2"},Ac={key:0,class:"text-sm text-success"},Ec={key:1,class:"text-sm text-warn"},Ic={class:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4"},Pc=["value"],Mc={class:"flex items-end"},Oc={class:"flex items-center gap-2 text-sm text-textSecondary cursor-pointer pb-2"},Dc=At({__name:"SkillsTab",setup(e){const t=R([]),s=R(!0),n=R(null),o=R(""),r=R(""),l=R(!1),a=R(""),u=R(""),h=R(!1),f=R(""),p=R(""),v=R(!1),A=R("");async function H(){s.value=!0;try{const W=await _e("/api/skills");t.value=W.skills||[]}finally{s.value=!1}}function $(W){return W?W.includes(".remote-copilot-mcp")&&W.includes("skills")?"user":W.endsWith(".default.md")?"default":W.endsWith(".skill.md")?"project":"unknown":"unknown"}function b(W){const j={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 j[W]||j.unknown}function I(W){n.value=W,o.value=W.content,r.value=(W.triggers||[]).join(", "),l.value=!!W.replacesOrchestrator,h.value=!1}function L(){n.value=null,u.value=""}function B(W,j,z,X){let ee=`---
|
|
65
|
+
name: ${W}
|
|
66
66
|
triggers:
|
|
67
|
-
`;return
|
|
68
|
-
`}),
|
|
69
|
-
`),
|
|
67
|
+
`;return j.forEach(ke=>{ee+=` - ${ke.trim()}
|
|
68
|
+
`}),z&&(ee+=`replaces_orchestrator: true
|
|
69
|
+
`),ee+=`---
|
|
70
70
|
|
|
71
|
-
`,
|
|
72
|
-
`);try{const se=await fetch(`/api/skills/${encodeURIComponent(K)}`,{method:"PUT",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({content:me})});if(!se.ok)throw new Error(se.statusText);A.value="Created ✓",m.value=!1,await B();const Te=t.value.find($e=>$e.name===K);Te&&P(Te)}catch(se){A.value="Error: "+se.message}}return wt(B),(K,I)=>(_(),C("div",nc,[i("div",oc,[i("div",rc,[I[8]||(I[8]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Skill Library"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),i("button",{onClick:I[0]||(I[0]=J=>{m.value=!m.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 ")]),m.value?(_(),C("div",ic,[I[12]||(I[12]=i("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),i("div",lc,[i("div",null,[I[9]||(I[9]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),le(i("input",{"onUpdate:modelValue":I[1]||(I[1]=J=>d.value=J),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),[[xe,d.value]])]),i("div",null,[I[10]||(I[10]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":I[2]||(I[2]=J=>p.value=J),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),[[xe,p.value]])])]),i("div",ac,[i("label",cc,[le(i("input",{"onUpdate:modelValue":I[3]||(I[3]=J=>x.value=J),type:"checkbox",class:"rounded"},null,512),[[lo,x.value]]),I[11]||(I[11]=i("span",null,"Replaces orchestrator",-1))])]),i("div",uc,[i("button",{onClick:he,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),i("button",{onClick:I[4]||(I[4]=J=>m.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"),A.value?(_(),C("span",dc,k(A.value),1)):Q("",!0)])])):Q("",!0),s.value?(_(),C("div",fc,"Loading...")):t.value.length===0?(_(),C("div",pc,"No skills loaded")):(_(),C("div",mc,[(_(!0),C(ie,null,Ce(t.value,J=>{var me;return _(),C("div",{key:J.name,onClick:se=>P(J),class:Y(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((me=n.value)==null?void 0:me.name)===J.name?"border-accent":"border-transparent"])},[i("div",gc,[i("div",xc,[i("div",vc,[i("span",yc,k(J.name),1),i("span",{class:"type-badge",style:Ms(v($(J.source)))},k($(J.source)),5),J.replacesOrchestrator?(_(),C("span",bc,"REPLACES ORCH")):Q("",!0)]),i("div",_c,[(_(!0),C(ie,null,Ce(J.triggers||[],se=>(_(),C("span",{key:se,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},k(se),1))),128))])]),i("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:J.source||""},k((J.source||"").split(/[\\/]/).pop()||""),9,wc)])],10,hc)}),128))]))]),n.value?(_(),C("div",Sc,[i("div",Cc,[i("div",null,[i("h3",kc,"Edit: "+k(n.value.name),1),i("p",Tc,k(n.value.source||"(unknown source)"),1)]),i("div",$c,[a.value?(_(),C("span",Ac,k(a.value),1)):Q("",!0),c.value?(_(),C("span",Ec,k(c.value),1)):Q("",!0),$(n.value.source)==="user"?(_(),C("button",{key:2,onClick:ee,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),i("button",{onClick:F,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"),i("button",{onClick:U,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Pc,[i("div",null,[I[13]||(I[13]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),i("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)]),i("div",null,[I[14]||(I[14]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":I[5]||(I[5]=J=>r.value=J),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),[[xe,r.value]])]),i("div",Ic,[i("label",Oc,[le(i("input",{"onUpdate:modelValue":I[6]||(I[6]=J=>l.value=J),type:"checkbox",class:"rounded"},null,512),[[lo,l.value]]),I[15]||(I[15]=i("span",null,"Replaces orchestrator",-1))])])]),le(i("textarea",{"onUpdate:modelValue":I[7]||(I[7]=J=>o.value=J),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),[[xe,o.value]])])):Q("",!0)]))}}),Rc={class:"animate-fade-in space-y-6"},jc={class:"glass rounded-xl p-6"},Nc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Lc={class:"flex items-center gap-3"},Fc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Vc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Hc={class:"flex justify-end"},Bc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},Kc={key:1,class:"text-center py-8 text-danger text-sm"},zc={key:2,class:"text-center py-12 text-textSecondary"},Jc={key:3},qc={class:"space-y-3"},Gc={class:"p-4"},Yc={class:"flex flex-wrap items-center gap-3"},Zc=["onBlur"],Qc=["onDblclick"],Xc={class:"text-xs text-muted font-mono"},eu=["value","onChange"],tu=["value"],su={class:"text-xs text-muted"},nu=["onKeyup","onBlur"],ou=["title","onDblclick"],ru={class:"ml-auto flex items-center gap-3"},iu={class:"flex items-center gap-1.5"},lu=["onClick"],au={class:"flex items-center gap-1.5"},cu=["onClick"],uu={class:"flex items-center gap-1.5"},du=["onClick"],fu=["onClick"],pu=["onClick"],mu=["onClick"],hu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},gu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},xu=["value"],vu={class:"flex items-center gap-2"},yu=["onClick","disabled"],bu={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},_u={key:0,class:"text-xs text-muted py-1"},wu={class:"text-sm font-medium"},Su={class:"text-xs text-muted font-mono"},Cu=["value","onChange"],ku=["value"],Tu={class:"text-xs text-muted"},$u={class:"ml-auto flex items-center gap-3"},Au={key:0,class:"flex items-center gap-1.5"},Eu=["onClick"],Pu={key:1,class:"flex items-center gap-1.5"},Mu=["onClick"],Iu=["onClick"],Ou={key:4},Du={class:"space-y-2"},Ru={class:"font-medium"},ju={class:"text-xs text-muted font-mono"},Nu={class:"text-xs text-textSecondary"},Lu={class:"text-xs text-muted"},Fu=["onClick"],Vu={key:5},Uu={class:"space-y-2"},Hu={class:"font-medium"},Bu={class:"text-xs text-muted font-mono"},Wu=["value","onChange"],Ku=["value"],zu={class:"text-xs text-muted"},Ju={class:"ml-auto flex items-center gap-3"},qu={class:"flex items-center gap-1.5"},Gu=["onClick"],Yu={class:"flex items-center gap-1.5"},Zu=["onClick"],Qu=["onClick"],Xu={key:6},ed={class:"space-y-2"},td={class:"font-medium"},sd={class:"text-xs text-muted font-mono"},nd=["value","onChange"],od=["value"],rd={class:"text-xs text-muted"},id=["onClick"],ld=At({__name:"ThreadsTab",setup(e){const t=j([]),s=j(!0),n=j(""),o=j({}),r=j(new Set),l=j(!1),a=j({name:"",threadId:0,client:"claude",workingDirectory:""}),c=j(""),m=j(!1),d=j(null),p=j(""),x=j(null),A=j(""),B=j(null),$=j({name:"",threadId:0,client:"claude",workingDirectory:""}),v=j(""),P=j(!1),F=["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"}},U=Ke(()=>t.value.filter(L=>L.type==="root")),ee=Ke(()=>t.value.filter(L=>L.type==="daily")),he=Ke(()=>t.value.filter(L=>L.type==="branch")),K=Ke(()=>t.value.filter(L=>L.type==="worker"));async function I(){s.value=!0,n.value="";try{const L=await Se("/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 y=await Se(`/api/threads/${L}/children`);o.value[L]=y.threads??[]}catch{o.value[L]=[]}}function me(L){r.value.has(L)?r.value.delete(L):(r.value.add(L),J(L))}async function se(){if(!(!a.value.name.trim()||!a.value.threadId)){m.value=!0,c.value="";try{const L=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"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(!L.ok){const y=await L.json().catch(()=>({error:L.statusText}));throw new Error(y.error??L.statusText)}c.value="Created ✓",a.value={name:"",threadId:0,client:"claude",workingDirectory:""},l.value=!1,setTimeout(()=>{c.value=""},3e3),await I()}catch(L){c.value="Error: "+L.message}finally{m.value=!1}}}async function Te(L){if(!(!$.value.name.trim()||!$.value.threadId)){P.value=!0,v.value="";try{const y=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:$.value.threadId,name:$.value.name.trim(),type:"branch",rootThreadId:L,client:$.value.client,...$.value.workingDirectory.trim()?{workingDirectory:$.value.workingDirectory.trim()}:{}})});if(!y.ok){const g=await y.json().catch(()=>({error:y.statusText}));throw new Error(g.error??y.statusText)}v.value="Branch created ✓",$.value={name:"",threadId:0,client:"claude",workingDirectory:""},B.value=null,setTimeout(()=>{v.value=""},3e3),await I(),J(L)}catch(y){v.value="Error: "+y.message}finally{P.value=!1}}}function $e(L){d.value=L.threadId,p.value=L.name}async function gt(L){const y=p.value.trim();if(d.value=null,!!y)try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to rename thread: "+g.message}}function Et(L){x.value=L.threadId,A.value=L.workingDirectory??""}async function _e(L){const y=A.value.trim();x.value=null;try{const g=await fetch(`/api/threads/${L}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:y||null})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to update working directory: "+g.message}}async function ae(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!L.keepAlive})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle keep-alive: "+y.message}}async function X(L,y){try{const g=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({client:y})});if(!g.ok)throw new Error(g.statusText);await I()}catch(g){n.value="Failed to change agent type: "+g.message}}async function V(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!L.dailyRotation})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle daily rotation: "+y.message}}async function E(L){try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!L.autonomousMode})});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to toggle autonomous mode: "+y.message}}async function ye(L){if(confirm(`Archive thread "${L.name}" (${L.threadId})?`))try{const y=await fetch(`/api/threads/${L.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${ke()}`}});if(!y.ok)throw new Error(y.statusText);await I()}catch(y){n.value="Failed to archive: "+y.message}}function ge(L){if(!L)return"—";const y=new Date(L),ve=Date.now()-y.getTime();return ve<6e4?"just now":ve<36e5?`${Math.floor(ve/6e4)}m ago`:ve<864e5?`${Math.floor(ve/36e5)}h ago`:y.toLocaleDateString()}function ne(L){return L==="active"?"text-success":L==="archived"?"text-muted":"text-warn"}return wt(I),(L,y)=>(_(),C("div",Rc,[i("div",jc,[i("div",Nc,[y[14]||(y[14]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Thread Registry"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),i("div",Lc,[c.value?(_(),C("span",{key:0,class:Y([c.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},k(c.value),3)):Q("",!0),i("button",{onClick:y[0]||(y[0]=g=>l.value=!l.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},k(l.value?"Cancel":"+ New Root Thread"),1),i("button",{onClick:I,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),l.value?(_(),C("div",Fc,[i("div",Vc,[i("div",null,[y[15]||(y[15]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),le(i("input",{"onUpdate:modelValue":y[1]||(y[1]=g=>a.value.name=g),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),[[xe,a.value.name]])]),i("div",null,[y[16]||(y[16]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),le(i("input",{"onUpdate:modelValue":y[2]||(y[2]=g=>a.value.threadId=g),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),[[xe,a.value.threadId,void 0,{number:!0}]])]),i("div",null,[y[17]||(y[17]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),le(i("select",{"onUpdate:modelValue":y[3]||(y[3]=g=>a.value.client=g),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(ie,null,Ce(F,g=>i("option",{key:g,value:g},k(g),9,Uc)),64))],512),[[rs,a.value.client]])])]),i("div",null,[y[18]||(y[18]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),le(i("input",{"onUpdate:modelValue":y[4]||(y[4]=g=>a.value.workingDirectory=g),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),[[xe,a.value.workingDirectory]])]),i("div",Hc,[i("button",{onClick:se,disabled:m.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"},k(m.value?"Creating…":"Create Root Thread"),9,Bc)])])):Q("",!0)]),s.value&&t.value.length===0?(_(),C("div",Wc,"Loading threads…")):n.value?(_(),C("div",Kc,k(n.value),1)):t.value.length===0?(_(),C("div",zc,"No threads registered")):Q("",!0),U.value.length>0?(_(),C("div",Jc,[y[24]||(y[24]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),i("div",qc,[(_(!0),C(ie,null,Ce(U.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl overflow-hidden"},[i("div",Gc,[i("div",Yc,[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),d.value===g.threadId?le((_(),C("input",{key:0,"onUpdate:modelValue":y[5]||(y[5]=O=>p.value=O),onBlur:O=>gt(g.threadId),onKeyup:[y[6]||(y[6]=zt(O=>O.target.blur(),["enter"])),y[7]||(y[7]=zt(O=>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,Zc)),[[xe,p.value]]):(_(),C("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:O=>$e(g),title:"Double-click to rename"},k(g.name),41,Qc)),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",Xc,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,tu)),64))],40,eu),i("span",su,k(ge(g.lastActiveAt)),1),x.value===g.threadId?le((_(),C("input",{key:2,"onUpdate:modelValue":y[8]||(y[8]=O=>A.value=O),onKeyup:[zt(O=>_e(g.threadId),["enter"]),y[9]||(y[9]=zt(O=>x.value=null,["escape"]))],onBlur:O=>_e(g.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,nu)),[[xe,A.value]]):(_(),C("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(g.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:O=>Et(g)},"📁 "+k(g.workingDirectory??"—"),41,ou)),i("div",ru,[i("div",iu,[i("button",{onClick:O=>ae(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,lu),y[19]||(y[19]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",au,[i("button",{onClick:O=>V(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,cu),y[20]||(y[20]=i("span",{class:"text-xs text-muted"},"Daily",-1))]),i("div",uu,[i("button",{onClick:O=>E(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,du),y[21]||(y[21]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:O=>me(g.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},k(r.value.has(g.threadId)?"▾ Children":"▸ Children"),9,fu),i("button",{onClick:O=>{B.value=B.value===g.threadId?null:g.threadId,$.value={name:"",threadId:0,client:"claude"},v.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,pu),i("button",{onClick:O=>ye(g),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,mu)])]),B.value===g.threadId?(_(),C("div",hu,[i("div",gu,[le(i("input",{"onUpdate:modelValue":y[10]||(y[10]=O=>$.value.name=O),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),[[xe,$.value.name]]),le(i("input",{"onUpdate:modelValue":y[11]||(y[11]=O=>$.value.threadId=O),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),[[xe,$.value.threadId,void 0,{number:!0}]]),le(i("select",{"onUpdate:modelValue":y[12]||(y[12]=O=>$.value.client=O),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(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,xu)),64))],512),[[rs,$.value.client]])]),le(i("input",{"onUpdate:modelValue":y[13]||(y[13]=O=>$.value.workingDirectory=O),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),[[xe,$.value.workingDirectory]]),i("div",vu,[i("button",{onClick:O=>Te(g.threadId),disabled:P.value||!$.value.name.trim()||!$.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"},k(P.value?"Creating…":"Create Branch"),9,yu),v.value?(_(),C("span",{key:0,class:Y([v.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},k(v.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(g.threadId)&&o.value[g.threadId]?(_(),C("div",bu,[o.value[g.threadId].length===0?(_(),C("div",_u,"No children")):Q("",!0),(_(!0),C(ie,null,Ce(o.value[g.threadId],O=>{var xt,Ls;return _(),C("div",{key:O.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[i("span",{class:Y(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(xt=W[O.type])==null?void 0:xt.classes])},k((Ls=W[O.type])==null?void 0:Ls.emoji)+" "+k(O.type.toUpperCase()),3),i("span",wu,k(O.name),1),i("span",{class:Y(["text-xs",ne(O.status)])},k(O.status),3),i("span",Su,"ID: "+k(O.threadId),1),i("select",{value:O.client,onChange:u=>X(O,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(ie,null,Ce(F,u=>i("option",{key:u,value:u},k(u),9,ku)),64))],40,Cu),i("span",Tu,k(ge(O.lastActiveAt)),1),i("div",$u,[O.type==="branch"?(_(),C("div",Au,[i("button",{onClick:u=>ae(O),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",O.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",O.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Eu),y[22]||(y[22]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),O.type==="branch"?(_(),C("div",Pu,[i("button",{onClick:u=>E(O),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",O.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",O.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Mu),y[23]||(y[23]=i("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),O.type!=="root"?(_(),C("button",{key:2,onClick:u=>ye(O),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),ee.value.length>0?(_(),C("div",Ou,[y[25]||(y[25]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),i("div",Du,[(_(!0),C(ie,null,Ce(ee.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",Ru,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",ju,"ID: "+k(g.threadId),1),i("span",Nu,k(g.client),1),i("span",Lu,k(ge(g.lastActiveAt)),1),i("button",{onClick:O=>ye(g),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,Fu)])}),128))])])):Q("",!0),he.value.length>0?(_(),C("div",Vu,[y[28]||(y[28]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),i("div",Uu,[(_(!0),C(ie,null,Ce(he.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",Hu,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",Bu,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,Ku)),64))],40,Wu),i("span",zu,k(ge(g.lastActiveAt)),1),i("div",Ju,[i("div",qu,[i("button",{onClick:O=>ae(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Gu),y[26]||(y[26]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",Yu,[i("button",{onClick:O=>E(g),class:Y(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",g.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:Y(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",g.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Zu),y[27]||(y[27]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:O=>ye(g),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,Qu)])])}),128))])])):Q("",!0),K.value.length>0?(_(),C("div",Xu,[y[29]||(y[29]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),i("div",ed,[(_(!0),C(ie,null,Ce(K.value,g=>{var ve,Oe;return _(),C("div",{key:g.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:Y(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ve=W[g.type])==null?void 0:ve.classes])},k((Oe=W[g.type])==null?void 0:Oe.emoji)+" "+k(g.type.toUpperCase()),3),i("span",td,k(g.name),1),i("span",{class:Y(["text-xs font-medium",ne(g.status)])},k(g.status),3),i("span",sd,"ID: "+k(g.threadId),1),i("select",{value:g.client,onChange:O=>X(g,O.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(ie,null,Ce(F,O=>i("option",{key:O,value:O},k(O),9,od)),64))],40,nd),i("span",rd,k(ge(g.lastActiveAt)),1),i("button",{onClick:O=>ye(g),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,id)])}),128))])])):Q("",!0)]))}}),ad={class:"animate-fade-in"},cd={class:"glass rounded-xl p-6 mb-6"},ud={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},dd={class:"flex items-center gap-3"},fd=["disabled"],pd={key:0,class:"text-center py-8 text-textSecondary text-sm"},md={key:1,class:"space-y-6"},hd={class:"glass rounded-xl p-4 border border-gray-700/50"},gd={class:"flex items-center gap-4"},xd={class:"flex justify-between text-xs text-muted mt-2"},vd={class:"font-mono"},yd={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},bd={class:"glass rounded-xl p-4 border border-gray-700/50"},_d={class:"flex items-center gap-4"},wd={class:"flex justify-between text-xs text-muted mt-2"},Sd={class:"font-mono"},Cd={class:"glass rounded-xl p-4 border border-gray-700/50"},kd={class:"glass rounded-xl p-4 border border-gray-700/50"},Td={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},$d={class:"grid grid-cols-2 gap-4"},Ad={class:"text-sm font-medium text-textSecondary"},Ed={class:"text-sm font-medium font-mono text-textSecondary"},Pd={class:"text-sm font-medium font-mono text-textSecondary"},Md={class:"mt-3"},Id=At({__name:"SettingsTab",setup(e){const t=j(!0),s=j(!1),n=j(""),o=j(50),r=j(50),l=j(1440),a=j(1440),c=j("claude-opus-4-6"),m=j("claude-opus-4-6"),d=j("claude-sonnet-4-5"),p=j("claude-sonnet-4-5"),x=Ke(()=>o.value!==r.value||l.value!==a.value||c.value!==m.value||d.value!==p.value);async function A(){t.value=!0;try{const[$,v,P,F]=await Promise.all([Se("/api/settings/bootstrap-message-count"),Se("/api/settings/wait-timeout"),Se("/api/settings/default-thread-model"),Se("/api/settings/default-worker-model")]);o.value=$.count,r.value=$.count,l.value=v.minutes,a.value=v.minutes,c.value=P.defaultThreadModel,m.value=P.defaultThreadModel,d.value=F.defaultWorkerModel,p.value=F.defaultWorkerModel}finally{t.value=!1}}async function B(){if(s.value=!0,n.value="",!c.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!d.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}try{const $={Authorization:`Bearer ${ke()}`,"Content-Type":"application/json"},[v,P,F,W]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:$,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:$,body:JSON.stringify({minutes:l.value})}),fetch("/api/settings/default-thread-model",{method:"POST",headers:$,body:JSON.stringify({model:c.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:$,body:JSON.stringify({model:d.value})})]);for(const I of[v,P,F,W])if(!I.ok){const J=await I.json().catch(()=>({error:I.statusText}));throw new Error(J.error??I.statusText)}const U=await v.json(),ee=await P.json(),he=await F.json(),K=await W.json();r.value=U.count,o.value=U.count,a.value=ee.minutes,l.value=ee.minutes,m.value=he.defaultThreadModel,c.value=he.defaultThreadModel,p.value=K.defaultWorkerModel,d.value=K.defaultWorkerModel,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch($){n.value="Error: "+$.message}finally{s.value=!1}}return wt(A),($,v)=>(_(),C("div",ad,[i("div",cd,[i("div",ud,[v[6]||(v[6]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Settings"),i("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),i("div",dd,[n.value?(_(),C("span",{key:0,class:Y([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},k(n.value),3)):Q("",!0),i("button",{onClick:B,disabled:s.value||t.value||!x.value,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight disabled:opacity-50 text-white text-sm font-medium transition"},k(s.value?"Saving…":"Save"),9,fd)])]),t.value?(_(),C("div",pd,"Loading…")):(_(),C("div",md,[i("div",hd,[v[10]||(v[10]=i("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),v[11]||(v[11]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Number of recent messages injected into the agent's bootstrap context. Set to "),i("span",{class:"font-mono text-accentLight"},"0"),He(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),i("div",gd,[le(i("input",{"onUpdate:modelValue":v[0]||(v[0]=P=>o.value=P),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[xe,o.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":v[1]||(v[1]=P=>o.value=P),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),[[xe,o.value,void 0,{number:!0}]])]),i("div",xd,[v[7]||(v[7]=i("span",null,"Off",-1)),i("span",vd,k(o.value)+" messages",1),v[8]||(v[8]=i("span",null,"Max",-1))]),o.value===0?(_(),C("div",yd,[...v[9]||(v[9]=[He(" Message buffer injection is ",-1),i("strong",null,"disabled",-1),He(". 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)]),i("div",bd,[v[14]||(v[14]=i("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),v[15]||(v[15]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Maximum time (in minutes) a single "),i("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),He(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),i("div",_d,[le(i("input",{"onUpdate:modelValue":v[2]||(v[2]=P=>l.value=P),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[xe,l.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":v[3]||(v[3]=P=>l.value=P),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),[[xe,l.value,void 0,{number:!0}]])]),i("div",wd,[v[12]||(v[12]=i("span",null,"1 min",-1)),i("span",Sd,k(l.value>=60?Math.floor(l.value/60)+"h "+l.value%60+"m":l.value+" min"),1),v[13]||(v[13]=i("span",null,"24h",-1))])]),i("div",Cd,[v[16]||(v[16]=i("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),v[17]||(v[17]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),He(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":v[4]||(v[4]=P=>c.value=P),type:"text",placeholder:"claude-opus-4-6",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),[[xe,c.value,void 0,{trim:!0}]])]),i("div",kd,[v[18]||(v[18]=i("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),v[19]||(v[19]=i("p",{class:"text-xs text-textSecondary mb-3"},[He(" Model used when spawning a worker Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),He(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":v[5]||(v[5]=P=>d.value=P),type:"text",placeholder:"claude-sonnet-4-5",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),[[xe,d.value,void 0,{trim:!0}]])]),i("div",Td,[v[24]||(v[24]=i("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),i("div",$d,[i("div",null,[v[20]||(v[20]=i("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),i("span",{class:Y(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},k(r.value>0?`${r.value} messages`:"Disabled"),3)]),i("div",null,[v[21]||(v[21]=i("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),i("span",Ad,k(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),i("div",null,[v[22]||(v[22]=i("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),i("span",Ed,k(m.value),1)]),i("div",null,[v[23]||(v[23]=i("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),i("span",Pd,k(p.value),1)])]),i("div",Md,[i("span",{class:Y(["text-sm font-medium",x.value?"text-warn":"text-textSecondary"])},k(x.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Od={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Dd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},Rd=["disabled"],jd={key:0,class:"mt-3 text-sm text-danger"},Nd={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Ld={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Fd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Vd={class:"flex items-center gap-4"},Ud={class:"text-sm text-textSecondary font-mono"},Hd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},Bd={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},Wd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Kd={class:"text-2xl font-bold font-mono"},zd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Jd={class:"text-2xl font-bold font-mono"},qd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Gd={class:"text-2xl font-bold font-mono"},Yd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},Zd={class:"flex items-center gap-2 mb-2"},Qd={class:"text-2xl font-bold font-mono"},Xd={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},ef={class:"text-2xl font-bold font-mono"},tf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},sf={class:"text-2xl font-bold font-mono"},nf={class:"max-w-7xl mx-auto px-4 sm:px-6"},of={class:"flex gap-6 border-b border-gray-800/50 mb-6"},rf=["onClick"],lf={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},ps="sensorium_token",af=At({__name:"App",setup(e){const t=j(!1),s=j(""),n=j(""),o=j(!1),r=j(null),l=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"}],m={sessions:oa,notes:wa,templates:sc,skills:Dc,threads:ld,settings:Id},d=Ke(()=>m[l.value]),p=Ke(()=>{if(!r.value)return"—";const v=Math.floor(r.value.uptime),P=Math.floor(v/86400),F=Math.floor(v%86400/3600),W=Math.floor(v%3600/60);return P>0?`${P}d ${F}h`:F>0?`${F}h ${W}m`:`${W}m`});async function x(){const v=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Wt(v),await B(),localStorage.setItem(ps,v),t.value=!0,$()}catch(P){const F=P;F.status===401?n.value="Invalid token":n.value=F.message??"Connection failed",Wt("")}finally{o.value=!1}}function A(){localStorage.removeItem(ps),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Wt("")}async function B(){r.value=await Se("/api/status")}function $(){a&&clearInterval(a),a=setInterval(B,3e4)}return wt(async()=>{const v=localStorage.getItem(ps);if(v){s.value=v;try{Wt(v),await B(),t.value=!0,$()}catch{localStorage.removeItem(ps),Wt("")}}}),_n(()=>{a&&clearInterval(a)}),(v,P)=>{var F,W,U,ee,he,K,I,J,me,se,Te;return t.value?(_(),C("div",Nd,[i("header",Ld,[i("div",Fd,[P[3]||(P[3]=We('<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)),i("div",Vd,[P[2]||(P[2]=i("div",{class:"flex items-center gap-2 text-sm"},[i("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),i("span",{class:"text-textSecondary"},"Connected")],-1)),i("div",Ud,k(p.value),1),i("button",{onClick:A,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),i("div",Hd,[i("div",Bd,[i("div",Wd,[P[4]||(P[4]=We('<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)),i("div",Kd,k(((F=r.value)==null?void 0:F.activeSessions)??0),1)]),i("div",zd,[P[5]||(P[5]=We('<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)),i("div",Jd,k(((U=(W=r.value)==null?void 0:W.memory)==null?void 0:U.totalSemanticNotes)??0),1)]),i("div",qd,[P[6]||(P[6]=We('<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)),i("div",Gd,k(((he=(ee=r.value)==null?void 0:ee.memory)==null?void 0:he.totalEpisodes)??0),1)]),i("div",Yd,[i("div",Zd,[i("span",{class:Y((((I=(K=r.value)==null?void 0:K.memory)==null?void 0:I.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...P[7]||(P[7]=[i("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),P[8]||(P[8]=i("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),i("div",Qd,k(((me=(J=r.value)==null?void 0:J.memory)==null?void 0:me.unconsolidatedEpisodes)??0),1)]),i("div",Xd,[P[9]||(P[9]=We('<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)),i("div",ef,k(((Te=(se=r.value)==null?void 0:se.memory)==null?void 0:Te.totalProcedures)??0),1)]),i("div",tf,[P[10]||(P[10]=We('<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)),i("div",sf,k(p.value),1)])])]),i("div",nf,[i("nav",of,[(_(),C(ie,null,Ce(c,$e=>i("button",{key:$e.id,onClick:gt=>l.value=$e.id,class:Y(["pb-3 text-sm font-medium transition",l.value===$e.id?"tab-active":"tab-inactive"])},k($e.label),11,rf)),64))])]),i("div",lf,[(_(),dr(Ai(d.value),{status:r.value},null,8,["status"]))])])):(_(),C("div",Od,[i("div",Dd,[P[1]||(P[1]=We('<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(i("input",{"onUpdate:modelValue":P[0]||(P[0]=$e=>s.value=$e),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(x,["enter"])},null,544),[[xe,s.value]]),i("button",{onClick:x,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"},k(o.value?"Connecting...":"Connect"),9,Rd),n.value?(_(),C("p",jd,k(n.value),1)):Q("",!0)])]))}}});Ul(af).mount("#app");</script>
|
|
71
|
+
`,ee+X}async function F(){if(!n.value)return;const W=n.value.name;try{const j=r.value.split(",").map(ke=>ke.trim()).filter(Boolean),z=o.value;let X;z.trimStart().startsWith("---")?X=z:X=B(W,j,l.value,z);const ee=await fetch(`/api/skills/${encodeURIComponent(W)}`,{method:"PUT",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:X})});if(!ee.ok)throw new Error(ee.statusText);a.value="Saved ✓",setTimeout(()=>{a.value=""},3e3),await H()}catch(j){a.value="Error: "+j.message}}async function Z(){if(!n.value)return;const W=n.value.name;try{const j=await fetch(`/api/skills/${encodeURIComponent(W)}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!j.ok)throw new Error(j.statusText);L(),await H()}catch(j){u.value="Error: "+j.message}}async function he(){const W=f.value.trim(),j=p.value;if(!W){A.value="Name is required";return}const z=j.split(",").map(ee=>ee.trim()).filter(Boolean);if(!z.length){A.value="At least one trigger is required";return}const X=B(W,z,v.value,`\x3C!-- Write your skill instructions here -->
|
|
72
|
+
`);try{const ee=await fetch(`/api/skills/${encodeURIComponent(W)}`,{method:"PUT",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({content:X})});if(!ee.ok)throw new Error(ee.statusText);A.value="Created ✓",h.value=!1,await H();const ke=t.value.find(Ce=>Ce.name===W);ke&&I(ke)}catch(ee){A.value="Error: "+ee.message}}return wt(H),(W,j)=>(w(),S("div",nc,[i("div",oc,[i("div",rc,[j[8]||(j[8]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Skill Library"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage intent-routing skills — user overrides, defaults, and project skills")],-1)),i("button",{onClick:j[0]||(j[0]=z=>{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?(w(),S("div",ic,[j[12]||(j[12]=i("h4",{class:"text-sm font-semibold mb-3"},"Create New Skill",-1)),i("div",lc,[i("div",null,[j[9]||(j[9]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),le(i("input",{"onUpdate:modelValue":j[1]||(j[1]=z=>f.value=z),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),[[me,f.value]])]),i("div",null,[j[10]||(j[10]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":j[2]||(j[2]=z=>p.value=z),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),[[me,p.value]])])]),i("div",ac,[i("label",cc,[le(i("input",{"onUpdate:modelValue":j[3]||(j[3]=z=>v.value=z),type:"checkbox",class:"rounded"},null,512),[[lo,v.value]]),j[11]||(j[11]=i("span",null,"Replaces orchestrator",-1))])]),i("div",uc,[i("button",{onClick:he,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Create"),i("button",{onClick:j[4]||(j[4]=z=>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"),A.value?(w(),S("span",dc,_(A.value),1)):Q("",!0)])])):Q("",!0),s.value?(w(),S("div",fc,"Loading...")):t.value.length===0?(w(),S("div",pc,"No skills loaded")):(w(),S("div",hc,[(w(!0),S(ie,null,Se(t.value,z=>{var X;return w(),S("div",{key:z.name,onClick:ee=>I(z),class:G(["glass rounded-xl p-4 cursor-pointer hover:bg-cardHover transition border",((X=n.value)==null?void 0:X.name)===z.name?"border-accent":"border-transparent"])},[i("div",gc,[i("div",xc,[i("div",vc,[i("span",yc,_(z.name),1),i("span",{class:"type-badge",style:Ms(b($(z.source)))},_($(z.source)),5),z.replacesOrchestrator?(w(),S("span",bc,"REPLACES ORCH")):Q("",!0)]),i("div",_c,[(w(!0),S(ie,null,Se(z.triggers||[],ee=>(w(),S("span",{key:ee,class:"text-xs px-2 py-0.5 rounded-full bg-accent/10 text-accentLight"},_(ee),1))),128))])]),i("div",{class:"text-xs text-muted font-mono shrink-0 max-w-[200px] truncate",title:z.source||""},_((z.source||"").split(/[\\/]/).pop()||""),9,wc)])],10,mc)}),128))]))]),n.value?(w(),S("div",Sc,[i("div",kc,[i("div",null,[i("h3",Cc,"Edit: "+_(n.value.name),1),i("p",Tc,_(n.value.source||"(unknown source)"),1)]),i("div",$c,[a.value?(w(),S("span",Ac,_(a.value),1)):Q("",!0),u.value?(w(),S("span",Ec,_(u.value),1)):Q("",!0),$(n.value.source)==="user"?(w(),S("button",{key:2,onClick:Z,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),i("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"),i("button",{onClick:F,class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},"Save")])]),i("div",Ic,[i("div",null,[j[13]||(j[13]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Name",-1)),i("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,Pc)]),i("div",null,[j[14]||(j[14]=i("label",{class:"text-xs text-textSecondary block mb-1"},"Triggers (comma-separated)",-1)),le(i("input",{"onUpdate:modelValue":j[5]||(j[5]=z=>r.value=z),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),[[me,r.value]])]),i("div",Mc,[i("label",Oc,[le(i("input",{"onUpdate:modelValue":j[6]||(j[6]=z=>l.value=z),type:"checkbox",class:"rounded"},null,512),[[lo,l.value]]),j[15]||(j[15]=i("span",null,"Replaces orchestrator",-1))])])]),le(i("textarea",{"onUpdate:modelValue":j[7]||(j[7]=z=>o.value=z),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),[[me,o.value]])])):Q("",!0)]))}}),Rc={class:"animate-fade-in space-y-6"},jc={class:"glass rounded-xl p-6"},Nc={class:"flex flex-wrap items-center justify-between gap-4 mb-2"},Lc={class:"flex items-center gap-3"},Fc={key:0,class:"mt-4 p-4 rounded-xl bg-surface border border-gray-700/50 space-y-3"},Vc={class:"grid grid-cols-1 sm:grid-cols-3 gap-3"},Uc=["value"],Hc={class:"flex justify-end"},Bc=["disabled"],Wc={key:0,class:"text-center py-12 text-textSecondary"},Kc={key:1,class:"text-center py-8 text-danger text-sm"},zc={key:2,class:"text-center py-12 text-textSecondary"},Jc={key:3},qc={class:"space-y-3"},Gc={class:"p-4"},Yc={class:"flex flex-wrap items-center gap-3"},Zc=["onBlur"],Qc=["onDblclick"],Xc={class:"text-xs text-muted font-mono"},eu=["value","onChange"],tu=["value"],su={class:"text-xs text-muted"},nu=["onKeyup","onBlur"],ou=["title","onDblclick"],ru={class:"ml-auto flex items-center gap-3"},iu=["onClick","disabled"],lu={class:"flex items-center gap-1.5"},au=["onClick"],cu={class:"flex items-center gap-1.5"},uu=["onClick"],du={class:"flex items-center gap-1.5"},fu=["onClick"],pu=["onClick"],hu=["onClick"],mu=["onClick"],gu={key:0,class:"mt-3 p-3 rounded-lg bg-surface border border-purple-500/20 space-y-2"},xu={class:"grid grid-cols-1 sm:grid-cols-3 gap-2"},vu=["value"],yu={class:"flex items-center gap-2"},bu=["onClick","disabled"],_u={key:0,class:"border-t border-gray-700/30 bg-surface/30 px-4 py-3 space-y-2"},wu={key:0,class:"text-xs text-muted py-1"},Su={class:"text-sm font-medium"},ku={class:"text-xs text-muted font-mono"},Cu=["value","onChange"],Tu=["value"],$u={class:"text-xs text-muted"},Au={class:"ml-auto flex items-center gap-3"},Eu=["onClick","disabled"],Iu=["onClick","disabled"],Pu={key:1,class:"flex items-center gap-1.5"},Mu=["onClick"],Ou={key:2,class:"flex items-center gap-1.5"},Du=["onClick"],Ru=["onClick"],ju={key:4},Nu={class:"space-y-2"},Lu={class:"font-medium"},Fu={class:"text-xs text-muted font-mono"},Vu={class:"text-xs text-textSecondary"},Uu={class:"text-xs text-muted"},Hu={class:"ml-auto flex items-center gap-2"},Bu=["onClick","disabled"],Wu=["onClick","disabled"],Ku=["onClick"],zu={key:5},Ju={class:"space-y-2"},qu={class:"font-medium"},Gu={class:"text-xs text-muted font-mono"},Yu=["value","onChange"],Zu=["value"],Qu={class:"text-xs text-muted"},Xu={class:"ml-auto flex items-center gap-3"},ed=["onClick","disabled"],td=["onClick","disabled"],sd={class:"flex items-center gap-1.5"},nd=["onClick"],od={class:"flex items-center gap-1.5"},rd=["onClick"],id=["onClick"],ld={key:6},ad={class:"space-y-2"},cd={class:"font-medium"},ud={class:"text-xs text-muted font-mono"},dd=["value","onChange"],fd=["value"],pd={class:"text-xs text-muted"},hd={class:"ml-auto flex items-center gap-2"},md=["onClick","disabled"],gd=["onClick","disabled"],xd=["onClick"],vd=At({__name:"ThreadsTab",setup(e){const t=R([]),s=R(!0),n=R(""),o=R({}),r=R(new Set),l=R(!1),a=R({name:"",threadId:0,client:"claude",workingDirectory:""}),u=R(""),h=R(!1),f=R(null),p=R(""),v=R(null),A=R(""),H=R(null),$=R({name:"",threadId:0,client:"claude",workingDirectory:""}),b=R(""),I=R(!1),L=R(null),B=R(null),F=["claude","copilot","codex","openai_codex","copilot_claude","copilot_codex","cursor"],Z={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"}},he=Ke(()=>t.value.filter(O=>O.type==="root")),W=Ke(()=>t.value.filter(O=>O.type==="daily")),j=Ke(()=>t.value.filter(O=>O.type==="branch")),z=Ke(()=>t.value.filter(O=>O.type==="worker"));async function X(){s.value=!0,n.value="";try{const O=await _e("/api/threads");t.value=O.threads??[]}catch(O){n.value=O.message||"Failed to load threads"}finally{s.value=!1}}async function ee(O){try{const x=await _e(`/api/threads/${O}/children`);o.value[O]=x.threads??[]}catch{o.value[O]=[]}}function ke(O){r.value.has(O)?r.value.delete(O):(r.value.add(O),ee(O))}async function Ce(){if(!(!a.value.name.trim()||!a.value.threadId)){h.value=!0,u.value="";try{const O=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"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(!O.ok){const x=await O.json().catch(()=>({error:O.statusText}));throw new Error(x.error??O.statusText)}u.value="Created ✓",a.value={name:"",threadId:0,client:"claude",workingDirectory:""},l.value=!1,setTimeout(()=>{u.value=""},3e3),await X()}catch(O){u.value="Error: "+O.message}finally{h.value=!1}}}async function xt(O){if(!(!$.value.name.trim()||!$.value.threadId)){I.value=!0,b.value="";try{const x=await fetch("/api/threads",{method:"POST",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({threadId:$.value.threadId,name:$.value.name.trim(),type:"branch",rootThreadId:O,client:$.value.client,...$.value.workingDirectory.trim()?{workingDirectory:$.value.workingDirectory.trim()}:{}})});if(!x.ok){const m=await x.json().catch(()=>({error:x.statusText}));throw new Error(m.error??x.statusText)}b.value="Branch created ✓",$.value={name:"",threadId:0,client:"claude",workingDirectory:""},H.value=null,setTimeout(()=>{b.value=""},3e3),await X(),ee(O)}catch(x){b.value="Error: "+x.message}finally{I.value=!1}}}function Et(O){f.value=O.threadId,p.value=O.name}async function we(O){const x=p.value.trim();if(f.value=null,!!x)try{const m=await fetch(`/api/threads/${O}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({name:x})});if(!m.ok)throw new Error(m.statusText);await X()}catch(m){n.value="Failed to rename thread: "+m.message}}function ce(O){v.value=O.threadId,A.value=O.workingDirectory??""}async function se(O){const x=A.value.trim();v.value=null;try{const m=await fetch(`/api/threads/${O}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({workingDirectory:x||null})});if(!m.ok)throw new Error(m.statusText);await X()}catch(m){n.value="Failed to update working directory: "+m.message}}async function V(O){try{const x=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({keepAlive:!O.keepAlive})});if(!x.ok)throw new Error(x.statusText);await X()}catch(x){n.value="Failed to toggle keep-alive: "+x.message}}async function E(O,x){try{const m=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({client:x})});if(!m.ok)throw new Error(m.statusText);await X()}catch(m){n.value="Failed to change agent type: "+m.message}}async function Te(O){try{const x=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({dailyRotation:!O.dailyRotation})});if(!x.ok)throw new Error(x.statusText);await X()}catch(x){n.value="Failed to toggle daily rotation: "+x.message}}async function ge(O){try{const x=await fetch(`/api/threads/${O.threadId}`,{method:"PATCH",headers:{Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},body:JSON.stringify({autonomousMode:!O.autonomousMode})});if(!x.ok)throw new Error(x.statusText);await X()}catch(x){n.value="Failed to toggle autonomous mode: "+x.message}}async function ne(O){if(confirm(`Archive thread "${O.name}" (${O.threadId})?`))try{const x=await fetch(`/api/threads/${O.threadId}`,{method:"DELETE",headers:{Authorization:`Bearer ${xe()}`}});if(!x.ok)throw new Error(x.statusText);await X()}catch(x){n.value="Failed to archive: "+x.message}}async function He(O){if(confirm(`Start thread "${O.name}" (${O.threadId})?`)){L.value=O.threadId;try{const x=await fetch(`/api/threads/${O.threadId}/start`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(!x.ok){const m=await x.json().catch(()=>({error:x.statusText}));throw new Error(m.error??x.statusText)}await X()}catch(x){n.value="Failed to start thread: "+x.message}finally{L.value=null}}}async function It(O){if(confirm(`Sync memory from "${O.name}" to its root thread?`)){B.value=O.threadId;try{const x=await fetch(`/api/threads/${O.threadId}/synthesize`,{method:"POST",headers:{Authorization:`Bearer ${xe()}`}});if(!x.ok){const ye=await x.json().catch(()=>({error:x.statusText}));throw new Error(ye.error??x.statusText)}const m=await x.json();n.value="",u.value=`Synced ${m.synthesizedNotes??0} notes ✓`,setTimeout(()=>{u.value=""},3e3),await X()}catch(x){n.value="Failed to sync memory: "+x.message}finally{B.value=null}}}function Be(O){if(!O)return"—";const x=new Date(O),ye=Date.now()-x.getTime();return ye<6e4?"just now":ye<36e5?`${Math.floor(ye/6e4)}m ago`:ye<864e5?`${Math.floor(ye/36e5)}h ago`:x.toLocaleDateString()}function qe(O){return O==="active"?"text-success":O==="archived"?"text-muted":"text-warn"}return wt(X),(O,x)=>(w(),S("div",Rc,[i("div",jc,[i("div",Nc,[x[14]||(x[14]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Thread Registry"),i("p",{class:"text-sm text-textSecondary mt-1"},"Manage conversation threads, branches, and daily sessions")],-1)),i("div",Lc,[u.value?(w(),S("span",{key:0,class:G([u.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(u.value),3)):Q("",!0),i("button",{onClick:x[0]||(x[0]=m=>l.value=!l.value),class:"px-4 py-2 rounded-xl bg-accent hover:bg-accentLight text-white text-sm font-medium transition"},_(l.value?"Cancel":"+ New Root Thread"),1),i("button",{onClick:X,class:"px-3 py-2 rounded-xl bg-card border border-gray-700 text-sm hover:bg-surface transition"}," ↻ Refresh ")])]),l.value?(w(),S("div",Fc,[i("div",Vc,[i("div",null,[x[15]||(x[15]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Name",-1)),le(i("input",{"onUpdate:modelValue":x[1]||(x[1]=m=>a.value.name=m),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),[[me,a.value.name]])]),i("div",null,[x[16]||(x[16]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Thread ID",-1)),le(i("input",{"onUpdate:modelValue":x[2]||(x[2]=m=>a.value.threadId=m),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),[[me,a.value.threadId,void 0,{number:!0}]])]),i("div",null,[x[17]||(x[17]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Client",-1)),le(i("select",{"onUpdate:modelValue":x[3]||(x[3]=m=>a.value.client=m),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"},[(w(),S(ie,null,Se(F,m=>i("option",{key:m,value:m},_(m),9,Uc)),64))],512),[[is,a.value.client]])])]),i("div",null,[x[18]||(x[18]=i("label",{class:"block text-xs text-textSecondary mb-1"},"Working Directory (optional)",-1)),le(i("input",{"onUpdate:modelValue":x[4]||(x[4]=m=>a.value.workingDirectory=m),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),[[me,a.value.workingDirectory]])]),i("div",Hc,[i("button",{onClick:Ce,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,Bc)])])):Q("",!0)]),s.value&&t.value.length===0?(w(),S("div",Wc,"Loading threads…")):n.value?(w(),S("div",Kc,_(n.value),1)):t.value.length===0?(w(),S("div",zc,"No threads registered")):Q("",!0),he.value.length>0?(w(),S("div",Jc,[x[24]||(x[24]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟢 Root Threads",-1)),i("div",qc,[(w(!0),S(ie,null,Se(he.value,m=>{var ye,d;return w(),S("div",{key:m.id,class:"glass rounded-xl overflow-hidden"},[i("div",Gc,[i("div",Yc,[i("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ye=Z[m.type])==null?void 0:ye.classes])},_((d=Z[m.type])==null?void 0:d.emoji)+" "+_(m.type.toUpperCase()),3),f.value===m.threadId?le((w(),S("input",{key:0,"onUpdate:modelValue":x[5]||(x[5]=c=>p.value=c),onBlur:c=>we(m.threadId),onKeyup:[x[6]||(x[6]=Jt(c=>c.target.blur(),["enter"])),x[7]||(x[7]=Jt(c=>f.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,Zc)),[[me,p.value]]):(w(),S("span",{key:1,class:"font-semibold cursor-pointer hover:text-accent transition",onDblclick:c=>Et(m),title:"Double-click to rename"},_(m.name),41,Qc)),i("span",{class:G(["text-xs font-medium",qe(m.status)])},_(m.status),3),i("span",Xc,"ID: "+_(m.threadId),1),i("select",{value:m.client,onChange:c=>E(m,c.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"},[(w(),S(ie,null,Se(F,c=>i("option",{key:c,value:c},_(c),9,tu)),64))],40,eu),i("span",su,_(Be(m.lastActiveAt)),1),v.value===m.threadId?le((w(),S("input",{key:2,"onUpdate:modelValue":x[8]||(x[8]=c=>A.value=c),onKeyup:[Jt(c=>se(m.threadId),["enter"]),x[9]||(x[9]=Jt(c=>v.value=null,["escape"]))],onBlur:c=>se(m.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,nu)),[[me,A.value]]):(w(),S("span",{key:3,class:"text-xs text-muted font-mono truncate max-w-[200px] cursor-pointer hover:text-accent transition",title:(m.workingDirectory??"Click to set CWD")+" (dblclick to edit)",onDblclick:c=>ce(m)},"📁 "+_(m.workingDirectory??"—"),41,ou)),i("div",ru,[i("button",{onClick:c=>He(m),disabled:L.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(L.value===m.threadId?"Starting…":"▶ Start"),9,iu),i("div",lu,[i("button",{onClick:c=>V(m),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,au),x[19]||(x[19]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",cu,[i("button",{onClick:c=>Te(m),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.dailyRotation?"bg-blue-500":"bg-gray-700"]),title:"Toggle daily rotation"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.dailyRotation?"translate-x-4":"translate-x-0.5"])},null,2)],10,uu),x[20]||(x[20]=i("span",{class:"text-xs text-muted"},"Daily",-1))]),i("div",du,[i("button",{onClick:c=>ge(m),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,fu),x[21]||(x[21]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:c=>ke(m.threadId),class:"px-2 py-1 rounded-lg text-xs bg-card border border-gray-700 hover:bg-surface transition"},_(r.value.has(m.threadId)?"▾ Children":"▸ Children"),9,pu),i("button",{onClick:c=>{H.value=H.value===m.threadId?null:m.threadId,$.value={name:"",threadId:0,client:"claude",workingDirectory:""},b.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,hu),i("button",{onClick:c=>ne(m),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,mu)])]),H.value===m.threadId?(w(),S("div",gu,[i("div",xu,[le(i("input",{"onUpdate:modelValue":x[10]||(x[10]=c=>$.value.name=c),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),[[me,$.value.name]]),le(i("input",{"onUpdate:modelValue":x[11]||(x[11]=c=>$.value.threadId=c),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),[[me,$.value.threadId,void 0,{number:!0}]]),le(i("select",{"onUpdate:modelValue":x[12]||(x[12]=c=>$.value.client=c),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"},[(w(),S(ie,null,Se(F,c=>i("option",{key:c,value:c},_(c),9,vu)),64))],512),[[is,$.value.client]])]),le(i("input",{"onUpdate:modelValue":x[13]||(x[13]=c=>$.value.workingDirectory=c),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),[[me,$.value.workingDirectory]]),i("div",yu,[i("button",{onClick:c=>xt(m.threadId),disabled:I.value||!$.value.name.trim()||!$.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"},_(I.value?"Creating…":"Create Branch"),9,bu),b.value?(w(),S("span",{key:0,class:G([b.value.startsWith("Error")?"text-danger":"text-success","text-xs"])},_(b.value),3)):Q("",!0)])])):Q("",!0)]),r.value.has(m.threadId)&&o.value[m.threadId]?(w(),S("div",_u,[o.value[m.threadId].length===0?(w(),S("div",wu,"No children")):Q("",!0),(w(!0),S(ie,null,Se(o.value[m.threadId],c=>{var g,k;return w(),S("div",{key:c.id,class:"flex flex-wrap items-center gap-2 px-3 py-2 rounded-lg bg-card/50 border border-gray-700/30"},[i("span",{class:G(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium border",(g=Z[c.type])==null?void 0:g.classes])},_((k=Z[c.type])==null?void 0:k.emoji)+" "+_(c.type.toUpperCase()),3),i("span",Su,_(c.name),1),i("span",{class:G(["text-xs",qe(c.status)])},_(c.status),3),i("span",ku,"ID: "+_(c.threadId),1),i("select",{value:c.client,onChange:y=>E(c,y.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"},[(w(),S(ie,null,Se(F,y=>i("option",{key:y,value:y},_(y),9,Tu)),64))],40,Cu),i("span",$u,_(Be(c.lastActiveAt)),1),i("div",Au,[i("button",{onClick:y=>He(c),disabled:L.value===c.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(L.value===c.threadId?"Starting…":"▶ Start"),9,Eu),c.rootThreadId?(w(),S("button",{key:0,onClick:y=>It(c),disabled:B.value===c.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(B.value===c.threadId?"Syncing…":"⟳ Sync to Root"),9,Iu)):Q("",!0),c.type==="branch"?(w(),S("div",Pu,[i("button",{onClick:y=>V(c),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,Mu),x[22]||(x[22]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))])):Q("",!0),c.type==="branch"?(w(),S("div",Ou,[i("button",{onClick:y=>ge(c),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",c.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",c.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,Du),x[23]||(x[23]=i("span",{class:"text-xs text-muted"},"Auto",-1))])):Q("",!0),c.type!=="root"?(w(),S("button",{key:3,onClick:y=>ne(c),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,Ru)):Q("",!0)])])}),128))])):Q("",!0)])}),128))])])):Q("",!0),W.value.length>0?(w(),S("div",ju,[x[25]||(x[25]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🔵 Daily Sessions",-1)),i("div",Nu,[(w(!0),S(ie,null,Se(W.value,m=>{var ye,d;return w(),S("div",{key:m.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ye=Z[m.type])==null?void 0:ye.classes])},_((d=Z[m.type])==null?void 0:d.emoji)+" "+_(m.type.toUpperCase()),3),i("span",Lu,_(m.name),1),i("span",{class:G(["text-xs font-medium",qe(m.status)])},_(m.status),3),i("span",Fu,"ID: "+_(m.threadId),1),i("span",Vu,_(m.client),1),i("span",Uu,_(Be(m.lastActiveAt)),1),i("div",Hu,[i("button",{onClick:c=>He(m),disabled:L.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(L.value===m.threadId?"Starting…":"▶ Start"),9,Bu),m.rootThreadId?(w(),S("button",{key:0,onClick:c=>It(m),disabled:B.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(B.value===m.threadId?"Syncing…":"⟳ Sync to Root"),9,Wu)):Q("",!0),i("button",{onClick:c=>ne(m),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,Ku)])])}),128))])])):Q("",!0),j.value.length>0?(w(),S("div",zu,[x[28]||(x[28]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟣 Branches",-1)),i("div",Ju,[(w(!0),S(ie,null,Se(j.value,m=>{var ye,d;return w(),S("div",{key:m.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ye=Z[m.type])==null?void 0:ye.classes])},_((d=Z[m.type])==null?void 0:d.emoji)+" "+_(m.type.toUpperCase()),3),i("span",qu,_(m.name),1),i("span",{class:G(["text-xs font-medium",qe(m.status)])},_(m.status),3),i("span",Gu,"ID: "+_(m.threadId),1),i("select",{value:m.client,onChange:c=>E(m,c.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"},[(w(),S(ie,null,Se(F,c=>i("option",{key:c,value:c},_(c),9,Zu)),64))],40,Yu),i("span",Qu,_(Be(m.lastActiveAt)),1),i("div",Xu,[i("button",{onClick:c=>He(m),disabled:L.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(L.value===m.threadId?"Starting…":"▶ Start"),9,ed),m.rootThreadId?(w(),S("button",{key:0,onClick:c=>It(m),disabled:B.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(B.value===m.threadId?"Syncing…":"⟳ Sync to Root"),9,td)):Q("",!0),i("div",sd,[i("button",{onClick:c=>V(m),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.keepAlive?"bg-accent":"bg-gray-700"]),title:"Toggle keep-alive"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.keepAlive?"translate-x-4":"translate-x-0.5"])},null,2)],10,nd),x[26]||(x[26]=i("span",{class:"text-xs text-muted"},"Keep-alive",-1))]),i("div",od,[i("button",{onClick:c=>ge(m),class:G(["relative inline-flex h-5 w-9 items-center rounded-full transition-colors",m.autonomousMode?"bg-orange-500":"bg-gray-700"]),title:"Toggle autonomous mode"},[i("span",{class:G(["inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform",m.autonomousMode?"translate-x-4":"translate-x-0.5"])},null,2)],10,rd),x[27]||(x[27]=i("span",{class:"text-xs text-muted"},"Auto",-1))]),i("button",{onClick:c=>ne(m),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,id)])])}),128))])])):Q("",!0),z.value.length>0?(w(),S("div",ld,[x[29]||(x[29]=i("h4",{class:"text-sm font-medium text-textSecondary uppercase tracking-wider mb-3"},"🟡 Workers",-1)),i("div",ad,[(w(!0),S(ie,null,Se(z.value,m=>{var ye,d;return w(),S("div",{key:m.id,class:"glass rounded-xl p-4 flex flex-wrap items-center gap-3"},[i("span",{class:G(["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",(ye=Z[m.type])==null?void 0:ye.classes])},_((d=Z[m.type])==null?void 0:d.emoji)+" "+_(m.type.toUpperCase()),3),i("span",cd,_(m.name),1),i("span",{class:G(["text-xs font-medium",qe(m.status)])},_(m.status),3),i("span",ud,"ID: "+_(m.threadId),1),i("select",{value:m.client,onChange:c=>E(m,c.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"},[(w(),S(ie,null,Se(F,c=>i("option",{key:c,value:c},_(c),9,fd)),64))],40,dd),i("span",pd,_(Be(m.lastActiveAt)),1),i("div",hd,[i("button",{onClick:c=>He(m),disabled:L.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-green-500/20 text-green-400 border border-green-500/30 hover:bg-green-500/30 disabled:opacity-50 transition",title:"Start thread"},_(L.value===m.threadId?"Starting…":"▶ Start"),9,md),m.rootThreadId?(w(),S("button",{key:0,onClick:c=>It(m),disabled:B.value===m.threadId,class:"px-2 py-1 rounded-lg text-xs bg-cyan-500/20 text-cyan-400 border border-cyan-500/30 hover:bg-cyan-500/30 disabled:opacity-50 transition",title:"Sync memory to root thread"},_(B.value===m.threadId?"Syncing…":"⟳ Sync to Root"),9,gd)):Q("",!0),i("button",{onClick:c=>ne(m),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,xd)])])}),128))])])):Q("",!0)]))}}),yd={class:"animate-fade-in"},bd={class:"glass rounded-xl p-6 mb-6"},_d={class:"flex flex-wrap items-center justify-between gap-4 mb-6"},wd={class:"flex items-center gap-3"},Sd=["disabled"],kd={key:0,class:"text-center py-8 text-textSecondary text-sm"},Cd={key:1,class:"space-y-6"},Td={class:"glass rounded-xl p-4 border border-gray-700/50"},$d={class:"flex items-center gap-4"},Ad={class:"flex justify-between text-xs text-muted mt-2"},Ed={class:"font-mono"},Id={key:0,class:"mt-3 px-3 py-2 rounded-lg bg-warn/10 border border-warn/20 text-xs text-warn"},Pd={class:"glass rounded-xl p-4 border border-gray-700/50"},Md={class:"flex items-center gap-4"},Od={class:"flex justify-between text-xs text-muted mt-2"},Dd={class:"font-mono"},Rd={class:"glass rounded-xl p-4 border border-gray-700/50"},jd={class:"glass rounded-xl p-4 border border-gray-700/50"},Nd={class:"glass rounded-xl p-4 border border-gray-700/30 bg-surface/30"},Ld={class:"grid grid-cols-2 gap-4"},Fd={class:"text-sm font-medium text-textSecondary"},Vd={class:"text-sm font-medium font-mono text-textSecondary"},Ud={class:"text-sm font-medium font-mono text-textSecondary"},Hd={class:"mt-3"},Bd=At({__name:"SettingsTab",setup(e){const t=R(!0),s=R(!1),n=R(""),o=R(50),r=R(50),l=R(1440),a=R(1440),u=R("claude-opus-4-6"),h=R("claude-opus-4-6"),f=R("claude-sonnet-4-5"),p=R("claude-sonnet-4-5"),v=Ke(()=>o.value!==r.value||l.value!==a.value||u.value!==h.value||f.value!==p.value);async function A(){t.value=!0;try{const[$,b,I,L]=await Promise.all([_e("/api/settings/bootstrap-message-count"),_e("/api/settings/wait-timeout"),_e("/api/settings/default-thread-model"),_e("/api/settings/default-worker-model")]);o.value=$.count,r.value=$.count,l.value=b.minutes,a.value=b.minutes,u.value=I.defaultThreadModel,h.value=I.defaultThreadModel,f.value=L.defaultWorkerModel,p.value=L.defaultWorkerModel}finally{t.value=!1}}async function H(){if(s.value=!0,n.value="",!u.value){n.value="Error: Thread model cannot be empty",s.value=!1;return}if(!f.value){n.value="Error: Worker model cannot be empty",s.value=!1;return}try{const $={Authorization:`Bearer ${xe()}`,"Content-Type":"application/json"},[b,I,L,B]=await Promise.all([fetch("/api/settings/bootstrap-message-count",{method:"POST",headers:$,body:JSON.stringify({count:o.value})}),fetch("/api/settings/wait-timeout",{method:"POST",headers:$,body:JSON.stringify({minutes:l.value})}),fetch("/api/settings/default-thread-model",{method:"POST",headers:$,body:JSON.stringify({model:u.value})}),fetch("/api/settings/default-worker-model",{method:"POST",headers:$,body:JSON.stringify({model:f.value})})]);for(const j of[b,I,L,B])if(!j.ok){const z=await j.json().catch(()=>({error:j.statusText}));throw new Error(z.error??j.statusText)}const F=await b.json(),Z=await I.json(),he=await L.json(),W=await B.json();r.value=F.count,o.value=F.count,a.value=Z.minutes,l.value=Z.minutes,h.value=he.defaultThreadModel,u.value=he.defaultThreadModel,p.value=W.defaultWorkerModel,f.value=W.defaultWorkerModel,n.value="Saved ✓",setTimeout(()=>{n.value=""},3e3)}catch($){n.value="Error: "+$.message}finally{s.value=!1}}return wt(A),($,b)=>(w(),S("div",yd,[i("div",bd,[i("div",_d,[b[6]||(b[6]=i("div",null,[i("h3",{class:"text-lg font-semibold"},"Settings"),i("p",{class:"text-sm text-textSecondary mt-1"},"Configure agent behavior and context injection")],-1)),i("div",wd,[n.value?(w(),S("span",{key:0,class:G([n.value.startsWith("Error")?"text-danger":"text-success","text-sm"])},_(n.value),3)):Q("",!0),i("button",{onClick:H,disabled:s.value||t.value||!v.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,Sd)])]),t.value?(w(),S("div",kd,"Loading…")):(w(),S("div",Cd,[i("div",Td,[b[10]||(b[10]=i("label",{class:"block text-sm font-medium mb-1"},"Recent Conversation Buffer",-1)),b[11]||(b[11]=i("p",{class:"text-xs text-textSecondary mb-3"},[Ve(" Number of recent messages injected into the agent's bootstrap context. Set to "),i("span",{class:"font-mono text-accentLight"},"0"),Ve(" to disable (useful when using VS Code, which maintains its own conversation history). ")],-1)),i("div",$d,[le(i("input",{"onUpdate:modelValue":b[0]||(b[0]=I=>o.value=I),type:"range",min:"0",max:"100",step:"5",class:"flex-1 accent-accent"},null,512),[[me,o.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":b[1]||(b[1]=I=>o.value=I),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),[[me,o.value,void 0,{number:!0}]])]),i("div",Ad,[b[7]||(b[7]=i("span",null,"Off",-1)),i("span",Ed,_(o.value)+" messages",1),b[8]||(b[8]=i("span",null,"Max",-1))]),o.value===0?(w(),S("div",Id,[...b[9]||(b[9]=[Ve(" Message buffer injection is ",-1),i("strong",null,"disabled",-1),Ve(". 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)]),i("div",Pd,[b[14]||(b[14]=i("label",{class:"block text-sm font-medium mb-1"},"Poll Timeout (wait_for_instructions)",-1)),b[15]||(b[15]=i("p",{class:"text-xs text-textSecondary mb-3"},[Ve(" Maximum time (in minutes) a single "),i("span",{class:"font-mono text-accentLight"},"wait_for_instructions"),Ve(" call will poll before timing out. Claude Code agents use the full value; Copilot agents are capped at 10 min. ")],-1)),i("div",Md,[le(i("input",{"onUpdate:modelValue":b[2]||(b[2]=I=>l.value=I),type:"range",min:"1",max:"1440",step:"10",class:"flex-1 accent-accent"},null,512),[[me,l.value,void 0,{number:!0}]]),le(i("input",{"onUpdate:modelValue":b[3]||(b[3]=I=>l.value=I),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),[[me,l.value,void 0,{number:!0}]])]),i("div",Od,[b[12]||(b[12]=i("span",null,"1 min",-1)),i("span",Dd,_(l.value>=60?Math.floor(l.value/60)+"h "+l.value%60+"m":l.value+" min"),1),b[13]||(b[13]=i("span",null,"24h",-1))])]),i("div",Rd,[b[16]||(b[16]=i("label",{class:"block text-sm font-medium mb-1"},"Default Thread Model",-1)),b[17]||(b[17]=i("p",{class:"text-xs text-textSecondary mb-3"},[Ve(" Model used when spawning a normal (orchestrator) Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_MODEL"),Ve(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":b[4]||(b[4]=I=>u.value=I),type:"text",placeholder:"claude-opus-4-6",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),[[me,u.value,void 0,{trim:!0}]])]),i("div",jd,[b[18]||(b[18]=i("label",{class:"block text-sm font-medium mb-1"},"Default Worker Model",-1)),b[19]||(b[19]=i("p",{class:"text-xs text-textSecondary mb-3"},[Ve(" Model used when spawning a worker Claude thread. Overridden by the "),i("span",{class:"font-mono text-accentLight"},"CLAUDE_WORKER_MODEL"),Ve(" env var if set. ")],-1)),le(i("input",{"onUpdate:modelValue":b[5]||(b[5]=I=>f.value=I),type:"text",placeholder:"claude-sonnet-4-5",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),[[me,f.value,void 0,{trim:!0}]])]),i("div",Nd,[b[24]||(b[24]=i("div",{class:"text-xs font-medium text-textSecondary uppercase tracking-wider mb-3"},"Current State",-1)),i("div",Ld,[i("div",null,[b[20]||(b[20]=i("div",{class:"text-xs text-muted mb-1"},"Message Buffer",-1)),i("span",{class:G(["text-sm font-medium",r.value>0?"text-success":"text-textSecondary"])},_(r.value>0?`${r.value} messages`:"Disabled"),3)]),i("div",null,[b[21]||(b[21]=i("div",{class:"text-xs text-muted mb-1"},"Poll Timeout",-1)),i("span",Fd,_(a.value>=60?Math.floor(a.value/60)+"h "+a.value%60+"m":a.value+" min"),1)]),i("div",null,[b[22]||(b[22]=i("div",{class:"text-xs text-muted mb-1"},"Thread Model",-1)),i("span",Vd,_(h.value),1)]),i("div",null,[b[23]||(b[23]=i("div",{class:"text-xs text-muted mb-1"},"Worker Model",-1)),i("span",Ud,_(p.value),1)])]),i("div",Hd,[i("span",{class:G(["text-sm font-medium",v.value?"text-warn":"text-textSecondary"])},_(v.value?"Unsaved changes":"Saved"),3)])])]))])]))}}),Wd={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-surface/95 backdrop-blur-sm"},Kd={class:"glass rounded-2xl p-8 max-w-md w-full mx-4 animate-slide-up"},zd=["disabled"],Jd={key:0,class:"mt-3 text-sm text-danger"},qd={key:1,class:"min-h-screen font-sans text-textPrimary animate-fade-in"},Gd={class:"glass sticky top-0 z-40 border-b border-gray-800/50"},Yd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between"},Zd={class:"flex items-center gap-4"},Qd={class:"text-sm text-textSecondary font-mono"},Xd={class:"max-w-7xl mx-auto px-4 sm:px-6 py-6"},ef={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3"},tf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},sf={class:"text-2xl font-bold font-mono"},nf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},of={class:"text-2xl font-bold font-mono"},rf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},lf={class:"text-2xl font-bold font-mono"},af={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},cf={class:"flex items-center gap-2 mb-2"},uf={class:"text-2xl font-bold font-mono"},df={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},ff={class:"text-2xl font-bold font-mono"},pf={class:"glass rounded-xl p-4 stat-glow animate-slide-up"},hf={class:"text-2xl font-bold font-mono"},mf={class:"max-w-7xl mx-auto px-4 sm:px-6"},gf={class:"flex gap-6 border-b border-gray-800/50 mb-6"},xf=["onClick"],vf={class:"max-w-7xl mx-auto px-4 sm:px-6 pb-12"},hs="sensorium_token",yf=At({__name:"App",setup(e){const t=R(!1),s=R(""),n=R(""),o=R(!1),r=R(null),l=R("sessions");let a=null;const u=[{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:sc,skills:Dc,threads:vd,settings:Bd},f=Ke(()=>h[l.value]),p=Ke(()=>{if(!r.value)return"—";const b=Math.floor(r.value.uptime),I=Math.floor(b/86400),L=Math.floor(b%86400/3600),B=Math.floor(b%3600/60);return I>0?`${I}d ${L}h`:L>0?`${L}h ${B}m`:`${B}m`});async function v(){const b=s.value.trim()||"no-auth";o.value=!0,n.value="";try{Kt(b),await H(),localStorage.setItem(hs,b),t.value=!0,$()}catch(I){const L=I;L.status===401?n.value="Invalid token":n.value=L.message??"Connection failed",Kt("")}finally{o.value=!1}}function A(){localStorage.removeItem(hs),t.value=!1,s.value="",r.value=null,a&&clearInterval(a),Kt("")}async function H(){r.value=await _e("/api/status")}function $(){a&&clearInterval(a),a=setInterval(H,3e4)}return wt(async()=>{const b=localStorage.getItem(hs);if(b){s.value=b;try{Kt(b),await H(),t.value=!0,$()}catch{localStorage.removeItem(hs),Kt("")}}}),_n(()=>{a&&clearInterval(a)}),(b,I)=>{var L,B,F,Z,he,W,j,z,X,ee,ke;return t.value?(w(),S("div",qd,[i("header",Gd,[i("div",Yd,[I[3]||(I[3]=We('<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)),i("div",Zd,[I[2]||(I[2]=i("div",{class:"flex items-center gap-2 text-sm"},[i("span",{class:"w-2 h-2 rounded-full bg-success animate-pulse-slow"}),i("span",{class:"text-textSecondary"},"Connected")],-1)),i("div",Qd,_(p.value),1),i("button",{onClick:A,class:"text-sm text-muted hover:text-textSecondary transition"},"Disconnect")])])]),i("div",Xd,[i("div",ef,[i("div",tf,[I[4]||(I[4]=We('<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)),i("div",sf,_(((L=r.value)==null?void 0:L.activeSessions)??0),1)]),i("div",nf,[I[5]||(I[5]=We('<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)),i("div",of,_(((F=(B=r.value)==null?void 0:B.memory)==null?void 0:F.totalSemanticNotes)??0),1)]),i("div",rf,[I[6]||(I[6]=We('<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)),i("div",lf,_(((he=(Z=r.value)==null?void 0:Z.memory)==null?void 0:he.totalEpisodes)??0),1)]),i("div",af,[i("div",cf,[i("span",{class:G((((j=(W=r.value)==null?void 0:W.memory)==null?void 0:j.unconsolidatedEpisodes)??0)>10?"text-danger":"text-success")},[...I[7]||(I[7]=[i("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)])],2),I[8]||(I[8]=i("span",{class:"text-xs text-textSecondary font-medium uppercase tracking-wider"},"Unconsolidated",-1))]),i("div",uf,_(((X=(z=r.value)==null?void 0:z.memory)==null?void 0:X.unconsolidatedEpisodes)??0),1)]),i("div",df,[I[9]||(I[9]=We('<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)),i("div",ff,_(((ke=(ee=r.value)==null?void 0:ee.memory)==null?void 0:ke.totalProcedures)??0),1)]),i("div",pf,[I[10]||(I[10]=We('<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)),i("div",hf,_(p.value),1)])])]),i("div",mf,[i("nav",gf,[(w(),S(ie,null,Se(u,Ce=>i("button",{key:Ce.id,onClick:xt=>l.value=Ce.id,class:G(["pb-3 text-sm font-medium transition",l.value===Ce.id?"tab-active":"tab-inactive"])},_(Ce.label),11,xf)),64))])]),i("div",vf,[(w(),dr(Ai(f.value),{status:r.value},null,8,["status"]))])])):(w(),S("div",Wd,[i("div",Kd,[I[1]||(I[1]=We('<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(i("input",{"onUpdate:modelValue":I[0]||(I[0]=Ce=>s.value=Ce),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:Jt(v,["enter"])},null,544),[[me,s.value]]),i("button",{onClick:v,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,zd),n.value?(w(),S("p",Jd,_(n.value),1)):Q("",!0)])]))}}});Ul(yf).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">
|